Better HN
topnewbestaskshowjobs
Log inSign up

fredrikholm

1,433 karma · joined Oct 8, 2020 (6y ago) · 369 submissions

Blog: https://www.fredrikholmqvist.com/

Email:

I do not own any hosting service. If you're wanting to contact me for this reason, I'm not the Fredrik Holmqvist you're looking for.

fredrik.d.holmqvist@gmail.com

Submissions

comment 1mo ago · link · parent

> I picked it out of a lineup of discounted games in a mall and it hasn't left my psyche ever since.

This is how I found most of my favorite PC games as well, including this one.

Often there were these vertical mesh cylinders with a very low effort sign stuck in them that just read the price and that was it. You had to dig through layers upon layers of arbitrary games and surprisingly often found real gems.

It was an eye-opener for tween me to realize that some of the best games made in that era were about as popular as some of the worst games from the same era.

Thank you for the article, a really fascinating read! Good start to my morning.

comment 2mo ago · link · parent

I found Grim Fandango in a pile of discounted games as a tween in the 2000s. There was a cool skeleton in a suit on the front cover, so I bought it based on that.

Even though I didn't understand most references and sarcasm, few games have grabbed my attention as Grim Fandango did. The art work, the music, the writing. The whole game oozes of style that I've never seen replicated.

Even some 20+ years later I can almost recite most of Act I from heart. If you haven't played this game and like adventure games, this is one of the best.

Thank you for linking OP, this made my morning.

comment 3mo ago · link · parent

This is a recent degradation; they've been writing blog entries for years.

As a non native English speaker I can also attest to this trade being extremely demanding of English fluency:

> public static void DoTheThing(Configuration config)

Isn't something you can not understand and still function as a software engineer. Yes, some schools and universities teach in other languages, but the entire ecosystem from code to documentation to articles is nearly almost always in English.

comment 3mo ago · link · parent

> And if we really want to be nitpicky, and concentrating on the "reverse"-part of your statement, then even Balkan countries shine, as they literally managed to reverse the trend.

That same bump is now reversing and the general trend of depopulation continues to accelerate. IIRC Bosnia has the lowest birth rates in all of Europe.

I appreciate the push back; I was overly confident in that statement. I do think however that it's correct to state that the slow trend across all developed countries could be summarized as "aggressively downwards".

Israel is literally the one exception.

comment 3mo ago · link · parent

> Everybody is asking why birth rates plummet. It’s simple. Having a family costs a fuckton of money.

It's a factor, it's not the only factor.

Decrease in teenage pregnancies, decrease in alcohol consumption, contraception and day after pills, higher levels of education, less socialized culture, less generational housing etc.

Having a child is more than often a deliberate, calculated decision that is made by adults whereas in the old world pregnancies happened left and right with little to say about it. Support systems existed because the problem was pervasive. Now the problem is generally gone, and the support systems thereafter.

No country has managed to reverse the trend of declining birth rates. The better quality of life people have, the fewer children people tend to have.

It's not just about who does and who doesn't have children, it's also how many children per family. 1-2 children is the new normal. My grandpa was #7.

comment 5mo ago · link · parent

Continuations predate transducers by some ~40 years and are mostly used as a means of control flow, but yes they are very similar.

Transducers are specialized to data transformation pipelines, continuations are a form of control flow from which you can derive a lot of cool things (exceptions, time travel debugging etc).

comment 6mo ago · link · parent

Once allocators in general click, memory management in C becomes a total breeze.

Combined with typed fat pointers (slices and strings), typed hashmaps and stack-trace-assertions, C in general becomes quite nice. The rest is compiler flags.

Go solves this by being a better language out of the box, but with the Wirthian aspects removed they feel very similar. Perhaps not so surprising.

comment 6mo ago · link · parent

The famous JAMA cohort study[0] of 120k people showed some 5x difference in all cause mortality and morbidity between sedentary and highly active individuals, showing effectively no upper bound.

The NHANES study[1] is another one that showed huge jumps in slowed aging with proportionally (to calories) increased fiber consumption.

There's a lot of these. I recommend Dr Michael Greger for a lot of them summarized. He's very biased towards whole food plant based diet (a type of vegan diet), but he references and cites every statement he makes and is generally a very good communicator.

There is a YouTube channel called Viva Longevity! that invites research authors and generally presents longevity/health information in a way that is very thorough and sincere.

0. https://jamanetwork.com/journals/jamanetworkopen/fullarticle... 1. https://www.mdpi.com/2072-6643/10/4/400

comment 6mo ago · link · parent

It's important to factor in lifestyle factors here.

By the time you hit 40, you've accumulated ~20 years of adult-life habits. For a lot of people, that lifestyle is very sedentary, missing most dietary recommendations (insufficient fiber intake, oversufficient saturated fat intake), poor sleep, frequent emotional stress etc.

As a young adult, you've spent most of your life being very active, sleeping ~10 hours a night (as a child), having plenty of downtime and playtime etc. It's why you can party hard, study hard and sleep a little; you're starting fresh.

The good news is that some of these habits are massive levers; biological age can drift decades (worst-to-best).

comment 6mo ago · link · parent

> very abstract things

A C macro with literals that lacks referential transparency:

  #define MULTIPLY(x, y) x * y
  int result = MULTIPLY(2 + 3, 4); // 14
Not knowing what something means does not make it bad, which is what I'm assuming you meant given how you phrased your sentence.

Having a shared language of patterns and problems that occur in programming is a good thing. Ridiculing such terminology on the basis of "that group of programmers sure are weird" is pointless and counter productive.

comment 6mo ago · link · parent

Agreed, I even find it surprisingly ergonomic. Thinking of data as offsets into memory is unusual coming from almost every other language, but once you grokk it it's actually quite nice.

I love C more than I should.

comment 6mo ago · link · parent

I love that book so much, it helped me grokk the more lambda calculus aspect of FP more than anything.

A few chapters in I belly laughed when it dawned on me that it's going to be recursion until the cows come home. The authors insistence on working through the steps is endearing and comical. Great book to come back to every once in a while.

comment 7mo ago · link · parent

Having to debug the build system to your build system is something else.

comment 7mo ago · link · parent

> When I observe normies they don't seem to care. They'll force and abuse things all the time. I did wonder if it was part of my predisposition towards engineering.

Caring implies doing the right thing, which you can't afford lest you now be bogged down with the burden of doing it correctly, which requires effort.

Some people use dull knives because the thought of maintaining and sharpening them is worse than almost losing a finger every time they need to cut a tomato in half.

I suspect that a lot of people find proactive and sustained effort to be so draining that they'd rather continually have second rate experiences and find peace in that. Then there's people who just generally don't care.

I'm hoping (for my own sanity) that this is a bias on the observer as it's easy to look at someone from the outside and not see the areas where they do care and do the right more times than not. I know I've been unable to live up to my own standards plenty of times throughout the years for factors outside of caring.

comment 8mo ago · link · parent

> You don't need a repl for this workflow and it can be easily implemented in any language. `ls *.MY_LANG | entr -c run.sh` You get feedback whenever you save the file.

As in restarting the entire program and re-running every subsequent query/state changing mechanism that got you there in the first place, being careful not to accidentally run other parts of the program, setting it up to be just so, having to then rewrite parts if you then want to try something somewhere else?

Perhaps I'm misunderstanding you, because that sounds horrible unless you're scripting something small with one path.

The whole point of the REPL is that you evaluate whatever functions you need to get into your desired state and work from there. The ad hoc nature of it is what makes you able to just dig into a part of the code base and get going, even if that project is massive.

> Personally, I find waiting more than 200ms unacceptable and really < 50ms is ideal.

Calling a function on a running program takes microseconds; you're not restarting anything.

comment 8mo ago · link · parent

You evaulate code within your editor against the REPL, seeing the output in the same window you're writing in (perhaps in a different buffer).

The cycle is:

  1. Write production code.
  2. Write some dummy code in the same file (fake data, setup).
  3. Evaluate that dummy code. See what happens.
  4. Modify  code until satisfied.
Your feedback loop is now single digit seconds, without context switching. It's extremely relaxing compared to the alternatives (rerunning tests, launching the program with flags, what have you).

comment 8mo ago · link · parent

If you don't mind me asking, how old are you, and how did this progress? I'm in my mid thirties and am noticing some minor deterioration, but I'm writing it off to loss of sleep due to having small kids.

My curiosity is if this is like you suggest, ingrained patterns, or if there is actual slow down with age. I hear different opinions and am finding it difficult to navigate as I deal with my own, albeit mild, aging.

comment 8mo ago · link · parent

Thank you for great articles and what seems to be a very nice Lisp! I've written so many toy Lisps over the years that I've lost count, always fun to see when they are done more seriously.

A suggestion to the website index, could you add dates to the entries? I find the numbered list confusing as its not entirely clear in what order they are listed.

comment 8mo ago · link · parent

> too many entries, most of which seem tuned to cheating benchmarks

Even for entries that didn't cheat, the code was sometimes unidiomatic in the sense that "real programmers can write Fortran in any language".

This[0] article articulates the issue with by highlighting an ASP.NET implementation that was faster than more 'honest' Java/Go implementations primarily by not using ASP.NET features, skirting some philosophical line of what it means to use something.

For me, the more interesting discussion of whether a language/library is faster/leaner than another exists in actual idiomatic use. In some languages you are actively sweating over individual allocations; in some you're encouraged to allocate collections and immediately throw them away. Being highly concerned with memory and performance in the latter type of language happens, but is seldom the dominant approach in the larger ecosystem.

[0] https://dusted.codes/how-fast-is-really-aspnet-core

comment 9mo ago · link · parent

Learning basic Levantine Arabic has brought me more smiles and free meals than I can count. It's been deeply healing in challenging the negative narratives surrounding these very warm people.

comment 9mo ago · link · parent

If you only had two tilesets, sure. This scales with square of n, so in a real game you're looking at a 4000-8000 long if-else chain.

You're going to spend 100x more time maintaining that disaster than you'd have learning a (to this problem) fundamental algorithm. Shoulders of giants.

comment 9mo ago · link · parent

Tiling sprites is a wonderful example of something that starts off relatively simple and then explodes into all kinds of interesting headaches.

In the beginning, you're looking up a set of UVs in a table indexed by some mask value.

In the end, you're debugging errors where one off by one error cascades into strange realms of indexing the wrong (unloaded) chunk with coordinates rolling over to positions that make no sense, looking up neighbours that look one way yet you end up drawing something completely different.

The suggest solution is an elegant and relatively common approach to what would otherwise be a naive series of nested 40+ if statements consisting of much swearing and sprite editing.

comment 9mo ago · link · parent

Hey stop it with the ad hominems!

comment 10mo ago · link · parent

And with header only libraries (like stb) its even less than that.

I primarily write C nowadays to regain sanity from doing my day job, and the fact that there is zero bit rot and setup/fixing/middling to get things running is in stark contrast to the horrors I have to deal with professionally.

comment 10mo ago · link · parent

> An entry fee that is reimbursed if the bug turns out to matter would stop this, real quick.

I refer to this as the Notion-to-Confluence cost border.

When Notion first came out, it was snappy and easy to use. Creating a page being essentially free of effort, you very quickly had thousands of them, mostly useless.

Confluence, at least in west EU, is offensively slow. The thought of adding a page is sufficiently demoralizing that it's easier to update an existing page and save yourself minutes of request time outs. Consequently, there's some ~20 pages even in large companies.

I'm not saying that sleep(15 * SECOND) is the way to counter, but once something becomes very easy to do at scale, it explodes to the point where the original utility is now lost in a sea of noise.

comment 10mo ago · link · parent

The omission of quotations in the title triggered my Lisp-damaged brain to man the walls, only to immediately be met with Ruby and Scheme examples. False alarm.

comment 11mo ago · link · parent

https://craftinginterpreters.com/introduction.html

AST interpreter in Java from scratch, followed by the same language in a tight bytecode VM in C.

Great book; very good introduction to the subject.

comment 11mo ago · link · parent

And nothing says they weren't thinking about the problem when it happened.

I've had a lot of "aha" moments not sitting by my desk, but that doesn't mean that I wasn't thinking of the problem. When people say they had an idea in the shower, I suspect it's precisely because they were undistracted enough to focus on the problem.

comment 12mo ago · link · parent

As an adult you have the luxury of not living in a false dichotomy where the only two options are VR or fighting.

As a parent you have the responsibility of spending time with the kids when they're young. You can watch your shows later.

comment 12mo ago · link · parent

  unable to interact with other people

  just give it to them and use XR glasses for yourself
12345
13