Arc Forumnew | comments | leaders | submitlogin
Arc run error - beginner
2 points by aaronmoodie 4910 days ago | 15 comments
Hi, I've just installed MzScheme 4.2.5 on OSX 10.6.4 via homebrew, and then downloaded and untared Arc 3.1, but when I run mzscheme -m -f as.scm I keep getting 'Abort Trap'.

I've done a search on the and can't find much info. Appreciate any help. Thx



3 points by waterhouse 4910 days ago | link

I use OS X. Consider me an expert on this subject; I'll answer any questions.

As aw says, don't use the "-m" option. Also, use the "-i" option, for "interactive"; without it, when you ctrl-C an Arc session, the whole process will abort, but with it, you'll get a MzScheme prompt, at which point you can use (tl) to return to Arc.

I also highly recommend that you install a tool called rlwrap. It does paren-matching and lets you use arrow keys (or ctrl-N, ctrl-P, ctrl-F, ctrl-B for down, up, right, left) to move around and access previous commands. Here's the command that I suggest you use to start Arc from the arc3.1 folder:

  rlwrap -c -r -l ~/Documents/ARC_LOG -q "\"" -C arc mzscheme -i -f as.scm
(You can strip off everything before the "mzscheme", but once you've tried it with and without rlwrap, you will want rlwrap.)

For extra credit, add the following to the file ~/.bash_profile:

  alias arc='cd [path-to-arc]/arc3.1; rlwrap -c -r -l ~/Documents/ARC_LOG -q "\"" -C arc mzscheme -i -f as.scm'
Then you can start Arc just by typing "arc".

-----

2 points by elibarzilay 4909 days ago | link

Note that Racket has readline support: http://docs.racket-lang.org/readline/

-----

1 point by waterhouse 4909 days ago | link

Unfortunately, it doesn't do paren- or quote-matching, and it doesn't interact well with the current arc> prompt.

  $ racket -il readline -f as.scm
  Welcome to Racket v5.0.2.
  Use (quit) to quit, (tl) to return here after an interrupt.
  arc> 
  (+ 1 2)
  3
  arc> 
  "bad"
  "bad"
  arc> 
  (quit)
With access to the underlying Racket, one can (require readline/readline) and do (readline "arc> ") to get the proper prompt, but a) this requires redoing the Arc REPL, either by hacking (tl) in ac.scm or by writing something like (while t (prn:eval:read ($.readline "arc> "))), and b) it still doesn't do the matching, which I find an important feature.

-----

3 points by elibarzilay 4909 days ago | link

Not much to do about the prompt -- racket needs to know how wide the prompt which is why that argument is there.

But the paren matching is definitely possible -- I have "set blink-matching-paren on" in my ~/.inputrc file, and never had any problems with it.

BTW, another advantage of using the racket readline facility is that it's possible to do completion for the toplevel namespace.

-----

2 points by aw 4910 days ago | link

I haven't tried OSX myself, but with recent versions of MzScheme you should no longer use the "-m" option. Try just "mzscheme -f as.scm" and see if that helps.

Also, if you try just "mzscheme" without any arguments, do you get an mzscheme prompt like this?

  Welcome to MzScheme v4.2.4 [3m], Copyright (c) 2004-2010 PLT Scheme Inc.
  >
if you still get the "Abort Trap", there's a problem with your MzScheme installation. You could try downloading directly from http://racket-lang.org/download/ (mzscheme got renamed to Racket). If you can't get MzScheme / Racket to work, you can also ask for help over on http://racket-lang.org/community.html

-----

1 point by aaronmoodie 4910 days ago | link

hey aw, this is saying that arc still requires MzScheme? https://github.com/mxcl/homebrew/commit/547edb0d39175a2e3898...

-----

1 point by waterhouse 4910 days ago | link

It's wrong. "racket -i -f as.scm" works fine and I've been using it for a few months. (Note that this is for arc3.1, which you are using, so that should be fine.)

-----

1 point by akkartik 4910 days ago | link

Though I switched temporarily back to PLTv4 after reporting this bug: http://bugs.racket-lang.org/query/?cmd=view&pr=11380 (since fixed at HEAD)

-----

3 points by elibarzilay 4909 days ago | link

That fix is also in 5.0.2.

-----

1 point by akkartik 4909 days ago | link

That was quick! Upgraded.

-----

1 point by aaronmoodie 4910 days ago | link

thanks waterhouse. Did you install from src? I'm a little unsure about the configure option. I'm assuming "--prefix=/usr/local/racket --enable-macprefix" ?

-----

1 point by waterhouse 4910 days ago | link

I didn't install from source, and have no idea about doing that. What I do to install is: Download DrRacket from racket-lang.org. Move it to the Applications folder as is conventional. Add to the ~/.bash_profile the following line:

  export PATH=/Applications/Racket\ v5.0.2/bin:$PATH
Now you'll be able to use the "racket" and "mzscheme" and "raco" and all other programs from the "bin" subdirectory by just typing their names. (This applies to any terminal windows opened after you've changed .bash_profile.)

-----

2 points by aaronmoodie 4910 days ago | link

always making things hard for myself... thanks for your help waterhouse. I'm all up and running now, including rlwrap. Arc time. Thanks!

-----

1 point by aaronmoodie 4910 days ago | link

thanks aw, it is my mzscheme install. I'll install racket and give it a go.

-----

2 points by aaronmoodie 4909 days ago | link

For anyone else looking to at installing on OS X with Racket, I've writing a post about it here: http://aaronmoodie.com/writing/installing-racket-and-arc-on-...

Thanks waterhouse and aw for your help.

-----