Rust & Zig Combined • Richard Feldman • GOTO 2023

  Рет қаралды 67,969

GOTO Conferences

GOTO Conferences

Күн бұрын

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.
kzfaq.info...

Пікірлер: 30
@luizpbraga
@luizpbraga Ай бұрын
love his "2x video speed" energy
@ZenonLite
@ZenonLite Ай бұрын
Zig 🤝 Rust
@bjorn2625
@bjorn2625 Ай бұрын
Fantastic that you’ve put this online!!
@possumkeys
@possumkeys Ай бұрын
😅 I like how this was NOT a talk about Roc lang. 😂
@ulrich-tonmoy
@ulrich-tonmoy Ай бұрын
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 29 күн бұрын
Do you mean rust and zig combined is the future?
@ulrich-tonmoy
@ulrich-tonmoy 29 күн бұрын
@@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 29 күн бұрын
@@ulrich-tonmoy nice take.
@timi_t_codes
@timi_t_codes Ай бұрын
Looking forward to this talk 🔥
@TechTalksWeekly
@TechTalksWeekly 27 күн бұрын
This talk has been featured in the last issue of Tech Talks Weekly newsletter 🎉 Congrats!
@chewbaccarampage
@chewbaccarampage Ай бұрын
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 Ай бұрын
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.
@brendanhansknecht4650
@brendanhansknecht4650 8 күн бұрын
Roc has no plans to self host. Rust is a correct language for the compiler. Zig would be another great choice. Roc isn't the right choice.
@yorailevi6747
@yorailevi6747 Ай бұрын
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 Ай бұрын
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.
@brendanhansknecht4650
@brendanhansknecht4650 8 күн бұрын
We don't implement a float in zig. We do implement `Dec` in zig. That is a fixed point decimal type that is more useful for correctness of certain classes of code.
@MegaCashB
@MegaCashB Ай бұрын
Is the video speeded up? lol
@steveoc64
@steveoc64 Ай бұрын
Heaven and Hell ;)
@RiwenX
@RiwenX Ай бұрын
Which one is which?
@steveoc64
@steveoc64 Ай бұрын
@@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 Ай бұрын
@@steveoc64 In all fairness that's just projection. You sound like a cultist
@user-zy4yh8iw1f
@user-zy4yh8iw1f 29 күн бұрын
​@@steveoc64Hey, I just wanna know your opinion.
@JaconSamsta
@JaconSamsta Күн бұрын
@@steveoc64 Oh wow, what a well reasoned point. Definitely doesn't make you look like an absolute tool
@abiiranathan
@abiiranathan Ай бұрын
I've seen this video before. Why is it now 3 days ago??? Anz it's at 2x. Anyway nice talk
@musicalintuition
@musicalintuition 29 күн бұрын
(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.
@brendanhansknecht4650
@brendanhansknecht4650 8 күн бұрын
I think it is a competitive statement . Simple compared to c++ and rust. That said, zig is still young and changing. Overall, it has a pretty simple to learn core with less sharp edges than C.
@NeatMemesDotCom
@NeatMemesDotCom Ай бұрын
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 Ай бұрын
A yes, rust, the language you use when you want to cut corners.
@zcizzorhandz5567
@zcizzorhandz5567 24 күн бұрын
Why tf would anyone combine Rust and Zig. Are we that bored? *Are we trying to solve problems or sing Kumbaya?*
@maxmustermann5590
@maxmustermann5590 17 күн бұрын
There's actually a nice talk about exactly that question. GoThere Composiums or something like that
Intro to the Zig Programming Language • Andrew Kelley • GOTO 2022
50:14
Is it Cake or Fake ? 🍰
00:53
A4
Рет қаралды 19 МЛН
ROCK PAPER SCISSOR! (55 MLN SUBS!) feat @PANDAGIRLOFFICIAL #shorts
00:31
I Interviewed Uncle Bob
1:11:07
ThePrimeTime
Рет қаралды 304 М.
Rust and RAII Memory Management - Computerphile
24:22
Computerphile
Рет қаралды 216 М.
Programming's Greatest Mistakes • Mark Rendle • GOTO 2023
51:24
GOTO Conferences
Рет қаралды 80 М.
So You Think You Know Git - FOSDEM 2024
47:00
GitButler
Рет қаралды 993 М.
CppCast Episode 342: Zig with Andrew Kelley
57:45
CppCast
Рет қаралды 14 М.
98% Cloud Cost Saved By Writing Our Own Database
21:45
ThePrimeTime
Рет қаралды 304 М.
All Rust features explained
21:30
Let's Get Rusty
Рет қаралды 285 М.
Нашел еще 70+ нововведений в iOS 18!
11:04
Секретный смартфон Apple без камеры для работы на АЭС
0:22