Log In  


Sharing this post I wrote up a few days ago for cleaning up my code and reducing token costs:

https://blog.giovanh.com/blog/2022/12/11/jinja2-as-a-pico-8-preprocessor/

In summary:

  • Constants would be a very useful language feature to have
  • Pico-8 doesn't have it and doesn't let you extend its preprocessor
  • You can roll your own and it works great
2


This is cool, thx for sharing!

It's like constexpr since you can do all kinds of stuff in jinja2 like loops and function calls.

I used to minify my stuff but ultimately removed it. Didn't like how it reduced readability so much on the bbs.



[Please log in to post a comment]