fasterthanlime
fasterthanlime
  • Видео 52
  • Просмотров 1 861 565
I ported h2spec to Rust (also: codegen!)
To try everything Brilliant has to offer-free-for a full 30 days, visit brilliant.org/fasterthanlime - You’ll also get 20% off an annual premium subscription.
Early access: fasterthanli.me/videos/h2spec-to-rust
Follow me on Mastodon: hachyderm.io/@fasterthanlime
Support me on Patreon or GitHub: fasterthanli.me/donate
(References continue below)
Contents
00:00 Sponsor disclaimer
00:02 Intro
01:16 Current funding, thanks
01:46 HTTP compliance suites
02:51 "..I decided to port it to Rust"
04:15 Don't repeat yourself
05:02 Sponsored segment
06:16 Codegen in Go
07:11 Rust proc macros
08:44 It's not that simple
11:19 Enter rustdoc
12:23 The whole process
13:24 bindgen & friends
15:17 Outro
References
fluke on GitHu...
Просмотров: 24 132

Видео

POV: I'm on my third coffee and you just asked me how the internet works
Просмотров 104 тыс.4 месяца назад
To try everything Brilliant has to offer-free-for a full 30 days, visit brilliant.org/fasterthanlime/. The first 200 of you will get 20% off Brilliant’s annual premium subscription. This video was sponsored by Brilliant. Thanks a lot to Tris from @NoBoilerplate for last-minute voice-over work! Follow me on Mastodon: hachyderm.io/@fasterthanlime Support me on Patreon or GitHub: fasterthanli.me/d...
GitHub Actions Feels Bad
Просмотров 94 тыс.7 месяцев назад
To try everything Brilliant has to offer-free-for a full 30 days, visit brilliant.org/fasterthanlime/. The first 200 of you will get 20% off Brilliant’s annual premium subscription. This video was sponsored by Brilliant. Follow me on Mastodon: hachyderm.io/@fasterthanlime Support me on Patreon or GitHub: fasterthanli.me/donate (Reference continue below) Contents 00:00 Sponsor disclaimer 00:02 I...
YES, zig should 100% divorce LLVM ✨
Просмотров 25 тыс.Год назад
Get some e-mails fasterthanli.me/news Follow me on Mastodon: hachyderm.io/@fasterthanlime Support me on Patreon or GitHub: fasterthanli.me/donate Zig/LLVM divorce PR: github.com/ziglang/zig/issues/16270 Ladybird June 2023 update: awesomekling/status/1674481979226574849 Original Ladybird announcement: awesomekling.github.io/Ladybird-a-new-cross-platform-browser-project/ Contents 00:0...
I lived!
Просмотров 21 тыс.Год назад
Get some e-mails fasterthanli.me/news Follow me on Mastodon: hachyderm.io/@fasterthanlime Support me on Patreon or GitHub: fasterthanli.me/donate Just a quick health update and some light announcements. TL;DR I'm alive and trying to get stuff done. Also, mailing list! I know, I know, what year is it. Well, it's 1993 and I'm three years old. Goo goo. Ga ga. Aren't you sorry you asked. Subtitled ...
Silly Fast Fresh Deploys with Rust (Part 7)
Просмотров 4,4 тыс.Год назад
This video is sponsored by controlplane.com/ All the code is available here: github.com/fasterthanlime/refresh Follow me on Mastodon: hachyderm.io/@fasterthanlime Support me on Patreon or GitHub: fasterthanli.me/donate Fresh web framework: fresh.deno.dev/ Contents 00:00 - Start 00:04 - Recap 00:46 - Making our application do something useful 01:27 - Typing JSON API responses (feat. Copilot) 02:...
Silly Fast Fresh Deploys with Rust (Part 6)
Просмотров 2,1 тыс.Год назад
This video is sponsored by controlplane.com/ Follow me on Mastodon: hachyderm.io/@fasterthanlime Support me on Patreon or GitHub: fasterthanli.me/donate Fresh web framework: fresh.deno.dev/ Contents 00:00 - Start 00:04 - Recap 00:33 - Fetching revisions and restarting Deno 01:19 - Rust's Child API vs Linux processes 02:51 - Downloading a new revision from Postgres 04:15 - The "." path element o...
Silly Fast Fresh Deploys with Rust (Part 5)
Просмотров 1,9 тыс.Год назад
This video is sponsored by controlplane.com/ Follow me on Mastodon: hachyderm.io/@fasterthanlime Support me on Patreon or GitHub: fasterthanli.me/donate Fresh web framework: fresh.deno.dev/ Contents 00:00 - Start 00:04 - Recap 00:33 - Creating a production DB on Amazon RDS 02:00 - Setting the serve mode for the proxy 02:14 - Creating a .dockerignore file 02:48 - Docker host mode networking 03:4...
Silly Fast Fresh Deploys with Rust (Part 4)
Просмотров 2,8 тыс.Год назад
This video is sponsored by controlplane.com/ Follow me on Mastodon: hachyderm.io/@fasterthanlime Support me on Patreon or GitHub: fasterthanli.me/donate Fresh web framework: fresh.deno.dev/ Contents 00:00 - Sponsor disclaimer 00:04 - Recap 00:39 - Serving HTTP with axum 02:45 - Postgres arrays in sqlx 03:42 - Deserializing Postgres rows 04:41 - The Postgres unnest function 05:22 - Implementing ...
Silly Fast Fresh Deploys with Rust (Part 3)
Просмотров 5 тыс.Год назад
This video is sponsored by controlplane.com/ Follow me on Mastodon: hachyderm.io/@fasterthanlime Support me on Patreon or GitHub: fasterthanli.me/donate Fresh web framework: fresh.deno.dev/ Contents 00:00 - Sponsor disclaimer 00:04 - Recap 00:33 - Connecting to Postgres with sqlx 01:02 - Creating our database schema 02:33 - Listing files with the ignore crate 03:08 - Hashing files with seahash ...
A quick health update
Просмотров 20 тыс.Год назад
A quick health update
Silly Fast Fresh Deploys with Rust (Part 2)
Просмотров 8 тыс.Год назад
Silly Fast Fresh Deploys with Rust (Part 2)
Fine, I'll tell you how feature flags work (but I'll brag about my Rust blog engine while doing it)
Просмотров 17 тыс.Год назад
Fine, I'll tell you how feature flags work (but I'll brag about my Rust blog engine while doing it)
Silly Fast Fresh Deploys with Rust (Part 1)
Просмотров 23 тыс.Год назад
Silly Fast Fresh Deploys with Rust (Part 1)
I built my own memory profiler (in Rust, on Linux)
Просмотров 60 тыс.Год назад
I built my own memory profiler (in Rust, on Linux)
strace feels like magic - let’s fix that (with Rust)
Просмотров 49 тыс.Год назад
strace feels like magic - let’s fix that (with Rust)
Let's make an htop-like in your browser (with Rust)
Просмотров 82 тыс.Год назад
Let's make an htop-like in your browser (with Rust)
Go telemetry could've been useful
Просмотров 26 тыс.Год назад
Go telemetry could've been useful
Why does this Rust program leak memory?
Просмотров 57 тыс.Год назад
Why does this Rust program leak memory?
How to be different
Просмотров 17 тыс.Год назад
How to be different
The Yellow Room
Просмотров 9 тыс.Год назад
The Yellow Room
10 Reasons Not To Use Rust (The Whole Truth)
Просмотров 197 тыс.Год назад
10 Reasons Not To Use Rust (The Whole Truth)
C++ vs Rust: which is faster?
Просмотров 385 тыс.Год назад
C vs Rust: which is faster?
We need to talk about Dropout
Просмотров 13 тыс.Год назад
We need to talk about Dropout
How does the detour crate work?
Просмотров 19 тыс.Год назад
How does the detour crate work?
This is a video about video
Просмотров 14 тыс.Год назад
This is a video about video
Getting good at SNES games through DLL injection
Просмотров 17 тыс.2 года назад
Getting good at SNES games through DLL injection
I'm in ur address space
Просмотров 25 тыс.2 года назад
I'm in ur address space
Computers as a social construct
Просмотров 30 тыс.2 года назад
Computers as a social construct
Messing With The Recipe
Просмотров 22 тыс.2 года назад
Messing With The Recipe

Комментарии

  • @porky1118
    @porky1118 16 часов назад

    1:20 I knew this would be a parody ;)

  • @xX_dash_Xx
    @xX_dash_Xx 3 дня назад

    please turn down the background music bro. you speak so softly and soy-ley that I can't fucking hear a word

  • @Khytau
    @Khytau 6 дней назад

    genius

  • @friedrichmyers
    @friedrichmyers 7 дней назад

    Gettings segfaults is a skill issue tbh

  • @craiggilchrist
    @craiggilchrist 10 дней назад

    Love this. The opening music reminds me of Monkey Island and the communism comment floored me 😆

  • @poutineausyropderable7108
    @poutineausyropderable7108 11 дней назад

    Original is better! The segfault freeze is funny though.

  • @NazarMalyy
    @NazarMalyy 15 дней назад

    🤣🤣🤣 nice prank 😂😂😆😃🤩😍👍

  • @ggyy247
    @ggyy247 15 дней назад

    please tell me bgm...thanks

  • @snirambaya9587
    @snirambaya9587 16 дней назад

    Guys I'm new to C what is segfault I'm scared 💀

  • @rockapedra1130
    @rockapedra1130 17 дней назад

    This optimization stuff is absolute insanity! How anything works Is a miracle!

  • @HadenMiles
    @HadenMiles 18 дней назад

    So wholesome 💜

  • @edelweiss6634
    @edelweiss6634 18 дней назад

    Sure miss the good ol' days of lyrics being posted in the description or top comments, rather than dead links and needing to be manually copied from the subtitles in the video itself. Wish we could turn back time...

  • @inukithesavage828
    @inukithesavage828 18 дней назад

    Dat ending tho

  • @srijanraghavula
    @srijanraghavula 23 дня назад

    Here's the simple answer to the title: C and I didn't watch the whole video.

  • @timokreuzer1820
    @timokreuzer1820 23 дня назад

    That's a 10x cat you got there.

  • @khrttartrahht4188
    @khrttartrahht4188 26 дней назад

    Ok, so you don't really know c++ and you bash it because it was hard for you to use a trivial feature or two. E.g. operator overloading. Not very useful. The real differences starts where you get to memory management: rust has cute but stupid-limiting rules, c++ has more difficulty with pseudo-aliasing. You are not talking about either because... you are more interested in inconsequential semantic crap? Ok, lol

  • @haze6277
    @haze6277 26 дней назад

    I'm not. I'm on of these who uses non x86, non arm and non Linux. So all I have is a custom gcc/llvm based toolchain. And I want multiplatform programs

  • @johnlewis794
    @johnlewis794 27 дней назад

    @fasterthanlime couldn't you have made a proc macro at that you call at the crate level on `httpwg` that iterates through each module looking for tests matching your criteria and writes an impl block for some type that builds up your test suite? that way it recurses properly without being stateful and you only have to write one proc macro. I know it would still have to parse a lot of syntax but you could probably internally just feed syn individual modules instead of the whole crate

  • @IngrownMink4
    @IngrownMink4 29 дней назад

    I couldn't disagree more with the video. Electron is a horrible technology, and one of the reasons why web pages today tend to work properly only in Chromium-based browsers, and facilitate Google's monopoly on being able to dictate its own rules. Electron, as you rightly mention, facilitates and democratizes the use of many advanced functions that would be difficult to implement with the libraries of an OS, so far I agree. But you forget to mention that each app written in Electron has its own instance, that is, each one uses a DIFFERENT embedded Chromium engine. If you have Spotify, Discord, Slack and the Xbox app open, you are literally using 4 non-optimized instances of the same technology. And my question is, why don't they share the same web engine? That's when I think you should talk about Tauri. Tauri has a smarter approach, because it uses the OS WebView in order to render the content, and thus uses the computer resources efficiently. Because although you don't mention it in the video, Electron wastes a lot of CPU cycles in the background, spends a lot of energy irresponsibly, and doesn't integrate properly wherever it runs. And I agree that many web APIs work better than their native OS counterpart. But that doesn't mean Electron is the ideal choice for building apps. In fact, it's the worst possible and least user-friendly option. You say that in Windows there are too many frameworks and a developer probably doesn't know which one to use. It's a reasonable argument, but it's funny that you use that pretext to push the use of Electron. Wouldn't it be fairer to require Microsoft to go with an official framework, instead of just using Electron for anything? And with Linux, you're lying, there are agnostic frameworks. Apart from this, Electron is very difficult to optimize. It supports too many unnecessary things that, even if you try to deny it, have a very negative impact, especially for users with low-resource PCs. This also has an impact on the size of the program. 500MB may be reasonable for a complex program, but it is unacceptable for simple apps, especially considering that if every developer opted for Electron, the average user would have 1GB occupied by only 2 applications. If you think 1GB is not enough, I remind you that Crash Bandicoot weighs 429MB, so you can't defend that a calculator in Electron weighs more than a videogame. I just hope you don't have to use an app written in Electron on a less powerful device.

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

    how do you learn about this concepts

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

    As a C dev, I concur. Peops who don't need control should use rust, those who do should use C. I always need control, on the other hand I've recently figure out how to do thread safety without ever forcing the dev to call lock/unlock on something. requires va_list, enumed calls, global indices and hidden semaphores/mutices. Any index assigned is by default owned by the thread that requested it. Any index that does not have a semaphore/mutex assigned is only accessible by the owning thread - which is the default case for any index assigned, just have to manually request a semaphore/mutex be assigned at the time of acquiring the index. The rest is handled by a mid-wrapper for va_list (the top level being the main one called by devs, the bottom being the handler for the function enums). The midwrapper denies access to any thread but the owning thread if no semaphore/mutex is assigned, otherwise it tries to lock the index for the thread and if successful passes onto the bottom level handler. If unsuccessful it just tells the caller it failed to gain synchronisation access. As for buffers you should be using read/write like functions for the actual writing and use global indices for referencing the buffer rather than pass the buffer address around. By using indices and read/write like functions it becomes impossible to do a buffer overflow and you should only use malloc/free for temporary buffers to read/write to/from. Sure the temporary buffers can still have buffer overflows but they're a heck of a lot easier to catch the source of the segfault for than ones with longer lifespans. The ones with longer lifespans should always use mmap/VirtualAlloc to avoid being near the malloc page/s

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

    what an incredible amount of effort to put into ... a video essay about github actions.

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

    Always when I got a segment fault I come back to this video. So basically I am coming back here a lot

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

    Awesome

  • @cunningham.s_law
    @cunningham.s_law Месяц назад

    for some reason I thought it just loaded it's own glibc wrappers with LD_PRELOAD but that would not work if you were to call the syscalls manually instead of with glibc

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

    I FOUND IT, this was used as a base to troll vedal and now im stoked i found where it came from

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

    i heard a whole lot of nothing

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

    Hey, it's probably a bit odd, but do you upload your music anywhere ? I had the end credit song stuck in my head for the past couple of days.

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

    I have cats I find outside. They are extremely friendly and demand attention.

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

    iosevka font mentioned(/used (same thing)) 🎉🎉🎉

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

    You're very irresponsible and dumb in your support of this, but that's your entire personality too, so...

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

    People also might not want to run "trust me bro" binaries on their dev environment...

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

    Internet audio is the final frontier

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

    Where did you get your shirt?

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

    AS a 1 year later comment(the c++ syntax i will talk about was intrdouced in c++20 so it still would have worked) in c++ you can also automatically let the compiler implement operator<=>, which also implements automatically all the classic comparison operators

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

    The short answer: it doesn't really matter. These types of micro-optimizations are only relevant for very, very specific use cases. People are writing production code in Java, Python, hell even JavaScript. Sometimes the C++ compiler will generate better code and sometimes Rust. I would say C++ has a slight advantage because of how long it's been out there but on the other side Rust can potentially surpass it because of how explicit it is: the compiler has just more information and safety guarantees and can thus find more shortcuts.

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

    Amazing channel

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

    Thanks for validating our use of code generation @fasterthanlime 😆 Our use case is exposing a generic Rust API to Python through pyo3 which does not support generics (and probably never will). On the Python side we use enums that provide variants for all known implementers of a trait and our code generator generates the hundreds of required match arms. We generate the code once and ship it.

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

    The result would be different on ARM64, so try that on Raspberry Pi 5 later

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

    Big fan of using intermediate data formats for crimes. Beautiful work!

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

    “A series of unfortunate events” is such an understatement

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

    That was a great ad

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

    That little pink ear at 6:56 made me happy. I once had a lovely white cat that ALWAYS wanted to sit on top of people :)

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

    Due that outro was first class!

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

    The purity of proc macros is a bit unfortunate even if understandable. A while ago I wanted to do some code injection into an asmjs app. I wanted to do this semi-automatically by annotating the rust library with proc macros and then parsing both my lib as well as the asmjs source and patching it based on metadata generated from the proc macros. In the end I ended up using a feature flag in the proc macro that would either modify the injected function and pass in some extra values or generate calls to the inventory crate. This would then be collected into a json by using the example(?) binary type in cargo.

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

    I swear that "Life is too short for long builds" was a slogan for some product but for the life of me I can't find it.

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

    "I decided port it to rust" then "don't repeat yourself" Okey okey

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

    You could also use libtest-mimic or similar to build a custom test harness that has test cases generated in runtime (from the central test registry you could have collected)

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

    The outro really caught me by surprise, really informative and interesting video

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

    re: git hooks @ 14:11, aren't git hooks "disabled" by default? I thought that they are not committed to the repo and you have to copy them over manually (or use something like the `pre-commit` tool). Which makes sense, because they can run code without you knowing.

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

      Now I see that you're using cargo-husky, so I guess you're actually referring to naughty contributors who don't run tests 😅