Rust & Zig Combined • Richard Feldman • GOTO 2023

Sdílet
Vložit
  • čas přidán 31. 05. 2024
  • This presentation was recorded at GOTO Copenhagen 2023. #GOTOcon #GOTOcph
    gotocph.com
    Richard Feldman - Functional Programming Language Expert & Author of “Elm in Action” @rtfeldman
    RESOURCES
    / rtfeldman
    / rtfeldman
    github.com/rtfeldman
    Links
    www.rust-lang.org
    ziglang.org
    www.roc-lang.org
    ABSTRACT
    Why would someone use both Rust and Zig in the same project? Rust is complex and famous for its borrow checker's memory safety benefits, whereas Zig is famously simple and has no borrow checker. Wouldn't a project want one or the other, rather than both together?
    The compiler for the Roc programming language intentionally uses a combination of Rust and Zig. As it turns out, the circumstances that make this a good choice are not as rare as you might think, and the differences in memory safety between Rust and Zig are also not as big as you might think.
    Come learn about the surprising benefits of combining two languages as different as Rust and Zig! [...]
    TIMECODES
    00:00 Intro
    02:45 Outline
    03:02 Why did we mix Rust & Zig?
    17:40 Memory safety in practice
    39:28 Where to draw the line?
    45:15 Outro
    Download slides and read the full abstract here:
    gotocph.com/2023/sessions/2890
    RECOMMENDED BOOKS
    Richard Feldman • Elm in Action • amzn.to/387kujI
    Dean Bocker • Don't Panic! I'm A Professional Zig Programmer • amzn.to/3ljKT8d
    Tim McNamara • Rust in Action • amzn.to/3ux2R9u
    David Drysdal • Effective Rust • amzn.to/4dAjbdX
    / gotocon
    / goto-
    / goto_con
    / gotoconferences
    #Rustlang #Ziglang #Roclang #Rust #Zig #Roc #ProgrammingLanguages #Programming #FunctionalProgramming #BorrowChecker #MemorySafety #Haskell #Concurrency #RichardFeldman
    Looking for a unique learning experience?
    Attend the next GOTO conference near you! Get your ticket at gotopia.tech
    Sign up for updates and specials at gotopia.tech/newsletter
    SUBSCRIBE TO OUR CHANNEL - new videos posted almost daily.
    czcams.com/users/GotoConf...
  • Věda a technologie

Komentáře • 25

  • @luizpbraga
    @luizpbraga Před 13 dny +26

    love his "2x video speed" energy

  • @bjorn2625
    @bjorn2625 Před 14 dny +9

    Fantastic that you’ve put this online!!

  • @ZenonLite
    @ZenonLite Před 15 dny +15

    Zig 🤝 Rust

  • @possumkeys
    @possumkeys Před 13 dny +6

    😅 I like how this was NOT a talk about Roc lang. 😂

  • @TechTalksWeekly
    @TechTalksWeekly Před 8 dny +1

    This talk has been featured in the last issue of Tech Talks Weekly newsletter 🎉 Congrats!

  • @ulrich-tonmoy
    @ulrich-tonmoy Před 13 dny +5

    Rust and Zig might be the new C++ and C (rust is not to zig what c++ is to c) to continue their legacy to further

    • @user-zy4yh8iw1f
      @user-zy4yh8iw1f Před 10 dny +1

      Do you mean rust and zig combined is the future?

    • @ulrich-tonmoy
      @ulrich-tonmoy Před 10 dny +2

      @@user-zy4yh8iw1f yep zig gives you full control where as rust gives many feature and make you do things its way just kind of like c c++

    • @user-zy4yh8iw1f
      @user-zy4yh8iw1f Před 9 dny +1

      @@ulrich-tonmoy nice take.

  • @timi_t_codes
    @timi_t_codes Před 15 dny +1

    Looking forward to this talk 🔥

  • @chewbaccarampage
    @chewbaccarampage Před 11 dny

    He probably needs to bootstrap the languag, but wants to avoid bugs in the bootstrapped compiler. It took a decade or so before Microsoft was able to build a .Net compiler in C#. I don't build compilers, but I suspect it's very common to cobble together a few tools to bootstrap a language until it's mature before rewriting the compiler in the language of choice. I did try Linux from Scratch once and it's pretty similar where you bootstrap the system with some janky tools before building the production Linux system.

    • @AGeekTragedy
      @AGeekTragedy Před 11 dny +2

      I think* I've seen another video where Richard said that he didn't have any plans to have Roc be self-hosting. I think he has a particular set of domains in mind within which he is design Roc to be a natural choice compilers just isn't one of them.
      * It's possible I'm confusing him with the Elm guy. I think it applies to both.

  • @yorailevi6747
    @yorailevi6747 Před 12 dny

    i just checked the repo for the roc compiler… Why is there a float implementation in zig? isn’t it supposed to be a hardware primitive?

    • @antonf.9278
      @antonf.9278 Před 11 dny

      How would you implement hardware primitives when targeting LLVM?
      You can either generate llvm bytecode directly or have an existing compiler do that for you.
      If it's something self-contained like floating point arithmetic and you want to do the same thing as zig, use zig.

  • @MegaCashB
    @MegaCashB Před 12 dny

    Is the video speeded up? lol

  • @abiiranathan
    @abiiranathan Před 12 dny

    I've seen this video before. Why is it now 3 days ago??? Anz it's at 2x. Anyway nice talk

  • @musicalintuition
    @musicalintuition Před 10 dny +1

    (slightly off topic) I don't know why everyone keeps saying Zig is simple. Over the years I've done a bit of x86 assembly, C, Java, JS, Haskell and Lisp, and yet, there's just something about Zig that keeps on biting me because it never works the way I expect.

  • @steveoc64
    @steveoc64 Před 14 dny

    Heaven and Hell ;)

    • @RiwenX
      @RiwenX Před 14 dny +3

      Which one is which?

    • @steveoc64
      @steveoc64 Před 12 dny

      @@RiwenX yeah, well if you need to ask….. then you are probably already neck deep in the rust koolaide, so no amount of logical discussion will bring any light to the question

    • @RiwenX
      @RiwenX Před 12 dny

      @@steveoc64 In all fairness that's just projection. You sound like a cultist

    • @user-zy4yh8iw1f
      @user-zy4yh8iw1f Před 10 dny

      ​@@steveoc64Hey, I just wanna know your opinion.

  • @NeatMemesDotCom
    @NeatMemesDotCom Před 13 dny +9

    TLDR a dude tried to cut corners while building a new programming language and ended up having to use two new languages. Jesus...

    • @antonf.9278
      @antonf.9278 Před 11 dny +3

      A yes, rust, the language you use when you want to cut corners.

  • @zcizzorhandz5567
    @zcizzorhandz5567 Před 5 dny +1

    Why tf would anyone combine Rust and Zig. Are we that bored? *Are we trying to solve problems or sing Kumbaya?*