HNHacker News
TopNewBestAskShowJobs

zhxiaoliang

76 karma · joined May 2, 2026

submissionscomments
zhxiaoliang··on Show HN: Modern Browsers Don't Need the Cookie Anymore
I looked into my ad profile section and saw that I was worth nothing... I'm not sure if I should be happy or not.
zhxiaoliang··on Show HN: I worked on a new browser for 2 years, today it passed Acid 3
The render of the HN page looks close at first glance, but the engine clearly does not support SVG yet - those tiny arrows are all missing. Also it renders "Hacker News" on the header garbled with overlapping texts so it seems that the text-shaping engine lacks a proper inline box model. I would also be interested in seeing renders of more modern pages.
zhxiaoliang··on Real-Time LuaTeX: Recompiling Large Documents in 1ms [pdf]
Typst taking 300ms to do 300 pages cannot be seen as 4FPS - you don't treat the sum of 300 pages as single frame, LOL. And laying out a single paragraph is not 1ms for a whole document either. The paper is otherwise pretty good, but these rhetorics are probably not necessary, IMO.
zhxiaoliang··on Show HN: Pieces – Social network for people
The site has an elegant design and exudes a calming, inviting atmosphere.

I came across a line in the Social Contract that caught my attention: “The platforms that dominate today have drifted from their original promise. Feeds are flooded with content from accounts no one follows.”

I respectfully disagree with that. IMO the problem lies in the opposite direction. The content we see on these sites is driven by algorithms that reward popular posts and influencers. This creates a system of “stars” and “fans,” which does not foster genuine connections.

The original internet promised to give equal voices to all and allow users to see things they might otherwise miss. When I encounter a new social network like yours, especially one as elegant as this, I secretly hope it will restore that original promise.

zhxiaoliang··on Show HN: TownSquare, a tiny presence layer for websites
I enjoyed the design.
zhxiaoliang··on What the Fuck Happened to Nerds
Yes, I agree that nerds still exist… I myself am one, LOL. But there are so much noise out there that our voices can no longer be heard. :(
zhxiaoliang··on What the Fuck Happened to Nerds
The nerds era is gone. Welcome to the era of super-villains and self-entitled smartasses.
zhxiaoliang··on The four programming questions from my 1994 Microsoft internship interview (2023)
Haha, for some reason when phrased like that I get a bad feeling about the outcome of the interview.
zhxiaoliang··on The four programming questions from my 1994 Microsoft internship interview (2023)
I’m not sure if that strategy still works in today’s job market. It might still be, but I’m not the one to answer since I haven’t been on a job interview in quite some time.
zhxiaoliang··on The four programming questions from my 1994 Microsoft internship interview (2023)
Yes, but it feels like yesterday...
zhxiaoliang··on The four programming questions from my 1994 Microsoft internship interview (2023)
The author’s memory is remarkable. I hardly remember my own name that far back, LOL. Back then, I knew I would always struggle with those types of interviews, so I always carried a floppy disk with me to them. The disk contained a few programs I had written, and I would simply tell the interviewers, “Don’t give me a quiz. I’m terrible at it, so if you do, I’m out.” However, if they were willing to look at my capabilities, I would share a few of my programs. That approach actually worked most of the time and got me the jobs. The good old days!
zhxiaoliang··on "Stick" – A primitive/fun interactive demo of a tiny rig to animate layout
Yes, it’s a late addition to that library. The dancing text demo uses the “weighted exclusion” feature of the VMPrint engine, which essentially creates an object composed of horizontal bars. However, the engine also offers another mode that constructs exclusion objects by combining primitive shapes like circles and polygons. This “stick” demo demonstrates that. In doing so, I added a small set of APIs to allow programmatic control over these primitive parts, which essentially turns this into a rudimentary rigging system. I’m uncertain about its practicality in real-world applications, but it was interesting to observe.

I’m glad that you’re trying the Layoutmaster library in your projects. You can also feed it video with a predominantly white background (or any other solid color). Additionally, the video can contain multiple objects, and the algorithm treats them uniformly.

zhxiaoliang··on "Stick" – A primitive/fun interactive demo of a tiny rig to animate layout
Thank you! This can make it quite easy to create demos like those “dragon swimming through text” animations that became popular recently. I had no idea what other real-world applications we could use it for, but it was fun to be able to do it, LOL.
zhxiaoliang··on Click (2016)
That’s a cool story! Thx for sharing. Back then programming was rough, but the sense of accomplishment from completing even simple tasks was real and rewarding.
zhxiaoliang··on "Stick" – A primitive/fun interactive demo of a tiny rig to animate layout
Thanks for the help and clarification.
zhxiaoliang··on "Stick" – A primitive/fun interactive demo of a tiny rig to animate layout
It's strange that happened. I had no issue loading it on my iPhone 16e in Safari or Chrome... Could it be somehow your browser prevent Javascript from loading?
zhxiaoliang··on "Stick" – A primitive/fun interactive demo of a tiny rig to animate layout
I did not make the demo specifically for mobile browsers, but it does work rather well on my iPhone 16e with Safari and Chrome. I also tried it on my Pixel 10 and did not encounter any issues. The library itself is tiny ~250K so it should load right away.
zhxiaoliang··on "Stick" – A primitive/fun interactive demo of a tiny rig to animate layout
LOL sorry my bad. Should have been more specific. It’s a demo of my layout library. The stick figure is made with a few primitives to form a so-called exclusion assembly which causes texts to flow around them. But what’s unique about it is that these primitive parts can be controlled independently via programmatic control. This turns them into a little rig essentially. I thought it was funny and could be even useful so I shared it.
zhxiaoliang··on Google Declaring War on the Web
The Web is dead anyway. It never became the movement we dreamed it would: the democratization of information, communication, and expression.
zhxiaoliang··on "Stick" – A primitive/fun interactive demo of a tiny rig to animate layout
You can use primitive exclusion assemblies to create a rig and programmatically control it to animate a layout in Layoutmaster.
zhxiaoliang··on A prize-winning story published in Granta was (likely) written by AI
It goes to show that success often has little to do with the quality of one’s work. Ultimately, it all boils down to the circles one belongs to. If you don’t fit in, you don’t even get a chance to showcase your work, whether it’s AI-generated or not.
zhxiaoliang··on Dumb ways for an open source project to die
I feel it's also partly due to the poisonous online culture today. Negativity always prevails, and the loudest voices are the ones that get heard. Showing appreciation has become old fashioned, and creators feel the pressure to “market” themselves or risk being silenced by online platforms or drawn into the noise. It’s simply exhausting.
zhxiaoliang··on Click (2016)
Yes. It was 1993 -- there was no Internet to search for anything. The manual that came with Visual C++ could fill a small library, and the program itself came on two dozen floppy disks. And me being a not-so-bright junior programmer didn't help either.
zhxiaoliang··on Click (2016)
It was the spring of 1993. UPS dropped a huge package at my door. It was Visual C++ 1.0 in a 50-story-high white box that weighed a ton. I spent the whole day reading manuals and messing with it. When my wife came home that night, I couldn't wait to show her what I finally managed to pull off -- a maximized window that contained a single button that filled the entire space of that window. And the label said "Click Me." My wife clicked that button, and nothing happened.

"What's the point?" she asked.

I said, "You can click it."

"But what's the big deal?" she was baffled.

"You can click it,“ I said.

“That's the big deal."

zhxiaoliang··on Show HN: Layoutmaster cures DOM reflow with six simple API
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
zhxiaoliang··on Show HN: Layoutmaster cures DOM reflow with six simple API
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.

zhxiaoliang··on Show HN: Semble – Code search for agents that uses 98% fewer tokens than grep
The instructions on how to install and use it could use some work. I did eventually install it. Will try it later and report back.
zhxiaoliang··on Native all the way, until you need text
Exactly!
zhxiaoliang··on Native all the way, until you need text
Thank you. The architecture to get an HTML/CSS input layer in front of VMPrint is already there via a component called Transmuter. I have made transmuters to allow markdown with custom syntax support as input, and they work extremely well. Full support of HTML/CSS will be still be difficult, but a well-defined subset should be easy. The sibling Layoutmaster project also demonstrates this -- you can hand it a DOM element and it automatically grabs the styles and contents, converts them into the JSON AST, then feeds them to the engine for instant layout.
zhxiaoliang··on Native all the way, until you need text
VMPrint was a document pipeline and indeed somewhat crossed path with Typst, but I’ve since carved out its engine module, stripped away all dependencies so it's a pure math engine now that can be used anywhere.

My first experiment was to wrap it in a set of APIs called Layoutmaster. They work natively with the browser’s text systems to bypass DOM overflow. It was very fast... faster than the browser in many cases. This made me wonder if it would be faster in Rust so I made a port just for fun.

Turns out, the TS version was fast -- over a thousand pages per second, but the Rust version is quite a bit faster. It's still not fully optimized though. Still working on it.

I have no intention to use it for document generation unless there is a demand for it. For now I’m more interested in how this native engine can help with frontend jobs like creating a native live-editing surface without a browser.

Page 1 of 2Next →