[Haskell-cafe] Re: Progress on shootout entries
I took a quick crack at optimizing fannkuch.hs. I got it down from 33s to 1.25s on my machine, with N=9. That should put it between forth and ocaml(bytecode) in the shootout page. The main changes I made were using Int instead of Int8, foldl' to accumulate the max number of folds, a custom flop function rather than a combination of reverse and splitAt, and a simpler definition for permutations. http://kimbly.com/code/fannkuch.hs Kimberley Burchett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Haskell poker server
Hi Joel, I've been working on a library to parse binary data files (java bytecode in my case), and I ended up writing my own DataReader monad for the purpose of reading binary streams. It offers two main features: * It keeps track of how many bytes you've read. This is necessary for reading java bytecode, but probably unnecessary for the protocol you're using. * It supports hierarchical error messages (so you see error while reading foo: unexpected end of input instead of just unexpected end of input). If you're interested, you can check it out here: http://www.kimbly.com/code/JavaBytecode/ Kim ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Data.Graph or Data.Graph.Inductive?
Is there a general agreement as to whether one should prefer Data.Graph or Data.Graph.Inductive? I've read both of the papers, and while I find the Inductive view very compelling, it seems like Erwig was more concerned with elegance than performance, while KingLaunchbury seem to value performance more highly. Any guidance as to which package people actually use would be appreciated. Kim ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: haskell parser for java bytecode?
Jerzy Karczmarczuk asked: Why for goodness' sake, people interested in Haskell *should* worry about parsing of Java bytecode chunks? Are you asking why I'm interested in bytecode instead of source code, or are you asking why I'm interested in Java at all? One answer to the first question is: because java bytecode is a simpler problem domain than java source. For example, name resolution is trivial when working with bytecode (there's no ambiguity between package/class/variable names, inherited names are already resolved, overloaded functions are already resolved, etc). Also, many of the newer features of java disappear at the bytecode level: inner classes, generics, the new foreach statement, etc. Another answer to the first question is: because java bytecode can be used as a target for several languages these days, and by working with it directly, I can work with any language that compiles to the jvm, rather than restricting myself just to java. The answer to the second question is: because the rest of the world matters to some people. Kimberley Burchett http://www.kimbly.com/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: haskell parser for java bytecode?
On Thu, 30 Jun 2005, Tomasz Zielonka wrote: Jerzy is asking why you are surprised. There's nothing wrong in being interested in Java/bytecode, but it's a bit strange to expect every language to have a library for reading Java bytecode. My apologies. I didn't mean to imply that there *should* be a library for this, or that the haskell community was in any way failing to live up to my expectations. I was just surprised that nobody had gotten around to doing it before me. Kimberley Burchett http://kimbly.com/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] haskell parser for java bytecode?
I'm interested in using haskell to do static analysis of java bytecode. To my surprise, I wasn't able to find any existing haskell libraries for parsing java .class files. Is anyone aware of such a library? I've already started writing my own implementation, which I intend to make available as a reusable library once it's ready, but if someone else has already done the work then I'd love to avoid having to repeat it. Kimberley Burchett http://www.kimbly.com/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe