On Mon, May 12, 2014 at 5:40 AM, Christophe Gragnic <
christophegrag...@gmail.com> wrote:

> I'm interested by a clang compatible version, just to see what
> emscripten will make of it.
> For the sake of the experience I'm gonna try anyway.


I'm also interested in a emscripten compiled minPicoLisp. I've been itching
to try out emscripten and I think having miniPicoLisp available on all
platforms without building could help PicoLisp adoption.

I was able to compile miniPicoLisp on windows under clang. I basically just
replaced all instances of variable array initialization, such as:

struct {any sym; any val;} bnd[length(x = car(expr))+3];


struct {any sym; any val;} bnd[100];

It builds and runs. I don't see any obvious consequences yet. I would have
assumed something like this would fail:

(setq Z (make (for N 120 (link N))))

I don't have emscripten geared up on this machine to try to compiling with
it. I figure it's not that far off though as a proof of concept.

Alex, is there a reasonably safe upper bounds that can be used instead of
it being determined dynamically?

1. replace the variable length array with a fixed-size array if you can
determine a reasonable upper bound at compile time; sometimes this is as
simple as changing int size = ...; to const int size = ...; (if the
initializer is a compile-time constant);

I can envision a neat tool that lets us share snippets and even run code
directly from rosettacode.

GNU APL.js supports pasting code to it's emscripten compiled version of

Reply via email to