Тёмный

Statically Typed APIs with Poem and Rust 

No Boilerplate
Подписаться 239 тыс.
Просмотров 86 тыс.
50% 1

Today I'm going to make some web service recommendations, mixing some of my favourite rust crates together into something that I use across most of my Rust projects.
The stack I'm going to talk about today isn't the best stack, nor most fully featured or fanciest.
It's my favourite stack, it showcases what rust is GREAT at, and it focusses on correctness above all else.
❤️ If you would like to support what I do, I have set up a patreon here: / noboilerplate - Thank you!
📄 All my videos are built in compile-checked markdown, transcript sourcecode available here github.com/0atman/noboilerplate this is also where you'll find links to everything mentioned.
🖊️ Corrections are in the pinned ERRATA comment.
🦀 Start your Rust journey here: • How to Learn Rust
👕 Bad shirts available here www.teepublic.com/user/no-boi...
🙏🏻 CREDITS & PROMO
My name is Tris Oaten and I produce fast, technical videos.
Follow me here / 0atman
Website for the show: noboilerplate.org
Come chat to me on my discord server: / discord
If you like sci-fi, I also produce a hopepunk podcast narrated by a little AI, videos written in Rust! www.lostterminal.com
If urban fantasy is more your thing, I also produce a podcast of wonderful modern folktales www.modemprometheus.com
👏🏻 Special thanks to my patreon sponsors:
- JC Andrever-Wright
- Miah Beach
And to all my patrons!

Опубликовано:

 

20 июл 2023

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 283   
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
ERRATA - 1:01 We miss you Aaron, we need you now more than ever ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-9vz06QO3UkQ.html - 6:15 This is correct: map_err() takes a function, and InternalServerError() IS a function, albeit a confusingly-named one. docs.rs/poem/1.3.57/poem/error/fn.InternalServerError.html
@nathan44u
@nathan44u 10 месяцев назад
6:15 map_err should take a closure. Also prefer returning the raw error and mapping it externally with the framework so the actual error could be logged.
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
@@nathan44u Thank you so much - wild that that example is from the official docs and compiles fine!
@netfri25
@netfri25 10 месяцев назад
in 6:15 , the map_err isn't an error, it's a function so you can pass it instead of creating a closure
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
@@netfri25 oh great! Good to know the poem exmapl WAS right!
@sparrownauts
@sparrownauts 10 месяцев назад
what is the http cli you are using to test the apis
@codetales
@codetales 10 месяцев назад
Sqlx tapping into the compiler to validate SQL is deep magic. You're making me want to write web apps just to get a look at all this witchcraft.
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
All apps probably need a little db, dive in!
@azaleacolburn
@azaleacolburn 10 месяцев назад
It’s a powerful macro system
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
@@azaleacolburn Sure is! My video on the macro system is here, if you're interested ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-MWRPYBoCEaY.html
@azaleacolburn
@azaleacolburn 10 месяцев назад
@@NoBoilerplateI know, I've seen it multiple times. Love your content, keep up the good work!
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
@@azaleacolburn thank you so much! 🙂
@tsalVlog
@tsalVlog 10 месяцев назад
Thank you for the tribute and mention of Aaron. I get so mad at people who trample on the things he's created; he was a good dude who only wanted what was supposed to be free information to actually be .. free.
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
Markdown and RSS literally run my life. it's been 10 years already! We need him now more than ever.
@LinkEX
@LinkEX 10 месяцев назад
@@NoBoilerplate Seconded. My daily notes are in markdown and RSS is how I get my podcasts. His story really reads like a classic tragedy in a modern setting. While trying to not make things too melodramatic: In a bittersweet way, among the many things wrong in our current culture, he is a reminder that there are good people out there. And, even if they get overwhelmed or screwed over, their good deeds can still go a long way.
@fumano2679
@fumano2679 8 месяцев назад
Who is aaron? I dont want to be disrespectful, just have no clue.
@NoBoilerplate
@NoBoilerplate 8 месяцев назад
@@fumano2679 boingboing.net/2013/01/12/rip-aaron-swartz.html
@forresthopkinsa
@forresthopkinsa 4 месяца назад
His legacy is tainted by what Marak did with Faker.js and Colors.js - distributing malware through open source channels is not an effective form of political protest
@adamd0ggg2
@adamd0ggg2 10 месяцев назад
I don't really get a chance to use Rust, but learning it made me a better TS developer. My codebases now use deeply immutable objects and zod for runtime validation. When it comes to making API calls its like the KGB. "Trust, but verify" I return errors instead of throwing them too.
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
YES! This is how I felt after learning Haskell at the start of my python career!
@Rudxain
@Rudxain 10 месяцев назад
Me too! I've started using generics much more than overloads. I use the rust naming conventions (such as snake_case) for custom vars, and camelCase for stuff that behaves like built-in JS stuff. I've learned to use some FP constructs to avoid using `let` instead of `const` (such as IIFEs, while we wait for `do` expressions). I've learned to modularize my code, and I even write "boilerplate" to make my code safer and more readable (such as implementing a basic `range` generator, to do for-loops like in Rust and Python. Of course, I only do this for "small projects" where importing a whole lib is inconvenient). And more! Learning Rust literally changed my way of reasoning about programs, and it changed my life (not in a *EXTREME RADICAL* way, but considerably enough)
@ItsVasl
@ItsVasl 10 месяцев назад
I'm slowing getting into rust using your videos, these rust videos are so underrated!
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
You're too kind!
@theherk
@theherk 10 месяцев назад
I think they're not known or consumed as much as they should be; needs more exposure. However, I think they're rated very highly by the community. All the top Rust voices seem to speak very highly of this content, as they should.
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
@@theherk that's so wonderful to hear!
@noisetide
@noisetide 10 месяцев назад
@@theherk No untruthful words here. The content is great!
@LinkEX
@LinkEX 10 месяцев назад
5:00 Wow! Congratulations and respect on taking that step, and best of luck to you in the future. Your content stands out to me for being both unique and high in quality: A distinct style with a clear structure that shows technical expertise and practicality in the matter, while still integrating your personal (occasionally uncommon, yet intriguing) preferences.
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
Thank you so much! You're very kind to say
@ChrisPatti
@ChrisPatti 7 месяцев назад
Really love your videos! The perfect length and information density!
@NoBoilerplate
@NoBoilerplate 7 месяцев назад
Thank you!
@eboatwright_
@eboatwright_ 10 месяцев назад
This is amazing, also congrats on 100k+! You blew past that milestone
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
THE PLAY BUTTON IS ARRIVING NEXT WEEK :-D
@eboatwright_
@eboatwright_ 10 месяцев назад
@@NoBoilerplate WOOOOO!!
@hmbil694
@hmbil694 10 месяцев назад
I think it would be really cool to cover Leptos in the UI stack talk. It’s a very interesting framework that and I think you’d enjoy it
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
Oh I'm familiar, it's not mature enough for me to recommend yet. But you bet I'll talk about it when it is!
@JOHNDATGOONV2
@JOHNDATGOONV2 10 месяцев назад
Yes! I’d love to hear your thoughts on Leptos. I love it, I’ve been using it for a product that I plan to launch later this year, I think it’s plenty stable!
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
@@JOHNDATGOONV2 That's the thing with Rust code - it's pretty much all stable! XD Joking aside, I think it's a great tech choice for a project you'd launch a bit later on, perf!
@necauqua
@necauqua 10 месяцев назад
Hah, I did some work a few years back on what-would-become the activej framework :) Yes the uber-optimization down to writing specific java code that would get JIT-ed to specific machine code was something that they did - not me, I was a student, too dumb for that part of the thing, at least at the time - ok one thing I worked on was the dependency injection thing, that part I'm proud of lol Also the magic specializer which converts DSL code into handwritten-like bytecode at startup, essentially getting those sweet zero-cost abstractions in Java 🙃
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
SOUNDS LIKE A NIGHTMARE XD
@necauqua
@necauqua 10 месяцев назад
@@NoBoilerplate honestly from what I remember, it's relatively not bad, and I really liked the highlevel APIs and DSLs, imo (still) they are close to the best thing you can get in Java (ew, Java) However, there was a moment when I committed something to master that broke the tests (yes we rebased-and-committed straight to master) and the guy was almost yelling at me for not running them before pushing (I forgor 💀) and I was trying to suggest "um we can setup like an automated thing that would run the tests whenever you push something [to master]" - not yet knowing at the time what CI is or what are the better practices of it omg - and they didn't have that, and I just looked at the activej repo - they still don't
@RogerValor
@RogerValor 10 месяцев назад
@@necauqua to be fair, most companies just started investing into CI/CD in the last few years, as it only started to proliferate with stuff like gitlab. I know the more wealthy java houses I worked with decades ago had their own build pipelines already with CVS and SVN, but testing was still often done with manual processes or only around releases.
@ETBCOR
@ETBCOR 10 месяцев назад
There are so many, but one of the things I LOVE about your videos is the blue line at the bottom to indicate slide progress. **chef's kiss**
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
Thanks! A few people don't like it, but most do! I like to always know how far through a video I am, and touching/clicking on the screen all the time doesn't do it for me!
@hartvenus
@hartvenus 10 месяцев назад
Was binging your videos and this came up fresh from the oven!! Thanks for all the quality, time-respecting content.
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
My pleasure, thanks for your nice comment :-)
@alangamer50
@alangamer50 10 месяцев назад
Sqlx compile time checking is pure dark magic and I love it
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
SO good right!
@kaushikkumarbora
@kaushikkumarbora 10 месяцев назад
Adding rust to my resume to become one among the elite
@thebaconbreadful
@thebaconbreadful 10 месяцев назад
I'm blown away what rust can to again and the reason I am is that you can get across what's special about it really well. You are great at simplifying things. Maybe you someone outside the field of web dev could have benefited from this skill by you explaining a little more of the server client structure of the web upfront? Just a thought. Having experience in this field it was really pleasant to follow. PS: I still would wish for chapter marks.
@sasha35719
@sasha35719 10 месяцев назад
Amazing videos! They slowly got me into rust
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
Wonderful!
@papamegamind
@papamegamind 10 месяцев назад
the OpenAPI one looks really nice, i wish axum did something like this
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
Search and ye shall receive crates.io/crates/axum-swagger-ui Of course, they're not first-party, which was my delight when finding poem, but I bet there's others!
@papamegamind
@papamegamind 10 месяцев назад
@@NoBoilerplate LETS GOO, I will check it out
@jakobankarhem6281
@jakobankarhem6281 10 месяцев назад
I’m using utoipa with axum in a project. It is framework agnostic and have similar macros as shown in this video.
@RogerValor
@RogerValor 10 месяцев назад
@@jakobankarhem6281 that sounds interesting. especially since axum-swagger-ui seems to only adding swagger ui, but utoipa allows decorating the views.
@NewLondonMarshall
@NewLondonMarshall 10 месяцев назад
You're incredible, thank you for your videos they are so good!
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
You're too kind, thank you so much!
@Turalcar
@Turalcar 9 месяцев назад
My main problem with picking a stack is that it should be easier to make your own. A reasonably good async framework should be possible without unsafe using only the standard library. And my brain almost broke trying to convert Pin to Pin (I accept that this one might need some unsafe).
@masoodahmad3312
@masoodahmad3312 3 месяца назад
Please make more videos on the frontend side. Rust options vs react,svelte etc vs htmx or any combination
@Dev-Siri
@Dev-Siri 9 месяцев назад
I make stacks by planning their acronyms. like the FAST stack (F)lutter (A)ctix (S)velte (T) ypeScript I never used it, but I have to say its my favourite to look cool.
@isaacdruin
@isaacdruin 10 месяцев назад
I just started learning Rust, and even the configs and basic boilerplate looks intimidating. I'm defiantly not going to be leaving my SvelteKit safe space in the front end for a long time, but the Rust ecosystem for backend looks like it's worth my time.
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
Totally understand, it is a bit intimidating! Whenever you want to learn, here's my video for teaching yourself Rust: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-2hXNd6x9sZs.html
@isaacdruin
@isaacdruin 10 месяцев назад
@@NoBoilerplate thank you :)
@OrbitalCookie
@OrbitalCookie 10 месяцев назад
I can't get over of sqlx accessing the DB at COMPILE TIME. This feels so wrong. All my programmer instincts are screaming that this is a path of madness.
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
Oh it would be TERRIBLE to do this in any other language. But Rust is so comprehensive that it can do these impossible things, see my video: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-MWRPYBoCEaY.html
@LuisCassih
@LuisCassih 10 месяцев назад
@@NoBoilerplate I understand, but what happen if I don't have a local database? it wont compile? so if I'm working at a large company with a large app/db, and I don't have access to replicate a local database (because there's a highly confidential layer of security and you can only do a query to a sandbox limited db where you need to access via website), I wont be able to code? It may be an edge case, but it's based on the company I'm currently working on, it's a pain in the ass to work with sql queries.
@mustafazakiassagaf1757
@mustafazakiassagaf1757 10 месяцев назад
​@@LuisCassihthere's sqlx offline mode where it checks and save the result to a metadata
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
@@LuisCassih It's not an edge case - CI would suck if you had to have a db in there right? SQLx has this covered, I talk about it in detail here in the video I pinned when I introduced sqlx, here: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-JIvKgSyvtxI.html
@LuisCassih
@LuisCassih 10 месяцев назад
oh, that's a nice feature, I can even create schemas without even accessing the db. Thanks both of you for the insight.
@kinositajona
@kinositajona 10 месяцев назад
Me: axum is the clear winner. Also Me: what's this POEM all about now????
@kinositajona
@kinositajona 10 месяцев назад
Rust library selection is the ultimate ADHD time sink. lol
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
Yeah, there's a 'winner' but they're ALL wildly fast, that's why I put the normal frameworks down the bottom for context :-D
@angelurena
@angelurena 7 месяцев назад
I love your videos! I came across Poem when looking for a Rust web framework that had good OpenAPI support, and seeing your “endorsement” of it makes me more confident in choosing it.
@NoBoilerplate
@NoBoilerplate 7 месяцев назад
it's SO lovely to work with!
@ch1n3du3
@ch1n3du3 10 месяцев назад
Thanks for another amazing video, I wanted to know if there was something that specifically caught your eye with poem over say axum or actix?
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
the first-party openapi plugin - it's lovely!
@Tszyu01
@Tszyu01 10 месяцев назад
Appreciate your video. Definitely nice that OpenAPI is built into poem. If I was going to bet on a rust api framework, to me it would be Axum. I enjoyed working in Axum and seems as closest as expressjs as I could find so far.
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
No betting needed - there's different frameworks for different purposes! Axum is indeed very good.
@absolutejam
@absolutejam 10 месяцев назад
Awesome video! I've been using the majority of these and the rest have been on my list to tackle next. Absolutely love the channel and the quality of the videos you put out! Regarding Poem - I actually recently discovered the library/ecosystem after I'd started my first project using Actix & Utoipa for OpenAPI. I had a few concerns and wondered if you have hit any of these? The first was the much much smaller following for this library, and I (probably naively) perceived that the library had less activity. As well as this, I found that the docs aren't as good, as they're mostly just API docs & examples (but the examples are high quality). And my last issue was that I was having some major headaches with converting between error types in the handlers, which was much easier in Actix.
@absolutejam
@absolutejam 10 месяцев назад
Also, forgot to say that the Poem openapi was much nicer than Utoipa as the schema was defined as code instead of alongside the code 👍
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
That's the big difference, poem-openapi is extremely DRY
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
Yeah, the docs could use some work (maybe you or I should do that!) but the examples are great, that's how I learned.
@gertrudessampaio8689
@gertrudessampaio8689 6 месяцев назад
Your English and your voice are wonderful, I am learning English and I will try to imitate you, you have the most beautiful English I have ever heard
@NoBoilerplate
@NoBoilerplate 6 месяцев назад
You are very kind! I have practised public speaking a lot, starting when I was at university - practice makes perfect! I also practised making a little weekly fiction podcast for 3 years before starting this channel. I talk about this all in this video, if you're interested: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-fzNk_1xLIKI.html
@seannewell397
@seannewell397 10 месяцев назад
Dang this is thorough af.
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
Thank you!
@lesptitsoiseaux
@lesptitsoiseaux 5 месяцев назад
First time on your channel. I do love your concise, informative and pleasant style so far. Could you consider doing a video for startups? You see, for example, we're writing an app with a Flutter front end, which relies heavily on a geographical map component and on webrtc for video calls. The great void in RU-vid is found, for us, in choosing our backend stack and opting for the cheapest possible hosting (cloud vs our own hardware) to allow ramp up until profitability or proof of concept is achieved. Thereafter funding would, one would hope, come elegance in design and scale. There's very few people with the expertise to talk about how to initially scale up fast, cheap and inevitably dirty to a degree. It could be a fun video I believe. Anyway, thank you for your videos, I'll sub now!
@NoBoilerplate
@NoBoilerplate 5 месяцев назад
You could literally use Poem-openapi for that, as I say in this video, Rust is Cheap: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-4dvf6kM70qM.html
@user-er8iy5dg8b
@user-er8iy5dg8b 10 месяцев назад
I’m currently learning how to use Warp, I’d try to implement this using warp
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
Nice! There's no warp first-party openapi plugin, but people have told me about docs.rs/utoipa/latest/utoipa/ It's less DRY than poem-openapi, but should be a good starting point!
@tabiasgeehuman
@tabiasgeehuman 10 месяцев назад
1:30 out of curiosity: why colour-eyre over something like error-stack? Error stack preserves the underlying type used in the error and still has all the niceities of color-eyre with a few extra features. I personally don't see why somebody would use eyre over error-stack if they are focusing on correctness
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
Interesting! I wasn't aware of error-stack, probably because it's just a year old. I trust anyhow a LOT, it's the #1 results handler in Rust, and so Eyre being a fork I don't have to think too much about before recommending. I will follow error-stack with great interest, thank you!
@tabiasgeehuman
@tabiasgeehuman 10 месяцев назад
@@NoBoilerplate btw, error-stack has full support for Eyre and anyhow! You just need to enable the feature. It's based around the same idea of building up a report from context, except the context is fully typesafe so you can use e.g. enums as errors
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
@@tabiasgeehuman oh INTERESTING! Well thank you I'll take a look 🙂
@alexandersemionov5790
@alexandersemionov5790 10 месяцев назад
"I am going to shave a yak" is probably most interesting debug message I've seen
@hypario
@hypario 10 месяцев назад
Nice video, I'm still trying to learn how to organize projects on Rust, as I'm switching from a OOP type of language (Java), I'm not really used to rust that feels a lot more functional oriented like. I was wondering if you had any tips for that. Also, any tips for Desktop applications with GUIs ? I can't find anything really reliable, I don't feel like it's mature enough yet
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
Come ask those questions on my discord in #newbie-advice, folks will have great suggestions! I have answers: 1. Enums: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-z-0-bbc80JM.html 2. wasm inside Tauri (or electron) ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-P4LMfkFLRsI.html
@FineWine-v4.0
@FineWine-v4.0 10 месяцев назад
What happened to Aaron was a great injustice & it honestly set the tone for what'll become of the internet I had this thought, since we can use BASH-scripting to automate video editing with FFMPEG Can we do it with RUST & what about Picture-editing ?? (E.g: making thumbnails)
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
the only limit is your imagination! For example crates.io/crates/silicon
@NewAccount770
@NewAccount770 10 месяцев назад
I just listened to the Oxide and Friends podcast, where they are using their own Dropshot HTTP server to generate OpenAPI from their code, and how that boundary has helped them craft a reliable frontend. Poem looks super interesting!
@yurtle1851
@yurtle1851 10 месяцев назад
Same - I'm curious about the differences between Poem and Dropshot, I'll have to try them both at some point I guess
@SelfMadeSystem
@SelfMadeSystem 10 месяцев назад
While I'm impressed by all the amazing backend support that rust is getting, I haven't really seen a satisfyingly complete frontend rust crate on par with js/ts alternatives like React, Svelte, Vue, Lit, etc. I find that libs like egui or iced are pretty cool, but they're not made for the web, and yew seems promising, but I haven't been able to get it to work with the stability and ease of development that the js/ts ones have, let alone something like Next, Nuxt or SvelteKit (I see rocket, but it really seems to be more of an HTTP framework/backend web framework than a frontend/fullstack framework that I'm looking for). This has really been the only thing preventing me from getting into rust. I'd love to see a video that delves into the web frontends and web frameworks that rust has to offer.
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
Oh for sure javascript has a big headstart. HOWEVER we're all getting very excited by leptos.dev - have you tried it?
@SelfMadeSystem
@SelfMadeSystem 10 месяцев назад
@@NoBoilerplate I haven't. I'll be sure to check it out when I have time. Thanks for sharing!
@DerSolinski
@DerSolinski 10 месяцев назад
OMG! POEM is exactly what I'm looking for, seems to be a god send for HATEOAS. Add htmx to mix and its a win. Your recommendations are solid ;-D I'm actually trying to slay the Excel Makromonster my uncle created... Meaning I finally begun work on it, after procrastinating literally for years now. First step is writing software to analyze the thing for data and app logic. Trying that with pest, egui and calamine. Just managed to get some life-signs today. After that is finished I want a proper custom build lightweight ERP and *"THE STACK"* seems to be a good starting point for that.
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
I just can't get too excited for htmx, it's easy to get going but suffers from the same unsafety that js does. Try Yew.rs, it's very simple and will give you huge confidence in your frontend!
@DerSolinski
@DerSolinski 10 месяцев назад
@@NoBoilerplate nah it's internal tools only nothing exposed for the web. Well you could completely go the SSR HATEOAS route but htmx reduced the boilerplate/templating a lot.
@ironosenshicas
@ironosenshicas 10 месяцев назад
Could you do an video on how things like sqlx and leptos achieve their compile time checking?
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
Already did, they do this with the WILDLY powerful macro system, my deep dive is here ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-MWRPYBoCEaY.html I also talked specifically about how SQLx works in this video ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-JIvKgSyvtxI.html
@RahndelDaVandal
@RahndelDaVandal 10 месяцев назад
What font are you using on the code snippets? The ligatures for #[..] is really cool!
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
That's Fira Code! Though there's a few ligature nerd fonts around
@RahndelDaVandal
@RahndelDaVandal 10 месяцев назад
@@NoBoilerplate thanks I’ll have to check it out. I’m using a custom NF font with ligatures but it doesn’t have that ligature
@mldy1
@mldy1 10 месяцев назад
4:17 should also be considered that requests/sec doesnt tell the whole story with performance as any framework written in java or js will have greater memory usage and most likely latency even if it is able to achieve greater throughput
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
Thank you for being chill XD yes indeed! This video isn't about how rust is the best (see my others for that!) but just putting Poem in context.
@blidardiapinal
@blidardiapinal 10 месяцев назад
thanks Tom
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
You're welcome Dennis
@mustafazakiassagaf1757
@mustafazakiassagaf1757 10 месяцев назад
i personality like using seaql query builder with my sqlx
@neociber24
@neociber24 10 месяцев назад
Congrast for going fulltime with what you enjoy
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
Thank you so much, it's so wonderful to be, effectively, teaching professionally, I've always wanted to!
@cagataykaydr3015
@cagataykaydr3015 10 месяцев назад
I checked out poem thanks to you! I loved it and I want to use it in my next project. But I see that I have fears on frameworks like this about their futures, can I get your opinions about it please? What do you think about community-made frameworks and their futures, because we have an example like Rocket. I'm sure that I'll not use these frameworks in billion dollar startups ;) Yet, do you have any trick on understanding which library will stay long enough?
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
That'd be a good trick! Here's how I evaluate rust crates, I use lib.rs: lib.rs/crates/poem Note the statistics right at the top of the page: - latest release July 23rd 23 (before then, Feb 23, Dec 22, Nov 22 etc) - #9 in 'http server' - 48k downloads/month - used in 116 crates lib.rs surfaces exactly what I need to know, and all without javascript! Rust and the Rust community make STAGGERINGLY stable software - even 0.0.2 crates I trust more than 2.0.0 npm packages!
@yondaime500
@yondaime500 10 месяцев назад
What do you use for i18n? I've been trying to get people at work to try Rust, but that's one thing I'm not sure about, because it's so easy to do in the language we currently use (C#), and I don't know if there is an equivalent in Rust yet.
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
Poem has built-in i18n support, check the readme! crates.io/crates/poem
@yondaime500
@yondaime500 10 месяцев назад
@@NoBoilerplate That's nice, but I mostly write desktop applications. I just found a crate named i18n-embed-fl that looks promising. I'll try to understand how it works and if it does what I need.
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
@@yondaime500 I think you've got it - the standard seems to be crates.io/crates/rust-i18n
@flwi
@flwi 3 месяца назад
Great video! Thanks for the recommendations! Does anyone have experience with generating rust code from an existing openapi spec? I'm just starting on my rust journey and could use sth like that for a side project. Recommendations would be appreciated!
@jonnyb2956
@jonnyb2956 10 месяцев назад
How does the sqlx compiler handle CI builds, does he just skip the checks then? This sounds like the build-step would need access to a database, which feels kind of unintuitive.
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
Ooh, you're gonna love the solution: It's got a built in cache mode for CI. Check my explanation here ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-JIvKgSyvtxI.html
@ahuman32478
@ahuman32478 10 месяцев назад
Hi Triss How come you write SQL by hand rather than using an object-relational mapper for Rust? Is there a performance benefit? Finer control over database operations?
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
Two reasons: 1. compile time verification, 2. optimisation. 1. Only SQLx (I believe) with the query_as! macro can check your queries at compile time. Though it'd be more ergonomic to write in an ORM, I happily give it up to get compile time verification. 2. Every project that uses an ORM eventually has to hand-optimise their queries at scale. Universally, with no exceptions. I am fully bought-in to Rust's "upfront the work" mentality, and writing queries in sql, rather than sometimes writing orm and sometimes writing sql is MUCH cleaner. Also, it's very likely you'll write your own functions to abstract both the ORM or the raw SQL, so you might as well get compile-time guarantees!
@ben6
@ben6 10 месяцев назад
Express is known to be slow. Compare it to Fastify or Hono, and there wouldn't be much difference.
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
Why didn't YOU do this comparison before making this comment? I gave you the link in the video! Both Fastify and Hono are extremely mediocre: web-frameworks-benchmark.netlify.app/result?asc=0&f=fastify,hono,express,poem
@RenderingUser
@RenderingUser 10 месяцев назад
LETS GOOOOO new rust video!!!!!!!!1
@dionysis_
@dionysis_ 10 месяцев назад
Bacon is amazing!!!!! 🤯 Thanks 🙂
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
SO good right! cargo-watch is fine, too, though it flickers when refreshing.
@SimoneBigozzi1998
@SimoneBigozzi1998 10 месяцев назад
Thank you to the tribute to the internet's own boy
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
We need Aaron more than ever
@astroorbis
@astroorbis 10 месяцев назад
the mention of Jane Eyre gave me a flashback, goddamn that book was long my D:\ drive has the writing on the tombstone of her friend as its namesake - Resurgam
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
Amazing!
@vpetryniak
@vpetryniak 10 месяцев назад
What about graphql with rust? I fall in love with graphql since it gives me output validation on the frontend and really would be awesome to combine Graphql + Rust
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
there are 423 crates on crates.io that mention graphql - Go forth!
@JoeWasson
@JoeWasson 10 месяцев назад
I've used async-graphql and juniper. I slightly prefer Juniper, although I think async-graphql may have more features/be more active. Both have been more pleasant to work with than their Typescript counterparts.
@DmitryDodzin
@DmitryDodzin 10 месяцев назад
I like axum not because of speed or ergonomics but because it's under tokio's development team and therefore I don't fear the framework will fall behind and will be updated even if some dependency introduces breaking changes (ehm ehm looking at you hyper 1.0.0)
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
no such thing as breaking changes with Cargo, right? Human error, sure XD
@Kiaulen
@Kiaulen 10 месяцев назад
Well, you were right. I looked up what happened to Aaron Swartz, and I'm now angry and sad. I hope we can one day create that kinder world.
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
@phoenicianathletix2866
@phoenicianathletix2866 10 месяцев назад
In regards to the quote on the thumbnail Jay-Z, Biggie, Kanye west & other rapper don't write their poems/raps. They just memorize their best lines
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
Fair, though isn't memorisation writing, of a sort? Only writing to the medium of your mind, rather than paper - Dijkstra didn't mean the physical act of writing, really, he meant the act of creation. Consider the sentence "I wrote a song", you might physically write the lyrics, but the tune is in your head.
@Joe-sm7mf
@Joe-sm7mf 10 месяцев назад
I am curious, what is anyone's opinion of Leptos? I've been playing with it and am enjoying it for both frontend and backend. I will have to give Poem a try so I have have no comparison at this time.
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
Leptos looks really good, and I look forward to it maturing!
@irlshrek
@irlshrek 10 месяцев назад
*in my opinion* we should rally around Axum as our web framework. its built on top of the tokio stack by the tokio people and its super ergonomic and powerful
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
1. I don't think we need to 2. Good luck herding the cats XD
@irlshrek
@irlshrek 10 месяцев назад
​@@NoBoilerplate hahah fair enough
@joaosouza2678
@joaosouza2678 10 месяцев назад
I don't use Rust daily, but have interest in learning it deeper. Do you think doing Leetcode problems in Rust is a good option? I heard that lifetimes and other features can make simple problems harder.
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
I actually have a whole video explaining my tips on how to learn Rust, and it centres around Rustlings, a code kata system like leetcode problems! Do watch (and check out the other videos in the playlist if you have time ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-2hXNd6x9sZs.html
@jacobwilliams2246
@jacobwilliams2246 10 месяцев назад
Have you tried leptos for front end?
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
We're all very excited for leptos! Not quite mature enough for me to be recommending just yet, though.
@spencerpogo
@spencerpogo 10 месяцев назад
"fasterthanthine" 😂😂
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
I learned Rust from Amos's amazing posts!
@spencerpogo
@spencerpogo 10 месяцев назад
@@NoBoilerplate I'm a big fan too :)
@SanteeRocks
@SanteeRocks 5 месяцев назад
Hi can sqlx support clickhouse too?
@mr_diamond_gold9842
@mr_diamond_gold9842 10 месяцев назад
Why choose postgres over other options when given a choice?
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
It's the stand-out best SQL database on the planet, and has been for my entire 15 year career.
@lel7531
@lel7531 10 месяцев назад
Did you try miette ? It's great for error reporting too
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
Looks like miette is on the `thiserror` side - creating good library errors, not handling good library errors. I don't write libraries, but if I did, I'd check it out!
@laundmo
@laundmo 10 месяцев назад
​@@NoBoilerplatemiette is on all sides: it has guides for using it in either libraries, applications or as the main() return. it's main claim to fame is ultimately very nicely formatted errors, akin to rust compiler errors, which are desirable in applications too.
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
@@laundmo it's very exciting! Thanks both for bringing it to my attention!
@miguelguthridge
@miguelguthridge 10 месяцев назад
My main problem with creating backends has been the fact that I don't know databases. I tried taking the databases course at my university, but the lectures were extremely dry and the setup process tedious enough that my ADHD brain gave up (I was also taking my university's Rust course and it was far more interesting, since static analysis is so cool). Since understanding databases seems essential if I want to have any hope of success as a software engineer, do you have any recommendations for a way I could learn how to work with databases that will be manageable? While sqlx looks nice, the fact that you need to use strings to build up the queries means that there likely isn't any intellisense for it (which would make things quite challenging for me).
@tserhey
@tserhey 10 месяцев назад
Working with an ORM - like Diesel in the Rust ecosystem - might be a good fit if writing SQL seems too daunting at first.
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
Diesel is a very good ORM, but it doesn't do compile time verification, and its runtime errors are not very nice.
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
I too used to feel like this. You could try Diesel, a very popular rust ORM. Here's why I now prefer to write SQL: In every large project I've worked with, we've EVENTUALLY had to write SQL. ORMs don't scale, and the bigger your app gets, the more hand-crafted SQL you have to write. This is the same problem as Javascript, it STARTS OFF nice and simple, but by the end, you wish it weren't so simple, because the edge cases break you. Use SQL with SQLx, and don't be afraid, because the compiler is holding your hand :-)
@minciNashu
@minciNashu 10 месяцев назад
Planetscale has a good intro to SQL. They also have a free tier for hobbyists.
@miguelguthridge
@miguelguthridge 10 месяцев назад
@@NoBoilerplate that makes sense, but an ORM definitely sounds like a much nicer starting point. Maybe I'll also look and see if there's a kata-like course for SQL! I used Tom Kunc's MacroKata to learn Macros in Rust and it was awesome
@dionysis_
@dionysis_ 2 месяца назад
Ok tried to use poem and liked it but this is my first API and there is no community or material for support. Will try axum
@viniciusataidedealbuquerqu2837
@viniciusataidedealbuquerqu2837 3 месяца назад
wait what no leptos on the frontend?
@emddebatebriankim9942
@emddebatebriankim9942 6 месяцев назад
RIP Aaron Swartz
@NoBoilerplate
@NoBoilerplate 6 месяцев назад
We need him now more than ever
@martinheuschober4341
@martinheuschober4341 7 месяцев назад
when you bind your db and your rest api, don't you tie your user facing api to what you store. which is probably ok for something simple, but IMHO for something more complex you want to be able to evolve the API independently from your business layer and DB layer
@NoBoilerplate
@NoBoilerplate 7 месяцев назад
An excellent point. Yes, especially for API versioning, you'd want that decoupled, which is easy enough, just make another struct. The strict typing of your API, and the compiler keeping you safe when making changes, still applies after this useful weakening of the relationship between DB and API.
@after_alec
@after_alec 10 месяцев назад
Omg GjengStack has me rolling
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
Gotcha!
@broggl
@broggl 10 месяцев назад
crablang for life
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
crablang until it's merged, maybe. I remember the node/io.js split - history is cyclical XD
@icanonlysuffer
@icanonlysuffer 10 месяцев назад
yay more rust
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
Every other video I make is on Rust at the moment :-)
@jagagemo8141
@jagagemo8141 10 месяцев назад
Have you considered making a nix with your stack?
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
I really like Nix, and have NixOS on a laptop for testing. However... This whole stack is pure Rust, even using RusTLS, no external dependencies other than rustup.rs. Nix is ESSENTIAL in other languages, but I've found since switching to Rust, I can just choose pure Rust dependencies and never trip up. As Cargo is extremely deterministic, I don't miss Nix there either. The Rust Editions system guarantees anything that compiles today will compile in 40 years time!
@AbhishekBajpaiHere
@AbhishekBajpaiHere 10 месяцев назад
Great video, why not axum though ?
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
I'm uninterested in closed source silos.
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
Axum is great! They're all great really. As I said in the intro to poem, axum doesn't have a first-party openapi plugin, and I've heard that those it does have are not ideal.
@AbhishekBajpaiHere
@AbhishekBajpaiHere 10 месяцев назад
@@NoBoilerplate The reason I like axum is its well integrated in tokio stack. So I think it will be maintained for a long time. Also having OpenAPI is not important to me, that's just my prespective, its a developer feature mostly and they usually use Postman or something similar. Again great video and I hope you find success now that you are doing rust videos full time. I would love a detailed video on tracing, not a gloss I think basics everyone can get.
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
@@AbhishekBajpaiHere Thank you so much! Axum's great too, of course. You can't go wrong with the Rust frameworks! What's to know about tracing? The readme's very comprehensive - what value could I add?
@d3j4v00
@d3j4v00 10 месяцев назад
1:01 wow, what a portfolio. RIP
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
We need him now more than ever
@theappearedone
@theappearedone 10 месяцев назад
Now I looked up Aaron Swatz or whatever. I read something about downloading MIT documents but dont exactly get how its related? Anyone?
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
Watch "The Internet's Own Boy", linked in the pinned ERRATA comment.
@LoganVanCuren
@LoganVanCuren 10 месяцев назад
Awwwwww, I really like Nim!
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
Ah, so do I. Nim was my gateway from Python to Rust, igniting my passion for single-binary deployment and static typing! Popularity matters, as I always say, so I looked at three mainstream languages that I stood a chance at writing professionally: Go, Haskell, and Rust. Go is ruthlessly practical, but with no beauty, Haskell is beautiful but not practical, and Rust has the best of both, and is somehow greater than the sum of its parts! I wrote this comment on a hackernews nim v rust comment thread last month, perhaps it's useful to read: Nim is too timid. Most languages are too timid. My context: I'm a maintainer of iNim, creator of the Rust channel, No Boilerplate, and a professional python web developer for 15 years. The features you are excited about in Nim are compromised for the sake of simplicity: - Macros can't change syntax, - There's a limit to how real-time the standard language is, - Compiling to javascript is a nice trick, but if it didn't rely on GC it could compile to webassembly, which is better, - Ask any advanced python developer: Indentation for syntax is a bad idea at scale. Hell, have you ever used YAML? What Rust does is a revolution because they solved the problem of memory safety without garbage collection with the Borrow Checker. The knock-on effects are GARGANTUAN. This was a hard problem to solve, and it makes the language more complex to learn, but it unlocks all the language's superpowers. If you 'cheat' with a GC, you get nothing. Nim started its life, just as most languages did with a GC, and the efforts to keep the syntax the same while offering alternatives are greatly compromised. It's far easier to add GC/RC to a low-level language than it is to remove it from a high-level one, where the whole ecosystem relies upon this behvaviour. Of COURSE I know about Nim's plugabble GC options. That doesn't impress me at all (though Araq's effort is to be commended). In Nim they are compiler options, in Rust they're libraries. The difference is vital. For example, at a per-variable level, I can choose to reference count with doc.rust-lang.org/std/sync/struct.Arc.html if I so wish (I rarely need to because the borrow checker is magic). If you want python, you can have it inside a Rust macro, sort of like this crates.io/crates/inline-python because rust macros CAN change syntax. With Macros and no GC, you can rebuild ANY FEATURE inside Rust, the floor of the abstraction is the metal, and the ceiling is the sky. This is what Rust is all about: full power to the developer, no compromises. My video on this topic for those interested is: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-PuMXWc0xrK0.html I love both languages, but I can only see one language being the standard next 40 years, and demonstrably so can Linux, Microsoft, Cloudflare, Discord, and many others.
@LoganVanCuren
@LoganVanCuren 10 месяцев назад
@@NoBoilerplate Thank you for the response, and thank you for making it a wonderful response! I feel like I've met a celebrity! I've been loving your videos and sharing them wherever I can. ☺️ The way you reference Nim just caught me off-guard because I had just discovered it and was really liking it. I'm primarily a Python developer, so it was really nice to see similar syntax and I appreciate this simplicity over the very verbose Rust I've been trying to learn. And have you seen the Uniform Function Call Syntax? ♥️♥️♥️
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
@@LoganVanCuren UFC is SO fun isn't it! Look, learn nim, do it without any guilt, it's a great language. Rust will be here when you want more ;-) BTW Rust has something that feels a bit UFC - you can attach methods to any struct using `impl`. It feels like much looser coupling than classes (though less loose than UFC) doc.rust-lang.org/beta/std/keyword.impl.html
@tiagomacedo7068
@tiagomacedo7068 10 месяцев назад
Hey, you didn't explain what Bacon/Clippy is :(
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
Apologies! This isn't targeted at beginners to Rust, however I do have a whole playlist that IS! Here's the exact video in that playlist where I talk about bacon ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-dFkGNe4oaKk.html
@tiagomacedo7068
@tiagomacedo7068 7 месяцев назад
@@NoBoilerplate Ooh, thank you! Love your podcast too btw!
@NoBoilerplate
@NoBoilerplate 7 месяцев назад
@@tiagomacedo7068 oh thank you so much! I started planning Lost Terminal season 14 just today! Drops on the first Monday of November 😀
@danyldavidiuk9507
@danyldavidiuk9507 10 месяцев назад
what about diesel rs? (why sqlx...)
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
Diesel, like all ORMs I've tried so far, does not connect to your real sql database at compile time and validate your queries. Just incredible, check out ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-MWRPYBoCEaY.html
@danyldavidiuk9507
@danyldavidiuk9507 10 месяцев назад
@@NoBoilerplate but you can provide file with sql commands so you will have structures of tables, so you will have some compile time checks like for types
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
@@danyldavidiuk9507 That is not good enough
@klemensgak6270
@klemensgak6270 10 месяцев назад
The channel that is worth to turn off AdBlock. Greetings from Poland! I love your approach to technology and not only. That's make me moriveted.
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
Thank you so much!
@Scio_
@Scio_ 10 месяцев назад
Sad that Fasterthanthine was the first to go...
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
Solid name honestly. I learned Rust from Amos at fasterthanli.me :-)
@porky1118
@porky1118 10 месяцев назад
2:28 I never used Tokio and I don't want to use Serde anymore.
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
you MUST have used tokio! really?
@porky1118
@porky1118 10 месяцев назад
​@@NoBoilerplate No, I really never used it. I've seen it a long time ago, but I always thought, I don't want to know that much. I was rather expecting critique on not using Serde :)
@izwe794
@izwe794 10 месяцев назад
RIP Aaron
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
We need his help now more than ever.
@tauiin
@tauiin 10 месяцев назад
excluding C++ based ones is kinda funny
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
Yeah, if you check the link there are some nim and cpp webservers that punch a bit higher than ActivJ, but as I said, you'll never persuade a team to use them, so I feel safe discounting them XD I'm here talking about Rust not just because it's a WILDLY great language, with alien magic in, but that, somehow, despite all this, it's already the #19th most popular language redmonk.com/sogrady/2023/05/16/language-rankings-1-23/
@user-du9ch3tn2v
@user-du9ch3tn2v 10 месяцев назад
There are other metrics than popularity (but rust for http stuff is good)
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
@@user-du9ch3tn2v popularity doesn't matter comparing the top languages, they're all popular enough, but if you see where nim (for instance) is on that graph, it really does matter.
@livb4139
@livb4139 10 месяцев назад
what if the database connection breaks
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
If you're talking about the development experience, SQLx has you covered, I explain their 'offline' feature in this video: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-JIvKgSyvtxI.html
@jordixboy
@jordixboy 10 месяцев назад
Good video! fastapi is missing in the framework benchmap, its one of the fastest python web frameworks
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
Click through, it's comically slow (10x) compared to the big players. web-frameworks-benchmark.netlify.app/result?asc=0&f=poem,fastapi I don't hate python, but fast it aint. I'm DEVASTATED they're keeping the GIL for python 4.0. That's a CHOICE.
@murtaza6464
@murtaza6464 10 месяцев назад
Has there been any official talk of python 4.0?
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
@@murtaza6464 I can't find where I read about it now - but reading the mailing lists they are focusing on optimising so much that the GIL doesn't hold them back. Sure, great, sounds wonderful. Byeeeeeee!
@fumano2679
@fumano2679 8 месяцев назад
Why postgresql > mysql ?
@NoBoilerplate
@NoBoilerplate 8 месяцев назад
though mysql has a large legacy install base, postgres has beaten it in features and performance my entire career.
@ThundaAaAaAaAaAh
@ThundaAaAaAaAaAh 10 месяцев назад
RIP Aaron, reddit died with him
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
We need him now more than ever
@maksimmuruev423
@maksimmuruev423 10 месяцев назад
I've amaized how slow and sluggish JS outperform Rust ? You can expalin Java .. it snor really interpreted...and has JIT thing..but JS..
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
It's because it's actually a frontend for C++, it bypasses all of nodejs and replaces them with native wrappers. SOME might call this cheating ;-) Sifrr is based on github.com/uNetworking/uWebSockets.js You find this a lot at the top of the benchmarks - artificial frameworks that are designed to 'win' framework competitions, but don't actual use your language in a normal way, so you'd never choose them (as you have to throw away much)
@allesarfint
@allesarfint 10 месяцев назад
Wait, I thought everyone was choosing their stack based on some meme name.
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
I'm as surprised as you
@minerj101
@minerj101 10 месяцев назад
What about leptos
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
Not quite mature enough yet, but it's very exciting!
@norude
@norude 10 месяцев назад
Please do chapters for your videos
@dombou70
@dombou70 10 месяцев назад
Wait till you discover Haskell :P
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
Wait till you discover my other videos XD (specifically this one ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-2hXNd6x9sZs.html)
@dombou70
@dombou70 10 месяцев назад
@@NoBoilerplate Heh I was being facetious. Watched all your vids, and love them. Does feel though that you love the aspects of Rust that are actually stronger in Haskell than Rust (imo). I wonder if a more FP, and less systems would be ideal
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
@@dombou70 I adore haskell, learned it 15 years ago and it made me a better programmer in OTHER languages! However, Popularity Matters. I evaluated go, haskell, and rust in 2020 and found go was very practical, but not beautiful, haskell beautiful but not practical. Rust is a wonderful blend of haskell and lisp, all in syntax that doesn't scare people away!
@dombou70
@dombou70 10 месяцев назад
@@NoBoilerplate That's fair. Fwiw, I went through my Haskell phase, and i've also moved on as the community was just too small. I now use TS and it's mostly good enough. I'd love proper ADT's like Rust has, and a std lib built around Result/Option types
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
@@dombou70 TS is great if you have no option, yeah, I dig it for sneaking in some safety into frontend teams! Yes, this is the exact problem - you can TELL when a language wasn't built around sum types, like TS, if it gets bolted on later, you have deep compromises that you can't remove from the language. RUST IS SO EXCITING FOR THIS
@shiroi2971
@shiroi2971 10 месяцев назад
RIP Aaron, he messed with the wrong kind of people
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
We need him now more than ever
@svelterust
@svelterust 10 месяцев назад
I'm way too early 😄
@s1nistr433
@s1nistr433 8 месяцев назад
Yeah, sorry Rust just isn't ready yet for web development. I tried it in the past, there isn't a major established web framework that has been tried and tested in enterprise, the ones that exist are underdocumented or undermaintained. Axum doesn't even have a website and is barely documented. I couldn't find a good e2e testing solution in the level of playwright. The orms feel incomplete, nothing like entity framework or prisma. Still, I hope it does get there someday cause rust is a good language. I do think it will with the performance Rust is offering A good alternative to get away from JS in the server is C#. Better performance, has a good ecosystem and tons of jobs. The only downside to it is Microsoft.
@NoBoilerplate
@NoBoilerplate 8 месяцев назад
Rust is indeed an excellent language, and though you're right that the web frameworks are still being developed, I would trust a 0.2.0 Rust framework over a 5.0.0 JS framework in production every day of the week. Note I say 'trust' not 'use', there are many cases where the downsides of a JS framework (say, react or express) are overwhelmed by the benefits you get from popularity and longevity: If you want gmaps in react you can choose between several plugins. If you want it in rust wasm (leptos or yew, say), you'll have to write that plugin yourself. Some people will be fine with that, others will have to wait, and use React or similar in the meantime. But this doesn't mean that you should write off the whole language, as your comment suggests. That's too blunt. The web stack I feature in this video: poem-openapi coupled with SQLx, TODAY, is better than any other option in any language for building a lightweight API in production. This combination of rust/poem/sqlx gives you features you simply can't have in any other popular language or framework. compared to rails-api or express or django-restful etc etc, the stack I show in this video is more reliable, safer (both memory and high-level) and faster than them all. As a senior web dev, there's one thing above all else that I care about these days: that you can actually finish your project with this stack. It will sit in production, reliably, being upgraded as the compiler improves without a single line of code that needs porting, for decades to come. My team and I can move on to other projects. There's enormous momentum in the Rust ecosystem, I'm testing out leptos for replacing js in my frontend projects, and I'm extremely excited by what I'm finding, for instance. But unlike poem, I don't recommend laptos for everyone just yet, perhaps in a year. What I do recommend is that for people who are sold on Rust, this is a good stack for building an API, which is the vast majority of backend web projects. For now, I recommend to most people to stick a react app or a swift UI on the frontend. But not for long! :-D
@romankoshchei
@romankoshchei 10 месяцев назад
ActiveJ team are geniuses. How in the world Java is the fastest. ActiveJ is only reason I can comeback to Java.
@jacekkurlit8403
@jacekkurlit8403 10 месяцев назад
Seems like they reimplemented everything from ground up. On the other hand I don't know that framework and it may just be one time show off for benchmarks
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
Oh, Java's not, Nim and Cpp are the fastest, but they're weird, so I didn't include them. ActiveJ extremely clever, but it's not popular, which is a problem for me, www.statista.com/statistics/1124699/worldwide-developer-survey-most-used-frameworks-web/
@romankoshchei
@romankoshchei 10 месяцев назад
@@NoBoilerplate nim is kind of cool from what I saw. But popularity is an important factor, especially to learn.
@NoBoilerplate
@NoBoilerplate 10 месяцев назад
@@romankoshchei Nim got me from python to rust, but I don't need it anymore 😅
Далее
In Search of Code Purity
16:37
Просмотров 93 тыс.
What Makes Rust Different?
12:38
Просмотров 196 тыс.
1❤️#thankyou #shorts
00:21
Просмотров 41 млн
A meal of dumplings is in hand!#shortvideo #funny
00:16
Hack Your Brain With Elaborate Coping Mechanisms
11:42
Просмотров 308 тыс.
The Downfall of Actix Web
20:25
Просмотров 239 тыс.
Build a CRUD REST API with Rust Axum | Tutorial
19:41
Просмотров 3,3 тыс.
Build your Rust lightsaber
11:51
Просмотров 154 тыс.
Rust Data Modelling Without Classes
11:25
Просмотров 160 тыс.
The Truth about Rust/WebAssembly Performance
29:47
Просмотров 170 тыс.
Tide is perhaps my favorite Rust web app framework.
9:14
The Unreasonable Effectiveness Of Plain Text
14:37
Просмотров 583 тыс.
This is apparently the most loved CRUD app of 2023
19:38
1❤️#thankyou #shorts
00:21
Просмотров 41 млн