Arc Forumnew | comments | leaders | submitlogin
Poll: What do you edit Arc code with ?
11 points by sacado 6098 days ago | 19 comments
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...
emacs
42 points
vi
25 points
kate
2 points
ultraedit
1 point
joe
0 points
notepad
1 point
wordpad
0 points
ed
0 points
echo
0 points
other
9 points


4 points by NickSmith 6098 days ago | link

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.

LINK: http://theschemeway.blogspot.com/2008/02/arc-support-in-sche...

-----

5 points by absz 6098 days ago | link

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.

-----

2 points by sjs 6098 days ago | link

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"?

-----

2 points by absz 6098 days ago | link

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.

-----

3 points by sjs 6098 days ago | link

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.

-----

2 points by absz 6098 days ago | link

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.

-----

5 points by nex3 6098 days ago | link

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.

-----

1 point by eds 6098 days ago | link

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?

-----

5 points by nex3 6098 days ago | link

My .emacs, as it relates to Arc:

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

-----

1 point by eds 6097 days ago | link

Thanks. It still doesn't auto-indent though...

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

-----

1 point by nex3 6097 days ago | link

For auto-indenting: you are pressing tab, right?

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.

-----

1 point by eds 6097 days ago | link

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.

-----

2 points by nex3 6097 days ago | link

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.

-----

1 point by eds 6096 days ago | link

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

-----

4 points by babo 6097 days ago | link

vim, probably not so many real vi users anymore.

-----

2 points by mec 6098 days ago | link

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.

-----

2 points by almkglor 6098 days ago | link

you forgot cat

That said... come, join us, we are vi vi vi

-----

1 point by lboard 6097 days ago | link

Using emacs with quack.el (scheme mode) and set the default program to mzschme -d path_to_as.scm

in my ~/.emacs added these lines

  (require 'quack)
  (global-set-key [f12] 'run-scheme) ; to run arc by pressing f12


"I use emacs bcoz it is programmable with programmable programming language."

-----

1 point by treef 6098 days ago | link

vi drscheme gedit

-----