Live data from Hacker News

Pixie – A small, fast, native Lisp

pixielang.org

51–60 of 164 posts

Re: Pixie – A small, fast, native Lisp

#52
post #38

What's the state of development of this? Did somebody use it with Raspberry pi? I want to use this over Clojure(only on pi) because I have read Clojure is slow on Raspberry pi(even 3, not sure how true that is). Also, how fast is this? How does it compare to other lisps(or schemes) in terms of speed? Can someone port the benchmarks to https://benchmarksgame.alioth.debian.org .

I run some very simple Clojure [1] on an RPi 2 as part of a home monitoring system. Startup is considerably longer than on other platforms (30 sec or so), but I haven't had any issues with runtime performance, and having a Lisp running on what is essentially an embedded platform is very useful. (It'd be easy to make the argument that my agent code doesn't do much, but it doesn't diminish the fact that Clojure is able…

That is good to hear. Ordered my pi!

Re: Pixie – A small, fast, native Lisp

#54
post #27

> And it's small. Currently the interpreter, JIT, GC, and stdlib clock in at about 10.3MB once compiled down to an executable. Oh how the definition of "small" has changed. I actually would like to know how they managed to make something like this so big . To compare, LuaJIT is about 400 KB, and that includes the Lua standard library, a JIT almost certainly more advanced than Pixie's current one, an incremental GC, a…

To compare, LuaJIT is about 400 KB, and that includes the Lua standard library, a JIT almost certainly more advanced than Pixie's current one, an incremental GC, and a C FFI. Back in the day, Smalltalk was criticized as bloated because one ended up with stripped binary+image of about 2MB. Someone around that time got SqueakVM+image down to just under 400k. There were specialized Smalltalks in company R&D that got the…

Don't forget, even 2 MB was still a somewhat inconvenient size when floppy disks were only at 1.44 MB capacity.

Re: Pixie – A small, fast, native Lisp

#55
post #36

Interestingly, this is (some of) the output of running the makefile: https://sr.ht/zMyE.png

The RPython translator generates views of the Mandelbrot set by default, presumably to give you something to look at during the long wait.

That's pretty cool.

I kinda wish the likes of NPM would output cool skeletons and heavy-metal vampire chicks while I wait ten minutes for it to install stuff.

Re: Pixie – A small, fast, native Lisp

#56

I find it very hard to work with a mixture of brackets and parentheses. Does anyone else prefer an all-parentheses syntax for reading and typing?

Well, in most cases `[]` is used just like you'd use a quoted list `'()`. Clojure vectors are nice for the performance they give.

Having maps with `{}` syntax is also nice if you ask me. Makes reading a little bit faster.

Re: Pixie – A small, fast, native Lisp

#57
post #25
post #21

Earlier quoted context omitted.

Such as?

A big one is persistent data structures. Where 'persistent' may not mean what you think it means. In Clojure it is impossible to surgically modify a data structure. That is, you can't do something like: (SETF (CAR (CDR x)) 'foo) which would alter a data structure. You can modify a data structure, but it returns a new data structure, yet the old one remains if it is not GC'able. All of the common data structures have…

It should be noted that you can even if you in 99.9% of cases don't want to mutate state.

For the few times when you want to squeeze the last drop of performance, you can use transients[0].

[0] https://clojure.org/reference/transients

Re: Pixie – A small, fast, native Lisp

#58
In my experience, whether code like summing integers takes 6 instructions or 600 doesn't influence the speed of 95% of code and 95% of systems.

If you could magically port real Python or ruby or JavaScript code to pixie, but keep the same algorithms and architecture, I doubt it would change much.

Slowness is more influenced by things like data structure layout, allocation patterns, serial vs parallel I/O, context switches, and just plain not understanding your code once it reaches a certain size.

There seems to be a fetish for JIT compilation in a lot of new language designs and it confuses me. Julia is probably the language making the best and most appropriate use of it. It actually has good data structures and types which complement it.

Re: Pixie – A small, fast, native Lisp

#59
post #27

> And it's small. Currently the interpreter, JIT, GC, and stdlib clock in at about 10.3MB once compiled down to an executable. Oh how the definition of "small" has changed. I actually would like to know how they managed to make something like this so big . To compare, LuaJIT is about 400 KB, and that includes the Lua standard library, a JIT almost certainly more advanced than Pixie's current one, an incremental GC, a…

Well, for comparison "Hello World" in Common Lisp, using SBCL on x64 Linux creates a ~70 Mb binary, but nobody would ever claim it's small :-)

Unfortunately, for an arbitrary CL program it's impossible to tell for sure how much of the CL compiler and standard library it will need at run time, so SBCL takes the easy route and just includes everything. Some of the commercial Lisp compilers are a lot smarter at stripping things out and and can create significantly smaller executables.

I usually avoid the issue altogether by not building binaries and running most things from the REPL or using a "#!/usr/bin/lisp --script" shebang line.

Re: Pixie – A small, fast, native Lisp

#60
post #35

I find it very hard to work with a mixture of brackets and parentheses. Does anyone else prefer an all-parentheses syntax for reading and typing?

I don't mind either syntax, but what's essential is an editor that highlights balancing parens, etc.

Hence why I love Emacs: http://melpa.milkbox.net/#/hl-anything
Post reply on HN