frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Algorithms and Data Structures in TypeScript – Free Book (~400 Pages)

http://amoilanen.github.io/Algorithms-with-Typescript/
31•jsontwikkeling•1h ago
I started writing this book 10 years ago in JavaScript, got through a few chapters (asymptotic notation, basic techniques, start of sorting), and then abandoned it.

Recently I picked it back up, converted everything to TypeScript, and used AI (Zenflow [1] + Claude Opus 4.6) to complete the remaining chapters. I provided the structure, direction, and initial chapters; the AI generated the bulk of the remaining content under a spec-driven workflow.

The book covers roughly a first 1-2 year CS curriculum: sorting, dynamic programming, graph algorithms, trees, heaps, hash tables, and more. All code is executable, typed with generics/interfaces, and covered with tests.

I've thoroughly reviewed several chapters (sorting, DP, graphs) and done a high-level pass on the rest. Currently in beta — corrections and contributions are welcome.

MIT licensed. Inspired by Wirth's "Algorithms and Data Structures", SICP, and CLRS.

Code and tests: https://github.com/amoilanen/Algorithms-with-Typescript

[1] https://zencoder.ai/zenflow

Comments

BloodAndCode•43m ago
this is great timing for me — i actually have an algorithms & data structures course this semester. seeing implementations in typescript instead of the usual pseudo-code or java/python is really nice. makes it much easier to actually run the code and play with the ideas while learning. curious — did writing this in typescript change how you approached any of the classic structures? some of them feel a bit awkward with generics in certain languages.
jsontwikkeling•20m ago
Great to hear that. I actually think TypeScript is very fit for the purpose, even better than Python (lacks types) or Java (bulkier).

Type signatures document contracts directly:

  export function rabinKarp(text: string, pattern: string): number[]
Clear that it takes two strings and returns match positions. No separate explanation needed.

Interfaces model return types and ADTs cleanly:

  export interface ShortestPathResult<T> {
    dist: Map<T, number>;
    parent: Map<T, T | undefined>;
  }

  export function dijkstra<T>(graph: Graph<T>, source: T): ShortestPathResult<T>
It's also lightweight, flexible, has familiar C-like syntax, and unlike pseudocode — you can actually run everything.

Re: generics feeling awkward — in TypeScript they feel pretty natural. The type inference helps a lot, you rarely need to spell out type parameters at call sites.

BloodAndCode•1m ago
that makes sense. the type signatures as documentation point is actually really nice — being able to see the contract immediately is a big plus compared to a lot of pseudocode examples in textbooks. i also like the idea that everything is runnable. a lot of algorithm books show the idea but you rarely get something you can directly execute and experiment with.

will definitely try some of the implementations while studying this semester.

gausswho•17m ago
this is well structured and put together. i would think it serves as a good base for refreshing oneself on the fundamentals. and it has a satisfying bend towards being both concise and thorough.

Show HN: Algorithms and Data Structures in TypeScript – Free Book (~400 Pages)

http://amoilanen.github.io/Algorithms-with-Typescript/
31•jsontwikkeling•1h ago•4 comments

Show HN: What was the world listening to? Music charts, 20 countries (1940–2025)

https://88mph.fm/
44•matteocantiello•2d ago•11 comments

Show HN: Axe – A 12MB binary that replaces your AI framework

https://github.com/jrswab/axe
199•jrswab•1d ago•115 comments

Show HN: fftool – A Terminal UI for FFmpeg – Shows Command Before It Runs

https://bensantora.com/posts/fftool-ffmpeg-tui-go/
33•taskset•3h ago•22 comments

Show HN: OneCLI – Vault for AI Agents in Rust

https://github.com/onecli/onecli
153•guyb3•21h ago•49 comments

Show HN: Rudel – Claude Code Session Analytics

https://github.com/obsessiondb/rudel
137•keks0r•1d ago•75 comments

Show HN: Understudy – Teach a desktop agent by demonstrating a task once

https://github.com/understudy-ai/understudy
108•bayes-song•21h ago•40 comments

Show HN: s@: decentralized social networking over static sites

http://satproto.org/
407•remywang•1d ago•217 comments

Show HN: OpenClaw-class agents on ESP32 (and the IDE that makes it possible)

https://pycoclaw.com/
26•pycoclaw•16h ago•1 comments

Show HN: Web-based ANSI art viewer

https://sure.is/ansi/
27•lubujackson•3d ago•7 comments

Show HN: Global Maritime Chokepoints

https://ryanshook.org/chokepoints/
15•RyanShook•9h ago•4 comments

Show HN: Open-source browser for AI agents

https://github.com/theredsix/agent-browser-protocol
150•theredsix•1d ago•52 comments

Show HN: Vanilla JavaScript refinery simulator built to explain job to my kids

https://fuelingcuriosity.com/game.html
125•fuelingcurious•1d ago•48 comments

Show HN: I built a tool that watches webpages and exposes changes as RSS

https://sitespy.app
310•vkuprin•1d ago•79 comments

Show HN: Autoresearch@home

https://www.ensue-network.ai/autoresearch
76•austinbaggio•1d ago•19 comments

Show HN: I built an ISP infrastructure emulator from scratch with a custom vBNG

https://aether.saphal.me/dashboard/default
68•saphalpdyl•2d ago•21 comments

Show HN: Klaus – OpenClaw on a VM, batteries included

https://klausai.com/
156•robthompson2018•1d ago•91 comments

Show HN: Chat.nvim v1.4.0 – OpenClaw-like AI assistant for Neovim

https://github.com/wsdjeg/chat.nvim/releases/tag/v1.4.0
2•wsdjeg•1h ago•0 comments

Show HN: A context-aware permission guard for Claude Code

https://github.com/manuelschipper/nah/
124•schipperai•1d ago•89 comments

Show HN: XLA-based array computing framework for R

https://github.com/r-xla/anvil
15•sebffischer•4d ago•1 comments

Show HN: PipeStep – Step-through debugger for GitHub Actions workflows

https://github.com/Photobombastic/pipestep
9•photobombastic•20h ago•7 comments

Show HN: Cloud to Desktop in the Fastest Way

https://nativedesktop.com/
3•lasgawe•20h ago•5 comments

Show HN: Slop or not – can you tell AI writing from human in everyday contexts?

https://slop-or-not.space
16•eigen-vector•16h ago•17 comments

Show HN: How I topped the HuggingFace open LLM leaderboard on two gaming GPUs

https://dnhkng.github.io/posts/rys/
455•dnhkng•3d ago•115 comments

Show HN: VaultLeap – USD accounts for founders outside the US

https://vaultleap.com
5•GregReve•23h ago•2 comments

Show HN: A desktop app for managing Claude Code sessions

https://github.com/doctly/switchboard
5•kapitalx•23h ago•1 comments

Show HN: Stratum – SQL that branches and beats DuckDB on 35/46 1T benchmarks

https://datahike.io/notes/stratum-analytics-engine/
11•whilo•16h ago•3 comments

Show HN: Codelegate, keyboard-driven coding agent orchestrator GUI for Mac/Linux

https://codelegate.dev/
3•brucehsu•17h ago•0 comments

Show HN: Every Developer in the World, Ranked

https://coderank.me
9•ejc•17h ago•4 comments

Show HN: Calyx – Ghostty-Based macOS Terminal with Liquid Glass UI

https://github.com/yuuichieguchi/Calyx
26•yuu1ch13•1d ago•31 comments