Live data from Hacker News

Write Yourself a Haskell in Lisp

gergo.erdi.hu

11–14 of 14 posts

Re: Write Yourself a Haskell in Lisp

#11
post #10
post #7

Earlier quoted context omitted.

It would be interesting to see how many languages you could nest before the interpreter becomes too slow to be of use.

What would be interesting about it?

seeing how many languages you could nest before the interpreter becomes too slow to be of use.

Re: Write Yourself a Haskell in Lisp

#12
post #7

Earlier quoted context omitted.

You can use this tutorial for the first step if you want to do it: Write Yourself a Scheme in 48 Hours by Jonathan Tang. http://jonathan.tang.name/files/scheme_in_48/tutorial/overvi...

It would be interesting to see how many languages you could nest before the interpreter becomes too slow to be of use.

I've always thought that this would be a better definition of what a "compiler" is vs what an "interpreter" is:

A compiler, if asked to "execute" itself a million times will generate code that is still reasonably fast.

An interpreter, if asked to "execute" itself a million times, will generate code that is a million times slower.

Re: Write Yourself a Haskell in Lisp

#14
post #7

Earlier quoted context omitted.

It would be interesting to see how many languages you could nest before the interpreter becomes too slow to be of use.

I've always thought that this would be a better definition of what a "compiler" is vs what an "interpreter" is: A compiler, if asked to "execute" itself a million times will generate code that is still reasonably fast. An interpreter, if asked to "execute" itself a million times, will generate code that is a million times slower.

Theoretically, one could write an interpreter specifically for the purpose of nesting other interpreters, which would then (nearly) remove itself from memory as it transfers control to the second interpreter, but I know I'm not quite insane enough to start working on such a thing.
Post reply on HN