Re: [Haskell-cafe] New slogan for haskell.org

2007-11-28 Thread Thomas Schilling
On Tue, 2007-11-27 at 23:11 -0500, Sterling Clover wrote: On Nov 27, 2007, at 11:34 AM, David Fox wrote: In that case we need to identify all the groups that the front page is serving and create separate areas for each, all above the fold as it were: 1. A sales pitch for new

RE: [Haskell-cafe] A tale of three shootout entries

2007-11-28 Thread Simon Peyton-Jones
| If, after investigation (and perhaps checking with Don) you find that adding bangs makes your program go | slower, even though the function is in fact strict (otherwise it might go slower because it's just doing more | work!) then I'd love to see a test case. | | I wonder if this could be

RE: [Haskell-cafe] A tale of three shootout entries

2007-11-28 Thread Simon Peyton-Jones
| There may well have been changes to the strictness analyser that make | some of the bangs (or most) unnecessary now. Also, its very likely | I didn't check all combinations of strict and lazy arguments for the | optimal evaluation strategy :) | | If it seems to be running consitently faster (and

[Haskell-cafe] Collections library

2007-11-28 Thread Ketil Malde
Ben Franksen [EMAIL PROTECTED] writes: PS (completely off-topic, sorry): I've been using the collections library throughout the project I must say it is a lot nicer to work with I tried to Google for this, and ended up at http://hackage.haskell.org/trac/ghc/wiki/CollectionClassFramework

Re: [Haskell-cafe] A tale of three shootout entries

2007-11-28 Thread Kalman Noel
Simon Peyton-Jones wrote: You might think that unnecessary bangs shouldn't lead to unnecessary work -- if GHC knows it's strict *and* you bang the argument, it should still only be evaluated once. But it can happen. Consider f !xs = length xs Even though 'length' will evaluate

Re: [Haskell-cafe] Collections library

2007-11-28 Thread Adrian Hey
Ketil Malde wrote: Ben Franksen [EMAIL PROTECTED] writes: PS (completely off-topic, sorry): I've been using the collections library throughout the project I must say it is a lot nicer to work with I tried to Google for this, and ended up at

[Haskell-cafe] Pb building HDBC-sqlite3

2007-11-28 Thread manu
Hello still, trying to use a database with ghc 6.8.1 - patience running low however :) I now have troubles installing HDBC-sqlite3 the build fails like so : $ runhaskell Setup.lhs build Preprocessing library HDBC-sqlite3-1.1.3.0... Utils.hsc:31:33: error: hdbc-sqlite3-helper.h: No

Re: [Haskell-cafe] Downside of -fglasgow-extensions

2007-11-28 Thread Henning Thielemann
On Wed, 28 Nov 2007, manu wrote: Hello, I'm trying to build diverse packages from Hackage with ghc 6.8.1, they usually fail to build because of missing language extensions. Sometimes I am unable to determine the proper name of the extension missing in .cabal I tend to slap {- #OPTIONS

Re: [Haskell-cafe] cabal-install

2007-11-28 Thread Duncan Coutts
On Tue, 2007-11-27 at 18:02 -0800, Don Stewart wrote: ben.franksen: Just thought I install the latest version (0.4.0) from hackage and test it. Build and install went fine, but then it gets strange: cabal: dist/Conftest.c: openFile: does not exist (No such file or directory) This

Re: [Haskell-cafe] Strings and utf-8

2007-11-28 Thread Duncan Coutts
On Tue, 2007-11-27 at 18:38 +, Paul Johnson wrote: Brandon S. Allbery KF8NH wrote: However, the IO system truncates [characters] to 8 bits. Should this be considered a bug? A design problem. I presume that its because stdio.h was defined in the days of ASCII-only strings, and the

[Haskell-cafe] Re: is there a more concise way to generate helper functions for a datatype built on records?

2007-11-28 Thread Benedikt Huber
apfelmus schrieb: Benedikt Huber wrote: So, the Ref deriviation is really nice for sequential updates; parallel updates on the other hand need some work. .. While the select part of the Ref is expressed using , I don't know how the parallel update can be expressed in terms of combinators. Any

[Haskell-cafe] Pb builind hdbc-sqlite3 (suite)

2007-11-28 Thread manu
Hello, Still trying to build hdbc-sqlite3 it appears that the hdbc-sqlite3 package on Hackage is missing the C header file It is included with the hdbc-sqlite3 package found at http:// software.complete.org/hdbc-sqlite3/downloads however. Now I have another pb : Building

[Haskell-cafe] Re: Waiting for thread to finish

2007-11-28 Thread ChrisK
A safer gimmick... Ben Franksen wrote: tickWhileDoing :: String - IO a - IO a tickWhileDoing msg act = do hPutStr stderr msg hPutChar stderr ' ' hFlush stderr start_time - getCPUTime tickerId - forkIO ticker ... an async exception here will leave the ticker runnning res -

[Haskell-cafe] Pb builind hdbc-sqlite3 (the end)

2007-11-28 Thread manu
Hello I should think a bit before posting to the list, sorry for the pollution ! this error : Database/HDBC/Sqlite3/Utils.hsc:74:8: parse error on input `import' manu:/Volumes/data/Downloads/HDBC/hdbc-sqlite3 manu$ can be avoided by adding ForeignFunctionInterface to the extensions in

Re: [Haskell-cafe] A tale of Project Euler

2007-11-28 Thread Kalman Noel
Sebastian Sylvan: primes :: [Integer] primes = 2 : filter (null . primeFactors) [3,5..] primeFactors :: Integer- [Integer] primeFactors n = factor n primes where factor m (p:ps) | p*p m= [] | m `mod` p == 0 = p : factor (m `div` p) (p:ps)

Re: [Haskell-cafe] A tale of Project Euler

2007-11-28 Thread Sebastian Sylvan
On Nov 28, 2007 12:12 PM, Kalman Noel [EMAIL PROTECTED] wrote: Sebastian Sylvan: primes :: [Integer] primes = 2 : filter (null . primeFactors) [3,5..] primeFactors :: Integer- [Integer] primeFactors n = factor n primes where factor m (p:ps) | p*p m= []

Re: [Haskell-cafe] Why aren't Float and Double Bounded?

2007-11-28 Thread Jules Bean
Josh Lee wrote: On Tue, 27 Nov 2007 14:41:59 -0500 Isaac Dupree [EMAIL PROTECTED] wrote: Henning Thielemann wrote: On Mon, 26 Nov 2007, Jason Dusek wrote: Among numeric types, it seems that only integer types are Bounded. Maybe because IEEE format supports Infinity? therefore, maxBound is

Re: [Haskell-cafe] Re: Re: Waiting for thread to finish

2007-11-28 Thread Paul Moore
On 28/11/2007, Ben Franksen [EMAIL PROTECTED] wrote: It was fun, too. For instance, the OP's question reminded me of a little generic wrapper I wrote -- more or less for my own amusement -- during the course of this project. It outputs dots during an operation that might take a little longer

[Haskell-cafe] RFI: HDBC-1.1.3 build error

2007-11-28 Thread Jim Stuttard
ubuntu gutsy ghc-6.8.1 HDBC-1.1.3$ runghc Setup.lhs build Preprocessing library HDBC-1.1.3... Building HDBC-1.1.3... [3 of 6] Compiling Database.HDBC.Types ( Database/HDBC/Types.hs, dist/build/Database/HDBC/Types.o ) Database/HDBC/Types.hs:208:0: Illegal polymorphic or qualified type:

Re: [Haskell-cafe] RFI: HDBC-1.1.3 build error

2007-11-28 Thread Thomas Hartman
put {-# OPTIONS_GHC -fglasgow-exts #-} at the the top of the file that complains. Jim Stuttard [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 11/28/2007 08:06 AM Please respond to [EMAIL PROTECTED] To Haskell-Cafe@haskell.org cc Subject [Haskell-cafe] RFI: HDBC-1.1.3 build error

Re: [Haskell-cafe] New slogan for haskell.org

2007-11-28 Thread Ian Lynagh
On Wed, Nov 28, 2007 at 09:27:39AM +0100, Thomas Schilling wrote: Sorry, but are you talking of *one* homepage? This can all go into own wiki pages that are aimed at certain audiences, but this really can't all fit on the front page. I'm reminded of http://www.shiregames.com/shiregames/ We

Re: [Haskell-cafe] Downside of -fglasgow-extensions

2007-11-28 Thread Ian Lynagh
On Wed, Nov 28, 2007 at 12:08:30PM +0100, Henning Thielemann wrote: type List = [] Although not wrong, it is not Haskell 98 It's valid Haskell 98 as far as I know. Advantages of listing the extensions used are * Cabal knows whether hugs, for example, can compile the package * Assuming

Re: [Haskell-cafe] New slogan for haskell.org

2007-11-28 Thread Thomas Davie
On 28 Nov 2007, at 13:41, Ian Lynagh wrote: On Wed, Nov 28, 2007 at 09:27:39AM +0100, Thomas Schilling wrote: Sorry, but are you talking of *one* homepage? This can all go into own wiki pages that are aimed at certain audiences, but this really can't all fit on the front page. I'm

Re: [Haskell-cafe] Collections library

2007-11-28 Thread Robert Dockins
[snip] I recently withdrew from this project and offered up the libs I'd been working on as they are for a new owner. Didn't get any takers though (no surprises there!). I've always found the lack of apparent interest in all this somewhat puzzling myself. It's not as if there's no latent

Re: [Haskell-cafe] Collections library

2007-11-28 Thread Henning Thielemann
On Wed, 28 Nov 2007, Robert Dockins wrote: FWIW, I find the same phenomenon with Edison. I get very little feedback about it positive or negative; I really have no idea how many people are using it. I guess people are more willing to roll their own data structures or use the standard libs.

Re: [Haskell-cafe] Re: New slogan for haskell.org

2007-11-28 Thread Laurent Deniau
apfelmus wrote: Henning Thielemann wrote: apfelmus wrote: Back then, I was given the task to calculate some sequence of numbers which I did in one page of C code. So far so good, but when I asked the task assigner about his solution, he responded: Ah, this problem, that's 1 line in Haskell.

Re: [Haskell-cafe] Re: New slogan for haskell.org

2007-11-28 Thread Juanma Barranquero
On Nov 28, 2007 6:16 PM, Laurent Deniau [EMAIL PROTECTED] wrote: I can't see how it could be one page of C unless the page is 10 lines long ;-) The following code is the direct translation of your Haskell code (except that it prints the result instead of building a list). a+, ld. #include

[Haskell-cafe] Parsing unstructured data

2007-11-28 Thread Olivier Boudry
Hi all, This e-mail may be a bit off topic. My question is more about methods and algorithms than Haskell. I'm looking for links to methods or tools for parsing unstructured data. I'm currently working on data cleaning of a Customer Addresses database. Addresses are stored as 3 lines of text

[Haskell-cafe] Haskell and DB : giving up

2007-11-28 Thread manu
Hello I've spent a few days trying to install all the packages required to use HaskellDB with either MySQL or SQlite3 (the only 2 DB the host I was thinking about is supporting) Well, I am giving up ! I seriously regret replacing ghc-6.6 with ghc-6.8, I didn't expect that building packages

Re: [Haskell-cafe] Parsing unstructured data

2007-11-28 Thread Olivier Boudry
On 11/28/07, Hans van Thiel [EMAIL PROTECTED] wrote: Have you looked at the Java Rule Engine (I believe JSR 94) and in particular Jess? http://herzberg.ca.sandia.gov/ I have no experience with it myself, though, just heard of it. Regards, Hans van Thiel Hi Hans, Never heard of that

Re: [Haskell-cafe] Haskell and DB : giving up

2007-11-28 Thread Don Stewart
emmanuel.delaborde: Hello I've spent a few days trying to install all the packages required to use HaskellDB with either MySQL or SQlite3 (the only 2 DB the host I was thinking about is supporting) Well, I am giving up ! I seriously regret replacing ghc-6.6 with ghc-6.8, I didn't

Re: [Haskell-cafe] Downside of -fglasgow-extensions

2007-11-28 Thread Don Stewart
emmanuel.delaborde: Hello, I'm trying to build diverse packages from Hackage with ghc 6.8.1, they usually fail to build because of missing language extensions. Sometimes I am unable to determine the proper name of the extension missing in .cabal I tend to slap {- #OPTIONS

Re: [Haskell-cafe] Parsing unstructured data

2007-11-28 Thread Hans van Thiel
On Wed, 2007-11-28 at 12:58 -0500, Olivier Boudry wrote: Hi all, This e-mail may be a bit off topic. My question is more about methods and algorithms than Haskell. I'm looking for links to methods or tools for parsing unstructured data. I'm currently working on data cleaning of a Customer

Re: [Haskell-cafe] nbody (my own attempt) and performance problems

2007-11-28 Thread Dan Weston
Just out of curiosity... --some getter functions pVel !(_,vel,_) = vel pPos !(pos,_,_) = pos pMass !(!_,!_,!mass) = mass What does the !(...) buy you? I thought tuples were already strict by default in patterns (you'd need ~(...) to make them irrefutable), so isn't the above equivalent to:

Re: [Haskell-cafe] Haskell and DB : giving up

2007-11-28 Thread Olivier Boudry
On Nov 28, 2007 1:11 PM, manu [EMAIL PROTECTED] wrote: Hello I've spent a few days trying to install all the packages required to use HaskellDB with either MySQL or SQlite3 (the only 2 DB the host I was thinking about is supporting) Well, I am giving up ! I seriously regret replacing

[Haskell-cafe] Re: Strings and utf-8

2007-11-28 Thread Maurí­cio
(...) When it's phrased as truncates to 8 bits it sounds so simple, surely all we need to do is not truncate to 8 bits right? The problem is, what encoding should it pick? UTF8, 16, 32, EBDIC? (...) One sensible suggestion many people have made is that H98 file IO should use the locale

Re: [Haskell-cafe] Re: cabal-install

2007-11-28 Thread Thomas Schilling
On Wed, 2007-11-28 at 20:46 +0100, Ben Franksen wrote: Don Stewart wrote: ben.franksen: cabal: dist/Conftest.c: openFile: does not exist (No such file or directory) This one is due to having an out of date cabal. Upgrade to darcs cabal, then rebuild cabal-install, and things should

[Haskell-cafe] Re: cabal-install

2007-11-28 Thread Ben Franksen
Don Stewart wrote: ben.franksen: cabal: dist/Conftest.c: openFile: does not exist (No such file or directory) This one is due to having an out of date cabal. Upgrade to darcs cabal, then rebuild cabal-install, and things should go fine. Ok. So the package is broken in that it doesn't work

Re: [Haskell-cafe] nbody (my own attempt) and performance problems

2007-11-28 Thread Ryan Dickie
On Nov 28, 2007 11:18 AM, Dan Weston [EMAIL PROTECTED] wrote: Just out of curiosity... --some getter functions pVel !(_,vel,_) = vel pPos !(pos,_,_) = pos pMass !(!_,!_,!mass) = mass What does the !(...) buy you? I thought tuples were already strict by default in patterns (you'd need

Re: [Haskell-cafe] New slogan for haskell.org

2007-11-28 Thread Thomas Schilling
I put up a draft page. Feel free to adjust it. http://haskell.org/haskellwiki/FrontpageDraft / Thomas ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: Haskell-Cafe Digest, Vol 51, Issue 180

2007-11-28 Thread manu
I'm trying to build diverse packages from Hackage with ghc 6.8.1, they usually fail to build because of missing language extensions. Sometimes I am unable to determine the proper name of the extension missing in .cabal I tend to slap {- #OPTIONS -fglasgow-exts #-} at the top of the troublesome

Re: [Haskell-cafe] New slogan for haskell.org

2007-11-28 Thread Sebastian Sylvan
On Nov 28, 2007 8:54 PM, Thomas Schilling [EMAIL PROTECTED] wrote: I put up a draft page. Feel free to adjust it. http://haskell.org/haskellwiki/FrontpageDraft Perhaps slightly OT, but while we're discussing the front page. Is there any way of getting rid of the numbering on the front

Re: [Haskell-cafe] New slogan for haskell.org

2007-11-28 Thread Thomas Schilling
On Wed, 2007-11-28 at 21:02 +, Sebastian Sylvan wrote: On Nov 28, 2007 8:54 PM, Thomas Schilling [EMAIL PROTECTED] wrote: I put up a draft page. Feel free to adjust it. http://haskell.org/haskellwiki/FrontpageDraft Perhaps slightly OT, but while we're discussing the front page.

Re: [Haskell-cafe] New slogan for haskell.org

2007-11-28 Thread Sebastian Sylvan
On Nov 28, 2007 9:30 PM, Thomas Schilling [EMAIL PROTECTED] wrote: On Wed, 2007-11-28 at 21:02 +, Sebastian Sylvan wrote: On Nov 28, 2007 8:54 PM, Thomas Schilling [EMAIL PROTECTED] wrote: I put up a draft page. Feel free to adjust it.

[Haskell-cafe] Re: suggestion: add a .ehs file type

2007-11-28 Thread Alex Young
Alex Jacobson wrote: My original point (refined) was that I'd like a file extension (.ehs) that defaults to including all extensions that don't change the meaning of a .hs program but that may cause a small subset of them not to compile (e.g. ones that use forall as a type variable, foreign as

Re: [Haskell-cafe] Parsing unstructured data

2007-11-28 Thread Grzegorz Chrupala
Olivier Boudry wrote: Hi all, This e-mail may be a bit off topic. My question is more about methods and algorithms than Haskell. I'm looking for links to methods or tools for parsing unstructured data. I'm currently working on data cleaning of a Customer Addresses database. Addresses

[Haskell-cafe] Re: Waiting for thread to finish

2007-11-28 Thread Maurí­cio
After I have spawned a thread with 'forkIO', how can I check if that thread work has finished already? Or wait for it? The best way to do this is using Control.Exception.finally: (...) Changing ugly code for bad performance is not that usual in Haskell code :( I think you

Re: [Haskell-cafe] Re: Waiting for thread to finish

2007-11-28 Thread Brian Sniffen
On Nov 28, 2007 5:07 PM, Maurí­cio [EMAIL PROTECTED] wrote: Sorry if I sound rude. I just saw a place for a small joke, and used it. Chris code is pretty elegant to what it is supposed to do. However, knowing if a thread has finished is just 1 bit of information. There's probably a reason why

Re: [Haskell-cafe] A tale of Project Euler

2007-11-28 Thread Andrew Coppin
Sebastian Sylvan wrote: On Nov 28, 2007 12:12 PM, Kalman Noel [EMAIL PROTECTED] wrote: Sebastian Sylvan: primes :: [Integer] primes = 2 : filter (null . primeFactors) [3,5..] primeFactors :: Integer- [Integer] primeFactors n = factor n primes where factor m (p:ps) | p*p m

Re: [Haskell-cafe] Re: Waiting for thread to finish

2007-11-28 Thread Andrew Coppin
Dan Weston wrote: Silly or not, if I compile with -threaded, I always link in the one-liner C file: char *ghc_rts_opts = -N2; so I don't have to remember at runtime whether it should run with 2 cores or not. This just changes the default to 2 cores, so I am still free to run on only one

Re: [Haskell-cafe] Parsing unstructured data

2007-11-28 Thread Olivier Boudry
On 11/28/07, Grzegorz Chrupala [EMAIL PROTECTED] wrote: You may have better luck checking out methods used in parsing natural language. In order to use statistical parsing techniques such as Probabilistic Context Free Grammars ([1],[2] ) the standard approach is to extract rule probabilities

Re: [Haskell-cafe] Re: Waiting for thread to finish

2007-11-28 Thread Bryan O'Sullivan
Andrew Coppin wrote: Dan Weston wrote: Silly or not, if I compile with -threaded, I always link in the one-liner C file: char *ghc_rts_opts = -N2; Ah... you learn something useful every day! I was going to ask on IRC whether there's any way to do this - but now I don't need to bother.

[Haskell-cafe] Re: Re: cabal-install

2007-11-28 Thread Ben Franksen
Thomas Schilling wrote: On Wed, 2007-11-28 at 20:46 +0100, Ben Franksen wrote: Don Stewart wrote: ben.franksen: cabal: dist/Conftest.c: openFile: does not exist (No such file or directory) This one is due to having an out of date cabal. Upgrade to darcs cabal, then rebuild

Re: [Haskell-cafe] A tale of Project Euler

2007-11-28 Thread Andrew Coppin
Michaeljohn Clement wrote: Andrew Coppin wrote: First, somebody else wrote this in C: int n = 2 , m , primesFound = 0; for( n=0;n MAX_NUMBERS;n++ ) if( prime[n] ) { primesFound++; if( primesFound == 10001 ) cout n is the 10001st prime. endl; Um, I can't *believe* nobody else

[Haskell-cafe] Progress indications

2007-11-28 Thread Andrew Coppin
In a normal programming language, you might write something like this: for x = 1 to 100 print x ...do slow complex stuff... next x In Haskell, you're more likely to write something like result k = filter my_weird_condition $ map strange_conversion $ unfoldr ... That means that

Re: [Haskell-cafe] Strings and utf-8

2007-11-28 Thread Andrew Coppin
Duncan Coutts wrote: When it's phrased as truncates to 8 bits it sounds so simple, surely all we need to do is not truncate to 8 bits right? The problem is, what encoding should it pick? UTF8, 16, 32, EBDIC? How would people specify that they really want to use a binary file. Whatever we change

Re: [Haskell-cafe] A tale of Project Euler

2007-11-28 Thread Daniel Fischer
Am Mittwoch, 28. November 2007 22:31 schrieb Andrew Coppin: There are problems for which it's important to know how many times a given prime factor occurs. And there are other problems where it is merely necessary to know which primes are factors. I would say it's useful to have *both*

Re: [Haskell-cafe] Progress indications

2007-11-28 Thread David Roundy
On Wed, Nov 28, 2007 at 05:58:07PM -0500, Thomas Hartman wrote: maybe Debug.Trace? like... import Debug.Trace t = foldr debugf 0 [1..1] f :: Int - Int - Int f = (+) -- same typesig as f debugf :: Int - Int - Int debugf x y | y `mod` 1000 == 0 = x + (trace (show y) y) debugf x

Re: [Haskell-cafe] A tale of Project Euler

2007-11-28 Thread Sebastian Sylvan
On Nov 28, 2007 9:28 PM, Andrew Coppin [EMAIL PROTECTED] wrote: Michaeljohn Clement wrote: Andrew Coppin wrote: First, somebody else wrote this in C: int n = 2 , m , primesFound = 0; for( n=0;n MAX_NUMBERS;n++ ) if( prime[n] ) { primesFound++; if( primesFound == 10001 )

Re: [Haskell-cafe] A tale of Project Euler

2007-11-28 Thread Brandon S. Allbery KF8NH
On Nov 28, 2007, at 16:28 , Andrew Coppin wrote: Michaeljohn Clement wrote: Andrew Coppin wrote: First, somebody else wrote this in C: int n = 2 , m , primesFound = 0; for( n=0;n MAX_NUMBERS;n++ ) if( prime[n] ) { primesFound++; if( primesFound == 10001 ) cout n is the 10001st

Re: [Haskell-cafe] Waiting for thread to finish

2007-11-28 Thread Matthew Brecknell
Brad Clow: When I (deeply) force the worker thread's results to be strict, I observe both cores working, but the execution time (elapsed) slower. I can only speculate, but since you emphasise deep forcing, I wonder how deep is the structure returned from the worker thread? Could it be deep

Re: [Haskell-cafe] New slogan for haskell.org

2007-11-28 Thread Dan Weston
* Static typing, which increases robustness by allowing the compiler to catch many common errors automatically. * Type inference, which deduces types automatically and frees the programmer from writing superfluous type signatures. * Higher order functions, polymorphism, and

[Haskell-cafe] Question about takeMVar

2007-11-28 Thread Maurí­cio
Hi, 'takeMVar' documentation says if there are multiple threads blocked in takeMVar, and the MVar becomes full, only one thread will be woken up. Since 'takeMVar' is a reading function, i.e., it doesn't change the value of the variable, why waking up only one thread? If we wake multiple

[Haskell-cafe] cabal under windows (was Re: Haskell-Cafe Digest, Vol 51, Issue 180)

2007-11-28 Thread Tim Docker
Well I'd say none of the packages I've tried, build out of the box... I'm not a windows developer, but Is it actually reasonable to expect any cabal packages that depend on external c libraries and headers to build out of the box on windows? How can cabal find out where those files are,

Re: [Haskell-cafe] ghc 6.8.1 bug?

2007-11-28 Thread SevenThunders
SevenThunders wrote: The new behavior is that under certain conditions a certain matrix inner product produces undefined floats, that should not be there. I now have a simple example that I have posted as ticket number 1944 for ghc 6.8.1. The behavior is that if I link to an

Re: [Haskell-cafe] cabal under windows (was Re: Haskell-Cafe Digest, Vol 51, Issue 180)

2007-11-28 Thread Olivier Boudry
On 11/28/07, Tim Docker [EMAIL PROTECTED] wrote: Well I'd say none of the packages I've tried, build out of the box... I'm not a windows developer, but Is it actually reasonable to expect any cabal packages that depend on external c libraries and headers to build out of the box on

[Haskell-cafe] Hit a wall with the type system

2007-11-28 Thread Chris Smith
I was talking to a few people about this on #haskell, and it was suggested I ask here. I should say that I'm playing around here; don't mistake this for an urgent request or a serious problem. Suppose I wanted to implement automatic differentiation of simple functions on real numbers; then

[Haskell-cafe] Re: Hit a wall with the type system

2007-11-28 Thread Chris Smith
I'll repeat, just for the heck of it, that what I want is a type something like: diff :: forall A a. (A : Floating, A a) = (forall b. A b = b - b) - b - b where A is quantified over all type classes, and : denotes is a superclass of. The syntax is made up, of course, and

Re: [Haskell-cafe] What is the role of $!?

2007-11-28 Thread PR Stanley
Hi Thanks for the explanation. I would be grateful for some examples accompanying the text. I will indicate the right places for real life (Haskell code) examples in the paragraphs below: PJ: As I understand it, the distinction is between the mathematical term non-strict and the

Re: [Haskell-cafe] Hit a wall with the type system

2007-11-28 Thread Luke Palmer
On Nov 29, 2007 4:02 AM, Chris Smith [EMAIL PROTECTED] wrote: I was talking to a few people about this on #haskell, and it was suggested I ask here. I should say that I'm playing around here; don't mistake this for an urgent request or a serious problem. Suppose I wanted to implement

Re: [Haskell-cafe] Hit a wall with the type system

2007-11-28 Thread Luke Palmer
On Nov 29, 2007 4:31 AM, Luke Palmer [EMAIL PROTECTED] wrote: On Nov 29, 2007 4:02 AM, Chris Smith [EMAIL PROTECTED] wrote: I was talking to a few people about this on #haskell, and it was suggested I ask here. I should say that I'm playing around here; don't mistake this for an urgent

Re: [Haskell-cafe] What is the role of $!?

2007-11-28 Thread Luke Palmer
On Nov 29, 2007 4:23 AM, PR Stanley [EMAIL PROTECTED] wrote: PRS: You would also get different results - e.g. let a = 3, b = 7, c = 2 therefore 20 = strict ( ( (a+(b*c)) ) therefore 17 = non-strict ( (a+(b*c)) ) or am I misunderstanding the

[Haskell-cafe] Re: Hit a wall with the type system

2007-11-28 Thread Chris Smith
The question I asked is about how to type the differentiation function. Whether the function is correct is a different question, which I'm happy to talk about; but understand that it's just an example I was playing with. Luke Palmer wrote: Oh, I think I totally missed the point. I missed

[Haskell-cafe] Re: Hit a wall with the type system

2007-11-28 Thread Chris Smith
Luke Palmer wrote: I don't see why this should be true. Int - Int is an instance of this type, but derivatives require limits, which integers don't have. Do you intend to output the difference sequence of the function in this case? But then Double - Double is also an instance of this type.

[Haskell-cafe] Re: Haskell packaging on Windows cygwin ( POSIX on Windows ; ^)

2007-11-28 Thread Galchin Vasili
The message I actually receive is: runhaskell Setup.lhs build . ./Haq.hs:6:7: Could not find module `System.Environment': it is a member of a package base, which is hidden BTW I haven't actually checked source in via darcs due to cygwin $PATH problems ... vasya On Nov

[Haskell-cafe] Haskell packaging on Windows cygwin ( POSIX on Windows ; ^)

2007-11-28 Thread Galchin Vasili
Hello, I trying to get a library to build ... I am following the instructions in http://en.wikibooks.org/wiki/Haskell/Packaging. Under the Build your project section in this web page, when I try to do an actual build (runhaskell Setup.lhs build), the imported module System.Environment

Re: [Haskell-cafe] What is the role of $!?

2007-11-28 Thread PR Stanley
Hi Thanks for the response. JCC: In most languages, if you have some expression E, and when the computer attempts to evaluate E it goes in to an infinite loop, then when the computer attempts to evaluate the expression f(E), it also goes into an infinite loop, regardless of what f is. That's

Re: [Haskell-cafe] Question about takeMVar

2007-11-28 Thread Jules Bean
Maurí­cio wrote: Hi, 'takeMVar' documentation says if there are multiple threads blocked in takeMVar, and the MVar becomes full, only one thread will be woken up. Since 'takeMVar' is a reading function, i.e., it doesn't change the value of the variable, why waking up only one thread? If we

Re[2]: [Haskell-cafe] Strings and utf-8

2007-11-28 Thread Bulat Ziganshin
Hello Andrew, Thursday, November 29, 2007, 1:11:38 AM, you wrote: IMHO, someone should make a full proposal by implementing an alternative System.IO library that deals with all these encoding issues and implements H98 IO in terms of that. We need two seperate interfaces. One for text-mode

Re: [Haskell-cafe] Re: New slogan for haskell.org

2007-11-28 Thread Henning Thielemann
On Thu, 29 Nov 2007, Ben Franksen wrote: Thomas Schilling wrote: I put up a draft page. Feel free to adjust it. http://haskell.org/haskellwiki/FrontpageDraft I like the current version better. It is /very/ difficult to pack in such a short paragraph a list of the most important

Re: [Haskell-cafe] What is the role of $!?

2007-11-28 Thread Thomas Davie
On 29 Nov 2007, at 06:32, PR Stanley wrote: Hi Thanks for the response. JCC: In most languages, if you have some expression E, and when the computer attempts to evaluate E it goes in to an infinite loop, then when the computer attempts to evaluate the expression f(E), it also goes into