Arc Forumnew | comments | leaders | submitlogin
patch to make arc run on newer mzschemes
28 points by jacobm 6134 days ago | 6 comments
Available here:

http://people.cs.uchicago.edu/~jacobm/arc.mzscheme370.patch

This is an unofficial patch against arc0.tar that "Works for Me" to get arc running on mzschemes from about 350 or so up to the most recent official releases (doesn't work for 3.99.x, though). Use at your own risk, etc.

To install:

$ wget http://people.cs.uchicago.edu/~jacobm/arc.mzscheme370.patch

$ patch -d /path/to/my/local/installation/of/arc0 < arc.mzscheme370.patch

One reason to use a newer mzscheme: on my laptop,

$ time echo "(quit)" mzscheme352.5 -m -f as.scm

Use (quit) to quit, (tl) to return here after an interrupt.

arc>

real 0m6.583s

user 0m4.503s

sys 0m0.389s

$ time echo "(quit)" | mzscheme371.3 -m -f as.scm

Use (quit) to quit, (tl) to return here after an interrupt.

arc>

real 0m1.570s

user 0m0.818s

sys 0m0.089s



3 points by elibarzilay 6133 days ago | link

Jacob, your patch is too intrusive, there is a much easier way to fix this bug. I'll do that in a new message.

Also, you've replaced the `all' definition by the built in `andmap', but that is actually slower.

-----

5 points by elibarzilay 6133 days ago | link

For some reason I don't see the other post in the forum, so I'll repeat it here:

The arc compiler plants many `'nil's to avoid empty bodies. This patch avoids this, and this solves the problem with 372.

Get it at http://tmp.barzilay.org/arc-patch

-----

4 points by ambition 6134 days ago | link

I started to investigate the root cause of the problem.

Changes to src/mzscheme/src/stxobj.c in revision 5159 are the culprit.

Relevant diff here: http://pastie.caboo.se/145227

(I had a script binary-search the mzscheme repository for the breaking change.)

-----

1 point by dyoo 6133 days ago | link

Hurrah: I just got a forked version of arc to run on mzscheme 3.99.

    http://git.hashcollision.org/arc.git
Caveats: I had to disable set-car! and set-cdr! related stuff; still thinking about how to handle that case. Just grep for 'set-car' and you'll see the portions of the code that have been commented out.

Other acts of violence done to the code: I separated parts that dealt with the runtime apart from the stuff dealing with the compile time. I got this running about five minutes ago, so this may not be quite right. :)

-----

1 point by elibarzilay 6133 days ago | link

This cannot be done in a quick patch. If you want mutation in 3.99, you have to use mpairs -- but then you run against rest arguments being the usual immutable pairs.

-----

1 point by febeling 6133 days ago | link

This patch also works on the current MzScheme from MacPorts, which is version 371.

-----