September 12th, 2024

Ribbit: A portable, compact and extensible R4RS Scheme implementation

Ribbit is a compact, 7KB Scheme implementation supporting 16 host languages for code compilation. Currently under development, it allows new primitive definitions and offers related research papers in its repository.

Read original articleLink Icon
Ribbit: A portable, compact and extensible R4RS Scheme implementation

Ribbit is a portable and extensible Scheme implementation that adheres to the R4RS standard, designed to be compact, running at approximately 7KB due to its removal of unused code and specialized compression techniques. It is compatible with 16 different host languages, including JavaScript, Assembly (x86), C, Python, POSIX Shell, and Prolog, allowing users to compile Scheme code into these languages. Ribbit is currently under development, with plans for enhancements by the end of 2024, and encourages user contributions and bug reports. The implementation allows for the definition of new primitives that can interact with the supported host languages. The repository also provides links to research papers that discuss Ribbit's development and features, showcasing its capabilities across various programming languages, each with unique functionalities regarding core features, variadics, I/O, and compliance with R4RS.

- Ribbit is a compact Scheme implementation, approximately 7KB in size.

- It supports 16 host languages, enabling versatile code compilation.

- The project is under active development with enhancements expected by late 2024.

- Users can define new primitives for interaction with host languages.

- Research papers related to Ribbit's development are available in the repository.

Link Icon 3 comments
By @syvon - 4 months
Hi!

One of the original author of Ribbit here, glad to see it is still getting attention. Léonard and Marc took the project much further than I imagined.

As a fun fact, the project started as a riff of Justine Tunney's famous https://justine.lol/sectorlisp/.

For the interested, my new favorite project from Marc's team is https://github.com/udem-dlteam/pnut

By @leonardool - 4 months
Hey ! One of the authors of Ribbit (https://github.com/leo-ard).

I'm really happy to see that the project is getting some attention! We made a lot of progress since the last post on HN (https://news.ycombinator.com/item?id=31096771). We are now fully R4RS compliant, support 16 different target languages with a sort of FFI with all of them.

We are currently working on flonum/bignum support and a guide for adding your own RVM (new host) so that you can run scheme in your favourite language. It should be coming soon!

I'll stay up to answer any questions about Ribbit!

By @koolala - 4 months
Could Scheme ever run on a GPU? I've seen a GPU REPL made with APL. I'm not sure what graphics primitive could map to linked lists but it would mean John McCarthy's AI on modern AI hardware.