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

2008-08-28 Thread Duncan Coutts
On Thu, 2008-08-28 at 21:34 +0200, Ben Franksen wrote: > Just some raw ideas: > > What if we had a way to express 'optional dependencies' between packages in > a cabal file. Something like 'if package x is installed (and satisfies > given version constraints) then add module UseX'. > > One probl

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

[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 >> a

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 h

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 exampl

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 alway

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 w

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 justification

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 (someT

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 li

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

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

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 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 ex

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, or

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 usi

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 thi

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 trying

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 var

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 ar

[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 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 > > impossib

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 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 th

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 sl

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 ord

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] 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 t

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 als

Re: [Haskell-cafe] Pure hashtable library

2008-08-28 Thread Jules Bean
Jason Dusek wrote: 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] Re: [Haskell] Top Level <-

2008-08-28 Thread Jonathan Cast
On Thu, 2008-08-28 at 20:28 +0100, Adrian Hey wrote: > 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 o

[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

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@ha

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 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 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 there'

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 y

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

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). > > W

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

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 y

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), the

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 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: 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] 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 bot

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 cr

[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 i

[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 computat

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

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 "si

[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? When

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 - i

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 glo

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 i

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

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 bi

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 w

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