Re: [Haskell-cafe] Real-time garbage collection for Haskell

2010-03-01 Thread Peter Verswyvelen
Sounds like we need to come up with some benchmarking programs so we can measure the GC latency and soft-realtimeness... PS: Regarding Haskell and games: the University of Utrecht teaches Haskell in their brand new "game technology" course :-) On Mon, Mar 1, 2010 at 1:04 AM, Luke Palmer wrote: >

Re: [Haskell-cafe] Re: Real-time garbage collection for Haskell

2010-03-04 Thread Peter Verswyvelen
A fully concurrent GC running on multiple threads/cores might be great, but I guess this is difficult to implement and introduces a lot of overhead. For simple video games, it might work to always do a full GC per frame, but don't allow it to take more than T milliseconds. In a sense the GC functi

[Haskell-cafe] Haskell platform for GHC 6.12.1?

2010-03-04 Thread Peter Verswyvelen
Using GHC 6.12.1 on Windows currently is hard, since one must compile the latest version of cabal-install, which is a nightmare to do for a typical windows user (install mingw, msys, utils like wget, download correct package from hackage, compile them in correct order, etc etc) What's the status o

Re: [Haskell-cafe] New OpenGL package: efficient way to convert datatypes?

2010-03-04 Thread Peter Verswyvelen
ression: Vertex2 (realToFrac x) (realToFrac y) In the definition of `glVertex2': glVertex2 x y = Vertex2 (realToFrac x) (realToFrac y) On Wed, Sep 30, 2009 at 4:06 PM, Peter Verswyvelen wrote: > I don't want to use the GL types directly since the OpenGL renderer is not > expos

Re: [Haskell-cafe] Haskell platform for GHC 6.12.1?

2010-03-05 Thread Peter Verswyvelen
Well the precompiled one provided on doesn't seem to work with GHC 6.12.1, you get an error. So yes, it would be nice to at least update the precompiled version on the website :-) On Thu, Mar 4, 2010 at 7:41 PM, Andrew Coppin wrote: > Peter Verswyvelen wrote: >> >> Using G

Re: [Haskell-cafe] Re: A few ideas about FRP and arbitrary access in time

2010-03-06 Thread Peter Verswyvelen
On Wed, Mar 3, 2010 at 8:45 PM, sinelaw wrote: > But isn't Lucid Synchrone essentially discrete-timed? Also, events Maybe reality itself can also be modeled using discrete timesteps? If so, then a discrete clock calculus might make a lot of sense. I don't know much about theoretical physics - I

Re: [Haskell-cafe] Re: A few ideas about FRP and arbitrary access in time

2010-03-07 Thread Peter Verswyvelen
On Sun, Mar 7, 2010 at 10:01 AM, sinelaw wrote: > I don't think a deep knowledge of physics is what we lack here, at > least for the question of continuous vs. discrete time. Maybe the best > physical model for nature really does involve discrete time steps. > However, for our everyday experiences

Re: [Haskell-cafe] Are there any female Haskellers?

2010-03-27 Thread Peter Verswyvelen
So the first computer nerd was a women??!!! ;-) ;-) ;-) On Sat, Mar 27, 2010 at 9:06 PM, John Van Enk wrote: > http://en.wikipedia.org/wiki/Grace_Hopper > A heck of a lady. > > On Sat, Mar 27, 2010 at 12:51 PM, Andrew Coppin > wrote: >> >> Ozgur Akgun wrote: >>> >>> Nevertheless, I guess you

Re: [Haskell-cafe] Re: FRP for game programming / artifical life simulation

2010-04-25 Thread Peter Verswyvelen
Actually, I believe that many Yampa examples do separate the drawing from the update... The arrow provides the game data that *can* be rendered. If you provide interpolators for that game data, you can still achieve the same as is explained in "fix your timesteps" (in my own FRP experiments I have

Re: [Haskell-cafe] Re: FRP for game programming / artifical life simulation

2010-04-26 Thread Peter Verswyvelen
2010/4/25 Patai Gergely : >> (in my own FRP experiments I have an update thread and a render thread). > I wonder how to nicely deal with state that requires communication with > the outer world, even though it is functional at heart. For instance, if > you want to change a vertex buffer or a textur

Re: [Haskell-cafe] Re: FRP for game programming / artifical life simulation

2010-04-28 Thread Peter Verswyvelen
Interesting topic. I find it a bit annoying that Haskell doesn't provide support to save functions. I understand this is problematic, but it would be very nice if the Haskell runtime provided a way to serialize (part of) the heap, making sure that pointers to compiled functions get resolved correct

Re: [Haskell-cafe] Re: FRP for game programming / artifical life simulation

2010-04-28 Thread Peter Verswyvelen
As a side note, it's interesting that C# doesn't allow serialization of closures (anonymous delegates). The compiler-generated name assigned to an anonymous delegate can be different after each re-compilation. This is also really annoying in C#/.NET, since one must explicitly add a named method if

Re: [Haskell-cafe] [reactive] A pong and integrate

2010-05-16 Thread Peter Verswyvelen
As far as I know, it was never possible to make a pong game in Reactive, at least not with the versions I tried, but I admit a lot of never versions got released since then. It would be great to see one though :) You might want to try Yampa, that works for sure (although you should mark all your o

Re: [Haskell-cafe] [reactive] A pong and integrate

2010-05-16 Thread Peter Verswyvelen
with Yampa... > > I did not look thoroughly at elerea, but at least, when I tried its sample > "dungeons of wor" it worked properly ;) > I will have a look... > > 2010/5/16 Peter Verswyvelen >> >> As far as I know, it was never possible to make a pong game

Re: [Haskell-cafe] [reactive] A pong and integrate

2010-05-23 Thread Peter Verswyvelen
IMO: For AAA game programming? Definitely not. For exploring new ways of doing game programming and having a lot of fun and frustration? Sure! For making casual games? I don't know. On Sun, May 23, 2010 at 9:09 PM, Ben Christy wrote: > I keep asking myself the question is Haskell and/or FRP even

Re: [Haskell-cafe] [reactive] A pong and integrate

2010-05-23 Thread Peter Verswyvelen
On Mon, May 24, 2010 at 12:30 AM, Jake McArthur wrote: > On 05/23/2010 02:17 PM, Peter Verswyvelen wrote: >> >> IMO: For AAA game programming? Definitely not. > > Why not? I suppose it may depend on your definition of "AAA," since there > doesn't seem to

Re: [Haskell-cafe] [reactive] A pong and integrate

2010-05-23 Thread Peter Verswyvelen
s far as I can > imagine in Haskell. > On Sun, May 23, 2010 at 6:30 PM, Jake McArthur > wrote: >> >> On 05/23/2010 02:17 PM, Peter Verswyvelen wrote: >>> >>> IMO: For AAA game programming? Definitely not. >> >> Why not? I suppose it may depend o

Re: [Haskell-cafe] [reactive] A pong and integrate

2010-05-24 Thread Peter Verswyvelen
> 2010/5/24 Patai Gergely >> >> > IMO: For AAA game programming? Definitely not. For exploring new ways >> > of doing game programming and having a lot of fun and frustration? >> > Sure! For making casual games? I don't know. >> Why not casual games? I don't see any immediate difficulty. Do you ha

Re: [Haskell-cafe] [reactive] A pong and integrate

2010-05-24 Thread Peter Verswyvelen
> Just to know, have you been told of a language dedicated to reactive > programming (even experimental)? I mean, not an embedded language just like > Yampa is. Maybe Lucid Synchrone (http://www.lri.fr/~pouzet/lucid-synchrone/) and Timber (http://www.timber-lang.org)? _

Re: [Haskell-cafe] [reactive] A pong and integrate

2010-05-24 Thread Peter Verswyvelen
Yeah. Funny that we're still writing games in C++, while mission critical and hard real time systems are written in much nicer languages :) I made something similar to Lucid Synchrone for a game company I used to work, but with the purpose of making reactive programming accessible to computer arti

Re: [Haskell-cafe] [reactive] A pong and integrate

2010-05-25 Thread Peter Verswyvelen
tick up with C#/C++ ? > > 2010/5/24 Peter Verswyvelen >> >> Yeah. Funny that we're still writing games in C++, while mission >> critical and hard real time systems are written in much nicer >> languages :) >> >> I made something similar to Lucid

Re: [Haskell] Re: [Haskell-cafe] Work on Video Games in Haskell

2010-05-28 Thread Peter Verswyvelen
It's interesting to see what will happen to Unity3D. This great casual game development tool offers support for exporting to iPhone. They are hit by Apple's new developer license - because they generate code - but apparently, apps generated by Unity3D do end up in the Apple store... Now.. Unity 3D

Re: [Haskell-cafe] ANN: Elerea, another FRP library

2009-04-16 Thread Peter Verswyvelen
Well, the documentation says: Use {-# NOINLINE foo #-} as a pragma on any function foo that calls unsafePerformIO. If the call is inlined, the I/O may be performed more than once. So you claim this does not prevent GHC to inline it anyway? That feels like a bug then, both in the documentation and

Re: [Haskell-cafe] ANN: Elerea, another FRP library

2009-04-16 Thread Peter Verswyvelen
got confused, mixing up several emails here. Mea culpa. On Thu, Apr 16, 2009 at 12:40 PM, Lennart Augustsson wrote: > With NOINLINE you should be safe, but you never mentioned that originally. > :) > > On Thu, Apr 16, 2009 at 10:29 AM, Peter Verswyvelen > wrote: > > Well, t

[Haskell-cafe] Using GHC as an arrows preprocessor?

2009-04-19 Thread Peter Verswyvelen
I'm making some custom arrows and I'm getting bugs when using the GHC preprocessor, but not when using the old standalone preprocessor. In order to debug this, it would be nice to use GHC as an arrows preprocessor (so converting the arrow notation into plain Haskell and outputting the converted sou

Re: [Haskell-cafe] Using GHC as an arrows preprocessor?

2009-04-19 Thread Peter Verswyvelen
On Sun, Apr 19, 2009 at 4:59 PM, Ross Paterson wrote: > On Sun, Apr 19, 2009 at 04:32:35PM +0200, Peter Verswyvelen wrote: > > I'm making some custom arrows and I'm getting bugs when using the GHC > > preprocessor, but not when using the old standalone preprocessor.

Re: [Haskell-cafe] Announce: A pragmatic Haskell .NET interop layer, 0.4.0

2009-04-19 Thread Peter Verswyvelen
Cool. Slightly annoying is that your interop is weak typed, and performance might suffer because it will be using .NET reflection all the time I guess. Do you know the Salsa binding for .NET? This aims to do strong typing. Maybe both efforts could be combined. On Sat, Apr 18, 2009 at 10:44 PM, Sigb

Re: [Haskell-cafe] General function to count list elements?

2009-04-19 Thread Peter Verswyvelen
Sometimes I do miss the pragmatic C solution:- two function pointers that are equal surely represent the same functions (although in C nothing is really sure ;) - two function pointers that are different, might or might not represent that same functions. But this weak equality can sometimes be han

Re: [Haskell-cafe] General function to count list elements?

2009-04-19 Thread Peter Verswyvelen
n, Apr 19, 2009 at 10:43 PM, Peter Verswyvelen > wrote: > > Sometimes I do miss the pragmatic C solution: > > - two function pointers that are equal surely represent the same > functions > > (although in C nothing is really sure ;) > > - two function pointers that are

[Haskell-cafe] Optimizing unamb by determining the "state" of a thunk?

2009-04-20 Thread Peter Verswyvelen
I was wandering if it would be possible to optimize unamb by checking if a value is already evaluated to head normal form. So f `unamb` g would then be extremely fast if either f or g is already evaluated

Re: [Haskell-cafe] Optimizing unamb by determining the "state" of a thunk?

2009-04-20 Thread Peter Verswyvelen
On Mon, Apr 20, 2009 at 10:23 AM, Thomas Davie wrote: > Really? Is it any less referentially transparent than unamb already is - > i.e. it's referentially transparent, as long as the two values really are > equal. > I think it is. Suppose we call the function hnf :: a -> Bool. hnf might return

Re: [Haskell-cafe] Optimizing unamb by determining the "state" of a thunk?

2009-04-20 Thread Peter Verswyvelen
Yes indeed. On Mon, Apr 20, 2009 at 3:42 PM, Jake McArthur wrote: > Sure, so hnf would give us a non-determined result, but I don't think that >> makes unamb any less referentially transparent – the same value is always >> returned, and always reduced at least to hnf. >> > > I think it is hnf tha

Re: [Haskell-cafe] Re: General function to count list elements?

2009-04-20 Thread Peter Verswyvelen
n wrote: > > > On Sun, Apr 19, 2009 at 10:43 PM, Peter Verswyvelen > > wrote: > > > For example, suppose you have a predicate a -> Bool, and a list of > > > these predicates [a -> Bool], but you want to remove all functions > > > that are obviously

Re: [Haskell-cafe] Optimizing unamb by determining the "state" of a thunk?

2009-04-20 Thread Peter Verswyvelen
f `unamb` g just needs f or g to be in weak head normal form I think. This should be much easier to test for I guess. I always confuse weak head normal form with reduced head normal form, but the documentation of GHC does not help here: E.g.: -- | Reduces its argument to weak head normal form.rw

Re: [Haskell-cafe] FRP, integration and differential equations.

2009-04-21 Thread Peter Verswyvelen
>> existed in synchronous languages [1], i.e., by using a special rec >> primitive. >> >> Disclaimer: I was the co-author of the leak paper [2]. >> >> [1] A co-iterative characterization of synchronous stream functions, P >> Caspi, M Pouzet. >> [2] Plugging a spac

Re: [Haskell-cafe] FRP, integration and differential equations.

2009-04-21 Thread Peter Verswyvelen
ck tracking, which is an interesting topic on its own. > But my question is, is FRP really the right setting in which to > explore a highly accurate ODE solver? > > > On 4/21/09, Peter Verswyvelen wrote: > > Well, the current FRP systems don't accurately solve this, since t

Re: [Haskell-cafe] FRP, integration and differential equations.

2009-04-21 Thread Peter Verswyvelen
BTW, a bit of topic, your recent work on causal commutative arrows and CCA compiler seems very promising. Any news on that? Seems that it could drastically speedup Yampa. On Tue, Apr 21, 2009 at 1:32 PM, Peter Verswyvelen wrote: > Hey thanks for the Adam-Bashford tip, didn't know that

Re: [Haskell-cafe] Comments from two weeks of using Leksah

2009-04-21 Thread Peter Verswyvelen
I've seen it on the Hackaton and was really impressed. Were you using it on Windows? I haven't tried it yet since I heard it has major problems on Windows. On Tue, Apr 21, 2009 at 5:06 PM, Jeff Heard wrote: > I've been using the latest and greatest version of leksah for the last > couple of weeks

[Haskell-cafe] GADT on the wiki: I'm lost

2009-04-22 Thread Peter Verswyvelen
I was reading the explanation of GADTs on the wiki , and but can't make any sense of the examples. Sure I understand what a GADT is, but I'm looking for practical examples, and the ones on the wiki seem to show what you *cannot* do with them... For exampl

[Haskell-cafe] WHNF versus HNF (was: Optimizing unamb by determining the "state" of a thunk?)

2009-04-22 Thread Peter Verswyvelen
I'm having difficulty to understand the difference between WHNF and HNF. Is this explanation the correct one? Or is WHNF and HNF equivalent in Haskell land? The GHC documentation of seq says: Evaluates its first argument to head n

Re: [Haskell-cafe] GADT on the wiki: I'm lost

2009-04-22 Thread Peter Verswyvelen
, Apr 22, 2009 at 3:30 PM, Peter Verswyvelen wrote: > >> I was reading the explanation of GADTs on the >> wiki<http://en.wikibooks.org/wiki/Haskell/GADT> , >> and but can't make any sense of the examples. >> Sure I understand what a GADT is, but I'm looking

Re: [Haskell-cafe] GADT on the wiki: I'm lost

2009-04-23 Thread Peter Verswyvelen
Thanks to everybody. Now I have enough articles to ruin my spare time again :) On Thu, Apr 23, 2009 at 4:20 PM, Martijn van Steenbergen < [email protected]> wrote: > Hoi Peter, > > Peter Verswyvelen wrote: > >> Sure I understand what a GADT is, but I'm l

Re: [Haskell-cafe] a question about *** Exception: stack overflow ..

2009-04-23 Thread Peter Verswyvelen
On Thu, Apr 23, 2009 at 9:06 PM, Luke Palmer wrote: > However, there is a function "sum" in the prelude, so you can do this much > more simply: > > sumit :: Int -> Int > sumit n = sum [1..n] > > :-) > Yeah, but this prelude sum function suffers from the same stack overflow thing (which is a desi

[Haskell-cafe] Arrow preprocessor and *** combinator

2009-04-29 Thread Peter Verswyvelen
After doing some pragmatic tests, it seems that neither the arrow preprocessor nor GHC's builtin one generate / optimize to the (***) combinator. For example, p = proc (x,y) -> do x' <- f <- x y' <- g <- y return (x',y') is equivalent to p = f *** g But I have the impression this kind of

Re: [Haskell-cafe] Arrow preprocessor and *** combinator

2009-04-30 Thread Peter Verswyvelen
Thanks Ross. Does anyone know how to tackle this? Combining GHC's builtin arrow processor and rewrite rules? On Wed, Apr 29, 2009 at 3:43 PM, Ross Paterson wrote: > On Wed, Apr 29, 2009 at 03:07:25PM +0200, Peter Verswyvelen wrote: > > After doing some pragmatic tests, it seems th

Re: [Haskell-cafe] Arrow preprocessor and *** combinator

2009-04-30 Thread Peter Verswyvelen
> > If you are serious about arrow optimizations, it might be worthwhile to > modify the original preprocessor to output a richer GADT (with cases for > things like ArrSwap) with all the information it knows, so that user code > can experiment with optimizations. > > Godspeed on this interesting pr

Re: [Haskell-cafe] ANN: Silkworm game

2009-05-02 Thread Peter Verswyvelen
Congratulations!!! It is actually a fun game to play too :-) On Sat, May 2, 2009 at 9:00 PM, Duane Johnson wrote: > Reprinted from my blog post [1]: > > === > > The semester is over, my final project was a success (at least in that I > passed the class) and it’s time now to release the game I made

Re: [Haskell-cafe] Decoupling OpenAL/ALUT packages from OpenGL

2009-05-02 Thread Peter Verswyvelen
I think splitting this up is a good thing, and at first sight I thought it was overkill to make 3 micro packages, but when thinking twice I believe it is indeed the way to go: - Having StateVar into its own module will hopefully promote its reuse by other imperative wrapper libs which currently all

[Haskell-cafe] Darcs as undo/redo system?

2009-05-08 Thread Peter Verswyvelen
If you work with a text editor like Microsoft Visual Studio (maybe also Eclipse, don't know), each text editor has its own undo/redo history. However, when you perform refactoring - like renaming a function - this becomes an undo/redo on multiple files together, so in a sense these changes are part

[Haskell-cafe] Hoogle: converting binary .hoo into text?

2009-05-10 Thread Peter Verswyvelen
I would like to use the Hoogle text format in C#. Hoogle on Hackage comes with a bunch of binary *.hoo files. Can these be converted to text/xml? If not, is the binary format documented? I know I can build hoo files using "cabal haddock --hoogle". But doing this on the BASE package (which I need)

Re: [Haskell-cafe] Hoogle: converting binary .hoo into text?

2009-05-12 Thread Peter Verswyvelen
On Mon, May 11, 2009 at 10:25 AM, Neil Mitchell wrote: > Hi Peter, > > > I would like to use the Hoogle text format in C#. > > Out of curiosity, why? I'm just interested to know what work you're doing. Sure. We're building with a graphical representation of a Haskellish language (a tiny subset o

Re: [Haskell-cafe] Developing 3 dimensional interactive environments/functional objects

2009-05-12 Thread Peter Verswyvelen
You might want to contact the author of RogueStar GL http://roguestar.downstairspeople.org/ On Tue, May 12, 2009 at 5:21 PM, Don Stewart wrote: > paulfrancis: > >Does any programmer on this mailing list have experience with > developing 3 > > dimensional interactive environments/functional

[Haskell-cafe] Haskell Platform 2009.2.0.1 and GLUT32.DLL on Windows: which version?

2009-07-06 Thread Peter Verswyvelen
I know GLUT32.DLL is not bundled with the Haskell Platform installer, but which GLUT32.DLL should I use? Every DLL I tried (even building FreeGLUT myself) gives the error: *"The procedure entry point glutAddMenuEntry cou

Re: [Haskell-cafe] Re: Haskell Platform 2009.2.0.1 and GLUT32.DLL on Windows: which version?

2009-07-06 Thread Peter Verswyvelen
Okay, thanks for this feedback. I tried [2] but that failed. Since it works on your system I'll double check again tomorrow, it must be picking an incorrect GLUT32.dll I guess On Mon, Jul 6, 2009 at 5:11 PM, Mikhail Glushenkov < [email protected]> wrote: > Hi Pe

[Haskell-cafe] Haskell Zippers on Wikibooks: teasing! :)

2009-07-15 Thread Peter Verswyvelen
After my colleague explained me about zippers and how one could derive the datatype using differential rules, I had to read about it. So I started reading http://en.wikibooks.org/wiki/Haskell/Zippers#Mechanical_Differentiation This page contains the sentence: *"For a systematic construction, we

Re: [Haskell-cafe] ANNOUNCE: The Haskell Platform 2009.2.0.2

2009-08-02 Thread Peter Verswyvelen
On Mon, Aug 3, 2009 at 1:41 AM, Don Stewart wrote: >* Improvements to crazy popular Windows installer Are you kidding or are indeed many Windows users playing with Haskell these days? Cheers, Peter ___ Haskell-Cafe mailing list Haskell-Cafe@haske

Re: [Haskell-cafe] funct.prog. vs logic prog., practical Haskell

2009-08-04 Thread Peter Verswyvelen
On Sun, Aug 2, 2009 at 12:25 PM, Petr Pudlak wrote: > I'd like to convince people at our university to pay more attention to > functional languages, especially Haskell. Their arguments were that > >(1) Functional programming is more academic than practical. >(2) They are using logic progr

[Haskell-cafe] GTK2HS OpenGL demo doesn't work on Vista when compiled?

2009-08-11 Thread Peter Verswyvelen
skell Platform 2009.2.0.1). Do other people using Windows experience this problem? Cheers, Peter Verswyvelen ___ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe

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

2009-08-12 Thread Peter Verswyvelen
have your cake and eat it here, so there must be catch? :-) Thanks for sharing any thoughts on this, Peter Verswyvelen ___ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe

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

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: [email protected] >> [mailto:[email protected]] On Behalf Of Pavel Peri

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: 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: [Haskell-cafe] Re: DDC compiler and effects; better than Haskell?

2009-08-13 Thread Peter Verswyvelen
ive a definite answer to this thread no? :-) On Thu, Aug 13, 2009 at 11:06 AM, 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 effe

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 al

[Haskell-cafe] qsort

2009-08-15 Thread Peter Verswyvelen
I might get confused by this. It is often claimed that compiler technology will make it possible to compile high level code into efficient low level code that is almost as efficient as the C or asm routines. How does this apply to qsort today? Cheers, Peter Verswyvelen _

Re: Re : [Haskell-cafe] Elerea/GLFW Tetris

2009-08-17 Thread Peter Verswyvelen
As a side-note, it might be interesting to use the Vec package on Hackage, since it seems to offer fast, unboxed linear algebra. On Mon, Aug 17, 2009 at 2:01 PM, jean legrand wrote: > As I've been warned, two dependencies (Common.Utils and Common.Vector) are > to be resolved in order to use this

Re: [Haskell-cafe] simulation in the haskell way

2009-08-18 Thread Peter Verswyvelen
You need to look into functional reactive programming, but be warned, this is active research :-) Two libraries I know of in which you can currently make working simulations are Yampa and Elerea. But the former doesn't scale really well, and the latter might not really be functional (I think it's n

Re: [Haskell-cafe] Re: simulation in the haskell way

2009-08-18 Thread Peter Verswyvelen
You could read: http://www.cs.nott.ac.uk/~nhn/FoPAD2007/Talks/nhn-FoPAD2007.pdf http://haskell.cs.yale.edu/yale/papers/haskell-workshop03/yampa-arcade.pdf http://www.cs.nott.ac.uk/~nhn/Talks/HW2002-FRPContinued.pdf http://www.haskell.org/yale/papers/haskellworkshop02/index.html http://www.haskell.o

Re: [Haskell-cafe] Re: simulation in the haskell way

2009-08-18 Thread Peter Verswyvelen
It is interesting to note that recent work on AFRP (arrow-based FRP) - namely "Causal Commutative Arrows" - optimizes a complete circuit of arrows ("interconnected objects" if you prefer to think that way) that all have local state and local feedback loops into one large state and feedback loop,

Re: [Haskell-cafe] Re: simulation in the haskell way

2009-08-19 Thread Peter Verswyvelen
I don't really agree that in Haskell when it comes to simulation a program "just is". That is the idealized story. At least when writing your own simulation engine, in practice you have to deal with operational details such as future unknown values that can block computations; to much laziness can

[Haskell-cafe] Where do I put the seq?

2009-08-19 Thread Peter Verswyvelen
code is at http://hpaste.org/fastcgi/hpaste.fcgi/view?id=8316 Oh btw, the usage of DList here might not be needed; intuitively it felt like the correct thing to do, but when it comes to Haskell, my intuition is usually wrong ;-) Thanks a lot, Peter Verswyvelen __

[Haskell-cafe] Re: Where do I put the seq?

2009-08-19 Thread Peter Verswyvelen
ow people often say this is not usable because the amount of information is too much, but I used to be an assembly language programmer so I still would like to give it a try :-) On Wed, Aug 19, 2009 at 1:07 PM, Peter Verswyvelen wrote: > In an attempt to get a deeper understanding of several m

Re: [Haskell-cafe] Re: Where do I put the seq?

2009-08-19 Thread Peter Verswyvelen
gt; > I'm trying to write some interactive code to automate working with serial > console controlled power strips, so I need to either use Expect (yuck) or do > my own thing. > > Dave > > On Wed, Aug 19, 2009 at 7:35 AM, Peter Verswyvelen wrote: > >> Apparently thi

Re: [Haskell-cafe] Re: Where do I put the seq?

2009-08-19 Thread Peter Verswyvelen
nerate the output. Okay, now I can sleep again :-) On Wed, Aug 19, 2009 at 5:12 PM, Peter Verswyvelen wrote: > Thanks, but that doesn't really matter in my example, my code is just > buggy, and I'm not sure why. For example if I change my test function so > that it outputs line

Re: [Haskell-cafe] Re: Where do I put the seq?

2009-08-19 Thread Peter Verswyvelen
score card work nicely. I kept running into issues, and > did not believe that seq was going to do the trick. Nice work! > This is a very useful monad I think, it could be called "Prompter" or > something to that effect. > > Do you mind if I use it in some of my code?

Re: [Haskell-cafe] Re: Where do I put the seq?

2009-08-19 Thread Peter Verswyvelen
;Goodbye!"* **test* Doesn't seem to work :-) Back to the drawing board. On Wed, Aug 19, 2009 at 5:55 PM, Peter Verswyvelen wrote: > Not at all, use it for whatever you want to :-) > I'm writing this code because I'm preparing to write a bunch of tutorials > on FRP, a

Re: [Haskell-cafe] Re: Where do I put the seq?

2009-08-19 Thread Peter Verswyvelen
2009 at 10:23 AM, Ryan Ingram wrote: >> >>> I posted a reply to your paste with a stricter version of S and some >>> cleanup. >>> >>> Untested, though I believe it should work without "seq". >>> >>> "case" provides all

Re: [Haskell-cafe] Re: Where do I put the seq?

2009-08-19 Thread Peter Verswyvelen
> I'll put up a short write-up after lunch. >> >> -- ryan >> >> On Wed, Aug 19, 2009 at 11:28 AM, Peter Verswyvelen >> wrote: >> > The cleaned up code didn't seem to work for me, it printed everything >> before >> > asking inp

Re: [Haskell-cafe] Re: Where do I put the seq?

2009-08-19 Thread Peter Verswyvelen
-your-own-Monad > 3. Data growth profiling. > > It's been a good read anyway, and fun to play with the code. > > Dave > > On Wed, Aug 19, 2009 at 1:00 PM, Peter Verswyvelen wrote: > >> Wow, very nice cleanup! That's really a good way for me to learn, thanks. >>

Re: [Haskell-cafe] Re: Where do I put the seq?

2009-08-20 Thread Peter Verswyvelen
g effect sometimes, since as a newbie (and it feels that I'm still a newbie after a year) it's hard to show code without looking like a fool. Luckily Haskell people are very friendly and helpful! On Thu, Aug 20, 2009 at 10:18 AM, Ryan Ingram wrote: > On Wed, Aug 19, 2009 at 1:

Re: [Haskell-cafe] Re: Where do I put the seq?

2009-08-20 Thread Peter Verswyvelen
t still become a valuable resource? On Thu, Aug 20, 2009 at 11:52 AM, Jules Bean wrote: > Peter Verswyvelen wrote: > >> Not at all, use it for whatever you want to :-) >> >> I'm writing this code because I'm preparing to write a bunch of tutorials >> on F

Re: [Haskell-cafe] Re: Where do I put the seq?

2009-08-20 Thread Peter Verswyvelen
It seems that with Ryan's approach, DList is not needed, simple concat works fine. It also seems to run in constant space. Now I must do the exercise of rewriting it to see why concat works, since >>= is infixl and ++ is infixr, this seems odd :) But again, my mind might be thinking too strict (bad

Re: [Haskell-cafe] Re: Where do I put the seq?

2009-08-20 Thread Peter Verswyvelen
gt; You should use data dependencies to control your program's semantics. > > On Thu, Aug 20, 2009 at 4:34 PM, David Leimbach wrote: > > > > > > On Thu, Aug 20, 2009 at 2:52 AM, Jules Bean > wrote: > >> > >> Peter Verswyvelen wrote: > >>&

Re: [Haskell-cafe] Re: Where do I put the seq?

2009-08-20 Thread Peter Verswyvelen
mitives. In any case, I would need strictness to control the dependencies no? I might be wrong (again) but this is all very interesting ;-) On Thu, Aug 20, 2009 at 10:25 PM, David Menendez wrote: > On Thu, Aug 20, 2009 at 3:43 PM, Peter Verswyvelen > wrote: > > > > Also doesn&#x

Re: [Haskell-cafe] Re: Where do I put the seq?

2009-08-20 Thread Peter Verswyvelen
On Thu, Aug 20, 2009 at 11:23 PM, David Menendez wrote: > The important things to note are (1) getChar# depends on the token > returned by putChar#, thus guaranteeing that putChar# gets executed > first, and (2) putChar# and getChar# are impure and cannot normally be > defined in Haskell. > Ok,

Re: [Haskell-cafe] Re: Where do I put the seq?

2009-08-21 Thread Peter Verswyvelen
On Fri, Aug 21, 2009 at 5:03 AM, David Menendez wrote: > On Thu, Aug 20, 2009 at 6:57 PM, Peter Verswyvelen > wrote: > > > > On Thu, Aug 20, 2009 at 11:23 PM, David Menendez > wrote: > >> > >> The important things to note are (1) getChar# depends on th

Re: Re[2]: [Haskell-cafe] Re: Where do I put the seq?

2009-08-21 Thread Peter Verswyvelen
o get IO right (such as the existential types to make sure different state threads are kept separate) On Fri, Aug 21, 2009 at 10:52 AM, Bayley, Alistair < [email protected]> wrote: > > From: [email protected] > > [mailto:[email protected]] O

Re: [Haskell-cafe] Re: Where do I put the seq?

2009-08-21 Thread Peter Verswyvelen
On Fri, Aug 21, 2009 at 6:53 PM, David Menendez wrote: > You would still need to determine whether you've reached EOF or not, > which forces the input to be determined up to the first line-break or > EOF. Good point! I actually had it on my TODO list, but that settles it then :) run :: MyIO

Re: [Haskell-cafe] Re: Where do I put the seq?

2009-08-21 Thread Peter Verswyvelen
ly synched, they are lazy, input is only read when evaluated; if you want to sync them, use a syncIO action ;-) no that's silly of course. Oh well, thanks for all the input, this was very informative for me hacker. On Fri, Aug 21, 2009 at 10:20 PM, David Menendez wrote: > On Fri, Au

Re: [Haskell-cafe] Re: Where do I put the seq?

2009-08-21 Thread Peter Verswyvelen
typo, "sees the input" => "must enter the input" On Fri, Aug 21, 2009 at 10:28 PM, Peter Verswyvelen wrote: > The question is, in this case when the user gets to see a bit too much of > the output before he sees the input, if that really qualifies as an > "

[Haskell-cafe] Help starting a Haskell blog

2009-08-22 Thread Peter Verswyvelen
cs on Hackage. Googling for "how to start a Haskell blog" just revealed a lot of Haskell blogs. Could you share your experiences with me about starting a blog? BTW: I'm on Windows. Thanks a lot, Peter Verswyvelen ___ Haskell-Cafe maili

Re: [Haskell-cafe] Help starting a Haskell blog

2009-08-22 Thread Peter Verswyvelen
ably. It would also be nice to allow hyperlinking every > > function in the code to the standard Haskell library docs or to the docs > on > > Hackage. > > Googling for "how to start a Haskell blog" just revealed a lot of Haskell > > blogs. > > Could

[Haskell-cafe] Strange console IO behavior (at least on Windows)

2009-08-22 Thread Peter Verswyvelen
The following program http://hpaste.org/fastcgi/hpaste.fcgi/view?id=8445#a8445 should echo the ASCII code of each character the user types, on the fly, with no line buffering whatsoever. But it doesn't. At least not under Windows's cmd, and even less with msys. Under Windows, I have to press ent

Re: [Haskell-cafe] Strange console IO behavior (at least on Windows)

2009-08-22 Thread Peter Verswyvelen
Okay, I'll file a bug report. Maybe someone else on Windows could confirm this behavior? On Sat, Aug 22, 2009 at 11:36 PM, Jason Dagit wrote: > On Sat, Aug 22, 2009 at 2:14 PM, Peter Verswyvelen > wrote: > > The following program > > http://hpaste.org/fastcgi/hpaste.

Re: [Haskell-cafe] Strange console IO behavior (at least on Windows)

2009-08-22 Thread Peter Verswyvelen
Yep, that seems to be it. I should first do a search on trac before spamming here! But my first reaction when something basic as this goes wrong is blame myself and ask for help :-) On Sat, Aug 22, 2009 at 11:40 PM, Judah Jacobson wrote: > On Sat, Aug 22, 2009 at 2:37 PM, Peter Verswyve

[Haskell-cafe] haddock: parse error in doc string

2009-08-25 Thread Peter Verswyvelen
I'm getting the error mentioned in the subject, but without any indication where in my file this error occurs. What does this mean? Thanks, Peter ___ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] haddock: parse error in doc string

2009-08-26 Thread Peter Verswyvelen
wrote: > On Tue, Aug 25, 2009 at 8:30 PM, Peter Verswyvelen > wrote: > > I'm getting the error mentioned in the subject, but without any > indication > > where in my file this error occurs. > > What does this mean? > > Thanks, > > Peter > > It means exa

[Haskell-cafe] Suggestion: define a standard keyboard codes library?

2009-08-26 Thread Peter Verswyvelen
Several libraries define their own codes for they keyboard (GLFW, GTK, GLUT, etc) Maybe it would be nice to agree on a standard datatype for keys? This might also include digital buttons on a joystick, etc... The Windows API has virtual key codes for this. _

Re: [Haskell-cafe] Suggestion: define a standard keyboard codes library?

2009-08-26 Thread Peter Verswyvelen
Gale wrote: > Peter Verswyvelen wrote: > > Several libraries define their own codes for they keyboard (GLFW, GTK, > GLUT, > > etc) > > Maybe it would be nice to agree on a standard datatype for keys? This > might > > also include digital buttons on a joystic

  1   2   3   4   5   6   7   >