Monday, February 22, 2010

Arc (Jarc) or anything as a scripting language

I'm testing the hypothesis that Arc could be used as a scripting language. I'm using Jarc, my own Arc interpreter, of course. This is easy on OS X because the execve() system call accepts any number of arguments. So I can start a script with
#!/usr/bin/java -cp /usr/local/lib/jarc.jar jarc.Jarc
But it doesn't work on Linux since the execve() system call only accepts one argument. :-( So I wrote a little C program, which was fun since I haven't written any C in over a decade at least. So now I can do
And voila! I can write scripts for Linux too. You can read the whopping 26 lines of jarc.c if you are interested in the not so fascinating details. Yeah, it'll probably need to be enhanced so I can pass JVM args also. But I haven't needed that yet, and I'm on a write-it-when-you-need-it regimen.

The other ugly bit is that I actually had to change the Jarc parser. Of course, this is the great thing about writing your own language implementation---you can change whatever you want! Jarc has to ignore the first line of the file. So it treats # in line 1 column 1 as a comment character. Yes, I could have had jarc.c make a temporary file without the first line, but that seems inelegant, though much more general purpose. So this requires the latest Jarc (version 2) which I released last week on Jarc SourceForge download page. Now whatever will I do with it?


  1. You have written about the scripting language it so good article really i like it thanks for sharing.
    internet marketing melbourne

  2. Hi!
    Your topic on the scripting language Its very nice topic because your topic of concentration is also very excellent. You have plant a very significant concern. I liked it. Thanks for sharing with me.

    Toronto Marketing Company

  3. Blog is informative and motivated me a lot!
    You have made an awesome attempt and is doing consistanty good.
    website design hampshire

  4. Hi! Nice post. I learn something more challenging on different blogs every day. It will always be stimulating to read content from other writers and practice a little something from their store.

    how to advertise your website

  5. You must be aware that scripting is not easy to get good at. Read as much in the wiki as you can, test it out in the Command bar and output, and try simple scripts to start with. Believe it or not, but tools that allow cars and airplanes to move are very advanced.It may take anywhere from weeks to years to get really good at scripting. However, this skill is very valuable in making pretty much anything you dream. That's what Roblox is all about.

    Property for Sale

  6. Lots of thanks for this post. I think it is a very good post. It helps us many away. So many many thanks for this article.

    homes and land for sale

  7. Greeting everyone, tally a overnice article. I see this place and get lot of essential program. I intercourse this business few of my familiar friends and they acquiesce to trip this tract. Thanks

    cheap price house

  8. Very nice and helpful information have been given in this article. It’s a most important post. Please every one visit this site quickly. Thanks.

    Houses for sale

  9. These three biggest moneylenders that are left are JP Morgan, Wells Fargo and Countrywide. The three organizations are not forcefully looking for these sorts of advances and are turning out to be less dynamic in the less couple of months. The issue with this is it will prompt to less rivalry, considerably more tightly credit norms and higher loan fees. cash advance chicago