Intro to the Zig Programming Language • Andrew Kelley • GOTO 2022

Поделиться
HTML-код
  • Опубликовано: 21 ноя 2024

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

  • @GOTO-
    @GOTO-  3 дня назад

    Looking for books & other references mentioned in this video?
    Check out the video description for all the links!
    Want early access to videos & exclusive perks?
    Join our channel membership today: ruclips.net/channel/UCs_tLP3AiwYKwdUHpltJPuAjoin
    Question for you: What’s your biggest takeaway from this video? Let us know in the comments! ⬇

  • @Vim_Tim
    @Vim_Tim Год назад +93

    12:38 I needed a C compiler on Windows for a Neovim plugin. The Zig compiler was, by far, the easiest way to get a C compiler compared to Mingw, Clang, MSVC, or GCC. Awesome stuff!

    • @ZombieLincoln666
      @ZombieLincoln666 7 месяцев назад +6

      Huh that’s interesting. I’m gonna have to try this because I’m not very happy with my current windows c compiler (I think mingw)

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

      Mingw wasn't too bad but everything didn't "just work" and that's never a good thing. At the end of the day, though, simply setting environment variables isn't a big ask.

    • @jazzochannel
      @jazzochannel Месяц назад

      bruh.. should have went with MSYS2. is so simperu! u just have to start it and `pacman -S mingw-w64-ucrt-x86_64-gcc` i use arch btw

  • @kcm624
    @kcm624 9 месяцев назад +31

    Blown away by that example of the Zstandard library which had multiple makefiles while all that was needed was to pass a list of filenames to the compiler 😮

  • @PaulSebastianM
    @PaulSebastianM Год назад +93

    I can't believe how much the low level tooling and infrastructure for programming languages has improved. It's astounding! Makes me absolutely love open source even more than I did before because this makes low level more accessible to more developers.

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

      open source rules the world.

    • @jazzochannel
      @jazzochannel Месяц назад

      butt can you gett to the lowestt levels with open sauce?

  • @coolbrotherf127
    @coolbrotherf127 Год назад +114

    I tried it out the other day and I thought it was really cool. I just messed around with it and converted some of my C programs into Zig code and it was really easy to pick up and ran with great performance. The drop in c++ compiler is so useful. I never had a convenient way to compile for MacOS before, very helpful stuff.

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

      I never knew i could get a c compiler for less than 100mb iam probably dumb cuz i thought the only way to compile c is using msvc cuz gcc on windows isn't great

  • @fburton8
    @fburton8 Год назад +70

    I was secretly surprised when he said “that’s all I’ve got for you”.

  • @yash1152
    @yash1152 8 месяцев назад +6

    9:01 GCC: stuck in past; stupid defaults; zig: optimizations by default
    16:58 to interop; export C ABI using extern via wrapper functions
    36:51 Reflections
    39:31 Unit Testing (mem-leak eg)
    42:12 contexts (void*, but better)
    44:13 C integration
    DSA parts:
    34:43 ArrayList
    37:34 AutoArrayHashMap (ordered dicts)
    39:59 MultiArrayList
    40:36 Struct of Arrays

  • @artemhrytsaienko3063
    @artemhrytsaienko3063 Год назад +45

    this talk from Andrew is a gem, thanks GOTO for sharing!

  • @hi_arav
    @hi_arav Год назад +58

    I remember when Andrew presented out Recourse. Now he presented at GOTO. Wow, Zig has come far. Congrats to everyone involved in the project, and thank you to each sponsor.
    e: fwiw, I saw the Recourse video on RUclips :) it's still worth a watch

  • @DouglasDickinson
    @DouglasDickinson Год назад +14

    He sailed right through it in the talk, but what amazed me was that the optimizer in the Zig + C array_sum example applied one optimization across the language boundary, ...and back again!!
    🤯
    BRB, going to try Zig!

    • @absurdengineering
      @absurdengineering 3 месяца назад

      @@DouglasDickinson LTO / LTCG gives you that. The language front-ends produce a common intermediate language representation. Global optimizations are applied when all this IL form is available and being linked together. Once optimized, machine code generation happens.

  • @Whatthetrash
    @Whatthetrash Год назад +105

    Anyone here after Zig won the ''fastest programming language' challenge at Dave's Garage? LOL That's why I'm here. Maybe Zig is worth paying attention to... >_

    • @robbybobbyhobbies
      @robbybobbyhobbies Год назад +18

      Yup. Although some of the comments suggest the zig solution uses subtly "cheating" flags to game things a little. Still an outstanding result, and it looks like there's plenty of interest other than raw performance.

    • @VivekYadav-ds8oz
      @VivekYadav-ds8oz Год назад +12

      @@robbybobbyhobbies I mean yeah though it doesn't actually beat Rust's performance (Rust was actually the top winner if you don't measure per seconds per threads but measure per seconds only), it still is a pretty interesting language. Its metaprogramming and reflection capabilities leave Rust in the dust, and I'm saying this as a hardcore fan of Rust.

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

      Ditto!

    • @PedroOliveira-sl6nw
      @PedroOliveira-sl6nw Год назад +4

      After that challenge I really want to test zig and rust

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

      sus metrics from dave imo. Should've run non-parallel as the 'main' metric. Zig does look cool though

  • @DerekSeymour-f3b
    @DerekSeymour-f3b Год назад +8

    I'm so glad nobody knew off the bat what 20 in hex is. It makes me feel better about myself.

  • @jackdbd
    @jackdbd Год назад +60

    "appease the borrow checker with a worthy sacrifice". LMAO 🤣

  • @budiardjo6610
    @budiardjo6610 Год назад +28

    zig community is really refreshing

  • @Pariatech
    @Pariatech Год назад +25

    Wow I didn't know that Zig to C interoperability was so great! I really enjoyed the ease of consuming C libraries from Zig.

    • @jazzochannel
      @jazzochannel Месяц назад

      yeah spr ezy. i dip mine in milks and consum thm like cookies

  • @tango2olo
    @tango2olo Год назад +154

    In Zig, the compiler seems to work with the programmer, unlike in Rust where the programmer works for the compiler.😅

    • @Melgaer
      @Melgaer Год назад +9

      Oh that is so accurate!

    • @asdqwe4427
      @asdqwe4427 Год назад +56

      I find that the Rust compiler is constantly telling me how to fix my program.

    • @UnworthyUnbeliever
      @UnworthyUnbeliever Год назад +21

      In rust, you play as the GC for your compiler
      - some other commentor

    • @konga8165
      @konga8165 Год назад +30

      I’m a big fan of the Rust compiler. It makes sure my code is highly correct

    • @sofiaknyazeva
      @sofiaknyazeva Год назад +20

      This isn't true at all or at least not for me. The Rust compiler is generous enough to give a better error explanation than any other compiler I have ever seen. And when you're comparing w/ Zig compiler...oh boy, it's not feasible and can generate worse errors than a generic C compiler does.

  • @Mempler
    @Mempler 9 месяцев назад +17

    i'll be honest, i love the simplicity of zig. Even C is less transparent than what Zig is doing. Which is an insane feat.
    Another thing i love are the integer types. I dont have to fiddle with bits to get an u24, or heck: even an u23.

    • @OpenGL4ever
      @OpenGL4ever 7 месяцев назад

      Using something like u24 or u23 will be a big and slow mess under the hood. There is a reason, why C doesn't support it. Look at the assembly code and learn something about typical CPU architectures like the x86.

    • @Mempler
      @Mempler 7 месяцев назад

      @OpenGL4ever But it certainly is great for low-level stuff.

    • @OpenGL4ever
      @OpenGL4ever 7 месяцев назад

      @@Mempler What high-level languages have in common is that they must be suitable for all possible CPU architectures. That's why they abstract very strongly at the byte level and not at the bit level.
      So they only support the common denominator. If you want to get even closer to the hardware, then you have to rely on assembly language or come up with some kind of crutch solution in high-level language.

    • @gwentarinokripperinolkjdsf683
      @gwentarinokripperinolkjdsf683 6 месяцев назад +3

      ​@@OpenGL4everit's quite nice not having things like a char that COULD be a byte or a int that could be 64 bit could be 32 bit

  • @flflflflflfl
    @flflflflflfl Год назад +10

    What a great guy! I've been eyeing zig for a few years now, this made me want to finally jump right in!

  • @gustavcoetzee5018
    @gustavcoetzee5018 3 месяца назад +1

    listening to this makes me feel like the first time i fell in love. Super excited and scared and not knowing enough but loving every moment of it. Thank you ! You inspire.

  • @Little-bird-told-me
    @Little-bird-told-me 10 месяцев назад +3

    This presentation could easily make it to top ten Havard VC cases studies

  • @fifty6737
    @fifty6737 10 месяцев назад +14

    last week i tried porting a c library with 11 files to zig, i finished it in 4 days, take in mind i never wrote zig before that in my life
    the language is elegant and forces you to do the proper thing, i spent the first day fighting with Zig Language Server crashing, and fighting the compiler not liking my code, eventually i started to comprehend why zig is made this way, it will make you a good programmer, there's no handholding, or nice abstractions that do stuff for you, it will force you to make explicit clear code
    I think zig is the first proper programming language, it's like if C was designed with 50 years of programming history in mind, it's the first language that enables you to create a non failing deterministic code, this is the king of creating mission critical software
    i think computer science classes should adopt zig as the first programming language to teach to students

    • @Олег-ю3щ4ъ
      @Олег-ю3щ4ъ 10 месяцев назад

      Have you tried Golang?

    • @UnidimensionalPropheticCatgirl
      @UnidimensionalPropheticCatgirl 9 месяцев назад +3

      @@Олег-ю3щ4ъ I don’t think they really compare, golang isn’t particularly good for mission critical stuff because the mark and sweep makes go non deterministic, it’s great language for some business logic and CRUD but it’s NOT systems programming language like zig.

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

      @@Олег-ю3щ4ъ golang is garbage collected so it cant be used in many mission critical single threaded applications, plus from the learning perspective, you dont learn memory management if you never free. Go is great for some stuff though, to be sure.

    • @pierreollivier1
      @pierreollivier1 9 месяцев назад +5

      Totally agree, what really stands out to me is how the language, is really just C but with all the most common unsafe/error prone patterns from C corrected. No need to use goto : Cleanup, because now you have defer/errdefer. No need to use void* or Macro for generics, you can use comptime. No need to worry about shadowing of variables because the compiler won't let you do it by accident, no need to keep in mind the awful implicit conversion rules of integers, no need to worry about #define statements modifying the function you are calling, no need to man a function to know if it returns (0,-1 set errno, does nothing, return null) on errors. No need to worry about using a function that doesn't exist or doesn't behave the same way on another platform. Compile time evaluation instead of terrible #ifndef #elif #define, I mean there is so much to say about the language, I'm still forced to use C at work, but I can't wait to be able to use Zig.

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

      I wouldn't think too much about their question tbh. I saw in a few comment threads, it's the exact same comment in each thread, regardless of context.

  • @fraidoonhu9284
    @fraidoonhu9284 Год назад +71

    Andrew is man of the century and Zig is the future.

    • @princeofpersiaize
      @princeofpersiaize Год назад +18

      This is interesting because last week rust was the future.

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

      @@princeofpersiaize lol

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

      last week rust was the future,remember?
      Aah you changed idea,ok.

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

      @@ITSecNEO Rust can be used for unsafe operations. You just have to explicitly declare unsafe blocks.

    • @shivanandvp
      @shivanandvp 10 месяцев назад

      @@ITSecNEO You can make one big unsafe block then. The reason this even exists is because separating out undefined behavior allows you to focus your debugging efforts.

  • @Dygear
    @Dygear Год назад +30

    RAD Game tools were amazing back in like 1998. Their video codec (with their encoder and decoder built in asm) is insanely good. All of the GOOD FMV sequences back in the 1990s were thanks to RAD Gaming tools.

    • @OpenGL4ever
      @OpenGL4ever 7 месяцев назад

      Me thinking about the Warcraft 2 cutscenes.

  • @raviramanathan5565
    @raviramanathan5565 Год назад +18

    Looks interesting & refreshing. Well, syntax sure needs getting used to.

  • @deNudge
    @deNudge 11 месяцев назад +11

    Sounds like a promising language - nearly as a blend of the best from Go and Rust, melted into astonishing simplicity... wonderful! 👍

  • @fojico1234
    @fojico1234 Год назад +41

    Guys, I'm no system programmer. Everything he says sounds amazing. A system language that can be used as a build system. Shouldn't it generate more hype?

    • @brianbrewer974
      @brianbrewer974 Год назад +43

      It's pre 1.0 so there are still breaking changes. It isn't ready for production. It needs more documentation and tutorials. The package manager is super new and still a work in progress. Rust already has a ton of love, but zig may really pick up steam once it matures a bit.

    • @KresnaPermana
      @KresnaPermana Год назад +15

      @@brianbrewer974 Yup, I definitely waiting to try deeper on zig until a stable release announced

    • @d-o-n-u-t
      @d-o-n-u-t Год назад +5

      I am hyped for Zig, but I don't think it's quite production-ready yet; I want to see more development before I start considering it for more of my projects.

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

      Rust does that, too. Well, at least for rust

    • @d-o-n-u-t
      @d-o-n-u-t Год назад

      @@hansdampf2284 I never thought I'd hear "Rust does that for Rust" and understand that statement completely and have it make sense in my head, but the year is 2023.

  • @logannance10
    @logannance10 Год назад +26

    Here's my take: Both Rust and Zig are C alternatives. Rust is willing to sacrifice C interoperability for memory and thread safety. Zig is willing to sacrifice memory and thread safety for C interoperability.
    That's not to say that Rust is completely incompatible with C nor that Zig is completely unsafe. It looks like Zig elects to warn you when code could be unsafe, whilst Rust elects to forbid code that could be unsafe.

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

      Rust is a C++ alternative, not really a C alternative. Its philosphy is also similar to C++ in its patterns and kitchen sink mentality.
      Zig is also a C++ alternative, but also a C alternative. It essentially tries to take the best of C++, whittle away the cruft, and give a syntax that is close to as simple as C is.
      It's complexity level is somewhere in the middle, which is fine, considering what it acomplishes.

    • @stevenhe3462
      @stevenhe3462 Год назад +11

      ​@@NdxtremePro Rust _is_ a C alternative. The Linux project is trying out Rust alongside C, which should be a strong argument.
      The way Zig and Rust differs immensly is that Zig has a focus on simplicity while Rust sacrifies simplicity for static analysis as strong as possible. They can both interop with C but Zig's C interopability has extremely high priority and is superb.

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

      Rust has not sacrificed C interoperability in any way. It has been a primary goal from its inception, because Mozilla had a huge repository of C++ code that they wanted to embed Rust into. Rust has repr(C), extern "C", CString/CStr, and much more for seamless interop. You can easily generate Rust bindings for C libraries, and export Rust functions for use in C code.
      Reminder that you can only use Zig "seamlessly" if you use the Zig toolchain to compile all of your code. If you don't, it's just as much effort as using Rust, but you give up all the other benefits using Rust has.

    • @Олег-ю3щ4ъ
      @Олег-ю3щ4ъ 10 месяцев назад

      Have you tried Golang?

    • @gwentarinokripperinolkjdsf683
      @gwentarinokripperinolkjdsf683 6 месяцев назад +1

      ​@@NdxtremeProzig 100% seems like a better choice than c++. For replacing C however i am quite skeptical. It seems great for game dev though (maybe once the tools get fuether along that is)

  • @geertdepuydt2683
    @geertdepuydt2683 Год назад +28

    The secret surprise is quite literally secret

  • @AV_YOUTUBE_202X
    @AV_YOUTUBE_202X Год назад +18

    Zig looks beautiful.
    *I REALLY LIKE THIS GUY AND WANT TO TRY HIS STUFF*

  • @absurdengineering
    @absurdengineering 3 месяца назад +2

    Zig made me get off my ass and start writing backends for retro microprocessors using it :)
    Zig feels like compile-time Python. When you do say function decoration in Python, it’s all executed each time you load the module. It is an easy way to express stuff but expensive in a data center. Zig lets you code in a very similar style. It just does all the code transformations using your algorithms during compilation. It is doing right now what Fast Python initiative will have to do sooner or later.

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

    great vision! we need such brilliant folks

  • @00jknight
    @00jknight Год назад +5

    Seems pretty next level. The cross compilation is amazing

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

    28:45 a Vonn Neumann machine: a Von Neumann machine

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

    I literally need a zig repo, because reinventing the wheel of libraries and converting code? Zig right now is just a consumer of C code. Super fast, but I need to develop with more than the standard library. GUI framework? TLS library? sqlite, sql, http, anything higher level than carving a wood stick again. It can be the most badass language that never was unless api/framework devs grab on to it and say hey, let's ditch C/C++.

  • @jefffriedman6942
    @jefffriedman6942 Год назад +28

    For some reason I found it hard to take Zig seriously due to the name. I thought only C and Rust were the real options. Zig has some serious potential it looks like.

    • @SimonMorganYay
      @SimonMorganYay Год назад +14

      People said the same about Google.

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

      Why didn’t you feel that way about Rust though 😅

    • @clang8649
      @clang8649 Месяц назад +1

      In german zig means "an unknown but high amount" but I've never seen it used in english. Is it slang or does it just sound weird in english?

    • @jefffriedman6942
      @jefffriedman6942 Месяц назад +1

      @@clang8649 Zig is a reference to the all your base are belong to us meme made from a poorly translated video game

    • @clang8649
      @clang8649 Месяц назад

      @@jefffriedman6942 Thanks, makes sense

  • @nyahhbinghi
    @nyahhbinghi 9 месяцев назад +2

    nice presentation; believes in the work

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

    I'm sold

  • @ginobean737
    @ginobean737 8 месяцев назад +1

    Your comment about Rust was hilarious (things taking 4x longer to develop, using Rust). Tried learning Rust some months ago. Had numerous WTF moments where I knew exactly what I wanted, but Rust wouldn't compile the code, due to my not having tracked mem allocation properly. Gave up on Rust when I realized that Rust was like a programming straitjacket and programming in Rust was not fun or interesting..

    • @heruhday
      @heruhday 2 месяца назад

      Yes... Skill isues..​@@RustIsWinning

  • @andrewbuzz7308
    @andrewbuzz7308 7 месяцев назад +3

    getCSourceFile vs get_c_source_file... I wish they didn't close the PR recently about making std library functions sneak_case :'(

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

    i like minimalist yet powerful

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

    I love Zig, however, when it comes to stacktrace errors, I must admit Rust does it flawlessly.

    • @kevinkkirimii
      @kevinkkirimii 11 месяцев назад +1

      @@ITSecNEO definitely giving them their space

  • @rodelias9378
    @rodelias9378 Год назад +22

    Nice talk Andrew... what about the secret surprise?

  • @ryancabaneles
    @ryancabaneles 11 месяцев назад +1

    Andrew is genius

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

    I am convinced by Zig and will comment out the Rust related plugins in Vim for now.

  • @nikolaivonkrusenstiern2530
    @nikolaivonkrusenstiern2530 3 месяца назад +3

    The mentioned VFX Plugin talk: ruclips.net/video/MhzWE2z4fjA/видео.html

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

    So... what's the secret surprise?

  • @ev.c6
    @ev.c6 Год назад +1

    Every time a new programming language appears saying it will replace another one, it does not.

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

      It will take decades and legscy C/C++ will plauge the earth like COBOL or pearl for an eternity

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

    Isn't the Rust Foundation a non-profit?

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

    Thank you 👍

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

    Zig rules!!!!!!

  • @OpenGL4ever
    @OpenGL4ever 7 месяцев назад

    The video starts with the programming language related topics at 34:43.

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

    The guy forgot to get back to the secret he promised in the beginning, IDK if I should trust him or what he does after this betrayal

  • @anon-fz2bo
    @anon-fz2bo Год назад +2

    this is dope!

  • @yash1152
    @yash1152 8 месяцев назад

    30:53 "Jim from DeanEgg from Vancouver about Mesh rendering using zig"
    I searched with this name, and no results showed up on yt. It's 2024-Q1 now. I don't think the talk is up yet.

  • @jazzochannel
    @jazzochannel Месяц назад

    are the compiled binaries smaller or larger than go?

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

    amazing

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

    C++ programmers discover modern programming practices

    • @TJackson736
      @TJackson736 10 месяцев назад +2

      Funny you say that. Andrew went from C++ to Rust to C-like C++ with templates to make generics before writing Zig. Zig is supposed to replace C, not C++. This is why it is a simple language

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

    We need a surrealdb type implementation from zig. I hope tigerbeetle team can do that work.

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

    How best to approach this project to make a z80 code generator?

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

    What's the concurrency story? I want to use Zig in place of Go...

  • @davidrempel433
    @davidrempel433 Год назад +18

    Who else is watching this because they're upset at the R*** Foundation™

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

    Sqlite will probably be bought by oracle, and forked by the community as "sqlibre" or "opensql" or something

  • @androth1502
    @androth1502 Год назад +9

    I trust Wikipedia even less than Google these days.

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

      yep. that was the worst example he could take for "non profit works". Wikipedia is evil for many many topics.

    • @gavinvales8928
      @gavinvales8928 11 месяцев назад

      @@armynyus9123 like what?

    • @armynyus9123
      @armynyus9123 11 месяцев назад +2

      @@gavinvales8928 like *any* topic, remotely political.

    • @OpenGL4ever
      @OpenGL4ever 7 месяцев назад +1

      @@gavinvales8928 Wikipedia even claims that Windows 3.1 is just a graphical interface for DOS.
      That's not even true. Strictly speaking, it is an operating system that uses DOS as a bootloader. Source: Raymond Chen. The Wikipedia article is therefore incorrect.

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

    Why did you call it a comptime param instead of a const param?

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

      because something that's comptime has to be compile-time known, while something that's const just can't change after it gets its value.

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

    I wonder how much of this was inspired by Jai?

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

    I was with you until you said everyone loves Wikipedia.

  • @JohnDean-my1dx
    @JohnDean-my1dx Год назад +3

    Can Zig parse tabs now?

  • @toby9999
    @toby9999 2 месяца назад

    I've never had a problem installing MS Visual Studio. It only takes a few minutes, and I've used most versions since v4.0. This sounds like a strawman. By contrast, I have had a lot of problems installing other IDEs and setting up build environments for non MS languages, e.g., Java and rust and other IDEs such as Eclipse and VSCode.

  • @yash1152
    @yash1152 8 месяцев назад

    9:01 ohw, UBSAN = Undefined Behaviour Sanitizer. Capitalization UBSan would've increased its recognisability, but ohkayh.

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

    MacOs open source ? Not sure about it, lots of part of it aren't open source minus the kernel and there's no such thing as half open source.

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

    C outsold

  • @purpasmart_4831
    @purpasmart_4831 Год назад +9

    Zig is the real language of the future, not rust.

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

    When C++ was created it was compiled with cfront---a precompiler for the C language. You give your C++ code to cfront and it outputs a C program which can then be compiled with the available C compilers at the time. Because of this, C++ was gradually introduced to the C developers community. If a C developer wants to use a C++ feature not present in the C language, he would simple write that routine in C++, have it compiled to C, and immediately use it without breaking a sweat. There is no compulsion for the C developer to move their entire toolset to C++. Nor do they have to worry about C++ zealots calling his language, C, obsolete, buggy, and filled with arcane pointer arithmetic. Hah!
    I am glad to see that Zig is following in the same footsteps as C++.
    Compare C++ and Zig's attitude with that of Rust where the Rust community, without any provocation, is bent on antagonizing the entire C++ community by not even trying to cater to the needs of veteran programmers. They are so full of their own hot air, they keep on harping about the superiority of their language and how much faster and cleaner it is, that they are antagonizing the very community that they are trying to attract. I'm sorry. I don't have any need for a borrow checker or pointer-less code because I have made peace with memory allocation and pointer operations in C and C++. Rust has to offer me more than their borrow checker or whatever thingy they have before I make the leap from C++ to Rust.
    I will not spend three or six months of my time, learning to use Rust and getting acquainted with its tools, quirks, and libraries, when in those very same six months there are tons of new technologies that I have to keep up with (eg CUDA, AI, WebAssembly containers, etc.) while also building software in the language appropriate for the project, be it C, C++, Python, WebAssembly, Bash, or even Java.
    I therefore applaud Zig for doing the right thing by not forcing the veteran and professional programmers to discard their toolset, their procedures, their standards, their libraries, and all their other hard earned expertise just so they can be cool to newbie programmers. Python and Javascript did not win the language wars by antagonizing the C and C++ communities. Python and Javascript won because they offered something that C and C++ does not have: ability to work on the browser (in the case of Javascript) and good memory management, dynamic typing, and the REPL in the case of Python.

    • @OpenGL4ever
      @OpenGL4ever 7 месяцев назад

      You wrote:
      "I don't have any need for a borrow checker or pointer-less code because I have made peace with memory allocation and pointer operations in C and C++. Rust has to offer me more than their borrow checker or whatever thingy they have before I make the leap from C++ to Rust."
      The problem you don't seem to see is that the industry will simply replace you with younger programmers who are willing to code in Rust.

    • @HellCatLeMaudit
      @HellCatLeMaudit 7 месяцев назад

      @@OpenGL4ever Maybe? Maybe not? The problem with Rustaceans like you is that you still live in the 1980's when memory buffer overflows were still common. It is not as common now, kid. There are more hacks involving social engineering and surreptitious backdoors (have you heard of the xz backdoor put in, possibly by a state actor?) than buffer overflow vulnerabilities. The world has learned.
      The problem with buffer overflow is a problem with the C language and not with C++. It is possible to write C++ code without malloc, fgets, and those other things that you people keep harping on about if one is willing to forego C compatibility. It's like your knowledge of programming ended in the 1980's. Yet, despite your fears, the Linux kernel is written in "unsafe" C and yet it is one of the most secure kernels around.
      For your education, learn that a computer language is only part of a development system. What is equally important is the environment, the tools, the libraries, the institutional experience, and the decades of testing and use of the dev system. Rust isn't there yet.
      Grow up. Your language is still in the hobbyist stage. Come back and take my job when Rust has become de riguer in AI, Game Engine, machine learning, and low latency programming.
      A Rust fanatic may have convinced you to concentrate on Rust because it is "the language of the future." That may be so. But, kid, I hate to tell this to you, but until that actual future arrives, you and Rust will just live in unemployment land because you refuse to learn what is needed now instead of what is needed in the future.
      Who knows? Maybe in the future AI will do all our programming so Rust and human programmers won't even be needed.

  • @MateSoos-zc7uv
    @MateSoos-zc7uv 2 месяца назад

    von Neumann not Vonn Neumann ;)

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

    OpenAI was initially open source non-profit, but the board changed it to closed source for-profit. That's when Elon Musk resigned in protest.

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

    So Zig is kinda nix?!

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

    I share many of the views of Andrew Kelley. But I do think the view of all for-profit company is evil is a little too extreme and naïve. I don't think the blame is only on the buyer but also the seller. For example, if fit-bit never had to sell, they could still keep the data "safe." I don't think Google put a gun on their heads and said you must sell to us. The way I'd like to look at is "is the world a better place when we have ___" and in the case of Google, I actually do think the world is a better place in 2023 with Google than what the world would have been if Google never happened in 1998 at least imho. Yes, Google is not as "unevil" as it was before but then world changes and sometimes you have to survive to maybe do some good in the world. For example, I recall how evil MIcrosoft was but hey it brought us Visual Studio Code and Terminal for free. :)
    Anyways, I totally share the view on OpenAI though. :)

  • @jerosramirez-zk2bu
    @jerosramirez-zk2bu Год назад +1

    Me. Gusta

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

    24.0 good

  • @gustavcoetzee5018
    @gustavcoetzee5018 3 месяца назад +1

    ❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤

  • @yash1152
    @yash1152 8 месяцев назад

    16:58 > _"now, this is using a slice; which ain't c concept. so, export a C ABI [via] wrapper function"_
    ohwww ohkayh. got it now. that's how it interops with c, and that's the functioning of externs. got it.

  • @waytospergtherebro
    @waytospergtherebro Год назад +9

    If you use it do you call yourself a Zigger? Is the hard R okay?

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

      The Zig compiler comes with an implicit Z word pass, including the hard R.

    • @cherloire7978
      @cherloire7978 2 месяца назад

      zigma male

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

    😂 I'm waiting for that committee of geniuses that can fix Cobol! 😅

  • @tato-chip7612
    @tato-chip7612 8 месяцев назад

    24:00
    Not gonna lie. Both of them are bad, the difference is one has the funds to be very very bad.

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

    The guy is showing one fault of the American system. I refer to people willing to sell their business in order to bring their kids to college. That’s only an American thing. Education should be free or at least affordable

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

    Unfortunately Linux is moving around Rust :(

    • @MagicNumberArg
      @MagicNumberArg Год назад +51

      Why "unfortunately"? It was pretty much "either Rust or C forever". Its not likely for Linux to consider language before its been around for a decade. If anything, Rust broke the ice for future languages likr ZIG.

    • @akkesm
      @akkesm Год назад +18

      Zig is already very popular and loved, I have no doubt that it will make a very good argument for itself once it becomes stable. Unfortunately that's going to take a few more years.
      We can't even be sure of the extent of Rust's support in Linux with how (rightly) cautiously Linus and the others are treating it. There's no guarantee it will remain there at all.

    • @joseduarte9823
      @joseduarte9823 Год назад +24

      Zig didn't even hit 1.0 yet though

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

      Since Zig interops seamlessly with C, you could use it now to write kernel modules without having to "fix" the language like they had to do with rust.

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

      @@charliegnu zig is not stable yet - async straight up doesn't work with current trunk for example. It's fun to play around with, and while I wouldn't recommend building a commercial project with it right now sure you can do that. It's absolutely not even close to being to the point where any reasonable person should be comfortable putting it into Linux, which is a significant part of the foundation of the tech world. It'd be like building your house on a foundation made of some new material that has some promising properties but little use outside of labs and with 0 durability tests. It just doesn't make sense.

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

    the Rust Foundation had failed us, Zigggggg

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

    joix

  • @peterSobieraj
    @peterSobieraj 7 месяцев назад

    Zig would be so good if it wood support Windows 7

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

    Aren't there enough programming languages already?!!

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

    Why are you using the massive LLVM Libraries for Zig? An LLVM-only build requires anywhere from 1 to 3 GB of space on a machine.
    A full build of LLVM and Clang will need around 15 to 20 GB of disk space. The exact space requirements will vary by system but damn.
    They claim it's so large because of all the debugging information and the fact that the libraries are statically linked into multiple tools.
    No Offence, however just before using Zig for your own Application Builds, your using a Program larger than a Linux Ubuntu OS just to achieve it.
    You would be much better off to have gone with a Python Like Approach using C++ as a base language with an Interpreter instead right?

    • @UnidimensionalPropheticCatgirl
      @UnidimensionalPropheticCatgirl 9 месяцев назад +1

      LLVM does not really compare to python, yeah small interpreter will be small but it’s still just an interpreter, LLVM basically gives you state of the art AST and amazing multi platform codegen, with all the micro optimizations you can dream of. You can’t really use python-like interpreter for mission critical stuff because it’s slow and non deterministic and ultimately forces you to include the entire runtime with your application to even run it.

  • @GallupJerry-p3t
    @GallupJerry-p3t Месяц назад

    Darrin Track

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

    I can't understand why programming languages are so hard to understand. Are the creators to good to use simple, understandable language and examples or what???

  • @Tony-dp1rl
    @Tony-dp1rl Год назад +2

    36:22 There is only one line needed in JavaScript :)

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

      soydev detected

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

      @@FlanPoirot Andrew used the colors of THE flag
      it's over

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

    wikipedia is awesome... lmfao

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

    lol a really hateful view of VC startups and large corporations XD

  • @MosesKatherine-e3v
    @MosesKatherine-e3v 2 месяца назад

    Stoltenberg Road

  • @LawrenceLadouceur-s1d
    @LawrenceLadouceur-s1d 2 месяца назад

    Turner Heights

  • @MoniNaha-b2x
    @MoniNaha-b2x 2 месяца назад

    Sauer Meadow

  • @BrianWhite-i4z
    @BrianWhite-i4z 2 месяца назад

    Lind Islands