5 ms·
For anyone that misses QBASIC, there's FreeBASIC that's a lot like it & easy to install: http://www.freebasic.net/ http://www.freebasic.net/ After loosing my
by nickpsecurity 11y ago
For anyone that misses QBASIC, there's FreeBASIC that's a lot like it & easy to install:
http://www.freebasic.net/ http://www.freebasic.net/
After loosing my memory, I have to relearn programming nearly from scratch. I took a challenge to do specific program in around an hour, from language to toolchain to solution. Had to be system-like language. Got bogged down by toolchains, IDE's, whatever. Said screw it: why the hell is it so hard when I faintly recall starting lightening-fast on QBASIC? Found a BASIC, FreeBASIC, that was just like it with simple command to launch stuff made in text editor and good documentation. Maybe half an hour of my challenge gone.
Next, time to apply lessons I remembered from high-assurance and Wirth. First, subset the language to minimum necessary. Used docs to test each in isolation to develop template & functions for using them, esp file I/O. Wrote formal spec in English & pseudocode of my problem with decomposed functions. Mapped almost 1-to-1 to FreeBASIC as expected. Did one refactoring. Executed code for first time to see successful run & solution to problem.
Yeah, BASIC is friggin awesome. I stretched industrial BASIC's, esp 4GL's, really far back when I was a hacker as they did rapid iteration, safe-by-default, and ran fast. Today, I'd say do a Wirth language like Oberon or Component Pascal instead. Still, BASIC has lessons to teach us and a painless bootstrapping for developer that many modern tools lack outside of scripting.
- Cyph0n 11y ago> After losing my memory, ... Wow, so you forgot how to write code? May I ask how that happened?
- nickpsecurity 11y agoJust a head injury. Dont give too much detail as too solud testimony might be used against me in hiring or court or something. But, yeah, lost most memory except stuff I repeated most along with muscle memory anx hand-eye. (Shrugs). Supposed to be thoughtless drone but I do well here on many topics despite working with pieces and little short-term memory.
- kragen 11y agoMan, I'm so sorry to hear that. I hope it gets better.
- nickpsecurity 11y agoAppreciate it. Just functional enough to recall pieces of a good, in-depth conversation with you here on programming, software quality, etc. I gave you credit elsewhere for being unusually knowledgeable about present and past techniques of getting job done. Plus noticing high assurance implementation came down to rigorous FSM's and their connection to hardware. Impressive. Since then, although my condition hasn't changed, I've at least pursued that hardware research to get very far. One thing was finding where SW and HW connect with those FSM's as I predicted. Already have 2-3 methods to express software that (a) can integrate with verification tech and (b) can auto-generate hardware from it. So, slow but steady progress toward grand challenges and such. :)
- kragen 11y agoCool! Congratulations! I also think that approach sounds potentially very fertile, and painfully feel the inadequacy of existing methods of programming to the tasks we face today. What kinds of media of expression have you come up with?
- reikonomusha 11y agoI second FreeBASIC. Strong gaming community, modernized a lot of QBASIC. It's good. My first QBASIC/FreeBASIC program I've managed to write some 15 years ago: https://bitbucket.org/tarballs_are_good/nibbles-and-bits/raw/644cf9e2eaef78b86829fb23a208c848e994a581/QBASIC/MANDEL.bas https://bitbucket.org/tarballs_are_good/nibbles-and-bits/raw...
- nickpsecurity 11y agoDidnt know about its community. Ill look at the code later.
- bloaf 11y agoSee also: http://smallbasic.com/ http://smallbasic.com/
- nickpsecurity 11y agoTks. Looks like a nice BASIC but appears closed-source from Microsoft. They trash a lot if their side projects over time. So, I'd recommend it only for temporary stuff in learning. Maybe OSS imitate any good qualities it has, too.
- groovy2shoes 11y agoThere's also smallBASIC [1], which is unrelated apart from having similar goals, and is both GPL and portable. [1]: http://smallbasic.sourceforge.net/ http://smallbasic.sourceforge.net/
- nickpsecurity 11y agoThanks for the tip. That it includes string and math functions might make it even more appropriate for students.
- versteegen 11y agoI've been using FreeBASIC for about 10 years and help maintain a 100+kLOC codebase written in it (a game engine). FreeBASIC has multiple dialects; there's the qb dialect that supports most of QB except some audio and real-mode DOS-related commands, and the modern fb dialect, which is all of C plus half of C++ with BASIC syntax. And it does improve on C and C++ in several ways, like much better string support and a "preprocessor" that looks like the C preprocessor but is far more powerful (it's not a preprocessor, so it knows about types and variables, etc). Of course it's not better than QBasic in every way: it's not interpreted with that awesome edit-and-continue ability that QBasic had. And the compiler can be quite buggy. There are also a number of other QB successor languages, like QB64, which has a focus on the QBasic IDE and supporting all of the audio-visual stuff QB had fully. But (after comparing the codebases) will say FB is written far more like a professional product.
- nickpsecurity 11y agoThanks for the review. Sounds like it's what I used to call an "industrial" BASIC where it has the features and compiler to get real work done. Many people think some toy with a few key words and interpretation when they think BASIC. Yet, I used to do all my hacking in it and Visual Basic 6 for GUI layer. Loved VB6 specifically for rapid iteration: instant load, instant test-run, instant... you name it on P3 400Mhz w/ 128MB RAM. That efficiency on arbitrary hardware is something industrial BASIC's and Wirth languages have in common. Only Go can touch it these days but still not low-level as Wirth stuff gets.
- versteegen 11y agoYes, I would agree with "industrial", especially since you can link with any C library after translating the headers with SWIG (translations of common libraries like C, winapi and GTK are included with FB). I've never used/don't know VB, but it appears that quite a lot of FB's design is borrowed from it. In recent years FB has been focused on borrowing C++ features instead (and even aiming to be ABI compatible with g++, not sure if that works). E.g. recently added "dim byref" (like a C++ reference variable) and polymorphism + RTTI. Sometimes things move in the other direction, like binary literals new in C++14 :)