5 ms·
LOL. I, too, recently implemented BASIC. It was something to do while bored. I was motivated by a desire to play the old star trek game, which it now does. It'
by _tom_ 6y ago
LOL.
I, too, recently implemented BASIC. It was something to do while bored. I was motivated by a desire to play the old star trek game, which it now does. It's called TrekBasic, but the github project it still private, as it's just a fun hack.
It is not as cool as yours, as I wrote it in python. It does have better features for developers than most BASICs from long ago:
Code breakpoints
Data write breakpoints
Single stepping
Execution timing
Execution tracing
Code coverage reports
Reformatting
Renumbering
I think my next step will be to move it to LLVM, just for the fun of learning about LLVM.
- _tom_ 6y agoOk, I just made the repository public, in case anyone is curious: https://github.com/cocode/TrekBASIC https://github.com/cocode/TrekBASIC
- ryandrake 6y agoNice, I remember vividly being 11 years old and typing this line by line into a Commodore 64, carefully reading it from a ragged copy of “101 BASIC Computer Games”. Took me three days to get it right. I slept next to the computer so my dad wouldn’t turn it off by mistake. Later ended up porting it to Pascal and adding graphics, in an attempt to learn the language.
- benibela 6y agoI still write almost all my code in Pascal Why am I wasting time on Pascal?
- mysterydip 6y agoIf Pascal does the job, why not?
- butterisgood 6y agoThere are modern iOS games written in Delphi last time I looked around. I've been spending a little time with ActiveOberon, which might look familiar to a Pascal user. It's an interesting language and environment. Reminds me of Smalltalk the way the platform works (or Pharo for a modern Smalltalk environment), except you absolutely can create more "native" binaries for your environment with it. ActiveOberon might be one of the first places async/.await style concurrency was implemented. It definitely predates Rust by a bit. The Fox compiler is an interesting beast too! They're still working on the language. The tip of their SVN tree has enhancements over the language report that was published in 2019 http://cas.inf.ethz.ch/news/2 http://cas.inf.ethz.ch/news/2 Now there's ternary conditionals, functors (per C++, not Category Theory) etc. Last update to the repo was 11 days ago. It's very much alive it seems :-)
- jes5199 6y agoPascal was my first language, and I really miss some things about it that didn’t make it into the popular modern languages
- stevekemp 6y agoI wrote a simple BASIC too, for nothing more than a sense of nostalgia: https://github.com/skx/gobasic https://github.com/skx/gobasic
- xkriva11 6y agoOld Basics had quite impressive debugging features. It had breakpoints (STOP), you were able to inspect and change the content of the variables, change code before or after the breakpoint - and even on the same line - and then CONTINUE from the interruption point. Even ZX80 with 4 KiB of ROM (Basic + OS routines + 0.5 KiB character table) was able to do that (except modification of the same line because it had one command per line only)
- jmmv 6y agoThey indeed are. As I keep referring to the Locomotive BASIC manual and the QuickBASIC builtin help to implement my version, I'm amazed at how many features those had. Especially the latter was a great IDE even when compared to today's standards.
- Doctor_Fegg 6y agoLocomotive was a great dialect. Fully featured and consistent with few of the arcane incantations that other 8-bit BASICs had.
- perl4ever 6y agoI would like to use LLVM, to target basic (perhaps VBA or VBScript). Or the JSON used by Power Automate. But it's probably beyond my capabilities.
- Koshkin 6y agoYou’d probably spend more time learning LLVM than what it might take you to reinvent your own parsing method. (For relatively simple cases I usually recommend flex and bison, they are simple tools that can do wonders.)
- perl4ever 6y agoSorry I wasn't clear. Making a backend module for LLVM would presumably allow me to translate a lot of languages into VBA or Power Automate, or maybe Power Query M which is something I'd like to do because I am not a SWE and my machine is locked down at work, and it's more interesting/amusing to work around that than to get myself into a developer position. I don't want to write a parser. Although I'm aware of bison etc. I just want to get the intermediate representation into a language I can run, so as to leverage the front end compilers.
- sitkack 6y agoThis article on running Wasm on the Roku is exactly what you need. https://motley-coder.com/2020/12/20/webassembly-on-roku/ https://motley-coder.com/2020/12/20/webassembly-on-roku/
- perl4ever 6y agoThank you! That looks very similar to what I have been idly dreaming of.