Arc Forumnew | comments | leaders | submitlogin
2 points by rocketnia 4973 days ago | link | parent

I've found a few more bugs.

- Jarc doesn't support coercion from 'sym to 'int.

- Jarc's 'readc returns a spurious -1 character rather than the given end-of-file value. This has further consequences, like causing (readline:instring "") and (prf "anything") to go into infinite loops.

- Rainbow doesn't support 'macex1.

- Rainbow doesn't accept the syntax [].

- Rainbow chokes on (after (err "ignored") errsafe!ignored). In general, it's frustrating to do anything nontrivial with 'after (or 'protect), because an 'on-err anywhere in the "finally" call tree will mess things up.

- Rainbow raises an error when 'rep is called with an untagged argument.

- Both Rainbow and Jarc 17 handle (annotate 'a (annotate 'b 'c)) so that it's distinct from (annotate 'a 'c). Actually, the official Arc behavior is what caught me by surprise here, and I've ended up using the workaround (annotate 'a (list:annotate 'b 'c)) with my own tagged types, but maybe this tag-collapsing behavior is something you'd like to emulate anyway.



1 point by conanite 4939 days ago | link

(stdin) and (string '("")) are fixed now in rainbow, as well as 'writec returning nil. Other bugs ... are noted ...

What is the issue with [] in rainbow? This works:

  arc> ([* _ 2] 3)
  6
Do you have an example?

I added macex1 as an arc fn (it's a builtin in arc3) -

  (def macex1 (expr)
    (let macro car.expr
      (if (and (isa macro 'sym)
               (bound macro)
               (isa (eval macro) 'mac))
        (let mac-impl (rep:eval macro)
          (apply mac-impl cdr.expr))
        expr)))

-----

2 points by rocketnia 4939 days ago | link

What is the issue with [] in rainbow? ... Do you have an example?

I think you'll find it's a very simple example. :-p

  arc> []
  rainbow.parser.ParseException: Encountered "]" at line 1, column 2.
As for 'macex1, there's definitely one inconsistency, which is that it doesn't work unless car.expr works. I also briefly worried about ssyntax, but I'm not sure it's a problem; official Arc lets (assign a.b nil) cause (bound 'a.b) to be true, but I don't blame Rainbow for not emulating that.

-----

1 point by conanite 4938 days ago | link

aha ... fixed []. Changed a "+" to a "*" to allow empty bodies ...

-----

1 point by rocketnia 4943 days ago | link

- Jarc doesn't support coercion from 'sym to 'int.

I don't remember what I meant by this. Official Arc doesn't support this either. XD

I must have done some test that behaved one way on official Arc 3.1, Anarki, and Rainbow and a different way on Jarc (17), but I guess I discarded too many necessary details here.

-----

1 point by rocketnia 4970 days ago | link

- Both Rainbow and Jarc 17 handle (annotate 'a (annotate 'b 'c)) so that it's distinct from (annotate 'a 'c).

Whoops, official Arc does that too. I should have given the examples (annotate 'a (annotate 'a 'b)) and (annotate 'sym 'b); official Arc's 'annotate doesn't wrap the value if it's already of the given type.

-----

1 point by conanite 4938 days ago | link

fixed

-----