6 ms·
Yeah, the game's written in the QBASIC language but I certainly don't use QuickBASIC 4.5 or PDS to compile it.
by manfightdragon 13y ago
Yeah, the game's written in the QBASIC language but I certainly don't use QuickBASIC 4.5 or PDS to compile it.
- laumars 13y agoSorry to nitpick, but "QBasic" is an IDE (Just like QuickBASIC, which incidentally is the predecessor of QBasic). The language is just called "BASIC". Also you're not compiling anything. It's all interpreted at run time (which is why performance is dog slow).
- jaredsohn 13y agoIt is possible to compile QuickBASIC code (i.e. a variant of BASIC that contrasts with (among others) GW-BASIC) via QuickBASIC 4.5 and PDS. Often at the time, you could write some code using the free QBASIC which came with MS-DOS and then decide that you need to purchase one of those other programs to compile it prior to distributing it as a standalone executable.
- laumars 13y agoI hadn't realised there was a non-free version of QBasic. Also, I went to download QB64 and compile a very basic app then opened that inside a hex editor to see if the it was just a standalone exe interpreter with the .bas attached as a resource (a bit like how self extracting zip files work) and appears that QB64 does genuinely compile the code. So I stand corrected on both the old and new instances of QBasic. There is some strange stuff inside the QB64 generated exe though. References to automation.whatismyip.com (stranger still, that sub-domain isn't DNSed). QB64 is definitely a Window app that's written to look like it's running in DOS though. There's even a character map compiled into the exe so that the fonts look native to DOS. It also looked quite fun, so I can see the appeal of using QB64 for personal projects.
- manfightdragon 13y agoIt uses whatismyip for a (pretty dumb) added function related to finding your WAN IP.
- laumars 13y agoI know why it's using it. My point was firstly that it's odd (though not unforgivable) that the compiler links to those procedures even though my source .bas wasn't calling any networking APIs; and secondly that the sub-domain doesn't even exist for the DNS lookup to work: $ whois automation.whatismyip.com | head Whois Server Version 2.0 Domain names in the .com and .net domains can now be registered with many different competing registrars. Go to http://www.internic.net for detailed information. No match for "AUTOMATION.WHATISMYIP.COM". >>> Last update of whois database: Wed, 17 Apr 2013 10:58:41 UTC <<< I even disassembled the binary so I could see the full HTTP header just in case the domain name was a red-herring.
- groovy2shoes 13y ago> My point was firstly that it's odd (though not unforgivable) that the compiler links to those procedures even though my source .bas wasn't calling any networking APIs... It's pretty common for compilers for niche languages to statically link the runtime library by default. Many think it eases distribution.
- laumars 13y agoYes I know this (and it's not just compilers for niche languages that does this either). But again, that wasn't my point. My point was this: 1. it's statically compiling in libraries for APIs that aren't even being used (again, I know this is pretty common as well - it was more said as a side issue since I was already on the topic of it's runtime). But most importantly: 2. because automation.whatismyip.com DOES NOT EXIST. The API is broken because it calls a non-existent sub-domain name. The sub-domain has no DNS record. It does not ping nor curl because it's completely imaginary....and so on. (sorry for the flippancy of the post, but this is now the 3rd time I'm having to reiterate myself so I just want to be clear that everyone understands my point)
- manfightdragon 13y agoIt's compiled, not interpreted. You have no idea what I'm doing over here.
- laumars 13y agoThe compiled point was wrong, I'd already conceded that. But that doesn't mean I have no idea what what you're doing. I just wrongly assumed that the QB64 devs would just embed the .bas inside the PE as a resource file rather than going to the trouble of writing a compiler. Honestly, I'm impressed they bothered given the niche appeal of the IDE and number of other BASIC compilers on the market (FreeBASIC, PureBASIC, PowerBASIC, VisualBasic, etc) - some of which so closely resemble QB64 that I had to disassemble the compiled binary just to make sure there wasn't some plagiarism involved.
- klipt 13y ago> Honestly, I'm impressed they bothered given the niche appeal of the IDE It reminds me a bit of the freepascal project. Beautiful compiler, tons of extensions (including generics: http://wiki.freepascal.org/Generics http://wiki.freepascal.org/Generics), graphical RAD IDE (Lazarus) ... yet relatively few people use it because C++ does all of that and more. Ultimately, I guess syntactic preference isn't really enough of a justification for yet another compiled imperative OOP language...
- laumars 13y agoI know exactly what you mean. I used to love Pascal back in the 90s so installed Lazarus a few months ago with the intention of writing a few Qt apps. I think I spent 10 minutes in there at the time, thought "this is fun", and have never touched it again since.
- nollidge 13y agoNo, QBasic is also a language variant. QBasic has functions, user-defined types, no line numbers, and a pretty big standard library that plain BASIC did not have.
- laumars 13y agoYeah I'm familiar with what QBasic is and many of the other BASIC dialects that preceded it (I'm old :P). I'd agree that it's a language variant / dialect. My issues is when people talk about QBasic as if it was it's own single entity. But then I guess where do you draw the line? eg by my same logic, C++ just a variant of C, yet it's clearly sane to describe them separately. So perhaps I was being overly picky. As a side note, QBasic does support line numbers - albeit for legacy reasons and not recommended syntax. And some dialects of BASIC did support functions - though the syntax was awkward so I usually just used GOSUB / RETURN when I needed procedures with no return values.