frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Every GitHub object has two IDs

https://www.greptile.com/blog/github-ids
83•dakshgupta•9h ago

Comments

chatmasta•41m ago
> Somewhere in GitHub's codebase, there's an if-statement checking when a repository was created to decide which ID format to return.

I doubt it. That's the beauty of GraphQL — each object can store its ID however it wants, and the GraphQL layer encodes it in base64. Then when someone sends a request with a base64-encoded ID, there _might_ be an if-statement (or maybe it just does a lookup on the ID). If anything, the if-statement happens _after_ decoding the ID, not before encoding it.

There was never any if-statement that checked the time — before the migration, IDs were created only in the old format. After the migration, they were created in the new format.

haileys•27m ago
> That repository ID (010:Repository2325298) had a clear structure: 010 is some type enum, followed by a colon, the word Repository, and then the database ID 2325298.

It's a classic length prefix. Repository has 10 chars, Tree has 4.

agwa•14m ago
> GitHub's migration guide tells developers to treat the new IDs as opaque strings and treat them as references. However it was clear that there was some underlying structure to these IDs as we just saw with the bitmasking

Great, so now GitHub can't change the structure of their IDs without breaking this person's code. The lesson is that if you're designing an API and want an ID to be opaque you have to literally encrypt it. I find it really demoralizing as an API designer that I have to treat my API's consumers as adversaries who will knowingly and intentionally ignore guidance in the documentation like this.

maxbond•8m ago
You could also say, if I tell you something is an opaque identifier, and you introspect it, it's your problem if your code breaks. I told you not to do that.
haileys•7m ago
This is well understood - Hyrum's law.

You don't need encryption, a global_id database column with a randomly generated ID will do.

maxbond•5m ago
You could but you would lose the performance benefits you were seeking by encoding information info the ID.
nwallin•6m ago
Hyrum's law is a real sonuvabitch.
ezyang•12m ago
I just want to point out that Opus 4.5 actually knows this trick and will write the code to decode the IDs if it is working with GitHub's API lol

A 40-line fix eliminated a 400x performance gap

https://questdb.com/blog/jvm-current-thread-user-time/
103•bluestreak•2h ago•22 comments

Every GitHub object has two IDs

https://www.greptile.com/blog/github-ids
84•dakshgupta•9h ago•10 comments

The $LANG Programming Language

61•dang•1h ago•6 comments

vLLM large scale serving: DeepSeek 2.2k tok/s/h200 with wide-ep

https://blog.vllm.ai/2025/12/17/large-scale-serving.html
22•robertnishihara•9h ago•0 comments

Are two heads better than one?

https://eieio.games/blog/two-heads-arent-better-than-one/
109•evakhoury•9h ago•24 comments

The truth behind the 2026 J.P. Morgan Healthcare Conference

https://www.owlposting.com/p/the-truth-behind-the-2026-jp-morgan
17•abhishaike•7h ago•1 comments

Sei (YC W22) Is Hiring a DevOps Engineer (India/In-Office/Chennai/Gurgaon)

https://www.ycombinator.com/companies/sei/jobs/Rn0KPXR-devops-platform-ai-infrastructure-engineer
1•ramkumarvenkat•44m ago

The Tulip Creative Computer

https://github.com/shorepine/tulipcc
186•apitman•8h ago•38 comments

AI Generated Music Barred from Bandcamp

https://old.reddit.com/r/BandCamp/comments/1qbw8ba/ai_generated_music_on_bandcamp/
565•cdrnsf•7h ago•434 comments

When hardware goes end-of-life, companies need to open-source the software

https://www.marcia.no/words/eol
153•Marciplan•2h ago•35 comments

No management needed: anti-patterns in early-stage engineering teams

https://www.ablg.io/blog/no-management-needed
70•tonioab•6h ago•117 comments

Japan's Skyscraper Factories (2021)

https://www.construction-physics.com/p/japans-skyscraper-factories
37•Pikamander2•6d ago•1 comments

We can't have nice things because of AI scrapers

https://blog.metabrainz.org/2025/12/11/we-cant-have-nice-things-because-of-ai-scrapers/
262•LorenDB•3h ago•147 comments

Show HN: Microwave – Native iOS app for videos on ATproto

https://testflight.apple.com/join/cVxV1W3g
9•sinned•8h ago•0 comments

How to make a damn website (2024)

https://lmnt.me/blog/how-to-make-a-damn-website.html
138•birdculture•8h ago•47 comments

Show HN: Nogic – VS Code extension that visualizes your codebase as a graph

https://marketplace.visualstudio.com/items?itemName=Nogic.nogic
67•davelradindra•7h ago•25 comments

Scott Adams has died

https://www.youtube.com/watch?v=Rs_JrOIo3SE
743•ekianjo•10h ago•1223 comments

A deep dive on agent sandboxes

https://pierce.dev/notes/a-deep-dive-on-agent-sandboxes
30•icyfox•1d ago•8 comments

Is it a joke?

https://novalis.org/blog/2025-11-06-is-it-a-joke.html
17•luu•3h ago•2 comments

A university got itself banned from the Linux kernel (2021)

https://www.theverge.com/2021/4/30/22410164/linux-kernel-university-of-minnesota-banned-open-source
60•italophil•6h ago•41 comments

Revup: Upload once to create multiple, relative GitHub PRs

https://github.com/Skydio/revup
7•krosaen•8h ago•2 comments

My first paper: A practical implementation of Rubiks cube based passkeys

https://ieeexplore.ieee.org/document/11280260
43•acorn221•6d ago•17 comments

The insecure evangelism of LLM maximalists

https://lewiscampbell.tech/blog/260114.html
175•todsacerdoti•2h ago•168 comments

Terra - A rolling-release Fedora repository

https://terra.fyralabs.com/
11•doodlesdev•3h ago•4 comments

Let's be honest, Generative AI isn't going all that well

https://garymarcus.substack.com/p/lets-be-honest-generative-ai-isnt
110•7777777phil•7h ago•120 comments

Inlining – The Ultimate Optimisation

https://xania.org/202512/17-inlining-the-ultimate-optimisation
44•PaulHoule•4d ago•18 comments

Influencers and OnlyFans models are dominating U.S. O-1 visa requests

https://www.theguardian.com/us-news/2026/jan/11/onlyfans-influencers-us-o-1-visa
344•bookofjoe•8h ago•247 comments

Running Lean at Scale

https://harmonic.fun/news#blog-post-lean
55•eab-•3h ago•3 comments

Show HN: AsciiSketch a free browser-based ASCII art and diagram editor

https://files.littlebird.com.au/ascii-sketch.html
14•schappim•3h ago•4 comments

Why Real Life is better than IRC (2000)

https://everything2.com/node/e2node/Why%20Real%20Life%20is%20better%20than%20IRC
49•themaxdavitt•4d ago•41 comments