[Haskell-cafe] Bathroom reading

2007-08-14 Thread Dougal Stanton
I'm looking for cool but mind-bending examples of functional brilliance. Let us say, hypothetically, you had a bathroom without any reading material. And having read all the Dilbert and Garfield you could seriously stomach, decide you should educate yourself while on the job. :-) So you decide

Re: [Haskell-cafe] Bathroom reading

2007-08-14 Thread Dougal Stanton
On 14/08/07, Brent Yorgey [EMAIL PROTECTED] wrote: Clearly, we need to actually put together such a book! I'm imagining something where you have two mostly blank facing pages, with the code by itself in the middle of the right page; then the next 2-4 pages devoted to a short discussion of the

Re: [Haskell-cafe] Why monad tutorials don't work

2007-08-14 Thread Dougal Stanton
On 14/08/07, Dan Weston [EMAIL PROTECTED] wrote: [snips another metaphor for monadic programming] No offence to Dan, whose post I enjoyed. The concept of wrapping is as close a metaphor as we seem to get without disagreements. But this has brought me to a realisation, after Paul Erdos: The

Re: [Haskell-cafe] creating graphics the functional way

2007-08-05 Thread Dougal Stanton
On 05/08/07, Frank Buss [EMAIL PROTECTED] wrote: Is it possible to write functions with an arbitrary number of arguments? Would be nice if the average function would accept any number of pixel values. I think it's possible in some sense, because the Haskell interpretation of printf() works in

Re: [Haskell-cafe] When is waitForProcess not necessary?

2007-08-03 Thread Dougal Stanton
On 03/08/07, Dave Bayer [EMAIL PROTECTED] wrote: I'm actually calling Markdown.pl on tiny files (source code of lengths a human would read), and it is certainly sluggish enough to be a fair test.) I had to do this recently, so you might be interested in my approach:

Re: [Haskell-cafe] When is waitForProcess not necessary?

2007-08-03 Thread Dougal Stanton
On 03/08/07, Bryan O'Sullivan [EMAIL PROTECTED] wrote: Pardon me while I veer off-topic, but you could also use Pandoc to do this. No forking required. http://sophos.berkeley.edu/macfarlane/pandoc/ I'll add that to the list of things that must be done. That list seems, necessarily, to be

Re: [Haskell-cafe] Monad Description For Imperative Programmer

2007-08-02 Thread Dougal Stanton
On 02/08/07, Alexis Hazell [EMAIL PROTECTED] wrote: It's at this point that i feel there's an issue. Haskell Monads are used FOR many many things. And rather than get to the core of what a Monad is, many people provide two or three motivating examples - examples which merely serve to show

Re: [Haskell-cafe] Monad Description For Imperative Programmer

2007-08-01 Thread Dougal Stanton
On 01/08/07, Andrew Wagner [EMAIL PROTECTED] wrote: This seems wrong to me. A monad is, first and foremost, a type constructor class. I'm not sure how you can really compare that to a loop. But perhaps the easiest way to test your definition would be to ask this: How is, for example, the Maybe

Re: [Haskell-cafe] Newbie question about Haskell skills progress

2007-07-31 Thread Dougal Stanton
On 31/07/07, peterv [EMAIL PROTECTED] wrote: Having only a couple of days of practice programming Haskell (but having read lots of books and docs), I find myself writing very explicit low level code using inner aux functions (accumulators and loops). Then I force myself to revise the

Re: Re : Re : Re : [Haskell-cafe] Indentation woes

2007-07-27 Thread Dougal Stanton
On 27/07/07, anon [EMAIL PROTECTED] wrote: I see what you did there. But you really might as well end sentences with prepositions. Or begin them with conjunction. Or indent your code whichever way seems most natural and elegant because to do otherwise is just prescriptivism for its own sake.

Re: [Haskell-cafe] Re: Practise fingerspelling with Haskell! (Code cleanup request)

2007-07-18 Thread Dougal Stanton
On 18/07/07, apfelmus [EMAIL PROTECTED] wrote: I like it for its elegant point-free style :) Yes, well, I am rather enamoured of them! :-) Apparently, difference can only detect character replacements but not character insertion or deletion, but that's probably not your use case. Yes,

Re: [Haskell-cafe] Re: Practise fingerspelling with Haskell! (Code cleanup request)

2007-07-18 Thread Dougal Stanton
On 18/07/07, J. Garrett Morris [EMAIL PROTECTED] wrote: You're partway there - concatMap is flip (=), so you have the xs = (\x - stuff) part. Ah, yes! I read about this equivalence in one of the other threads today but it didn't make any connection. Doh! I think I will have to, sooner or

[Haskell-cafe] Practise fingerspelling with Haskell! (Code cleanup request)

2007-07-17 Thread Dougal Stanton
The following is a slap-dash program for generating a list of pairs of words which differ by, at most, one letter. It's quite verbose at the moment, because (a) that was the way I wrote it, a snippet at a time, and (b) I lack the wit to make it shorter. Can anyone recommend ways to make this

Re: [Haskell-cafe] Maintaining the community

2007-07-13 Thread Dougal Stanton
On 13/07/07, Jim Burton [EMAIL PROTECTED] wrote: As well as being nice, can't you sometimes tell people to RTFM? Or, You've asked that before, or That's an FAQ, search the archive? I suppose you could, but speaking as someone who doesn't know much but tries to answer questions when he does

Re: [Haskell-cafe] unresolved overloading

2007-07-12 Thread Dougal Stanton
On 12/07/07, Crediné Menezes [EMAIL PROTECTED] wrote: I have written this code in Haskell which gives an unresolved overloading error. g x = [2] ++ [3,5..truncate(sqrt x)] p n= fp n (g n) fp n [ ]= True fp n (x:xs) = if (mod n x) == 0 then False else fp n xs

Re: [Haskell-cafe] Clearly, Haskell is ill-founded

2007-07-11 Thread Dougal Stanton
On 11/07/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: You mean nstructed. Now if you'l excuse me, I'm off to write some de. Ah, everyone's a median ;-) Cheers, Dougal. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] Profiling and Threading: never the twain shall meet

2007-07-05 Thread Dougal Stanton
Hi Haskellers, It seems that profiling and threading are not supported at the same time in GHC6.6. At least, it objects to using both the flags at the same time, and there's a Trac entry for that issue. So I just wanted to be sure that I really need threading. I'm passing text through some

Re: [Haskell-cafe] Haskell's currying versus Business Objects Gem Cutter's burning

2007-07-03 Thread Dougal Stanton
On 03/07/07, peterv [EMAIL PROTECTED] wrote: In Haskell, currying can only be done on the last (rightmost) function arguments. So foo x y can be curried as foo x but not as foo ? y where ? would be a wilcard for the x parameter. The function flip can be used in

Re: [Haskell-cafe] New New newbie question/help

2007-06-27 Thread Dougal Stanton
On 27/06/07, Balu Raman [EMAIL PROTECTED] wrote: equilateralTri :: Window - Int - Int - Int - IO() equilateralTri w x y side = drawInWindow w (withColor Red (polygon [(x,y),(a,b),(x,y)]))

Re: [Haskell-cafe] New New newbie question/help

2007-06-27 Thread Dougal Stanton
On 27/06/07, Paul Hudak [EMAIL PROTECTED] wrote: I think that an easier solution is to just change the type of equilateralTri to: equilateralTri :: Window - Float - Float - Float - IO() But I am on the road and wasn't able to actually run the code. I don't have my copy of SOE to hand, so I

Re: [Haskell-cafe] Re: Haskell version of ray tracer code is much slower than the original ML

2007-06-22 Thread Dougal Stanton
On 22/06/07, Claus Reinke [EMAIL PROTECTED] wrote: perhaps this should be generalised to ghc flag profiles, to cover things like '-fno-monomorphism-restriction -fno-mono-pat-binds' or '-fglasgow-exts -fallow-undecidable-instances; and the like? You just *know* someone's gonna abuse that to

Re: [Haskell-cafe] A probably-stupid question about a Prelude implementation.

2007-06-22 Thread Dougal Stanton
On 22/06/07, Michael T. Richter [EMAIL PROTECTED] wrote: So, I'm now going over the code in the 'Report with a fine-toothed comb because a) I'm actually able to read it now pretty fluently and b) I want to know what's there in detail for a project I'm starting. I stumbled across this code:

Re: [Haskell-cafe] memory usage in repeated reading of an external program's output

2007-06-21 Thread Dougal Stanton
On 21/06/07, Andrea Rossato [EMAIL PROTECTED] wrote: runComLoop :: String - IO () runComLoop command = do (r,w) - createPipe wh - fdToHandle w hSetBuffering wh LineBuffering p - runProcess command [] Nothing Nothing Nothing (Just wh) (Just wh) rh - fdToHandle r

Re: [Haskell-cafe] Perl-style numeric type

2007-06-19 Thread Dougal Stanton
On 19/06/07, Brent Yorgey [EMAIL PROTECTED] wrote: PS Also, did anyone get my e-mail to this list of June 8 about Template Haskell and QuickCheck? If you did and it's just that no one knows the answer to my questions, no problem. But I was subscribed in a strange way (through the fa.haskell

Re: [Haskell-cafe] standard function

2007-06-06 Thread Dougal Stanton
On 06/06/07, Steffen Mazanek [EMAIL PROTECTED] wrote: Hello, is there a function f::[a-b]-a-[b] in the libraries? Couldn't find one using hoogle although this seems to be quite a common thing... Possibly it's just too small to bother putting in a separate function. let fs = [ (*2), (+2),

Re: literate haskell syntax highlighting issues in vim (Re:[Haskell-cafe] OK, so this VIM thing -- how do I make it actually work?)

2007-06-05 Thread Dougal Stanton
On 05/06/07, Claus Reinke [EMAIL PROTECTED] wrote: (tested on ghc/compiler/stranal/StrictAnal.lhs): Since when did GHC become NSFW?! :-O /ducking and running... D. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Re: Just for a laugh...

2007-05-31 Thread Dougal Stanton
On 31 May 2007 21:52:33 +0100, Jon Fairbairn [EMAIL PROTECTED] wrote: Yes, but you didn't say that it's not only silly but demonstrates the opposite of expressiveness as it's all about breaking an abstraction and must be non-portable code (because it's definition is that it won't give the same

Re: [Haskell-cafe] New book: Real-World Haskell!

2007-05-23 Thread Dougal Stanton
On 23/05/07, Donald Bruce Stewart [EMAIL PROTECTED] wrote: Bryan O'Sullivan, Don Stewart and John Goerzen are pleased, and frankly, very excited to announce that were developing a new book for O'Reilly, on practical Haskell programming. The working title is Real-World Haskell. That is

Re: [Haskell-cafe] global variables

2007-05-17 Thread Dougal Stanton
On 17/05/07, Eric [EMAIL PROTECTED] wrote: H|i, Does anyone know of a simple and straightforward way to use global variables in Haskell? You can pass around an environment with the State or Reader monads (read/write and read-only respectively). If you want to do IO with the data you'll

Re: [Haskell-cafe] global variables

2007-05-17 Thread Dougal Stanton
On 17/05/07, Jules Bean [EMAIL PROTECTED] wrote: I'd be willing to take a sportsman's bet that the original poster does not actually need to use this hack; I doubt his application falls into the categories you have outlined. I would discourage people from using this hack unless it is, in fact,

Re: [Haskell-cafe] Darcs annotate denies all knowledge of files...

2007-05-17 Thread Dougal Stanton
On 17/05/07, Brandon S. Allbery KF8NH [EMAIL PROTECTED] wrote: just to cover the bases: cd hpodder? Yes, did that! ;-) I realise it wasn't very clear from the snippet I provided. This, however, is a direct copy-n-paste: [EMAIL PROTECTED] hpodder $ ls Commands COPYINGDB.hs

Re: [Haskell-cafe] Re: (Chaos) [An interesting toy]

2007-05-07 Thread Dougal Stanton
On 07/05/07, David House [EMAIL PROTECTED] wrote: represented by a null pointer. So such luck with unboxed types. So working with unboxed types is quicker and consumes less memory, but don't use them in any kind of high level because the lack of a _|_ will bite you sooner or later. I hesitate

Re: [Haskell-cafe] The Functional Pearls

2007-05-05 Thread Dougal Stanton
On 05/05/07, Donald Bruce Stewart [EMAIL PROTECTED] wrote: I've created a wiki page collecting the 'functional pearl' papers that have appeared in JFP and ICFP and other places over the last 20 odd years. http://haskell.org/haskellwiki/Research_papers/Functional_pearls Lots of lovely

Re: [Haskell-cafe] Listing package dependencies from GHC

2007-05-03 Thread Dougal Stanton
On 03/05/07, Thomas Schilling [EMAIL PROTECTED] wrote: I once used this perl script to determine the files I was actually used (to have proper LOC stats). It uses ghc -M which usually outputs the dependencies as makefile targets, and then grep over this to get all the .hs files. If you have

Re: [Haskell-cafe] Listing package dependencies from GHC

2007-05-03 Thread Dougal Stanton
On 03/05/07, Thomas Schilling [EMAIL PROTECTED] wrote: Oh, right. Well, then please file it as a bug report on Cabal. I'll be working on Cabal configs as my Summer of Code project; this is clearly related. With a bit of luck it'll be done before end of August. Okay. It seemed like a

Re: [Haskell-cafe] Poor first impression

2007-04-27 Thread Dougal Stanton
On 27/04/07, Fernando Cassia [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] ghc-6.6.1]# ghc /usr/local/lib/ghc-6.6.1/ghc-6.6.1: error while loading shared libraries: libreadline.so.4: cannot open shared object file: No such file or directory # So, I conclude that Haskell is not ready for prime

[Haskell-cafe] Listing package dependencies from GHC

2007-04-27 Thread Dougal Stanton
If I'm doing development between ghci and vim, all the different dependencies I need get linked in when required without me asking. Similarly if I call ghc --make from the command line. But I have to write them in manually to my *.cabal file otherwise the compilation process will fail. Until now

Re: [Haskell-cafe] Parsec beginners problem

2007-04-27 Thread Dougal Stanton
On 27/04/07, Jim Burton [EMAIL PROTECTED] wrote: I have a couple of questions about my first use of Parsec, which is trying to read morse code symbols from a string. I have a map of symbols: import qualified Data.Map as M morsemap = M.fromList [('A', .-) ...

Re: [Haskell-cafe] Is Excel a FP language?

2007-04-25 Thread Dougal Stanton
On 25/04/07, Tony Morris [EMAIL PROTECTED] wrote: In a debate I proposed Excel is a functional language. It was refuted and I'd like to know what some of you clever Haskellers might think :) By coincidence I wrote about Excel (and related spreadsheets) as functional languages just recently

Re: [Haskell-cafe] IDE support

2007-04-23 Thread Dougal Stanton
On 23/04/07, David Waern [EMAIL PROTECTED] wrote: What IDE support is available for Haskell (Visuall Haskell, EclipseFP), anything else? I'm working in Haste2[1]. But it is unreleased :P [1] http://www.dtek.chalmers.se/~davve/haste2-new.png That's really clean-looking and undistracting.

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] Tutorial on Haskell

2007-04-18 Thread Dougal Stanton
On 18/04/07, R Hayes [EMAIL PROTECTED] wrote: One of the truly powerful things about Haskell is the short distance between theory and practicality. The problem is how to demonstrate this convincingly. The ability to prove a program's correctness is regularly trotted out for show in this arena

Re: [Haskell-cafe] Tutorial on Haskell

2007-04-16 Thread Dougal Stanton
On 16/04/07, Thomas Hartman [EMAIL PROTECTED] wrote: Maybe that could be simplified and something could be based on that. A one-liner using PCRE regex might also be of use. Unless it can be performed with astounding dexterity, I don't think try to beat, for example, Perl at its own game

Re: [Haskell-cafe] Re: Trouble trying to find packages for ubuntu linux

2007-04-05 Thread Dougal Stanton
On 05/04/07, Thomas Hartman [EMAIL PROTECTED] wrote: In the spirit of... I hate package chasing, cabal doesn't do this automatically (yet), and hard disk space is cheap... Agreed. As much as I like the rest of Ubuntu I'm beginning to dislike binary packages after only a week away from

Re: [Haskell-cafe] sending from Gmail (was Parsing words with parsec)

2007-03-30 Thread Dougal Stanton
On 30/03/07, Bayley, Alistair [EMAIL PROTECTED] wrote: Mhh, still I don't see any them in my inbox mails , probably something buggy in gmail configuration, sorry :/. Are you expecting to see your sent message eventually arrive in your inbox? gmail doesn't do that by default (and I don't see

Re: [Haskell-cafe] A wish for relaxed layout syntax

2007-03-29 Thread Dougal Stanton
On 29/03/07, Greg Buchholz [EMAIL PROTECTED] wrote: Something out of Unicode? ≬⊳⌁⋆☕⚡‣‸‡⁏•△▴◆◇◊◬◢◮♘♣♲♪◖▻▿轢 There should be a good candidate for a rational arrow notation in there! I always found the a - b - c syntax a bit disturbing. :-) D.

Re: [Haskell-cafe] Re: wanted: haskell one-liners (in the perl sense of one-liners)

2007-03-20 Thread Dougal Stanton
unix sort util act like this? Enh, who cares, now we have haskell. :) Alas, foiled again! ;-) sort flag: -n, --numeric-sort D. -- Dougal Stanton ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell-cafe] toClockTime

2007-03-20 Thread Dougal Stanton
it only applied to Unix systems but maybe the library assumes something it shouldn't at some point. [1]: http://en.wikipedia.org/wiki/Year_2038_problem -- Dougal Stanton ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman

Re: [Haskell-cafe] what I learnt from my first serious haskell programm

2007-03-19 Thread Dougal Stanton
a more decentralized design, where each module contributes one main type and according functions. That sounds like a kind of stateless object-oriented approach. Interesting. I probably do something like that but have never really formalised my thoughts on the matter. Nice one! -- Dougal Stanton

Re: [Haskell-cafe] Re: Lazy IO and closing of file handles

2007-03-14 Thread Dougal Stanton
but it sometimes makes a difference when things actually happen. -- Dougal Stanton ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: [Haskell] Haskell Weekly News: March 12, 2007

2007-03-13 Thread Dougal Stanton
contributors to The Monad Reader, who help to bridge that gap for the rest of us. Cheers, D. -- Dougal Stanton ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Maybe and partial functions

2007-03-12 Thread Dougal Stanton
in the first place. So --- where's the cutoff point in your code? Cheers, D. -- Dougal Stanton ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] library for generating HTML and LaTeX

2007-03-09 Thread Dougal Stanton
. Yeah, here we go: PanDoc [1], which converts between Markdown, reStructured Text, HTML, LaTeX and also RTF, DocBook and HTML slideshows. I've never used it but it sounds pretty nifty. [1]: http://sophos.berkeley.edu/macfarlane/pandoc/ -- Dougal Stanton

Re: [Haskell-cafe] A different Maybe maybe

2007-03-08 Thread Dougal Stanton
On 08/03/07, Dan Weston [EMAIL PROTECTED] wrote: Do not let the multiple responses of how you apparently wasted your time reinventing (or do they mean stealing?) something Church did long ago dampen your enthusiasm to learn exciting things and then share them. I agree with your sentiment that

Re: [Haskell-cafe] Usage of . and $

2007-03-07 Thread Dougal Stanton
don't pop anything until you reach the end of the code. So the mental model required to read code containing $'s is simpler than that required for parentheses. Which is the longer way of saying you don't need to count to make sure you closed all the brackets you opened! ;-) D. -- Dougal Stanton

Re: [Haskell-cafe] Usage of . and $

2007-03-07 Thread Dougal Stanton
, here we go: http://www.haskell.org/haskellwiki/Programming_guidelines D. -- Dougal Stanton ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Map list of functions over a single argument

2007-02-20 Thread Dougal Stanton
:: [a - b] - a - [b] mapF = flip f Aren't higher order functions just dreamy... ? ;-) -- Dougal Stanton ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] ANNOUNCE: nobench: Haskell implementaion benchmarks. GHC v Hugs v Yhc v NHC v ...

2007-02-19 Thread Dougal Stanton
implementers can move the goalposts of 2. ;-) In reality this may just foster a small set of horribly specialised optimisers in the compilers, with little benefit for real-world usage. :-( Cheers, D. -- Dougal Stanton ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Is lazyness make big difference?

2007-02-15 Thread Dougal Stanton
. This is a waste of energy (CPU time, or whatever). So whether it's *computationally* more valuable, I don't know. But I find that it helps me to order my thoughts about what a problem *needs*. Cheers, D. -- Dougal Stanton ___ Haskell-Cafe mailing list Haskell

Re: [Haskell-cafe] LugRadio talk

2007-02-15 Thread Dougal Stanton
! ;-) -- Dougal Stanton ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: LugRadio talk

2007-02-15 Thread Dougal Stanton
Haskell too, but I'm not sure. Try the last three? Cheers, D. -- Dougal Stanton ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] LugRadio talk

2007-02-14 Thread Dougal Stanton
. -- Dougal Stanton ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] questions about core

2007-02-12 Thread Dougal Stanton
Quoth Joel Reymont, nevermore, Are these two different Simons? :-) I'm beginning to wonder if Simon is less a name and more a title, meaning strong in the lambda force or somesuch. Let's hope they don't go over to the dark side ;-) -- Dougal Stanton

[Haskell-cafe] factorising to prime numbers

2007-02-09 Thread Dougal Stanton
- Integer - Integer --gcd = f . map (uncurry min) -- Dougal Stanton ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Random numbers without IO

2007-02-09 Thread Dougal Stanton
Well, nobody likes tainting their beautiful pure code with IO, so I rewrote the Random module to take advantage of the latest research [1]: module Random where getRandom = 4 Cheers, D. [1] http://xkcd.com/c221.html -- Dougal Stanton

Re: [Haskell-cafe] Newbie: generating a truth table

2007-02-06 Thread Dougal Stanton
Quoth [EMAIL PROTECTED], nevermore, loop = do and True True and True False and False True and False False For this construct to work you'd have to have 'and' as a monadic function - let's say, for argument's sake, in IO. And because there are no results being

Re: [Haskell-cafe] Re: Channel9 Interview: Software Composability and theFu ture of Languages

2007-02-01 Thread Dougal Stanton
Quoth Magnus Therning, nevermore, I'm not sure how a functional recipe would look, maybe something like this: White_sauce is a combination of ... . Chopped_onions is onions cut into small pieces. White_sauce_with_chopped_onions is the combination of white_sauce and chopped_onions.

Re: [Haskell-cafe] Haskell Cookbook?

2007-01-31 Thread Dougal Stanton
Quoth Paul Moore, nevermore, why a newcomer like me shouldn't do this - in many ways, it's better to start with some examples from a newcomer's perspective (these are the sort of things I found useful) to show the more experienced people what we're looking for. I agree with this. I think many

Re: [Haskell-cafe] Re: Channel9 Interview: Software Composability and theFu ture of Languages

2007-01-31 Thread Dougal Stanton
Quoth Bill Wood, nevermore, foldl (\water dish - wash water dish) soapywater dishes :: [Dishes] Finally, that doesn't work so well when there are constraints on the order that the dishes are washed, for example when washing the cruddiest dishes first while there are more suds. Ah, but

Re: [Haskell-cafe] Re: Channel9 Interview: Software Composability and theFu ture of Languages

2007-01-31 Thread Dougal Stanton
Quoth Bulat Ziganshin, nevermore, are you learned to write things in this way? in *my* school, we have studied f=(a*b+d)*2 Also there's the issue of variable substitution. It gets taught very early on when algebra is introduced (at least in UK): f = x + 3y and y = sqrt(4 + n) = f = x

Re: [Haskell-cafe] Re: Channel9 Interview: What makes imperative programming so difficult

2007-01-31 Thread Dougal Stanton
Quoth Doaitse Swierstra, nevermore, digest.chew.eat.serve.cook.chop.pluck.kill $ chicken we all have a definite feeling that after applying the functions, the original object is no longer available, and the FP view does not feel entirely natural. Yes, that is true. I can sort of see

Re: [Haskell-cafe] Re: ANNOUNCE: binary: high performance, pure binary serialisation

2007-01-26 Thread Dougal Stanton
, my screen isn't wide enough for that kind of thing... But, well done to the people responsible for the binary stuff. It looks fab. D. -- Dougal Stanton [EMAIL PROTECTED] http://brokenhut.livejournal.com Word attachments considered harmful. ___ Haskell

Re: [Haskell-cafe] Partial application

2007-01-18 Thread Dougal Stanton
f = add' 1 Prelude f 2 3 Is this what you wanted? Perhaps you tried this but mistyped something? Regards, D. -- Dougal Stanton [EMAIL PROTECTED] http://brokenhut.livejournal.com Word attachments considered harmful. ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Origins of (x:xs)?

2006-12-19 Thread Dougal Stanton
, because it's such a nice word ;-) -- Dougal Stanton ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] greencard and cabal, how to do it right?

2006-12-17 Thread Dougal Stanton
but --libdir=DIR use base library location suggests that it wants --libdir=../c_lib instead of --libdir ../c_lib. Could this be the case? I'd like to think it would parse them pretty much the same way but you can never be sure... D. -- Dougal Stanton

Re: [Haskell-cafe] Cabal licence files

2006-12-15 Thread Dougal Stanton
in particular although this may change when v3 comes out. Some may want an explicit v2 (like the Linux kernel) while others will want the anti-patent protection which v3 intends to offer. D. -- Dougal Stanton ___ Haskell-Cafe mailing list Haskell-Cafe

[Haskell-cafe] [ANN] JoinCabal makes its brave entry into the world

2006-12-15 Thread Dougal Stanton
then this'll save you a wee bit of time. In future I also hope to download licences where I can, straight into the LICENSE file. Full usage can be found in the README. I hope someone finds it useful. Cheers, D. -- Dougal Stanton ___ Haskell-Cafe mailing

[Haskell-cafe] Cabal licence files

2006-12-14 Thread Dougal Stanton
The cabal setup recognises a small set of licences which I don't think are well explained. I'm trying to put together a canonical list for setting up new projects. GPL: http://www.gnu.org/licenses/gpl.txt LGPL: http://www.gnu.org/licenses/lgpl.txt Thankfully the FSF are particularly anal^W

Re: [Haskell-cafe] Cannot understand liftM2

2006-12-11 Thread Dougal Stanton
Quoth Nicola Paolucci, nevermore: Prelude :t liftM2 Prelude liftM2 :: (Monad m) = (a1 - a2 - r) - m a1 - m a2 - m r Can someone help me understand what's happening here ? What does a Monad have to do with a simple subtraction ? What is actually the m of my example ? I'm honestly not sure

Re: [Haskell-cafe] The Future of MissingH

2006-11-26 Thread Dougal Stanton
Quoth Bulat Ziganshin, nevermore, while i personally prefer to read source code and fascinated with quality of code documenting in your lib, most peoples prefer to read Haddocks, which again should be made available on web I just thought I should point out, cos there appears to be some

Re: [Haskell-cafe] Starting your own Haskell project: part 2

2006-11-19 Thread Dougal Stanton
compliant *.cabal file? D. -- Dougal Stanton [EMAIL PROTECTED] http://brokenhut.livejournal.com Word attachments considered harmful. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Starting your own Haskell project: part 2

2006-11-19 Thread Dougal Stanton
colour should my bike shed be? ;-) D. -- Dougal Stanton [EMAIL PROTECTED] http://brokenhut.livejournal.com Word attachments considered harmful. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Starting your own Haskell project: part 2

2006-11-19 Thread Dougal Stanton
Quoth Donald Bruce Stewart, nevermore, Ok, done! Hehe, you can't leave this community alone for a second... Oh well, that'll teach me to volunteer for something and then take a few hours away from the computer! ;-) D. ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Haskell Quiz Solution - Haskell Newbie Requesting Review

2006-11-10 Thread Dougal Stanton
(although obviously much more succinct and orders of magnitude clearer) map (f') xs where f' = \x - f (g (h x)) Cheers, D. -- Dougal Stanton [EMAIL PROTECTED] http://brokenhut.livejournal.com Word attachments considered harmful. ___ Haskell-Cafe

[Haskell-cafe] Lazy data from pipe using MissingH module

2006-11-09 Thread Dougal Stanton
'let ...' wherever it feels? It seems to work occasionally for me but then just hangs, so I thought this might be the problem. Cheers, D. -- Dougal Stanton [EMAIL PROTECTED] http://brokenhut.livejournal.com Word attachments considered harmful

Re: [Haskell-cafe] string to date?

2006-11-09 Thread Dougal Stanton
Quoth Magnus Therning, nevermore, I've been staring my eyes out trying to find a function that converts a string into a ClockTime or CalendarTime. Basically something like C's strptime(3). I can't seem to find anything like it in System.Time, there are function that convert _to_ a string,

<    1   2