Ever dream of compiling your own Commodore 64 BASIC language programs into fast, efficient machine language programs? This is now a reality once again. Previously a tool used especially by only the last century's elite Basic programmers, wielded with almost godly power to turn many raw basic .prg (programs) into fast lean performing programs (.prg) [ .prg file on disk >> faster ,prg on disk], Kraksnax has released once again this classic diskette tool in late Summer 2023.
Available as a .d64 disk image as well as a native .prg executable.
Codon is a high-performance Python compiler that compiles Python code to native machine code without any runtime overhead. Typical speedups over Python are on the order of 10-100x or more, on a single thread. Codon's performance is typically on par with (and sometimes better than) that of C/C++. Unlike Python, Codon supports native multithreading, which can lead to speedups many times higher still.
Melody is a language that compiles to ECMAScript regular expressions, while aiming to be more readable and maintainable. This:
16 of "na";
2 of match {
<space>;
"batman";
}
turns into this: /(?:na){16}(?: batman){2}/
What can you do with Vision BASIC? Pretty much anything you want to. Speed will no longer be a problem! Why? Because on it's own, Vision BASIC is VERY fast! But when you need to crank out even more speed, all you need to do is insert machine language anywhere you wish to. Yes, you can actually type machine language instructions right next to BASIC commands! You won't need to load in external machine language files, and you won't need to poke machine language code to memory. This is because Vision BASIC also doubles as an assembler – you can write BASIC programs with it or machine language programs with it, or a blend of the two!
Vision BASIC also includes a whole new batch of commands to help you realize your programming dreams! Need sprites? Vision BASIC's got you covered! Need sound and graphics? Yep, gotcha covered there too! Vision BASIC was designed to greatly minimize your need to POKE around with all those crazy registers. In fact, you might never need to POKE again! And if you find yourself needing a command or function that isn't available, you can simply create it yourself – by creating the needed subroutine and calling it by whatever name you choose to give it. These "user defined" commands and functions can be saved into separate files and added to your programs whenever you need them!
The Selfie Project provides an educational platform for teaching undergraduate and graduate students the design and implementation of programming languages and runtime systems. The focus is on the construction of compilers, libraries, operating systems, and virtual machine monitors. The common theme is to identify and resolve self-reference in systems code which is seen as the key challenge when teaching systems engineering, hence the name.
Selfie is a self-contained 64-bit, 11-KLOC C implementation of:
Selfie generates ELF binaries that run on real RISC-V hardware as well as on QEMU and are compatible with the official RISC-V toolchain, in particular the spike emulator and the pk kernel.
In this Github repository, I'm documenting my journey to write a self-compiling compiler for a subset of the C language. I'm also writing out the details so that, if you want to follow along, there will be an explanation of what I did, why, and with some references back to the theory of compilers.
But not too much theory, I want this to be a practical journey.
Emscripten plugs into llvm-gcc or CLANG and intercepts the intermediate code, which it then translates into JavaScript. That JavaScript then runs natively in modern browsers with little evidence of slowdown. As proofs of concept they compiled Unreal 3, the Nebula3 engine, ScummVM, VICE, OpenSCAD, itself (yes, it's self-hosting), and a half-dozen popular programming languages into JavaScript and run them inside of web browsers.