--- Log opened Sun Jun 20 00:01:00 2021 |
00:04 | | Kindamoody is now known as Kindamoody[zZz] |
00:06 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed] |
02:22 | | McMartin [mcmartin@Nightstar-i80eaa.ca.comcast.net] has quit [[NS] Quit: Reboot for kernel upgrade] |
02:24 | | McMartin [mcmartin@Nightstar-i80eaa.ca.comcast.net] has joined #code |
02:24 | | mode/#code [+ao McMartin McMartin] by ChanServ |
03:39 | | Degi_ [Degi@Nightstar-4koi9v.pool.telefonica.de] has joined #code |
03:41 | | Degi [Degi@Nightstar-7d39ls.pool.telefonica.de] has quit [Operation timed out] |
03:41 | | Degi_ is now known as Degi |
05:08 | | * McMartin -_-s at himself as he realizes what he has done |
05:08 | <&McMartin> | I'm doing a writeup of a retro project that was done in assembly language, and I'm preparing a section where I analyze whether or not it was worth it to bother with asm |
05:08 | <&McMartin> | So I called it "Oh Say, Can You C?" as one does |
05:09 | <&McMartin> | I had in fact forgotten that the program in question plays the Star-Spangled Banner |
05:16 | <&Reiver> | ...you fool, what have you done :D |
05:16 | <&McMartin> | So the original program I was adapting was to celebrate the completion of a restoration project on the Statue of Liberty |
05:17 | <&McMartin> | But the C64 version wasn't as good as the PC version that That Could Not Stand, etc. |
05:17 | <&McMartin> | This time I needed a program that would put a new-to-me system through its paces, and which would do graphics and sound and stuff and otherwise be a good exercise |
05:17 | <&McMartin> | And that's a good one because it involved doing things that said new-to-me system had hardware acceleration for |
05:17 | <&McMartin> | ... in 1987 |
05:17 | <&McMartin> | So that seemed cool |
05:17 | <&McMartin> | But that meant I needed to port my C64 music driver |
05:18 | <&McMartin> | And yeah, exactly two things in the program needed to be in asm; the rest could have been C with basically no loss |
05:18 | <&McMartin> | A lesson learned! |
05:18 | <&Reiver> | C truly was a revolution, wasn't it |
05:18 | | * McMartin handwaves a little |
05:19 | <&McMartin> | It was a really poor fit for the 8-bit systems |
05:19 | <&McMartin> | And the 16- and 32-bit systems, by the time they were consumer grade, were specifically designed to play well with the likes of C |
05:19 | <&McMartin> | And developed only tighter bindings. |
05:19 | <&McMartin> | All that nonsense with Spectre and stuff is because now the hardware pretends to be more C-like than it actually is |
05:20 | <&Reiver> | What made C the winner of the age? |
05:20 | <&McMartin> | The stock answer is "UNIX was written in it" |
05:21 | <&McMartin> | But yeah, by 1985 it was A Good Systems Language and so you could do what you needed in it with only moderate extensions |
05:21 | <&Reiver> | I'm now curious what the compeditors would've been at the time |
05:21 | <&McMartin> | In the time I'm playing in... |
05:22 | <&McMartin> | Pascal. BASIC. Forth. Logo. |
05:22 | <&McMartin> | Lisps exist but, like C, aren't properly standardized yet. |
05:22 | | * Reiver hms |
05:22 | <&McMartin> | The *good* Lisps don't exist yet. |
05:22 | <&Reiver> | Pascal has never been a language I've associated with being terribly performant |
05:23 | <&Reiver> | BASIC was... primitive (oh god, the GOTOs) |
05:23 | <&Reiver> | I know not the other two to judge |
05:23 | <&McMartin> | Forth is, uh, mirror universe Lisp |
05:23 | <&McMartin> | Logo is the turtle graphics language, but it is secretly a Lisp dialect with some deeply wacky design decisions that make it good for what it is |
05:24 | <&McMartin> | Pascal was reasonably performant if you were using an HLL at all |
05:24 | <&McMartin> | If you cared about speed or space in the 1980s, you wrote in assembly language, period. |
05:25 | <&McMartin> | Pascal was also quite size efficient; most Pascal implementations did a Java-like thing where they created compact code for a generic VM and then your end program was an interpreter for that. |
05:26 | <&McMartin> | C++ starts existing in primitive forms by the late 1980s and people actually use it for stuff by the early and mid 1990s |
05:26 | <&McMartin> | C++ wouldn't be standardized until 1998, and there wouldn't be actually compliant compilers that didn't cost thousands of dollars until the mid-aughts |
05:27 | <&McMartin> | And it's a little lumpy. |
05:27 | <&McMartin> | The Star Control games (1991, 1992) were written in C. |
05:27 | <&McMartin> | Ultima VI (1990) was in C++, and you could see Borland's custom error messages in the EXE if you dug into it. |
05:29 | <&McMartin> | Diablo (1997) was DOS/Windows, and the DOS version was written in assembly language, with C extensions bolted on for Windows support and netplay later by other studios. |
05:30 | <&McMartin> | Now, to be clear: Being pure asm, on PC, in 1997, was bananapants |
05:30 | <&McMartin> | But it happened and it wasn't niche, clearly. |
05:31 | <&McMartin> | (For that matter, using C++ in 1990 is *also* bananapants; C itself had barely been standardized at that point, and it probably wasn't at the time the code was written. |
05:32 | <&Reiver> | So it was the same approach as using The Hot New Language at the time, despite its many caveats? |
05:32 | <&McMartin> | I think it's more What You Have and What You Can Get Away With. |
05:33 | <&McMartin> | A surprising number of early games were BASIC, including Ultima 1. |
05:33 | <&McMartin> | Wizardry 1, too, though that got rewritten in Pascal later. |
05:33 | <&McMartin> | IIRC, Tyrian was also Pascal |
05:33 | <&McMartin> | Turbo Pascal was a pretty solid compiler for DOS and it did native code and integrated well with asm when you had to |
05:34 | <&McMartin> | C was better for tiny programs but not so tiny that you'd just use asm, in DOS... |
05:34 | <&McMartin> | ... and then it was good for Very Large programs once DOS extenders started showing up. |
05:34 | <&McMartin> | I'm a little vague on those, but if you saw something that said "DOS/4GW" on startup and used more than 1MB or RAM, it was almost certainly C/C++ because that's the handy language for binding into those |
05:36 | <&McMartin> | So yeah, I'd say that for DOS, the languages that mattered were C, C++, and Pascal, because there was a premier devtool company (Borland) and those were their flagship products |
05:36 | <&McMartin> | Watcom did DOS/4GW and then they became the premier afterwards |
05:36 | <&McMartin> | MS also provided high-quality C and then C++ compilers. |
05:36 | <&McMartin> | along with a steady evolution on BASIC, which kept it relevant pretty much until C# shows up. |
05:37 | <&McMartin> | At which point it sticks around, but becomes weirdly-spelled C# |
05:37 | <&McMartin> | On the Atari ST, the system that I'm playing with here... |
05:37 | <&McMartin> | ... C is the primary language from the start, with assembly language in second place, for all serious development. |
05:37 | <&McMartin> | This is because the OS bindings were all in C and used the C function call interface. |
05:38 | <&McMartin> | (IIRC, the oldest Macs were Pascal-primary for this reason, and MS Windows has always used C as its core OS interface.) |
05:38 | <&Reiver> | Yeah, and my experience started with DOS so |
05:38 | <&McMartin> | So that's a big part of why there's very little gained here outside of C; most of the work is either stuff an HLL is good at, or it's talking to the OS or the hardware directly, both of which C bindings did |
05:39 | <&McMartin> | And if you used asm to do it, as I did for this... |
05:39 | <&McMartin> | ... you spend a bunch of time making your asm *pretend to be C* as far as the OS can tell |
05:39 | <&McMartin> | DOS wasn't like that; its programming interface was very asm-centric |
05:40 | <&McMartin> | You used special instructions specific to the x86 to command the OS, the BIOS, or the hardware, or you manipulated memory that was in fixed locations. |
05:40 | <&McMartin> | Of all the languages I've talked about here, ironically, only BASIC has a syntax that is specifically tuned to "write this value to this place in memory, absolute location" |
05:40 | <&McMartin> | C can make it happen without too much evil but it's still obviously evil; Pascal requires extensions. |
05:41 | <&McMartin> | C requires extensions for the other bits of talking to DOS, but Borland *gave* you those extensions, so it was fine |
05:42 | <&McMartin> | Also most C systems have some kind of mechanism for shoving a few lines of asm into the program when you *really* need it |
05:43 | <&McMartin> | That's... rarer these days, for a number of reasons, even as the kind of goodies you can get out of it goes up |
05:44 | <&McMartin> | (The usual technique nowadays is for the compiler to provide some things that look like function calls but which translate into machine- or os-specific asm code) |
05:50 | <&McMartin> | But yeah, to go back to your first question a bit |
05:51 | <&McMartin> | If you are a 70s-era minicomputer, or a microcomputer in the mid-to-late-1980s that was inspired by them (Macintosh, Amiga, Atari ST, Sega Mega Drive), C's basic operations are an *alarmingly* close match to just saying things in assembly language directly. |
05:52 | <&McMartin> | Early macintoshes could not actually compile code for themselves. You needed to build it on a Lisa. |
05:52 | <&McMartin> | The first Mac programs written *on* a Mac were in Forth, because Forth compresses *insanely* well. |
05:54 | <&McMartin> | Every time I try to do something in Forth I decide I'd rather not bother |
05:54 | <&McMartin> | But I respect it |
05:55 | < Alek> | nostalgia |
05:55 | <&McMartin> | Nope; never used it in my past. |
05:56 | | * Alek recalls writing BASIC code to play simple melodies on the DOS PC's built-in speaker. |
05:56 | < Alek> | I came to code late and slow. |
05:56 | <&McMartin> | DOS BASIC was honestly really good compared to an alarming amount of the competition |
05:57 | < Alek> | this was already late 90s. |
05:57 | <&McMartin> | Ah, by late 90s would you have been using QBasic? |
05:57 | <&McMartin> | Which had proper VGA support I might add |
05:57 | < Alek> | I still had a DOS 6.22 machine until 98. |
05:57 | < Alek> | or was it 99. |
05:57 | <&McMartin> | Yeah, that'll have had QBI. |
05:58 | < Alek> | I don't even remember if it was an -XT or -AT, or even the difference between the two. D: |
05:58 | <&McMartin> | You could drive the Adlib-compatible part of a sound blaster from it too but I was too untutored in the way the PC was actually hooked together to be able to make that work. |
05:59 | <&McMartin> | The -XT was technically 8-bit, with an 8088 CPU. The AT was 286-based. |
05:59 | < Alek> | didn't have a sound card, just the onboard speaker. but I had both sizes of floppy. In a double drive, IIRC. |
05:59 | < Alek> | it was the -AT then. |
06:00 | <&McMartin> | Might have actually been a 386 too, tbh |
06:00 | < Alek> | mine was definitely 286. |
06:00 | <&McMartin> | I'm not 100% sure that the 6.22 worked on a 286. |
06:00 | <&McMartin> | Ah, OK then |
06:00 | <&McMartin> | I called up its sysreqs and it says 16MHz |
06:00 | <&McMartin> | I suppose 286es did get up to that. |
06:01 | < Alek> | there was a turbo button, but I never actually knew what it did so I didn't touch it. |
06:01 | <&McMartin> | overclocked it |
06:01 | <&McMartin> | Or underclocked it to 4.77MHz, depending >_> |
06:01 | <&McMartin> | (The XT clockspeed) |
06:01 | < Alek> | but I did eventually get around to compressing the HD (I think it was 20MB that I compressed into a virtual 40MB)... |
06:02 | < Alek> | (or it might have been 40 that I compressed into 60, I forget) |
06:03 | < Alek> | amazingly enough, it ran like that for a couple years with no problems, until I got a new PC. |
06:03 | <&McMartin> | What kind of graphics? |
06:03 | < Alek> | just a VGA monitor |
06:03 | < Alek> | might have been SVGA, I forget. |
06:03 | <&McMartin> | With no sound card I figured EGA wasn't out of the question |
06:03 | <&McMartin> | BUt yeah, you'd have had SCREEN 13 and its 256 colors out of a palette of 262,144! |
06:05 | < Alek> | it was a hand-me-down from a favorite teacher. came with two different proto-GUI too, I forget what they were called. |
06:05 | <&McMartin> | DOSBox still runs the QBasic systems just fine, which is occasionally amusing |
06:05 | <&McMartin> | Was it text graphics or real graphics? |
06:05 | <&McMartin> | ISTR DOS 6 had a text based Explorer like thing called DOSSHELL.EXE or something |
06:05 | < Alek> | extended charset, blocks and lines. |
06:05 | < Alek> | DOSSHELL might have been one, probably. |
06:06 | <&McMartin> | And QBasic had its own fancy charset GUI for editing too |
06:07 | < Alek> | I seem to remember that using pretty much the same proto-Windows interface as Word, actually. |
06:07 | <&McMartin> | Wouldn't surprise me if they recycled it. |
06:07 | < Alek> | and a lot of other DOS programs that weren't command-line-specific. |
06:07 | < Alek> | official ones, from MS, anyway. |
06:08 | <&McMartin> | Everyone knows that all you really need is GORILLA.BAS |
06:11 | < Alek> | Speaking of charsets and interfaces, one of the ware games (I forget if it was free or share) that I stumbled across about that time was Wizard's Lair (or some such, it was WL.exe IIRC) and it came with a font.exe that it ran right away when started, to replace the default font with a somewhat fancier, curvier one. The font persisted until reboot, and even worked in Word and printed from the |
06:11 | < Alek> | printer as well, even though the printer nominally needed a font cartridge to print non-default fonts. Anyway, I liked the font enough that I copied the exe away and added it to my autoexec.bat. |
06:12 | < Alek> | like I said, nostalgia. |
06:13 | <&McMartin> | DOSBox will run all these things very well, if you ever are moved to return. |
06:26 | | Vorntastic [uid293981@Nightstar-h2b233.irccloud.com] has joined #code |
06:27 | | mode/#code [+qo Vorntastic Vorntastic] by ChanServ |
06:28 | < Alek> | not always. |
06:28 | < Alek> | I recall trying to run Ultima I in DOSBOX back on my Win98 PC, which had replaced the AT. |
06:29 | < Alek> | on the MINIMUM speed setting I could ask for, it was ZOOMING along. |
06:29 | <&McMartin> | Not always, but I can vouch for the QBASIC and GW-BASIC environments, as well as Turbo C and Turbo Pascal. |
06:29 | <&McMartin> | Interesting. |
06:29 | <&McMartin> | Ultima I runs fine in DOSBox these days, though admittedly that is the 1985 remake. |
06:30 | <@celticminstrel> | Actually, is Logo really a Lisp dialect? Or is only UCB Logo a Lisp dialect? There were many dialects of Logo after all, and I’m not sure all of them include the Lisp parentheses as part of the language… |
06:30 | <&McMartin> | Logo is a Lisp dialect, though not all turtle graphics systems are backed by Logo. |
06:33 | <@celticminstrel> | Do all Logo dialects have optional function parameters, and you only need parentheses if you’re providing the optional parameters? Or is that specific to UCB Logo? I have used at least one other dialect but not enough to answer that question myself… |
06:34 | <@celticminstrel> | Mind you, that also might not be what makes it a Lisp dialect… |
06:34 | <&McMartin> | It's built out of Lisp primitives, but it uses FIRST and REST instead of CAR and CDR, and it mostly drops the parens |
06:34 | <@celticminstrel> | Oh right, that FIRST / BUTFIRST stuff. |
06:35 | <@celticminstrel> | Is REST a thing in any dialect? I’ve always seen BUTFIRST. |
06:35 | <&McMartin> | REST is a thing in Common Lisp. |
06:35 | <@celticminstrel> | Okay, so I guess it is a Lisp dialect, not just UCB. |
06:36 | <@celticminstrel> | So… is it valid to use the Lisp parentheses in, say, Apple Logo? |
06:37 | <&McMartin> | I've never tried |
06:37 | <&McMartin> | I would imagine so |
06:37 | <&McMartin> | Terrapin Logo was the dialect I had access to as a kid |
06:37 | <&McMartin> | The ST language pack included BASIC and LOGO and the Logo there is definitely full enough to do the standard Lispy things. |
06:37 | <&McMartin> | That said |
06:37 | <@celticminstrel> | I think Terrapin Logo is the dialect the book I mentioned was based around, with an appendix to say “here’s what’s different if you’re using Apple Logo”. However, when I worked thru the book, I was using UCB Logo. |
06:37 | <&McMartin> | Lisp doesn't get *properly* Lispy until after the ST is released, because Scheme is sort of the Final Form[*] for many years along those lines. |
06:37 | <&McMartin> | [*] Yeah, I know, Racket, but I also don't care |
07:03 | | Kindamoody[zZz] is now known as Kindamoody |
08:35 | <~Vorntastic> | Buttfirst |
09:25 | | Kindamoody is now known as Kindamoody|afk |
10:37 | < catalyst_> | Clojure! |
10:37 | < catalyst_> | the first Lisp to truly believe in real hardware? |
10:37 | | catalyst_ is now known as catalyst |
10:46 | <&[R]> | <McMartin> Of all the languages I've talked about here, ironically, only BASIC has a syntax that is specifically tuned to "write this value to this place in memory, absolute location" <-- isn't that the point of C's volatile though? |
10:51 | <&[R]> | Vorntastic: thanks for the help yesterday |
10:51 | <~Vorntastic> | I don't feel like i helped that much but... You're welcome? |
10:52 | < catalyst> | vorn the rubber duck? =) |
10:54 | | Emmy [Emmy@Nightstar-l49opt.fixed.kpn.net] has joined #code |
11:37 | | gnolam_ [quassel@Nightstar-j9ajs0.priv.bahnhof.se] has quit [[NS] Quit: Gone] |
11:41 | | * TheWatcher squeaks the Vorn |
12:19 | | * Emmy offers wd40 |
13:01 | | Kindamoody|afk is now known as Kindamoody |
13:06 | | Vorntastic [uid293981@Nightstar-h2b233.irccloud.com] has quit [[NS] Quit: Connection closed for inactivity] |
13:07 | | Kindamoody [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has quit [[NS] Quit: Rebooting] |
13:14 | | Kimo|autojoin [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has joined #code |
13:14 | | mode/#code [+o Kimo|autojoin] by ChanServ |
13:15 | | Kimo|autojoin is now known as Kindamoody |
13:15 | | catalyst_ [catalyst@Nightstar-cfo5s7.dab.02.net] has joined #code |
13:17 | | catalyst [catalyst@Nightstar-ejd4sd.cable.virginm.net] has quit [Ping timeout: 121 seconds] |
13:17 | | catalyst [catalyst@Nightstar-ejd4sd.cable.virginm.net] has joined #code |
13:19 | | catalyst_ [catalyst@Nightstar-cfo5s7.dab.02.net] has quit [Ping timeout: 121 seconds] |
13:35 | | abudhabi [abudhabi@Nightstar-dcq1u3.adsl.tpnet.pl] has joined #code |
13:38 | | abudhabi_ [abudhabi@Nightstar-q3681i.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds] |
14:02 | | gnolam_ [quassel@Nightstar-j9ajs0.priv.bahnhof.se] has joined #code |
14:15 | | Vorntastic [uid293981@Nightstar-h2b233.irccloud.com] has joined #code |
14:15 | | mode/#code [+qo Vorntastic Vorntastic] by ChanServ |
14:55 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code |
14:55 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
15:15 | | catalyst [catalyst@Nightstar-ejd4sd.cable.virginm.net] has quit [The TLS connection was non-properly terminated.] |
15:55 | | gnolam_ [quassel@Nightstar-j9ajs0.priv.bahnhof.se] has quit [[NS] Quit: http://quassel-irc.org - Chat comfortably. Anywhere.] |
16:45 | | Vorntastic [uid293981@Nightstar-h2b233.irccloud.com] has quit [[NS] Quit: Connection closed for inactivity] |
16:58 | | catalyst [catalyst@Nightstar-ejd4sd.cable.virginm.net] has joined #code |
21:57 | | Emmy [Emmy@Nightstar-l49opt.fixed.kpn.net] has quit [Connection reset by peer] |
22:03 | | Kindamoody is now known as Kindamoody[zZz] |
22:17 | | gnolam [lenin@Nightstar-j9ajs0.priv.bahnhof.se] has quit [[NS] Quit: Gone] |
--- Log closed Mon Jun 21 00:00:00 2021 |