Lambda the Ultimate

inactiveTopic Narcissus: JavaScript in JavaScript
started 4/7/2004; 7:43:57 AM - last post 4/8/2004; 7:35:11 AM
Chris Rathman - Narcissus: JavaScript in JavaScript  blueArrow
4/7/2004; 7:43:57 AM (reads: 11043, responses: 3)
Narcissus: JavaScript in JavaScript
Not sure if I understand the motivation for building a meta-circular interpreter, but the project might be of interest to those using or tinkering with javascript. The source is fairly easy to follow at this juncture in the project.
Posted to implementation by Chris Rathman on 4/7/04; 7:46:06 AM

Dan Shappir - Re: Narcissus: JavaScript in JavaScript  blueArrow
4/7/2004; 2:34:31 PM (reads: 240, responses: 0)
This is interesting if only as a demonstration of large(er) scale programming using JavaScript. From glancing at the code, I do have a couple of issues with it:
  1. Even though using JavaScript pretty much throws performance out the window, I'm not sure I approve of the use of regular expressions for parsing.
  2. Using ScriptMonkey extensions means it's unusable for > 95% JavaScript users out there.
  3. If you are going to use eval() why not simplify the interpreter to:

eval(s);

Sjoerd Visscher - Re: Narcissus: JavaScript in JavaScript  blueArrow
4/8/2004; 1:12:57 AM (reads: 207, responses: 0)
I'm not sure I approve of the use of regular expressions for parsing.

Isn't parsing exactly what regular expressions do?

Chris Rathman - Re: Narcissus: JavaScript in JavaScript  blueArrow
4/8/2004; 7:35:11 AM (reads: 175, responses: 0)
The problem would be related to the fact that the interpreter would have to implement regex as part of the core parser - requiring that the regex engine be written as a language before tackling the target language. I suppose that one could argue that regexp are part of the language definition itself.

Although ScriptMonkey is used, the utilized functionality doesn't appear to involved (i.e. it shouldn't be hard to replicate in other environments).