frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Start all of your commands with a comma (2009)

https://rhodesmill.org/brandon/2009/commands-with-comma/
233•theblazehen•2d ago•68 comments

OpenCiv3: Open-source, cross-platform reimagining of Civilization III

https://openciv3.org/
694•klaussilveira•15h ago•206 comments

Hoot: Scheme on WebAssembly

https://www.spritely.institute/hoot/
6•AlexeyBrin•1h ago•0 comments

The Waymo World Model

https://waymo.com/blog/2026/02/the-waymo-world-model-a-new-frontier-for-autonomous-driving-simula...
962•xnx•20h ago•555 comments

How we made geo joins 400× faster with H3 indexes

https://floedb.ai/blog/how-we-made-geo-joins-400-faster-with-h3-indexes
130•matheusalmeida•2d ago•35 comments

Unseen Footage of Atari Battlezone Arcade Cabinet Production

https://arcadeblogger.com/2026/02/02/unseen-footage-of-atari-battlezone-cabinet-production/
67•videotopia•4d ago•6 comments

Vocal Guide – belt sing without killing yourself

https://jesperordrup.github.io/vocal-guide/
54•jesperordrup•5h ago•24 comments

Jeffrey Snover: "Welcome to the Room"

https://www.jsnover.com/blog/2026/02/01/welcome-to-the-room/
37•kaonwarb•3d ago•27 comments

ga68, the GNU Algol 68 Compiler – FOSDEM 2026 [video]

https://fosdem.org/2026/schedule/event/PEXRTN-ga68-intro/
10•matt_d•3d ago•2 comments

Show HN: Look Ma, No Linux: Shell, App Installer, Vi, Cc on ESP32-S3 / BreezyBox

https://github.com/valdanylchuk/breezydemo
236•isitcontent•15h ago•26 comments

Monty: A minimal, secure Python interpreter written in Rust for use by AI

https://github.com/pydantic/monty
233•dmpetrov•16h ago•125 comments

Where did all the starships go?

https://www.datawrapper.de/blog/science-fiction-decline
32•speckx•3d ago•21 comments

UK infants ill after drinking contaminated baby formula of Nestle and Danone

https://www.bbc.com/news/articles/c931rxnwn3lo
11•__natty__•3h ago•0 comments

Show HN: I spent 4 years building a UI design tool with only the features I use

https://vecti.com
335•vecti•17h ago•147 comments

Hackers (1995) Animated Experience

https://hackers-1995.vercel.app/
502•todsacerdoti•23h ago•244 comments

Sheldon Brown's Bicycle Technical Info

https://www.sheldonbrown.com/
386•ostacke•21h ago•97 comments

Show HN: If you lose your memory, how to regain access to your computer?

https://eljojo.github.io/rememory/
300•eljojo•18h ago•186 comments

Microsoft open-sources LiteBox, a security-focused library OS

https://github.com/microsoft/litebox
361•aktau•22h ago•185 comments

An Update on Heroku

https://www.heroku.com/blog/an-update-on-heroku/
425•lstoll•21h ago•282 comments

PC Floppy Copy Protection: Vault Prolok

https://martypc.blogspot.com/2024/09/pc-floppy-copy-protection-vault-prolok.html
68•kmm•5d ago•10 comments

Dark Alley Mathematics

https://blog.szczepan.org/blog/three-points/
96•quibono•4d ago•22 comments

Was Benoit Mandelbrot a hedgehog or a fox?

https://arxiv.org/abs/2602.01122
21•bikenaga•3d ago•11 comments

The AI boom is causing shortages everywhere else

https://www.washingtonpost.com/technology/2026/02/07/ai-spending-economy-shortages/
19•1vuio0pswjnm7•1h ago•5 comments

How to effectively write quality code with AI

https://heidenstedt.org/posts/2026/how-to-effectively-write-quality-code-with-ai/
265•i5heu•18h ago•216 comments

Delimited Continuations vs. Lwt for Threads

https://mirageos.org/blog/delimcc-vs-lwt
33•romes•4d ago•3 comments

Introducing the Developer Knowledge API and MCP Server

https://developers.googleblog.com/introducing-the-developer-knowledge-api-and-mcp-server/
64•gfortaine•13h ago•28 comments

I now assume that all ads on Apple news are scams

https://kirkville.com/i-now-assume-that-all-ads-on-apple-news-are-scams/
1076•cdrnsf•1d ago•460 comments

Female Asian Elephant Calf Born at the Smithsonian National Zoo

https://www.si.edu/newsdesk/releases/female-asian-elephant-calf-born-smithsonians-national-zoo-an...
39•gmays•10h ago•13 comments

Understanding Neural Network, Visually

https://visualrambling.space/neural-network/
298•surprisetalk•3d ago•44 comments

I spent 5 years in DevOps – Solutions engineering gave me what I was missing

https://infisical.com/blog/devops-to-solutions-engineering
154•vmatsiiako•20h ago•72 comments
Open in hackernews

How to check for overlapping intervals

https://zayenz.se/blog/post/how-to-check-for-overlapping-intervals/
97•birdculture•3mo ago

Comments

Galanwe•3mo ago
My work involves a lot of time series analysis, as such I'm often dealing with intervals.

While the overlap algorithm (or rather "condition") is cute, there a lot more "cool" stuff to do with intervals, which I would have liked to see in there.

- Checking whether multiple intervals overlap

- Checking whether multiple intervals are contiguous

- Merging contiguous intervals

- Etc..

From experience, something is also crucial when working with intervals: trivially knowing which boundaries are closed and which are opened. I found that defining a strict vocabulary helps a lot here. e.g. "last" is "inclusive", while "end" is exclusive.

[closed; opened[ intervals are also the best when dealing with time intervals (if that makes sense in your use case), because you can trivially join them.

ambicapter•3mo ago
You should write that blog post.
Terr_•3mo ago
Hmm. I imagine that determining which intervals can be picked to make a continuous span from A to B continuous is similar to a graph traversal algorithm.

However you aren't just given all the edges (pair overlaps) that exist in advance, which means there may be ways to have the graph-traversal side guide the edge-detection to minimize work.

teddyh•3mo ago
An older, and IMHO slightly more authoritative, source: <https://wiki.c2.com/?TestIfDateRangesOverlap>

See also: <https://martinfowler.com/eaaDev/Range.html>

rawling•3mo ago
> older

Hey, _I'm_ a source that's older than that one: <https://stackoverflow.com/a/13513973>

Not so sure about "more authoritative", though.

CaptainOfCoit•3mo ago
Bold to claim something you've authored on Stack Overflow is older than C2, the og wiki.

The earliest version I could find on IA is from 2003 (https://web.archive.org/web/20030606033520/http://c2.com/cgi...), last edited in 2002 at that point, but wouldn't surprise me to page was initially created in the 90s.

rawling•3mo ago
Hah, damn. I just saw the date at the bottom and ignored the bit that said "last edit".
CaptainOfCoit•3mo ago
No worries :) Do go through that entire Wiki if you haven't before, somewhat of an gold mine of good (but old) programming tips and tricks. Some information is a bit dated at this point though, but I still think it's one of the best resources out there.
srean•3mo ago
This seemingly no-brainer of a task becomes more intellectually interesting than what you may think on first contact (pun intended).

More so when you have to distinguish between the different types of overlap and non overlap and carry through the reasoning over a chain of overlap/no-overlap relations. I sure underestimated it.

The one dimensional case is covered(there you go again) by Allen algebra. The more richer notion is that of topological relations. I will find the Wikipedia pages and post.

https://en.wikipedia.org/wiki/Allen%27s_interval_algebra

https://en.wikipedia.org/wiki/Region_connection_calculus

https://en.wikipedia.org/wiki/Spatial_relation

https://en.wikipedia.org/w/index.php?title=DE-9IM

Interval trees, range trees help if you have a large static set of interval like objects against which you have to relate a query object.

senderista•3mo ago
I find it interesting that I don't have a good intuition for the simple condition; instead I have to follow something like the process in the article whenever I want to re-derive that condition.
tirutiru•3mo ago
I wonder how many completely u related applications have that interval check logic coded up somewhere. I'm pretty sure I wrote one for my work codebase. Would I bet my life that the < and <=s are correct? Nope.
Animats•3mo ago
That's what unit tests are for.
senderista•3mo ago
or better yet, property tests
fjfaase•3mo ago
Now write some code to manage collectons of intervals and operations, such as finding if a value is included in a collection of intervals and operations for merging two collections of intervals. What is the best data structure to be used? Explain why?
joshlk•3mo ago
R-Trees are a good data structure to use in this case, enabling you to query a collection of intervals for overlap with another in O(log(n)) time.

Wikipedia: https://en.wikipedia.org/wiki/R-tree

matu3ba•3mo ago
Nice introduction.

1. Please always make closed and open interval explicit on all code examples. "Detecting overlap" is ambiguous and open intervals have no given solution in the article, if I'm not mistaken. 2. How do you define the empty interval on floating point numbers? How do you define an open interval on floating point numbers? Number representation, input range etc can be very important.

Disclosure: Did some stupidly crazy time series eval for OCPP1.6 and OCPP2.01 charging profiles.

OptionOfT•3mo ago
I'm saving this for Advent Of Code 2025.
sour-taste•3mo ago
Overlapping intervals were a question back in 2023 so yeah, it's useful
Animats•3mo ago
Overlap in multiple dimensions is simply the AND of overlap in each dimension.

The 3D case comes up in collision detection.

For collision detection in games, the objects are usually kept in a sorted order, with separate lists for X, Y and Z. Amusingly, a bubble sort is useful, because, as objects move, they tend to move locally, so a bubble sort quickly restores the order. The sorting algorithm should terminate quickly when there are few or no changes. First seen in I-Collide, 1995. When objects are moving slowly, speed is slightly worse than O(N), but degrades if there's too much motion.

2D sorting speeds things up. If you sort the intervals by start X, start Y, you can process the intervals sequentially. Here's something of mine which does that.[1] A MySQL database does the sort, then feeds the data to this algorithm. Overlaps are detected, sets of overlapping objects are merged, and the sets of overlapping 2D rectangles are emitted. Sort is O(N log N) as usual, and overlap detection is O(N).

[1] https://github.com/John-Nagle/maptools/blob/main/rust/src/ge...

efavdb•3mo ago
>>Overlap in multiple dimensions is simply the AND of overlap in each dimension.

Presumably just for boxes aligned with the axes (or some other condition?)? EG two lines can have x’s in common and y’s but not overlap if they are sloped at some angle.

Animats•3mo ago
Right, axis-aligned bounding boxes.

Most collision detection systems use axis-aligned bounding boxes as a filter. Then more detailed algorithms are used on possibly-colliding objects.

efavdb•3mo ago
Interesting, thanks!
animal531•3mo ago
Have you tried prefix-sum? In my game code I used the Nvidia key/offset sort for a long time, but I've since replaced that for all of my physics and spatial queries.

There are cases where even though the sort executes more instructions that the size of the elements/code still fits into some Ln cache level and makes it faster, but in general the prefix approach comes out ahead.

supportengineer•3mo ago
I had to do this with 1-day granularity in SQL so we created a Day dimension table and just did a join to detect the overlapping days.
SyzygyRhythm•3mo ago
Even with the visualization, I found the minimal solution hard to visualize. I came up with this instead:

Suppose you start with two separated intervals. The left one starts sliding rightward. At what point do they contact? That's easy, it's just when (end1 > start2).

As it continues sliding, at what point do they lose contact? Again, easy: it's where (start1 >= end2).

So the solution is the first condition and the negation of the second, i.e.: (end1 > start2) && (start1 < end2)

dekhn•3mo ago
I've written code like this to work with overlapping genes. While most genes exist in a genome with spacers between them and their neighboring genes, sometimes you get pairs of genes which overlap, and there seems to be some interesting biology that happens as a consequence.

Here's a package for Python that presumably uses some sort index data structure to be efficient: https://pyranges.readthedocs.io/en/latest/

tim333•3mo ago
Spacetime overlaps can depend on the velocity of the observer if far enough apart. Not sure if it's worth figuring that into the code.
penguin_booze•3mo ago
"Invert, always invert" -- Carl Jacobi