Conversation

Lorenzo Stoakes

If you see somebody reading this on the train RUN
3
1
9

DougMerritt (log😅 = 💧log😄)

@ljs
That's a real book???

When I first heard the word "pointer" I was baffled about what it was until someone explained that it was the same as a memory address in assembly programming. Then it was mostly all obvious.

Why isn't just a section in a C book sufficient...

2
0
0
@dougmerritt yes it is and there's complexities around pointers ;)

It is 'just' a memory address, but the type representation can get confusing, and once you get pointers to pointers and above people get confused. Plus there's all the fun of the fair of array params etc.
1
0
1

DougMerritt (log😅 = 💧log😄)

@ljs
Well, true; every corner of C has things that are potentially confusing.

For instance, bitfields in a union rather than a struct.

1
0
0
@ljs is that real
1
0
0
@ljs ok got my answer from above
0
0
0
@dougmerritt @ljs if I had exam or work interview question where i was what is a memory address, i would answer one word sentence "nothing." ;-)
1
0
1
@gfaster oh SHIT need that on the buy list.

Though I never read the books I get. Bad habit
1
0
1

@ljs It's so wonderfully awful. I learned about it from https://wozniak.ca/blog/2018/06/25/1/index.html and I've been looking for a copy ever since.

1
0
1
@gfaster oh wait my book isn't out yet, there's still time for competition :P
1
0
1

@ljs I think you'll have a hard time beating some of these

(annotated examples)
https://wozniak.ca/blog/2018/06/25/1/code.html

1
0
1
@dougmerritt @ljs Or maybe it would be fair to say that it is something that CPU asserts. Rest is dependent on wiring and CPU "software-defined memory" (could be also partitioning, like MMUless RISC-V allow to do for protection, not just VM) shenanigans. In that sense it is IMHO non-trivial and continuously redefined topic.
1
0
0
@gfaster lol christ... there's a lot of shit books published by the likes of packt out which if you 'look inside' on amazon look very much like print outs + are written terribly (+ wrong about a bunch of things).

And yet have tons of positive reviews...

That's depressing enough as it is. This is just. God.

(I won't name names I don't want to upset anybody I know how hard it is to write books...)
0
1
1

DougMerritt (log😅 = 💧log😄)

@jarkko @ljs
Certainly you just made it a huge subject once you bring in hardware issues.

But that (and @ljs' kernel memory management book) isn't about the C language specifically, no matter how important.

0
0
1