News for hackers. Stuff that matters.
Re:Should you learn C to “learn how the computer works”? by vvanders on Tuesday October 02, 2018 @01:20PM (#18123664)
> The way a computer works is based off of transistors and some concepts built on top of that (ALUs for example). However, there is no need to know about any of that because you're presented with an abstraction (assembly).

I'd argue you should know how that works.

Cache-misses, pipelining and all these subtle performance intricacies that seem to have no rhyme or reason just fall out out understanding exactly how you get shorter clock cycles, different types of memory and the tradeoffs that they present.

One of the best things I ever did was go build a couple projects on an FPGA, when you get down to that level all of these leaky (performance) abstractions are clear as day.

Re:Should you learn C to “learn how the computer works”? by hfdgiutdryg on Tuesday October 02, 2018 @01:34PM (#18123816)
I'd argue that you shouldn't be driving a car unless you've rebuilt a transmission yourself, but that argument wouldn't go far.
Re:Should you learn C to “learn how the computer works”? by vvanders on Tuesday October 02, 2018 @01:53PM (#18124010)
That'd be like saying your end user should understand cache misses, however if you're starting a car design/repair shop you might want to know about how transmissions work.

The primary reason for dropping down to native is to get better performance. If you're going to do that you'll leave 10x-50x performance on the table if you don't understand cache misses, prefetching and the other things that manual memory placement open up.

Re:Should you learn C to “learn how the computer works”? by hfdgiutdryg on Tuesday October 02, 2018 @01:59PM (#18124070)
I'm not going to play anymore metaphor/semantic games. It's nice that you did that project, but it's not at all necessary for someone to engage in that in order to understand performance issues.
Re:Should you learn C to “learn how the computer works”? by vvanders on Tuesday October 02, 2018 @02:40PM (#18124424)
You're the one that raised the metaphor, but okay?

I'm not saying that you can't do performance work without having done that. Just that you'll be at a disadvantage since you're at the mercy of whatever your HW vendor decides to disclose to you.

If you know this stuff you can work back from from first principals. With a high level memory architecture of a system(say tiled vs direct rendering GPU) you can reason about how certain operations will be fast and will be slow.

Re:Should you learn C to “learn how the computer works”? by hfdgiutdryg on Thursday October 04, 2018 @03:10PM (#18142711)
You're the one that raised the metaphor, but okay

And your response was absurd. You don't rebuild a transmission in order to run a shop. You don't even rebuild a transmission as an engineer creating cars, you shop that out to an organization specializing in the extremely difficult task of designing and building transmissions. I wanted to avoid this waste of time, but here we are.

As for the rest of your comment about reasoning about performance, none of that requires the work you did. Again, neat project (for you), but completely unnecessary in general.

Re:Should you learn C to “learn how the computer works”? by Annatar on Tuesday October 02, 2018 @02:47PM (#18124501)
It would be valid, though. A computer programmer must understand how a computer works lest she or he write slow, bloated, inefficient software.
Re:Should you learn C to “learn how the computer works”? by lmm on Tuesday October 02, 2018 @03:32PM (#18124943)
Given how many person-years have been saved and how much value has been produced by "slow, bloated, inefficient software", I must disagree in the strongest possible terms. Producing "slow, bloated, inefficient software" is far, far preferable to not producing software at all.
Re:Should you learn C to “learn how the computer works”? by Annatar on Wednesday October 03, 2018 @02:13AM (#18127982)
I would rather have no software or write the software myself than waste all the time of my life I've had to waste because of such shitty software, and it is indeed the case I've had to write such software from scratch because the alternatives were utter garbage. So we deeply, vehemently disagree.