Re: [Haskell-cafe] implementing a csv reader

2006-08-24 Thread Henning Thielemann
On Wed, 23 Aug 2006, Robert Dockins wrote: On Aug 23, 2006, at 3:37 PM, Henk-Jan van Tuyl wrote: L.S., Reading and writing a comma seperated datafile doesn't have to be that complicated; the following is an easy way to read a CSV file into a list of tuples and display the list

Re: [Haskell-cafe] implementing a csv reader

2006-08-23 Thread Andy Elvey
On Tue, 2006-08-22 at 11:59 +0200, Tamas K Papp wrote: On Tue, Aug 22, 2006 at 11:26:45AM +0200, Henning Thielemann wrote: See also http://www.xoltar.org/languages/haskell.html http://www.xoltar.org/languages/haskell/CSV.hs Thanks. Haskell is incredibly neat ;-) Now I

Re: [Haskell-cafe] implementing a csv reader

2006-08-23 Thread Henk-Jan van Tuyl
L.S., Reading and writing a comma seperated datafile doesn't have to be that complicated; the following is an easy way to read a CSV file into a list of tuples and display the list on screen: displayTuples = do csvData - readFile data.csv putStrLn $ unlines $ map (show .

Re: [Haskell-cafe] implementing a csv reader

2006-08-23 Thread Robert Dockins
On Aug 23, 2006, at 3:37 PM, Henk-Jan van Tuyl wrote: L.S., Reading and writing a comma seperated datafile doesn't have to be that complicated; the following is an easy way to read a CSV file into a list of tuples and display the list on screen: For every complex problem, there is a

[Haskell-cafe] implementing a csv reader

2006-08-22 Thread Tamas K Papp
Hi, Now that I have read the tutorials, I think that the best way to learn Haskell would be to use the language and write something simple yet useful. I noticed that Haskell lacks a module for reading/writing csv (comma separated value) files, so I thought I could implement that. Questions: 1.

Re: [Haskell-cafe] implementing a csv reader

2006-08-22 Thread Henning Thielemann
On Tue, 22 Aug 2006, Tamas K Papp wrote: Hi, Now that I have read the tutorials, I think that the best way to learn Haskell would be to use the language and write something simple yet useful. I noticed that Haskell lacks a module for reading/writing csv (comma separated value) files, so

RE: [Haskell-cafe] implementing a csv reader

2006-08-22 Thread Pasqualino 'Titto' Assini
: [Haskell-cafe] implementing a csv reader Hi, Now that I have read the tutorials, I think that the best way to learn Haskell would be to use the language and write something simple yet useful. I noticed that Haskell lacks a module for reading/writing csv (comma separated value) files, so I

Re: [Haskell-cafe] implementing a csv reader

2006-08-22 Thread Jens Fisseler
Hi Tamas, Questions: 1. Please tell me if you know of a csv module, because then I would do something else. I think MissingH contains a simple CSV parser, but the server seems to be down. 2. I am looking for a parser, but I don't know Haskell parsers. Is Parsec a good choice?

Re: [Haskell-cafe] implementing a csv reader

2006-08-22 Thread Tamas K Papp
On Tue, Aug 22, 2006 at 11:26:45AM +0200, Henning Thielemann wrote: See also http://www.xoltar.org/languages/haskell.html http://www.xoltar.org/languages/haskell/CSV.hs Thanks. Haskell is incredibly neat ;-) Now I need to find something else for practice. Is there anything

Re: [Haskell-cafe] implementing a csv reader

2006-08-22 Thread Eric Kow
Now I need to find something else for practice. How about writing a CiteULike plugin? For example, what could be really useful is if somebody wrote one for the French open archive HAL. This will give you a nice chance to play maybe with parsing stuff, or one of the HTML/XML libraries, or

Re[2]: [Haskell-cafe] implementing a csv reader

2006-08-22 Thread Bulat Ziganshin
Hello Tamas, Tuesday, August 22, 2006, 1:59:28 PM, you wrote: Now I need to find something else for practice. Is there anything related to data analysis/statistics that is lacking is Haskell? general String/List library containing search, replace, split and all other general algorithms --

Re: [Haskell-cafe] implementing a csv reader

2006-08-22 Thread Jared Updike
Now I need to find something else for practice. Is there anything related to data analysis/statistics that is lacking is Haskell? A native implementation of multiparameter data fitting (requires some linear algebra) like: Sec 15.4 of http://www.library.cornell.edu/nr/bookcpdf.html or

RE: [Haskell-cafe] implementing a csv reader

2006-08-22 Thread Daan Leijen
2. I am looking for a parser, but I don't know Haskell parsers. Is Parsec a good choice? Parsec is definitely a good choice, but beware that it parses the whole input before returning, thus it may consume a huge batch of memory. As CSV is a line oriented format, you should make your

Re: [Haskell-cafe] implementing a csv reader

2006-08-22 Thread Tomasz Zielonka
On Tue, Aug 22, 2006 at 08:59:40AM -0700, Daan Leijen wrote: 2. I am looking for a parser, but I don't know Haskell parsers. Is Parsec a good choice? Parsec is definitely a good choice, but beware that it parses the whole input before returning, thus it may consume a huge batch of