# planck

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

mfikes 06:36: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.”

tord 16:40: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! :+1:

mfikes 16:44: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.

mfikes 16:46: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.

mfikes 16:47: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 :slightly_smiling_face:

tord 16:49:10

@tord uploaded a file: Untitled

tord 16:49: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.

mfikes 16:53: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])’

tord 16:54:11

@tord uploaded a file: Untitled

mfikes 16:56: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 :slightly_smiling_face:

mfikes 16:57: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.

tord 16:59:02

Yes, that seems to be the case.

mfikes 16:59: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. :slightly_smiling_face:

tord 17:00: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:

tord 17:00:50

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

mfikes 17:01:36

Wow. Slow, but definitely usable.

tord 17:01:54

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

mfikes 17:03: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.)

tord 17:03:54

Oops, it seems there is a problem:

tord 17:04:17

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

tord 17:04:51

@tord uploaded a file: Untitled

tord 17:05:53

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

mfikes 17: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.

tord 17:07:14

You are right.