[Haskell-cafe] Re: DDC compiler and effects; better than Haskell?

2009-08-16 Thread Artem V. Andreev
John A. De Goes j...@n-brain.net writes: On Aug 15, 2009, at 6:36 AM, Jason Dusek wrote: 2009/08/14 John A. De Goes j...@n-brain.net: Hmmm, my point (perhaps I wasn't clear), is that different effects have different commutability properties. In the case of a file system, you can commute two

Re: [Haskell-cafe] why does the binary library require so much memory?

2009-08-16 Thread Alex Mason
Hi Don, I was wondering if perhaps this might be a slightly better instance for Binary [a], that might solve a) the problem of having to traverse the entire list first, and b) the list length limitation of using length and Ints. My version is hopefully a little more lazy (taking maxBound

Re: [Haskell-cafe] GSoC profiling project to be wrapped up

2009-08-16 Thread Johan Tibell
2009/8/14 Patai Gergely patai_gerg...@fastmail.fm: I finally uploaded the profiling tools to Hackage. The package names are hp2any-{core,graph,manager}. The first two should be possible to install right away, while the manager needs Gtk2Hs. A bit more on the project and this update at

Re: [Haskell-cafe] qsort

2009-08-16 Thread Gwern Branwen
On Sat, Aug 15, 2009 at 12:09 PM, Daniel Fischerdaniel.is.fisc...@web.de wrote: It compiles as is, and if it satisfies readability requirements, somebody can put it on the wiki. http://www.haskell.org/haskellwiki/?title=Introduction%2FDirect_Translationdiff=29575oldid=21061 I've done so;

Re: [Haskell-cafe] ANN: Haddock version 2.5.0

2009-08-16 Thread David Waern
2009/8/16 por...@porg.es: George Porges s/Porges/Pollard/; Porges is just an alias :) Oh, sorry about that! I tried to google on your email address but didn't find anything, so I assumed Porges was your surname. I should start sending out my release notes for revivew ;-) David

Re: [Haskell-cafe] Re: DDC compiler and effects; better than Haskell?

2009-08-16 Thread Marcin Kosiba
On Sunday 16 August 2009, Artem V. Andreev wrote: John A. De Goes j...@n-brain.net writes: On Aug 15, 2009, at 6:36 AM, Jason Dusek wrote: 2009/08/14 John A. De Goes j...@n-brain.net: Hmmm, my point (perhaps I wasn't clear), is that different effects have different commutability

[Haskell-cafe] Calling function with unknown number and type arguments

2009-08-16 Thread Maciej Piechotka
I have to write a function which calls a function with unknown (i.e. given in runtime) number and type of arguments. 1. Use closure implementation from Gtk2Hs. Pros: Written Cons: Not in haskell 2. Use unsafeCoerce. Something like: f a b = return (a + b) f' = unsafeCoerce (f :: Int - Int - IO

[Haskell-cafe] Blank definition list in haddock

2009-08-16 Thread Maurí­cio CA
I read in haddock documentation that we write definition lists like this: -- [...@something@] Definition of something. However, using that structure to document many itens, I get a blank list of definitions, like you can see in this section ('Macros') of the documentation for a package of

Re: [Haskell-cafe] Re: DDC compiler and effects; better than Haskell?

2009-08-16 Thread John A. De Goes
I forgot about links. In that case, consider: getUniqueFilesInDirRecursive. Attacking irrelevant details in an argument is often called a strawman attack. Such attacks are pointless because they do not address the real substance of the issue. My example is easily modified to avoid the

Re: [Haskell-cafe] Blank definition list in haddock

2009-08-16 Thread David Waern
2009/8/16 Maurí­cio CA mauricio.antu...@gmail.com: I read in haddock documentation that we write definition lists like this: -- �...@something@] Definition of something. However, using that structure to document many itens, I get a blank list of definitions, like you can see in this

Re: [Haskell-cafe] Re: DDC compiler and effects; better than Haskell?

2009-08-16 Thread John A. De Goes
I chose this example specifically because parsing/compiling is not IO- bound. Many build systems today achieve multi-core scaling by parallelizing all the phases: parsing, semantic analysis, and compilation. Your question is a good one and one we face already in auto- parallelization of

Re: DDC compiler and effects; better than Haskell? (was Re: [Haskell-cafe] unsafeDestructiveAssign?)

2009-08-16 Thread John A. De Goes
On Aug 15, 2009, at 5:32 PM, Sebastian Sylvan wrote: On Sun, Aug 16, 2009 at 12:18 AM, John A. De Goes j...@n-brain.net wrote: You must think I'm arguing for some kind of low-level analog of C, augmented with an effect system. I'm not. You can't do that. No, I don't. I think you're arguing

Re: [Haskell-cafe] Request for Comments - hscurrency 0.0.1

2009-08-16 Thread Max Cantor
@Jason I'm not sure what you mean about exposing the type information. Unless you mean that each currency would be a separate type somehow. While this is a similar problem to the dimensional issue, the problem is that the FX rates are changing all the time. While the conversion between a

Re: DDC compiler and effects; better than Haskell? (was Re: [Haskell-cafe] unsafeDestructiveAssign?)

2009-08-16 Thread Sebastian Sylvan
On Sun, Aug 16, 2009 at 2:50 PM, John A. De Goes j...@n-brain.net wrote: On Aug 15, 2009, at 5:32 PM, Sebastian Sylvan wrote: On Sun, Aug 16, 2009 at 12:18 AM, John A. De Goes j...@n-brain.net wrote: You must think I'm arguing for some kind of low-level analog of C, augmented with an

Re: [Haskell-cafe] Re: DDC compiler and effects; better than Haskell?

2009-08-16 Thread Artem V. Andreev
John A. De Goes j...@n-brain.net writes: I forgot about links. In that case, consider: getUniqueFilesInDirRecursive. Attacking irrelevant details in an argument is often called a strawman attack. Such attacks are pointless because they do not address the real substance of the issue. My

[Haskell-cafe] simple hsql question

2009-08-16 Thread Alexander Kotelnikov
Hi I wanted to see what access to databases HSQL provides and I stumbled in the very beginning. Assume I have a table map1 with attributes i and s interger and varchar() respectively. The following code fails (with segfault) for me. And I see no other way to tell compiler that I am expecting an

Re: [Haskell-cafe] Calling function with unknown number and type arguments

2009-08-16 Thread Brandon S. Allbery KF8NH
On Aug 16, 2009, at 06:45 , Maciej Piechotka wrote: I have to write a function which calls a function with unknown (i.e. given in runtime) number and type of arguments. Take a look at the implementation of Text.Printf. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell]

[Haskell-cafe] Re: Blank definition list in haddock

2009-08-16 Thread Maurí­cio CA
I read in haddock documentation that we write definition lists like this: [...] Did I used those definitons the wrong way? I think the problem is that you have written normal comments instead of Haddock comments. Try adding a | in front of the paragraphs, or just merge them all into one

Re: [Haskell-cafe] Calling function with unknown number and type arguments

2009-08-16 Thread Sean Leather
On Sun, Aug 16, 2009 at 17:00, Brandon S. Allbery wrote: On Aug 16, 2009, at 06:45 , Maciej Piechotka wrote: I have to write a function which calls a function with unknown (i.e. given in runtime) number and type of arguments. Take a look at the implementation of Text.Printf. Or

[Haskell-cafe] Re: [Haskell] ANNOUNCE: GLUT 2.2.1.0

2009-08-16 Thread Rafael Gustavo da Cunha Pereira Pinto
Thanks Sven! BTW, as an enhancement for 2.2.2.0, you could treat unnamed mouse buttons. Mouses with more axis and more buttons are becoming increasingly common, and unmarshalMouseButton is not prepared to accept them!! Here are exceptions I caught, playing with my Genius Traveler 515 mouse:

[Haskell-cafe] Request for comments - hdnsomatic

2009-08-16 Thread Jesús Alberto Sánchez Pimienta
Hello haskellers, I just finished my first useful haskell program and I'd be glad if you make me some comments http://hpaste.org/fastcgi/hpaste.fcgi/view?id=8244#a8244 Thank you, and sorry for my english. Piensa y trabaja Jesús Alberto Sánchez Pimienta Estudiante de la Lic. en Estudios

Re: [Haskell-cafe] Request for comments - hdnsomatic

2009-08-16 Thread Neil Mitchell
Hi An easy way to get some instant feedback is to run HLint on it: http://community.haskell.org/~ndm/hlint The results are: C:\Neil\hlinthlint Example.hs Example.hs:42:1: Warning: Use liftM Found: readFile p = return . lines = return . map (second tail . break (== '=') . filter (/= ' '))

Re: [Haskell-cafe] Request for comments - hdnsomatic

2009-08-16 Thread Jesús Alberto Sánchez Pimienta
Many Thanks Neil, I tried to build hlint before submitting to the mail list but i couldn't because my haskell-src-exts is version 1.1.1 and the cabal file of hlint requires a version 1.1. Now i modified the cabal depends and successfully installed hlint, it's a great tool. Piensa y trabaja

Re: DDC compiler and effects; better than Haskell? (was Re: [Haskell-cafe] unsafeDestructiveAssign?)

2009-08-16 Thread Richard O'Keefe
On Aug 15, 2009, at 2:55 PM, John A. De Goes wrote: If you don't like the file system, consider mutable memory. An effect system will tell me I can safely update two pieces of non- overlapping, contiguous memory concurrently, even in different threads if the complexity so justifies it. The

Re: [Haskell-cafe] Calling function with unknown number and type arguments

2009-08-16 Thread Antoine Latter
On Sun, Aug 16, 2009 at 3:07 PM, Sean Leatherleat...@cs.uu.nl wrote: On Sun, Aug 16, 2009 at 17:00, Brandon S. Allbery wrote: On Aug 16, 2009, at 06:45 , Maciej Piechotka wrote: I have to write a function which calls a function with unknown (i.e. given in runtime) number and type of

Re: DDC compiler and effects; better than Haskell? (was Re: [Haskell-cafe] unsafeDestructiveAssign?)

2009-08-16 Thread John A. De Goes
In the presence of _uncontrolled concurrency_, you are correct, but uncontrolled concurrency is a failed paradigm littered with defective software. Regards, John A. De Goes N-Brain, Inc. The Evolution of Collaboration http://www.n-brain.net|877-376-2724 x 101 On Aug 16, 2009, at

Re: [Haskell-cafe] Request for Comments - hscurrency 0.0.1

2009-08-16 Thread jeff p
Hello, To let the type checker do some work for you, without getting all the way into the territory of the dimensional package, you can use newtypes and a Units class with methods for wrapping and unwrapping Doubles; we use this approach at work and find it strikes a nice balance between useful

[Haskell-cafe] Uncontrolled Concurrency, isn't that concept now thread-bare?

2009-08-16 Thread Casey Hawthorne
-- Regards, Casey ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Calling function with unknown number and type arguments

2009-08-16 Thread Dan Doel
On Sunday 16 August 2009 8:35:19 pm Antoine Latter wrote: But with those, the number of arguments is still known at compile time, correct? {-# LANGUAGE Rank2Types #-} import Text.Printf import System.Environment nprintf :: PrintfType t = Int - Int - t nprintf n e = aux (printf str) n where

Re: [Haskell-cafe] Calling function with unknown number and type arguments

2009-08-16 Thread Antoine Latter
On Sun, Aug 16, 2009 at 8:50 PM, Dan Doeldan.d...@gmail.com wrote: On Sunday 16 August 2009 8:35:19 pm Antoine Latter wrote: But with those, the number of arguments is still known at compile time, correct? snip! % ./Var 2 5 55 % ./Var 6 5 55 Voila. Ah! Very nice. Antoine

[Haskell-cafe] ANNOUNCE: compose-trans-0.0

2009-08-16 Thread Miguel Mitrofanov
Just uploaded compose-trans-0.0 to Hackage. 'compose-trans' is a small library intended to make monad transformers composable. It provides a class TransM, derived from MonadTrans, which is closed under composition - that is, if t1 and t2 are instances of TransM, then (t2 :. t1) is also an