<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: bjz_</title><link>https://news.ycombinator.com/user?id=bjz_</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Sat, 13 Jun 2026 02:09:44 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=bjz_" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by bjz_ in "A personal list of Rust grievances"]]></title><description><![CDATA[
<p>Traits are designed in such a way that there always is some privileged “receiver” type. In abstract datatypes, ML modules, and type classes there isn't this bias. In an ADT you can have a number of associated abstract datatypes, and in type classes all the 'parameters' are treated equivalently (other than order of the arguments which is a little annoying). To compare:<p><pre><code>    module type Add = sig
        type lhs
        type rhs
        type out
        val add : lhs -> rhs -> out
    end

    class Add lhs rhs where
        type Out
        add : lhs -> rhs -> Out lhs rhs

    trait Add<Other = Self> {
        type Out;
        fn add(self, other: Other) -> Self::Output
    }

</code></pre>
The way Rust does it is nice for more OOP-style usages of traits, but is annoying if you go outside of that (like with the operator traits). This is a personal annoyance, and would have other knock-on effects if it were changed, but does annoy me sometimes, hah.<p>> What is definitional equality? What does an abstract type alias look like?<p>Sorry, type theory lingo. Definitional equality means (in the way I was using it - there's some subtlety) that when comparing two things, you look at the definitions, potentially performing some computations to simplify things down. For example, if I had:<p><pre><code>    pub type Id<T> = T;
    pub type Pair<T, U> = (T, U);


    pub fn foo((x, _): Id<(i32, String)>) -> i32 { x }
</code></pre>
Then I can supply a `y: Pair<String, i32>` to `foo` from another module and everything will be ok, because Rust computes the underlying type when comparing the type of the argument with the type of the parameter, based on the <i>definition</i> of the type alias:<p><pre><code>    use stuff::Pair;

    fn weird(pair: Pair<i32, String>) {
        dbg!(stuff::foo(pair))  // Rust checks: Pair<i32, String> == Id<(i32, String)>
    }
</code></pre>
If however, I wanted to hide the contents of the type alias, but only expose its signature, I'd be out of luck. In other languages you can have "opaque" or "abstract" type aliases that don't reduce definitionally outside the module where they were defined. Granted, in writing this now, you <i>could</i> use a "newtype" struct for this, and that probably works better with traits, but yeah... I think I recall running into other weirdness related to this stuff but can't remember off the top of my head.</p>
]]></description><pubDate>Tue, 13 Sep 2022 11:32:06 +0000</pubDate><link>https://news.ycombinator.com/item?id=32822952</link><dc:creator>bjz_</dc:creator><comments>https://news.ycombinator.com/item?id=32822952</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=32822952</guid></item><item><title><![CDATA[New comment by bjz_ in "A personal list of Rust grievances"]]></title><description><![CDATA[
<p>I think it's more a reflection of how Rust evolved, and the techniques and approaches known and understood at the time and the strangeness budget they were (understandably) willing to take on at the time as opposed to something inherent. And also sometimes having separate, complicated features for similar things (as opposed to simple, generalised features that compose powerfully) can be useful pedagogically as well.<p>At any rate, this is something I'm personally interested in based on my experience working with Rust over the last decade, and so that's why it appears so high up on my list. Often you really <i>do</i> want sub-languages for different purposes, but managing how they interact and work together, what is the same and what is different, and how that impacts usability is interesting (and difficult) part. I feel like it <i>should</i> be possible to do this, but it's going to take some work and there's still lots of unknowns.<p>In technical terms, I'm interested in dependently typed module systems, multistage programming[1], graded modal type theory[2], elaborator reflection, and two level type theory[3]. These all sound pretty intimidating, but you can actually see glimmers of some of this stuff in how Zig handles type parameters and modules, for example, something that most programmers really like the first time they see it!<p>I do feel like there is the core of a simple, flexible, powerful systems language out there... but finding it, and making it approachable while maintaining a solid footing in the theory <i>and</i> being sensitive to the practical demands of systems programming is a nontrivial task, and many people will be understandably skeptical that this is even a good direction to pursue. Thankfully the barrier to entry for programming language designers to implementing languages in this style has reduced significantly in just the last number of years[4], so I have hope that we might see some interesting stuff in the coming decade or so. In the meantime we have Rust as well, which is still an excellent language. I'm just one of those people who's never content with the status quo, always wishing we can push the state of the art further. This is why I got excited by Rust in the first place! :)<p>[1]: <a href="https://github.com/metaocaml/metaocaml-bibliography" rel="nofollow">https://github.com/metaocaml/metaocaml-bibliography</a><p>[2]: <a href="https://granule-project.github.io/" rel="nofollow">https://granule-project.github.io/</a><p>[3]: <a href="https://github.com/AndrasKovacs/staged" rel="nofollow">https://github.com/AndrasKovacs/staged</a><p>[4]: <a href="https://github.com/AndrasKovacs/elaboration-zoo/" rel="nofollow">https://github.com/AndrasKovacs/elaboration-zoo/</a></p>
]]></description><pubDate>Tue, 13 Sep 2022 05:57:01 +0000</pubDate><link>https://news.ycombinator.com/item?id=32821074</link><dc:creator>bjz_</dc:creator><comments>https://news.ycombinator.com/item?id=32821074</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=32821074</guid></item><item><title><![CDATA[New comment by bjz_ in "A personal list of Rust grievances"]]></title><description><![CDATA[
<p>Thanks for reminding people!<p>> This is a thought I've often had myself. The name `unsafe` is not wrong, per-se, but it can sometimes have the wrong connotation<p>Yeah, this is one of the many things on this list that isn't a new idea, see this RFC from June 2014: <a href="https://github.com/rust-lang/rfcs/pull/117" rel="nofollow">https://github.com/rust-lang/rfcs/pull/117</a>. I believe D has a `@trusted` attribute at the function level that serves a similar purpose.</p>
]]></description><pubDate>Tue, 13 Sep 2022 04:19:30 +0000</pubDate><link>https://news.ycombinator.com/item?id=32820605</link><dc:creator>bjz_</dc:creator><comments>https://news.ycombinator.com/item?id=32820605</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=32820605</guid></item><item><title><![CDATA[New comment by bjz_ in "A personal list of Rust grievances"]]></title><description><![CDATA[
<p>Hey, funny to see this old thing pop up here!<p>I don't really use this site any more, but thought I'd just pop in to remind people that these are my personal thoughts from last year... I think there are some things I would add or change now and as others have noted, it's ok to disagree with me!<p>Many of the things I listed are not new, and there's been plenty of difficult discussions about many of them over the years, and are being worked on or postponed, or rejected for various good reasons (I could have done a better job at citing stuff in this gist). Managing a living language is difficult and challenging task, and many compromises need to be made. I think the Rust community is doing a great job considering all the challenges.<p>That said, I'd love to see more language designers consider the possible space of memory-safe by default systems languages, learning from what Rust can teach us, and bringing on board ideas from other places, like the newer systems languages and developments in dependent types, sub-structural type systems, etc. There's still so much more to explore, and still lots that can be done to improve in Rust itself.</p>
]]></description><pubDate>Tue, 13 Sep 2022 03:43:31 +0000</pubDate><link>https://news.ycombinator.com/item?id=32820442</link><dc:creator>bjz_</dc:creator><comments>https://news.ycombinator.com/item?id=32820442</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=32820442</guid></item><item><title><![CDATA[New comment by bjz_ in "Renaming Coq"]]></title><description><![CDATA[
<p>It's pretty obvious that "Le Coq Sportif" is part of a non-english brand name. Coq not so much, especially out of context - eg. people overhearing professional conversations about the theorem prover, or when trying to introduce it to new audiences. I'll accept it was a tit-for-tat joke back in the day (re. 'bit'), but the original namers should have foreseen this day coming. It's branding 101 to do your research and avoid these issues.</p>
]]></description><pubDate>Fri, 09 Apr 2021 01:09:16 +0000</pubDate><link>https://news.ycombinator.com/item?id=26745729</link><dc:creator>bjz_</dc:creator><comments>https://news.ycombinator.com/item?id=26745729</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=26745729</guid></item><item><title><![CDATA[New comment by bjz_ in "Why I rewrote my Rust keyboard firmware in Zig: consistency, mastery, and fun"]]></title><description><![CDATA[
<p>They are differently powerful. Rust's macros can let you extend the syntax and do context-free code generation, where as C++ can let you to type-directed code generation. You can do the latter in Rust using trait dispatch, but it's more awkward and less expressive than what C++ has.</p>
]]></description><pubDate>Sun, 07 Mar 2021 10:33:48 +0000</pubDate><link>https://news.ycombinator.com/item?id=26374767</link><dc:creator>bjz_</dc:creator><comments>https://news.ycombinator.com/item?id=26374767</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=26374767</guid></item><item><title><![CDATA[New comment by bjz_ in "Caramel: An OCaml for the Erlang VM"]]></title><description><![CDATA[
<p>Yeah, would really love to see a static type system that tackled this directly - ie. handling versioned nodes in a cluster and ensuring deployments happen safety. I think it would be possible, but it would require some careful thought and design.</p>
]]></description><pubDate>Sat, 06 Mar 2021 06:55:59 +0000</pubDate><link>https://news.ycombinator.com/item?id=26365719</link><dc:creator>bjz_</dc:creator><comments>https://news.ycombinator.com/item?id=26365719</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=26365719</guid></item><item><title><![CDATA[New comment by bjz_ in "Why isn't differential dataflow more popular?"]]></title><description><![CDATA[
<p>From what I see it's the dismissive way it was posed, with little curiosity about the real challenges. Similar to the 'oh I could build that in a weekend' style comments that are pretty exhausting for creators to have to deal with.</p>
]]></description><pubDate>Fri, 22 Jan 2021 21:13:27 +0000</pubDate><link>https://news.ycombinator.com/item?id=25876432</link><dc:creator>bjz_</dc:creator><comments>https://news.ycombinator.com/item?id=25876432</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=25876432</guid></item><item><title><![CDATA[New comment by bjz_ in "Exotic Programming Ideas: Module Systems"]]></title><description><![CDATA[
<p>One limitation is privacy and abstraction. You can hide implementation details with most ML module systems - eg. hiding the underlying type of `Node`. You can also make local definitions in the module private. It's pretty challenging to get this stuff right - there's lots of research about it.<p>Also, as noted in other comments, Zig's type parameters are also dynamically typed. This leads to implementation details leaking out. This is not an issue in OCaml and other ML-style languages.</p>
]]></description><pubDate>Fri, 13 Nov 2020 22:11:54 +0000</pubDate><link>https://news.ycombinator.com/item?id=25088144</link><dc:creator>bjz_</dc:creator><comments>https://news.ycombinator.com/item?id=25088144</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=25088144</guid></item><item><title><![CDATA[New comment by bjz_ in "Things I Was Wrong About: Types"]]></title><description><![CDATA[
<p>As a bit of a nit-pick, it's not _that_ new - see languages like ML, SML, OCaml, Miranda, Haskell, Coq, etc. that combined the notion of types from programming languages and types from mathematics. It's more that it's only recently that _industry_ has been learning about it.<p>That said, I definitely think you're right to point that this is a new thing for industry, and not just a swing back to the idea of types that were previously mainstream in industry. I'm excited too!</p>
]]></description><pubDate>Sun, 27 Sep 2020 09:52:41 +0000</pubDate><link>https://news.ycombinator.com/item?id=24605484</link><dc:creator>bjz_</dc:creator><comments>https://news.ycombinator.com/item?id=24605484</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=24605484</guid></item><item><title><![CDATA[New comment by bjz_ in "Show HN: ML From Scratch – free online textbook"]]></title><description><![CDATA[
<p>I'm sad it's not!</p>
]]></description><pubDate>Mon, 31 Aug 2020 21:34:51 +0000</pubDate><link>https://news.ycombinator.com/item?id=24336185</link><dc:creator>bjz_</dc:creator><comments>https://news.ycombinator.com/item?id=24336185</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=24336185</guid></item><item><title><![CDATA[New comment by bjz_ in "Pharo Smalltalk Overview"]]></title><description><![CDATA[
<p>Glamorous Toolkit[0] is pretty neat! More of something designed for making software on top of, but it's a pretty cool example of what's possible.<p>[0]: <a href="https://gtoolkit.com/" rel="nofollow">https://gtoolkit.com/</a></p>
]]></description><pubDate>Tue, 21 Jul 2020 02:02:00 +0000</pubDate><link>https://news.ycombinator.com/item?id=23903718</link><dc:creator>bjz_</dc:creator><comments>https://news.ycombinator.com/item?id=23903718</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=23903718</guid></item><item><title><![CDATA[New comment by bjz_ in "The Frink Is Good, the Unit Is Evil"]]></title><description><![CDATA[
<p>Relevant wikipedia article: <a href="https://en.wikipedia.org/wiki/Dimensionless_quantity" rel="nofollow">https://en.wikipedia.org/wiki/Dimensionless_quantity</a><p>Radians and degrees are both ratios where the units cancel out - ie. m/m. The point that is made is that adding degrees to radians without any conversions is technically fine from a dimensional analysis perspective, but it's often a bug in programming that we might want to prevent.</p>
]]></description><pubDate>Sat, 11 Jul 2020 13:06:26 +0000</pubDate><link>https://news.ycombinator.com/item?id=23801922</link><dc:creator>bjz_</dc:creator><comments>https://news.ycombinator.com/item?id=23801922</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=23801922</guid></item><item><title><![CDATA[New comment by bjz_ in "Tolkien’s Mythic Plan for England"]]></title><description><![CDATA[
<p>Yeah, it's not an uncommon to feel this way, especially if you've not learned the humanities formally. Pretty much the first thing I learned in art theory at university was how much art depends on influence and appropriation, and that it's important to accept and embrace this. It was a hard lesson to learn as a young person striving to be original, but it's served me really well.<p>Even as I now move into programming, computer science, and industrial programming language research, I'm still grateful for that small amount of art theory I did at university. You don't need to try to be original - rather it's important to seek wide and varied influences, develop your sense of taste, and from that will flow seemingly unique and varied insights.</p>
]]></description><pubDate>Wed, 24 Jun 2020 10:02:26 +0000</pubDate><link>https://news.ycombinator.com/item?id=23626129</link><dc:creator>bjz_</dc:creator><comments>https://news.ycombinator.com/item?id=23626129</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=23626129</guid></item><item><title><![CDATA[New comment by bjz_ in "The Next Step for Generics"]]></title><description><![CDATA[
<p>I think he was the one to ask Phil Wadler to help out on the Featherweight Go formalization work.</p>
]]></description><pubDate>Tue, 16 Jun 2020 22:44:31 +0000</pubDate><link>https://news.ycombinator.com/item?id=23545221</link><dc:creator>bjz_</dc:creator><comments>https://news.ycombinator.com/item?id=23545221</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=23545221</guid></item><item><title><![CDATA[New comment by bjz_ in "SeL4 is verified on RISC-V"]]></title><description><![CDATA[
<p>I don't think these kinds of long term, far-seeing projects would survive in the life-and-death contest of startups and the private sector either.<p>I dunno what the alternative is, other than political activism, pushing parties to support progressive tax policies, and educating our peers and family members. It's not only research on the line here.</p>
]]></description><pubDate>Wed, 10 Jun 2020 07:13:19 +0000</pubDate><link>https://news.ycombinator.com/item?id=23474738</link><dc:creator>bjz_</dc:creator><comments>https://news.ycombinator.com/item?id=23474738</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=23474738</guid></item><item><title><![CDATA[New comment by bjz_ in "Pain Points of Haskell"]]></title><description><![CDATA[
<p>Ahh cool - had some similar questions here: <a href="https://news.ycombinator.com/item?id=23460980" rel="nofollow">https://news.ycombinator.com/item?id=23460980</a> - mainly, how much manual switching do you have to do? Or is it seamless, depending on what project directory your in? I think I tried the local switches in the past and got really confused when switching projects and everything broke, thinking 'wasn't all this meant to prevent this?'.</p>
]]></description><pubDate>Mon, 08 Jun 2020 21:30:57 +0000</pubDate><link>https://news.ycombinator.com/item?id=23461034</link><dc:creator>bjz_</dc:creator><comments>https://news.ycombinator.com/item?id=23461034</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=23461034</guid></item><item><title><![CDATA[New comment by bjz_ in "Pain Points of Haskell"]]></title><description><![CDATA[
<p>Oh that's nice to hear! Some questions:<p>Do you have to run this command manually, and does it mutate the shell state? That's one thing that frustrated me with opam in the past as well. I couldn't just jump into a directory and build a thing, then switch to another project directory - there was a lot of manual switching and unswitching of packages if I recall correct?<p>Is it possible to install multiple tools globally using opam that use disjoint library versions? Like, I might want to install Abella and Coq side-by-side, but they might have conflicting version requirements. I think I was super excited about opam 2, then tried installing one thing, only to have it break again when I installed something else.<p>Is it possible to have multiple versions of the same libray in the same project, or does the constraint solver need to find a single solution for each library? [1]<p>[1] <a href="https://news.ycombinator.com/item?id=23454917" rel="nofollow">https://news.ycombinator.com/item?id=23454917</a></p>
]]></description><pubDate>Mon, 08 Jun 2020 21:24:15 +0000</pubDate><link>https://news.ycombinator.com/item?id=23460980</link><dc:creator>bjz_</dc:creator><comments>https://news.ycombinator.com/item?id=23460980</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=23460980</guid></item><item><title><![CDATA[New comment by bjz_ in "Pain Points of Haskell"]]></title><description><![CDATA[
<p>Yeah, it's really great to see the progress there. However, afaik, it still doesn't freeze packages by default, or let you have multiple packages of the same version in a dependency tree[1]. The former can be worked around, but it's annoying that it's not the default. The latter is more frustrating however!<p>[1] <a href="https://news.ycombinator.com/item?id=23454711" rel="nofollow">https://news.ycombinator.com/item?id=23454711</a></p>
]]></description><pubDate>Mon, 08 Jun 2020 10:09:40 +0000</pubDate><link>https://news.ycombinator.com/item?id=23455232</link><dc:creator>bjz_</dc:creator><comments>https://news.ycombinator.com/item?id=23455232</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=23455232</guid></item><item><title><![CDATA[New comment by bjz_ in "Pain Points of Haskell"]]></title><description><![CDATA[
<p>> OCaml's is also excellent but not immediately obvious (their docs have improved a lot)<p>Interesting! The last time I tried OPAM, it actually seemed more frustrating than Cabal! Maybe it's improved? Last time I tried OPAM it would install packages globally by default, and avoiding that was a confusing process, when that should be the default behavior.<p>Cargo (while not perfect) has really nice defaults out of the box - ie. it generates a lockfile by default, scopes packages locally to individual projects, and lets you use more than one package of the same version in the same project.<p>Really hoping OCaml and Haskell can improve their package management story - they are getting there, but it still holds me back from really using them on a daily basis.</p>
]]></description><pubDate>Mon, 08 Jun 2020 09:21:39 +0000</pubDate><link>https://news.ycombinator.com/item?id=23454986</link><dc:creator>bjz_</dc:creator><comments>https://news.ycombinator.com/item?id=23454986</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=23454986</guid></item></channel></rss>