Re: Regarding the implementations of PicoLisp

2014-05-11 Thread Christophe Gragnic
On Fri, May 9, 2014 at 7:59 PM, Rick Lyman wrote: > below are a few of the errors generated [compiling miniPicoLisp with > emscripten]: > > flow.c:41:62: warning: '&&' within '||' [-Wlogical-op-parentheses] >if (isNum(x = EVAL(x)) || isNil(x) || x == T || isCell(x) && > isNum(car(x))) >

Re: Regarding the implementations of PicoLisp

2014-05-11 Thread William Cushing
It seems that "any" is a typedef for a variable length array, which C compilers often refuse to support. Some C compilers are more permissive regarding variable length arrays; gcc, for example, is more permissive. Emscripten (or clang/llvm) is, apparently, not. The normal thing to do, when encoun

Re: Regarding the implementations of PicoLisp

2014-05-11 Thread Alexander Burger
Hi Will, thanks for you long explanation! On Fri, May 9, 2014 at 7:59 PM, Rick Lyman wrote: > flow.c:60:37: error: fields must have a constant size: 'variable length > array in > > structure' extension will never be supported > struct {any sym; any val;} bnd[length(x)]; On Sun,

Re: Regarding the implementations of PicoLisp

2014-05-11 Thread Alexander Burger
On Mon, May 12, 2014 at 08:06:57AM +0200, Alexander Burger wrote: > The problem with this is that is horribly inefficient. The dynamic version > >myStruct bnd[length(x)]; > > simply decrements the stack pointer by "length(x) * sizeof(myStruct)" > (which is a single machine instruction!), whil