What does HackerNews think of narcissus?

INACTIVE - http://mzl.la/ghe-archive - The Narcissus meta-circular JavaScript interpreter

Language: JavaScript

Iirc NarcissiusJS was a test-bed for future JS features at a time when development was a bit slow that allowed quick prototypes.

https://github.com/mozilla/narcissus https://wiki.mozilla.org/Narcissus

> Attempting to sandbox user-supplied Javascript just seems like an exercise in futility.

You just need to run the javascript in a interpreter written in javascript /sarcasm

>> EDIT: oh god it's real https://github.com/mozilla/narcissus

Take it up with Brendan Eich:

Remember, I was recruited to "do Scheme", which felt like bait and switch in light of the Java deal brewing by the time I joined Netscape. My interest in languages such as Self informed a subversive agenda re: the dumbed down mission to make "Java's kid brother", to have objects without classes. Likewise with first-class functions, which were inspired by Scheme but quite different in JS, especially JS 1.0.[1]

I presume you saw the word basically in my post? There's no doubt it is simplified, but that's a strength as well as a weakness.

But anyway:

A metascircle evaluator: https://github.com/mozilla/narcissus

It's not Homoiconic, and nor does it have macros - but a number of the languages the OP named as "good" languages lack both these features too.

I stand by my point: Javascript is a perfectly good language.

[1] https://news.ycombinator.com/item?id=2786720

This was an april fool's joke from last year: http://badassjs.com/post/20294238453/webkit-js-yes-it-has-fi...

In the non-joke category, Mozilla created a JavaScript interpreter written in JavaScript (to test new language features): https://github.com/mozilla/narcissus/

Another JavaScript VM in JavaScript (this one by Brendan Eich and Mozilla): https://github.com/mozilla/narcissus

Narcissus is pretty cool - it's used as a testbed for new Harmony features. It's more reliant on some Spidermonkey specific features than Continuum, though.

>TCO is an optimization, it doesn't affect correctness. So you can ignore not having it, until you run out of stack.

Correct. Though CPU performance is an issue that tail recursion optimisation addresses too. For simple functions building up the stack frames and deallocating them afterwards can be more work than the function itself. For deep recursion stack space is the problem you usually hit first, but for code with tight performance requirements no always.

>And you certainly won't want to implement Javascript in Javascript.

Oh I don't know, it could be an interesting project if only for an exercise in intellectual onanism!

In fact I've heard of it being done a few times. The first ones that pop up in Google are http://sns.cs.princeton.edu/2012/04/javascript-in-javascript... which is aimed at sand-boxing (and looks like an interesting if not efficient idea) and https://github.com/mozilla/narcissus/ which has the stated goal of being used for experimentation with the language itself (so the fact it is implemented in javascript is probably less relevant).

This appears to be the same goal as https://github.com/mozilla/narcissus/ but substantially less clever.
Narcissus https://github.com/mozilla/narcissus/

It's been used as part of the Narrative JavaScript project to parse the JavaScript-like njs language and compile it back to JavaScript. http://www.neilmix.com/narrativejs/doc/

That directory is out of date. (I'm not sure why it hasn't been removed yet.) The new project page is here: https://github.com/mozilla/narcissus

We moved it to GitHub to make it easier for people to submit pull requests and the like.