[Haskell-cafe] binary IO

2005-12-27 Thread Dominic Steinitz
It might also be worth looking at the networking code in House given the intended application is parsing network packets. See http://www.cse.ogi.edu/~hallgren/House/kernel/pfe.cgi?Net.PacketParsing, for example. Dominic. ___ Haskell-Cafe mailing

Re: [Haskell-cafe] binary IO

2005-12-27 Thread Joel Reymont
Tomasz, Try http://wagerlabs.com/timeleak.tgz. See the Killer pickler combinators thread as well. My desired goal is to have 4k bots (threads?) running at the same time. At, say, 1k/s per bot I figure something like 4Mb/s round-trip. Each bot cannot spend more than a couple of seconds on

Re: [Haskell-cafe] binary IO

2005-12-27 Thread Bulat Ziganshin
Hello Pupeno, Tuesday, December 27, 2005, 7:10:24 AM, you wrote: P It seems I have found a hole in Haskell... :( lazy language can't contain holes, they are just yet unevaluated thunks :) P I basically need a set of functions to read binary data out of a Handle (a P higher lever of hGetBuf and

Re: [Haskell-cafe] binary IO

2005-12-27 Thread Branimir Maksimovic
From: Joel Reymont [EMAIL PROTECTED] To: Tomasz Zielonka [EMAIL PROTECTED] CC: Jeremy Shaw [EMAIL PROTECTED],haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] binary IO Date: Tue, 27 Dec 2005 09:18:54 + Tomasz, Try http://wagerlabs.com/timeleak.tgz. See the Killer pickler

Re: [Haskell-cafe] binary IO

2005-12-27 Thread Joel Reymont
We'll see, Erlang is built for this type of stuff. I might have results from the timeleak test today and will probably have first networking results tomorrow. But I wish I could achieve even a fraction of that with Haskell. On Dec 27, 2005, at 9:51 AM, Branimir Maksimovic wrote: I have

Re[2]: [Haskell-cafe] binary IO

2005-12-27 Thread Bulat Ziganshin
Hello Joel, Tuesday, December 27, 2005, 12:18:54 PM, you wrote: JR My desired goal is to have 4k bots (threads?) running at the same JR time. At, say, 1k/s per bot I figure something like 4Mb/s round-trip. no problem. my library handle about 10-15mb/s, and i think that speed can be doubled by

Re: [Haskell-cafe] binary IO

2005-12-27 Thread Pupeno
On Tuesday 27 December 2005 02:10, Jeremy Shaw wrote: they do not care about big endian vs little endian. Does it mean that it just reads the data in whatever endianess the computer is in, right ? However, while the Binary class in NewBinary may not be appropriate, the uniform interface to

Re: Re[2]: [Haskell-cafe] binary IO

2005-12-27 Thread Joel Reymont
Bulat, On Dec 27, 2005, at 1:58 PM, Bulat Ziganshin wrote: no problem. my library handle about 10-15mb/s, and i think that speed can be doubled by using unboxed ints Would you like to present your version of the timeleak code plus statistics from a test run? This will demonstrate the

Re[2]: [Haskell-cafe] binary IO

2005-12-27 Thread Bulat Ziganshin
Hello Pupeno, Tuesday, December 27, 2005, 6:12:37 PM, you wrote: they do not care about big endian vs little endian. P Does it mean that it just reads the data in whatever endianess the computer is P in, right ? NewBinary read/write data in so-called network format, which is the same as in

[Haskell-cafe] Can this be improved?

2005-12-27 Thread Chris Kuklewicz
Happy Holidays, I was wondering if it this small snippet of code could be altered to require fewer OPTIONS -fallow-... switches. It creates a show-what-i-mean function called swim that takes a variable number of arguments, and treats strings as-is, calling show on the other arguments. {-#

Re[4]: [Haskell-cafe] binary IO

2005-12-27 Thread Bulat Ziganshin
Hello Joel, Tuesday, December 27, 2005, 6:24:56 PM, you wrote: no problem. my library handle about 10-15mb/s, and i think that speed can be doubled by using unboxed ints JR Would you like to present your version of the timeleak code plus JR statistics from a test run? do it yourself. i

Re: Re[4]: [Haskell-cafe] binary IO

2005-12-27 Thread Joel Reymont
On Dec 27, 2005, at 4:52 PM, Bulat Ziganshin wrote: spending several weeks to random optimization is like buying a gold computer case trying to speed up the game :) I did not spend several weeks on optimization. I went through about 25 iterations with the timeleak code and the profiler. I

[Haskell-cafe] Re: Proper way to write this

2005-12-27 Thread Max Vasin
Pupeno wrote: On Monday 26 December 2005 02:41, Donn Cave wrote: I don't think it will be too much worse. I would not try to combine the struct updates, in the both case -- it doesn't buy you anything, and pulls you into duplication you don't want. What about this runDaytimeServer ::

Re: Re[4]: [Haskell-cafe] binary IO

2005-12-27 Thread Gour
On Tue, 2005-12-27 at 18:35 +, Joel Reymont wrote: Hi Joel! Then we can lay out the series of profiling reports in a storyboard of sorts, with changes from report to report described. This would serve a great how to write efficient Haskell manual. We are with you watching your

Re: Re[4]: [Haskell-cafe] binary IO

2005-12-27 Thread Joel Reymont
That's great to hear! I will continue once I have a chance to discuss it with the gurus and optimize it further. At the same time, I would challenge everyone with a fast IO library to plug it into the timeleak code, run it under a profiler and post the results (report + any alarms). The

Re: [Haskell-cafe] Re: Proper way to write this

2005-12-27 Thread Jacques Carette
Max Vasin wrote: Pupeno wrote: What about this runDaytimeServer :: DaytimeServer - IO DaytimeServer runDaytimeServer dts = do dts' - runStreamDaytimeServer dts dts' - runDgramDaytimeServer dts' return dts' runDaytimeServer dts = runStreamDaytimeServer dts = runDgramDaytimeServer

[Haskell-cafe] Re: binary IO

2005-12-27 Thread Peter Simons
Joel Reymont writes: I would challenge everyone with a fast IO library to plug it into the timeleak code, run it under a profiler and post the results (report + any alarms). My guess is that you would learn more if _you_ would plug the different IO libraries into your test code. I'm

Re: [Haskell-cafe] Re: binary IO

2005-12-27 Thread Joel Reymont
I will have to leave this for a while. I apologize but I'm more than a bit frustrated at the moment and it's not fair of me to take it out on everybody else. If someone is willing to take this further I will appreciate it, otherwise I'll get to it in the coming weeks. Besides knowing how to do

Re: [Haskell-cafe] binary IO

2005-12-27 Thread Tomasz Zielonka
On Tue, Dec 27, 2005 at 09:18:54AM +, Joel Reymont wrote: Try http://wagerlabs.com/timeleak.tgz. See the Killer pickler combinators thread as well. Let's see if I understand correctly. There are 17605 messages in trace.dat. On my hardware the average message unpicking time is 0.0002s when

Re: [Haskell-cafe] Can this be improved?

2005-12-27 Thread Tomasz Zielonka
On Tue, Dec 27, 2005 at 04:39:34PM +, Chris Kuklewicz wrote: Happy Holidays, I was wondering if it this small snippet of code could be altered to require fewer OPTIONS -fallow-... switches. It creates a show-what-i-mean function called swim that takes a variable number of arguments,

Re: [Haskell-cafe] Can this be improved?

2005-12-27 Thread Chris Kuklewicz
Tomasz Zielonka wrote: On Tue, Dec 27, 2005 at 04:39:34PM +, Chris Kuklewicz wrote: Happy Holidays, I was wondering if it this small snippet of code could be altered to require fewer OPTIONS -fallow-... switches. It creates a show-what-i-mean function called swim that takes a variable

[Haskell-cafe] Re: binary IO

2005-12-27 Thread Peter Simons
Joel Reymont writes: I will have to leave this for a while. I apologize but I'm more than a bit frustrated at the moment and it's not fair of me to take it out on everybody else. Never mind. Haskell has a very high potential for frustrating newcomers. I went through the exact same

[Haskell-cafe] Re: Tutorial uploaded

2005-12-27 Thread John Goerzen
On 2005-12-20, Daniel Carrera [EMAIL PROTECTED] wrote: Hi all, I've finished a first draft of what I call First steps in Haskell. It's intended to be the very first thing a new user sees when they decide to try out Haskell. I should point out a parallel effort that a few of us have worked

[Haskell-cafe] Database mailing list?

2005-12-27 Thread John Goerzen
Greetings, It seems there are a lot of people working on database-related things in Haskell. HaskellDB, wxHaskell, HDBC, HSQL, etc. I'm wondering if it would make sense to have a haskell-db mailing list to help coordinate efforts? (Or even just to help manage development on these projects

[Haskell-cafe] NewBinary on Ptrs

2005-12-27 Thread Pupeno
Hello, After trying my own code and reading the whole thread I started to understand NewBinary. I'm going to give it a try. My question now is how to turn a Ptr into a BinHandle to use NewBinary on it, or is there another way to do it ? Thanks. -- Pupeno [EMAIL PROTECTED] (http://pupeno.com)

[Haskell-cafe] Re: Haskell Speed

2005-12-27 Thread Isaac Gouy
Simon Marlow wrote: Also, I would like to draw your attention to the fact that GHC wipes the floor with nearly everyone in the concurrency benchmark SmartEiffel is so much faster that I'm still trying to figure out if it's doing something different :-) Be interesting to see GHC on the other

[Haskell-cafe] Re: Haskell Speed

2005-12-27 Thread Isaac Gouy
Jared Updike wrote: What that means is the results are completely subject to (1) how good the submission for that tests was Contribute faster more-elegant programs http://shootout.alioth.debian.org/gp4/faq.php#contribute (2) the choice of tests in the first place Suggest better tests

[Haskell-cafe] Re: Haskell Speed

2005-12-27 Thread Isaac Gouy
Branimir Maksimovic wrote: Of course, first example uses [String] instead of Data.HashTable as other languages do. Imagine C program does not use hash,rather list, how it will perform:) And the author comments his program -- This is a purely functional solution to the problem. -- An