Trying Zig Part 1

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 พ.ค. 2024
  • LIVE ON TWITCH: / theprimeagen
    Become a backend engineer. Its my favorite site
    boot.dev/?promo=PRIMEYT
    This is also the best way to support me is to support yourself becoming a better backend engineer.
    Get in on Discord: / discord
    Get in on Twitter: / theprimeagen
    Got Something For Me to Read or Watch??:
    / theprimeagenreact
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 127

  • @GabeSullice
    @GabeSullice 26 วันที่ผ่านมา +109

    tar -czf = 'Compress Ze Files!'
    tar -xzf = 'eXtract Ze Files!'

    • @mgord9518
      @mgord9518 26 วันที่ผ่านมา +5

      This falls apart when you want to use other compression than gzip unfortunately

    • @pavelperina7629
      @pavelperina7629 24 วันที่ผ่านมา

      Create archive as a gZip from Files
      eXtract archive which is gZipped into Files
      i believe - is necessary only for FreeBSD tar, not GNU tar

    • @mgord9518
      @mgord9518 24 วันที่ผ่านมา

      @@pavelperina7629 Just tried it, bsd tar (at least the libarchive one) autodetects compression. So you can use a simple `tar xf [TARBALL]` with both gnu and bsd tar. Pretty sure bsd tar even works with zip, cpio and a few other archives

    • @TheoParis
      @TheoParis 22 วันที่ผ่านมา

      @@mgord9518 me when bsdtar exists

    • @Endelin
      @Endelin 17 วันที่ผ่านมา +2

      TH-cam has a button to "Translate to English" 😂😂

  • @imsidi
    @imsidi 26 วันที่ผ่านมา +113

    I have no idea what he's making, but I'm here for the vibe.

    • @po6577
      @po6577 26 วันที่ผ่านมา +8

      Yeah I am a devops and I never understand. But I still watch almost every clips haha

    • @just-nala
      @just-nala 26 วันที่ผ่านมา +3

      I am the same: I am a techie, but not on that level… I just love watching someone as gifted as he is doing what he does in such an entertaining and engaging way :-))

    • @denisblack9897
      @denisblack9897 26 วันที่ผ่านมา +1

      Same, I also like George Hotz for this same reason! Just to get a “at the office coding with my bros” vibe, helps me to make myself do something, instead of just bookmarking videos here

    • @jakewalklate6226
      @jakewalklate6226 5 วันที่ผ่านมา

      im not sure whats happenig but theres big energy here and i want to be a part of it

  • @Ellefsen97
    @Ellefsen97 26 วันที่ผ่านมา +7

    I've been loving to create things in C after learning the language. I'm absolutely in love with how Zig looks after this video. I need the part 2 asap :)

  • @gathda
    @gathda 26 วันที่ผ่านมา +88

    I'm going to wait for Zag, its successor.

    • @plaintext7288
      @plaintext7288 26 วันที่ผ่านมา +9

      Hades mentioned

    • @ericjmorey
      @ericjmorey 26 วันที่ผ่านมา +6

      You're looking to Zag when you should Zig

    • @camwhit8892
      @camwhit8892 26 วันที่ผ่านมา

      Im getting red black tree flashbacks

    • @chogerlate325
      @chogerlate325 26 วันที่ผ่านมา

      We already have Cloud though

    • @gwentarinokripperinolkjdsf683
      @gwentarinokripperinolkjdsf683 26 วันที่ผ่านมา +1

      Zag will just be zig but with C syntax instead of Zigs horrendous syntax.
      I believe C has the best syntax of any language ever except maybe lisp

  • @ciscoserrano
    @ciscoserrano 26 วันที่ผ่านมา +4

    Love this. And I am EAGERLY waiting for you to try out The Structure and Interpretation of Computer Programs book.

  • @simplemanideas4719
    @simplemanideas4719 26 วันที่ผ่านมา +9

    Didnt Primeagen mention he had done 2 weeks of learning zig, 11months ago.
    I think from that old 11 month old video i got the inspiration to do the ziglings.
    Therefore I am kind of confused?
    But anyway i am happy to listen and maybe learn something new about zig.

    • @element1111
      @element1111 26 วันที่ผ่านมา +7

      yes he did check out zig, but only at a brief glance, so this is a more involved study

  • @LukasRotermund
    @LukasRotermund 26 วันที่ผ่านมา +8

    Wow, I think I'm in love with zig... 🧡 this is just amazing

  • @arashiryuu1624
    @arashiryuu1624 26 วันที่ผ่านมา +3

    Anyone know what's allowing the cursor to take on the currently hovered/selected text's colour?
    I'm interested in whether it's a setting or something you can configure in vim/neovim, or if I'd be able to set it up in other editors.

    • @TurtleKwitty
      @TurtleKwitty 26 วันที่ผ่านมา +1

      That's just how terminals work

  • @ZenonLite
    @ZenonLite 26 วันที่ผ่านมา +9

    I’m loving these Zig videos!

  • @PaulSebastianM
    @PaulSebastianM 26 วันที่ผ่านมา +2

    The ability to think in high level abstractions is what distinguishes a good software engineer.

  • @Xemptuous
    @Xemptuous 24 วันที่ผ่านมา +1

    I'm excited to see your perspective after using Zig for a while. I have personally disliked Rust compared to Zig, felt like the linux kernel should have used Zig instead of Rust, and always hated the borrow checker, lifetimes, and overall compiler errors in Rust stoppibg me from doing stuff. Curious to hear your thoughts after using Zig for a while

  • @justgame5508
    @justgame5508 8 วันที่ผ่านมา

    I’m a .net developer and been contemplating a new langue’s for ages now. Finally started with zig and neovim (in wsl for now). Loving zig and neovim so far though. Errors as values are the best

  • @InforSpirit
    @InforSpirit 24 วันที่ผ่านมา +3

    Ghost stories are product of survivor bias and illusory correlation reinforcement.
    Nobody would repeat of story: 'I felt running kid behind and it froze my spine to solid, but next day I spoke to my friend and we concluded it's to be product of stress.' (Part of your brain knows your kid is not in home, but other part expect your kid to be at home and running. It is similar miss match between prediction and reality when you miss a step. Or you put your phone into wrong pocket than usual and cannot find it...)
    But, if you next day talk to friend and he tells you about how your house has been built onto old Indian cementary, then you have a ghost story...
    In stress Your body will make references to memory and modifies your input before you made any conclusion of situation. PTSD modifies your sensory input to be closer to worst case scenario than it is.

    • @InforSpirit
      @InforSpirit 24 วันที่ผ่านมา +1

      If you would remember all dreams when you wake up, you would not believe a ghost stories. Dreams are constantly weird and most of material has nothing to do with reality. Other part has some predictive/real reference, but it doesn't mean those predictions will have any impact (also has dangers of self-fullfilling prophecy).
      I have seen death person in dream many times, I have seen many alive person in dream, I have been many other person in dreams. I have died in dream.
      I have felt how walking trough walls feel, how individuals class pains go trough my body.
      I have been child again in school, many times.
      And then comes more bizarre stuff when you realize in dream that you are talking with yourself via memory construct of other person...
      Human brain is insane construct.

  • @gathda
    @gathda 26 วันที่ผ่านมา

    What are you using at 13:16 to autocomplete with a menu? Is that part of zsh? I've been looking and I can find it.

    • @vajsadie702
      @vajsadie702 26 วันที่ผ่านมา +4

      That's zsh's autocomplete

    • @gathda
      @gathda 26 วันที่ผ่านมา +3

      @@vajsadie702 Thanks! I will have to get started with zsh then.

  • @luanbravo4401
    @luanbravo4401 26 วันที่ผ่านมา

    TheVimeagen lives! And it's glorious

  • @jdmaze1
    @jdmaze1 11 วันที่ผ่านมา

    My goodness, your chat makes me laugh so hard sometimes.... :)

  • @ibrahimhussain3248
    @ibrahimhussain3248 26 วันที่ผ่านมา +2

    He presses enter key like says ya ya ya ya ya ya

  • @MadMatty72
    @MadMatty72 17 วันที่ผ่านมา +1

    Ghosts no, aliens in UFOs yes.

  • @TheLummen.
    @TheLummen. 26 วันที่ผ่านมา +1

    Things are getting exciting !

  • @jogurtnaturalny
    @jogurtnaturalny 26 วันที่ผ่านมา

    Flip, an extra zoom effect? Damn, did Prime give you another bred slice?

  • @EditsByShobhit
    @EditsByShobhit 26 วันที่ผ่านมา +1

    THE STREAMS ARE BACK ON THIS CHANNEL, LET'S GO

  • @haxagonusdyad8981
    @haxagonusdyad8981 23 วันที่ผ่านมา

    Hey Theprimagen I think you're so talented at entertaining that you can entertain people even when not programming. Branch out!

  • @maxoumimaro
    @maxoumimaro 25 วันที่ผ่านมา +2

    I love the basis of Zig. It is well rounded and does everything you wish a low level programming language to do.
    My problem is I still am a c++ dev and kind of want to create a Zig++ for the same reason C is great but not suited if you want to write bigger applications xD

    • @natsuzkan
      @natsuzkan 5 วันที่ผ่านมา

      Wasn't the D language kind of supposed to fill the niche of less-shitty C++?

    • @maxoumimaro
      @maxoumimaro 16 ชั่วโมงที่ผ่านมา

      @@natsuzkan to be honest, I have never looked at D nor have I heard anyone try to tell me it is something to look up

    • @natsuzkan
      @natsuzkan 11 ชั่วโมงที่ผ่านมา

      @@maxoumimaro Your comment reminded me of its existence. Before that, I hadn't thought about it in the last decade, at least. The project is apparently still active but sounds like it's been falling apart. The IRS doesn't show a 2022 or 2023 tax return for their 501(c)(3).
      edit: To be fair to them, the IRS also only shows up to 2021 for The Zig Software Foundation. I'm just saying I have no window into their finances since after their contributor/maintainer drama popped off.

  • @tuftman6092
    @tuftman6092 26 วันที่ผ่านมา +6

    I'm also getting into zig atm

  • @gwentarinokripperinolkjdsf683
    @gwentarinokripperinolkjdsf683 26 วันที่ผ่านมา

    hell yeah, I am trying to learn zig right now

  • @demarcorr
    @demarcorr 26 วันที่ผ่านมา +25

    poor man cant afford a mouse 😥 sending thoughts and prayers until you get one and use it 🙏

  • @user-lz2oh9zz4y
    @user-lz2oh9zz4y 26 วันที่ผ่านมา +1

    I'm 1 hour in and I just learned that ghosts have bank accounts

  • @eduardabramovich1216
    @eduardabramovich1216 26 วันที่ผ่านมา +2

    We are waiting for you to build something in Odin

  • @roninski6538
    @roninski6538 25 วันที่ผ่านมา

    kinda cute you have Thor's stream running in the background ngl

  • @iWillAvert
    @iWillAvert 17 วันที่ผ่านมา

    I can't speak too much on it as I've had too many issues to want to continue with using it, but that may have been a bad interaction with neovim & tmux @ 25:25.
    In my case, I was using the LazyVim flavor of neovim and any attempt to use it under tmux was INCREDIBLY slow and buggy. Situations like that were the norm for me, and has held me back from really learning tmux until I get more comfortable modifying neovim myself. I don't know if it was the package as a whole or if it was a certain plugin causing it. So far, only a vanilla install of neovim or a minimally modified version of it work for me with tmux.
    I should also note that my experience was on Arch with upper-mid range hardware from like 2016 so it may or may not be the same or a similar issue for you.

  • @jdmaze1
    @jdmaze1 10 วันที่ผ่านมา

    I feel like Rust is to Zig, as Pascal was to C. Pascal was first, but ultimately lost out to C as the systems language of choice.

  • @slightlyfaulty
    @slightlyfaulty 22 วันที่ผ่านมา +1

    TIL @ThePrimeagen uses Debian, rated the best distro by 9/10 grandmothers 👵🏻

  • @DonAlcohol
    @DonAlcohol 25 วันที่ผ่านมา

    I'm prolly way to late with this and or it will prolly never reach its target , but ive already tried doing this using a different lang. and i can already tell this wont work :) unless you really restrict it to colors but even then ... \x1b[38;2;255;255;255m just for foreground color seems a bit mutch to fit in a single byte

  • @johanavril1691
    @johanavril1691 26 วันที่ผ่านมา +3

    wait he's making compression for ascii art ? is that right ?
    anyone know why btw ?

    • @no.no.4680
      @no.no.4680 26 วันที่ผ่านมา +1

      An ASCII graphics engine. Why? I don't know. I think it's just for fun.

    • @johanavril1691
      @johanavril1691 26 วันที่ผ่านมา +1

      @@no.no.4680 ho yeah yeah but where in the engine do you need compression ? Is this a remote engine thing ?

    • @SoibaisteAc
      @SoibaisteAc 26 วันที่ผ่านมา +7

      The idea is the game engine runs on server that users can ssh into (or view in a web front end) that sends down a live view of the game to get around live stream latency. The compression is just to save on bandwidth so you aren't sending down every byte for every frame to thousands of clients.

  • @weakspirit_
    @weakspirit_ 26 วันที่ผ่านมา +3

    zigma

  • @tato-chip7612
    @tato-chip7612 25 วันที่ผ่านมา

    today we learned prime gives his wife night terrors.
    Might be mumbling about react in his sleep.

  • @alexpyattaev
    @alexpyattaev 24 วันที่ผ่านมา

    Zig broke Prime's after just 1 hour...

  • @The1RandomFool
    @The1RandomFool 26 วันที่ผ่านมา +1

    I've seen a few people try out Zig, and it seems a fair number of people in their chats don't like the syntax.

    • @ForeverZer0
      @ForeverZer0 22 วันที่ผ่านมา

      You will never please everyone with syntax. Python is a popular syntax and uses significant whitespace, proof that peoples' opinions on syntax should never be trusted.

  • @sweetbabyalaska
    @sweetbabyalaska 26 วันที่ผ่านมา

    using long flags with tar is much easier, tar --verbose --extract --file output.tar.gz or tar --create --file out.tar.gz input-files

  • @bt64u30
    @bt64u30 26 วันที่ผ่านมา

    6:36 the answer was std for static tree dynamically even rhymes...

  • @TheOnlyJura
    @TheOnlyJura 26 วันที่ผ่านมา

    Another day another hello world

  • @sporefergieboy10
    @sporefergieboy10 21 วันที่ผ่านมา +1

    Zigger pride Worldwide

  • @johnbruhling8018
    @johnbruhling8018 25 วันที่ผ่านมา

    They its your right ear that rings when its something good, idk

  • @CrazyLuke11
    @CrazyLuke11 26 วันที่ผ่านมา +2

    What color scheme is that?

    • @UwU-dx5hu
      @UwU-dx5hu 25 วันที่ผ่านมา

      Same question me

  • @tauiin
    @tauiin 26 วันที่ผ่านมา

    what happened to ocaml lmao

  • @lordeji655
    @lordeji655 26 วันที่ผ่านมา +1

    Funny man says funny words.
    And i like it.

  • @NickSandM
    @NickSandM 25 วันที่ผ่านมา

    my mans remaking video compression for ascii

  • @UwU-dx5hu
    @UwU-dx5hu 25 วันที่ผ่านมา

    He is a Software engineer

  • @UwU-dx5hu
    @UwU-dx5hu 25 วันที่ผ่านมา +1

    What color theme is he using 😮

    • @ForeverZer0
      @ForeverZer0 22 วันที่ผ่านมา

      Don't recognize it, but It looks like gruvbox and rose pine had a child.

  • @salim444
    @salim444 26 วันที่ผ่านมา

    so zig is cool now, gotta use bf for my side projects now

  • @xpmon
    @xpmon 20 วันที่ผ่านมา

    When Zig++?

  • @zsomborgyenge4359
    @zsomborgyenge4359 26 วันที่ผ่านมา

    1:07:00 I didn't believe in them until I personally experienced that they exist.

  • @MrAlanCristhian
    @MrAlanCristhian 26 วันที่ผ่านมา

    I hope he some day try c

  • @nevokrien95
    @nevokrien95 21 วันที่ผ่านมา

    Packing it would be bad they don't even pack u8 most the time.
    It would slow everything down because u can't use simd.

  • @Xkonti
    @Xkonti 26 วันที่ผ่านมา

    Nim is so much more fun!

  • @leanghok120
    @leanghok120 26 วันที่ผ่านมา +1

    Damn first time being this early

  • @bigtallpaul
    @bigtallpaul 26 วันที่ผ่านมา

    1:03:25 Ghost story time

  • @EricNantel
    @EricNantel 26 วันที่ผ่านมา +1

    Can Zig replace C++?

    • @pipboy214
      @pipboy214 26 วันที่ผ่านมา +8

      for writing hello world, yes

    • @juststudying1019
      @juststudying1019 26 วันที่ผ่านมา +3

      Man at this point nothing can replace C++ even if they invent a new perfect fastest language in the universe, C++ is everywhere.
      btw I hate c++ but it is the truth 😂😂

    • @micaelviana
      @micaelviana 26 วันที่ผ่านมา +3

      ​@juststudying1019 agree, all of these new fancy languages desire to kill C++, but C++ is already in a lot of places, is like Java, you don't kill Java

    • @sid4579
      @sid4579 26 วันที่ผ่านมา +3

      @@micaelviana we should tho, to build more maintainable faster systems. I hate these stupid languages, especially Java.

    • @juststudying1019
      @juststudying1019 26 วันที่ผ่านมา +4

      @@sid4579 that's very unrealistic though, to be honest we programmers find negative things about anything, I have been programming for 7 years now and I have never seen a programmer satisfied with the language he/she uses.
      Programming itself is hard and it feels sometimes unmaintainable.

  • @darkpikachu_.
    @darkpikachu_. 26 วันที่ผ่านมา

    what the heck is u19

    • @Ellefsen97
      @Ellefsen97 26 วันที่ผ่านมา +2

      It's an unsigned 19 bit integer. The formula for the range of numbers an integer can store is: 2^n - 1, so in the case of u19 it can hold from 0-524287 (2^19 - 1)

    • @mgord9518
      @mgord9518 25 วันที่ผ่านมา

      Zig supports arbitrary width integers, so it's a 19 bit unsigned int.
      They're really useful for things like packed bitfields.

  • @SnareGG
    @SnareGG 26 วันที่ผ่านมา

    George wwwwdwww Bush

  • @GAMINGAPOSTLEJ
    @GAMINGAPOSTLEJ 26 วันที่ผ่านมา

    weird

  • @user-cd5ft4lb9e
    @user-cd5ft4lb9e 25 วันที่ผ่านมา

    OOh Let me guess....Another programming language, Naaah

  • @sniperslayerss1356
    @sniperslayerss1356 26 วันที่ผ่านมา +1

    NO VIEWS!! FIRST

    • @jenwans3055
      @jenwans3055 26 วันที่ผ่านมา

      Bro fell off

    • @micaelviana
      @micaelviana 26 วันที่ผ่านมา

      No views? Washed

  • @tubeincompetence
    @tubeincompetence 26 วันที่ผ่านมา

    Tells people they are wrong about "being religious", then gets it wrong.. :)
    Well, it's up to you what you mean with the word I guess, but mostly it's understood to be related to religion, and dictionaries support this interpretation.

  • @m4rt_
    @m4rt_ 26 วันที่ผ่านมา

    jai is better

    • @PaulSebastianM
      @PaulSebastianM 26 วันที่ผ่านมา +1

      Very profound.

    • @Tezla0
      @Tezla0 26 วันที่ผ่านมา +2

      Jai is a non-existent language. It can't be better

    • @mgord9518
      @mgord9518 25 วันที่ผ่านมา

      Has the compiler even been released yet?

  • @ImranSheikh-kg4qd
    @ImranSheikh-kg4qd 22 วันที่ผ่านมา

    Zig is the worst language i have ever seen

    • @natsuzkan
      @natsuzkan 5 วันที่ผ่านมา

      You haven't seen enough languages

  • @IvanStamenkovicSeemsIndie
    @IvanStamenkovicSeemsIndie 26 วันที่ผ่านมา +1

    dude stop wasting time, just use asdf to install stuff....

  • @keithjohnson6510
    @keithjohnson6510 26 วันที่ผ่านมา +5

    Prime = Face of Rust --->> Prime = Face of Zig/Go/Ocaml/Odin..... :), me thinks the Rust community has lost it's greatest ambassador..

    • @KushLemon
      @KushLemon 26 วันที่ผ่านมา

      You're grossly out of touch.

    • @smoked-old-fashioned-hh7lo
      @smoked-old-fashioned-hh7lo 23 วันที่ผ่านมา

      he's a web developer, that's what web developers do. in 2 years he will denounce go and zig for something else. i'm predicting elixir, and he will also declare that types are too complex and slow development speed. it's in their nature.

    • @1apostoli
      @1apostoli 6 วันที่ผ่านมา

      @@smoked-old-fashioned-hh7lohe is not a web developer??

    • @smoked-old-fashioned-hh7lo
      @smoked-old-fashioned-hh7lo 6 วันที่ผ่านมา

      @@1apostolithat's what he did at netflix