Show HN: Thoreau BASIC – What if BASIC hadn't gone out of fashion?
thoreaubasic.comThoreau BASIC started as a joke. I wanted a BASIC where I could type something ridiculous like:
DIM A%(12000000000)
…and have it actually work. Then I kept adding things. The result is Thoreau BASIC, a free x64 BASIC interpreter inspired by GW-BASIC, running both as a normal Windows program and directly on bare-metal UEFI without an operating system.Version 3.2 has become considerably more ambitious than the little interpreter I originally intended to write. The language still deliberately looks and feels like old Microsoft BASIC. Line numbers, GOTO, GOSUB, PRINT, PSET, LINE, CIRCLE, DRAW, etc. are all there. But underneath that rather innocent-looking surface is now quite a lot of machinery.
Some of the current features:
native x64 JIT compilation, with automatic fallback to the interpreter
PARFOR for multithreaded numeric loops
SSE2 / AVX2 acceleration where available
64-bit addressing and very large arrays
native complex, quaternion and other hypercomplex numbers
arbitrary-resolution 24-bit graphics
sprites, bitmap operations, polygon filling and mouse input
TCP/IP networking on Windows and UEFI
an integrated profiler, debugger, tracing and program-analysis tools
CREATEEXE to turn a BASIC program into a standalone Windows executable
CREATEEFI to turn the same program into a directly bootable UEFI application
The sound system has also grown rather out of proportion. Thoreau BASIC can now handle up to 32 live instrument channels plus 64 sound effect channels and 256 voices, with real-time pan and brightness control. NOTE and SOUNDKEY can be used more like playable synthesis primitives rather than just old-school BASIC beeps.3.2 also expands the less glamorous but surprisingly useful parts of the environment. There is better file browsing and selection with GETFILES and SELECTBOX, longer case-preserving paths, recovery/file-flush facilities, and considerably more detailed SYSTEMINFO$ diagnostics. The latter is useful for seeing things such as available CPU capabilities and the execution environment while debugging performance differences between machines.
One thing I've spent a lot of time on recently is making the BASIC programs themselves fast enough that they stop feeling like demonstrations of an interpreter. For example, the current Mandelbrot demo is a real-time interactive fractal explorer. Mouse movement pans the fractal, left-click zooms in and right-click zooms out, while the BASIC program continuously redraws and displays the frame rate.
There are also 3D and procedural demos, sprite programs, networking examples, hypercomplex fractals and games. An important design constraint throughout the project has been that Windows and UEFI should execute essentially the same BASIC language. A program shouldn't suddenly become a different species just because there is no operating system underneath it.
And yes, I am fully aware of the absurdity of combining GOTO 100 with AVX2, multithreading, TCP/IP and quaternion arithmetic. That is increasingly the point. I'm interested in the question: What would BASIC look like if it had never gone out of fashion? Thoreau BASIC 3.2 is my current answer.
I'd be especially interested in feedback from people who remember GW-BASIC/QBasic, compiler/interpreter people, and anyone sufficiently unreasonable to enjoy the idea of booting a modern x64 PC directly into a BASIC interpreter/JIT compiler.
> What would BASIC look like
Check PureBasic. https://www.purebasic.com/
Compiles to native, interfaces to C libraries, available on most platforms...
I was a pretty successful BASIC programmer, starting on DEC PDP-11 RSTS/E BASIC. Line number BASIC was good enough for simple applications, but quickly turned into spaghetti code.
Later, the VAX had BASIC with functions and subroutines and dropped the line numbers and this version of BASIC was significantly better. It was procedural, but you could organize your code into modules, keeping it readable and maintainable.
Eventually the non line number BASIC spread to the PC. Microsoft Professional Development System, then Visual BASIC.
I was writing BASIC code for everything until a few years ago -- VB.NET -- until it was really clear that it had become a totally second-class citizen and I switched to C#.
I still think VB.NET is vastly more readable than C/C#/Java etc.
So much easier then JavaScript/typescript, Python, and many other languages.
"Visual Basic" is still actively developed, although not by Microsoft.
Ah. A VB.NET clone.
The real Visual Basic not by Microsoft is TwinBASIC(closed source).
It’s been 2nd class for a long time, but I loved it back in the early 2000s.
You really felt productive doing anything with Visual Basic 6, at least until things slowed to a crawl because it wasn't so performant or it was held back by the typical Access database. You didn't need 200 hours of YouTube tutorials about the front-ed UI framework du jour to get going.
VB.NET was always second class to c#.
Unfortunately it was a one-to-one match to C#.
It would have been much netter if it was based on Visual Basic 6
.NET 2.0 introduced a few things back.
VB 6 way to do COM still wins out, though.
Second class? Maybe in the perception of some C-loving programmers.
VB.NET can do everything what you can do with C#. Saying that C# is better than VB.NET is like saying that French is better than Spanish.
Recent and related:
Show HN: I wrote a BASIC interpreter that boots on UEFI machines - https://news.ycombinator.com/item?id=49410814 - Aug 2026 (44 comments)
With retirement + AI I have stopped giving a shit what programming language something is written in; If you can write it in BASIC, go for it.
Xojo, Mikroe BASIC, VBA, and VB.NET are still around even if they don't make HN headlines.
If that was the future of the language, I'm glad BASIC is dead.
To give a bit more of context, here is a small subset of the new instructions:
What a terribly designed language.- SOUND PRELOAD - SOUND INFO - SOUNDGROUP - SOUNDNAME$ - SOUNDAVAILABLE - LOADWAV - PLAYWAV - STOPWAV - WAITWAV - PAUSEWAV - RESUMEWAV - WAVCTL - DELWAV - WAVACTIVE - WAVPLAYING - WAVSTATE - WAVPOS - WAVLENGTH - WAVLOADED - WAVSLOT - WAVCHANNEL - LOADMID - PLAYMID - STOPMID, WAITMID, DELMID, etc.
too bad it's for win, raspberry pi, arduino, esp32, etc need this sort of stuff. lot's of hardware folks who just want to do hardware and not learn programming. they might eventually learn python or C, but BASIC would be so much better.
A Raspberry Pi/ARM port is the most realistic next step; microcontrollers are a different beast. For ESP32/RP2040 today, MMBasic/PicoMite is worth a look.
I'm guessing those type of folks will be well served by LLMs and need not care about specific languages.
Basic died because it lacks scoping, and has no locals. This makes doing anything on a large scale a pain...
Structured BASIC was already the way in CP/M, Vax,MS-DOS, Amiga, and even Dartmouth BASIC evolved to support structured programming.
Structured BASIC dialects have function-local variables, BASIC dialects that support linking separately compiled modules support exported and non-exported variables, etc.
That's original Basic. Recreations are more complete.
Very cool. Are line numbers required? Are there plans for OS system control like setting system volume or screen brightness?
I definitely want a code editor with a setting to number the lines by 10s.
and yes, line numbers are required.
noted for future releases. :-)
I still enjoy and use https://blitzmax.org/
This looks like it's realy getting better all the time.
PHP
Really not the same.