Arc Forumnew | comments | leaders | submit | evanrmurphy's commentslogin
2 points by evanrmurphy 5632 days ago | link | parent | on: Environments for Arc programming?

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

-----

1 point by evanrmurphy 5633 days ago | link | parent | on: Environments for Arc programming?

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 5633 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 5633 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 5633 days ago | link | parent | on: Environments for Arc programming?

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 5633 days ago | link

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

-----


I am new to both Arc and Lisp, and I'd be happy to share my recent findings, impressions and experiences.

Since my interest in Lisp was first piqued by Graham's essays [1], and I'm reading On Lisp too, I was naturally curious about the dialect he designed. I liked what I learned in the tutorial [2], and after getting a taste of Arc's syntax, the relative verbosity of most other Lisps was not very attractive to me. I know this may sound superficial, and it is (literally), but as shader said, "a few bits of syntactic sugar...go a long way." Some reasons aside from aesthetics I'm still using Arc: I've been able to get things done with it, it's well-tailored for making web apps (which are my primary interest at this point), and I've found the community (though small) to be especially thoughtful and helpful.

I recently stumbled upon a post from about a year ago in which the author explains his preference for Arc over other Lisps [3]. It might be the perfect thing for you to read given you're looking for "why people here use ARC over CL or Scheme". One of his points aside from brevity is that macros are especially writable in Arc, which is a big deal considering they're one of the most powerful tools Lisp has to offer. It's also reassuring to know that the author (aw), who was then so enthusiastic about Arc, continues to be a top contributor to this forum and maintains the resources at http://awwx.ws.

One of the interesting things I've realized about this community is that not everyone here uses Arc over CL or Scheme. That is to say, it's not just a bunch of incestuous Arc ideologues: a lot of the people are exploring other Lisps and other languages too, e.g. elibarzilay is into PLT Scheme [4], thaddeus is learning Haskell [5], waterhouse has been implementing Arc in both PLT Scheme and CL [6], jazzdev and conanite have used Java to write Jarc [7] and Rainbow [8], respectively, etc. This is an indicator to me of how open-minded they are, which IMO is a critical trait for any community to have, but especially one so small as Arc Forum.

Finally, just a logistical detail that may help you get started in Arc: version 3.1 does work with the latest MzScheme [9]. This was a point of confusion for me after reading the install page [10], and while not a big deal, it can make installation a bit less of a pain.

Hope this helps. :)

[1] http://www.paulgraham.com/lisp.html

[2] http://ycombinator.com/arc/tut.txt

[3] http://catdancer.github.com/thank-you.html

[4] http://barzilay.org/

[5] http://arclanguage.org/item?id=10952

[6] http://arclanguage.org/item?id=11529

[7] http://arclanguage.org/item?id=9084

[8] http://arclanguage.org/item?id=6002

[9] http://arclanguage.org/item?id=10254

[10] http://arclanguage.org/install

-----

3 points by soapdog 5649 days ago | link

This is an amazing community and forum. Thanks so much for these resources, I am trying to absorb everything. As soon as I have something interesting, I will post here as well!

-----

1 point by messel 5636 days ago | link

I had a similar question really appreciate the links, several that I was fortunate enough to bump into.

-----

2 points by evanrmurphy 5652 days ago | link | parent | on: A confession of stupidity

A great reminder for me about the importance of profiling, thanks for posting!

I have a less technical confession of stupidity to make: I was feeling a little disappointed by the rate of submissions on this forum the last few days, when I realized I was only checking the front page and not the new submissions page. Now I look forward to reading what I've missed. :)

-----

3 points by akkartik 5652 days ago | link

Thanks evanrmurphy. It's almost like there are two communities here, with the second one visible to (and probably only interesting to) those willing to poke around a bit. The front page skips the detailed discussions and has become more of a summary of the cool stuff people are doing with arc. The new page is more like a traditional forum.

As a luxury of being so small, this community encourages all sorts of questions and discussion[1] (and angst :) - but without karma. Compare the boost 'Ask HN' posts get on HN; HN has to either encourage or discourage discussion; its size makes it hard to do much else.

[1] http://arclanguage.org/item?id=11315

-----

2 points by evanrmurphy 5652 days ago | link

As a luxury of being so small, this community encourages all sorts of questions and discussion...but without karma. Compare the boost 'Ask HN' posts get on HN; HN has to either encourage or discourage discussion; its size makes it hard to do much else.

I made one Ask HN post that didn't get a single comment. Surprising how a community a tiny fraction of the size can be more responsive in some ways.

Maybe that shouldn't be surprising though, since responsiveness tends to be inversely proportional to size in so many things [1]. When there are many people using the site it's tempting to think, "Well someone has got to respond to my post!" But there is much more posting happening on large sites too, and different rules emerge (e.g. HN culture's greater emphasis on karma, as you suggest).

[1] Committees, web browsers, vehicles, mammals...

-----

2 points by shader 5652 days ago | link

Yeah, I normally check comments first and then new, since comments change the most, and new second most. This forum doesn't have enough traffic right now to need to sort by popularity.

Have fun reading ;)

-----

1 point by evanrmurphy 5652 days ago | link

It's funny, I never would've used the comments page on HN, but its utility is clear here. Traffic is a significant variable in usability on these sites, even though they're clones of one another.

-----


2. I plan to spend a few hours to see if I can get couchDB up and running against arc over the next weekend (if I can finish off setting up nginx). I think couchDB should be easy given the data is passed via js over HTTP. Anyone have feedback on couchDB?

Any luck with couchDB, thaddeus?

-----

1 point by evanrmurphy 5656 days ago | link | parent | on: First Arc pages at pittshuttle.info

Thank you, thaddeus! I'm glad to know about jQTouch and will let you know if I give it a whirl before you do. :)

-----

1 point by evanrmurphy 5660 days ago | link | parent | on: First Arc pages at pittshuttle.info

It's fixed now. Thanks, that is so much better.

Checking out your syntax highlighter now. :)

-----

1 point by evanrmurphy 5654 days ago | link

The syntax highlighter has increased my quality of life substantially (insomuch as my life is coding in Vim, which it is for a good part these days :) .

The red highlighting that suddenly appears for mismatched parens is very useful. Saves me a lot of cursoring around to make sure all are matched up. The only nuisance in my own usage is sometimes it's distracting if I deliberately have a temporary mismatch while editing code.

-----

1 point by fallintothis 5653 days ago | link

Good to hear, thanks!

The parenthesis highlighting is a bit of an all-or-nothing proposition, since Vim can't really tell if you intended to leave unmatched parentheses. You can disable it altogether (which won't highlight any paren errors) with

  :hi link arcParenError NONE
and re-enable it with

  :hi link arcParenError Error
Similarly, there's arcBracketError for [] syntax.

If you find any, feel free to let me know of code it doesn't highlight correctly: http://bitbucket.org/fallintothis/arc-vim/issues/

-----

1 point by evanrmurphy 5660 days ago | link | parent | on: popnth

Wow, looking back it was awfully dense of me to have your clear explanation about needing to define a setter and then coming over here to post some hack using join. Sorry for that.

Even though my popnth function works, it's a worse solution because by ignoring setforms it only works for the specific case of pop rather than the whole family of destructive functions. Is this accurate?

I'm a good deal more comfortable with the setter concept after your and thaddeus' examples. Thanks to both of you for your patience with a newb. I've been super impressed with this forum so far: the community is small but outstanding.

-----

1 point by shader 5659 days ago | link

Yep. By defining popnth, you get a single function that performs a specific task. But if you define a setform, now any function that wants to operate on a "place" can do so.

In theory, you can now do things like

  (= (nthcdr 3 lst) '(a s d f))
and set the 3rd cdr of lst to (a s d f)

-----

1 point by evanrmurphy 5660 days ago | link | parent | on: popnth

That's probably more natural and efficient than my solution.

-----

More