Your Next Backend Should Be Written In...
Ғылым және технология
Recorded live on twitch, GET IN
Reviewed Video
• Your backend is too co...
By: Isaac Harris-Holt | / @isaacharrisholt
My Stream
/ theprimeagen
Best Way To Support Me
Become a backend engineer. Its my favorite site
boot.dev/?promo=PRIMEYT
This is also the best way to support me is to support yourself becoming a better backend engineer.
MY MAIN YT CHANNEL: Has well edited engineering videos
/ theprimeagen
Discord
/ discord
Have something for me to read or react to?: / theprimeagenreact
Kinesis Advantage 360: bit.ly/Prime-Kinesis
Hey I am sponsored by Turso, an edge database. I think they are pretty neet. Give them a try for free and if you want you can get a decent amount off (the free tier is the best (better than planetscale or any other))
turso.tech/deeznuts
Пікірлер: 566
In JDSL, of course.
@airkami
15 күн бұрын
Genius detected
@Sw3d15h_F1s4
15 күн бұрын
ask Tom, he's a genius!
@noahtah1511
15 күн бұрын
Read it for the first time yesterday perfect timing
@vincentnthomas1
15 күн бұрын
TOMS A GENIUS!!!!
@ethanannane8783
15 күн бұрын
JDSL, the only langage where comments execute. Toms a genius
I love how every video an alert goes off and you're like "my bad forgot to turn alerts off"
@cacophonic7
15 күн бұрын
He is guaranteed to get those donations doing it.
@wooviee
15 күн бұрын
And I'm loving every minute of it.
“We’re completely off the *rails*” I see what you did there
@KerchumA222
15 күн бұрын
came here to say just this.
In RISC-V ASM, of course.
@DataToTheZero
15 күн бұрын
Pfft, weak. VHDL on an FPGA, hook your network transceiver straight up no driver chip. Anything less and your leaving performance on the table. Plan to go straight to custom asics as soon you hit version 1.1
@JohnDoe-np7do
15 күн бұрын
Insanity 😂
@AmeOFF
5 күн бұрын
@DataToTheZero Verilog then
my backend is in scratch
@andyk2181
15 күн бұрын
meow 🐈
@spkim0921
15 күн бұрын
nice
@window.location
15 күн бұрын
What's the project name, back-scratcher?
@JoyousUnicorn
15 күн бұрын
goat
One of the most impressive demos I have seen was with Erlang (beam VM). The guy introduced a while true bug, that took 100% of the CPU, however, the server still responded normally. Not only that, he then connected to the server, found out the process that was causing trouble, and killed it, making the server run normal again.
@ihemanrawr
15 күн бұрын
kzread.info/dash/bejne/fKp2tpaRcsfVhag.html this is that video
@rodjenihm
15 күн бұрын
You can even fix the bug and hot reload it in production
@Deemo_codes
15 күн бұрын
The soul of erlang and elixir by sasa juric. Fantastic talk and a fantastic demo
@y00t00b3r
15 күн бұрын
@@Deemo_codes you win the internet today. reason: providing search terms which IMMEDIATELY took me to the relevant blog post / video. Everyone: LEARN FROM THIS PERSON!
@kawo666
15 күн бұрын
And then you could build NIFs in Rust that would run computation heavy tasks within Erlang/Elixir backend if required (normally these would be coded in C, but Rust seems a safer choice)
Microservice Take: Write a monolith out of modules, the modules should talk between one another using a defined interface, and they shouldn't share DB tables. If you need to you can always spin these modules off to be microservices. However, imo, you probably won't need to.
@y00t00b3r
15 күн бұрын
wisdom. You can have microservice-able architecture without actual microservices.
@BrunoArrais1
15 күн бұрын
It's called Umbrella app on Phoenix/elixir ecosystem. It's a clever idea but most devs create a spaghetti codebase out of this so it's hard to recommend
@real_ouss
15 күн бұрын
You should watch a talk named Networkless HTTP by Matteo Collina, I think you would like it
@anb1142
15 күн бұрын
Hey Could you give me some resources to learn more about this
@fueledbycoffee583
15 күн бұрын
i do this buy why not share DB tables? sometimes some services need to touch the same set of data and i avoid inter service comunication
All that is true about the actor model in Gleam is also the same in Erlang and Elixir - it's just the BEAM VM. By the way, it is named Gleam because it rhymes with BEAM.
@28:01 bricks are actually layed that way and it's called a header course. It's used to tie the stretcher courses (the normal orientation bricks) together for structural rigidity
In C#; Why would I go into the hassle of learning a new language when I can write my next backend in C# and have it perform faster & better, hmm.
@donateus6743
15 күн бұрын
csharp runtime sucks, ton of legacy stuff, btv microsoft is looking for rust devs, to rewrite some stuff from csharp😅
@ltardioli
15 күн бұрын
C# is my comfort language. All the time the I'm struggling with some problem in any other language I just switch to C# and it feels like home.
@doriancerutti5331
15 күн бұрын
I second this, C# makes my life so much easier. You can do anything with it and it makes my nips happy
@bitcrusherNOOP
14 күн бұрын
i mean you could and still use actors with Microsoft Orleans or akka but the BEAM is goated and first class in those family of languages.
@md.redwanhossain6288
14 күн бұрын
@@d_6963 which language can outperform C#? Rust, Golang have the capability. But they are not comparable with C# because they are suitable for more Lower level stuffs.
GLEAM MENTIONED
Sometimes when Prime talks a lot and seemingly with a lot of conviction about something I feel like what is actually happening is that he's trying to convince himself about what he is saying.
@haniffaris8917
14 күн бұрын
Nah, it's your insecurities poking their noses. Projecting your own uncertainties with his convictions being a sign of his lack of confidence. And in my humble opinion, him talking a lot might just be a sign of him being a streamer, just a thought, I'm not really sure. But boy he does sure looks like someone who would stream.
@TehKarmalizer
13 күн бұрын
Expressing your understanding of something is an exploration of why you understand it.
@AloisMahdal
12 күн бұрын
He does seem to think aloud a lot (and a lot aloud)...
I think we tend to gravitate towards languages that tries to fix languages we've been using, while still be familiar enough with it. I started of coding in Python 6-7 years ago, and even though I have studied Java, C, Haskell in actual classes and even written one or two Rust and Go projects, it never felt "home". I got too accustomed to indentations and multi-paradigm concepts in Python. Recently, I started to use and like nim, and I think it's because it fixes some problems of Python while still being similar enough (at least on the surface, the language has so much more flexibility because of metaprogramming and its ease in making a c wrapper). Anyway that's probably why people switched to JS to TS (without actually switching much) as well... they are used to it and wanted to use something that's better.
@ForChiddlers
15 күн бұрын
Try harder with java, you'll notice. And you'll think about all the python devs, that they are the result of a failed school system
@opposite342
15 күн бұрын
Here's the thing. I used to love Java. I also realized it has flaws when looking under the hood. I like OOP, but then I did remember at some point overengineering a class diagram before even doing anything... Kotlin is neat though, but I don't feel like I have excuses to use it as much.
@nicholaspreston9586
15 күн бұрын
I've stopped trying to fix languages with other languages (I've suffered enough, looking at you, React!). People are the problem, including me. We tend to create what I call "code entropy". This is why I build numerous small C# libraries that each have 1 responsibility. I can tell which packages I use more often based on the version numbers. 😊 And the one with the highest would be my Types nuget package that has extension methods for LINQ, quick null-free string parsing methods (with optinal fallback params), and a special Dump method that prints json to console whenever I'm debugging, but also returns the object so it never breaks control flow or causes eye-bleed. So, basically, for me, 'fixing' my favorite language worked out great for me. I can solve complex problems really fast in LINQ, dive into directories asynchronously with a few keystrokes, debug without stopping or pausing execution, and more odds and ends I'm forgetting because I'm high on coffee ☕️ 😳
I mean I could do all of this with Java Spring Boot in like 10 lines of code... Use the Right tool for the problem but ignore Spring Boot for some reason.
@elimgarak3597
15 күн бұрын
It isn't trendy, you see
@davidsiewert8649
15 күн бұрын
Yeah, no doubt you can do that having spend 5-10 years memorizing Spring Boot framework-specific APIs. I personally like/love libraries there I have IDE-Autocomplete and can write productive code after 10-30 min of reading the docs instead of wasting days trying to understand and wrestle with Spring Boot Idiosyncrasies.
@AloisMahdal
12 күн бұрын
i just googled Java Spring Boot and learned that it's a tool you can use Spring apps, and Spring apps are apps that you can just run. well.. ok, i guess... (not really.... shrugs...) sometimes i feel like these technologies are just trying to be obtuse...
Re: "Early Return" - mapping and flatMapping monads does that. If your result type is a monad, you just map or flatMap the success case. That mapping will never execute if the result isn't a success, so it's equivalent to an early return. Several functional languages have special syntax to avoid nesting for sequential flatMapping (e.g. Haskell's do-notation, Scala's for-comprehension) - gleam's "use"-expressions do a version of the same kind of thing: avoid nesting when handling result types.
@y00t00b3r
15 күн бұрын
where can we learn more?
@y00t00b3r
15 күн бұрын
C'MON, MAN! Don't leave me hanging!!!
@dylan_the_wizard
15 күн бұрын
This does not necessarily solve the same problem - without an early return, you basically have to keep nesting code in your if/else chain (or case, or whatever gleam uses). Early return is usually just an easy way to break out of the function early without having to keep nesting and indenting logic branches.
@DumblyDorr
15 күн бұрын
@@dylan_the_wizard I'm not sure I understand. An early return by definition is inside some form of conditional - you still write code after that (that's what makes it "early"). When it comes to avoiding having to nest code to handle (computations returning) results - that's exactly what Haskell's do-notation and scala's for-comprehension do for monads.
@dylan_the_wizard
15 күн бұрын
@@DumblyDorrthis isn’t Haskell. If you don’t have early return you need to keep nesting cases. Early return lets you just add more cases underneath instead of indenting to the right.
Java... To be precise: a JAR file with the www resources and config file embedded inside. You'll end up with a single file that's your entire web package, and it runs on any system.
@thapr0digy
15 күн бұрын
And it's garbage collected and a memory hog
@CaptTerrific
15 күн бұрын
@@thapr0digy Overstated problem. You shouldn't be throwing nearly enough errors to the point where that becomes a processing or memory bottleneck. If it is, that's a skill issue
@1130MarsV
15 күн бұрын
@@thapr0digy enterprises have no problem with it, doubt a startup would
@EvileDik
15 күн бұрын
This is the way. Too many millennial code fashonistas who's only language goal is the latest shiny.
@blinking_dodo
15 күн бұрын
@@EvileDik I once made a HTML live chat without JavaScript. The java server would keep the Sockets open to send new messages, and browsers just happily append the latest bytes to their DOM. A side-discovery was that as long as you don't close the connection for the main page, the webdev tools would be mostly unusable.
If every year is "the year of X" then you will never get to pick the right tool for the job.
I'm interested in Gleam's approach. Raw syntax of Erlang itself was offputting to me, but Gleam seems to re-imagine things in a more go-like structuring, which idk, sounds fun. In particular, I'm interested in how the beam-language translates to something like a jvm, because I'm seeing I can leverage beam on microcontrollers, and if so, it could be a jvm-like solution that goes pretty deep, as in, could use it from microcontrollers, to backend, to frontend, in a self-containerized "thing". IDK if that's accurate, but it sounds appealing if so.
"More microservices than users" 😂ok that made me laugh out loud.
Spring boot obviously
@MrZadeak
15 күн бұрын
Agreed, but in kotlin instead of java because I'm that special:)
@wormisgod
15 күн бұрын
Java spring (sometimes micronaut, quarkus etc) dominates enterprise and banking
@DJ-XLR8
15 күн бұрын
Actually yes, literally just did that and I’ve been super happy with it
@ForChiddlers
15 күн бұрын
Yeah, Spring Boot and Java. Most elegant solution. Kotlin sounds to strange to me.
@armsofundertow98
15 күн бұрын
I was thinking the entire video "You can just do all of this with modern Java and Spring"
"Do things that are beautiful", but also "no one cares about your code - all that maters is the result". I can't think of a way to resolve this contradiction if you ONLY code for work... mayby "find beauty in something that you do", instead of "do what you think is beautiful"?
@blackjackjester
15 күн бұрын
Yea, if I brought elixir or gleam into my next project at work I'd be crucified
@quelqunderandom6143
15 күн бұрын
you are taking this too literally, the idea is more "do a beautiful project", something that can help others, etc...
@vinterskugge907
15 күн бұрын
It can easily be resolved if you realize that beautiful code has much fewer bugs. And an important metric for how good 'the result' is, is the number of bugs the system has.
@isodoubIet
15 күн бұрын
There is a difference between extrinsic and intrinsic motivation. Your extrinsic motivation is to build software your users want to use. Your intrinsic motivation should be to make it beautiful. That's the claim.
@arcuscerebellumus8797
15 күн бұрын
@@vinterskugge907 not in my experiance it's not. If I spend my time polishing something to maximum levels of perfection available to me at my current level of proficiency what I usually get is complaints about "what took you so long". If I just slap things together and drop off a commit that barely works - it's fine. As to the bugs - they get delt with if/when they appear and no sooner. As a result, making something "beautiful" is a prerogative I allow myself only when I do things for myself, which the more I work, the less I get the time and/or inclination to do. PS: ...not that there isn't some beauty in jank that boggles the mind as to why and how it manages to do its thing at all ^_^
Well said.. instead of suffering from the architecture heart attack as a start up just build the damn thing first.
Love how the author just casually glosses over the N+1 database call @17:30.
@BosonCollider
15 күн бұрын
A Pokemon can only have four moves, so there are at most four queries, and they are run in parallel instead of sequentially since it spawns a task for each call and then waits on all of them with a timeout.
Really enjoyed your perplexed response to the non-stochastic nature of pokemon battles towards the end
First-timers don't mind it slow in the backend if it translates to a softer smoother experience. However, those with more rodeo experience like it fast, and are willing to have it be a bit rough to get the most out of a full performance.
I would take a look at Elixir, if it where statically typed. At least at the level of TypeScript.
@nicholaspreston9586
15 күн бұрын
Is it typed to the level of C#? I think TS Is way overtyped (and overhyped), to the point where you're just writing more broken javascript but in a different flavor. But that's a common opinion. Coming from a C# background, I just could not get into TS because I kept falling asleep reading the docs
@blenderpanzi
15 күн бұрын
@@nicholaspreston9586 Elixir is dynamically typed, so like JavaScript without TypeScript, as far as I know. I meant TypeScript as an example for a not that great static type system glued on top of a dynamically typed language. With at least I meant that a type system like C# would be more than the one of TypeScript. :D
@username7763
15 күн бұрын
Same here. I already know Python and JavaScript. I've done a little Perl and Lisp and that's enough with the dynamic typing languages. Plus Python got type checking and JavaScript has Typescript. What's Elixir got? Fix the type system, and I'll be interested.
Microservices? Of course! We need that Resume Driven Development. It does get you into the next job
@desertfish74
15 күн бұрын
Extreme go horse
In C++, of course. No, I mean seriously!.
@StTrina
15 күн бұрын
Nonsense. The Whitehouse has issues a warning on c++ and they know more than we do. I mean, they put Kamala Harris on AI.
@Simple_OG
15 күн бұрын
My boi
@abjee1602
15 күн бұрын
@@Simple_OG C please
@CaptTerrific
15 күн бұрын
@@abjee1602 if you treat C++ simply as "C with smart pointers," it becomes a PLEASURE to work with!
@bobbob1278
15 күн бұрын
Based and red pilled
I use MemoryCache in C#. Seems pretty fast. Dunno if I need Redis. Not saying I wouldn't use it tho. I like graph and what I'm hearing about Redis's versatility and speed overall. Just haven't found a use case yet in my personal projects
I really like your microservice take!
In C#, of course.
@infinite_s902
15 күн бұрын
It’s pretty simple tbh Specially the minimal api
@thehumster7837
15 күн бұрын
Minimal apis arent for scale. Depends on your scope. Theyre all embedded directly into Program.CS so if your program has more than a few CRUD endpoints they instantly lose relevancy. @infinite_s902
@bity-bite
15 күн бұрын
@thehumster7837 This reply can't be AI generated because it is full of nonsense. Minimal APIs do not have to be in a single file, they can be anywhere. There is infinite amount of resources talking about minimal APIs being just as scalable as controllers are.
@User_2
15 күн бұрын
+1, quick setup and there’s not much you cannot do without too much finagling
@andrewshirley9240
15 күн бұрын
@@thehumster7837 Minimal API setup is just a Map function call from the EndpointRoutes global. There are infintite ways to structure this. You can organize your endpoint resolvers as static classes that include a "MapEndpoints" function so Program.cs just calls into each of those. And if that gets cumbersome you can separate that bit into its own class dedicated to the registration. Alternatively you could do what controllers do and use attributes + reflection to set up any endpoint routes. You could have a separate service dedicated to endpoint resolution that contains all the logic. Etc. etc. The demo examples just call it straight in Program.cs, but the heart of it all is in the IEndpointRouteBuilder.
Partition will return a tuple of Ok results and Error results in their own respective lists. For example, [Ok(1), Error("a"), Error("b"), Ok(2)] would return #([2, 1], ["b", "a"])
That penguin is an accurate representation of how things work in a lot of projects. Someone finishes some mismatched feature (coding style, language, dependencies, etc.) and just mashes it all together with all the other mismatched pieces of code that make up the application. 5 years later you remake the original a̶p̶p̶l̶i̶c̶a̶t̶i̶o̶n̶ bugs, but this time in another language that will totally "get rid of the legacy code issue and bring us in line with current trends".
Clojure has beautiful values everywhere; not just errors.
Just use whatever you’re most comfortable with which also fits the requirements
PHP because Laravel. Just get it done. Then when the project has legs it's easy to get more devs at every level and you can peel parts out of the monolith into secondary services if you want to move to other languages within a particular domain (not for scaling, that should already be handled if you've done it right).
@stefanalecu9532
15 күн бұрын
Laravel is just so wonderful, once you try it you'll become a new person
@brunoggdev6305
14 күн бұрын
Agreed. And honestly, even if u don't use laravel, PHP frameworks in general can do so much stuff so fast to get u up n running. Obviously tho, Laravel is the most robust approach if u need this kind of power
@gaetanp77
13 күн бұрын
Ton build an API please try API Platform. In the next release you will be able to use it with Laravel (or in any PHP projects). They work done on this his HUGE, it's so easy : add attributes to your DTOs, write provider and processors (or not if you use Doctrine orm) and bam you have a full API with security, content negociation, caching, documentation, ...
@gaetanp77
13 күн бұрын
@@brunoggdev6305I find Laravel pretty good for RAD, but Symfony much more flexible when you need it.
GoLang the first thing that came to mind
Driven by beauty helps you write better code I agree, but it can also drive you down the rabbit hole or give you tunnel vision. You need good discipline to code this way
Good video. Now let's watch it.
In BeefLang, of course.
@johnbruhling8018
15 күн бұрын
Everyone starts with SQT-Lite but ends up with Rock-abs
Id use Spring, probably. I just like the batteries included thing.
Ofc he left alerts on 🤣
Elixir is the most readable functional language there is, which isn't much to say, but hey, at least its something
You can tell ThePrimeagen isn't as confident in his position when he gets angry that people suggest something to him. It's gotta be annoying to be pulled in all these different directions. Love the content!
26:00 it is, the RNG is in getting that polemon (stuff move etc). But in a program that there is just 1 version of that pokemon, it is deterministic.
Yes do elixir. It’s on my radar for the later part of this year
2:30 "off the rails" while mentioning the #1 ruby user
Write your backend with the language you're most comfortable with.
@imaadhaq540
15 күн бұрын
wrong!
@FelipeV3444
15 күн бұрын
Unless it's JS
@theropoy9371
15 күн бұрын
Only for hobby projects.
@wetfloo
15 күн бұрын
write your backend with the language that is most fun for you
@minorlion1327
15 күн бұрын
There are languages that are build for work like backend. Writing in other languages is dumb
For this who didn’t watch, it’s vanilla JavaScript
17:47 It's indeed pretty context specific, so it's not surprising. In gleam it splits a list of results into one list of successes and one list of failures.
Occam's razor, the programing community is over represented by people who are both extremely confident and anxious at the same time, this creates this entire bs. No other profession changes tooling, and it's also not needed. If u go full sober no cap, you will see there is hardly any correlation between tools used and the succes of an application. I bet most successful apps are still in wordpress, webflow, php or w/e. Some changes made sense because the world changed, the general introduction of things like bootstrap, vue, react etc. because we went from static text on a single device to interactive on multiple devices, but the differences between them within their tier are not that relevant.
Everyone starting with microservices before they have fully mapped the domain will spend more time on DevOps/Platform engineering tasks than they need to early on. Until there are clear bounded contexts and a compelling reason to use microservices, most early stage projects should use a monolith to start. Early resource investment should be focused on features and delivering product, not technical ideology. End users don't care. The business most likely won't care. The VC/PE money folks won't care. Is your work fit for purpose? Does it add value to the business? Can sales close deals? These are the questions you should be asking early on, not whether the architecture adheres to Reactive/Clean/Onion/DDD/etc. Prioritize tests and working software over pedantic architectural implementations.
I would write my backend in either rust, java or both
to me the function coloring problem seems a lot like a tooling issue. If I have strict typing, it should be possible to automatically refactor all callers to be async and await the call. I think function coloring for async is actually good, particularly if your function only performs async IO sometimes. If you don't know whether a function can block for a long time, its just to easy to accidentally block the main thread of an interactive application, or block shared resources. Having to refactor large parts of you program just because you made a tiny change, is of course annoying, but the solution is automatic refactoring or to explicitly decolor the function (i.e. wrap it in a block_on or whatever your language calls it.)
I wanted to learn a functional language, so I looked at Haskell and OCaml. They were very interesting, but they felt highly alien to me. However, Elixir felt different. Elixir is partially alien, but in a good way. The pervasive use of pattern matching is such a good design, in my opinion. Additionally, Elixir feels really friendly to newcomers. It's really easy to explore new concepts from the functional paradigm, unlike in Haskell where trying to understand what a monad is can be quite challenging ._. Also I consider Elixir being extremely usefull and practical language with some superpowers no other language has (except BEAM langs ofc - Erlang and now Gleam).
if you're not using elixir on the backend, you're simply falling behind. the mechanisms provided by the beam vm have no competition. the beam is truly a business logic operating system.
Rust’s lifetime function colouring is a refactor nightmare! I too stopped using Rust when that came into the picture.
elixir mentioned.. let's gooo
Magic computer guy!
did you just say effects don't have errors as values? that's kind of the core of it. also soon we'll have effect rotation too so you will not have to wrap everything into an effect.
Use elixir and build a distributes system, is insane Real-time communication low latency distributed is what elixir shines at. Edit: gleam is another language for the erlang VM, I think is better than elixir in many ways but is just too new still
@blackjackjester
15 күн бұрын
Gleam needs more dedicated people to build the ecosystem... Or a much stronger standard library. I just don't want to have to write my own everything. I've got kids.
@balen7555
15 күн бұрын
I prefer Elixir over Gleam in every way possible. And Elixir is getting an interesting type system too.
@Voidstroyer
15 күн бұрын
Can you give some examples of how you think that Gleam is better than Elixir in many ways? The only one that I can think of is that Gleam already has static typing whereas Elixir will be getting it a bit later. But it's not like Elixir doesn't have ways to handle most typing errors already (function guards, pattern matching, immutability).
@balen7555
15 күн бұрын
@@Voidstroyer Precisely. Also, lack of metaprogramming in Gleam is a big weakness. The general trend over the past decade has to introduce stronger metaprogramming. An example is how in dire need of metaprogramming Dart is, which it is getting soon; and how their current temporary substitute (build_runner) is messy. C# introduced source-generators. The moment your programing is more than just simple REST APIs, metaprogramming becomes invaluable. I can't imagine something like Phoenix without macros... Literally all languages have adopted metaprogramming to some extent, and Elixir is better than most languages at it. There are so many things that Elixir does much better than Gleam (IMO).
@Voidstroyer
15 күн бұрын
@@balen7555 I agree, however I admit that I have personally not really looked at Gleam as much (just watched a few videos) and so it's possible that my own bias towards Elixir is causing me to not see certain things. Which is why I am curious to see what @siriguillo has to say about his comparison of the two languages. (And to be fair I am curious to see if his opinion is also based on a bias towards Gleam due to lack of knowledge of Elixir).
Whatever language its easiest to employ people with. It’s different in different locations.
Elixir is more or less procedural with functional qualities like immutable data. Gleam is the functional language on the beam.
Esoteric language mentioned
Check out the ROC programming language. You would love it.
All that dynamic field stuff just reminds me of parsing xml using sax and all the setup before hand…
@ThePrimeTimeagean You can also do all of what he talks in this video in, for instance, Kotlin. You have sum types, coroutines (to do actors, and more), etc. I advise you to try this multiplatform language. I have many Rust lover friends (as am I) and all are also using Kotlin for some tasks since I made them discover this language.
Huge gold nugget at the end of the video!
In Plankalkül , of course.
In Minecraft redstone, obviously
Honestly, I'd use PHP first, then C# or Object Pascal (I am expecting such good responses)
Gleam is fun. From top-down, a Turbo Pascal on steroids for beginners. Underneath, the power of Erlang and js inclusion. Carl Sagan, "billions and billions of concurrent processes." So after supernova, my system collapsed into a black hole, consuming all light. Imagine Gleam in a container.
Prime once again sleeping on COBOL.
@stefanalecu9532
15 күн бұрын
But he won't be sleeping on the fat stacks he could make if he works on COBOL
You are of the rails, BUT RUBY DOESNT! KEWK
0:22 Anything that transpiles into something else has to fail; elixir -> erlang, typescript->ECMAScript, coffeescript->ECMAScript, comes to mind.
The correct answer is Java. There's a reason it is used extensively in FAANG and banking. Only downside is the boilerplate
@williamkoller9873
15 күн бұрын
Agreed. Plus, the boiler plate is really non problem with copilot.
@nandomax3
15 күн бұрын
Boilerplate? Spring does so much magic stuff, it's just a @ here and a config class there and you have DB connection, orm, security, authentication, Kafka Connection. Sometimes I wish Java with Spring did less magic
@nandomax3
15 күн бұрын
@@williamkoller9873copilot? Intellij and Lombok creates all the boilerplate for you😅
@worgenzwithm14z
15 күн бұрын
Everything is an object, everything is nullabe, need to write a ton of if conditions to check for nulls No thanks Kotlin and Scala exist and run on the JVM
@rapzid3536
15 күн бұрын
@@nandomax3 Yeah the Spring magic plus build and boot times on large projects is a much bigger problem than boiler.
GZ with following from DHH!
You can keep Zig, lol. I don't know why I'd build a web app in Zig for allocation reasons, unless it can beat c# or Go. Perhaps it has a niche I'm ignorant of? I mean, it looks cool, but it's on my list of langs to try.
The one thing I liked about Web Services from the SOAP era was WSDL files. Just download the thing and generate the client. Something like this should be mandatory for every API.
@awmy3109
13 күн бұрын
There's Open API spec for APIs now and you can generate clients from them.
I feel that's some sort of hypocrisy if you say "try/catch is bad, not good, hard to understand" but your alternative is case/Ok/Error. Sure try/catch is specific to error handling, and shape matching is more generic. But just because you COULD use an electric bread knife to cut bread, cheese, sausage and shrubbery doesn't make it the better tool. Also gleam's piping syntax looks like a big complexity bomb waiting to happen. I'll be that guy and call it now: once gleam has found some real world use, people will tell us gleam pipes are oh so evil.
This whole value as errors misses the whole point of exceptions. In another video recently Prime mentions he likes assertions that just fail the app, well that's how you can make exceptions work. If you don't want to handle them. If I'm calling a function X, I don't need to know all the exceptions it potentially might throw, and I don't care, in most cases an exception been thrown is likely something you can't do anything about anyway, (well not easily). eg. Out of memory, out of disk space, file permissions etc etc. But the nice thing if you did want to handle the exception, and implement some sort of recovery you can opt in later. I think a lot of reasons exceptions get bad rep, is when people use them for flow control, if a 3rd party lib is doing this then that's the fault of the lib, not exceptions.
@isodoubIet
15 күн бұрын
A lot of it also comes from these awful garbage-collected languages where you might end up dropping state if you throw an exception. But that's also not the fault of exceptions, that's the fault of whatever silly person decided to copy the exception model and not also copy RAII to go with it. Exceptions need RAII to work, otherwise you're left in a nightmare scenario where you have to manually catch and cleanup at every level.
@keithjohnson6510
14 күн бұрын
@@isodoubIet For resources that require cleanup logic that's a good point. For these the the "finally" comes in, but I think Zig & Go's defer wins here. You could create wrapper function to emulate this, but been built into a language really nice. The main problem with all option here is with them been scope based, a really nice option for a GC language would be closure based cleanup.
@isodoubIet
14 күн бұрын
@@keithjohnson6510 Yeah it's like that meme "look what they need to mimic a fraction of our power". The "finally" keyword, disposables in C#, context managers in python, defer etc all just feel completely subpar. What do you mean by closure based cleanup?
Is it a re-upload?
2:42 pretty simple, check out Edsger Dijkstra talking about mathematical elegance.
Function coloring helps separate side effects. If you make a function asynchronous because of another function, it's a code smell.
@vinylSummer
15 күн бұрын
Username checks out
I'd choose Haskell all day every day for back end.
Your next backend should of course be written in next duuh
@nicholaspreston9586
15 күн бұрын
Please do that for the rest of your career.
10:55 "idiomatic way to handle early returns" is a monad
Python + FastAPI as default, and when I hit any performance problems, I start thinking where to fall back.
4:06 What amazing wisdom
My only gripe with elixir is the syntax & the type system is primitive (protocols are nice but interfaces are always a welcomed feature in general) & ambiguous at times in my opinion, especially opaque types like socket_handle() in the erlang docs, logically speaking it should be a fd or io_device, however io_device() type is defined as a process ID or an atom (esentially the same thing as a macro, theyre obsessed with atoms & returning tuples from functions, in fact errors are usually tuples where the 0th index is an atom & the 1th index is the errors message?) Overall its better than a couple of languages but its not for me, i do enjoy trying something different tho i wont doubt that, at the end of the day its still programming.
When i read the title i thought you meant backends as in compiler backends (like LLVM). Guess I'm not into webdev lol
Oh, it's about Gleam, that's nice - I didn't know that and wrote three big comments about how awesome Elixir is. :D Basically, Erlang, Elixir, and now Gleam all have the same superpowers because they all run on the BEAM virtual machine. The difference lies in some syntax rules or the type system (in the case of Gleam). But they all orbit around the actor model in the BEAM VM, functional programming, etc. I just started learning Elixir about three months ago and expected to really like Gleam, but there are some 'buts' LUL. It does not offer some amazing features that are in Elixir - it's a tradeoff for its type system.
Clojure
Spring boot or Golang
Good old Spring, I know for ages.
Prime must have a larger more flexible brain than me. I can only be good at one language at one time. It feels painful to switch between languages.
@y00t00b3r
15 күн бұрын
Keep practicing. It gets easier. Learn to read language specs. Start with ECMAScript. It's complicated by needing to be backwards compatible with older JavaScript.
Yes, do yourself a favor and go Elixir! Fair warning though, you won't want to go back
0:08 Swift or Rust depending on the rest of the project.
This guy feels like NoBoilderplate but for Gleam
Function coloring is fine. Async functions are actually different.