LIVE ON TWITCH: / theprimeagen Get in on Discord: / discord Get in on Twitter: / theprimeagen Got Something For Me to Read or Watch??: / theprimeagenreact
Programming LinkedStack is always the first thing I do when learning a new programming language. I did it in Rust and literally had to look at a guide online in order to not rip my hair out.
.{} makes a literal that's either an array literal or struct literal. And of course in Zig strings are just arrays too. There's no varargs so functions that would be varargs in other languages take this kind of literal instead. IIRC... haven't zigged for a few months now.
What are you trying to say? Zig have generics, they are just done in adifferent way. In Zig: fn name(comptime T: type, x: T) T { } In rust: fn name(x: T) -> T { }
@@rj7250a the idea that generics are implemented through normal functions with type parameters as comptime values instead of using a dedicated generics syntax is what they're referring to and I agree, this is awesome. It reminds me a lot of how OCaml does generics, through a function called a "functor" which takes in types as arguments and returns a module
48:20 ergonomics & DX. Compiler jock behavior adding burrs to the tool handles. Piled up "features", fixes and conveniences that are just kinda pulling up the ladder behind us. Almost all language syntax & tooling suffers from more and more from incline , Douglas Crockfords got a bit about compiler jock behaviors impact on javascripts growth but I can never find it.
while (curr != null): (curr = curr.next) { do stuff;} I really want to like zig but I can't seem to get anything to work because the errors are garbage and I have to fight with the lsp.
Programming LinkedStack is always the first thing I do when learning a new programming language. I did it in Rust and literally had to look at a guide online in order to not rip my hair out.
Can you guide what problems to solve when learning a new language?
I like zig but the language server needs work. Getting compile errors but not seeing the compile errors in my IDE is super frustrating
.{} makes a literal that's either an array literal or struct literal. And of course in Zig strings are just arrays too. There's no varargs so functions that would be varargs in other languages take this kind of literal instead. IIRC... haven't zigged for a few months now.
I am learning zig with you prime. I bought the interpreter in go book and I love it Thanks man
omg function instead of generics is epic
What are you trying to say? Zig have generics, they are just done in adifferent way.
In Zig:
fn name(comptime T: type, x: T) T { }
In rust:
fn name(x: T) -> T { }
@@rj7250a the idea that generics are implemented through normal functions with type parameters as comptime values instead of using a dedicated generics syntax is what they're referring to
and I agree, this is awesome. It reminds me a lot of how OCaml does generics, through a function called a "functor" which takes in types as arguments and returns a module
48:20 ergonomics & DX. Compiler jock behavior adding burrs to the tool handles.
Piled up "features", fixes and conveniences that are just kinda pulling up the ladder behind us.
Almost all language syntax & tooling suffers from more and more from incline , Douglas Crockfords got a bit about compiler jock behaviors impact on javascripts growth but I can never find it.
prime what’s the one eyed kirby? is that regex?
is the idea of local minimum is that there is no end to it?
its a concept in ai learning
What is the name of his keyboard?
It’s a Kinesis Advantage 360.
The name, is TheKeyboardagen
while (curr != null): (curr = curr.next) { do stuff;} I really want to like zig but I can't seem to get anything to work because the errors are garbage and I have to fight with the lsp.