frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Norway imposes near ban on AI in elementary school

https://www.reuters.com/technology/norway-imposes-near-ban-ai-elementary-school-2026-06-19/
192•ilreb•6h ago•134 comments

There are no instances in ATProto

https://overreacted.io/there-are-no-instances-in-atproto/
287•danabramov•7h ago•170 comments

Hyundai buys Boston Dynamics

https://startupfortune.com/hyundai-takes-full-control-of-boston-dynamics-as-softbank-exits-for-32...
553•ck2•6h ago•263 comments

I used sound waves to make espresso. It could cut coffee‑brewing energy use by ¾

https://theconversation.com/i-used-sound-waves-to-make-espresso-it-could-cut-coffee-brewing-energ...
141•zeristor•6d ago•87 comments

The UK's New Under-16 Social Media Ban Will Cause More Harm Than It Prevents

https://www.eff.org/deeplinks/2026/06/uks-new-under-16-social-media-ban-will-cause-more-harm-it-p...
37•Brajeshwar•46m ago•32 comments

How many of the 170k English words do you know?

https://vocabowl-870366514258.us-west1.run.app/
184•abnry•8h ago•296 comments

Surprising Economics of Load-Balanced Systems

https://brooker.co.za/blog/2020/08/06/erlang.html
9•KraftyOne•2h ago•0 comments

Project Valhalla, Explained: How a Decade of Work Arrives in JDK 28

https://www.jvm-weekly.com/p/project-valhalla-explained-how-a
524•philonoist•16h ago•321 comments

Think of the Children: How to Force Real ID for All Internet Traffic (2023)

https://nochan.net/b/Internet-Crap/20230829-Think-Of-The-Children/
10•Bender•2h ago•0 comments

Bobby Prince, composer for Doom, Wolfenstein 3D, and Duke Nukem 3D, has died

https://www.legacy.com/legacy/robert-bobby-prince-lll
30•pgrote•3h ago•4 comments

Google workspace threatening to block Firefox access

https://tales.fromprod.com/2026/169/google-workspace-threatening-to-block-firefox.html
375•birdculture•6h ago•123 comments

A 1976 university experiment spun up the U.S. wind industry

https://spectrum.ieee.org/william-heronemus-wind-energy
54•pseudolus•4d ago•4 comments

Telescope Ranchers

https://kottke.org/26/06/telescope-ranchers
91•bookofjoe•3d ago•31 comments

A new bill takes aim at government pressure to silence lawful online speech

https://www.eff.org/deeplinks/2026/06/new-bill-takes-aim-government-pressure-silence-lawful-onlin...
203•hn_acker•5h ago•109 comments

DuckDB Internals Part 1

https://www.greybeam.ai/blog/duckdb-internals-part-1
421•marklit•3d ago•128 comments

Court Records Should Be Free

https://www.eff.org/deeplinks/2026/06/court-records-should-be-free
145•hn_acker•5h ago•26 comments

Zenzizenzizenzic

https://en.wikipedia.org/wiki/Zenzizenzizenzic
18•gyosifov•55m ago•11 comments

Egyptian Fractions

https://blog.plover.com/math/egyptian-fractions.html
32•luu•3d ago•0 comments

Zen and the Art of Machine Learning Research

https://blog.jxmo.io/p/zen-and-the-art-of-machine-learning
226•jxmorris12•3d ago•73 comments

Show HN: Metiq: a real time 3D globe for 100 public datasets

https://metiq.space
69•rakeda•3d ago•19 comments

Big Banana Car

https://bigbananacar.com/
104•Bender•4h ago•61 comments

Amateur may have cracked Linear A

https://aiclambake.com/clamtakes/linear-a/
384•Kosturdistan•6h ago•150 comments

Companies rein in AI usage as costs strain budgets

https://www.ft.com/content/1d37cc08-e0aa-45a4-a45d-4ad282529314
72•fandorin•2h ago•51 comments

To study how chips work, MIT researchers built their own operating system

https://news.mit.edu/2026/to-study-how-chips-really-work-mit-researchers-built-their-own-operatin...
344•speckx•4d ago•52 comments

RhinoCollab a plugin for real-time editing for Rhino 3D

https://rhinocollab.com
5•Ashxius•5d ago•1 comments

Show HN: Continuous Nvidia CUDA PC Sampling Profiler

https://www.polarsignals.com/blog/posts/2026/06/10/nvidia-cuda-pc-sampling
11•gnurizen•4d ago•3 comments

Ten years of ClickHouse in open source

https://clickhouse.com/blog/open-source-10
258•saisrirampur•4d ago•71 comments

Amazon drops Sam Altman movie after announcing OpenAI partnership

https://www.the-independent.com/arts-entertainment/films/news/sam-altman-biopic-amazon-openai-dea...
138•theanonymousone•2h ago•54 comments

Gribouille 0.3.0: A Grammar of Graphics for Typst

https://mickael.canouil.fr/posts/2026-06-15-gribouille-0-3/
202•mcanouil•4d ago•75 comments

The AirPods Effect

https://www.theescapenewsletter.com/p/the-airpods-effect
363•herbertl•23h ago•648 comments
Open in hackernews

Ask HN: How do you separate intentional test boilerplate from real duplication?

7•rafaepta•2d ago
I am maintaining an open-source project (deterministic open source duplicate-code detector) and a user asked for a feature which I don’t have a clear answer on how to implement.

This seems a very hard problem to solve:

-Tests repeat the same scenario. For a structural detector, this flags as repetition (duplication). However, tests are not something people want to delete from the codebases.

-The repetitions from tests (on purpose) end up looking like undesired code duplication and the tools canno tell which is which.

-One way to solve this would be something like a human in the loop (kind of how linters allow user to accept something once, while keeping the default first run zero-config).

Wonder how you have seen this handle and if anyone have any ideas.

Here is the the repo: https://github.com/Rafaelpta/dupehound

And here is the issue with more detail: https://github.com/Rafaelpta/dupehound/issues/23

Comments

ambicapter•1h ago
What is a "structural detector"?
nagaiaida•57m ago
clicking through to the repo linked at the end it appears to be rolling-hash-style ast structural pattern matching that ignores things like what names identifiers concretely have
echoangle•1h ago
Maybe I don’t quite understand the question but can you not just define a function that sets up the shared test state and use that in every test?
dezgeg•59m ago
Detect tests somehow (eg. in rust you could check for #[test]) and just skip the analysis for that function?
rafaepta•53m ago
Yeah, that is pretty much what it does already: it tries to recognize test files and skip them. Dupehound is available for 12 languages Today.

Some languages like RUst you mentioned, have a clear tag that says "this is a test," but others do not, so the tool has to guess from file names and ends up missing some and skipping too much.

Also as I mentioned on the answer below, sometimes you actually do want to see the repeats inside tests, or normal code repeats on purpose too. So I am leaning toward letting users wave off one specific case by hand instead of skipping everything blindly.

peterabbitcook•44m ago
I’ve dealt with a question that rhymes with this.

Sonarqube or CodeQL reports might tell me what percentage of a repo is duplicated code, and a large percentage of that is in src/test/java

I find that a lot of the time this is not just some flippant observation but a clue that I should be using a mechanism like @ParameterizedTest instead of @Test, so I rewrite those tests in a way that makes them easier to set-up, define parameters/constraints, inputs, and outputs. Sometimes it does get a little convoluted as you either use a lot of naked Arguments.of() or define test-class-scoped nested records to encapsulate test parameters, inputs, expected outputs, etc.