Arc Forumnew | comments | leaders | submitlogin
1 point by rocketnia 5124 days ago | link | parent

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 5124 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.

-----