What's Zig got that C, Rust and Go don't have? (with Loris Cro)

Sdílet
Vložit
  • čas přidán 16. 07. 2024
  • Zig is a programming language that’s attempting to become “the new C” - the language of choice for low-level systems programming and embedded hardware. Going into that space not only puts it in competition with C and C++, but also other newcomers like Rust and Go. So what makes Zig special?
    Joining us to discuss it is Loris Cro from the Zig Foundation. We talk through Zig’s reasons to exist, its language design features, which parts of the C ecosystem it's tackling, and how the Zig Foundation is set up for the long-term health of the language.
    -
    Loris’ website: kristoff.it/
    Kris on Twitter: / krisajenkins
    Kris on LinkedIn: / krisjenkins
    Zig homepage: ziglang.org/
    The “learn zig” guide: ziglearn.org/
    Learn Zig with Ziglings: ziglings.org/
    Find the Zig community: github.com/ziglang/zig/wiki/C...
    Rust’s cargo-zigbuild: github.com/rust-cross/cargo-z...
    Using zig as a better linker: andrewkelley.me/post/zig-cc-p...
    "The Economics of Programming Languages" by Evan Czaplicki (Strange Loop 2023) - • "The Economics of Prog...
    -
    0:00 Intro
    2:08 Podcast
    1:22:08 Outro
    #programming #programminglanguages #software #zig #ziglang #llvm #rust #go

Komentáře • 457

  • @yash1152
    @yash1152 Před 7 měsíci +248

    Finer Timestamps for the "Podcast" part
    7:04 Why not Rust?
    8:52 Why not Go?
    11:25 Zig's answer to requirements' constraints?
    15:59 Zig has a C compiler built-in?
    20:06 Built-in linker & backends
    26:39 User/Programmer space?
    34:08 How C interop works?
    44:11 Pointer arithimetic?
    48:53 Memory Management?
    56:03 CompTime & generic types?
    1:06:06 Eg. & emit Compile Error
    1:09:30 Funding?
    1:18:30 Getting Started
    1:21:10 Conclusion

    • @tomknud
      @tomknud Před 7 měsíci +4

      Zig is apparently 10 times faster in some testing.

    • @MessingWithCode
      @MessingWithCode Před 5 měsíci

      Thanks!!!

    • @alelondon23
      @alelondon23 Před 5 měsíci +1

      @@tomknud So vague, and no link,? Please don't parrot your noise onto our minds. A better use for that time is to learn more until you can offer us some real and valuable insight.
      I look forward to it. I trust you can.

    • @ShizoMoses
      @ShizoMoses Před 4 měsíci

      Your comment should be pinned, commended and lauded by everyone. Thanks for the time stamps, very helpful!

    • @toooes
      @toooes Před měsícem

      I’m Ron Burgundy?

  • @DaguobDagunanLex
    @DaguobDagunanLex Před 4 měsíci +47

    At first, I just saw a Targaryen and a Tarley (Game of Thrones) talking but then... anyway, thank you YT algorithm for recommending this talk between Kris of House Targaryen and Loris of House Tarly about:
    00:00 The trend to replace C: wise and terrifying
    02:58 Why Zig needs to exist?
    04:27 On C Metaprogramming, etc.
    04:55 C++: It's power and complexity
    05:52 Forget Language war
    06:54 "Focus on debugging your application rather than debugging your programming language knowledge."
    07:17 Why not Rust?
    08:53 Why not Go?
    10:47 On reusing existing C but leaving its ecosystem
    11:24 Zig vs Design Constraints
    13:55 Zig LOVES C and C++
    15:04 Zig is LOVED by Go and Rust
    15:59 Zig's built-in C compiler SHOCKS Kristoff
    16:37 When Apple released M1, Zig was the first...
    20:08 Built-in linker and "backends" to get past the LLVM
    24:05 Going all the way down to the lower level
    24:46 Timeline depends Talent Quality and Quantity
    25:21 The Call to Transition from "4 hours" to "20 secs" ecosystem
    26:50 New to Zig Programming, what to expect?
    27:10 Zig on Comptime and Runtime
    27:51 Zig's invitation to JavaScript or Python Developers
    34:10 How C interop works?
    37:08 Importing C header files, internal auto bridging file
    41:49 Zig and Go's Defer, C++ Destructors, Zig's Defer on C
    43:31 "Zig is better at using C libraries than C"
    44:12 Pointer arithimetic?
    46:16: Crucial things on pointers
    48:55 Memory Management
    51:37 Allocator's leak detection in debug mode
    52:33 Zig's correct way of LEAKING MEMORY: Debug vs Release Mode
    56:03 CompTime, Runtime,Infinite loops, Undecidable things
    1:02:28 Generics, Lisp Macros, Zig's Metaprogramming
    1:05:38 Comptime Code checking and emitting comp error
    1:09:31 Zig as a 501(c)(3) Non-profit Foundation
    1:12:34 Support Contract Zig-cross-compiling C and C++ backend services
    1:13:27 "You cannot make a successful language unless you are supported by a big tech company"
    1:14:27 Design Consistency vs Kitchen Sink Evolution
    1:18:31 Getting Started with Zig: Learning Recommendation
    1:21:10 Conclusion
    1:22:57 A Fun Easter Egg

    • @GreatWalker
      @GreatWalker Před měsícem

      I thought you were going to say house Martell :D

  • @UliTroyo
    @UliTroyo Před 8 měsíci +236

    Love the combination of you asking great questions and letting your guest talk, and Loris answering questions aware that people with incomplete knowledge are listening. Two great communicators yield a very satisfying in-depth talk :)

    • @pengain4
      @pengain4 Před 6 měsíci +3

      + to this. Very satisfying episode to listern!

  • @jordanhubscher900
    @jordanhubscher900 Před 8 měsíci +195

    I don’t know what you did or how I found this video but this popped in my recommended and I gotta say, this is by far the best developer podcast I’ve ever listened to. Please change nothing. You ask excellent questions, you’re very attentive to your guest, and you allow them the freedom for them to go deep in order to open up a world of knowledge to the curious listener (such as myself).
    Thank you so much for this wonderful content I am so grateful I happened upon and I am definitely subscribed now!

  • @JohnDeHope3
    @JohnDeHope3 Před 7 měsíci +53

    This video is a gem of an example of well-paced technical communication. Loris' care to clarify and explain up-front topics is appreciated.

  • @steveoc64
    @steveoc64 Před 8 měsíci +113

    Where has this channel been hiding ? Great content across the board, well presented. Subscribed.
    I tuned in for the Zig content, and was thrilled to discover a whole new channel full of quality, in-depth content.
    Kris seems like a great guy, with all the enthusiasm for programming that bought us here in the first place. Thx.

    • @shizeeque
      @shizeeque Před 8 měsíci +1

      My thoughts exactly!

  • @kevinkkirimii
    @kevinkkirimii Před 5 měsíci +43

    zig is a very ambitious project and I love it. I hope zig gets the technical and financial support from the community.

  • @7h3d4sH
    @7h3d4sH Před 7 měsíci +39

    I first learned about Zig when trying to use Rust for AWS Lambda functions. It worked exactly as described in this video - the Zig compiler cross-compiles the Rust code in order to target the specific version of libc used in AWS Lambda runtimes. I was kind of blown away by it to be honest. Rust on Lambda was my first contact with Zig. I really enjoyed learning about the details from Loris in this video.

  • @K5RTO
    @K5RTO Před 7 měsíci +45

    awestruck. this guy's ability to translate such complex ideas into info digestible to the avg programmer is unmatched.

  • @Blaisem
    @Blaisem Před 8 měsíci +25

    Wonderful video by both participants. I didn't think I'd watch much of it because 83 minutes. Next thing I knew I was 70 minutes in and just stayed until the end.
    I appreciated how the host gave so much space while intermittently prodding the discussion in interesting directions with well-prepared questions. I also liked how both participants spoke slowly enough with an attenuated tonal cadence for clear articulation and allowing the audience time to internalize what is being discussed without losing track of the flow of conversation. It was a calming experience that was easy to watch/listen to, which given the nature of the content, having such an easy-to-digest style is quite advantageous. There's already enough complexity in the content for us to parse that my attention was already quite occupied.

  • @rganesan
    @rganesan Před 8 měsíci +11

    I already know zig for over an year and love it and I still learned quite a bit from this discussion and thoroughly enjoyed it. Great stuff. Thank you!

  • @Dgg1234-x8e
    @Dgg1234-x8e Před 17 dny

    As a programmer (not in low level systems), I can’t express how grateful I am for gifted people like Loris doing what they do for the world.

  • @kartirnium
    @kartirnium Před 7 měsíci +4

    The best Zig interview i've seen so far. So well presented and really interesting questions! Great job!

  • @ivorybanana2183
    @ivorybanana2183 Před 8 měsíci +3

    Enjoyed every bit of the talk! Hope this channel grows and keeps you motivated to put out content :)

  • @iamworstgamer
    @iamworstgamer Před 8 měsíci +3

    this is the most educative interview i have seen on internet. i would really want to learn more about systems programming from lori.

  • @victorpinasarnault9135
    @victorpinasarnault9135 Před 8 měsíci +4

    I didn't start to study Zig, but already loved it and after this talk I love it even more!

  • @towel9245
    @towel9245 Před 8 měsíci +3

    Awesome talk, I'm glad to have found this channel! It was very educational, and you were / Kris was a great listener. I hope I can learn Zig in the near future with a personal project.

  • @nicholascrosbie7863
    @nicholascrosbie7863 Před 7 měsíci +3

    Excellent presentation. Thank you to both host and guest (people that is).

  • @jasperdunn
    @jasperdunn Před 7 měsíci +20

    I already loved working with Zig, this talk makes me feel inspired and have even more respect for the team.

    • @danvilela
      @danvilela Před 7 měsíci +1

      Any ideas of project that would be a good fit to get started with zig?

    • @jasperdunn
      @jasperdunn Před 7 měsíci +1

      A simple CLI can be a good first project

    • @danvilela
      @danvilela Před 7 měsíci

      @@jasperdunn cli of what? :P

    • @jasperdunn
      @jasperdunn Před 7 měsíci +2

      @danvilela sounds like you should make a CLI that comes up with ideas 👍

    • @kuhluhOG
      @kuhluhOG Před 7 měsíci +1

      @@danvilela automate something you often do
      even if you end up not using it, it's still great for learning

  • @austecon6818
    @austecon6818 Před 6 měsíci +4

    This was great! Thank you for doing this great interview both of you.

  • @kaaloo
    @kaaloo Před 6 měsíci +2

    Thank you for this easy going yet precise technical conversation and for an enticing introduction to the Zig language! 🎉 Great job both of you.

  • @ToukiMS
    @ToukiMS Před 6 měsíci +3

    You are such a competent interviewer, thank you so much for all your podcasts !

  • @taylankammer
    @taylankammer Před 7 měsíci +8

    This is a truly amazing interview. I've been interested in programming language design and philosophy for a long time. Made some (very) minor contributions to the R7RS Scheme standardization process in the past, and just generally love Scheme as a language. I've just quit my job with the intention of resting for a while, and part of that resting will involve teaching myself new things. I've been considering dipping into Rust, Zig, Go, Haskell, OCaml, Assembly, and more, if I actually find enough time for each of them. Given that I'm a fan of simplicity (Scheme over Common Lisp, for example) I foresee that I'll probably end up enjoying Zig more than Rust, as far as the very low-level languages go.

  • @gavinh8146
    @gavinh8146 Před 6 měsíci +6

    I love the idea of procedural comptime ❤ Just yesterday I found myself talking to a colleague about a TypeScript type, describing what the type “did”. Of course TS types are declarative so they don’t really “do” anything - they just “are” - but in my mind the type represented a series of transformations on an input type. How much easier it would have been to express the transformations procedurally!

  • @angeloceccato
    @angeloceccato Před 8 měsíci +5

    Fantastic interview and zig is a fantastic project. APPROVED!

  • @samirsinha1135
    @samirsinha1135 Před měsícem +1

    While watching this I ended up building zig on my system. Can't wait to try it out!

  • @lucas_badico
    @lucas_badico Před 7 měsíci +1

    Thanks for both of you, great conversation. Zig is a thing for me now.

  • @PristinePerceptions
    @PristinePerceptions Před 7 měsíci +5

    This was a fantastic podcast! Particularly for those uninitiated in Zig. I now understand the philosophy of the language and can quickly determine whether I should consider using Zig for any specific project. I don't have to try Rust, learn how the borrow checker works, disagree with the borrow checker and then consider using Zig.

  • @maxmustermann5590
    @maxmustermann5590 Před 2 měsíci +1

    What a great host. Intelligent questions and Letting your guest talk? Sadly insanely rare

  • @Monotoba
    @Monotoba Před 7 měsíci +3

    I just found your channel and I must say I love your style of interviewing. I'll be watching more of your videos and look forward to new videos in the future.

  • @versacebroccoli7238
    @versacebroccoli7238 Před 7 měsíci +1

    Thanks for asking about the compile time code at the end. Understanding macros has evaded me so far.

    • @DeveloperVoices
      @DeveloperVoices  Před 7 měsíci

      One thing I love about the podcast format is, I try to aim for roughly a certain length, but if things are too interesting to stop then we're always free to keep going. 🙂

  • @TheHubra
    @TheHubra Před 7 měsíci +27

    Very good video. I clicked on it on a whim and I'm happy that I did.
    My current impression of Zig is that its a cool project that I can appreciate, but ultimately it doesn't feel like a competitor to Rust. Rust seems to have different goals and features that I love very much, and Zig doesn't seem to have some of them nor does it aspire to have them. Its on a different path, which is perfectly fine, but its not a path I want to be on personally. But im glad it exists, cus I might find myself using it one day.

    • @7h3d4sH
      @7h3d4sH Před 7 měsíci +20

      So the desire of the language creator of "I want to build a Digital Audio Workstation but I don't want to do it in ANSI C" makes perfect sense in this context. I imagine that working with real-time audio is difficult in Rust because so much of what you want to do with audio requires "unsafe" code. So if much of your code is unsafe Rust, you might as well just use C right? So Zig doesn't really compete with Rust - it has a different goal. Rust has always been about safety first, and Zig has different design goals.

    • @hagaiak
      @hagaiak Před 5 měsíci

      ​@@7h3d4sH I've never done audio, but why would so much of it require unsafe Rust?
      How different is it from other real-time domains, such as game engines, databases, hardware controllers, etc?
      If there's a few things that require unsafe, such as arena allocators, or things like that, it's possible to use a stable crate that has taken care of the unsafe code, and has been tested for years, with many bug fixes, rather than try to reinvent everything and tackle undefined behaviour yourself. Which is what happens if you choose to write C, C++, or Zig. It's almost like writing unsafe Rust, as nothing protects you from write/read contentions or from use-after-free/dangling-pointer issues.

    • @ForeverZer0
      @ForeverZer0 Před 2 měsíci

      Zig appeals more to C users, and Rust appeals more to C++ users. Not sure why Rust/C are so often compared, they are hardly even comparable aside from both being systems languages. I don't bother spending much time comparing Bash and Ruby just because they are both scripting languages, it really isn't a productive comparison.

  • @mateoarv
    @mateoarv Před 6 měsíci +1

    That was a great podcast with a great guest and a great host. I can see this channel growing a lot with this kind of content!

  • @kenneth_romero
    @kenneth_romero Před 8 měsíci +2

    great interview, got a sub from me. love your format and questions, probably gonna binge your stuff with the free time from thanksgiving break.

  • @andiahmad7255
    @andiahmad7255 Před 6 měsíci +1

    This man is able to present the madness going on down there in an easy-to-understand package.

  • @AceHack00
    @AceHack00 Před 5 měsíci +1

    I just found this channel today, this is my 4th episode already, great channel!!

  • @OxAA00
    @OxAA00 Před 8 měsíci +1

    Great talk! I've been using Zig for a while now and really like it.

  • @DarioScarpa
    @DarioScarpa Před 8 měsíci +1

    Excellent video, informative and honest (with zero language zealotism, which is rare). I look forward to try Zig if the right project shows up.

  • @claudiusraphael9423
    @claudiusraphael9423 Před 8 měsíci

    Nice one - exactly the comparative behavioral overview i needed - liked and subscribed, thanks for sharing!

  • @GaelAbadin
    @GaelAbadin Před 5 měsíci

    Beautifully explained. Thanks to both of you.

  • @miscbits
    @miscbits Před 7 měsíci

    great episode! Just discovered this channel and I really enjoyed this

  • @CallousCoder
    @CallousCoder Před 8 měsíci +9

    I recently did a video series on using Zig on the raspberry pi pico. Where we develop a SIMON game in the course of 4 lessons. And I have to say, that Zig on the RP2040 (Pi Pico) is a blessing. Although the HAL doesn’t yet have all the features it is useful for
    Most of your simple embedded stuff.
    So I can’t wait seeing you do this on the Atmel side!

    • @yash1152
      @yash1152 Před 7 měsíci

      the HAL magnetic sensor?
      > _"Although the HAL doesn’t yet have all the features it is useful for"_

    • @CallousCoder
      @CallousCoder Před 7 měsíci +3

      @@yash1152 Hardware Abstraction Layer

  • @telesniper2
    @telesniper2 Před 6 měsíci +2

    Very well presented. I'm only 5 minutes in and you've given a few good examples that explain the justifications for some of the prominent language features. Lesser videos often ramble on about trivialities and never hit on this.

  • @srijanpaul
    @srijanpaul Před 6 měsíci

    Excellent conversation. Would love to see more of these.

  • @demolazer
    @demolazer Před 8 měsíci +17

    It's an exciting era for programming. We have new languages with the potential to rival C, but which will take over?

    • @joseoncrack
      @joseoncrack Před 8 měsíci +3

      None.

    • @natescode
      @natescode Před 7 měsíci +1

      ​@@joseoncracksomething will eventually

    • @RogueTravel
      @RogueTravel Před 7 měsíci

      “Taking over” is not really a thing. There are just new projects that seem to be created more often in Rust and Zig, which will be around for awhile. C++ as well, there is also the Carbon project.

    • @jeremymcadams7743
      @jeremymcadams7743 Před 3 měsíci

      ​@RogueTravel I think I'd like to see a diversification of the coding marketplace. I love C and don't think it will ever go away since it is so embedded, but also maybe inclusion of other languages in builds to take advantage of the strengths that cover the weaknesses of the others.

    • @bjorn2625
      @bjorn2625 Před 3 měsíci

      The awesome thing about Zig is that it has a transition path from C - all other languages require a lot of koolaid and adoption across a team. Zig can sort of just show up and start adding value to a C build and then slowly Zig libraries can start being part of a project.

  • @patrickjreid
    @patrickjreid Před měsícem +1

    I have been a JavaScript developer for about two years. And I have been pondering how to grow as a developer. Part of that path is exploring other languages. Thank you for your excellent podcast! It has helped me grow so much! If that is your mission then you are winning.
    So far, zig has become top of my list! I am going through a bunch of c learning material just to understand the foundation of modern computer programming, but dang, when it comes to wanting to actually develop something Zig is what I want to use. The other one that captures my attention is mojo.

  • @roryboyes2307
    @roryboyes2307 Před 7 měsíci +1

    It's rare I'll sub but you had my vote in the first five minutes. Clear from the outset that this would be insightful. Very much looking forward to future content.

  • @pacukluka
    @pacukluka Před 7 měsíci

    Amazing, thank you! Would love to hear more of zig.

  • @neilclay5835
    @neilclay5835 Před 8 měsíci +4

    I did the Ziglings, and I highly recommend both them and the language.

  • @adelarsq
    @adelarsq Před 7 měsíci

    Really cool interview. Thanks for share!

  • @matterhart
    @matterhart Před 7 měsíci +1

    Really great overview of systems programming and programming language design trade offs.

  • @afailable
    @afailable Před 4 měsíci

    This was an amazing talk. I've never seen this channel before, I'll have to start binging now 😅

  • @jailop7013
    @jailop7013 Před 7 měsíci +2

    Facinating, the language of course, but also this format of interview

  • @origanami
    @origanami Před 7 měsíci +17

    Zig makes you think about memory allocation, Rust makes you think about the borrow checker

    • @Leonhart_93
      @Leonhart_93 Před 3 měsíci +3

      Yes, the Rust way doesn't scale your general programming knowledge.

  • @brtr
    @brtr Před 6 měsíci

    Great podcast! Very nice and quality content, thank you!

  • @LukasRotermund
    @LukasRotermund Před 7 měsíci

    ❤ great interview! You have a really enjoyable and relaxing interview-style

  • @vonderklaas
    @vonderklaas Před 6 měsíci +2

    Thanks!

  • @user-eq2we3px5x
    @user-eq2we3px5x Před 7 měsíci +1

    This is a fantastic talk.

  • @edgeeffect
    @edgeeffect Před 7 měsíci +3

    I've been "planning" a digital audio project for years (yes years, it's a hobby project I can faff around for as long as I like) and haven't been able to find the right language (I want high-level - but not too high and I want interop with assembly-language)... and Zig is my current candidate. The original code I worked on years ago was C++ and I don't want to go back there, I've considered Rust but it IS like C++'s type-safe younger brother like Loris says and we don't like that. But now I've heard that Andrew Kelley was actually working in the same area when he started on Zig, I think even more that it might be the answer I've been looking for.

  • @martinmajewski
    @martinmajewski Před 6 měsíci

    Such a good talk! I love it! Subscribed!

  • @cho4d
    @cho4d Před 19 dny

    first i have learned about zig. great presentation. i am feeling positive about this project's future! he is a smart dude.

  • @kevinkasp
    @kevinkasp Před 5 měsíci

    Dang, I wish I knew as much as you guys. Fantastic video/interview/explanation.

  • @ZombieLincoln666
    @ZombieLincoln666 Před 3 měsíci

    great video. Currently deciding between golang and zig

  • @sarevoker
    @sarevoker Před 7 měsíci +1

    Wow, what a nice podcast to hear, thanks for this masterpiece, I'm on my way to get hands dirty with Zig! :D

  • @usamesavas9848
    @usamesavas9848 Před 7 měsíci +1

    instantly liked and subscribed. intriguing to learn Zig, although I have almost no knowledge of C yet.

  • @TheNitramlxl
    @TheNitramlxl Před 6 měsíci +2

    Thank you very much for this, it was very interesting. It reminded me about dlang, which (I think) is on a very similar mission.

  • @basileagle314
    @basileagle314 Před 8 měsíci

    Amazing video!

  • @marshallbcodes
    @marshallbcodes Před 8 měsíci +2

    Just found a new favorite channel!

  • @lucasrecoaro1701
    @lucasrecoaro1701 Před 7 měsíci

    Very good interview.

  • @alanbaumann
    @alanbaumann Před 7 měsíci

    this was awesome!

  • @jamesschaefer9554
    @jamesschaefer9554 Před 5 měsíci +1

    I’ve been zig curious for a long time, but I’ve been holding back because of the lack of RAII…
    This interview finally got the zig philosophy to click for me in a way that nothing else had before.
    Thank you!

  • @shavais33
    @shavais33 Před 7 měsíci +4

    For many years, every.. few days? Few weeks? I'd fantasize for a while about working on a computer language project. A language that compiles to native code on multiple platforms and tries really hard to be easier to use than C or C++.
    It's awesome to hear that Zig is working toward including their own back end / LLVM replacement option. LLVM (Low Level Virtual Machine) creates a virtual machine that your language targets, so that your language can run on any platform that has LLVM support. It's kind of like a JVM (Java Virtual Machine) almost, but a bit more primitive (low level) and it's not a JITer (Just In Time compiler - it doesn't spend cycles compiling and optimizing byte code at run time). So.. it's hard not to see LLVM as kind of a crutch or a cop-out. It seems like you're not really very likely to be able to optimize all that well for any particular architecture if you're language is targeting a virtual machine. On the other hand, any language that isn't machine language or assembler language presents what amounts to a virtual machine to a programmer. Still, are languages all the same? Do they all present more-or-less the same VM to developers?
    They might, more-or-less - most languages are comprised of the same general elements: Literals, variables, arrays, operators, things like tuples and slices and data structure initializers and "comprehensions", if/then/else, switch/case, for/while, functions, classes with data/function/procedure members and operator overloads and inheritance & polymorphism and construction/destruction, modules, namespaces, threading, forking, events, etc., once you know the syntax for how to do all that stuff, you pretty much know the language, and most languages have some kind of support or another for most of those things.
    So these days, I'm a bit less energized about the idea of a new language, because I think I'm kind of coming to the conclusion that it isn't actually the language itself that makes all that much difference between one language environment and another. I actually really like the C++ language, quite a lot, for example, especially now that we have things like auto and smart pointers, and the whole super convenient, pretty derned fast (for the most part) STL. The problem is, the build environment and the libraries are just a nightmare compared with something like C# or Java.
    Take libzip, for example. Worked great and was easy to use in C++.. until I went to encrypt this particular .mp3 file I had. Then I got a very unhelpful error message. I spent.. a week? Two? Trying to solve that problem. Learned way way more about zip files and mp3 files and all the various libraries related to them that are out there than I ever wanted to know. And still couldn't solve my problem. And I mean.. I worked at Intel for a while, on a team that used C++, and I cannot begin to describe the pains our team went through related to exactly this general sort of problem. Libraries crashing or not doing things it seemed like they should and it isn't clear why, and it just takes 4 Freaking Ever to get anywhere. That team worked on a project for a year and half that could've been done in probably a few months in Java or C#. Their full build was taking 25 minutes to run. Crazy!
    Just getting something like a cross platform music player working, complete with a UI, is a multi-month proposition in C++. You can do that in a single day in C#. I wrote a test program in C# to interact with an encrypted zip file, and the .NET Nuget packaged ZipLib library encrypted my special .mp3 file right out of the box, no problem. Not even a single hour wasted. This is the real difference between one language environment and another! It's not the language itself that makes C++ a pita. Not at all. It's the freaking build environment and the eco system of commonly available libraries.
    Language developers, these days, often seem to feel compelled to implement compile time meta programming, I guess so that language users can create compiler extensions. It seems to frequently be an early mention for them. I almost never do meta programming, and I rarely come across it. I suppose if it helps produce better error messages, it's worthwhile. It might help people who are working on the library ecosystem. I hope it doesn't end up blowing up build times.
    That's the most important and relevant challenge, I think, for an up and coming computer language - solving the build environment and library ecosystem problem. We need a language with the performance of C that has a cross platform build environment and library ecosystem that rivals that of C# in the Windows environment.

  • @bjorn2625
    @bjorn2625 Před 3 měsíci

    Great interview! Subscribed.

  • @Alexander_Sannikov
    @Alexander_Sannikov Před 16 dny

    A very good podcast. I like the host, the guest and the subject.

  • @davidshipman5964
    @davidshipman5964 Před 8 měsíci

    Great interview Kris!

  • @ThePOVKitchen
    @ThePOVKitchen Před 2 měsíci +1

    I wish Andrew Kelly could come talk! His livestreams were always very interesting

  • @onoff5604
    @onoff5604 Před 6 měsíci

    Many thanks for the great discussion on so many wonderful topics. It would be helpful to further clarify what is meant by uses of the term 'complex,' 'complicated' etc.

  • @juanmamani2110
    @juanmamani2110 Před 7 měsíci +1

    INMHO Zig is new and fresh low programming language for new craftsman generation looking for get out of C classic box. By the way C is my lovely one language.
    Zig is an excelent choice.
    This 1:23 are one of the best time investment I've made in youtube! Thanks for sharing!

  • @deldia
    @deldia Před 7 měsíci

    This is good stuff. Thank you.

  • @greisboy425
    @greisboy425 Před 7 měsíci +4

    Go and Rust is not a new C (not intended to replace C) but Zig does (I watched Andrew, the man who invented Zig, on his presentation he clearly declared that "Zig is C but with problems fixed"). Zig is language clearly intended to replaced C so Zig should do his best to make it happend.

  • @RSZA011
    @RSZA011 Před 8 měsíci +3

    ok subbed , the algo has not delivered me such quality content in months ~ zig also looks alot less intimidating than I thought ! advent of code time (after I learn go)

  • @jorgeosorio1613
    @jorgeosorio1613 Před 8 měsíci +1

    Awesome channel.

  • @heathm55
    @heathm55 Před 7 měsíci

    Nice interview! Love the apature labs mug, Portal was such a great game!

    • @DeveloperVoices
      @DeveloperVoices  Před 7 měsíci

      One of the greatest! Did you hear there's another installment coming soon. Portal Prelude I think it's called. :-)

  • @matthewsheeran
    @matthewsheeran Před 5 měsíci +2

    Man I loved null terminated strings: all you gotta do is double the null bytes for UTF-16/Unicode, and make the new length a few bytes before what the pointer points to and you should be able to make your new langs like zig compatible with the old C libs. As long as you add the nulls and recount the length when crossing that api boundary and have the appropriately pre and post over buffered alloc for those extra bytes! ;-)

  • @tensorflaw
    @tensorflaw Před 6 měsíci +3

    "You cannot check statically if all allocations are freed, or rather, you can't unless you're *willing* to become Rust" - People sure do hate the borrow checker

  • @NouifrUIwefdf
    @NouifrUIwefdf Před 8 měsíci

    Enjoyed it

  • @PaulSebastianM
    @PaulSebastianM Před 28 dny +2

    Apple should sponsor Zig and perhaps add themselves an alternative (or replacement) for Objective-C. Keep Swift for high level stuff (UIs, apps, simple servers, scripting, etc.) and Zig for high performance code.

  • @Joneco
    @Joneco Před měsícem

    Ive studiee go for some time and become my togo language. Go for web is veeeeeery nice to code! Very pleasant.
    I in the next 3 months i will star studying rust and decided to go with zig as well. So i will try to do both stydies together and build same things at both languages to compare

  • @pauloalmeida2126
    @pauloalmeida2126 Před měsícem

    Never knew Dave Murray could also talk about programming languages 🤣 Jokes aside, huge fan of the channel and this episode was great!

  • @JohnPywtorak
    @JohnPywtorak Před 7 měsíci +7

    @12:11 Point of correction. This is outdated knowledge on Rust. Rust does not depend on libc, you can use musl and there are other alternatives. There is also no-std as well, you can go that route. This is more like zig than less like it. That section of the talk should be taken with caution or passed over.

    • @kristoff-it
      @kristoff-it Před 7 měsíci +1

      musl is a libc though :^) no_std is good but that takes away a good chunk of the stdlib, which is significantly different than how things work in Zig

    • @JohnPywtorak
      @JohnPywtorak Před 7 měsíci +3

      @@kristoff-it true, but musl is static and not glibc which is what the video was making a case about. The real point here is that specific divide is not as big as the video implies. This is not a point you should “choose” or look at Zig over. There is also a rust libc early in dev, don’t recall the name. I have nothing against Zig, just think the argument needs to be stronger than weaknesses of glibc.

  • @Shaunmcdonogh-shaunsurfing
    @Shaunmcdonogh-shaunsurfing Před 6 měsíci +1

    As a rust dev, am excited about Zig

  • @585ghz
    @585ghz Před 8 měsíci

    nice talk!!

  • @kayakMike1000
    @kayakMike1000 Před 7 měsíci

    51 years of excellece!

  • @FrankHarwald
    @FrankHarwald Před 6 měsíci +1

    43:00 Another problem with C++ ctors & dtors is not only that they only work in C++ & C++-like contexts, but also that they often have (at compile time) difficult to asses run -time & -space requirement on top of what's explicitly in the code, which Zig's "defer" doesn't have because it only adds static branching code on top of what is written in the code explicitly.

  • @pablomena585
    @pablomena585 Před 7 měsíci +2

    Great questions! Maybe a little intro about the speaker and who he is? just throwing some positive feedback out there 🙏

  • @galier2
    @galier2 Před 7 měsíci +2

    14:35 D also has this feature. D is now also a C compiler.

  • @FrankHarwald
    @FrankHarwald Před 6 měsíci +2

    Zig compiler devs should keep an eye open for RiscV compiler targets - especially considering that Zig is a low-level lang also aimed at embedded devices where these are increasingly common besides various ARMs & MIPS (& while also being not as bare bone as a PIC8 or 8 bit AVRs) on top of the fact that recent LLVM & GCC backends already have RiscV support so you wouldn't have to build one from scratch.

  • @midewestmond9442
    @midewestmond9442 Před 7 měsíci

    I enjoyed this

  • @user-kd2ij7te5v
    @user-kd2ij7te5v Před 7 měsíci +12

    Passing allocators seems to be overhead, but I think it is actually an awesome idea. I have used many different allocators in my projects (buffer pools, arenas, buddy systems). In Zig I could use these different allocators easily

    • @isaacyonemoto
      @isaacyonemoto Před 7 měsíci +3

      If you're not writing a library, just make your own global allocator and use it wherever you want. Nobody will get mad at you :)

  • @machine1st827
    @machine1st827 Před 6 měsíci +1

    I think the solution would be, combining the raw power of C/C++ for machine hardware control with the elegance and safety of Rust for threading in the same project. This is what I do at the moment. I will check Zig as well.