Arc Forumnew | comments | leaders | submitlogin
4 points by rocketnia 4967 days ago | link | parent

I use Arc on Windows XP. My Arc 3.1 setup process is pretty straightforward:

1) Get Racket. http://racket-lang.org/

2) Get Arc. http://arclanguage.org/item?id=10254

3) Make a batch file that'll run an Arc REPL for me when I double-click it. Here's my batch file, with a boatload of comments to help you figure out what I'm doing: http://gist.github.com/576688 There's probably some room for improvement, but it's what I'm happily using at the moment. (Note that it crashes a bit if you close the terminal window while Racket 5.0.1 is running, instead of exiting via a Racket (exit) call or an Arc (quit) call. I think this is a Racket issue, since previous versions don't crash that way.)

4) Make some necessary changes to Arc so that it stops giving errors on Windows. There are two main issues here. For Arc to start at all, you'll need to fix 'setuid (http://arclanguage.org/item?id=10625). Then, if you also want to run web applications, you'll probably need to fix the system call to mkdir (http://arclanguage.org/item?id=4652), and I wouldn't be surprised if one of the other system calls breaks too.

If you've already installed Cygwin, the system call issues may not exist, but I'm not totally sure of that. I know I only encountered the mkdir issue on a Cygwin-free Windows computer after having used Arc on a Cygwin-ful Windows computer for quite a while... but I'm not sure I've ever actually tried to run Arc web applications on the Cygwin-ful computer.



3 points by waterhouse 4967 days ago | link

Tip: At least for me (on a Mac), running Arc with "[racket|mzscheme] -f as.scm" and then hitting ctrl-C at some point will kill the whole process, instead of dropping to a [Racket|Scheme] prompt from which I can use (tl) to return to the arc> prompt. Replacing the command with "[racket|mzscheme] -i -f as.scm", -i for interactive, fixes this. Much better.

Also, I highly recommend rlwrap. See this thread: http://arclanguage.org/item?id=10

I have added the following to my .bash_profile (probably the Mac equivalent of .bashrc):

  export PATH=/Applications/Racket\ v5.0/bin:$PATH
  alias arc='rlwrap -c -r -l ~/Documents/ARC_LOG -q "\"" -C arc racket -i -f ~/Dropbox/arc3.1/as.scm'
I used to have 'cd ~/Dropbox/arc3.1;' before the 'rlwrap ...' part; the aload function and all the Arc files that load other Arc files (libs.arc) assume that you're in the Arc directory. I worked around this by wrapping all the calls to 'aload in as.scm like this:

  (parameterize ((current-directory (current-load-relative-directory)))
    (aload "arc.arc")
    (aload "libs.arc") 
    
    (aload "sh.arc")) ;my stuff
Now I can call "arc" from any directory; it will load fine and I'll still end up in the directory I started in.

-----

1 point by evanrmurphy 4967 days ago | link

rlwrap really is great. I like it almost as well as having my REPL in Emacs.

Also, that's a neat idea to house your Arc installation in Dropbox.

-----