frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: I built the fastest RSS reader in Zig

https://github.com/superstarryeyes/hys
6•superstarryeyes•2h ago
Well, I certainly tried. I had to, because it has a certain quirk inspired by "digital minimalism."

The quirk is that it only allows you to fetch new articles once per day (or X days).

Why? Let me explain...

I want my internet content to be like a boring newspaper. You get it in the morning, and you read the whole thing while sipping your morning coffee, and then you're done! No more new information for today. No pings, no alerts, peace, quiet, zen, etc.

But with that, I needed it to be able to fetch all articles from my hundreds of feeds in one sitting. This is where Zig and curl optimisations come in. I tried to do all the tricks in the book. If I missed something, let me know!

First off, I'm using curl multi for the network layer. The cool thing is it automatically does HTTP/2 multiplexing, which means if your feeds are hosted on the same CDN it reuses the same connection. I've got it configured to handle 50 connections total with up to 6 per host, which seems to be the sweet spot before servers start getting suspicious. Also, conditional GETs. If a feed hasn't changed since last time, the server just says "Not Modified" and we bail immediately.

While curl is downloading feeds, I wouldn't want CPU just being idle so the moment curl finishes downloading a single feed, it fires a callback that immediately throws the XML into a worker thread pool for parsing. The main thread keeps managing all the network stuff while worker threads are chewing through XML in parallel. Zig's memory model is perfect for this. Each feed gets its own ArenaAllocator, which is basically a playground where you can allocate strings during parsing, then when we're done, we just nuke the entire arena in one go.

For parsing itself, I'm using libexpat because it doesn't load the entire XML into memory like a DOM parser would. This matters because some podcast feeds especially are like 10MB+ of XML. So with smart truncation we download the first few X mb's (configurable), scan backwards to find the last complete item tag, cut it there, and parse just that. Keeps memory usage sane even when feed sizes get massive.

And for the UI I just pipe everything to the system's "less" command. You get vim navigation, searching, and paging for free. Plus I'm using OSC 8 hyperlinks, so you can actually click links to open them on your browser. Zero TUI framework needed. I've also included OPML import/export and feed groups as additional features.

The result: content from hundreds of RSS feeds retrieved in matter of seconds, and peace of mind for the rest of the day.

The code is open source and MIT licensed. If you have ideas on how to make it even faster or better, comment below. Feature requests and other suggestions are also welcome, here or GitHub.

Show HN: Sqlit – A lazygit-style TUI for SQL databases

https://github.com/Maxteabag/sqlit
84•MaxTeabag•1d ago•9 comments

Show HN: Deterministic PCIe Diagnostics for GPUs on Linux

https://github.com/parallelArchitect/gpu-pcie-diagnostic
6•gpu_systems•1h ago•1 comments

Show HN: Solving the ~95% legislative coverage gap using LLM's

https://lustra.news/
27•fokdelafons•7h ago•15 comments

Show HN: Interactive Common Lisp: An Enhanced REPL

https://github.com/atgreen/icl
76•atgreen•2d ago•5 comments

Show HN: My Tizen multiplayer drawing game flopped, but then hit 100M drawings

https://www.drawize.com/
14•lombarovic•6h ago•2 comments

Show HN: I built the fastest RSS reader in Zig

https://github.com/superstarryeyes/hys
6•superstarryeyes•2h ago•0 comments

Show HN: Zenflow – orchestrate coding agents without "you're right" loops

https://zencoder.ai/zenflow
21•andrewsthoughts•5h ago•10 comments

Show HN: A real-time 4D fractal explorer in the browser using WebGPU

https://bryanjj.github.io/nebula/
20•bryan0•5d ago•7 comments

Show HN: I designed my own 3D printer motherboard

https://github.com/KaiPereira/Cheetah-MX4-Mini
125•kaipereira•1w ago•37 comments

Show HN: Dev Tools – 24 browser-based utilities with no signup or tracking

https://dev-tools.online
2•ghdj•2h ago•0 comments

Show HN: AI Generated SVG's

https://vectorart.ai
2•tm11zz•3h ago•0 comments

Show HN: Picknplace.js, an Alternative to Drag and Drop

https://jgthms.com/picknplace.js/
22•bbx•6h ago•12 comments

Show HN: Ducktape – a tiny HTTP/2 wrapper around DuckDB's Appender API

https://github.com/artie-labs/ducktape
9•williamhaw•6h ago•0 comments

Show HN: A pager

https://www.udp7777.com/
99•keepamovin•2d ago•42 comments

Show HN: Pothole Detection System (YOLOv8 – FastAPI – Docker – React Native)

https://github.com/PeterHdd/pothole-detection-yolo
2•peterhddcoding•5h ago•0 comments

Show HN: DuckDB Table Visualizer –> Iceberg

https://duckdb.org/visualizer/
2•carlopi•6h ago•0 comments

Show HN: Search the lyrics of 500 HÖR Berlin techno sets

https://hor.greg.technology/
15•gregsadetsky•4d ago•10 comments

Show HN: WindMouse Algorithm in Python

2•AsfhtgkDavid•3h ago•0 comments

Show HN: Cordon – Reduce large log files to anomalous sections

https://github.com/calebevans/cordon
16•calebevans•1d ago•0 comments

Show HN: WeekInPapers – A Modern ArXiv Reader

https://www.weekinpapers.com/
3•mox111•8h ago•0 comments

Show HN: MP3 File Editor / Player for Windows

https://github.com/cutandjoin/Cjam/releases/tag/v2350
3•cutandjoin•9h ago•4 comments

Show HN: Building a full-stack Cloudflare starter kit (Hono and D1 and Stripe)

https://cf-stack-kit.hy-dev.workers.dev/
3•hy_wondercoms•9h ago•2 comments

Show HN: Open-source Markdown research tool written in Rust – Ekphos

https://github.com/hanebox/ekphos
2•haneboxx•9h ago•0 comments

Show HN: Building a small psychedelic twin-stick shooter in the browser

https://www.jamesdrandall.com/posts/building-a-webgpu-twinstick-psychedelic-shooter/
2•jamesrandall•11h ago•0 comments

Show HN: Hugity – Notion-style static docs editor with GitHub/Hugo auto-deploy

https://app.hugity.com
2•vladimiras•12h ago•0 comments

Show HN: Cargo-rail: graph-aware monorepo tooling for Rust; 11 deps

https://github.com/loadingalias/cargo-rail
61•LoadingALIAS•6d ago•7 comments

Show HN: DeviceLab – Turn phones across offices into one device lab

3•omnarayan•13h ago•0 comments

Show HN: Footywhoops – MIDI Sequencer Software

https://github.com/system32-ai/footywhoops
2•debarshri•14h ago•0 comments

Show HN: Open-Source Notion MCP Server (TypeScript, SSE, Apify)

https://github.com/piskunproject/notion-mcp-server
9•piskunlab•1d ago•0 comments

Show HN: Autograd.c – a tiny ML framework built from scratch

https://github.com/sueszli/autograd.c
5•sueszli•15h ago•0 comments