Re: [Haskell-cafe] XCode Dependency for HP on Mac

2011-07-27 Thread Tom Murphy
On 7/27/11, Richard O'Keefe o...@cs.otago.ac.nz wrote: A quick web search for Mac OS X gcc binary turned up http://hpc.sourceforge.net/index.php with binary releases of GCC 4.6 for Lion and Snow Leopard. This requires Developer Tools, but that isn't XCode, and it's on the OS X DVD.

Re: [Haskell-cafe] XCode Dependency for HP on Mac

2011-07-27 Thread Arlen Cuss
27/07/2011 4:25 PM, Tom Murphy kirjutas: On 7/27/11, Richard O'Keefe o...@cs.otago.ac.nz wrote: A quick web search for Mac OS X gcc binary turned up http://hpc.sourceforge.net/index.php with binary releases of GCC 4.6 for Lion and Snow Leopard. This requires Developer Tools, but that isn't

Re: [Haskell-cafe] Idiomatic ways to make all instances of a certain class also instances of another?

2011-07-27 Thread Tim Cowlishaw
On Tue, Jul 26, 2011 at 11:14 PM, Alexander Solla alex.so...@gmail.com wrote: data OrderType = Market Size | Limit LimitPrice Expiration Size | Stop (Either Percent Price) newtype Sell = Sell OrderType newtype Buy = Buy OrderType newtype Order = Order (Either Buy Sell) size :: Order - Int

Re: [Haskell-cafe] XCode Dependency for HP on Mac

2011-07-27 Thread Chris Smith
Okay, you're all scaring me again. I'm supposed to be teaching a class this next school year, on Haskell programming, to middle schoolers aged 12 to 13. Some of the students will be using Macs, and I'm again very confused about the situation of the Haskell platform on MacOS. There are different

Re: [Haskell-cafe] XCode Dependency for HP on Mac

2011-07-27 Thread Tim Cowlishaw
On Wed, Jul 27, 2011 at 8:09 AM, Chris Smith cdsm...@gmail.com wrote: Alternatively, maybe it would it be easier to have the Mac users install VMWare's free version and I can just have them install Windows or Linux in that?  Or does it also have weird dependency issues like this, too?

Re: [Haskell-cafe] XCode Dependency for HP on Mac

2011-07-27 Thread Sean Leather
On Wed, Jul 27, 2011 at 05:55, Tom Murphy wrote: This may sound ignorant because, well, it is ignorant: I know very little about the underlying mechanics here. Installing the Haskell Platform currently requires XCode developer tools. To get XCode on my 10.6 machine, I... ... will check

Re: [Haskell-cafe] Stack space overflow in HaskellNet

2011-07-27 Thread Paul R
This should be mapM_ and 'ghc -Wall' spots this problem since 6.12. The compiler (7.04) doesn't tell me anything about it. Henning It seems that it is no longer part of -Wall. Indeed, that's not part of -Wall. http://www.haskell.org/ghc/docs/7.0.4/html/users_guide/options-sanity.html Am I

Re: [Haskell-cafe] Stack space overflow in HaskellNet

2011-07-27 Thread Ivan Lazar Miljenovic
On 27 July 2011 17:42, Paul R paul.r...@gmail.com wrote: This should be mapM_ and 'ghc -Wall' spots this problem since 6.12. The compiler (7.04) doesn't tell me anything about it. Henning It seems that it is no longer part of -Wall. Indeed, that's not part of -Wall.  

Re: [Haskell-cafe] Stack space overflow in HaskellNet

2011-07-27 Thread Paul R
Hem hem ... I should never try to write anything sensible before putting my thick glasses. -w does not turn ON all warnings, but turns them OFF, so my previous comment regarding swapping its definition with -Wall is just nonsense. Sorry for the noise. Still, do you think there could be room for

Re: [Haskell-cafe] Stack space overflow in HaskellNet

2011-07-27 Thread Ivan Lazar Miljenovic
On 27 July 2011 17:56, Paul R paul.r...@gmail.com wrote: Hem hem ... I should never try to write anything sensible before putting my thick glasses. -w does not turn ON all warnings, but turns them OFF, so my previous comment regarding swapping its definition with -Wall is just nonsense. Sorry

[Haskell-cafe] Fwd: C9 video in the Monadic Design Patterns for the Web series

2011-07-27 Thread Greg Meredith
Dear Haskellians, A new C9 video in the series! So, you folks already know most of this... except for maybe the generalization of the Conway construction! Best wishes, --greg -- Forwarded message -- From: Charles Torre ... Date: Tue, Jul 26, 2011 at 1:12 PM Subject: C9 video

Re: [Haskell-cafe] Fwd: C9 video in the Monadic Design Patterns for the Web series

2011-07-27 Thread Christopher Done
On 27 July 2011 10:31, Greg Meredith lgreg.mered...@biosimilarity.com wrote: Dear Haskellians, A new C9 video in the series! So, you folks already know most of this... except for maybe the generalization of the Conway construction! Best wishes, --greg Thanks for the heads up! I love these

[Haskell-cafe] Typeclasses, data, constructors

2011-07-27 Thread Sergiy Nazarenko
Hi everyone! I have data declaration like this: data MyTable = MyTableOne Int String | MyTableTwo Int String String and function that insert new row in tables: newRow :: MyTable - IO Int newRow (MyTableOne fld1 fld2 ) = . newRow (MyTableTwo fld1 fld2 fld3 ) = .. That work perfectly, I

Re: [Haskell-cafe] XCode Dependency for HP on Mac

2011-07-27 Thread Niklas Larsson
XCode 4.1 is free on the Mac App Store; but that requires OSX 10.7; they seem to have removed Xcode 4 that used to be $5 there. I can still download Xcode 4 on my developer account, but that isn't available to people who don't pay up. I think Apple is making a good case here for bundling gcc and

Re: [Haskell-cafe] XCode Dependency for HP on Mac - old XCode versions

2011-07-27 Thread Clive Brettingham-Moore
To get XCode on my 10.6 machine, I... I had quite a hunt recently to find the most recent XCode for my not-so-recent mac... so I'll share what I found: If you are a registered developer (free reg is fine) with apple go to http://connect.apple.com/ Hit the link to developer tools, and you will

Re: [Haskell-cafe] Ur tutorial, and a challenge

2011-07-27 Thread Christopher Done
On 19 July 2011 17:22, Adam Chlipala ad...@impredicative.com wrote:    http://www.impredicative.com/ur/demo/crud1.html The example involves a library component encapsulating functionality like that of Ruby on Rails's scaffolding: automatic generation of a standard web-based admin interface to

Re: [Haskell-cafe] Ur tutorial, and a challenge

2011-07-27 Thread Marc Weber
Excerpts from Christopher Done's message of Wed Jul 27 12:26:08 +0200 2011: Is TemplateHaskell fair game? Because if so these problems are not hard. Yesod employs static typing for templates. HaskellDB achieves injectionless static type checking even without TemplateHaskell, and templatepg has

Re: [Haskell-cafe] XCode Dependency for HP on Mac

2011-07-27 Thread Jack Henahan
http://developer.apple.com/devcenter/mac/index.action Go there. Log in (free account). Download Xcode 3.2.6. If you want the full complement of blessed UNIX-y tools, you have to get Xcode. Bundling things with the HP is just going to bloat that download and confuse new users more (and my god,

Re: [Haskell-cafe] Ur tutorial, and a challenge

2011-07-27 Thread Adam Chlipala
Christopher Done wrote: On 19 July 2011 17:22, Adam Chlipalaad...@impredicative.com wrote: http://www.impredicative.com/ur/demo/crud1.html [...] This is not done by type-checking individual invocations of the admin-interface component. Rather, the component is checked at a static

Re: [Haskell-cafe] Ur tutorial, and a challenge

2011-07-27 Thread Christopher Done
On 27 July 2011 13:58, Adam Chlipala ad...@impredicative.com wrote: Maybe, but I don't think you've outlined any solutions that meet my criteria.  The key property is what I've highlighted in my self-quote above: the challenge is to type-check _the_code_generator_, not just the individual

Re: [Haskell-cafe] Fwd: C9 video in the Monadic Design Patterns for the Web series

2011-07-27 Thread James Cook
I'm always glad to see videos like this. I wish more people could have that much fun playing with math ;). It wouldn't really be suitable for your application but another interesting generalization is to insert the 'Either' at the top level: data ConwayT m a = Pure a | ConwayT

Re: [Haskell-cafe] Fwd: C9 video in the Monadic Design Patterns for the Web series

2011-07-27 Thread James Cook
For any who are interested, here's a quick and dirty Haskell version of the generalized Conway game monad transformer described in the video. It uses two newtypes, L and R, to select from two possible implementations of the Monad class. (all the LANGUAGE pragmas are just to support a derived

Re: [Haskell-cafe] Fwd: C9 video in the Monadic Design Patterns for the Web series

2011-07-27 Thread James Cook
Dang, I should have played with both versions before sending this. The 'R' instance has a very obvious error: return x = R (ConwayT (return (Left x)) mzero) should be changed to return x = R (ConwayT mzero (return (Left x))) Sorry! -- James On Jul 27, 2011, at 9:28 AM, James Cook

Re: [Haskell-cafe] Stack space overflow in HaskellNet

2011-07-27 Thread Manfred Lotz
On Tue, 26 Jul 2011 14:17:08 -0700 (PDT) Donn Cave d...@avvanta.com wrote: Quoth Manfred Lotz manfred.l...@arcor.de, ... I'm not quite sure I understand what you mean. Stack overflow comes from this: forM_ msgs (\x - fetch con x = print) If I change it to: mapM_ (\x

Re: [Haskell-cafe] Typeclasses, data, constructors

2011-07-27 Thread Joachim Fasting
On 27 July 2011 10:45, Sergiy Nazarenko nazarenko.ser...@gmail.com wrote: Hi everyone! Hi, I have data declaration like this: I try to use typeclasses, class GetRow a where    hasID :: Int - IO a instance GetRow MyTableOne where    hasID myid = return [(MyTableOne 1 name)] instance GetRow 

Re: [Haskell-cafe] XCode Dependency for HP on Mac - old XCodeversions

2011-07-27 Thread Donn Cave
Quoth Clive Brettingham-Moore hask...@brettingham-moore.net, To get XCode on my 10.6 machine, I... I had quite a hunt recently to find the most recent XCode for my not-so-recent mac... so I'll share what I found: Were you able to look on your install CD? Donn

[Haskell-cafe] Approximate String Matching

2011-07-27 Thread dokondr
Hi, I am looking for Haskell libraries to do approximate string matching: http://en.wikipedia.org/wiki/Approximate_string_matching I need this to reduce a set of English word variants with spelling errors to a single canonical dictionary entry. Any libraries to work with spelling will also help.

Re: [Haskell-cafe] Stack space overflow in HaskellNet

2011-07-27 Thread Donn Cave
Quoth Manfred Lotz manfred.l...@arcor.de, ... The problem seems to lie in the HaskellNet package. If for example I only fetch a specific message m - fetch con 2092 having a size of some 1.2m then I get the same stack overflow. If at runtime I specify +RTS -K40M -RTS it works but takes

[Haskell-cafe] Question re SMTPClient

2011-07-27 Thread Jayakumar Ramanathan
How does one pass authentication info to the SMTP server when using the package STMPClient? Thanks! Jay ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Stack space overflow in HaskellNet

2011-07-27 Thread Robert Wills
Hello, I guess I should stick my hand up as the supposed maintainer of HaskellNet. Unfortunately I can't say that I know the code that well. Two years ago I rescued it from bitrot cabalized it and when I couldn't get any response from the original author put myself down as the maintainer. It

Re: [Haskell-cafe] Stack space overflow in HaskellNet

2011-07-27 Thread Manfred Lotz
On Wed, 27 Jul 2011 09:47:52 -0700 (PDT) Donn Cave d...@avvanta.com wrote: Quoth Manfred Lotz manfred.l...@arcor.de, ... The problem seems to lie in the HaskellNet package. If for example I only fetch a specific message m - fetch con 2092 having a size of some 1.2m then I get the

Re: [Haskell-cafe] Stack space overflow in HaskellNet

2011-07-27 Thread Donn Cave
Quoth Manfred Lotz manfred.l...@arcor.de, In the end the only thing I need is to get the full message because I want to feed bogofilter to learn that a message is ham or spam. For the time being I decided to write my own program to fetch the data because it is a good exercise for a Haskell

Re: [Haskell-cafe] Approximate String Matching

2011-07-27 Thread Henning Thielemann
On Wed, 27 Jul 2011, dokondr wrote: Hi, I am looking for Haskell libraries to do approximate string matching: http://en.wikipedia.org/wiki/Approximate_string_matching I need this to reduce a set of English word variants with spelling errors to a single canonical dictionary entry. Any

Re: [Haskell-cafe] XCode Dependency for HP on Mac

2011-07-27 Thread Chris Smith
On Wed, 2011-07-27 at 08:27 +0100, Tim Cowlishaw wrote: (Perhaps wandering slightly O/T, but...) Having done some teaching in similar circumstances before (although not with Haskell), I'd highly recommend this approach. In fact, I'd probably have all the students, regardless of OS install

Re: [Haskell-cafe] XCode Dependency for HP on Mac

2011-07-27 Thread Chris Smith
On Wed, 2011-07-27 at 07:20 -0400, Jack Henahan wrote: Bundling things with the HP is just going to bloat that download and confuse new users more (and my god, the dep-chasing... the number of libs that might have to be piled in on top of it could be absurd). I don't understand this. Are

Re: [Haskell-cafe] Fwd: C9 video in the Monadic Design Patterns for the Web series

2011-07-27 Thread Greg Meredith
Dear James, This is so cool! It's so natural to express this as a monad transformer. It's great insight and it's just the sort of insight that Haskell and this way of thinking about computation makes possible. Bravo! Best wishes, --greg On Wed, Jul 27, 2011 at 6:33 AM, James Cook

[Haskell-cafe] Input redirection in WinGHCi

2011-07-27 Thread Paul Reiners
I know I can do the following from a command prompt: $ runghc WC quux.txt How do I do this in WinGHCi? I know I have to first load the file like this: Prelude :load WC But then what? This doesn't work: *Main WC quux.txt interactive:1:1: Not in scope: data constructor `WC' interactive:1:6:

Re: [Haskell-cafe] XCode Dependency for HP on Mac

2011-07-27 Thread Tom Murphy
On Jul 27, 2011 3:30 AM, Sean Leather leat...@cs.uu.nl wrote: To get XCode on my 10.6 machine, I... ... will check out the related discussion: http://thread.gmane.org/gmane.comp.lang.haskell.cafe/89745 I remember this thread from last month, but several of the details have changed

Re: [Haskell-cafe] Idiomatic ways to make all instances of a certain class also instances of another?

2011-07-27 Thread Alexander Solla
On Tue, Jul 26, 2011 at 11:58 PM, Tim Cowlishaw t...@timcowlishaw.co.ukwrote: On Tue, Jul 26, 2011 at 11:14 PM, Alexander Solla alex.so...@gmail.com wrote: data OrderType = Market Size | Limit LimitPrice Expiration Size | Stop (Either Percent Price) newtype Sell = Sell OrderType

Re: [Haskell-cafe] Ur tutorial, and a challenge

2011-07-27 Thread Casey McCann
On Wed, Jul 27, 2011 at 8:30 AM, Christopher Done chrisd...@googlemail.com wrote: On 27 July 2011 13:58, Adam Chlipala ad...@impredicative.com wrote: Does this static type system support metaprogramming strong enough to implement my challenge problem with the level of static guarantee for all

Re: [Haskell-cafe] Please help me spot where space leak occur.

2011-07-27 Thread Jason Dagit
On Fri, Jul 22, 2011 at 1:54 AM, Olexander Kozlov ookoz...@gmail.com wrote: Jason, thank you for your help. The hint for using -s option is very valuable. It is good to see people answering questions about Haskell here on haskell-cafe. stackoverflow is another good place to ask. This is

Re: [Haskell-cafe] Input redirection in WinGHCi

2011-07-27 Thread Ivan Lazar Miljenovic
On 28 July 2011 04:56, Paul Reiners paul.rein...@gmail.com wrote: I know I can do the following from a command prompt: $ runghc WC quux.txt How do I do this in WinGHCi? I know I have to first load the file like this: Prelude :load WC But then what? This doesn't work: *Main WC quux.txt

Re: [Haskell-cafe] XCode Dependency for HP on Mac

2011-07-27 Thread Ivan Lazar Miljenovic
On 28 July 2011 03:58, Chris Smith cdsm...@gmail.com wrote: On Wed, 2011-07-27 at 08:27 +0100, Tim Cowlishaw wrote: (Perhaps wandering slightly O/T, but...) Having done some teaching in similar circumstances before (although not with Haskell), I'd highly recommend this approach. In fact, I'd

Re: [Haskell-cafe] Retaining functions in memory

2011-07-27 Thread Ryan Ingram
Use memoization. Here's an example: cabal-install MemoTrie import Data.MemoTrie fib_fix :: (Integer - Integer) - Integer - Integer fib_fix _ n | n 0 = error invalid input fib_fix _ 0 = 1 fib_fix _ 1 = 1 fib_fix rec n = rec (n-1) + rec (n-2) -- 'tie the knot' on a recusrive function func_fix

[Haskell-cafe] Haskell Weekly News: Issue 192

2011-07-27 Thread Daniel Santa Cruz
Welcome to issue 192 of the HWN, a newsletter covering developments in the Haskell community. This release covers the week of July 17 to 23, 2011. [1] http://goo.gl/8hDku You can find an HTML rendition of this issue at: