Better HN
topnewbestaskshowjobs
Log inSign up

tmewett

25 karma · joined Nov 28, 2022 (3y ago) · 15 submissions

Submissions

1.

Review: Why the Lucky Stiff(tmewett.com ↗)

3 points · by tmewett · 9mo ago · discuss

2.

Homemade incremental programming, part 1: how and why to abolish update code(tmewett.com ↗)

1 points · by tmewett · 1y ago · discuss

3.

Developing on Windows: Comparing Native, MinGW, Cygwin, WSL(tmewett.com ↗)

10 points · by tmewett · 2y ago · 1 comment

4.

React is more than UI–it's a side-effect framework(tmewett.com ↗)

1 points · by tmewett · 2y ago · discuss

5.

React-like declarative components for the whole family(tmewett.com ↗)

1 points · by tmewett · 3y ago · discuss

comment 3y ago · link · parent

Thank you :) Though I should say, most of the code is by the original author Brian

comment 3y ago · link · parent

Hah, "unnecessarily abstract" is my middle name :)

I don't really like stack/heap terminology. "Heap" especially is a nightmare because (a) it also means some specific, irrelevant kind of data structure and (b) there's so many ways of implementing allocation it feels wrong to call it "the" anything.

Function variables are deleted after return, allocated stuff isn't - no need to know about stack pointers, etc. It's good enough for me!

But it's really interesting to hear from other programmers who learned things in the historical order. I suppose I come from a new generation where abstractions are first, and I wrote this article for them, really.

comment 3y ago · link · parent

>C does a wonderful job of looking like a high level language but it was designed to do low level stuff. There is an implicit assumption, to my mind, that the user has a deeper understanding of what is behind the "curtain" that is created by the compiler.

Lots of people say this, indeed several comments here talk about learning assembly before C being beneficial.

I actually think this is not true, today. In its original incarnation C may have mapped closely to instructions, but the details of e.g. x86 are IMO neither necessary nor particularly useful knowledge. Knowing what memory is like and how stuff is laid out is enough.

C is not just a super-thin layer to the bare metal. By "integers are cursed," I mean exactly that: C integers are cursed. The arithmetic behaviours that standard C defines for integers are error-prone and in many cases undefined. C is a layer and it has its own behaviour, it doesn't just expose your CPU.

comment 3y ago · link · parent

I didn't learn computer science at college/university - only via the internet, and C is quite different to learn that way vs other languages. That was my main motivation for writing :)

comment 3y ago · link · parent

Thank you so much! I will definitely be amending a few things. WRT no section on undefined behaviour - you're so right, how could I forget?

comment 3y ago · link · parent

Completely agree - that's exactly why I wrote this. Some of things I wrote even seem super obvious but with no real authority you wonder whether or not this is "the way" to do things. If you ever want to get some practical experience, we'll help you out if you want to contribute to Brogue :)

comment 3y ago · link · parent

Interesting, I didn't fully realise that. That it's arbitrary is annoying, I clearly had tried to rationalise it to myself! Thanks for the comments, will get around to amending

comment 3y ago · link · parent

Ah, that was one of my less considered additions - thank you for the feedback!