On Sun, 12 Apr 2020 at 01:04, Guido Stepken <gstep...@gmail.com> wrote:
> Hello, all!
>
> It might sound a little bit weird, when i tell you, that recently 
> standardized Webassembly Containers in your browser are - Lisp machines.

Aside from the surface syntactic similarities due to the use of
s-expressions in the text format, I think the better
content-comparison of WebAssembly is to a register machine (hence
"assembly" in the name, but something closer to the LLVM IR - which
can be JITted or statically compiled - feels like a good comparison),
as opposed to lisp which is functional. I used to think of it as being
like other stack-machine languages like Forth (or even the JVM), and
the design rationale at https://webassembly.org/docs/rationale/ even
describes it as "a structured stack machine", but
http://troubles.md/posts/wasm-is-not-a-stack-machine/ explains why
this is not quite accurate. Also several Forths (like gforth) are
considered "stack-machine implementations" due to being a forth, but
they can use registers in addition to the typical 2-stack forth core,
so the stack/register boundary gets a little fuzzy there too. When I
first read about WebAssembly the thought that hit me was not that it
was like Picolisp but that it is very similar to the 64-bit assembly
written for and used at the core of the 64-bit Picolisp
implementation, except that - unlike WebAssembly's text format - there
parentheses are not used because as is stated at
https://picolisp.com/wiki/?src64 "Assembly language is not a
functional language, i.e. the individual instructions do not "return"
a value. So a fully parenthesized syntax is useless and just tedious."

By the way what I love most about Picolisp is that it feels like as
good a hybrid as you can get between the "typical functional
lisp/scheme" mental model and something that feels "forth-like" in
terms of minimalism/precision/close-to-the-metal von-neumann
architecture-friendliness. I describe it to friends as "as close as
you can get a lisp to forth while still being able to call it a lisp"
(I hope Alex doesn't hate that oversimplification too much, if he has
a better soundbite-way to capture the core of that sentiment I'd be
keen to hear it and would be happy to modify my soundbite). My two
favourite programming idioms are lisp and forth (rust comes third, and
part of its coolness is its comprehensive support for compiling to
webasm, which is why I started learning rust).

-- 
Rowan Thorpe
http://twitter.com/rowanthorpe
PGP fingerprint: 92FA 6C6F ABF2 C1B2 7E1C  7CCD 131F D7A9 542F 12F0

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to