awwx.ws

the Hackinator

Download, apply, and run hacks to Arc... all in one step.

Introduction

My goal is to make it as easy to pick and choose which patches to Arc you want applied as it is, in most programming languages, to choose which libraries you want to use.

I collectively call patches, libraries, and tarballs “hacks”, as in “I’m using the arc3.1, ac1, and extend0 hacks”.

Dependencies aren’t handled automatically yet because I’m still thinking about the right way to do dependencies. Which means that currently you have to list every hack you want to use and all of their dependencies. Which is a pain. So this is a work in progress.

The input to the hackinator is a list of hacks. By default, each run of the hackinator creates a new, separate Arc directory, so that each run is independent. (You can also use the hackinator more like an installer by specifying a destination directory). The hacks are downloaded if needed, the tar files such as arc are unpacked, the libraries installed, and the patches applied. Finally, unless the --norun option is given, Arc is run. Thus to run Arc, instead of:

$ cd arc3.1
$ mzscheme -f as.scm

you can say:

$ hack ycombinator.com/arc/arc3.1.tar

which will run an unadulterated copy of Arc 3.1. Or include some patches and libraries:

$ hack \
   ycombinator.com/arc/arc3.1.tar \
   awwx.ws/exit-on-eof2.patch \
   awwx.ws/erp0.arc

Supported Operating Systems

In Linux and Mac OSX, you should be able to download and run the hackinator without anything else needing to be installed.

The hackinator hasn’t been ported to Windows.

Get

$ wget http://awwx.ws/hack

make it executable:

$ chmod +x hack

test it:

$ ./hack
hackinator version 4

Usage:
...
$

(if you get an error message, please email me andrew.wilcox [at] gmail.com and copy and paste the output that you see. Ideally the hackinator should “just work” for everyone... emailing me with your error output will make that possible!)

Configure

$ hack config mzscheme /usr/bin/mzscheme
$ hack config mzversion 4

Configuration variables are stored in the ~/.hackinator/config file, and may be set and displayed through hack:

$ hack config

displays the current configuration settings.

$ hack config <variable> <value>

sets a configuration variable. For example: hack config mzscheme ~/plt-4.1.5/bin/mzscheme

$ hack config <variable>

unsets the variable, so that the default will be used.

Run

$ hack \
   ycombinator.com/arc/arc3.1.tar \
   awwx.ws/exit-on-eof2.patch \
   awwx.ws/erp0.arc
/tmp/RmrD3taXYd
ycombinator.com/arc/arc3.1.tar
awwx.ws/exit-on-eof2.patch
awwx.ws/erp0.arc
mzscheme -f as.scm
Use (quit) to quit, (tl) to return here after an interrupt.
arc> (erp (+ 1 2))
(+ 1 2): 3
3
arc> ^D
$

How it works

Specifying hacks

Hacks can be found on the net (“http://awwx.ws/erp0.arc”) or located on the local filesystem (“./my.hack”).

If a hack name starts with “.”, “/”, or “~”, the hackinator will treat the name as a file path on the local filesystem.

A hack name starting with “scheme://” is used as a URL to download the hack from.

“http://” is the default, so that “awwx.ws/erp0.arc” works like “http://awwx.ws/erp0.arc”.

Hack list files

Files with the .hack extension contain a list of hacks, which are downloaded and applied in the same way as if they had been listed on the command line. For example,

$ cat my.hack
ycombinator.com/arc/arc3.1.tar
awwx.ws/exit-on-eof2.patch
awwx.ws/erp0.arc
$ hack ./my.hack
/tmp/RmrD3taXYd
ycombinator.com/arc/arc3.1.tar
awwx.ws/exit-on-eof2.patch
awwx.ws/erp0.arc
mzscheme -f as.scm
Use (quit) to quit, (tl) to return here after an interrupt.
arc>

Within the hack list file, plain file names that don’t contain a / are resolved to the same location as the hack list file. For example, http://awwx.ws/ac0.hack contains:

ac0.patch
ac0.arc

These are then loaded from http://awwx.ws/ac0.patch and http://awwx.ws/ac0.arc.

Options

Publishing your own hacks

You can publish your own hacks through any service that lets you upload files to a location where they can be downloaded from a URL.

Note that for the hackinator to work correctly, you shouldn’t change a file once you’ve published it at a particular URL. If you’ve changed or updated your hack, publish the new version at a different URL. This can be as simple as incrementing a version number for each revision you publish: “foo0.arc”, “foo1.arc”, etc., or using a different directory path for each version: “v0/foo.arc”, “v1/foo.arc”.

Your own website

If you have your own website, just put your hacks on your website.

github

If you like git and are using github.com, once you’ve tagged your release, your released file will be found at a URL like this:

http://github.com/username/repo/raw/tag/path/file

To find the URL in github, go to your repository, click on the “Source” tab, click on the “all tags” menu, and select your tag. Then navigate to the file you want to publish, and click on “raw”. That will be the URL to use.

Google Code

You can host your files at Google Code Project Hosting, though you’ll have to fill in a description for your “project” to get your own file upload area.

unLicense

The hackinator is in the public domain.

Contact me

Twitter: awwx
Email: andrew.wilcox [at] gmail.com