frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Zen Tools

http://postmake.io/zen-list
1•Malfunction92•2m ago•0 comments

Is the Detachment in the Room? – Agents, Cruelty, and Empathy

https://hailey.at/posts/3mear2n7v3k2r
1•carnevalem•2m ago•0 comments

The purpose of Continuous Integration is to fail

https://blog.nix-ci.com/post/2026-02-05_the-purpose-of-ci-is-to-fail
1•zdw•4m ago•0 comments

Apfelstrudel: Live coding music environment with AI agent chat

https://github.com/rcarmo/apfelstrudel
1•rcarmo•5m ago•0 comments

What Is Stoicism?

https://stoacentral.com/guides/what-is-stoicism
3•0xmattf•6m ago•0 comments

What happens when a neighborhood is built around a farm

https://grist.org/cities/what-happens-when-a-neighborhood-is-built-around-a-farm/
1•Brajeshwar•6m ago•0 comments

Every major galaxy is speeding away from the Milky Way, except one

https://www.livescience.com/space/cosmology/every-major-galaxy-is-speeding-away-from-the-milky-wa...
2•Brajeshwar•6m ago•0 comments

Extreme Inequality Presages the Revolt Against It

https://www.noemamag.com/extreme-inequality-presages-the-revolt-against-it/
2•Brajeshwar•6m ago•0 comments

There's no such thing as "tech" (Ten years later)

1•dtjb•7m ago•0 comments

What Really Killed Flash Player: A Six-Year Campaign of Deliberate Platform Work

https://medium.com/@aglaforge/what-really-killed-flash-player-a-six-year-campaign-of-deliberate-p...
1•jbegley•8m ago•0 comments

Ask HN: Anyone orchestrating multiple AI coding agents in parallel?

1•buildingwdavid•9m ago•0 comments

Show HN: Knowledge-Bank

https://github.com/gabrywu-public/knowledge-bank
1•gabrywu•15m ago•0 comments

Show HN: The Codeverse Hub Linux

https://github.com/TheCodeVerseHub/CodeVerseLinuxDistro
3•sinisterMage•16m ago•2 comments

Take a trip to Japan's Dododo Land, the most irritating place on Earth

https://soranews24.com/2026/02/07/take-a-trip-to-japans-dododo-land-the-most-irritating-place-on-...
2•zdw•16m ago•0 comments

British drivers over 70 to face eye tests every three years

https://www.bbc.com/news/articles/c205nxy0p31o
17•bookofjoe•16m ago•4 comments

BookTalk: A Reading Companion That Captures Your Voice

https://github.com/bramses/BookTalk
1•_bramses•17m ago•0 comments

Is AI "good" yet? – tracking HN's sentiment on AI coding

https://www.is-ai-good-yet.com/#home
3•ilyaizen•18m ago•1 comments

Show HN: Amdb – Tree-sitter based memory for AI agents (Rust)

https://github.com/BETAER-08/amdb
1•try_betaer•19m ago•0 comments

OpenClaw Partners with VirusTotal for Skill Security

https://openclaw.ai/blog/virustotal-partnership
2•anhxuan•19m ago•0 comments

Show HN: Seedance 2.0 Release

https://seedancy2.com/
2•funnycoding•19m ago•0 comments

Leisure Suit Larry's Al Lowe on model trains, funny deaths and Disney

https://spillhistorie.no/2026/02/06/interview-with-sierra-veteran-al-lowe/
1•thelok•19m ago•0 comments

Towards Self-Driving Codebases

https://cursor.com/blog/self-driving-codebases
1•edwinarbus•20m ago•0 comments

VCF West: Whirlwind Software Restoration – Guy Fedorkow [video]

https://www.youtube.com/watch?v=YLoXodz1N9A
1•stmw•21m ago•1 comments

Show HN: COGext – A minimalist, open-source system monitor for Chrome (<550KB)

https://github.com/tchoa91/cog-ext
1•tchoa91•21m ago•1 comments

FOSDEM 26 – My Hallway Track Takeaways

https://sluongng.substack.com/p/fosdem-26-my-hallway-track-takeaways
1•birdculture•22m ago•0 comments

Show HN: Env-shelf – Open-source desktop app to manage .env files

https://env-shelf.vercel.app/
1•ivanglpz•26m ago•0 comments

Show HN: Almostnode – Run Node.js, Next.js, and Express in the Browser

https://almostnode.dev/
1•PetrBrzyBrzek•26m ago•0 comments

Dell support (and hardware) is so bad, I almost sued them

https://blog.joshattic.us/posts/2026-02-07-dell-support-lawsuit
1•radeeyate•27m ago•0 comments

Project Pterodactyl: Incremental Architecture

https://www.jonmsterling.com/01K7/
1•matt_d•27m ago•0 comments

Styling: Search-Text and Other Highlight-Y Pseudo-Elements

https://css-tricks.com/how-to-style-the-new-search-text-and-other-highlight-pseudo-elements/
1•blenderob•29m ago•0 comments
Open in hackernews

Comparing Integers and Doubles

http://databasearchitects.blogspot.com/2025/11/comparing-integers-and-doubles.html
32•pfent•2mo ago

Comments

pestatije•2mo ago
or you could learn about how to do comparisons with floating point numbers
stronglikedan•2mo ago
like multiplying them by the precision that you'd like to compare and comparing them as integers? /s
thaumasiotes•2mo ago
That won't work; as integers, 100.02 and 99.997 are unequal, but 1.0002 and 0.99997 are equal at 0.01 precision. (And indeed also equal at 0.001 precision!) You'd need to round.

I had the impression that the usual way to compare floats is to define a precision and check for -p < (a - b) < p. In this case 0.99997 - 1.0002 = -0.00023, which correctly tells us that the two numbers are equal at 0.001 precision and unequal at 0.0001.

wiml•2mo ago
Rounding won't work either, at least if you're trying to find a way to do a hash join on float-comparison-within-epsilon. You would need to have a function such that |a-b|<p implies f(a)=f(b) and there is none, except the useless trivial one.

You can do it if you produce two hash values for each key (and clean up your duplicates later), but not if you produce only one.

Of course most of the time if you are doing equality comparisons on floats you have a fundamental conceptual problem with your code.

millipede•2mo ago
Both ints and floats represent real, rational values, but every operation in no way matches math. Associative? No. Commutative? No. Partially Ordered? No. Weakly Ordered? No. Symmetric? No. Reflexive? No. Antisymmetric? No. Nothing.

The only reasonable way to compare rationals is the decimal expansion of the string.

threeducks•2mo ago
What exactly do you say is not commutative? This Wikipedia article claims that at least floating-point addition and multiplication are both commutative:

https://en.wikipedia.org/wiki/Floating-point_arithmetic#Accu...

adgjlsfhk1•2mo ago
it is for finite values, but because IEEE did some dumb things it isn't specified to be for NaN values (and on several architectures, isn't).
tadfisher•2mo ago
> The only reasonable way to compare rationals is the decimal expansion of the string.

Careful, someone is liable to throw this in an LLM prompt and get back code expanding the ASCII characters for string values like "1/346".

layer8•2mo ago
It’s not straightforward to compare numerical ordering using the decimal expansion.
Someone•2mo ago
> The only reasonable way to compare rationals is the decimal expansion of the string.

Why decimal? I don’t see why any other integer base wouldn’t work, and, on about any system, doing 2^n for any n > 0* will be both easier to implement and faster to run.

And that, more or less, is what the suggested solution does. It first compares the first 53 bits and, if that’s not conclusive, it compares 64 bits.

Also, of course, if your number has more than n bits, you’d only generate digits until you know the answer.

gopalv•2mo ago
> For double/bigint joins that leads to observable differences between joins and plain comparisons, which is very bad.

This was one of the bigger hidden performance issues when I was working on Hive - the default coercion goes to Double, which has a bad hash code implementation [1] & causes joins to cluster & chain, which caused every miss on the hashtable to probe that many away from the original index.

The hashCode itself was smeared to make values near Machine epsilon to hash to the same hash bucket so that .equals could do its join, but all of this really messed up the folks who needed 22 digit numeric keys (eventually Decimal implementation handled it by adding a big fixed integer).

Databases and Double join keys was one of the red-flags in a SQL query, mostly if you see it someone messed up something.

[1] - https://issues.apache.org/jira/browse/HADOOP-12217

zokier•2mo ago
One simple solution would be to convert both operands to 80/128 bit float, which should avoid any precision loss, and compare those?
arbitrandomuser•2mo ago
Julia gets this right. casting to both double and int, it does both a floating point compare and an integer compare , then AND them and return