[Haskell-cafe] Wrappers, API's for Web Apps - Google Summer of Code

2009-04-03 Thread Hrushikesh Tilak
Hi, I am interested in participating in this year's Google Summer of Code. One of my proposals is going to be to write and extend existing Haskell wrappers and API's for web services. Some of the popular web services that I use are Google Maps, Flickr, digg, reddit, Facebook and twitter, Quick

[Haskell-cafe] Problem with prepose.lhs and ghc6.10.1

2009-04-03 Thread oleg
../haskell/prepose.lhs:707:0: Parse error in pattern which is pointing at: normalize a :: M s a = M (mod a (modulus (undefined :: s))) The code indeed used lexically scoped type variables -- which GHC at that time implemented differently. Incidentally, on the above line, M s a is the type

[Haskell-cafe] ANN: hledger 0.4 released

2009-04-03 Thread Simon Michael
Dear all, I have released hledger 0.4 on hackage. There is also a new website at http://hledger.org , with screenshots (textual!), a demo (will it survive!?), and docs (not too many!) Release notes are at http://hledger.org/NEWS , and bravely pasted below. In case you forgot: hledger is

Re: [Haskell-cafe] Problem with prepose.lhs and ghc6.10.1

2009-04-03 Thread Claus Reinke
Hugs did not support lexically scoped type variables then (and probably doesn't support now). I may be misremembering, but I think Hugs had them first;-) http://cvs.haskell.org/Hugs/pages/hugsman/exts.html#sect7.3.3 It is just that Hugs and GHC interpret the language extension differently

Re: [Haskell-cafe] Program using 500MB RAM to process 5MB file

2009-04-03 Thread Ketil Malde
lu...@die.net.au writes: I'm relatively new to haskell so as one does, I am rewriting an existing program in haskell to help learn the language. However, it eats up all my RAM whenever I run the program. This typically happens to me when I parse large files and either am a) using a parser

Re: [Haskell-cafe] Re: Reverting to any old version using Darcs

2009-04-03 Thread Malcolm Wallace
Thus the uploaded sdist was missing one of the source files, and consequently failed to build. I have a pre-release make target where I test everything I can think of. I think it prevents the above, am I right ? Not unless you run 'make check' in a separate pristine copy of the repo.

Re: [Haskell-cafe] Program using 500MB RAM to process 5MB file

2009-04-03 Thread Malcolm Wallace
(2) You are parsing strictly, meaning you have to read the whole input file before anything can be output. This is likely the main performance problem. I'm guessing you are using parsec. Try switching to polyparse if you want to try out lazy parser combinators instead. (module

Re: [Haskell-cafe] Wishful thinking: a text editor that expands function applications into function definitions

2009-04-03 Thread Claus Reinke
One word says more than a thousand pictures: Vim http://www.vim.org/. (well, okay, I'm sure Emacs will do just as well, and some of the more recent IDEs seem to be catching up;-) plus plugins, of course!-) - unfolding definitions: if you really want that, it is in the domain of program

[Haskell-cafe] how to upgrade?

2009-04-03 Thread Johannes Waldmann
Is there a nice way of upgrading ghc: I mean does cabal-upgrade know to install exactly the packages that I had with the previous ghc version? - J.W. signature.asc Description: OpenPGP digital signature ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Program using 500MB RAM to process 5MB file

2009-04-03 Thread lucas
On Fri, Apr 03, 2009 at 10:22:07AM +0200, Ketil Malde wrote: lu...@die.net.au writes: I'm relatively new to haskell so as one does, I am rewriting an existing program in haskell to help learn the language. However, it eats up all my RAM whenever I run the program. This typically

Re: [Haskell-cafe] Re: Reverting to any old version using Darcs

2009-04-03 Thread Peter Verswyvelen
Regarding these files that people forget to checkin. Doesn't every project have a well define directory structure? Shouldn't the prefs/boring file use this fact to encapsulate the rules of file inclusion and exclusion? Isn't it safer to checkin too many files (by accident) than forgetting one?

Re: [Haskell-cafe] List and description of language extensions

2009-04-03 Thread Michael Snoyman
On Fri, Apr 3, 2009 at 7:16 AM, Brandon S. Allbery KF8NH allb...@ece.cmu.edu wrote: On 2009 Apr 3, at 0:00, Michael Snoyman wrote: It's been multiple times now that I've been confounded by something in Haskell which was then solved by a language extension (first FunctionalDependencies, most

Re: [Haskell-cafe] Program using 500MB RAM to process 5MB file

2009-04-03 Thread lucas
On Fri, Apr 03, 2009 at 10:27:08PM +1100, lu...@die.net.au wrote: On Fri, Apr 03, 2009 at 10:22:07AM +0200, Ketil Malde wrote: lu...@die.net.au writes: I'm relatively new to haskell so as one does, I am rewriting an existing program in haskell to help learn the language. However,

Re: [Haskell-cafe] Re: Reverting to any old version using Darcs

2009-04-03 Thread Ketil Malde
Peter Verswyvelen bugf...@gmail.com writes: Regarding these files that people forget to checkin. Doesn't every project have a well define directory structure? Shouldn't the prefs/boring file use this fact to encapsulate the rules of file inclusion and exclusion? Isn't it safer to checkin too

Re: [Haskell-cafe] List and description of language extensions

2009-04-03 Thread Sean Leather
It's been multiple times now that I've been confounded by something in Haskell which was then solved by a language extension (first FunctionalDependencies, most recently ScopedTypeVariables). I'm wondering if there is a list anywhere of all the language extensions supported by GHC and a brief

Re: [Haskell-cafe] Re: Reverting to any old version using Darcs

2009-04-03 Thread Peter Verswyvelen
Okay. I always put these in the boring file. Matter of taste I guess. On Fri, Apr 3, 2009 at 3:18 PM, Ketil Malde ke...@malde.org wrote: Peter Verswyvelen bugf...@gmail.com writes: Regarding these files that people forget to checkin. Doesn't every project have a well define directory

Re: [Haskell-cafe] ANNOUNCE: fad 1.0 -- Forward Automatic Differentiation library

2009-04-03 Thread Edward Kmett
Very nice to have! FYI- there is at least one more quantification-based automatic differentiation implementation in Hackage: http://comonad.com/haskell/monoids/dist/doc/html/monoids/Data-Ring-Module-AutomaticDifferentiation.html My implementation is/was focused upon use with monoids and other

Re: [Haskell-cafe] ANNOUNCE: fad 1.0 -- Forward Automatic Differentiation library

2009-04-03 Thread Edward Kmett
A somewhat tricky concern is that that the extra functionality in question depends on a bunch of primitive definitions that lie below this in the package and the AD engine is used by a layer on top. So moving it out would introduce a circular dependency back into the package or require me to

Re: [Haskell-cafe] Announcement: Beta of Leksah IDE available

2009-04-03 Thread Jeff Heard
Jurgen... I have one more question, or rather request... I'm running under Ubuntu, and I get inconsistencies with packages that I build and install via Leksah not showing up when I configure other packages that depend on them. Then I notice that you're using runhaskell Setup.lhs ... to configure

Re: [Haskell-cafe] Announcement: Beta of Leksah IDE available

2009-04-03 Thread jutaro
Hello Jeff, I'm not so shure if I understand what you mean (and I'm off for vacations in a few minute). So lets find out later. But you may try to set the --user to your config flags in menu: Packages/Edit Flags. Jürgen Jeff Heard wrote: Jurgen... I have one more question, or rather

[Haskell-cafe] Monad transformer, liftIO

2009-04-03 Thread Michael Roth
Hello list, maybe I'm just stupid, I'm trying to do something like this: import Control.Monad import Control.Monad.Trans import Control.Monad.List foobar = do a - [1,2,3] b - [4,5,6] liftIO $ putStrLn $ (show a) ++

Re: [Haskell-cafe] Monad transformer, liftIO

2009-04-03 Thread Andrew Wagner
You haven't really said what happens when you try this, but I would bet that things would be clarified greatly if you put type signatures on your two definitions. On Fri, Apr 3, 2009 at 12:49 PM, Michael Roth mr...@nessie.de wrote: Hello list, maybe I'm just stupid, I'm trying to do something

Re: [Haskell-cafe] Monad transformer, liftIO

2009-04-03 Thread Creighton Hogg
On Fri, Apr 3, 2009 at 11:49 AM, Michael Roth mr...@nessie.de wrote: Hello list, maybe I'm just stupid, I'm trying to do something like this:        import Control.Monad        import Control.Monad.Trans        import Control.Monad.List        foobar = do                a - [1,2,3]    

[Haskell-cafe] ANNOUNCE hgettext-0.1.5 - GetText based internationalization of Haskell programs

2009-04-03 Thread Vasyl Pasternak
Hello, I have extended my previous version of the library to support distribution and installation of PO files. Source tarball - http://hackage.haskell.org/cgi-bin/hackage-scripts/package/hgettext Also I described how to use this feature to distribute haskell packages in my blog entry

[Haskell-cafe] A fair number of updates to Buster since the other day - 0.99.5

2009-04-03 Thread Jeff Heard
http://vis.renci.org/jeff/2009/04/03/major-updates-to-buster/ Added several new widgets and several new behaviours related to file reading and writing, exceptions, and the system/program environment. -- Jeff ___ Haskell-Cafe mailing list

[Haskell-cafe] Possible floating point bug in GHC?

2009-04-03 Thread Peter Verswyvelen
For days I'm fighting against a weird bug. My Haskell code calls into a C function residing in a DLL (I'm on Windows, the DLL is generated using Visual Studio). This C function computes a floating point expression. However, the floating point result is incorrect. I think I found the source of the

Re: [Haskell-cafe] Monad transformer, liftIO

2009-04-03 Thread Michael Roth
Creighton Hogg schrieb: Okay, so I think what you want is [...] Yes. Your solution works. Thank you. But: a - msum . map return $ [1,2,3] Why Do I need this msum . map return thing? The map return part is somewhat clear. But not entirely. Which type of monad is created here? The

Re: [Haskell-cafe] Announcement: Beta of Leksah IDE available

2009-04-03 Thread John Van Enk
What's the chance things like hsc2hs and c2hs will ever be supported? :) I'm aware this is a horribly difficult task (or I think it is). Perhaps it would be possible to find the .hsc and .chs files and run the corresponding processor over them and extract data/types/functions from the

Re: [Haskell-cafe] Possible floating point bug in GHC?

2009-04-03 Thread Malcolm Wallace
Interesting. This could be the cause of a weird floating point bug that has been showing up in the ghc testsuite recently, specifically affecting MacOS/Intel (but not MacOS/ppc). http://darcs.haskell.org/testsuite/tests/ghc-regress/lib/Numeric/num009.hs That test compares the result of

Re: [Haskell-cafe] Problem with prepose.lhs and ghc6.10.1

2009-04-03 Thread Edward Kmett
With the changes to ScopedTypeVariables in GHC you can't pick up the type from the return type of your function directly, so you'll need either a combinator to do the work or to pass the type in question in as an argument to a helper function. normalize :: (Modular s a, Integral a) = a - (M s a)

Re: [Haskell-cafe] Possible floating point bug in GHC?

2009-04-03 Thread Peter Verswyvelen
Well this situation can indeed not occur on PowerPCs since these CPUs just have floating point registers, not some weird dual stack sometimes / registers sometimes architecture. But in my case the bug is consistent, not from time to time. So I'll try to reduce this to a small reproducible test

Re: [Haskell-cafe] Possible floating point bug in GHC?

2009-04-03 Thread Zachary Turner
What floating point model is your DLL compiled with? There are a variety of different options here with regards to optimizations, and I don't know about the specific assembly that each option produces, but I know there are options like Strict, Fast, or Precise, and maybe when you do something

Re: [Haskell-cafe] Possible floating point bug in GHC?

2009-04-03 Thread Peter Verswyvelen
I tried both precise and fast, but that did not help. Compiling to SSE2 fixed it, since that does not use a floating point stack I guess. I'm preparing a repro test case, but it is tricky since removing code tends to change the optimizations and then the bug does not occur. Does anybody know what

Re: [Haskell-cafe] Possible floating point bug in GHC?

2009-04-03 Thread Ian Lynagh
On Fri, Apr 03, 2009 at 10:10:17PM +0200, Peter Verswyvelen wrote: I tried both precise and fast, but that did not help. Compiling to SSE2 fixed it, since that does not use a floating point stack I guess. You didn't say what version of GHC you are using, but it sounds like this might already be

Re: [Haskell-cafe] Possible floating point bug in GHC?

2009-04-03 Thread Peter Verswyvelen
Ouch, what a waste of time on my side :-( This bugfix is not mentioned in the notable bug fixes herehttp://haskell.org/ghc/docs/6.10.2/html/users_guide/release-6-10-2.html Since this is such a severe bug, I would recommend listing it :) Anyway, I have a very small repro test case now. Will

Re: [Haskell-cafe] Possible floating point bug in GHC?

2009-04-03 Thread Peter Verswyvelen
Okay, I can confirm the bug is fixed. It's insane this bug did not cause any more problems. Every call into every C function that uses floating point could have been affected (OpenGL, BLAS, etc) On Fri, Apr 3, 2009 at 10:47 PM, Peter Verswyvelen bugf...@gmail.comwrote: Ouch, what a waste of

[Haskell-cafe] ANN: logfloat 0.12.0.1

2009-04-03 Thread wren ng thornton
-- logfloat 0.12.0.1 This package provides a type for storing numbers in the log-domain, primarily useful for preventing underflow when multiplying many probabilities as in HMMs and other probabilistic

Re: [Haskell-cafe] ANN: logfloat 0.12.0.1

2009-04-03 Thread Robert Greayer
wren ng thornton wrote: Using the FFI complicates the build process for Hugs; details are noted in the INSTALL file. It may also complicate building on Windows (due to ccall vs stdcall), though I'm not familiar with Windows FFI and don't have a machine to test on. On XP with GHC 6.10.1

[Haskell-cafe] Optional EOF in Parsec.

2009-04-03 Thread Kannan Goundan
I'm writing a parser with Parsec. In the input language, elements of a sequence are separated by commas: [1, 2, 3] However, instead of a comma, you can also use an EOL: [1, 2 3] Anywhere else, EOL is considered ignorable whitespace. So it's not as simple as just making EOL a token

[Haskell-cafe] Generating functions for games

2009-04-03 Thread gwern0
So some time ago I saw mentioned the game of Zendo https://secure.wikimedia.org/wikipedia/en/wiki/Zendo_(game) as a good game for programmers to play (and not just by Okasaki). The basic idea of Zendo is that another player is creating arrangements of little colored plastic shapes and you

Re: [Haskell-cafe] Generating functions for games

2009-04-03 Thread andy morris
2009/4/4 gwe...@gmail.com: So some time ago I saw mentioned the game of Zendo https://secure.wikimedia.org/wikipedia/en/wiki/Zendo_(game) as a good game for programmers to play (and not just by Okasaki). The basic idea of Zendo is that another player is creating arrangements of little colored

Re: [Haskell-cafe] Optional EOF in Parsec.

2009-04-03 Thread Antoine Latter
On Fri, Apr 3, 2009 at 8:17 PM, Kannan Goundan kan...@cakoose.com wrote: I'm writing a parser with Parsec.  In the input language, elements of a sequence are separated by commas:   [1, 2, 3] However, instead of a comma, you can also use an EOL:  [1, 2  3] Anywhere else, EOL is