Modern Metaprogramming for Game Development

Поделиться
HTML-код
  • Опубликовано: 13 янв 2025

Комментарии • 9

  • @letheward6
    @letheward6 14 часов назад +5

    Imagine thinking "modern metaprogramming" is lispy macros and whatnot, while the JAI compiler ran *graphical games* at compile time 10 years ago.

  • @MrAlanCristhian
    @MrAlanCristhian 15 часов назад

    Is not jay metaprogramming just the same as GNU M4 macro processor?

  • @Kapendev
    @Kapendev 18 часов назад +6

    Imagine thinking that Jai invented modern metaprogramming.

    • @krux02
      @krux02 15 часов назад

      Technically, Nim had it first. Nim has what I think casey means with recursive metaprogramming. Meaning you can hacros macros that gerate more macros that then generate more macros etc. For the price that Nim's top level statements are not order independent. You need to define something before you can use it, like in C and C++. No header files though, modules solve that problem.

    • @u9vata
      @u9vata 13 часов назад +1

      @@krux02 I think moern forth-likes for example stuff like "factor" had pretty awsome metaprogramming much earlier than both Nim and Jai. But they had the heritage of FORTH and very limited reach outside of concatenative style language enjoyer community.
      So it is probably out of question that Jai was inspired in any way of form by that, but I still consider those forerunners and those are stuff that I base my langs metaprogramming on for example often times.... I am okay with saying JAI made it next level in that sense that people started realizing real potential.

    • @krux02
      @krux02 9 часов назад +1

      @ I can't say much about Forth, as I just read about it, never used it. The real forerunner in metaprogramming is undeniably lisp. But it has the problem that everything runs in this abstract and non performany virtual machine that doesn't map really well to what the machine does. Nim is different that it has C style structs that are behaviour emulated when used at compile time.

    • @u9vata
      @u9vata 9 часов назад

      @@krux02 FORTH is usually not known. But it canbe implemented pretty performant - lets say compared to LISP. Also the compiler / interpreter is as minimalistic as possible and is very easy to write a few lines of machine code or asm to have it running and from that on, you can compile a more capable FORTH easily. That is it is probably the easiest to bootstrap so still used in very weird microcontrollers or space probes first language...
      When compiled, early forth codes were translated to "threaded code", which was a technique to easily have much better performance than that of lisp-likes.
      When I was a kid, we had and enterprise 128. It had of course BASIC and machine code... I read it had pascal and C compilers - but FORTH was actually faster on it than pascal and basically as good in test as its C compilers at the time. But it was already considered very esoteric to use forth - albeit when you "get it" then it becomes very simple very fast.
      I also used to advise the book "thinking forth" for all kinds of programmers - even those who never want to touch forth in their life... I mean... that book is a hidden gem of CS literature actually with many great ideas.

    • @Muskar2
      @Muskar2 14 минут назад

      I have no vested interest in either outcome, and don't know the language landscape enough to have any idea. Which languages do you believe invented modern metaprogramming? And are you aware of what Jai's metaprogramming can do?