
A site for Picolisp, a very true Lisp - duncanj
http://www.picolisp.org/
======
Hexstream
I'm highly skeptical.

An interpreter-only implementation that performs better than compiled
implementations?... Oh, but wait, it says it's better than "some" compiled
implementations, so I guess if it beats "some" shitty compiled implementations
that's true... How does it compare to, say, SBCL?

As for the "As a consequence [of being interpreter-only], Pico Lisp is the
most dynamic Lisp in existence today." part, I don't really see what notable
advantages an interpreter-only implementation would have over a _proper_
compiler-implementation in flexibility, given that it's Lisp we're talking
about. Unless you wanted to muck with the deep internals or something... Also,
I'm in the process of making my homebrewed web framework _more_ flexible by
making use of _more_ compilation, thus making it _less_ of an interpreter.

~~~
coffeemug
This could make sense. In a sufficiently complex language, a single "VM"
instruction translates to many native instructions. If you compile a program
in such a language into native code, the size of the code explodes, resulting
in really poor cache utilization. A tight interpreter on a modern processor
(heavy cache fault penalties + branch prediction) can very well perform better
than a natively compiled program. Performance is a very tough problem,
unfortunately it's very difficult to find a "superior" solution - it just
depends on far too many variables.

~~~
camccann
If memory serves me, there are also cases where information available at run-
time can allow better optimizations than could normally be done at compile-
time--I think the JVM has some tricks along those lines for JITing bytecode
into native instructions, but I suppose the same principle could apply
elsewhere.

~~~
legooolas
Nothing stopping you doing these kinds of optimizations on Lisp code again at
runtime when you have the extra info. Just automatically recompile if you know
it will save you enough time to be worth it (which is a more difficult
problem, of course...)

------
justinhj
Regarding the quote below... I don't get it. Cells are a linked list spread
randomly throughout your address space. Processors don't love that at all.

"A cell is a cell in the same way it was with the original Lisp, consisting on
a head and the rest, that is, a CAR part (which may be either a number, a
symbol, or a pointer to another cell), and a CDR part (also a number, symbol
or cell). As a consequence, it is incredibly memory efficient, and there is
little to none memory fragmentation. Processors cache "loves" our
interpreter."

~~~
pmjordan
Let's just say I wouldn't use the spread of allocations across address space
as a PRNG. Depends on your allocator of course, but you should normally see
some fairly linear patterns. The allocator can be very simple if all (or
almost all) allocations are the same size, so you can easily optimise for
cache efficiency.

I suspect the cache angle they're playing up refers to memory footprint of
each cell. I don't know how big their cells are, they could be anything from 2
machine words up. Integers are supposedly directly represented, and if they've
embedded their GC liveness info into spare bits (or stored it elsewhere
entirely) then that makes it extremely compact and thus cache friendly.

------
zach
Gee, what a great interpreter to embed in a program... that's GPLed. Nice
option for that niche, I suppose.

~~~
omouse
There are lots of GPL programs around, not really a "niche" anymore ;)

~~~
Dobbs
You missed his statement about it being embedded into other programs. You see
when you embedded a gpl scripting language into a larger program the entire
program becomes gpl. This makes it a very bad embeddable program.

~~~
narag
IIRC, there is another license (guile, maybe?) that's identical to GPL except
it doesn't affect the outer program.

~~~
justinhj
MIT license is far less restrictive.

~~~
narag
Of course, but if you want to go with the GPL, you can use exceptions and
protect just the part you want.

------
diiq
Picolisp was a major inspiration for me to start writing my own lisp --- I
love the idea of removing lambda in favor of quote. I was constantly
frustrated by the dynamic binding, though, and the lack of idiomatic macros
--- I guess you can't have everything you want unless you do it yourself.

~~~
aaronblohowiak
eight looks really cool!!

------
omouse
Uh, a small warning, some of the functions in picolisp are a bit "buggy" or at
least I wouldn't use them:
[http://stackoverflow.com/questions/1630352/picolisp-
language...](http://stackoverflow.com/questions/1630352/picolisp-language-
onoff-question/1652986#1652986)

~~~
nrr
Hey, it's a Lisp that allows something akin to [false become: true] in
Smalltalk. That's awesome.

------
pwpwp
For some values of true.

While PicoLisp is certainly interesting, the bulk of Lisp and Scheme (and
Dylan) implementations since the early 1980's have gone into a different
direction.

For me, true Lisps are languages like T, EuLisp, Dylan, Goo and CL of course
(their kernels are mostly equivalent, and can be compiled to run well on
existing (virtual) machines.)

~~~
duncanj
I call it "true" mainly because it faithfully represents the code/data
unification in lisp. In picolisp, there is no lambda, because the
representation of a function is a list, and can be quoted directly.

------
s3graham
I have a copy of an great-but-ancient book called "Functional Programming:
Application and Implementation" (Peter Henderson, edited by CAR Hoare).

If you're interested in this implementation, you'll find that book very
interesting, and quite similar I think (based on reading the link).

(The book has a now-amusing appendix too where it lists the "object" code for
the compiler in sexp-syntax, presuming that you'd have no other way to
bootstrap other than typing that in :)

------
duncanj
Also check out the author's site for picolisp: <http://www.software-
lab.de/down.html>

------
jimbokun
"Pilog -- PicoLisp Prolog"

I see it obeys the law that every Lisp implementation must have an
implementation of Prolog embedded in it.

------
rman666
No (non-Cygwin) Windows binary :-(

~~~
rbanffy
I call it a feature.

Cygwin is the first thing I install on a Windows desktop. At least it makes it
look like a civilized environment.

~~~
mahmud
Mingw makes Windows civilized AND non-slow.

~~~
rbanffy
MinGW is a compiler set. Cygwin gives me a full Unix-like environment on top
of Windows. It's not an apples to apples comparison.

~~~
mikeytown2
Look into CoLinux, I like it a lot more then Cygwin.
<http://en.wikipedia.org/wiki/Cooperative_Linux>

