@hope legit this is part of what got me into programming
my dad went to UNC and one of his colleagues invented something called a "valve" which is basically a mutex that switches the flow of control in threads that subsequently attempt to lock the mutex using some very specific implementation but I could only ever get secondhand information about it
but today my dad got back in touch with him and he emailed me basically saying "what the heck is this all about" so we'll see how much i get out of this
@hope and i heard about this first when i was, like, 13? and i was like "wait you can just Make Up Data Structures holy shit" and that's how I decided to learn C by reading K&R in a single sitting. it did not work even a little bit and i didn't actually learn C until like 3 years later but still
isn't C like the worst programming language to start learning programming in?
The hardest thing for me to learn about C, though, was all the things that aren't C - the build tools and the macro language. If a tutorial was to start with one and two file programs and teach the most used 20% of the standard library before diving into compiler concepts and command switches for more complex builds, it wouldn't suck. I was able to work around the lack of that kind of learning tool by studying an existing codebase where someone else had already set up the build system
But I'm also really curious about this valve data structure
but Lisp… i am very fond of…
so, the way I learned C was with the best IDE in the world: Turbo C.
The integrated debugger made for some of the most pleasant programming experiences.
And I quite didn't know what I was missing, switching to Linux where there was no adequate equivalent… until I learned about Ruby's pry almost 12 years later.
@clacke @tindall @yaaps @hope Ruby's pry is, unironically, what gave me the confidence to call myself a programmer, https://igalic.co/thoughts/2017-09-06-ops2dev.html
C has some advantages:
1. Calls to user code are visibly distinct with clearly-marked inputs and outputs.
2. Each feature of the base language is very simple.
3. The base libs are also predictable and well-documented.
The footguns are still there but modern tooling and MMUs help a *lot*.
C really expanded BASIC-trained mind when I learned it because I realized I could add to the language.
Too late; mind was blown by C. (Then Perl and Smalltalk, but that's another story.)
(Although if someone had taken teenaged-me aside and explained that that Logo language we were all making fun of was actually just Lisp in disguise and that Lisp was a super power hacker language, I'd probably have learned more sooner.)
A co-worker of mine did some computer pedagogy research in grad school and told me that his group had been pretty successful in teaching programming using C as a first language. I was surprised too.
Although I suppose a C dialect with memory safety and memory leak detection might be a better option.