Arc Forumnew | comments | leaders | submitlogin
1 point by parenthesis 6148 days ago | link | parent

What is the ! in !ccc:ufb ... supposed to be doing? Do you mean ~ccc:ufb-reset-ephemerals , i.e. (not ... ) ?


1 point by kennytilton 6148 days ago | link

Sorry, I realized that would confuse things terribly only after posting, and would have edited it into a simple (let x 42..) after the fact to highlight the actual gaffe but decided it would be useful to share what is only coincidentally similar to Arcese in the syntax but identical in spirit.

What was posted was real CL code, but it leverages a sophisticated mechanism known as a reader macro. I imagine there might be similar hijinx in ac.scm supporting the Arc syntax, dunno.

!ccc:ufb-reset-ephemerals -> "<triplecells#ufb-reset-ephemerals>"

I do not have to type that particular RDF URI very often (done, actually, after three times) so I do not abbreviate (except for the UFB (but let's not digress))).

For the same reason that pg is creating Arc, CL programmers like to take stuff that will be a pain to to type and effectively automate the typing with a reader macro.

The use of the colon to separate the RDF namespace from the specific label is a nice pun the CL usage for its namespace mechanism packages. I got a little inconsistent in my hackery and nicknamed the triple-cells CL package "3C", so if I had to reference the stmt-new function in a different package not using triple-cells I would say (3c:stmt-new...).

-----

3 points by cooldude127 6148 days ago | link

this is cl code, not arc. that's the joke: he was using an arc style let in common lisp code.

-----

3 points by kennytilton 6148 days ago | link

Right, and the "score one" headline is about my concern that Arc abbreviations might not become second nature. My Arccells code uses a lot of it, but most times I had to go back and edit a (foo bar) into foo.bar cuz the (foo bar) just rolled off my fingers. Of course Arc and I are new to each other so it is too soon to tell, but it feels like my fingers now need a lookahead ability they may not be able to grow. I am especially suspect of the piping : ever catching on.

In this case, I guess the one variable LET syntax of Arc caught on pretty damn fast. :)

-----

2 points by bogomipz 6147 days ago | link

I'm sure you will remember to use foo:bar when the alternative is (fn args (foo (apply bar args)))

Using : only in the most important places might be a good thing. I.e not overuse it for (foo (bar x)) -> (foo:bar x) where it trades readability for 2 characters.

-----