Arc Forumnew | comments | leaders | submitlogin
Anarki is now a Racket package
7 points by rocketnia 3174 days ago | 4 comments
The interface might change, but there's now a new way to run an Anarki REPL. If you have Racket installed, you can just do this:

  $ raco pkg install anarki
  $ racket -e "(require anarki) (anarki-repl)"
  arc> (prn "Hello, Anarki!")
Well, that opens Anarki without changing the current directory. You might want to do this instead if you want to load Anarki's libraries:

  $ racket -e "(require anarki) (current-directory anarki-path) (anarki-repl)"
Racket's raco command supports some other useful operations on installed packages:

  $ raco pkg update anarki
  $ raco pkg remove anarki
This support came about thanks to kinnard asking what it would take to have an Arc module system, particularly a package manager.[1] I replied with some actionable ideas, and this is the first substantial piece I've implemented.

Rationale: Anarki code often depends on Racket imports, and if we just piggyback on Racket's package manager, it's going to be pretty easy to declare those dependencies. So let's suppose we're using Racket's package manager. In order to start from a fresh Racket installation and install an Anarki-based Arc project using `raco pkg install`, one of its dependencies needs to be Anarki itself. Now it can be!

So far I've listed myself and akkartik as authors in the Racket package registry,[2] and we have the ability to edit the package description and manage the author list. Anarki is a project where anyone can contribute if they're interested. If you've contributed to Anarki and you're interested in being on the author list, we can make that happen too.

[1] https://github.com/arclanguage/anarki/issues/40

[2] https://pkgs.racket-lang.org/



5 points by akkartik 3174 days ago | link

This is glorious. Thanks rocketnia for doing this, and thanks kinnard for repeatedly but politely pushing for it.

-----

2 points by kinnard 3173 days ago | link

Glad to be of service.

-----

2 points by rocketnia 3174 days ago | link

Clickable links:

[1] https://github.com/arclanguage/anarki/issues/40

[2] https://pkgs.racket-lang.org/

-----

3 points by rocketnia 3174 days ago | link

Starting Anarki at the command line hasn't changed if you're using the "arc" script. If you're invoking boot.scm yourself (e.g. if you're on Windows like me), the command has changed a bit.

Before:

  $ racket -f boot.scm -e "(tl)"
After:

  $ racket -t boot.scm -e "(tl)"
Unfortunately, the Racket package builder wants to compile every .scm file it finds in the file tree, and it expects all of those to have a #lang or a (module ...) form surrounding the whole file. I had to change boot.scm to make that work. I tried several ways to make "-f boot.scm" work, but "-t boot.scm" was the closest I could get.

-----