Re: [Haskell-cafe] Is there GHC 6.8.3 on Ubuntu?

2008-08-28 Thread Ketil Malde
Rafael Gustavo da Cunha Pereira Pinto [EMAIL PROTECTED] writes: Is there anyone packing GHC 6.8.3 for Ubuntu Hardy? The next Ubuntu release (8.10 Intrepid), seems to come with 6.8.2 as well. If you want to pack 6.8.3, go for it! If you just wanted to use it, I've had success using the

Re[2]: [Haskell-cafe] Pure hashtable library

2008-08-28 Thread Bulat Ziganshin
Hello Richard, Thursday, August 28, 2008, 5:28:46 AM, you wrote: trie: O(len)*O(width) hashed trie: O(len) hash: O(len) If width here refers to the branching factor of the trie, it's actually O(len.lg(width)), and the width that matters is not the *possible* number of choices but the

Re: [Haskell-cafe] Pure hashtable library

2008-08-28 Thread Don Stewart
bulat.ziganshin: Hello Richard, Thursday, August 28, 2008, 5:28:46 AM, you wrote: trie: O(len)*O(width) hashed trie: O(len) hash: O(len) If width here refers to the branching factor of the trie, it's actually O(len.lg(width)), and the width that matters is not the *possible*

Re: [Haskell-cafe] Haskell Propeganda

2008-08-28 Thread Ketil Malde
Aaron Tomb [EMAIL PROTECTED] writes: Huh? Type safety buys [...] nothing about dereferencing null pointers, which are the moral equivalent of Nothing. What type safety buys you, in my mind, is that Nothing is only a valid value for explicit Maybe types. In cases where you don't use Maybe,

Re: [Haskell-cafe] Haskell Propeganda

2008-08-28 Thread Don Stewart
ketil: Aaron Tomb [EMAIL PROTECTED] writes: Huh? Type safety buys [...] nothing about dereferencing null pointers, which are the moral equivalent of Nothing. What type safety buys you, in my mind, is that Nothing is only a valid value for explicit Maybe types. In cases where you don't

Re[2]: [Haskell-cafe] Pure hashtable library

2008-08-28 Thread Bulat Ziganshin
Hello Don, Thursday, August 28, 2008, 10:32:43 AM, you wrote: Seems like you can make a pure hashtable by unsafePerformIO on the impure one, and exporting only 'lookup'.. probably yes, but it will lose a bit of performance due to incremental building of hashtable. actually, writing HT module

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-28 Thread Lennart Augustsson
I'm certain you can write a kernel in Haskell where the only use of global variables is those that hardware interfacing forces you to use. On Thu, Aug 28, 2008 at 3:32 AM, John Meacham [EMAIL PROTECTED] wrote: On Thu, Aug 28, 2008 at 12:15:10AM +0100, Lennart Augustsson wrote: I didn't say

Re[2]: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-28 Thread Bulat Ziganshin
Hello Lennart, Thursday, August 28, 2008, 12:00:41 PM, you wrote: I'm certain you can write a kernel in Haskell where the only use of global variables is those that hardware interfacing forces you to use. moreover, you can write it in Turing machine. the question is just how comfortable it

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-28 Thread Adrian Hey
Jonathan Cast wrote: On Wed, 2008-08-27 at 11:53 +0100, Adrian Hey wrote: John Meacham wrote: As with all design decisions, it is sometimes the right thing and sometimes the wrong one. And sometimes the most expedient. (which, occasionally, is a perfectly valid driving force behind a certain

Re: [Haskell-cafe] Pure hashtable library

2008-08-28 Thread Jason Dusek
Jules Bean [EMAIL PROTECTED] wrote: Jason Dusek wrote: I would much rather have a pure Trie that is foldable. If we have a Trie, we get a space efficient sorted list, too. Well, Data.Sequence can be used as a space efficient sorted list which is Foldable - if you make the decision to

Re: [Haskell-cafe] Is there GHC 6.8.3 on Ubuntu?

2008-08-28 Thread Dougal Stanton
On Thu, Aug 28, 2008 at 7:25 AM, Ketil Malde [EMAIL PROTECTED] wrote: If you want to pack 6.8.3, go for it! If you just wanted to use it, I've had success using the binary snapshots on previous Ubuntus. Agreed. The default Linux binary works fine for me in Hardy Heron, just installed in my

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-28 Thread Adrian Hey
Lennart Augustsson wrote: I don't don't think global variables should be banned, I just think they should be severly discouraged. If you're saying a language should not provide a sound way to do this (as I believe you are), then AFAICT for all practical purposes you *are* saying you think

Re: [Haskell-cafe] Pure hashtable library

2008-08-28 Thread Jules Bean
Jason Dusek wrote: Jules Bean [EMAIL PROTECTED] wrote: Jason Dusek wrote: I would much rather have a pure Trie that is foldable. If we have a Trie, we get a space efficient sorted list, too. Well, Data.Sequence can be used as a space efficient sorted list which is Foldable - if you make the

[Haskell-cafe] building documentation

2008-08-28 Thread Thomas Hartman
I'm on ubuntu, ghc 6.8.3. I built this using the Generic i386 Linux build at http://www.haskell.org/ghc/download_ghc_683.html How do I build local documentation that matches what I see at http://www.haskell.org/ghc/docs/latest/html/libraries/ -- and am I correct that this is 6.8.3 right now?

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-28 Thread Johannes Waldmann
Adrian Hey wrote: There are plenty situations where it makes no semantic sense to allow 2 or more or some thing. A list of all active processes for example. all referring to what scope? perhaps there occurs a situation with several process (thread) pools, severals cores etc. See also

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-28 Thread Adrian Hey
Johannes Waldmann wrote: Adrian Hey wrote: There are plenty situations where it makes no semantic sense to allow 2 or more or some thing. A list of all active processes for example. all referring to what scope? perhaps there occurs a situation with several process (thread) pools, severals

[Haskell-cafe] ANN: gsl-random 0.1 and monte-carlo-0.1

2008-08-28 Thread Patrick Perry
Hi everyone, I've started on bindings for the random number generators and random distributions provided by the gsl. The package is available here: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/gsl-random I've also written a monad and transformer for doing monte carlo

[Haskell-cafe] Re: Haskell symbol ~

2008-08-28 Thread Maurí­cio
At the same place, I found that example, but wasn't wise enough to figure out what it does: (f *** g) ~(x,y) = (f x, g y) (...) (...) Please update the keyword wiki so it makes sense to you, after you have got your head round it. After the explanations, I think I got it, and just

Re: [Haskell-cafe] Re: Haskell symbol ~

2008-08-28 Thread Neil Mitchell
Hi After the explanations, I think I got it, and just updated the wiki. Many thanks. That wiki page is automatically pulled into the Hoogle search engine when I update it, so having good definitions for every new keyword is a real bonus :-) I also got a few wrong default links (I just

Re: [Haskell-cafe] Building SDL-image package on Windows

2008-08-28 Thread Bit Connor
I think the best thing to do is to darcs send a patch with the necessary changes On Thu, Aug 28, 2008 at 1:05 AM, Garrick Chin [EMAIL PROTECTED] wrote: Hello, Adding the main macro undef has solved the linker errors and both SDL_image and SDL_ttf build and install correctly now. For both

Re: Re[2]: [Haskell-cafe] Pure hashtable library

2008-08-28 Thread Jan-Willem Maessen
On Aug 27, 2008, at 4:31 PM, Bulat Ziganshin wrote: Hello Jan-Willem, Wednesday, August 27, 2008, 4:06:11 PM, you wrote: One obvious way to make non-modifiable hash tables useful is to eat your own tail non-strictly--- aggregate a set of hash table entries, construct a hash table from them,

Re: [Haskell-cafe] Re: Haskell symbol ~

2008-08-28 Thread David House
2008/8/28 Maurí­cio [EMAIL PROTECTED]: After the explanations, I think I got it, and just updated the wiki. Glad you've understood it. Seems I arrived a little late at this thread, but there is also: http://en.wikibooks.org/wiki/Haskell/Laziness#Lazy_pattern_matching In addition, the first

Re: [Haskell-cafe] Haskell Propeganda

2008-08-28 Thread Brandon S. Allbery KF8NH
On 2008 Aug 28, at 2:41, Don Stewart wrote: ketil: The great thing about Maybe is that once I've checked it isn't Nothing, I can extract the value and dispense with further checks. foo mbx = maybe default (bar x) mbx And GHC will warn me when I forget to check all cases, and prevent me from

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-28 Thread Jonathan Cast
On Thu, 2008-08-28 at 10:00 +0100, Adrian Hey wrote: Lennart Augustsson wrote: I don't don't think global variables should be banned, I just think they should be severly discouraged. If you're saying a language should not provide a sound way to do this (as I believe you are), then

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-28 Thread Adrian Hey
Jonathan Cast wrote: On Thu, 2008-08-28 at 10:00 +0100, Adrian Hey wrote: Lennart Augustsson wrote: I don't don't think global variables should be banned, I just think they should be severly discouraged. If you're saying a language should not provide a sound way to do this (as I believe

Re: [Haskell-cafe] ANN: gsl-random 0.1 and monte-carlo-0.1

2008-08-28 Thread Don Stewart
patperry: Hi everyone, I've started on bindings for the random number generators and random distributions provided by the gsl. The package is available here: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/gsl-random I've also written a monad and transformer for doing monte

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-28 Thread Dan Doel
On Thursday 28 August 2008 12:26:27 pm Adrian Hey wrote: As I've pointed out several times already you can find simple examples in the standard haskell libs. So far nobody has accepted my challenge to re-implement any of these competantly (I.E. avoiding the use of global variables). Why

Re: [Haskell-cafe] Pure hashtable library

2008-08-28 Thread Jason Dusek
Jules Bean [EMAIL PROTECTED] wrote: Jason Dusek wrote: Jules Bean [EMAIL PROTECTED] wrote: Jason Dusek wrote: I would much rather have a pure Trie that is foldable. If we have a Trie, we get a space efficient sorted list, too. Well, Data.Sequence can be used as a space

Re: [Haskell-cafe] Haskell Propeganda

2008-08-28 Thread Tim Newsham
GNU ld supports pragmas which cause the use of certain functions to output warnings at link time (try compiling a C program that uses gets()). It occurs to me that this, either in compiler or linker, would be a nice thing for ghc to do when using fromJust or other partial functions. would

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-28 Thread Lennart Augustsson
I don't think anyone has claimed that any interface can be implemented without globals. Of course some can't (just pick an interface that is the specification of a global variable). What I (and others) claims is that such interfaces are bad. Using a global variable makes an assumption that

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-28 Thread David Roundy
On Thu, Aug 28, 2008 at 01:17:29PM -0400, Dan Doel wrote: On Thursday 28 August 2008 12:26:27 pm Adrian Hey wrote: As I've pointed out several times already you can find simple examples in the standard haskell libs. So far nobody has accepted my challenge to re-implement any of these

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-28 Thread Adrian Hey
Lennart Augustsson wrote: I don't think anyone has claimed that any interface can be implemented without globals. Of course some can't (just pick an interface that is the specification of a global variable). I said in the original challenge even I'd let you (anyone) change the interface if you

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-28 Thread Ganesh Sittampalam
On Thu, 28 Aug 2008, Adrian Hey wrote: implicit parameters (a highly dubious language feature IMO). How can you say that with a straight face at the same time as advocating global variables? :-) Ganesh ___ Haskell-Cafe mailing list

[Haskell-cafe] Re: two problems with Data.Binary and Data.ByteString

2008-08-28 Thread Ben Franksen
Duncan Coutts wrote: On Tue, 2008-08-26 at 15:31 -0700, Bryan O'Sullivan wrote: On Tue, Aug 26, 2008 at 3:04 PM, Don Stewart [EMAIL PROTECTED] wrote: No, since I can get whnf with `seq`. However, that does sound like a good idea (a patch to the parallel library? ) I suspect that patching

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-28 Thread Ganesh Sittampalam
On Thu, 28 Aug 2008, Adrian Hey wrote: There's no semantic difficulty with the proposed language extension, How does it behave in the presence of dynamic loading? What about remote procedure calls? Also what if I want a thread-local variable? It seems like an extension like this should

Re: [Haskell-cafe] ANN: gsl-random 0.1 and monte-carlo-0.1

2008-08-28 Thread Patrick Perry
Thanks for the heads up, Don. I fixed the file in version 0.1.1. I also changed the default CBLAS to the one that comes with the GSL. Anyone who cares at all about performance will want to configure the package to use the best CBLAS on their system. If this is ATLAS, make sure you pass

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-28 Thread John Meacham
On Thu, Aug 28, 2008 at 09:00:41AM +0100, Lennart Augustsson wrote: I'm certain you can write a kernel in Haskell where the only use of global variables is those that hardware interfacing forces you to use. And hence you need a safe way to use program-scope variables. It is true that there are

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-28 Thread Adrian Hey
Ganesh Sittampalam wrote: On Thu, 28 Aug 2008, Adrian Hey wrote: implicit parameters (a highly dubious language feature IMO). How can you say that with a straight face at the same time as advocating global variables? :-) Quite easily, what's the problem? IORefs, Chans etc are perfectly

Re: [Haskell-cafe] Galois Tech Talks: Stream Fusion for Haskell Arrays

2008-08-28 Thread Don Stewart
johan.tibell: On Sun, Jul 13, 2008 at 12:16 AM, Don Stewart [EMAIL PROTECTED] wrote: johan.tibell: On Sat, Jul 12, 2008 at 12:13 AM, Don Stewart [EMAIL PROTECTED] wrote: Any possibility of you guys taping the talk? Unlikely next week, but soon, yes! How about the slides? Slides for

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-28 Thread Adrian Hey
Jonathan Cast wrote: This has been answered repeatedly, at least implicitly. Unless you insist that getWhatever should live in the IO monad and have no functional arguments (why?), there is no reason why this should be impossible. What's more, there seems to be no good *semantic* reason why

Re: [Haskell-cafe] Pure hashtable library

2008-08-28 Thread Jason Dusek
Well, sure, that could work too. -- _jsn ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-28 Thread Jonathan Cast
On Thu, 2008-08-28 at 22:24 +0100, Adrian Hey wrote: Jonathan Cast wrote: This has been answered repeatedly, at least implicitly. Unless you insist that getWhatever should live in the IO monad and have no functional arguments (why?), there is no reason why this should be impossible.

[Haskell-cafe] Calling Lockheed, Indra, Thales, Raytheon

2008-08-28 Thread Paul Johnson
This is a strange question, I know, but is there anyone working in any of the above companies on this mailing list? Everyone will no doubt be wondering what they have in common. I'm afraid I can't discuss that. Paul. ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-28 Thread Jonathan Cast
On Thu, 2008-08-28 at 14:45 -0700, Jonathan Cast wrote: On Thu, 2008-08-28 at 22:24 +0100, Adrian Hey wrote: Jonathan Cast wrote: This has been answered repeatedly, at least implicitly. Unless you insist that getWhatever should live in the IO monad and have no functional arguments

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-28 Thread Yitzchak Gale
Lennart Augustsson wrote: I don't think anyone has claimed that any interface can be implemented without globals. Of course some can't (just pick an interface that is the specification of a global variable). What I (and others) claims is that such interfaces are bad. Using a global variable

Re: [Haskell-cafe] Calling Lockheed, Indra, Thales, Raytheon

2008-08-28 Thread Paul Johnson
Paul Johnson wrote: This is a strange question, I know, but is there anyone working in any of the above companies on this mailing list? Everyone will no doubt be wondering what they have in common. I'm afraid I can't discuss that. I will say that this is not a job search, and I'm not

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-28 Thread Adrian Hey
Ganesh Sittampalam wrote: On Thu, 28 Aug 2008, Adrian Hey wrote: There's no semantic difficulty with the proposed language extension, How does it behave in the presence of dynamic loading? To answer this you need to be precise about the semantics of what is being dynamically loaded. But

Re: [Haskell-cafe] Haskell Propeganda

2008-08-28 Thread Brandon S. Allbery KF8NH
On 2008 Aug 28, at 13:21, Tim Newsham wrote: GNU ld supports pragmas which cause the use of certain functions to output warnings at link time (try compiling a C program that uses gets()). It occurs to me that this, either in compiler or linker, would be a nice thing for ghc to do when

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-28 Thread Lennart Augustsson
As I said earlier, global variables may be necessary when interfacing with legacy things (software or hardware). If Haskell had always taken the pragmatic path of adding what seems easiest and most in line with imperative practice it would not be the language it is today. It would be Perl, ML,

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-28 Thread Brandon S. Allbery KF8NH
On 2008 Aug 28, at 17:01, John Meacham wrote: On Thu, Aug 28, 2008 at 09:00:41AM +0100, Lennart Augustsson wrote: I'm certain you can write a kernel in Haskell where the only use of global variables is those that hardware interfacing forces you to use. OS provided one? What if you have an

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-28 Thread Yitzchak Gale
Lennart Augustsson wrote: As I said earlier, global variables may be necessary when interfacing with legacy things (software or hardware). By prior context I didn't mean legacy languages. I meant logically prior - enclosing contexts. It will always be necessary on occasion to refactor code

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-28 Thread Philippa Cowderoy
On Thu, 2008-08-28 at 23:48 +0100, Lennart Augustsson wrote: The Haskell philosophy has always been to stick it out until someone comes up with the right solution to a problem rather than picking some easy way out. So I'd rather keep global variables being eye sores (as they are now) to

Re: [Haskell-cafe] ANN: gsl-random 0.1 and monte-carlo-0.1

2008-08-28 Thread Roman Cheplyaka
* Patrick Perry [EMAIL PROTECTED] [2008-08-28 04:24:21-0700] Hi everyone, I've started on bindings for the random number generators and random distributions provided by the gsl. The package is available here: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/gsl-random I've also

Re: [Haskell-cafe] Haskell Propeganda

2008-08-28 Thread Alexander Dunlap
On Thu, 28 Aug 2008, Brandon S. Allbery KF8NH wrote: On 2008 Aug 28, at 13:21, Tim Newsham wrote: GNU ld supports pragmas which cause the use of certain functions to output warnings at link time (try compiling a C program that uses gets()). It occurs to me that this, either in compiler or

Re: [Haskell-cafe] Haskell Propeganda

2008-08-28 Thread Neil Mitchell
Hi Tools like Neil Mitchell's Catch can do more sophisticated checking, as long as your program can be compiled by YHC. Sometimes fromJust can be quite useful, though, especially in tandem with isJust. For example, prop_foobar :: SomeType - Property prop_foobar x = isJust (someTypeToMaybe

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-28 Thread Adrian Hey
Lennart Augustsson wrote: The Haskell philosophy has always been to stick it out until someone comes up with the right solution to a problem rather than picking some easy way out. I understood from your previous remarks that you regarded this as a non-problem even in C. There's no

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-28 Thread Adrian Hey
Lennart Augustsson wrote: If Haskell had always taken the pragmatic path of adding what seems easiest and most in line with imperative practice it would not be the language it is today. It would be Perl, ML, or Java. The Haskell philosophy has always been to stick it out until someone comes up

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-28 Thread Brandon S. Allbery KF8NH
On 2008 Aug 28, at 20:45, Adrian Hey wrote: Lennart Augustsson wrote: If Haskell had always taken the pragmatic path of adding what seems easiest and most in line with imperative practice it would not be the language it is today. It would be Perl, ML, or Java. The Haskell philosophy has

Re: [Haskell-cafe] Haskell Propeganda

2008-08-28 Thread Evan Laforge
On Thu, Aug 28, 2008 at 5:02 PM, Neil Mitchell [EMAIL PROTECTED] wrote: Hi Tools like Neil Mitchell's Catch can do more sophisticated checking, as long as your program can be compiled by YHC. Sometimes fromJust can be quite useful, though, especially in tandem with isJust. For example,

Re: [Haskell-cafe] Pure hashtable library

2008-08-28 Thread Richard A. O'Keefe
On 28 Aug 2008, at 9:07 pm, Jules Bean wrote: Insert for Data.Sequence is log(i) where i is the position of the insertion; clearly bounded by log(n). toList is O(n) and index is (at worst) log(i). I think the corresponding operations with tries are log(n), Let the key you want to insert

[Haskell-cafe] Re: Calling Lockheed, Indra, Thales, Raytheon

2008-08-28 Thread Benjamin L . Russell
On Thu, 28 Aug 2008 23:16:45 +0100, Paul Johnson [EMAIL PROTECTED] wrote: Paul Johnson wrote: This is a strange question, I know, but is there anyone working in any of the above companies on this mailing list? Everyone will no doubt be wondering what they have in common. I'm afraid I

Re: [Haskell-cafe] Re: [Haskell] Top Level -

2008-08-28 Thread Dan Doel
On Thursday 28 August 2008 2:28:35 pm David Roundy wrote: On Thu, Aug 28, 2008 at 01:17:29PM -0400, Dan Doel wrote: On Thursday 28 August 2008 12:26:27 pm Adrian Hey wrote: As I've pointed out several times already you can find simple examples in the standard haskell libs. So far nobody