Arc Forumnew | comments | leaders | submitlogin
2 points by jazzdev 5322 days ago | link | parent

Jarc 11 has just been released which addresses:

- ssyntax is now expanded at closure time (I noticed this yesterday too, bad...) - can now parse "#\ " - fixed (fn () in) - fixed (fn ())

quasiquote is called backquote for historical reasons. I'll change this when I update Jarc to Arc 3.1

'(is (obj a 1) (obj a 1)) and (iso (obj a 1) (obj a 1))'

Yeah, the latter is useful. They both return t because they share the same code, I can't see any simple, elegant way to have the former fail and latter work.

And I wish I didn't have to choose between Arc behavior and Anarki behavior. I'll probably go with Arc semantics. Yeah, Anarki arc.arc can always be used to get Anarki semantics.

Thanks for the new test cases!



1 point by rocketnia 5321 days ago | link

If there's one way Lathe's made a difference, it's by helping find test cases for Jarc. :-p That said, that role may tone down a bit because... I'm proud to announce that Lathe's buggy-jarc branch now passes all its tests! It's not so buggy anymore.

In the process of getting to that point, I did find a few more things:

- The some-macro.arg case was only partially fixed. In particular, some-macro.arg.another-arg slipped through the cracks, as well as the case where some-macro.arg is in function parameter position. All these give 2 when they should give 1:

  (mac foo (_) '[do 1])
  (def bar () foo.baz.0)
  (mac foo (_) '[do 2])
  (bar)
  
  (mac foo (_) 1)
  (def bar () (idfn foo.baz))
  (mac foo (_) 2)
  (bar)
  
  (mac foo (_) t)
  (def bar () (if foo.baz 1 2))
  (mac foo (_) nil)
  (bar)
I ended up just working around this by manually expanding the ssyntax, just like I talked about not wanting to do. ^_^ Since the majority of the cases were covered already, it wasn't very painful.

- On the other hand, when I changed some of my some-macro.arg.another-arg forms to (some-macro.arg another-arg), I got errors. That's because they were expressions sent to 'setforms, and I'm not quite sure of the nature of this problem, but apparently 'setforms checks the car of the expression, sees that the 'metafn function returns t for it (since 'some-macro.arg has ssyntax), and then tries to 'expand-metafn-call the form even though it isn't really a metafn call. I wasn't able to reproduce this on other versions of Arc, but I didn't try much. The workaround was just to put my code back the way it was, 'cause in (= some-macro.arg.another-arg foo), the ssyntax will expand all in a single step.

- Setting a table entry to nil doesn't remove it. This didn't actually get in my way, and I'm not a big fan of this part of Arc's behavior, but it makes me wonder whether Jarc has any way at all to remove table entries.

- Jarc gensyms are of the form "g1234" rather than "gs1234." This should almost never come up as a problem, but it is a difference.

- Jarc doesn't define 'sref on lists. This means you can't do (++ (q 2)), where q is a list. Since this is an example taken right out of 'enq, queues don't work either. I worked around this by redefining 'enq using (++ (car:cddr q)).

- The type of 0 is num rather than int. In order to check whether something was really an integer, I ended up doing a Java call.

- More aspects of Arc 2 popped up, like 'trunc being absent and 'accum returning its list in reverse order. I won't bother trying to make a list.

That's it for the moment. The next steps, when I get around to them, will probably be reverting Lathe's workarounds that are no longer necessary.

In the meantime, thanks a lot for responding like you have, and I hope with all this hunting for bugs you must be doing that it's still fun. :-p

-----

1 point by jazzdev 5320 days ago | link

Yeah, definitely still fun. I'll add these to the list. Glad your Lathe is working. This certainly has been useful for me (Jarc). My list for "after the compiler" is getting pretty long, but that's okay. I'm learning a lot and definitely having fun.

-----