There are obviously many emacs users here. Well, emacs & lisp have a serious love-story. On the other side, a few others (including me) seem to use vi. I was wondering about the proportions...
I'm using Dominique Boucher's SchemeScript plugin for Arc in Eclipse and find it a delight. It includes code completion, auto indentation, S-expression manipulation, built in interpreter, parenthesis matching.
I'm a novice programmer so my preferences are by definition skewed towards ease of use, but nevertheless I have to say this is an excellent tool.
I'm on OS X using TextMate, which is fantastic (though €40 / US$50). I quickly modified the Scheme language bundle into an Arc language bundle--it's not perfect, but it's OK. For the REPL, I'm using an Input Manager called "Visor" for the Terminal, which puts a slide-down (tabbed!) Terminal window on a hotkey.
Visor sounds interesting. What sort of interaction is there between TM & the REPL? Do you have commands like "send defun to repl" and "send file to repl"?
No, just (load "~/Arc/deriv.arc") in the REPL (which suffices). I imagine I could hook something up with AppleScript... hmm, having problems accessing the tabs of the sliding window. If I could, then "send file to REPL" would be
on loadFile(fileName)
tell application "Visor Terminal" to ¬
do script "(load \" & POSIX path to fileName & "\") ¬
in current tab of window id -1
end sub
, assuming that the REPL was in the active tab. Well, if I can get that to work, I'll tell you.
Visor was written by the guy who wrote Quicksilver, and is similarly excellent. It's a bit tricky to get working on Leopard, but it's worth it.
I'm pretty stuck on Emacs for Lisp stuff, but interfacing with a REPL from TM would be a step closer for me to give it a shot. Understanding s-exps is next on the list.
I'll have to read more on Visor (or just try it). It doesn't look too interesting at a glance since iTerm is already a Cmb-tab away. There must be more to it that I'm missing.
I prefer Visor for a few reasons. First, I just prefer Terminal to iTerm (especially now that it has tabs). Second, F3 (my hotkey) always gets me Visor; cmd-tab may take more or less key presses depending on what apps I've been using. Third, since I set Visor up to use a different Terminal which runs in the background, so that's one less app to cmd-tab past. Mostly, it's a convenience thing-one F3, and always one F3.
Emacs, using the excellent arc.el and inferior-arc.el files in the REPL. Woo for in-editor REPLs and send-to-REPL commands. Not to mention automatic indentation.
For some reason, auto-indentation doesn't work for me. And also, I can't use the REPL unless I start emacs in the directory where arc is. Any advice would be appreciated.
Perhaps you could give example pieces of a .emacs files?
(autoload 'run-arc "inferior-arc" "Run an inferior Arc process, input and output via buffer *arc*." t)
(autoload 'arc-mode "arc" "Major mode for editing Arc." t)
(add-to-list 'auto-mode-alist '("\\.arc$" . arc-mode))
I also have arc.el and inferior-arc.el in my loadpath.
As for starting the REPL, inferior-arc.el assumes that there's an "arc" program in your path. I did this by adding a symlink pointing to my arc.sh, but you could also customize the arc-program-name variable.
And I'm on Windows so I can't use arc.sh :( ... I tried to make up for it by using arc-exe instead, but arc-exe won't load if it isn't in the same directory as ac.scm. (I think this is because the require-namespace isn't done at compile time like normal requires are.)
You should be able to set up a simple CMD script to start Arc on Windows. I think. I don't actually know that much about Windows. At the very least, you can set arc-program-name to be a manual invocation of MzScheme.
Oh, thats what you mean by auto-indenting. I was expecting it to act like lisp mode where it indents when I press enter (which would be nice to have if someone could manage it).
My problem so far is that when I try to load arc, because the current working directory is not the arc directory, even if it loads as.scm correctly, it can't load ac.scm or any *.arc files. I could set it up to load something like "mzscheme -mf C:\...\arc\as.scm" but I don't know how to make mzscheme look for other arc files in that directory as well.
The standard Emacs indentation behavior is to indent on TAB rather than newline. This is also the default for Lisp-mode, as far as I know. You can rebind this by setting RET to comment-indent-new-line, though.
You need to add some argument to mzscheme to get it to cd into the arc directory. Check the args passed in arc.sh.
Ok, thanks. I hacked a batch file and put it in my PATH so I can start arc from emacs. (Setting arc-program-name failed because run-arc wouldn't respect the quotes around the executable name.)
DrScheme, but unfortunately I can't figure out how to add it as a language instead of just running it through mzscheme so I don't get any useful syntax highlighting etc.