[Felix-language] merge and save stderr/stdin?

2014-03-02 Thread john skaller
I can't get this to work: ~/felix>FLX_DEBUG_DRIVER=1 ./networking_01 2>tmp.tmp NETWORKING_01: MAINLINE: flx tcp stream test NETWORKING_01: MAINLINE 01: Got port: 49580 NETWORKING_01: MAINLINE 02: listener created on socket 11 NETWORKING_01: MAINLINE 03: spawning server NETWORKING_01: SERVER 01:

Re: [Felix-language] binding eager vs lazy [ was [felix] spawn_fthread new semantics ]

2014-03-02 Thread john skaller
On 02/03/2014, at 4:45 PM, srean wrote: > On Sat, Mar 1, 2014 at 11:19 PM, john skaller > wrote: > > On 02/03/2014, at 2:08 PM, srean wrote: > > > It is this _uncertainty_ that makes it difficult, for me at least. > > Then use fthreads and channels. > > Yes, but that feels too cumbersome,

[Felix-language] FIXED: breakage + new features

2014-03-02 Thread john skaller
On 02/03/2014, at 7:56 AM, john skaller wrote: > ok so the breaking in the networking test is because of the > changed semantics. Actually, a deadlock occurred in the async scheduler, trying to block and pull ALL the pending requests of the ready queue .. unfortunately one of those fthreads had

[Felix-language] The evil stack

2014-03-02 Thread john skaller
Now a refresher. Why can't you do sych I/O or async I/O in a function? I mean reading from an schannel or socket naturally IS a function (even if writing isn't). Or at least a generator! The reason again: these operations block fthreads. To do that, the fthread has yield, and a pointer to it put

[Felix-language] embedding demo

2014-03-02 Thread john skaller
If you're interested in embedding, here is the start of my test program. Requires SDL2, freetype, OpenGL and other game like stuff, so we can make it fairly realistic. If you can get this running, as well as Felix, you're in good shape to play with embedding features. Next step is to integrate F

Re: [Felix-language] binding eager vs lazy [ was [felix] spawn_fthread new semantics ]

2014-03-02 Thread john skaller
On 03/03/2014, at 8:58 AM, srean wrote: > > some code snippets please. You have partly answered this. Are there other > less verbose ways ? Post valid Felix program snippet that compiles but does not have the expected semantics. > Could you confirm if declaring formal parameters with var or

Re: [Felix-language] binding eager vs lazy [ was [felix] spawn_fthread new semantics ]

2014-03-02 Thread john skaller
On 03/03/2014, at 9:15 AM, srean wrote: > Recall, we as users cannot debug Felix code, Of course you can. Try eprintln$ "Debugging print here"; that's what I use in ALL programming systems, Felix, Python, C++, you name it. In combination with reading the code. -- john skaller skal..

Re: [Felix-language] binding eager vs lazy [ was [felix] spawn_fthread new semantics ]

2014-03-02 Thread john skaller
On 03/03/2014, at 12:45 PM, srean wrote: > > For instance closures behave like lexical closures sometimes. The problem is > that _sometimes_ No they behave like lexical closures all the time because that's what they are. When you use a var, it is supposed to force immediate evaluation. Whethe