Re: [Haskell-cafe] Sudoku solving

2007-05-10 Thread ajb
G'day all. Quoting Antoine Latter <[EMAIL PROTECTED]>: > I'm a relatively new to Haskell, so I figured I needed to write a Sudoku > solver. Excellent! Please add it to the wiki: http://www.haskell.org/haskellwiki/Sudoku > The key features of this solver are: > > * It's longer than other

Re: [Haskell-cafe] generate Haskell code from model

2007-05-10 Thread Steffen Mazanek
Hi Neil, It sounds a lot to me like: * Create a visual meta-language * Program with diagrams * Translate to Haskell Yes, that is true and I guess this is a standard procedure, isn't it? The translation process is not at all different from your "Translate to C++". The difference is the Visual

[Haskell-cafe] Sudoku solving

2007-05-10 Thread Antoine Latter
I'm a relatively new to Haskell, so I figured I needed to write a Sudoku solver. The key features of this solver are: * It's longer than other Haskell Sudoku solvers I've seen around * It fails to solve many solvable puzzles Fantastic! link: http://panicsonic.blogspot.com/2007/04/sudoku-sol

Re: [Haskell-cafe] Grabbing list of functions from current module

2007-05-10 Thread Jason Dagit
On 4/9/07, Joel Reymont <[EMAIL PROTECTED]> wrote: Folks, Does anyone have code that can grab a list of functions named with a certain prefix from the current (or given) module? I want to find functions named, say, ast_* and produce a list of tuples like ("input1", ast_input1). I wrote some co

Re: [Haskell-cafe] Monad pronounced like gonad?

2007-05-10 Thread Mark T.B. Carroll
Andrew Coppin <[EMAIL PROTECTED]> writes: (snip) > More curiosely, that (>>=) function. Why is the Haskell name for it > (>>=), and why is it pronounced "bind"? Neither of these choices make a > lot of sense to me... (snip) I don't know the answer, but it seems okay to me because I think of mona

Re: [Haskell-cafe] Monad pronounced like gonad?

2007-05-10 Thread Derek Elkins
Andrew Coppin wrote: -> "to" <- "from", or "drawn from" for list comprehensions. [] "nil" More curiosely, that (>>=) function. Why is the Haskell name for it (>>=), and why is it pronounced "bind"? Neither of these choices make a lot of sense to me... (>>=) is chosen as it seems

Re: [Haskell-cafe] Monad pronounced like gonad?

2007-05-10 Thread Derek Elkins
Dan Piponi wrote: A more pressing question. How do you pronounce the following: -> In both case expressions and lambdas I would not read this if it could be decided by context and vocal dynamics (like the way most people pronounce parenthesized arithmetic expressions), for cases "is" would wor

Re: [Haskell-cafe] Picking an architecture for a Haskell web app

2007-05-10 Thread Stefan O'Rear
On Thu, May 10, 2007 at 05:52:55PM +0100, Andrew Coppin wrote: > >>Wait a sec... Are you trying to tell me that it is *faster* to take > >>the source, type check it, convert it to Core, perform 25,000 > >>Core-to-Core transformations, convert Core to C, call GCC, link the > >>result together, dy

Re: [Haskell-cafe] Picking an architecture for a Haskell web app

2007-05-10 Thread Lennart Augustsson
Parsing a very close approximation to what Haskell specifies isn't that hard. You just need some mild interaction between the parser and lexer. Executing Haskell is more difficult, since you can't execute Haskell without first doing type checking. -- Lennart On Thu, 10 May 2007, And

Re: [Haskell-cafe] Monad pronounced like gonad?

2007-05-10 Thread Dipankar Ray
I cringe to post to a thread with this subject line, but no American mathematician I know would call it "Moe-nad". I think the US math consensus is "Mon - ad", where mon is like the faux-jamaican "Hey, mon", or (more to the point) monoid or monomorphism. Sometimes Dictionaries are only as g

Re: [Haskell-cafe] Monad pronounced like gonad?

2007-05-10 Thread David Roundy
On Thu, May 10, 2007 at 09:20:18PM +0100, Andrew Coppin wrote: > More curiosely, that (>>=) function. Why is the Haskell name for it > (>>=), and why is it pronounced "bind"? Neither of these choices make a > lot of sense to me... For the correct pronunciation of >>= see http://www.haskell.org/

Re: [Haskell-cafe] Monad pronounced like gonad?

2007-05-10 Thread Andrew Coppin
-> "to" <- "from", or "drawn from" for list comprehensions. [] "nil" More curiosely, that (>>=) function. Why is the Haskell name for it (>>=), and why is it pronounced "bind"? Neither of these choices make a lot of sense to me... In reality, if you want to talk Haskell and are

Re: [Haskell-cafe] Monad pronounced like gonad?

2007-05-10 Thread Melissa O'Neill
Although I hate to resort to dictionaries, curiosity got the better of me and I find the following. According to both Merriam Webster and the OED, monad is indeed pronounced exactly like gonad. BUT, in the UK at least, there is more than way to pronounce gonad, so it doesn't necessarily cl

Re: [Haskell-cafe] Monad pronounced like gonad?

2007-05-10 Thread Creighton Hogg
On 5/10/07, Dan Weston <[EMAIL PROTECTED]> wrote: I've been pronouncing monad like gonad (moh-nad), but it occurs to me that it might be pronounced like monoid (mah-nad). Is there an official way to pronouce this word - maybe with a Scottish accent? :) I've always said mah-nad, mah-noyd, and

Re: [Haskell-cafe] Monad pronounced like gonad?

2007-05-10 Thread Neil Mitchell
Hi A more pressing question. How do you pronounce the following: -> "to" <- "from", or "drawn from" for list comprehensions. [] "nil" In reality, if you want to talk Haskell and are in person, grab a whiteboard. If you are over IRC or email, don't worry. Thanks Neil ___

Re: [Haskell-cafe] Picking an architecture for a Haskell web app

2007-05-10 Thread Neil Mitchell
Hi I'm currently in the process of attempting to write such a thing... Good luck! Haskell needs more implementations to retain its purity and compatibility. > What is the value of show [] ? That is indeed a difficult point. Since I want an interpreter so I can step through the code interac

Re: [Haskell-cafe] Picking an architecture for a Haskell web app

2007-05-10 Thread Ian Lynagh
On Thu, May 10, 2007 at 07:24:51PM +0100, Andrew Coppin wrote: > > On the other hand, parsing Haskell input is intractably hard. Whitespace > actually matters, which makes the program to parse Haskell horrendusly > complex. Do you know about the algorithm for converting Haskell source into a wh

Re: [Haskell-cafe] Picking an architecture for a Haskell web app

2007-05-10 Thread Ian Lynagh
On Thu, May 10, 2007 at 06:13:16PM +0100, Neil Mitchell wrote: > > >> Also remember that evaluating an expression in Haskell is _really_ > >> hard! > > > >Really? Looks pretty damn simple to me... > > In that case I throw down the challenge of writing an interpetter that > takes a Haskell syntax

Re: [Haskell-cafe] Monad pronounced like gonad?

2007-05-10 Thread Dan Piponi
A more pressing question. How do you pronounce the following: -> <- [] and countless others... I presume \, as in \a -> x, is pronounced 'lambda'. -- Dan On 5/10/07, Andrew Coppin <[EMAIL PROTECTED]> wrote: Dan Weston wrote: > I've been pronouncing monad like gonad (moh-nad), but it occurs to

Re: [Haskell-cafe] Picking an architecture for a Haskell web app

2007-05-10 Thread Andrew Coppin
> Also remember that evaluating an expression in Haskell is _really_ > hard! Really? Looks pretty damn simple to me... In that case I throw down the challenge of writing an interpetter that takes a Haskell syntax tree and evaluates it :) I'm currently in the process of attempting to write s

Re: [Haskell-cafe] Monad pronounced like gonad?

2007-05-10 Thread Andrew Coppin
Dan Weston wrote: I've been pronouncing monad like gonad (moh-nad), but it occurs to me that it might be pronounced like monoid (mah-nad). Hmm... I always assumed it was like "mon-ad". (Once I finally stopped saying "mon-and" by mistake!) But I don't know how you're really supposed to say it.

Re: [Haskell-cafe] Monad pronounced like gonad?

2007-05-10 Thread Paul Hudak
This reminds me of a joke (which depends on recognizing a connection between monads, continuations, control, and goto statements): Q: What do you get when you cross a monad with a continuation? A: A gonad. (I am sure I will hear the groans right through the ethernet! :-) -Paul Tom Harper

Re: [Haskell-cafe] Picking an architecture for a Haskell web app

2007-05-10 Thread Andrew Coppin
Quite a lot of what people throw at lambdabot in #haskell is intended to do type checking or type inference. Ah, true... ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Monad pronounced like gonad?

2007-05-10 Thread David House
On 10/05/07, Dan Weston <[EMAIL PROTECTED]> wrote: I've been pronouncing monad like gonad (moh-nad), but it occurs to me that it might be pronounced like monoid (mah-nad). You say monoid mah-nad? I've always said mon-oyd, to rhyme with void or annoyed. -- -David House, [EMAIL PROTECTED] __

Re: [Haskell-cafe] Monad pronounced like gonad?

2007-05-10 Thread Tom Harper
Hahahah, it's pronounced the way you've been saying it =) On 5/10/07, Dan Weston <[EMAIL PROTECTED]> wrote: I've been pronouncing monad like gonad (moh-nad), but it occurs to me that it might be pronounced like monoid (mah-nad). Is there an official way to pronouce this word - maybe with a Scot

[Haskell-cafe] Monad pronounced like gonad?

2007-05-10 Thread Dan Weston
I've been pronouncing monad like gonad (moh-nad), but it occurs to me that it might be pronounced like monoid (mah-nad). Is there an official way to pronouce this word - maybe with a Scottish accent? :) ___ Haskell-Cafe mailing list Haskell-Cafe@has

Re: [Haskell-cafe] Picking an architecture for a Haskell web app

2007-05-10 Thread Neil Mitchell
Hi Andrew, > Also remember that evaluating an expression in Haskell is _really_ > hard! Really? Looks pretty damn simple to me... In that case I throw down the challenge of writing an interpetter that takes a Haskell syntax tree and evaluates it :) What is the value of show [] ? Remember tha

Re: [Haskell-cafe] Picking an architecture for a Haskell web app

2007-05-10 Thread Brandon S. Allbery KF8NH
On May 10, 2007, at 12:52 , Andrew Coppin wrote: Plus, consider that people often throw extensions at lambdabot --- do you support even simple stuff like forall in your interpreter? Using ghc means you can use most of the ghc extensions. Ah, yes, well, I avoid everything that isn't in Has

Re: [Haskell-cafe] Picking an architecture for a Haskell web app

2007-05-10 Thread Andrew Coppin
No, you can do the GHCi trick, converting it to Core, perform a small number of Core-to-Core transformations, convert it to bytecode, interpret the bytecode. Compare this to the programmer time to implement directly executing an interpetted expression, and it starts to get complex. One of the

Re: [Haskell-cafe] Picking an architecture for a Haskell web app

2007-05-10 Thread Andrew Coppin
I can see it's GHC-specific, what I was asking is does the computer than runs the final program need to have GHC installed. Presumably is does if it's going to compile files on the fly. What about if it only loads *.o files that are already compiled? Is GHC still required? (Not that the answe

Re: [Haskell-cafe] Picking an architecture for a Haskell web app

2007-05-10 Thread Neil Mitchell
Hi Wait a sec... Are you trying to tell me that it is *faster* to take the source, type check it, convert it to Core, perform 25,000 Core-to-Core transformations, convert Core to C, call GCC, link the result together, dynamically load it, execute it, extract the result and confirm that it type c

Re: [Haskell-cafe] Picking an architecture for a Haskell web app

2007-05-10 Thread Brandon S. Allbery KF8NH
On May 10, 2007, at 12:14 , Andrew Coppin wrote: I can see it's GHC-specific, what I was asking is does the computer than runs the final program need to have GHC installed. Presumably is does if it's going to compile files on the fly. What about if it only loads *.o files that are already

Re: [Haskell-cafe] Picking an architecture for a Haskell web app

2007-05-10 Thread Andrew Coppin
I've crawled all over the webpage, and I can't see any documentation anywhere to this effect, but presumably all this dynamic goodness only works if GHC is installed, right? Yes, it's GHC-specific. I can see it's GHC-specific, what I was asking is does the computer than runs the final prog

Re: [Haskell-cafe] Picking an architecture for a Haskell web app

2007-05-10 Thread Brandon S. Allbery KF8NH
On May 10, 2007, at 11:37 , Andrew Coppin wrote: I've crawled all over the webpage, and I can't see any documentation anywhere to this effect, but presumably all this dynamic goodness only works if GHC is installed, right? Yes, it's GHC-specific. BTW... Does lambdabot seriously take every

Re: [Haskell-cafe] Picking an architecture for a Haskell web app

2007-05-10 Thread Andrew Coppin
Regarding Lambdabot, if dynamic loading is all you're after then you'd be better off learning how to use hs-plugins and rolling your own. It's pretty simple. For dynamic-loading-application design ideas, I suggest reading this Yi paper: http://www.cse.unsw.edu.au/~dons/papers/SC05.html hs

Re: [Haskell-cafe] Co-arbitrary

2007-05-10 Thread Neil Mitchell
Hi > Would someone kindly explain why we need co-arbitrary in QuickCheck > and how to define it? To write your own 'coarbitrary', you are aiming to convert values of your datatype into a disjoint partition of the set of all Ints. In the end it is rather mechanical: e.g. data Foo a = Fo

Re: [Haskell-cafe] Telling Cabal not to install the executable

2007-05-10 Thread Magnus Therning
On Thu, May 10, 2007 at 10:37:01 +0100, Joel Reymont wrote: >I tell Cabal to build library and a test harness. > >How can I tell Cabal that I only want the library installed? I haven't got a clue, but I'm very interested in what you find out. Please make sure to inform the list if you happen to ge

Re: [Haskell-cafe] Debugging

2007-05-10 Thread Neil Mitchell
Hi The basic advantages of SC (stolen from the user manual): * write test generators for your own types more easily? * be sure that any counter-examples found are minimal? * write properties using existentials as well as universals? * establish complete coverage of a defined test-space? * displa

[Haskell-cafe] Telling Cabal not to install the executable

2007-05-10 Thread Joel Reymont
I tell Cabal to build library and a test harness. How can I tell Cabal that I only want the library installed? Thanks, Joel -- http://wagerlabs.com/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/lis

Re: [Haskell-cafe] Debugging

2007-05-10 Thread Jules Bean
Joel Reymont wrote: On May 10, 2007, at 10:19 AM, Jules Bean wrote: The 'next step' is to move from testing by hand in ghci to writing quickcheck properties / smallcheck / unit tests for the functions. I still don't understand the difference between QC and SC. Would someone kindly explain a

Re: [Haskell-cafe] Debugging

2007-05-10 Thread Joel Reymont
On May 10, 2007, at 10:19 AM, Jules Bean wrote: The 'next step' is to move from testing by hand in ghci to writing quickcheck properties / smallcheck / unit tests for the functions. I still don't understand the difference between QC and SC. Would someone kindly explain and provide an examp

Re: [Haskell-cafe] Picking an architecture for a Haskell web app

2007-05-10 Thread Joel Reymont
On May 10, 2007, at 10:01 AM, Bayley, Alistair wrote: Depends. Did you leave out WASH intentionally? http://www.informatik.uni-freiburg.de/~thiemann/WASH/ Nope, I forgot about it but looked at the Hemp app this morning. Thanks, Joel -- http://wagerlabs.com/ __

Re: [Haskell-cafe] Debugging

2007-05-10 Thread Jules Bean
Ryan Dickie wrote: I've only written trivial applications and functions in haskell. But the title of this thread got me thinking. In an imperative language you have clear steps, states, variables to watch, etc. What techniques/strategies might one use for a functional language? Well, bre

RE: [Haskell-cafe] Picking an architecture for a Haskell web app

2007-05-10 Thread Bayley, Alistair
> From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Joel Reymont > > I have finished an alpha version of my EasyLanguage [1] to C# > compiler and need to deploy it on Amazon EC2/S3. > > My choice seems to boil down to HAppS [2], HOPE [3], or a > combination of Ruby/Rails with L

Re: [Haskell-cafe] built-in lists vs inductively defined list

2007-05-10 Thread Bas van Dijk
There's also documentation about rewrite rules on the Haskell en GHC wikis: http://haskell.org/haskellwiki/Playing_by_the_rules http://hackage.haskell.org/trac/ghc/wiki/RewriteRules Bas On 5/10/07, Bas van Dijk <[EMAIL PROTECTED]> wrote: On 5/9/07, Jason Morton <[EMAIL PROTECTED]> wrote: > I'

Re: [Haskell-cafe] built-in lists vs inductively defined list

2007-05-10 Thread Bas van Dijk
On 5/9/07, Jason Morton <[EMAIL PROTECTED]> wrote: I'd love to understand these rewrite-rules a little better; could anyone point me to where (if?) they are documented? They are documented in the GHC User Guide: http://www.haskell.org/ghc/docs/latest/html/users_guide/rewrite-rules.html regard

[Haskell-cafe] Higher order types via the Curry-Howard correspondence

2007-05-10 Thread Gaal Yahas
What do higher-order types like lists mean when viewed through the Curry-Howard correspondence? I've been wondering about this for a while. The tutorials ask me to consider id :: forall a. a -> a (.) :: forall a b c. (b -> c) -> (a -> b) -> (a -> c) These represent theorems in a logical calculus