ausimian
Schooner - An embeddable r7rs scheme
Schooner is a sandboxed Scheme interpreter you embed in an Elixir app (like Lua/Luerl but with more parentheses). It targets r7rs-small minus its mutable operations — no set!, set-car!, vector-set!, etc. — which keeps the value model immutable and friendly to BEAM idioms. The host hands a script source to Schooner.eval/2, gets back a tagged Elixir term, and resource-bounds the work with the standard process tools (:max_heap_size, Task.shutdown/2).
alias Schooner.Host
env =
Schooner.Environment.new(
libraries: [
Host.library(
primitives: [
{"shout", 1, fn [msg] ->
text = msg |> Host.to_string!(op: "shout") |> String.upcase()
Host.string(text <> "!")
end}
]
)
]
)
Schooner.eval(~s|(import (scheme base)) (shout (string-append "hello, " "world"))|, env)
# => {:ok, "HELLO, WORLD!"}
It implements most of r7rs-small, the deviations are listed in the documentation.
Most Liked
kip
As someone who grew up with Maclisp and John McCarthy I find this unreasonably exciting. And much more of a mental model that works for me than Lua. Thanks for making this happen - I’ll be sure to give it a spin on something. In fact I’ll just have to invent something so I can use it ![]()
I still think the Moonual is one of the best technical manuals ever written. It was my reference during many late night session on the System-M Multics system. Multics, Maclisp and Emacs were probably why I got hooked on computing.
Popular in Announcing
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








