frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Preventing line breaks in <code> elements

https://alexwlchan.net/2026/non-breaking-code/
6•surprisetalk•1h ago

Comments

danlitt•48m ago
You can't parse [X]HTML with regex. Because HTML can't be parsed by regex. Regex is not a tool that can be used to correctly parse HTML.
rokkamokka•38m ago
You can parse a subset of it though, like if you're in control of the html yourself and avoid certain structures
zarzavat•27m ago
Parsing HTML with a regex is never a good option, but it's sometimes the only option.
pkal•16m ago
In the example from the article it certainly is an option. In Python you could either use a "soup" library or you could play around with a tool like https://www.w3.org/Tools/HTML-XML-utils/man1/hxpipe.html.

The more fundamental question for me is why the author didn't decide to make make code blocks non-breaking by default, or just add the class annotations when he writes the HTML?

matheusmoreira•18m ago
Tony the pony, he comes.

My security camera shipped a GitHub admin token in its login page

https://hhh.hn/hanwha-github-token/
243•hhh•4h ago•84 comments

India's first privately-developed rocket reaches orbit on dramatic debut launch

https://arstechnica.com/space/2026/07/indias-first-privately-developed-rocket-reaches-orbit-on-dr...
186•sohkamyung•4d ago•49 comments

Flux 3 X Mimic: The Next Generation of Video-Action Models

https://bfl.ai/blog/flux-3-mimic
243•kensai•6h ago•35 comments

It's getting harder to focus every day

https://glyphack.com/attention/
466•peykar•7h ago•255 comments

Half-Life 2 running natively on HaikuOS

https://discuss.haiku-os.org/t/haiku-nvidia-porting-nvidia-driver-for-turing-gpus/16520?page=18
63•m0do1•3h ago•3 comments

IRGC Claims It Destroyed Amazon's Bahrain Data Center

https://houseofsaud.com/irgc-claims-destroyed-amazon-bahrain-data-center/
157•thisislife2•6h ago•105 comments

3GPP Version 19

https://www.3gpp.org/specifications-technologies/releases/release-19
21•mlhpdx•1h ago•6 comments

Flux 3

https://bfl.ai/blog/flux-3
483•ThouYS•9h ago•115 comments

The front end framework for correctness: built on Effect, architected like Elm

https://foldkit.dev/
6•plucafs•35m ago•3 comments

Government orders GitHub to remove Bluetooth-based chat app Bitchat: Jack Dorsey

https://www.thehindu.com/news/national/government-orders-github-to-remove-bluetooth-based-chat-ap...
78•rootkea•1h ago•35 comments

Em dashes are fucking amazing

https://psychotechnology.substack.com/p/em-dashes-are-fucking-amazing
190•surprisetalk•3h ago•165 comments

Co-Opting Linux Processes for High-Performance Network Simulation (2022)

https://www.usenix.org/conference/atc22/presentation/jansen
11•teleforce•1h ago•0 comments

Latest Airbus Single Aisle Aircraft Innovations

https://www.airbus.com/en/newsroom/stories/2026-07-how-the-a321xlr-is-redefining-single-aisle-com...
18•r2sk5t•2d ago•15 comments

Plants vs. Zombies for PlayStation 2

https://github.com/OptiJuegos/pvz-ps2
14•Jotalea•2h ago•0 comments

WebGPU Unleashed: A Practical Tutorial

https://shi-yan.github.io/webgpuunleashed/
9•ibobev•1h ago•0 comments

Why is programming so captivating, yet so agonizing?

https://elsewhere.news/en/zhenfund/why-is-programming-so-captivating-yet-so-agonizing
41•ilreb•3h ago•37 comments

Buz – A fork of Bun using modern Zig, with sub-1s incremental builds

https://ziggit.dev/t/buz-a-drop-in-replacement-for-bun-using-modern-zig-with-sub-1s-incremental-b...
166•kristoff_it•6h ago•116 comments

Claude Cookbook

https://platform.claude.com/cookbook/
224•saikatsg•10h ago•118 comments

Mag Computer: A Mag History of RAM (1960–2025)

https://magworld.pw/episodes/computer/
8•evakhoury•1h ago•1 comments

Kaizen #4: Overhauled Homelab

https://timharek.no/blog/kaizen-4/
17•meysamazad•2h ago•2 comments

So bright the vision (1956) a story about machines writing instead of humans [pdf]

https://s3.us-west-1.wasabisys.com/luminist/EB/S/Simak%20-%20So%20Bright%20the%20Vision.pdf
4•marysminefnuf•3d ago•0 comments

The IBM PC, Part 1: Arrival

https://technicshistory.com/2026/07/24/the-ibm-pc-part-1-arrival/
47•cfmcdonald•4h ago•14 comments

Game of Trees – Git-based version control from OpenBSD folks

https://www.gameoftrees.org/
42•gregnavis•5h ago•5 comments

Interview with a Maintainer

https://nesbitt.io/2026/07/24/interview-with-a-maintainer.html
12•ryangibb•2h ago•7 comments

Preventing line breaks in <code> elements

https://alexwlchan.net/2026/non-breaking-code/
6•surprisetalk•1h ago•5 comments

Open Weights and American AI Leadership [pdf]

https://images.nvidia.com/pdf/Open-Weights-and-American-AI-Leadership.pdf
70•lairv•2h ago•34 comments

PCI DSS DMARC Requirement: What Section 5.4.1 Requires

https://dmarcguard.io/blog/pci-dss/
6•meysamazad•2h ago•1 comments

Writing a Debugger from Scratch

https://www.timdbg.com/posts/writing-a-debugger-from-scratch-part-1/
7•ibobev•1h ago•2 comments

Show HN: Echo – Fable-level results at 1/3 the cost using open-weight models

430•adam_rida•20h ago•211 comments

My Emacs Configuration (Dired)

https://eugene-andrienko.com/2026-07-05-my-emacs-configuration-dired.html
6•meysamazad•2h ago•0 comments