Arc Forumnew | comments | leaders | submitlogin
Environments for Arc programming?
6 points by evanrmurphy 5121 days ago | 15 comments
I've started using a combo of the arc + inferior-arc + paredit + viper modes in Emacs. What do you use?


2 points by garply 5121 days ago | link

I use the same setup as you - have you made any significant changes to your emacs config files? Maybe we can share.

The Anarki emacs config could be improved. For example the indentation for the with macro drives me crazy, but I don't know how to fix it. Also, it breaks viewing of some Unicode chars (which is a problem for me as I write a lot of Chinese) - I've got a crappy workaround for that. And some other issues.

-----

2 points by evanrmurphy 5120 days ago | link

I'm just coming over from Vim so my .emacs file is still pretty vanilla, but I'd be interested in seeing yours!

-----

2 points by akkartik 5121 days ago | link

Just vim in one window, arc+rlwrap in another, browser+firebug in a third. With so little code there has been less reason to scale up the development environment.

I like not having to press shift to type parens[1], so I switched () with [] in lisp mode.

You may find this tip useful for emacs: http://akkartik.name/lisp.html#sexp-nav

[1] due to a history of RSI

-----

1 point by evanrmurphy 5120 days ago | link

I like not having to press shift to type parens[1], so I switched () with [] in lisp mode.

Clever solution. The only problem in Arc would be the prevalence of [] for anonymous one-variable functions. Maybe switch ( and ) with 9 and 0, respectively, so that you shift to get the numbers instead of the parens?

-----

1 point by akkartik 5120 days ago | link

So far they haven't been that prevalent. I don't want to overoptimize this too much. It takes time to rewire one's muscle memory, and needing shift for some digits but not others smacks of over-cleverness. There isn't that much difference between the frequency of square brackets and digits. Parens on the other hand are easily an order of magnitude more common.

-----

1 point by evanrmurphy 5120 days ago | link

Yes, you're right. I had misread what you wrote earlier and thought that you simply overloaded the [] keys with (). That you actually swapped them is a fine solution indeed.

-----

1 point by evanrmurphy 5120 days ago | link

Thanks for the sexp-nav tip. Have you used paredit? It has something similar for traversing sexps, but I guess it's simpler because there's only forward and backward. (Makes up for this with all its other tools for manipulating sexps though.)

-----

1 point by akkartik 5120 days ago | link

No I haven't actually used emacs in a few years. I might go back to it at some point.

-----

1 point by evanrmurphy 5116 days ago | link

Thanks for prompting me to check out rlwrap! This substantially increases my quality of arc repling in bash.

-----

2 points by waterhouse 5120 days ago | link

DrScheme to edit Arc files, rlwrap + mzscheme REPL. Note that in DrScheme you can do a certain amount of customization of indentation patterns: Preferences -> Editing -> Indenting.

-----

1 point by evanrmurphy 5120 days ago | link

I haven't spent much time with DrScheme yet, could you talk about why you like it?

-----

3 points by waterhouse 5119 days ago | link

Partially because it was what I used when I was first introduced to Scheme. It has the basic Lisp-editing features (paren-matching, indentation); it colors text (e.g. comments are orange, literals are green, normal code is blue); it has a nice GUI for customizing much of the above (for indenting, you can give it specific words or regular expressions to determine whether to indent something 'define-style, 'lambda-style, or 'begin-style; you can also pick your own colors instead of the above, though I don't do that). I also like that cmd-I reindents everything.

Drawbacks: Indentation can't be customized as much as I'd like[1], at least as far as I know. Tendency to freeze up for several seconds (maybe because I tend to leave several files open for days at a time, but I'm not changing that).

I've experimented with Emacs too, and they are pretty comparable. I use DrScheme these days mainly out of habit, but one obstacle in Emacs is that I don't know how to make it do Arc-specific indentation, whereas I can do that pretty well in DrScheme.

[1] For example:

  (with (this (blah)
              that (thing)) ;this line is too far right
    (do-stuff) ;this line isn't, because I told it
    (do-more)) ; to indent "with" lambda-style

-----

1 point by garply 5119 days ago | link

The with macro indentation drives me nuts too, but I'm sure it's fixable.

-----

2 points by projectileboy 5118 days ago | link

I use my IntelliJ plugin. But I need to update it; I'm behind a version and a half.

-----

2 points by jazzdev 5117 days ago | link

I use Emacs too. With arc-mode.

-----