Arc Forumnew | comments | leaders | submitlogin
5 points by evanrmurphy 5336 days ago | link | parent

If you're frustrated with the installation but really want to try out Arc, http://tryarc.org/ provides a functional Arc REPL in your web browser. You could use it to go through the Arc tutorial [1] and otherwise experiment with the language until things are set up on your system. (Full disclosure: I created the site.)

You were probably following the brief installation instructions at [2], which tell you to download Arc 3.0. If you download Arc 3.1 instead (see [3]), then you have more flexibility about which version of mzscheme to use. In any case, once you have installed mzscheme and downloaded/untarred arc3.[0|1].tar, you cd into the arc3.[0|1]/ directory (where as.scm resides) and run "mzscheme -m -f as.scm" to launch an instance of the Arc REPL.

To be sure, which operating system are you running?

---

[1] http://ycombinator.com/arc/tut.txt

[2] http://arclanguage.org/install

[3] http://arclanguage.org/item?id=10254



2 points by Andrew_Quentin 5336 days ago | link

Windows XP

I did try the site for a bit, its quite cool. Was trying to learn some schema earlier on, but totally lost as to how to get arc to launch.

By cd, do you mean the windows command prompt? Haven't used that before. Tried to though, but it says that neither run nor mzscheme are recognised commands.

-----

2 points by evanrmurphy 5336 days ago | link

Windows XP

Well I'm glad I asked because the above instructions presume you're on a Unix-based system (Linux, Mac OS X) working from the command line.

Unfortunately, I'm not familiar with how to get Arc installed on Windows. Here's one guide on the topic [1], but I can't vouch for its accuracy. If you want to find more related resources, try using http://af.searchyc.com/ to search this forum for posts that mention "Windows".

By cd, do you mean the windows command prompt?

Yes. cd is a standard command on shells for both Windows and Unix to change the current directory.

---

[1] https://dev.youdevise.com/YDBlog/index.php?title=installing_...

-----

4 points by rocketnia 5336 days ago | link

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 5336 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 5336 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.

-----

1 point by Andrew_Quentin 5336 days ago | link

Wow, that's much more complex than I though. I'm glad I asked. No wonder I was lost.

Thanks a lot. I'll try and follow those instructions and see if it works.

-----

1 point by evanrmurphy 5336 days ago | link

Good luck and let us know what happens!

-----

1 point by Andrew_Quentin 5336 days ago | link

Its Alive!

Trying to figure out the dev\urandom problem now

but thanks man!

-----

1 point by evanrmurphy 5336 days ago | link

Great, happy hacking! :)

-----