Guile Hoot 0.6.0 released!
Dave Thompson —![]()
We are excited to announce the release of Hoot 0.6.0! Hoot is a Scheme to WebAssembly compiler backend for Guile, as well as a general purpose WebAssembly toolchain. In other words, Scheme in the browser!
But first, a humble ask
If you like what Spritely is doing with Hoot or any of our other projects, please consider showing your appreciation with a donation! We recently hit our initial fundraising goal of $80,000 USD and announced a stretch goal. For the stretch goal, we will use Hoot to build a learning environment for Goblins and advance Hoot’s live hacking abilities in the process.
Monthly supporters at the silver, gold, and diamond tiers will have their names featured in the credits of Cirkoban, a small web game built with Hoot, as a display of our gratitude.
Okay, back to the show!
Highlights
-
Much improved weak hashtable support in
(hoot hashtables). Weak key hashtables have been reimplemented in Scheme rather than using JavaScript’sWeakMapand are now iterable, as they are in Guile. Weak key hashtables now have company: Weak value and doubly weak hashtables have been added. The Guile legacy hashtable API has likewise been updated to support all forms of weak hashtables. As a bonus, we also have weak vectors thanks to a contribution from Vivianne Langdon. -
Hoot now implements enough of Guile (or provides sufficient alternatives for APIs that are not web compatible) to compile nearly all of the Goblins source code. Stay tuned for another blog post about this progress!
-
As of December 9th, 2024, WebKit now ships with Wasm GC and tail calls enabled by default. These were the remaining blocker issues for running Hoot programs on Safari and other WebKit-derived browsers. Previously, Hoot couldn’t run on iOS because Safari is the only browser available on that platform. That said, we think there might be an issue with WebKit’s Wasm implementation. We’d like to gather more data so please let us know how things work for you on WebKit!
Try Hoot
Can I interest you in some eval?
Read on for the full release notes.
New features
-
Added
(hoot expander)module with a port of Guile’spsyntax. This was a major undertaking by Andy Wingo but we didn’t have time to hook it up toevalfor this release. Stay tuned! -
Added
(hoot finalization)module. -
Added
(hoot primitive-eval)module for evaluating macro-expanded, lowered Tree-IL. -
Added
(hoot environments)module. -
Added
(hoot modules)module. -
Added
(hoot weak-refs)module. -
Added
(ice-9 weak-vector)module. Thanks to Vivianne Langdon. -
Reimplemented weak key and added weak value and doubly weak hashtables to
(hoot hashtables). -
Added weak hashtable support to legacy Guile hashtable API.
-
Added initial implementation of applicable records, undocumented for the moment while we figure out what the public API should be.
-
File ports now track their line/column.
-
syntax->datumanddatum->syntaxnow work on the Wasm target. -
Added
read-syntax. -
Added
--user-importsflag toguild compile-wasmfor user code that defines Wasm function imports. -
Added support for syntax transformers on the Wasm target.
-
Added
vector-binary-searchto(hoot vectors). -
Added partial, temporary SRFI-14 implementation (character sets).
-
Added partial implementation of
inet-ptonto(guile). -
Switched
evalto use modules as representation of environments. -
Added partial implementation of
whileto(guile). -
Replaced
define-inlinablestub with real implementation. -
Added
string-rindex,string-trim,string-trim-both,string-trim-right, andstring-reverseto(guile). -
capture-stack,stack-height, andprint-backtraceare now exported from(hoot error-handling). -
Added
any,every1,every,filter-map, andfindto temporary SRFI-1 module (eventually you will just import the one from Guile). -
Added
&external-errorexception type. -
Added
constto(guile). -
Added
issue-deprecation-warningto(guile). -
Added
ceiling-quotient,ceiling-remainder,ceiling/,euclidean-quotient,euclidean-remainder,euclidean/procedures to(guile). -
Added
iotato(guile). -
Added
read-stringimplementation to(ice-9 rdelim). -
Trimmed default set of imports to compiler to just
(scheme base)to reduce compilation time. -
Added target-side
procedure-propertyscaffolding. -
Added
procedure-nameprocedure. -
Partially implement R7RS
exitprocedure (it exits but doesn’t deal withdynamic-winds in effect.) -
mapandfor-eachnow support more than two lists, at last. -
Added simple terminal REPL demo to the Git repository.
Bug fixes
-
Fixed auxilary modules not being added to
*all-instances*table when running Wasm in Hoot’s VM. -
Guile no longer terminates when a Hoot module calls its internal quit function.
-
(hoot ports)API is now usable at expansion time. -
Fixed
f32.copysignandf64.copysigninstructions in(wasm vm). -
Fixed
Fix define-exception-typewhen deriving exception types with fields. -
Fixed
cond-expandindefine-libraryforms. -
Fixed parsing of
br_on_castandbr_on_cast_failinstructions in(wasm parse). -
string-copyis now usable at expansion time. -
Improved hashtable size lower bound calculation to avoid some bad resizing behavior.
-
Fixed legacy Guile hashtable API to return the unspecified value for
hash-set!,hash-remove!, andhash-clear!. -
Fixed Wasm generated for
s64->f64primitive. -
Fixed unbounded exception raising loop when exception handler prompt is not on the current dynamic stack. This could occur when an exception handler is established before spawning a fiber, for example.
-
Fix compilation of
%inline-wasmthat returns 0 or 2+ values. -
String comparison procedures are now usable at expansion time.
-
Fixed memory leak in library group expansion.
-
Fixed stream I/O implementation on Hoot VM.
Browser compatibility
-
Compatible with Firefox 121 or later.
-
Compatible with Google Chrome 119 or later.
-
Compatible with Safari/WebKit 18.2 or later. Finally!
Get Hoot 0.6.0!
Hoot is already available in GNU Guix:
$ guix pull
$ guix install guile-next guile-hoot
(Hoot currently requires a bleeding-edge version of Guile, hence
guile-next above.)
Otherwise, Hoot can be built from source via our release tarball. See the Hoot homepage for a download link and GPG signature.
Documentation for Hoot 0.6.0, including build instructions, can be found here.
Hoot at FOSDEM
I (Dave) will be presenting “Minimalist web application deployment with Scheme” on Sunday, February 2nd in the Declarative and Minimalistic Computing devroom. Hoot will be a major focus of the presentation. This talk, like all FOSDEM talks, will be livestreamed and a recording will be available sometime after the conference.
For all the details about Spritely’s presence at FOSDEM, see our recent blog post.
Get in touch!
For bug reports, pull requests, or just to follow along with development, check out the Hoot project on Codeberg.
If you build something cool with Hoot, let us know on our community forum!
Thanks to Christine Lemmer-Webber for the lovely Hoot pixel art, and a special thanks to the MetaMask folks for funding this work!
Until next time, happy hooting! 🦉