If anyone here has experience distributing software to Ubuntu via PPA / Launchpad, let me know. I’ve been working to get Planck set up for Ubuntu and there’s a lot of complexity to “get right.”
@tord: In theory, if you first do make bundle-and-build
on a regular computer, and then transfer the tree to a smaller computer (say, even without Java), you should be able to do a make clean
and make build
on that box with the result being that it will compile all of the C code natively for that platform.
In other words, there is a phase where it produces bundle.c
which involves the Java-based ClojureScript compiler. Once done, you can independently compile the resulting C anywhere in theory.
@tord One thing you’ll need to share with us is the time produced by time planck -e '(map inc [1 2 3])’
on that Raspberry Pi 🙂
This is on the fastest model, the Raspberry Pi 3. I can test on a Raspberry 2 as well, if that's of interest.
@tord Wow. About 4 seconds. You could compare the same on that Pi against Clojure with time java -jar ~/.m2/repository/org/clojure/clojure/1.8.0/clojure-1.8.0.jar -e '(map inc [1 2 3])’
@tord Not much slower… (typically you get around a factor of 2). Perhaps there is some bottleneck both share. (Loading stuff off the filesystem, or somesuch.) That’s interesting nonetheless. You’re the first to have tried Planck on a Raspberry Pi, AFAIK 🙂
That feels roughly like what happens with Replete on some slightly older iOS devices—it takes a few seconds before you can actually eval. I suppose with Planck on the Raspberry Pi, it launches and gives you a prompt, but then there is a race between how fast you can type the first form, and whether you will see blocking after hitting return.
Yes, that seems to be the case.
This makes me dream that there might be a lot of kids with inexpensive Raspberry Pi devices that could be given the binary you just built, and could actually learn some ClojureScript with it. 🙂
Yes, would be nice. It makes me much more tempted to try to find something useful to do with my Pi, too. So far, it has mostly just been collecting dust. :simple_smile:
6.7 seconds on the older Raspberry Pi 2, by the way.
Wow. Slow, but definitely usable.
Once it's started up, it seems quite fast.
Yes. The slowness is really the phase where it loads the ClojureScript runtime into JavaScriptCore. If there is a way to, say dump an image of the memory of the process after startup, and then launch that instead it might be instant. (I’ve never really tried to do that on OS X, but perhaps Linux has some support for things like that—I have no clue.)
Oops, it seems there is a problem:
I started typing a simple recursive factorial function at the REPL, and got this:
Works fine if I keep the input to a single line.
@tord I suspect that is a bug in the part that temporarily moves the cursor to show you opening parens, etc. If you do planck -d
it turns all of that off.
You are right.