Arc Forumnew | comments | leaders | submitlogin
1 point by akkartik 3661 days ago | link | parent

Arc3.1 and Anarki are built on the outdated mzscheme language. But you might be able to use Pauan's Arc/Nu: https://github.com/arclanguage/arc-nu. We'd love to hear your experiences if you try it out.


1 point by jsgrahamus 3659 days ago | link

Can anyone refer me to the method of accessing the underlying mzscheme or racket functions?

Thanks, Steve

-----

1 point by akkartik 3659 days ago | link

You mean in Nu? % on Nu is like $ on anarki. Does that answer your question?

-----

3 points by jsgrahamus 3659 days ago | link

I didn't specify. Could you give an example in each of them? Thanks, Steve

-----

2 points by akkartik 3659 days ago | link

To call racket functions in anarki:

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

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

-----

2 points by jsgrahamus 3658 days ago | link

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

-----

1 point by akkartik 3658 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 3657 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.

-----