Programming thread

  • 🐕 I am attempting to get the site runnning as fast as possible. If you are experiencing slow page load times, please report it.
So I'm briefly unfurloughed because turns out I'm more important to the business than I/they realized. I'm pretty annoyed at them and I should probably brush off my resume and start looking for somewhere better.

Anyway now that I'm back at work I'm doing a little bit with git automation in Golang, and lol, this made me laugh.

For those who aren't aware, there's been a trend recently for woke language scolds in software have been trying to get rid of words like "whitelist" and "blacklist" because of apparently implicit racism or some shit.

"Master" is on their shitlist. "What, like slavemaster??"

I'm not kidding, this is why the default branch name has changed on github from master to main.

So it's funny to see that there's a currently-maintained library still using the word "master". Countdown until they deprecate this.
Twice I've had to fuck around with Chrome, because its changing of "whitelist" to "allowlist" meant it was silently ignoring one of the entries in my settings file. If I hadn't already been peaked, wasting my time working round pointless bullshit would have done the job.
 
In hindsight @MAPK phosphatase you can tell your group that you have advised a development plan with a (possibly) non-technical explanation as of why you have chosen <insert tech here>.
That wouldn't be hard because most of my reasons are non-technical anyway. The one exception I guess would be my rant about modern rendering techniques, but that comes with pretty pictures. But showing that I've thought about this and I'm not rushing into it is important.
 
That's really cool. Though I'd be looking to use GAS and LD if I were doing this, so you can have labels and macros, etc. - they're an important part of assembly, after all. You might need a simple linker script, I'm not sure it understands COM directly.

If you've not seen it yet, the osdev.org wiki is really good for anything low-level like this.
Honestly I have MASM somewhere, but doing such a ridiculous thing entirely in debug - which literally came with DOS - just had a weird appeal to it. Anyone with an ancient DOS computer could just pipe that code in and it'd assemble it. It even has the debug commands that after it's assembled will write it to a .com that DOS can natively load and run.

An .exe had a certain amount of overhead that I never delved deeply enough to understand, but a .com was literally just raw bytecode. It's loaded in to address 0100 and it just starts execution from there.
assemblers can and will use longer/shorter versions of instructions with the same mnemonic
Yes, but this wasn't really a problem: debug was able to assemble them correctly, most of the time anyway. It was certainly able to tell the difference between add ax,dx (a 2-byte opcode) and add ax,[077E] (4 bytes). My real problem was that conditional jump opcodes only have a short jump format; I had to pipe the code into debug, pipe the output into a file, paste that output into my "linker" and then see whether there were any errors due to trying to conditionally jump to an address farther than +127/-128 bytes away. (In its summary, it would identify any errors in the pasted output.)

Updating the addresses could result in a conditional jump not being possible. Sometimes this was just because the address needed to be updated a second time, other times I had to replace the conditional jump with a conditional jump-if-not to jump just past an unconditional jump to the intended destination (which could be assembled as a near jump instead of a short jump). Basically I always had to assemble the code at least twice, unless no addresses were changed & no errors occurred. Also, if I used a comment like ;+2, my linker would insert the address of the 2nd line of code following (not +2 bytes), so I didn't have to manually calculate how many bytes each line of code took. So I could easily just stick a short jump in without adding a label just to identify that I'm jumping past the next instruction.

Technically the code was also self-modifying, although only in the win/loss condition, which made it manageable. There is only one endgame routine; depending on whether you win or lose it'll overwrite the sprite address for unflagged but still covered mines (for "win", it should flag all of them, and for "lose" it's a bomb sprite... there is also an "uncovered mine" sprite; that didn't have to be patched, as it can only exist if you lost) and of course it also changes the address of the text that's printed out to say you won or lost.
This is extremely sketchy. What are you trying to achieve with this?
This was a rare exception to my "most of the time" caveat above. I wanted to use the commented shr instructions, and debug can't assemble them for some reason. It only seems to support single bit shifts.

1724623035913.png

I could either do a single bit shift n times, or I could use the x86 instruction reference and do it myself. I put the intended assembly code in a comment and then used db to put the assembled bytecode directly under it.

1724624592472.png


Of course, /5 had to be found in this table... isn't that so much fun. Not exactly the most intuitive thing I've ever had to do...
1724629211669.png

Anyway, here's a full playthrough with a few mistakes (a few times I clicked the wrong square, the low res made it a bit tricky to hit the right one) but they luckily didn't kill me, but then in the end I had to start guessing and I uncovered a mine. So you get to see those sprites.



edit: and here's one I won, just to prove that I'm not entirely terrible at the game... although I can't say I didn't make any mistakes... bonus points if you spot it before I did...

 
Last edited:
God I wish being a w*man made getting hired that easy. I think they've moved up the stack to genderspecials now. Or maybe I just need to grind more leetcode, I dunno.
After you do 100 interviews or so, you'll recognize the patterns of the problems. Quantity over quality.

Also, the Google interview at this point is between a leetcode medium and hard, so if you can do leetcode hard problems consistently while also charming your interviewer with small talk, you're good. Also, think out loud during the interview - the number 1 mistake I have seen in interview technique is not doing that. It's gay, but you want your interviewer to like you since they're going to write up what happened in the interview for a hiring committee, and they will write a better review if they like you.
 
Also, the Google interview at this point is between a leetcode medium and hard, so if you can do leetcode hard problems consistently while also charming your interviewer with small talk, you're good.
I've never done a single leetcode in my life. I wonder how I would do in a Jewgle interview.

My small talk and Smalltalk skills are on point though.
 
I did an interview loop at one of the FAGMAN companies last week and have a final interview coming up soon. Any tips on surviving in FAGMAN if I make it (as someone who hates troons)? Or any tips on the last interview itself? the recruiter has not told me the nature of the interview.
 
I did an interview loop at one of the FAGMAN companies last week and have a final interview coming up soon. Any tips on surviving in FAGMAN if I make it (as someone who hates troons)? Or any tips on the last interview itself? the recruiter has not told me the nature of the interview.
The very instant you accept the job, your soul will be ripped from your body and be consumed by bill gates to keep him alive, you will be left as a husk that knows some cool stuff. You will then be tricked into working on the most mind numbing projects that have ever existed, maybe once a year you will work on something vaguely interesting. You will be given a slice of pizza every friday by your boss, which will be enough to ensure you are docile and will not become a rogue element. You will be forced to complete web-based multiple question quizzes after sitting through corporate troon cocksucking training, to ensure you are a good goy who is aligned with FAGMAN's values. You will even be asked to pay part of your salary as a tithe, which will then be donated to shitlib causes in your name. Even if you are the goodest most technically capable goy they ever had, you will be passed over for mediocre darkskins and troons when it comes to promotions.
Sure, you will survive just fine, but you won't really be living.
 
Back