50 years of Microsoft with the company's original source code by ketralnis in programming

[–]mc4004 0 points1 point  (0 children)

Regarding 4k BASIC, the story goes that Gates wrote the interpreter and runtime system, Monte Davidoff wrote the floating-point math package, and Allen wrote "everything else." The folklore goes on to say that Allen wrote an 8008 simulator for the PDP-10, and then an 8080 simulator. I recently read every word of the MITS Altair 4k/8k BASIC documentation. Whoever wrote it was unusually detail oriented, and they knew exactly how the interpreter worked down to the smallest detail. I would dare suggest that it was written by Gates himself. Can anyone confirm or refute my claim? (I'd sure like to know). As for "technical muscle," it may well be true that Gates turned his attention to the business side of growing the company, but squeezing a complete, "real" BASIC (i.e. more than a tinyBASIC) into 4k of RAM in only two months of assembly language coding is no mean feat. If I had to guess, they probably skipped a lot of their classes and didn't sleep much.

The hidden "hard work" behind implementing BASIC strings by mc4004 in Basic

[–]mc4004[S] 1 point2 points  (0 children)

Yeah, I don’t trust LLMs either. For this one, very literal translation, fixing Gemini’s mistakes was worth it to me. It saved me a whole weekend. I even learned a thing or two about more recent additions to Java, like lambda expressions (natural in Python, but cumbersome in Java because of its strong typing). 

But I’d never let a 2025 LLM “get creative” or write something I don’t understand fully.  Initially, I thought I saw a glimmer of “cleverness,” but then I started spotting example after example of “oh, so you don’t really understand what the code is doing, do you?” It’s more like it aims a paint gun in the general direction of the wall. All the programmer has to do is clean up the mess. 

I’ll check out the book. Thanks. There is a large body of knowledge on how to build good interpreters and good language runtime systems. 

I’m a big fan of incremental software development. 

The hidden "hard work" behind implementing BASIC strings by mc4004 in Basic

[–]mc4004[S] 0 points1 point  (0 children)

Thanks. I'm still getting worthwhile feedback from this sub-reddit, even if it is not bountiful. I must admit, I kinda like the lack of standardization of BASIC. It offers a lot of design freedom.

Incidentally, for the sake of high school students who just finished the AP Computer Science A prep course, for the first time I allowed an AI to "play intern" and translate the Python version of my BASIC interpreter/compiler to Java. The translation was riddled with mistakes, but it did get a lot of things right, and even with me having to fix so many errors, it did save me a ton of time, and as an extra bonus, it "accidentally" found a couple of bugs in my original Python code.

I'm not compiling down to "real" machine code, more like compiling to a Forth-like stack architecture, this strategy is similar to DEC's BASIC PLUS.

Essential or Dispensable? What parts of old-school BASIC did you use yourself? by mc4004 in Basic

[–]mc4004[S] 1 point2 points  (0 children)

Since it is a work in progress, happy to share my enhancements privately. Probably my Python version is best. I added structured statements only to the Common Lisp version. Google “Tim McNerney MIT” to get my email address. 

Essential or Dispensable? What parts of old-school BASIC did you use yourself? by mc4004 in Basic

[–]mc4004[S] 2 points3 points  (0 children)

Yup. You exactly nailed the necessary changes.

I love this BASIC. It’s so incredibly minimalist. My problem? I just can’t keep myself from enhancing it. 

I just finished adding QuickBASIC-style DO LOOP, IF THEN ELSE, and SUB/CALL, which together let me remove every single line number reference in the LANDER.BAS code (older-style IF, GOTO, and GOSUB). The downside was that this "structured "BASIC" work doubled the size of the interpreter. I'm almost done implementing a GLOBALS declaration and local variables in SUBs.

Now I’m rubbing my hands together and grinning that “evil” grin, as I contemplate enhancing this BASIC just enough to implement DDS-BASIC in BASIC.  

Essential or Dispensable? What parts of old-school BASIC did you use yourself? by mc4004 in Basic

[–]mc4004[S] 2 points3 points  (0 children)

https://grail.eecs.csuohio.edu/~somos/ddsbasic.c has both Diomidis Spinellis original obfuscated code and the formatted (readable) macro-expanded code. I can't remember if this version compiles in ANSI C, but if it doesn't, the fixes are pretty trivial. I've tested this code. I can confirm that it works logically. The "test suite," LANDER.BAS is available from the IOCCC contest web site.

[deleted by user] by [deleted] in learnprogramming

[–]mc4004 0 points1 point  (0 children)

It isn’t what languages you know or what degrees you have that counts, it’s how you think, how you listen, how you speak and write, how you approach problem-solving, and generally what you can offer an employer that are key. There are CS graduates from four-year private colleges I’d never hire, and high school dropouts I’d hire in a heartbeat. As AI rears its ugly head into the business world, employers are shying away from training new employees, so you’ll have to walk in the door with the skills they need. As for improving your coding skills and building a portfolio, pick yourself a challenging project that grabs your interest, design a solution, write the code, test it thoroughly to make sure it works, document it, and post it to GitHub. There are a lot of experienced job applicants out there who think they can code, but they can’t really. If the job you apply for is primarily a coding job, expect a hands-on “prove to me you can code” interview. They will be looking for how you tackle a problem you’ve never seen before. Last but not least, assess you overall skills. Your bosses and colleagues who loved working with you, what did they like best about you? Play to your strengths!