Arc Forumnew | comments | leaders | submitlogin
Introducing Chops (a text preprocessor in JS) (rocketnia.wordpress.com)
2 points by rocketnia 5139 days ago | 2 comments


1 point by rocketnia 5139 days ago | link

I was going to post this on Friday, but I put it off so I could format it as a blog post. Considering http://arclanguage.org/item?id=14795, it looks like Pauan has beat me to the punch on the topic of JavaScript macros. ^_-

In case you're wondering, Chops doesn't have much to do with Arc. In fact, the example macros I talk about could conceivably be written in Arc too, and I'm sure Pauan will be tempted to rant about how they're perfectly possible in arc2js. ;)

Some differences between my Chops and Pauan's arc2js:

- I'm using JavaScript as the implementation language rather than Arc.

- My source format isn't Arc code or even s-expressions. The macros get to parse their own bodies, very much like Penknife macros.

-----

1 point by Pauan 5139 days ago | link

"I'm sure Pauan will be tempted to rant about how they're perfectly possible in arc2js. ;)"

Oh, I could. But to be honest, JS needs macros badly enough that I say the more the merrier. Plus, I just plain love macros.

Besides, your project seems different (and somewhat interesting). Variety and experimentation is good.

Also, I was surprised to see you link to my blog.

-----