[Haskell-cafe] Re: Code and Perf. Data for Prime Finders

2007-02-23 Thread oleg
Perhaps you might want include in your test the following: http://www.haskell.org/pipermail/haskell-cafe/2007-February/022437.html It seems quite close to the genuine Eratosthenes sieve algorithm: it employs the idea of marks, it can cross composite numbers off several times, and it never trie

Re: [Haskell-cafe] beginner question re example in Hutton's "Programming in Haskell"y

2007-02-23 Thread Stefan O'Rear
On Fri, Feb 23, 2007 at 11:18:46PM -0500, David Cabana wrote: > I have been trying to work through Graham Hutton's "Programming in > Haskell", but have hit something of a snag in chapter 8.4. Hutton > presents some sample code which I am trying to run, with no luck so > far. Here is the code

[Haskell-cafe] beginner question re example in Hutton's "Programming in Haskell"

2007-02-23 Thread David Cabana
I have been trying to work through Graham Hutton's "Programming in Haskell", but have hit something of a snag in chapter 8.4. Hutton presents some sample code which I am trying to run, with no luck so far. Here is the code as I constructed it by gathering snippets presented across three pag

Re: [Haskell-cafe] How to build a generic spreadsheet?

2007-02-23 Thread Chris Eidhof
On 23 Feb, 2007, at 15:33 , Greg Fitzgerald wrote: I want to write a program where a user would update a bunch of variables, and everything that depends on those variables (and nothing else) are recalculated. Basically, a spreadsheet, but generalized for any computation. Could someone reco

Re: [Haskell-cafe] A "real" Haskell Cookbook

2007-02-23 Thread P. R. Stanley
Is there a way to make the symbols both look right on a screen and sound right from a screen reader? E.g., Σ In theory the title attribute should be the adequate yet simple solution we're after. Sadly, in reality this 'aint the case. The title attribute works beautifully in list and tabl

Re: [Haskell-cafe] How to build a generic spreadsheet?

2007-02-23 Thread Neil Mitchell
Hi I want to write a program where a user would update a bunch of variables, and everything that depends on those variables (and nothing else) are recalculated. Basically, a spreadsheet, but generalized for any computation. Could someone recommend an elegant way to do it or some good reading m

Re: [Haskell-cafe] A "real" Haskell Cookbook

2007-02-23 Thread P. R. Stanley
As a tip for anyone involved in writing and publishing scientific materials on the web, unless the maths is either written without any funny symbols or, better still, typeset in latex, it is not accessible to a screen-reader. I was under the impression that modern screen readers could pronounc

Re: [Haskell-cafe] How to build a generic spreadsheet?

2007-02-23 Thread Bryan O'Sullivan
Greg Fitzgerald wrote: I want to write a program where a user would update a bunch of variables, and everything that depends on those variables (and nothing else) are recalculated. http://sigfpe.blogspot.com/2006/11/from-l-theorem-to-spreadsheet.html ___

[Haskell-cafe] haskell-art mailing list

2007-02-23 Thread alex
Hi all, After a bit of discussion with Rohan Drape I've made a mailing list for inclusive discussion of 'artistic' uses of Haskell. The initial thought for it to be about Haskell sound and music in particular, but we decided to broaden it to include visual, robotic and related work as well. [Ri

Re: [Haskell-cafe] How to build a generic spreadsheet?

2007-02-23 Thread Sebastian Sylvan
On 2/23/07, Sebastian Sylvan <[EMAIL PROTECTED]> wrote: On 2/23/07, Sebastian Sylvan <[EMAIL PROTECTED]> wrote: > On 2/23/07, Greg Fitzgerald <[EMAIL PROTECTED]> wrote: > > I want to write a program where a user would update a bunch of variables, > > and everything that depends on those variables

Re: [Haskell-cafe] How to build a generic spreadsheet?

2007-02-23 Thread Sebastian Sylvan
On 2/23/07, Sebastian Sylvan <[EMAIL PROTECTED]> wrote: On 2/23/07, Greg Fitzgerald <[EMAIL PROTECTED]> wrote: > I want to write a program where a user would update a bunch of variables, > and everything that depends on those variables (and nothing else) are > recalculated. Basically, a spreadsh

Re: [Haskell-cafe] How to build a generic spreadsheet?

2007-02-23 Thread Sebastian Sylvan
On 2/23/07, Greg Fitzgerald <[EMAIL PROTECTED]> wrote: I want to write a program where a user would update a bunch of variables, and everything that depends on those variables (and nothing else) are recalculated. Basically, a spreadsheet, but generalized for any computation. Could someone recom

Re: [Haskell-cafe] How to build a generic spreadsheet?

2007-02-23 Thread the Edward Blevins
On Fri, Feb 23, 2007 at 02:33:00PM -0800, Greg Fitzgerald wrote: > I want to write a program where a user would update a bunch of variables, > and everything that depends on those variables (and nothing else) are > recalculated. Basically, a spreadsheet, but generalized for any > computation. Cou

[Haskell-cafe] How to build a generic spreadsheet?

2007-02-23 Thread Greg Fitzgerald
I want to write a program where a user would update a bunch of variables, and everything that depends on those variables (and nothing else) are recalculated. Basically, a spreadsheet, but generalized for any computation. Could someone recommend an elegant way to do it or some good reading materi

Re: [Haskell-cafe] A "real" Haskell Cookbook

2007-02-23 Thread David House
On 23/02/07, P. R. Stanley <[EMAIL PROTECTED]> wrote: As a tip for anyone involved in writing and publishing scientific materials on the web, unless the maths is either written without any funny symbols or, better still, typeset in latex, it is not accessible to a screen-reader. I was under the

Re: [Haskell-cafe] A "real" Haskell Cookbook

2007-02-23 Thread brad clawsie
On Fri, Feb 23, 2007 at 03:07:18PM -0500, Seth Gordon wrote: > P. R. Stanley wrote: > > I'm referring to math symbols which do not get successfully > > translated into an intelligible symbol in the screen reader browse buffer. > > Is there a way to make the symbols both look right on a screen and

Re: [Haskell-cafe] A "real" Haskell Cookbook

2007-02-23 Thread Steve Schafer
On Fri, 23 Feb 2007 19:42:27 +, you wrote: >So that's what it is! I wondered why alt-num-0160 only produced a >space character. Still, as I said originally, it is totally invisible >in the browse buffer. >Anyway, are you one of the authors of the wikibook Or, are you just >offering your ass

Re: [Haskell-cafe] A "real" Haskell Cookbook

2007-02-23 Thread Alexy Khrabrov
In the wonderful tradition of a contemporaneously have-able and edible pie, one can have two versions of a page -- with lovely calculus symbols or their horribly debauched ASCII remains -- and a button to switch. Heck, one can have a Greasemonkey script to eat the page toggle that and leav

Re: [Haskell-cafe] A "real" Haskell Cookbook

2007-02-23 Thread Seth Gordon
P. R. Stanley wrote: > I'm referring to math symbols which do not get successfully > translated into an intelligible symbol in the screen reader browse buffer. Is there a way to make the symbols both look right on a screen and sound right from a screen reader? E.g., Σ _

Re: [Haskell-cafe] A "real" Haskell Cookbook

2007-02-23 Thread P. R. Stanley
So that's what it is! I wondered why alt-num-0160 only produced a space character. Still, as I said originally, it is totally invisible in the browse buffer. Anyway, are you one of the authors of the wikibook Or, are you just offering your assistance? All the best Paul At 19:03 23/02/2007, you

[Haskell-cafe] Re: process

2007-02-23 Thread h .
Albert Y. C. Lai vex.net> writes: > > h. wrote: > > module Main where > > main :: IO () > > main = f > > where > > f = do > > a <- getLine > > if a == "quit" then return () else putStrLn a >> f > > This one also needs to switch to line buffering. Add/Change: > > import System.IO(st

Re: [Haskell-cafe] A "real" Haskell Cookbook

2007-02-23 Thread Steve Schafer
On Fri, 23 Feb 2007 18:09:15 +, you wrote: >Well, actually, I never cited the non-breaking space character as a >problem. Well, actually, you did: >Symbols such as the &160 used liberally in the Haskell wikibook are >totally invisible to screen readers.   = NO BREAK SPACE Which is why I

Re: [Haskell-cafe] Re: process

2007-02-23 Thread Bryan O'Sullivan
Bryan O'Sullivan wrote: Just because *your* end of each pipe is a line-buffered file handle has no bearing on the *other* process's management of its pair of endpoints. For example, on a Unix-like system, the other process's stdio will block-buffer stdin and stdout by default if it finds that

Re: [Haskell-cafe] Re: process

2007-02-23 Thread Bryan O'Sullivan
Dougal Stanton wrote: If it basically works, what goes wrong in my programm? Maybe something to do with compiler flags? No. This isn't even a Haskell-related problem, in all likelihood. Bidirectional interaction with another process over a pipe, particularly when the other process is usin

Re: [Haskell-cafe] exists . a psuedo-standard non-empty list module

2007-02-23 Thread Neil Mitchell
Hi Incidentally, inserting NList into the existing Safe.List does not seem like a good match as NList critically relies on being in a separate module with a limited export. As mentioned before, Safe.List would be an entirely separate module in my package, so can export/not export whatever it c

Re: [Haskell-cafe] exists . a psuedo-standard non-empty list module

2007-02-23 Thread Neil Mitchell
Hi Nick That sounds like a great option. Candidate numero uno as of now. What I have in mind right now should be pretty light weight, but it will mostly be a regurgitation of code I've seen floating around. Some of the code from the previous wiki link, type-level decimal numbers I saw in an Oleg

Re: [Haskell-cafe] A "real" Haskell Cookbook

2007-02-23 Thread P. R. Stanley
Well, actually, I never cited the non-breaking space character as a problem. I'm referring to math symbols which do not get successfully translated into an intelligible symbol in the screen reader browse buffer. Regards, Paul At 17:46 23/02/2007, you wrote: On Thu, 22 Feb 2007 03:34:54 +,

Re: [Haskell-cafe] Re: process

2007-02-23 Thread Albert Y. C. Lai
h. wrote: module Main where main :: IO () main = f where f = do a <- getLine if a == "quit" then return () else putStrLn a >> f This one also needs to switch to line buffering. Add/Change: import System.IO(stdout, hSetBuffering, BufferMode(LineBuffering)) main = hSetBuffering stdou

Re: [Haskell-cafe] A "real" Haskell Cookbook

2007-02-23 Thread Steve Schafer
On Thu, 22 Feb 2007 03:34:54 +, you wrote: >and can I please ask anyone thinking of using special symbols to >resist the temptation. >Symbols such as the &160 used liberally in the Haskell wikibook are >totally invisible to screen readers. I can understand the desire to avoid special charac

[Haskell-cafe] EnumSet and EnumMap

2007-02-23 Thread Chris Kuklewicz
I could not quickly find anyone else writing this boiler plate, so I have posted this useful wrapper on the Haskell wiki at http://haskell.org/haskellwiki/EnumSet_EnumMap This uses a cheap newtype to wrap IntSet and IntMap so that you can store any Enum in them. It saves either writing many toEn

Re: [Haskell-cafe] Re: Map list of functions over a single argument

2007-02-23 Thread Martin DeMello
On 2/22/07, Gene A <[EMAIL PROTECTED]> wrote: The functions as I originally defined them are probably easier for someone new to Haskell to understand what was going on than the rather stark ($ a) in the final factoring of the function... Though the final resulting function is far the cleaner for

[Haskell-cafe] Illegal polymorphic or qualified type: forall l.

2007-02-23 Thread Marc Weber
how can i fix this? Mmmh I really need some haskell type class traingings ;) = test file == module Main where import HList import HOccurs import Control.Monad.Reader class Get a b where get :: a -> b data D1 = D1 Int -- dummy type type A

[Haskell-cafe] Re: process

2007-02-23 Thread h .
Jules Bean jellybean.co.uk> writes: > Well that depends entirely what your program is supposed to do. > > Your email doesn't tell us (a) what your program was supposed to do or > (b) what goes wrong. Therefore we are forced to guess! > > The following slight variation of your program works fine

Re: [Haskell-cafe] Re: process

2007-02-23 Thread Joe Thornber
On 23/02/07, Thomas Hartman <[EMAIL PROTECTED]> wrote: This seemed like a handy thing to have an example of, so I added it to my growing repo of sample haskell programs and tried running it. But I was unsuccessful. Your program works for me both compiled or using runghc: Linux lonlsd62 2.6.9-1

Re: [Haskell-cafe] Re: process

2007-02-23 Thread Thomas Hartman
This seemed like a handy thing to have an example of, so I added it to my growing repo of sample haskell programs and tried running it. But I was unsuccessful. Can anyone see what I'm doing wrong? In case it matters, I'm on a virtualized user-mode-linux shell. **

Re: [Haskell-cafe] TFP 2007: Registration and Program

2007-02-23 Thread TFP 2007
>> >> Dear Colleagues, >> >> You may now resgister for TFP 2007! TFP 2007 will be held April 2-4, >> 2007 in New York City, USA. > April 2 is the first night of Passover. This is not one of those Your point is well taken. It is very unfortunate that the overlap you have pointed out exists. T

Re: [Haskell-cafe] Re: process

2007-02-23 Thread Jules Bean
h. wrote: If it basically works, what goes wrong in my programm? Well that depends entirely what your program is supposed to do. Your email doesn't tell us (a) what your program was supposed to do or (b) what goes wrong. Therefore we are forced to guess! The following slight variation

Re: [Haskell-cafe] Re: process

2007-02-23 Thread Dougal Stanton
Quoth h., nevermore, > > If it basically works, what goes wrong in my programm? Maybe something to do with compiler flags? I have tried doing inter-process stuff like that and it's the principal place where laziness really trips me up. I haven't yet been able to predict what would happen in any p

[Haskell-cafe] Re: process

2007-02-23 Thread h .
Donald Bruce Stewart cse.unsw.edu.au> writes: > I usually use System.Process for this kind of thing. > > http://haskell.org/ghc/docs/latest/html/libraries/base/System-Process.html > As I wrote in "process": [...] As long as there is no need to put some input after having received some outpu

Re: [Haskell-cafe] Re: process

2007-02-23 Thread Donald Bruce Stewart
h._h._h._: > I have in mind something as connections via pipes to the chils's stdin, > stdout > and stderr, but the stream library just supports internal pipes, and posix > require Unix. By this means it's not possible to request, receive and than > respond,... with the process. Does there exis

[Haskell-cafe] Re: process

2007-02-23 Thread h .
I have in mind something as connections via pipes to the chils's stdin, stdout and stderr, but the stream library just supports internal pipes, and posix require Unix. By this means it's not possible to request, receive and than respond,... with the process. Does there exist an alternative way?

Re: [Haskell-cafe] Re: Code and Perf. Data for Prime Finders (was: Genuine Eratosthenes sieve)

2007-02-23 Thread ajb
G'day all. Quoting Melissa O'Neill <[EMAIL PROTECTED]>: > Cool, thanks. When I ran your code trying to find the 10,000th > prime, I got >AtkinSieveTest: Ix{Integer}.index: Index (36213) out of range > ((0,36212)) > but that went away when I made your array one bigger. Fixed, thanks. Cheers

Re: [Haskell-cafe] Prime finding

2007-02-23 Thread Melissa O'Neill
*sigh* don't click send at 2:30am... I wrote: The algorithm named "Naive" in my table is called SimplePrimes in the zip file, and the example named "sieve" in my table is called "NaivePrimes" in the zip file. The algorithm named "Naive" in my table is called SimplePrimes in the zip file,

Re: [Haskell-cafe] Prime finding

2007-02-23 Thread Melissa O'Neill
Ruben writes: I ran a few of the tests myself on my Mac Mini G4 with 512 Mb ram. I compiled the programs with ghc 6.6. I got different results however. I suspect that's due to inconsistent naming on my part, I think. The algorithm named "Naive" in my table is called SimplePrimes in the zip

Re: [Haskell-cafe] Prime finding

2007-02-23 Thread Ruben Zilibowitz
I ran a few of the tests myself on my Mac Mini G4 with 512 Mb ram. I compiled the programs with ghc 6.6. I got different results however. 10^310^410^5 Reinke 0.7251 1.751 1m0.310s Runciman0.126 1.097 5m19.569s Zilibowitz 0.074.668

Re: [Haskell-cafe] A "real" Haskell Cookbook

2007-02-23 Thread Michael T. Richter
On Fri, 2007-23-02 at 02:24 -0500, Albert Y. C. Lai wrote: > Call me a technophile, but it saddens me that ASCII has already held us > back for too many decades, and looks like it will still hold us back for > another. OK. You're a technophile. But I agree with you. ASCII needs to die a slo