Re[2]: [Haskell-cafe] Re: Windows details

2008-09-12 Thread Bulat Ziganshin
Hello Andrew, Thursday, September 11, 2008, 11:24:24 PM, you wrote: > interestingly, XN seems to make GHC-compiled binary files dramatically > *smaller*... huh??) probably it does `strip` on executable. -optl-s option does the same trick -- Best regards, Bulatmail

[Haskell-cafe] Erroneous package listings in hackage?

2008-09-12 Thread Dougal Stanton
$ cabal update ... $ cabal list | less ... * cairo Latest version installed: 0.9.13 Homepage: http://haskell.org/gtk2hs/ License: BSD3 ... $ cabal install cairo cabal: There is no package named cairo I must admit I was surprised to see a gtk2hs module on Hackage, but not half

Re: [Haskell-cafe] Erroneous package listings in hackage?

2008-09-12 Thread Henk-Jan van Tuyl
On Fri, 12 Sep 2008 13:21:59 +0200, Dougal Stanton <[EMAIL PROTECTED]> wrote: $ cabal update ... $ cabal list | less ... * cairo Latest version installed: 0.9.13 Homepage: http://haskell.org/gtk2hs/ License: BSD3 ... $ cabal install cairo cabal: There is no package named

[Haskell-cafe] Re: darcs hacking sprint, venues confirmed! (25-26 October)

2008-09-12 Thread Eric Kow
On Sat, Sep 06, 2008 at 08:12:04 +0100, Eric Y. Kow wrote: > Earlier I wrote an announcement for the darcs hacking sprint on 25-26 > October. Tonight, I am delighted to announce that we have two venues > confirmed for the sprint and one serious offer. Just to add to that: the Paris venue is now c

[Haskell-cafe] Workshop on Generic Programming: Call for Participation (co-located w/ ICFP08)

2008-09-12 Thread Matthew Fluet (ICFP Publicity Chair)
Dear all, the Workshop on Generic Programming is only a few days away: 20th September 2008 (http://www.regmaster.com/conf/icfp2008.html). ==> Invited talk: The Generic Paradigm ==> Lambert Meertens (Utrecht University) ==> We have reserved 20 minutes for *lightning talks*. If you plan to ==> att

[Haskell-cafe] JSON serialization/deserialization

2008-09-12 Thread ntupel
Dear list members, I try to use Text.JSON (http://hackage.haskell.org/cgi-bin/hackage-scripts/package/json) to serialize and deserialize record types. As I understand it, the data types need to be instances of class JSON. However I have difficulties to come up with a nice implementation of showJSO

[Haskell-cafe] Real World HAppS: Cabalized, Self-Demoing HAppS Tutorial (Version 3)

2008-09-12 Thread Thomas Hartman
I pushed a new version of happs-tutorial to the online demo at http://happstutorial.com:5001 This is also on hackage: cabal install happs-tutorial. (now version 3.) or darcs get http://code.haskell.org/happs-tutorial for the latest The demo/tutorial has the same basic functionality as the last r

Re: [Haskell-cafe] Re: Can you do everything without shared-memory concurrency?

2008-09-12 Thread Robert Greayer
--- On Fri, 9/12/08, Bruce Eckel <[EMAIL PROTECTED]> wrote: > OK, let me throw another idea out here. When Allen Holub > first > explained Actors to me, he made the statement that Actors > prevent > deadlocks. In my subsequent understanding of them, I > haven't seen > anything that would disagree

Re: [Haskell-cafe] mailing list choices?

2008-09-12 Thread Conal Elliott
I think I'll go the route of @haskell.org and gmane. Does anyone have advice about spam protection or other helpful matters? - Conal On Mon, Sep 8, 2008 at 12:42 PM, Alexey Beshenov <[EMAIL PROTECTED]> wrote: > On Monday 08 September 2008 14:33:47 Conal Elliott wrote: > > I want to set up some

Re: [Haskell-cafe] Re: Can you do everything without shared-memory concurrency?

2008-09-12 Thread Bruce Eckel
OK, let me throw another idea out here. When Allen Holub first explained Actors to me, he made the statement that Actors prevent deadlocks. In my subsequent understanding of them, I haven't seen anything that would disagree with that -- as long as you only use Actors and nothing else for parallelis

Re: [Haskell-cafe] Can you do everything without shared-memory concurrency?

2008-09-12 Thread Albert Y. C. Lai
Sebastian Sylvan wrote: For correctness, maybe not, for efficiency, yes definitely! In theory, decades of research and engineering went into shared memory on common hardware, so it should be faster. In practice, you give shared memory to spoiled kids (and seldom encourage them to use other

Re: [Haskell-cafe] mailing list choices?

2008-09-12 Thread Alexey Beshenov
On Friday 12 September 2008 19:37:26 Conal Elliott wrote: > I think I'll go the route of @haskell.org and gmane. Does anyone > have advice about spam protection or other helpful matters? - > Conal For filtering the junk e-mail manually, I recommend listadmin: http://heim.ifi.uio.no/kjetilho/h

Re: [Haskell-cafe] Re: Can you do everything without shared-memory concurrency?

2008-09-12 Thread Sebastian Sylvan
On Fri, Sep 12, 2008 at 4:07 PM, Bruce Eckel <[EMAIL PROTECTED]> wrote: > OK, let me throw another idea out here. When Allen Holub first > explained Actors to me, he made the statement that Actors prevent > deadlocks. In my subsequent understanding of them, I haven't seen > anything that would dis

Re: [Haskell-cafe] JSON serialization/deserialization

2008-09-12 Thread Marc Weber
The trouble: module A data ABC = A { a :: String } | B { a :: String } | C { a :: String } module B data ABC = A { a :: String } | B { a :: String } | C { a :: String } is valid haskell. so how should you know having the serialized String { a : "abc" } wether t

Re: [Haskell-cafe] Haskell and Java

2008-09-12 Thread John Goerzen
On Wed, Sep 10, 2008 at 05:35:20PM -0400, Brian Alliet wrote: > On Wed, Sep 10, 2008 at 02:12:00PM +0200, Marc Weber wrote: > > There used to be. > > http://www.cs.rit.edu/~bja8464/lambdavm/ > > (Last darcs change log entry: > > Sun Oct 21 03:05:20 CEST 2007 Brian Alliet <[EMAIL PROTECTED]> > >

Re: [Haskell-cafe] Re: Windows details

2008-09-12 Thread Andrew Coppin
Bulat Ziganshin wrote: Hello Andrew, Thursday, September 11, 2008, 11:24:24 PM, you wrote: interestingly, XN seems to make GHC-compiled binary files dramatically *smaller*... huh??) probably it does `strip` on executable. -optl-s option does the same trick And what exactly does

Re: [Haskell-cafe] Re: Windows details

2008-09-12 Thread Andrew Coppin
Jeff Zaroyko wrote: Andrew Coppin btinternet.com> writes: Jeff Zaroyko wrote: In theory, you should be able to use mingw's windres tool to produce an object file from the resource definition which you'd link with the rest of your program. Yes, there's a cryptic comment burri

Re: [Haskell-cafe] Haskell and Java

2008-09-12 Thread Neil Bartlett
+1 Due to the commercial environment I work in, there's really no chance of me using Haskell at work unless it runs under JVM or CLR. Brian, consider yourself nagged! And if there's anywhere you need some help, please yell. Neil On Fri, Sep 12, 2008 at 8:44 AM, John Goerzen <[EMAIL PROTECTED]>

Re: [Haskell-cafe] Re: Windows details

2008-09-12 Thread Jonathan Cast
On Fri, 2008-09-12 at 18:07 +0100, Andrew Coppin wrote: > Bulat Ziganshin wrote: > > Hello Andrew, > > > > Thursday, September 11, 2008, 11:24:24 PM, you wrote: > > > > > >> interestingly, XN seems to make GHC-compiled binary files dramatically > >> *smaller*... huh??) > >> > > > > probably

Re[2]: [Haskell-cafe] Re: Windows details

2008-09-12 Thread Bulat Ziganshin
Hello Andrew, Friday, September 12, 2008, 9:07:28 PM, you wrote: >> probably it does `strip` on executable. -optl-s option does the same >> trick >> > And what exactly does a "strip" mean, then? stripping C debugging info, which is useless anyway -- Best regards, Bulat

Re: [Haskell-cafe] Re: Windows details

2008-09-12 Thread Andrew Coppin
Jonathan Cast wrote: On Fri, 2008-09-12 at 18:07 +0100, Andrew Coppin wrote: And what exactly does a "strip" mean, then? Remove the symbol table. And, for C, other debugging information. Historically, I believe, on Unix the distinction between an executable and an object file was wea

Re: [Haskell-cafe] Re: Windows details

2008-09-12 Thread Jonathan Cast
On Fri, 2008-09-12 at 18:35 +0100, Andrew Coppin wrote: > Jonathan Cast wrote: > > On Fri, 2008-09-12 at 18:07 +0100, Andrew Coppin wrote: > > > >> And what exactly does a "strip" mean, then? > >> > > > > Remove the symbol table. And, for C, other debugging information. > > > > Historicall

Re: [Haskell-cafe] Windows console

2008-09-12 Thread Andrew Coppin
Max Bolingbroke wrote: 2008/9/9 Andrew Coppin <[EMAIL PROTECTED]>: Actually, now that I think about it, it would be kind of nice to have a magic package that writes out escape codes or calls the Win32 API depending on which platform your program is compiled on - in the style of System.FilePat

[Haskell-cafe] template haskell -- include a file?

2008-09-12 Thread Jason Dusek
I'd like to use template Haskell to include as a string in a Haskell file. How do I do it? Is there any lengthy documentation with examples for Template Haskell? The pages linked to from `haskell.org` are a little sparse. -- _jsn ___ Haskell-C

Re: [Haskell-cafe] template haskell -- include a file?

2008-09-12 Thread Bulat Ziganshin
Hello Jason, Friday, September 12, 2008, 11:47:44 PM, you wrote: > I'd like to use template Haskell to include as a string in a > Haskell file. How do I do it? TH is a typed macrosystem - you generate special datastructure representing haskell code rather than untyped strings > Is there a

Re: [Haskell-cafe] template haskell -- include a file?

2008-09-12 Thread Alfonso Acosta
On Fri, Sep 12, 2008 at 9:47 PM, Jason Dusek <[EMAIL PROTECTED]> wrote: > I'd like to use template Haskell to include as a string in a > Haskell file. How do I do it? I presume you mean Include a string from the outside world with a IO action (a file, keyborad, etc ...) -- module EmbedStr (embe

Re: [Haskell-cafe] template haskell -- include a file?

2008-09-12 Thread Jason Dusek
Thank you! -- _jsn ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] template haskell -- include a file?

2008-09-12 Thread Jason Dusek
Alfonso Acosta <[EMAIL PROTECTED]> wrote: > Uhm, I only know about > > http://www.haskell.org/haskellwiki/Template_Haskell#Template_Haskell_tutorials_and_papers Oh, I guess I missed the wiki. -- _jsn ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.

Re: [Haskell-cafe] [Fwd: profiling in haskell]

2008-09-12 Thread Vlad Skvortsov
Tim Chevalier wrote: When you build your own code with -prof, GHC automatically links in profiling versions of the standard libraries. However, its profiling libraries were not built with -auto-all (the reason is that adding cost centres interferes with optimization). To build the libraries with

[Haskell-cafe] Text.JSON idiomatic use

2008-09-12 Thread ntupel
As a follow up to my previous JSON serialization post I came up with a first draft of some simple record type serialization/deserialization. What I would like to know is, whether this is the right approach or what better ways there are to make a custom data type an instance of class JSON. Any cha

[Haskell-cafe] do like notation works fine when using ghc head

2008-09-12 Thread Marc Weber
> There is also the combinator approach of Text.Html, which > gives you a syntax similar to (3) but without abusing "do": > > (rootElt ! [xmlns "http://www.w3.org/1999/xhtml";, >lang "en-US" >> xml:lang "en-US"]) $ concatXml > [head $ title $ text "minimal" > ,body $ concatXml >

[Haskell-cafe] Tons of retainers when inserting 611, 756 elements into a Trie

2008-09-12 Thread Denis Bueno
Dear haskell-cafe, I've got an anagram-finder ("puzzler") that uses a "dictionary" datatype, which in turn uses a trie. In src/hs/Main.hs, I create a new dictionary from a word list (a file containing one word per line) and perform a query on it in order to force it to actually load something fro

[Haskell-cafe] uuid package on OS X

2008-09-12 Thread Jason Dusek
The UUID package builds and runs fine on OS X without any need for `e2fsprog` -- just remove the `extra-libs` line from the Cabal file. (Apple put the UUID stuff in `libc`.) Has anyone tried to build it on Windows? -- _jsn |...UUID package...| http://hackage.haskell.org/cgi-bin/hackage

Re: [Haskell-cafe] [Fwd: profiling in haskell]

2008-09-12 Thread Tim Chevalier
On Fri, Sep 12, 2008 at 2:30 PM, Vlad Skvortsov <[EMAIL PROTECTED]> wrote: > How do I figure out what exactly in 'serialize' takes so much time? > At this point, I don't know any more -- I can't see what inherited costs serialize could have that don't come from one of the cost centres you've inser

Re: [Haskell-cafe] Erroneous package listings in hackage?

2008-09-12 Thread Duncan Coutts
On Fri, 2008-09-12 at 14:18 +0200, Henk-Jan van Tuyl wrote: > On Fri, 12 Sep 2008 13:21:59 +0200, Dougal Stanton > > $ cabal list | less > > ... > > * cairo > > Latest version installed: 0.9.13 > > Homepage: http://haskell.org/gtk2hs/ > > License: BSD3 > > ... > > $ cabal i

[Haskell-cafe] random colors, stack space overflow, mersenne and mersenne.pure64

2008-09-12 Thread Cetin Sert
Hi, The following piece of code runs just fine, if I say: instance Random RGB where random = color randomR = colorR instead of: instance Random RGB where random = color2 randomR = colorR When I use random = color2 I encounter a stack space overflow: [EMAIL PROTECTED]:~/lab/test/col

Re: [Haskell-cafe] random colors, stack space overflow, mersenne and mersenne.pure64

2008-09-12 Thread Don Stewart
cetin.sert: > random = color2 > randomR = colorR > >color2 :: RandomGen g .$B"M.(B g .$B"*.(B (RGB,g) >color2 = colorR (minRGB,maxRGB) > >color :: RandomGen g .$B"M.(B g .$B"*.(B (RGB,g) >color s0 = ((r,g,b),s3) > where ^^ There's some corruption in this

Re: [Haskell-cafe] random colors, stack space overflow, mersenne and mersenne.pure64

2008-09-12 Thread Cetin Sert
Oh, hi *^o^* mersenne.pure64 http://sert.homedns.org/lab/colors/var2.hs mersenne http://sert.homedns.org/lab/colors/var.hs the problem seems to be with the definition of colorR in var2.hs CS 2008/9/13 Don Stewart <[EMAIL PROTECTED]> > cetin.sert: > > random = color2 > > randomR = c

Re: [Haskell-cafe] random colors, stack space overflow, mersenne and mersenne.pure64

2008-09-12 Thread Don Stewart
Oh, you've got unicode source. What's the flag to get this to actually compile? (Note to readers, using extensions , you should always include the LANGUAGE pragmas required to build the file when asking for help :) How are you compiling this? -- Don cetin.sert: >Oh, hi *^o^* > >mersenne

Re: [Haskell-cafe] random colors, stack space overflow, mersenne and mersenne.pure64

2008-09-12 Thread Bertram Felgenhauer
Cetin Sert wrote: [snip] > colorR :: RandomGen g ⇒ (RGB,RGB) → g → (RGB,g) > colorR ((a,b,c),(x,y,z)) s0 = ((r,g,b),s3) > where > (r,s1) = q (a,x) s0 > (g,s2) = q (b,y) s1 > (b,s3) = q (c,z) s2 > q = randomR Look closely at how you use the variable 'b'. HTH, Bertram ___

Re: [Haskell-cafe] random colors, stack space overflow, mersenne and mersenne.pure64

2008-09-12 Thread Cetin Sert
Oh, sorry... ^__^" ghc -fglasgow-exts -O2 --make var ghc -fglasgow-exts -O2 --make var2 I've not used pragmas in any source file o_O so far... should go fix that sometime. Thanks for reminding... Using ghc 6.8.3, mersenne-random-0.1.3 and mersenne-random-pure64-0.2.0.2. (Cause I could not find o

Re: [Haskell-cafe] random colors, stack space overflow, mersenne and mersenne.pure64

2008-09-12 Thread Don Stewart
bertram.felgenhauer: > Cetin Sert wrote: > [snip] > > colorR :: RandomGen g ⇒ (RGB,RGB) → g → (RGB,g) > > colorR ((a,b,c),(x,y,z)) s0 = ((r,g,b),s3) > > where > > (r,s1) = q (a,x) s0 > > (g,s2) = q (b,y) s1 > > (b,s3) = q (c,z) s2 > > q = randomR > > Look closely at how you use t

Re: [Haskell-cafe] random colors, stack space overflow, mersenne and mersenne.pure64

2008-09-12 Thread Cetin Sert
Oh thank you both *^o^*... now works like a charm again. Btw, Cetin, this is good practice, along with -funbox-strict-fields: data RGB = RGB !Int !Int !Int deriving Show Much better code than using a lazy triple. Where can I read more of such good practice? Looking forward to Real Wor

Re: [Haskell-cafe] random colors, stack space overflow, mersenne and mersenne.pure64

2008-09-12 Thread Don Stewart
cetin.sert: >Where can I read more of such good practice? Looking forward to Real World >Haskell to read lots of code, hope it'll help lots of people interested in >learning haskell. (Will be released around Christmas here in Germany, I >think.) Yeah, that's right. November some ti

Re: [Haskell-cafe] random colors, stack space overflow, mersenne and mersenne.pure64

2008-09-12 Thread Brandon S. Allbery KF8NH
On 2008 Sep 12, at 21:57, Don Stewart wrote: cetin.sert: random = color2 randomR = colorR color2 :: RandomGen g .$B"M.(B g .$B"*.(B (RGB,g) color2 = colorR (minRGB,maxRGB) color :: RandomGen g .$B"M.(B g .$B"*.(B (RGB,g) color s0 = ((r,g,b),s3) where There's some corrupt

Re: [Haskell-cafe] Windows console

2008-09-12 Thread Curt Sampson
On 2008-09-12 20:29 +0100 (Fri), Andrew Coppin wrote: > Looks like the only thing it doesn't do is let you change the title > on the console window. (Because, obviously, that's only possible on > Windows.) Right. Unless you send an ^[^H]0;foo^G sequence (^[ being ESC) to your xterm. You'll find t

Re: [Haskell-cafe] random colors, stack space overflow, mersenne and mersenne.pure64

2008-09-12 Thread Cetin Sert
main :: IO () main = do as <- getArgs mt <- newPureMT let colors = randomRs (lo,hi) mt :: [RGB] print $ zip tx cs where lo = read $ as !! 0 hi = read $ as !! 1 tx =as !! 2 Why is as not visible in the where block? 2008/9/13 Brandon S. Allbery KF8NH <[EMAIL PROTECTED]

[Haskell-cafe] Hackage needs a theme song!

2008-09-12 Thread Jason Dagit
I realized tonight that Hackage needs a theme song. Here is my attempt at it, apologies to Jefferson Starship: We built this hackage, We built this hackage on lambda and types Say you don't know me, or the parameters I pass Say you don't care who instances this type class Knee deep in the thunk,

Re: [Haskell-cafe] random colors, stack space overflow, mersenne and mersenne.pure64

2008-09-12 Thread Don Stewart
cetin.sert: >main :: IO () >main = do > as <- getArgs > mt <- newPureMT > let colors = randomRs (lo,hi) mt :: [RGB] > print $ zip tx cs > where >lo = read $ as !! 0 >hi = read $ as !! 1 >tx =as !! 2 >Why is as not visible in the

Re: [Haskell-cafe] random colors, stack space overflow, mersenne and mersenne.pure64

2008-09-12 Thread Jason Dagit
On Fri, Sep 12, 2008 at 8:53 PM, Don Stewart <[EMAIL PROTECTED]> wrote: > cetin.sert: > >>main :: IO () >>main = do >> as <- getArgs >> mt <- newPureMT >> let colors = randomRs (lo,hi) mt :: [RGB] >> print $ zip tx cs >> where >>lo = read $ as !! 0 >>

[Haskell-cafe] ANN: Twidge

2008-09-12 Thread John Goerzen
Hi folks, I've released Twidge, a command-line Twitter and Identi.ca client, written -- of course -- in Haskell. I'm pretty excited about it, but then hey, I'm biased. Anyhow, it's available from Hackage or from the homepage at: http://software.complete.org/twidge I've also got links to its (

Re: [Haskell-cafe] Windows console

2008-09-12 Thread Brandon S. Allbery KF8NH
On 2008 Sep 12, at 22:29, Curt Sampson wrote: On 2008-09-12 20:29 +0100 (Fri), Andrew Coppin wrote: Looks like the only thing it doesn't do is let you change the title on the console window. (Because, obviously, that's only possible on Windows.) Right. Unless you send an ^[^H]0;foo^G sequence