HNHacker News
TopNewBestAskShowJobs

kurinikku

755 karma · joined June 21, 2018

submissionscomments
kurinikku··on Ask HN: I have 1 Claude and 2 Codex resets plus credits – help me spend them
I don't see CONTRIBUTING.md, open issues or external PRs. Presume I'll just take things off TODO.md?
kurinikku··on Show HN: Link proof assistant Lean to Claude, fix your code's hidden assumptions
If you haven't heard of Lean, it's a mathematical proof assistant. lean-refine plugs it into Claude Code to find every assumption your code makes but doesn't enforce - then fixes them one by one

Before: https://github.com/savarin/ledger/blob/67d6e236296e4787e8924...

After: https://github.com/savarin/ledger/blob/506584542d1c1c2751e2d...

kurinikku··on Show HN: Spend weekend Claude tokens making your code bulletproof with Lean
Andrej Karpathy's microgpt after https://github.com/savarin/microgpt/blob/lean-forge/with-lea...
kurinikku··on Everything Is Just Functions: Insights from SICP and David Beazley
OP here. Thank you for the kind words! For those who enjoyed this, I would also point out Eli Bendersky's excellent SICP series https://eli.thegreenplace.net/tag/sicp
kurinikku··on Everything Is Just Functions: Mind-Blowing Insights from SICP and David Beazley
OP here. I would add "All you need is NAND".
kurinikku··on Everything Is Just Functions: Insights from SICP and David Beazley
OP here. Thank you!
kurinikku··on Echo Chess now out of beta with Classic, Epic and Zen modes
You are what you eat https://www.youtube.com/watch?v=4HOJwK7bQvw
kurinikku··on From Code to Clarity: ChatGPT Impact on Writing Robust and Well-Documented Code
Oh no :disappointed:. Thanks for the note - will take a look today. In the meantime links here work

https://ezzeriesa.notion.site/Writing-clean-code-with-ChatGP...

kurinikku··on How to store a chess position in 26 bytes using bit-level magic (2022)
OP here. I'm not sure how I overlooked this comment earlier, but this is elegant and it works! It's amazing how you need exactly 4 bits for each bit. Thank you for sharing!
kurinikku··on How to store a chess position in 26 bytes using bit-level magic (2022)
OK I see what you mean, I admit this wasn't made completely clear in the post. For en passant using the own king's position, the file where the pawn can be captured en passant is NOT reordered whereas other pawns, captures and promotions are reordered.

This is detailed in the Python code. https://github.com/savarin/bitpacker/blob/239d68dcd3ec5db67e...

Yes using the back row works too! I was trying to see if we can get an improvement on the 18 additional bits needed from the post (or 14 additional bits by taking advantage of knight and bishop ordering).

These discussions have been great, very much enjoying seeing the incremental improvements!

Edit: I did another pass, item 4 in the notes did mention this.

> [4] For en passant we need the pawn to remain on its home file. Hence we exclude the pawn from this step if it can be captured en passant. Captures can appear on any file.

kurinikku··on How to store a chess position in 26 bytes using bit-level magic (2022)
What I meant to say was "I haven't quite figured out how to use this to encode reliably and get an improvement vs simply using own king's position".

If we can guarantee that the pawn stays in its own file then I see a path for improvement (by having the actual position vs back row usage as a 1-bit toggle), but this is not broadly the case due to movement across files on pawn captures.

kurinikku··on How to store a chess position in 26 bytes using bit-level magic (2022)
+1
kurinikku··on How to store a chess position in 26 bytes using bit-level magic (2022)
OP here. Thanks for the suggestion! I really like the idea of there being redundancy for pieces of the same type. If I understand correctly, when a knight is in a particular square say it's not relevant whether it's the king-side or queen-side knight. I believe you still need to keep the ordering for the rooks due to castling, but for the knight and bishop you can store 1-bit each in the ordering. With this we end up with 7 bits for each side, thus below 26 bytes overall!

Let me ponder a bit more on the pawn locations. We do need the pawn ordering since the we've encoded the string representing the promotions in sorted order. In the case of en passant we know exactly where the pawn would be, and while we can use the back row, I haven't quite figured out how to use this to encode reliably.

kurinikku··on How to store a chess position in 26 bytes using bit-level magic (2022)
Thank you!
kurinikku··on How to level up beyond ETLs
Perhaps the first thing I’d clarify is not all the ‘bad’ things described happened to me personally, and out of the ones that did, I employed artistic licence in the recollection.

We did start integrating dbt towards the end of my time in the role. Our data stack was built in 2018, so a fair bit of time before data infra-as-a-service became a thing. The idea is dbt would help our internal consumers to more easily self serve. That said I did see complaints about dbt pricing recently; as they say there’s no free lunch.

Re: ORMs, I respectfully disagree. I’ve come across many teams that treat their Python/Rust/Go codebase with ownership and craft, I have not seen the same be said about SQL queries. It’s almost like a 'tragedy of the commons’ problem - columns keep getting added, logic gets patched, more CTEs to abstract things out but in the end adds to the obfuscation.

ORMs don’t fix everything but it does help constraint the ‘degrees of freedom’ and help keeps logic repeatable and consistent, and generally better than writing your own string-manipulation functions. An idea I had I continued (I wrote the post early last year) was to use static analysis tools like Meta’s UPM to allow refactoring of tables / DAGs (keep interfaces the same but ‘flatter’ DAGs, less duplicate transforms).

Interestingly enough, I currently work on ML and impressed to see how much modeling can be done in the cloud compared to my earlier stint in the space (which had a dedicated engineering team focused on features and inference). On the flipside I similarly see an explosion of SQL strings, some parts handled with care more than others.

I’ve not looked into a data mesh but a friend did mention pushing his org to embrace it - self note to follow up to see how that's going. Looks like there are a couple of ‘dimensions’ to it; my broader take is that keeping things sensible is both a technical and organizational challenge.

I look forward to future blog posts on ‘how we refactored our SQL queries’, maybe there’s a startup idea there somewhere.

kurinikku··on How to level up beyond ETLs
Once that's done, we'll bump it up to Mojo next!
kurinikku··on How to level up beyond ETLs
The best practices book definitely changes quickly in a new area, I can imagine a new / different set on the back of data pipelines for generative models.
kurinikku··on How to level up beyond ETLs
Totally. Wouldn't recommend all queries have it, but there are some critical tables that should.
kurinikku··on How to level up beyond ETLs
> There is some bad information no doubt in the article

Could you share more specific details? Happy to look over / revise where needed.

More broadly is the issue of the gap of what you think the role is, and what the role actually is when you join. There are definitely cases where this is accidental. The best way I can think of to close the gap is to maybe do a short-term contract, but may be challenging to do under time constraints etc.

kurinikku··on How to level up beyond ETLs
Totally. That being said I'm on 'soft skills' phase now :joy:
kurinikku··on How to level up beyond ETLs
Thanks! There's ETL in the traditional sense of moving production data to the data warehouse (hence the 'reverse ETL' moving data back into prod), as well as the term increasingly being used for data pipelines in general.

On the former, we had custom tooling at the time of writing but now use GCP Dataflow (which I can say I'm rather partial to).

kurinikku··on How to level up beyond ETLs
It can often feel like a thankless job :cry:
kurinikku··on How to level up beyond ETLs
Fair point. Perhaps title can be 'How to keep things interesting when you're not happy serving customer requests all day'. On the flip side, not suggesting that you don't serve customer requests either so more of a way to keep your head up while doing day-to-day.
kurinikku··on How to level up beyond ETLs
We got a lot of value using SQL unit tests on very complex queries with lots of edge cases. There was one which involved breaking up events into session (a session is a single uninterrupted 'seating' using the product, an interruption being 30 mins gap or more). Re: edge cases, we'll check sessions are broken up as expected when the user changes, when the browser changes, when it goes over midnight UTC etc.

The table was ~250mm rows per day. The alternative would be doing it in memory; Python unit tests do feel a bit more natural but for a table that size we decided it was best to do it on disk / let the DBMS deal with it. Perhaps Spark is an idea but then there's the trade-off of customers losing context.

It also helped us 'refactor with confidence' - we can happily change the query to incorporate new use cases while knowing the core logic is still sound.

kurinikku··on Be the 3x personable engineer not the 10x a**hole
> My advice to you is to use anger as a signal. If you use anger as fuel, you can end up burning yourself.
kurinikku··on Trail Magic
> One of my favorite phrases picked up in the past two years is the Shangaan phrase Hi Ta Xi Uma, which I learned from Renias Mhlongo, one of the top trackers in Africa. It means “we will find it,” and Renias will keep muttering it when he loses his track and struggles to find the next one. Everything is hard, and usually much harder than we can fathom. All the best people I’ve met through the podcast just don’t let that stop them. They also seem to develop an awareness of this constant difficulty and just become used to it.

Love it.

kurinikku··on Ask HN: What are the most interesting use cases of ChatGPT you're aware of?
I used ChatGPT as a sounding board for my blog post and I was blown away https://www.notion.so/ezzeriesa/Writing-a-blog-post-on-SICP-...
kurinikku··on [dead]
In the past some viewers had issues with Notion, Github-hosted version here. https://savarin.github.io/index/Writing%20efa7772a3ae64a8193...
kurinikku··on D1: Our SQL database
wow SQLite getting a lot of love these days

https://tailscale.com/blog/database-for-2022

https://fly.io/blog/all-in-on-sqlite-litestream

https://blog.cloudflare.com/introducing-d1

kurinikku··on How to level up as a Data Engineer
In the past some viewers had issues with Notion, Github-hosted version here. https://savarin.github.io/index/Content%20efa7772a3ae64a8193...
Page 1 of 2Next →