
Compile Time C++ Snake Game (2016) - adamnemecek
https://github.com/mattbierner/STT-C-Compile-Time-Snake
======
gsaga
... and I was feeling smart because I implemented compile time float
calculations...

------
atesti
Sounds like what Jonathan Blow demoed in his new programming language JAI:
[https://youtu.be/UTqZNujQOlA?t=2024](https://youtu.be/UTqZNujQOlA?t=2024)
Execute a invaders game with OpenGl while compiling and embedding the score in
the code (Just a demo, the idea is to replace makefiles with compile time
execution, etc.)

------
adamnemecek
C++ templates are so overpowered. It has dependent types by accident.

~~~
earenndil
Honestly I wouldn't say overpowered so much as poorly designed. I don't think
there's anything wrong with having a way to perform arbitrarily complex
operations at compile time; in fact, ante[1] (and others) even have this as a
selling point. The problem comes when you don't mean for this to happen and
you're just trying to implement type erasure.

1: [https://github.com/jfecher/ante](https://github.com/jfecher/ante)

~~~
pietroglyph
Ante is super cool! I think the following passage neatly encapsulates the
power of (thoughtful) compile-time extensiblity:

> "Ante provides several different methods of memory management, including
> manual management. Don’t want to bother with any of it? Simply 'import GC'
> to use a garbage collector."

~~~
earenndil
Do note that most of the language as specified isn't yet implemented yet.
There's no GC nor is there (afaik) any form of memory management beyond
malloc/free. Also pattern matching isn't there yet. However, development seems
to be reasonably active so I'm sure those are in the pipeline.

------
abenedic
So, this is old, but pretty cool. I really like his VR experiments though.

------
zilchers
And I thought I got bored at work...

