Re: [Haskell-cafe] writing to a fifo when the reader stops reading

2011-03-14 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 3/13/11 03:16 , bri...@aracnet.com wrote: ghc: fdWriteBuf: resource vanished (Broken pipe) which make sense, sort of. I write a value, let's say 10, and the reader reads it. It's the last value so it closes the fifo. Now there's nothing

Re: [Haskell-cafe] [Haskell] Linker flags for foreign export.

2011-03-14 Thread Max Bolingbroke
On 13 March 2011 22:02, Jason Dusek jason.du...@gmail.com wrote:  Is there any case in which the empty string would be unsafe? AFAIK this stuff is only used to setup the +RTS options and some of the stuff in System.Environment. I think that the contents of the program name will only cause

Re: [Haskell-cafe] Data.ByteString.Lazy.ByteString vs Data.ByteString.Lazy.Internal.ByteString

2011-03-14 Thread Christian Maeder
Am 14.03.2011 06:26, schrieb C K Kashyap: Looks like a job for Data.Binary. I'd like to use it with just the libraries that are part of the platform I forgot to mention, Data.Binary does not seem to be in the platform. Right, it is not in the platform, but I would recommend

[Haskell-cafe] ICFP 2011 Deadline Extension

2011-03-14 Thread Wouter Swierstra
= ICFP 2011: International Conference on Functional Programming http://www.icfpconference.org/icfp2011 = On behalf of the Program Committee of

Re: [Haskell-cafe] ANN: unordered-containers - a new, faster hashing-based containers library

2011-03-14 Thread Malcolm Wallace
On 22 Feb 2011, at 22:21, Bryan O'Sullivan wrote: for some code that's (b) faster than anything else currently available I look forward to seeing some benchmarks against libraries other than containers, such as AVL trees, bytestring-trie, hamtmap, list-trie, etc. Good comparisons of

Re: [Haskell-cafe] Data.ByteString.Lazy.ByteString vs Data.ByteString.Lazy.Internal.ByteString

2011-03-14 Thread Antoine Latter
The ghc-binary package is used internal to GHC, and isn't gauranteed to be present from one version to the next, nor do I expect the GHC team to promise it will have a stable interface. You'd really be better of instaling the package binary, or something similar. On Mar 14, 2011 5:34 AM,

Re: [Haskell-cafe] Some quick experiments with GHC 7.0.2 in Intel's Manycore Testing Lab (32 cores)

2011-03-14 Thread Simon Marlow
Hi José, On 11/03/2011 14:16, José Pedro Magalhães wrote: I've played a bit with Intel's Manycore Testing Lab (http://software.intel.com/en-us/articles/intel-many-core-testing-lab/). Part of the agreement to use it requires that you report back your experiences, which I did in an Intel forum

Re: [Haskell-cafe] Data.ByteString.Lazy.ByteString vs Data.ByteString.Lazy.Internal.ByteString

2011-03-14 Thread Simon Marlow
On 14/03/2011 10:33, Christian Maeder wrote: Am 14.03.2011 06:26, schrieb C K Kashyap: Looks like a job for Data.Binary. I'd like to use it with just the libraries that are part of the platform I forgot to mention, Data.Binary does not seem to be in the platform. Right, it

Re: [Haskell-cafe] ANN: unordered-containers - a new, faster hashing-based containers library

2011-03-14 Thread Johan Tibell
On Mar 14, 2011 6:23 PM, Malcolm Wallace malcolm.wall...@me.com wrote: On 22 Feb 2011, at 22:21, Bryan O'Sullivan wrote: for some code that's (b) faster than anything else currently available I look forward to seeing some benchmarks against libraries other than containers, such as AVL

[Haskell-cafe] Uninstall Haskell Platform on Mac OS X

2011-03-14 Thread Jesse Schalken
Simple question which an hour of googling and a question on #haskell couldn't satisfy. :( I have installed the Haskell Platform 2011.2.0.0 on Mac OS X 10.6.6. Now how do I *uninstall* it? Thanks, Jesse ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Uninstall Haskell Platform on Mac OS X

2011-03-14 Thread Daniël de Kok
On Monday, March 14, 2011 at 3:22 PM, Jesse Schalken wrote: Simple question which an hour of googling and a question on #haskell couldn't satisfy. :( I have installed the Haskell Platform 2011.2.0.0 on Mac OS X 10.6.6. Now how do I uninstall it? sudo

Re: [Haskell-cafe] writing to a fifo when the reader stops reading

2011-03-14 Thread briand
On Mon, 14 Mar 2011 02:33:13 -0400 Brandon S Allbery KF8NH allber...@gmail.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 3/13/11 03:16 , bri...@aracnet.com wrote: ghc: fdWriteBuf: resource vanished (Broken pipe) which make sense, sort of. I write a value, let's say 10,

Re: [Haskell-cafe] Uninstall Haskell Platform on Mac OS X

2011-03-14 Thread Edward Amsden
According to the installer it puts symlinks for executables (a list of which is on the HP website) in /usr/bin, so you'll want to delete those. As far as I recall (I think the installer mentions something about this): - GHC is installed in /Library/Frameworks/GHC.framework - HP is installed in

Re: [Haskell-cafe] Uninstall Haskell Platform on Mac OS X

2011-03-14 Thread Jesse Schalken
This leaves the symlinks alex, cabal, cabal.real, cabal.wrap and happy in /usr/bin, and also leaves /Library/Frameworks/HaskellPlatform.framework, and while I can remove those myself how can I be certain there isn't something else left behind? On Tue, Mar 15, 2011 at 1:31 AM, Anders Persson

Re: [Haskell-cafe] Uninstall Haskell Platform on Mac OS X

2011-03-14 Thread Jesse Schalken
I have done this and it has only removed GHC, not the rest of the Haskell Platform. On Tue, Mar 15, 2011 at 1:40 AM, Daniël de Kok m...@danieldk.eu wrote: On Monday, March 14, 2011 at 3:22 PM, Jesse Schalken wrote: Simple question which an hour of googling and a question on #haskell couldn't

Re: [Haskell-cafe] writing to a fifo when the reader stops reading

2011-03-14 Thread Antoine Latter
On Mon, Mar 14, 2011 at 9:44 AM, bri...@aracnet.com wrote: On Mon, 14 Mar 2011 02:33:13 -0400 Brandon S Allbery KF8NH allber...@gmail.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 3/13/11 03:16 , bri...@aracnet.com wrote: ghc: fdWriteBuf: resource vanished (Broken pipe)

Re: [Haskell-cafe] Uninstall Haskell Platform on Mac OS X

2011-03-14 Thread Anders Persson
This is a procedure suggested by Mark Lentczner on the haskell-platform mailing list. It clears out _any_ and _all_ versions of haskell platform, so use with care. /Anders Begin forwarded message: These installers don't attempt to uninstall prior versions, and depending on how your prior

[Haskell-cafe] Question on a common pattern

2011-03-14 Thread tsuraan
In my code, I'm doing this quite a lot: x - someIO case x of Opt1 - ... Having a line for extracting the value from the IO (or STM) and then acting on the value seems unnatural. Is there a more concise way to do this? This code: case someIO of Opt1 - ... Doesn't work, but is there

Re: [Haskell-cafe] Question on a common pattern

2011-03-14 Thread Ozgur Akgun
See this thread: http://www.haskell.org/pipermail/haskell-cafe/2010-October/084291.html On 14 March 2011 15:48, tsuraan tsur...@gmail.com wrote: In my code, I'm doing this quite a lot: x - someIO case x of Opt1 - ... Having a line for extracting the value from the IO (or STM) and then

Re: [Haskell-cafe] Question on a common pattern

2011-03-14 Thread Chris Dornan
Your first line is entirely natural. The alternative doesn't look right at all. I am not aware of a more concise alternative to this general construction (assuming there are multiple case alternative, and that the work can't be done with library functions). Chris From:

Re: [Haskell-cafe] Question on a common pattern

2011-03-14 Thread Yves Parès
If you have only one alternative, then you can simply do: Opt1 - someIO E.g., if you are _sure_ that foo returns always a 'Just' within a monad you can perfectly do : Just x - foo 2011/3/14 tsuraan tsur...@gmail.com In my code, I'm doing this quite a lot: x - someIO case x of Opt1 -

Re: [Haskell-cafe] Question on a common pattern

2011-03-14 Thread tsuraan
See this thread: http://www.haskell.org/pipermail/haskell-cafe/2010-October/084291.html Which links to http://hackage.haskell.org/trac/ghc/ticket/4359 . Looks like there's already been quite a bit of discussion on this already :) Thanks for the link.

Re: [Haskell-cafe] Question on a common pattern

2011-03-14 Thread tsuraan
If you have only one alternative, then you can simply do: Opt1 - someIO E.g., if you are _sure_ that foo returns always a 'Just' within a monad you can perfectly do : Just x - foo That's interesting. I had no idea that one could do that. I think what I'm looking for is something along

[Haskell-cafe] Wanted: composoable parsers from haskell-src-exts

2011-03-14 Thread J . Waldmann
Hi. I want to use parsers from haskell-src-exts as sub-parsers, which does not seem to work since they insist on consuming the input completely. I would need them to parse a maximal prefix, and return the (unconsumed) rest of input as well (cf.

Re: [Haskell-cafe] Wanted: composoable parsers from haskell-src-exts

2011-03-14 Thread Stephen Tetley
I haven't tried myself - but from the docs, partial parsers seem to depend on finding an error token so they seem to be partial as in handles failure. If you want to parse specific fragments you probably want to generate multiple parsers from a single grammar see section 2.7.

[Haskell-cafe] ANN: craftwerk-0.1, craftwerk-cairo-0.1, craftwerk-gtk-0.1

2011-03-14 Thread Malte Harder
Dear all, I just released the first version of the Craftwerk graphics library for 2d vector graphics. Craftwerk is intended to act as an abstract interface to different backend drivers. The library itself has a TikZ (http://sourceforge.net/projects/pgf) driver builtin to output vector graphics

Re: [Haskell-cafe] [Haskell] ANN: craftwerk-0.1, craftwerk-cairo-0.1, craftwerk-gtk-0.1

2011-03-14 Thread Vo Minh Thu
2011/3/14 Malte Harder malte.har...@googlemail.com: Dear all, I just released the first version of the Craftwerk graphics library for 2d vector graphics. Craftwerk is intended to act as an abstract interface to different backend drivers. The library itself has a TikZ

Re: [Haskell-cafe] [Haskell] ANN: craftwerk-0.1, craftwerk-cairo-0.1, craftwerk-gtk-0.1

2011-03-14 Thread Malte Harder
Hi Thu, Could you please as suggest one comment include some screenshots (even better with some code next to them) on the homepage? indeed, that's a good idea. I just put two examples up. There will be some more examples coming soon. Best, Malte

[Haskell-cafe] simple stm question

2011-03-14 Thread qld3303
I recently upgraded to ghc 7.0.2 from 6.12.3, along with the Haskell platform, and noticed that the following code no longer works as expected: waitFor tvar = atomically $ do count - readTVar tvar check (count == 0) worker tchan tvar = loop where loop = do putStrLn checking

Re: [Haskell-cafe] simple stm question

2011-03-14 Thread Brandon Moore
I recently upgraded to ghc 7.0.2 from 6.12.3, along with the Haskell platform, and noticed that the following code no longer works as expected: waitFor tvar = atomically $ do count - readTVar tvar check (count == 0) worker tchan tvar = loop where loop = do putStrLn

Re: [Haskell-cafe] simple stm question

2011-03-14 Thread Felipe Almeida Lessa
On Mon, Mar 14, 2011 at 11:56 PM, qld3303 qld3...@gmail.com wrote: This will work if I use atomically, but otherwise it does nothing, tchan remains empty afterwards. I'm not clear how this should behave. You really should use atomically on that line. I don't see how it worked before. --

Re: [Haskell-cafe] simple stm question

2011-03-14 Thread qld3303
I must've been mistaken. Thanks On Mon, Mar 14, 2011 at 7:05 PM, Felipe Almeida Lessa felipe.le...@gmail.com wrote: On Mon, Mar 14, 2011 at 11:56 PM, qld3303 qld3...@gmail.com wrote: This will work if I use atomically, but otherwise it does nothing, tchan remains empty afterwards. I'm