Re: [Haskell-cafe] Re: databases in Haskell & type-safety

2009-01-13 Thread Xie Hanjian
* John Goerzen [2009-01-13 20:53:40 -0600]: > Xie Hanjian wrote: > > * John Goerzen [2009-01-13 12:37:45 -0600]: > > > > Redmine requires only ruby 1.8.6 and rails 2.1.2, which are both stable > > releases, so I think an upgrade of your ruby stack is very reasonable. > > It also requires a new

[Haskell-cafe] endian-ness ....

2009-01-13 Thread Galchin, Vasili
Hello, I am used to network-neutral endianness (TCP/IP) As far as "persistent" store, endian neutralness relies on a convention in a particular marshalling/serializing situation??? Sorry ... probably dumb question .. and I think I know the answer ... but "what the hey". I like to get a con

[Haskell-cafe] Re: posting newspaper article?

2009-01-13 Thread Benjamin L . Russell
On Tue, 13 Jan 2009 20:22:55 -0600, "Galchin, Vasili" wrote: >[...] > > I don't want to risk the ire of the Haskell Cafe community. Is there >a moderator? I want to post an editorial by the Big Blue CEO which seems to >me to be very >interesting vis-a-vis the FPL community and Haskell in ge

Re: [Haskell-cafe] Slow Text.JSON parser

2009-01-13 Thread Brandon S. Allbery KF8NH
On 2009 Jan 13, at 22:43, Brandon S. Allbery KF8NH wrote: On 2009 Jan 13, at 18:54, Sjoerd Visscher wrote: It is not impossible, but a lot of work. And if you want to do it correctly you would have to support UTF-16 (BE of LE) and UTF-32 (BE of LE) as well. You can't expect someone to start w

Re: [Haskell-cafe] ANN: json-0.4.1

2009-01-13 Thread Sigbjorn Finne
Thanks Bas for the helpful & clear advice. While I'm not on top of it yet why some installs of 6.10.1 experience this build failure, but others don't, I've put together an updated .cabal file + source dist that I hope gets at it. It's available from http://www.galois.com/~sof/json-0.4.1.tar

Re: [Haskell-cafe] Real World Haskell: confusion

2009-01-13 Thread Derek Elkins
On Tue, 2009-01-13 at 19:23 -0500, Anton van Straaten wrote: > Derek Elkins wrote: > > No, it means exactly what you said it means. People abuse it to mean > > the second sense. Those people are wrong and there is already a term > > for that second sense, namely "partial application." I really w

[Haskell-cafe] Re: Issues with posix-realtime package

2009-01-13 Thread Galchin, Vasili
Hi Manlio, Are you now talking about code in Code from HsUnix.h and execvpe.h? Vasili On Tue, Jan 13, 2009 at 5:09 AM, Manlio Perillo wrote: > Galchin, Vasili ha scritto: > >> [...] >>I would like to help to develope any wrappers around POSIX API. >> >> >> ^^^ you are sugge

Re: [Haskell-cafe] Real World Haskell: confusion

2009-01-13 Thread Derek Elkins
On Wed, 2009-01-14 at 12:39 +1300, George Pollard wrote: > On Tue, 2009-01-13 at 11:46 -0600, Derek Elkins wrote: > > No, it means exactly what you said it means. People abuse it to mean > > the second sense. Those people are wrong and there is already a term > > for that second sense, namely "pa

Re: [Haskell-cafe] Slow Text.JSON parser

2009-01-13 Thread Brandon S. Allbery KF8NH
On 2009 Jan 13, at 18:54, Sjoerd Visscher wrote: It is not impossible, but a lot of work. And if you want to do it correctly you would have to support UTF-16 (BE of LE) and UTF-32 (BE of LE) as well. You can't expect someone to start writing utf encoders and decoders every time he needs a fa

Re: [Haskell-cafe] Re: databases in Haskell & type-safety

2009-01-13 Thread John Goerzen
Xie Hanjian wrote: > * John Goerzen [2009-01-13 12:37:45 -0600]: > > Redmine requires only ruby 1.8.6 and rails 2.1.2, which are both stable > releases, so I think an upgrade of your ruby stack is very reasonable. It also requires a newer version of rake than is in Debian. Not a problem as such

[Haskell-cafe] posting newspaper article?

2009-01-13 Thread Galchin, Vasili
Hello, I don't want to risk the ire of the Haskell Cafe community. Is there a moderator? I want to post an editorial by the Big Blue CEO which seems to me to be very interesting vis-a-vis the FPL community and Haskell in general. I have an online subscription and can post to stimulate discu

Re: [Haskell-cafe] Re: databases in Haskell & type-safety

2009-01-13 Thread Xie Hanjian
* John Goerzen [2009-01-13 12:37:45 -0600]: > Gour wrote: > >> "John" == John Goerzen writes: > > > > John> That's great. Even better if accompanied by a patch ;-) > > > > Heh, one of the things which prevents me advancing with my own Haskell > > project is lack of enough skills to provid

Re: [Haskell-cafe] Real World Haskell: confusion

2009-01-13 Thread wren ng thornton
Anton van Straaten wrote: Derek Elkins wrote: > * A related annoyance is people who talk about languages "supporting > currying and/or partial application." Unless one means that the > language supports higher order functions at all by that, it doesn't make > any sense. Haskell has no "support"

Re: [Haskell-cafe] walking a directory tree efficiently

2009-01-13 Thread Thomas Hartman
> There's no iteratee/fold-based IO system yet. What about http://sites.google.com/site/haskell/notes/lazy-io-considered-harmful-way-to-go-left-fold-enumerator ? It's not on hackage, but at least it's public domain. Oleg, of course. 2009/1/13 Don Stewart : > manlio_perillo: >> Hi. >> >> Duri

Re: [Haskell-cafe] Multiple State Monads

2009-01-13 Thread Luke Palmer
On Tue, Jan 13, 2009 at 5:45 PM, Phil wrote: > mcSimulate :: Double -> Double -> Word64 -> [Dou > ble] > mcSimulate startStock endTime seedForSeed = fst expiryStock : mcSimulate > startStock endTime newSeedForSeed > > It is abundantly clear that the startStock and endTime are just being > passed

Re: [Haskell-cafe] Re: Monads aren't evil? I think they are.

2009-01-13 Thread Duncan Coutts
On Tue, 2009-01-13 at 19:44 -0500, Dan Doel wrote: > On Tuesday 13 January 2009 7:27:10 pm Luke Palmer wrote: > > > When GHC starts optimizing (Writer Builder) as well as it optimizes PutM, > > > then > > > that will be a cogent argument. Until then, one might argue that it > > > misses "the whole

Re: [Haskell-cafe] Multiple State Monads

2009-01-13 Thread David Menendez
On Tue, Jan 13, 2009 at 5:29 PM, Phil wrote: > Many thanks for the replies. > > Using 'modify' cleans the syntax up nicely. > > With regard to using 'iterate' as shown by David here: > >>> mcSimulate :: Double -> Double -> Word64 -> [Double] >>> mcSimulate startStock endTime seedForSeed = fst expi

Re: [Haskell-cafe] Re: Monads aren't evil? I think they are.

2009-01-13 Thread Ross Paterson
On Tue, Jan 13, 2009 at 07:44:17PM -0500, Dan Doel wrote: > On Tuesday 13 January 2009 7:27:10 pm Luke Palmer wrote: > > Surely PutM and Writer Put have almost the same performance?! (I am > > worried if not -- if not, can you give an indication why?) > > The underlying monoid is Builder. The po

Re: [Haskell-cafe] Re: Monads aren't evil? I think they are.

2009-01-13 Thread Duncan Coutts
On Tue, 2009-01-13 at 19:19 -0500, Dan Doel wrote: > On Tuesday 13 January 2009 5:51:09 pm Luke Palmer wrote: > > On Tue, Jan 13, 2009 at 11:21 AM, Tim Newsham wrote: > > > I have seen several libraries where all functions of a monad have the > > > > > >> monadic result (), e.g. Binary.Put and oth

Re: [Haskell-cafe] Multiple State Monads

2009-01-13 Thread Phil
Ahh, I see ­ so using the State monad is arguably overcomplicating this. This is very helpful. The use of Œkeyword¹ was just an unfortunate use of terminology ­ my bad. Very useful explanation about the laziness resulting in stack overflows too ­ when I crank up the numbers I have been seeing thi

Re: [Haskell-cafe] Re: Monads aren't evil? I think they are.

2009-01-13 Thread Dan Doel
On Tuesday 13 January 2009 7:27:10 pm Luke Palmer wrote: > > When GHC starts optimizing (Writer Builder) as well as it optimizes PutM, > > then > > that will be a cogent argument. Until then, one might argue that it > > misses "the whole point of Put". > > Well it can still serve as an optimization

Re: [Haskell-cafe] Re: Monads aren't evil? I think they are.

2009-01-13 Thread Luke Palmer
On Tue, Jan 13, 2009 at 5:19 PM, Dan Doel wrote: > On Tuesday 13 January 2009 5:51:09 pm Luke Palmer wrote: > > On Tue, Jan 13, 2009 at 11:21 AM, Tim Newsham wrote: > > > I have seen several libraries where all functions of a monad have the > > > > > >> monadic result (), e.g. Binary.Put and oth

Re: [Haskell-cafe] Real World Haskell: confusion

2009-01-13 Thread Anton van Straaten
Derek Elkins wrote: No, it means exactly what you said it means. People abuse it to mean the second sense. Those people are wrong and there is already a term for that second sense, namely "partial application." I really wish people would stop conflating these terms*, all it does is create conf

Re: [Haskell-cafe] Re: Monads aren't evil? I think they are.

2009-01-13 Thread Dan Doel
On Tuesday 13 January 2009 5:51:09 pm Luke Palmer wrote: > On Tue, Jan 13, 2009 at 11:21 AM, Tim Newsham wrote: > > I have seen several libraries where all functions of a monad have the > > > >> monadic result (), e.g. Binary.Put and other writing functions. This is > >> a clear indicator, that th

Re: [Haskell-cafe] Real World Haskell: confusion

2009-01-13 Thread Peter Verswyvelen
> I'd almost say that there is no such thing as partial application in > Haskell. Since every: > > > f ∷ a → b → c > > is really: > > > f ∷ a → (b → c) > > there are no multiple arguments to be applied 'partially', only a > function 'f' that takes one argument and gives you another, anonymous, > fu

Re: [Haskell-cafe] Adding Authentication and Authorization to a service implemented in Haskell

2009-01-13 Thread Ryan Ingram
At ICFP this year there was a fun presentation about this subject. The paper & library are available from: http://www.cs.chalmers.se/~russo/seclib.htm -- ryan 2009/1/13 Daryoush Mehrtash : > I am trying to figure out a clean way to add authentication and > authorization in a webservice. The

Re: [Haskell-cafe] Slow Text.JSON parser

2009-01-13 Thread Sjoerd Visscher
It is not impossible, but a lot of work. And if you want to do it correctly you would have to support UTF-16 (BE of LE) and UTF-32 (BE of LE) as well. You can't expect someone to start writing utf encoders and decoders every time he needs a fast parser. Sjoerd On Jan 14, 2009, at 12:42 AM,

Re: [Haskell-cafe] Slow Text.JSON parser

2009-01-13 Thread Luke Palmer
On Tue, Jan 13, 2009 at 4:39 PM, Sjoerd Visscher wrote: > JSON is a UNICODE format, like any modern format is today. ByteStrings are > not going to work. I don't understand this statement. Why can one not make a parser from ByteStrings that can decode UTF-8? Luke > > > If everybody starts ye

Re: [Haskell-cafe] Slow Text.JSON parser

2009-01-13 Thread Don Stewart
utf8-string allows one to decode utf8 from bytestrings. It was built so that we could decode utf8 strings at work from bytestrings :) http://hackage.haskell.org/packages/archive/utf8-string/0.3.3/doc/html/Data-ByteString-UTF8.html Enjoy! Libraries win every day of the week. -- Don sjoerd:

Re: [Haskell-cafe] Real World Haskell: confusion

2009-01-13 Thread George Pollard
On Tue, 2009-01-13 at 11:46 -0600, Derek Elkins wrote: > No, it means exactly what you said it means. People abuse it to mean > the second sense. Those people are wrong and there is already a term > for that second sense, namely "partial application." I really wish > people would stop conflating

Re: [Haskell-cafe] Slow Text.JSON parser

2009-01-13 Thread Sjoerd Visscher
JSON is a UNICODE format, like any modern format is today. ByteStrings are not going to work. If everybody starts yelling "ByteString" every time String performance is an issue, I don't see how Haskell is ever going to be a "real world programming language". On Jan 13, 2009, at 4:00 PM, D

Re: [Haskell-cafe] ANN: json-0.4.1

2009-01-13 Thread Duncan Coutts
On Tue, 2009-01-13 at 20:58 +0100, Bas van Dijk wrote: > >Could not find module `Data.Generics': > > it was found in multiple packages: base-3.0.3.0 syb > > cabal: Error: some packages failed to install: > > json-0.4.1 failed during the building phase. The exception was: > > exit: ExitFai

Re: [Haskell-cafe] walking a directory tree efficiently

2009-01-13 Thread Don Stewart
manlio_perillo: > Hi. > > During a tentative (quite unsuccessfull) to convert a simple Python > script that prints on stdout a directory and all its subdirectory [1] in > a good Haskell (mostly to start to do real practice with the language), > I came across this blog post: > http://blog.moerte

Re: [Haskell-cafe] Multiple State Monads

2009-01-13 Thread Luke Palmer
On Tue, Jan 13, 2009 at 3:29 PM, Phil wrote: > My only concern with using this method is - Will 'iterate' not create a > full > list of type [Double] and then take the final position once the list has > been fully realized? For my application this would be undesirable as the > list may be millio

Re: [Haskell-cafe] real haskell difficulties (at least for me)

2009-01-13 Thread Duncan Coutts
On Tue, 2009-01-13 at 18:43 +0100, Peter Verswyvelen wrote: > What could be done is letting the community rate the quality of the > modules for each platform? Maybe with user comments? Like amazon.com > (so we hackazon.org ;-) And using lambdas instead of stars for giving > the rating :) On Tue,

Re: [Haskell-cafe] real haskell difficulties (at least for me)

2009-01-13 Thread Duncan Coutts
On Tue, 2009-01-13 at 16:21 +, Jamie Brandon wrote: > I agree completely. There is not nearly enough documentation on > packaging in haskell and too many hackage packages are broken or do > not install. I know several people are working on improving this but > they seem do be doing so rather qu

[Haskell-cafe] Re: The problem with Monads...

2009-01-13 Thread Benedikt Huber
Rafael Gustavo da Cunha Pereira Pinto schrieb: Yes, I've read it twice, and it is a nice explanation that "yes, the reader monad is an application and is a monad". How do I use it? Why not the function itself? How would the plumbing work in a real world example? Hi Rafael, First of all, I agre

Re: [Haskell-cafe] real haskell difficulties (at least for me)

2009-01-13 Thread Duncan Coutts
On Tue, 2009-01-13 at 16:33 +0100, Regis Saint-Paul wrote: > Hi, > > I’ve seen many times the monad topic coming around on the cafe and plentiful > tutorials on monads have been published. However, as a complete Haskell > newbie coming from OOP, I felt monads were not particularly difficult to >

[Haskell-cafe] walking a directory tree efficiently

2009-01-13 Thread Manlio Perillo
Hi. During a tentative (quite unsuccessfull) to convert a simple Python script that prints on stdout a directory and all its subdirectory [1] in a good Haskell (mostly to start to do real practice with the language), I came across this blog post: http://blog.moertel.com/articles/2007/03/28/di

[Haskell-cafe] Request for help testing HDBC-postgresql

2009-01-13 Thread John Goerzen
Hi folks, I've pushed to the Git repo a bunch of new code for HDBC-postgresql. Specifically, it: 1) Removes autoconf in favor of Duncan's Setup.lhs that should work on all combinations of GHC 6.8, GHC 6.10, POSIX, and Windows 2) Adds support for UTF-8 encoding of strings 3) Adds support for

Re: [Haskell-cafe] Re: Monads aren't evil? I think they are.

2009-01-13 Thread Luke Palmer
On Tue, Jan 13, 2009 at 11:21 AM, Tim Newsham wrote: > I have seen several libraries where all functions of a monad have the >> monadic result (), e.g. Binary.Put and other writing functions. This is >> a clear indicator, that the Monad instance is artificial and was only >> chosen because of the

Re: [Haskell-cafe] Multiple State Monads

2009-01-13 Thread Phil
Many thanks for the replies. Using 'modify' cleans the syntax up nicely. With regard to using 'iterate' as shown by David here: >> mcSimulate :: Double -> Double -> Word64 -> [Double] >> mcSimulate startStock endTime seedForSeed = fst expiryStock : mcSimulate >> startStock endTime newSeedForSeed

Re: [Haskell-cafe] unfoldr [ANN: HLint 1.2]

2009-01-13 Thread Ketil Malde
"Colin Adams" writes: >> One of the wonderful things about Haskell is that almost any time anybody >> posts code, at least one person will think up an alternative but equivilent >> way of achieving the same goal - sometimes by radically different steps. >> Maybe we should have a name for this ef

Re: [Haskell-cafe] ByteString intercalate semantics??

2009-01-13 Thread Don Stewart
vigalchin: >Hello, > > From Hoogle (my friend) > >intercalate :: [1]ByteString -> [[2]ByteString] -> [3]ByteString [4]Source >O(n) The [5]intercalate function takes a [6]ByteString and a list of >[7]ByteStrings and concatenates the list after interspersing the

Re: [Haskell-cafe] real haskell difficulties (at least for me)

2009-01-13 Thread Magnus Therning
Don Stewart wrote: > mle+cl: >> Don Stewart wrote: >> >>> Well, the number one thing is to use Cabal and the cabal-install tool. >>> That is the simplest way to avoid headaches. >> I'm sure cabal works very well for many people, but for anyone who >> has used Debian based distributions for some t

[Haskell-cafe] ByteString intercalate semantics??

2009-01-13 Thread Galchin, Vasili
Hello, From Hoogle (my friend) *intercalate* :: ByteString-> [ ByteString

[Haskell-cafe] Re: databases in Haskell & type-safety

2009-01-13 Thread Johannes Waldmann
> Johannes> http://article.gmane.org/gmane.comp.lang.haskell.libraries/10490 > Is it just a 'fix' or HSQL will be properly maintained as well? Just a fix for Setup.hs and *.cabal, and no changes to the real code (w.r.t. version -1.7 presently available from hackage) J.W. ___

[Haskell-cafe] ANN: split-0.1.1 (doc bugfix; new functions wordsBy and linesBy)

2009-01-13 Thread Brent Yorgey
Version 0.1.1 of the split library is now on Hackage, which provides a wide range of strategies and a unified combinator framework for splitting lists with respect to some sort of delimiter. This version: * fixes a couple Haddock bugs that were preventing the documentation from building on

Re: [Haskell-cafe] real haskell difficulties (at least for me)

2009-01-13 Thread Don Stewart
mle+cl: > Don Stewart wrote: > > > Well, the number one thing is to use Cabal and the cabal-install tool. > > That is the simplest way to avoid headaches. > > I'm sure cabal works very well for many people, but for anyone who > has used Debian based distributions for some time, cabal really >

Re: [Haskell-beginners] Re: [Haskell-cafe] The problem with Monads...

2009-01-13 Thread Henk-Jan van Tuyl
On Tue, 13 Jan 2009 19:35:57 +0100, Rafael Gustavo da Cunha Pereira Pinto wrote: I didn't knew Wadler's papers (I save all papers I read into a external USB HD, so I can read them later!), and at a first glance it is really good. Then again, instead of creating another "monad tutorial", w

Re: [Haskell-cafe] unfoldr [ANN: HLint 1.2]

2009-01-13 Thread George Pollard
On Mon, 2009-01-12 at 21:48 +, Robin Green wrote: > > > convert b = unfoldr (\n -> if n > 0 then Just (n `mod` b, n `div` > > > b) else Nothing) > > > > I have the nice function 'toMaybe' which simplifies this to: > >unfoldr (\n -> toMaybe (n>0) (n `mod` b, n `div` b)) > > I would use the

Re: [Haskell-cafe] real haskell difficulties (at least for me)

2009-01-13 Thread Erik de Castro Lopo
Don Stewart wrote: > Well, the number one thing is to use Cabal and the cabal-install tool. > That is the simplest way to avoid headaches. I'm sure cabal works very well for many people, but for anyone who has used Debian based distributions for some time, cabal really does seem like a backwar

[Haskell-cafe] Re: databases in Haskell & type-safety

2009-01-13 Thread Gour
> "Mauricio" == Mauricio writes: Mauricio> No. Only sqlite3_exec with INSERT, SELECT stuff, Mauricio> and saving everything that needs structure in pseudo-xml Mauricio> strings. Not that efficient, but easy to change to blobs when Mauricio> everything is ready and tested. I see...I'm thinki

[Haskell-cafe] Re: databases in Haskell & type-safety

2009-01-13 Thread Gour
> "Johannes" == Johannes Waldmann writes: Johannes> see Johannes> http://article.gmane.org/gmane.comp.lang.haskell.libraries/10490 Thanks. Is it just a 'fix' or HSQL will be properly maintained as well? Sincerely, Gour -- Gour | Zagreb, Croatia | GPG key: C6E7162D ---

[Haskell-cafe] Re: [ANN] Working with HLint from Emacs

2009-01-13 Thread Gour
> "Alex" == Alex Ott writes: Alex> Hello For Emacs users it could be interesting - I wrote small Alex> module for more comfortable work with HLint from Emacs. It has Alex> same functionality as compilation-mode - navigation between Alex> errors, etc. Thank you for it. Alex> Module is availa

[Haskell-cafe] Re: databases in Haskell & type-safety

2009-01-13 Thread Gour
> "John" == John Goerzen writes: John> Yes. I am thoroughly displeased with Ruby on Rails at the moment. John> It is less maintainable than a network of DOS boxes. There are a John> host of mysterious crashes in Redmine at the moment -- including John> one where pulling up the page for one

Re: [Haskell-cafe] ANN: json-0.4.1

2009-01-13 Thread Bas van Dijk
On Tue, Jan 13, 2009 at 8:47 PM, Alex Ott wrote: > Hello > >> "SF" == Sigbjorn Finne writes: > SF> Hi, a new release of the 'json' package is now available via hackage, > SF> version 0.4.1 > > SF> http://hackage.haskell.org/cgi-bin/hackage-scripts/package/json > > I tried to upgrade it vi

[Haskell-cafe] Re: databases in Haskell & type-safety

2009-01-13 Thread Mauricio
Mauricio> I've been doing a lot of low level sqlite3 lately (it's going Mauricio> to be on a hackage package as soon as I finish my current Mauricio> work). Have you done any work with BLOBs? No. Only sqlite3_exec with INSERT, SELECT stuff, and saving everything that needs structure in pseud

[Haskell-cafe] Adding Authentication and Authorization to a service implemented in Haskell

2009-01-13 Thread Daryoush Mehrtash
I am trying to figure out a clean way to add authentication and authorization in a webservice. The services of the web services are implemented as Haskell functions. The request to the service contains the user authentication information. I want to authenticate the user by verifying his authen

Re: [Haskell-cafe] ANN: json-0.4.1

2009-01-13 Thread Alex Ott
Hello > "SF" == Sigbjorn Finne writes: SF> Hi, a new release of the 'json' package is now available via hackage, SF> version 0.4.1 SF> http://hackage.haskell.org/cgi-bin/hackage-scripts/package/json I tried to upgrade it via cabal on mac os x & linux (both use ghc 6.10.1) and it fails w

Re: [Haskell-cafe] unfoldr [ANN: HLint 1.2]

2009-01-13 Thread John Goerzen
Colin Adams wrote: > 2009/1/13 Andrew Coppin : > >> One of the wonderful things about Haskell is that almost any time anybody >> posts code, at least one person will think up an alternative but equivilent >> way of achieving the same goal - sometimes by radically different steps. >> >> Maybe we sh

[Haskell-cafe] Re: Arch Haskell News: Jan 11 2009

2009-01-13 Thread Peter Hercek
Hi, Any idea why ghc 6.10.1 is still in Testing repository on archlinux? Peter. Don Stewart wrote: Arch Haskell News: Jan 11 2009 <--cut--> ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] unfoldr [ANN: HLint 1.2]

2009-01-13 Thread Colin Adams
2009/1/13 Andrew Coppin : > One of the wonderful things about Haskell is that almost any time anybody > posts code, at least one person will think up an alternative but equivilent > way of achieving the same goal - sometimes by radically different steps. > > Maybe we should have a name for this ef

Re: [Haskell-cafe] Re: [Haskell] ANN: ghci-haskeline 0.1

2009-01-13 Thread Manlio Perillo
Judah Jacobson ha scritto: [...] (For those interested: rlwrap is available in cygwin. It used to work very well on old ghci, when line editing wasn't available.) This does sound useful; the main difficulty is that when a program has stdin piped from another process it may behaved differently

Re: [Haskell-cafe] Re: databases in Haskell & type-safety

2009-01-13 Thread John Goerzen
Gour wrote: >> "John" == John Goerzen writes: > > John> That's great. Even better if accompanied by a patch ;-) > > Heh, one of the things which prevents me advancing with my own Haskell > project is lack of enough skills to provide bindings for one C-lib and > here I see the same pattern..

Re: [Haskell-cafe] The problem with Monads...

2009-01-13 Thread Rafael Gustavo da Cunha Pereira Pinto
I didn't knew Wadler's papers (I save all papers I read into a external USB HD, so I can read them later!), and at a first glance it is really good. Then again, instead of creating another "monad tutorial", what about a Haskell monads reference guide, and some worked examples? Some of this work

[Haskell-cafe] Re: databases in Haskell & type-safety

2009-01-13 Thread Gour
> "Mauricio" == Mauricio writes: Mauricio> I've been doing a lot of low level sqlite3 lately (it's going Mauricio> to be on a hackage package as soon as I finish my current Mauricio> work). Have you done any work with BLOBs? Mauricio> As long as I clearly isolate and test the marshalling

[Haskell-cafe] Re: databases in Haskell & type-safety

2009-01-13 Thread Gour
> "John" == John Goerzen writes: John> That's great. Even better if accompanied by a patch ;-) Heh, one of the things which prevents me advancing with my own Haskell project is lack of enough skills to provide bindings for one C-lib and here I see the same pattern...It looks I have to cross

Re: [Haskell-cafe] Re: Monads aren't evil? I think they are.

2009-01-13 Thread Tim Newsham
I have seen several libraries where all functions of a monad have the monadic result (), e.g. Binary.Put and other writing functions. This is a clear indicator, that the Monad instance is artificial and was only chosen because of the 'do' notation. Maybe that was the initial reason, but I've act

Re: [Haskell-cafe] unfoldr [ANN: HLint 1.2]

2009-01-13 Thread Andrew Coppin
Robin Green wrote: On Mon, 12 Jan 2009 21:04:35 +0100 (CET) Henning Thielemann wrote: On Mon, 12 Jan 2009, Andrew Coppin wrote: convert b = unfoldr (\n -> if n > 0 then Just (n `mod` b, n `div` b) else Nothing) I have the nice function 'toMaybe' which simplifies this to: u

[Haskell-cafe] Re: real haskell difficulties (at least for me)

2009-01-13 Thread Mauricio
There's a 'stability' field on cabal description files. Maybe it could appear after the name on the main listing. Or, all packages marked as 'Stable' at that field could get a beautifull color. I agree completely. There is not nearly enough documentation on packaging in haskell and too many hac

Re: [Haskell-cafe] real haskell difficulties (at least for me)

2009-01-13 Thread Andrew Wagner
Wow, totally ++ this idea! 2009/1/13 Peter Verswyvelen > What could be done is letting the community rate the quality of the modules > for each platform? Maybe with user comments? Like amazon.com (so we > hackazon.org ;-) And using lambdas instead of stars for giving the rating > :) > > > On Tu

Re: [Haskell-cafe] Real World Haskell: confusion

2009-01-13 Thread Derek Elkins
No, it means exactly what you said it means. People abuse it to mean the second sense. Those people are wrong and there is already a term for that second sense, namely "partial application." I really wish people would stop conflating these terms*, all it does is create confusion. To Eugene: The

Re: [Haskell-cafe] Real World Haskell: confusion

2009-01-13 Thread Dan Piponi
2009/1/13 Peter Verswyvelen : > On page 102: "partial function application is named currying" > I thought "currying" or "to curry" means converting > f :: (a,b) ->c Confusion over these terms is commonplace. See, for example, the discussion here: http://lambda-the-ultimate.org/node/2266 -- Dan ___

Re: [Haskell-cafe] real haskell difficulties (at least for me)

2009-01-13 Thread Peter Verswyvelen
What could be done is letting the community rate the quality of the modules for each platform? Maybe with user comments? Like amazon.com (so we hackazon.org ;-) And using lambdas instead of stars for giving the rating :) On Tue, Jan 13, 2009 at 6:13 PM, Don Stewart wrote: > > Well, the number o

RE: [Haskell-cafe] The problem with Monads...

2009-01-13 Thread Derek Elkins
On Tue, 2009-01-13 at 16:22 +, Sittampalam, Ganesh wrote: > Jonathan Cast wrote: > > On Tue, 2009-01-13 at 12:56 -0200, Rafael Gustavo da Cunha Pereira > > Pinto wrote: > >> > >> Inspired by the paper "Functional Programming with Overloading and > >> Higher-Order Polymorphism", Mark P J

Re: [Haskell-cafe] real haskell difficulties (at least for me)

2009-01-13 Thread Don Stewart
Well, the number one thing is to use Cabal and the cabal-install tool. That is the simplest way to avoid headaches. Regarding libraries in general, the platform project is underway, aiming to bless a set of stable, "batteries included" packages, saving duplicated work determining which, say, json

Re: [Haskell-cafe] real haskell difficulties (at least for me)

2009-01-13 Thread Krzysztof Skrzętnicki
My experience from using GHC under Windows XP is very similar. Many packages (especially those involving bindings to C packages) are at least painful to build. Regarding encoding package: it compiles fine for me: C:\Documents and Settings\Metharius>cabal install encoding Resolving dependencies...

RE: [Haskell-cafe] The problem with Monads...

2009-01-13 Thread Sittampalam, Ganesh
Jonathan Cast wrote: > On Tue, 2009-01-13 at 12:56 -0200, Rafael Gustavo da Cunha Pereira > Pinto wrote: >> >> Inspired by the paper "Functional Programming with Overloading and >> Higher-Order Polymorphism", Mark P Jones >> (http://web.cecs.pdx.edu/~mpj/pubs/springschool.html) >>

Re: [Haskell-cafe] real haskell difficulties (at least for me)

2009-01-13 Thread Jamie Brandon
I agree completely. There is not nearly enough documentation on packaging in haskell and too many hackage packages are broken or do not install. I know several people are working on improving this but they seem do be doing so rather quietly. Could someone briefly outline what improvements are plann

Re: [Haskell-cafe] Real World Haskell: confusion

2009-01-13 Thread Peter Verswyvelen
Ah. That explains my confusion. But isn't that ambiguous terminology? There must be some reason for it to be that way? On Tue, Jan 13, 2009 at 5:05 PM, Eugene Kirpichov wrote: > The term 'currying' means both of these things: > - Converting an uncurried function to a 'curriable' one > - Partiall

Re: [Haskell-cafe] The problem with Monads...

2009-01-13 Thread Rafael Gustavo da Cunha Pereira Pinto
Yes, I've read it twice, and it is a nice explanation that "yes, the reader monad is an application and is a monad". How do I use it? Why not the function itself? How would the plumbing work in a real world example? BTW, the article is really great as an brief introduction to monad transformers. F

[Haskell-cafe] Re: The problem with Monads...

2009-01-13 Thread Ertugrul Soeylemez
Jonathan Cast wrote: > On Tue, 2009-01-13 at 12:56 -0200, Rafael Gustavo da Cunha Pereira Pinto > wrote: > > > Inspired by the paper "Functional Programming with Overloading and > > Higher-Order Polymorphism", > > Mark P Jones > > (http://web.cecs.pdx.edu/~mpj/pubs/springschool.html) > >

Re: [Haskell-cafe] Real World Haskell: confusion

2009-01-13 Thread Eugene Kirpichov
The term 'currying' means both of these things: - Converting an uncurried function to a 'curriable' one - Partially applying a 'curriable' function 2009/1/13 Peter Verswyvelen : > On page 102: "partial function application is named currying" > > > > I thought "currying" or "to curry" means conve

[Haskell-cafe] Real World Haskell: confusion

2009-01-13 Thread Peter Verswyvelen
On page 102: "partial function application is named currying" I thought "currying" or "to curry" means converting f :: (a,b) ->c into g :: a -> b -> c by applying "curry" (mmm, are Asian people good at Haskell? :-) g = curry f ___ Haskell-

Re: [Haskell-cafe] The problem with Monads...

2009-01-13 Thread Jonathan Cast
On Tue, 2009-01-13 at 12:56 -0200, Rafael Gustavo da Cunha Pereira Pinto wrote: > > Last night I was thinking on what makes monads so hard to take, and > came to a conclusion: the lack of a guided tour on the implemented > monads. ... > Inspired by the paper "Functional Programming with Overload

[Haskell-cafe] real haskell difficulties (at least for me)

2009-01-13 Thread Regis Saint-Paul
Hi, I’ve seen many times the monad topic coming around on the cafe and plentiful tutorials on monads have been published. However, as a complete Haskell newbie coming from OOP, I felt monads were not particularly difficult to grasp, and very exciting to work with. During my experiments with Has

Re: [Haskell-cafe] Re: [Haskell] ANN: ghci-haskeline 0.1

2009-01-13 Thread Judah Jacobson
On Tue, Jan 13, 2009 at 6:03 AM, Mauricio wrote: >>> Haskeline is designed to remove the readline dependency, because Windows >>> does not have readline. So rlwrap is useless there. >>> >> >> Ah, I hadn't considered Windows support--that makes sense. Thanks, >> that answers my questions. >> >> A

Re: [Haskell-cafe] Slow Text.JSON parser

2009-01-13 Thread Don Stewart
ketil: > "Levi Greenspan" writes: > > > Now I wonder why Text.JSON is so slow in comparison and what can be > > done about it. Any ideas? Or is the test case invalid? > > I haven't used JSON, but at first glance, I'd blame String IO. Can't > you decode from ByteString? > Text.JSON was never o

[Haskell-cafe] The problem with Monads...

2009-01-13 Thread Rafael Gustavo da Cunha Pereira Pinto
Last night I was thinking on what makes monads so hard to take, and came to a conclusion: the lack of a guided tour on the implemented monads. Let's take the Writer monad documentation: all it says is: Inspired by the paper "Functional Programming with Overloading and Higher-Order Polymorphism",

[Haskell-cafe] Re: errno handling in concurrent haskell

2009-01-13 Thread Manlio Perillo
Simon Marlow ha scritto: Manlio Perillo wrote: I have some doubts about errno handling in a Concurrent Haskell program. Let's suppose that GHC non threaded runtime is used, so that each Haskell thread is bound to an OS thread. Let's suppose there are two threads running (`A` and `B`). Threa

[Haskell-cafe] Re: ANN: HLint 1.2

2009-01-13 Thread Max Bolingbroke
2009/1/13 Simon Marlow : >> GHC should indeed be doing so. I'm working (on and off) to work out >> some suitable heuristics and put the transformation into ghc -O2. >> There are a few wrinkles that still need sorting out, but preliminary >> indications are that it decreases the runtime of our stand

[Haskell-cafe] Re: [Haskell] ANN: ghci-haskeline 0.1

2009-01-13 Thread Mauricio
Haskeline is designed to remove the readline dependency, because Windows does not have readline. So rlwrap is useless there. Ah, I hadn't considered Windows support--that makes sense. Thanks, that answers my questions. AHH One nice thing would be to write something like rlwrap that would

Re: [Haskell-cafe] Slow Text.JSON parser

2009-01-13 Thread Ketil Malde
"Levi Greenspan" writes: > Now I wonder why Text.JSON is so slow in comparison and what can be > done about it. Any ideas? Or is the test case invalid? I haven't used JSON, but at first glance, I'd blame String IO. Can't you decode from ByteString? -k -- If I haven't seen further, it is by st

Re: [Haskell-cafe] unfoldr [ANN: HLint 1.2]

2009-01-13 Thread Yitzchak Gale
Andrew Coppin wrote: >>> Does it suggest unfoldr too? I think Neil's idea to have this customizable is a good one. It's often a matter of taste. I would rarely want to use unfoldr, and I wouldn't want HList to bother me about it. Instead, I prefer to use iterate for both of Andrew's examples: >

[Haskell-cafe] Re: errno handling in concurrent haskell

2009-01-13 Thread Simon Marlow
Manlio Perillo wrote: I have some doubts about errno handling in a Concurrent Haskell program. Let's suppose that GHC non threaded runtime is used, so that each Haskell thread is bound to an OS thread. Let's suppose there are two threads running (`A` and `B`). Thread `A` calls a function `f`

[Haskell-cafe] Re: ANN: HLint 1.2

2009-01-13 Thread Simon Marlow
Max Bolingbroke wrote: 2009/1/12 Jan-Willem Maessen : On Jan 12, 2009, at 9:01 AM, Duncan Coutts wrote: No because the current definition are recursive and ghc cannot inline recursive functions. Then the map can be inlined at the call site and the 'f' inlined into the body of 'go'. Thi

[Haskell-cafe] Slow Text.JSON parser

2009-01-13 Thread Levi Greenspan
Dear list members, I tried Text.JSON from hackage and did an initial test to see how well it performs. I created a single JSON file of roughly 6 MB containing a single JSON array with 30906 JSON objects and used the following code to parse it: module Main where import System.IO import Data.Time

[Haskell-cafe] Re: Issues with posix-realtime package

2009-01-13 Thread Manlio Perillo
Galchin, Vasili ha scritto: [...] I would like to help to develope any wrappers around POSIX API. ^^^ you are suggesting to change current wrapper API? No, but I don't understand why to link code that seems to be not used. P.S.: is the problem I have reported riproducible?

[Haskell-cafe] errno handling in concurrent haskell

2009-01-13 Thread Manlio Perillo
Hi. I have some doubts about errno handling in a Concurrent Haskell program. Let's suppose that GHC non threaded runtime is used, so that each Haskell thread is bound to an OS thread. Let's suppose there are two threads running (`A` and `B`). Thread `A` calls a function `f`, that, in turn, ca

  1   2   >