[HN Gopher] Chez Scheme
       ___________________________________________________________________
        
       Chez Scheme
        
       Author : qsort
       Score  : 15 points
       Date   : 2022-08-25 21:10 UTC (1 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | jesushax wrote:
       | I learned about Chez when Racket started their rewrite from C to
       | Chez. Made me think why they don't just build Racket entirely in
       | its self!
        
         | qsort wrote:
         | I have fond memories of Racket, my intro to CS course used it.
         | I already knew how to program, but I was really only familiar
         | with C and it stumped me, in a good way.
         | 
         | Sadly I have never used Racket since. The kind of stuff I'd use
         | it for is well-covered by python.
         | 
         | > Made me think why they don't just build Racket entirely in
         | its self!
         | 
         | I'm not sure either, but I remember it might be because Chez
         | Scheme has a parallel garbage collector that they could reuse,
         | and being Lisps they could easily maintain backwards
         | compatibility.
        
           | bigdict wrote:
           | Go Huskies?
        
         | fspeech wrote:
         | Here is an interview talking about the move to ChezScheme
         | https://www.notamonadtutorial.com/rebuilding-the-racket-comp...
         | 
         | "Why did you choose Chez Scheme over other Schemes to rebuild
         | Racket?
         | 
         | The biggest weakness of the Racket BC ("before Chez")
         | implementation are its back-end compiler structure, its
         | inefficient internal calling conventions (over-adapted to C),
         | and its poor implementation of first-class continuations. Those
         | are exactly the strengths of Chez Scheme. Furthermore, Racket's
         | evaluation model was always closely aligned with Chez Scheme,
         | such as the emphasis on interactive evaluation and compilation.
         | 
         | It was clear up front that Chez Scheme lacked significant
         | features that Racket needs, such as support for continuation
         | marks and reachability-based memory accounting. However, the
         | high quality of the Chez Scheme design and implementation, in
         | contrast to old Racket's implementation, made adapting Chez
         | Scheme more appealing than retrofitting Racket's old
         | implementation further."
         | 
         | And much more.
        
         | dunham wrote:
         | There still is a bit of a runtime system that you'd write in
         | something like C - you'll see it in the "c" directory of the
         | linked chez repository. Chez is reportedly very fast, it's much
         | easier to use that than write your own from scratch.
         | 
         | I don't know the Racket situation (although I am using their
         | chez fork), but I know that the Idris language chose to move
         | from having their own C based runtime system to chez for the
         | Idris2 rewrite. The reasons that I've seen were that it was
         | much more performant than they could achieve on their own.
         | 
         | I suspect something similar is at play here. That the racket
         | team wanted to concentrate on what makes racket special and
         | leverage Chez for performance.
        
         | zelphirkalt wrote:
         | From what I have read, Chez is a quite performant
         | implementation (benchmarks https://ecraven.github.io/r7rs-
         | benchmarks/) and does a lot of things correctly (according to
         | spec) and cleanly. Basing Racket on Chez takes advantage of the
         | things Chez does well and probably saves a lot of time. I have
         | too little knowledge about Racket's internals, to give a better
         | and less general answer.
        
       | eatonphil wrote:
       | There are lots of cool papers Dybvig has published related to
       | Chez Scheme that are relevant for anyone building compilers.
       | 
       | A few I remember/can find:
       | 
       | * Destination Driven Code Generation:
       | https://legacy.cs.indiana.edu/~dyb/pubs/ddcg.pdf
       | 
       | * The Development of Chez Scheme:
       | https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.72...
       | 
       | And there's an awesome powerpoint/slides about the Chez Scheme
       | compilation techniques over time but I'm struggling to find it
       | right now.
       | 
       | Here's a pretty full list:
       | https://www.researchgate.net/scientific-contributions/R-Kent....
        
       ___________________________________________________________________
       (page generated 2022-08-25 23:00 UTC)