Fork me on GitHub
#planck
<
2016-06-20
>
mfikes03:06:56

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.”

tord13:06:00

Just for fun, I tried to compile Planck 2.0 alpha on a Raspberry Pi. I never expected it to work. Compilation took forever, but amazingly, everything appears to work perfectly! Thanks, @mfikes and @hey_lu! 👍

mfikes13:06:59

@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.

mfikes13:06:00

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.

mfikes13:06:00

@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 🙂

tord13:06:46

This is on the fastest model, the Raspberry Pi 3. I can test on a Raspberry 2 as well, if that's of interest.

mfikes13:06:05

@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])’

mfikes13:06:06

@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 🙂

mfikes13:06:51

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.

tord13:06:02

Yes, that seems to be the case.

mfikes13:06:38

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. 🙂

tord14:06:24

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

tord14:06:50

6.7 seconds on the older Raspberry Pi 2, by the way.

mfikes14:06:36

Wow. Slow, but definitely usable.

tord14:06:54

Once it's started up, it seems quite fast.

mfikes14:06:25

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.)

tord14:06:54

Oops, it seems there is a problem:

tord14:06:17

I started typing a simple recursive factorial function at the REPL, and got this:

tord14:06:53

Works fine if I keep the input to a single line.

mfikes14:06:30

@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.

tord14:06:14

You are right.