acha.ninja

Memory Safeish Hare

Since the Hare programming language became public, it has been subject to some passionate criticism regarding a perceived lack of memory safety. I agree that memory safety concerns are very valid as shown by clear evidence, so the question becomes: should we write Hare off because someone online said it’s not strictly memory safe? I think that Hare can mitigate many of these problems today, while still being a small, simple and coherent language. Read more...

The Bupstash Garbage Collector

Overview My backup tool bupstash stores backups in a repository as an evergrowing set of encrypted data trees which use content addressing and structural sharing to deduplicate data. In order to delete unused backups we need to do something very similar to how many programming languages free unreferenced memory - garbage collection. This post will explain the evolution and implementation of the garbage collector in bupstash for the curious. Stop, mark and sweep. Read more...

Encrypted Backup Shootout

Recently I have been spending time on improving the performance of bupstash (my encrypted backup tool), and wanted to compare it to some existing tools to try and find its relative performance in the backup tool landscape. This post compares bupstash, restic, borg backup and plain old tar + gzip + GPG across a series of simple benchmarks. What do all these tools have in common? They encrypt data at rest. Read more...

Introducing Bupstash

You know backups right? Those things you never got around to setting up… well no need to feel guilty any longer, today I’m excited to share my new backup tool - Bupstash! So why is bupstash cool? Bupstash lets you make encrypted, deduplicated and secure backups. Bupstash is fast, focused, and places strong emphasis on both security and privacy. Backups can happen to local drives or over ssh. Bupstash can backup files, directories, and even arbitrary command output. Read more...

Removing Rust Dependency Bloat

One aspect that always bothered me with rust projects are the seemingly huge number of depdencies that get built whenever you do a fresh build. This post is just a log of what I did to lower compile times of my open source encrypted backup tool bupstash and reduce my dependency burden. First, lets get a starting point on dependencies and compile times. The full dependency tree: $ cargo tree bupstash v0. Read more...

Introducing hermes

This post is the first public announcement of my new package manager and deployment tool for linux - hermes. Hermes provides features like: Atomic deployments. Atomic rollback. Remote builds. Sandboxed and reproducible builds. Avoidance of version conflicts. Avoidance of centralized infrastructure. Build everything from source. Shared caching to avoid excessive rebuilds. Those familiar with Nix or Guix will feel right at home, or you could think of hermes a bit like docker, where instead of building images in layers, you are building software packages from source into directories that can reference each other. Read more...

DSL for shell scripting

You need to go through quite a lot of ceremony in most programming languages to run a sub command. This post covers my design of a domain specific language to solve this problem for Janet. First, let’s set compare simple tasks you might perform during a typical script with some existing languages and tools. Run a command or abort. Shell: set -e git clone $url Python: subprocess.check_call(["git", "clone", url]) Go: Read more...

JSON in Janet Shell

In this post I will demonstrate how we can load native Janet extensions at runtime to add powerful new functionality to your janet programs (In this case Janet Shell). For this demo, we will be installing a native JSON extension and loading it into a running shell session so we can do JSON manipulation from the terminal. Installing the JSON extension The first step is to choose where to install our extensions and add it to our janet module path. Read more...

Road to Janet Shell 0.1

Having a big mouth is at times one of my character flaws, so a while ago I made a few resolutions: If I say I will do something, I should always follow through. If I get the urge to complain about something, I should work on a solution. Not long after I couldn’t help myself while talking to a friend: “I want a new system shell that is small, fast, good for scripting, and also supports things like closures, exceptions, first class functions, a module system , a …” Read more...

Powerful scripting with janetsh

In this post we will write a Janetsh script that will do some parsing and scraping of command line output. Janetsh itself is my new shell and scripting tool based on the Janet programming language. The task we are trying to solve is connect to a remote git repository, list all the remote version tags that are also semantic version numbers and print the tags as useful json values. Writing the script First we setup a shebang so our script can be run directly, and import the sh module so we can call some functions we need. Read more...
1 of 2 Next Page