Maybe someone should ask Chuck Norris how long it took him. Who wants to go first?
1,137 karma · joined November 15, 2017
Maybe someone should ask Chuck Norris how long it took him. Who wants to go first?
I know. I mentioned the GC because of another comment and because reference counting and GCs are the two usual general ways (that I know of) for automating memory management. That's what I had in mind.
Unless I'm misunderstanding, arena allocators are most useful for categories of objects with similar lifetimes and are not in the fully automated category. Because if I have multiple arena allocators, I still have to manually assign an allocator when creating an object and also deal with the lifetimes of the allocators themselves.
Easier than allocating/deallocating individual objects in main memory with malloc, true, and probably more efficient, but still not fully automated, so in my mind they have different use cases.
But it's possible that I haven't really understood them, so if I'm mistaken about their use, please don't leave me in the dark. If that makes me look like a junior wannabe, I think I can take it. Even the people who know their stuff had some point when they didn't..
But since C doesn't have objects or messages, the best equivalent thing I can think of is for the C compiler to emit some type of signal on assignments and variables going out of scope.
I don't claim to know what's the best solution for adding automatic memory management to C, but I'm pretty sure a good one exists. And it would need compiler support for it to work.
You can completely understand the language since it's so small and doesn't change much and (if you avoid complicated pointer expressions) that also helps with reading the code.
That said, I don't enjoy manual memory management, but I'd like a GC even less.
Arena allocators are useful, but since reference counting is the preferred general solution in C++, could something similar also work in C without taking away that minimalism? I think it might, but that is just my opinion.
But enough of that. The future looks bright. Everyone smile!
Or else..
Well, knowing that, one could reasonably wonder why they never succeed. Could it be something about human nature that prevents utopias and good intentions from working as planned?
Would the same apply to unicorns? Probably not, because they're special.
Which is probably a bit counterintuitive for most people. At least for me it was.
Public companies are strange creatures. You'd expect a company's valuation to be proportionally tied to its revenue and profit, but it rarely is and Tesla is an extreme case of this.
I just wanted to say great job!
The joke he mentioned about having 50 engines written but only 5 games certainly rings true and I don't think the language is the main problem preventing people from getting their projects done..
I think this truly deserves a CS Ig Nobel Prize, if there were one, for making people laugh and then making people think.
My point is, he thought about it for some time before he was free to start the work, then he laid down the basics in less than a week, so he was able to start using Git to build Git, polished it for a while and then turned it over.
Here's an interview with the man himself telling the story 10 years later, a very interesting read:
https://www.linuxfoundation.org/blog/blog/10-years-of-git-an...
Well I'm not in the target audience, but I like the style and I feel it's a lot less intimidating (and more interesting) than a typical book on programming computers. Pretty neat!
In the end, I find my mental picture is still the most important. And when that fades after a while, or for code written by someone else, then I just have to go read the code. Though it may exist, so far I haven't found a way that's obviously better.
Some thing I've tried (besides commenting code) are doing diagrams (they lose sync over time) and using AI assistants to explain code (not very useful yet). I didn't feel they made the difference, but we have to keep learning in this job.
I can relate to that.
But for the rest of us (especially myself), it seems to be more like an interplay between thinking of what to write, writing it, testing it, thinking some more, changing some minor or major parts of what we wrote, and so on, until it feels good enough.
In the end, it's a bit of an art, coming up with the final working version.
I still fire it up, every once in a while, at night, trying to recapture the mood of those early days.
Eventually we find out, because we stick to what we actually want and discard what we thought we wanted.
Since I'm one of them, perhaps programmers?
https://en.wikipedia.org/wiki/Novelty_effect
It's the best thing ever, until you get used to it, than it becomes the same old. Sometimes I think the human race is completely ruled by this effect, ever chasing the next new thing as it seems so much better than the boring old thing.
https://en.wikipedia.org/wiki/Grunge_speak
https://www.kexp.org/read/2017/11/15/kexp-exclusive-intervie...
At least some people thought it was.