Planck now supports Linux!
This capability owes its roots to Lucas Stadler who a started things off with a truly massive contribution which converted the bulk of the Objective C in Planck to portable C. With this effort, Lucas essentially got Planck running for the first time on Linux. Incredible!
With these changes, Planck is now fairly portable. It can compile with either Clang or GCC, and works properly on a range of Linux distributions. It has even been built and run on the Raspberry Pi!
It is able to target both 32-bit and 64-bit boxes. The 32-bit capability is interesting in that it could provide a way to put a fast, lightweight ClojureScript REPL on older lower-end computers. I could see this being useful for children's educational outreach organizations like LoudounCodes.
If you'd like to build Planck on your favorite Linux disto it can be as simple as running
script/build, but first check out the Building wiki page. It is essentially a cheat sheet with instructions for getting the build tooling and library dependencies set up on different distributions. Additionally, the Planck build tree has several Vagrant-based build environments that can be spun up to build Planck on different distributions.
Planck is still being distributed in binary form for macOS via Homebrew. For macOS it is still as simple as
brew install planck. My hope is that we can get Linux binaries set up for the native distribution mechanism for the various popular Linux distros.
Some of the new features in Planck 2 were covered in Planck Road Ahead.
Planck's implementation has always been split roughly in two, with ClojureScript handling most of the REPL logic, and the native side handling most of the interaction with the OS. The main difference with Planck 2 is that the native half is now in C.
Interestingly, we took advantage of this split: For a while, the ClojureScript portion of Planck was simultaneously used for both the Objective C and C native portions. Planck releases 1.15 through 1.17 were made with the Objective C code, while the C version worked but was still being fully fleshed out until we could confidently ditch the Objective C.
SIGUSR2—that issue and related forms took nearly half a year to finally resolve. As they say, persistence pays off.
Planck 2 is faster in some areas relative to 1.17. I think this is perhaps because we are able to use lower-level constructs directly in C, and this is also simply because we have optimized some things since 1.17.
Another issue that was nice resolved in Planck 2 is the ability to run shell scripts that produce lots of output. Try as we might, we never succeeded in getting this to work properly with the Objective C process API being used in 1.17. Now, Planck 2 uses
select and breezes though tons of output.
It has been a long road to ensuring the quality of Planck 2 relative to 1.17. It has had gone through several alphas, 6 betas, and 1 RC. (Planck has entered the mode where you definitely don't want to release breaking changes, if at all possible.) Thanks to all who tested these interim releases!
During that time Lumo came into existence and had two releases! I highly recommend making use of Lumo as well—it is cross-platform, fast, supports many of the same features with Planck, and sits atop V8 and Node—you can make use of NPM libraries with Lumo, something Planck cannot do.