Narcissus (JavaScript engine)
Encyclopedia
Narcissus is an open source
Open source
The term open source describes practices in production and development that promote access to the end product's source materials. Some consider open source a philosophy, others consider it a pragmatic methodology...

 JavaScript engine
JavaScript engine
A JavaScript engine is specialized computer software which interprets and executes JavaScript . Although there are several uses for a JavaScript engine, it is most commonly used in web browsers.-History:...

. It was written by Brendan Eich
Brendan Eich
Brendan Eich is a computer programmer and creator of the JavaScript scripting language. He is the chief technology officer at the Mozilla Corporation.-Education:...

, who also wrote the first JavaScript engine, SpiderMonkey. Its name is based on the mythical figure of Narcissus
Narcissus (mythology)
Narcissus or Narkissos , possibly derived from ναρκη meaning "sleep, numbness," in Greek mythology was a hunter from the territory of Thespiae in Boeotia who was renowned for his beauty. He was exceptionally proud, in that he disdained those who loved him...

, who fell in love with himself. This relates to the fact that this JavaScript engine is a metacircular interpreter, because the engine itself is also written in JavaScript
JavaScript
JavaScript is a prototype-based scripting language that is dynamic, weakly typed and has first-class functions. It is a multi-paradigm language, supporting object-oriented, imperative, and functional programming styles....

, albeit using non-standard extensions that are specific to SpiderMonkey.

The Narcissus engine can be plugged into Firefox via Zaphod add-on to run scripts on web pages. Since Narcissus has a simpler code-base than "real" JavaScript engines, it can be used to prototype new language features with less effort.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK