Re: [Haskell-cafe] Using MonadFix to tie the knot with STM

2011-02-17 Thread Simon Marlow
On 16/02/2011 12:46, Sebastiaan Visser wrote: On Feb 12, 2011, at 6:08 PM, Antoine Latter wrote: On Sat, Feb 12, 2011 at 8:47 AM, Sebastiaan Visserhask...@fvisser.nl wrote: Hi all, During a little experiment I discovered there is no MonadFix instance available for the STM monad. Is this

Re: [Haskell-cafe] SMP parallelism gains inferior than expected

2011-03-01 Thread Simon Marlow
On 24/02/2011 13:26, José Pedro Magalhães wrote: (Forwarding to haskell-cafe) Hi, I have a program that computes a matrix of Floats of m rows by n columns. Computing each Float is relatively expensive. Each line is completely independent of the others, so I thought I'd try some simple SMP

Re: [Haskell-cafe] Why don't my OS threads terminate?

2011-03-10 Thread Simon Marlow
On 28/02/11 15:59, Bas van Dijk wrote: On 25 February 2011 19:10, Bas van Dijkv.dijk@gmail.com wrote: On 25 February 2011 18:27, sclvs.clo...@gmail.com wrote: Bas van Dijk-2 wrote: I believe the OS threads are created by my levmar library. This library uses bindings-levmar[4] which

Re: [Haskell-cafe] Why don't my OS threads terminate?

2011-03-10 Thread Simon Marlow
On 10/03/11 18:20, Bas van Dijk wrote: On 10 March 2011 18:11, Simon Marlowmarlo...@gmail.com wrote: On 28/02/11 15:59, Bas van Dijk wrote: On 25 February 2011 19:10, Bas van Dijkv.dijk@gmail.comwrote: On 25 February 2011 18:27, sclvs.clo...@gmail.comwrote: Bas van Dijk-2

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] ANNOUNCE: iterIO-0.1 - iteratee-based IO with pipe operators

2011-05-11 Thread Simon Marlow
On 06/05/2011 16:56, dm-list-haskell-c...@scs.stanford.edu wrote: At Fri, 6 May 2011 10:15:50 +0200, Gregory Collins wrote: Hi David, Re: this comment from catchI: It is not possible to catch asynchronous exceptions, such as lazily evaluated divide-by-zero errors, the throw function, or

Re: [Haskell-cafe] ANNOUNCE: iterIO-0.1 - iteratee-based IO with pipe operators

2011-05-12 Thread Simon Marlow
On 11/05/2011 23:57, dm-list-haskell-c...@scs.stanford.edu wrote: At Wed, 11 May 2011 13:02:21 +0100, Simon Marlow wrote: However, if there's some simpler way to guarantee that= is the point where exceptions are thrown (and might be the case for GHC in practice), then I basically only need

Re: [Haskell-cafe] ANNOUNCE: iterIO-0.1 - iteratee-based IO with pipe operators

2011-05-12 Thread Simon Marlow
On 12/05/2011 16:04, David Mazieres expires 2011-08-10 PDT wrote: At Thu, 12 May 2011 09:57:13 +0100, Simon Marlow wrote: So to answer my own question from earlier, I did a bit of benchmarking, and it seems that on my machine (a 2.4 GHz Intel Xeon 3060, running linux 2.6.38), I get

Re: [Haskell-cafe] ANNOUNCE: iterIO-0.1 - iteratee-based IO with pipe operators

2011-05-13 Thread Simon Marlow
On 12/05/2011 18:24, dm-list-haskell-c...@scs.stanford.edu wrote: At Thu, 12 May 2011 16:45:02 +0100, Simon Marlow wrote: There are no locks here, thanks to the message-passing implementation we use for throwTo between processors. Okay, that sounds good. So then there is no guarantee about

Re: [Haskell-cafe] ANNOUNCE: iterIO-0.1 - iteratee-based IO with pipe operators

2011-05-16 Thread Simon Marlow
On 13/05/2011 21:12, Bernie Pope wrote: On 13 May 2011 19:06, Simon Marlow marlo...@gmail.com mailto:marlo...@gmail.com wrote: As far as memory consistency goes, we claim to provide sequential consistency for IORef and IOArray operations, but not for peeks and pokes. Hi Simon

Re: [Haskell-cafe] ANNOUNCE: iterIO-0.1 - iteratee-based IO with pipe operators

2011-05-16 Thread Simon Marlow
On 16/05/11 20:31, dm-list-haskell-c...@scs.stanford.edu wrote: At Mon, 16 May 2011 10:56:02 +0100, Simon Marlow wrote: Yes, it's not actually documented as far as I know, and we should fix that. But if you think about it, sequential consistency is really the only sensible policy: suppose one

Re: [Haskell-cafe] Haskell memory model (was iterIO-0.1)

2011-05-18 Thread Simon Marlow
On 17/05/2011 00:44, dm-list-haskell-c...@scs.stanford.edu wrote: But I've never heard anyone claim that a prerequisite to Haskell being useful as a parallel programming language is a well-defined memory model. I think there's a couple of reasons for that: - deterministic parallel

Re: [Haskell-cafe] Building Haskell Platform natively for 64bit Windows

2011-05-23 Thread Simon Marlow
On 18/05/2011 19:22, Jason Dagit wrote: On Wed, May 18, 2011 at 2:50 AM, John Sneerjohnsn...@operamail.com wrote: Hello all, I know it is not probably good question to this list, but anyway, could anyone point me to some more detailed how to where is described building of Haskell

Re: [Haskell-cafe] SIGSEGV in yieldCapability ()

2011-05-24 Thread Simon Marlow
On 23/05/2011 09:55, Erik Hesselink wrote: On Sun, May 22, 2011 at 15:03, Johannes Waldmann waldm...@imn.htwk-leipzig.de wrote: I think you should file a bug report with a test case on GHC. I am willing to work on this, but I thought I'd go fishing for some advice first. My program uses:

Re: [Haskell-cafe] Parallel compilation and execution?

2011-05-27 Thread Simon Marlow
On 26/05/2011 14:32, michael rice wrote: Fair question. I copied the parallel version from: http://www.haskell.org/ghc/docs/6.6/html/users_guide/lang-parallel.html http://www.haskell.org/ghc/docs/6.6/html/users_guide/lang-parallel.html That is the User Guide for GHC 6.6, incidentally. If

Re: [Haskell-cafe] How unique is Unique

2011-05-27 Thread Simon Marlow
On 27/05/2011 08:35, Emil Axelsson wrote: Hello! Lacking a proper blog, I've written some notes about Data.Unique here: http://community.haskell.org/~emax/darcs/MoreUnique/ This describes a real problem that makes Data.Unique unsuitable for implementing observable sharing. The document also

Re: [Haskell-cafe] How unique is Unique

2011-05-27 Thread Simon Marlow
On 27/05/2011 13:40, Emil Axelsson wrote: 2011-05-27 13:12, Simon Marlow skrev: On 27/05/2011 08:35, Emil Axelsson wrote: Hello! Lacking a proper blog, I've written some notes about Data.Unique here: http://community.haskell.org/~emax/darcs/MoreUnique/ This describes a real problem

Re: [Haskell-cafe] ANNOUNCE: CamHac: Haskell Hackathon in Cambridge, UK, 12-14 August 2011

2011-06-01 Thread Simon Marlow
On 26/05/2011 15:35, Simon Marlow wrote: CamHac is happening - come and spend a long weekend in Cambridge hacking Haskell code in great surroundings with fantastic company! Full details on the wiki page: http://www.haskell.org/haskellwiki/CamHac When: Friday-Sunday 12-14 August 2011 Where

Re: [Haskell-cafe] How to install GhC on a Mac without registering?

2011-06-06 Thread Simon Marlow
On 06/06/11 15:57, Daniel Peebles wrote: Isn't gcc just used for its assembler and object file creation, these days, now that via-C is deprecated? Or are there other parts of it that are needed? The C compiler is needed to support foreign export and foreign import wrapper, and we also

Re: [Haskell-cafe] [Haskell] ANNOUNCE: Parallel and Concurrent programming in Haskell, a tutorial

2011-06-13 Thread Simon Marlow
On 13/06/2011 15:23, Henning Thielemann wrote: On Thu, 19 May 2011, Simon Marlow wrote: I've put together a tutorial on Parallel and Concurrent programming in Haskell, here: http://community.haskell.org/~simonmar/par-tutorial.pdf The main reason for writing this was that I needed some

Re: [Haskell-cafe] OSX, ghci, dylib, what is the correct way?

2011-06-14 Thread Simon Marlow
On 12/06/2011 20:17, Jason Dagit wrote: On Sun, Jun 12, 2011 at 11:45 AM, Brandon Allberyallber...@gmail.com wrote: On Sun, Jun 12, 2011 at 14:31, Jason Dagitdag...@gmail.com wrote: If I build the C library as a .a, then ghci comlains that it cannot open the .dylib. My first question is:

Re: [Haskell-cafe] OSX, ghci, dylib, what is the correct way?

2011-06-15 Thread Simon Marlow
On 14/06/2011 17:57, Jason Dagit wrote: On Tue, Jun 14, 2011 at 4:26 AM, Simon Marlowmarlo...@gmail.com wrote: On 12/06/2011 20:17, Jason Dagit wrote: On Sun, Jun 12, 2011 at 11:45 AM, Brandon Allberyallber...@gmail.com wrote: On Sun, Jun 12, 2011 at 14:31, Jason Dagitdag...@gmail.com

Re: [Haskell-cafe] OSX, ghci, dylib, what is the correct way?

2011-06-15 Thread Simon Marlow
On 15/06/2011 15:41, Jason Dagit wrote: On Wed, Jun 15, 2011 at 2:16 AM, Simon Marlowmarlo...@gmail.com wrote: On 14/06/2011 17:57, Jason Dagit wrote: On Tue, Jun 14, 2011 at 4:26 AM, Simon Marlowmarlo...@gmail.comwrote: On 12/06/2011 20:17, Jason Dagit wrote: On Sun, Jun 12, 2011 at

Re: [Haskell-cafe] Weird multi-threading runtime behaviour of single-threaded program with GHC-7.0.3

2011-06-17 Thread Simon Marlow
I found this email thanks to the Parallel Haskell Digest, thanks Eric Nick! On 01/04/2011 11:37, Herbert Valerio Riedel wrote: I'm experiencing an unexpected behaviour with GHC-7.0.3/x86_64's multithreading runtime when running some more demanding single-thread computations. I've isolated

Re: [Haskell-cafe] GHC multicore Haskell multicore synchronization (was Re: Weird multi-threading runtime behaviour of single-threaded program with GHC-7.0.3)

2011-06-24 Thread Simon Marlow
On 21/06/2011 10:02, Herbert Valerio Riedel wrote: Hello Simon, On Fri, 2011-06-17 at 09:05 +0100, Simon Marlow wrote: What's happening there? The actual processing work seems to be done in a single HEC... but what are the remaining 11 HECs doing exactly? Am I doing something wrong

Re: [Haskell-cafe] What is a simple pattern binding?

2011-06-28 Thread Simon Marlow
On 26/06/2011 09:31, Paterson, Ross wrote: If this is the case, then multiple sentences in the 2010 report don't make sense, though the way in which they don't make sense sort of depends on what simple pattern binding means. Indeed, the Report has two problems: Sections 4.4.3.2 and 4.5.5 have

Re: [Haskell-cafe] How to ensure code executes in the context of a specific OS thread?

2011-07-05 Thread Simon Marlow
On 04/07/11 06:02, Jason Dagit wrote: Hello, I'm trying to get some GUI code working on OSX and numerous forums around the internet keep reiterating that on OSX to correctly handle GUI events you need to use the original thread allocated to your process to check for events and to call the Cocoa

Re: [Haskell-cafe] How to ensure code executes in the context of a specific OS thread?

2011-07-06 Thread Simon Marlow
On 05/07/2011 20:33, Ian Lynagh wrote: On Tue, Jul 05, 2011 at 08:11:21PM +0100, Simon Marlow wrote: In GHCi it's a different matter, because the main thread is running GHCi itself, and all the expressions/statements typed at the prompt are run in forkIO'd threads (a new one for each statement

Re: [Haskell-cafe] How to ensure code executes in the context of a specific OS thread?

2011-07-06 Thread Simon Marlow
On 05/07/2011 20:38, Jason Dagit wrote: On Tue, Jul 5, 2011 at 12:11 PM, Simon Marlowmarlo...@gmail.com wrote: On 04/07/11 06:02, Jason Dagit wrote: Hello, I'm trying to get some GUI code working on OSX and numerous forums around the internet keep reiterating that on OSX to correctly handle

Re: [Haskell-cafe] How to ensure code executes in the context of a specific OS thread?

2011-07-06 Thread Simon Marlow
On 06/07/2011 07:37, Jason Dagit wrote: On Jul 5, 2011 1:04 PM, Jason Dagit dag...@gmail.com mailto:dag...@gmail.com wrote: On Tue, Jul 5, 2011 at 12:33 PM, Ian Lynagh ig...@earth.li mailto:ig...@earth.li wrote: On Tue, Jul 05, 2011 at 08:11:21PM +0100, Simon Marlow wrote: In GHCi

Re: [Haskell-cafe] How to ensure code executes in the context of a specific OS thread?

2011-07-06 Thread Simon Marlow
...@earth.li mailto:ig...@earth.li wrote: On Tue, Jul 05, 2011 at 08:11:21PM +0100, Simon Marlow wrote: In GHCi it's a different matter, because the main thread is running GHCi itself, and all the expressions/statements typed at the prompt are run in forkIO'd threads (a new

Re: [Haskell-cafe] How to ensure code executes in the context of a specific OS thread?

2011-07-06 Thread Simon Marlow
, Jason Dagitdag...@gmail.com mailto:dag...@gmail.comwrote: On Tue, Jul 5, 2011 at 12:33 PM, Ian Lynaghig...@earth.li mailto:ig...@earth.liwrote: On Tue, Jul 05, 2011 at 08:11:21PM +0100, Simon Marlow wrote: In GHCi it's a different matter, because the main

Re: [Haskell-cafe] How to ensure code executes in the context of a specific OS thread?

2011-07-06 Thread Simon Marlow
On 06/07/11 17:14, David Barbour wrote: On Wed, Jul 6, 2011 at 8:09 AM, Simon Marlow marlo...@gmail.com mailto:marlo...@gmail.com wrote: On 06/07/2011 15:42, Jason Dagit wrote: How can I make sure my library works from GHC (with arbitrary user threads) and from GHCI

Re: [Haskell-cafe] How to ensure code executes in the context of a specific OS thread?

2011-07-06 Thread Simon Marlow
: On 06/07/2011 07:37, Jason Dagit wrote: On Jul 5, 2011 1:04 PM, Jason Dagitdag...@gmail.com mailto:dag...@gmail.comwrote: On Tue, Jul 5, 2011 at 12:33 PM, Ian Lynaghig...@earth.li mailto:ig...@earth.liwrote: On Tue, Jul 05, 2011 at 08:11:21PM +0100, Simon Marlow wrote

Re: [Haskell-cafe] How to ensure code executes in the context of a specific OS thread?

2011-07-07 Thread Simon Marlow
On 06/07/2011 21:11, David Barbour wrote: On Wed, Jul 6, 2011 at 12:52 PM, Simon Marlow marlo...@gmail.com mailto:marlo...@gmail.com wrote: I think the real issue is that GHC has a different behavior than GHCi, and I think this causes a lot of difficulties for people

Re: [Haskell-cafe] How to ensure code executes in the context of a specific OS thread?

2011-07-07 Thread Simon Marlow
On 06/07/2011 21:19, Jason Dagit wrote: On Wed, Jul 6, 2011 at 12:52 PM, Simon Marlowmarlo...@gmail.com wrote: On 06/07/11 17:14, David Barbour wrote: On Wed, Jul 6, 2011 at 8:09 AM, Simon Marlowmarlo...@gmail.com mailto:marlo...@gmail.com wrote: On 06/07/2011 15:42, Jason Dagit

Re: [Haskell-cafe] How to ensure code executes in the context of a specific OS thread?

2011-07-12 Thread Simon Marlow
On 07/07/2011 08:41, Simon Marlow wrote: On 06/07/2011 21:19, Jason Dagit wrote: On Wed, Jul 6, 2011 at 12:52 PM, Simon Marlowmarlo...@gmail.com wrote: On 06/07/11 17:14, David Barbour wrote: On Wed, Jul 6, 2011 at 8:09 AM, Simon Marlowmarlo...@gmail.com mailto:marlo...@gmail.com wrote

Re: [Haskell-cafe] Unbelievable parallel speedup

2011-08-01 Thread Simon Marlow
On 03/06/2011 13:10, John D. Ramsdell wrote: I've enjoyed reading Simon Marlow's new tutorial on parallel and concurrent programming, and learned some surprisingly basic tricks. I didn't know about the '-s' runtime option for printing statistics. I decided to compute speedups for a program I

[Haskell-cafe] One place available at CamHac

2011-08-04 Thread Simon Marlow
Hi Folks, There is a place available at CamHac next Friday-Sunday (12-14 August). First come first served! For instructions on how to register, see the wiki page: http://www.haskell.org/haskellwiki/CamHac#Registration Also a reminder, if you have already registered but won't be able to

Re: [Haskell-cafe] alex 3.0 broken with Data.ByteString.Lazy - w2c conversion missing (fix attached)

2011-08-10 Thread Simon Marlow
On 09/08/2011 22:24, Eugene Kirpichov wrote: Hi Simon, I found a bug in alex-3.0 and I'm attaching a fixed source file - templates/wrappers.hs (modified against alex-3.0 from cabal unpack). Explanation: I was installing bytestring-lexing 0.2.1 and it failed to install with alex 3.0, which was

Re: [Haskell-cafe] SMP parallelism increasing GC time dramatically

2011-10-10 Thread Simon Marlow
On 08/10/2011 01:47, austin seipp wrote: It's GHC, and partly the OS scheduler in some sense. Oversaturating, i.e. using an -N option your number of logical cores (including hyperthreads) will slow down your program typically. This isn't uncommon, and is well known - GHC's lightweight threads

Re: [Haskell-cafe] SMP parallelism increasing GC time dramatically

2011-10-10 Thread Simon Marlow
On 10/10/2011 15:44, Tom Thorne wrote: thanks! I just tried setting -A32M and this seems to fix the parallel GC problems, I now get a speedup with parallel GC on and performance is the same as passing -qg. I had tried -H before and it only made things worse, but -A seems to do the trick. I'm

Re: [Haskell-cafe] How to make asynchronous I/O composable and safe?

2012-01-17 Thread Simon Marlow
This is an interesting problem, I think I might incorporate parts of it into the next revision of my Concurrent Haskell tutorial. It sounds like you're getting overwhelmed by several different problems, and dealing with them separately would probably help. e.g. you want some infrastructure

Re: [Haskell-cafe] [Haskell] ANNOUNCE: system-filepath 0.4.5 and system-fileio 0.3.4

2012-02-07 Thread Simon Marlow
On 06/02/2012 20:32, Ian Lynagh wrote: On Sun, Feb 05, 2012 at 07:17:32PM -0800, John Millikin wrote: That was my understanding also, then QuickCheck found a counter-example. It turns out that there are cases where a valid path cannot be roundtripped in the GHC 7.2 encoding. This is fixed in

Re: [Haskell-cafe] [Haskell] ANNOUNCE: system-filepath 0.4.5 and system-fileio 0.3.4

2012-02-08 Thread Simon Marlow
On 08/02/2012 02:26, John Meacham wrote: On Tue, Feb 7, 2012 at 4:24 AM, Simon Marlowmarlo...@gmail.com wrote: Separately the unix package added support for undecoded FilePaths (RawFilePath), but unfortunately at the same time we started using a new extension in GHC 7.4.1 (CApiFFI), which we

Re: [Haskell-cafe] [haskell-cafe] Question about 64bit target on Windows platform

2012-03-05 Thread Simon Marlow
There is a possibility that the IHG might fund this during the next cycle, which would mean that it would be in 7.6.1. Cheers, Simon On 05/03/2012 07:35, Jason Dagit wrote: I don't know if timeline has been established, but my understanding is that there is a need for this and that

Re: [Haskell-cafe] Regarding Haskell FFI

2012-03-28 Thread Simon Marlow
On 27/03/2012 08:56, rajendra prasad wrote: Hi, I am trying to load the DLL(Wrapper.dll) in my code(Main.hs). When I am placing the dll in local directory, I am able to load it through following command: ghci Main.hs -L. -lWrapper But, I am not able to load it if I am putting it in some

Re: [Haskell-cafe] Regarding Haskell FFI

2012-03-28 Thread Simon Marlow
, Mar 28, 2012 at 2:09 PM, Simon Marlow marlo...@gmail.com mailto:marlo...@gmail.com wrote: On 27/03/2012 08:56, rajendra prasad wrote: Hi, I am trying to load the DLL(Wrapper.dll) in my code(Main.hs). When I am placing the dll in local directory, I am able to load

Re: [Haskell-cafe] Printing call site for partial functions

2012-04-26 Thread Simon Marlow
On 25/04/2012 17:28, Ozgur Akgun wrote: Hi, On 25 April 2012 16:36, Michael Snoyman mich...@snoyman.com mailto:mich...@snoyman.com wrote: Prelude.head: empty list Recent versions of GHC actually generate a very helpful stack trace, if the program is compiled with profiling

Re: [Haskell-cafe] Can Haskell outperform C++?

2012-05-08 Thread Simon Marlow
On 06/05/2012 07:40, Janek S. wrote: a couple of times I've encountered a statement that Haskell programs can have performance comparable to programs in C/C++. I've even read that thanks to functional nature of Haskell, compiler can reason and make guarantess about the code and use that

Re: [Haskell-cafe] Platform Versioning Policy: upper bounds are not our friends

2012-08-20 Thread Simon Marlow
On 15/08/2012 21:44, Johan Tibell wrote: On Wed, Aug 15, 2012 at 1:02 PM, Brandon Allbery allber...@gmail.com wrote: So we are certain that the rounds of failures that led to their being *added* will never happen again? It would be useful to have some examples of these. I'm not sure we had

Re: [Haskell-cafe] Safe Haskell and instance coherence

2012-10-11 Thread Simon Marlow
On 08/10/2012 20:11, Mikhail Glushenkov wrote: Hello, It's a relatively well-known fact that GHC allows for multiple type class instances for the same type to coexist in a single program. This can be used, for example, to construct values of the type Data.Set.Set that violate the data structure

Re: [Haskell-cafe] GHCi + FFI + global C variables

2012-12-11 Thread Simon Marlow
On 10/12/12 00:11, Nils wrote: I'm currently working with a C library that needs to use/modify global C variables, for example: igraph_bool_t igraphhaskell_initialized = 0; int igraphhaskell_initialize() { if (igraphhaskell_initialized != 0) { printf(C: Not

Re: [Haskell-cafe] File I/O benchmark help (conduit, io-streams and Handle)

2013-03-08 Thread Simon Marlow
keep an eye on the thread. Cheers, Simon On 08/03/13 08:36, Gregory Collins wrote: +Simon Marlow A couple of comments: * maybe we shouldn't back the file by a Handle. io-streams does this by default out of the box; I had a posix file interface for unix (guarded by CPP

Re: [Haskell-cafe] Poll plea: State of GUI graphics libraries in Haskell

2013-10-02 Thread Simon Marlow
Great to hear that we're getting some payoff for the switch to dynamic linking in GHCi. Thanks for testing! Cheers Simon On 02/10/2013 07:23, Paul Liu wrote: Thanks. I've just built GHC HEAD on Mac OS X Lion, and tested by installing libraries with --enable-shared and loading a GLFW program

<    4   5   6   7   8   9