frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Parse LLM Markdown streams incrementally on the server or client

https://github.com/nimeshnayaju/markdown-parser
2•nayajunimesh•1h ago
Most AI chat applications (such as ChatGPT or Claude) stream their responses to the client as markdown text. As each new chunk of text arrives, the front end typically re-parses the entire markdown document to render the updated message. This works, but it can quickly slow down the UI for long responses.

I’ve been obsessing over ways to make this more efficient, so I wrote a markdown parser that can parse streaming markdown (semi) incrementally. Instead of re-processing the whole document each time, it only parses what’s new, processing each line only once. Block‑level nodes are buffered until they’re complete (for example, once a paragraph is done and won’t be extended by more text). This also makes parsing the markdown on server possible. The main demo does exactly that. Additionally, animating markdown blocks becomes much simpler and efficient, as a result.

Here’s a demo if you’d like to see it in action: https://markdownparser.vercel.app/experimental

Feel free to type 'Render a table with 10 rows' to see each table row animate in.

I’ve spent a lot of time thinking about this problem, so if you’re working on similar issues, I'd love to chat.

Comments

nayajunimesh•51m ago
I also wrote an interactive blog post sharing my thoughts on what I think makes a better markdown streaming UI here: https://nimeshnayaju.com/markdown. The library was a result of those opinions and thoughts.

New Fragnesia Linux flaw lets attackers gain root privileges

https://www.bleepingcomputer.com/news/security/new-fragnesia-linux-flaw-lets-attackers-gain-root-...
1•akyuu•2m ago•0 comments

AMD EPYC CPUs Reach Record Server Revenue Share of 46.2%

https://www.techpowerup.com/349029/amd-epyc-cpus-reach-record-server-revenue-share-of-46-2
1•akyuu•7m ago•0 comments

Have a Coherent AI Policy

https://brianmeeker.me/2026/05/14/have-a-coherent-ai-policy/
1•ai_critic•9m ago•0 comments

Shareable AI Editable Visualizations

https://framejs.io/docs/intro.html
1•dionjw•11m ago•0 comments

Boeing, Toyota Donated $1M Each to Transportation Secretary's Road-Trip Show

https://www.wsj.com/business/boeing-toyota-donated-1-million-each-to-transportation-secretarys-ro...
1•impish9208•11m ago•1 comments

Decisions in the past have long running repercussions

https://www.distributedthoughts.org/2026-05-07-roman-bridge-still-determines-your-commute/
2•prosaic-hacker•15m ago•1 comments

A Professor in Every Pocket – A New Framework for Higher Education

https://lagomor.ph/2026/01/a-professor-in-every-pocket/
1•ChilledTonic•22m ago•0 comments

Isaac Newton on Laputa

https://www.historytoday.com/archive/great-debates/isaac-newton-laputa
1•hhs•30m ago•0 comments

mimalloc: A new, high-performance, scalable memory allocator for the modern era

https://www.microsoft.com/en-us/research/blog/mimalloc-a-high-performance-scalable-memory-allocat...
2•matt_d•30m ago•0 comments

A scientist made a clone of a clone of a clone of a clone

https://www.nationalgeographic.com/science/article/scientists-reclone-mice+
1•mrtedbear•30m ago•0 comments

Learn Python the Hard Way Was Right About One Thing

https://fagnerbrack.com/learn-python-the-hard-way-was-right-about-one-thing-9b6ab0b67526
1•birdculture•36m ago•0 comments

AI to infest eight in ten premium phones within two years

https://www.theregister.com/personal-tech/2026/05/14/ai-to-infest-eight-in-ten-premium-phones-wit...
1•Bender•38m ago•0 comments

Cisco to fire 4k staff and generously give them free training – on Cisco

https://www.theregister.com/networks/2026/05/14/cisco-to-fire-4000-staff-and-generously-give-them...
3•Bender•39m ago•0 comments

To gain root access at this company, all an intruder had to do was ask nicely

https://www.theregister.com/security/2026/05/14/to-gain-root-access-intruder-just-had-to-ask/5239853
1•Bender•39m ago•0 comments

Encountering the roots of mathematics

https://www.ias.edu/ideas/encountering-roots-mathematics
1•hhs•40m ago•0 comments

AI Poop Analysis App Offered to Sell Me Database of Its Users' Poops

https://www.404media.co/ai-poop-analysis-app-offered-to-sell-me-access-to-its-users-poops/
2•Cider9986•43m ago•0 comments

ICLR 2026 – Institutional Affiliations Dataset and Analysis

https://github.com/DmytroLopushanskyy/iclr2026-affiliations
2•stared•43m ago•0 comments

Do deep learning models recognize 3D shapes in the same way humans do?

https://www.santafe.edu/news-center/news/do-deep-learning-models-recognize-3d-shapes-in-the-same-...
1•hhs•46m ago•0 comments

Mirror Life's Doomsday Potential

https://www.noemamag.com/the-doomsday-organism/
1•littlexsparkee•46m ago•0 comments

The Cost of Free Doughnuts

https://www.npr.org/2020/01/08/794592539/episode-386-the-cost-of-free-doughnuts
1•compiler-guy•47m ago•0 comments

AI #168: Not Leading the Future

https://thezvi.substack.com/p/ai-168-not-leading-the-future
2•paulpauper•48m ago•0 comments

Too Much Is Happening Too Fast

https://www.theatlantic.com/technology/2026/05/too-much-happening-too-fast/687177/
3•paulpauper•49m ago•0 comments

Sensational Books to Read This Summer

https://www.theatlantic.com/books/2026/05/summer-reading-2026/686880/
1•paulpauper•49m ago•1 comments

'Millions' of pounds saved by replacing Palantir tech in refugee system

https://www.bbc.com/news/articles/c2l2j1lxdk5o
31•cdrnsf•50m ago•4 comments

Fields of the World: A Global Field Boundary Ecosystem

https://fieldsofthe.world/
1•tokai•51m ago•0 comments

Everyone's a thought leader. Almost no one is thinking

https://bernste.in/writings/everyones-a-thought-leader-almost-no-one-is-thinking/
1•mbernstein•52m ago•0 comments

We Now Know How Many People the CDC Is Monitoring for Hantavirus

https://www.wired.com/story/how-many-people-cdc-is-monitoring-for-hantavirus/
2•ent101•52m ago•0 comments

Automated red teaming with RL: attacker-defender co-training

https://castform.com/blog/red-team-rl/
3•ClassifexRL•52m ago•1 comments

More than half of U.S. faces worst drought in decades

https://news.vt.edu/articles/2026/05/drought-united-states-la-nina-expert.html
20•littlexsparkee•56m ago•0 comments

Ontario auditors find doctors' AI note takers routinely blow basic facts

https://www.theregister.com/ai-ml/2026/05/14/ontario-auditors-find-doctors-ai-note-takers-routine...
25•sohkamyung•57m ago•3 comments