[Haskell-cafe] Re: Haddock: documenting parameters of functional arguments

2007-08-24 Thread Simon Marlow
Henning Thielemann wrote: I like to write documentation comments like fix :: ( a {- ^ local argument -} - a {- ^ local output -} ) - a {- ^ global output -} but Haddock doesn't allow it. Or is there a trick to get it work? Haddock only supports documenting the top-level

[Haskell-cafe] Re: GHC optimisations

2007-08-30 Thread Simon Marlow
Simon Peyton-Jones wrote: GHC does some constant folding, but little by way of strength reduction, or using shifts instead of multiplication. It's pretty easy to add more: it's all done in a single module. Look at primOpRules in the module PrelRules. Although it isn't done at the Core

[Haskell-cafe] Re: GHC 6.6.1 and SELinux issues

2007-09-03 Thread Simon Marlow
with PROT_WRITE, for obvious reasons. The solution is expensive in terms of address space and TLB entries: map the same pages twice, once only with PROT_EXEC, and once only with PROT_WRITE. There's already a Trac ticket filed against this problem, but Simon Marlow marked it as closed because he

[Haskell-cafe] Re: FFI and DLLs

2007-09-04 Thread Simon Marlow
Lewis-Sandy, Darrell wrote: An early proposal for the FFI supported importing functions directly from dynamic link libraries: www.*haskell*.org/hdirect/ffi-a4.ps.gz http://www.haskell.org/hdirect/ffi-a4.ps.gz This looks like it was dropped from the final version of the addendum in favor of

[Haskell-cafe] Re: Elevator pitch for Haskell.

2007-09-05 Thread Simon Marlow
Ketil Malde wrote: WARNING: Learning Haskell is dangerous to your health! :-) I liked that so much I made a hazard image to go with it. http://malde.org/~ketil/Hazard_lambda.svg Cool! Can we have a license to reuse that image? (I want it on a T-shirt) Cheers, Simon

[Haskell-cafe] Re: Mutable but boxed arrays?

2007-09-06 Thread Simon Marlow
Ketil Malde wrote: On Wed, 2007-09-05 at 20:37 +0200, Henning Thielemann wrote: Can someone explain me, why there are arrays with mutable but boxed elements? I, on the other hand, have always wondered why the strict arrays are called unboxed, rather than, well, strict? Strictness seems to be

[Haskell-cafe] Re: Tiny documentation request

2007-09-11 Thread Simon Marlow
Sven Panne wrote: 2. Could we make is so all items are collapsed initially? (Currently they're all expended initially - which makes it take rather a long time to find anything.) Again this depends on the use case: I'd vote strongly against collapsing the list initially, because that way the

[Haskell-cafe] Re: Tiny documentation request

2007-09-11 Thread Simon Marlow
Thomas Schilling wrote: However, regarding the modules list. I think it should be easy to have optional javascript functionality to toggle the visibility of the module tree. The default visibility could be customized using a cookie. I don't know how to make cookies work purely in Javascript

[Haskell-cafe] Re: Tiny documentation request

2007-09-12 Thread Simon Marlow
manu wrote: On Sep 11, 2007, Simon Marlow wrote: Please, please, someone do this for me. I tried, and failed, to get the layout right for the contents list in all browsers at the same time. The semantics of CSS is beyond my comprehension. Cheers, Simon Hi Simon, On the page

[Haskell-cafe] Re: help getting happy

2007-09-13 Thread Simon Marlow
Greg Meredith wrote: Haskellians, The code pasted in below causes Happy to return parE when invoked with happy rparse.y -i . Is there anyway to get Happy to give me just a wee bit more info as to what might be causing the parE (which i interpret a 'parse error'). Please grab a more recent

[Haskell-cafe] Re: Building production stable software in Haskell

2007-09-18 Thread Simon Marlow
Adrian Hey wrote: Neil Mitchell wrote: Hi They are less stable and have less quality control. Surely you jest? I see no evidence of this, rather the contrary in fact. No, dead serious. The libraries have a library submission process. It does not follow that libraries that have not been

[Haskell-cafe] Re: [Haskell] Blocked STM GC question

2007-09-18 Thread Simon Marlow
Jules Bean wrote: Simon Marlow wrote: Ashley Yakeley wrote: If I have a thread that's blocked on an STM retry or TChan read, and none of its TVars are referenced elsewhere, will it get stopped and garbage-collected? I have in mind a pump thread that eternally reads off a TChan and pushes

[Haskell-cafe] Re: [Haskell] Swapping parameters and type classes

2007-09-18 Thread Simon Marlow
Ian Lynagh wrote: On Tue, Sep 18, 2007 at 03:48:06PM +0100, Andrzej Jaworski wrote: Responding to Simon Peyton-Jones' reminder that this is a low-bandwidth list I was obscure and commited a blunder. This one and many other threads here are started undoubtedly by experts [sorry guys:-)] and

[Haskell-cafe] Re: Library Process (was Building production stable software in Haskell)

2007-09-19 Thread Simon Marlow
Sven Panne wrote: On Tuesday 18 September 2007 09:44, Dominic Steinitz wrote: This discussion has sparked a question in my mind: What is the process for the inclusion of modules / packages in ghc, hugs and other compilers interpreters? Personal interest of the people working on GHC et. al.

[Haskell-cafe] Re: C's fmod in Haskell

2007-09-26 Thread Simon Marlow
Henning Thielemann wrote: See also http://www.haskell.org/haskellwiki/Things_to_avoid#Forget_about_quot_and_rem OTOH, since quot/rem are the primitives in GHC, and div/mod are implemented in terms of them, then you might prefer to use quot/rem all other things being equal. Cheers,

[Haskell-cafe] Re: GHC 6.7 on Windows / containers-0.1 package?

2007-09-26 Thread Simon Marlow
Stefan O'Rear wrote: On Wed, Sep 19, 2007 at 10:24:24PM +0100, Neil Mitchell wrote: Hi Peter, So I grabbed ghc-6.7.20070824 (=the latest one for Windows I could find) and the extra-libs, compiled and installed the GLUT package (which I needed), but when I compile my library, I get

[Haskell-cafe] Re: unsafePerformIO: are we safe?

2007-10-09 Thread Simon Marlow
Jorge Marques Pelizzoni wrote: Hi, all! This is a newbie question: I sort of understand what unsafePerformIO does but I don't quite get its consequences. In short: how safe can one be in face of it? I mean, conceptually, it allows any Haskell function to have side effects just as in any

[Haskell-cafe] Re: Haskell FFI and finalizers

2007-10-09 Thread Simon Marlow
Maxime Henrion wrote: Stefan O'Rear wrote: On Thu, Oct 04, 2007 at 12:55:41AM +0200, Maxime Henrion wrote: When writing the binding for foo_new(), I need to open a file with fopen() to pass it the FILE *. Then I get a struct foo * that I can easily associate the the foo_destroy() finalizer.

[Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

2007-10-15 Thread Simon Marlow
Claus Reinke wrote: but calling split-base base goes directly against all basic assumptions of all packages depending on base. The new base will have a new version number. There is no expectation of compatibility when the major version is bumped; but we do have an informal convention that

Re: [Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

2007-10-15 Thread Simon Marlow
Claus Reinke wrote: Simon Marlow wrote: Another reason not to change the name of 'base' is that there would be a significant cost to doing so: the name is everywhere, not just in the source code of GHC and its tools, but wiki pages, documentation, and so on. but the name that is everywhere

Re: [Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

2007-10-15 Thread Simon Marlow
Claus Reinke wrote: if this is the official interpretation of cabal package version numbers, could it please be made explicit in a prominent position in the cabal docs? Yes - I think it would be a good idea to make that convention explicit somewhere (I'm sure we've talked about it in the

[Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

2007-10-16 Thread Simon Marlow
Udo Stenzel wrote: Simon Marlow wrote: So a package that depends on 'base' (with no upper version bound) *might* be broken in GHC 6.8.1, depending on which modules from base it actually uses. Let's look at the other options: - if we rename base, the package will *definitely* be broken

[Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

2007-10-16 Thread Simon Marlow
Several good points have been raised in this thread, and while I might not agree with everything, I think we can all agree on the goal: things shouldn't break so often. So rather than keep replying to individual points, I'd like to make some concrete proposals so we can make progress. 1.

[Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

2007-10-16 Thread Simon Marlow
Claus Reinke wrote: - if you provide a 'base' configuration that pulls in the stuff that used to be in base, the package will work I don't know of a way to do that. The name of the package is baked into the object files at compile time, so you can't use the same compiled module in more

[Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

2007-10-16 Thread Simon Marlow
Simon Marlow wrote: Claus Reinke wrote: - if you provide a 'base' configuration that pulls in the stuff that used to be in base, the package will work I don't know of a way to do that. The name of the package is baked into the object files at compile time, so you can't use the same

[Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

2007-10-16 Thread Simon Marlow
Bayley, Alistair wrote: From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Simon Marlow x changes == API changed x constant but y changes == API extended only x and y constant == API is identical Ordering on versions is lexicographic, given multiple versions that satisfy

[Haskell-cafe] Re: Proposal: register a package as providing several API versions

2007-10-16 Thread Simon Marlow
ChrisK wrote: Simon Marlow wrote: Several good points have been raised in this thread, and while I might not agree with everything, I think we can all agree on the goal: things shouldn't break so often. I have another concrete proposal to avoid things breaking so often. Let us steal from

[Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

2007-10-16 Thread Simon Marlow
Bayley, Alistair wrote: From: Simon Marlow [mailto:[EMAIL PROTECTED] The lexicographical ordering would make 10.0 9.3. In general, A.B C.D iff A C or A == C B D. When we say the latest version we mean greatest, implying that version numbers increase with time. Does that help

Re: [Haskell-cafe] Re: Proposal: register a package as providingseveral API versions

2007-10-16 Thread Simon Marlow
Claus Reinke wrote: It could be done using the tricks that Claus just posted and I followed up on. You'd need a separate package for hsFoo-2 that specifies exactly which bits of hsFoo-3 are re-exported. Given some Cabal support and a little extension in GHC, this could be made relatively

[Haskell-cafe] Re: Bug in runInteractiveProcess?

2007-10-17 Thread Simon Marlow
Donn Cave wrote: On Oct 16, 2007, at 9:52 PM, Brandon S. Allbery KF8NH wrote: On Oct 17, 2007, at 0:39 , Donn Cave wrote: ... As for closing file descriptors explicitly - if I remember right what I've seen in the NetBSD source, the UNIX popen() implementation may years ago have closed all

[Haskell-cafe] Re: Bug in runInteractiveProcess?

2007-10-17 Thread Simon Marlow
Donn Cave wrote: On Oct 16, 2007, at 1:48 PM, John Goerzen wrote: I have been trying to implement a Haskell-like version of shell pipelines using runInteractiveProcess. I am essentially using hGetContents to grab the output from one command, and passing that to (forkIO $ hPutStr) to write

Re: [Haskell-cafe] Re: Proposal: register a package asprovidingseveral API versions

2007-10-17 Thread Simon Marlow
Claus Reinke wrote: the idea was for the cabal file to specify a single provided api, but to register that as sufficient for a list of dependency numbers. so the package would implement the latest api, but could be used by clients expecting either the old or the new api. I don't see how that

[Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

2007-10-17 Thread Simon Marlow
Neil Mitchell wrote: Hi I agree. = 1.0 isn't viable in the long term. Rather, a specific list, or bounded range of tested versions seems likely to be more robust. In general, if it compiles and type checks, it will work. It is rare that an interface stays sufficiently similar that the thing

[Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

2007-10-17 Thread Simon Marlow
I've written down the proposed policy for versioning here: http://haskell.org/haskellwiki/Package_versioning_policy It turned out there was a previous page written by Bulat that contained essentially this policy, but it wasn't linked from anywhere which explains why it was overlooked. I

Re: [Haskell-cafe] Re: Proposal: register a package asprovidingseveralAPI versions

2007-10-17 Thread Simon Marlow
Claus Reinke wrote: a few examples, of the top of my head: - consider the base split in reverse: if functionality is only repackaged, the merged base would also provide for the previously separate sub-package apis (that suggests a separate 'provides:' field, though, as merely

[Haskell-cafe] Re: Bug in runInteractiveProcess?

2007-10-18 Thread Simon Marlow
John Goerzen wrote: On 2007-10-17, Simon Marlow [EMAIL PROTECTED] wrote: Note that forkProcess doesn't currently work with +RTS -N2 (or any value larger than 1), and it isn't likely to in the future. I suspect forkProcess should be deprecated. That would be most annoying, and would render

[Haskell-cafe] Re: Proposal: register a package asprovidingseveralAPI versions

2007-10-18 Thread Simon Marlow
ChrisK wrote: I disagree with Simon Marlow here. In practice I think Claus' definition of compatible is good enough: I don't think you're disagreeing with me :-) In fact, you agreed that extending an API can break a client: One can write such a module. But that is only a problem

[Haskell-cafe] Re: Proposal: register a packageasprovidingseveralAPI versions

2007-10-19 Thread Simon Marlow
Ketil Malde wrote: Claus Reinke [EMAIL PROTECTED] writes: Incedentally, this reminds me that GHC should have a warning for not using explicit import lists (perhaps only for external package imports). for package-level imports/exports, that sounds useful. Isn't there a secret key

[Haskell-cafe] Re: Using Haddock to document ADTs

2007-10-23 Thread Simon Marlow
Alfonso Acosta wrote: I'm beginning to get familiar with Haddock and I want to document a library which, as usually happens, has some ADT definitions. I'd like to document the ADTs both for the end-user (who shouldn't be told about its internal implementation) and future developers. Haddock

[Haskell-cafe] Re: OS Abstraction module??

2007-10-23 Thread Simon Marlow
Galchin Vasili wrote: I am really talking about a module or perhaps a Haskell class that provides notion for multiple threads of execution, semaphores, .. that hides POSIX vs Win32 APIs .. I wonder if this discussion is missing the point: if you only want to do threads, then Haskell (or

[Haskell-cafe] Re: Haskell Paralellism

2007-10-25 Thread Simon Marlow
Dominik Luecke wrote: I am trying to use the code rels list = let o1 = (map makeCompEntry) $ head $ splitList list o2 = (map makeCompEntry) $ head $ tail $ splitList list o3 = (map makeCompEntry) $ head $ tail $ tail $ splitList list in case (head $

[Haskell-cafe] Re: newbie optimization question

2007-10-29 Thread Simon Marlow
Peter Hercek wrote: Daniel Fischer wrote: What perpetually puzzles me is that in C long long int has very good performance, *much* faster than gmp, in Haskell, on my computer, Int64 is hardly faster than Integer. I tried the example with Int64 and Integer. The integer version was actually

[Haskell-cafe] Re: package maintainers: updating your packages to work with GHC 6.8.1

2007-11-05 Thread Simon Marlow
Duncan Coutts wrote: flag splitBase description: Choose the new smaller, split-up base package. library if flag(splitBase) build-depends: base = 3, containers else build-depends: base 3 This is also a good time to add upper bounds to dependencies, in accordance with the

[Haskell-cafe] Re: Problem linking with GHC 6.8.1

2007-11-07 Thread Simon Marlow
Alberto Ruiz wrote: If you don't use the foreign function interface I think that you only need the -L option: ghc --make -L/usr/local/lib/ghc-6.8.1/gmp -O2 -o edimail Main.hs Something similar worked for me, but this new behavior is not very reasonable. Could it be a bug? It looks like a

[Haskell-cafe] Re: Building Haskell stuff on Windows

2007-11-13 Thread Simon Marlow
Peter Hercek wrote: Simon Peyton-Jones wrote: | Windows and Haskell is not a well travelled route, but if you stray of | the cuddly installer packages, it gets even worse. | | But it shouldn't. Really it shouldn't. Even though Windows is not my | preferred platform, it is by no means

[Haskell-cafe] Re: Weird ghci behaviour?

2007-11-15 Thread Simon Marlow
Jonathan Cast wrote: On 13 Nov 2007, at 11:03 PM, Jules Bean wrote: Just to be clear: my proposal is that if you want it to go faster you do ghci foo.hi or ghci foo.o ... so you still have the option to run on compiled code. My suggestion is simply that ghci foo.hs is an instruction to

[Haskell-cafe] Re: Weird ghci behaviour?

2007-11-15 Thread Simon Marlow
It's worth saying that right now, all you have to do to get the source file loaded is :! touch M.hs :reload Put this in a macro, if you want: :def src \s - return (:! touch ++s) I hear the arguments in this thread, and others have suggested changes before:

[Haskell-cafe] Re: Guidance on using asynchronous exceptions

2007-11-16 Thread Simon Marlow
Yang wrote: To follow up on my previous post (Asynchronous Exceptions and the RealWorld), I've decided to put together something more concrete in the hopes of eliciting response. I'm trying to write a library of higher-level concurrency abstractions, in particular for asynchronous systems

[Haskell-cafe] Digest size

2007-11-23 Thread Simon Marlow
[ with mailing list maintainer's hat on ] Someone asked me if they could get fewer digests per day from haskell-cafe. The threshold for sending out a digest is currently 30k, which is probably the default, but seems a bit small to me. Any objections to bumping it, to say 100k? Cheers,

[Haskell-cafe] Re: Sillyness in the standard libs.

2007-11-29 Thread Simon Marlow
Brandon S. Allbery KF8NH wrote: On Nov 19, 2007, at 16:06 , Arthur van Leeuwen wrote: here is a puzzle for you: try converting a System.Posix.Types.EpochTime into either a System.Time.CalendarTime or a Data.Time.Clock.UTCTime without going through read . show or a similar detour through

[Haskell-cafe] Re: Over-allocation

2007-11-30 Thread Simon Marlow
Gracjan Polak wrote: My program is eating too much memory: copyfile source.txt dest.txt +RTS -sstderr Reading file... Reducing structure... Writting file... Done in 20.277s 1,499,778,352 bytes allocated in the heap 2,299,036,932 bytes copied during GC (scavenged) 1,522,112,856 bytes copied

[Haskell-cafe] Re: A tale of three shootout entries

2007-12-03 Thread Simon Marlow
Simon Peyton-Jones wrote: | There may well have been changes to the strictness analyser that make | some of the bangs (or most) unnecessary now. Also, its very likely | I didn't check all combinations of strict and lazy arguments for the | optimal evaluation strategy :) | | If it seems to be

[Haskell-cafe] Re: Waiting for thread to finish

2007-12-03 Thread Simon Marlow
Brad Clow wrote: On Nov 28, 2007 11:30 AM, Matthew Brecknell [EMAIL PROTECTED] wrote: Even with threads, results are evaluated only when they are needed (or when forced by a strictness annotation). So the thread that needs a result (or forces it) first will be the one to evaluate it. So does

[Haskell-cafe] Re: Nofib modifications

2007-12-04 Thread Simon Marlow
-Jones wrote: By all means apply a patch, I think. Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Neil Mitchell | Sent: 03 December 2007 17:34 | To: Haskell Cafe | Cc: Simon Marlow; Malcolm Wallace; Duncan Coutts | Subject: [Haskell-cafe] Nofib

[Haskell-cafe] Re: Leopard: ghc 6.8.1 and the case of the missing _environ

2007-12-04 Thread Simon Marlow
Joel Reymont wrote: Symptoms: You build 6.8.1 from source on Leopard (x86 in my case) and then junior:ghc-6.8.1 joelr$ ghci GHCi, version 6.8.1: http://www.haskell.org/ghc/ :? for help ghc-6.8.1: /usr/local/lib/ghc-6.8.1/lib/base-3.0.0.0/HSbase-3.0.0.0.o: unknown symbol `_environ' Loading

[Haskell-cafe] Re: Haskell interface file (.hi) format?

2007-12-04 Thread Simon Marlow
Stefan O'Rear wrote: On Sun, Dec 02, 2007 at 05:45:48AM +0100, Tomasz Zielonka wrote: On Fri, Nov 30, 2007 at 08:55:51AM +, Neil Mitchell wrote: Hi Prelude :b Control.Concurrent.MVar module 'Control.Concurrent.MVar' is not interpreted :b now defaults to :breakpoint, you want :browse

[Haskell-cafe] Re: [Haskell] Re: Haskell Digest, Vol 52, Issue 1

2007-12-05 Thread Simon Marlow
Taral wrote: On 12/4/07, Simon Marlow [EMAIL PROTECTED] wrote: do x - newIVar let y = readIVar x writeIVar x 3 print y (I wrote the let to better illustrate the problem, of course you can inline y if you want). Now suppose the compiler decided to evaluate y before

[Haskell-cafe] Re: [Haskell] IVar

2007-12-05 Thread Simon Marlow
Jan-Willem Maessen wrote: Consider this: do x - newIVar let y = readIVar x writeIVar x 3 print y (I wrote the let to better illustrate the problem, of course you can inline y if you want). Now suppose the compiler decided to evaluate y before the writeIVar. What's to prevent

[Haskell-cafe] Re: [Haskell] IVar

2007-12-06 Thread Simon Marlow
Jan-Willem Maessen wrote: On Dec 5, 2007, at 3:58 AM, Simon Marlow wrote: Ah, so I was thinking of the following readIVar: readIVar = unsafePerformIO . readIVarIO But clearly there's a better one. Fair enough. Hmm, so unsafePerformIO doesn't deal with any operation that blocks? Well

[Haskell-cafe] Re: Looking for largest power of 2 = Integer

2007-12-06 Thread Simon Marlow
Dan Piponi wrote: There's a bit of work required to make this code good enough for general consumption, and I don't know much about Haskell internals. (1) What is the official way to find the size of a word? A quick look at 6.8.1's base/GHC/Num.lhs reveals that it uses a #defined symbol. I'm

[Haskell-cafe] Re: Problems building and using ghc-6.9

2007-12-06 Thread Simon Marlow
Daniel Fischer wrote: Then I tried to build zlib-0.4.0.1: $ runghc ./Setup.hs configure --user --prefix=$HOME Configuring zlib-0.4.0.1... Setup.hs: At least the following dependencies are missing: base =2.02.2 ??? okay, there was something with flag bytestring-in-base, removed that, so

Re: [Haskell-cafe] class default method proposal

2007-12-11 Thread Simon Marlow
Duncan Coutts wrote: On Tue, 2007-12-11 at 07:07 -0800, Stefan O'Rear wrote: This is almost exactly the http://haskell.org/haskellwiki/Class_system_extension_proposal; that page has some discussion of implementation issues. Oh yes, so it is. Did this proposal get discussed on any mailing

[Haskell-cafe] Re: Waiting for thread to finish

2007-12-11 Thread Simon Marlow
ChrisK wrote: That is new. Ah, I see GHC.Conc.forkIO now has a note: GHC note: the new thread inherits the /blocked/ state of the parent (see 'Control.Exception.block'). BUT...doesn't this change some of the semantics of old code that used forkIO ? Yes, it is a change to the semantics. I

[Haskell-cafe] Re: Execution of external command

2007-12-13 Thread Simon Marlow
Bulat Ziganshin wrote: Hello Duncan, Thursday, December 13, 2007, 4:43:17 PM, you wrote: Use just the GHC bit from the code I pointed at: thank you, Duncan. are there any objections against simplest code proposed by Yitzchak? i.e. (_, h, _, _) - runInteractiveCommand script params output -

[Haskell-cafe] Re: -threaded

2007-12-14 Thread Simon Marlow
Maurí­cio wrote: I see in the documentation and in many messages in this list that, if you want multithreading in your program, you need to use -threaded in ghc. Concurrency is supported just fine without -threaded. You need -threaded if you want to: 1) make foreign calls that do not

[Haskell-cafe] Re: -threaded

2007-12-14 Thread Simon Marlow
Ketil Malde wrote: Simon Marlow [EMAIL PROTECTED] writes: Concurrency is supported just fine without -threaded. You need -threaded if you want to: : 3) write a multithreaded Haskell library or DLL I thought -threaded (A.K.A. -smp, no?) only affected which runtime was used, and thus

[Haskell-cafe] Re: announcing darcs 2.0.0pre2

2007-12-17 Thread Simon Marlow
David Roundy wrote: I am pleased to announce the availability of the second prerelease of darcs two, darcs 2.0.0pre2. Thanks! Continuing my performance tests, I tried unpulling and re-pulling a bunch of patches in a GHC tree. I'm unpulling about 400 patches using --from-tag, and then

[Haskell-cafe] Re: #haskell works

2007-12-20 Thread Simon Marlow
Tim Chevalier wrote: On 12/14/07, Dan Piponi [EMAIL PROTECTED] wrote: There have been some great improvements in array handling recently. I decided to have a look at the assembly language generated by some simple array manipulation code and understand why C is at least twice as fast as ghc

[Haskell-cafe] Re: Haskell performance

2007-12-20 Thread Simon Marlow
Malcolm Wallace wrote: Simon Peyton-Jones [EMAIL PROTECTED] wrote: What would be v helpful would be a regression suite aimed at performance, that benchmarked GHC (and perhaps other Haskell compilers) against a set of programs, regularly, and published the results on a web page, highlighting

[Haskell-cafe] Re: Haskell performance

2007-12-20 Thread Simon Marlow
Simon Marlow wrote: Nobench does already collect code size, but does not yet display it in the results table. I specifically want to collect compile time as well. Not sure what the best way to measure allocation and peak memory use are? With GHC you need to use +RTS -s and then slurp

[Haskell-cafe] Re: Haskell performance

2008-01-02 Thread Simon Marlow
[EMAIL PROTECTED] wrote: G'day all. Quoting Jon Harrop [EMAIL PROTECTED]: I would recommend adding: 1. FFT. 2. Graph traversal, e.g. nth-nearest neighbor. I'd like to put in a request for Pseudoknot. Does anyone still have it? This is it, I think:

[Haskell-cafe] Re: [16/16] SBM: Discussion and Conclusion

2008-01-02 Thread Simon Marlow
Peter Firefly Brodersen Lund wrote: Using top together with huge input files convinced me that -sstderr was untrustworthy so I developed the pause-at-end preloading hack. Paranoia paid off big time there. In what way did you find -sstderr untrustworthy? Perhaps it is because the memory in

[Haskell-cafe] Re: Importing Data.Char speeds up ghc around 70%

2008-01-02 Thread Simon Marlow
Joost Behrends wrote: Neil Mitchell ndmitchell at gmail.com writes: If it can be reproduced on anyones machine, it is a bug. If you can bundle up two programs which don't read from stdin (i.e. no getLine calls) or the standard arguments (i.e. getArgs) which differ only by the Data.Char

[Haskell-cafe] Re: announcing darcs 2.0.0pre2

2008-01-03 Thread Simon Marlow
David Roundy wrote: Anyhow, could you retry this test with the above change in methodology, and let me know if (a) the pull is still slow the first time and (b) if it's much faster the second time (after the reverse unpull/pull)? I think I've done it in both directions now, and it got faster,

[Haskell-cafe] Re: [darcs-devel] announcing darcs 2.0.0pre2

2008-01-04 Thread Simon Marlow
David Roundy wrote: On Thu, Jan 03, 2008 at 11:11:40AM +, Simon Marlow wrote: David Roundy wrote: Anyhow, could you retry this test with the above change in methodology, and let me know if (a) the pull is still slow the first time and (b) if it's much faster the second time (after

[Haskell-cafe] Re: [Haskell] ANNOUNCE: Haddock version 2.0.0.0

2008-01-09 Thread Simon Marlow
Felipe Lessa wrote: On Jan 8, 2008 10:28 AM, David Waern [EMAIL PROTECTED] wrote: * Haddock now understands all syntax understood by GHC 6.8.2 Does Haddock still define __HADDOCK__? There's a lot of code that uses this flag just to hide something Haddock didn't know. Haddock itself never

[Haskell-cafe] Re: [Haskell] Problems with Unicode Symbols as Infix Function Names in Propositional Calculus Haskell DSL

2008-01-10 Thread Simon Marlow
Cetin Sert wrote: I want to design a DSL in Haskell for propositional calculus. But instead of using natural language names for functions like or, and, implies etc. I want to use Unicode symbols as infix functions ¬, ˅, ˄, →, ↔ But I keep getting error messages from the GHC parser. Is there a

[Haskell-cafe] Re: Parallel Pi

2010-03-18 Thread Simon Marlow
On 17/03/10 21:30, Daniel Fischer wrote: Am Mittwoch 17 März 2010 19:49:57 schrieb Artyom Kazak: Hello! I tried to implement the parallel Monte-Carlo method of computing Pi number, using two cores: move But it uses only on core: snip We see that our one spark is pruned. Why? Well, the

[Haskell-cafe] Re: Parallel Pi

2010-03-19 Thread Simon Marlow
On 18/03/10 22:52, Daniel Fischer wrote: Am Donnerstag 18 März 2010 22:44:55 schrieb Simon Marlow: On 17/03/10 21:30, Daniel Fischer wrote: Am Mittwoch 17 März 2010 19:49:57 schrieb Artyom Kazak: Hello! I tried to implement the parallel Monte-Carlo method of computing Pi number, using two

[Haskell-cafe] Re: Parallel Pi

2010-03-19 Thread Simon Marlow
On 19/03/10 09:00, Ketil Malde wrote: Daniel Fischerdaniel.is.fisc...@web.de writes: 3.06GHz Pentium 4, 2 cores. [I.e. a single-core hyperthreaded CPU] Ah, that would definitely explain a lack of parallelism. I'm just grateful we don't have another one of those multicore cache-line

[Haskell-cafe] Re: Timeouts that don't cause data growth.

2010-03-23 Thread Simon Marlow
On 23/03/10 17:40, David Leimbach wrote: Trying to understand why the code here: http://moonpatio.com/fastcgi/hpaste.fcgi/view?id=8823#a8823 exhausts memory. I need to have timeouts in a program I'm writing that will run an interactive polling session of some remote resources, and know when to

[Haskell-cafe] Re: Is hGetLine lazy like hGetContents? And what about this todo item?

2010-03-25 Thread Simon Marlow
On 25/03/2010 15:40, Jason Dagit wrote: Hello, I was trying to figure out if hGetLine is safe to use inside of withFile. Specifically, I want to return the line I read and use it later, without inspecting it before withFile calls hClose. If you want to understand the concern I have, look

[Haskell-cafe] Re: Asynchronous exception wormholes kill modularity

2010-03-25 Thread Simon Marlow
On 25/03/2010 11:57, Bas van Dijk wrote: Dear all, (sorry for this long mail) When programming in the IO monad you have to be careful about asynchronous exceptions. These nasty little worms can be thrown to you at any point in your IO computation. You have to be extra careful when doing, what

[Haskell-cafe] Re: Is hGetLine lazy like hGetContents? And what about this todo item?

2010-03-25 Thread Simon Marlow
On 25/03/10 17:07, Jason Dagit wrote: On Thu, 2010-03-25 at 16:13 +, Simon Marlow wrote: On 25/03/2010 15:40, Jason Dagit wrote: Hello, I was trying to figure out if hGetLine is safe to use inside of withFile. Specifically, I want to return the line I read and use it later, without

[Haskell-cafe] Re: Asynchronous exception wormholes kill modularity

2010-03-25 Thread Simon Marlow
On 25/03/10 17:16, Bas van Dijk wrote: On Thu, Mar 25, 2010 at 5:36 PM, Simon Marlowmarlo...@gmail.com wrote: Nice, I hadn't noticed that you can now code this up in the library since we added 'blocked'. Unfortunately this isn't cheap: 'blocked' is currently an out-of-line call to the RTS, so

[Haskell-cafe] Re: Haskell.org re-design

2010-03-29 Thread Simon Marlow
On 28/03/2010 21:44, Christopher Done wrote: This is a post about re-designing the whole Haskell web site. We got a new logo but didn't really take it any further. For a while there's been talk about a new design for the Haskell web site, and there are loads of web pages about Haskell that

[Haskell-cafe] Re: Asynchronous exception wormholes kill modularity

2010-03-29 Thread Simon Marlow
On 26/03/2010 19:51, Isaac Dupree wrote: On 03/25/10 12:36, Simon Marlow wrote: I'd also be amenable to having block/unblock count nesting levels instead, I don't think it would be too hard to implement and it wouldn't require any changes at the library level. Wasn't there a reason

[Haskell-cafe] Re: Haskell.org re-design

2010-03-29 Thread Simon Marlow
On 29/03/2010 13:20, Christopher Done wrote: On 29 March 2010 11:19, Simon Marlowmarlo...@gmail.com wrote: Is the footer necessary? I dislike sites that have too many ways to navigate, and the footer looks superfluous. The footer will probably be off the bottom of the window in any case,

[Haskell-cafe] Re: Garbage collecting pointers

2010-03-29 Thread Simon Marlow
On 26/03/2010 20:28, Mads Lindstrøm wrote: Hi For some time I have been thinking about an idea, which could limit Haskell's memory footprint. I don't know if the idea is crazy or clever, but I would love to hear peoples thoughts about it. The short story is, I propose that the garbage collector

[Haskell-cafe] Shootout update

2010-03-30 Thread Simon Marlow
The shootout (sorry, Computer Language Benchmarks Game) recently updated to GHC 6.12.1, and many of the results got worse. Isaac Gouy has added the +RTS -qg flag to partially fix it, but that turns off the parallel GC completely and we know that in most cases better results can be had by

[Haskell-cafe] Re: GSOC Haskell Project

2010-03-31 Thread Simon Marlow
On 30/03/2010 20:57, Mihai Maruseac wrote: I'd like to introduce my idea for the Haskell GSOC of this year. In fact, you already know about it, since I've talked about it here on the haskell-cafe, on my blog and on reddit (even on #haskell one day). Basically, what I'm trying to do is a new

[Haskell-cafe] Re: Benchmarking and Garbage Collection

2010-03-31 Thread Simon Marlow
On 04/03/2010 22:01, Neil Brown wrote: Jesper Louis Andersen wrote: On Thu, Mar 4, 2010 at 8:35 PM, Neil Brown nc...@kent.ac.uk wrote: CML is indeed the library that has the most markedly different behaviour. In Haskell, the CML package manages to produce timings like this for fairly simple

Re: [Haskell-cafe] Shootout update

2010-03-31 Thread Simon Marlow
On 31/03/2010 16:06, Roman Leshchinskiy wrote: I'm wondering... Since the DPH libraries are shipped with GHC by default are we allowed to use them for the shootout? I don't see why not. *evil grin* Simon Roman On 30/03/2010, at 19:25, Simon Marlow wrote: The shootout (sorry, Computer

Re: [Haskell-cafe] Re: GSOC Haskell Project

2010-04-01 Thread Simon Marlow
sure Simon Marlow could mentor you except maybe if there are too many GHC-related GSoC projects. I could do mentor this as well. Or maybe Max. I don't think finding a mentor will be a problem. I'm not the best person to mentor this project - I did bring it up in the hope that someone would

Re: [Haskell-cafe] Immix GC as a Soc proposal

2010-04-02 Thread Simon Marlow
On 01/04/10 22:19, Thomas Schilling wrote: In my opinion the project would be worthwhile even if it's not in the Top 8. Mentors vote on the accepted projects based both on the priority of the project and the applying student, so it's probably not a bad idea to apply for other projects as well

[Haskell-cafe] Re: Asynchronous exception wormholes kill modularity

2010-04-07 Thread Simon Marlow
On 25/03/2010 23:16, Bas van Dijk wrote: On Thu, Mar 25, 2010 at 11:23 PM, Simon Marlowmarlo...@gmail.com wrote: So I'm all for deprecating 'block' in favor of 'mask'. However what do we call 'unblock'? 'unmask' maybe? However when we have: mask $ mask $ unmask x and these operations have

Re: [Haskell-cafe] Re: Asynchronous exception wormholes kill modularity

2010-04-07 Thread Simon Marlow
On 07/04/2010 16:20, Sittampalam, Ganesh wrote: Simon Marlow wrote: I came to the conclusion that counting nesting layers doesn't solve the problem: the wormhole still exists in the form of nested unmasks. That is, a library function could always escape out of a masked context by writing

[Haskell-cafe] Re: Asynchronous exception wormholes kill modularity

2010-04-07 Thread Simon Marlow
On 07/04/10 21:23, Bas van Dijk wrote: On Wed, Apr 7, 2010 at 5:12 PM, Simon Marlowmarlo...@gmail.com wrote: Comments? I really like this design. One question, are you planning to write the MVar utility functions using 'mask' or using 'nonInterruptibleMask'? As in: withMVar :: MVar a -

[Haskell-cafe] Re: Asynchronous exception wormholes kill modularity

2010-04-08 Thread Simon Marlow
On 07/04/2010 18:54, Isaac Dupree wrote: On 04/07/10 11:12, Simon Marlow wrote: It's possible to mis-use the API, e.g. getUnmask = mask return ...incidentally, unmask a = mask (\restore - return restore) = (\restore - restore a) That doesn't work, as in it can't be used to unmask

Re: [Haskell-cafe] Re: Asynchronous exception wormholes kill modularity

2010-04-09 Thread Simon Marlow
On 09/04/2010 09:40, Bertram Felgenhauer wrote: Simon Marlow wrote: but they are needlessly complicated, in my opinion. This offers the same functionality: mask :: ((IO a - IO a) - IO b) - IO b mask io = do b- blocked if b then io id else block $ io unblock How does

  1   2   3   4   5   6   7   8   9   >