John Carmack's keynote at Quakecon 2013 part 4
Kostiantyn Kostin5 HN recommenders · recommended in 5 months, 2013–2025
talk · intermediate · evergreen · 2013–2025 on HN
Part 4 of John Carmack's QuakeCon 2013 keynote, covering OpenGL, functional programming, Haskell, Lisp and Scheme, typing, multithreading, events and garbage collection.
Cited again and again as Carmack's key public statement on functional programming and purity in game development, plus his remarks on garbage collection.
Up next
7 mo on HNZig: A programming language designed for robustness, optimality, and clarity – Andrew Kelley
Recurse Center
6 HN recommender · 2018–2024
7 mo on HNThe Future of Mathematics?
Microsoft Research
9 HN recommender · 2019–2025
9 mo on HNWhy Being Delusional is a Superpower
Veritasium
9 HN recommender · 2020–2024
13 mo on HNJim Simons (full length interview) - Numberphile
Numberphile2
11 HN recommender · 2015–2024
11 mo on HNSteve Jobs Stanford Commencement Speech 2005
JoshuaG
13 HN recommender · 2007–2015
11 mo on HNAlan Kay - Normal Considered Harmful
powerfuloutlet
10 HN recommender · 2012–2026
10 mo on HNGrowing a Language, by Guy Steele
Bill Pugh
11 HN recommender · 2014–2026
10 mo on HNA Philosophy of Software Design | John Ousterhout | Talks at Google
Talks at Google
11 HN recommender · 2018–2026
10 mo on HN"Uncle" Bob Martin - "The Future of Programming"
Paul Stringer's Mobile Tech
10 HN recommender · 2016–2022
10 mo on HNVCF East: Ken Thompson interviewed by Brian Kernighan
Vintage Computer Federation
11 HN recommender · 2019–2025
10 mo on HNHamming, "You and Your Research" (June 6, 1995)
securitylectures
11 HN recommender · 2012–2023
8 mo on HNTech Talk: Linus Torvalds on git
Google
9 HN recommender · 2007–2023
12 comments from Hacker News
I think it is, and if you don't want to take my word for it, John Carmack thinks the same :) There's an old video [0] where he talks in-depth about his explorations of functional programming. It's perhaps a bit more about Haskell than about SICP, but in it he's also quite enthusiastic about what a veteran programmer can still learn from this book. [0] ▶ this video
Excellent read, I still remember a lot of it. There is also the accompanying Quakecon presentation where John Carmack talks at length about all this: ▶ this video
What you describe above is similar to what Carmack discussed at his QuakeCon keynote several years back when toying with a game engine on Haskell. Very interesting talk, ▶ this video
The use of monads is a side-effect (ha!) of committing to purity throughout a language, and that's what FP is being equated to: pure statically-typed FP. (You can argue about how justified that is, of course. I'm not going into that, but you might want to see what John Carmack has to say[0]. No, he doesn't end by saying "we should all convert to the church of Haskell now", but he does talk about how large-scale game programming refactors are made easier when you're working with no (or very disciplined) side effects.) Monads are not the only way to deal with effects while keeping purity, although they were the first discovered and so on: algebraic effect systems as in Koka[1] (and as simulated in Idris or PureScript) are another alternative. Koka infers effects, so it's probably easier for a C-family programmer to pick up (I know little about it, though). [0]: ▶ this video [1]: link
Raymond Hettinger's talk about good code reviews -- link Carmack's talk about functional programming and Haskell -- ▶ this video Jack Diederich's "Stop Writing Classes" -- link All with a good sense of humor.
> In practice programmers tend to avoid writing the kind of program where anything can happen. My faith in this presumption dwindles every year. I expect AI to only exacerbate the problem. Since we are on the topic of Carmack, "everything that is syntactically legal that the compiler will accept will eventually wind up in your codebase." [0] [0] ▶ this video
> Lack of safety is a feature in game development, Bullshit. How many games have had releases delayed and major wrenches thrown into marketing plans because of progress ruining heisenbugs? How many failed certification passes from banal data races and other undefined behavior? We trap UI in actionscript or javascript, and gameplay programmers in other scripting languages - perhaps python or lua - for faster iteration times, hot reloading, and safety . Because it's difficult enough to keep the build stable when it's merely all the engine programmers who should know better screwing things up with C++. This results in large messes of poorly performing, poorly optimized, garbage-collector laden code that Rust would handle much faster. We're leaving lots of performance on the table, often for little other purpouse than "safety". Console first day patches may have taken off some of the pressure for getting the first release right, but handhelds aren't always online and still have a pretty high bar. > the optimizations required are typically unorthodox Rust's `unsafe` keyword and intrinsics let you do all the unaligned intrinsic-laden data-racey technically-undefined-behavior micro-optimizations you might want to do in C++ in Rust just fine. It'll hopefully trigger a more stringent code review and force you to justify your pile of bugs, but that's a good thing. Or you can skip the code review if your entire company really disagrees. > a super strict language slows development down C
Reasoning about code requires reasoning about relevant state. On the one extreme, you have pure functional programming, where all state is passed in and returned out - all relevant state is explicit and "obvious". On the other extreme, you might use global state for everything - relevant state requires diving into all your code. This sounds unthinkable in the modern era, but similar styles aren't entirely uncommon in sufficiently old codebases with codebases that didn't really bother to use the stack. This is part of the reason why memory corruption bugs can be so insidious in large codebases - if anything in your codebase could've corrupted that bit of memory, and your codebase is millions of lines of code, you have a large haystack to find your bugs in, and your struggle will be to narrow down the relevant code to figure out where the bug actually is. This isn't hypothetical - I've had system UI switch to Chinese because of a use-after-free bug relating to gamepad use in other people's code, for example. (EDIT: Just to be clear - globals don't particularly exacerbate memory corruption issues, I'm just drawing some parallels between the difficulty in reasoning about global state and the difficulty in debugging memory corruption bugs.) > Game development John Carmack on the subject, praising nice and self contained functional code and at some point mentioning some of the horrible global flag driven messes that have caused problems in their codebase, mirroring my own experienc
I have no idea about how Doom Eternal does it, but John Carmack has some ideas on how to parallelize game engines here: ▶ this video
▶ this video was Carmack's presentation on an immutable Haskell game engine. Unfortunately, he doesn't go into too much detail. link was the previous HN thread about it.
According to John Carmack, the acclaimed expert in the field of game programming, "Functional Programming is the Future" - ▶ this video
John Carmack has mentioned that he uses a visual Lisp environment on iPad. Scheme-based, iirc. It's somewhere in here, I think (but alas I'm not up to listening again through half an hour of the old lady voice): ▶ this video I feel like marrying Lisp's meta-programmable DSLs to an easy visual environment is the ultimate cosmic dream of 'domain-centered' programming and customization for non-coders―but it also seems to me that Lisp is rather text-based, trading a readymade set of operations picked in the interface for infinite extendability through text. So I'm not sure if a visual Lisp is any convenient to use. Also, for me the immediate downside of the Lisp environment in question is that it's only available for iPad.