Re: [Haskell-cafe] Evaluating arithmetic expressions at run time

2006-01-28 Thread Sebastian Sylvan
probably a bit more heavy-weight than what you were looking for, but take a look at: http://www.cse.unsw.edu.au/~dons/hs-plugins/ It allows you to load and execute Haskell code at run-time. I suppose this should also be possible by importing some part of GHC (perhaps GHCi). /S -- Sebastian Sylvan

Re: [Haskell-cafe] Can I use Haskell for web programming

2006-01-21 Thread Sebastian Sylvan
? Take a look at WASH and HSP... http://www.informatik.uni-freiburg.de/~thiemann/WASH/ http://www.cs.chalmers.se/~d00nibro/hsp/ -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] compiling lazy functional languages

2006-01-18 Thread Sebastian Sylvan
not qualified to give any advice here, but I sure found Boquist's paper very interesting: http://www.cs.chalmers.se/~boquist/phd/ /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell] GLUT gears speed

2006-01-17 Thread Sebastian Sylvan
On 1/17/06, Wolfgang Jeltsch [EMAIL PROTECTED] wrote: Am Montag, 16. Januar 2006 22:12 schrieb Sebastian Sylvan: On 1/16/06, Wolfgang Jeltsch [EMAIL PROTECTED] wrote: Am Montag, 16. Januar 2006 15:16 schrieb Sebastian Sylvan: [...] Hello Sebastian, thank you for your answer

Re: [Haskell] GLUT gears speed

2006-01-16 Thread Sebastian Sylvan
rather than miniscule overheads from library bindings. You may want to find a good terrain-rendering library rather than implementing it yourself. /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell mailing list Haskell@haskell.org http

Re: [Haskell] GLUT gears speed

2006-01-16 Thread Sebastian Sylvan
On 1/16/06, Wolfgang Jeltsch [EMAIL PROTECTED] wrote: Am Montag, 16. Januar 2006 15:16 schrieb Sebastian Sylvan: [...] Hello Sebastian, thank you for your answer. As long as you don't do it naively there should be no problems. I.e. do not draw the terrain using the vertex-calls

Re: [Haskell-cafe] Shootout favouring C

2006-01-16 Thread Sebastian Sylvan
to target an execution time of at least a few seconds for the fastest benchmarks. /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Shootout favouring C

2006-01-16 Thread Sebastian Sylvan
On 1/16/06, Isaac Gouy [EMAIL PROTECTED] wrote: Shootout favouring C On 1/16/06, Daniel Fischer wrote: Is it only my machime, or can you confirm that for the Ackermann benchmark, it's very good for C that they chose 9 and not a larger value? Sebastian Sylvan [EMAIL PROTECTED

Re: [Haskell-cafe] Re: Shootout favouring C

2006-01-16 Thread Sebastian Sylvan
On 1/16/06, Aaron Denney [EMAIL PROTECTED] wrote: On 2006-01-16, Sebastian Sylvan [EMAIL PROTECTED] wrote: On 1/16/06, Isaac Gouy [EMAIL PROTECTED] wrote: Shootout favouring C On 1/16/06, Daniel Fischer wrote: Is it only my machime, or can you confirm that for the Ackermann

Re: [Haskell-cafe] Shootout rankings

2006-01-15 Thread Sebastian Sylvan
can have a live and an elegant version. So that you can at least see what an elegant implementation would look like for each language (but that version isn't benchmarked). /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell-Cafe mailing

Re: [Haskell-cafe] Shootout rankings

2006-01-15 Thread Sebastian Sylvan
im; putMVar om $! x+1; thread im om int he cheap concurrencybenchmark, most people don't write Haskell code with semi-colons, and when they do they usually sequence them vertically, not horizontally). /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862

Re: [Haskell-cafe] Shootout rankings

2006-01-15 Thread Sebastian Sylvan
of lines. Perhaps the use of several imports on one line separated by semi-colons is a clearar example of that, though. /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman

Re: [Haskell] Looking for a random-access sequence data structure

2006-01-13 Thread Sebastian Sylvan
? Does it replace an element, or does it shirt all the elements after it one step? /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell-cafe] Splitting a string into chunks

2006-01-13 Thread Sebastian Sylvan
) and then a concat on each of the elements of this list will undo the redundant lines-splitting that lines performed... /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman

Re: [Haskell-cafe] Splitting a string into chunks

2006-01-13 Thread Sebastian Sylvan
On 1/13/06, Sebastian Sylvan [EMAIL PROTECTED] wrote: On 1/13/06, Adam Turoff [EMAIL PROTECTED] wrote: Hi, I'm trying to split a string into a list of substrings, where substrings are delimited by blank lines. This feels like it *should* be a primitive operation, but I can't seem

Re: [Haskell] Re: haskell.org Public Domain

2006-01-12 Thread Sebastian Sylvan
code? I know that in most countries it's perfectly legal to quote parts of book and articles, wouldn't the same apply to source code? /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell mailing list Haskell@haskell.org http

Re: [Haskell-cafe] multiline strings in haskell?

2006-01-12 Thread Sebastian Sylvan
it using \ and then another \ where the string starts again. str = multi\ \line Preludestr multiline /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo

Re: [Haskell] Re: haskell.org Public Domain

2006-01-10 Thread Sebastian Sylvan
something under a different license, it should be allowed. Or we could just link it... /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell-cafe] hPutStrLn and hFlush

2006-01-10 Thread Sebastian Sylvan
-- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell] New look for haskell.org: MediaWiki

2006-01-09 Thread Sebastian Sylvan
back, and it's not visible from the front page just yet - so if people don't like it, there's no harm done). /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell] New look for haskell.org: MediaWiki

2006-01-09 Thread Sebastian Sylvan
on this!). I'm sure some of the MediaWiki settings still need to be tweaked. Send me mail if something in the configuration of MediaWiki needs to be changed. A big thanks again to Ashley! Is there a way to typeset Haskell syntax yet? /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862

Re: [Haskell-cafe] hPutStrLn and hFlush

2006-01-09 Thread Sebastian Sylvan
On 1/9/06, Sebastian Sylvan [EMAIL PROTECTED] wrote: On 1/9/06, Gracjan Polak [EMAIL PROTECTED] wrote: Hi all, A bit strange behaviour with hPutStrLn. Consider following program: main = do handle - openFile output.txt WriteMode hPutStrLn handle (unlines contLines2

Re: [Haskell-cafe] Shootout favoring imperative code

2006-01-07 Thread Sebastian Sylvan
On 1/6/06, Udo Stenzel [EMAIL PROTECTED] wrote: Sebastian Sylvan wrote: On 1/5/06, Chris Kuklewicz [EMAIL PROTECTED] wrote: There is no need to beat a dead horse, though. This benchmark sets out to test fgets / atoi, and that is all. There are better benchmarks to spend time

Re: [Haskell-cafe] Fannkuch Entry

2006-01-06 Thread Sebastian Sylvan
reading, and I can only imagine how a non-Haskeller would feel). If it turns out that the fastest we comes up with uses Ptrs and is written entirely in the IO monad, then we're not so lucky. /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell

Re: [Haskell-cafe] Shootout favoring imperative code

2006-01-05 Thread Sebastian Sylvan
On 1/4/06, Brent Fulgham [EMAIL PROTECTED] wrote: --- Sebastian Sylvan [EMAIL PROTECTED] wrote: Some of the problems seem to be heavily geared towards an imperative *implementation*, meaning that a Haskell version is hardly idiomatic Haskell (and as such I , and I suspect otehrs

Re: [Haskell-cafe] Shootout favoring imperative code

2006-01-05 Thread Sebastian Sylvan
- allocaArray bufferSize (\buf - loop buf 0) print v -- -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Frag/OSX

2006-01-05 Thread Sebastian Sylvan
, with some rudimentary AI. /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: Progress on shootout entries

2006-01-04 Thread Sebastian Sylvan
language's ability to instruction-for-instruction implement a C algorithm? It's certainly possible to implement the exact same algorithm using Ptr Word8 etc, but what's the point? It's not idiomatic Haskell anymore and as such has little or no interest to me. This is silly! /S -- Sebastian Sylvan +46(0

Re: [Haskell-cafe] Re: Progress on shootout entries

2006-01-04 Thread Sebastian Sylvan
On 1/4/06, Chris Kuklewicz [EMAIL PROTECTED] wrote: Sebastian Sylvan wrote: On 1/4/06, Josh Goldfoot [EMAIL PROTECTED] wrote: Keep in mind that the shootout requires that the first 30 permutations printed out by the Fannkuch benchmark to be exactly those given in the example. Well

Re: [Haskell-cafe] Re: Progress on shootout entries

2006-01-04 Thread Sebastian Sylvan
On 1/4/06, Chris Kuklewicz [EMAIL PROTECTED] wrote: Sebastian Sylvan wrote: On 1/4/06, Josh Goldfoot [EMAIL PROTECTED] wrote: Keep in mind that the shootout requires that the first 30 permutations printed out by the Fannkuch benchmark to be exactly those given in the example. Well

Re: [Haskell-cafe] Shootout favoring imperative code

2006-01-04 Thread Sebastian Sylvan
the order you get from an imperative solution) will only put off contributors for functional solutions. If you wanted to be fair here the order would be much more intricate and require considerable obfuscation for all langauges. /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862

Re: [Haskell-cafe] Re: Joels Time Leak

2006-01-03 Thread Sebastian Sylvan
-- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: Joels Time Leak

2006-01-03 Thread Sebastian Sylvan
On 1/3/06, Simon Marlow [EMAIL PROTECTED] wrote: On 03 January 2006 15:37, Sebastian Sylvan wrote: On 1/3/06, Simon Marlow [EMAIL PROTECTED] wrote: Tomasz Zielonka wrote: On Thu, Dec 29, 2005 at 01:20:41PM +, Joel Reymont wrote: Why does it take a fraction of a second for 1 thread

Re: [Haskell-cafe] How to print a string (lazily)

2006-01-03 Thread Sebastian Sylvan
the return type of print_list) /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] How to print a string (lazily)

2006-01-03 Thread Sebastian Sylvan
is lazy (just like *everything else* in Haskell) it won't actually *do* anything until putStr demands an element from the result. /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] Progress on shootout entries

2006-01-03 Thread Sebastian Sylvan
... I was going to rewrite it using mutable STArrays for a pure version that's still fast but i sorta feel like I lost the motivation now that it turns out the existing implementation, though ugly, performs somewhat okay... /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862

Re: [Haskell-cafe] Progress on shootout entries

2006-01-03 Thread Sebastian Sylvan
On 1/3/06, Sebastian Sylvan [EMAIL PROTECTED] wrote: On 1/3/06, Chris Kuklewicz [EMAIL PROTECTED] wrote: Hello, Where there were no entries to the http://shootout.alioth.debian.org/benchmark.php?test=chameneoslang=all benchmark, there are now two. The one by Josh Goldfoot is already

Re: [Haskell-cafe] Progress on shootout entries

2006-01-03 Thread Sebastian Sylvan
'), ('S','S'),('Y','R'),('K','M'),('V','B'),('D','H'),('D','H'),('B','V'),('N','N') ] process header@('':xs) = putStrLn header process x = putStrLn (map complement x) main = do xs - getContents mapM process (lines xs) /S -- Sebastian Sylvan +46(0)736-818655

Re: [Haskell-cafe] Progress on shootout entries

2006-01-03 Thread Sebastian Sylvan
On 1/4/06, Sebastian Sylvan [EMAIL PROTECTED] wrote: On 1/3/06, Chris Kuklewicz [EMAIL PROTECTED] wrote: Hello, Where there were no entries to the http://shootout.alioth.debian.org/benchmark.php?test=chameneoslang=all benchmark, there are now two. The one by Josh Goldfoot is already

Re: [Haskell] (small) records proposal for Haskell '06

2006-01-02 Thread Sebastian Sylvan
-gen records mechanism to be considered for Haskell 2.0. /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell-cafe] binary IO

2005-12-28 Thread Sebastian Sylvan
the problem and may indicate a bottle-neck that isn't there. How does this work if you remove the file-reading? I mean just putting the file on a small TCP/IP file server with some simulated latency and bandwidth limitation, and then connecting to that in each thread? /S -- Sebastian Sylvan +46(0

Re: [Haskell-cafe] Re: Tutorial uploaded

2005-12-22 Thread Sebastian Sylvan
value to a string. This include numbers, but also includes a host of other values. /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: Tutorial uploaded

2005-12-22 Thread Sebastian Sylvan
-- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Type inference for infinite structures

2005-12-22 Thread Sebastian Sylvan
be Nat. /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: Tutorial uploaded

2005-12-21 Thread Sebastian Sylvan
message I have yet to come across a book or tutorial which does this right. It should treats the language from a practical point of view, with IO, QuickCheck generators, data types, GUI's etc. right up front, rather than avoiding it until chapter 19 and later. /S -- Sebastian Sylvan +46(0)736

Re: [Haskell-cafe] Re: Tutorial uploaded

2005-12-21 Thread Sebastian Sylvan
On 12/21/05, Wolfgang Jeltsch [EMAIL PROTECTED] wrote: Am Dienstag, 20. Dezember 2005 20:07 schrieb Sebastian Sylvan: [...] It's sometimes beneficial to lie a bit when starting out. Perhaps say something like this is a simplified view of things, for all the gory details see chapter 19

Re: [Haskell-cafe] Re: Tutorial uploaded

2005-12-21 Thread Sebastian Sylvan
by teaching them a little IO up front (to show them it's not scary), and then leaving it alone for a while, having a more thorugough treatment of it later on. /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell-Cafe mailing list Haskell

Re: [Haskell-cafe] Re: Tutorial uploaded

2005-12-21 Thread Sebastian Sylvan
On 12/21/05, Daniel Carrera [EMAIL PROTECTED] wrote: Sebastian Sylvan wrote: Beginners know that too. In fact, they often think that practical applications need far more IO than they really do! So to insinuate even slightly that Haskell is bad at IO by avoiding it for two thirds of a book

Re: [Haskell-cafe] Killer pickler combinators (was Time leak)

2005-12-21 Thread Sebastian Sylvan
. The difference is that if you run out of CPU juice, only some of the processess get hurt (they timout before they start), instead of all of them (the time it takes to compute each of them is more than the timeout because the CPU is spread too thin). /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862

Re: [Haskell-cafe] Re: Tutorial uploaded

2005-12-20 Thread Sebastian Sylvan
that I could recommend to newcomers. IO, data types and QuickCheck in the very first chapter, I say! Real program examples from the get go, and go into the theory on why this has been hard in FP before Haskell (or Monadic IO rather) much much later, so as to not scare people away. /S -- Sebastian

Re: [Haskell-cafe] First steps in Haskell

2005-12-18 Thread Sebastian Sylvan
-- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] About print and side-effects

2005-12-18 Thread Sebastian Sylvan
is to define it. Monads have more uses than this, and there's a bit of interesting things to think about when learning about them, but you should probably hold off on that for now. /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell-Cafe

Re: [Haskell-cafe] Priority queue

2005-12-15 Thread Sebastian Sylvan
). In practice, for fewer elements, it may be faster to use other structures though (like lazy pairing heaps). The constant term is kinda high (though not *that* bad). /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] RE: [Haskell] TArray?

2005-12-15 Thread Sebastian Sylvan
implementation down the line). When/if a primitve TArray is implemented, the Array-of-Tvars-approach could just be replaced, and all programs which use the TArray would get an automatic speed-boost. /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862

Re: [Haskell-cafe] RE: [Haskell] TArray?

2005-12-15 Thread Sebastian Sylvan
On 12/15/05, Simon Marlow [EMAIL PROTECTED] wrote: On 15 December 2005 13:17, Sebastian Sylvan wrote: Anyway, the main gist of my original post was that TArrays should be in the libraries, so that I can safely use it without having to send along my own implementation each time

[Haskell] TArray?

2005-12-13 Thread Sebastian Sylvan
array without causing conflicts unless they write to the same index. /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell-cafe] Substring replacements

2005-12-11 Thread Sebastian Sylvan
by using unboxed arrays... /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] [Newbie] Why or why not haskell ?

2005-12-10 Thread Sebastian Sylvan
abuse the unsafe features of it :-) /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Can't Haskell catch up with Clean's uniqueness typing?

2005-12-07 Thread Sebastian Sylvan
, and that makes speed important. For single-purpose languages like, say, php it's not as important (because you're not going to write, say, a game engine in php for reasons other than speed). Haskell is certainly better now than it used to be, but there's plenty of room for improvement. /S -- Sebastian

Re: [Haskell-cafe] Learning Haskell

2005-12-07 Thread Sebastian Sylvan
are IORefs or regular values. As long as the result of := (or any numeric operators involving IORefs) is always an IO computation it's still safe. It may make it harder for people to grasp the difference between an IORef and a regular value though... /S -- Sebastian Sylvan +46(0)736-818655 UIN

Re: [Haskell-cafe] Re: wxHaskell and do statements

2005-11-29 Thread Sebastian Sylvan
is 8 spaces. IMO that's way too much. Haskell tends to take up quite a bit of horizontal real-estate so I usually go with 2 spaces. At any rate, I set my editor to convert them to spaces. /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell

Re: Re[2]: [Haskell-cafe] Uses forkOS all CPUS on-board?

2005-11-24 Thread Sebastian Sylvan
it with -threaded? this will not help. multi-processing support will be added in GHC 6.6, which must roll out due 6 months, as HCAR says I seem to remember getting it to work months ago. Using the CVS-version of GHC, though! /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862

Re: [Haskell-cafe] Uses forkOS all CPUS on-board?

2005-11-23 Thread Sebastian Sylvan
. Always is active just one thread and, thus, the computation is even slower than having a sequential version. Below, you can find my code - it computes nothing useful, it's been simplified to test parallelism, nothing else. Where's my error? Did you compile it with -threaded? -- Sebastian Sylvan

Re: [Haskell] ANNOUNCE: Frag: a First Person Shooting game

2005-11-22 Thread Sebastian Sylvan
, etc. There aren't a lot of game engines written in Haskell so it would be interesting to see how it worked out for you. /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman

Re: [Haskell-cafe] Records (was Re: [Haskell] Improvements to GHC)

2005-11-21 Thread Sebastian Sylvan
algorithms. But still, I always try to stick under 80 chars if possible to make it readible in terminals (and some email-clients etc.). /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] Records (was Re: [Haskell] Improvements to GHC)

2005-11-18 Thread Sebastian Sylvan
On 11/18/05, Tomasz Zielonka [EMAIL PROTECTED] wrote: On Thu, Nov 17, 2005 at 06:56:09PM +0100, Sebastian Sylvan wrote: Some people do use it more often than I do, but I find that in most cases except simple pipelined functions it only makes the code harder to read. But this case

Re: [Haskell-cafe] Records (was Re: [Haskell] Improvements to GHC)

2005-11-18 Thread Sebastian Sylvan
On 11/18/05, Tomasz Zielonka [EMAIL PROTECTED] wrote: On Fri, Nov 18, 2005 at 12:21:09PM +0100, Sebastian Sylvan wrote: On 11/18/05, Tomasz Zielonka [EMAIL PROTECTED] wrote: On Thu, Nov 17, 2005 at 06:56:09PM +0100, Sebastian Sylvan wrote: Some people do use it more often than I do

Re: [Haskell-cafe] Spurious program crashes

2005-11-17 Thread Sebastian Sylvan
On 11/17/05, Joel Reymont [EMAIL PROTECTED] wrote: On Nov 17, 2005, at 1:44 PM, Sebastian Sylvan wrote: Are you sure it's safe to kill a thread which has already been killed? It seems so from the docs. Why do you fork off the killing of the threads? Why not just run them in sequence

Re: [Haskell-cafe] Records (was Re: [Haskell] Improvements to GHC)

2005-11-17 Thread Sebastian Sylvan
list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Records (was Re: [Haskell] Improvements to GHC)

2005-11-17 Thread Sebastian Sylvan
On 11/17/05, Cale Gibbard [EMAIL PROTECTED] wrote: On 17/11/05, Sebastian Sylvan [EMAIL PROTECTED] wrote: On 11/17/05, Greg Woodhouse [EMAIL PROTECTED] wrote: Isn't there a potential for confusion with function composition (f . g)? That being said, I like this idea (I just need

Re: [Haskell-cafe] Records (was Re: [Haskell] Improvements to GHC)

2005-11-17 Thread Sebastian Sylvan
On 11/17/05, Cale Gibbard [EMAIL PROTECTED] wrote: On 17/11/05, Sebastian Sylvan [EMAIL PROTECTED] wrote: On 11/17/05, Cale Gibbard [EMAIL PROTECTED] wrote: On 17/11/05, Sebastian Sylvan [EMAIL PROTECTED] wrote: On 11/17/05, Greg Woodhouse [EMAIL PROTECTED] wrote: Isn't

Re: [Haskell-cafe] Records (was Re: [Haskell] Improvements to GHC)

2005-11-17 Thread Sebastian Sylvan
with map (\r - {r | s = 3}), though. -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell] Making Haskell more open

2005-11-15 Thread Sebastian Sylvan
-to-find tutorials etc.). That's certainly changed a whole lot over the last 4 years though (especially with #haskell at freenode). /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org

Re: [Haskell-cafe] Re: FPS: Finalizers not running (was Memoryusageoutside of the Haskell heap)

2005-11-10 Thread Sebastian Sylvan
On 11/9/05, Ketil Malde [EMAIL PROTECTED] wrote: Sebastian Sylvan wrote: On 11/8/05, Jan-Willem Maessen [EMAIL PROTECTED] wrote: Just wanted to let people know that I've been working on improving Data.HashTable, with the help of Ketil Malde's badly performing code Always happy

Re: [Haskell] Re: Haskell users survey--please respond!

2005-11-09 Thread Sebastian Sylvan
though. Fraser. Yep, I got it too... /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: Re[2]: [Haskell-cafe] Re: FPS: Finalizers not running (was Memoryusageoutside of the Haskell heap)

2005-11-08 Thread Sebastian Sylvan
a HashTable instead (a lot of times you just fill it up once and then use it exclusively for querying). /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell] specification of sum

2005-11-01 Thread Sebastian Sylvan
then becomes, is there a case where you want _sum_ to be non-strict? /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell-cafe] Threads talking back to parent

2005-10-31 Thread Sebastian Sylvan
of the forked off processesses (so they take a Chan as an argument). Whenever they need to send something back to the server they write it to the Chan. The main thread can then just read off the Chan and log it. /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862

Re: [Haskell-cafe] Computations that can time out + gathering feedback from threads

2005-10-31 Thread Sebastian Sylvan
just have a list of these MVars and do something like: results - mapM takeMVar resultsMvars When that computations finishes, all the MVars will have been filled (and read), which can only happen after all the scripts have finished (filling in their own MVar). /S -- Sebastian Sylvan +46(0)736

Re: [Haskell-cafe] Quickcheck examples and Data.Word32

2005-10-27 Thread Sebastian Sylvan
to extend it. Something like (untested!): instance Arbitrary Word32 where arbitrary = arbitrary :: Gen Integer = return . fromIntegral -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] Quickcheck examples and Data.Word32

2005-10-27 Thread Sebastian Sylvan
= return . fromIntegral prop_Word32 :: Word32 - Bool prop_Word32 a = a == a Thanks, Joel On Oct 27, 2005, at 3:44 PM, Sebastian Sylvan wrote: Something like (untested!): instance Arbitrary Word32 where arbitrary = arbitrary :: Gen Integer = return . fromIntegral -- http

Re: [Haskell-cafe] Quickcheck examples and Data.Word32

2005-10-27 Thread Sebastian Sylvan
On 10/27/05, Sebastian Sylvan [EMAIL PROTECTED] wrote: On 10/27/05, Joel Reymont [EMAIL PROTECTED] wrote: Would it cover the range between minBound :: Word32 and maxBound :: Word32? I cannot figure out how to do this since maxBound :: Int32 is less that that of Word32. Also, I get

Re: [Haskell-cafe] Nice way to calculate character frequency in a string

2005-10-25 Thread Sebastian Sylvan
this gave about 40% better performance on some random text file I found. Also, you may use STArrays (I think they come in unboxed as well) for stateful code, which may be even faster (unless accumArray does some neat trick to make it O(m) where m is the number of index/value pairs). /S -- Sebastian

[Haskell-cafe] Parsec vs ReadP

2005-10-19 Thread Sebastian Sylvan
Can anyone briefly compare these two parsing-libraries? In short, which one is better? /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Emptying a list

2005-10-15 Thread Sebastian Sylvan
, is there any way to incorporate list operations (concatenation in particular) in a do-statement on lists? Every time I try it gives a type error. Not quite sure what you mean. Perhaps an example of what you'd want to accomplish? /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862

Re: [Haskell-cafe] Newbie question on Haskell type

2005-10-14 Thread Sebastian Sylvan
you need it and then we could probably show you the idiomatic haskell way to achieve what you need. /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo

[Haskell] Re: [Haskell-cafe] Interest in helping w/ Haskell standard

2005-10-13 Thread Sebastian Sylvan
On 10/13/05, Simon Marlow [EMAIL PROTECTED] wrote: On 12 October 2005 23:50, Sebastian Sylvan wrote: (I'm specifically interested in seeing SPJ's records proposal included, and a new module system). Highly unlikely, IMHO. A new revision of the Haskell standard is not the place

Re: [Haskell-cafe] Interest in helping w/ Haskell standard

2005-10-13 Thread Sebastian Sylvan
On 10/13/05, Simon Marlow [EMAIL PROTECTED] wrote: On 12 October 2005 23:50, Sebastian Sylvan wrote: (I'm specifically interested in seeing SPJ's records proposal included, and a new module system). Highly unlikely, IMHO. A new revision of the Haskell standard is not the place

[Haskell] Re: [Haskell-cafe] Interest in helping w/ Haskell standard

2005-10-12 Thread Sebastian Sylvan
, and not until Haskell 2 features could be kept there as discussions progress? /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell-cafe] Interest in helping w/ Haskell standard

2005-10-12 Thread Sebastian Sylvan
, and not until Haskell 2 features could be kept there as discussions progress? /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] runST

2005-10-08 Thread Sebastian Sylvan
. So, rule of thumb: Don't use IO if you don't really really REALLY need it. /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Memoization

2005-10-07 Thread Sebastian Sylvan
implementation probably won't save the entries in the array between calls which kinda ruins the point of memoization!). /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org

Re: [Haskell] Newbie quick questions

2005-10-05 Thread Sebastian Sylvan
-safe database queries (pretty cool!). /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell] Newbie quick questions

2005-10-05 Thread Sebastian Sylvan
On 10/5/05, Sebastian Sylvan [EMAIL PROTECTED] wrote: On 10/4/05, Mike Crowe [EMAIL PROTECTED] wrote: Thanks, all, especially Cale for the detail. This may be unfair to ask, but is anybody willing to give an example? There are great examples for writing factorials. However, that's

Re: [Haskell] nwebie question

2005-10-01 Thread Sebastian Sylvan
simply derive a standard one by typing deriving Show at the end of your data declaration. data NatInf = Infinity | Num Int deriving Show /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell mailing list Haskell@haskell.org http

Re: [Haskell-cafe] Growing Trees

2005-09-22 Thread Sebastian Sylvan
Nil k = Root k Nil Nil toList Nil = [] toList (Node a _ t1 t2) = toList t1 ++ [a] ++ toList t2 toList (Root a t1 t2) = toList t1 ++ [a] ++ toList t2 --- /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell-Cafe mailing list Haskell

Re: [Haskell-cafe] wxHaskell: getting a checkbox state

2005-09-15 Thread Sebastian Sylvan
[text := Edit Mode, on comand := onCbEdit textlog cbEdit] -- yadayada... /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Functional vs Imperative

2005-09-13 Thread Sebastian Sylvan
in a less clean imperative style always. In Haskell you have it both ways. When a functional approach is cleaner, use it, when stuff should be evaluated in sequence (not just IO, but other monads like Maybe and State as well) you do that. It all works out in a sane and clean way. /S -- Sebastian

Re: [Haskell-cafe] List of functions

2005-08-31 Thread Sebastian Sylvan
, by applying the functions to the arguments pair-wise, producing a list of results. /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] List of functions

2005-08-30 Thread Sebastian Sylvan
Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

<    1   2   3   4   5   >