News for hackers. Stuff that matters.
Re:Chicken Scheme by cryptonector on Friday March 15, 2013 @05:52PM (#5383258)
Any time you have closures you have threading issues. Think: if two threads call the same closure concurrently, how do they synchronize access to closed variables?

I don't know if Chicken Scheme allows multiple distinct instances of the run-time in one process -that would be very cool, and if anyone knows please do tell here-, but it can't safely support multi-threading any more than any standard Scheme can.

To get what you want in a Lisp you need to apply either Erlang concepts (threads with distinct global namespaces, exchanging serialized data via messaging) or Clojure concepts (immutable state + COW techniques + special top-level, mutable variables with synchronization for all mutable state; but I repeat myself, since that's roughly what COW implies).

Re:Chicken Scheme by rayiner on Friday March 15, 2013 @06:26PM (#5383370)
> Any time you have closures you have threading issues. Think: if two threads call the same closure concurrently, how do they synchronize access to closed variables?

> To get what you want in a Lisp

Several Common Lisp implementations expose pthreads-style shared memory threads (SBCL, ECL, Clozure, Allegro, etc). It works just fine. The problem of synchronizing access to the closed-over variables in a closure is precisely the same as the problem of synchronizing access to instance variables of a class, and has the same solution: use a mutex.

Re:Chicken Scheme by coldtea on Saturday March 16, 2013 @05:18AM (#5384935)
>Think: if two threads call the same closure concurrently, how do they synchronize access to closed variables?

Same way you do it in C/C++/Java etc with their threads? Not really a unique to closures problem.

>(To get what you want in a Lisp you need to apply either Erlang concepts (...) or Clojure concepts

Or this fancy CSP thing? (Is it similar to Erlang? I don't know Erlang).