Arc Forumnew | comments | leaders | submitlogin

7 points by nex3 5962 days ago | link

My current bin/arc:

  cd ~/src/arc0 && rlwrap -C arc mzscheme -m -f as.scm
The -C option gets it to have different history for arc and mzscheme.


2 points by babo 5961 days ago | link

  rlwrap -C arc mzscheme -m -e '(load/cd "~/src/arc0/as.scm")'


5 points by tlrobinson 5962 days ago | link

rlwrap is freakin awesome. I think I probably would have killed myself by now without it.

Especially in Arc or any other Lispy language, since it does paren matching.


3 points by cje 5962 days ago | link

It breaks a bit on single-quotes, though -- rlwrap assumes they're matched, which usually isn't the case in lispy languages.


4 points by bgutierrez 5961 days ago | link

The latest version of rlwrap (0.30) lets you specify which characters are quote characters with the -q option.


3 points by soegaard 5962 days ago | link

Current versions of mzscheme have builtin readline support:

  mzscheme -il readline
I can't remember whether readline support was introduced before or after version 352.


2 points by mdemare 5962 days ago | link

An installer for mzscheme would also be nice. Or just instructions about where to copy what.

And rlwrap is great, but any repl should have readline built-in.

Also, (quit) to exit is too cumbersome. ctrl-d doesn't work either. Apparently ctrl-c ctrl-d is the quickest solution.


1 point by lojic 5962 days ago | link

Wow! rlwrap alone was worth checking out the Arc release - thanks for the tip :)


2 points by offby1 5962 days ago | link

I think he said "fool", not "foo!".


2 points by parenthesis 5961 days ago | link

And don't forget to customise your prompt string in procedure tl2 in ac.scm .


1 point by chrisdone 5962 days ago | link

Alternatively you can make MzScheme include readline in your .mzschemerc:

(when (regexp-match #rx"term" (or (getenv "TERM") "")) (dynamic-require '(lib "" "readline") #f))


3 points by heath 5962 days ago | link

I wrote most of the readline code for Chicken's REPL. I'll see what I can do about moving it over...


1 point by etfb 5960 days ago | link

Glorious! Thank you!