Skip to Main Content
Talk Intermediate Course materials: CC BY-NC-SA 4.0 (per NPTEL faculty guidelines). Code: ISC.

Textbooks that run: interactive, zero-install CS education in the browser

Proposal status is Approved
Session Description

One of the biggest obstacles a beginner faces with a programming language, especially one outside the mainstream, is the install: toolchains, package managers, editor setup, and version skew that derail a learner before they write a line of code.

This talk is about a course book that removes that barrier. For NPTEL's "Functional Programming with OCaml" MOOC (twelve modules, taught to students across India), the book is a fully client-side, zero-install website: every example runs in the reader's browser, with nothing installed and no server behind it. It scales from a first "hello, world" to OxCaml (a cutting-edge OCaml extension for performance and safety) and a full Linux VM, dev tools and all, that boots in the browser tab to explore memory-safety issues and build unikernels.

The book reads like a notebook, and a single markdown source produces all three views: the page, a reveal.js slide deck, and the runnable cells, so the slides cannot drift from the prose. Quizzes are built into the same format: multiple-choice with explanations, and code-completion challenges whose hidden tests run in the browser. Following the Brown PLT group's quiz study of the Rust Book (Crichton and Krishnamurthi, OOPSLA 2024), the quizzes record anonymous responses that show where readers get stuck, enabling targeted edits to be measured.

Under the hood, it is FOSS end-to-end: the OCaml toolchain compiled to JavaScript with js_of_ocaml, the x-ocaml WebComponent for the cells, and a client-side Linux VM. I will share some engineering lessons, including shrinking the OxCaml bundle from 285 MB to 4 MB so it could be hosted at all (GitHub rejects files over 100 MB), and the trade-offs of running a toolchain in a browser sandbox.

The book was drafted from existing lecture material with heavy LLM assistance under careful pedagogical review, and I will give an honest account of where AI helped and where it failed. What keeps it trustworthy: every code snippet is machine-checked by mdx, OCaml's documentation-testing tool, which compiles each example and verifies its output, so a broken or hallucinated snippet fails the build instead of reaching a student.

None of this is specific to OCaml. Any educator can build interactive, zero-install material on a FOSS stack, and the entire book and its toolchain are open.

Key Takeaways
  • Why "zero install, runs in the browser" is the right default for teaching programming, and the accessibility case for students on constrained machines and networks.

  • The FOSS stack that makes it work: js_of_ocaml, the x-ocaml WebComponent, and a client-side Linux VM, with no server.

  • Engineering lessons from shipping a full language toolchain as a static site, including a 285 MB to 4 MB bundle diet to clear GitHub's 100 MB file limit.

  • One markdown source for the page, the slides, and interactive quizzes, plus a quiz-analytics loop (after the Brown study of the Rust Book) that targets improvements.

  • LLM-assisted authoring under human review, with every code snippet machine-checked by mdx: what worked, what did not.

References

Session Categories

Story of a FOSS project - from inception to growth
Technology architecture
Talk License: Course materials: CC BY-NC-SA 4.0 (per NPTEL faculty guidelines). Code: ISC.

Which track are you applying for?

Main track

Speakers

KC Sivaramakrishnan Professor / CTO | IIT Madras / Tarides

KC Sivaramakrishnan is an Assistant Professor of Computer Science at IIT Madras and CTO of Tarides. He is interested in building robust, secure, and scalable systems using programming-language technology. At IIT Madras, he leads FP Launchpad, a centre for functional systems research and education. He is a maintainer of the OCaml programming language, enjoys proof-oriented programming, and is interested in studying how humans can direct agents to write correct and efficient programs.

KC Sivaramakrishnan
https://x.com/kc_srk