Zig Data Structure Katas

Поделиться
HTML-код
  • Опубликовано: 15 сен 2024
  • LIVE ON TWITCH: / theprimeagen
    Get in on Discord: / discord
    Get in on Twitter: / theprimeagen
    Got Something For Me to Read or Watch??:
    / theprimeagenreact

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

  • @ninjapenguin120
    @ninjapenguin120 Год назад +8

    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.

    • @shakeib98
      @shakeib98 6 месяцев назад

      Can you guide what problems to solve when learning a new language?

  • @duke605
    @duke605 5 месяцев назад +2

    I like zig but the language server needs work. Getting compile errors but not seeing the compile errors in my IDE is super frustrating

  • @andrewdunbar828
    @andrewdunbar828 Год назад +5

    .{} 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.

  • @TechBuddy_
    @TechBuddy_ Год назад +2

    I am learning zig with you prime. I bought the interpreter in go book and I love it Thanks man

  • @yes-vy6bn
    @yes-vy6bn Год назад +11

    omg function instead of generics is epic

    • @rj7250a
      @rj7250a Год назад +2

      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 { }

    • @origamitraveler7425
      @origamitraveler7425 Год назад +13

      @@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

  • @TheNewton
    @TheNewton Год назад

    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.

  • @s8x.
    @s8x. Год назад

    prime what’s the one eyed kirby? is that regex?

  • @z-aru
    @z-aru Год назад

    is the idea of local minimum is that there is no end to it?

    • @Z3r0XoL
      @Z3r0XoL 5 месяцев назад

      its a concept in ai learning

  • @DiogoGDF
    @DiogoGDF Год назад +2

    What is the name of his keyboard?

    • @adameury60
      @adameury60 Год назад +5

      It’s a Kinesis Advantage 360.

    • @excelfan85
      @excelfan85 Год назад +36

      The name, is TheKeyboardagen

  • @adammontgomery7980
    @adammontgomery7980 4 месяца назад +1

    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.