Live coding a ray tracer in OCaml. Part 1: project setup and the first image

Опубликовано: 29 Март 2026
на канале: Artem Pianykh
6,262
236

Live coding "Ray Tracing in One Weekend" but using OCaml instead of C++. This is part 1 where I setup the project with dune and inline tests + ppx_expect; define some basic data types and write code to output the first image.

Ray Tracing in One Weekend: https://raytracing.github.io/books/Ra...

00:00 - Intro
00:38 - Plan
01:17 - Project setup
04:02 - Images and PPM format
05:02 - Setting up expect tests
07:47 - Pixels and images
09:16 - Encoding colors
14:43 - Fleshing out the Image module
19:20 - Testing the Image
22:11 - Producing a sample image
23:56 - main
26:54 - First image
30:13 - Interactivity and the feedback loop
31:13 - Outro