frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Show HN: Minecraft Creeper meets 90s Tamagotchi

https://github.com/danielbrendel/krepagotchi-game
1•foxiel•5m ago•0 comments

Show HN: Termiteam – Control center for multiple AI agent terminals

https://github.com/NetanelBaruch/termiteam
1•Netanelbaruch•5m ago•0 comments

The only U.S. particle collider shuts down

https://www.sciencenews.org/article/particle-collider-shuts-down-brookhaven
1•rolph•8m ago•1 comments

Ask HN: Why do purchased B2B email lists still have such poor deliverability?

1•solarisos•8m ago•0 comments

Show HN: Remotion directory (videos and prompts)

https://www.remotion.directory/
1•rokbenko•10m ago•0 comments

Portable C Compiler

https://en.wikipedia.org/wiki/Portable_C_Compiler
2•guerrilla•12m ago•0 comments

Show HN: Kokki – A "Dual-Core" System Prompt to Reduce LLM Hallucinations

1•Ginsabo•13m ago•0 comments

Software Engineering Transformation 2026

https://mfranc.com/blog/ai-2026/
1•michal-franc•14m ago•0 comments

Microsoft purges Win11 printer drivers, devices on borrowed time

https://www.tomshardware.com/peripherals/printers/microsoft-stops-distrubitng-legacy-v3-and-v4-pr...
2•rolph•14m ago•0 comments

Lunch with the FT: Tarek Mansour

https://www.ft.com/content/a4cebf4c-c26c-48bb-82c8-5701d8256282
2•hhs•17m ago•0 comments

Old Mexico and her lost provinces (1883)

https://www.gutenberg.org/cache/epub/77881/pg77881-images.html
1•petethomas•21m ago•0 comments

'AI' is a dick move, redux

https://www.baldurbjarnason.com/notes/2026/note-on-debating-llm-fans/
3•cratermoon•22m ago•0 comments

The source code was the moat. But not anymore

https://philipotoole.com/the-source-code-was-the-moat-no-longer/
1•otoolep•22m ago•0 comments

Does anyone else feel like their inbox has become their job?

1•cfata•22m ago•0 comments

An AI model that can read and diagnose a brain MRI in seconds

https://www.michiganmedicine.org/health-lab/ai-model-can-read-and-diagnose-brain-mri-seconds
2•hhs•26m ago•0 comments

Dev with 5 of experience switched to Rails, what should I be careful about?

1•vampiregrey•28m ago•0 comments

AlphaFace: High Fidelity and Real-Time Face Swapper Robust to Facial Pose

https://arxiv.org/abs/2601.16429
1•PaulHoule•29m ago•0 comments

Scientists discover “levitating” time crystals that you can hold in your hand

https://www.nyu.edu/about/news-publications/news/2026/february/scientists-discover--levitating--t...
2•hhs•31m ago•0 comments

Rammstein – Deutschland (C64 Cover, Real SID, 8-bit – 2019) [video]

https://www.youtube.com/watch?v=3VReIuv1GFo
1•erickhill•31m ago•0 comments

Tell HN: Yet Another Round of Zendesk Spam

3•Philpax•32m ago•0 comments

Postgres Message Queue (PGMQ)

https://github.com/pgmq/pgmq
1•Lwrless•35m ago•0 comments

Show HN: Django-rclone: Database and media backups for Django, powered by rclone

https://github.com/kjnez/django-rclone
2•cui•38m ago•1 comments

NY lawmakers proposed statewide data center moratorium

https://www.niagara-gazette.com/news/local_news/ny-lawmakers-proposed-statewide-data-center-morat...
1•geox•40m ago•0 comments

OpenClaw AI chatbots are running amok – these scientists are listening in

https://www.nature.com/articles/d41586-026-00370-w
3•EA-3167•40m ago•0 comments

Show HN: AI agent forgets user preferences every session. This fixes it

https://www.pref0.com/
6•fliellerjulian•42m ago•0 comments

Introduce the Vouch/Denouncement Contribution Model

https://github.com/ghostty-org/ghostty/pull/10559
2•DustinEchoes•44m ago•0 comments

Show HN: SSHcode – Always-On Claude Code/OpenCode over Tailscale and Hetzner

https://github.com/sultanvaliyev/sshcode
1•sultanvaliyev•44m ago•0 comments

Microsoft appointed a quality czar. He has no direct reports and no budget

https://jpcaparas.medium.com/microsoft-appointed-a-quality-czar-he-has-no-direct-reports-and-no-b...
3•RickJWagner•46m ago•0 comments

Multi-agent coordination on Claude Code: 8 production pain points and patterns

https://gist.github.com/sigalovskinick/6cc1cef061f76b7edd198e0ebc863397
1•nikolasi•46m ago•0 comments

Washington Post CEO Will Lewis Steps Down After Stormy Tenure

https://www.nytimes.com/2026/02/07/technology/washington-post-will-lewis.html
15•jbegley•47m ago•3 comments
Open in hackernews

Everything About Bitflags: How to store up to 32 booleans in one value?

https://neg4n.dev/blog/everything-about-bitflags
18•neg4n•5mo ago

Comments

kosolam•5mo ago
Pretty cool. Unfortunately, there aren’t enough benefits in webdev to include this technique. Simple human readable flags would usually win because there is no requirement for high performance or efficiency in general (down to a certain level which is considered “good enough”) when doing webdev. There are quite a few low hanging fruits to pick from before going into bits. For example using a stack based on golang, java or other efficient stacks vs ruby,python,node almost automatically gains you a lot of performance and efficiency upsides.
neg4n•5mo ago
Thanks! I agree that benefits in web dev are generally low for most of the cases where it would be applicable (only technically). In small/medium products the data volume and the frequency of its transfer is not that high to even consider optimizing it and the runtime gains are quite not important if you're not writing game servers in JavaScript/TypeScript. It can also be cumbersome at DX level, especially for people that haven't worked on the bits level.

The benefits of applying it in cases of enormous data transfer and its volume on disk are also not that big (I did projected benchmarks of bandwidth and disk usage in the article), as things replaced by bit flags are possibly only a drop in the ocean in such application's backends. But still - it is one of an option of the optimization.

And if you decide to go with the bit flags implementation - I must respectfully disagree with changing stack being classified as the low hanging fruit to pick. In my opinion it is the most error-prone event that could happen in development lifecycle of any product. Both from business and technical perspective considering factors such as talent pool availability, team mentoring, migration process, testing the systems on automated/real users level and likely loads more. All these things introduce costs and time complexity. It would be a tough decision to make for the CTO.

I may be wrong but IMHO it would be easier to hire one guy that knows systems from a little lower level perspective, mentoring the team (that have web dev only knowledge) and establishing solid development rules while proceeding with bit flags than migrating whole (or even a part) application to the other stack, changing the team completely or creating a possibly terrible in its results responsibility of one developer to manage it.

Curious to hear different opinions!

OutOfHere•5mo ago
I might as well store up to 64 booleans then if not 63.
zepolen•5mo ago
> ending up in a mess such as 20 columns named is_something_enabled

Mess? I'd call a column called `flags` containing a bunch of arbitrary numbers the mess.

Bitflags have use cases, but this isn't one of them.

gcau•5mo ago
This is a nice article. I'm trying to make a map save file format. I'm curious if most developers usually use abstractions over bitflags(safely hiding away the bitwise operators from being typod, etc). My main niggle is I want maximum type safety and compile time checking, ie the compiler preventing me from accessing a bit that isn't being used or mixing things up. My other concern is also backwards compatibility if I want to modify the flags. Saving 2 bits for the version?

I want a kind of tree structure of bitflag values, and I'm trying to think of a good way to do it. For example a Grass /Stone tile, maybe 4 bits for the tile type (0001 = Grass), and then from that point forward, the remaining flags depend on the tile type (Grass having the next 2 bits for the grass colour, stone having 1 bit for whether it's cracked or not, etc), but in a safe and efficient abstraction where I can't accidentally mix them up. I don't want a pirate software monstrosity where I can't keep track of the different combinations.

neg4n•5mo ago
Thank you!

Regarding your case, I'm pretty sure that such type safety can be achieved. It is depending on the ecosystem you're working but if its C++ I would go for CRTP implementation with heavy load of template meta programming - like defining TYPE_ID=1 for grass, TYPE_ID=2 for stone and creating BaseTile -> GrassTile/StoneTile with polymorphism on std::variant.

I think this is not exactly the tree structure, but your minimal case can be achieved by assigning different "concern" to different set of bits in the number. For instance bits 31..24 will be TYPE_ID and 23..0 will be attributes (color of the grass, is the stone cracked). However it will quickly become to small to build anything reliable, but then I would change the structure of tiles to have one non-bit flag integer for block type and the one placed sequentially next to it to the attributes bitflag (max. 31 attributes per block? should be quite enough)

You would also need to establish the whole map format - header of the file (version could possibly be stored per map and exist in header, not per tile?), chunks (per-chunk header, chunk data), optimization strategies like RLE, unique separators, serialization and deserialization, endianness auto-conversion and probably more.

Anyways, please correct me if I am wrong but compiler will help you with types only after static_asserts - as I imagine it would be useful mostly for defining interactions between blocks (which ones are allowed and which ones are not). For every other case the compiler would need to know your map at the compile time to help, and it can't be done.

In TypeScript (its a main example of language in the article, I'm not 100% sure if its possible to do such compile time checking but arktype.io would be an excellent choice for this kind of implementation. I really encourage you to check out their solutions as really complex systems can be built on top of it)