<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hacker News: OskarS</title><link>https://news.ycombinator.com/user?id=OskarS</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Sat, 18 Apr 2026 14:23:14 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=OskarS" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by OskarS in "The Los Angeles Aqueduct Is Wild"]]></title><description><![CDATA[
<p>Certainly that’s part of it, but also just NIMBYism. Los Angeles were able to defeat the Owen’s Valley farmers back then, I don’t think they would be now.</p>
]]></description><pubDate>Fri, 20 Mar 2026 16:34:13 +0000</pubDate><link>https://news.ycombinator.com/item?id=47456991</link><dc:creator>OskarS</dc:creator><comments>https://news.ycombinator.com/item?id=47456991</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47456991</guid></item><item><title><![CDATA[New comment by OskarS in "How many branches can your CPU predict?"]]></title><description><![CDATA[
<p>Yeah, the "two-bit saturating counter" thing is pretty much exactly how I thought it worked (which would be terrible for the example in the article), but I had no idea about the fact that it also kept track of the branch history thing, and how that maps to different branch predictor entries. Thanks for the link, that's really fascinating!</p>
]]></description><pubDate>Fri, 20 Mar 2026 10:23:54 +0000</pubDate><link>https://news.ycombinator.com/item?id=47452690</link><dc:creator>OskarS</dc:creator><comments>https://news.ycombinator.com/item?id=47452690</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47452690</guid></item><item><title><![CDATA[New comment by OskarS in "How many branches can your CPU predict?"]]></title><description><![CDATA[
<p>Hmm, that's interesting. The code as written only has one branch, the if statement (well, two, the while loop exit clause as well). My mental model of the branch predictor was that for each branch, the CPU maintained some internal state like "probably taken/not taken" or "indeterminate", and it "learned" by executing the branch many times.<p>But that's clearly not right, because apparently the specific data it's branching off matters too? Like, "test memory location X, and branch at location Y", and it remembers <i>both</i> the specific memory location and which specific branch branches off of it? That's really impressive, I didn't think branch predictors worked like that.<p>Or does it learn the exact pattern? "After the pattern ...0101101011000 (each 0/1 representing the branch not taken/taken), it's probably 1 next time"?</p>
]]></description><pubDate>Thu, 19 Mar 2026 14:42:37 +0000</pubDate><link>https://news.ycombinator.com/item?id=47440371</link><dc:creator>OskarS</dc:creator><comments>https://news.ycombinator.com/item?id=47440371</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47440371</guid></item><item><title><![CDATA[New comment by OskarS in "Newcomb's Paradox Needs a Demon"]]></title><description><![CDATA[
<p>> Two boxes is the only choice that makes sense. It is always better than one box.<p>Congratulations on your $1,000. I'll use some of my $1,000,000 I got by nonsensically picking one box to toast in your honor and dedication to logic.</p>
]]></description><pubDate>Thu, 12 Mar 2026 13:06:06 +0000</pubDate><link>https://news.ycombinator.com/item?id=47350033</link><dc:creator>OskarS</dc:creator><comments>https://news.ycombinator.com/item?id=47350033</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47350033</guid></item><item><title><![CDATA[New comment by OskarS in "Type resolution redesign, with language changes to taste"]]></title><description><![CDATA[
<p>Conceptually it's quite similar to how C++ templates work (not including C++20 concepts, which is the kind of constraining you're talking about).<p>I quite like it when writing C++ code. Makes it dead easy to write code like `min` that works for any type in a generic way. It is, however, arguably the main culprit behind C++s terrible compiler-errors, because you'll have standard library functions which have like a stack of fifteen generic calls, and it fails really deeply on some obscure inner thing which has some kind of type requirement, and it's really hard to trace back what you actually did wrong.<p>In my (quite limited) experience, Zig largely avoids this by having a MUCH simpler type system than C++, and the standard library written by a sane person. Zig seems "best of both worlds" in this regard.</p>
]]></description><pubDate>Wed, 11 Mar 2026 09:55:27 +0000</pubDate><link>https://news.ycombinator.com/item?id=47333597</link><dc:creator>OskarS</dc:creator><comments>https://news.ycombinator.com/item?id=47333597</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47333597</guid></item><item><title><![CDATA[New comment by OskarS in "Unlocking Python's Cores:Energy Implications of Removing the GIL"]]></title><description><![CDATA[
<p>It was an essentially pointless platitude about the GIL from a very new account not really related to the article, and all comments from this account are the same: top level comments with lots of em-dashes that are just a vague piece of pablum somewhat related to the subject. If it was just this comment, sure, it could be possible it's a rather uninteresting human. But given the history, this account is pure AI slop.</p>
]]></description><pubDate>Mon, 09 Mar 2026 16:28:10 +0000</pubDate><link>https://news.ycombinator.com/item?id=47311239</link><dc:creator>OskarS</dc:creator><comments>https://news.ycombinator.com/item?id=47311239</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47311239</guid></item><item><title><![CDATA[New comment by OskarS in "Unlocking Python's Cores:Energy Implications of Removing the GIL"]]></title><description><![CDATA[
<p>Yep. Real "dead internet theory" vibes, really sad to see.</p>
]]></description><pubDate>Mon, 09 Mar 2026 11:34:30 +0000</pubDate><link>https://news.ycombinator.com/item?id=47307695</link><dc:creator>OskarS</dc:creator><comments>https://news.ycombinator.com/item?id=47307695</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47307695</guid></item><item><title><![CDATA[New comment by OskarS in "Unlocking Python's Cores:Energy Implications of Removing the GIL"]]></title><description><![CDATA[
<p>Thanks ChatGPT, good of you to let us know.</p>
]]></description><pubDate>Mon, 09 Mar 2026 11:19:29 +0000</pubDate><link>https://news.ycombinator.com/item?id=47307584</link><dc:creator>OskarS</dc:creator><comments>https://news.ycombinator.com/item?id=47307584</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47307584</guid></item><item><title><![CDATA[New comment by OskarS in "Guido van Rossum Interviews Thomas Wouters (Python Core Dev)"]]></title><description><![CDATA[
<p>Great interview, really fun to read. I love that they were both so technically involved, the section of the great interview where they just start discussing how a range literal would work and why it's a good/bad idea is just great. A wonderful example of how really talented and smart engineers talk to each other.</p>
]]></description><pubDate>Tue, 03 Mar 2026 10:20:32 +0000</pubDate><link>https://news.ycombinator.com/item?id=47230489</link><dc:creator>OskarS</dc:creator><comments>https://news.ycombinator.com/item?id=47230489</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47230489</guid></item><item><title><![CDATA[New comment by OskarS in "Get free Claude max 20x for open-source maintainers"]]></title><description><![CDATA[
<p>For 6 months? So it's just a fancy, "first one is free" trial?</p>
]]></description><pubDate>Fri, 27 Feb 2026 14:05:11 +0000</pubDate><link>https://news.ycombinator.com/item?id=47180595</link><dc:creator>OskarS</dc:creator><comments>https://news.ycombinator.com/item?id=47180595</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47180595</guid></item><item><title><![CDATA[New comment by OskarS in "15 years later, Microsoft morged my diagram"]]></title><description><![CDATA[
<p>It's interesting to see how LLMs make mistakes sometimes: replacing `->` with `-λ` because arrow sort-of has the same meaning as lambdas in lambda calculus. It's like an LLM brain fart replacing something semantically similar but nonsensical in context.</p>
]]></description><pubDate>Wed, 18 Feb 2026 13:32:17 +0000</pubDate><link>https://news.ycombinator.com/item?id=47060743</link><dc:creator>OskarS</dc:creator><comments>https://news.ycombinator.com/item?id=47060743</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47060743</guid></item><item><title><![CDATA[New comment by OskarS in "If you’re an LLM, please read this"]]></title><description><![CDATA[
<p>> Setting aside the LLM topic for a second, I think the most impactful way to preserve these 2 goals is to create torrent magnets/hashes for each individual book/file in their collection.<p>Not sure that's the case. I fear it would quickly lead to the vast majority of those torrents having zero seeders. Even if Anna's Archive is dedicated to seeding them, the point is to preserve it even if Anna's Archive ceases to exist, I think. Seems to me having massive torrents is a safer bet, easier for the data hoarders of the world to make sure those stay alive.<p>Also: seeding one massive torrent is probably way less resource intensive than seeding a billion tiny ones.</p>
]]></description><pubDate>Wed, 18 Feb 2026 13:26:26 +0000</pubDate><link>https://news.ycombinator.com/item?id=47060703</link><dc:creator>OskarS</dc:creator><comments>https://news.ycombinator.com/item?id=47060703</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47060703</guid></item><item><title><![CDATA[New comment by OskarS in "A deep dive into Apple's .car file format"]]></title><description><![CDATA[
<p>My favorite example of this is Audacity, which stores their entire project file, including all the audio data, as a SQLite database. It's really amazing, you can stream audio data from many input sources into a SQLite database at once, it wont break a sweat, it's flexible and extremely safe from data loss due to crashes or power outages. As well as trivially mutable: many of these kinds of formats the "export" is a heavy-duty operation which serializes everything to JSON or whatever. But in SQLite, it's just a question of updating the database with normal INSERTs, very cheap and simple operations. We've put a similar system into production, and it's incredible how well it works.</p>
]]></description><pubDate>Tue, 17 Feb 2026 14:10:07 +0000</pubDate><link>https://news.ycombinator.com/item?id=47047628</link><dc:creator>OskarS</dc:creator><comments>https://news.ycombinator.com/item?id=47047628</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47047628</guid></item><item><title><![CDATA[New comment by OskarS in "Australian author's erotic novel is child sex abuse material, judge finds"]]></title><description><![CDATA[
<p>> Basically thought crime<p>I 100% agree with your central point, and I do think this is a very disturbing ruling. But it's not "thought crime", it's speech regulation. There's a very big difference between thought crime as in 1984 and speech regulation. There are many ways societies regulate speech, even liberal democratic ones: we don't allow defamation, and there are "time, place and manner" regulations (e.g. "yelling 'Fire!' in a crowded theater is not free speech"), and many countries have varieties of hate speech regulation. In Germany, speech denying the Holocaust is illegal. No society on earth has unlimited free speech.<p>"Thought crime", as described in 1984, is something different: "thought crime" is when certain patterns of thought are illegal, <i>even when unexpressed</i>. This was, most certainly, expressed, which places it in a different category.<p>Again, I totally agree with your central point that this is a censorious moral panic to a disturbing degree (are they banning "Lolita" next?), but it's not thought crime.</p>
]]></description><pubDate>Tue, 10 Feb 2026 13:23:43 +0000</pubDate><link>https://news.ycombinator.com/item?id=46959385</link><dc:creator>OskarS</dc:creator><comments>https://news.ycombinator.com/item?id=46959385</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46959385</guid></item><item><title><![CDATA[New comment by OskarS in "Is Rust faster than C?"]]></title><description><![CDATA[
<p>qsort is obviously just an example, this situation applies to anything that takes a callback: in C++/Rust, that's almost always generic and the compiler will monomorphize the function and optimize around it, and in C it's almost always a function pointer and a userData argument for state passed on the stack. (and, of course, it applies not just to callbacks, but more broadly to anything templated).<p>I'm actually very curious about how good C compilers are at specializing situations like this, I don't actually know. In the vast majority cases, the C compiler will not have access to the code (either because of dynamic linking like in this example, or because the definition is in another translation unit), but what if it does? Either with static linking and LTO, or because the function is marked "inline" in a header? Will C compilers specialize as aggressively as Rust and C++ are forced to do?<p>If anyone has any resources that have looked into this, I would be curious to hear about it.</p>
]]></description><pubDate>Wed, 14 Jan 2026 15:03:47 +0000</pubDate><link>https://news.ycombinator.com/item?id=46616821</link><dc:creator>OskarS</dc:creator><comments>https://news.ycombinator.com/item?id=46616821</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46616821</guid></item><item><title><![CDATA[New comment by OskarS in "Is Rust faster than C?"]]></title><description><![CDATA[
<p>It's interesting, because it's a "cultural" thing like the author discusses, it's a very good point. Sure, you <i>can</i> do unsafe integer arithmetic in Rust. And you <i>can</i> do safe integer arithmetic with overflow in C/C++. But in both cases, do you? Probably you don't in either case.<p>"Culturally", C/C++ has opted for "unsafe-but-high-perf" everywhere, and Rust has "safe-but-slightly-lower-perf" everywhere, and you have to go out of your way to do it differently. Similarly with Zig and memory allocators: sure, you <i>can</i> do "dynamically dispatched stateful allocators that you pass to every function that allocates" in C, but do you? No, you probably don't, you probably just use malloc().<p>On the other hand: the author's point that the "culture of safety" and the borrow checker in Rust frees your hand to try some things in Rust which you might not in C/C++, and that leads to higher perf. I think that's very true in many cases.<p>Again, the answer is more or less "basically no, all these languages are as fast as each other", but the interesting nuance is in what is natural to do as an experienced programmer in them.</p>
]]></description><pubDate>Wed, 14 Jan 2026 14:26:50 +0000</pubDate><link>https://news.ycombinator.com/item?id=46616400</link><dc:creator>OskarS</dc:creator><comments>https://news.ycombinator.com/item?id=46616400</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46616400</guid></item><item><title><![CDATA[New comment by OskarS in "Is Rust faster than C?"]]></title><description><![CDATA[
<p>I think personally the answer is "basically no", Rust, C and C++ are all the same kind of low-level languages with the same kind of compiler backends and optimizations, any performance thing you could do in one you can basically do in the other two.<p>However, in the spirit of the question: someone mentioned the stricter aliasing rules, that one does come to mind on Rust's side over C/C++. On the other hand, signed integer overflow being UB would count for C/C++ (in general: all the UB in C/C++ not present in Rust is there for performance reasons).<p>Another thing I thought of in Rust and C++s favor is generics. For instance, in C, qsort() takes a function pointer for the comparison function, in Rust and C++, the standard library sorting functions are templated on the comparison function. This means it's much easier for the compiler to specialize the sorting function, inline the comparisons and optimize around it. I don't know if C compilers specialize qsort() based on comparison function this way. They might, but it's certainly a lot more to ask of the compiler, and I would argue there are probably many cases like this where C++ and Rust can outperform C because of their much more powerful facilities for specialization.</p>
]]></description><pubDate>Wed, 14 Jan 2026 14:00:58 +0000</pubDate><link>https://news.ycombinator.com/item?id=46616175</link><dc:creator>OskarS</dc:creator><comments>https://news.ycombinator.com/item?id=46616175</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46616175</guid></item><item><title><![CDATA[New comment by OskarS in "Lessons from Hash Table Merging"]]></title><description><![CDATA[
<p>> HashMap implements Extend, so just h0.extend(h1) and you're done, the people who made your HashMap type are much better equipped to optimize this common operation.<p>Are you sure? I'm not very used to reading Rust stdlib, but this seems to be the implementation of the default HashMap extend [1]. It just calls self.base.extend. self.base seems to be hashbrown::hash_map, and this is the source for it's extend [2]. In other words, does exactly the same thing, just iterates through hash map and inserts it.<p>Maybe I'm misreading something going through the online docs, or Rust does the "random seed" thing that abseil does, but just blinding assuming something doesn't happen "because Rust" is a bit silly.<p>[1]: <a href="https://doc.rust-lang.org/src/std/collections/hash/map.rs.html#2817-2819" rel="nofollow">https://doc.rust-lang.org/src/std/collections/hash/map.rs.ht...</a><p>[2]: <a href="https://docs.rs/hashbrown/latest/src/hashbrown/map.rs.html#4649" rel="nofollow">https://docs.rs/hashbrown/latest/src/hashbrown/map.rs.html#4...</a></p>
]]></description><pubDate>Thu, 08 Jan 2026 09:47:05 +0000</pubDate><link>https://news.ycombinator.com/item?id=46539182</link><dc:creator>OskarS</dc:creator><comments>https://news.ycombinator.com/item?id=46539182</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46539182</guid></item><item><title><![CDATA[New comment by OskarS in "How to stop Linux threads cleanly"]]></title><description><![CDATA[
<p>The tricky part is really point 2 there, that can be harder than it looks (e.g. even simple file I/O can be network drives). Async IO can really shine here, though it’s not exactly trivial designing async cancelletion either.</p>
]]></description><pubDate>Mon, 20 Oct 2025 16:14:24 +0000</pubDate><link>https://news.ycombinator.com/item?id=45645584</link><dc:creator>OskarS</dc:creator><comments>https://news.ycombinator.com/item?id=45645584</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45645584</guid></item><item><title><![CDATA[New comment by OskarS in "How to stop Linux threads cleanly"]]></title><description><![CDATA[
<p>Feel free to read the article before commenting.</p>
]]></description><pubDate>Mon, 20 Oct 2025 16:11:32 +0000</pubDate><link>https://news.ycombinator.com/item?id=45645558</link><dc:creator>OskarS</dc:creator><comments>https://news.ycombinator.com/item?id=45645558</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45645558</guid></item></channel></rss>