frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Layoutmaster cures DOM reflow with six simple API

https://www.layoutmaster.dev/
2•zhxiaoliang•54m ago

Comments

zhxiaoliang•54m ago
Hi HN,

Author here.

Tools like Pretext help you avoid DOM reflow by measuring texts without the DOM and returns the height.

Layoutmaster does that too, but it goes beyond a simple measurer and solves the full layout with a real layout engine that’s as fast and as capable as the browser itself. It then hands you the solved layout via “pieces” — fragments with exact coordinates, baselines, and paint metadata for you to easily and precisely recreate the layout in HTML, canvas, or WebGL.

The APIs are stateless and extremely simple, yet they answer all your layout questions. Enamored by the “animated dragon swimming through texts” demo from Pretext? You can easily create that with just a few lines of code instead of hundreds.

form() Given a width, how does this lay out and how tall does it get? No DOM. No rendering. Just pieces.

fit() Given a bounded box, what fits and what overflows? Every character accounted for. Nothing disappears quietly.

plan() Parse once, never re-measure. The same plan drives form(), fit(), and flow() without repeating any work. The Book Masonry demo runs on this.

flow() Content does not always fit in one box. flow() carries text through multiple regions — columns, panels, spreads.

pour() Not every surface is a rectangle. Fill any shape — a circle, a polygon, an image silhouette, a video frame.

produce() Hand it a document. Get back pages. Publishing-grade pagination.

shileipeng•31m ago
Does it support bidi?
zhxiaoliang•28m ago
Yes it does. There is a demo of it showing its bidi rendering side by side with the browser's. Almost identical in most cases: https://cosmiciron.github.io/layoutmaster/bidi.html

NASA Partnered with HackClub and AMD to Give Away $2.5M in Tech Swags

https://mag.openrockets.com/p/httpsstardancehackclubcom-mp9gemdz
1•Vara_Pixel•3m ago•0 comments

Show HN: Agent-QA – natural-language E2E tests for apps built with coding agents

https://vostride.com/agent-qa
1•pranshuchittora•3m ago•0 comments

Book Club: Designing Data-Intensive Applications, 2nd Edition

https://www.heltweg.org/posts/book-club-designing-data-intensive-applications-2-nd-edition/
1•rhazn•4m ago•0 comments

The Applicability of Spaced Repetition

https://borretti.me/article/the-applicability-of-spaced-repetition
1•ibobev•5m ago•0 comments

Academia, startups, big tech, and back again

https://austinhenley.com/blog/academiastartupsbigtech.html
1•ibobev•5m ago•0 comments

Building a multi-agent system from scratch: 50 lines of bash and Git

https://en.andros.dev/blog/ed26ea98/building-a-multi-agent-system-from-scratch-50-lines-of-bash-git/
1•ibobev•7m ago•0 comments

Project Glasswing: what Mythos showed us

https://blog.cloudflare.com/cyber-frontier-models/
1•Fysi•7m ago•0 comments

Async I/O in Zig 0.16, today

https://lalinsky.com/2026/05/11/async-io-in-zig-016-today.html
1•birdculture•7m ago•0 comments

How to Clean Time Series Data in Python

https://www.freecodecamp.org/news/how-to-clean-time-series-data-in-python/
1•eigenBasis•9m ago•0 comments

The down fall of bug bounties

https://shubs.io/the-down-fall-of-bug-bounties/
2•WalterSobchak•10m ago•0 comments

Local Business Logic Generator

https://github.com/quadracollision/llmisp
1•vegnus•10m ago•1 comments

Show HN: Files.md – open-source alternative to Obsidian

https://github.com/zakirullin/files.md
3•zakirullin•10m ago•0 comments

Building a Solidarity Ecosystem for AI

https://ssir.org/articles/entry/artificial-intelligence-solidarity-ecosystem
1•speckx•11m ago•0 comments

Show HN: Docker hello-world, but in half-size image with Matrix digital rain

https://github.com/zdk/wakeup-neo
1•zdkaster•12m ago•0 comments

An asteroid discovered days ago will narrowly miss Earth

https://www.cnn.com/2026/05/18/science/asteroid-earth-close-pass
1•bilekas•13m ago•0 comments

I expanded DystopiaBench to 42 models and 6 dystopia types

https://www.reddit.com/r/ClaudeAI/s/yzhKDtBusU
1•yunseo47•13m ago•0 comments

How to Make Your Coding Agent Look Like an Idiot

https://capocasa.dev/how-to-make-your-coding-agent-look-like-an-idiot
1•rainmaking•13m ago•0 comments

Bipedalism and brain expansion explain human handedness

https://journals.plos.org/plosbiology/article?id=10.1371/journal.pbio.3003771
1•derbOac•16m ago•0 comments

The Human Value versus AI Legacy Code [video]

https://adventuresindevops.com/episodes/272-human-value-versus-ai-generated-legacy-code/
1•mooreds•16m ago•0 comments

Researchers Wanted Preschool Teachers to Wear Cameras to Train AI

https://www.404media.co/researchers-wanted-preschool-teachers-to-wear-cameras-to-train-ai/
2•cdrnsf•17m ago•0 comments

RISC-V and Floating Point

https://fprox.substack.com/p/risc-v-and-floating-point
2•hasheddan•19m ago•1 comments

Show HN: Bundle-roast – the NPM scale that knows your sins

https://bundle-roast.puruvj.dev
1•puruvj•20m ago•1 comments

The American epoch of oil is collapsing. What comes next could be ugly

https://www.theguardian.com/us-news/ng-interactive/2026/may/17/america-china-energy-oil-renewables
8•robtherobber•24m ago•3 comments

Panelook

https://www.panelook.com/
3•hyperific•24m ago•0 comments

SPF Flattening and the 10-Lookup Limit: How to Fix Too Many DNS Lookups

https://dmarcguard.io/blog/spf-too-many-dns-lookups/
2•meysamazad•25m ago•0 comments

The Anatomy of an Agent Harness

https://www.langchain.com/blog/the-anatomy-of-an-agent-harness
1•meysamazad•25m ago•1 comments

An LLM models our worst behavior

https://person-al.github.io/%F0%9F%8C%B1/2026/05/11/an-llm-models-our-worst-behavior.html
1•meysamazad•27m ago•0 comments

Gaza is rebuilding with Lego-like bricks made from rubble

https://www.wired.com/story/gaza-is-rebuilding-with-lego-like-bricks-made-from-rubble/
2•cunidev•27m ago•1 comments

Famous paintings, computationally restored using conservation research

https://aspainted.com
1•gammied•28m ago•0 comments

Show HN: HypergraphZ – directed hypergraph library in Zig with Python bindings

https://github.com/yamafaktory/hypergraphz
1•yamafaktory•29m ago•0 comments