Gambit vs Chez vs Guile scheme. Me dunno Gerbil is a system on top of Gambit approximately similar to racket

Gambit compiling to javascript

old gist discussion

You need to compile the javascript runtime special

make _gambit.js # This command finally build the needed Gambit Javascript runtime
LD_LIBRARY_PATH=..: ../gsc/gsc -:~~bin=../bin,~~lib=../lib,~~include=../include -f -target js  -prelude "(define-cond-expand-feature|enable-type-checking|)(define-cond-expand-feature|disable-auto-forcing|)(define-cond-expand-feature|enable-sharp-dot|)(define-cond-expand-feature|enable-bignum|)(define-cond-expand-feature|enable-ratnum|)(define-cond-expand-feature|enable-cpxnum|)(define-cond-expand-feature|disable-smp|)(##include\"../lib/header.scm\")" -o _gambit.js ../lib/_univlib.scm
cp _gambit.js /c/tools/gambit-c/lib/_gambit.js # This command publish the Javascript runtime to the installed Gambit-C.

Hmm. make_gambit does this stuff?

This final concatenation step is bizarre. Hmm wasn’t necessayr on minimal example in gitter above

% cat test.scm
(println "hello!")
% gsc/gsc -:=. -target js -exe test.scm
% ./test

contrib/try repl gambit in the browwser experiment using emscripten. Different from using universal backend

Papers on writing virtual machines for scheme? 3 implementation models

scheme bibliography

State of Scheme to Javascript The Ribbit pathway seems interesting. Or maybe rather the Gambit pathway scheme interp in browser

“Let’s Build a Hygienic Macro Expander” by Matthew Flatt Macro scope. So de bruijn indices are a way of dealing with some of the troubles of binding forms. But here I think he’s saying that de bruijn indices are the wrong abstraction.

Scope sets Syntax objects are paired with scope sets. type syntax = Sexp.t * Int.Set.t

syntax_of_datum : Sexp.t -> syntax =

HUh that was an interesting trick. Use ref () and physical equality for gensym. Binding as Sets of Scopes Notes on a new model of macro expansion for Racket lips - a scheme in javascript interesting blog post cross stage persistence. How does one serialize a function? why a lisp 2 i guess common lisp essay composable and compileable macros - you want in whe?

Lisp-2 - seperate namespace for functions and vasriables -Common lisp Condition system lisp class system

Rosette - should be a confluence of my interests. I feel like I want some kind of macro engine for smtlib. Perhaps it makes intermiedtae queries, perhaps not. stage0 would be “just” a macro expander for smtlib.

Oleg of course.

  • Has an implementation of shift reset delimitted contianutations

Macro examples:

  • Making a pattern matcher might be kind of interesting exercise.
  • making your own short circuiting “or” or other non call by value constructs. In some sense this is defining a new interpreter back into scheme?
  • making your own binding forms or introducing variables into the environment - an intorudcition to scheme and it’s impllementation teach yourself scheme in fixnum days

In particular the extneded examples section is kind of interesting

The scheme objects technique. Let bindings are mutable. Isn’t that nuts. Let’s you do all kinds of shenanigans that you could do in ocaml with refs, but would be unlikely to.

let make_counter () = let state = mk_ref 0 in fun () -> let state := !state + 1 in !state

amb is genuinely surprising. It isn’t even that it’s a macro. Its callcc that makes it possible call/cc for break statements.

continuations call/cc let’s you pretend you were writing in CPS the whole time.

  • call/cc for break statements
  • call/cc for coroutines
  • search
  • amb let over lambda. Let in common lisp makes a ref cell? history of PL. interesting discussion of hygienic macros at the least - hygienic macros


What is the deal. incremental compilter construction

Hmm a scheme in the broser biwacheme chicken -> C -> wasm gambit has a backend racket has ab ackend

Like right clojurescript. But that’s clojure