Hacker Newsnew | past | comments | ask | show | jobs | submit | ngrilly's commentslogin

What is an example of a modern Java open source codebase, so I can have a look?

How would you achieve zero downtime?

Personally, I'm a fan of event sourcing if you need zero downtime you probably need auditibility. You have one SQLite database that's an append only event log. You build projections from it into any number of SQLite databases. These databases pull from the log database and update themselves. They are completely expendable. So you never have to vacuum them or migrate them. You just build a new projection and then point to it. This is also how you can spread your sqlite over nodes (if that's your thing, with something like NATS).

There are other ways where you're just more disciplined with your schema and indexes. I.e jsonb, partial indexes and existence based programming (from data oriented design).

Edit: In the time it took me to write this cloudflare is down again https://news.ycombinator.com/item?id=46158200


That's indeed a possible (and very resilient) solution. But that's a significant shift for many apps. I'm fan of event sourcing in theory, but I've always been afraid of it making things overly complex in practice, for relatively small apps. But I haven't tried hard enough to have a real opinion on this.

Oh for sure. That's why my default is if you don't need event sourcing and are ok with some down time a month if you need to add a really large index. Keep it simple.

Once you have a decent CQRS set up (which is a natural fit with SQLite) and event sourcing it can be quite easy to spin up on a new project.

I think people don't have an honest assesment of what their project requirements are in terms of uptime and scale. So they start with crazy microservice multinode architectures that are designed to scale to the moon and inevitably end up with more downtime due to complexity.

I'd still recommend people start with managed PG for most things. But, if you're comfortable using VPSs or bare metal servers SQLite can take you very far.


I fully agree that most projects would work perfectly fine with a monolith and PostgreSQL. And yet they go with microservices, Redis, RabbitMQ, etc, making the system more complex and less available.

SQLite would be perfect if it would allow multiple concurrent writers, which would allow running database migrations without downtime. I’m looking forward to Turso for this.


Why is Dart better in your experience?

Well: Static types exist at runtime, VM can optimize using type information (Inline caching, Devirtualization, predictable, fixed object layout), AOT compiled, Dart’s type system is sound, language-supported Isolates (wow feature), hot reload at runtime (wow feature) since Dart can patch classes and functions in memory.

That's a really good list. Thanks. I also miss type annotations not being reflected at runtime (like in Python). Would be great for things like schema validations at runtime. That said, I understand the challenges: that would require changing JS, and that would make JS files larger.

Considering that 1) Bun is written in Zig, 2) Zig has a strict no-AI policy [1], and 3) Bun has joined Claude, it seems that Bun and Zig are increasingly culturally apart.

[1] https://ziglang.org/code-of-conduct/#strict-no-llm-no-ai-pol...


You’re reading a code of conduct for contributing to the zig project. I don’t think everything there is guidance for everything written in zig, eg ‘English is encouraged’ is something one might not want for a project written in zig by native French-speakers, and I don’t think that’s something zig would want to suggest to them. I read the AI part is much more motivated by the asymmetries of open source project contribution than any statement about the language itself. Fly-by AI contributions are bad because they make particularly poor use of maintainer time. Similar to the rule on proposing language changes, which can suck up lots of reading/thinking/discussion time. When you have people regularly working together (eg those people in anthropic working on bun) the incentives are different because there is a higher cost to wasting your colleague’s time.

> Bun and Zig are increasingly culturally apart

That's like saying GCC and NodeJS are culturally apart, as if that has significant bearing on either?


Nothing I found says anything about Zig folks being inherently against AI. It just looks like they don’t want to deal with “AI Slop” in contributions to their project, which is very understandable.

That’s why most banks ask you to approve transactions with an explicit reauthentication.


Then the malware will just wait until you want to do something legitimate that needs that, and then swap it out for its own thing.


I've never seen a "normal" user not confused by the difference between Teams's teams and Teams's channels (where every "channel" belongs to a "team"). I'm pretty sure that's reason #1 why most users use only group chats and never use channels. They simply don't understand how it works because it's too confusing.


Your blog posts (that I read a few weeks ago) and your comment here are the best explanations I've ever read on this topic. You're not just looking at the surface of the problem, but diving in the why it is like that, semantically. I really like that you mentioned dependent typing in your conclusion.


I have the same issue with Helix not watching and reloading modified files automatically, as I sometimes run external programs modifying those files (templ and sqlc are good examples). Curious about how experienced Helix users are addressing this.


I have file reload binded to key:

    [keys.normal.space.f]
    f = "file_picker_in_current_directory"
    F = "file_picker"
    b = "file_picker_in_current_buffer_directory"
    "." = ":toggle-option file-picker.git-ignore"
    g = "global_search"
    e = "file_explorer"
    r = ":reload-all"
    x = ":reset-diff-change"
    w = ":echo %sh{git blame -L %{cursor_line},+1 %{buffer_name}}"


I've been trying Helix and really like it. But as someone coming from VS Code, I've been relying a lot on VS Code automatically saving and restoring sessions on restart (things like opened files, unsaved files, cursor position, etc.). It's helpful when I occasionally restart my computer. How do you that in Helix (or for that matter in Neovim)?


I don't know about Helix but Neovim (and vim) has something called sessions and it does everything but unsaved files. By default it's manual but it wouldn't be too difficult to automate. A very simple way could just create/update the session on BufWritePost and ExitPre. Then create an alias to open Neovim with that session: 'nvim -S .session.vim'.

You'll get an error if the session doesn't exist but it's easy to dismiss. There are probably plugins that do this in a more seamless way though if you prefer.


&42 would not work because constants don’t have a type. But &int64(42) could.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: