Arc Forumnew | comments | leaders | submitlogin
Response to the Arc Challenge (accursoft.co.uk)
7 points by gidyn 5782 days ago | 13 comments


3 points by gidyn 5782 days ago | link

Any comments or corrections would be gladly accepted.

-----

3 points by conanite 5782 days ago | link

Minor nitpick: the introduction says "HTML and the HTTP protocol were originally designed as a way of presenting, and hyperlinking, static documents" ... but from rfc2616:

  [HTTP] is an application-level protocol for distributed, collaborative, hypermedia information systems.
And from http://www.w3.org/DesignIssues/Architecture.html (Tim Berners-Lee September 1998)

  HTTP was originally designed as a protocol for remote operations on objects, with a flexible set of methods. 
But there's a bigger question: ever since I started writing web apps, I've heard the mantra "keep no state on the server". Arc's continuation or closure thing looks like it's totally breaking the rules. "What about scalability!!", as we say in javaland. So someone's got it all wrong, and why doesn't Hacker News fall over more often?

You mention "unknown or expired link" in arc's scoreboard entry - this is due to arc's appserver harvesting old fnids (function ids). These fnids key into the closures (not continuations) corresponding to the link you clicked. This fnid-harvesting has been the subject of occasional contention on Hacker News ( http://news.ycombinator.com/item?id=169934 ).

At the risk of being totally off-topic with respect to your question: I don't know why the closure approach is always necessary: all the necessary state to vote on a submission or submit an article can easily be stored in the voting link or the submission form. I mean, to produce a HN or arc forum page, the server needs to store 30 separate closures for each article the user might vote on. Which seems a little extravagant. And whatever the benefits to server-side code readability, it results in urls that are completely opaque, which is not always an advantage.

-----

8 points by almkglor 5782 days ago | link

> But there's a bigger question: ever since I started writing web apps, I've heard the mantra "keep no state on the server". Arc's continuation or closure thing looks like it's totally breaking the rules. "What about scalability!!", as we say in javaland. So someone's got it all wrong, and why doesn't Hacker News fall over more often?

As far as I know Hacker News is only one server. Presumably it's pretty well tuned, and besides, there may be lots of hackers there, but I'm sure the readership is much less than, say, friendster, which I'm sure has to solve larger scalability problems.

This may also very well be the reason why Yahoo rewrote Viaweb ^^

> the server needs to store 30 separate closures

Closures are cheap ^^. For example in arc2c, a closure has one cell (cell=4 bytes for 32bit, 8 bytes for 64bit) for type, one cell for length, one cell for function, and one additional cell for each captured variable. Often the captured variables are just one or two, so on a 64-bit system you're looking at 40 bytes for each closure.

On the other hand a string might take up just as much space, and would result in not-so-clear code.

-----

3 points by gidyn 5782 days ago | link

Thank you for pointing out the continuation/closure error - I've updated the site.

Perhaps for HTTP/HTML, it would have been better to say that they were originally used as ...

-----

2 points by almkglor 5781 days ago | link

If you want to be technical anyway a continuation is a form of closure. Mostly the difference is the intent of the closure: if it's meant to be the continuation of control flow, it's a continuation.

-----

3 points by conanite 5781 days ago | link

completely agree - static docs was how I understood the web for its first few years.

-----

2 points by antiismist 5782 days ago | link

- Arc is a language, not a web framework. The framework part comes in app.arc.

- "It is worth noting that the quality of Arc's HTML is atrocious, but this may improve with time." I wouldn't say that this is the case. news.arc makes big use of tables, which some people don't like. But you are free to make whatever HTML you want - you get to specify exactly what output you want.

- The part discussing models seems off somehow.

-----

2 points by gidyn 5782 days ago | link

http://validator.w3.org/check?uri=http%3A%2F%2Farclanguage.o...

-----

4 points by antiismist 5781 days ago | link

So?

my site, http://pageonetimes.com, validates a lot better, and it also uses Arc. Most of the errors are from "bad" urls from links.

FWIW yahoo.com has more errors...does that mean that PHP makes "atrociouser" html?

-----

3 points by gidyn 5781 days ago | link

PHP doesn't make any HTML :-)

My point is that the Arc libraries do not "encourage" high quality markup. Compare to WASH, where the libraries will only produce strictly compliant HTML.

-----

5 points by jmatt 5781 days ago | link

As an arc developer, I create compliant or not compliant HTML. It's the developer's choice, not the framework's job. That is nice that their are some frameworks out there that always create strictly compliant HTML but it's not necessary for a great web framework. I think a lot of innovations will continue to come from non-compliant hacked web code.

-----

2 points by conanite 5781 days ago | link

Markaby (a ruby html-generation framework) did something similar - it would raise an error if you tried giving the same id to more than one element, for example. Unfortunately, it was quite slow, and last time I checked was not being actively developed. But it was so, so, so readable. A lot like almkglor's http://arclanguage.org/item?id=5608

-----

3 points by almkglor 5781 days ago | link

But! But! I didn't actually implement it, which means it doesn't actually count. Code or it didn't happen.

What I did implement is: http://arclanguage.org/item?id=5570

I feel that it's almost as good as the other solution I presented, but I wonder what the opinion of others are. One advantage it has is that it's the non-Arc code that has special syntax, unlike the marcup version where it's the Arc code that has the special syntax.

Apparently the mockup 'marcup is a bit more popular ^^

Would anyone prefer the 'marcup version over the current, existing 'w/html?

-----