[Haskell-cafe] Re: MD5?

2007-11-10 Thread Dominic Steinitz
Neil Mitchell ndmitchell at gmail.com writes: Hi The final alternative is that I just call MD5SUM.EXE from my Haskell program and try to parse the output. But that strikes me as rather messy. Messy, but I don't see any disadvantage to doing it this way - if you can control that the

Re: [Haskell-cafe] WideFinder

2007-11-10 Thread Berlin Brown
Sterling Clover wrote: Um... you do realize that the code is only supposed to match against very specific lines in sample data sets that Bray provides, right? If your access log doesn't have lines exactly like those (and why would it?) then there's no reason to expect a result. --S On Nov

Re: [Haskell-cafe] Disable echo in POSIX terminal

2007-11-10 Thread Henning Thielemann
On Fri, 9 Nov 2007, Derek Elkins wrote: Pointless frobbing but is there any issue with setting the echo to False when it is already False? Otherwise not checking seems to both simpler and quicker (not that performance matters), i.e. getpasswd h = do wasEnabled - hGetEcho h

Re: [Haskell-cafe] Sinus in Haskell

2007-11-10 Thread Henning Thielemann
On Sat, 10 Nov 2007, Daniel Fischer wrote: Since you seem to know a lot about these things, out of curiosity, do you know how these functions are actually implemented? Do they use Taylor series or other techniques? I think that for sin and cos the Taylor series are a good choice. For other

Re: [Haskell-cafe] Sinus in Haskell

2007-11-10 Thread Jules Bean
Brent Yorgey wrote: More generally, this is due to the fact that floating-point numbers can only have finite precision, so a little bit of rounding error is inevitable when dealing with irrational numbers like pi. This problem is in no way specific to Haskell. But some systems always

[Haskell-cafe] FW: please help... small problem

2007-11-10 Thread Ryan Bloor
hi I've attempted to cut down this module... but I cannot see where... can someone help... Ryan thanks From: [EMAIL PROTECTED]: Subject: FW: please help... small problemDate: Fri, 9 Nov 2007 21:57:30 + sorry heres the code I always do that. From: [EMAIL PROTECTED]: Subject:

Re: [Haskell-cafe] Sinus in Haskell

2007-11-10 Thread jerzy . karczmarczuk
Carl Witty writes: On Sat, 2007-11-10 at 01:29 +0100, Daniel Fischer wrote: ... do you know how these functions are actually implemented? Do they use Taylor series or other techniques? I don't really know that much about it; ... It seems likely that this instruction (and library

[Haskell-cafe] recursion issues...

2007-11-10 Thread Ryan Bloor
hiya I was wondering how I would get the second function do recursively do the function for poolNews xs tried that and it fails. Ryan --Give wins, draws a rating. poolNews :: Result - PoolNews - PoolNews poolNews (a,b,c,d,e) (home,away,goaless,scoredraw) | c d =

[Haskell-cafe] Some More Sinus Results

2007-11-10 Thread Hans van Thiel
Thanks to all who've replied; Carl's explanation in particular was very interesting. So the precision, suggested by the many decimals in the 'show', is not the actual precision the user should 'count on'. If you take 1/60 of a degree to be approximately 0.0003 radians, you should not use sin for

[Haskell-cafe] Trouble using unboxed arrays

2007-11-10 Thread Justin Bailey
I would like to create a data structure that uses an unboxed array as one of its components. I would like the data structure to be parameterized over the type of the elements of the array. Further, I'd like to build the array using runSTUArray. I can't make the code work though. My naive approach:

Re: [Haskell-cafe] Some More Sinus Results

2007-11-10 Thread David Roundy
On Sat, Nov 10, 2007 at 06:56:23PM +0100, Hans van Thiel wrote: Thanks to all who've replied; Carl's explanation in particular was very interesting. So the precision, suggested by the many decimals in the 'show', is not the actual precision the user should 'count on'. If you take 1/60 of a

Re: [Haskell-cafe] Trouble using unboxed arrays

2007-11-10 Thread Stefan O'Rear
On Sat, Nov 10, 2007 at 11:09:54AM -0800, Justin Bailey wrote: I would like to create a data structure that uses an unboxed array as one of its components. I would like the data structure to be parameterized over the type of the elements of the array. Further, I'd like to build the array using

Re: [Haskell-cafe] recursion issues...

2007-11-10 Thread Andrew Wagner
Looks to me like you want: poolNewsB = foldr poolNews (0,0,0,0) On Nov 10, 2007 11:54 AM, Ryan Bloor [EMAIL PROTECTED] wrote: hiya I was wondering how I would get the second function do recursively do the function for poolNews xs tried that and it fails. Ryan --Give wins, draws

[Haskell-cafe] Re: Doubly-linked zipper list w/ insert implementation

2007-11-10 Thread apfelmus
Justin Bailey wrote: The other day I decided to implement a ring buffer with a current element (i.e. a doubly-linked zipper list). [...] p.s. The original motivation for writing this was to model cellular automata. The CA world is circular, so that got me thinking about a structure that made

[Haskell-cafe] Queues and Rings (Re: Doubly-linked zipper list w/insert implementation)

2007-11-10 Thread apfelmus
(Btw, this ring stuff could be relevant for Xmonad, I don't know whether the workspace/window-ring implementation there is O(1). Not that it matters for 1000 windows, of course :) Justin Bailey wrote: apfelmus wrote: Do you really need to realize the cycle by sharing? I mean, sharing

[Haskell-cafe] Re: some links broken in 6.8.1 documentation

2007-11-10 Thread Ian Lynagh
Hi Daniil, On Sun, Nov 04, 2007 at 03:49:54PM +0300, Daniil Elovkov wrote: A quick look at the 6.8.1 user's guide reveals some broken links: 1) Obtaining code coverage, pointing to http://haskell.org/ghc/docs/6.8.1/html/users_guide/hpc.html redirects to

Re: [Haskell-cafe] Re: Doubly-linked zipper list w/ insert implementation

2007-11-10 Thread Justin Bailey
On Nov 10, 2007 12:24 PM, apfelmus [EMAIL PROTECTED] wrote: Note that depending on your concrete setting, you may not need a fancy ring structure for cellular automata. And with simple automata like I realized that I never updated my automata once a row was created, and ended up using an

Re: [Haskell-cafe] Some More Sinus Results

2007-11-10 Thread Hans van Thiel
On Sat, 2007-11-10 at 11:14 -0800, David Roundy wrote: On Sat, Nov 10, 2007 at 06:56:23PM +0100, Hans van Thiel wrote: Thanks to all who've replied; Carl's explanation in particular was very interesting. So the precision, suggested by the many decimals in the 'show', is not the actual

Re: [Haskell-cafe] FW: please help... small problem

2007-11-10 Thread Yitzchak Gale
Hi Ryan, You wrote: I've attempted to cut down this module... but I cannot see where... can someone help... You don't need wordToInt - just use read instead. Look at the type of the function map in the Prelude - you can use it to get rid of method and test. After that, your program will be

Re: [Haskell-cafe] Some More Sinus Results

2007-11-10 Thread Yitzchak Gale
Hans van Thiel wrote: If you mean that people should not do arithmetic on computers, if the results are vital, unless they understand the scope and limits of the tools they're using, I agree, of course. My brother used to work for a certain well-known manufacturer of CPUs. He told me that the

[Haskell-cafe] C++ vs. Haskell: Type-Level Death Match

2007-11-10 Thread Don Stewart
http://www.rubinsteyn.com/template_insanity.html The C++ response to Conrad's 'instant insanity' type program from the last Monad.Reader ! Can we do better still with the planned type-level programming of type families? -- Don ___ Haskell-Cafe mailing

Re: [Haskell-cafe] recursion issues...

2007-11-10 Thread Brent Yorgey
On Nov 10, 2007 11:54 AM, Ryan Bloor [EMAIL PROTECTED] wrote: hiya I was wondering how I would get the second function do recursively do the function for poolNews xs tried that and it fails. Ryan --Give wins, draws a rating. poolNews :: Result *-* PoolNews *-* PoolNews

Re: [Haskell-cafe] Trouble using unboxed arrays

2007-11-10 Thread Bulat Ziganshin
Hello Justin, Saturday, November 10, 2007, 10:09:54 PM, you wrote: makeArray :: [a] - Ring a makeArray ls = Ring (ST.runSTUArray (ST.newListArray (0, length ls - 1) ls)) unboxed arrays in std library are not polymorphic, look at http://haskell.org/haskellwiki/Library/ArrayRef ps: as

[Haskell-cafe] O'Reilly Real World Haskell book

2007-11-10 Thread Galchin Vasili
Hello, What is the proposed table of contents for Real World Haskell? Regards, Vasili ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] O'Reilly Real World Haskell book

2007-11-10 Thread Thomas Schilling
On Sat, 2007-11-10 at 17:50 -0600, Galchin Vasili wrote: Hello, What is the proposed table of contents for Real World Haskell? http://www.realworldhaskell.org/blog/2007/05/23/real-world-haskell-its-time/ as of May 2007 ___ Haskell-Cafe

[Haskell-cafe] GHC 6.8.1 Documentation

2007-11-10 Thread Cale Gibbard
Hello all, Recently I noticed that all of my bookmarks to the hierarchical libraries documentation broke, and I'm not entirely happy with the solution of just correcting all the links to point at the new URLs since the URLs all have package version numbers in their names, which means that I'll

Re: [Haskell-cafe] Sinus in Haskell

2007-11-10 Thread ajb
G'day all. Quoting [EMAIL PROTECTED]: == No, Gentlemen, nobody rational would use Taylor nowadays! It is lousy. This is correct. Real implementations are far more likely to use the minmax polynomial of some order. However... Then, a *rational* approximation gives you the same precision

[Haskell-cafe] Re: Flymake Haskell

2007-11-10 Thread Daisuke IKEGAMI
[EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, Stefan wrote: I looked at http://www.emacswiki.org/cgi-bin/emacs/FlymakeHaskell but it's not clear what's going on. I've been

Re: [Haskell-cafe] WideFinder

2007-11-10 Thread Sterling Clover
http://www.tbray.org/tmp/o10k.ap is the basic data set. For heavier duty testing, folks seem to be appending it to itself 99 more times to yield a o1000k.ap dataset. I'd be curious for comments on my code or other suggestions to speed things up -- the strictness semantics of the

Re: [Haskell-cafe] WideFinder

2007-11-10 Thread Don Stewart
s.clover: http://www.tbray.org/tmp/o10k.ap is the basic data set. For heavier duty testing, folks seem to be appending it to itself 99 more times to yield a o1000k.ap dataset. I'd be curious for comments on my code or other suggestions to speed things up -- the strictness semantics of

Re: [Haskell-cafe] WideFinder

2007-11-10 Thread Bryan O'Sullivan
Sterling Clover wrote: Maps are a good choice for parallelism because they merge efficiently, but for the iterative aspect their performance leaves a lot to be desired. This is not consistent with my observations, I must say. What I've found to dominate the benchmark are straightforward

[Haskell-cafe] How to do this in Haskell

2007-11-10 Thread Chris Smith
If you wanted to write a Haskell application that included a WYSIWYG HTML editor, how would you do it? More details: - I'll probably be using Gtk2Hs for the app, though that could change with a (very) good reason. - The top priorities for the editor are that it resemble common word