Hacker News new | past | comments | ask | show | jobs | submit login
A Basic Just-In-Time Compiler (2015) (nullprogram.com)
114 points by etrevino on Aug 14, 2018 | hide | past | favorite | 13 comments



I thought this would be about a JIT compiler for the BASIC language.

Does such a thing exist?


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...

The JIT itself: https://hackage.haskell.org/package/BASIC


VB.net comes to mind


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


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


Crazy how little code it is.


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.


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.


Without doing fancies like this, people wouldn't be talented.


What do you mean by "actual progress"?


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


Chris Wellons wrote elfeed and has a day job; I think he's making progress enough. There's absolutely nothing wrong with having a hobby.


It's an educational blog post.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: