Arc Forumnew | comments | leaders | submitlogin
Errors in anarki stable
2 points by Oscar-Belletti 228 days ago | 12 comments
I followed the instructions, and tried to mutate a string as in the tutorial:

    $ git clone
    $ cd anarki
    $ git checkout stable
    $ ./
    main: not defined or required into the top-level environment
    ./ line 40: [: too many arguments
    Use (quit) or ^D to quit, (tl) to return here after an interrupt.
    arc> (= s "foo")
    arc> (= (s 0) #\m)
    Error: "string-set!: contract violation\n  expected: (and/c string? (not/c immutable?))\n  given: \"foo\"\n  argument position: 1st\n  other arguments...:\n   0\n   #\\m"
    arc> s

Edit: I'm using racket v6.6, on Arch linux 64-bit

4 points by malisper 225 days ago | link

That looks like [this]( which should have been fixed back then.


3 points by akkartik 225 days ago | link

Many thanks! I'll merge it to stable.

Edit: Done.


2 points by Oscar-Belletti 221 days ago | link

I checked now, string mutation works.

But what about the other warnings? Is the "main: not defined" warning due to my racket version?

The second warning (./ line 40: [: too many arguments) disappears if I change (in

    if [ $repl = '#t' ]

    if [ "$repl" = '#t' ]


2 points by akkartik 221 days ago | link

Yes, I wondered what to do about that and who if anyone cared about all those features. Then I forgot :/ I'll create a more bare-bones but working script today.

Edit 14 minutes later: Done: Do let us know if you have any other problems. (I've only tested the script on Mac at the moment.)


2 points by Oscar-Belletti 221 days ago | link

Now from the command line I don't get any warnings.

However, running arc in emacs (I use arc.el and arc-inferior.el) gives an error:

    rlwrap: error: My terminal reports width=0 (is it emacs?)  I can't handle this, sorry!
rlwrap doesn't work in emacs and this IMO is the reason the previous script had the --no-rl option.


2 points by akkartik 220 days ago | link

Ah, I see. Ok, I'll bring that back.

Thanks for explaining the reason for that flag.

Edit 15 minutes later: I've made the flag to disable rlwrap '-n' like in the master branch.

(I didn't pick the original flag, so I'm not attached to that name. I can change it if you want, I just want both branches to be consistent. I also renamed the script to 'arc' like in the master branch, just to make my life easier. I'll update the instructions at next.)


2 points by Oscar-Belletti 220 days ago | link

Now it works both from the command line and from emacs.

It's ok for me that the the flag is -n.

I think that the arc script was named "" because the folder which is used by the news server is "arc", and it would conflict. We can either take back the "" name or change the news server's directory to something else, perhaps "www" like in the master branch.

Edit: We should also change the flag of the default program name in inferior-arc.el (line 95):

    (defvar arc-program-name "arc --no-rl"

    (defvar arc-program-name "arc -n"


2 points by akkartik 220 days ago | link

Thanks for those comments!

Yeah you're right. I'm going to switch to everywhere.

Edit 15 minutes later: all done, though the commit histories are a mess. Let me know if I missed renaming the script in any places!


2 points by Oscar-Belletti 218 days ago | link

"Thanks for those comments!"

You're welcome.

I'll certainly tell you if I find some references to the old "arc" name.


2 points by akkartik 227 days ago | link

Gosh, I haven't looked at 'stable' in ages and it looks like it's mostly unmodified since 2009, before the Racket days. It's still using 'mzscheme', which isn't even in my Racket 6.3 distribution on Mac OS anymore. And I no longer remember where we hacked Racket to permit mutable strings :/ I didn't see any diffs in ac.scm that might be responsible. Maybe someone else knows?


2 points by zck 226 days ago | link

Hrm, perhaps it shouldn't be called "stable". That suggests a more-tested release cycle. Maybe something like "original" or "pure", or even "3.1-release"?

I like the idea of having something that's what was originally released, but doesn't really suggest that it's what someone should use if they're new to Arc.


4 points by akkartik 226 days ago | link

Well, we do also have 'official' which is exactly what was released.

I think the intent is that 'stable' is guaranteed to be backwards compatible with 'official'. So the real issue is that 'official' is stale.