<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: modulared</title><link>https://news.ycombinator.com/user?id=modulared</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Fri, 05 Jun 2026 23:30:37 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=modulared" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by modulared in "Branchless Quicksort faster than std:sort and pdqsort with C and C++ API"]]></title><description><![CDATA[
<p>Looks like it was introduced in 1.81.0:<p><a href="https://blog.rust-lang.org/2024/09/05/Rust-1.81.0/#new-sort-implementations" rel="nofollow">https://blog.rust-lang.org/2024/09/05/Rust-1.81.0/#new-sort-...</a></p>
]]></description><pubDate>Fri, 05 Jun 2026 14:56:55 +0000</pubDate><link>https://news.ycombinator.com/item?id=48413402</link><dc:creator>modulared</dc:creator><comments>https://news.ycombinator.com/item?id=48413402</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48413402</guid></item><item><title><![CDATA[New comment by modulared in "The Cost of Indirection in Rust"]]></title><description><![CDATA[
<p>> since the compiler cannot inline across await.<p>Is this stated somewhere? A simple search online yields nothing, and just testing it out on godbolt the compiler does inline at least simple async functions as mentioned in the article.</p>
]]></description><pubDate>Mon, 16 Mar 2026 15:50:04 +0000</pubDate><link>https://news.ycombinator.com/item?id=47400618</link><dc:creator>modulared</dc:creator><comments>https://news.ycombinator.com/item?id=47400618</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47400618</guid></item><item><title><![CDATA[New comment by modulared in "BuildKit: Docker's Hidden Gem That Can Build Almost Anything"]]></title><description><![CDATA[
<p>Not having a required input, say when you try to reproduce a previous build of a package, is a separate issue to an input silently changing when you go to rebuild it. No build system can ensure a link stays up, only that what's fetched hasn't changed. The latter is what the hash in nix is for. If it tries to fetch a file from a link and the hash doesn't match, the build fails.<p>Flakes, then, run in a pure evaluation mode, meaning you don't have access to stuff like the system triple, the current time, or env vars and all fetching functions require a hash.</p>
]]></description><pubDate>Sun, 01 Mar 2026 11:00:43 +0000</pubDate><link>https://news.ycombinator.com/item?id=47205633</link><dc:creator>modulared</dc:creator><comments>https://news.ycombinator.com/item?id=47205633</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47205633</guid></item><item><title><![CDATA[New comment by modulared in "Hard Rust requirements from May onward"]]></title><description><![CDATA[
<p>That doesn't really make sense since memory safety is a property of a language. You can have code that is unsafe (read unsound), but that is a separate issue.<p>For a <i>language</i> to be memory safe it means there must be no way to mishandle a function or use some object wrong that would result in an "unsafe" operation (for Rust, that means undefined behavior).<p>That is to say the default is safe, and you are given an escape hatch. While in something like c/c++ the default is unsafe.<p>I'd also like to add that program correctness is another separate concept from language safety and code safety, since you could be using an unsafe language writing unsafe ub code and still have a correct binary.</p>
]]></description><pubDate>Sat, 01 Nov 2025 21:54:57 +0000</pubDate><link>https://news.ycombinator.com/item?id=45785763</link><dc:creator>modulared</dc:creator><comments>https://news.ycombinator.com/item?id=45785763</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45785763</guid></item><item><title><![CDATA[New comment by modulared in "Group Borrowing: Zero-cost memory safety with fewer restrictions"]]></title><description><![CDATA[
<p>> I believe that languages with typestate can cause types to change as a result of function calls<p>Do you have any specific languages?</p>
]]></description><pubDate>Thu, 28 Aug 2025 14:50:26 +0000</pubDate><link>https://news.ycombinator.com/item?id=45052904</link><dc:creator>modulared</dc:creator><comments>https://news.ycombinator.com/item?id=45052904</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45052904</guid></item><item><title><![CDATA[New comment by modulared in "Jujutsu for busy devs"]]></title><description><![CDATA[
<p>> I could disable autoadding files, but life will be worse that way.<p>```
[snapshot]
auto-track = 'none()'
```<p>This is what I do, and I don't think it is worse. I prefer not having all my ignored files auto-tracked when I accidentally go back to a commit without them in the .gitignore<p>Some other solutions (which aren't simple at all):
- Remove specific files from auto-track
- Have a private commit with changes to the .gitignore and work on top of a merge commit
- Like last one, have a private commit with the files you don't want to push (+ merge)<p>I have it setup where any commit with a description that starts with "IGNORE:" is private.<p>snippet from my config:
```
[git]
private-commits = '''
 description(regex:"(?x)
  # (?x) enables the x flag (verbose mode) allowing comments and ignores whitespace
  # see: <a href="https://docs.rs/regex/latest/regex/#grouping-and-flags" rel="nofollow">https://docs.rs/regex/latest/regex/#grouping-and-flags</a><p><pre><code>  # Ignores commits starting with:
  # (case-insensitive) PRIV: or PRIVATE:, or IGNORE:
  ^(?i:PRIV(ATE)?):
  | ^IGNORE:
 ")</code></pre>
'''
```</p>
]]></description><pubDate>Wed, 23 Jul 2025 16:36:18 +0000</pubDate><link>https://news.ycombinator.com/item?id=44661122</link><dc:creator>modulared</dc:creator><comments>https://news.ycombinator.com/item?id=44661122</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44661122</guid></item><item><title><![CDATA[New comment by modulared in "Borgo is a statically typed language that compiles to Go"]]></title><description><![CDATA[
<p>> Why not just go talk the other people you'd really prefer to talk to?<p>sorry, I didn't mean to be so argumentative or negative. (The "You'll have to ask the Rust community. Rust lacks enums." did get me a little annoyed :p)<p>> This (strangely, undocumented in the above link) functionality does, in fact, provide the use of enums.<p>That link was from "the rust book" which is primarily is for learning rust.
For more technical info the referenced is used <a href="https://doc.rust-lang.org/reference/items/enumerations.html" rel="nofollow">https://doc.rust-lang.org/reference/items/enumerations.html</a><p>> When would you ever use it?<p>I assume (like you said for c++) a good reason would be for c/c++ interoperate, but it also probably makes things like serialization easier. Sometimes you just need a number (e.g. indexing an array) and it's simpler to be able to cast then have a function that goes from enum -> int.<p>> Especially when you consider how unsafe enums are.<p>Do note though, going from int -> enum <i>is</i> an unsafe op which would require `std::mem::transmute`.</p>
]]></description><pubDate>Fri, 03 May 2024 15:17:10 +0000</pubDate><link>https://news.ycombinator.com/item?id=40248664</link><dc:creator>modulared</dc:creator><comments>https://news.ycombinator.com/item?id=40248664</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40248664</guid></item><item><title><![CDATA[New comment by modulared in "Borgo is a statically typed language that compiles to Go"]]></title><description><![CDATA[
<p>> To which language?<p>I mean more in the sense of "where did you get this definition from."<p>> The difference there is in the types the enums are applied to. In one case, a basic integer-based type. In the other, a class.<p>I'm still not seeing a difference, mainly because when I went to see how c++'s `enum class` and rust's `enum`, they both <i>seemed</i> to work the same.<p><pre><code>    #[repr(u8)]
    enum Words {
        Foo = 0,
        Bar,
        Baz,
    }

    const _: () = {
        assert!(Words::Foo as u8 == 0);
        assert!(Words::Bar as u8 == 1);
        assert!(Words::Baz as u8 == 2);
    };
</code></pre>
vs<p><pre><code>    enum class Words : uint8_t {
     Foo = 0,
     Bar,
     Baz
    };

    static_assert(static_cast<uint8_t>(Words::Foo) == 0);
    static_assert(static_cast<uint8_t>(Words::Bar) == 1);
    static_assert(static_cast<uint8_t>(Words::Baz) == 2);</code></pre></p>
]]></description><pubDate>Fri, 03 May 2024 03:03:10 +0000</pubDate><link>https://news.ycombinator.com/item?id=40243602</link><dc:creator>modulared</dc:creator><comments>https://news.ycombinator.com/item?id=40243602</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40243602</guid></item><item><title><![CDATA[New comment by modulared in "Borgo is a statically typed language that compiles to Go"]]></title><description><![CDATA[
<p>> Enums produce values. Tag-only unions 'produce' types (without values).<p>Source? Is this something that is widely accepted, or just how you think enums should be defined.<p>My understanding is you are saying (using c++ as an example since it has both types) an `enum` is a "true" enum, while an `enum class` somehow isn't?</p>
]]></description><pubDate>Thu, 02 May 2024 13:07:43 +0000</pubDate><link>https://news.ycombinator.com/item?id=40235773</link><dc:creator>modulared</dc:creator><comments>https://news.ycombinator.com/item?id=40235773</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40235773</guid></item></channel></rss>