💾 Archived View for breadpunk.club › ~bakersdozen › gemlog › 6.gmi captured on 2023-04-26 at 13:34:57. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2021-12-03)
-=-=-=-=-=-=-
I started yet another C tutorial. It's the one hosted on wikibooks. It's fine, but I'm not really digging it. I had started another one a month or three back. It was a cool one that teaches you C while walking you through creating a lisp. I admire it's dual agenda, and it executes well on both fronts. I lost interest in it though, and I know exactly why: I had started copying and pasting code examples. This is a big no-no when you are trying to learn programing from web materials. I know it, and I think most other people know. Typing code out by hand is doing it The Hard Way as codified by the Zed Shaw method, and from experience I believe it makes a huge difference in understanding and retention.
One of my favorite articles I've read recently is "How To Read A Code" by Jonas Lunberg. It provides a model for gaining understanding and insight into a new codebase based mostly on the perennial "How To Read A Book" (which is excellent, and which everybody should read), while also mixing in a little bit of active recall which they get from--you guessed it (unless you didn't!)--Learn C The Hard Way.
For example, they recommend studying the file and directory structure of a new project, trying to guess/comprehend the purpose and meaning of each directory and file, and then--here's the active recall part--open up a new terminal and create a new directory, and try to recreate from memory and by hand the basic directory structure and the main files. The files become stubs with self-referential, narrative comments about their purpose and role in the larger picture.
An interesting method. I've never tried it. It sounds labor intensive and mentally exhausting. But, again, interesting. I have no doubt that you gain an intimate familiarity with any codebase by following this undoubtedly impracticle method.
Anyway, I started yet another C tutorial.
I had a major inspiration and a minor inspiration for pointing my toes into these particular waters. (That was a pointer joke. Don't miss it.)
The minor inspiration is a flurry and a slurry of articles lately about Rust vs. Go, and now vs. Zig as the low level systems language of choice, and which one is "better" and which one shall inherit the throne of C as the lingua franca of systems programming. I've dabbled and flirted with Go and Rust. They seem cool. But I have this desire to go back and study the roots of it all, the origin and the source.
Kind of like wanting to study Latin before learning Spanish? Not quite. Perhaps more like wanting to go back and listen to The Velvet Underground to gain a better appreciation Bowie. Or listening to a bunch of Leadbelly to see the blues influence on The White Stripes.
Is Zig the Long Awaited C Replacement? (Archived from medium.com)
One of the better Rust vs. Go comparrisons I've seen
I had a teacher once who made constant use of a metaphor that I didn't really understand at the time. She would categorize concepts and things into "Gospel" or "Church". What I now understand her to have meant is that Gospel is organic and of the people, created and spread through practice with little or no oversight or governance. Whereas Church is the opposite: it is the hierarchy and the codification and the regimented structure that is imposed from the top down.
If it's gospel you already know how to pray because you feel it in your bones. If it's church, how and when to pray is prescribed to you, and there is a right way and a wrong way to do it.
Well you say that it's gospel
But I know that it's only church
- "That Feel", Tom Waits
I don't know why I mention that here. I don't think that C is "gospel". But I think there might be something, somehow, to the belief that the cults of Go and Rust might be a little bit churchy. I can't really elaborate much on that, I don't think. It's just a hunch and a feeling I have.
But the major inspiration for learning me some C has been all of the rad shit that Hundred Rabbits has put out, all of it written on a sailboat in ~~C99~~ correction: ANSI C (C89). Possibly on a Plan 9 laptop?
Rekka Bellum & Devine Lu Linvega are creating free & open-source software while sailing around the world.
https://100r.co/site/home.html
https://hundredrabbits.itch.io/
Divine of Rekka & Devine is very active on mastodon and posts lots of screenshots of her code projects and other stuff too.
https://merveilles.town/@neauoire
Their whole aesthetic and mission and purpose and the stuff they're into just really gels with me, from music to visual art to creating literature to living off the grid to sailing around the world to growing your own food (on a boat!) to not owning a refrigerator, and everything else. So I'm sitting here openly admitting to having a huge crush on them and succumbing to a cult of personality in which I whole heartedly admit that if they think C is cool, then maybe I like it too.
It's nice to have inspirations to learn something, and sometimes that's enough.
But it's often better to have /intentions/ for learning something. A goal.
For example, learning Spanish is an okay enough goal in its own right. But my primary /intentions/ for learning it are to better engage with the Spanish speaking community here in my own home town, and also to be able to travel to Latin and South America and be able to communicate with people there.
Those goals are still kind of nebulous, and sometimes I have to actively engage with them:
- Today I will listen to local Spanish radio.
- I will plan a trip to Puerto Vallarta this fall. (pre-Covid goal, natch)
So anyway. What are my actual intentions with learning C?
I would like to do the following:
1. Make a personal gemini client! This will be a good excuse to learn me some TCP, and maybe some binding for a GUI toolkit? Oh, and I'd finally have to learn what TLS really is and how to manage it.
2. I have this idea of making a curses based Among-Sus client where you can have the map displayed and have better hotkeys for moving around and performing tasks. I've never made a curses anything, so that ought to be fun.
EOF