apt-get install planck
Well, now you can do the same using
apt-get on Ubuntu!
Image composition: Caitlin Fikes
To do this, you first need to set up the
update, and you are good to go:
$ sudo add-apt-repository ppa:mfikes/planck $ sudo apt-get update $ sudo apt-get install planck
A contrasting approach would be to ship a single Linux binary that either statically links dependencies, or attempts to dynamically link, but in a portable way. This approach starts to break down if you want to support both 32-bit and 64-bit, or if you consider NixOS, which employs funky paths to dependencies.
Dynamic linking offers other advantages:
- No need to install deps if they are already installed. (Planck itself is only about 3 MB when installing via
- A shared library might already be loaded into RAM, reducing memory footprint and startup latency.
- A shared library can be updated independently for security fixes, bug fixes, or improved performance.
A consequnce, for ease-of-use, is you really want systems like
apt-get to take care of ensuring dependencies are installed. This is especially true since Planck also dynamically depends on other libraries like
libicu. (This is done uniformly on both macOS and Linux.)
Having Planck binaries available via
apt-get makes it a little easier to ensure things are set up properly via automated scripts when deploying into production environments. Here is a simplified toy example using Vagrant, with this
Vagrant.configure(2) do |config| config.vm.box = "ubuntu/xenial64" config.vm.provision "shell", inline: <<-SHELL sudo add-apt-repository -y ppa:mfikes/planck sudo apt-get update sudo apt-get install -y planck SHELL end
vagrant up results in an Ubuntu box with Planck installed and ready to use. Easy peasy!
The above is available with Planck 2.1.0, which has a few new features, a couple of which are highlighted here.
Hitting Ctrl-R in Planck 2.1.0 initiates a reverse search in the REPL history, just like the similar feature in Bash or
For example, let's say you had required
cljs.spec in a previous REPL session, and want to do the same in this one. Typing Ctrl-R and then
spec results in this:
Hitting Ctrl-R again will bring you farther back in the history.
I've already started to expect this feature, and end up thinking something is broken if I'm using an older version of Planck that doesn't have it.
ex-data is included in the
pst output, and is nicely formatted using Fipp!