Arc Forumnew | comments | leaders | submitlogin
1 point by evanrmurphy 5155 days ago | link | parent

No responses yet, eh? I should have known that the incredible glory of this idea would leave you all speechless. XD

Here's another thing it gives you for free, super convenient alist initialization:

  > (x.1 y.2)
  ((x 1) (y 2))
  > (= a that)
  ((x 1) (y 2))
  > (alref a x)
  1
And then, with a variation on http://awwx.ws/alistcall, you get super convenient alist lookups too:

  > a.x
  1


2 points by akkartik 5155 days ago | link

Patience, I was trying to make wart autoquote :) The obvious place to start is just call with one arg, but I am stumped trying to make this test pass:

  (test "call on one arg autoquotes"
    :valueof (call 'idfn xxzx)
    :should be 'xxzx)
It's the old problem with wart: there's no way to check if a variable has a lexical binding.

Hmm, I wonder if I should shoot for the moon and find the right handler to install for the UNBOUND-VARIABLE condition..

Update: I'm tantalizingly close, but perhaps it's not possible. This page outlines how: http://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node322.html

But I'm concerned by the phrase, "If this [restart clause] were part of the implementation of symbol-value.." Does that mean it isn't possible?

If we can do this we can also handle 'undefined-function and turn wart into a lisp-1!

-----

1 point by evanrmurphy 5155 days ago | link

Oh I see. You're actually doing something instead of just sitting here yappin' about possibilities. Delay excused then. XD

-----