Arc Forumnew | comments | leaders | submitlogin
2 points by akkartik 3658 days ago | link | parent

To call racket functions in anarki:

  arc> ($.pair? '(1))
  #t
In Nu:

  > (%.pair? '(1))
  #t


2 points by jsgrahamus 3657 days ago | link

Thanks, Akkartik. Is there a way to do such from arc itself?

-----

1 point by akkartik 3657 days ago | link

No, you'll have to add it. The simplest way to do this is probably aw's original hack: http://hacks.catdancer.ws/ac.html

You'll need to add one line to ac.scm, and then:

  arc> (ac-scheme.pair? '(1))
  #t
Feel free to rename ac-scheme to $ or % if you think you'll use it often enough.

If you start using this you'll start finding the need for some of the other functions in that link, which transform data back and forth to the way racket or arc likes it. Come back and ask us more questions when you run into errors like this:

  arc> (ac-scheme.length '(1 2 3))
  Error: "length: contract violation\n  expected: list?\n  given: '(1 2 3 . nil)"

-----

3 points by Pauan 3656 days ago | link

I would just like to point out that Arc/Nu is fully compatible with Arc 3.1, and it doesn't need conversions between Racket and Arc, so it's the easiest way to deal with Racket in Arc programs.

-----