
A Basic Just-In-Time Compiler (2015) - etrevino
https://nullprogram.com/blog/2015/03/19/
======
Narishma
I thought this would be about a JIT compiler for the BASIC language.

Does such a thing exist?

~~~
omaranto
Lennart Augustsson implemented a JIT for BASIC as an EDSL in Haskell using
LLVM.

A blog post he wrote about it: [http://augustss.blogspot.com/2009/02/more-
basic-not-that-any...](http://augustss.blogspot.com/2009/02/more-basic-not-
that-anybody-should-care.html)

The JIT itself:
[https://hackage.haskell.org/package/BASIC](https://hackage.haskell.org/package/BASIC)

------
adito
Any recommended reading to know more about JIT and stuff. Something along
tutorial for writing JIT compiled language from scratch.

------
adiusmus
My sleeping Forth system is about to wake up and have a different JIT added to
it.

------
lingzb
Crazy how little code it is.

~~~
pjc50
Well, it doesn't have any control flow, symbols, or system calls, so most of
the work is in setting up a buffer and calling conventions. There's also no
language intermediate representation or optimiser.

The W^X machinery bans self-modifying code in the traditional sense, but there
may be situations where creating little specifically-optimised gadgets like
this can benefit a program.

------
bayesian_horse
I'm always torn between my principle not to judge other peoples fancies and
wondering what kind of actual progress talented people like this could make.

~~~
saagarjha
What do you mean by "actual progress"?

~~~
iamgopal
Being happy. And they do make real progress in this regards.

