[Haskell-cafe] Re: Help with IO and randomR

2007-07-17 Thread Niko Korhonen
Bryan Burgers wrote: I did not look at it long enough to tell you why there is an infinite loop. However, think about it on a high level with me. You want a stream of these random numbers (I'm not sure what a triangular distribution is, but that's okay). To get one of these, you take two

[Haskell-cafe] Re: Help with IO and randomR

2007-07-17 Thread Niko Korhonen
Tillmann Rendel wrote: (A) will be executed before (B) because of the IO monad. But you want r to be returned before rest is computed. I would split tpdfs in two functions: a pure function converting a infinite list of random numbers to another infinite list of random numbers, and an

[Haskell-cafe] More on improving the mailing list

2007-07-17 Thread Donald Bruce Stewart
An interesting study on problem resolution and feedback on some technical mailing lists, How to Help Mailing Lists Help Readers (Results of Recent Data Analysis) http://praxagora.com/andyo/professional/mailing_list_follow_up/ including graphs! :) With conclusions at the end on how

[Haskell-cafe] Re: Haskell for categorists

2007-07-17 Thread Dominic Steinitz
Miguel Mitrofanov miguelimo38 at yandex.ru writes: Just being curious. There are a lot of tutorials ensuring the reader that, although Haskell is based on category theory, you don't have to know CT to use Haskell. So, is there ANY Haskell tutorial for those who do know CT? I don't need

[Haskell-cafe] RE: haskell for web

2007-07-17 Thread Bayley, Alistair
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of ??? help haskell for web code http://www.haskell.org/haskellwiki/Applications_and_libraries/Web_programming Try a few of these out (whatever meets your needs). For web apps WASH and HAppS seem popular. Feel free to ask the

Re: [Haskell-cafe] A really bad way to say all isSpace

2007-07-17 Thread Neil Mitchell
Hi Reading through the code to lex, it appear that it will return [(,)] if and only if all isSpace t. If this is really the case, does it make sense to state all isSpace t? It has a much clearer meaning to me. I think 'lex' is supposed to not understand (haskell-style) comments - which I

[Haskell-cafe] Re: hMapping polymorphic functions

2007-07-17 Thread oleg
hMapping polymorphic functions is indeed quite challenging, but can be done. That was the topic of the message Type-class overloaded functions: second-order typeclass programming with backtracking http://okmij.org/ftp/Haskell/poly2.txt The challenge is how to avoid

Re: [Haskell-cafe] Maintaining the community

2007-07-17 Thread Martin Coxall
And this is where I think Haskell has it all over C++, Java, and the rest. Haskell is easy to learn at a simple level, and hard to learn at the expert level, but once learned is very powerful and has excellent payoffs in terms of productivity. With C++ or Java, the expertise is somewhat easier to

Re: [Haskell-cafe] RE: haskell for web

2007-07-17 Thread Martin Coxall
On 7/17/07, Bayley, Alistair [EMAIL PROTECTED] wrote: From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of ??? help haskell for web code http://www.haskell.org/haskellwiki/Applications_and_libraries/Web_programming Try a few of these out (whatever meets your needs). For web

答复: [Haskell-cafe] RE: haskell for web

2007-07-17 Thread 王清军
Haskell On Rails -邮件原件- 发件人: Martin Coxall [mailto:[EMAIL PROTECTED] 发送时间: 2007年7月17日 16:44 收件人: Bayley, Alistair 抄送: 王清军; [EMAIL PROTECTED]; haskell Café 主题: Re: [Haskell-cafe] RE: haskell for web On 7/17/07, Bayley, Alistair [EMAIL PROTECTED] wrote: From: [EMAIL PROTECTED]

答复: [Haskell-cafe] RE: haskell for web

2007-07-17 Thread 王清军
why 'Haskell On Rails' ? -邮件原件- 发件人: Martin Coxall [mailto:[EMAIL PROTECTED] 发送时间: 2007年7月17日 16:44 收件人: Bayley, Alistair 抄送: 王清军; [EMAIL PROTECTED]; haskell Café 主题: Re: [Haskell-cafe] RE: haskell for web On 7/17/07, Bayley, Alistair [EMAIL PROTECTED] wrote: From: [EMAIL PROTECTED]

[Haskell-cafe] External Sort and unsafeInterleaveIO

2007-07-17 Thread Ben
hi folks -- a haskell newbie here, searching for comments and wisdom on my code. i had a project to try to implement external sort in haskell as a learning exercise. (external sort is sorting a list that is too large to fit in main memory, by sorting in chunks, spooling to disk, and then

RE: [Haskell-cafe] -O2 compile option can give speed increase over -O. Fasta shootout program test runs.

2007-07-17 Thread Simon Peyton-Jones
| It seems the -O2 option can give a significant speed increase relative | to just the -O option. This is contrary to the documentation which says -O2 switches on SpecConstr, which has improved quite a bit in the last year or so. There's a paper on my home page about it (Constructor

Re: [Haskell-cafe] Maintaining the community

2007-07-17 Thread Thomas Conway
On 7/17/07, Martin Coxall [EMAIL PROTECTED] wrote: Me too, which is why I find your statement that expertise in C++ is easy to acquire. Seeing some of my colleagues' code is enough to tell me that this is most definitely not the case. You're quite right. That was careless on my part. Though

[Haskell-cafe] Practise fingerspelling with Haskell! (Code cleanup request)

2007-07-17 Thread Dougal Stanton
The following is a slap-dash program for generating a list of pairs of words which differ by, at most, one letter. It's quite verbose at the moment, because (a) that was the way I wrote it, a snippet at a time, and (b) I lack the wit to make it shorter. Can anyone recommend ways to make this

Re: [Haskell-cafe] Maintaining the community

2007-07-17 Thread Magnus Therning
On Tue, Jul 17, 2007 at 19:43:51 +1000, Thomas Conway wrote: On 7/17/07, Martin Coxall [EMAIL PROTECTED] wrote: Me too, which is why I find your statement that expertise in C++ is easy to acquire. Seeing some of my colleagues' code is enough to tell me that this is most definitely not the case.

Re: [Haskell-cafe] Maintaining the community

2007-07-17 Thread Martin Coxall
On 7/17/07, Magnus Therning [EMAIL PROTECTED] wrote: On Tue, Jul 17, 2007 at 19:43:51 +1000, Thomas Conway wrote: On 7/17/07, Martin Coxall [EMAIL PROTECTED] wrote: Me too, which is why I find your statement that expertise in C++ is easy to acquire. Seeing some of my colleagues' code is enough

Re: [Haskell-cafe] Re: xkcd #287 NP-Complete

2007-07-17 Thread haskell
Hugh Perkins wrote: Your solution looks really elegant, and runs insanely fast. Can you explain how it works? I will jump in and explain, using a more finely named version: xkcd_c287' = foldr (\cost without - let (poor, rich) = splitAt cost without with

[Haskell-cafe] Mux, was Re: Clearly, Haskell is ill-founded

2007-07-17 Thread Conor McBride
On 16 Jul 2007, at 19:53, Stefan Holdermans wrote: I wrote: I came up with [...] apfelmus' solution is of course more elegant, but I guess it boils down to the same basic idea. Yep, you need inductive data to guarantee that you eventually stop spitting out one sort of thing and flip

[Haskell-cafe] F#

2007-07-17 Thread Edward Ing
Has anyone tried out F#? Is this a taboo subject here? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] -O2 compile option can give speed increase over -O. Fasta shootout program test runs.

2007-07-17 Thread Isaac Dupree
Derek Elkins wrote: Just to add as this was not addressed. -O2 -does not- turn off bounds checking or any other obvious safety mechanism. although even just -O removes GHC's special 'assert'ions (unless you explicitly keep them on?) -- though they shouldn't be used in such a way that they

Re: [Haskell-cafe] F#

2007-07-17 Thread Antoine Latter
I've been meaning to tackle F# as my ML of choice (seeing as I'll need to get comfortable with .Net, I may as well hit two birds with one stone). I've been waiting for the text /Expert F#/ to come out, as it looks /Foundations of F#/ is pitched towards someone learning their first functional

[Haskell-cafe] GHC 6.6.1: Where is Graphics.SOE ?

2007-07-17 Thread Dmitri O.Kondratiev
I am trying to use Graphics.SOE (that was present at least in GHC 6.4) to go through Simple Graphics examples as described in Pail Hudak book The Haskell School of Expression. Learning functional programming through multimedia. It looks like Graphics.SOE does not anymore exist in GHC 6.6.1.

[Haskell-cafe] Getting lambdabot to work with 6.6.1

2007-07-17 Thread Vincenz Syntactically
Dear, After a suggestion from quicksilver, I decided to write this message. To get lambdabot working on 6.6.1 you need to: 1) ensure you have the regexp-base, regexp-compat and regexp-posix from hackage installed 2) If you install them from user, make sure to add --user in the build-script of

Re: [Haskell-cafe] Mux, was Re: Clearly, Haskell is ill-founded

2007-07-17 Thread Derek Elkins
On Tue, 2007-07-17 at 13:23 +0100, Conor McBride wrote: On 16 Jul 2007, at 19:53, Stefan Holdermans wrote: I wrote: I came up with [...] apfelmus' solution is of course more elegant, but I guess it boils down to the same basic idea. Yep, you need inductive data to guarantee

Re: [Haskell-cafe] Why does Data.Map exist when...

2007-07-17 Thread Albert Y. C. Lai
Tony Morris wrote: ...it seems to be a special case of Set? Does Data.Map add anything more useful than Map' below? Besides technical differences, beware that mere convenience makes or breaks success of tools (languages, libraries). ___

[Haskell-cafe] Ann: Emping 0.3

2007-07-17 Thread Hans van Thiel
Hello All, Version 0.3 of Emping is available. Emping is a utility that reads a table in a csv (comma separated) format that can be generated from Open Office Calc (spreadsheet), derives all shortest rules for a selected attribute, and writes them to a .csv file that can be read by OO Calc. The

Re: [Haskell-cafe] GHC 6.6.1: Where is Graphics.SOE ?

2007-07-17 Thread Malte Milatz
Dmitri O.Kondratiev: It looks like Graphics.SOE does not anymore exist in GHC 6.6.1. Where one can get it or what to use instead of it? You may try Gtk2Hs, which includes an implementation of SOE, called Graphics.SOE.Gtk. (It works independently of the actual Gtk API.) Use then the darcs

Re: [Haskell-cafe] Haskell shootout game

2007-07-17 Thread Björn Bringert
Hugh Perkins wrote: Had an idea: a real shootout game for Haskell. The way it would work is: - you email a haskell program to a specific address - it shows up on a web-page The webpage shows the last submitted solution for each person - anyone can select two solutions and click Fight - the

[Haskell-cafe] Re: External Sort and unsafeInterleaveIO

2007-07-17 Thread apfelmus
Ben wrote: a haskell newbie here, searching for comments and wisdom on my code. i had a project to try to implement external sort in haskell as a learning exercise. (external sort is sorting a list that is too large to fit in main memory, by sorting in chunks, spooling to disk, and then

[Haskell-cafe] Is this haskelly enough?

2007-07-17 Thread James Hunt
Hi, As a struggling newbie, I've started to try various exercises in order to improve. I decided to try the latest Ruby Quiz (http://www.rubyquiz.com/quiz131.html) in Haskell. Would someone be kind enough to cast their eye over my code? I get the feeling there's a better way of doing it!

Re: [Haskell-cafe] Is this haskelly enough?

2007-07-17 Thread brad clawsie
I've read tutorials about the syntax of Haskell, but I can't seem to find any that teach you how to really think in a Haskell way. Is there anything (books, online tutorials, exercises) that anyone could recommend? the book The Haskell School of Expression is a good printed resource in this

Re: [Haskell-cafe] Is this haskelly enough?

2007-07-17 Thread Bjorn Bringert
On Jul 17, 2007, at 22:26 , James Hunt wrote: Hi, As a struggling newbie, I've started to try various exercises in order to improve. I decided to try the latest Ruby Quiz (http:// www.rubyquiz.com/quiz131.html) in Haskell. Would someone be kind enough to cast their eye over my code? I get

Re: [Haskell-cafe] Is this haskelly enough?

2007-07-17 Thread Eric Mertens
On 7/17/07, James Hunt [EMAIL PROTECTED] wrote: As a struggling newbie, I've started to try various exercises in order to improve. I decided to try the latest Ruby Quiz (http://www.rubyquiz.com/quiz131.html) in Haskell. Would someone be kind enough to cast their eye over my code? I get the

Re: [Haskell-cafe] Is this haskelly enough?

2007-07-17 Thread J. Garrett Morris
Hi James. I would be tempted to write this a little differently than you did. First, some of the pieces you've written have equivalents in the standard library; there's no harm in rewriting them, but I figured I'd point out that they're there. (Hoogle - haskell.org/hoogle, I believe - can be a

Re: [Haskell-cafe] Is this haskelly enough?

2007-07-17 Thread David F. Place
You hardly ever need to use explicit recursion in Haskell. Every useful way of doing recursion has already been captured in some higher order function. For example here is your subarrays implemented using unfoldr: subarrays xs = concat $ unfoldr f xs where f [] = Nothing

Re: [Haskell-cafe] Is this haskelly enough?

2007-07-17 Thread Eric Mertens
James, In my earlier post I mentioned that you should find a dynamic programming approach to this problem. My solution is presented below, so you've been warned if you are still working this out: === READ ABOVE === import Data.List (foldl') solve = snd . foldl' aux (0, 0) where aux (cur,

Re: [Haskell-cafe] Clearly, Haskell is ill-founded

2007-07-17 Thread Isaac Dupree
Conor McBride wrote: Hi all On 9 Jul 2007, at 06:42, Thomas Conway wrote: I don't know if you saw the following linked off /. http://www.itwire.com.au/content/view/13339/53/ [..] The basic claim appears to be that discrete mathematics is a bad foundation for computer science. I suspect

Re: [Haskell-cafe] RE: haskell for web

2007-07-17 Thread Hugh Perkins
On 7/17/07, Martin Coxall [EMAIL PROTECTED] wrote: I wonder why 'we' aren't pushing things like this big time. When Ruby took off, more than anything else it was because of Rails. Web programming is something 'the kids' can really get into, and it caused Ruby to explode into the mainstream geek

Re: [Haskell-cafe] Maintaining the community

2007-07-17 Thread Hugh Perkins
On 7/17/07, Thomas Conway [EMAIL PROTECTED] wrote: And this is where I think Haskell has it all over C++, Java, and the rest. Haskell is easy to learn at a simple level, and hard to learn at the expert level, but once learned is very powerful and has excellent payoffs in terms of productivity.

Re: [Haskell-cafe] Maintaining the community

2007-07-17 Thread Thomas Conway
On 7/18/07, Hugh Perkins [EMAIL PROTECTED] wrote: Am I the only person who finds it interesting/worrying that there are few to no people in the group who are ex-C# programmers. I mean, you could argue that C# programmers are simply too stupid to do Haskell, but ... you know, there is another

Re: [Haskell-cafe] RE: haskell for web

2007-07-17 Thread Hugh Perkins
On 7/18/07, brad clawsie [EMAIL PROTECTED] wrote: i have wondered what it would take to get a mod_haskell for apache If you make a mod_haskell, please make sure it's secure. It's insanely hard to convince web hosting companies to add support for new mod_myfavoritelanguagehere. If the mod

Re: [Haskell-cafe] F#

2007-07-17 Thread Jon Harrop
On Tuesday 17 July 2007 14:53:20 Edward Ing wrote: Has anyone tried out F#? Yes. We've been using F# for 9 months now and have several products written in it. Is this a taboo subject here? Probably. ;-) -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. OCaml for Scientists

Re: [Haskell-cafe] RE: haskell for web

2007-07-17 Thread brad clawsie
On Wed, Jul 18, 2007 at 12:35:23AM +0200, Hugh Perkins wrote: If you make a mod_haskell, please make sure it's secure. It's insanely hard to convince web hosting companies to add support for new mod_myfavoritelanguagehere. i personally don't have any plans on creating mod_haskell, it is

Re: [Haskell-cafe] Is this haskelly enough?

2007-07-17 Thread Thomas Hartman
[EMAIL PROTECTED]:~/ProjectRepos/learning$ ghc -fglasgow-exts -e 'main' maxSubArrays.hs should be [2,5,-1,3]: [2,5,-1,3] [EMAIL PROTECTED]:~/ProjectRepos/learning$ cat maxSubArrays.hs import Data.List -- maximum sub-array: [2, 5, -1, 3] main = do putStrLn $ should be ++ show [2, 5, -1, 3] ++ :

Re: [Haskell-cafe] Is this haskelly enough?

2007-07-17 Thread Dan Weston
Bjorn Bringert wrote: import Data.List maxsubarrays xs = maximumBy (compare `on` sum) [zs | ys - inits xs, zs - tails ys] I love this solution: simple, understandable, elegant. As a nit, I might take out the ys and zs names, which obscure the fact that there is a hidden symmetry in the

Re: [Haskell-cafe] RE: haskell for web

2007-07-17 Thread brad clawsie
On Wed, Jul 18, 2007 at 12:17:12AM +0200, Hugh Perkins wrote: On 7/17/07, Martin Coxall [EMAIL PROTECTED] wrote: I wonder why 'we' aren't pushing things like this big time. When Ruby took off, more than anything else it was because of Rails. i agree that web programming is a domain that

Re: [Haskell-cafe] Getting lambdabot to work with 6.6.1

2007-07-17 Thread Shachaf Ben-Kiki
I also commented out arrows as a dependency in the .cabal, I think. Was that not a good idea? it seemed to work. Shachaf ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] RE: haskell for web

2007-07-17 Thread Bjorn Bringert
On Jul 18, 2007, at 0:27 , brad clawsie wrote: On Wed, Jul 18, 2007 at 12:17:12AM +0200, Hugh Perkins wrote: On 7/17/07, Martin Coxall [EMAIL PROTECTED] wrote: I wonder why 'we' aren't pushing things like this big time. When Ruby took off, more than anything else it was because of Rails.

Re: [Haskell-cafe] Is this haskelly enough?

2007-07-17 Thread Shachaf Ben-Kiki
on, which will appear in Data.Function in the next release of base, is defined thusly: on :: (b - b - c) - (a - b) - a - a - c (*) `on` f = \x y - f x * f y You can also use Data.Ord.comparing, in this case -- comparing is just (compare `on`). From Ord.hs: -- | -- comparing p x y =

Re: [Haskell-cafe] Is this haskelly enough?

2007-07-17 Thread Dan Weston
Nicest. I think your definition has reached nirvana. I think a good haskell-cafe thread is like a Shakespeare play. People at every level of experience can get something from it. The early replies answer the question, with follow-on ones exploring the roads less traveled. I for one did not

Re: [Haskell-cafe] Maintaining the community

2007-07-17 Thread Jon Harrop
On Tuesday 17 July 2007 23:26:08 Hugh Perkins wrote: Am I the only person who finds it interesting/worrying that there are few to no people in the group who are ex-C# programmers. I mean, you could argue that C# programmers are simply too stupid to do Haskell, but ... you know, there is

Re: [Haskell-cafe] Is this haskelly enough?

2007-07-17 Thread David F . Place
On Jul 17, 2007, at 7:10 PM, Bjorn Bringert wrote: Nice. Here's a pointless version: Good Freudian slip. maxsubarrays = maximumBy (compare `on` sum) . (= tails) . inits For the monadically-challenged, this is equivalent, yes-no? maxsubarrays = maximumBy (compare `on` sum) . concat .

Re: [Haskell-cafe] Is this haskelly enough?

2007-07-17 Thread Bjorn Bringert
On Jul 18, 2007, at 1:00 , Dan Weston wrote: Bjorn Bringert wrote: import Data.List maxsubarrays xs = maximumBy (compare `on` sum) [zs | ys - inits xs, zs - tails ys] I love this solution: simple, understandable, elegant. As a nit, I might take out the ys and zs names, which obscure the

Re: [Haskell-cafe] Is this haskelly enough?

2007-07-17 Thread Shachaf Ben-Kiki
For the monadically-challenged, this is equivalent, yes-no? maxsubarrays = maximumBy (compare `on` sum) . concat . (map tails) . inits Or: maxsubarrays = maximumBy (compare `on` sum) . concatMap tails . inits (=) for lists is just (flip concatMap). Also, this is working with lists, not arrays

RE: [Haskell-cafe] F#

2007-07-17 Thread Simon Peyton-Jones
| Has anyone tried out F#? | | Yes. We've been using F# for 9 months now and have several products | written in | it. | | Is this a taboo subject here? | Probably. ;-) Not at all! But there is a very active F# community that would be much more knowledgeable about F# than Haskell folk are

Re: [Haskell-cafe] Is this haskelly enough?

2007-07-17 Thread ok
On Jul 17, 2007, at 22:26 , James Hunt wrote: As a struggling newbie, I've started to try various exercises in order to improve. I decided to try the latest Ruby Quiz (http:// www.rubyquiz.com/quiz131.html) in Haskell. Haskell guru level: I am comfortable with higher order functions, but

Re: [Haskell-cafe] Is this haskelly enough?

2007-07-17 Thread Derek Elkins
On Wed, 2007-07-18 at 12:13 +1200, ok wrote: On Jul 17, 2007, at 22:26 , James Hunt wrote: As a struggling newbie, I've started to try various exercises in order to improve. I decided to try the latest Ruby Quiz (http:// www.rubyquiz.com/quiz131.html) in Haskell. What is the trick

Re: [Haskell-cafe] Is this haskelly enough?

2007-07-17 Thread Dan Weston
ok wrote: I think it is at least mildly interesting that people commented about things like whether to do it using explicit parameters (pointful style) or higher-order functions (pointless style) and whether to use the list monad or concatMap, but everyone seemed to be happy with a cubic time

Re: [Haskell-cafe] Maintaining the community

2007-07-17 Thread Derek Elkins
On Wed, 2007-07-18 at 00:26 +0200, Hugh Perkins wrote: On 7/17/07, Thomas Conway [EMAIL PROTECTED] wrote: And this is where I think Haskell has it all over C++, Java, and the rest. Haskell is easy to learn at a simple level, and hard to learn at the

Re: [Haskell-cafe] Getting lambdabot to work with 6.6.1

2007-07-17 Thread Donald Bruce Stewart
syntactically.vincenz: Dear, After a suggestion from quicksilver, I decided to write this message. To get lambdabot working on 6.6.1 you need to: 1) ensure you have the regexp-base, regexp-compat and regexp-posix from hackage installed The .cabal file now enforces this.

Re: [Haskell-cafe] Getting lambdabot to work with 6.6.1

2007-07-17 Thread Donald Bruce Stewart
shachaf: I also commented out arrows as a dependency in the .cabal, I think. Was that not a good idea? it seemed to work. You just won't be able to use arrows transformers and other fun things in @eval. ___ Haskell-Cafe mailing list

[Haskell-cafe] Is this haskelly enough? -- errm but every answer is wrong(?)

2007-07-17 Thread Anthony Clayden
(Or at least the problem is under-specified.) 1. There may be several sub-sequences having the maximum sum. So the type for the solution should be :: Num a = [a] - [[a]] (Note that the problem didn't ask for the maximum itself.) 2. The inits . tails approach adds a fault: It introduces

Re: [Haskell-cafe] Is this haskelly enough? -- errm but every answer is wrong(?)

2007-07-17 Thread Dan Weston
Correct, efficient, elegant: you can only have two out of three. I see where your priorities lie! :) Dan Anthony Clayden wrote: (Or at least the problem is under-specified.) 1. There may be several sub-sequences having the maximum sum. So the type for the solution should be :: Num a = [a]

Re: [Haskell-cafe] Is this haskelly enough?

2007-07-17 Thread David F. Place
On Jul 17, 2007, at 7:10 PM, Bjorn Bringert wrote: maxsubarrays = maximumBy (compare `on` sum) . (= tails) . inits Though I avoided using the list monad in the first solution, since I thought it would make the code less understandable for a beginner. I felt uncomfortable seeing this. Let

Re: [Haskell-cafe] Is this haskelly enough?

2007-07-17 Thread Tony Morris
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 David F. Place wrote: The use of = is just an obscure way of saying (flip concatMap). Correction. The use of = is a more general way of saying (flip concatMap). Tony Morris http://tmorris.net/ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6

[Haskell-cafe] Re: Is this haskelly enough? -- errm but every answer is wrong(?)

2007-07-17 Thread Aaron Denney
On 2007-07-18, Anthony Clayden [EMAIL PROTECTED] wrote: (Or at least the problem is under-specified.) 2. The inits . tails approach adds a fault: It introduces a sprinkling of empty sub-sequences. These have sum zero. So in case the input list is all negative numbers ... Why is this a

[Haskell-cafe] Fwd: Happy Error

2007-07-17 Thread Hugo Pacheco
I'm forwarding this mail, in case anyone might know about the bug. -- Forwarded message -- From: Hugo Pacheco [EMAIL PROTECTED] Date: Jul 18, 2007 3:45 AM Subject: Happy Error To: [EMAIL PROTECTED] Hi Simon, I'm having what I supose ti be a oarsec internal error when trying to

Re: [Haskell-cafe] Is this haskelly enough? -- errm but every answer is wrong(?)

2007-07-17 Thread J. Garrett Morris
On 7/17/07, Anthony Clayden [EMAIL PROTECTED] wrote: 2. The inits . tails approach adds a fault: It introduces a sprinkling of empty sub-sequences. These have sum zero. So in case the input list is all negative numbers ... At least the concatMap inits . tails code that I posted also

Re: [Haskell-cafe] External Sort and unsafeInterleaveIO

2007-07-17 Thread Donald Bruce Stewart
midfield: hi folks -- a haskell newbie here, searching for comments and wisdom on my code. i had a project to try to implement external sort in haskell as a learning exercise. (external sort is sorting a list that is too large to fit in main memory, by sorting in chunks, spooling to

[Haskell-cafe] Re: Happy Error

2007-07-17 Thread Hugo Pacheco
I'm sorry, it turned out to be pretty simples. The error appears when there are references to undefined terminal or non-terminal productions. That's it. Sorry for the messages, at least it might be of some help to someone else. hugo On 7/18/07, Hugo Pacheco [EMAIL PROTECTED] wrote: Hi

Re: [Haskell-cafe] External Sort and unsafeInterleaveIO

2007-07-17 Thread Ben
hi -- thanks for the useful comments! i will definitely go through them carefully. unfortunately for this code (but fortunately for me) i defend my dissertation on monday so i'm a little distracted right now. i'm more than happy to donate this code or whatever improvements happen to it.

Re: [Haskell-cafe] External Sort and unsafeInterleaveIO

2007-07-17 Thread Donald Bruce Stewart
midfield: hi -- thanks for the useful comments! i will definitely go through them carefully. unfortunately for this code (but fortunately for me) i defend my dissertation on monday so i'm a little distracted right now. i'm more than happy to donate this code or whatever