<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: demurgos</title><link>https://news.ycombinator.com/user?id=demurgos</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Sat, 20 Jun 2026 18:40:33 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=demurgos" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by demurgos in "We're testing new ad formats in Search and expanding our Direct Offers pilot"]]></title><description><![CDATA[
<p>It could also be a pop-up or a clear icon in a corner without disrupting the movie. It does not have to be baked into the video stream as long as it's displayed. I'm not sure what country you're in but some programs on TV or YouTube use this system and it's fine. No need to pause with flashing lights.</p>
]]></description><pubDate>Fri, 22 May 2026 14:58:42 +0000</pubDate><link>https://news.ycombinator.com/item?id=48236854</link><dc:creator>demurgos</dc:creator><comments>https://news.ycombinator.com/item?id=48236854</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48236854</guid></item><item><title><![CDATA[New comment by demurgos in "Isaac Asimov: The Last Question (1956)"]]></title><description><![CDATA[
<p>This is a standalone game that needs to be purchased. For PC, it can be acquired through Steam (<a href="https://store.steampowered.com/app/753640/Outer_Wilds/" rel="nofollow">https://store.steampowered.com/app/753640/Outer_Wilds/</a>). It is also available on consoles, it is not available on mobile. It is playable with keyboard and mouse, but it was primarily created with a game controller in mind.<p>At it's core, it's a game about exploration to understand what's happening. I recommend looking around and being curious to enjoy it, and avoid rushing. It's my favorite game.<p>To give you an estimate, I completed the base game with all secrets in about 20-30h. There's also a DLC called "Echoes of Eyes" adding a new area to explore. In total, I spent 45h to fully complete the game.</p>
]]></description><pubDate>Fri, 17 Apr 2026 15:20:54 +0000</pubDate><link>https://news.ycombinator.com/item?id=47806902</link><dc:creator>demurgos</dc:creator><comments>https://news.ycombinator.com/item?id=47806902</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47806902</guid></item><item><title><![CDATA[New comment by demurgos in "Servo is now available on crates.io"]]></title><description><![CDATA[
<p>To go further, semver provides semantics and an ordering but it says nothing about version requirement syntax. The caret operator to describe a range of versions is not part of the spec. It was introduced by initial semver-aware package managers such as npm or gem. Cargo decided to default to the caret operator, but it's still the caret operator.<p>In practice, there's no real issue with using the first non-zero component to define the group of API-compatible releases and most package managers agree on the semantics.</p>
]]></description><pubDate>Mon, 13 Apr 2026 15:45:53 +0000</pubDate><link>https://news.ycombinator.com/item?id=47753717</link><dc:creator>demurgos</dc:creator><comments>https://news.ycombinator.com/item?id=47753717</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47753717</guid></item><item><title><![CDATA[New comment by demurgos in "Ask HN: Share your personal website"]]></title><description><![CDATA[
<p>Here is mine: <a href="https://demurgos.net" rel="nofollow">https://demurgos.net</a><p>There's not much, but I keep a few articles and games there.</p>
]]></description><pubDate>Thu, 15 Jan 2026 01:52:06 +0000</pubDate><link>https://news.ycombinator.com/item?id=46626918</link><dc:creator>demurgos</dc:creator><comments>https://news.ycombinator.com/item?id=46626918</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46626918</guid></item><item><title><![CDATA[New comment by demurgos in "CSRF protection without tokens or hidden form fields"]]></title><description><![CDATA[
<p>The "unexpected" part is that the browser automatically fills some headers on behalf of the user, that the (malicious) origin server does not have access to. For most headers it's not a problem, but cookies are more sensitive.<p>The core idea behind the token-based defense is to prove that the origin server had access to the value in the first place such that it could have sent it if the browser didn't add it automatically.<p>I tend to agree that the inclusion of cookies in cross-site requests is the wrong default. Using same-site fixes the problem at the root.<p>The general recommendation I saw is to have two cookies. One without same-site for read operations, this allows to gracefully handle users navigating to your site. And a second same-site cookie for state-changing operations.</p>
]]></description><pubDate>Thu, 25 Dec 2025 08:40:45 +0000</pubDate><link>https://news.ycombinator.com/item?id=46383051</link><dc:creator>demurgos</dc:creator><comments>https://news.ycombinator.com/item?id=46383051</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46383051</guid></item><item><title><![CDATA[New comment by demurgos in "Log level 'error' should mean that something needs to be fixed"]]></title><description><![CDATA[
<p>Yeah, it's hard to prevent a sufficiently motivated dev from shooting itself in the foot; but these still help.<p>> You conveniently left out where the Foo string is computed from something that actually need computation.<p>I left it out because the comment I was replying to was pointing that some logs don't have params.<p>For the approach using a `Template` class, the expectation would be that the doc would call out why this class exists in the first place as to enable lazy computation. Doing string concatenation inside a template constructor should raise a few eyebrows when writing or reviewing code.<p>I wrote `logger.log(new Template("foo"))` in my previous comment for brevity as it's merely an internet comment and not a real framework. In real code I would not even use stringy logs but structured data attached to a unique code. But since this thread discusses performance of stringy logs, I would expect log templates to be defined as statics/constants that don't contain any runtime value. You could also integrate them with metadata such as log levels, schemas, translations, codes, etc.<p>Regarding args themselves, you're right that they can also be expensive to compute in the first place. You may then design the args to be passed by a callback which would allow to defer the param computation.<p>A possible example would be:<p><pre><code>    const OPERATION_TIMEOUT = new Template("the operation $operationId timed-out after $duration seconds", {level: "error", code: "E_TIMEOUT"});
    // ...
    function handler(...) {
      // ..
      logger.emit(OPERATION_TIMEOUT, () => ({operationId: "foo", duration: someExpensiveOperationToRetrieveTheDuration()}))
    }
</code></pre>
This is still not perfect as you may need to compute some data before the log "just in case" you need it for the log. For example you may want to record the current time, do the operation. If the operation times out, you use the time recorded before the op to compute for how long it ran. If you did not time out and don't log, then getting the current system time is "wasted".<p>All I'm saying is that `logger.log(str)` is not the only possible API; and that splitting the definition of the log from the actual "emit" is a good pattern.</p>
]]></description><pubDate>Sun, 21 Dec 2025 18:07:09 +0000</pubDate><link>https://news.ycombinator.com/item?id=46346777</link><dc:creator>demurgos</dc:creator><comments>https://news.ycombinator.com/item?id=46346777</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46346777</guid></item><item><title><![CDATA[New comment by demurgos in "Log level 'error' should mean that something needs to be fixed"]]></title><description><![CDATA[
<p>The point of my message is that you should avoid the `log(string)` signature. Even if it's appealing, it's an easy perf trap.<p>There are many ideas if you look at SQL libs. In my example I used a different type but there other solutions. Be creative.<p><pre><code>    logger.log(new Template("foo"))`
    logger.log("foo", [])
    logger.prepare("foo").log()</code></pre></p>
]]></description><pubDate>Sun, 21 Dec 2025 09:07:56 +0000</pubDate><link>https://news.ycombinator.com/item?id=46343365</link><dc:creator>demurgos</dc:creator><comments>https://news.ycombinator.com/item?id=46343365</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46343365</guid></item><item><title><![CDATA[New comment by demurgos in "Log level 'error' should mean that something needs to be fixed"]]></title><description><![CDATA[
<p>I feel like there's a parallel with SQL where you want to discourage manual interpolation. Taking inspiration from it may help: you may not fully solve it but there are some API ideas and patterns.<p>A logging framework may have the equivalent of prepared statements. You may also nudge usage where the raw string API is `log.traceRaw(String rawMessage)` while the parametrized one has the nicer naming `log.trace(Template t, param1, param2)`.</p>
]]></description><pubDate>Sun, 21 Dec 2025 03:52:45 +0000</pubDate><link>https://news.ycombinator.com/item?id=46342102</link><dc:creator>demurgos</dc:creator><comments>https://news.ycombinator.com/item?id=46342102</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46342102</guid></item><item><title><![CDATA[New comment by demurgos in "We pwned X, Vercel, Cursor, and Discord through a supply-chain attack"]]></title><description><![CDATA[
<p>It's definitely a possible solution if you control how the file are displayed. In my case I preferred the files to be safe regardless of the mechanism used to view them (less risk of misconfiguration).</p>
]]></description><pubDate>Sat, 20 Dec 2025 02:32:29 +0000</pubDate><link>https://news.ycombinator.com/item?id=46333189</link><dc:creator>demurgos</dc:creator><comments>https://news.ycombinator.com/item?id=46333189</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46333189</guid></item><item><title><![CDATA[New comment by demurgos in "Texas is suing all of the big TV makers for spying on what you watch"]]></title><description><![CDATA[
<p>What are TV brands/OSes that complain the least when not connected to the internet?</p>
]]></description><pubDate>Fri, 19 Dec 2025 15:46:41 +0000</pubDate><link>https://news.ycombinator.com/item?id=46327083</link><dc:creator>demurgos</dc:creator><comments>https://news.ycombinator.com/item?id=46327083</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46327083</guid></item><item><title><![CDATA[New comment by demurgos in "We pwned X, Vercel, Cursor, and Discord through a supply-chain attack"]]></title><description><![CDATA[
<p>I looked into it for work at some point as we wanted to support SVG uploads. Stripping <script> is not enough to have an inert file. Scripts can also be attached as attributes. If you want to prevent external resources it gets more complex.<p>The only reliable solution would be an allowlist of safe elements and attributes, but it would quickly cause compat issues unless you spend time curating the rules. I did not find an existing lib doing it at the time, and it was too much effort to maintain it ourselves.<p>The solution I ended up implementing was having a sandboxed Chromium instance and communicating with it through the dev tools to load the SVG and rasterize it. This allowed uploading SVG files, but it was then served as rasterized PNGs to other users.</p>
]]></description><pubDate>Thu, 18 Dec 2025 20:12:30 +0000</pubDate><link>https://news.ycombinator.com/item?id=46318004</link><dc:creator>demurgos</dc:creator><comments>https://news.ycombinator.com/item?id=46318004</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46318004</guid></item><item><title><![CDATA[New comment by demurgos in "Rust GCC backend: Why and how"]]></title><description><![CDATA[
<p>It is intentional to avoid non-free projects from building on top of gcc components.<p>I am not familiar enough with gcc to know how it impacts out-of-tree free projects or internal development.<p>The decision was taken a long time ago, it may be worth revisiting it.</p>
]]></description><pubDate>Tue, 16 Dec 2025 14:05:36 +0000</pubDate><link>https://news.ycombinator.com/item?id=46288603</link><dc:creator>demurgos</dc:creator><comments>https://news.ycombinator.com/item?id=46288603</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46288603</guid></item><item><title><![CDATA[New comment by demurgos in "Avoid UUID Version 4 Primary Keys in Postgres"]]></title><description><![CDATA[
<p>Internal means "not exposed outside some boundary". For most people, this boundary encompasses something larger than a single database, and this boundary can change.</p>
]]></description><pubDate>Mon, 15 Dec 2025 18:39:12 +0000</pubDate><link>https://news.ycombinator.com/item?id=46278500</link><dc:creator>demurgos</dc:creator><comments>https://news.ycombinator.com/item?id=46278500</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46278500</guid></item><item><title><![CDATA[New comment by demurgos in "Google is killing the open web, part 2"]]></title><description><![CDATA[
<p>You are talking about forward compatibility.<p>JS is backwards compatible: new engines support code using old features.<p>JS is not forward compatible: old engines don't support code using new features.<p>Regarding your iPad woes, the problem is not the engine but websites breaking compat with it.<p>The distinction matters as it means that once a website is published it will keep working. The only way to break an existing website is to publish a new version usually. The XSLT situation is note-worthy as it's an exception to this rule.</p>
]]></description><pubDate>Mon, 17 Nov 2025 19:52:29 +0000</pubDate><link>https://news.ycombinator.com/item?id=45957493</link><dc:creator>demurgos</dc:creator><comments>https://news.ycombinator.com/item?id=45957493</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45957493</guid></item><item><title><![CDATA[New comment by demurgos in "The state of SIMD in Rust in 2025"]]></title><description><![CDATA[
<p>No it doesn't. A global flag is a no-go as it breaks modularity. A local opt-in through dedicated types or methods is being designed but it's not stable.</p>
]]></description><pubDate>Thu, 06 Nov 2025 11:47:26 +0000</pubDate><link>https://news.ycombinator.com/item?id=45834175</link><dc:creator>demurgos</dc:creator><comments>https://news.ycombinator.com/item?id=45834175</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45834175</guid></item><item><title><![CDATA[New comment by demurgos in "Under the hood: Vec<T>"]]></title><description><![CDATA[
<p>That's a nice idea, thank you. I have personal blog, I'll try to clean it up a bit and provide performance measurements so it's worth posting.<p>Regarding the official documentation, I've returned to read them. I agree that the docs would benefit from more discussion about when to use each method. In particular, the code examples are currently exactly the same which is not great. Still, the most critical piece of information is there [0]<p>> Prefer `reserve` if future insertions are expected.<p>If anyone wants to reuse my explanation above, feel free to do it; no need to credit.<p>[0]: <a href="https://doc.rust-lang.org/std/vec/struct.Vec.html#method.reserve_exact" rel="nofollow">https://doc.rust-lang.org/std/vec/struct.Vec.html#method.res...</a></p>
]]></description><pubDate>Thu, 09 Oct 2025 16:52:51 +0000</pubDate><link>https://news.ycombinator.com/item?id=45530204</link><dc:creator>demurgos</dc:creator><comments>https://news.ycombinator.com/item?id=45530204</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45530204</guid></item><item><title><![CDATA[New comment by demurgos in "Under the hood: Vec<T>"]]></title><description><![CDATA[
<p>I believe that you are describing `Vec::with_capacity` which allows to change the initial reserved memory on construction.<p>`reserve` and `reserve_exact` are used when mutating an existing vec. What you provide is not the total wanted capacity but the additional wanted capacity.<p>`reserve` allows to avoid intermediate allocation.<p>Let's say that you have a vec with 50 items already and plan to run a loop to add 100 more (so 150 in total).
The initial internal capacity is most likely 64, if you just do regular `push` calls without anything else, there will be two reallocations: one from 64 to 128 and one from 128 to 256.<p>If you call `reserve(100)`, you'll be able to skip the intermediate 64 to 128 reallocation: it will do a single reallocation from 64 to 256 and it will be able to handle the 100 pushes without any reallocation.<p>If you call `reserve_exact(100)`, you'll get a single reallocation for from 64 to 150 capacity, and also guarantee no reallocation during the processing loop.<p>The difference is that `reserve_exact` is better if these 100 items were the last ones you intended to push as you get a full vec of capacity 150 and containing 150 items. However, if you intend to push more items later, maybe 100 more, then you'd need to reallocate and break the amortized cost guarantees. With `reserve`, you don't break the amortized cost if there are follow-up inserts; at the price of not being at 100% usage all the time. In the `reserve` case, the capacity of 256 would be enough and let you go from 150 to 250 items without any reallocation.<p>In short, a rule of thumb could be:<p>- If creating a vec and you know the total count, prefer `Vec::with_capacity`<p>- If appending a final chunk of items and then no longer adding items, prefer `Vec::reserve_exact`<p>- If appending a chunk of items which may not be final, prefer `Vec::reserve`</p>
]]></description><pubDate>Thu, 09 Oct 2025 14:00:58 +0000</pubDate><link>https://news.ycombinator.com/item?id=45527836</link><dc:creator>demurgos</dc:creator><comments>https://news.ycombinator.com/item?id=45527836</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45527836</guid></item><item><title><![CDATA[New comment by demurgos in "KDE is now my favorite desktop"]]></title><description><![CDATA[
<p>> I'm not sure if this isn't as common as I think it is - but what's wrong with typing `ip` into a terminal (that's always open anyway)?<p>I'm a regular Linux user, but I wouldn't know how to get all the data from the Wi-Fi applet using the Command Line. GUI have the advantage of discoverability over CLI: with a GUI I get a bunch of useful info in a single place, with a CLI I first need to know that a data is available and then I need to look-up the right invocation to get this data.</p>
]]></description><pubDate>Thu, 18 Sep 2025 16:00:15 +0000</pubDate><link>https://news.ycombinator.com/item?id=45291277</link><dc:creator>demurgos</dc:creator><comments>https://news.ycombinator.com/item?id=45291277</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45291277</guid></item><item><title><![CDATA[New comment by demurgos in "Rolling the dice with CSS random()"]]></title><description><![CDATA[
<p>Where is the spec? I can't find an entry on MDN.<p>Is there a way to get reproducibility? In the same browser or across browsers? Even if it's not the default mode.</p>
]]></description><pubDate>Sun, 24 Aug 2025 11:11:10 +0000</pubDate><link>https://news.ycombinator.com/item?id=45003267</link><dc:creator>demurgos</dc:creator><comments>https://news.ycombinator.com/item?id=45003267</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45003267</guid></item><item><title><![CDATA[New comment by demurgos in "PYX: The next step in Python packaging"]]></title><description><![CDATA[
<p>React native is just an example, the point is that the npm registry has no issue distributing binaries.<p>Sass, Prisma, native DB drivers, or any other project using node-gyp or Node's NAPI are valid examples.</p>
]]></description><pubDate>Thu, 14 Aug 2025 11:17:09 +0000</pubDate><link>https://news.ycombinator.com/item?id=44899090</link><dc:creator>demurgos</dc:creator><comments>https://news.ycombinator.com/item?id=44899090</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44899090</guid></item></channel></rss>