Arc Forumnew | comments | leaders | submitlogin
Take the Arc Challenge (paulgraham.com)
19 points by mqt 6172 days ago | 12 comments


7 points by NickSmith 6172 days ago | link

Paul, in emphasising code brevity I think you are missing a greater good. I believe most of us subconsciously look for a language that is frictionless -- one that allows us to express our ideas without the language getting in the way. To me this is a far more appropriate measure of a language's power than the length of a program. I'd love a language that would allow me to stay in flow* and express my creativity without having to stop and think about the actual language itself. That would be the ultimate Zen power tool.

To be more specific here are three attributes that seem to aid frictionless flow. (perhaps in order of importance) -

--> Expressiveness -- i.e. simple, explicit and unambiguous abstractions.

--> Obviousness and readability. -- i.e. no need to decipher tokens, and the code structure illuminates the intention and flow of the process.

--> Terse. -- i.e. apart from the obvious benefit of requiring less work it also helps me 'keep the whole program in my head'.

There's nothing wrong with brevity of course, but when pursued for it's own sake it seems to be counter productive, in that when you focus on terseness alone there can be a tendency to ride roughshod over the more important attributes: expressiveness and obviousness. You then end up with code that's not as enjoyable to create and whose beauty is lost, except perhaps initially to it's creator.

BTW Paul, this is a great first shot, so a big thank you. I, for one, am routing for Arc to be a widespread success, if only so I can do most of what I need to do in a language that I really enjoy.

* On Flow -> http://www.life2point0.com/2006/06/the_little_book.html

-----

6 points by bayareaguy 6172 days ago | link

Arc seems to embody the idea that "Language design is library design, and vice-versa", but how can we tell where the boundry is?

When I look at something like

  (defop said req
    (aform [w/link (pr "you said: " (arg _ "foo"))
           (pr "click here")]
      (input "foo") 
      (submit)))
what I see is more or less ordinary lisp that uses a library to solve an issue with applications that rely on http. I'm sure plenty of us could do the equivalent with the appropriate Python/Perl/Php/Ruby library, but then the obvious criticism would be that you're not really comparing lanugages. You would be comparing libraries.

Plenty of examples here: http://arclanguage.com/item?id=722

Is it really the case that when you boil it down, Arc (language+libraries) is about making small web programs? If not, why this challenge and if so I suspect it won't live up to the 100-year idea.

-----

9 points by emmett 6172 days ago | link

One thing I've noticed about languages: you can't really tell which is better from such a short sample.

Paul calls Prolog pattern matching great for writing basic list manipulation functions, then downhill from there. But if you're looking at those kinds of toy problems (how do you write reduce?) you get a biased sample.

Really, you have to try writing something representative of your problem space. And that code snippet is not at all representative of my experience writing web applications; it lacks:

  * Persistent storage
  * Large pages with multiple possible forms and actions
  * Javascript
  * Caching
  * Complicated queries
  * Pagination
In fact, what the demo code amounts to is a 2 step wizard. And in all of Justin.tv, we only have two wizards. So I don't think this is a good test for length of a web app.

One extremely important question: What would be? Is there some kind of canonical example application that could be designed?

-----

5 points by nostrademons 6172 days ago | link

Reddit clone, including AJAX voting & comments and different sort orders.

-----

5 points by emmett 6172 days ago | link

Wait a second...I think we might already have this written in Arc...

-----

1 point by nostrademons 6172 days ago | link

I think we might already have it written in several languages...

So let's have the Reddit-clone challenge!

-----

3 points by vikram 6172 days ago | link

A wiki

-----

4 points by albertb 6172 days ago | link

I have more challenge for you.

Do the same thing, but make it survive a reboot of any server in the cluster.

-----

2 points by s3graham 6172 days ago | link

I'm not sure I'd use db-transactional-serializable-migratable closures that often even if I had them (assuming the overhead wouldn't be worth the occasional "session timeout" message the user would see). Perhaps in some domains though?

-----

2 points by albertb 6172 days ago | link

You can't? You lose then. Kinda different those are, business and helloworld, aren't they?

-----

1 point by mst 6171 days ago | link

Looking at clients' deployed applications, the web boxes tend to average over a year's uptime so I can't say it seems like it'd matter that much.

Provided you've got runtime code loading and a useful QA process, I don't really see why you'd need to care - MySQL's lack of transactional DDL causes far more downtime than lack of serialisation would were we using a continuation-based system.

-----

1 point by albertb 6171 days ago | link

"web boxes tend to average over a year's uptime so I can't say it seems like it'd matter that much."

Unless there is a five or six nines SLA.

"Provided you've got runtime code loading and a useful QA process,"

Hardware might crash as well.

"MySQL's lack of"

That one is really good.

-----