frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Chronicle – Idiomatic, type safe event sourcing framework for Go

https://github.com/DeluxeOwl/chronicle
39•techn00•6d ago

Comments

martypitt•2d ago
Hey! Congrats on shipping.

Just FYI - There's a pretty popular (in finance circles) JVM library called Chronicle[0], which also deals with high throughput event queues etc.

[0]: https://chronicle.software/

cokely•2d ago
Not sure why this was downvoted, I found the terminology confusing and wondered if there was overlap with Chronicle Software myself.
techn00•2d ago
Hi, author here

I wasn't aware of this library, I did check for name collisions with other Go repos though

sethammons•2d ago
This is a lot of work to make the following work and it feels odd to force comments onto my structs to make your API able to look like the following:

    //sumtype:decl
    type AccountEvent interface {
     event.Any
     isAccountEvent()
    }
    //...
    return a.recordThat(&moneyDeposited{
      Amount: amount,
     })
This API requires that you know what you can pass into it - not a type, an interface. You know, by way of being familiar with the code base, you have moneyDeposited that matches. Do you have userSuspended wired up? Is that even an option? As your code base grows and as new developers onboard, more and more of the events available will become need to take up mental space.

I am in favor of discoverable APIs that leverage simple IDE features, like string completion. The API that I would design for recording events would be closer to:

    return a.event.AccountDeposit(amount)
What other events can you record? Just tab away and find out. AccountSuspend pops right up.

And when you do it this way, you no longer need to pull in the the non-standard sum types package that requires comment annotations and subsequent linting packages.

I suppose the goal here is a general framework so to make things general, you are adding indirection. I've not had to create new events in an event sourced architecture on a regular cadence. Usually, any particular team has N events they generate, where N is relatively small and almost never gets new events. And my events are usually historic or log-like in nature, spreading data out to other systems and the events themselves are not the source of truth, but the system that generated them is

techn00•2d ago
Hey, author here

You're not forced to use that comment, you can pass the event however you like, if you satisfy the event.Any interface (by having the method EventName() string).

I prefer that comment because Go doesn't have native sum types, and I believe that by using the framework in combination with the gochecksumtype linter, you get the best developer experience and type safety (you DO have tab autocomplete with the events for recordThat - the type system helps because of the sealed interface).

But again, if you don't want to use the linter, no problem. You can create constructors for the events however you like, just like in your example.

haolez•2d ago
Do you have some of your cases documented somewhere? Would love to take a look at it, since I'm working at an enterprise that has extensive Kafka support and adoption, but event sourcing is not widely used so far. I'm afraid to start championing event sourcing as a way to keep our systems integrated with less cognitive overhead and redundancy, but end up falling into a trap.
kunley•2d ago
May I ask, idiomatic by what standard?

Le Chat. Custom MCP Connectors. Memories

https://mistral.ai/news/le-chat-mcp-connectors-memories
15•Anon84•22m ago•1 comments

30 minutes with a stranger

https://pudding.cool/2025/06/hello-stranger/
434•MaxLeiter•5h ago•131 comments

Use Bayes rule to mechanically solve probability riddles

https://cloud.disroot.org/s/Ec4xTMFDteTrFio
9•zaik•3d ago•0 comments

The Color of the Future: A history of blue

https://www.hopefulmons.com/p/the-color-of-the-future
36•prismatic•1h ago•5 comments

Polars Cloud and Distributed Polars now available

https://pola.rs/posts/polars-cloud-launch/
52•jonbaer•8h ago•29 comments

I Should Have Loved Electrical Engineering

https://blog.tdhttt.com/post/love-ee/
16•tdhttt•3d ago•11 comments

Show HN: A roguelike game that runs inside Notepad++

https://github.com/thelowsunoverthemoon/NeuroPriest
93•lowsun•3d ago•10 comments

Étoilé – desktop built on GNUStep

http://etoileos.com/
152•pabs3•8h ago•57 comments

Claude Code: Now in Beta in Zed

https://zed.dev/blog/claude-code-via-acp
606•meetpateltech•20h ago•383 comments

Neovim Pack

https://neovim.io/doc/user/pack.html#vim.pack
189•k2enemy•11h ago•107 comments

Liquid Glass? That's what your M4 CPU is for

https://idiallo.com/byte-size/apple-liquid-glass
45•luismedel•1h ago•48 comments

Reverse engineering Solos smart glasses

https://jfloren.net/b/2025/8/28/0
98•floren•3d ago•14 comments

Minesweeper thermodynamics

https://oscarcunningham.com/792/minesweeper-thermodynamics/
128•robinhouston•2d ago•34 comments

The Bitter Lesson Is Misunderstood

https://obviouslywrong.substack.com/p/the-bitter-lesson-is-misunderstood
283•JnBrymn•6d ago•172 comments

AR Fluid Simulation Demo

https://danybittel.ch/fluid
93•danybittel•3d ago•19 comments

Melvyn Bragg steps down from presenting In Our Time

https://www.bbc.co.uk/mediacentre/2025/melvyn-bragg-decides-to-step-down-from-presenting-in-our-t...
153•aways•5h ago•92 comments

Nuclear: Desktop music player focused on streaming from free sources

https://github.com/nukeop/nuclear
335•indigodaddy•19h ago•211 comments

A Rebel Writer's First Revolt

https://www.vulture.com/article/arundhati-roy-mother-mary-comes-to-me-review.html
7•lermontov•1d ago•1 comments

Google was down in eastern EU and Turkey

https://www.novinite.com/articles/234225/Google+Down+in+Eastern+Europe+%28UPDATED%29
65•nurettin•3h ago•14 comments

Hledger 1.50

https://github.com/simonmichael/hledger/releases/tag/1.50
20•olexsmir•1h ago•1 comments

William Wordsworth's letter: "The Law of Copyright" (1838)

https://gutenberg.org/cache/epub/76806/pg76806-images.html
28•petethomas•6h ago•15 comments

New knot theory discovery overturns long-held mathematical assumption

https://www.scientificamerican.com/article/new-knot-theory-discovery-overturns-long-held-mathemat...
110•baruchel•1d ago•19 comments

Half an year on Alpine: just musl aside

https://blog.jutty.dev/posts/half-an-year-on-alpine/
34•zdw•2d ago•11 comments

Writing a C compiler in 500 lines of Python (2023)

https://vgel.me/posts/c500/
208•ofou•18h ago•60 comments

Understanding Transformers Using a Minimal Example

https://rti.github.io/gptvis/
221•rttti•19h ago•14 comments

Eels are fish

https://eocampaign1.com/web-version?p=495827fa-8295-11f0-8687-8f5da38390bd&pt=campaign&t=17562270...
137•speckx•21h ago•136 comments

What is it like to be a bat?

https://en.wikipedia.org/wiki/What_Is_It_Like_to_Be_a_Bat%3F
160•adityaathalye•17h ago•217 comments

ReMarkable Paper Pro Move

https://remarkable.com/products/remarkable-paper/pro-move
240•ksec•11h ago•286 comments

Say Bye with JavaScript Beacon

https://hemath.dev/blog/say-bye-with-javascript-beacon/
22•moebrowne•3d ago•14 comments

Speeding up PyTorch inference on Apple devices with AI-generated Metal kernels

https://gimletlabs.ai/blog/ai-generated-metal-kernels
170•nserrino•18h ago•26 comments