Re: [Haskell-cafe] Announce: EnumMap-0.0.1

2009-08-12 Thread Ketil Malde
David Menendez writes: > That depends on what "outside the Enum range" means. You'll get an > exception if you somehow get an Int key in the map which doesn't > correspond to any value in the enum, but you don't get an exception if > you try to pass in, say, a large Integer. > Prelude> fromEnum

Re: [Haskell-cafe] Working around file locking in Windows

2009-08-12 Thread Bulat Ziganshin
Hello Patai, Thursday, August 13, 2009, 12:01:12 AM, you wrote: > I'm trying to make the hp2any suite to be fully functional under > Windows, but I'm running into permission errors when I try to read the > heap profile that's still being written by its producer. Is there a way > to solve this pro

[Haskell-cafe] Re: DDC compiler and effects; better than Haskell?

2009-08-12 Thread roconnor
On Wed, 12 Aug 2009, Peter Verswyvelen wrote: I kind of agree with the DDC authors here; in Haskell as soon as a function has a side effect, and you want to pass that function to a pure higher order function, you're stuck, you need to pick the monadic version of the higher order function, if it

Re: [Haskell-cafe] unsafeDestructiveAssign?

2009-08-12 Thread John Meacham
On Wed, Aug 12, 2009 at 06:48:33PM +0100, John Lato wrote: > On Wed, Aug 12, 2009 at 2:39 PM, Derek Elkins wrote: > > > > (To Alberto as well.) > > > > Unsurprisingly, Lennart stated the real issue, but I'll re-emphasize > > it.  As much trouble as such a profound violation of purity would > > caus

Re: DDC compiler and effects; better than Haskell? (was Re: [Haskell-cafe] unsafeDestructiveAssign?)

2009-08-12 Thread Brandon S. Allbery KF8NH
On Aug 12, 2009, at 23:46 , Ben Lippmeier wrote: Dan Doel wrote: Off hand, I'd say I don't write foo and fooM versions of functions much in actual programs, either. Such duplication goes into libraries... Note the lack of Data.Map.mapM and Data.Map.foldM. Want to apply a monadic computati

Re: [Haskell-cafe] containers and maps

2009-08-12 Thread Jake McArthur
Jake McArthur wrote: The monoids package offers something similar to this: mapReduce :: (Generator c, Reducer e m) => (Elem c -> e) -> c -> m If we take (Elem c) to be (item), (e) to be (item'), (c) to be (full), and (m) to be (full'), it's basically the same thing, and offers the same ad

Re: DDC compiler and effects; better than Haskell? (was Re: [Haskell-cafe] unsafeDestructiveAssign?)

2009-08-12 Thread Ben Lippmeier
Dan Doel wrote: On Wednesday 12 August 2009 11:46:29 pm Ben Lippmeier wrote: Dan Doel wrote: Off hand, I'd say I don't write foo and fooM versions of functions much in actual programs, either. Such duplication goes into libraries... It would be ok if the duplication /was/ actual

Re: DDC compiler and effects; better than Haskell? (was Re: [Haskell-cafe] unsafeDestructiveAssign?)

2009-08-12 Thread Dan Doel
On Wednesday 12 August 2009 11:46:29 pm Ben Lippmeier wrote: > Dan Doel wrote: > > Off hand, I'd say I don't write foo and fooM versions of functions much > > in actual programs, either. Such duplication goes into libraries... > > It would be ok if the duplication /was/ actually in the libraries, >

Re: DDC compiler and effects; better than Haskell? (was Re: [Haskell-cafe] unsafeDestructiveAssign?)

2009-08-12 Thread John A. De Goes
The next step is to distinguish between reading file A and reading file B, between reading file A and writing file A, between reading one part of file A and writing another part of file A, etc. When the effect system can carry that kind of information, and not just for files, but network,

Re: DDC compiler and effects; better than Haskell? (was Re: [Haskell-cafe] unsafeDestructiveAssign?)

2009-08-12 Thread John A. De Goes
Fair enough, but keep in mind an effect system does more than just eliminate boilerplate: it provides richer information on the precise nature of the interaction of a function with the real world. With the right insight, you can reorder and parallelize all kinds of effectful computations.

Re: DDC compiler and effects; better than Haskell? (was Re: [Haskell-cafe] unsafeDestructiveAssign?)

2009-08-12 Thread Ben Lippmeier
Dan Doel wrote: Off hand, I'd say I don't write foo and fooM versions of functions much in actual programs, either. Such duplication goes into libraries... It would be ok if the duplication /was/ actually in the libraries, but often it's not. Note the lack of Data.Map.mapM and Data.Map.foldM. W

Re: DDC compiler and effects; better than Haskell? (was Re: [Haskell-cafe] unsafeDestructiveAssign?)

2009-08-12 Thread Ben Lippmeier
Dan Doel wrote: For instance: what effects does disciple support? Mutation and IO? You can create your own top-level effects which interfere will all others, for example: effect !Network; effect !File; readFile :: String -(!e)> String :- !e = !File Now any function that calls readFile

Re: [Haskell-cafe] containers and maps

2009-08-12 Thread Jake McArthur
The monoids package offers something similar to this: mapReduce :: (Generator c, Reducer e m) => (Elem c -> e) -> c -> m If we take (Elem c) to be (item), (e) to be (item'), (c) to be (full), and (m) to be (full'), it's basically the same thing, and offers the same advantages as the ones y

[Haskell-cafe] Improving event management in elerea

2009-08-12 Thread jean legrand
Hi Haskellers, I've written a new version of the breakout elerea-example where mouse is replaced by LEFT and RIGHT keys http://hpaste.org:80/fastcgi/hpaste.fcgi/view?id=8159 and I have two questions. 1) my event function (line 79) returns a new signal and takes 3 arguments : an initial signal

Re: DDC compiler and effects; better than Haskell? (was Re: [Haskell-cafe] unsafeDestructiveAssign?)

2009-08-12 Thread Ben Lippmeier
Derek Elkins wrote: The compiler is supposed to be able to reorder non-strict evaluation to do optimisations, but that can't be done if effects could happen. There's nothing special about non-strict evaluation that makes the antecedent true. Replacing "non-strict" with "strict" gives just

Re: DDC compiler and effects; better than Haskell? (was Re: [Haskell-cafe] unsafeDestructiveAssign?)

2009-08-12 Thread Dan Doel
On Wednesday 12 August 2009 9:27:30 pm John A. De Goes wrote: > So what, because effect systems might not eliminate *all* boilerplate, > you'd rather use boilerplate 100% of the time? :-) For most of my Haskell programs, the majority of the program is not made up of straight IO or ST functions, s

[Haskell-cafe] ANNOUNCE: GLFW-0.4.1

2009-08-12 Thread Paul L
I'm glad to announce a new version of GLFW, 0.4.1, has been uploaded to HackageDB. Notable changes include: * workaround for a FFI bug that affects GHC < 6.10 on 64-bit machines. * fix for the compilation problem on OS X for GHC > 6.10.1 * compatibility fix to work with both OpenGL 2.3.0.0 and old

Re: DDC compiler and effects; better than Haskell? (was Re: [Haskell-cafe] unsafeDestructiveAssign?)

2009-08-12 Thread John A. De Goes
So what, because effect systems might not eliminate *all* boilerplate, you'd rather use boilerplate 100% of the time? :-) Regards, John A. De Goes N-Brain, Inc. The Evolution of Collaboration http://www.n-brain.net|877-376-2724 x 101 On Aug 12, 2009, at 3:28 PM, Dan Doel wrote: O

Re: [Haskell-cafe] Chicago Haskell User Group?

2009-08-12 Thread Tom Tobin
On Wed, Aug 12, 2009 at 6:21 PM, Jeremy Shaw wrote: > Or you can make me an admin, and I'll do it. I did that; feel free to go ahead and dress up the page. ^_^ A logo somehow incorporating elements of the skyline into the new Haskell logo would be cute, if you (or anyone else) is artistically in

[Haskell-cafe] containers and maps

2009-08-12 Thread John Lato
Hello, The recent discussion regarding One Container Class To Rule Them All got me to thinking about container classes and map functions. ListLike (which is really a pretty nice package, and I would like to see more people use it) provides two map functions, a regular map with type > map :: (item

Re: DDC compiler and effects; better than Haskell? (was Re: [Haskell-cafe] unsafeDestructiveAssign?)

2009-08-12 Thread Jason Dusek
2009/08/12 Dan Doel : > On Wednesday 12 August 2009 10:12:14 am John A. De Goes wrote: > > I think the point is that a functional language with a > > built- in effect system that captures the nature of effects > > is pretty damn cool and eliminates a lot of boilerplate. > > It's definitely an inter

Re: [Haskell-cafe] Chicago Haskell User Group?

2009-08-12 Thread Jeremy Shaw
At Wed, 12 Aug 2009 17:49:04 -0500, Tom Tobin wrote: > > On Wed, Aug 12, 2009 at 4:45 PM, Jeremy Shaw wrote: > > Personally, I would recommend using a facebook page as a means of > > communicating within the group. > > Okay: > > http://www.facebook.com/pages/Chicago-IL/Chicago-Haskell-User-Group

Re: [Haskell-cafe] Chicago Haskell User Group?

2009-08-12 Thread Jeremy Shaw
At Wed, 12 Aug 2009 23:54:01 +0200, Cory Knapp wrote: > > I and certainly some of my professors would be extremely interested in a > Chicago HUG. Facebook sounds like a good idea, but I tend not to > actually check facebook groups. They just aren't quite intrusive enough. :) With facebook pages

Re: [Haskell-cafe] generalize RecordPuns and RecordWildCards to work with qualified names?

2009-08-12 Thread Evan Laforge
> | Even is suggesting that instead of reporting an error, in the second > | case we could use the translation: > | > |   f (A.A { A.a }) = a   -->   f (A.A { A.a = a }) > | > | (i.e., when punning occurs with a qualified name, use just the > | unqualified part of the name in the pattern) > > Yes,

Re: [Haskell-cafe] Chicago Haskell User Group?

2009-08-12 Thread Tom Tobin
On Wed, Aug 12, 2009 at 4:45 PM, Jeremy Shaw wrote: > Personally, I would recommend using a facebook page as a means of > communicating within the group. Okay: http://www.facebook.com/pages/Chicago-IL/Chicago-Haskell-User-Group/115989593098 I hope that's the correct public-facing link, since Fac

Re: [Haskell-cafe] Chicago Haskell User Group?

2009-08-12 Thread Louis Wasserman
Count me in. I'm a student at UChicago. Louis Wasserman wasserman.lo...@gmail.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Chicago Haskell User Group?

2009-08-12 Thread Cory Knapp
I and certainly some of my professors would be extremely interested in a Chicago HUG. Facebook sounds like a good idea, but I tend not to actually check facebook groups. They just aren't quite intrusive enough. :) Unfortunately (actually, quite fortunately), I'm in Budapest for the semester, s

Re: [Haskell-cafe] Chicago Haskell User Group?

2009-08-12 Thread Don Stewart
Excellent. BTW, more documented "Haskell for the Web" summaries/state of the art etc would be good. Some centralized community resource. -- Don jeremy: > Hello, > > Sounds good to me. I am in the Chicago area and do Haskell-based web > development all day, every day, using the Happstack platfor

Re: [Haskell-cafe] Chicago Haskell User Group?

2009-08-12 Thread Jeremy Shaw
Also, With a acronym like C.H.U.G, we better have beer... ;) - jeremy ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Chicago Haskell User Group?

2009-08-12 Thread Jeremy Shaw
Hello, Sounds good to me. I am in the Chicago area and do Haskell-based web development all day, every day, using the Happstack platform. I don't have much time to organize, but I would be able to attend meetings and give some presentations. Personally, I would recommend using a facebook page as

Re: DDC compiler and effects; better than Haskell? (was Re: [Haskell-cafe] unsafeDestructiveAssign?)

2009-08-12 Thread Dan Doel
On Wednesday 12 August 2009 10:12:14 am John A. De Goes wrote: > I think the point is that a functional language with a built- > in effect system that captures the nature of effects is pretty damn > cool and eliminates a lot of boilerplate. It's definitely an interesting direction (possibly even t

Re: [Haskell-cafe] GSoC profiling project to be wrapped up

2009-08-12 Thread Patai Gergely
> Do you have an overview somewhere of the tools and how to use them? Well, not really. While there is some basic information on the project wiki at Google Code, it is rather outdated. So probably the blog comes closest to that, but it also concentrates on the details. I intend to extract the bits

Re: [Haskell-cafe] GSoC profiling project to be wrapped up

2009-08-12 Thread Don Stewart
patai_gergely: > Hi everyone, > > I finally uploaded the profiling tools to Hackage. The package names are > hp2any-{core,graph,manager}. The first two should be possible to install > right away, while the manager needs Gtk2Hs. A bit more on the project > and this update at

Re: [Haskell-cafe] Database written in Haskell?

2009-08-12 Thread Don Stewart
Give it a cool name like SlothDB or something :) -- Don alex: > HAppS' IxSet library gives relational operations but does not have a SQL > interface. Am thinking of changing the name to RelSet to make the > functionality clear. You can use HAppS.State to give ACID properties > to operati

Re: DDC compiler and effects; better than Haskell? (was Re: [Haskell-cafe] unsafeDestructiveAssign?)

2009-08-12 Thread Conor McBride
On 12 Aug 2009, at 20:40, Don Stewart wrote: bugfact: Well, the point is that you still have monadic and pure programming styles. It's true that applicative style programming can help here, but then you have these <$> and <*> operators everywhere, which also feels like boilerplate code (as you

[Haskell-cafe] Working around file locking in Windows

2009-08-12 Thread Patai Gergely
Hello all, I'm trying to make the hp2any suite to be fully functional under Windows, but I'm running into permission errors when I try to read the heap profile that's still being written by its producer. Is there a way to solve this problem without turning to the Win32 interface and having to writ

Re: DDC compiler and effects; better than Haskell? (was Re: [Haskell-cafe] unsafeDestructiveAssign?)

2009-08-12 Thread Don Stewart
bugfact: > Well, the point is that you still have monadic and pure programming > styles. It's true that applicative style programming can help here, > but then you have these <$> and <*> operators everywhere, which also > feels like boilerplate code (as you mention, some extensions could > help her

[Haskell-cafe] Chicago Haskell User Group?

2009-08-12 Thread Tom Tobin
There isn't a Chicago-area Haskell group, is there? If not, would anyone be interested in forming one? I used to run Chicago's Django (a Python web framework) group, but lost interest (and since I lived in the suburbs back then, got sick of the commute). Unlike Python, I'm still very much a begi

Re: [Haskell-cafe] Examples

2009-08-12 Thread Andrew Coppin
John D. Ramsdell wrote: Usually I include the example program in the package, but make its compilation conditional using a Cabal flag like buildExamples. But then the binaries generated from the example program get installed. I think the poster wants to share the source code, not install

[Haskell-cafe] Next BostonHaskell meeting: August 18th at MIT

2009-08-12 Thread Ravi Nanavati
I'm pleased to announce the August meeting of the Boston Area Haskell Users' Group. Based on the feedback from the July meeting and the constraints of our speakers, the August meeting has been scheduled for Tuesday, August 18th from 6:30pm - 8:30pm. Like the past two meetings, it will be held in t

Re: [Haskell-cafe] unsafeDestructiveAssign?

2009-08-12 Thread John Lato
On Wed, Aug 12, 2009 at 2:39 PM, Derek Elkins wrote: > > (To Alberto as well.) > > Unsurprisingly, Lennart stated the real issue, but I'll re-emphasize > it.  As much trouble as such a profound violation of purity would > cause, it's not the biggest problem.  If that were all, you could > easily wr

Re: DDC compiler and effects; better than Haskell? (was Re: [Haskell-cafe] unsafeDestructiveAssign?)

2009-08-12 Thread Felipe Lessa
On Wed, Aug 12, 2009 at 08:34:28AM -0500, Derek Elkins wrote: > > As was just pointed out in the unsafeDestructiveAssign thread from which > > this thread was forked, effects are incompatible with non-strict > > evaluation. > > No, they aren't. At least, they aren't in any technical way. There >

Re: [Haskell-cafe] Announce: EnumMap-0.0.1

2009-08-12 Thread John Van Enk
> It strikes me that using Bits instead of Enum might be more likely to be what > people want in many cases It wouldn't hurt for you (or someone) to implement this. I'm sure it would be useful. On Wed, Aug 12, 2009 at 2:09 AM, Ketil Malde wrote: > Felipe Lessa writes: > >>> There are some funky

Re: [Haskell-cafe] Announce: EnumMap-0.0.1

2009-08-12 Thread John Van Enk
> EnumMap silently passes this responsibility to the user, without even a note > in the documentation. Like I've said, I made no modifications to the documentation other than replacing IntMap with EnumMap. Should the community show more interest in the EnumMap, such a change will show up in the d

Re: [Haskell-cafe] Announce: EnumMap-0.0.1

2009-08-12 Thread David Menendez
On Wed, Aug 12, 2009 at 12:07 PM, John Van Enk wrote: > On Wed, Aug 12, 2009 at 11:34 AM, David Menendez wrote: >> On Wed, Aug 12, 2009 at 9:16 AM, John Van Enk wrote: >>> On Wed, Aug 12, 2009 at 2:09 AM, Ketil Malde wrote: And perhaps also note that you will get exceptions for values out

Re: [Haskell-cafe] Announce: EnumMap-0.0.1

2009-08-12 Thread John Van Enk
On Wed, Aug 12, 2009 at 11:34 AM, David Menendez wrote: > On Wed, Aug 12, 2009 at 9:16 AM, John Van Enk wrote: >> On Wed, Aug 12, 2009 at 2:09 AM, Ketil Malde wrote: >>> >>> And perhaps also note that you will get exceptions for values outside >>> the Enum range. >>> >> >> I'd think that part is ob

Re: [Haskell-cafe] Announce: EnumMap-0.0.1

2009-08-12 Thread David Menendez
On Wed, Aug 12, 2009 at 9:16 AM, John Van Enk wrote: > On Wed, Aug 12, 2009 at 2:09 AM, Ketil Malde wrote: >> >> And perhaps also note that you will get exceptions for values outside >> the Enum range. >> > > I'd think that part is obvious. That depends on what "outside the Enum range" means. You'

Re: DDC compiler and effects; better than Haskell? (was Re: [Haskell-cafe] unsafeDestructiveAssign?)

2009-08-12 Thread David Menendez
On Wed, Aug 12, 2009 at 9:34 AM, Derek Elkins wrote: > On Tue, Aug 11, 2009 at 3:51 PM, Robin Green wrote: >> On Wed, 12 Aug 2009 11:37:02 +0200 >> Peter Verswyvelen wrote: >> >>> Yes, sorry. >>> >>> But I think I already found the answer to my own question. >>> >>> DDC functions that are lazy don

Re: [Haskell-cafe] unsafeDestructiveAssign?

2009-08-12 Thread Job Vranish
Yeah I'm thinking that even if I had such a function, it might be impossible to make it play nicely. I think I can do a restricted form of what I want with STRefs and StableNames (still dangerous) so I think I'll stick with that at least while experimenting in haskell. DCC looks extremely interest

Re: DDC compiler and effects; better than Haskell? (was Re: [Haskell-cafe] unsafeDestructiveAssign?)

2009-08-12 Thread Robin Green
On Wed, 12 Aug 2009 08:34:28 -0500 Derek Elkins wrote: > On Tue, Aug 11, 2009 at 3:51 PM, Robin Green > wrote: > > On Wed, 12 Aug 2009 11:37:02 +0200 > > Peter Verswyvelen wrote: > > > >> Yes, sorry. > >> > >> But I think I already found the answer to my own question. > >> > >> DDC functions tha

Re: DDC compiler and effects; better than Haskell? (was Re: [Haskell-cafe] unsafeDestructiveAssign?)

2009-08-12 Thread Jason Dagit
On Wed, Aug 12, 2009 at 6:34 AM, Derek Elkins wrote: > > Again, it is purity, not laziness, that allows compositional > reasoning. Effects destroy compositional reasoning in a strict > language just as much. Totality also matters, but for some reason we take that for granted :) Jason _

Re: DDC compiler and effects; better than Haskell? (was Re: [Haskell-cafe] unsafeDestructiveAssign?)

2009-08-12 Thread John A. De Goes
On Aug 12, 2009, at 7:34 AM, Derek Elkins wrote: Again, it is purity, not laziness, that allows compositional reasoning. Effects destroy compositional reasoning in a strict language just as much. Yes, but that's just as much true in the IO monad as in effectful code in DDC. I think the poi

[Haskell-cafe] Finalizers on FunPtrs

2009-08-12 Thread Maurí­cio CA
I see in Foreign.Ptr documentation that it is good practice to call freeHaskellFunPtr when a pointer to a Haskell function (obtained using 'dynamic' stubs) is not going to be used anymore. Is it possible to do that in a way that is similar to ForeignPtr behavior, where pointers are finalized when

Re: [Haskell-cafe] unsafeDestructiveAssign?

2009-08-12 Thread Derek Elkins
On Wed, Aug 12, 2009 at 4:41 AM, John Lato wrote: > Hi Job, > > I don't think this hypothetical function could exist; you may as well > call it  "notEverSafeOhTheHumanity" and be done with it. > > Since Haskell provides no guarantees about when (if ever) any given > function/data will be evaluated,

Re: DDC compiler and effects; better than Haskell? (was Re: [Haskell-cafe] unsafeDestructiveAssign?)

2009-08-12 Thread Derek Elkins
On Tue, Aug 11, 2009 at 3:51 PM, Robin Green wrote: > On Wed, 12 Aug 2009 11:37:02 +0200 > Peter Verswyvelen wrote: > >> Yes, sorry. >> >> But I think I already found the answer to my own question. >> >> DDC functions that are lazy don't allow side effects: >> http://www.haskell.org/haskellwiki/DD

Re: [Haskell-cafe] Announce: EnumMap-0.0.1

2009-08-12 Thread John Van Enk
On Wed, Aug 12, 2009 at 2:09 AM, Ketil Malde wrote: > Felipe Lessa writes: > >>> There are some funky Enum instances around: > >> IMO it's implicit that keys overwrite eachother whenever their >> 'fromEnum' is equal, however that may be spoken in the docs. > > I couldn't find anything explicit in

Re: DDC compiler and effects; better than Haskell? (was Re: [Haskell-cafe] unsafeDestructiveAssign?)

2009-08-12 Thread Tom Davies
On 12/08/2009, at 9:09 PM, Peter Verswyvelen wrote: Is this really the case? Or is just hard to implement? I mean, if...then...else is always kind of lazy in it's 2nd and 3rd argument, but I think DDC handles this correctly even with the presence of side effects (not sure, but it has a little

Re: DDC compiler and effects; better than Haskell? (was Re: [Haskell-cafe] unsafeDestructiveAssign?)

2009-08-12 Thread Peter Verswyvelen
Is this really the case? Or is just hard to implement? I mean, if...then...else is always kind of lazy in it's 2nd and 3rd argument, but I think DDC handles this correctly even with the presence of side effects (not sure, but it has a little presentation about it: http://cs.anu.edu.au/people/Ben.

Re: DDC compiler and effects; better than Haskell? (was Re: [Haskell-cafe] unsafeDestructiveAssign?)

2009-08-12 Thread Robin Green
On Wed, 12 Aug 2009 11:37:02 +0200 Peter Verswyvelen wrote: > Yes, sorry. > > But I think I already found the answer to my own question. > > DDC functions that are lazy don't allow side effects: > http://www.haskell.org/haskellwiki/DDC/EvaluationOrder > > Anyway it would be cool if the DDC Eff

Re: DDC compiler and effects; better than Haskell? (was Re: [Haskell-cafe] unsafeDestructiveAssign?)

2009-08-12 Thread Jules Bean
Peter Verswyvelen wrote: I kind of agree with the DDC authors here; in Haskell as soon as a function has a side effect, and you want to pass that function to a pure higher order function, you're stuck, you need to pick the monadic version of the higher order function, if it exists. I just want

Re: [Haskell-cafe] unsafeDestructiveAssign?

2009-08-12 Thread Alberto G. Corona
IMHO (and only IMHO) In a pure context, a copy operation does not make any sense. Why duplicate a chunck of memory whose content is inmutable?. Just create another pointer to it !. If you need to simulate the mutation of a variable in a imperative context, create a new closure and define a new va

[Haskell-cafe] unsafeDestructiveAssign?

2009-08-12 Thread John Lato
Hi Job, I don't think this hypothetical function could exist; you may as well call it "notEverSafeOhTheHumanity" and be done with it. Since Haskell provides no guarantees about when (if ever) any given function/data will be evaluated, you would need some mechanism to tell the compiler that a dat

Re: Re[2]: DDC compiler and effects; better than Haskell? (was Re: [Haskell-cafe] unsafeDestructiveAssign?)

2009-08-12 Thread Peter Verswyvelen
Yes, sorry. But I think I already found the answer to my own question. DDC functions that are lazy don't allow side effects: http://www.haskell.org/haskellwiki/DDC/EvaluationOrder Anyway it would be cool if the DDC EffectSystem would also work on lazy functions :) On Wed, Aug 12, 2009 at 11:28

Re[2]: DDC compiler and effects; better than Haskell? (was Re: [Haskell-cafe] unsafeDestructiveAssign?)

2009-08-12 Thread Bulat Ziganshin
Hello Pavel, Wednesday, August 12, 2009, 1:13:31 PM, you wrote: > Have monadic function but needs to call it from pure code? use > Control.Monad.Identity. by monadic function he probably meant ST or IO one, not polymorphic by any monad -- Best regards, Bulatmailto:

Re: [Haskell-cafe] RE: DDC compiler and effects;better than Haskell?

2009-08-12 Thread Peter Verswyvelen
Yes, but HaRe *is* extremely clever :-) I just wish I could use it, but since it doesn't support many GHC extensions, I haven't. On Wed, Aug 12, 2009 at 11:26 AM, Bayley, Alistair wrote: >> From: haskell-cafe-boun...@haskell.org >> [mailto:haskell-cafe-boun...@haskell.org] On Behalf Of Pavel Peri

Re: DDC compiler and effects; better than Haskell? (was Re: [Haskell-cafe] unsafeDestructiveAssign?)

2009-08-12 Thread Pavel Perikov
On 12.08.2009, at 13:27, Peter Verswyvelen wrote: Well, the point is that you still have monadic and pure programming styles. It's true that applicative style programming can help here, but then you have these <$> and <*> operators everywhere, which also feels like boilerplate code (as you ment

Re: DDC compiler and effects; better than Haskell? (was Re: [Haskell-cafe] unsafeDestructiveAssign?)

2009-08-12 Thread Peter Verswyvelen
Well, the point is that you still have monadic and pure programming styles. It's true that applicative style programming can help here, but then you have these <$> and <*> operators everywhere, which also feels like boilerplate code (as you mention, some extensions could help here) Monadic style e

[Haskell-cafe] RE: DDC compiler and effects;better than Haskell?

2009-08-12 Thread Bayley, Alistair
> From: haskell-cafe-boun...@haskell.org > [mailto:haskell-cafe-boun...@haskell.org] On Behalf Of Pavel Perikov > > > unless you have some insanely > > clever refactoring tool ready that can convert pure into monadic > > functions and vice versa. > > Not trying to attack the idea, just some thou

Re: DDC compiler and effects; better than Haskell? (was Re: [Haskell-cafe] unsafeDestructiveAssign?)

2009-08-12 Thread Pavel Perikov
unless you have some insanely clever refactoring tool ready that can convert pure into monadic functions and vice versa. Not trying to attack the idea, just some thoughts: I don't see much problem converting pure function into an "effectfull" form :) Having pure function myPureFunction::a1->

DDC compiler and effects; better than Haskell? (was Re: [Haskell-cafe] unsafeDestructiveAssign?)

2009-08-12 Thread Peter Verswyvelen
I knew about DDC for a while but never bothered to look at it deeply since it was so young, and at first sight it just did what ML did (silently allowing side effects). But when looking again at it, it seems it actually does some very clever things to allow side effects and still be safe, a bit wh