site banner

Culture War Roundup for the week of November 7, 2022

This weekly roundup thread is intended for all culture war posts. 'Culture war' is vaguely defined, but it basically means controversial issues that fall along set tribal lines. Arguments over culture war issues generate a lot of heat and little light, and few deeply entrenched people ever change their minds. This thread is for voicing opinions and analyzing the state of the discussion while trying to optimize for light over heat.

Optimistically, we think that engaging with people you disagree with is worth your time, and so is being nice! Pessimistically, there are many dynamics that can lead discussions on Culture War topics to become unproductive. There's a human tendency to divide along tribal lines, praising your ingroup and vilifying your outgroup - and if you think you find it easy to criticize your ingroup, then it may be that your outgroup is not who you think it is. Extremists with opposing positions can feed off each other, highlighting each other's worst points to justify their own angry rhetoric, which becomes in turn a new example of bad behavior for the other side to highlight.

We would like to avoid these negative dynamics. Accordingly, we ask that you do not use this thread for waging the Culture War. Examples of waging the Culture War:

  • Shaming.

  • Attempting to 'build consensus' or enforce ideological conformity.

  • Making sweeping generalizations to vilify a group you dislike.

  • Recruiting for a cause.

  • Posting links that could be summarized as 'Boo outgroup!' Basically, if your content is 'Can you believe what Those People did this week?' then you should either refrain from posting, or do some very patient work to contextualize and/or steel-man the relevant viewpoint.

In general, you should argue to understand, not to win. This thread is not territory to be claimed by one group or another; indeed, the aim is to have many different viewpoints represented here. Thus, we also ask that you follow some guidelines:

  • Speak plainly. Avoid sarcasm and mockery. When disagreeing with someone, state your objections explicitly.

  • Be as precise and charitable as you can. Don't paraphrase unflatteringly.

  • Don't imply that someone said something they did not say, even if you think it follows from what they said.

  • Write like everyone is reading and you want them to be included in the discussion.

On an ad hoc basis, the mods will try to compile a list of the best posts/comments from the previous week, posted in Quality Contribution threads and archived at /r/TheThread. You may nominate a comment for this list by clicking on 'report' at the bottom of the post and typing 'Actually a quality contribution' as the report reason.

13
Jump in the discussion.

No email address required.

C simplifies the construction of loops (which seem horrible in assembly)

This isn't hugely relevant to your point, but loops really aren't that bad in assembly. Basic for loop from 0-100 in assembly will be something like:

mov rcx, 0 ; set counter to 0

mov rax, 100 ; target number

.loop:

; whatever you want to do in your loop goes here

inc rcx ; counter += 1

cmp rcx, rax

jne .loop ; with above line, compare the counter to the target and loop if the target isn't reached


That really isn't particularly bad, though certainly not quite as nice as C or another higher-level language.

;whatever you want to do in your loop goes here

^ Is doing all the heavy lifting of "isn't particularly bad".

Nah, not really. Sure, whatever you put in the loop body will certainly be more verbose and harder to write than if you wrote it in C. But that isn't relevant to the notion that loops are hard to write in and of themselves in assembly. That's why I didn't include anything inside the loop, to show that the loop itself isn't hard to write.

Now, if we're saying assembly in general is harder to write? I will totally agree. I wouldn't go so far as to say it's super horrible or anything, but it is harder for sure. There is a reason we invented higher level languages. My point here was simply that loops are not particularly bad.

Maybe loops were a bad example. To be fair, I never wrote anything more than the bare minimum in assembly. I don't have deep knowledge of it and went for the first thing I could think of. The main point was C provides a bunch of niceties on top of assembly. And Python provides a lot of niceties over C. My mathematician peers would probably love to write their for loops in the style of for i,j,k ∈ +Z^3; i,j,k <= 10 { } which is a lot more abstract than loops in previous languages. Eventually it might become For all positive integer 3-tuples each value less than 10 { }. Heck maybe even For all the points in a cube with side length 10 { }. We lose some specificity, choosing which direction to iterate over first, but we are rewarded with reduced conceptual load.

Maybe what you mean is "assembly is bad at scopes" (in that the "whatever you want to do in your loop" has to remember which registers you've already used for other purposes outside of the loop; the same problem arises for procedure calls)?

Seems fair, but I agree with @SubstantialFrivolity that it's weird to characterize that as assembly being bad at loops. It's bad at naming. And getting the name of your complaint right is half the battle -- the other half is cache invalidation and the other half is off by one errors.

hey now

Our power (and income) relies on the kids trained on Java and Python viewing assembly as some sort of dark magic, I can't let you just hand out eldritch knowledge willy-nilly ;-)

The new programming literacy test: Write Fizzbuzz. In assembler. 6502 assembler. And it has to accept values up to 100,000. You may output a character by calling a subroutine at 0xFDED with the character in the accumulator, after which all register contents are lost.

(it will surprise nobody familiar with the subject that Fizzbuzz in 6502 can be found on the net)

6502 is one of the instruction sets that were actually kind of nice to write by hand, though. I guess you'd do something that amounts to keeping your loop counter mod 15 in the low 4 bits of X and then use the remaining 13 bits in X and Y plus some flag you don't touch to get to 100k? I'd rather do this exercise than MIPS or some nasty SIMD and/or RISC special-purpose core...

Yes, all the 8-bit processors were pretty easy to write for by hand; the trick is they don't have multiplication, division, or 24-bit numbers. (Most can do limited 16-bit arithmetic). Getting that right isn't hard but it probably requires you've done low-level work before.

MIPS isn't hard either, provided you just throw a no-op in the delay slot.

I'd rather use 68k which had a bit more to work with (and I still have a physical reference manual) and it had more consistent behavior rather than the fun quirks of 6502.

Yeah, the 68000 series was probably the peak of hand-writable assembly language. But it's a 32-bit processor with multiplication and division, way too easy.

While you're at it, mine your own silicon for the CPU.

PrimitiveTechnology has entered the chat.

Sorry, I didn't mean to let guild secrets out into the open like that.

Honestly I find it kind of depressing just how many of our new hires now seem to view even C and basic command line functions as eldritch knowledge. Like come on, what do you guys even do in school these days?

Given that I just spent two days dealing with Linux kernel driver conflicts even though that is obstensibly not my job I think you're right ;-)