On Sat, 2007-03-31 at 20:24 -0400, Chris King wrote: > On 3/31/07, Erick Tryzelaar <[EMAIL PROTECTED]> wrote: > > Got plans for porting that functional-reactive gui to felix when you've > > finished it for ocaml? > > :) I've actually thought about it... sometimes I wish I was doing it > in Felix, to make binding to Gtk easier! Perhaps I will give it a > shot, if things come out looking good on the O'Caml side; for the most > part it should be a straight-up translation.
It's not clear this is a good idea OR that it will work, though perhaps I miss something. Reactive programming with callbacks is exactly the mess Felix is designed to eliminate -- Felix threads are event driven, but you can write modular code using thread style and channels. However making this work with integrated GUI systems like Gtk isn't so easy because both systems want to run their own event loops. Although you can create callbacks in Felix, you don't want to because they can't communicate with channels. And you don't want functional code for the same reason. In particular, you can't call the garbage collector unless the machine stack is empty, because it has no way to trace the machine stack. There is a solution: map gtk onto a socket, and use two pthreads. But there is another solution: use a properly designed Gui such as X or MS-Windows, not a system that tries to own the event loop. Gtk may provide a way to construct your own event loop, but I'm not sure. Tcl/TK used to allow even loop merging. I actually looked in Gtk but I couldn't see one. If you can figure a way of doing it, let me know! -- John Skaller <skaller at users dot sf dot net> Felix, successor to C++: http://felix.sf.net ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language