I am working on a "lite" version of Cells for Arc as we speak
(rough start here http://common-lisp.net/cgi-bin/viewcvs.cgi/kennysarc2/cells-...) and I do think a logical step after that would be exploration of applying that to a web app. Unfortunately I have not mucked with interwebby programming so I really would not know where to start. And it might make more sense for me to start with a Common Lisp library such as Hunchentoot. Stay tuned.
Wow Cells! All right, I just heard a lot of enthusiasm for Cells on c.l.l but never managed to grok much of it (insufficient docs IMO); it would be interesting how you handle the mutation of objects - there's no hook in Arc for that yet.
From the looks of this framework it's a test specification.
Incidentally, arc.arc already defines an (obj ...) macro. Do you intend to redefine it?
Thanks, but I think all the enthusiasm on c.l.l is from me. :) Maybe when I provide a Web app example people will get fired up. (I am a dinosaur, thought a desktop GUI would do the trick);
http://common-lisp.net/project/cells-gtk/
As for controlling change, right, my-obj!my-slot will be a backdoor, Arcells (name?) will have to work via readers/writers that invoke the Arcells engine.
Framework? Test spec? What I have so far is merely motivational examples (and I am using the OBJ macro, not redefining it):
http://smuglispweeny.blogspot.com
Look for (+ Arc Cells) Baby Steps, which I am mopping up once the caffeine hits my cortex. When done I'll submit a new thread.
Oops, that extra "do" wrapping just the map was left over from debugging the macro and can be chopped. Note to noobs: this is also a macro-writing tip to remember, one can put debugging print statements that run as a macro gets expanded to help debug and even learn how to write macros.
Still work compared to converting (in my case) (+ x 42) to (ekx hi-mom + x 42). Subtext: I have watched Emacs users edit code... reminds me of a Nascar pit stop.
if you are inside the (+ x 42), type C-, to move just before the parenthesis, then C-1 [ to insert parentheses around the expression, then type "ekx hi-mom ".
No, the idea was to add/remove tracing without adjusting the parens (I hate typing), so (ekx xxx + 2 2) as strange as it looks does eventually expand in part to the form (+ 2 2).
I think my TRC function can be easily converted to standard CL. Of course, none of thus addresses the fancier tricks you talked about above, such as (+ prn:x 42).
I see you have corrected the above by switching to a different name (a reasonable way to go) but it might be fun to see if you can stick with one and expand differently based on whether one or more than one value is supplied (meaning of course you need to support what we call &rest in CL in the parameter list of twodimlist. What I do not know is how well Arc likes to expand a macro into code referencing the same macro.
I've a function that binds a list of lists to to variable 'world', and a function that prints out this world.
(def makeworld (x)
(let z nil
(repeat x (= z (cons nil z)))
(repeat x (= z (map [cons nil _] z)))
(= world z)))
(def show ()
(each x world
(each y x
(pr (if (is y nil) #\. y) #\space))
(pr #\linefeed)))
The world can then be seeded with trees, or shrubs or monsters or whatever. Anyway, as the world is a list of lists, it functions as a two-dimensional array.
If in arc I want to access a point in this two-dimensional list / array, I need to enter ((world 0) 3), and the basic question was how to change arc (macrowise) to make (world 0 3) be equivalent to ((world 0) 3). I already worked around it by now.
To answer your question: you're assuming that there is a list called 'list', and in my initial example I described a function that took the name of the list as first argument.
The problem with multiple values being subsequent accesses is it would also interfere with a useful syntax (not actually in Arc, but I mean insofar as deciding which it should mean), and that's subsequence indexing. It's been discussed all over the place, e.g. http://arclanguage.org/item?id=449
With the assumption that one of them takes that syntax, what should be used for the other? How about (seq '(0 3 ...)) or (seq (0 3 ...))? It would similarly be fitting for any number of arguments, be they dimensions or indices, though I would vouch to use the list for n-dimensional indexing as the case of subsequences seems more common. Plus the use of a list distinguishes the one type of access from the other without having to go (...((seq 0) 3) ...).
Not that any of this helps your problem. Just something I noticed.
Oh, I get it. No, this is not something you can do with macrology because there is no room for a macro in your desired syntax (where you just want the list itself and the index values). As you say, if you'll make room for another token it can just be a function (which would be fun to generalize to N dimensions). As for making ((list (list 42)) 0 0) return 42, I think you need to is suggest it as a (very reasonable) enhancement to Arc.
Just a naming convention, but it is such an insanely easy convention to follow and recognize that what could be an absolute nightmare (dynamic binding outside the lexical scope being unwittingly shadowed and broken by an innocent choice of variable name) simply never happens. Almost like magic. :)
How many thousand lines of Lisp have you coded? What did your biggest Lisp application do? Or were you just guessing at what it is like to program large applications in Lisp and in team situations?