Re: Does GHC still support x87 floating point math?

2012-12-06 Thread Simon Marlow
On 06/12/12 11:01, Herbert Valerio Riedel wrote: Ben Lippmeier b...@ouroborus.net writes: On 06/12/2012, at 12:12 , Johan Tibell wrote: I'm currently trying to implement word2Double#. Other such primops support both x87 and sse floating point math. Do we still support x87 fp math? Which

Re: Emitting constants to the .data section from the NatM monad

2012-12-06 Thread Simon Marlow
On 06/12/12 00:29, Johan Tibell wrote: Hi! I'm trying to implement word2Double# and I've looked at how e.g. LLVM does it. LLVM outputs quite clever branchless code that uses two predefined constants in the .data section. Is it possible to add contents to the current .data section from a

Re: Dynamic libraries by default and GHC 7.8

2012-12-06 Thread Simon Marlow
On 06/12/12 21:35, Brandon Allbery wrote: On Thu, Dec 6, 2012 at 4:04 PM, Simon Marlow marlo...@gmail.com mailto:marlo...@gmail.com wrote: On 05/12/12 15:17, Brandon Allbery wrote: Probably none; on most platforms you're actually generating different code (dynamic

Re: Patch to enable GHC runtime system with thr_debug_p options...

2012-12-04 Thread Simon Marlow
On 03/12/12 20:11, Joachim Breitner wrote: Dear Michał, Am Sonntag, den 02.12.2012, 22:44 +0100 schrieb Michał J. Gajda: On 12/02/2012 09:20 PM, Joachim Breitner wrote: I noticed that Ubuntu, as well as Debian and original packages come without some variants of threaded debugging binaries. A

Re: Is the GHC release process documented?

2012-11-30 Thread Simon Marlow
On 30/11/12 03:54, Johan Tibell wrote: While writing a new nofib benchmark today I found myself wondering whether all the nofib benchmarks are run just before each release, which the drove me to go look for a document describing the release process. A quick search didn't turn up anything, so I

Re: Dynamic libraries by default and GHC 7.8

2012-11-30 Thread Simon Marlow
On 27/11/12 14:52, Ian Lynagh wrote: GHC HEAD now has support for using dynamic libraries by default (and in particular, using dynamic libraries and the system linker in GHCi) for a number of platforms. This has some advantages and some disadvantages, so we need to make a decision about what we

Re: Dynamic libraries by default and GHC 7.8

2012-11-29 Thread Simon Marlow
On 28/11/12 23:15, Johan Tibell wrote: What does gcc do? Does it link statically or dynamically by default? Does it depend on if it can find a dynamic version of libraries or not? If it finds a dynamic library first, it links against that. Unlike GHC, with gcc you do not have to choose at

Re: Dynamic libraries by default and GHC 7.8

2012-11-28 Thread Simon Marlow
On 27/11/12 23:28, Joachim Breitner wrote: Hi, Am Dienstag, den 27.11.2012, 14:52 + schrieb Ian Lynagh: The various issues are described in a wiki page here: http://hackage.haskell.org/trac/ghc/wiki/DynamicByDefault If you have a few minutes to read it then we'd be glad to hear your

Re: Dynamic libraries by default and GHC 7.8

2012-11-28 Thread Simon Marlow
On 27/11/12 14:52, Ian Lynagh wrote: Hi all, GHC HEAD now has support for using dynamic libraries by default (and in particular, using dynamic libraries and the system linker in GHCi) for a number of platforms. This has some advantages and some disadvantages, so we need to make a decision

Re: Dynamic libraries by default and GHC 7.8

2012-11-28 Thread Simon Marlow
On 28/11/12 12:48, Ian Lynagh wrote: On Wed, Nov 28, 2012 at 09:20:57AM +, Simon Marlow wrote: My personal opinion is that we should switch to dynamic-by-default on all x86_64 platforms, and OS X x86. The performance penalty for x86/Linux is too high (30%), FWIW, if they're able to move

Leaving Microsoft

2012-11-22 Thread Simon Marlow
Today I'm announcing that I'm leaving Microsoft Research. My plan is to take a break to finish the book on Parallel and Concurrent Haskell for O'Reilly, before taking up a position at Facebook in the UK in March 2013. This is undoubtedly a big change, both for me and for the Haskell community.

[Haskell] Leaving Microsoft

2012-11-22 Thread Simon Marlow
Today I'm announcing that I'm leaving Microsoft Research. My plan is to take a break to finish the book on Parallel and Concurrent Haskell for O'Reilly, before taking up a position at Facebook in the UK in March 2013. This is undoubtedly a big change, both for me and for the Haskell community.

Re: Undocumented(?) magic this package-id in PackageImports

2012-11-13 Thread Simon Marlow
Please submit a bug (ideally with a patch!). It should be documented. However, note that we don't really like people to use PackageImports. It's not a carefully designed feature, we only hacked it in so we could build the base-3 wrapper package a while ago. It could well change in the future.

Re: Using DeepSeq for exception ordering

2012-11-13 Thread Simon Marlow
On 12/11/2012 16:56, Simon Hengel wrote: Did you try -fpedantic-bottoms? I just tried. The exception (or seq?) is still optimized away. Here is what I tried: -- file Foo.hs import Control.Exception import Control.DeepSeq main = evaluate (('a' : undefined) `deepseq`

Re: Using DeepSeq for exception ordering

2012-11-12 Thread Simon Marlow
Did you try -fpedantic-bottoms? Cheers, Simon On 08/11/2012 19:16, Edward Z. Yang wrote: It looks like the optimizer is getting confused when the value being evaluated is an IO action (nota bene: 'evaluate m' where m :: IO a is pretty odd, as far as things go). File a bug? Cheers,

Re: Building GHC for BB10 (QNX)

2012-11-12 Thread Simon Marlow
On 10/11/2012 19:53, Stephen Paul Weber wrote: Hey all, I'm interesting in trying to get an initial port for BlackBerry 10 (QNX) going. It's a POSIXish environment with primary interest in two architechtures: x86 (for simulator) and ARMv7 (for devices). I'm wondering if

Re: Status of stack trace work

2012-11-08 Thread Simon Marlow
On 08/11/12 05:43, Johan Tibell wrote: I can't wait until we have some for of stack traces in GHC. What's the current status? Did the semantics you presented at HIW12 work out? Even though the full bells and whistles of full stack traces is something I'd really like to see, even their more

Re: Why are arrays retainers?

2012-10-30 Thread Simon Marlow
On 24/10/2012 08:25, Akio Takano wrote: Recently I was surprised to see that GHC's retainer profiler treated boxed arrays as retainer objects. Why are they considered retainers? I think the intention is to treat all mutable objects as retainers, where thunks are a kind of mutable object.

Re: GHC compiling shared library linking problem

2012-10-22 Thread Simon Marlow
On 17/10/2012 08:43, Richard Zetterberg wrote: I have two parts of my application; one which builds a cli application which uses my module and one which builds a shared library which uses the same module. I have no problems compiling my cli application. And if I try to compile the shared library

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: Installing binary tarball fails on Linux

2012-10-09 Thread Simon Marlow
On 08/10/2012 12:57, Joachim Breitner wrote: Hi, Am Montag, den 08.10.2012, 12:08 +0100 schrieb Simon Marlow: On 01/10/2012 13:00, Ganesh Sittampalam wrote: On 01/10/2012 12:05, Simon Marlow wrote: This probably means that you have packages installed in your ~/.cabal from a 32-bit GHC

Re: copyArray# bug

2012-10-09 Thread Simon Marlow
On 09/10/2012 15:58, Johan Tibell wrote: On Tue, Oct 9, 2012 at 1:26 AM, Roman Leshchinskiy r...@cse.unsw.edu.au wrote: Johan Tibell wrote: Hi, I did quite a bit of work to make sure copyArray# and friends get unrolled if the number of elements to copy is a constant. Does this still work with

Re: Installing binary tarball fails on Linux

2012-10-08 Thread Simon Marlow
On 01/10/2012 13:00, Ganesh Sittampalam wrote: On 01/10/2012 12:05, Simon Marlow wrote: This probably means that you have packages installed in your ~/.cabal from a 32-bit GHC and you're using a 64-bit one, or vice-versa. To avoid this problem you can configure cabal to put built packages

Re: copyArray# bug

2012-10-08 Thread Simon Marlow
On 06/10/2012 22:41, Roman Leshchinskiy wrote: I've been chasing a segfault in the dev version of vector and I think I finally traced it to a bug in the implementation of copyArray# and copyMutableArray#. More specifically, I think emitSetCards in StgCmmPrim.hs (and CgPrimOp.hs) will sometimes

Re: Comments on current TypeHoles implementation

2012-10-05 Thread Simon Marlow
On 04/10/2012 10:40, Simon Peyton-Jones wrote: I have a proposal. Someone has already suggested on hackage.haskell.org/trac/ghc/ticket/5910 that an un-bound variable behaves like a hole. Thus, if you say f x = y GHC says “Error: y is not in scope”. But (idea) with -XTypeHoles

Re: memory fragmentation with ghc-7.6.1

2012-10-01 Thread Simon Marlow
://hackage.haskell.org/trac/ghc/wiki/Debugging/LowLevelProfiling/Perf Cheers, Simon On 29/09/2012 07:47, Ben Gamari wrote: Simon Marlow marlo...@gmail.com writes: On 28/09/12 17:36, Ben Gamari wrote: Unfortunately, after poking around I found a few obvious problems with both the code

Re: memory fragmentation with ghc-7.6.1

2012-09-26 Thread Simon Marlow
On 26/09/2012 05:42, Ben Gamari wrote: Simon Marlow marlo...@gmail.com writes: On 21/09/2012 04:07, John Lato wrote: Yes, that's my current understanding. I see this with ByteString and Data.Vector.Storable, but not Data.Vector/Data.Vector.Unboxed/Data.Text. As ByteStrings are pretty widely

Re: How do I build GHC 7.6 from source?

2012-09-21 Thread Simon Marlow
in the nightly build logs but I don't where to look. -Iavor On Thu, Sep 20, 2012 at 7:20 AM, Simon Marlow marlo...@gmail.com mailto:marlo...@gmail.com wrote: On 19/09/2012 02:15, Iavor Diatchki wrote: exactly what git's submodule machinery does, so it seems pointless

Re: memory fragmentation with ghc-7.6.1

2012-09-21 Thread Simon Marlow
On 21/09/2012 04:07, John Lato wrote: Yes, that's my current understanding. I see this with ByteString and Data.Vector.Storable, but not Data.Vector/Data.Vector.Unboxed/Data.Text. As ByteStrings are pretty widely used for IO, I expected that somebody else would have experienced this too. I

Re: How do I build GHC 7.6 from source?

2012-09-20 Thread Simon Marlow
On 19/09/2012 02:15, Iavor Diatchki wrote: exactly what git's submodule machinery does, so it seems pointless to implement the functionality which is already there with a standard interface. Thoughts?

Re: [Haskell] ANNOUNCE: GHC version 7.6.1

2012-09-07 Thread Simon Marlow
On 06/09/2012 21:10, Christian Hoener zu Siederdissen wrote: Hi Ian, thanks for the info about 7.8. Just to be clear, the new codegen apparently saved my runtimes for the presentation on tuesday. \My\ new code was slower than my old code. The new code generator fixed that, giving me equal

Re: RFC: Adding support for an API-since-version-attribute to Haddock?

2012-09-05 Thread Simon Marlow
On 05/09/2012 09:10, Herbert Valerio Riedel wrote: Evan Laforge qdun...@gmail.com writes: Would such an enhancement to Haddock be worthwhile or is it a bad idea? Has such a proposal come up in the past already? Are there alternative approaches to consider? It would be even cooler to

Re: Small Int and Char closures in GHCi

2012-08-31 Thread Simon Marlow
On 30/08/2012 12:29, Joachim Breitner wrote: Hi, I am preparing a talk about the details of how data and programs look in memory in Haskell (well, GHC). When explaining the memory consumption of a large String, I wanted to show the effect of short-int-replacement that happens in

Re: Comparing StableNames of different type

2012-08-28 Thread Simon Marlow
On 24/08/2012 10:39, Emil Axelsson wrote: 2012-08-24 11:18, Emil Axelsson skrev: 2012-08-24 11:08, Simon Marlow skrev: On 24/08/2012 07:39, Emil Axelsson wrote: Hi! Are there any dangers in comparing two StableNames of different type? stEq :: StableName a - StableName b - Bool stEq

Re: Comparing StableNames of different type

2012-08-24 Thread Simon Marlow
On 24/08/2012 07:39, Emil Axelsson wrote: Hi! Are there any dangers in comparing two StableNames of different type? stEq :: StableName a - StableName b - Bool stEq a b = a == (unsafeCoerce b) I could guard the coercion by first comparing the type representations, but that would give me

Re: minor errors in Haskell 2010 report

2012-08-24 Thread Simon Marlow
On 23/08/2012 17:09, Ramana Kumar wrote: M is not the current module, in which case the only way that an entity could be in scope in the current module is if it was exported by M and subsequently imported by the current module, so adding exported by module M is superfluous. In

Re: Long compilation times when profiling a large CAF

2012-08-22 Thread Simon Marlow
On 21/08/2012 19:14, Conal Elliott wrote: I'm looking for help with crazy-long compile times when using GHC with profiling. A source file at work has a single 10k line top-level definition, which is a CAF. With -prof auto-all or an explicit SCC, compilation runs for 8 hours on a fast machine

Re: +RTS -S heap reporting oddity

2012-08-20 Thread Simon Marlow
On 17/08/2012 17:08, Wolfram Kahl wrote: During one of my long Agda runs (with GHC-7.4.2), I observed the following output, with run-time options +RTS -S -H11G -M11G -K256M : 7694558208 30623864 3833166176 0.11 0.11 234.75 234.7900 (Gen: 0) 7678904688 29295168 3847737784

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: Non-updateable thunks

2012-08-08 Thread Simon Marlow
On 03/08/2012 10:29, Joachim Breitner wrote: Hi Simon, Am Freitag, den 03.08.2012, 09:28 +0100 schrieb Simon Marlow: My question is: Has anybody worked in that direction? And are there any fundamental problems with the current RTS implementation and such closures? Long ago GHC used to have

Re: API for looking-up/retrieving Haddock comments?

2012-08-08 Thread Simon Marlow
On 04/08/2012 08:33, Herbert Valerio Riedel wrote: Simon Hengel s...@typeful.net writes: [...] I have the following in my .ghci: -- hoogle integration :def hoogle \q - return $ :! hoogle --color=true --count=15 \ ++ q ++ \ :def doc\q - return $ :! hoogle --color=true

Re: Non-updateable thunks

2012-08-03 Thread Simon Marlow
On 01/08/2012 11:38, Joachim Breitner wrote: Hello, I’m still working on issues of performance vs. sharing; I must assume some of the people here on the list must have seen my dup-paper¹ as referees. I’m now wondering about a approach where the compiler (either automatically or by user

Re: Access to the Parse Tree for Expressions

2012-07-30 Thread Simon Marlow
On 27/07/2012 15:18, Simon Fowler wrote: Dear all, I'm currently working on a project which would benefit from access to the parse tree - ideally, we would like to deconstruct an expression into its constituent types. Currently we are using the exprType function to return the type of an

Re: Simplifying Core using GHC API

2012-07-30 Thread Simon Marlow
You can use compileToCoreSimplified to get the optimised Core for the module, although that includes the other steps. We ought to have a separate API to go from ModGuts to CoreModule, but currently that doesn't exist (it's built into compileToCoreSimplified). Cheers, Simon On

Re: Building GHC on NetBSD/amd64

2012-07-30 Thread Simon Marlow
On 29/07/2012 07:41, iquiw wrote: I am trying to build GHC on NetBSD/amd64. First, I built GHC-6.12.3 by porting from OpenBSD/amd64. After that, trying to build several versions (6.12.3, 7.0.4, 7.4.2) of GHC by the stage2 compiler. Build itself succeeded and compiling by the ghc seems no

Re: thread blocked indefinitely in an MVar operation in unsafePerformIO

2012-07-30 Thread Simon Marlow
On 30/07/2012 15:30, Marco Túlio Gontijo e Silva wrote: Hi. I'm having a problem calling logM from hsLogger inside unsafePerformIO. I have described the problem in Haskell-cafe, so I'll avoid repeating it here: http://www.haskell.org/pipermail/haskell-cafe/2012-July/102545.html I've had this

Re: How to describe this bug?

2012-07-11 Thread Simon Marlow
be disabled on x86 (that is the bug). -msse2 is not supported on all processors, so we can't enable it by default. Cheers, Simon Cheers Christian Am 10.07.2012 14:33, schrieb Simon Marlow: On 10/07/2012 12:21, Aleksey Khudyakov wrote: On Tue, Jul 10, 2012 at 3:06 PM, Sönke Hahn sh...@cs.tu

Re: [Fwd: Memory corruption issues when using newAlignedPinnedByteArray, GC kicking in?]

2012-07-11 Thread Simon Marlow
On 10/07/2012 23:03, Nicolas Trangez wrote: All, I sent this mail to Haskell Cafe earlier today, and was pointed [1] at this list. As such... Any help/advice would be greatly appreciated! It looks like you're making a ForeignPtr from the Addr# or Ptr that points to the contents of the

Re: How to describe this bug?

2012-07-11 Thread Simon Marlow
On 11/07/2012 09:51, Christian Maeder wrote: Am 11.07.2012 10:25, schrieb Simon Marlow: On 11/07/2012 08:36, Christian Maeder wrote: Hi, I think this bug is serious and should be turned into a ticket on http://hackage.haskell.org/trac/ghc/ Would you do so Sönke? The abstraction of floats

Re: Call to arms: lambda-case is stuck and needs your help

2012-07-10 Thread Simon Marlow
On 09/07/2012 17:32, Mikhail Vorozhtsov wrote: On 07/09/2012 09:49 PM, Simon Marlow wrote: On 09/07/2012 15:04, Mikhail Vorozhtsov wrote: and respectively \case P1, P2 - ... P3, P4 - ... as sugar for \x y - case x, y of P1, P2 - ... P3, P4 - ... That looks a bit strange to me

Re: Imported foreign functions should be strict

2012-07-10 Thread Simon Marlow
On 07/07/2012 05:06, Favonia wrote: Hi all, Recently I am tuning one of our incomplete libraries that uses FFI. After dumping the interface file I realized strictness/demand analysis failed for imported foreign functions---that is, they are not inferred to be strict in their arguments. In my

Re: Call to arms: lambda-case is stuck and needs your help

2012-07-10 Thread Simon Marlow
On 10/07/2012 07:33, Mikhail Vorozhtsov wrote: On 07/10/2012 01:09 AM, Bardur Arantsson wrote: On 07/09/2012 06:01 PM, Mikhail Vorozhtsov wrote: On 07/09/2012 09:52 PM, Twan van Laarhoven wrote: On 09/07/12 14:44, Simon Marlow wrote: I now think '\' is too quiet to introduce a new layout

Re: How to describe this bug?

2012-07-10 Thread Simon Marlow
On 10/07/2012 12:21, Aleksey Khudyakov wrote: On Tue, Jul 10, 2012 at 3:06 PM, Sönke Hahn sh...@cs.tu-berlin.de wrote: I've attached the code. The code does not make direct use of unsafePerformIO. It uses QuickCheck, but I don't think, this is a QuickCheck bug. The used Eq-instance is the one

Re: Call to arms: lambda-case is stuck and needs your help

2012-07-09 Thread Simon Marlow
On 07/07/2012 05:08, Tyson Whitehead wrote: PS: To be fully precise, the modified layout decoder in 9.3 would be L (n:ts) i (m:ms) = ; : (L ts n (m:ms)) if m = n = } : (L (n:ts) n ms) if n m L (n:ts) i ms = L ts n ms L ({n}:n:ts) i ms = {

Re: Call to arms: lambda-case is stuck and needs your help

2012-07-09 Thread Simon Marlow
On 07/07/2012 16:07, Strake wrote: On 07/07/2012, Jonas Almström Duregård jonas.dureg...@chalmers.se wrote: Couldn't we use \\ for multi-case lambdas with layout? If not, these are my preferences in order (all are single argument versions): 1: Omission: case of. There seems to be some support

Re: Call to arms: lambda-case is stuck and needs your help

2012-07-09 Thread Simon Marlow
On 09/07/2012 15:04, Mikhail Vorozhtsov wrote: Hi Simon. On 07/09/2012 08:23 PM, Simon Marlow wrote: On 07/07/2012 16:07, Strake wrote: On 07/07/2012, Jonas Almström Duregård jonas.dureg...@chalmers.se wrote: Couldn't we use \\ for multi-case lambdas with layout? If not, these are my

Re: Call to arms: lambda-case is stuck and needs your help

2012-07-06 Thread Simon Marlow
On 05/07/2012 20:31, Tyson Whitehead wrote: On July 5, 2012 10:42:53 Mikhail Vorozhtsov wrote: After 21 months of occasional arguing the lambda-case proposal(s) is in danger of being buried under its own trac ticket comments. We need fresh blood to finally reach an agreement on the syntax. Read

Re: Compiling ghcjs

2012-07-02 Thread Simon Marlow
On 27/06/2012 13:24, Nathan Hüsken wrote: I hope this is the correct list to ask this question. I am trying to compile the ghcjs compiler. I am on ubuntu 12.04 and have ghc-7.4.1 installed (via apt-get). I am following the instruction I found here: https://github.com/ghcjs/ghcjs The first

Re: Strange behavior when using stable names inside ghci?

2012-06-29 Thread Simon Marlow
On 27/06/12 22:41, Facundo Domínguez wrote: Hi, The program below when loaded in ghci prints always False, and when compiled with ghc it prints True. I'm using ghc-7.4.1 and I cannot quite explain such behavior. Any hints? Thanks in advance, Facundo {-# LANGUAGE GADTs #-} import

Re: parallel garbage collection performance

2012-06-27 Thread Simon Marlow
On 26/06/2012 00:42, Ryan Newton wrote: However, the parallel GC will be a problem if one or more of your cores is being used by other process(es) on the machine. In that case, the GC synchronisation will stall and performance will go down the drain. You can often see this on a

Re: Cannot build user's guide

2012-06-25 Thread Simon Marlow
On 25/06/12 14:34, José Pedro Magalhães wrote: Hi, I cannot build the user's guide. Doing make html stage=0 FAST=YES under docs/users_guide, I get: ===--- building final phase make -r --no-print-directory -f ghc.mk http://ghc.mk phase=final html_docs/users_guide inplace/bin/mkUserGuidePart

Re: parallel garbage collection performance

2012-06-25 Thread Simon Marlow
On 19/06/12 02:32, John Lato wrote: Thanks for the suggestions. I'll try them and report back. Although I've since found that out of 3 not-identical systems, this problem only occurs on one. So I may try different kernel/system libs and see where that gets me. -qg is funny. My

Re: Is stderr flushed automatically after exceptions are printed

2012-06-13 Thread Simon Marlow
On 13/06/2012 03:35, Johan Tibell wrote: Hi, If a program throws an exception that will cause it to be terminated (i.e. the exception isn't caught), will the code that prints out the error message to stderr make sure to flush stderr before terminating the process? Yes:

Re: problem with FFI and libsane

2012-06-07 Thread Simon Marlow
On 06/06/2012 06:59, Ganesh Sittampalam wrote: I'm having some trouble making Haskell bindings to libsane (a scanner access library: http://www.sane-project.org/) When I build the cut down sample of my code (below) with GHC 7.4.1 with the non-threaded runtime, it hangs at runtime in the call

Re: Source Location of DataCon objects in GHC 7.4.1 API

2012-06-04 Thread Simon Marlow
On 01/06/2012 10:24, JP Moresmau wrote: Hello I have a failing test in BuildWrapper when moving from GHC 7.0.4 to 7.4.1. As far I can tell, in the TypecheckedSource I get DataCon objects that have no location info, and hence I can't retrieve them by location... Which is useful in a IDE (tell me

Re: Potential GSoC proposal: Reduce the speed gap between 'ghc -c' and 'ghc --make'

2012-05-24 Thread Simon Marlow
On 23/05/12 21:11, Ryan Newton wrote: the.dead.shall.r...@gmail.com mailto:the.dead.shall.r...@gmail.com wrote: Thanks. I'll look into how to optimise .hi loading by more traditional means, then. Lennart is working on speeding up the binary package (which I believe is used to decode the .hi

[Haskell] ANNOUNCE: forthcoming O'Reilly book on Parallel and Concurrent Haskell

2012-05-17 Thread Simon Marlow
I'm delighted to announce that O'Reilly have agreed to publish a book on Parallel and Concurrent Haskell authored by me. The plan is to make a significantly revised and extended version of the Parallel and Concurrent Haskell tutorial from CEFP'11:

Re: Explicit calls to the garbage collector.

2012-05-08 Thread Simon Marlow
On 07/05/2012 14:33, Jurriaan Hage wrote: LS. I have a very memory intensive application. It seems that the timing of my application depend very much on the precise setting of -H...M in the runtime system (-H2000M seems to work best, computation time becomes a third of what I get when I pass

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: Weird behavior of the NonTermination exception

2012-05-04 Thread Simon Marlow
On 03/05/2012 17:14, Bas van Dijk wrote: On 3 May 2012 17:31, Edward Z. Yangezy...@mit.edu wrote: Excerpts from Bas van Dijk's message of Thu May 03 11:10:38 -0400 2012: As can be seen, the putMVar is executed successfully. So why do I get the message: thread blocked indefinitely in an MVar

Re: Potential GSoC proposal: Reduce the speed gap between 'ghc -c' and 'ghc --make'

2012-04-27 Thread Simon Marlow
On 26/04/2012 23:32, Johan Tibell wrote: On Thu, Apr 26, 2012 at 2:34 PM, Mikhail Glushenkov the.dead.shall.r...@gmail.com wrote: Thanks. I'll look into how to optimise .hi loading by more traditional means, then. Lennart is working on speeding up the binary package (which I believe is used

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: Potential GSoC proposal: Reduce the speed gap between 'ghc -c' and 'ghc --make'

2012-04-25 Thread Simon Marlow
On 25/04/2012 03:17, Mikhail Glushenkov wrote: Hello Simon, Sorry for the delay. On Tue, Apr 10, 2012 at 1:03 PM, Simon Marlowmarlo...@gmail.com wrote: Questions: Would implementing this optimisation be a worthwhile/realistic GSoC project? What are other potential ways to bring 'ghc -c'

Re: Potential GSoC proposal: Reduce the speed gap between 'ghc -c' and 'ghc --make'

2012-04-25 Thread Simon Marlow
On 25/04/2012 08:57, Simon Marlow wrote: On 25/04/2012 03:17, Mikhail Glushenkov wrote: Hello Simon, Sorry for the delay. On Tue, Apr 10, 2012 at 1:03 PM, Simon Marlowmarlo...@gmail.com wrote: Questions: Would implementing this optimisation be a worthwhile/realistic GSoC project? What

Re: default instance for IsString

2012-04-24 Thread Simon Marlow
On 24/04/2012 11:08, Erik Hesselink wrote: On Tue, Apr 24, 2012 at 10:55, Michael Snoymanmich...@snoyman.com wrote: On Tue, Apr 24, 2012 at 11:36 AM, Erik Hesselinkhessel...@gmail.com wrote: On Tue, Apr 24, 2012 at 08:32, Michael Snoymanmich...@snoyman.com wrote: Here's a theoretically

Re: default instance for IsString

2012-04-24 Thread Simon Marlow
On 24/04/2012 14:14, Daniel Peebles wrote: Why are potentially partial literals scarier than the fact that every value in the language could lead to an exception when forced? My thoughts exactly. In this thread people are using the term safe to mean total. We already overload safe too much,

Re: default instance for IsString

2012-04-24 Thread Simon Marlow
On 24/04/2012 15:19, Yitzchak Gale wrote: Simon Marlow wrote: In this thread people are using the term safe to mean total. We already overload safe too much, might it be a better idea to use total instead? I'm not sure what you're talking about. I don't see how this thread has anything to do

Re: containing memory-consuming computations

2012-04-20 Thread Simon Marlow
On 19/04/2012 11:45, Herbert Valerio Riedel wrote: For the time-dimension, I'm already using functions such as System.Timeout.timeout which I can use to make sure that even a (forced) pure computation doesn't require (significantly) more wall-clock time than I expect it to. Note that

Re: Invariants for GHC.Event ensureIOManagerIsRunning

2012-04-18 Thread Simon Marlow
On 14/04/2012 04:53, Edward Z. Yang wrote: Hello all, I recently ran into a rather reproduceable bug where I would get this error from the event manager: /dev/null: hClose: user error (Pattern match failure in do expression at libraries/base/System/Event/Thread.hs:83:3-10) The program

Re: Another profiling question.

2012-04-18 Thread Simon Marlow
On 17/04/2012 16:22, Herbert Valerio Riedel wrote: Jurriaan Hagej.h...@uu.nl writes: from the RTS option -s I get : INIT time0.00s ( 0.00s elapsed) MUT time 329.99s (940.55s elapsed) GCtime 745.91s (751.51s elapsed) RPtime 765.76s (767.76s elapsed) PROF

Re: Code review for new primop's CMM code.

2012-04-10 Thread Simon Marlow
On 29/03/2012 05:56, Ryan Newton wrote: Hi all, In preparation for students working on concurrent data structures GSOC(s), I wanted to make sure they could count on CAS for array elements as well as IORefs. The following patch represents my first attempt:

Re: Potential GSoC proposal: Reduce the speed gap between 'ghc -c' and 'ghc --make'

2012-04-10 Thread Simon Marlow
On 02/04/2012 07:37, Mikhail Glushenkov wrote: Hi all, [Hoping it's not too late.] During my work on parallelising 'ghc --make' [1] I encountered a stumbling block: running 'ghc --make' can be often much faster than using separate compile ('ghc -c') and link stages, which means that any

Re: What do the following numbers mean?

2012-04-10 Thread Simon Marlow
On 03/04/2012 00:46, Ben Lippmeier wrote: On 02/04/2012, at 10:10 PM, Jurriaan Hage wrote: Can anyone tell me what the exact difference is between 1,842,979,344 bytes maximum residency (219 sample(s)) and 4451 MB total memory in use (0 MB lost due to fragmentation) I could not find this

Re: [saj...@gmail.com: Google Summer of Code: a NUMA wishlist!]

2012-03-29 Thread Simon Marlow
On 28/03/2012 16:57, Tyson Whitehead wrote: On March 28, 2012 04:41:16 Simon Marlow wrote: Sure. Do you have a NUMA machine to test on? My understanding is non-NUMA machines went away when the AMD and Intel moved away from frontside buses (FSB) and integrated the memory controllers on die

Re: [saj...@gmail.com: Google Summer of Code: a NUMA wishlist!]

2012-03-28 Thread Simon Marlow
On 27/03/2012 01:14, Sajith T S wrote: Hi Simon, Thanks for the reply. It seems that forwarding the message here was a very good idea! Simon Marlowmarlo...@gmail.com wrote: -- From a very recent discussion on parallel-haskell [4], we learn that RTS' NUMA support could be improved.

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: [saj...@gmail.com: Google Summer of Code: a NUMA wishlist!]

2012-03-26 Thread Simon Marlow
On 26/03/2012 04:25, Sajith T S wrote: Date: Sun, 25 Mar 2012 22:49:52 -0400 From: Sajith T Ssaj...@gmail.com To: The Haskell Cafehaskell-c...@haskell.org Subject: Google Summer of Code: a NUMA wishlist! Dear Cafe, It's last minute-ish to bring this up (in my part of the world it's still

RE: String != [Char]

2012-03-26 Thread Simon Marlow
The primary argument is to not break something that works well for most purposes, including teaching, at a huge cost of backwards compatibility for marginal if any real benefits. I'm persuaded by this argument. And I'm glad that teachers are speaking up in this debate - it's hard to get a

Re: GHCi and line numbers (with ghc-7.4.1)

2012-03-23 Thread Simon Marlow
On 22/03/2012 11:36, Christopher Done wrote: On 22 March 2012 12:13, Simon Marlowmarlo...@gmail.com wrote: On 20/03/2012 20:12, Simon Hengel wrote: They are now incremented with each evaluated expression. Why *are* they incremented with each evaluation? Surely the only use for line numbers

Re: GHCi and line numbers (with ghc-7.4.1)

2012-03-22 Thread Simon Marlow
On 20/03/2012 20:12, Simon Hengel wrote: Hi, ghc --interactive now behaves different in regards to line numbers in error messages than previous versions. They are now incremented with each evaluated expression. $ ghc --interactive -ignore-dot-ghci Prelude foo interactive:2:1:

RE: String != [Char]

2012-03-20 Thread Simon Marlow
On Mon, Mar 19, 2012 at 9:02 AM, Christian Siefkes christ...@siefkes.net wrote: On 03/19/2012 04:53 PM, Johan Tibell wrote: I've been thinking about this question as well. How about class IsString s where     unpackCString :: Ptr Word8 - CSize - s What's the Ptr Word8 supposed to

RE: What is a punctuation character?

2012-03-19 Thread Simon Marlow
On Fri, Mar 16, 2012 at 6:49 PM, Ian Lynagh ig...@earth.li wrote: Hi Gaby, On Fri, Mar 16, 2012 at 06:29:24PM -0500, Gabriel Dos Reis wrote: OK, thanks!  I guess a take away from this discussion is that what is a punctuation is far less well defined than it appears... I'm not

Re: profiling and backtracing blues

2012-03-15 Thread Simon Marlow
Haskell or quasiquotes. Could that be the case? (the reason is that TH and QQ both need to compile some code and run it on the fly, which requires the interpreter, which is the bit that doesn't work with profiling). Cheers, Simon On Mar 14, 2012, at 3:59 AM, Simon Marlow wrote

Re: profiling and backtracing blues

2012-03-14 Thread Simon Marlow
On 13/03/2012 21:25, Ranjit Jhala wrote: Hi all, I'm trying to use the nifty backtracing mechanism in GHC 74. AFAICT, this requires everything be built with profiling on), but as a consequence, I hit this: You can't call hscCompileCoreExpr in a profiled compiler Any hints on whether

Re: Boxed foreign prim

2012-03-13 Thread Simon Marlow
On 12/03/2012 14:22, Edward Kmett wrote: On Mon, Mar 12, 2012 at 6:45 AM, Simon Marlow marlo...@gmail.com mailto:marlo...@gmail.com wrote: But I can only pass unboxed types to foreign prim. Is this an intrinsic limitation or just an artifact of the use cases that have

Re: Boxed foreign prim

2012-03-12 Thread Simon Marlow
On 09/03/2012 04:12, Edward Kmett wrote: I'm currently working with a lot of very short arrays of fixed length and as a thought experiment I thought I would try to play with fast numeric field accessors In particular, I'd like to use something like foreign prim to do something like foreign

Re: Getting the file descriptor of a handle, without closing it

2012-03-12 Thread Simon Marlow
On 11/03/2012 01:31, Volker Wysk wrote: Hi This is an addition to my previous post. This modified version of main seems to work: main = do fd- unsafeWithHandleFd stdin return putStrLn (stdin: fd = ++ show fd) fd- unsafeWithHandleFd stdout return putStrLn (stdout: fd = ++

Re: How unsafe are unsafeThawArray# and unsafeFreezeArray#

2012-03-09 Thread Simon Marlow
On 09/03/2012 01:13, Johan Tibell wrote: Hi, I just ran across some code that calls unsafeThawArray#, writeArray#, and unsafeFreezeArray#, in that order. How unsafe is that? * Is it unsafe in the sense that if someone has a reference to the original Array# they will see the value of that

Re: How unsafe are unsafeThawArray# and unsafeFreezeArray#

2012-03-09 Thread Simon Marlow
On 09/03/2012 11:44, John Meacham wrote: Out of curiosity, Is the reason you keep track of mutable vs not mutable heap allocations in order to optimize the generational garbage collector? as in, if a non-mutable value is placed in an older generation you don't need to worry about it being

<    1   2   3   4   5   6   7   8   9   10   >