An R7RS Method applied in WebAssembly
Featured Content Ads
add advertising hereA partial implementation of r7rs plot, written
entirely in WebAssembly utilizing the WebAssembly Textual state layout. The handiest external
imports are for IO (learn
, write
, and readFile
), unicode (I in actuality be pleased an
import that reads data about 256 code-point blocks to enable case
operations and a lot of others.), and path of alter (exit
).
It is seemingly you’ll per chance per chance are trying it out at pollrobots.com/plot/plot.wasm.html — apologies for the massive download. I would prefer to fix
bundling.
How Total Is It?
The plot is to write a spec full model of r7rs
, although I would possibly per chance skip
a number of of the non-compulsory functions.
What is performed to this point
- Numerics
- Integers (arbitrary precision)
- Genuine numbers (double precision)
- Rationals
- Advanced Numbers
- Booleans
- Strings
- Characters
- Pairs and Lists
- Vectors
- Bytevectors
- Values
- Tail call optimization — internally
eval
uses a continuation passing
vogue, so TCO comes with out cost. -
call/cc
and exceptions - Macros
-
elaborate-syntax
,syntax-principles
,syntax-error
- Hygienic over
let
,let*
,letrec
,letrec*
, andlambda
-
elaborate-let
,elaborate-letrec
-
- Modules
- Ports
-
dynamic-wind
- All the pieces else
Credit ranking
The set up lifelike every part has been applied from scratch, nevertheless there
are locations the set up it both wasn’t lifelike, or the set up I tried and failed
to place into effect them myself, so credit is this skill that of:
Featured Content Ads
add advertising here- xxHash:
Or no longer it’s potentially overkill, nevertheless the hashing algorithm venerable for hashtables,
that are in flip venerable for environments and interning symbols, is xxHash
translated from the C++ implementation at
github.com/Cyan4973/xxHash - string->staunch:
Strings are converted to explicit numbers utilizing Algorithm M from
” Learn Floating Level Numbers Precisely”,
William D Clinger 1990. Which is with ease expressed in plot in the usual
paper - staunch->string:
Genuine numbers are converted to strings utilizing Grisu 2 by
Florian Loitsch.
This became translated from C++ figured out at github.com/romange/Grisu
Moreover inspiration came from a few locations
- Lispy: Peter Norvig’s artible
( Write a (Yelp) Interpreter (in Python))
became a excessive source of inspiration. - EPLAiP: Nearly a decade previously a buddy gave
me a copy of
Exploring Programming Language Architecture in Perl
by Bill Hails. With out a doubt price finding out no subject
your language of assorted (I have not written PERL this millenium).