2 ms·
Although unrelated to my challenge (http://blog.offbytwo.com/2008/02/05/a-different-kind-of-arc-challenge-a-quest-for-a-true-100-year-language/ http://blog.offb
by cstejerean 19y ago
Although unrelated to my challenge (http://blog.offbytwo.com/2008/02/05/a-different-kind-of-arc-challenge-a-quest-for-a-true-100-year-language/ http://blog.offbytwo.com/2008/02/05/a-different-kind-of-arc-...)
this seems to be the first implementation of Arc in a language other than Scheme. I'm curious if others will follow.
- nostrademons 19y agoI thought about that while I was writing it (I started before your challenge came out). Here's the results for ArcLite: > wc [^j]*.js 66 147 1359 buffer.js 369 1114 10672 eval.js 149 488 4522 primitives.js 188 509 4989 reader.js 356 1145 11869 types.js 136 370 3260 utils.js 1264 3773 36671 total > wc [^d]*.scm 1093 4404 36047 ac.scm 16 30 242 as.scm 48 152 1252 brackets.scm 1157 4586 37541 total So ArcLite is about 100 lines of code more. OTOH, if you take out the reader (which is supplied by Scheme but I had to write myself for ArcLite) it's -254 lines for ArcLite and -48 lines for Arc0. Which means the JavaScript version is actually smaller, at least in line count. (There's also the matter of the missing I/O primitives, but most of them just delegate to Scheme in Arc0 as well.) I have no idea how it compares in code-tree count. Probably larger, as my JavaScript coding style is fairly dense. One could argue that that's the point of syntax though; it makes common operations take up very little space on the page.