<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: dwattttt</title><link>https://news.ycombinator.com/user?id=dwattttt</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Fri, 29 May 2026 17:53:56 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=dwattttt" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by dwattttt in "Go: Support for Generic Methods"]]></title><description><![CDATA[
<p>That is another way of looking at it, but given the topic, you're gonna have to expand or contextualise that. I Rust a fair bit, and only barely follow.</p>
]]></description><pubDate>Wed, 27 May 2026 22:52:00 +0000</pubDate><link>https://news.ycombinator.com/item?id=48301849</link><dc:creator>dwattttt</dc:creator><comments>https://news.ycombinator.com/item?id=48301849</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48301849</guid></item><item><title><![CDATA[New comment by dwattttt in "Migrating from Go to Rust"]]></title><description><![CDATA[
<p>I can't reconcile what you're asking for with the situation you're describing. If every single error everywhere in the program created a stack trace and logged it at creation time, your error would be lost under an avalanche of benign errors that are handled. And if you only want to selectively log _that_ error that's interesting, you need to selectively modify the place that logs it, which you don't want to do (because you don't want to have to find it).<p>It sounds like what you want is the errors you log to always log stack traces. Which is a fine position, I do something like that. It's just not something that can be the default, because it can't be done everywhere.</p>
]]></description><pubDate>Wed, 27 May 2026 11:30:43 +0000</pubDate><link>https://news.ycombinator.com/item?id=48292602</link><dc:creator>dwattttt</dc:creator><comments>https://news.ycombinator.com/item?id=48292602</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48292602</guid></item><item><title><![CDATA[New comment by dwattttt in "Migrating from Go to Rust"]]></title><description><![CDATA[
<p>> track down a situation where you see in your prod logs that you are encountering a lot of "validation error: string is too long" but you can't tell where it is coming from.<p>Capturing a stack trace is a hefty operation: making it happen on _every_ error creation, which would include creating an error in response to another error (like <failure to allocate> causing <failure to create object>) could easily grind a production server to a halt. Especially if there's correctly handled errors happening: every one of them will pay this cost, every time.<p>It sounds like a really specific problem here; the log line that's happening is generic enough that it doesn't identify which line of code is emitting the log, so you can't just add `capture` to that line (what logging system even does this? printf logging?).</p>
]]></description><pubDate>Wed, 27 May 2026 09:15:44 +0000</pubDate><link>https://news.ycombinator.com/item?id=48291650</link><dc:creator>dwattttt</dc:creator><comments>https://news.ycombinator.com/item?id=48291650</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48291650</guid></item><item><title><![CDATA[New comment by dwattttt in "C array types are weird"]]></title><description><![CDATA[
<p>Because doing a dance to avoid it decaying conveys better information to both the compiler and downstream users of your code.</p>
]]></description><pubDate>Tue, 26 May 2026 23:48:03 +0000</pubDate><link>https://news.ycombinator.com/item?id=48287556</link><dc:creator>dwattttt</dc:creator><comments>https://news.ycombinator.com/item?id=48287556</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48287556</guid></item><item><title><![CDATA[New comment by dwattttt in "Performance of Rust Language [pdf]"]]></title><description><![CDATA[
<p>It's hard to be concrete without talking about something specific. At the limit, in stable Rust (for 8 years?), a proc_macro consumes and emits an arbitrary token stream at compile time; it's not ergonomic, but it's possible.<p>The equivalent in C++ is in the realm of arbitrary codegen.</p>
]]></description><pubDate>Tue, 26 May 2026 23:32:27 +0000</pubDate><link>https://news.ycombinator.com/item?id=48287437</link><dc:creator>dwattttt</dc:creator><comments>https://news.ycombinator.com/item?id=48287437</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48287437</guid></item><item><title><![CDATA[New comment by dwattttt in "Show HN: Write your BPF programs in Go, not C"]]></title><description><![CDATA[
<p>An initialism, yet now an aninitialism.</p>
]]></description><pubDate>Tue, 26 May 2026 21:52:19 +0000</pubDate><link>https://news.ycombinator.com/item?id=48286508</link><dc:creator>dwattttt</dc:creator><comments>https://news.ycombinator.com/item?id=48286508</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48286508</guid></item><item><title><![CDATA[New comment by dwattttt in "Migrating from Go to Rust"]]></title><description><![CDATA[
<p>I'm curious, what's the value of a stack trace of another person's library functions? As mentioned, you can get a stack trace that includes all of your code, that's what was offered to you.<p>The only thing a library gathering a stack trace instead of you gives you is that it includes traces through code you didn't write & ostensibly aren't responsible for. If you're going to go to the effort of tracing through a dependencies code, you might as well add the stack trace yourself; it's a single line of code from the standard library to collect it, std::backtrace::Backtrace::capture().<p>EDIT: capture will only actually grab a trace when env vars say it should, you can use force_capture to ignore those. To get to why this isn't the default for errors you're asking for, here's a line from their documentation:<p>> Capturing a backtrace can be both memory intensive and slow</p>
]]></description><pubDate>Tue, 26 May 2026 20:47:33 +0000</pubDate><link>https://news.ycombinator.com/item?id=48285746</link><dc:creator>dwattttt</dc:creator><comments>https://news.ycombinator.com/item?id=48285746</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48285746</guid></item><item><title><![CDATA[New comment by dwattttt in "Show HN: Write your BPF programs in Go, not C"]]></title><description><![CDATA[
<p>And today I learned this has a name, anacronym! An acronym that has become so common, it's treated as a word instead of an acronym.</p>
]]></description><pubDate>Tue, 26 May 2026 13:16:39 +0000</pubDate><link>https://news.ycombinator.com/item?id=48279431</link><dc:creator>dwattttt</dc:creator><comments>https://news.ycombinator.com/item?id=48279431</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48279431</guid></item><item><title><![CDATA[New comment by dwattttt in "Show HN: Write your BPF programs in Go, not C"]]></title><description><![CDATA[
<p>eBPF predates WebAssembly by a few years. I'm also not sure Linux would've wanted to integrate and rely so heavily on a standard they aren't in control of the design of.</p>
]]></description><pubDate>Tue, 26 May 2026 13:11:13 +0000</pubDate><link>https://news.ycombinator.com/item?id=48279354</link><dc:creator>dwattttt</dc:creator><comments>https://news.ycombinator.com/item?id=48279354</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48279354</guid></item><item><title><![CDATA[New comment by dwattttt in "Migrating from Go to Rust"]]></title><description><![CDATA[
<p>There's a few confusing things here. For one, just because the allocator gave you an AllocError, that doesn't mean your function has to return an AllocError: you can return whatever error type you choose. If you want to collect a stack trace at that point, put one in there.<p>What value would a stack trace that includes internal allocator functions be to you? What do you lose by having to collect the stack trace at the point where your function receives an AllocError?</p>
]]></description><pubDate>Mon, 25 May 2026 22:16:28 +0000</pubDate><link>https://news.ycombinator.com/item?id=48272583</link><dc:creator>dwattttt</dc:creator><comments>https://news.ycombinator.com/item?id=48272583</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48272583</guid></item><item><title><![CDATA[New comment by dwattttt in "Migrating from Go to Rust"]]></title><description><![CDATA[
<p>I believe the stdlib can't be versioned like that: there's only one stdlib linked into a final artifact, you can't have two versions with differing APIs in there.</p>
]]></description><pubDate>Mon, 25 May 2026 08:56:44 +0000</pubDate><link>https://news.ycombinator.com/item?id=48264801</link><dc:creator>dwattttt</dc:creator><comments>https://news.ycombinator.com/item?id=48264801</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48264801</guid></item><item><title><![CDATA[New comment by dwattttt in "Migrating from Go to Rust"]]></title><description><![CDATA[
<p>I've never been bothered by long compilation times, it gives me time to think about what the code should actually do.<p>To other people's usage patterns though, I imagine the group of people who don't do much with the type system rely more on running a built binary to see if it worked, which means they'll pay the full compile/link time cost more often.</p>
]]></description><pubDate>Mon, 25 May 2026 08:38:46 +0000</pubDate><link>https://news.ycombinator.com/item?id=48264711</link><dc:creator>dwattttt</dc:creator><comments>https://news.ycombinator.com/item?id=48264711</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48264711</guid></item><item><title><![CDATA[New comment by dwattttt in "Migrating from Go to Rust"]]></title><description><![CDATA[
<p>I think this is a clash of terminology: a Rust enum isn't an integer with pretensions of an identity.<p>You'd describe it as a tagged union in some languages. So when you say you'd return an error with extra information, what that information is is associated with the specific variant of the enum.<p>Using yuriks AllocError as an example, if the error is SizeTooLarge, it has the size field. Other errors may have no additional data, others may have different data.<p>When you return an error from your allocating function, it's a known size, the size of the largest enum variant + the discriminant (tag).</p>
]]></description><pubDate>Mon, 25 May 2026 08:34:01 +0000</pubDate><link>https://news.ycombinator.com/item?id=48264690</link><dc:creator>dwattttt</dc:creator><comments>https://news.ycombinator.com/item?id=48264690</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48264690</guid></item><item><title><![CDATA[New comment by dwattttt in "Migrating from Go to Rust"]]></title><description><![CDATA[
<p>To highlight the problem for Python: Python's standard library has getopt, optparse, and now argparse. I don't think they set out to offer 3 argument parsing libs, one of which is marked superseded, but here we are.</p>
]]></description><pubDate>Mon, 25 May 2026 05:44:42 +0000</pubDate><link>https://news.ycombinator.com/item?id=48263764</link><dc:creator>dwattttt</dc:creator><comments>https://news.ycombinator.com/item?id=48263764</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48263764</guid></item><item><title><![CDATA[New comment by dwattttt in "Migrating from Go to Rust"]]></title><description><![CDATA[
<p>I have tried to figure out some kind of unification between "collecting error state in a function", "logging error state", and "return error state to a parent".<p>I haven't found any satisfying solution to it all; collecting information for logging vs information that a caller would want... I've been meaning to investigate tracing_error to see if it brings it all together.</p>
]]></description><pubDate>Mon, 25 May 2026 05:34:47 +0000</pubDate><link>https://news.ycombinator.com/item?id=48263717</link><dc:creator>dwattttt</dc:creator><comments>https://news.ycombinator.com/item?id=48263717</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48263717</guid></item><item><title><![CDATA[New comment by dwattttt in "Migrating from Go to Rust"]]></title><description><![CDATA[
<p>By standard I meant an error type that implements std::error::Error.<p>EDIT: Which I assume all my dependencies have done, given that anyhow is able to consume all of them.<p>I specifically called out writing applications as my use case: my only objection to tptacek's note is the somewhat universal "in practice". The burden for designing errors for a library that others will use is higher, but that's far from the default/universal experience.<p>Many more people are going to consume libraries & not produce any of their own, and I think my experience is representative there.</p>
]]></description><pubDate>Sun, 24 May 2026 23:49:23 +0000</pubDate><link>https://news.ycombinator.com/item?id=48262187</link><dc:creator>dwattttt</dc:creator><comments>https://news.ycombinator.com/item?id=48262187</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48262187</guid></item><item><title><![CDATA[New comment by dwattttt in "Migrating from Go to Rust"]]></title><description><![CDATA[
<p>Do you really want that data passed back down to the caller of the allocation? From the description of the failure state you'd want to log that data instead: what's the caller of the allocation going to do if you tell it it failed with a crazy size? It already knows the size, it's the one who asked for it.</p>
]]></description><pubDate>Sun, 24 May 2026 23:45:20 +0000</pubDate><link>https://news.ycombinator.com/item?id=48262162</link><dc:creator>dwattttt</dc:creator><comments>https://news.ycombinator.com/item?id=48262162</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48262162</guid></item><item><title><![CDATA[New comment by dwattttt in "The four-day workweek in Australia: insights from early adopters of 100:80:100"]]></title><description><![CDATA[
<p>You really missed the opportunity here. You were meant to bill for the review, assessment, report production, and risks judged when coming up with that 25%.</p>
]]></description><pubDate>Sun, 24 May 2026 22:30:55 +0000</pubDate><link>https://news.ycombinator.com/item?id=48261673</link><dc:creator>dwattttt</dc:creator><comments>https://news.ycombinator.com/item?id=48261673</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48261673</guid></item><item><title><![CDATA[New comment by dwattttt in "Migrating from Go to Rust"]]></title><description><![CDATA[
<p>I guess you might have to if you need to use a library someone's written that doesn't implement the standard.<p>Writing primarily applications, I couldn't tell you what error handling frameworks my dependencies are using: I literally don't know, and haven't needed to know in order to display, fail, or succeed.<p>EDIT to add: I use anyhow for this, so I should also add "add context to an error when I fall" to the list of things I do.</p>
]]></description><pubDate>Sun, 24 May 2026 22:26:10 +0000</pubDate><link>https://news.ycombinator.com/item?id=48261640</link><dc:creator>dwattttt</dc:creator><comments>https://news.ycombinator.com/item?id=48261640</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48261640</guid></item><item><title><![CDATA[New comment by dwattttt in "Migrating from Go to Rust"]]></title><description><![CDATA[
<p>A &(dyn Error + 'static) should be fine for that; you don't need any allocated/variable sized data in a memory allocation failure.</p>
]]></description><pubDate>Sun, 24 May 2026 22:08:14 +0000</pubDate><link>https://news.ycombinator.com/item?id=48261507</link><dc:creator>dwattttt</dc:creator><comments>https://news.ycombinator.com/item?id=48261507</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48261507</guid></item></channel></rss>