Paul’s been working a new language called Arc for a long time, claiming it will be a powerful variant of Lisp suitable for web applications – this surely has nothing to do with one of his companies, Reddit, rewriting their app in Python when they found Lisp didn’t have scalable HTTP libraries. After running his news site on Arc for a long time as a sort of soak test, he’s finally released an alpha version.
Since it’s always a good idea to try new languages (and I have a personal web-application itch to scratch), I thought I’d try Arc on my long commute. But since Paul runs Unix and I run Windows, I had a few challenges. To help others who might want to try it, here’s what I did to run Arc on Windows, including steps to execute a simple web application from within it.
(N.B.: Some steps, particularly Cygwin and copying the
[mzscheme]\collects folder, might not be necessary – I didn’t test for a minimal installation method.)
1. Visit http://download.plt-scheme.org/mzscheme/. Click [other versions] and get version 352.
2. Run the installer. By default, it will install MzScheme in
C:\Program Files\MzScheme, but put it anywhere you like. We’ll refer to the installation folder as
4. In the output, look for the line
setup-plt: C:\[some-directories]\Application Data\PLT Scheme\352\collects
This folder didn’t exist for me; I created it and copied
[mzscheme]\collects\* to it.
1. Visit http://www.cygwin.com/ and follow instructions to install Cygwin. By default, it will install in
C:\Cygwin; we’ll call the install directory
1. Visit http://www.openssl.org/related/binaries.html and follow instructions to install OpenSSL. By default, it’s installed in
C:\OpenSSL; we’ll call the install directory
[mzscheme];[openssl]\bin;[cygwin]\bin to your Windows PATH environment variable. (Click [Start], then right-click My Computer and click Properties, then click Advanced, then click Environment Variables, then choose Path and click [Edit]. We love Bill!)
2. To verify this worked, type these commands in a DOS prompt – you should get sensible output from each:
1. Create arc directory in a convenient place, hereafter
2. Visit http://ycombinator.com/arc/arc0.tar and save the file in
3. Untar the file (use 7Zip if you don’t already have it). You now have a folder
4. Create folders
5. Create batch file
@echo off mzscheme.exe -m -d as.scm
(defop hello req (pr "hello world")), then
4. Visit http://localhost:8080/hello. You should get an exciting web page. (Strangely, it always seems to hang on first visit for me. But subsequent visits work fine.)
5. Type Ctrl-C to stop the server, then double-click
[arc0]\arc.bat again. (There may be a cleaner way to halt an Arc webserver, but I haven’t found it yet.)
(load "blog.arc"), then
7. Visit http://localhost:8080/blog to start using the blog.
Thanks to these posts from which the instructions above are drawn: