Prime Learns The Truth About Rust

Sdílet
Vložit
  • čas přidán 10. 10. 2023
  • Luv u Prime ❤️
    Seriously tho, dope to see him share his learnings and changed feelings after actually shipping some Rust. It's a great language. It isn't great for everything. Hope the Go era treats him well...
    ALL MY VIDEOS ARE POSTED EARLY ON PATREON / t3dotgg
    Everything else (Twitch, Twitter, Discord & my blog): t3.gg/links
    S/O Ph4seOn3 for the awesome edit 🙏
  • Věda a technologie

Komentáře • 199

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

    You had every justification to name them the *Prime* Meridian and the Theoquator but you did not. This is a national disappointment.

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

      "Dishonor. Dishonor on his whole family. Dishonor on his dog, dishonor on his cow!"

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

      this comment will haunt him and he'll eventually reshoot that part of video, dont worry

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

      Melkey is that random giant squid off to the side on the old school maps

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

      @@Kane0123 Milky Way

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

      International

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

    Lmao watching Theo react to Prime is the best. Now I want to watch a prime react to Theo reacting to Prime

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

      may we call that recursion?

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

      He already has reacted to Theo

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

      @@ricardomonge2769 can we have a reaction to that reaction though

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

      @@henriquemarques6196 I think that would be called mutual recursion.

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

    I'm a Rust person. I like using Rust, even when it's not the pragmatic choice. It's my comfy zone and I really enjoy it. I do use React in my day job, and that's cool and fine. I don't hate using other tools. I just like Rust to an unreasonable degree and I realize the unreasonable part.

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

      What's the best way to learn it? I've found "the book" to be somewhat terrible. Zero To Production was just slightly difficult to follow so I will put it aside for later. I need something small and practical. Is "Programming Rust" good enough?

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

      @@SandraWantsCoke I'm a bit greedy when it comes to books. They're my favorite method of learning. I also like having a physical copy to skip around as well. Here is what I have read or am continuing to read: "The Rust Programming Language" book by Steve Klabnik and Carol Nichols. This is for the basics and some intermediate knowledge. Then to get a bit more advanced, I have "Rust for Rustaceans" by Jon Gjengset. Both of those are from no starch press. Specifically for concurrency, I have "Rust Atomic and Locks" by Mara Bos from O'reilly. After doing the first book, you can probably do "Zero to Production in Rust" by Luca Palmieri with no issues.

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

      @@SandraWantsCoke Books are great, though, I've learned a ton from looking at other people's code; especially of the libraries that I use (as well as the std lib). I've learned a ton of patterns this way, which has helped be at least get a better understanding of writing somewhat better Rust.
      I also highly recommend, if you want to dig deeper, to follow Jonhoo (Jon Gjengset) - his Crust of Rust series are phenomenal.

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

      same here, I like Rust because it's Rust, not necessarily because it's "blazingly fast" or "memory safe"

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

      That sounds kinda like youre a bad engineer that will make bad choices, doesn't sound very pragmatic, but I can respect that

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

    It’s almost as if there is no one language to rule them all and instead different tools fit different purposes.

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

      What do you mean I can't hammer a nail with my measuring tape?

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

      ​@@Gelo2000origamiOof, I just put away the wrench I was using to pound some nails in.

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

      Please spread the word !
      Sooo many people still struggle with this concept.

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

      Always has been that way.

    • @SigSeg-V
      @SigSeg-V Před 7 měsíci

      Javascripters are SWEATING right now

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

    Theo, been following you since the old days when you gave tips for JS.
    the amount of maturity you have now and you've also given to me along with awesome people like Primeagen is amazing.
    It's like I grew up with you and we all done stupid things and we all learned from them and shared our knowledge each to one another.
    Thanks for this video. Great content. Actually learned something more this time too.

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

    Looking forward to "Prime reacts to Prime Learns The Truth About Rust"

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

      That starts to be as verbose as Java.

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

      ​@@grasshopper3085AbstractPrimeReactionToPrimeReactingFactory

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

    I don't know, I still disagree on some level. I don't think rust is for everyone, but I've used rust for years and for me I'm honestly just as fast with it than I am with typescript. The language is pretty much never the bottleneck for me. Using python slows me down more because I pretty much never use it and whenever I touch it I need to learn it from scratch.
    I think your graph is missing this. Rust makes sense even for prototyping if you and your colleagues all know rust and are already good at it. I think experience with your tools is the most important factor here.

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

      Absolutely. There are ways to write Rust (especially Rust), C++/C (name any low level language) in such a way that lets you iterate fast, then you can solidify the design down later. It's definitely an experience thing, and there's more to learn about low-level languages, but you can be just as productive. Consider that tons and tons of games are written in C/C++, some even have their gameplay code written in it. You almost need near interactive levels of iteration and trial and error to work in that environment.
      Lots of experience lets you do that, less experience means that languages like Javascript/Typescript/Python can give you that peak sooner because there's less to learn about their "model of programming." I think Go and C is proof of this as well, it's not that low level languages are "harder", it just requires a bit of additional background knowledge first before you become just as proficient. Rust/C++ add a ton of additional layers on it to try and add back higher level features, so of course it seems intimidating.
      Starting with a low-level language is actually fantastic, or at least soon after you learn your first language.

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

      There's definitely a layer of "Im so used to these highly structured languages that I tend to already know the right architecture or close enough that it won't be a problem to fix up" that a lot of JS folks don't have but there is also something to be said for changing complex types is an absolute clusterfuck especially when it comes to lifetimes and shenanigans even if the architecture is good in the center pipiing the required data around can be hellishly tedious and slow becasue its not polymorphic enough

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

    This was very insightful, thank your sharing this.

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

    I used Typescript since it was in alpha stage, worked with it for 6 years every single day, wrote hundreds of thousands of lines with it. In the meantime I was dabbling in Rust and switched to it full time since 2 years now and it was the best decision ever, I am now more productive in Rust, I can write faster in Rust than typescript with the added benefit of almost no runtime issues and no breaking changes and no wasted hours because some node module updated or some undefined sh*t. Rust is amazing, full stop.

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

      What Frontend Framework do you use with Rust?

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

      And now add lifetimes to your existing code without it... Joking aside, I love Rust, but its type system is still very explicit when it comes to lifetimes and generics, such that you have to think about how it should scale in the future. If you don't already, it will definitely bite you (or your coworkers).
      And the issue isn't easy to isolate either, especially when you have to change these things at lower levels, which will bubble up to any and every crate/module that relies on those types.
      At least this is what I've noticed within our organization, and we are now more cautious about whether something needs to scale quickly, at which point we either choose not to use Rust, or spend additional time thinking about the architecture and how it fits with our existing requirements, as well future ones.

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

      @@dealloc You're spot one, I rarely use lifetimes, I'm using Rust as an alternative to Typescript for Fullstack development, actix+diesel+seed, I'm using clone everywhere, the main priority for me is that the code should handle all edge cases, doesn't have runtime bugs, and easy to refactor. Still, the performance is 100 times better than node, I no longer worry about a task that could block the event loop just because it had more than usual computation, or worry about memory usage exploding & getting OOM every couple of months, or breaking UI just because the json coming from database or server is missing some field. Also rust functional style usually avoids the lifetimes issues and Option.as_ref() is my friend.

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

      @@StabilDEV I'm using seed, I chose it knowing it is a stale project, but it is just "elm" in Rust, you really don't need any more features, it is complete as is. It is good for my use case (B2B dashboard), but I woudn't recommend it for sophisticated UIs.

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

    Theo, you gotta listen to your big bro, anytime you wear a shirt with no tie, you gotta unleash the first button

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

    The crossover of Prime writing more application code and Theo writing library is very funny to see in the context of arguments they had a year ago

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

    When you have that stability, you rewrite everything in Ruby, remove all classes and shift back to on-premise.

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

    This really made me think, thank you for the insightfull comment Theo :). I think this line is the reason why Rust is such a great candidate for libraries: so many libaries are a stable base which people use to build more changing apps on. The python datascience ecosystem comes to mind with Pandas and Numpy all being written in C++. I think there is a lot to gain in that space by switching C and C++, but also 1-on-1 (a library written in the same language it is used in) libraries. The same thinking applies to most tools I think

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

      Not having a stable ABI is a pretty big problem though, which limits its usefulness as a library language.

  •  Před 7 měsíci +6

    didnt prime meant he could write a csv parser in rust easily? but theo thought he said the csv parser is on the left of the line of prime. i think he misunderstood what prime said(?)

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

    I think the flexibility comes more from the design than the language itself.
    Inflexibility generally comes from tight coupling. In some languages things like interfaces abstract types and virtual methods are used for that loose coupling, while in rust is done with things like traits and dynamic dispatch, but rustaceans see dynamic dispatch and say it's too slow, and that's where they have given up some flexibility for performance. The tools for flexibility do exist in rust though.
    You can also get this flexibility from things like microservices but then you introduce network latency, which makes things slower, but you can do that in rust if you're willing to make that trade off.
    It's basically about premature optimization.

  • @ThomasWSmith-wm5xn
    @ThomasWSmith-wm5xn Před 5 měsíci +2

    He sounds like the parrot from Aladdin and always wakes me up when I fall asleep to youtube.

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

    Nice explanation, this is great

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

    One of your best takes, IMO.

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

    I move slow and break things.

  • @Shaunmcdonogh-shaunsurfing
    @Shaunmcdonogh-shaunsurfing Před 7 měsíci

    I run a saas platform now in its 5th year. New tech stack is rust, wasm and qwik js. It took longer to build this time until the main engine was built in rust, but with this new engine, everything is coming together much faster. Meaning rust and wasm make a great skeleton to hang meat on.

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

    I know Java and JVM languages aren’t cool. But they are an incredible balance and have an enormous code base full of quality tools. Clojure for example has impressed me the most with the REPL dev style it has

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

      Java and the JVM are super cool. So is C# and the CLR. Don’t let anyone convince you otherwise 😎

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

    Given all of the assumptions in this video are true, I would be curious to see what this discussion might look like in 5 years once AI copilot tools become more common and mature; as highly explicit languages like Rust that avoid undefined behavior may have more accurate code completion results than the sort of crazy mayhem that TypeScript and JavaScript codebases can become. As a result of that, I imagine the "Line of Prime" would shift leftwards.

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

    I feel like I genuinely write better code with rust off the bat. I make less mistakes, I cover my bases more and the code tends to run great. I think it’s better to base rust off of performant rust code vs safe but slow rust code. Once you get it “slow” and safe, and the product gets proven you can then make it “faster”. This is how I have been doing it and it’s worked pretty well so far. I think the issue with most people using rust is until you get to a couple 100k lines of code it’s hard to know enough about the language and features to write fast, and good performing code off the bat that can be changed quickly.

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

    Best video of 2023 so far -- love how it follows person through year long realizations, struggles and insights gained

  • @Dev-Siri
    @Dev-Siri Před 7 měsíci +5

    Prime is the -GOAT- CAML

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

    Yay for Go!

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

    This is how I feel about using Python. I can move really fast in conceptualizing stage. Then when I need to ensure a more performant, I do a code rewrite

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

    With the compiler help it's still way faster to refactor in Rust if you are used to it.

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

    I think of code being performant, maintainable, and "right tool for the job". but I agree with this video more than any other one of yours.

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

    This is very compelling, but I'd definitely draw the lines differently. Maybe it's my specific experience, but I can't think of that many projects where the flexibility of quickly changing (breaking!) things is a priority over correctness, when it comes to shipping something. I'm convinced that building something robust in JS (or even go for that matter) would require more testing than doing it in rust, because the type system, conventions and overall syntax allows one to specify more precise constraints in the code itself that are checked at compile time. Changing that JS or go code would then also be quite difficult, because test cases would have to be adapted, thrown away, rewritten. And after applying some changes it is very hard to be sure that nothing got broken in the process. Sometimes you have to refactor more code in order to add a feature to a rust program compared to a program written in a more dynamic language, yes. But doing that - even larger refactoring - is usually pretty pleasant. You start in once place and clippy tells you exactly where you have to look at next, so you're applying changes in a guided, cascading way until everything is solid and robust again.

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

    Did you 🍒pick literally the only video where he doesn’t 💩on JavaScript, and also completely gloss over hes use of Go 😂

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

    I've never seen this chart before. It was very interesting to see and understand what it means.

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

    when you put go in your chart, there no space for js in sever side. go maybe simpler than ts. rust is real hard for big project.

  • @TomNook.
    @TomNook. Před 7 měsíci

    very nice tips

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

    What's the name of the vid where you mentioned the line of prime

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

    I still find myself iterating and working much faster in rust than in other languages. Even python. Every non trivial task becomes just so much easier in rust in my opinion. Maybe I'm just bad at itherr languages... I don't know anymore.

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

    3:50 Lol, he's building a CSV parser. That spec is unlikely to change any time soon. That's why Prime said he would write it in Rust.
    Sometimes you have to move fast and not break things: The services I'm working on are available 24/7 and I've never had to work outside of 9-to-5. However, 3/4 of them are rewrites (2 from Go, 1 from Python) so a lot of things were known at the start. I'm also usually the guy to clean up but it's not a full-time commitment. I like removing code as much as the next guy (my code contribution is net negative) but the stuff that remains will be copied perhaps more often than I'd prefer and at least it will be concise and blazingly fast. Call it "technical surplus".

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

    What is he using to make the drawings. Looks great. Nice video

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

    For performance, yes, 100% I get what you are saying. But for correctness and maintainability... not sure I agree if we're talking about full stack web anyway. Having multiple languages involved means you are introducing additional layers to communicate between those layers. It isn't clear to me that rewriting when things stabilize is a good idea if you aren't really running into big performance issues. For some apps, the Line of Prime is something you actually *never* get to.
    Also, if you get to a point where you aren't really adding features anymore, and you aren't running into performance issues, it's either an app no one cares about (and you shouldn't rewrite it) or it is an app that is doing its job well (and you shouldn't rewrite it). Long-term most apps that are seeing serious usage never stop evolving and improving, so the need for moving fast remains the primary concern.

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

    I dunno, when you need to change things you need to change things. I've been prototyping with Rust, and its as painfull as any other language I worked with to refactor, maybe it just means I suck at everything. Most of the hurdles Rust puts on my way are stuff that I would need to deal with eventually anyway in one form or another. At least that's my experience so far.

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

    SHP9500 vs AKGK712 as always an interesting table turning

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

    Good to see Hasura over, it's fastest way to do backend IMO

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

    I really don't agree; I am working on a product where three teams are integrating different user facing interfaces against a set of jointly developed services. My team codes in rust, the other teams in various TS based frameworks.
    It is quite disappointing how slow they are able to move - the sheer volume of code (and config files for days) required to achieve the simplest of interfaces. And that code has a habit of exploding on its own accord a few months down the line.
    My team, we write it once, we write it well, it doesn't need optimising when we test at scale - if something doesn't work then it's architectural not implementation.
    We are also not afraid of complexity; need a weird DNS solution in the backend, an afternoon of playing software Lego and it's done - in production. The other teams were still trying to find an off the shelf solution that did everything to avoid writing it in TS.
    IMHO it has more to do with experience in the language and confidence to just write software than it does any trade off on moving fast and breaking things...

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

      I really enjoy the last paragraph as this is very true. Being comfortable is definitely a greater factor in all of this

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

      I'm not skilled enough in Rust to dispute your claim. But I have to wonder as someone who has shipped a lot with typescript incredibly fast, configs for the most part are set once and then you're good. The only time we ship slow is when Product (non technical) don't know or can't decide what kind of product they want. And even then you can revert and update your code easily should they change requirements.

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

      It's also about finding talent and saving money. 2.8 million rust developers vs 13.8 million typescript. The lead times for hiring the right person also slows things down.
      A start up looking to make a proof of concepts and features to get venture capital funding has a much different goal than companies that are already very profitable.
      Rust dev salaries tend to be more since more experienced developers turn to rust after already knowing how to code. Comparing it to people whose first language is javascript and get paid 1/4th of a rust dev, they really won't perform as well.
      Going to start up meet ups, you get to meet a lot of people get a million dollars for bad code by banker boomers who can't code. One guy I knew got a million for a wordpress site with no traffic.

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

      @@deybmen I think the code structure also falls under the same 'set once' mentality - any rest interface is copy/pasta the previous one, database connections are pulled from the internal 'known good' library - from my limited experience there isn't much difference at the code-face.
      For me specifically the majority of the code runs on the proper edge - dual core Arm @ 1 GHz / 1 GB ram is mid-range. I can't physically fit Typescript type technologies in there.
      But once I got good enough with Rust (replacing C and C++11) it wasn't hard at all to get involved in the more central services.

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

      what you are saying is pretty much invalid/irrelevant as a counter argument, without giving the context of what kind of challenges different teams are facing, UI for which platform? Backend service. (Insert NDA warning here).
      Or you are referring to the speed/memory, then of course, Js is bad.
      If you guys are doing the exact same thing then sure, something is wrong with another team, maybe it's a team issue or maybe it's a language itself as you claim.
      What inside the video is different choice for the same set of problems from same people, your case is different teams, different choices, different problems. Just not comparable.

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

    What program did you use to make the line of Prime? I've seen Prime use it also.

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

    Stability is always a benefit, but at what cost/time?

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

    Rust is great for datamodeling too, its enum variants can save you from otherwise complex classes in other languages

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

      The first thing you have to ask there is why you want to do that in the first place. It's not a good engineering practice to build complexity at that level. It is a necessity if you believe in form over function, like hard core OOP folks do, but that's the wrong approach to problem solving.

  • @Sky_Hustle
    @Sky_Hustle Před 4 měsíci +1

    Hence why Rust is ideal for something like smart contract dev/deployment on Solana. You only have one shot and you don't get to iterate after that. So I def agree with all this. You have to use the proper tech for what you are trying to build, not try to build everything with the tech you like or favor at the time.

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

    This was the Theo-i-gen.

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

    Idk what Theo is on about here; Rust is fantastic for rapid prototyping. The only time it's a problem is when there's no buy in

  • @thekwoka4707
    @thekwoka4707 Před 4 měsíci +1

    I don't necessarily think that using Rust is fundamentally less flexible. Since you can have more confidence that it works, as opposed to more "flexible" languages mostly means it allows stuff to just be broke as heck.

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

    Hot take: Java, Rust, Go, Node, whatever. System architecture, database design, streaming and correct parallelisation, choice of network protocols, these determine 99% of perf. The language yields the last 1%.

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

      Another hot take: this applies to correctness and stability as well. The choice of abstractions, the interfaces between these abstractions, and their unit and integration tests are overwhelmingly more important than the restrictions built into a language’s type system. Go’s type system is good enough even at colossal scale IMHO. It’s the other stuff that matters.

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

      the issue with this argument is that it ignores the effect that language choice HAS on all of those other choices.

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

      No all languages are equal
      There is no need to use Javascript on the server ever period.
      You have so many great languages to pick from and you pick one that is extremely bad designed because originally it was for quckly adding interactivity to web pages and not for processing tons of requests.

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

    Using C++ at my day job, I just want Rust at any level of production.

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

    Idk, for me Rust makes change faster, because in other languages everything starts to fall apart because I make inconsistencies everywhere and the boom, especially in Python. In Rust I can enforce this at the function signature level. I anyway clone and unwrap a lot when I am still in the exploration phase. I guess Python and JavaScript are better for you when you can keep everything in your brain. Also Prime has the bad habit to spaghetti the lifetimes thought the entire code base.

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

    I call my rust code from node and its equally good enough most of the time. serialization is a bitch but, its a good enough. i had to do image encryption in my express app, I did a rust backed package with node ffi and it was very fast. So ended up staying with node instead of migrating my whole app to rust. most of the time you don't need rust.

  • @LeandroAndrus-fn4pt
    @LeandroAndrus-fn4pt Před 2 měsíci

    It depends on code quality! Can you write clean code in rust? Yes. Can you write bad code in rust? Absolutely! However, rust give you all the tools you need to write and test clean/modular/abstract code right out of the box!

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

      You can write clean code in C. All of this language centric stuff is ridiculous. Languages are NEVER the problem. It's what you do with them that's the problem.

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

    imagine a third diagonal line moving tho as soon as skill levels in the population for certain workflows go up
    typescript for example would not have worked in the era, where the majority of flexible labor force was using those plethora of now out-of-style script languages, and formal education was years behind the current bleeding edge.
    because it is about skill and experience, to move fast, in exploratory code
    once you see the world through the lense of a certain language long enough, your point of view shifts, and in the industry, everything is about quantity of qualitative developers, and synergy of experience.
    people who will grow into programming in rust, from a young age, will struggle a lot less to solve issues in it
    just as early OOP code was very different from the one we write today
    as well as solutions in the ecosystem make combinations easier, or find better ways to map a certain problem area (ORM, embedding scripts, etc.) with less of a struggle into a language.
    i can already feel in rust that i can solve a lot of backend stuff, just by understanding how i have to structure a problem differently, from the planning phase.

  • @davea136
    @davea136 Před 15 dny

    I would like to see an explanation of why you think implementing in Javascript/Typescript/etc. is faster and easier than using any other langague. Thank you for your hannel.

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

    The Primeagen needs to stop building APIs that expose the underlying implementation, he would have fewer things that call that API that need changing after he makes changes.

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

    Just like SQL, great but gotta do some more planning

  • @user-ir3yw8bs4i
    @user-ir3yw8bs4i Před 7 měsíci

    When Theo talks about fanboys , it’s kind of funny :D you know what I mean ? ;)

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

    The line of PrimeAgen

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

    Teo is Go, Primo is Rust!

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

    gm king

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

    Go is a mid language and I mean that in the best way possible. I love it for it's compromises done right. To me, the stack of the future is Hugo, HTMX, Go, and WASM modules written in Rust.

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

    another thing prime complains about rust is the build time

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

    I draw the line with Python vs Rust. Python is a hilariously slow and "I trust you"/dangerous language, but wow can you produce meaningful prototypes incredibly fast. Need a little bit of typing? Sprinkle in some type annotations when you want it. But when the project gets to a point where the performance or safety of Python becomes a problem (which is surprisingly later than you'd think), THEN you move onto Rust. But who knows, Mojo might just come in and streamroll the entire process..

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

    Truth.

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

    A restful rest api on rust is a good idea? how many things can change? what if mmmm idk man, i really want to serve as much users as i can with as little CPU and RAM consumption as i can because i really don't have the type of money to pay for gigantic clusters.

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

    Is that whimsical?

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

    Literally experiencing this with our bloody C# API at the company I work at. We're now thinking of just re-writing the damned thing in TypeScript because it keeps giving us so many headaches. I'm also re-remembering how much I hate working with OOP and Visual Studio.
    You can just move a hell of a lot faster in TypeScript.

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

      Can you clarify what specifically creates these headaches?
      I'm genuinely curious.

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

      @@mythbuster6126
      Ok I think you're being quite rude first of all and making a lot of baseless assumptions. I think belittling other developers just because they do Frontend is absurd. Some of the most talented engineers I've met have been Mobile Devs or Frontend Devs. Second I'm mainly a backend/infra/azure/cloud engineer (I wear a lot of hats at the place I work, and we work in a hybrid cloud infrastructure environment). Literally ported a C# API to Go lol.
      Right to explain why I don't like C# as succinctly as possible. I don't like the patterns, I don't like the code gen, I don't like being forced to have everything be some OOP pattern/class. The amount of boiler plate required to set up a route is ridiculous (The fact they had to create tooling around that is absurd, I actually like writing software lol). Setting up observability is ridiculous (New Relic and Data Dog) and prone to errors with things like automatic log decoration not working properly, whereas with Go and TypeScript it's much simpler and tends to work out of the box more. I prefer the way Go manages packages (Git repos) compared to NuGet (npm is also riddled with problems, pnpm makes it slightly more manageable). The docs are also overly verbose and convoluted (TypeScript docs are not much better).
      The principle engineer (who has 15/20 years with C#/.NET/ASP.NET) is also starting to have it with ASP.NET. One of our main API's (Which has to do a lot of quite complicated application of data from various external sources to map products together correctly) constantly goes kaput (Threads being aborted etc.). Azure, Data Dog, Logs and there is nothing that comes up as to why it just simply dies. We've looked through traces and so much but the fact we have a similar API , with similar throughput written in TypeScript with Express and it's faster and more reliable speaks volumes. From our data the performance of our APIs goes in the following order Go > TypeScript > C# (The difference between C# and TypeScript is not that much). We could use multithreading but it's already pooping on one thread so no. We have other ASP.NET APIs which are quick, but this one is meant to be one of our bedrocks and it keeps bombing.
      I much prefer Raw Dogging SQL over using an ORM any day. ORM's I find get in the way of performance all the time. Although using them for schema declrations and schema migrations can be nice.
      As to your point about RIder I don't really like heavy IDE's (Part of the reason I hate Visual Studio). I really love NeoVim (I use VsCode where I have to. Electron was a mistake for VsCode lol). It's one of the reasons I'm not a big fan of C# as it generally requires an IDE over an extensible text editor.
      Some points to note! Unlike Python, TypeScript/JavaScript, Go and a smidgen of Rust; C# is the only language I was "forced" to learn for my job. I hate being forced into a paradigm (I'm not a fan of being forced to be functional either). I'm mainly a procedural dev that will use various other paradigms where necessary.
      I really dislike your condescending attitude and think you could've interrogated my points in a better more nuanced fashion. I hope you don't look down on the frontend devs that you work with. I happen to respect the work they do and do not think less of them for doing a different kind of development. It's like saying folks like Rich Harris, Ryan Carniato and Dan Abramavov are lesser devs for working on the frontend. Do not make assumptions about strangers on the internet and proceed to belittle them for assumptions that you impose on them. I genuinely hope you're not as snarky as this in real life.
      Final Edit: If you like C# and ASP.NET use it, I don't care. I was just expressing my experience using it and have found that I'm unlikely to use it ever again. Definitely going to stick to TypeScript and Go for my self 👍
      Have a good day sir.

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

      @@tanotive6182there is no perceptible reason why your C# API couldn’t do anything that the Go or TS version could. The fact that it “just simply dies” tells me there is something else going on there that your team doesn’t quite understand.

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

    I'd like to see primeagen react to this video

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

    Just use elixir for everything 😂

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

    A lot of this is on the type system too, and yes a lot of you will got hurt by hear this, but the Fact is the only thing a Type system is good for is for a LSP to do it's job.
    if you got a lot of types and they is mix in together they make your software, really hard to change without making bugs.
    the types in typescript is close to been great.
    C#, Java, c, cpp, etc. is not good, because they get in the way of the dev.
    good types need to help you write good code, and not write types and converts.
    ex. C# you got a Int16 but you can't return it in a function with Int32? why because you ? is optional type and Int32 is a sub type. and this is complier stuff, the Dev. should NOT need to fight this.
    Int16 can fit in a Int32, so it should just work, we should not be force to write 2-3 lines of convert code for each place we do this.
    JavaScript(if the date object and typeof got fix) got the perfect type system, all it need is the ability to restrict function parameter to a type and the return type, and pattern matching from Rust.

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

    The real problem is that you invest your own time in learning a language properly, it's bloody hard work so its natural to want to use it for as many things as you can regardless. I am not a smart enough dev to say ill just implement it in rust if the use case suits it (tbh it pisses me off when people say that so casually. that's just like casually saying "yeah no biggie ill just pick it up in a weekend and everything will be cherry ripe..."). Prime even said it himself, he wants his time well spent that's why he is casually fishing around in ocaml to see.
    python or go is a work safe lang because it's socially acceptable to write trash code in them with the excuse of "yeah we're just iterating quick we'll fix it up later"...

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

    The name is the Theogen. 😊

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

    real men write everything in ES1 JavaScript and debug until their eyes bleed.

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

    kinda disappointed...
    Prime explained that a csv parser would be great to develop in Rust (and be on the right side of the line of Prime) because it's a self contained program.
    in contrast to what you said:
    - you do know what you parse ( a csv specified file)
    - you do know what "you need around that"
    and as Prime said "there's a set of rules that must be applied and you just got to apply those rules in a linear fashion".
    and you stopped his video right before he said "a place with Rust in that just seems like just a W".
    that's very misleading...
    funny enough, I agree with you 100% on this topic, I just think your use of Prime as an example is bad and missing the point.

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

      lol yes, that confused me a lot.

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

    I thought that sun light was spilled yogurt...

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

    I don't think Prime would ever choose TS, though. He'd choose Go for the left side.

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

    Lars Bergstrom just heavily disagrees rust isn’t flexible at rust conf UK and shows you why

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

    Its amazing to see a whole generation of programmers get an epiphany: "performant prototyping". Its like watching your child grow into a man. Programmers usually start showing that aptitude around 30 and older. Its the same age requirement to be a U.S.A. Senator.

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

    Making correct changes to Rust code is easier than making correct changes to JS code. Making incorrect changes to Rust code is harder than making incorrect changes to JS code. If you value your incorrect changes as "moving fast", you are basically generating hundreds of bugs and technical debt that could have been prevented, and you don't even know about them until later. It's a trap to believe you'll be able to rewrite later, so if you always pick Rust from the beginning you'll save the headache of rewriting in the future as well as dealing with so many production outages.

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

    Okay, but then why use typescript?
    If you really want to move fast, defining and maintaining types is holding you back as well…

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

    I would say its a misconception that rust isnt 'flexible'
    being able to fearlessly refactor is very flexible. Having most of your heavy logic as impls on your structs is very flexible.

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

      I am sure that Rust is great language but I doubt it protects you against unintended changes in business logic when you refactor your code.
      As for logic as impls, if those are your structs it does not really matter if your logic is in class methods or in impl blocks. It makes no difference and you can easily change it either way, unless you have 10 levels of inheritance that is.

    • @hagaiak
      @hagaiak Před 4 měsíci +1

      @@bionic_batman I think the commenter above meant that Rust is very easy to refactor and change due to its nature. If a Rust program compiles, it has a very chance to also work as intended. There's no other practical language with such a high rate of confidence.
      This means you can easily make changes in your Rust code-base, without fear of anything breaking. Compared to other languages where a change can be very hard to do correctly.

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

      @@hagaiak Plenty of modern statically-typed compiled languages have similar level of safety to what Rust has but without all that annoyance that Rust also has.
      Plus Rust program can still die/panic in runtime

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

      @@bionic_batman name those languages, please.
      I know very few that have these guarantees. Scala, Haskell, Rust, and that's about it. The rest are not popular enough to even consider.

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

      @@hagaiak For example, Go
      Yes, it has nil pointers but they are almost never an issue.
      It has great memory safety, structs and arrays never have any junk in them because they are always initialized with default values
      Plus it has errors as values just like Rust, so no hidden control flows, your program always behaves in predictable way

  • @perc-ai
    @perc-ai Před 7 měsíci +1

    Wait wtf why do you like Hasura now…

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

    we can have a language that give us all, like the following.
    the OOP and other idea's from the last 20 years is the reason we make BAD software, Rust got one of the best features from FP, the Optional(Maybe) this remove 98% of all errors the NULL ref. problem.
    the best way is a mix of all the patterns, we need Objects as a data holder, we can have Pure logic in them, so no calls to APIs or Random or files etc. and they can't use other objects for more then ex. person got a address, because then you can send only the address into the function, and not the whole person.
    then we need pipe from FP, Pure Logic functions in a pipe line make the so much easy to change in the future, and a lot of less bugs.
    we need to grep the data from Apis db etc. we need dirty functions the is mark as dirty and can't be call from any thing then a other dirty function, they can call pure functions but pure functions can't call the dirty ones.
    and then we need security feature, where we can on function pick what from the object we send in the function can read/write to.
    then as in rust any variable is read only by default, you need to tag it as mut for it to be changeable.

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

    I disagree. I am building early in several projects. These involve multi-threading and have a fair scale from day one. Rust is working well. Tokyo and mcsp channels are great. The performance means it works well on day one.

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

    wow am early tdy😁😁

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

    It sounds like you guys are not doing component based feature development, the language doesn't really matter then, making changes is easy.

  • @ambuj.k
    @ambuj.k Před 7 měsíci

    This is a fair conclusion and as a long time Rust fanboy, I agree with you. But still, I'd pick Rust over C++ or C if I have the choice.

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

    Why does Theo look like he's super jacked up on coke...

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

    Man Go just sucks though. I use it every day and there are some really, really poor design decisions that hurt us every day

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

    Prime recently understand that simplicity is better than complexity hidden by an API (Go VS Rust for example)

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

    ooooooooooooooo spicy shots at prime yayyyyyeee.

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

    Summary: Rust is not the best choice for Agile projects

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

    (CTO @ a small tech startup here.) I like Rust. I'm rebuilding our Saas product in Rust. I'm 9 months into the project, and have 7 months to go before some big customer deadlines. I think the criticisms of Rust are a little overstated. It's slower to code than in Python for sure, but, it's also much less likely to be wrong than Python. It's nice to be able to code confidently.
    I think in the end it'll be a much better product for our customers.

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

    why i feel that theo want to kill prime?

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

    I would argue that for the exact kind of well-understood problems that Prime was talking about like CLI tools and parsers, rust *also* lets you build the thing faster than something like typescript or Go, simply because:
    1) at that point you can tell what types you need and do type driven development
    2) Rust is expressive enough that it probably has a framework that will help you do what you want to do
    For instance, if you want to make a CLI tool, then Rust will have much better libraries to do work in than Javascript will, and having nodejs as a requirement would make the tool a hard sell to anyone who is not a "javascript developer" like for example anyone with a C/C++,Go, PHP, Java, C#, or Python stack, which together are a much bigger slice of developers than the nodejs people.
    Even among interpreted languages, having someone install python on their system for a CLI tool is a much easier sell than getting someone to install node when they do not need to. You can use a smaller javascript runtime and bundle it into an appimage but then you will have way less tutorials to help you.

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

    God, of course Jonathan Blow’s absolute bullshit triggered this

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

    Im one of those developers who won't admit that i should use something like TS or Go for faster development of stuff.
    I'm not sure if it's for the right reason or not, but I'd still choose Rust over TS no matter the project, just because i feel way more comfortable and faster with it