Arc Forumnew | comments | leaders | submitlogin
arc-exe.scm now fully compatible with ac.scm
10 points by eds 6146 days ago | 6 comments
I recently noticed that the definition of arc-exe.scm was diverging from that of ac.scm. I tried correcting the problem manually, but the differences were many and I didn't feel like doing that kind of work, so I looked for a way to import ac.scm directly into arc-exe.scm.

After several hours of messing around with arc-exe.scm, I finally found the require-namespace function which makes it unnecessary to contain a complete copy of ac.scm inside arc-exe.scm. This means that the arc-exe.scm code is now significantly shorter (without any duplicated code), and won't have to be updated with every update to ac.scm.

To do this I had to make a few small tweaks to other .scm files. Those changes are listed below (I hope none of them are a problem for anyone):

ac.scm: removed (require ac) at end of file which prevented other modules using (require "ac.scm").

as.scm: changed (load "ac.scm") to (require "ac.scm") because of above change.

bitops.scm: changed (require ac) to (require "ac.scm") because name ac isn't visible when importing bitops.scm from another module.



3 points by nex3 6146 days ago | link

Very cool. Would it be possible to add an arcc.sh or something that would make using this easier?

-----

1 point by eds 6146 days ago | link

What would arcc.sh do exactly?

-----

1 point by nex3 6146 days ago | link

I guess I didn't really understand arc-exe all that well - I thought it was compiling Arc code, but I guess it's compiling Arc itself. Oops :-p.

It might still be nice to have a build-arc-exe.sh file or something.

-----

1 point by sacado 6146 days ago | link

Wow, congratulations... I was about to try to work around it, but since you did it... :)

-----

1 point by treef 6144 days ago | link

congratz this really is a good solution

-----

2 points by offby1 6146 days ago | link

Ooh, I like the sound of this.

-----