Learning Zig | Day 1

Поделиться
HTML-код
  • Опубликовано: 4 сен 2024
  • LIVE ON TWITCH: / theprimeagen
    Get in on Discord: / discord
    Get in on Twitter: / theprimeagen

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

  • @Endelin
    @Endelin Год назад +64

    Ziglings start at 33:00

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

    1:41:43 The expression:
    > try x
    is short for:
    > x catch |errval| return errval
    which itself is short for:
    > if (x) |value| value else |errval| return errval
    So if you actually have something distinct you want to do in both cases, just use the longest form:
    > if (...parseInt...) |weight| {
    > ...add to sum...
    > } else |errval| {
    > ...check max and reset sum...
    > }
    Though since you don't use errval you can use the "I don't care" capture:
    > ...
    > } else |_| {
    > ...
    > }

  • @tepumasutasauno8671
    @tepumasutasauno8671 Год назад +7

    "it this the... is that the... is that like the "what the f**k" operator? what is that?" -- Primagen

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

    The built-in zig plugin is what causes errors to be displayed in the location list

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

    lol man youve covered everything. started learning C as a fun way to learn how many works in C# but was curious about zig

  • @pigmalion3433
    @pigmalion3433 Год назад +4

    Awesome gimp skills.

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

    Tom is a genius

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

    The toilet thing scares me I still haven't gotten over finding out that some of my friends scrunch instead of fold. I don't know if it matters but it feels like it does for some reason.
    In addition: I came here to learn zig now I'm trying to work out where I would draw the line in ways to learn things quickly and I'm somewhat confused now (that would have to be painful right).

  • @honeybadger5038
    @honeybadger5038 10 месяцев назад +1

    Does anyone know when Zig is planning to stop making breaking changes? I like the language but I want at least a stable version.

  • @NickWindham
    @NickWindham Год назад +19

    Bro, how are you already starting to learn Zig. You didn’t fully dive into Rust until less than a year ago. I know that a lot of skills are transferable between programming languages but it’s still impressive you’re able ti get good at a complex low level programming language that fast.

    • @TheVimeagen
      @TheVimeagen  Год назад +7

      I think zig is going to be fun. I'm pretty excited

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

      @@TheVimeagen zig is awesome! Had some great fun making my two videos the last week.
      It feels like C but nicer.

  • @minecraftermad
    @minecraftermad Год назад +1

    is it possible to upload the newest stream faster? missing the zig streams everytime is starting to be painful :/

  • @sub-harmonik
    @sub-harmonik Год назад +2

    the rumor that hans niemann used vibrating anal beads came from a joke a twitch chatter on the chessbrah channel made, and then eric hansen commented on it. It was always a meme and then the media picked it up like it was a serious allegation lol.

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

    I remember this stream, it was great

  • @griffitaj
    @griffitaj Год назад +6

    The Zigeagen!

    • @henryrussell7392
      @henryrussell7392 Год назад +3

      Haha, any idea what vimeagen means? He uses vim? But what is eagen

    • @AndreiTache
      @AndreiTache Год назад +3

      He combined his name, ThePrimeagen, with vim

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

    ziglings is designed to teach you to read and use the debugger from zig, not really the language is what I got from this video.

  • @puspo-in
    @puspo-in Год назад

    zig is great

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

    If i saw this earlier , i wouldve bought you Super Duper (assuming you were going to Los Gatos)

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

      oh i went to los gatos!
      going back again soon

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

    I am convinced you can't wipe properly while standing. Easily proven: Try wiping clean while standing first, then sit and wipe again.

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

    No jokes about Sieg... *banned by YT*

  • @firesoul453
    @firesoul453 Год назад +3

    One reason to consider Odin over Zig is that Zig is expected to make breaking changes where Oding is stable and used in production.

    • @gittawat6986
      @gittawat6986 Год назад +3

      Andrew: "pls don't use zig in production"
      Some programmers at Uber:"heck it why not" 😂😂
      There is probably less breaking change after reaching 1.0 (2025 probably)

    • @firesoul453
      @firesoul453 Год назад +1

      @@gittawat6986 Right. Once 1.0 is out it's going to be a very compelling choice.

    • @109Rage
      @109Rage Год назад +2

      @@gittawat6986 To be fair, Uber isn't using Zig the language very much, and is instead using the Zig toolchain, and the work they've put in to package clang (the C/C++ compiler) into a self-contained cross-compiler, and those parts are fairly stable and not expected to have breaking changes.

    • @pietraderdetective8953
      @pietraderdetective8953 9 месяцев назад

      ​@@gittawat6986may I know where you got the 2025 as the stable release milestone?
      I'd love to go back to Zig if it has reached 1.0 not before..currently too many breaking changes.

    • @gittawat6986
      @gittawat6986 9 месяцев назад

      @@pietraderdetective8953 this: ruclips.net/video/AqDdWEiSwMM/видео.html - Zig Roadmap 2023 - Andrew Kelley

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

    $(pwd) instead of just $PWD 😩

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

    Zig is great 🫰