Live data from Hacker News

Serverless QBasic

psuter.net

1–10 of 40 posts

Re: Serverless QBasic

#2
Fun article! I've gotta give this a try myself.

On a related note (of using BASIC where it doesn't belong), I hacked together a method to convert BASIC code to WebAssembly using BaCon[0], a BASIC-to-C converter, and Emscripten to take the resulting C output and generate some wasm.[1] Much like the linked article, this is a fun diversion to entertain the idea of using BASIC where the language authors couldn't possibly have imagined it. Perhaps I'll get around to actually making a "real" project out of it sometime...

[0]: http://www.basic-converter.org/

[1]: https://github.com/matthewwiese/basic-to-c-wasm-example

Re: Serverless QBasic

#3
Thanks for this fun article :) I noticed your serverless function response time is between 2000 to 3000ms, I wonder why and it would be super interesting to have more details about time taken by each step of the process (python proxy / dosbox / qbasic / openwhisk)

Point of comparison, nodejs function executed on AWS Lambda: https://00demo-32387b.appdrag.com/api/Morse?txt=SOS-Test

Re: Serverless QBasic

#4

Fun article! I've gotta give this a try myself. On a related note (of using BASIC where it doesn't belong), I hacked together a method to convert BASIC code to WebAssembly using BaCon[0], a BASIC-to-C converter, and Emscripten to take the resulting C output and generate some wasm.[1] Much like the linked article, this is a fun diversion to entertain the idea of using BASIC where the language authors couldn't possibly…

This is really interesting, thank you! I've been working the last couple of days on getting an old type-in game working and I had some vague thoughts about it being fun to somehow make it playable on the web. I'd have to convert it from Microsoft BASIC to the dialect BaCon uses, but that's definitely an option. Another option I've considered is to see about getting cbmbasic[0] running using a JS terminal emulator. And of course it might be a fun exercise to just convert them by hand to JS or what have you.

[0]: https://github.com/mist64/cbmbasic

Re: Serverless QBasic

#5

Fun article! I've gotta give this a try myself. On a related note (of using BASIC where it doesn't belong), I hacked together a method to convert BASIC code to WebAssembly using BaCon[0], a BASIC-to-C converter, and Emscripten to take the resulting C output and generate some wasm.[1] Much like the linked article, this is a fun diversion to entertain the idea of using BASIC where the language authors couldn't possibly…

Oh man, compiling to WebAssembly was exactly what I was thinking while reading the article. :)

Re: Serverless QBasic

#6
> While Microsoft did have a compiler for the language, I couldn’t easily find a version of it online.

I have archived the QuickBASIC 4.5 compiler here: https://github.com/susam/dosage/tree/master/langs/qb45

The above archive is obtained from here: https://www.qbasic.net/en/qbasic-downloads/compiler/qbasic-c...

Re: Serverless QBasic

#7
post #4

Fun article! I've gotta give this a try myself. On a related note (of using BASIC where it doesn't belong), I hacked together a method to convert BASIC code to WebAssembly using BaCon[0], a BASIC-to-C converter, and Emscripten to take the resulting C output and generate some wasm.[1] Much like the linked article, this is a fun diversion to entertain the idea of using BASIC where the language authors couldn't possibly…

This is really interesting, thank you! I've been working the last couple of days on getting an old type-in game working and I had some vague thoughts about it being fun to somehow make it playable on the web. I'd have to convert it from Microsoft BASIC to the dialect BaCon uses, but that's definitely an option. Another option I've considered is to see about getting cbmbasic[0] running using a JS terminal emulator. An…

Happy that it could get the juices flowing :) The chosen implementation for your project certainly depends on what "vibe" and level of authenticity you're looking to achieve. I'm a huge fan of WebAssembly simply because the idea of writing web-native code in a language of my choosing makes the little computer scientist in me giddy.

That's not to mention the wealth of existing code with potential to be ported to this universal medium; for example, a project porting vim to WebAssembly was posted to HN just over a week ago[0] which reignited my interest in pursuing this avenue further.

[0]: https://news.ycombinator.com/item?id=17487936

Re: Serverless QBasic

#8
It’s slow. All those layers of abstraction exact their toll on latency, even on today’s monster systems.

Reading the essay, my heart goes out to the author: he missed all those wonderful years in the ‘80’s and the early ‘90’s cracking protections, swapping, coding intros, watching demos and competing on the Commodore64, Commodore Amiga and the ATARI ST. He missed out on all the wonderful memories and all the action. I’m saddened by it. He started out on an obscure platform and then switched immediately to a drab, boring, soulless PC bucket, never to experience the joy of the Scene.

For me writing software in BASIC under MS-DOS and later on Windows®️ was an afterthought, since I had already been proficient in MC68000 and MOS 6502 intro coding on Amiga and Commodore64. It was easy to do since I stumbled upon the complete, official reference manual on BASIC 3.0 from Microsoft and I already knew BASIC from learning it on the Commodore PLUS/4. The only piece of software I wrote was an ASCII survey points file to DXF converter which I then ported to VisualBASIC 2.0, and that because I also had the full AutoCAD book set which included full DXF format specification. It cut down our work from several hours to a few seconds, but BASIC on the PC had always been an afterthought for me, something I knew but never used much, or something to whip up a quick utility in and run it from a batch file wrapper.

Re: Serverless QBasic

#9
post #6

> While Microsoft did have a compiler for the language, I couldn’t easily find a version of it online. I have archived the QuickBASIC 4.5 compiler here: https://github.com/susam/dosage/tree/master/langs/qb45 The above archive is obtained from here: https://www.qbasic.net/en/qbasic-downloads/compiler/qbasic-c...

http://www.antonis.de/qbdown/qbcompil.htm

Re: Serverless QBasic

#10
The suggestion to "use SYSTEM instead of END" is suspicious.

SYSTEM spawns the system shell as a sub-process. If one would EXIT from the spawned command.com/cmd.exe, QBASIC would pop up back. I think a user of programs written in this way would find themselves surprised.

Post reply on HN