frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Rating 26 years of Java changes

https://neilmadden.blog/2025/09/12/rating-26-years-of-java-changes/
68•PaulHoule•3h ago•64 comments

The <output> Tag

https://denodell.com/blog/html-best-kept-secret-output-tag
670•todsacerdoti•13h ago•152 comments

How Apple designs a virtual knob (2012)

https://jherrm.github.io/knobs/
71•gregsadetsky•4d ago•46 comments

Microsoft only lets you opt out of AI photo scanning 3x a year

https://hardware.slashdot.org/story/25/10/11/0238213/microsofts-onedrive-begins-testing-face-reco...
168•dmitrygr•3h ago•55 comments

Testing two 18 TB white label SATA hard drives from datablocks.dev

https://ounapuu.ee/posts/2025/10/06/datablocks-white-label-drives/
102•thomasjb•5d ago•57 comments

GNU Health

https://www.gnuhealth.org/about-us.html
281•smartmic•5h ago•78 comments

Vibing a non-trivial Ghostty feature

https://mitchellh.com/writing/non-trivial-vibing
168•skevy•7h ago•89 comments

Superpowers: How I'm using coding agents in October 2025

https://blog.fsck.com/2025/10/09/superpowers/
221•Ch00k•14h ago•140 comments

AMD and Sony's PS6 chipset aims to rethink the current graphics pipeline

https://arstechnica.com/gaming/2025/10/amd-and-sony-tease-new-chip-architecture-ahead-of-playstat...
268•zdw•17h ago•326 comments

The World Trade Center under construction through photos, 1966-1979

https://rarehistoricalphotos.com/twin-towers-construction-photographs/
158•kinderjaje•4d ago•78 comments

Windows Subsystem for FreeBSD

https://github.com/BalajeS/WSL-For-FreeBSD
185•rguiscard•14h ago•64 comments

Microsoft Amplifier

https://github.com/microsoft/amplifier
179•JDEW•6h ago•113 comments

Building a JavaScript Runtime from Scratch using C

https://devlogs.xyz/blog/building-a-javaScript-runtime
52•redbell•3d ago•19 comments

A quiet change to RSA

https://www.johndcook.com/blog/2025/10/06/a-quiet-change-to-rsa/
75•ibobev•5d ago•26 comments

People regret buying Amazon smart displays after being bombarded with ads

https://arstechnica.com/gadgets/2025/10/people-regret-buying-amazon-smart-displays-after-being-bo...
68•croes•3h ago•28 comments

Indonesia says 22 plants in industrial zone contaminated by caesium 137

https://www.reuters.com/sustainability/boards-policy-regulation/indonesia-says-22-plants-industri...
20•geox•1h ago•8 comments

All-New Next Gen of UniFi Storage

https://blog.ui.com/article/all-new-next-gen-of-unifi-storage
20•ycombinete•3d ago•14 comments

I built physical album cards with NFC tags to teach my son music discovery

https://fulghum.io/album-cards
532•jordanf•1d ago•183 comments

Wilson's Algorithm

https://cruzgodar.com/applets/wilsons-algorithm/
31•FromTheArchives•8h ago•6 comments

How to check for overlapping intervals

https://zayenz.se/blog/post/how-to-check-for-overlapping-intervals/
70•birdculture•6h ago•20 comments

(Re)Introducing the Pebble Appstore

https://ericmigi.com/blog/re-introducing-the-pebble-appstore/
249•duck•23h ago•47 comments

Crypto-Current (2021)

https://zerophilosophy.substack.com/p/crypto-current
11•keepamovin•5d ago•3 comments

How hard do you have to hit a chicken to cook it? (2020)

https://james-simon.github.io/blog/chicken-cooking/
163•jxmorris12•19h ago•95 comments

Otary now includes 17 image binarization methods

https://alexandrepoupeau.com/otary/api/image/transformers/thresholding/
5•poupeaua•4d ago•2 comments

A Library for Fish Sounds

https://nautil.us/a-library-for-fish-sounds-1239697/
30•pistolpete5•4d ago•4 comments

Discord hack shows risks of online age checks

https://news.sky.com/story/discord-hack-shows-dangers-of-online-age-checks-as-internet-policing-h...
132•ColinWright•2h ago•41 comments

Tangled, a Git collaboration platform built on atproto

https://blog.tangled.org/intro
295•mjbellantoni•1d ago•81 comments

Daniel Kahneman opted for assisted suicide in Switzerland

https://www.bluewin.ch/en/entertainment/nobel-prize-winner-opts-for-suicide-in-switzerland-261946...
469•kvam•13h ago•434 comments

Diane Keaton, a Star of 'Annie Hall' and 'First Wives Club,' Dies at 79

https://www.nytimes.com/2025/10/11/movies/diane-keaton-dead.html
6•mhb•50m ago•0 comments

Programming in the Sun: A Year with the Daylight Computer

https://wickstrom.tech/2025-10-10-programming-in-the-sun-a-year-with-the-daylight-computer.html
162•ghuntley•21h ago•52 comments
Open in hackernews

How to check for overlapping intervals

https://zayenz.se/blog/post/how-to-check-for-overlapping-intervals/
70•birdculture•6h ago

Comments

Galanwe•4h 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•2h ago
You should write that blog post.
Terr_•1h 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•4h ago
An older, and IMHO slightly more authoritative, source: <https://wiki.c2.com/?TestIfDateRangesOverlap>

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

rawling•3h 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.

srean•4h 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•4h 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•2h 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•2h ago
That's what unit tests are for.
senderista•2h ago
or better yet, property tests
fjfaase•3h 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•3h 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•3h 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•3h ago
I'm saving this for Advent Of Code 2025.
ch33zer•3h ago
Overlapping intervals were a question back in 2023 so yeah, it's useful
Animats•2h 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•2h 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•2h 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.

supportengineer•2h 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•2h 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)