top | item 106398

Arc's Out

240 points| pg | 18 years ago |paulgraham.com | reply

124 comments

order
[+] brett|18 years ago|reply
Man, I had shit to get done this afternoon.
[+] pg|18 years ago|reply
BTW, most existing News.YC usernames are reserved (with the current News.YC password) on arclanguage.org. The UI should also be familiar...
[+] shiro|18 years ago|reply
Is the user database is shared, or just copied?

I forgot my news.yc password and wonder if resetting password in news.yc propagates to the arc forum.

[+] vdm|18 years ago|reply
Nice, but I registered me2 because I didn't know this. A note to let me know would help.
[+] buro9|18 years ago|reply
It's true, the familiarity goes down to sharing the same favicon.ico
[+] Todd|18 years ago|reply
Works like a charm.
[+] Hexstream|18 years ago|reply
PG: "I am a fairly representative Lisp hacker"

I thought representative Lisp hackers liked long descriptive names over short cryptic ones? ;P

PS: I feel my karma's going to hell in 3, 2, 1...

edit: It wasn't a challenge. It wasn't "oh, I'll pretend to think my karma will go down to look like a cool rebel". Hope that clears things up.

[+] paulgb|18 years ago|reply
I wouldn't have upmodded you, if curi hadn't made the comment about not upmodding you.
[+] Zak|18 years ago|reply
If you look at Arc's source, it certainly seems like PG prefers short names everywhere - it's more like what I've seen from Haskell people. I generally prefer medium-long names. Scheme's call-with-current-continuation is too long. Arc's ccc is too short. Ruby's callcc is just right.
[+] yters|18 years ago|reply
I commented because this seemed like an opportunity to say something funny and cleverly self referential, but I guess this'll get me modded down.
[+] curi|18 years ago|reply
I would have upmodded you, if you hadn't made the comment about your karma going down.
[+] jmzachary|18 years ago|reply
"We'll change stuff without thinking about what it might break, and we won't even keep track of the changes."

Are you hoping to build a user community for Arc? If so, and why would you release Arc if you weren't, then why are you not interested in keeping track of changes that break things users might design/code against? Am I being stupid and missing something here?

Edit: I forgot to mention something else. Congratulations and thanks for sharing Arc with the rest of us :)

[+] reitzensteinm|18 years ago|reply
Going to try it out now, but one thing really struck me in the announcement:

"We'll change stuff without thinking about what it might break, and we won't even keep track of the changes."

Is that really wise? What's wrong with doing a simple changelog with every modification? Since you'd expect only experienced programmers to be using Arc, you don't have to hold our hand explaining the implications of the changes - but making us diff the source would probably be a bit much.

I mean it doesn't have to be verbose even. Or even tidy. This would be better than nothing:

* Added a global weak reference hash map to treat any object like a hash using {} syntax, ie, (= {someobj hashindexobj} 5).

* Hash idea sucked. Removed.

[+] curi|18 years ago|reply
pg has better things to do. you can maintain a website of arc changes, if you want. or set up a wiki. or diff the source and post results.
[+] bct|18 years ago|reply
Huh. I would have said just the opposite about HTML; seems to me that slapping down some structural divisions and worrying about layout later is much more exploratory than starting with the layout.
[+] olavk|18 years ago|reply
His point is that it is more "exploratory" not to use semantic markup, since you might not know the semantics of the document structure while you are developing.

It seems backwards to me though, surely the most "semantic-free" approach is to default to divs rather than tables to structure the markup.

[+] euccastro|18 years ago|reply
If your HTML is generated programatically, you can roll your own mechanism for separation of concerns in the source.

I see merits in standards compliance, but making my life easier is not necessarily one of them.

[+] Tichy|18 years ago|reply
What inspires me most about Arc is that it was created strictly for fun (or so I suppose). In that sense, it having no unicode support is the best feature for the time being: it is a powerful reminder that if you don't feel like doing something, it might be an option to simply not do it. It helps if you have other means to pay your bills, but still.

I don't plan on using arc for the time being, but I hope that maybe I can steal some ideas from it, so I welcome it's release.

[+] abstractbill|18 years ago|reply
I remember reading this in "Arc at 3 Weeks" and being quite excited about it:

The Scheme language sneakily increased the scope of the language designer's powers. From very early, maybe from the begining, the Scheme spec said that conforming implementations must do tail call elimination. The first time I read this, I thought "wait, can you require this in a spec?" Arc will see this increase, and raise it by some standards for profiling.

I thought that was a great idea. Too few languages have good support for profiling. Did the idea get dropped? I don't see anything obviously related in arc.arc or in the tutorial.

[+] vegashacker|18 years ago|reply
I'm sure the idea didn't get dropped cause it's pretty darn important -- and it'd be a major back peddle for PG. It certainly might have been postponed, though.

I wonder if PLT Scheme's profiling tools are good enough on Arc programs (or useful at all?). I hear they have pretty good ones, but haven't used them myself. Arc might be different enough from MzScheme that the information that the PLT profiler returns on Arc programs isn't so useful.

[+] davidkellis|18 years ago|reply
Looking through the tutorial (http://ycombinator.com/arc/tut.txt), I think it's beautiful.
[+] lg|18 years ago|reply
Just read the first half, very good explanations in minimal verbiage. Arc looks beautiful here even if only for the de-parenning of so many CL operators (i.e. let). In fact I'm a little sad to still see so many parens in the code... I guess my whitespace-significant dreams were overreaching.
[+] aristus|18 years ago|reply
Wow.

  $ wc -l arc0/*
    1093 ac.scm
     535 app.arc
    1496 arc.arc
      16 as.scm
     107 blog.arc
      48 brackets.scm
      61 code.arc
       2 copyright
     360 html.arc
       7 libs.arc
      80 pprint.arc
     119 prompt.arc
     462 srv.arc
     223 strings.arc
    4609 total
[+] dcurtis|18 years ago|reply
Arc is cool. I can't wait to see what it evolves into.

P.S. Do you have a personal vendetta against the W3C, or something?

[+] Xichekolas|18 years ago|reply
You probably missed the thread here on YC News he is mostly like responding to... I would link you to it, but it was honestly pointless to begin with... and I'm lazy.
[+] unknown|18 years ago|reply

[deleted]

[+] Readmore|18 years ago|reply
The Arc tutorial is awesome! All the examples really hammer the dialect in to you. About half way through you start to realize, 'wait a minute... I can actually read this!'.

Thanks PG

[+] extantproject|18 years ago|reply
It really is a simple and effective tutorial. I like it.
[+] akkartik|18 years ago|reply
Version control:

  $ git clone http://codewikia.com/arc
[+] pius|18 years ago|reply
Very cool . . . it'll be nice to play around with Lisp again.

What's the license, by the way?

[+] curi|18 years ago|reply
This software is copyright (c) Paul Graham and Robert Morris. Permission to use it is granted under the Perl Foundations's Artistic License 2.0.
[+] ced|18 years ago|reply
So, is this the right thread to talk about actual language design?

1. I think using cons to represent lists is an ugly hack. I mean, why should a cons only hold 2 elements? Why not generalize them to n elements, and call them lists?

2. Has anyone tried unifying macros and functions? The distinctions between the two is one of the worst part of Lisp IMO, and I don't think there should be anything fundamental about it.

Otherwise, it's nice to see a new Lisp of course.

[+] rcoder|18 years ago|reply
Okay, I'll bite...

1. Recursion and cons cells naturally complement one another. They can stand in for n-ary tuples, vectors, and arrays reasonably well for small values of n, and when your dataset gets large, well, you switch to a more efficient data structure. Hell, with Arc you even get 'push' and 'pop' as built-in functions. What exactly is the problem?

2. Again, I don't see how this is a problem. Macros are compile-time rewriting rules. In an eagerly-evaluated language like Lisp, they are pretty much a necessary evil to prevent unnecessary side-effects while still allowing for flexible syntax. I can imagine doing without them in a lazy language like Haskell, but I'm not aware of any popular, lazy languages in the Lisp family.

That being said, I'm interested to know if you've working with other languages where #1 and #2 aren't a problem.

[+] mechanical_fish|18 years ago|reply

    bash-3.2$ ls | xargs -n 1 wc -l 

      1093 ac.scm
       535 app.arc
      1496 arc.arc
        16 as.scm
       107 blog.arc
        48 brackets.scm
        61 code.arc
         2 copyright
       360 html.arc
         7 libs.arc
        80 pprint.arc
       119 prompt.arc
       462 srv.arc
       223 strings.arc
4609 lines of code as of today.
[+] pg|18 years ago|reply
I usually measure code trees rather than LOC. There's a fn (called codetree) in there somewhere to do it.
[+] tlrobinson|18 years ago|reply
what's wrong with

    wc -l *
[+] eusman|18 years ago|reply
i wonder how many lines were optimized/stripped until reaching this number
[+] oditogre|18 years ago|reply
Edit: Ontopic: "So while Arc is not the perfect Lisp, it seems to be better for at least some kinds of programming than either of the leading alternatives." What kinds did you have in mind?

Offtopic, but what exactly is that a picture of? I see chairs, and a face in the background (looks like a reflection) - is it a picture taken through a window? Why is it there?

[+] pg|18 years ago|reply
Webapps like this one.

The new picture on the frontpage of pg.com is a self-portrait shot in/through a window at the Grand Trianon, in the grounds of Versailles. I noticed that if I held my head in the right place I could line up my eyes with the wallpaper pattern.

[+] as|18 years ago|reply
I had to tilt my monitor to see the pattern. Then it's pretty funny.
[+] sri|18 years ago|reply
looks like pg in europe taking the picture of a old hotel from the outside
[+] jsjenkins168|18 years ago|reply
GWT also uses tables for layout extensively in its compiled output. I dont think its an ugly hack, as long as you can learn and work around ambiguities with table cell height between browsers.

But then I guess that is all part of exploratory programming.

[+] tlrobinson|18 years ago|reply
Tables for layout is awful in terms accessibility and semantics, among other things.

Tables are meant for tabular data, and when you use them for layout it breaks those semantics, which in turn makes it much harder for screen readers to make sense out of it.

It's also just ugly, in my opinion.