Re: [Haskell-cafe] Re: Cleaner networking API - network-fancy

2009-08-14 Thread Taru Karttunen
Excerpts from Johan Tibell's message of Thu Aug 13 21:41:51 +0300 2009: My best advice would be to form an special interest group (SIG) and iron out the details. This doesn't have to be anything terribly formal. Just a bunch of people who are interested in improving things. The SIG could

Re: [Haskell-cafe] Improving event management in elerea

2009-08-14 Thread Patai Gergely
or event :: a - Signal Bool - (a - a) - SignalMonad (Signal a) event v0 b f = accumIf v0 f = return b ? That's not a good idea, because it doesn't take time into consideration, so you'd jump a huge amount in every frame. What I had in mind is something like this: ifte :: Signal Bool -

Re: [Haskell-cafe] Improving event management in elerea

2009-08-14 Thread jean legrand
so you'd jump a huge amount in every frame. What I had in can you explain, please ? I can't feel it when I play. something like this: ifte :: Signal Bool - Signal a - Signal a - Signal a ifte sc st sf = (\c t f - if c then t else f) $ sc * st * sf And then: playerX - integral

Re: [Haskell-cafe] Improving event management in elerea

2009-08-14 Thread Patai Gergely
can you explain, please ? I can't feel it when I play. Well, the paddle moves very fast that way, and its speed depends on the refresh rate. While the refresh rate is set in this program, it's not a good idea to depend on it in any way. Transfer functions provide access to the frame time, so you

[Haskell-cafe] Type family signatures

2009-08-14 Thread Thomas van Noort
Hello, I have a question regarding type family signatures. Consider the following type family: type family Fam a :: * Then I define a GADT that takes such a value and wraps it: data GADT :: * - * where GADT :: a - Fam a - GADT (Fam a) and an accompanying unwrapper: unwrap ::

Re: [Haskell-cafe] Type family signatures

2009-08-14 Thread David Menendez
On Fri, Aug 14, 2009 at 11:06 AM, Thomas van Noorttho...@cs.ru.nl wrote: Hello, I have a question regarding type family signatures. Consider the following type family:  type family Fam a :: * Then I define a GADT that takes such a value and wraps it:  data GADT :: * - * where    GADT ::

[Haskell-cafe] Edinburgh Meetup (Sat 29 Aug) and Hack Day (Sun 30 Aug)

2009-08-14 Thread Eric Kow
Dear Haskellers, Just a quick reminder that we will be having a Hack Day in Edinburgh on Sunday 30 August (ICFP venue). That's in two weeks! For the interested, we will also be meeting up the day before 09:30 Saturday 29 August just outside the RCPE (ie. the ICFP venue again). We'll have a

Re: [Haskell-cafe] Quickcheck for common typeclass laws

2009-08-14 Thread Henning Thielemann
On Sun, 9 Aug 2009, Jeremy Shaw wrote: This perhaps? http://hackage.haskell.org/package/checkers It seems dangerous to me to supply orphan instances in a package which is not obviously related to QuickCheck. I propose to get approval from the QuickCheck authors, that the instances can be

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

2009-08-14 Thread Henning Thielemann
On Thu, 13 Aug 2009, Heinrich Apfelmus wrote: Russell O'Connor wrote: 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

Re: [Haskell-cafe] Improving event management in elerea

2009-08-14 Thread jean legrand
to the frame time, so you can adjust the speed to be independent of it. ok, thanks integralClamped v0 vmin vmax s = transfer v0 accum s where accum dt v v0 = max vmin $ min vmax $ v0+v*realToFrac dt playerX - integralClamped playerX0 (-fieldW) (fieldW-playerW) (ifte

Re: [Haskell-cafe] Type family signatures

2009-08-14 Thread Dan Weston
But presumably he can use a data family instead of a type family to restore injectivity, at the cost of adding an extra wrapped bottom value and one more layer of value constructor? David Menendez wrote: On Fri, Aug 14, 2009 at 11:06 AM, Thomas van Noorttho...@cs.ru.nl wrote: Hello, I have

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

2009-08-14 Thread Patai Gergely
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 http://just-bottom.blogspot.com. Do you have an

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

2009-08-14 Thread John A. De Goes
Hmmm, my point (perhaps I wasn't clear), is that different effects have different commutability properties. In the case of a file system, you can commute two sequential reads from two different files. This has no effect on the result of the computation, assuming no interference from

Re: [Haskell-cafe] Type family signatures

2009-08-14 Thread Ryan Ingram
On Fri, Aug 14, 2009 at 12:03 PM, Dan Westonweston...@imageworks.com wrote: But presumably he can use a data family instead of a type family to restore injectivity, at the cost of adding an extra wrapped bottom value and one more layer of value constructor? Actually, you don't even necessarily

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

2009-08-14 Thread Jason Dagit
On Fri, Aug 14, 2009 at 1:41 PM, John A. De Goes j...@n-brain.net wrote: Hmmm, my point (perhaps I wasn't clear), is that different effects have different commutability properties. In the case of a file system, you can commute two sequential reads from two different files. This has no effect

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

2009-08-14 Thread Peter Verswyvelen
I think version is control is really just a subset of a larger effect theory. E.g. I've been experimenting with a parallel undo/redo system in C#, where some actions can commute and be undone separately, and for detecting this, the actions need to explicitly expose what they will change; so this

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

2009-08-14 Thread Dan Weston
My intuition says the proper formalism is that undo is left adjoint to redo. They together form a monad in the category of redoable actions. return lifts doable actions to undoable ones by attaching an empty undo stack. join lowers (reflects) a first-class undoable action out of the undo

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

2009-08-14 Thread Sebastian Sylvan
On Fri, Aug 14, 2009 at 9:41 PM, John A. De Goes j...@n-brain.net wrote: Hmmm, my point (perhaps I wasn't clear), is that different effects have different commutability properties. In the case of a file system, you can commute two sequential reads from two different files. But you can't! I

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

2009-08-14 Thread John A. De Goes
On Aug 14, 2009, at 8:21 PM, Sebastian Sylvan wrote: But you can't! I can easily envisage a scenario where there's a link between two pieces of data in two different files, where it's okay if the data in file A is newer (in a versioning sense, not a timestamp sense) than the corresponding

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

2009-08-14 Thread Sebastian Sylvan
On Sat, Aug 15, 2009 at 3:55 AM, John A. De Goes j...@n-brain.net wrote: On Aug 14, 2009, at 8:21 PM, Sebastian Sylvan wrote: But you can't! I can easily envisage a scenario where there's a link between two pieces of data in two different files, where it's okay if the data in file A is

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

2009-08-14 Thread Sebastian Sylvan
On Sat, Aug 15, 2009 at 3:55 AM, John A. De Goes j...@n-brain.net wrote: If you don't like the file system, consider mutable memory. An effect system will tell me I can safely update two pieces of non-overlapping, contiguous memory concurrently, even in different threads if the complexity so