Hacker News

Show HN: NovelStar – a functional novel writing suite in a single HTML file

Hacker News - Thu, 02/26/2026 - 12:19am

NovelStar is a retro-styled, Windows 95-inspired desktop novel writing application built as a single portable HTML file. It brings professional manuscript formatting, scene/chapter organisation, word count tracking, and full-manuscript PDF export into a clean, distraction-friendly writing environment — no subscription, no cloud, no account required.

It runs entirely in your browser as a standalone .html file

Written by: pixeldude84 Code generated by: Claude (Anthropic AI) License: GNU General Public License v3.0 (GPL-3.0)

Comments URL: https://news.ycombinator.com/item?id=47162184

Points: 1

# Comments: 0

Categories: Hacker News

Claude Code Anywhere

Hacker News - Thu, 02/26/2026 - 12:14am

Article URL: https://happy.engineering

Comments URL: https://news.ycombinator.com/item?id=47162156

Points: 1

# Comments: 0

Categories: Hacker News

Show HN: I built a persistent LSM-Tree storage engine in Go from scratch

Hacker News - Thu, 02/26/2026 - 12:03am

GO-LSM: BUILDING A LOG-STRUCTURED MERGE-TREE ENGINE

INTRODUCTION:

I've always been curious about the internals of databases, so I decided to build my own Log-Structured Merge-Tree (LSM-Tree) engine in Go to understand the "magic" behind write-optimized storage.

Go-LSM is a persistent Key-Value engine that manages the full lifecycle of data from volatile RAM to immutable disk storage.

TECHNICAL HIGHLIGHTS:

1. THE DURABILITY LAYER (WAL)

To ensure zero data loss, I implemented an append-only Write-Ahead Log.

• Custom binary protocol: [Type][KeyLen][ValLen][Key][Value] • File.Sync() to force kernel flushes to physical hardware • Ensures absolute durability on system crashes 2. SKIPLIST MEMTABLE

Instead of a standard tree, I used a SkipList for the in-memory layer.

• Provides O(log n) search and insertion without the rebalancing complexity of Red-Black trees • Keeps keys lexicographically sorted for the eventual SSTable flush • Enables efficient memory-to-disk transitions 3. SSTABLE FOOTER-BASED INDEXING

My SSTables are binary-searchable on disk using a tail-first reading strategy:

• Jump to the last 8 bytes of a file to find the Index Block pointer • Avoid full file scans by reading directly to the index • Execute binary search on sorted keys for O(log n) disk lookups 4. MAINTENANCE LAYER: COMPACTION

Built a K-Way Merge compaction engine that handles performance optimization:

• Processes multiple SSTable layers and merges them into single, optimized files • Handles "Read Amplification" by reducing the number of files to check per query • Processes "Tombstones" to finalize deletions and reclaim disk space 5. TOOLING & DEBUGGING

Custom binary parsers transform raw binary files into human-readable tables:

• lsm-dump: View sorted SSTable contents • lsm-wal-dump: Inspect unflushed Write-Ahead Log entries • Enables deep inspection of internal storage layers KEY ENGINEERING LESSONS:

Moving from standard application development to systems programming required a fundamental shift in how I think about memory and I/O:

• ENDIANNESS LOGIC: Handling Big-Endian vs. Little-Endian conversions for cross-platform compatibility • FILE OFFSET MANAGEMENT: Manually managing byte offsets and file pointer positioning • CONCURRENCY & THREAD SAFETY: Implementing thread-safe mechanisms for MemTable flushing • BINARY PROTOCOL DESIGN: Creating efficient, compact data encodings for durability REPOSITORY:

https://github.com/Jyotishmoy12/LSM-Tree-in-Golang

Comments URL: https://news.ycombinator.com/item?id=47162087

Points: 1

# Comments: 0

Categories: Hacker News

Human brain cells playing Doom

Hacker News - Thu, 02/26/2026 - 12:01am
Categories: Hacker News

Show HN: AI-assert – Constraint verification for LLM outputs (278 lines, Python)

Hacker News - Wed, 02/25/2026 - 11:53pm

I built a tiny library that verifies LLM outputs against constraints and retries on failure.

The core insight: LLMs don't reliably follow instructions, but you can catch failures cheaply and retry with targeted feedback. This is essentially a lightweight "process reward model" that requires zero training.

How it works: 1. Your LLM generates output 2. ai-assert checks it against constraints (length, word count, sentence count, regex, custom predicates) 3. Each constraint returns a score in [0,1] -- composite is multiplicative (zero in any = zero overall) 4. If score < threshold, retry with feedback ("Constraint X failed because Y -- regenerate") 5. Return the best-scoring attempt

On IFEval (25 instruction-following constraint types): 69.3% -> 76.2% accuracy.

278 lines. Zero dependencies. Works with any callable that takes a string and returns a string.

pip install ai-assert

https://github.com/kaantahti/ai-assert

Comments URL: https://news.ycombinator.com/item?id=47162028

Points: 1

# Comments: 0

Categories: Hacker News

Pages