Better HN
topnewbestaskshowjobs
Log inSign up

xeubie

111 karma · joined Mar 17, 2026 (8mo ago) · 25 submissions

https://github.com/xeubie

My projects:

git forge: https://github.com/xit-vcs/haxy

version control system: https://github.com/xit-vcs/xit

immutable database: https://github.com/xit-vcs/xitdb

Submissions

comment 1w ago · link · parent

You missed the point as well. You can't define a union type in Rust that is backed by a custom enum type. In rust it's a single conflated type. I can't make a Person enum that is backed by a PersonKind. I don't know how else to describe this. I'm not sure how else to explain this.

comment 1w ago · link · parent

It's not at all minor. Sometimes the tag enum already exists. Rust can't build a data enum on top of it: a derive macro only sees its own enum, so it generates a new tag enum instead. Now you have two tag enums to keep in sync by hand. Proc macros are always used to resolve deficiencies in the rust language, and they always lead to greater complexity and longer compile times.

comment 1w ago · link · parent

Yes, there is something you can do with separate types. You can name a variant without having a value of it. `discriminant` only works on an existing value, so to refer to "cats" you'd have to build a dummy `Cat`, and the result is opaque. You can't match on it, iterate over it, or create one from a byte you parsed off the wire. This is so obviously worse, I can't believe you bothered to ask.

comment 1w ago · link · parent

No, you can't, because you're misunderstanding my point. You can make an enum in rust that doesn't contain data, but you can't make an enum that is explicitly backed by a tag type. `#[repr(u8)]` lets the tag be a u8 with values like Human = 1, Cat = 4, but you can’t say "Person's tag is my PersonKind enum." Zig lets you do exactly that with `union(PersonKind)`. In Rust, PersonKind would always be a separate type you keep in sync by hand.

comment 1w ago · link · parent

Rust enums conflate the tag type with the union type that uses it. These should be separate things. In the example here, you can see that Rust gives no way to represent the tag type `{Human, Cat}`. In Zig there is an enum which is a set of tags, and a union which is backed by that enum and can have fields. It is obviously better to have these as separate concepts rather than conflating them. You often want the kind without the data, and Rust gives you no way to represent it. I'm not sure why I am bothering to rant about this but it's one of my biggest annoyances with the language.

comment 2w ago · link · parent

I maintain many large Zig projects (see profile) and none of this matters to me at all. Why should I care what the core team thinks about AI, which code forge they use, or what internet drama happened between them and Bun? I'm too busy building things to care about this HN gossip. It doesn't affect my use of Zig as a tool.

The point about constant compatibility breakage is the only valid one, but users are naturally self-selecting on that. I knew what I was getting into when I chose Zig. The upside is that the language isn't getting saddled by poor early designs (the "Writergate" breakage was a huge design improvement, as is the new Io interface). Also, it goes without saying that LLMs have dramatically reduced the cost of dealing with breaking changes, and the core team isn't going to stop you from using it.

comment 1mo ago · link · parent

I did finally block them at the firewall level last night. They are constantly trying to connect anyway.

comment 1mo ago · link · parent

It seems that Meta didn't mention one aspect of their "next-generation" AI training system: their incompetent web crawler hammers websites while completely ignoring robots.txt. Meta's 57.141.0.0/24 made up about 90% of all requests to my server this past week, and it didn't stop after I blocked it. They continue to make a request every 2 seconds despite me responding with a 403 every time. Truly an engineering marvel that Meta has bestowed upon us.

edit: I just checked and they are back to hammering my server at 105 requests per minute. These are the Meta-owned ranges I'm blocking now, in case it helps anyone: 57.141.0.0/16, 57.142.0.0/15, 57.144.0.0/14, 57.148.0.0/15

comment 2mo ago · link · parent

There is an alternative to auto-resolution or fixing low-level git merge conflicts. In my git forge Haxy, I am detecting conflicts in local-first metadata and allowing you to fix them in the UI. This is possible because I am not doing a line-based merge; the issues are stored as a data structure, so I can see what specific parts are in conflict. This allows a much nicer form of conflict resolution than conflict markers in a text file. I demoed this here: https://www.youtube.com/watch?v=kkGUARj5Wdw and here's the project: https://github.com/xit-vcs/haxy

comment 5mo ago · link · parent

Yeah you should try it. I place a very big value on simplicity and code size but the combo you describe might have benefits.

comment 5mo ago · link · parent

I used this data structure in my immutable database (see profile) but eventually switched to a B-tree because I believe RRB trees are inherently flawed. If you do a large number of slices and concats, it is possible for the tree to contain so many gaps it that the tree grows so deep it can't be modified anymore. At first I thought it was a bug in my own implementation but I eventually found the same bug in rrb-vector, the clojure implementation (see CRRBV-14). In fact, the maintainer of that library reached the same conclusion I did and switched to B-trees: https://github.com/jafingerhut/core.btree-vector

Still, I have huge respect for Phil Bagwell and I make heavy use of his hash array mapped trie. But this issue with RRB trees makes it impossible for me to use them, especially for an on-disk data structure whose long lifespan makes it way more likely that the problem will eventually happen.

comment 5mo ago · link · parent

Blue badges were for government employees (like I was), and green badges were for private contractors. And yes they have a lot of math and physics guys; my own physics lecturer was in my orientation class, actually. He was there for quantum computing, which reinforces my point. The government can be good at pioneering unproven / uncommercialized technologies, but in general they are like a blunt weapon; the profit motive and lack of bureaucracy eventually makes the private sector far better for improving the technology later. In the case of LLMs, they didn't even originate in government, and I don't think there's any chance they are being developed there at a more advanced level.

comment 5mo ago · link · parent

I can't say what they're doing now because I worked for the NSA 15 years ago but the view of them as an omnipotent power is a product of Hollywood. The government is good at throwing an ungodly amount of resources at something to get a result through sheer attrition, and so they are often the source of original development of technologies. The private sector has always been much better at building a technology to greater sophistication and efficiency. There may be blue badgers in Fort Meade trying to train models but there is no chance they are competitive with the frontier AI companies. It's like saying the government has an amazing home-grown fighter aircraft that is beyond what Lockheed has ever made...they delegate that stuff to private companies for a reason.

14.

The Timelessness of TUIs(xit-vcs.github.io ↗)

5 points · by xeubie · 7mo ago · discuss

comment 7mo ago · link · parent

Yes the article I linked mentioned d/with (speculative writes), and you are right that it is useful for testing -- but not much else, since it is purely in-memory. If you want to call that in-memory branching that's fine, I'll concede that.

My database supports persisted branching, but not just at the database level. You can "branch" (i.e., make a fast clone) data at any level, such as data for a specific user. Many production uses for this, not just testing, yet almost no database supports this. It uses the same HAMT algorithm that Clojure uses.

comment 7mo ago · link · parent

If each "branch" is read only, it's not a branch at all. The entire idea of branching implies that you can make changes on one branch, then switch to another branch and make changes to it. They start from the same point and grow in different directions, as the metaphor of branches on a tree depicts.

comment 7mo ago · link · parent

Surprisingly, neither Datomic nor XTDB support branching. See: https://blog.danieljanus.pl/datomic-forking-the-past/

I actually built my own immutable database which does support branching (see profile), so it seems like a huge miss that these ones don't. It's pretty much the main reason I would want an immutable database.

18.

Show HN: XitDB – an immutable single-file database(github.com ↗)

8 points · by xeubie · 7mo ago · discuss

comment 7mo ago · link · parent

I really like it. API-first git repos without the limitations of a git service like github that are built primarily for humans. Looks like a competitor to code.storage by pierre.

Zig is a great choice. I spent the last three years working on my own git implementation in Zig (see my profile) and it's really the perfect language for this. It gives precise low level control and heavily emphasizes eliminating dependencies (like libc) which makes it perfect for web assembly.

20.

Show HN: Xit – a Git-compatible VCS written in Zig(github.com ↗)

9 points · by xeubie · 7mo ago · 1 comment

comment 7mo ago · link · parent

What a banger of a release. The new `Io` interface was a huge breaking change for my project, but I made the transition. Zig seems to be pulling the same trick it pulled with allocators: just make it an explicit value that you pass around. Explicit allocators felt obviously right in retrospect, and so far this feels obviously right too.

comment 7mo ago · link · parent

Clojure's immutable HAMTs are still a superpower nearly 20 years later. They've been copied in pretty much every language as a library (I did so myself in Zig) but what really makes it work well in Clojure is the fact that they're built into the language, so the entire ecosystem is built around them. Libraries that were made independently usually fit together like a glove because they are all just maps/vectors in -> maps/vectors out.

comment 7mo ago · link · parent

True, git poorly imitated monotone's performance problems.

comment 8mo ago · link · parent

I think astronomers could measure the age of the universe in nano-Valhallas. Every year, it feels 50% closer to completion...

In all seriousness I'm happy with what Mr. Goetz and the team have done. Sealed interfaces (java 17) + exhaustive switch statements (java 21) means we now have union types in java! And instead of jumping on the async/await bandwagon we now have a more general solution that doesn't lead to API duplication (virtual threads). But Valhalla has been a veeery long time coming.