5 ms·
In lisp it's much easier to do, just write normal tetris and call it at compile-time via macro.
by avodonosov 11y ago
In lisp it's much easier to do, just write normal tetris and call it at compile-time via macro.
- paulasmuth 11y agoPics or it didn't happen ;) /jk On a serious note: modern C++ does have const expression functions, too, albeit not as powerful (yet): http://www.cprogramming.com/c++11/c++11-compile-time-processing-with-constexpr.html http://www.cprogramming.com/c++11/c++11-compile-time-process...
- TeMPOraL 11y agoNo need for pics, it's the thing about Lisps that you can run arbitrary code during compilation. The distinction between compile-time and runtime is pretty blurred, especially that Lisp programs tend to ship with the compiler in the image, which means you can compile new stuff at runtime.
- paulasmuth 11y agoI realize that. I was joking [more like trying to, it seems] about the fact that parent commented on a technically amazing post with "I could have done this too in X" without providing any further insight, let alone a link to the completed project in X.
- TeMPOraL 11y agoFair enough :). Though I interpret that parent comment not as bragging, but as making a joke that in Lisp you write the program as you would normally, and then just make it run in compile-time :).