A small scheme VM, compiler, and REPL in 4k

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • ribbit

    A small and portable Scheme implementation with AOT and incremental compilers that fits in 4K. It supports closures, tail calls, first-class continuations and a REPL.

  • Paper is acm-walled but code repo is https://github.com/udem-dlteam/ribbit . I would like to have seen Hedgehog Lisp in the comparison chart, since it has actually been used for practical projects. Its VM is around 20k of code. 4k is impressively tiny, but any machine where 4k vs 20k makes a big difference is unlikely to have enough ram to run garbage collected applications. That seems to call more something more like Forth rather than Scheme.

    Hedgehog is a somewhat weird functional dialect of Lisp and I've been wanting for a while to convert it to a Scheme subset (mostly just using Scheme syntax instead of defun, etc) so people would be more familiar with it.

  • gambit

    Gambit is an efficient implementation of the Scheme programming language.

  • The Ribbit compiler was developed using Gambit but most of the code is portable. I rewrote a few parts with cond-expand to port rsc.scm to older versions of Gambit and also Guile and Chicken. If you pull the latest commit the Ribbit system should work with any of those Scheme systems. The README also contains usage instructions, here is a relevant part:

    The Ribbit compiler is written in Scheme and can be executed with Gambit, Guile or Chicken. It has been tested with Gambit v4.7.5 and above. For the best experience install Gambit from https://github.com/gambit/gambit .

    Currently Ribbit supports the target languages C, JavaScript, Python and Scheme which are selectable with the compiler's `-t` option with `c`, `js`, `py`, and `scm` respectively. The compacted RVM code can be obtained with the target `none` which is the default.

    The `-m` option causes a minification of the generated program. This requires a recent version of Gambit.

    The `-l` option allows selecting the Scheme runtime library (located in the `lib` subdirectory). The `min` library has the fewest procedures and a REPL that supports the core Scheme forms only. The `max` library has most of the R4RS predefined procedures, except for file I/O. The `max-tc` library is like `max` but with run time type checking. The default is the `max-tc` library.

    Here are a few examples:

        Use Gambit to compile the minimal REPL to JavaScript

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • hedgehog

    Concise implementation of a lisp-like language for low-end and embedded devices

  • The rib encoding looks very clever. I need to digest the full implications of that.

    > 4KB is impressively tiny, but any machine where 4k vs 20k makes a big difference is unlikely to have enough ram to run garbage collected applications.

    Yeah, the paper itself says that the heap was 240K. A 4K system isn't very helpful if your heap is 240K.

    I'd like to see how this runs (if at all) with a 4K heap.

    > I would like to have seen Hedgehog Lisp ( https://github.com/sbp/hedgehog ) in the comparison chart, since it has actually been used for practical projects

    Links to projects?

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • The File Filesystem

    7 projects | news.ycombinator.com | 30 Apr 2024
  • ESpeak-ng: speech synthesizer with more than one hundred languages and accents

    1 project | news.ycombinator.com | 1 May 2024
  • Ubuntu 24.04 LTS is so buggy you can't install the OS [video]

    1 project | news.ycombinator.com | 1 May 2024
  • Semi-Scripted Conversational Applications

    1 project | dev.to | 1 May 2024
  • Dune 3D 1.1.0 Released

    2 projects | news.ycombinator.com | 1 May 2024