News aggregator

Which streaming library do you recommend to parse a network feed, demultiplex it into channels, build some state on each of them and produce events?

Haskell on Reddit - Sun, 02/01/2015 - 4:37pm

I'm trying to build an application that parses an exchange protocol, demultiplexes it into (channels), builds a trading book from the messages, identifies patterns and finally logs them (one file per channel). I would like to use a streaming library to structure the different steps of the application but I haven't been able to find examples of anything similar. I believe the library should follow a push model (the producer drives de computation). I'm not sure if this is possible with Conduit. I saw that Pipes has push-based pipes, but I haven't found many examples either. I'm also trying to digest Enumerators and Arrows, but I feel I'm loosing focus. Could anybody advise which streaming library be a good fit for this problem so I can concentrate on learning just one? Many thanks.

submitted by jeroko
[link] [12 comments]
Categories: Incoming News

stream fusion, concatMap, exisential seed unboxing

glasgow-user - Sun, 02/01/2015 - 2:18pm
Hi everybody, I'm playing around with concatMap in stream fusion (the vector package to be exact). concatMapM :: Monad m => (a->m (Stream m b)) -> Stream m a -> Stream m b concatMapM f (Stream ...) = ... I can get my concatMap to behave nicely and erase all Stream and Step constructors but due to the existential nature of the Stream seeds, they are re-boxed for the inner stream (which is kind-of annoying given that the seed is immediately unboxed again ;-). seq doesn't help here. Otherwise, fusion happens for streams and vectors, so that is ok. But boxing kills performance, criterion says. Do we have in place that could help here? Currently I could use the vector-concatMap which creates intermediate arrays, my version which has boxed seeds, or hermit but that is too inconvenient for non-ghc savy users. Viele Gruesse, Christian Fusing concatMapM: concatMapM f (SM.Stream ostep t _) = SM.Stream step (Left t) Unknown where step (Left t) = do r <- ostep t case r of
Categories: Offsite Discussion

Can't log into with a new account

Haskell on Reddit - Sun, 02/01/2015 - 1:15pm

The wiki accepts my login details and then asks me to change the password as it's a new account. When I click the Set Password and Log In button I get a page with the following:

Change password There seems to be a problem with your login session; this action has been canceled as a precaution against session hijacking. Go back to the previous page, reload that page and then try again.

I get this with Chrome (with Ghostery and Adblock disabled) and IE.

Searching for that message brings up various MediaWiki discussions - one possible cause is insufficient disk space (on the server). Has anyone else seen the same issue?

submitted by jonhanson
[link] [2 comments]
Categories: Incoming News

cpennington/h4sh - Sun, 02/01/2015 - 11:17am
Categories: Offsite Blogs

cpennington/h4sh - Sun, 02/01/2015 - 11:17am
Categories: Offsite Blogs

JP Moresmau: HGraphStorage on Hackage

Planet Haskell - Sun, 02/01/2015 - 10:18am
I've published my prototype of a graph database, HGraphStorage, on Hackage. Not to say that this is a database you should use in production! This is just a test bed to play around graph database concepts and low level algorithms for storage and retrieval.

Just releasing it was, ahem, fun, as somebody noticed that it didn't build in a clean sandbox, and then that the haddock comments were broken (it's a bit annoying that a one space error in Haddock markup causes the whole install to fail). So hopefully now it's ready for people to try and improve!

Pull requests welcome!!

Categories: Offsite Blogs

Template Haskell attempts to load mingw32.dll duringbuild

haskell-cafe - Sun, 02/01/2015 - 9:15am
Hi all, Windows GHC 7.8.4 build issue here: I've noticed that GHC will attempt to link mingw32 if a related dependency (in my case sdl2) is required in a TH pass. Unsurprisingly, the OS fails to find the imaginary mingw32.dll file. Are there any known resolutions to this quirk? Cheers, Darren _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >
Categories: Offsite Discussion

Proposal: Add mapWithIndex to Data.List

libraries list - Sun, 02/01/2015 - 3:21am
Vectors offer `imap` and sequences offer `mapWithIndex`. I think lists deserve to have something like this too. The obvious implementation, using `zipWith`, is unlikely to be the most efficient (because foldr/build fusion doesn't handle zips so wonderfully). To a first approximation: mapWithIndex :: (Int -> a -> b) -> [a] -> [b] mapWithIndex f xs = build $ \c n -> let go x cont !i = f i x `c` cont (i+1) in foldr go (`seq` n) 0
Categories: Offsite Discussion

What are some examples of really good Haskell code?

Haskell on Reddit - Sun, 02/01/2015 - 12:17am

In order to improve my personal coding style I'd like to take the time to study exemplary Haskell. Can you recommend certain libraries or examples that are written especially clearly and idiomatically?

submitted by begriffs
[link] [27 comments]
Categories: Incoming News

Cabal config file - default install flags?

haskell-cafe - Sat, 01/31/2015 - 11:02pm
I'd like to have cabal automatically use -j8 when I cabal install something. Is there something I can put into the .cabal/config file that will accomplish this? More generally, where can I find documentation on that config file? - Lucas Paul
Categories: Offsite Discussion

Can the "read" function execute functions?

Haskell on Reddit - Sat, 01/31/2015 - 9:20pm

For example, if I have f n = n2, is there a way that I can do read "f 5" that will return 25? Is it possible to execute functions though the read function?

EDIT: Or any other function for that matter. I'm just wondering if it's possible.

submitted by k3DW
[link] [14 comments]
Categories: Incoming News

What ever happened to 'layers` package?

Haskell on Reddit - Sat, 01/31/2015 - 3:20pm

You'll find an old discussion here:

It seems quite promising, but the hackage package is not up-to-date with the GitHub source. Is anyone actively using this?

Some context: "Monad layers, an alternative to transformers: The author claims [layers package's] superiority over transformers, but given that in my whole Haskell experience I have never heard anything about that package I am interested why, also whether the author's claims are true and in general opinions from the community."

submitted by eacameron
[link] [4 comments]
Categories: Incoming News