My question would have been, why is the IR flat. That intuitively seems harder to optimize and work with, to me. - I know Kotlin uses tree IR, and that just makes sense to me. (tree IR is quite different from AST, of course)
There was a talk from the Go team where they mentioned about supporting exotic architectures. Any one who wanted to implemented a new target GOOS, GOARCH, they could implement that translation layer GOASM -> machine code and bam! support for a new target. And according to them, the translation layer is simple.
The problem with Zig is documentation. I can see that goes for the code as well...this needs to get way better. Maybe the Foundation can hire someone to write documentation?
Honestly, it hasn't been much trouble for me. Once you understand the syntax and are aware of the conventions (which there aren't too many anyways), the code becomes its own documentation. Which I imagine is part of the objective of Zig.
There is no need for that. If your compiler has AST nodes that it understands, it can implement their behavior as C++ functions and then modify the AST with the results
@@darkfllame If I recall correctly, Andrew mentioned that first compiler converts the source code to untyped IR. Then at some later stage untyped IR is converted to typed IR. I was wondering why not directly start with typed IR as the code author already declares the variable types. As you can tell I'm a compiler noob. If this is something obvious please let me know I'll do more research
I think Andrew was just referring to the comptime approach that they implemented. I'm not certain that what he described here still holds true today though. The video here is almost 4 years old, back when Zig was at 0.6.0.
Held my curiosity for a while, but the technical issues made it unbearable to watch. All the flickering, and Andrew talking about code that's not loaded on the screen yet... quite a mess. From Andrew's other talks, I can tell that he's a great speaker, but for this video in particular, it's getting a thumbs down from me. Would love to see a re-take though.
You're probably not missing anything, it's still not all that mature. It's an interesting language and I'm playing with it, and I think it has a brighter future -- but if you want to solve an actual problem right now today, there are other languages that are good enough and which have much better library support. For systems and embedded you're probably making smaller programs and so the lack of libraries is less of a problem, but you'll still get up and running faster with existing frameworks in C/C++ or even Rust, so if you're being paid to do the work you might choose one of those.
Would love a compiler summary update "state of the art" in 2024
Recursion considered harmful. Great talk!
Relationship breakups considered helpful.
My question would have been, why is the IR flat. That intuitively seems harder to optimize and work with, to me. - I know Kotlin uses tree IR, and that just makes sense to me.
(tree IR is quite different from AST, of course)
There was a talk from the Go team where they mentioned about supporting exotic architectures. Any one who wanted to implemented a new target GOOS, GOARCH, they could implement that translation layer GOASM -> machine code and bam! support for a new target. And according to them, the translation layer is simple.
The problem with Zig is documentation. I can see that goes for the code as well...this needs to get way better. Maybe the Foundation can hire someone to write documentation?
Honestly, it hasn't been much trouble for me. Once you understand the syntax and are aware of the conventions (which there aren't too many anyways), the code becomes its own documentation. Which I imagine is part of the objective of Zig.
AFAIK, Documentation will be a focus post 1.0. Doesn’t make so much sense to document while things rapidly churn.
the only doc i need is with the build system, that's all, everything else is pretty straight forward
Whatever on the bottom left is, it's keeping my focus on like subway surfers. Amazing talk!
I heard that Zig can call functions at compile time. How is this done? Is the IR stepped through like a bytecode?
There is no need for that. If your compiler has AST nodes that it understands, it can implement their behavior as C++ functions and then modify the AST with the results
@@DF-ss5ep essentially interpreted at compile time right?
What software are you using for this kind of streams?
OBS, Discord, laplace.madeby.monster/
What is the difference between un-typed and typed Zig IR?
duh, typing 💀the untyped zig IR does not generate errors with types
@@darkfllame If I recall correctly, Andrew mentioned that first compiler converts the source code to untyped IR. Then at some later stage untyped IR is converted to typed IR. I was wondering why not directly start with typed IR as the code author already declares the variable types.
As you can tell I'm a compiler noob. If this is something obvious please let me know I'll do more research
I think Andrew was just referring to the comptime approach that they implemented. I'm not certain that what he described here still holds true today though. The video here is almost 4 years old, back when Zig was at 0.6.0.
What is the licence of this language?
MIT
Held my curiosity for a while, but the technical issues made it unbearable to watch.
All the flickering, and Andrew talking about code that's not loaded on the screen yet... quite a mess.
From Andrew's other talks, I can tell that he's a great speaker, but for this video in particular, it's getting a thumbs down from me. Would love to see a re-take though.
why would I use this? I don’t see the point.
Systems and embedded programming.
You're probably not missing anything, it's still not all that mature. It's an interesting language and I'm playing with it, and I think it has a brighter future -- but if you want to solve an actual problem right now today, there are other languages that are good enough and which have much better library support.
For systems and embedded you're probably making smaller programs and so the lack of libraries is less of a problem, but you'll still get up and running faster with existing frameworks in C/C++ or even Rust, so if you're being paid to do the work you might choose one of those.
Can you compile zig compiler to compile darknet with cuda
You know that something is dead when it has 18 comments on CZcams in three years. ;-)
Zig is new and just beginning to pick up steam.
@@megamaser Dude, the video is from three years ago. I will give you attention, anyway. :-)
Yeah and? 3 years is nothing in the lifecycle of a programming language.
@@megamaser True. Cobol is still around. I didn't care about it, either. :-)
Trolls be trollin