That's right. Type's only. Someone implemented Conway's game of life in TypeScript types. Here's the code: [ Ссылка ]
00:00 Conway's game of life
00:49 introductions
02:28 how this project started
03:55 TypeScript types are a mini functional programming language
04:28 overview of the codebase
09:36 validating a valid index
14:14 debugging code like this
16:33 why there are not better types debugging tools
17:19 a recap
18:53 the rationale for a stateless design
20:16 the `Evolve` function
22:32 how `EvolveRow` works
26:18 how `CellState` works
29:00 handling `Add1` and `Sub1
32:53 how `CountTrue` works
34:50 wrapping up
36:49 plans for where to take this next
37:40 tail call recursion is important
Roy (RuyiLi) is a third-year Computer Science student at the University of Waterloo. He has been messing around with computers since he was 16 years old, and has over 100 projects and 5 internships under his belt. He also has two adorable beagles.
-------
MiTS Discord: [ Ссылка ]
Twitter: [ Ссылка ]
Mastodon: [ Ссылка ]
Threads: [ Ссылка ]
Instagram: [ Ссылка ]
TikTok: [ Ссылка ]
![](https://i.ytimg.com/vi/nJlgCdsZWqo/maxresdefault.jpg)