scalaz-stream Questions
3
Solved
I'm trying to define HttpService that receives json and parses it to case class with json4s library:
import org.http4s._
import org.http4s.dsl._
import org.json4s._
import org.json4s.native.JsonMe...
Hyperform asked 4/5, 2016 at 20:19
1
I'm trying to understand how to reorganize a program which I would previously have written as a sequence of state transitions:
I have some business logic:
type In = Long
type Count = Int
type Ou...
Fungal asked 17/11, 2014 at 14:33
3
Solved
Using scalaz-stream is it possible to split/fork and then rejoin a stream?
As an example, let's say I have the following function
val streamOfNumbers : Process[Task,Int] = Process.emitAll(1 to ...
Triangulate asked 17/12, 2014 at 9:35
1
Solved
Suppose I've got an Iterator[A]. I would like to convert it to Process[Nothing, A] of scalaz stream.
import scalaz.stream._
def foo[A](it: Iterator[A]): Process[Nothing, A] = ???
How would you ...
Cuttler asked 19/10, 2015 at 6:29
2
Solved
Why am I getting the following error: could not find implicit value for parameter C: scalaz.Catchable[F2] when executing P(1,2,3).run?
[scalaz-stream-sandbox]> console
[info] Starting scala int...
Caucus asked 7/4, 2014 at 21:33
1
Solved
I found that there is no more awakeEvery inside scalaz.stream.Process in modern scalaz-stream. How to run something with period then?
Hypersonic asked 29/9, 2015 at 19:13
1
I am trying to make a sink that would write a stream to bucketed files: when a particular condition is reached (time, size of file, etc.) is reached, the current output stream is closed and a new o...
Filagree asked 31/3, 2014 at 22:24
1
Solved
Let's take an example from some scalaz-stream docs, but with a theoretical twist.
import scalaz.stream._
import scalaz.concurrent.Task
val converter: Task[Unit] =
io.linesR("testdata/fahrenheit....
Houlihan asked 18/12, 2014 at 15:17
1
I'm failing to get a simple scalaz-stream example running, reading from TCP and writing to std out.
val src = tcp.reads(1024)
val addr = new InetSocketAddress(12345)
val p = tcp.server(addr, concu...
Porter asked 15/12, 2014 at 19:42
1
Solved
I have a simple program:
import scalaz._
import stream._
object Play extends App {
val in1 = io.linesR("C:/tmp/as.txt")
val in2 = io.linesR("C:/tmp/bs.txt")
val p = (in1 merge in2) to io.stdO...
Isabeau asked 18/11, 2014 at 16:57
1
Solved
I have weird observation about scalaz-streams sinks. They are working slow. Does anyone know why is that? And is there any way to improve the performance?
here are relevant parts of my code:
versi...
Reyna asked 14/10, 2014 at 23:56
1
Recently, I've been playing with scalaz.iteratee and Play's iteratee. I think that iteratee is a great idea to provide modularity instead of the old imperative while loop -- the aim is to use a fun...
Penmanship asked 29/8, 2014 at 2:28
2
Solved
I am trying to write the following function
def haltOnUserInput[O](process: Process[Task, O]): Process[Task, O]
which halts process when the user sends a line on stdin. In this scenario, it is o...
Flyboat asked 16/7, 2014 at 19:45
1
Solved
In Scala, for reading a text file and uploading it into an array, a common approach is
scala.io.Source.fromFile("file.txt").getLines.toArray
Especially for very large files, is there a faster ap...
Crudity asked 11/4, 2014 at 8:43
2
Solved
I'm following the Functional Reactive Programming in Scala course on Coursera and we deal with RxScala Observables (based on RxJava).
As far as I know, the Play Iteratee's library looks a bit like...
Scuba asked 11/12, 2013 at 13:39
1
Solved
Introduction
I use Scalaz 7's iteratees in a number of projects, primarily for processing large-ish files. I'd like to start switching to Scalaz streams, which are designed to replace the iteratee...
Frieda asked 7/8, 2013 at 19:33
1
© 2022 - 2024 — McMap. All rights reserved.