00:00 Intro 00:28 #run directive (runs scope of code) 02:03 #run directive (calls function) 04:12 #run directive (calls lambda) 05:06 #run lambda shorthand 05:38 Summary of #run directive 06:04 #run,stallable overview 07:15 #run,stallable is currently not documented. 07:42 #insert "" 07:53 #insert #code 08:37 Use of #insert within #expand macros 10:01 Use of #insert within #expand for_expansion 10:24 For loops are a special-case macro. 10:42 #run #insert example 14:49 .build directory 15:04 .added_strings_w2.jai file 15:44 #run #insert example continuation: integers 16:43 #run #insert example continuation: enums 19:44 #run #insert use case: DEBUG, RELEASE, OPTIMIZATION build booleans 19:58 #run #insert use case: SECRET key 20:17 #run #insert example continuation: structs 22:04 Each #insert directive creates a new section in the .added_strings_w2.jai file. 23:09 #run #insert use case: pulling data from an external API 23:16 #run #insert use case: serialization / deserialization 24:11 Wrap up
@ElMagic64
Ай бұрын
Jai looks so elegant. I love it
@XeZrunner
Жыл бұрын
Awesome! Can't wait for this language to become publicly available.
@brandonb7979
7 ай бұрын
This is sick, I hope you make more videos like this!
@adicide9070
7 ай бұрын
3 spaces??? :D How dare you!
@simonl1938
6 ай бұрын
Great video, I love how straight forward the library stuff is, I always hate fucking around with headers in c/c++. Also the 'read_entire_file' function in the 'File' import is something I always use myself in c lol. I was a bit intimidated by the #insert stuff at first but it's actually really simple and useful.
@ArkDEngal
7 ай бұрын
love jai
@ayoubelmhamdi7920
5 ай бұрын
amazing language, when we get a release of jai compiler
@ThomasMinitsios
Жыл бұрын
What happens if there are circular dependencies with stallable?
@JudahCaruso
Жыл бұрын
Circular dependencies between #run directives are caught at compile-time; regardless of if they’re stallable or not
@Lircking
7 ай бұрын
will this make compile times moon when you have too much metaprogramming? Or is it cached or something
@JudahCaruso
7 ай бұрын
All compile-time code is ran with Jai's byte code interpreter uncached (still statically checked/typed of course, so Jai's compile-time interpreter is different from something like Python or Ruby). The compiler itself is very fast, so I rarely see an increase in compile times when metaprogramming; only when parsing large files or waiting for external programs to finish executing. You can think of Jai's metaprogramming as running a separate program at compile-time, so your compile times would be linked to how long that program takes to finish executing within the bytecode interpreter. There's a bit more nuance to this, but that's the gist of things. Here's a fun demo that might explain things further: kzitem.info/news/bejne/toqnwIKro4OAn3Ysi=FDnwkfYABt7WMjyu&t=2684 Hope that answers your question!
@Lircking
7 ай бұрын
@@JudahCaruso thanks! So jai is the new python?
@JudahCaruso
7 ай бұрын
@@Lircking no problem! And not exactly. This playlist has videos that describe Jai's goals more succinctly than I could! kzitem.info/door/PLmV5I2fxaiCKfxMBrNsU1kgKJXD3PkyxO&si=1OHQsml5I6Iz5U2d
Пікірлер: 15