[Haskell-cafe] Re: Health effects

2008-10-01 Thread Benjamin L . Russell
On Tue, 30 Sep 2008 19:54:17 +0200, Adrian Neumann <[EMAIL PROTECTED]> wrote: >I often wonder how many cuts you need to divide a steak in n pieces. >You can obviously get n pieces with (sqrt n) cuts by cutting a grid. >But I'm sure some smart mathematician thought of a (log n) way. Good thing

[Haskell-cafe] Re: Health effects

2008-10-01 Thread Achim Schneider
Benjamin L.Russell <[EMAIL PROTECTED]> wrote: > Russell > Any relationship? -- (c) this sig last receiving data processing entity. Inspect headers for copyright history. All rights reserved. Copying, hiring, renting, performance and/or quoting of this signature prohibited. _

Re: [Haskell-cafe] cabal upgrade

2008-10-01 Thread Malcolm Wallace
When I wanted to upgrade to yi 0.4.6.2, I needed to download the new package list cabal update #download list of new packages cabal upgrade #make any upgrades I never knew there was a 'cabal update' command, and it worries me. In my unhappy experience of packaging systems (

Re: [Haskell-cafe] csv one-liner

2008-10-01 Thread Ketil Malde
Derek Elkins <[EMAIL PROTECTED]> writes: >> parseCSVFromFile "in.csv" >>= return . either (const "error!") > Whenever you see this >>= return . f pattern think liftM or fmap or <$>. ...and "return . f >>= action" is just "action . f", no? -k -- If I haven't seen further, it is by standing in t

Re: [Haskell-cafe] Total Functional Programming in Haskell

2008-10-01 Thread Conor McBride
Hi I've been reticent to join this thread as it has the potential to eat my life, but I thought I'd say some technical things. On 30 Sep 2008, at 22:54, Derek Elkins wrote: On Mon, 2008-09-29 at 20:02 -0700, Jason Dagit wrote: Maybe instead of using (->) as the function constructor for total

[Haskell-cafe] Re: Health effects

2008-10-01 Thread Jon Fairbairn
Adrian Neumann <[EMAIL PROTECTED]> writes: > I often wonder how many cuts you need to divide a steak in n > pieces. You can obviously get n pieces with (sqrt n) cuts > by cutting a grid. But I'm sure some smart mathematician > thought of a (log n) way. Are you allowed to move the pieces between

[Haskell-cafe] Re: cabal upgrade

2008-10-01 Thread Stephane Bortzmeyer
On Wed, Oct 01, 2008 at 08:58:53AM +0100, Malcolm Wallace <[EMAIL PROTECTED]> wrote a message of 23 lines which said: > Indeed, the advice given by each of these tools IIRC was to update > every time you used it, before doing anything else. (So why was it > a manual task then?) You can put it

[Haskell-cafe] Re: (A little humour)

2008-10-01 Thread Benjamin L . Russell
On Fri, 26 Sep 2008 15:40:49 -0400, "Andrew Wagner" <[EMAIL PROTECTED]> wrote: >Brilliant. This made my day. I must admit, I looked briefly at the >paper after I saw the link, yawned, and closed it. Then I saw Andrew's >comment, skimmed the paper, becoming more and more convinced that it >was a jo

Re: [Haskell-cafe] Re: Hmm, what license to use?

2008-10-01 Thread Magnus Therning
On Wed, Oct 1, 2008 at 3:31 AM, brian <[EMAIL PROTECTED]> wrote: [..] > as big a problem as I imagined. My understanding is that I can satisfy > the requirements of the LGPL by dynamically linking, and that's > already happening. Is there something else to worry about? I'd be in > violation if I sh

Re: [Haskell-cafe] (A little humour)

2008-10-01 Thread Manlio Perillo
Miguel Mitrofanov ha scritto: I think you might be interested in http://www.research.att.com/~bs/whitespace98.pdf By the way, is it technically possible (and feasible), in Haskell, to define a space operator? Of cource not with the current grammar. > [...] Manlio Perillo ___

Re: [Haskell-cafe] (A little humour)

2008-10-01 Thread Manlio Perillo
Miguel Mitrofanov ha scritto: I think you might be interested in http://www.research.att.com/~bs/whitespace98.pdf By the way, is it technically possible (and feasible), in Haskell, to define a space operator? Of cource not with the current grammar. > [...] Manlio Perillo ___

[Haskell-cafe] Re: Total Functional Programming in Haskell

2008-10-01 Thread apfelmus
Jason Dagit wrote: > apfelmus wrote: >> >> It seems to me that dependent types are best for ensuring totality. > > Bear with me, as I know virtual nothing about dependent types yet. Ah, my bad. Time to change that ;) Personally, I found Th. Altenkirch, C. McBride, J. McKinna. Why dependent t

[Haskell-cafe] flipped IO sequence

2008-10-01 Thread Cetin Sert
warn :: String → IO Int warn = return 1 << putStrLn-- causes an error -- = \msg → return 1 << putStrLn msg -- works just fine -- = \msg → putStrLn msg >> return 1 -- works just fine (<<) :: Monad m ⇒ m b → m a → m b b << a = a >>= \_ → b Why do I get this compile-time error?? How

Re: [Haskell-cafe] flipped IO sequence

2008-10-01 Thread Dougal Stanton
2008/10/1 Cetin Sert <[EMAIL PROTECTED]>: > warn :: String → IO Int > warn = return 1 << putStrLn-- causes an error > -- = \msg → return 1 << putStrLn msg -- works just fine > -- = \msg → putStrLn msg >> return 1 -- works just fine > > (<<) :: Monad m ⇒ m b → m a → m b > b << a = a

Re: [Haskell-cafe] flipped IO sequence

2008-10-01 Thread Martin Huschenbett
Hi Cetin, what you seem to want is > warn :: String -> IO Int > warn = (return 1 <<) . putStrLn Cetin Sert schrieb: > warn :: String → IO Int > warn = return 1 << putStrLn-- causes an error > -- = \msg → return 1 << putStrLn msg -- works just fine > -- = \msg → putStrLn msg >> re

Re: [Haskell-cafe] flipped IO sequence

2008-10-01 Thread Daniel Fischer
Am Mittwoch, 1. Oktober 2008 12:18 schrieb Cetin Sert: > warn :: String → IO Int > warn = return 1 << putStrLn-- causes an error try warn = (return 1 <<) . putStrLn > -- = \msg → return 1 << putStrLn msg -- works just fine > -- = \msg → putStrLn msg >> return 1 -- works just fine

Re: [Haskell-cafe] postmortem question about xmonad

2008-10-01 Thread minh thu
2008/10/1 Jason Dagit <[EMAIL PROTECTED]>: > > > On Tue, Sep 30, 2008 at 1:20 PM, Don Stewart <[EMAIL PROTECTED]> wrote: >> >> noteed: >> > Hi, >> > >> > I'd like to know, now that time got by a bit, what the writers of the >> > X monad think about the use of the ReaderT/WriterT/IO brought to them

tutorial site back up Re: [Haskell-cafe] Version 0.4.3 of happs-tutorial is a HAppS job board, done in HAppS.

2008-10-01 Thread Thomas Hartman
Well, at least I know people are trying to read the tutorial :) I'll say a few words about what happened. The underlying problem is that HAppS dies unpredictably because of problems in the haskell network library, a but I reported at http://code.google.com/p/happs/issues/detail?id=40 I wrote a c

[Haskell-cafe] ANN: Haskell-Embedded System Design: ForSyDe 3.0 and Tutorial

2008-10-01 Thread Alfonso Acosta
Hi everyone, I am glad to announce the 3.0 release of ForSyDe's implementation, now available from HackageDB. The ForSyDe (Formal System Design) methodology has been developed with the objective to move system design (e.g. System on Chip, Hardware and Software systems) to a higher level of abstra

Re: [Haskell-cafe] Class Quantification

2008-10-01 Thread Bas van Dijk
On Wed, Oct 1, 2008 at 3:01 AM, Reiner Pope <[EMAIL PROTECTED]> wrote: > I believe there is no way to simply express this "abstraction over classes", > but the Scrap your boilerplate with class[1] paper discusses this same > problem and present a workaround by defining the class's dictionary of > m

[Haskell-cafe] Job Opportunity

2008-10-01 Thread Michael Bott
Afternoon, I have been recommended to use this site from a couple of people I have spoken to. Sorry if this offends anyone but I have an amazing opportunity for a 2 Functional Programmers based in London. Functional Programming - (HASKELL / ERLANG / OCAML) - Financial This is an incredibl

[Haskell-cafe] Re: (A little humour)

2008-10-01 Thread Achim Schneider
Benjamin L.Russell <[EMAIL PROTECTED]> wrote: > Read that interview and tell me what you think. > I think I'll link that in my next CV for a job requiring C++ knowledge. -- (c) this sig last receiving data processing entity. Inspect headers for copyright history. All rights reserved. Copying, hi

Re: [Haskell-cafe] Hackage Build Failures

2008-10-01 Thread Emil Axelsson
Hi Cetin! Glad to see at least one person trying my package :) The error comes from using QuickCheck 2, which happens to also use the operator (><). I can see two ways to solve the problem: (1) Add "< 2" after "QuickCheck" in the Wired.cabal file. (2) Add "hiding ((><))" after "import Test.Q

[Haskell-cafe] Re: Health effects

2008-10-01 Thread Achim Schneider
Jon Fairbairn <[EMAIL PROTECTED]> wrote: > Adrian Neumann <[EMAIL PROTECTED]> writes: > > > I often wonder how many cuts you need to divide a steak in n > > pieces. You can obviously get n pieces with (sqrt n) cuts > > by cutting a grid. But I'm sure some smart mathematician > > thought of a (l

Re: [Haskell-cafe] Hackage Build Failures

2008-10-01 Thread Stephan Friedrichs
Emil Axelsson wrote: [...] The error comes from using QuickCheck 2, which happens to also use the operator (><). I can see two ways to solve the problem: (1) Add "< 2" after "QuickCheck" in the Wired.cabal file. (2) Add "hiding ((><))" after "import Test.QuickCheck" in Data/Hardware/Interna

RE: [Haskell-cafe] Hackage Build Failures

2008-10-01 Thread Mitchell, Neil
> > The error comes from using QuickCheck 2, which happens to > also use the > > operator (><). I can see two ways to solve the problem: > > > > (1) Add "< 2" after "QuickCheck" in the Wired.cabal file. > > > > (2) Add "hiding ((><))" after "import Test.QuickCheck" in > > Data/Hardware/Interna

Re: [Haskell-cafe] Hackage Build Failures

2008-10-01 Thread Emil Axelsson
Stephan Friedrichs skrev: Emil Axelsson wrote: [...] The error comes from using QuickCheck 2, which happens to also use the operator (><). I can see two ways to solve the problem: (1) Add "< 2" after "QuickCheck" in the Wired.cabal file. (2) Add "hiding ((><))" after "import Test.QuickCheck

Re: [Haskell-cafe] Re: Health effects

2008-10-01 Thread Gianfranco Alongi
Are we assuming the bars to have an even distribution of mass along the whole body? On Wed, Oct 1, 2008 at 2:10 PM, Achim Schneider <[EMAIL PROTECTED]> wrote: > Jon Fairbairn <[EMAIL PROTECTED]> wrote: > >> Adrian Neumann <[EMAIL PROTECTED]> writes: >> >> > I often wonder how many cuts you need t

Re: [Haskell-cafe] csv one-liner

2008-10-01 Thread Derek Elkins
On Wed, 2008-10-01 at 10:15 +0200, Ketil Malde wrote: > Derek Elkins <[EMAIL PROTECTED]> writes: > > >> parseCSVFromFile "in.csv" >>= return . either (const "error!") > > > Whenever you see this >>= return . f pattern think liftM or fmap or <$>. > > ...and "return . f >>= action" is just "action

[Haskell-cafe] Re: Health effects

2008-10-01 Thread Dominic Steinitz
Adrian Neumann inf.fu-berlin.de> writes: > > I often wonder how many cuts you need to divide a steak in n pieces. > You can obviously get n pieces with (sqrt n) cuts by cutting a grid. > But I'm sure some smart mathematician thought of a (log n) way. > You might try the ham sandwich theore

Re: [Haskell-cafe] Class Quantification

2008-10-01 Thread Jules Bean
Bas van Dijk wrote: On Wed, Oct 1, 2008 at 3:01 AM, Reiner Pope <[EMAIL PROTECTED]> wrote: I believe there is no way to simply express this "abstraction over classes", but the Scrap your boilerplate with class[1] paper discusses this same problem and present a workaround by defining the class's

Re: [Haskell-cafe] Version 0.4.3 of happs-tutorial is a HAppS job board, done in HAppS.

2008-10-01 Thread Thomas Hartman
Oh, the whole point of this was to put preview of the latest chapters I've been working on. The new stuff is at http://happstutorial.com:5002/ So far there's an introduction to macid, macid data safety and backups, and using utf8 data with happs. I'm particularly intereted in hearing what the h

Re: [Haskell-cafe] Re: Health effects

2008-10-01 Thread Gianfranco Alongi
Throw the "no free lunch"-theorem on top of that. http://en.wikipedia.org/wiki/No_free_lunch_theorem On Wed, Oct 1, 2008 at 3:33 PM, Dominic Steinitz <[EMAIL PROTECTED]> wrote: > Adrian Neumann inf.fu-berlin.de> writes: > >> >> I often wonder how many cuts you need to divide a steak in n pieces.

Re: [Haskell-cafe] Re: Health effects

2008-10-01 Thread Anton van Straaten
Achim Schneider wrote: Jon Fairbairn <[EMAIL PROTECTED]> wrote: Adrian Neumann <[EMAIL PROTECTED]> writes: I often wonder how many cuts you need to divide a steak in n pieces. You can obviously get n pieces with (sqrt n) cuts by cutting a grid. But I'm sure some smart mathematician thought

[Haskell-cafe] Re: Hmm, what license to use?

2008-10-01 Thread Simon Marlow
brian wrote: On Tue, Sep 30, 2008 at 8:54 PM, Stefan Monnier <[EMAIL PROTECTED]> wrote: That still leaves anyone free to use LGPL if they want to, but please don't assume that it allows commercial use by all potential users. It *does* allow commercial use. Your example just shows that some peo

[Haskell-cafe] Re: [Haskell] ANN: Haskell-Embedded System Design: ForSyDe 3.0 and Tutorial

2008-10-01 Thread Don Stewart
alfonso.acosta: > Hi everyone, > > I am glad to announce the 3.0 release of ForSyDe's implementation, now > available from HackageDB. > Awesome, native packages now available, http://aur.archlinux.org/packages.php?ID=20422 -- Don ___ Haskell-Cafe

Re: [Haskell-cafe] cabal upgrade

2008-10-01 Thread Duncan Coutts
On Wed, 2008-10-01 at 08:58 +0100, Malcolm Wallace wrote: > >> When I wanted to upgrade to yi 0.4.6.2, I needed to download the new > >> package list > >> > >> cabal update #download list of new packages > >> cabal upgrade #make any upgrades > > I never knew there was a 'cabal up

[Haskell-cafe] Haskell, GHC, and ABI

2008-10-01 Thread Sean Leather
> Dynamic linking doesn't solve all the problems, we still have the problem > that GHC does a lot of cross-module inlining, regardless of whether dynamic > linking is used. However, I really would like to have a way to have > complete control over what is exposed across a package boundary. We nee

Re: [Haskell-cafe] The Haskell Platform

2008-10-01 Thread Don Stewart
vigalchin: >Hello, > > I probably missed some details for which I apologize. My feeling is >that "periodically" the "haskell platform server" should attempt to >rebuild the Haskell library. Any library that fails to rebuild then the >"maintainer" of that library should be

Re: [Haskell-cafe] Re: Hmm, what license to use?

2008-10-01 Thread Don Stewart
magnus: > On Wed, Oct 1, 2008 at 3:31 AM, brian <[EMAIL PROTECTED]> wrote: > [..] > > as big a problem as I imagined. My understanding is that I can satisfy > > the requirements of the LGPL by dynamically linking, and that's > > already happening. Is there something else to worry about? I'd be in >

Re: [Haskell-cafe] cabal upgrade

2008-10-01 Thread Svein Ove Aas
On Wed, Oct 1, 2008 at 7:54 PM, Duncan Coutts > Because we actually consult the index of available packages more often > than you think. Every time you cabal install in a local directory we > make sure all the required packages are available and consistent. If we > had to go to the network every ti

Re: [Haskell-cafe] Re: Hmm, what license to use?

2008-10-01 Thread Malcolm Wallace
Just a small nuance to what Don wrote: * Haskell libraries are always statically linked and agressively inlined, But only for GHC (and jhc?). so opinion seems to be that LGPL licensed *Haskell libaries* are unsuitable for any projects you want to ship commercia

[Haskell-cafe] Re: cabal upgrade

2008-10-01 Thread Achim Schneider
"Svein Ove Aas" <[EMAIL PROTECTED]> wrote: > On Wed, Oct 1, 2008 at 7:54 PM, Duncan Coutts > > Because we actually consult the index of available packages more > > often than you think. Every time you cabal install in a local > > directory we make sure all the required packages are available and >

[Haskell-cafe] Re: Doing something constructive. [Was: Climbing up the shootout...]

2008-10-01 Thread Manlio Perillo
Don Stewart ha scritto: manlio_perillo: However I'm looking for a good environment for implementing generic internet servers, or web applications with special needs. As an example one of my "maybe future" tasks is to write a simple BitTorrent tracker + seeder. You could look at conjure, the b

[Haskell-cafe] Re: Hmm, what license to use?

2008-10-01 Thread Gour
> "Don" == Don Stewart <[EMAIL PROTECTED]> writes: Don> * Only a small percent of Haskell libarires are LGPL, and Don> nothing for which we don't have workarounds (e.g. HDBC vs Don> galois-sqlite3 vs takusen). Hmm, Gtk2Hs & wxhaskell - major GUI libs... Sincerely, Gour -- Gour | Zag

Re: [Haskell-cafe] pure Haskell database

2008-10-01 Thread Manlio Perillo
Graham Fawcett ha scritto: [...] Never though about sparse array, what is the advantage? For the complexity, the same of a good hash map. Almost certainly worse complexity than a hash map; but the overhead could be much smaller. If (for example) you only needed a small number of key/value pair

Re: [Haskell-cafe] Re: cabal upgrade

2008-10-01 Thread Svein Ove Aas
On Wed, Oct 1, 2008 at 8:59 PM, Achim Schneider <[EMAIL PROTECTED]> wrote: > Additionally, you could use rsync instead of a tbz download to speed > things up. Gentoo does this right. > It wouldn't be *that* much faster, and the server load would be higher. The current package index is.. what, half

Re: [Haskell-cafe] csv one-liner

2008-10-01 Thread Andrew Coppin
wman wrote: Long story short, I promised him a one-liner to "show the power and beauty of Haskell". (writeFile "output.csv") =<< (liftM printCSV $ liftM (map updateLine) $ parseCSVFromFile "input.csv") Is there room for improvement ? Um... Does anybody else find it interesting that we are

Re: [Haskell-cafe] cabal upgrade

2008-10-01 Thread Martin DeMello
On Tue, Sep 30, 2008 at 9:01 PM, Duncan Coutts <[EMAIL PROTECTED]> wrote: > On Wed, 2008-10-01 at 01:59 +0200, Cetin Sert wrote: >> A reminder: >> >> When I wanted to upgrade to yi 0.4.6.2, I needed to download the new >> package list >> >> cabal update #download list of new packages >> c

Re: [Haskell-cafe] Re: Health effects

2008-10-01 Thread Andrew Coppin
Benjamin L.Russell wrote: On Tue, 30 Sep 2008 19:54:17 +0200, Adrian Neumann <[EMAIL PROTECTED]> wrote: I often wonder how many cuts you need to divide a steak in n pieces. You can obviously get n pieces with (sqrt n) cuts by cutting a grid. But I'm sure some smart mathematician thought o

[Haskell-cafe] Re: cabal upgrade

2008-10-01 Thread Stefan Monnier
> It's something to consider in the future, although a change-aware > "filesystem" (git, say? It's fast) would probably be better. ^^^ You misspelled "darcs". Stefan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http:/

Re: [Haskell-cafe] Re: Hmm, what license to use?

2008-10-01 Thread Don Stewart
malcolm.wallace: > Just a small nuance to what Don wrote: > > > * Haskell libraries are always statically linked and agressively > > inlined, > > But only for GHC (and jhc?). > > > so opinion seems to be that LGPL licensed *Haskell > > libaries* are unsuitable for any proje

Re: [Haskell-cafe] Re: cabal upgrade

2008-10-01 Thread Svein Ove Aas
On Wed, Oct 1, 2008 at 9:56 PM, Stefan Monnier <[EMAIL PROTECTED]> wrote: >> It's something to consider in the future, although a change-aware >> "filesystem" (git, say? It's fast) would probably be better. >^^^ > > You misspelled "darcs". > I know how git would improve on darcs her

Re: [Haskell-cafe] cabal upgrade

2008-10-01 Thread Svein Ove Aas
On Wed, Oct 1, 2008 at 9:52 PM, Martin DeMello <[EMAIL PROTECTED]> wrote: > > $ cabal install yi > Resolving dependencies... > 'yi-0.4.6.2' is cached. > Configuring yi-0.4.6.2... > cabal: alex version >=2.0.1 && <3 is required but it could not be found. > cabal: Error: some packages failed to insta

Re: [Haskell-cafe] cabal upgrade

2008-10-01 Thread Martin DeMello
On Wed, Oct 1, 2008 at 1:04 PM, Svein Ove Aas <[EMAIL PROTECTED]> wrote: > On Wed, Oct 1, 2008 at 9:52 PM, Martin DeMello <[EMAIL PROTECTED]> wrote: >> >> $ cabal install yi >> Resolving dependencies... >> 'yi-0.4.6.2' is cached. >> Configuring yi-0.4.6.2... >> cabal: alex version >=2.0.1 && <3 is

Re: [Haskell-cafe] cabal upgrade

2008-10-01 Thread Gwern Branwen
On 2008.10.01 12:52:47 -0700, Martin DeMello <[EMAIL PROTECTED]> scribbled 1.2K characters: > On Tue, Sep 30, 2008 at 9:01 PM, Duncan Coutts > <[EMAIL PROTECTED]> wrote: > > On Wed, 2008-10-01 at 01:59 +0200, Cetin Sert wrote: > >> A reminder: > >> > >> When I wanted to upgrade to yi 0.4.6.2, I ne

Re: [Haskell-cafe] Re: Hmm, what license to use?

2008-10-01 Thread Tom Schrijvers
Don "thinking that compiler developer fragmentation doesn't help now the language research is 'done'" Language researchers should move to a new language? Tom -- Tom Schrijvers Department of Computer Science K.U. Leuven Celestijnenlaan 200A B-3001 Heverlee Belgium tel: +32 16 327544 e-mai

Re: [Haskell-cafe] Re: Hmm, what license to use?

2008-10-01 Thread Philippa Cowderoy
On Wed, 1 Oct 2008, Don Stewart wrote: > malcolm.wallace: > > Just a small nuance to what Don wrote: > > > so opinion seems to be that LGPL licensed *Haskell > > > libaries* are unsuitable for any projects you want to ship > > > commercially, without source code. > > > > Unles

Re: [Haskell-cafe] csv one-liner

2008-10-01 Thread wman
Thats why i put those quotation marks around that part of sequence ;-)) AFAIK one-liners never were about comprehensibility, just about what you can cram into one line of code. Any programmer should have no problems guessing what the line does does (even more so when looking at the "final" version

Re: [Haskell-cafe] csv one-liner

2008-10-01 Thread Brandon S. Allbery KF8NH
On Oct 1, 2008, at 15:51 , Andrew Coppin wrote: wman wrote: Long story short, I promised him a one-liner to "show the power and beauty of Haskell". (writeFile "output.csv") =<< (liftM printCSV $ liftM (map updateLine) $ parseCSVFromFile "input.csv") Is there room for improvement ? Um...

Re: [Haskell-cafe] csv one-liner

2008-10-01 Thread Martin DeMello
2008/10/1 wman <[EMAIL PROTECTED]>: > > PS: Sorry, Andrew, that I first posted the reply directly to you, still > getting used to the fact that gmail kindly replies to the user on whose > behalf the message was sent, not to the list. I think that's a list setting, not a gmail one. martin

Re: [Haskell-cafe] csv one-liner

2008-10-01 Thread Andrew Coppin
wman wrote: Thats why i put those quotation marks around that part of sequence ;-)) AFAIK one-liners never were about comprehensibility, just about what you can cram into one line of code. Any programmer should have no problems guessing what the line does does (even more so when looking at th

[Haskell-cafe] Shooting your self in the foot with Haskell

2008-10-01 Thread John Van Enk
There's the well known "How to shoot your self in the foot" list which I have it printed and taped on my desk at work. http://www-users.cs.york.ac.uk/susan/joke/foot.htm I had a co-worker ask me how you'd shoot your self in the foot with Haskell. Here's the best I could do: "You shoot the gun,

Re: [Haskell-cafe] Shooting your self in the foot with Haskell

2008-10-01 Thread Joachim Breitner
Hi, Am Mittwoch, den 01.10.2008, 16:46 -0400 schrieb John Van Enk: > There's the well known "How to shoot your self in the foot" list which > I have it printed and taped on my desk at work. > > http://www-users.cs.york.ac.uk/susan/joke/foot.htm > > I had a co-worker ask me how you'd shoot your

Re: [Haskell-cafe] cabal upgrade

2008-10-01 Thread Martin DeMello
On Wed, Oct 1, 2008 at 1:06 PM, Gwern Branwen <[EMAIL PROTECTED]> wrote: > Yi fails on Alex because Cabal doesn't track executables, nor executables > needed for installation. You want 'cabal install alex yi'; Yay, that finally worked :) Had to add ~/.cabal/bin to my path first, which wasn't har

Re: [Haskell-cafe] csv one-liner

2008-10-01 Thread Ketil Malde
Andrew Coppin <[EMAIL PROTECTED]> writes: >> (writeFile "output.csv") =<< (liftM printCSV $ liftM (map >> updateLine) $ parseCSVFromFile "input.csv") > Um... Does anybody else find it interesting that we are "showing the > beauty of Haskell" by attempting to construct the most terse, cryptic, > u

Re: [Haskell-cafe] cabal upgrade

2008-10-01 Thread Gwern Branwen
On 2008.10.01 13:24:55 -0700, Martin DeMello <[EMAIL PROTECTED]> scribbled 0.9K characters: > On Wed, Oct 1, 2008 at 1:06 PM, Gwern Branwen <[EMAIL PROTECTED]> wrote: > > > Yi fails on Alex because Cabal doesn't track executables, nor executables > > needed for installation. You want 'cabal insta

Re: [Haskell-cafe] csv one-liner

2008-10-01 Thread wman
On Wed, Oct 1, 2008 at 10:40 PM, Andrew Coppin <[EMAIL PROTECTED]>wrote: > Maybe I should start a new tradition where Haskellers have a blob of > Haskell as their sig? > > (I can't *wait* to see what the luminaries such as dons, dcoutts and igloo > come up with...) > Some haskell equivalent of :

Re: [Haskell-cafe] Shooting your self in the foot with Haskell

2008-10-01 Thread Martin DeMello
2008/10/1 Joachim Breitner <[EMAIL PROTECTED]>: > > You shoot the gun, but nobody notices because no-one evaluates the > target. Who'd've thunk it! m. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell-cafe] csv one-liner

2008-10-01 Thread Claus Reinke
(writeFile "output.csv") =<< (liftM printCSV $ liftM (map updateLine) $ parseCSVFromFile "input.csv") Um... Does anybody else find it interesting that we are "showing the beauty of Haskell" by attempting to construct the most terse, cryptic, unmaintainable tangle of point-free code I don't ag

Re: [Haskell-cafe] cabal upgrade

2008-10-01 Thread Duncan Coutts
On Wed, 2008-10-01 at 20:53 +0200, Svein Ove Aas wrote: > On Wed, Oct 1, 2008 at 7:54 PM, Duncan Coutts > > Because we actually consult the index of available packages more often > > than you think. Every time you cabal install in a local directory we > > make sure all the required packages are ava

Re: [Haskell-cafe] Shooting your self in the foot with Haskell

2008-10-01 Thread Jake McArthur
John Van Enk wrote: I had a co-worker ask me how you'd shoot your self in the foot with Haskell. [...] Some one please give me something more worth of the original list. Couldn't match expected type 'Deer' against inferred type 'Foot' - Jake ___ Hask

Re: [Haskell-cafe] (A little humour)

2008-10-01 Thread Dan Piponi
On Wed, Oct 1, 2008 at 2:59 AM, Manlio Perillo <[EMAIL PROTECTED]> wrote: > Miguel Mitrofanov ha scritto: > By the way, is it technically possible (and feasible), in Haskell, to define > a space operator? In a way it's what is described in this paper: http://www.cs.nott.ac.uk/~ctm/IdiomLite.pdf

Re: [Haskell-cafe] cabal upgrade

2008-10-01 Thread wman
On Wed, Oct 1, 2008 at 10:52 PM, Duncan Coutts <[EMAIL PROTECTED]>wrote: > > and you have network access, start updating it. > > That's hard. Detecting if we would be able to make a network connection > without actually doing it is not something I know how to do (esp in a > portable way). We would

Re: [Haskell-cafe] cabal upgrade

2008-10-01 Thread Svein Ove Aas
On Wed, Oct 1, 2008 at 10:52 PM, Duncan Coutts <[EMAIL PROTECTED]> wrote: > On Wed, 2008-10-01 at 20:53 +0200, Svein Ove Aas wrote: >> and you have network access, start updating it. > > That's hard. Detecting if we would be able to make a network connection > without actually doing it is not some

Re: [Haskell-cafe] Shooting your self in the foot with Haskell

2008-10-01 Thread Simon Brenner
On 10/1/08, John Van Enk <[EMAIL PROTECTED]> wrote: > There's the well known "How to shoot your self in the foot" list which I > have it printed and taped on my desk at work. > > http://www-users.cs.york.ac.uk/susan/joke/foot.htm > > I had a co-worker ask me how you'd shoot your self in the foot w

Re: [Haskell-cafe] Re: Health effects

2008-10-01 Thread Brandon S. Allbery KF8NH
On 2008 Oct 1, at 15:56, Andrew Coppin wrote: Benjamin L.Russell wrote: On Tue, 30 Sep 2008 19:54:17 +0200, Adrian Neumann <[EMAIL PROTECTED]> wrote: I often wonder how many cuts you need to divide a steak in n pieces. You can obviously get n pieces with (sqrt n) cuts by cutting a grid. Bu

Re: [Haskell-cafe] Shooting your self in the foot with Haskell

2008-10-01 Thread Jason Dagit
On Wed, Oct 1, 2008 at 3:27 PM, Simon Brenner <[EMAIL PROTECTED]> wrote: > On 10/1/08, John Van Enk <[EMAIL PROTECTED]> wrote: > > There's the well known "How to shoot your self in the foot" list which I > > have it printed and taped on my desk at work. > > > > http://www-users.cs.york.ac.uk/susan

Re: [Haskell-cafe] cabal upgrade

2008-10-01 Thread Krzysztof Skrzętnicki
On Thu, Oct 2, 2008 at 00:00, Svein Ove Aas <[EMAIL PROTECTED]> wrote: > That aside, why not start downloading in the background, while it's > doing whatever you started cabal for? Assuming the network is working, > you should have an updated package list by the time it's done; > granted, it won't

Re: [Haskell-cafe] Shooting your self in the foot with Haskell

2008-10-01 Thread John Van Enk
On Wed, Oct 1, 2008 at 6:38 PM, Jason Dagit <[EMAIL PROTECTED]> wrote: > > > Heh. Nice. Oleg has earned himself the Haskell equivalent of a Chuck > Norris reputation. Except that Oleg has really earned the respect he gets > from our teasing. BTW, is there an Oleg Facts website? > > Jason > > N

Re: [Haskell-cafe] (A little humour)

2008-10-01 Thread Dan Piponi
On Wed, Oct 1, 2008 at 2:45 PM, Dan Piponi <[EMAIL PROTECTED]> wrote: > In the proposed notation, within [[]]'s there is an implied <*> for every > space. Come to think of it, surely that's why they're called *applicative* functors. In Haskell, a space between identifiers corresponds implicitly

Re: [Haskell-cafe] Re: Health effects

2008-10-01 Thread Bill
On Wed, 2008-10-01 at 20:56 +0100, Andrew Coppin wrote: . . . > You know, it's interesting... I posted this in another forum, and people > just said "dude, why would you try to eat a whole 2 Kg of chocolate? > That's really unhealthy." I post the same thing here and now people are > arguing a

Re: [Haskell-cafe] Shooting your self in the foot with Haskell

2008-10-01 Thread Bill
On Wed, 2008-10-01 at 16:46 -0400, John Van Enk wrote: . . . > I fully realize how un-clever this is. Some one please give me > something more worth of the original list. :) You shoot the gun but nothing happens (Haskell is pure, after all). ___ Hask

Re: [Haskell-cafe] Shooting your self in the foot with Haskell

2008-10-01 Thread Evan Laforge
On Wed, Oct 1, 2008 at 3:39 PM, Bill <[EMAIL PROTECTED]> wrote: > On Wed, 2008-10-01 at 16:46 -0400, John Van Enk wrote: > . . . >> I fully realize how un-clever this is. Some one please give me >> something more worth of the original list. :) > > You shoot the gun but nothing happens (Haskell is

Re: [Haskell-cafe] Shooting your self in the foot with Haskell

2008-10-01 Thread John Melesky
On Oct 1, 2008, at 1:46 PM, John Van Enk wrote: "You shoot the gun, but the bullet gets trapped in the IO monad." You have a shootFoot function which you've proven correct. QuickCheck validates it for arbitrary you-like values. It will be evaluated only when you end up at the hospital. You

Re: [Haskell-cafe] Shooting your self in the foot with Haskell

2008-10-01 Thread Martin DeMello
On Wed, Oct 1, 2008 at 3:39 PM, Bill <[EMAIL PROTECTED]> wrote: > On Wed, 2008-10-01 at 16:46 -0400, John Van Enk wrote: > . . . >> I fully realize how un-clever this is. Some one please give me >> something more worth of the original list. :) > > You shoot the gun but nothing happens (Haskell is

Re: [Haskell-cafe] Shooting your self in the foot with Haskell

2008-10-01 Thread Gwern Branwen
On 2008.10.01 15:38:08 -0700, Jason Dagit <[EMAIL PROTECTED]> scribbled 4.3K characters: >Heh. Nice. Oleg has earned himself the Haskell equivalent of a Chuck > Norris reputation. >Except that Oleg has really earned the respect he gets from our teasing. > BTW, is there an >Oleg Fac

Re: [Haskell-cafe] Shooting your self in the foot with Haskell

2008-10-01 Thread Luke Palmer
On Wed, Oct 1, 2008 at 3:42 PM, Jake McArthur <[EMAIL PROTECTED]> wrote: > John Van Enk wrote: >> >> I had a co-worker ask me how you'd shoot your self in the foot with >> Haskell. [...] Some one please give me something more worth of the original >> list. > > Couldn't match expected type 'Deer' ag

Re: [Haskell-cafe] Re: Total Functional Programming in Haskell

2008-10-01 Thread wren ng thornton
Jason Dagit wrote: I was asserting that Haskell is currently 2 layered. Purely functional vs. IO. They integrate nicely and play well together, but I still think of them as distinct layers. Perhaps this is not fair or confusing though. The paper I cited did indeed use codata to define streams

Re: [Haskell-cafe] flipped IO sequence

2008-10-01 Thread Luke Palmer
2008/10/1 Cetin Sert <[EMAIL PROTECTED]>: > warn :: String → IO Int > warn = return 1 << putStrLn-- causes an error > -- = \msg → return 1 << putStrLn msg -- works just fine > -- = \msg → putStrLn msg >> return 1 -- works just fine > > (<<) :: Monad m ⇒ m b → m a → m b > b << a = a

[Haskell-cafe] Restricted file reading monad

2008-10-01 Thread George Pollard
Hello all, I'm currently working on a (toy) ID3 [1] tag reader, which made me think of a library which might be quite useful. The structure of an ID3 tag goes something like this: Header: - total size of tag - other header info A series of frames, each with: - total size of frame - other header

Re: [Haskell-cafe] Restricted file reading monad

2008-10-01 Thread Jason Dusek
This is something of the blind leading the blind, but you seem to need a bit of state monad mixed with IO monad. So you could look into StateT, a monad transformer, which should make you a StateIO monad specialized to FileReader. Then you define a `runFileReader` that allows you to jump i

Re: [Haskell-cafe] Shooting your self in the foot with Haskell

2008-10-01 Thread ajb
G'day all. On Wed, Oct 1, 2008 at 3:42 PM, Jake McArthur <[EMAIL PROTECTED]> wrote: Couldn't match expected type 'Deer' against inferred type 'Foot' No instance for (Target Foot) arising from use of `shoot' at SelfInflictedInjury.hs:1:0 Possible fix: add an instance declaration

Re: [Haskell-cafe] csv one-liner

2008-10-01 Thread Marco Túlio Gontijo e Silva
Op woensdag 01-10-2008 om 13:25 uur [tijdzone -0700], schreef Martin DeMello: > 2008/10/1 wman <[EMAIL PROTECTED]>: > > > > PS: Sorry, Andrew, that I first posted the reply directly to you, still > > getting used to the fact that gmail kindly replies to the user on whose > > behalf the message was

Re: [Haskell-cafe] csv one-liner

2008-10-01 Thread Marco Túlio Gontijo e Silva
Op woensdag 01-10-2008 om 10:15 uur [tijdzone +0200], schreef Ketil Malde: > Derek Elkins <[EMAIL PROTECTED]> writes: > > >> parseCSVFromFile "in.csv" >>= return . either (const "error!") > > > Whenever you see this >>= return . f pattern think liftM or fmap or <$>. > > ...and "return . f >>= ac

Re: [Haskell-cafe] csv one-liner

2008-10-01 Thread Jason Dusek
Reply to all? -- _jsn ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Haskell Weekly News: Issue 87 - October 1, 2008

2008-10-01 Thread Brent Yorgey
--- Haskell Weekly News http://sequence.complete.org/hwn/20081001 Issue 87 - October 01, 2008 --- Welcome to issue 87 of HWN, a newsletter covering

Re: [Haskell-cafe] Health effects

2008-10-01 Thread ajb
G'day all. Quoting Adrian Neumann <[EMAIL PROTECTED]>: I often wonder how many cuts you need to divide a steak in n pieces. One, if the cut is allowed to be curved and self-intersecting. I think that the spirit of the problem, though is encapsulated in this question: Given a circle, what is

[Haskell-cafe] Class Quantification

2008-10-01 Thread oleg
Bas van Dijk wrote: > ... it's possible to define 'foo' and 'bar' like so: > > > foo :: (Num c, Num d) => (forall b. Num b => a -> b) -> a -> (c, d) > > foo f x = (f x, f x) > > > bar :: (Read c, Read d) => (forall b. Read b => a -> b) -> a -> (c, d) > > bar f x = (f x, f x) > > Which allows us t

[Haskell-cafe] Restricted file reading monad

2008-10-01 Thread oleg
George Pollard wrote: > The structure of an ID3 tag goes something like this: > Header: > - total size of tag > - other header info > A series of frames, each with: > - total size of frame > - other header info > - frame data > > Since the ID3 tag as a whole has size information, I need to pass th

  1   2   >