Carl Nettelblad (@cnettel) header
Carl Nettelblad (@cnettel) profile picture

41-yo professor in Scientific Computing. Analyzing data from genetics and other stuff, preferably using some C++, possibly 'AI'.

Uppsala, Sweden
Joined July 2011
Photo by Carl Nettelblad (@cnettel)Photo by Carl Nettelblad (@cnettel)Photo by Carl Nettelblad (@cnettel)Photo by Carl Nettelblad (@cnettel)Photo by Carl Nettelblad (@cnettel)Photo by Carl Nettelblad (@cnettel)Photo by Carl Nettelblad (@cnettel)Photo by Carl Nettelblad (@cnettel)Photo by Carl Nettelblad (@cnettel)Photo by Carl Nettelblad (@cnettel)
Carl Nettelblad retweeted
I always thought it was a shame that modest default stack setups made alloca() a generally-frowned-upon technique in C/C++. With 64 bit architectures, give every stack a virtual address space equal to the physical memory by default! You can do a surprisingly good job of memory management with just the stack, and I contend that it has both correctness and performance advantages. Allocations are a trivial pointer adjustment, and frees are literally free. Keeping everything linearly packed is friendlier for all layers of the cache hierarchy, and it makes keeping everything in huge / gigantic pages easy. Leaving temporary intermediate blocks on the stack can seem wasteful, but unless you are dealing with algorithms that make > O(n) temporary allocations, it is usually not a big deal. Static analysis can check if you store a stack pointer into a structure deeper in the stack, which is a use-after-free, and then memory management correctness is guaranteed. The discipline of caller-allocates-return is awkward in some dynamic cases. It would take a change in low level calling conventions, but you could plausibly have functions that return with the stack extended from where it was when they were called. I’m not holding my breath for that. It isn’t obvious if having AI coding agents makes discussions of software architecture more or less important!
148
132
29
2,515
219,564
Carl Nettelblad retweeted
Den där nyliberala extremismen blir man ju lite nyfiken på. Tyvärr finns den bara i sossarnas fantasivärld. Om man inte menar typ avskaffat danstillstånd (med obligatorisk anmälan).
8
15
1
113
9,173
Carl Nettelblad retweeted
What I’m saying is, moving the goalposts is good, actually 😉
1
4
337
17,619
Carl Nettelblad retweeted
I’m convinced that a large % of programmers don’t actually like computers. As a side effect, are also perfectly happy to throw away their reasoning to a model as soon as they can. I don’t get it, at ALL. Don’t you *LIKE* understanding the magic of the machine? You do realize hand-programming (I hate that I even have to specify hand now) is fun…right?
995
715
271
8,932
971,298
Carl Nettelblad retweeted
most non-C++ developers are just users playing inside a C++ dev’s program.
158
132
30
3,202
119,889
Carl Nettelblad retweeted
For all the recent supply chain security attacks, I find it fascinating that C++’s standard package manager hasn’t been attacked. Tells you a lot that nobody is criticizing C++’s security right now!
17
12
5
259
28,332
Carl Nettelblad retweeted
The Economist’s obituary of Khamenei up there with Swift’s disgraceful suggestion that the starving Irish sell their babies to be eaten
The Economist, in its “fighting back the tears” obituary for Khamenei, salivates with true depravity over Trump’s future death in grisly, if ecstatic, terms: “...when Mr. Trump’s body was ashes, eaten by worms and ants.” It makes the Washington Post and its infamous “Austere Islamic Scholar” obituary for Abu Bakr al-Baghdadi seem very quaint indeed. But I read the whole thing so you don’t have to. The key takeaways: 1. The USA is the Great Satan—no scare quotes. 2. For readers who don’t know what “Israel” is, the Economist helpfully translates it in parentheses as “the little Satan.” 3. Khamenei, otherwise known as “God’s Dictator,” had “divine right on his side” and had “countless reasons to hate the West,” which is an America-led “phalanx of morally corrupt countries.” 4. Khamenei was a sainted and humble man, dragged to power against his will, selfless and “heroically flexible” and unassailable—a “humble cleric from Mashhad who inherited the earth.” 5. Honourable in life, but perfect in death: what could be sweeter than delicious martyrdom? What could be “more deserving of paradise-to-come than to drink the pure draught of a martyr’s end”?! 6. According to the Economist, “Freedom, human rights, dress codes for women” are “tiresome Western tropes.” Yes, really. 7. All his troubles were economic: he was tormented by the West and by foreign enemies. All the crimes he ordered—beatings, killings, and so on—were, naturally, merely “a response” to those Western crimes. 8. He “rules by divine authority,” and “his tongue could channel God.” 9. He was just a ”mild-mannered cleric” gazed benignly from billboards and was a great teacher of forgiveness”. We have now surely reached the apogee of the decay of the legacy media in the West. Surely it can't sink lower than this?
Readers added context they thought people might want to know
The Economist writes obituaries from the mindset of the deceased, not its own mission to champion free markets. medium.economist.com/the-art-of-wri…
57
104
10
1,250
242,648
Carl Nettelblad retweeted
Replying to @NutritionMadeS3
Two more points: - In BP trials (e.g. EUROPA/Perindopril, 4.6 years), we'll have 6.1 days saved. - Trial of an elixir of immortality on 50-years-old for 5 years will have 23.87 days saved. If we use that metric, we should not be taking any BP medicines, or anything really.
1
1
7
320
Carl Nettelblad retweeted
Your computer is a dataflow machine trying very hard to fit itself into a PDP-11 shaped box in order to make C compilers happy.
35
58
4
906
50,981
Carl Nettelblad retweeted
> Went in to work dressed as a reporter for Halloween. > Asked pure mathematicians "what are some real world applications of your work?" > Asked applied mathematicians "which of your theorems are you most proud of?" > Great day.
3
29
1
805
17,429
Carl Nettelblad retweeted
Replying to @lemire
Honestly, I was never burned out by doing something hard. I was only burned out by doing something futile.
12
60
7
707
26,111
So, listen up, kids: When Russia deliberately launches dozens of drones against Poland and Romania, that is NOT warmongering and NOT a threat of war between Russia and NATO. But when European countries even theoretically consider the possibility of helping Ukraine shoot down Russian drones over Ukrainian territory - so that Russia cannot use them to attack European countries - that suddenly becomes “a war between NATO and Russia.” Don’t get it confused!
195
1,212
34
6,860
316,234
Carl Nettelblad retweeted
A card game based on the Boost C++ libraries. Peak nerd.
9
19
4
142
13,997
Carl Nettelblad retweeted
Replying to @kellabyte
It’s pretty hilarious how many terrible but rare bugs can be just covered by a bunch of support agents.
1
2
95
Carl Nettelblad retweeted
VCs rediscovering the trichotomy property of real numbers:
Among every founder Ive ever known or invested in, one thing is true: none of them hit the revenue goal they say they'll do. They all either miss it or beat it. Every time.
20
55
2
1,694
100,366
Carl Nettelblad retweeted
You too can crash today's 6.12.43 LTS kernel thanks to a stable maintainer's AI slop. All you need is CAP_SYS_RESOURCE, modern systemd, and this: 40 b7 40 c1 e7 18 83 ef 08 57 57 31 ff 40 b7 07 31 c0 b0 a0 48 89 e6 0f 05 5e ff ce 31 ff b0 21 0f 05 Look at all this extra space!
35
156
33
2,215
277,823
Carl Nettelblad retweeted
You may have heard that an average human breathes out roughly 1kg of carbon dioxide a day. Gas masses are kind of abstract, and most of the mass is oxygen than you breathe in, but that is still 273 grams of carbon that your metabolism draws out of your body every day, even if you are fasting. Much more for a large person laboring heavily. Weighed out, that is a surprisingly large pile! (thinking about space habitats)
110
96
25
2,325
315,030
Carl Nettelblad retweeted
Do Markets Value Fed Independence? An Event Study.
83
732
40
4,956
322,281
Carl Nettelblad retweeted
Endast i ett mycket skruvat klimat kan vanligtvis rimliga människor få för sig att Expo är någon slags vänsterorganisation.
62
99
115
806
451,560
Carl Nettelblad retweeted
Replying to @dshumphr
This is actually a very good point. If you actually spend work time working, amazing things can happen.
2
7
1
683
32,847