[Haskell-cafe] Re: How Albus Dumbledore would sell Haskell

2007-04-22 Thread apfelmus
Claus Reinke wrote: - oscon seems to be a huge event. A bold idea would be to redo a talk of another speaker in Haskell and accidentally surpass the techniques presented there :) Alas, this doesn't work for OSCON since there are too many talks attendees have to choose between and the event

Re: [Haskell-cafe] Tutorial on Haskell: Use closures

2007-04-22 Thread Paul Johnson
Closures look like magic to those who don't know them. So you might try something like this (which I have not compiled BTW): -- Haskell version data Train = Train {departs :: Time, platform :: Int } departsBefore :: Time - Train - Bool departsBefore t train = t departs train

[Haskell-cafe] ANNOUNCE: xmonad 0.1

2007-04-22 Thread Spencer Janssen
The xmonad dev team is pleased to announce the inaugural release of: xmonad: a tiling window manager http://xmonad.org Xmonad is a minimalist tiling window manager for X, written in Haskell. Windows are managed using automatic layout algorithms,

[Haskell-cafe] newbie question on ordering

2007-04-22 Thread Nikolay Metchev
Hello guys, I have decided to try and get back into Haskell recently. I have used it in the past but have forgotten large chunks. I am trying to express the logic of a particular card game. For this purpose I need to be able to order cards in various orders. At first I thought that the Ord class

Re: [Haskell-cafe] Re: Haskell version of Norvig's Python Spelling Corrector

2007-04-22 Thread Bryan O'Sullivan
Ketil Malde wrote: Hm - nobody suggested using ByteStrings yet? I wrote an independent port of Norvig's spellchecker, because I figured it would make the basis of an interesting tutorial. For such a small program, it's been quite a challenge! I started out using lazy ByteStrings,

[Haskell-cafe] Performance and STUArrays

2007-04-22 Thread Dominic Steinitz
I've been playing around some more trying improve the performance of the SHA1 implmentation in the crypto library. I've isolated one of the functions and implemented it using a) unfold and b) STUArray The STUArray implementation is about twice as fast but I was expecting an order of

[Haskell-cafe] Is there a best *nix or BSD distro for Haskell hacking?

2007-04-22 Thread David Cabana
I have a spare Windows machine I want to put to better use. I want to turn it into a Haskell hacking box, and was wondering whether any particular *nix or BSD distribution is best (or worst) suited for this. Any thoughts? Thank you, David Cabana

Re: [Haskell-cafe] Is there a best *nix or BSD distro for Haskell hacking?

2007-04-22 Thread brad clawsie
On Sun, Apr 22, 2007 at 10:07:32AM -0400, Tom Harper wrote: I'd go with the one you feel is the best desktop OS. For me that usually counts BSD out (great server, bad desktop). this is not true. freebsd in particular supports all of the latest free desktops and also has good support for

Re: [Haskell-cafe] Re: Haskell version of Norvig's Python Spelling Corrector

2007-04-22 Thread Ketil Malde
On Sun, 2007-04-22 at 00:25 -0400, Pete Kazmier wrote: Pete Kazmier [EMAIL PROTECTED] writes: I'd love to see other Haskell implementations as well if anyone has a few moments to spare. Admittedly, it took me several hours to get my version working, but I'm a Haskell newbie.

[Haskell-cafe] Re: Haskell version of Norvig's Python Spelling Corrector

2007-04-22 Thread Pete Kazmier
Ketil Malde [EMAIL PROTECTED] writes: On Sun, 2007-04-22 at 00:25 -0400, Pete Kazmier wrote: Pete Kazmier [EMAIL PROTECTED] writes: I'd love to see other Haskell implementations as well if anyone has a few moments to spare. Admittedly, it took me several hours to get my version

Re: [Haskell-cafe] Is there a best *nix or BSD distro for Haskell hacking?

2007-04-22 Thread David Cabana
I'm not dissing Windows; I work with it all the time, just not for Haskell. On the other hand, I am writing this on my Powerbook. My desire to use linux is mostly aesthetic. I want to go mouse free (I'm thinking Xmonad), and neither Windows nor OS X naturally lends itself to that. With

[Haskell-cafe] Re: Haskell version of Norvig's Python Spelling Corrector

2007-04-22 Thread Pete Kazmier
Bryan O'Sullivan [EMAIL PROTECTED] writes: After this switch, I found that spellchecking one word still took 4x as long in Haskell as Norvig's Python program. Since I was checking only one word in each case, essentially all of the runtime was taken up by building the word frequency map.

Re: [Haskell-cafe] Re: Haskell version of Norvig's Python Spelling Corrector

2007-04-22 Thread Derek Elkins
Pete Kazmier wrote: Bryan O'Sullivan [EMAIL PROTECTED] writes: After this switch, I found that spellchecking one word still took 4x as long in Haskell as Norvig's Python program. Since I was checking only one word in each case, essentially all of the runtime was taken up by building the word

[Haskell-cafe] Compilling GHC on Vista

2007-04-22 Thread Monique Monteiro
Hi all, I'm trying to compile GHC on Windows Vista, but I encountered the following error when running ./configure --host=i386-unknown-mingw32 --with-gcc=c:/MinGW/bin/gcc: configure: error: C compiler cannot create executables See `config.log' for more details. ./configure: line 3404: cannot

Re: [Haskell-cafe] Is there a best *nix or BSD distro for Haskell hacking?

2007-04-22 Thread Neil Mitchell
Hi David, At the risk of getting into an OS war, its perfectly feasible to develop Haskell on Windows. Some Haskell applications are only available for Windows (WinHugs mainly), but you are likely to have a less bumpy ride compiling GHC if you aren't on Windows. Pick what you want, Gentoo and

Re: [Haskell-cafe] Is there a best *nix or BSD distro for Haskell hacking?

2007-04-22 Thread Dan Mead
I've tried doing haskell projects on fedora ubuntu and gentoo and gentoo was by far the best supported. -Dan On 4/22/07, David Cabana [EMAIL PROTECTED] wrote: I'm not dissing Windows; I work with it all the time, just not for Haskell. On the other hand, I am writing this on my Powerbook. My

[Haskell-cafe] IDE support

2007-04-22 Thread Philipp Volgger
What IDE support is available for Haskell (Visuall Haskell, EclipseFP), anything else? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Is there a best *nix or BSD distro for Haskell hacking?

2007-04-22 Thread Stefan O'Rear
On Sun, Apr 22, 2007 at 10:02:32AM -0400, David Cabana wrote: I have a spare Windows machine I want to put to better use. I want to turn it into a Haskell hacking box, and was wondering whether any particular *nix or BSD distribution is best (or worst) suited for this. Any thoughts?

Re: [Haskell-cafe] Re: Haskell version of Norvig's Python Spelling Corrector

2007-04-22 Thread Bryan O'Sullivan
Pete Kazmier wrote: Bryan, out of curiosity, is a non bytestring version of your code faster? No, but the difference is smaller than I expected: the lazy ByteString version is about 1.8x faster than using String. b ___ Haskell-Cafe

Re: [Haskell-cafe] Is there a best *nix or BSD distro for Haskell hacking?

2007-04-22 Thread Lennart Augustsson
I have no idea why you say BSD is bad for the desktop. I've run it as my desktop OS since about 1992. -- Lennart On Apr 22, 2007, at 15:07 , Tom Harper wrote: I'd go with the one you feel is the best desktop OS. For me that usually counts BSD out (great server, bad desktop). I'd

Re: [Haskell-cafe] IDE support

2007-04-22 Thread Marc Weber
On Sun, Apr 22, 2007 at 07:34:27PM +0200, Philipp Volgger wrote: What IDE support is available for Haskell (Visuall Haskell, EclipseFP), anything else? Hi Philipp. I've written some completion scripts for vim. Don't know wether you can call it an ide. Also tagging source is supported by one

Re: [Haskell-cafe] IDE support

2007-04-22 Thread Leif Frenzel
Hi, On Sun, Apr 22, 2007 at 07:34:27PM +0200, Philipp Volgger wrote: What IDE support is available for Haskell (Visuall Haskell, EclipseFP), anything else? In addition, there are plugins for XCode, IntelliJ IDEA and KDevelop (don't have a specific link for the last one).

Re: [Haskell-cafe] Is there a best *nix or BSD distro for Haskell hacking?

2007-04-22 Thread Ryan Dickie
My vote goes to ubuntu. I've been using it for a few years and before that I tried a wide variety of distros. Ubuntu has a lot of polish, takes 20 minutes to install, and is just a really nice distribution overall. Things just work. Ubuntu is debian based so if you chose against ubuntu my second

[Haskell-cafe] Re: Haskell version of Norvig's Python Spelling Corrector

2007-04-22 Thread Pete Kazmier
Derek Elkins [EMAIL PROTECTED] writes: After reading Bryan's post, I switched my right fold to a strict left fold and almost tripled my original speed. Could someone provide some guidelines on when to use each? I thought foldr should be used when building some large data structure such as

Re: [Haskell-cafe] Re: Haskell version of Norvig's Python Spelling Corrector

2007-04-22 Thread Derek Elkins
Pete Kazmier wrote: Derek Elkins [EMAIL PROTECTED] writes: After reading Bryan's post, I switched my right fold to a strict left fold and almost tripled my original speed. Could someone provide some guidelines on when to use each? I thought foldr should be used when building some large data

Re: [Haskell-cafe] Re: Haskell version of Norvig's Python Spelling Corrector

2007-04-22 Thread Ketil Malde
On Sun, 2007-04-22 at 11:51 -0400, Pete Kazmier wrote: type WordFreq = M.Map B.ByteString Int train:: [B.ByteString] - WordFreq train words = frequencyMap where frequencyMap = foldr incWordCount M.empty words incWordCount w m = M.insertWith (+) w 1 m

Re: [Haskell-cafe] Re: Haskell version of Norvig's Python Spelling Corrector

2007-04-22 Thread Stefan O'Rear
On Sun, Apr 22, 2007 at 10:10:44PM +0200, Ketil Malde wrote: On Sun, 2007-04-22 at 11:51 -0400, Pete Kazmier wrote: type WordFreq = M.Map B.ByteString Int train:: [B.ByteString] - WordFreq train words = frequencyMap where frequencyMap = foldr incWordCount

Re: [Haskell-cafe] IDE support

2007-04-22 Thread Claus Reinke
What IDE support is available for Haskell (Visuall Haskell, EclipseFP), anything else? in addition to the vim plugins already mentioned, i've got a few old ones at http://www.cs.kent.ac.uk/people/staff/cr3/toolbox/haskell/Vim/ the page is many years old, but the logs indicate that many

Re: [Haskell-cafe] Is there a best *nix or BSD distro for Haskell hacking?

2007-04-22 Thread Dougal Stanton
On 22/04/07, Ryan Dickie [EMAIL PROTECTED] wrote: Many of the haskell packages including darcs, ghc, and well over 100 other packages (mostly libraries) are in the package manager ready to be installed. The problem with Ubuntu (at least until the Feisty release a few days ago?) was that GHC

Re: [Haskell-cafe] question about Data.Binary and Double instance

2007-04-22 Thread Ian Lynagh
On Wed, Apr 18, 2007 at 09:12:30PM -0700, David Roundy wrote: I just want to read in a file full of Doubles (written in binary format from C++) Note that if you write double's from C++ then you need to read CDoubles in Haskell and then realToFrac them (which will presumably be optimised out

[Haskell-cafe] tiff reader or libtiff bindings

2007-04-22 Thread Andreas Voellmy
Hi, Does anyone know of a haskell library to read (and write) tiff files? Or has someone written a binding to libtiff? Thanks, Andreas ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] question about Data.Binary and Double instance

2007-04-22 Thread Ian Lynagh
On Tue, Apr 17, 2007 at 11:42:40PM -0400, Brian Alliet wrote: Perhaps we just don't care about ARM or other arches where GHC runs that Are there really any architectures supported by GHC that don't use IEEE floating point? If so GHC.Float is wrong as isIEEE is always true. The one most

Re: [Haskell-cafe] Re: Haskell version of Norvig's Python Spelling Corrector

2007-04-22 Thread Felipe Almeida Lessa
On 4/22/07, Pete Kazmier [EMAIL PROTECTED] wrote: Worse - and this is true for ByteStrings, too - String comparisons are O(n), which means lookups in Sets and Maps are expensive. A trie (i.e, a search tree where each internal node corresponds to a word prefix, and has one branch per letter

Re: [Haskell-cafe] question about Data.Binary and Double instance

2007-04-22 Thread Stefan O'Rear
On Sun, Apr 22, 2007 at 10:43:23PM +0100, Ian Lynagh wrote: On Tue, Apr 17, 2007 at 11:42:40PM -0400, Brian Alliet wrote: Perhaps we just don't care about ARM or other arches where GHC runs that Are there really any architectures supported by GHC that don't use IEEE floating point?

Re: [Haskell-cafe] Is there a best *nix or BSD distro for Haskell hacking?

2007-04-22 Thread Ryan Dickie
I'm running feisty. [EMAIL PROTECTED]:~$ ghc --version The Glorious Glasgow Haskell Compilation System, version 6.6 --ryan On 4/22/07, Dougal Stanton [EMAIL PROTECTED] wrote: On 22/04/07, Ryan Dickie [EMAIL PROTECTED] wrote: Many of the haskell packages including darcs, ghc, and well over

Re: [Haskell-cafe] question about Data.Binary and Double instance

2007-04-22 Thread David Roundy
On Sun, Apr 22, 2007 at 10:36:17PM +0100, Ian Lynagh wrote: On Wed, Apr 18, 2007 at 09:12:30PM -0700, David Roundy wrote: I just want to read in a file full of Doubles (written in binary format from C++) Note that if you write double's from C++ then you need to read CDoubles in Haskell

[Haskell-cafe] Re: haskell question

2007-04-22 Thread oleg
Is there documentation on the multi-parameter type classes? Sections 7.4.2. Class declarations, 7.4.3 Functional dependencies and 7.4.4. Instance declarations of the GHC user guide give the short description of these features. These section refer to a couple of papers. The best explanation can

Re: [Haskell-cafe] Re: Haskell version of Norvig's Python Spelling Corrector

2007-04-22 Thread Duncan Coutts
On Sun, 2007-04-22 at 12:55 -0400, Pete Kazmier wrote: After reading Bryan's post, I switched my right fold to a strict left fold and almost tripled my original speed. Could someone provide some guidelines on when to use each? I thought foldr should be used when building some large data

Re: [Haskell-cafe] Re: How Albus Dumbledore would sell Haskell

2007-04-22 Thread Cale Gibbard
On 21/04/07, apfelmus [EMAIL PROTECTED] wrote: Dan Weston wrote: -- Why is this not in Prelude? dup x = (x,x) It is (almost). It's called join (,) It's unfortunate that the Monad instance for ((-) e) isn't in the Prelude. ___ Haskell-Cafe

Re: [Haskell-cafe] newbie question on ordering

2007-04-22 Thread Albert Y. C. Lai
Nikolay Metchev wrote: data Face = Ace | Two | Three | Four | Five | Six | Seven | Eight | Nine | Ten | Jack | Queen | King deriving (Enum, Show, Eq) listComparator :: (Eq a) = [a] - a - a - Ordering listComparator xs a b = compare x y where x =

Re: [Haskell-cafe] IDE support

2007-04-22 Thread Gour
On Sun, 22 Apr 2007 22:13:45 +0100 Claus Reinke [EMAIL PROTECTED] wrote: the page is many years old, but the logs indicate that many folks stumble across it via google, without ever telling me, and i've noticed that the haskell.org wiki now points to it, so i've just added my current vim

Re: [Haskell-cafe] Re: Haskell version of Norvig's Python Spelling Corrector

2007-04-22 Thread Bryan O'Sullivan
Bryan O'Sullivan wrote: In my profile results, I find that simply converting words to lower case accounts for a whopping 40% of time and allocation (see the attachment for my definition of the train function). COST CENTREMODULE %time %alloc lower