News for hackers. Stuff that matters.
Re:Arthur Whitney's One-page Interpreter (1992) by avmich on Thursday October 30, 2014 @05:45PM (#8536011)
That's a rather normal situation - when your long is 32 bits long and the pointer is also 32 bits long, to satisfy a strict C compiler you just need a cast - which will be a no-op in machine code. This approach was used quite a bit...
Re:Arthur Whitney's One-page Interpreter (1992) by cplease on Thursday October 30, 2014 @05:50PM (#8536030)
Still segfaults with gcc -m32. There's some seriously nonportable, noncompliant type abuse going on in there.
Re:Arthur Whitney's One-page Interpreter (1992) by FullyFunctional on Thursday October 30, 2014 @08:12PM (#8536597)
Try 3+5. Worked for me. I think it's very rudimentary and doesn't handle very much.

I agree, I would very much like a ansified very that doesn't crash on unsupported features, but still in this style and in a single file.

Re:Arthur Whitney's One-page Interpreter (1992) by golemotron on Friday October 31, 2014 @03:02AM (#8537636)
3+5?
Re:Arthur Whitney's One-page Interpreter (1992) by FullyFunctional on Friday October 31, 2014 @12:04PM (#8539492)
My point was that very few things work and that was an example. Multi digit numbers will fail. Here's a few examples that doesn't segfault:

3+7

a=3+7

a,a,a

b=a,a,a

{b

b+9

p=2,3,5,7

2{p

{p

~8

<~8

#~8

4#3

c=b#2

c,c