from Hacker News

Racket-on-Chez Status

by ausimian on 2/21/20, 4:42 AM with 50 comments

  • by jnxx on 2/22/20, 10:57 AM

    What I wonder is whether the Chez base might massively improve Racket's concurrency capabilities.

    In Common Lisp, one has pthreads-like concurrency capabilities which seem very well suited for fine-grained parallelism as well as for server tasks. I am thinking in such things like parallel backtracking and optimization algorithms for robotic control or board games, for example.

    However, threads are notoriously difficult to handle cleanly and safely in larger programs. Here, Clojure (which in my eyes is a very Scheme-like Lisp) offers a very elegant solution with its concurrency primitives of Futures, Atoms, Agents, and STM. After some experimenting, I believe they are very, very attractive for many concurrent server tasks (like a web server), but not that well suited for computing-intensive parallel algorithms like the ones I mentioned above, which I am highly interested in. Part of the reasons are that such algorithms can become quite GC-heavy. Also, the Clojure compiler has limits on how much primitive types can be passed as parameters in one functions. This means that a complex backtracking algorithm in Clojure can still be two orders of magnitude slower than in C (which is somewhat disappointing, but one has to remember that Clojure was not designed for this).

    Racket has had, so far, only limited concurrency capabilities. It had Futures, however they could easily become blocked by GC. It also has Places, which are a very safe and clean solution of splitting parallel computations into separate processes. However, I think that places are not the first choice for heavily parallel algorithms with strong interdependencies.

    Now, Racket can run on top of Chez, and Chez has fine-grained concurrency capabilities on top of pthreads, which seem to be on par with Common Lisp. Also, Racket has strong support for functional and side-effect free programming, including some data structures. In my impression, this seems to open a wide range of new possibilities, including providing look-alike primitives for Clojure's Futures, Agents, and Atoms. I would be very interested to know more whether this impression is correct.

  • by xvilka on 2/21/20, 4:54 PM

    Will it work on top of GNU Guile[1] as well? It became very fast since 3.0 version with the introduction of JIT[2].

    [1] https://www.gnu.org/software/guile/

    [2] https://www.gnu.org/software/guile/news/gnu-guile-300-releas...

  • by danieldk on 2/21/20, 8:23 AM

    Question from someone who knows barely anything about the Scheme ecosystem:

    It seems that the one of the motivations for starting this effort, besides performance, was to move away from a C code base. Is Chez Scheme primarily written in Scheme?

  • by kamaal on 2/21/20, 7:18 AM

    Is there an update on what Racket decided to do with the proposal to deprecate the existing language syntax?

    Racket was a great tool to teach people lisp and initiate them into that paradigm.

    Is the main syntax still good for long term use?

  • by orsenthil on 2/21/20, 1:26 PM

    Why is it called "Chez" scheme?