Re[2]: [Haskell-cafe] FFI basics

2007-02-16 Thread Bulat Ziganshin
Hello Magnus, Thursday, February 15, 2007, 3:08:41 PM, you wrote: I would like to use FFI for the first time. Can someone give me a Shameless self-promotion: http://therning.org/magnus/archives/238 great intro, better than my own! -- Best regards, Bulat

Re: [Haskell-cafe] FFI basics

2007-02-16 Thread Mirko Rahn
I want to be able to take a simple C program and access a function from it in Haskell. A simple example The attachement is a file where the Haskell program first creates the C-source, compiles it to an shared object file, loads the object using the dynamic linker and uses the just

Re: [Haskell-cafe] LugRadio talk

2007-02-16 Thread Magnus Therning
On Thu, Feb 15, 2007 at 13:53:46 +, Dougal Stanton wrote: Quoth Magnus Therning, nevermore, Ah, damn it, I knew I shouldn't have put that in my mail to them. I just couldn't let them get away with complaining so much about Haskell though. I'm glad you did. I was getting a bit annoyed as

[Haskell-cafe] Summer of code and spam

2007-02-16 Thread Magnus Therning
There seems to be a serious problem with spam on Haskell's SoC page: http://tinyurl.com/fl2dw Or maybe that's a general problem for hackage? /M -- Magnus Therning (OpenPGP: 0xAB4DFBA4) [EMAIL PROTECTED] Jabber: [EMAIL PROTECTED]

Re: [Haskell-cafe] Does laziness make big difference?

2007-02-16 Thread Claus Reinke
So, as I understand, choosing default laziness was just experimental design decision in order to answer the question: how good lazy language can be. I am practically convinced, that lazy evaluation included in the _right_ places can be extremely useful. I didn't state the question as strict vs

Re: [Haskell-cafe] Summer of code and spam

2007-02-16 Thread Donald Bruce Stewart
magnus: There seems to be a serious problem with spam on Haskell's SoC page: http://tinyurl.com/fl2dw Or maybe that's a general problem for hackage? Nope. Why would it be? You have to authenticate yourself to a real person to upload to hackage. The plan for SoC is to update to a

[Haskell-cafe] Lisp on xkcd.com, very funny!

2007-02-16 Thread Magnus Therning
I think the readers of this list will appreciate this http://xkcd.com/comics/lisp.jpg /M -- Magnus Therning (OpenPGP: 0xAB4DFBA4) [EMAIL PROTECTED] Jabber: [EMAIL PROTECTED] http://therning.org/magnus Software is not manufactured, it is something you

Re: [Haskell-cafe] SoC: Port Haddock to use GHC

2007-02-16 Thread David Waern
Hi! I'm working on a Cabal patch that makes it easier to use. The compilerPath error is due to this - a change I made to Cabal that haddock.ghc relies on, which hasn't been applied yet. The DocOptions thing was due to the repo being out of sync with my home repo, I've fixed that now.

Re: [Haskell-cafe] Re: State of OOP in Haskell

2007-02-16 Thread [EMAIL PROTECTED]
Benjamin Franksen wrote: [EMAIL PROTECTED] wrote: Here are two surveys (somewhat outdated) on the use of formal methods in industry: http://citeseer.ifi.unizh.ch/39426.html http://citeseer.ifi.unizh.ch/craigen93international.html Both of these links are dead. Could you post author

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

2007-02-16 Thread apfelmus
Nick wrote: main= print primes primes = 2:filter is_prime [3,5..] is_prime n = all (\p- n `mod` p /= 0) (takeWhile (\p- p*p=n) primes) We can rewrite this in strict languages with lazy constructs. For example, in Scala (of course stream is not only lazily evaluated

Re: [Haskell-cafe] Strange memory consumption problems in something that should be tail-recursive

2007-02-16 Thread Sven Panne
On Tuesday 13 February 2007 22:32, Bernie Pope wrote: Creighton Hogg wrote: [...] So for example in the case of, facTail 1 n' = n' facTail n n' = facTail (n-1) (n*n') The problem with this example is that it will build up an expression of the form: (n1 * n2 * n3 .) [...] This

[Haskell-cafe] Newbie Q: GHCi: Where “Lis t” module is imported from?

2007-02-16 Thread Dmitri O.Kondratiev
Going through Haskell. The Craft of Functional Programming book , in section 16.8 I found a Set module example. Module declarations starts with: import List hiding (union) Set module here is built with list and uses among other things list comparison functions such as (==) and (=). For

Re: [Haskell-cafe] Newbie Q: GH Ci: Where “List” module is imported f rom?

2007-02-16 Thread Jules Bean
Dmitri O.Kondratiev wrote: Set module here is built with list and uses among other things list comparison functions such as (==) and (=). Q1: Where List module is imported from? GHC Base package contains Data.List module, not just List module. List was the old name for it. Data.List is

[Haskell-cafe] new member

2007-02-16 Thread P. R. Stanley
Hi Paul here - new member - checking to see my account is fully functional. Does the list know of another list where I can post questions on functional programming and the related mathematics? I'm assuming Haskell Cafe is mainly for discussions on Haskell programming and not so much the

Re: [Haskell-cafe] new member

2007-02-16 Thread Ricardo Herrmann
I'd say your account is purely functional instead ;-) On 2/16/07, P. R. Stanley [EMAIL PROTECTED] wrote: Hi Paul here - new member - checking to see my account is fully functional. Does the list know of another list where I can post questions on functional programming and the related

Re: [Haskell-cafe] new member

2007-02-16 Thread Kirsten Chevalier
On 2/16/07, P. R. Stanley [EMAIL PROTECTED] wrote: Hi Paul here - new member - checking to see my account is fully functional. Does the list know of another list where I can post questions on functional programming and the related mathematics? I'm assuming Haskell Cafe is mainly for discussions

Re: [Haskell-cafe] new member

2007-02-16 Thread David House
On 16/02/07, P. R. Stanley [EMAIL PROTECTED] wrote: Does the list know of another list where I can post questions on functional programming and the related mathematics? I'm assuming Haskell Cafe is mainly for discussions on Haskell programming and not so much the underlying theory. I'd post it

Re: [Haskell-cafe] Newbie Q: GHCi: Where ?List? module is imported from?

2007-02-16 Thread Benjamin Franksen
Jules Bean wrote: Dmitri O.Kondratiev wrote: Set module here is built with list and uses among other things list comparison functions such as (==) and (=). Q1: Where List module is imported from? GHC Base package contains Data.List module, not just List module. List was the old name for

[Haskell-cafe] Looking for documentation on Control.Parallel.Strategies

2007-02-16 Thread Jefferson Heard
Is there anything that documents this further than the Haddock documentation available from Haskell.org or the GHC pages? I've gotten some basic parallelism to work using parMap and using || and |, but I had a fold and a map that I could logically compute at the same time. I found this

Re: [Haskell-cafe] Looking for documentation on Control.Parallel.Strategies

2007-02-16 Thread Bjorn Bringert
On Feb 16, 2007, at 21:16 , Jefferson Heard wrote: Is there anything that documents this further than the Haddock documentation available from Haskell.org or the GHC pages? I've gotten some basic parallelism to work using parMap and using || and |, but I had a fold and a map that I could

Re: [Haskell-cafe] How to solve this problem?It's quite easy in PHP.

2007-02-16 Thread Henk-Jan van Tuyl
On Thu, 15 Feb 2007 23:17:11 +0100, Gene A [EMAIL PROTECTED] wrote: A couple of functions: Prelude let box a = a:[] Prelude let formatTableItems (a,b) = (box a) ++ = ++ (show b) ++ \n This can be done simpler: formatTableItems (a,b) = [a] ++ = ++ (show b) ++ \n Yet simpler:

Re: [Haskell-cafe] Looking for documentation on Control.Parallel.Strategies

2007-02-16 Thread Jefferson Heard
That's MUCH better, thanks. That's not what's directly available from haskell.org. It still doesn't give anything more general about using the combinators in actual programs, you know, like examples, but it's at least some clear documentation as to what each strategy does. Maybe one day,

Re: [Haskell-cafe] Newbie Q: GHCi: W here “List” module is imported from?

2007-02-16 Thread Dmitri O.Kondratiev
On 2/16/07, Jules Bean [EMAIL PROTECTED] wrote: Actually, lists are partly defined in the Prelude, with auxiliary functions in Data.List. In particular, = for List is defined in the Prelude. Or rather, I should say, the Ord instance for lists is defined in the prelude (and only if the type

Re: [Haskell-cafe] Newbie Q: GHCi: W here “List” module is imported from?

2007-02-16 Thread Aaron McDaid
On 2/16/07, Dmitri O.Kondratiev [EMAIL PROTECTED] wrote: where then declaration: instance Ord [] can be found? With Hugs, it can be found in /usr/lib/hugs/libraries/Hugs/Prelude.hs (on Debian anyway). For GHC, I guess it's in compiled into one of the .hi files? From Hugs' Prelude.hs:

Re: [Haskell-cafe] Looking for documentation on Control.Parallel.Strategies

2007-02-16 Thread Pepe Iborra
There is also an excellent paper in tutorial style which imho is very useful to understand the interaction of lazyness with the Control.Parallel.Strategies combinators: Algorithm + Strategy = Parallelism Philip W. Trinder, Kevin Hammond, Hans-Wolfgang Loidl, and Simon L. Peyton Jones.

Re: [Haskell-cafe] Newbie Q: GH Ci: Where “List” module is imported f rom?

2007-02-16 Thread Jules Bean
Dmitri O.Kondratiev wrote: Where exactly the Ord instance for lists is defined in the Prelude? Depends slightly on your compiler, but you will find that some of the prelude has source, and some of the prelude is inevitably not written in haskell (the type system has to be bootstrapped

Re: [Haskell-cafe] Re: LugRadio talk

2007-02-16 Thread Kirsten Chevalier
On 2/15/07, Kirsten Chevalier [EMAIL PROTECTED] wrote: So which date was this infamous show where they talked trash about Haskell, anyway? I want to hear this firsthand, but the tables of contents given on their web sites don't seem to list talking trash about Haskell as an item :-) For

Re: [Haskell-cafe] Re: LugRadio talk

2007-02-16 Thread Kirsten Chevalier
On 2/16/07, Kirsten Chevalier [EMAIL PROTECTED] wrote: On 2/15/07, Kirsten Chevalier [EMAIL PROTECTED] wrote: So which date was this infamous show where they talked trash about Haskell, anyway? I want to hear this firsthand, but the tables of contents given on their web sites don't seem to