Re: [Haskell-cafe] How to serialize thunks?

2006-12-21 Thread Krasimir Angelov
Hi Joachim, All those libraries really force the data because they all are written in Haskell. If you want to serialize thunks then you will need some support from RTS. This is something that is implemented in Clean but this just uncovers a lot of other problems: The serialization of thunk

RE: [Haskell-cafe] Re: Versioning

2006-12-21 Thread Simon Peyton-Jones
| One thing that might become a problem is that the Scrap your | boilerplate approach seems to work only in GHC. I don't think so. Other compilers might not support deriving Data, but you can always write the instance by hand. Simon ___ Haskell-Cafe

[Haskell-cafe] Re: Haskell Side Effect

2006-12-21 Thread Zara
On Wed, 20 Dec 2006 15:24:54 -0800, Ashley Yakeley [EMAIL PROTECTED] wrote: Since learning Haskell, I can now count in Spanish! See: one in Spanish, two in Spanish, three in Spanish, four in Spanish.. The side effect is: a - Being able to write in Spanish? b- Being nuts? Saludos

Re: [Haskell-cafe] Versioning

2006-12-21 Thread Bulat Ziganshin
Hello Joachim, Wednesday, December 20, 2006, 11:22:24 AM, you wrote: The update code would now have to unmarshall a blob of game data, traverse it to find all instances of SomeData, wrap them in a one-element list to turn them into SomeData1s, reconstruct the blob of game data with the

Re: [Haskell-cafe] Versioning

2006-12-21 Thread Lemmih
On 12/20/06, Bulat Ziganshin [EMAIL PROTECTED] wrote: Hello Joachim, Wednesday, December 20, 2006, 11:22:24 AM, you wrote: The update code would now have to unmarshall a blob of game data, traverse it to find all instances of SomeData, wrap them in a one-element list to turn them into

[Haskell-cafe] Timer with Haskell GUI application

2006-12-21 Thread asilovy
Hi all, I'm still trying to figure out why, in the Graphics.HGL library, is the timer not treated as the other events (mouse clics, key pressing... ? For instance see : http://haskell.org/ghc/docs/latest/html/libraries/HGL/Graphics-HGL-Window.html As I understand, the timer in a HGL GUI

[Haskell-cafe] Re: How to serialize thunks?

2006-12-21 Thread Joachim Durchholz
Krasimir Angelov schrieb: All those libraries really force the data because they all are written in Haskell. If you want to serialize thunks then you will need some support from RTS. Good to hear that my conjectures aren't too far from reality. Does any Haskell implementation have that kind

Re: [Haskell-cafe] Re: How to serialize thunks?

2006-12-21 Thread Krasimir Angelov
On 12/21/06, Joachim Durchholz [EMAIL PROTECTED] wrote: Krasimir Angelov schrieb: All those libraries really force the data because they all are written in Haskell. If you want to serialize thunks then you will need some support from RTS. Good to hear that my conjectures aren't too far from

[Haskell-cafe] Re: Versioning

2006-12-21 Thread Joachim Durchholz
Simon Peyton-Jones schrieb: | One thing that might become a problem is that the Scrap your | boilerplate approach seems to work only in GHC. I don't think so. Other compilers might not support deriving Data, but you can always write the instance by hand. How much boilerplate would be needed

Re: [Haskell-cafe] Re: How to serialize thunks?

2006-12-21 Thread Neil Mitchell
Hi All those libraries really force the data because they all are written in Haskell. If you want to serialize thunks then you will need some support from RTS. Good to hear that my conjectures aren't too far from reality. Does any Haskell implementation have that kind of RTS support?

Re[2]: [Haskell-cafe] Re: Versioning

2006-12-21 Thread Bulat Ziganshin
Hello Simon, Thursday, December 21, 2006, 12:02:22 PM, you wrote: | One thing that might become a problem is that the Scrap your | boilerplate approach seems to work only in GHC. I don't think so. Other compilers might not support deriving Data, but you can always write the instance by

Re: [Haskell-cafe] Re: Versioning

2006-12-21 Thread Bulat Ziganshin
Hello Joachim, Wednesday, December 20, 2006, 9:30:02 PM, you wrote: One thing that might become a problem is that the Scrap your boilerplate approach seems to work only in GHC. There's nothing wrong with GHC, but it sounds like I'm committing to a specific compiler right from the start. I'd

Re: [Haskell-cafe] Re: Versioning

2006-12-21 Thread Neil Mitchell
Hi there are really no choices for real development. many libraries, language extensions and techniques are for ghc only I develop everything in Hugs, including the Yhc compiler itself. Hugs is great. There are lots of extensions in GHC, but Haskell 98 is a perfectly useable language! So

Re: [Haskell-cafe] Re: Versioning

2006-12-21 Thread Lennart Augustsson
On Dec 21, 2006, at 15:53 , Neil Mitchell wrote: Hi there are really no choices for real development. many libraries, language extensions and techniques are for ghc only I develop everything in Hugs, including the Yhc compiler itself. Hugs is great. There are lots of extensions in GHC,

Re: [Haskell-cafe] How to serialize thunks?

2006-12-21 Thread Tomasz Zielonka
On Wed, Dec 20, 2006 at 11:03:42PM +0100, Joachim Durchholz wrote: If yes: are there workarounds? I'd really like to be able to use infinite data structures in the data that I serialize. There is an interesting technique thay allows you to serialize infinite, lazy or functional values: don't

Re: [Haskell-cafe] Re: Versioning

2006-12-21 Thread Jacques Carette
Lennart Augustsson wrote: I must second this opinion. There's this (false) perception that you need all kinds of extensions to make Haskell usable. It's simply not true. Certain extensions can make your life easier, but that's it. To write code in Haskell, this is true. However, one of

Re: [Haskell-cafe] Re: Versioning

2006-12-21 Thread Neil Mitchell
Hi In other words, you can program in Haskell just fine without extensions. But if you want that next level in type safety, extensions is where it's at, at least for the kind of code I write. What level of safety do these type extensions give you? The biggest runtime crasher is probably

Re: [Haskell-cafe] Re: Versioning

2006-12-21 Thread Brian Hulley
Lennart Augustsson wrote: On Dec 21, 2006, at 15:53 , Neil Mitchell wrote: Hi there are really no choices for real development. many libraries, language extensions and techniques are for ghc only I develop everything in Hugs, including the Yhc compiler itself. Hugs is great. There are lots

[Haskell-cafe] cabal running multiple preprocessors on one file - suggestion

2006-12-21 Thread Marc Weber
Am I right that the way to do this now is create your own preprocessor run on files havirg your extionsion? What about naming the source files eg Module.hs.cpp.di.gc.chs ? This would mean first run c2hs, then greencard thin DrIft then cpp and put the results in Module.hs.cpp.di.gc.chs 1)

Re: [Haskell-cafe] Re: Versioning

2006-12-21 Thread Neil Mitchell
Hi In other words, what on earth is good about gluing oneself to Haskell98? Life's moved on... If you stick to Haskell 98 you can: * Convert your code to Clean (Hacle) * Debug it (Hat) * Run it in your browser (ycr2js) * Document it (Haddock) * Make a cross platform binary (yhc) * Get

Re: [Haskell-cafe] Re: Versioning

2006-12-21 Thread Jacques Carette
Neil Mitchell wrote: In other words, you can program in Haskell just fine without extensions. But if you want that next level in type safety, extensions is where it's at, at least for the kind of code I write. What level of safety do these type extensions give you? Check out many, many, many

Re: [Haskell-cafe] Shrinking the Prelude: The categorical approach

2006-12-21 Thread Henning Thielemann
On Wed, 20 Dec 2006, Imam Tashdid ul Alam wrote: Bulat Ziganshin raised: Num is intrinsically bound to the compiler. sad. so let's leave Num out. this basically means we will avoid abstract algebra in general. that is, forget groups, rings, for now, See

Re: [Haskell-cafe] Haskell Side Effect

2006-12-21 Thread Henning Thielemann
On Thu, 21 Dec 2006 [EMAIL PROTECTED] wrote: ...werbeH neve dna a n d C h i n e s e You read too much spam. :-) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Re: Versioning

2006-12-21 Thread Brian Hulley
Neil Mitchell wrote: Hi In other words, what on earth is good about gluing oneself to Haskell98? Life's moved on... If you stick to Haskell 98 you can: * Convert your code to Clean (Hacle) * Debug it (Hat) * Run it in your browser (ycr2js) * Document it (Haddock) * Make a cross platform

Re: [Haskell-cafe] Re: Versioning

2006-12-21 Thread Neil Mitchell
Hi True, though it would be even better if the usual extensions were more widely supported, though I suppose identifying what's useful and therefore worth supporting is the point of the Haskell Prime process. Exactly the reason for Haskell Prime. As an aside I've often thought it would be

Re: [Haskell-cafe] Re: Versioning

2006-12-21 Thread Scott Brickner
Jacques Carette wrote: Neil Mitchell wrote: The biggest runtime crasher is probably pattern match failings, something that most of these type extensions don't catch at all! Array out-of-bounds, fromJust, head on an empty list, and pattern-match failures are in my list of things I wish the

Re: [Haskell-cafe] Re: Versioning

2006-12-21 Thread Scott Brickner
Jacques Carette wrote: Lennart Augustsson wrote: I must second this opinion. There's this (false) perception that you need all kinds of extensions to make Haskell usable. It's simply not true. Certain extensions can make your life easier, but that's it. To write code in Haskell, this

Re: Low-level Haskell profiling [Was: Re: [Haskell-cafe] Re: A suggestion for the next high profile Haskell project]

2006-12-21 Thread Alexey Rodriguez Yakushev
Hi Andy, On Dec 20, 2006, at 9:15, Andy Georges wrote: Well, AFAIK, PAPI abstracts away the platform dependencies quite well, so I guess your code can be run straightforward on all IA-32 platforms (depending on the events you wish to measure, which may or may not be present on all

[Haskell-cafe] API for reading a big binary file

2006-12-21 Thread Ranjan Bagchi
Hi -- I'm still learning to use ghc effectively, and I'm trying to use it for more-or-less mundane programming tasks, hopefully in a way which is a lot more elegant than I'd do in Java or Perl. I've got a big [around a gigabyte] binary file, filled with identical binary structures

Re: Low-level Haskell profiling [Was: Re: [Haskell-cafe] Re: A suggestion for the next high profile Haskell project]

2006-12-21 Thread Andy Georges
Alexey, Well, AFAIK, PAPI abstracts away the platform dependencies quite well, so I guess your code can be run straightforward on all IA-32 platforms (depending on the events you wish to measure, which may or may not be present on all platforms). PowerPC, Itanium, Mips, Alpha should work

Stronger static types, was Re: [Haskell-cafe] Re: Versioning

2006-12-21 Thread Jacques Carette
Yes, dependent types have a lot to do with all this. And I am an eager lurker of all this Epigram. Scott Brickner wrote: Jacques Carette wrote: Array out-of-bounds, fromJust, head on an empty list, and pattern-match failures are in my list of things I wish the type system could help me

Re: Stronger static types, was Re: [Haskell-cafe] Re: Versioning

2006-12-21 Thread Brian Hulley
Jacques Carette wrote: Yes, dependent types have a lot to do with all this. And I am an eager lurker of all this Epigram. Would it be possible to augment Haskell's type system so that it was the same as that used in Epigram? Epigram itself uses a novel 2d layout and a novel way of writing

Re: Stronger static types, was Re: [Haskell-cafe] Re: Versioning

2006-12-21 Thread Lennart Augustsson
It's possible to augment Haskell type system to be the one in Epigram. But it would no longer be Haskell. :) And to meet the goals of Epigram you'd also have to remove (unrestricted) recursion from Haskell. -- Lennart On Dec 21, 2006, at 23:46 , Brian Hulley wrote: Jacques

[Haskell-cafe] Re: How to serialize thunks?

2006-12-21 Thread Joachim Durchholz
Tomasz Zielonka schrieb: On Wed, Dec 20, 2006 at 11:03:42PM +0100, Joachim Durchholz wrote: If yes: are there workarounds? I'd really like to be able to use infinite data structures in the data that I serialize. There is an interesting technique thay allows you to serialize infinite, lazy or

Re: [Haskell-cafe] Shrinking the Prelude: The categorical approach

2006-12-21 Thread Ross Paterson
On Thu, Dec 21, 2006 at 07:16:16PM +0100, Henning Thielemann wrote: About the question, whether functions should be provided in the most general context, I refer to http://www.haskell.org/haskellwiki/Slim_instance_declaration Certainly we all agree that a module that defines instances

Re: [Haskell-cafe] API for reading a big binary file

2006-12-21 Thread Marc Weber
On Thu, Dec 21, 2006 at 01:47:48PM -0800, Ranjan Bagchi wrote: Is there a fast way to do this using ghc? I can extract fields by using a ByteString, but I may not be using it fast enough: I've had to write my own routines to extract ints, longs and doubles. The other option is to write

Re: [Haskell-cafe] API for reading a big binary file

2006-12-21 Thread Stefan O'Rear
On Thu, Dec 21, 2006 at 01:47:48PM -0800, Ranjan Bagchi wrote: I've got a big [around a gigabyte] binary file, filled with identical binary structures (imagine a C process writing structs). I'd like to process/analyze them efficiently. In C or even Java, i'd memory map the file and

Re: [Haskell-cafe] Shrinking the Prelude: The categorical approach

2006-12-21 Thread Imam Tashdid ul Alam
hi guys, there's a page on the haskellwiki (called The Other Prelude) now which has a discussion page as well (like all wiki pages!). so let's do it. on topic: this is why I think renaming is quite unnecessary. The Other Prelude should be very concise, both conceptually and in size. IMHO this

[Haskell-cafe] State separation/combination pattern question

2006-12-21 Thread Reto Kramer
I'm looking for a pattern to use for state separation in my application. I need to write two stateful libraries. One is a partitioned in- memory store, the other a disk based store with an in-memory cache fronting it. Both store modules need the IO and State monad. My aim is to write the