Re: [Haskell-cafe] Greetings! 2D Graphics?

2009-12-03 Thread Eugene Kirpichov
2009/12/4 M Xyz > Greetings, my name is M. This is my first time posting to a mailing list so > forgive me if I've done something wrong. I just finished "Real World > Haskell" and am currently working through "School of Expression". I am new > to Haskell but I already love it. My question is this

[Haskell-cafe] Greetings! 2D Graphics?

2009-12-03 Thread M Xyz
Greetings, my name is M. This is my first time posting to a mailing list so forgive me if I've done something wrong. I just finished "Real World Haskell" and am currently working through "School of Expression". I am new to Haskell but I already love it. My question is this...  I am interested

Re: [Haskell-cafe] Is Haskell a Fanatic?

2009-12-03 Thread Joe Fredette
The Mayan's Set 'em up, Haskellers knock them down... On Dec 4, 2009, at 1:36 AM, Evan Laforge wrote: I'd just like to point out or reiterate the odd rise in trolling and the recent announcements of haskell-2010... Just wait until haskell-2012 is announced with nonexistential aka eschatolo

Re: [Haskell-cafe] Is Haskell a Fanatic?

2009-12-03 Thread Evan Laforge
> I'd just like to point out or reiterate the odd rise in trolling and the > recent announcements of haskell-2010... Just wait until haskell-2012 is announced with nonexistential aka eschatological types spelled "notany a. World". It evaluates to a new form of bottom that blackholes the entire wo

Re: [Haskell-cafe] GHC magic optimization ?

2009-12-03 Thread Miguel Mitrofanov
I will take an example: f x y= x+y The program ask the user to enter two numbers and print the sum. If the user enter "1 2" "f 1 2=3" is stored and a gargage collector is used to remove this dandling expression later ? It's not stored in any way. If the user enter again "1 2", ghc searc

Re: [Haskell-cafe] Is Haskell a Fanatic?

2009-12-03 Thread Dan Colish
On Thu, Dec 3, 2009 at 9:01 PM, Brandon S. Allbery KF8NH < allb...@ece.cmu.edu> wrote: > > 2009/12/03 Brandon S. Allbery KF8NH : >> >> This "troll" was, apparently, invited by one of the Simons >>> onto the Haskell' list, then asked to move his spiels here. >>> >> > > I am informed that the "inv

Re: [Haskell-cafe] Is Haskell a Fanatic?

2009-12-03 Thread Brandon S. Allbery KF8NH
2009/12/03 Brandon S. Allbery KF8NH : This "troll" was, apparently, invited by one of the Simons onto the Haskell' list, then asked to move his spiels here. I am informed that the "invitation" I was referring to was actually about his being invited *out*, not in, so his origin is still a

Re: [Haskell-cafe] Re: Implicit newtype unwrapping

2009-12-03 Thread Antoine Latter
On Thu, Dec 3, 2009 at 9:10 PM, Antoine Latter wrote: > On Thu, Dec 3, 2009 at 6:00 PM, Joachim Breitner > wrote: >> >> But when I uncommented the definition of toFoo and fromfoo, I got: >> >> Demo.hs:11:9: >>    Couldn't match expected type `Foo' against inferred type `Int' >>    In the expressi

Re: [Haskell-cafe] GHC magic optimization ?

2009-12-03 Thread Evan Laforge
> I will take an example: > > f x y= x+y > > The program ask the user to enter two numbers and print the sum. If the > user enter "1 2" "f 1 2=3" is stored and a gargage collector is used to > remove this dandling expression later ? > If the user enter again "1 2", ghc search in dandling results to

Re: [Haskell-cafe] inotify-alike for mac os x?

2009-12-03 Thread Gregory Collins
Conal Elliott writes: > I'd like to make some FRPish toys that keep files updated to have > functional relationships with other files.  hinotify looks like just > the sort of underlying magic I could use for efficient implementation > on linux.  Is there any support for mac os x?  Could support b

[Haskell-cafe] inotify-alike for mac os x?

2009-12-03 Thread Conal Elliott
I'd like to make some FRPish toys that keep files updated to have functional relationships with other files. hinotify looks like just the sort of underlying magic I could use for efficient implementation on linux. Is there any support for mac os x? Could support be either added to hinotify or ma

Re: [Haskell-cafe] Re: Implicit newtype unwrapping

2009-12-03 Thread Antoine Latter
On Thu, Dec 3, 2009 at 6:00 PM, Joachim Breitner wrote: > > But when I uncommented the definition of toFoo and fromfoo, I got: > > Demo.hs:11:9: >    Couldn't match expected type `Foo' against inferred type `Int' >    In the expression: id >    In the definition of `toFoo': toFoo = id >    In the

Re: [Haskell-cafe] I miss OO

2009-12-03 Thread Brandon S. Allbery KF8NH
On Dec 3, 2009, at 20:03 , Matthias Görgens wrote: When OO is about constructing a "machine" and talking about objects, and FP is about making little algebraic languages, what would C or Pascal be like? In these languages, you don't think about objects, but you don't think about an algebra eit

[Haskell-cafe] Monomorphic local let bindings and GHCi

2009-12-03 Thread Miran Lipovača
Hi! There have been proposals to abandon generalisation for local let bindings because they make specifying and implementing the type system very complicated when extensions like multi parameter type classes, type functions and GADTs are taken into consideration. I agree with what the paper

Re: [Haskell-cafe] Is Haskell a Fanatic?

2009-12-03 Thread Brandon S. Allbery KF8NH
On Dec 3, 2009, at 21:22 , Brandon S. Allbery KF8NH wrote: Haskell" screeds, it sounds more like some kind of religious "truth". I.e. the "fanatic" arrow's pointing the wrong way, as far as I can tell. I also have trouble understanding how a programming language can be a fanatic. Or how

Re: [Haskell-cafe] Is Haskell a Fanatic?

2009-12-03 Thread Brandon S. Allbery KF8NH
On Dec 3, 2009, at 13:14 , Stefan Holdermans wrote: John, Miguel (and others), Don Stewart wrote, "the guarantees of purity the type system provides are extremely useful for verification purposes". My response to this is in theory. This is what caught my attention initially, but the langua

Re: [Haskell-cafe] GHC magic optimization ?

2009-12-03 Thread Emmanuel CHANTREAU
Hello First, thank you for all answers. Le Thu, 03 Dec 2009 18:58:33 +0300, Miguel Mitrofanov a écrit : > Does this really mean that you want to know how the garbage collector > works? Well, I try to understand your question... I will take an example: f x y= x+y The program ask the user to

Re: [Haskell-cafe] Finding HP

2009-12-03 Thread Brandon S. Allbery KF8NH
On Dec 3, 2009, at 11:43 , Don Stewart wrote: vandijk.roel: On Wed, Dec 2, 2009 at 11:44 PM, Gregory Crosswhite wrote: On a more serious note, "Download Haskell" /= "Download Haskell Platform", so if I were glancing down the sidebar looking for a link to download the "Haskell Platform" then

Re: [Haskell-cafe] Wikipedia article

2009-12-03 Thread Gwern Branwen
On Thu, Dec 3, 2009 at 6:36 PM, Don Stewart wrote: > marlowsd: >> As noted before, the Wikipedia article for Haskell is a disorganised mess. >> >> http://en.wikipedia.org/wiki/Haskell_%28programming_language%29 >> >> earlier this year, dons suggested reorganising it and posted a template >> on the

Re: [Haskell-cafe] I miss OO

2009-12-03 Thread Matthias Görgens
> When OO is about constructing a "machine" and talking about objects, > and FP is about making little algebraic languages, what would C or > Pascal be like? In these languages, you don't think about objects, but > you don't think about an algebra either? It's been a very long time > since I worked

Re: [Haskell-cafe] Optimization with Strings ?

2009-12-03 Thread Luke Palmer
On Thu, Dec 3, 2009 at 12:21 PM, Alberto G. Corona wrote: > " In fact, the correct answer is that pEqualsP should produce an error and > qEqualsQ should never terminate" > > ¿¿??? > should? or you want to say "actually do that so the optimization does is not > done"? > The correct amswer is not th

Re: [Haskell-cafe] Optimization with Strings ?

2009-12-03 Thread wren ng thornton
David Menendez wrote: Alec Berryman wrote: I don't know of a library to intern strings, but it's not too hard to implement. I couldn't find the code I wrote to do this, but I looked around a bit and this is about what I remember doing: http://www.haskell.org/pipermail/haskell-cafe/2005-June/01

Re: [Haskell-cafe] I miss OO

2009-12-03 Thread Matthias Görgens
> It would be fantastic to have a little practical real-world challenge > (like building a simple music system, or a simple multi-channel sound > mixer), and work this out in an imperative language, an > object-oriented language, a functional language, and maybe other > languages too, like logic la

Re: [Haskell-cafe] Beginner's speed problem

2009-12-03 Thread Daniel Fischer
Am Donnerstag 03 Dezember 2009 06:52:01 schrieb Aditya M: > Hello > > Thanks for all the help! > > I only have a couple of questions. > > On Thu, Dec 3, 2009 at 03:45, Daniel Fischer wrote: > > Am Mittwoch 02 Dezember 2009 22:44:01 schrieb Don Stewart: > >> aditya87: > >> > Hi, > >> > > >> > I am

Re: [Haskell-cafe] Are there standard idioms for lazy, pure error handling?

2009-12-03 Thread wren ng thornton
Duncan Coutts wrote: I've got an open mind on the suggestion to amalgamate the two ways the list could end. I'm not especially in favour of generalising for the sake of generalising, especially if it looses the connection to the notion of annotating your "ordinary" data structure with extra error

Re: [Haskell-cafe] Re: Implicit newtype unwrapping

2009-12-03 Thread Joachim Breitner
Hi, Am Donnerstag, den 03.12.2009, 22:39 +0100 schrieb Joachim Breitner: > Nice, and close. It seems it does not handle the datatype in arbitrary > positions in the type (as in Foo -> ( a -> Either Foo ())) -> (Foo, > ())). But thanks for the pointer. Maybe I should give it a shot. I started to

Re: [Haskell-cafe] Wikipedia article

2009-12-03 Thread Don Stewart
marlowsd: > As noted before, the Wikipedia article for Haskell is a disorganised mess. > > http://en.wikipedia.org/wiki/Haskell_%28programming_language%29 > > earlier this year, dons suggested reorganising it and posted a template > on the Haskell wiki: > > http://haskell.org/haskellwiki/Wikipedi

[Haskell-cafe] Wikipedia article

2009-12-03 Thread Simon Marlow
As noted before, the Wikipedia article for Haskell is a disorganised mess. http://en.wikipedia.org/wiki/Haskell_%28programming_language%29 earlier this year, dons suggested reorganising it and posted a template on the Haskell wiki: http://haskell.org/haskellwiki/WikipediaArticleDesign I've m

Re: [Haskell-cafe] Is Haskell a Fanatic?

2009-12-03 Thread Stefan Holdermans
So long as we bastardize the bard, we best bastardize him fully! :) If only we could claim: Though this be madness, yet there is method in 't. Cheers, Stefan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/l

Re: [Haskell-cafe] Is Haskell a Fanatic?

2009-12-03 Thread Stefan Holdermans
To feed, or not to feed: that is the question: Whether 'tis nobler in the mind to suffer The quips and ramblings of outrageous trolling, Or to take arms against a sea of nonsense, And by opposing end them? Brilliant. Just brilliant. +1 Cheers, Stefan

Re: [Haskell-cafe] happstack homepage

2009-12-03 Thread Jeremy Shaw
Hello, See this thread, http://groups.google.com/group/happs/browse_thread/thread/6e4d6af0109cc649 - jeremy On Dec 3, 2009, at 9:30 AM, Roel van Dijk wrote: I noticed that happstack.com and tutorial.happstack.com are both equal to patch-tag.com. Google's cache has the original pages. Is this

[Haskell-cafe] SYB <> very, very mysteriously

2009-12-03 Thread Jeremy Shaw
I have the following program which loops under GHC 6.10.4: http://www.hpaste.org/fastcgi/hpaste.fcgi/view?id=13561#a13561 {-# LANGUAGE DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses, UndecidableInstances #-} module Main where import qualified Data.Data as Data import Data.Typea

Re: [Haskell-cafe] Finding HP

2009-12-03 Thread Don Stewart
malcolm.wallace: > The suggestion was to have a single Download button, leading to a *page* > of suitably described links, allowing the user to choose whether they > only wanted the basics (a choice of compiler/interpreter + cabal), or the > whole Platform, or something else. It would be the id

Re: [Haskell-cafe] Finding HP

2009-12-03 Thread Malcolm Wallace
It would perhaps be better to have one nice big "Download" button that takes you to a separate download page. Having a single download link that only points to the Haskell Platform would be a bit of a policy shift. ... but that was *not* what was suggested. The suggestion was to have a sing

Re: [Haskell-cafe] Data.Binary and error handling

2009-12-03 Thread Alexey Khudyakov
On Fri, Nov 27, 2009 at 10:36 PM, Mark Lentczner wrote: > I'm in the same quandary: > > Data.Binary from the binary package has no error handling > Data.Serialize from the cereal package uses only strict ByteString > > I was going to add error handling to Binary as a weekend project (it isn't > t

[Haskell-cafe] New Hackage category: Error Handling

2009-12-03 Thread Gregory Crosswhite
Hey everyone, When I uploaded my new package, "error-message", I also went ahead and created a new category: "Error Handling". I did this because there are a number of packages related to this issue, so it might be helpful to have them presented together in one place. Thus, if you have or ar

[Haskell-cafe] ANNOUNCE: error-message

2009-12-03 Thread Gregory Crosswhite
If there is one thing that we really don't have enough of in Haskell, it is *ways to handle errors*! Thus, I am pleased to announce the release of the "error-message" package to help in filling this, erm, gap. This philosophy behind this package is that it is often better to find out all of th

Re: [Haskell-cafe] Re: Implicit newtype unwrapping

2009-12-03 Thread Joachim Breitner
Hi, Am Donnerstag, den 03.12.2009, 10:22 -0800 schrieb yair...@gmail.com: > > I guess TH could probably do this. > > I think this does what you wish for: > http://hackage.haskell.org/packages/archive/peakachu/0.2/doc/html/Data-Newtype.html > > Example: > > $(mkWithNewtypeFuncs [2] ''ZipList) > >

Re: [Haskell-cafe] Implicit newtype unwrapping

2009-12-03 Thread David Menendez
On Wed, Dec 2, 2009 at 7:16 PM, Martijn van Steenbergen wrote: > So here's a totally wild idea Sjoerd and I came up with. > > What if newtypes were unwrapped implicitly? As several have suggested, this creates ambiguity. But it might be handy to have a way to declare a scope in which the newtype

Re: [Haskell-cafe] Implicit newtype unwrapping

2009-12-03 Thread Joachim Breitner
Hi, Am Donnerstag, den 03.12.2009, 13:03 -0500 schrieb David Menendez: > On Thu, Dec 3, 2009 at 6:28 AM, Joachim Breitner > wrote: > > Am Donnerstag, den 03.12.2009, 11:13 + schrieb Matthew Pocock: > >> Perhaps what you are looking for is a more powerful "defining" > >> semantics? > >> > >> n

Re: [Haskell-cafe] Is Haskell a Fanatic?

2009-12-03 Thread Ketil Malde
Daniel Fischer writes: > To feed, or not to feed: that is the question: Out, out, brief troll! This is certainly a thread that's full of sound and fury, but (or so I'm afraid) signifying nothing. :-) -k -- If I haven't seen further, it is by standing in the footprints of giants _

Re: [Haskell-cafe] Card games

2009-12-03 Thread Tom Tobin
On Thu, Dec 3, 2009 at 2:29 PM, Daniel Fischer wrote: > Am Donnerstag 03 Dezember 2009 21:24:11 schrieb Tom Tobin: >> On Thu, Dec 3, 2009 at 1:37 PM, Daniel Fischer >> wrote: >> > Am Donnerstag 03 Dezember 2009 19:23:24 schrieb Tom Tobin: >> >> No, I'm still trying to tune a "partitionM" functio

Re: [Haskell-cafe] Card games

2009-12-03 Thread Daniel Fischer
Am Donnerstag 03 Dezember 2009 21:24:11 schrieb Tom Tobin: > On Thu, Dec 3, 2009 at 1:37 PM, Daniel Fischer > wrote: > > Am Donnerstag 03 Dezember 2009 19:23:24 schrieb Tom Tobin: > >> No, I'm still trying to tune a "partitionM" function I wrote. > > > > Maybe we can help? > > Sure; should I post

Re: [Haskell-cafe] Card games

2009-12-03 Thread Tom Tobin
On Thu, Dec 3, 2009 at 1:37 PM, Daniel Fischer wrote: > Am Donnerstag 03 Dezember 2009 19:23:24 schrieb Tom Tobin: >> No, I'm still trying to tune a "partitionM" function I wrote. > > Maybe we can help? Sure; should I post it to haskell-beginners? ___ H

Re: [Haskell-cafe] Is Haskell a Fanatic?

2009-12-03 Thread Joe Fredette
I think you meant to say: Now is the winter of our discontent with this troll made glorious summer by this son of Fischer. So long as we bastardize the bard, we best bastardize him fully! :) /Joe On Dec 3, 2009, at 2:58 PM, Miguel Mitrofanov wrote: Brilliant. Just brilliant. On 3 Dec 20

Re: [Haskell-cafe] Is Haskell a Fanatic?

2009-12-03 Thread Miguel Mitrofanov
Brilliant. Just brilliant. On 3 Dec 2009, at 22:54, Daniel Fischer wrote: Am Donnerstag 03 Dezember 2009 19:14:40 schrieb Stefan Holdermans: John, Miguel (and others), Don Stewart wrote, "the guarantees of purity the type system provides are extremely useful for verification purposes". My re

Re: [Haskell-cafe] Is Haskell a Fanatic?

2009-12-03 Thread Daniel Fischer
Am Donnerstag 03 Dezember 2009 19:14:40 schrieb Stefan Holdermans: > John, Miguel (and others), > > >> Don Stewart wrote, "the guarantees of purity the type system > >> provides are extremely > >> useful for verification purposes". My response to this is in > >> theory. This is what caught my atten

Re: [Haskell-cafe] Implicit newtype unwrapping

2009-12-03 Thread Greg Fitzgerald
On Thu, Dec 3, 2009 at 5:34 AM, Conor McBride wrote: > http://www.haskell.org/pipermail/libraries/2008-January/008917.html On Tue, Jan 15, 2008 at 3:31 PM, Conor McBride wrote: > Haskell's classes are the best damn rhythm section in > the industry: you hum it, they play it. On Fri, Dec 10, 2004

Re: [Haskell-cafe] Card games

2009-12-03 Thread Joe Fredette
Yah! We like helping! On Dec 3, 2009, at 2:37 PM, Daniel Fischer wrote: Am Donnerstag 03 Dezember 2009 19:23:24 schrieb Tom Tobin: 2009/12/3 Matthias Görgens : Hi Tom, Did you make any progress on your Dominion quest? I guess you could start by modeling `Big Money' and add the other cards (

Re: [Haskell-cafe] Card games

2009-12-03 Thread Daniel Fischer
Am Donnerstag 03 Dezember 2009 19:23:24 schrieb Tom Tobin: > 2009/12/3 Matthias Görgens : > > Hi Tom, > > > > Did you make any progress on your Dominion quest?  I guess you could > > start by modeling `Big Money' and add the other cards (and > > interaction) from there. > > No, I'm still trying to

Re: [Haskell-cafe] Optimization with Strings ?

2009-12-03 Thread Alberto G. Corona
" In fact, the correct answer is that pEqualsP should produce an error and qEqualsQ should never terminate" ¿¿??? should? or you want to say "actually do that so the optimization does is not done"? The correct amswer is not the sould you mention, but True (IMHO). So the optimization can be done a

Re: [Haskell-cafe] Optimization with Strings ?

2009-12-03 Thread Gregory Crosswhite
You might want to check out the "stringtable-atom" and "bytestring-trie" packages; these are the packages to which I turn when I want to see if I can speed up my code by using a different data structure to map String's to values. Cheers, Greg On Dec 3, 2009, at 4:03 AM, Emmanuel CHANTREAU wro

Fwd: [Haskell-cafe] Optimization with Strings ?

2009-12-03 Thread Alberto G. Corona
Use makeStableName from System.Mem.StableName StableName`s are just for checking pointer equality. Instead of checking for equality of the strings, check for pointer equality of their stableNames a dirty way: pointerEq x y= unsafePerformIO $ do px <- makeStableName x py <- makeStabl

Re: [Haskell-cafe] Card games

2009-12-03 Thread Tom Tobin
2009/12/3 Matthias Görgens : > Hi Tom, > > Did you make any progress on your Dominion quest?  I guess you could > start by modeling `Big Money' and add the other cards (and > interaction) from there. No, I'm still trying to tune a "partitionM" function I wrote. (I'm still a beginner.) ^_^ I'd l

[Haskell-cafe] Re: Implicit newtype unwrapping

2009-12-03 Thread yair...@gmail.com
> I guess TH could probably do this. I think this does what you wish for: http://hackage.haskell.org/packages/archive/peakachu/0.2/doc/html/Data-Newtype.html Example: > $(mkWithNewtypeFuncs [2] ''ZipList) > withZipList2 (<*>) [(+3), (*3)] [6, 7] [9, 21] > $(mkInNewtypeFuncs [2] ''ZipList) > getZi

Re: [Haskell-cafe] Optimization with Strings ?

2009-12-03 Thread Lennart Augustsson
Thank you Sir for giving me a good laugh! On Thu, Dec 3, 2009 at 5:25 PM, John D. Earle wrote: > Dear Emmanuel Chantréau, > > You may want to look into Objective CAML http://caml.inria.fr/ which is a > French product as you can see from the Internet address. It is likely better > suited to the ta

Re: [Haskell-cafe] Is Haskell a Fanatic?

2009-12-03 Thread Stefan Holdermans
John, Miguel (and others), Don Stewart wrote, "the guarantees of purity the type system provides are extremely useful for verification purposes". My response to this is in theory. This is what caught my attention initially, but the language lacks polish and does not appear to be going in a

Re: [Haskell-cafe] Implicit newtype unwrapping

2009-12-03 Thread David Menendez
On Thu, Dec 3, 2009 at 6:28 AM, Joachim Breitner wrote: > Hi, > > Am Donnerstag, den 03.12.2009, 11:13 + schrieb Matthew Pocock: >> Perhaps what you are looking for is a more powerful "defining" >> semantics? >> >> newtype MyFoo = Foo defining (Foo(..)) -- all class instances that Foo >> has a

Re: [Haskell-cafe] Optimization with Strings ?

2009-12-03 Thread David Menendez
On Thu, Dec 3, 2009 at 12:32 PM, Alec Berryman wrote: > Emmanuel CHANTREAU on 2009-12-03 13:03:02 +0100: > >> In my futur program, it use a lot of binary trees with strings (words) >> as leaf. There is just arround 1000 words and they will appear a lot of >> times. The program will possibly consum

Re: [Haskell-cafe] Existencial Types

2009-12-03 Thread rodrigo.bonifacio
Dear Luke, thanks for your answers > If SelectScecario is used for other purposes, then give an explicit > cast function Sure, as I mentioned, we have different transformations and it would be worth to filter a list of transformations by a particular type or even apply the list of transfor

[Haskell-cafe] Re: seems like I'm on the wrong track

2009-12-03 Thread John Lato
> From: Henning Thielemann > > Michael P Mossey schrieb: >> Perhaps someone could either (1) help me do what I'm trying to do, or >> (2) show me a better way. >> >> I have a problem that is very state-ful and I keep thinking of it as OO, >> which is driving me crazy. Haskell is several times harde

Re: [Haskell-cafe] Is Haskell a Fanatic?

2009-12-03 Thread Miguel Mitrofanov
OK, that was certainly constructive. Sorry, don't need a self- appointed messiah here. On 3 Dec 2009, at 20:31, John D. Earle wrote: It will be better for all of you to figure it out for yourselves and gain more experience about what is out there. Haskell isn't the world. Haskell would be t

Re: [Haskell-cafe] Optimization with Strings ?

2009-12-03 Thread Alec Berryman
Emmanuel CHANTREAU on 2009-12-03 13:03:02 +0100: > In my futur program, it use a lot of binary trees with strings (words) > as leaf. There is just arround 1000 words and they will appear a lot of > times. The program will possibly consume a lot of process and memory > (it is a mathematics proover)

Re: [Haskell-cafe] Is Haskell a Fanatic?

2009-12-03 Thread Miguel Mitrofanov
On 3 Dec 2009, at 20:09, John D. Earle wrote: See "[Haskell-cafe] Optimization with Strings ?" for background. Somehow all your posts to the "Optimization..." thread were classified as spam by my e-mail client. Seems like it's developing self-awareness. If you are going to argue your case

Re: [Haskell-cafe] Is Haskell a Fanatic?

2009-12-03 Thread John D. Earle
It will be better for all of you to figure it out for yourselves and gain more experience about what is out there. Haskell isn't the world. Haskell would be the cutting edge if it didn't have competition.___ Haskell-Cafe mailing list Haskell-Cafe@haskel

Re: [Haskell-cafe] Is Haskell a Fanatic?

2009-12-03 Thread John Van Enk
*flawed, that is On Thu, Dec 3, 2009 at 12:13 PM, John Van Enk wrote: > The burden of proof is on you to demonstrate that it _is_. > > On Thu, Dec 3, 2009 at 12:09 PM, John D. Earle wrote: > >> See "[Haskell-cafe] Optimization with Strings ?" for background. >> >> Don Stewart wrote, "the guaran

Re: [Haskell-cafe] Is Haskell a Fanatic?

2009-12-03 Thread John Van Enk
The burden of proof is on you to demonstrate that it _is_. On Thu, Dec 3, 2009 at 12:09 PM, John D. Earle wrote: > See "[Haskell-cafe] Optimization with Strings ?" for background. > > Don Stewart wrote, "the guarantees of purity the type system provides are > extremely > useful for verification

[Haskell-cafe] Is Haskell a Fanatic?

2009-12-03 Thread John D. Earle
See "[Haskell-cafe] Optimization with Strings ?" for background. Don Stewart wrote, "the guarantees of purity the type system provides are extremely useful for verification purposes". My response to this is in theory. This is what caught my attention initially, but the language lacks polish and

Re: [Haskell-cafe] Finding HP

2009-12-03 Thread John Van Enk
I'm all for making HP the default as long as we find a way to make some of the larger packages (I'm thinking gtk2hs) either ship with HP in Windows or install correctly with HP. On Thu, Dec 3, 2009 at 11:46 AM, Joe Fredette wrote: > I think it makes sense, the HP is supposed to set up the entire

Re: [Haskell-cafe] Finding HP

2009-12-03 Thread Joe Fredette
I think it makes sense, the HP is supposed to set up the entire environment needed for typical haskell development (at least, that is my understanding). As such, what's the point in making downloading haskell mean downloading a single _peice_ of haskell (GHC) only to have to download _every

Re: [Haskell-cafe] Finding HP

2009-12-03 Thread Don Stewart
vandijk.roel: > On Wed, Dec 2, 2009 at 11:44 PM, Gregory Crosswhite > wrote: > > On a more serious note, "Download Haskell" /= "Download Haskell Platform", > > so if I were glancing down the sidebar looking for a link to download the > > "Haskell Platform" then the first link wouldn't have regis

Re: [Haskell-cafe] Optimization with Strings ?

2009-12-03 Thread Don Stewart
JohnDEarle: > You may want to look into Objective CAML http://caml.inria.fr/ which is a > French product as you can see from the Internet address. It is likely better > suited to the task than Haskell and has a reputation for speed. For those who > prefer object oriented programming it has faciliti

Re: [Haskell-cafe] Optimization with Strings ?

2009-12-03 Thread Daniel Fischer
Am Donnerstag 03 Dezember 2009 16:31:56 schrieb Neil Brown: > Emmanuel CHANTREAU wrote: > > Le Thu, 3 Dec 2009 13:20:31 +0100, > > > > David Virebayre a écrit : > >> It doesn't work this way : Strings are just lists of Chars. Comparison > >> is made recursively, Char by Char. You can have a look a

[Haskell-cafe] Optimization with Strings ?

2009-12-03 Thread John D. Earle
Dear Emmanuel Chantréau, You may want to look into Objective CAML http://caml.inria.fr/ which is a French product as you can see from the Internet address. It is likely better suited to the task than Haskell and has a reputation for speed. For those who prefer object oriented programming it has

Re[2]: [Haskell-cafe] Optimization with Strings ?

2009-12-03 Thread Bulat Ziganshin
Hello Emmanuel, Thursday, December 3, 2009, 6:23:56 PM, you wrote: > that "forall x; List x => x==x". GHC have all informations to do this > optimization job, because haskell functions definitions are mathematics > definitions. GHC doesn't make ALL possible optimizations, isn't it obvious? ;)

Re: [Haskell-cafe] GHC magic optimization ?

2009-12-03 Thread Miguel Mitrofanov
Does this really mean that you want to know how the garbage collector works? Emmanuel CHANTREAU wrote: Hello One thing is magic for me: how GHC can know what function results to remember and what results can be forgotten ? Is it just a stupid buffer algorithm or is there some mathematics truth

Re: [Haskell-cafe] GHC magic optimization ?

2009-12-03 Thread Eugene Kirpichov
Hi. There is actually no magic at all going on. Haskell has a reasonably well-defined evaluation model; you can approximate it, at least not taking IO into account, with lazy graph reduction (look that up on google). Probably that is the "mathematical truth" you're looking for. Actually, if Haske

Re: [Haskell-cafe] GHC magic optimization ?

2009-12-03 Thread Henning Thielemann
On Thu, 3 Dec 2009, Emmanuel CHANTREAU wrote: Hello One thing is magic for me: how GHC can know what function results to remember and what results can be forgotten ? Is it just a stupid buffer algorithm or is there some mathematics truths behind this ? Although it is not required by the Has

Re: [Haskell-cafe] Optimization with Strings ?

2009-12-03 Thread Holger Siegel
Am Donnerstag, den 03.12.2009, 16:23 +0100 schrieb Emmanuel CHANTREAU: > Le Thu, 3 Dec 2009 13:20:31 +0100, > David Virebayre a écrit : > > > It doesn't work this way : Strings are just lists of Chars. Comparison > > is made recursively, Char by Char. You can have a look at the source > > to make

[Haskell-cafe] GHC magic optimization ?

2009-12-03 Thread Emmanuel CHANTREAU
Hello One thing is magic for me: how GHC can know what function results to remember and what results can be forgotten ? Is it just a stupid buffer algorithm or is there some mathematics truths behind this ? I'm very happy about Haskell, it's so great to put some smart ideas in a computer. thank

Re: [Haskell-cafe] Optimization with Strings ?

2009-12-03 Thread Neil Brown
Emmanuel CHANTREAU wrote: Le Thu, 3 Dec 2009 13:20:31 +0100, David Virebayre a écrit : It doesn't work this way : Strings are just lists of Chars. Comparison is made recursively, Char by Char. You can have a look at the source to make sure : instance (Eq a) => Eq [a] where [] == []

[Haskell-cafe] happstack homepage

2009-12-03 Thread Roel van Dijk
I noticed that happstack.com and tutorial.happstack.com are both equal to patch-tag.com. Google's cache has the original pages. Is this the result of some misconfiguration or something else? I want to play with happstack and this is a slight inconvenience. On the other hand, all happstack packages

Re: [Haskell-cafe] Optimization with Strings ?

2009-12-03 Thread Emmanuel CHANTREAU
Le Thu, 3 Dec 2009 13:20:31 +0100, David Virebayre a écrit : > It doesn't work this way : Strings are just lists of Chars. Comparison > is made recursively, Char by Char. You can have a look at the source > to make sure : > > instance (Eq a) => Eq [a] where > [] == [] = True > (x

Re: [Haskell-cafe] seems like I'm on the wrong track

2009-12-03 Thread Henning Thielemann
On Wed, 2 Dec 2009, Stephen Tetley wrote: As for the second half of what you get from a programming language, your system description frames what you want to do with an emphasis on dynamic aspects. This seems a good way off from the prior art in Haskell. For instance there are Haskell synthesiz

Re: [Haskell-cafe] Are there standard idioms for lazy, pure error handling?

2009-12-03 Thread Ketil Malde
Malcolm Wallace writes: > Errm, you mean: 4 `Then` 5 `Then` 1 `Then` Finally "success!" Yes, sorry, and thanks. I guess I should learn to check with ghci before posting... How about this for a nicer syntax? infixr 8 :+ infixr 8 +: data TList a e = a :+ (TList a e)

Re: [Haskell-cafe] seems like I'm on the wrong track

2009-12-03 Thread Henning Thielemann
Michael P Mossey schrieb: > Perhaps someone could either (1) help me do what I'm trying to do, or > (2) show me a better way. > > I have a problem that is very state-ful and I keep thinking of it as OO, > which is driving me crazy. Haskell is several times harder to use than > Python in this insta

Re: [Haskell-cafe] Card games

2009-12-03 Thread Matthias Görgens
Hi Tom, Did you make any progress on your Dominion quest? I guess you could start by modeling `Big Money' and add the other cards (and interaction) from there. Also I guess there is a common baseline of things that are inherent in a lot of card games --- mechanics that cards support: Shuffling,

Re: [Haskell-cafe] Implicit newtype unwrapping

2009-12-03 Thread John D. Earle
There is another point that needs to be made. A type signature isn't actually a type specification. It is a type assertion and a type specification in the event that the compiler needs your help. Most of the time the compiler can care less what you think and does not require your assistance. In

Re: [Haskell-cafe] Implicit newtype unwrapping

2009-12-03 Thread Conor McBride
Hi Martijn On 3 Dec 2009, at 00:16, Martijn van Steenbergen wrote: So here's a totally wild idea Sjoerd and I came up with. What if newtypes were unwrapped implicitly? Subtyping. What advantages and disadvantages would it have? The typechecker being psychic; the fact that it isn't. It's

Re: [Haskell-cafe] Are there standard idioms for lazy, pure error handling?

2009-12-03 Thread Duncan Coutts
On Thu, 2009-12-03 at 12:34 +0100, Ketil Malde wrote: > Duncan Coutts writes: > > >> [1] http://hackage.haskell.org/package/failable-list > > > Nice. > > I agree this is needed (or rather, would be nice to standardise). > > Although I don't care for the cutesy naming suggested in the 'Train'

Re: [Haskell-cafe] I miss OO

2009-12-03 Thread Luke Palmer
On Thu, Dec 3, 2009 at 4:09 AM, Peter Verswyvelen wrote: > Also Luke Palmer talked a couple of times about "co-algebraic" > approaches, but not being a computer scientist, I never really > understood what that meant ("just reverse all the arrows"?) Disclaimer: I am not a category theorist. I th

Re: [Haskell-cafe] Optimization with Strings ?

2009-12-03 Thread Bulat Ziganshin
Hello Emmanuel, Thursday, December 3, 2009, 3:03:02 PM, you wrote: > memory footprint and is easier. But I don't know if it worth to do this > optimization: having a dictionary to translate string words in Int. GHC compiler already has this optimization. unfortunately it's not in the code it gen

Re: [Haskell-cafe] Optimization with Strings ?

2009-12-03 Thread David Virebayre
On Thu, Dec 3, 2009 at 1:03 PM, Emmanuel CHANTREAU wrote: > In my futur program, it use a lot of binary trees with strings (words) > as leaf. There is just arround 1000 words and they will appear a lot of > times. The program will possibly consume a lot of process and memory > (it is a mathematic

[Haskell-cafe] Optimization with Strings ?

2009-12-03 Thread Emmanuel CHANTREAU
Hello In my futur program, it use a lot of binary trees with strings (words) as leaf. There is just arround 1000 words and they will appear a lot of times. The program will possibly consume a lot of process and memory (it is a mathematics proover). I began this program in C++ but haskell has a pr

Re: [Haskell-cafe] Re: Are there standard idioms for lazy, pure error handling?

2009-12-03 Thread Neil Brown
wren ng thornton wrote: Nicolas Pouillard wrote: Excerpts from Heinrich Apfelmus's message of Tue Dec 01 11:29:24 +0100 2009: For mnemonic value, we could call it a "train": data Train a b = Wagon a (Train a b) | Loco b I rather like it too. The mnemonic version sound

[Haskell-cafe] ANN: atom-0.1.3

2009-12-03 Thread Tom Hawkins
This release of Atom slightly changes the semantics of assertions and coverage. Assertion and coverage are now checked between the execution of every rule, instead of only when the rules containing assertions are fired. They are still subject to parental guard conditions, but not period or phase

Re: [Haskell-cafe] Are there standard idioms for lazy, pure error handling?

2009-12-03 Thread Malcolm Wallace
data TerminatedList a e = Then a (TerminatedList a e) | Finally e Nice. (So you could do e.g: 4 `Then` 5 `Then` 1 `Finally` "success!". Errm, you mean: 4 `Then` 5 `Then` 1 `Then` Finally "success!" Regards, Malcolm ___

Re: [Haskell-cafe] Are there standard idioms for lazy, pure error handling?

2009-12-03 Thread Ketil Malde
Duncan Coutts writes: >> [1] http://hackage.haskell.org/package/failable-list > Nice. I agree this is needed (or rather, would be nice to standardise). Although I don't care for the cutesy naming suggested in the 'Train' datatype, failable-list could be made more general. Why is there a spe

Re: [Haskell-cafe] Implicit newtype unwrapping

2009-12-03 Thread Joachim Breitner
Hi, Am Donnerstag, den 03.12.2009, 11:13 + schrieb Matthew Pocock: > Perhaps what you are looking for is a more powerful "defining" > semantics? > > newtype MyFoo = Foo defining (Foo(..)) -- all class instances that Foo > has are delegated through from MyFoo it goes into the right direction

Re: [Haskell-cafe] Implicit newtype unwrapping

2009-12-03 Thread Matthew Pocock
Of course, I meand 'deriving', not 'defining' /me embarsed 2009/12/3 Matthew Pocock > Perhaps what you are looking for is a more powerful "defining" semantics? > > newtype MyFoo = Foo defining (Foo(..)) -- all class instances that Foo has > are delegated through from MyFoo > ___

  1   2   >