I Learned Haskell In 15 Years

  Рет қаралды 113,565

ThePrimeTime

ThePrimeTime

Күн бұрын

Recorded live on twitch, GET IN
Article
duckrabbit.tec...
By: Evan Silberman
My Stream
/ theprimeagen
Best Way To Support Me
Become a backend engineer. Its my favorite site
boot.dev/?prom...
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-K...
Get production ready SQLite with Turso: turso.tech/dee...

Пікірлер: 373
@mattymattffs
@mattymattffs 3 ай бұрын
We use Haskell at work for specific planning functionality. Called from CPP. This is because we can prove they're correct. It's also faster than the cpp code we produced. Eventually maybe the cpp would end up faster, but the Haskell was so effortless
@filip0x0a98
@filip0x0a98 3 ай бұрын
Would you mind elaborating on that? I am considering taking an extra course in haskell but would like to know how it is used in industry.
@MorningNapalm
@MorningNapalm 3 ай бұрын
I never thought I would see Haskell and effortless in one sentence, with no negation or sarcasm.
@andrearaimondi882
@andrearaimondi882 3 ай бұрын
@@MorningNapalmthat’s because they can prove they are correct. This means they likely have someone on staff who has a Maths degree.
@knowledgedrinker7002
@knowledgedrinker7002 3 ай бұрын
I can recommend Haskell from First Principles, which is a good way to understand the language and the FP mindset with a lot of exercises and deep simple explanations. It's not as difficult as people think.
@svenkuffer4512
@svenkuffer4512 3 ай бұрын
@@andrearaimondi882 *CS degree, you learn that in Software Engineering and it involves mathematical logic. In this case formal methods (SAT), there are logic languages for that, like B-method. This makes it very easy to go from specification to implementation.
@dforj9212
@dforj9212 3 ай бұрын
Prime making fun of Haskell because he knows he could fall in the FP rabbit hole
@GerinoMorn
@GerinoMorn 29 күн бұрын
Or worse, even fail in the FP hole!
@Frostbytedigital
@Frostbytedigital 3 ай бұрын
The netbook fiasco had me emotionally on edge for a whole paragraph till he glanced at chat.
@MorningNapalm
@MorningNapalm 3 ай бұрын
LOL, jerk. Me too.
@lamspam
@lamspam 3 ай бұрын
haha it's funny because the "netbook" was almost a marketing term for a specific kind of notebook, or a slightly smaller notebook, so I can understand him reading it wrong the first time lol. I also think it was only a thing for a few years while the term "notebook" kept going
@PromptStreamer
@PromptStreamer 3 ай бұрын
It’s interesting if you’ve always been a very keen person of letters who notices spelling very acutely, when someone is borderline dyslexic and pronounces Anarchaia as “anar-chaya”, suddenly even a very brilliant person looks unintelligent for a moment
@Frostbytedigital
@Frostbytedigital 3 ай бұрын
@@PromptStreamer I find that, to me it just exposes more about how that person's brain works rather than making me feel like they're unintelligent. I KNOW that to be false so seeing that for what it is, becomes easier I guess. But I do understand where you're coming from. It's jarring regardless
@throwaway3227
@throwaway3227 3 ай бұрын
So Haskell is actually pretty easy to use, and it mostly doesn't even get that hard when introducing Monads (unless you go into the MonadTrans[former] stuff with multiple Monads at the same time). What makes Monads hard is when you implement your own Monads. The worst thing in Haskell for a newbie is probably trying to figure out memory leaks in lazy types. There is also some operators which are confusing in the beginning, such as (.) and (#), but hoogle is great for this. That said, I mostly program in Rust now, but there are often problems where I think that "this will turn into a complexity explosion (if it's even doable in Rust's type system), but it would be pretty much a one liner in Haskell".
@AlexRodriguez-gb9ez
@AlexRodriguez-gb9ez 3 ай бұрын
One difficulty of Haskell is when you figure out that your function shouldn't have been a -> b but f a -> f b, or a -> f b, or f a -> b, or whatever...
@eetswalads5528
@eetswalads5528 2 ай бұрын
I learnt about the State Monad yesterday and it fucking blew my mind
@vatne4eg
@vatne4eg 2 ай бұрын
@@eetswalads5528 the next step is to dig into IO data type :)
@GerinoMorn
@GerinoMorn 29 күн бұрын
A pattern that kinda works is generating openapi spec from your backend via some introspection of endpoints and data types etc., and then generation of matching TS types (there is >1 package on npm to do that). It gives you models both of responses and of what is expected from you to post. I see it more as a temporary bridge than "the solution", but you can include it all nicely in your CICD and if there's an unmatched change in either BE or FE it will be caught automatically.
@mattymattffs
@mattymattffs 3 ай бұрын
Rebase is great. That's what we do in our branches, but the code is merged into master/dev. Because you don't touch them directly, ever. Master exists to track releases. Dev exists for QA. It works well for us.
@sonicfind
@sonicfind 3 ай бұрын
Rebase ftw
@georgehelyar
@georgehelyar 3 ай бұрын
Rebase is great for branches that a single developer is working on before being merged, but just use a single long lived branch and use git tags to track releases.
@mattymattffs
@mattymattffs 3 ай бұрын
@@georgehelyar we use tags on master and dev. But having devs work against either of these just leads to conflicts.
@lamspam
@lamspam 3 ай бұрын
yeah, I think Prime kinda showed his colors about rebase vs merge, because it really does matter for your particular project, team, pipeline, branch, etc.
@thekwoka4707
@thekwoka4707 3 ай бұрын
No, rebase your PRs before merging them. And squash merge PRs into main.
@mattymattffs
@mattymattffs 3 ай бұрын
State management is the only programming paradigm that actually exists
@remrevo3944
@remrevo3944 3 ай бұрын
State? What is state? I only know some registers and memory. (Some of which isn't even memory, but actually memory-mapped-io.)
@gwentarinokripperinolkjdsf683
@gwentarinokripperinolkjdsf683 3 ай бұрын
@@remrevo3944that is your state (except the memory mapped-io, but the memory mapped io can effect state
@kebien6020
@kebien6020 3 ай бұрын
State? We have a monad for that, it combines the capabilities of the Reader monad and the Writer monad.
@biggerdoofus
@biggerdoofus 3 ай бұрын
@@remrevo3944 I think state is the parts of those you actually use in the code you're currently writing, but I'm not sure. I keep hearing about state somehow being "global" and that being bad somehow. Maybe it's a cache difference. Also not sure if the read-only parts count.
@ktxed
@ktxed 3 ай бұрын
that's programming rite dere
@MikkoRantalainen
@MikkoRantalainen 3 ай бұрын
15:55 The idea that DOM is so slow that you can run *javascript* to emulate the tasks that DOM is supposed to do in C++ code is a long term plan sounds a bit weird idea to me. Unsurprisingly the browser native implementation of DOM has gotten much better during years.
@HyuLilium
@HyuLilium 3 ай бұрын
Virtualization for huge lists is still useful unfortunately. It should be built into the browser for sure
@newsofthenerd
@newsofthenerd 3 ай бұрын
Yeah Xmonad mentioned. I love me some haskell tiling.
@remrevo3944
@remrevo3944 3 ай бұрын
Was my first tiling window manager. And caused my taste for windowed fullscreen.
@newsofthenerd
@newsofthenerd 3 ай бұрын
@remrevo3944 yeah I only use fullscreen
@foggyspinks
@foggyspinks 3 ай бұрын
We all along knew 'The Notebook' was your favourite movie and Im glad you have finally pubically admitted it.. no judgement here dude, Im glad you are are at a point in life to make that confession, peace out my dude
@lamspam
@lamspam 3 ай бұрын
He might've been joking, but don't y'all dare hate on that movie. I just re-watched it the other day, and while it may not have the same power as it did 20 years ago, I'd still say it's worth watching if anyone hasn't seen it yet
@foggyspinks
@foggyspinks 3 ай бұрын
@@lamspam I am fairly sure Prime was joking and I was 100% joking because I have never even seen a part of that film once so I have no clue what I'm talking about but based on the pure conviction in your reply, it sounds like I should give it a watch, take care, peace.
@Axu227
@Axu227 3 ай бұрын
Haskell probably is more difficult to learn than Go, sure. But as was the case with the author of the article, it'll teach you lessons that are valuable in whichever other language you'll write.
@yayinternets
@yayinternets 3 ай бұрын
Years ago I did Scala full-time for a couple of years and the lessons from it have still stuck with me. Immutable data is the best.
@colemanroberts1102
@colemanroberts1102 3 ай бұрын
Haskell, lisp, prolog, apl, forth, smalltalk. Basically, any language that is radically different from the ones you know. C has the same effect for some coming from the declarative side.
@AlexRodriguez-gb9ez
@AlexRodriguez-gb9ez 3 ай бұрын
@@colemanroberts1102 How did Forth and Prolog change the way you write code?
@colemanroberts1102
@colemanroberts1102 3 ай бұрын
@@AlexRodriguez-gb9ez forth makes you realize how much you can get with exceedingly little, and how hard a radically simple design is to get right. Prolog's unification and backtracking change the way you see control flow, and, in turn, what kinds of problems can be solved concisely and flexibly.
@njabulothwala2198
@njabulothwala2198 3 ай бұрын
The C++ stuff hit home coz I just started learning this
@ethgraham
@ethgraham 3 ай бұрын
Bjarne Stroustrup rates himself a 7/10 in terms of C++ knowledge 👍 not very promising for the rest of us
@luizgfranca
@luizgfranca 3 ай бұрын
So true. I'm learning C++ for over a year now and i still don't think I really know the language
@antonpieper
@antonpieper 3 ай бұрын
C++ 23 deducing this mentioned?
@MorningNapalm
@MorningNapalm 3 ай бұрын
My condolences.
@kippers12isOG
@kippers12isOG 3 ай бұрын
If you know Richard smith, it's really hard to be remotely close to a 10
@thedarkknight-3894
@thedarkknight-3894 3 ай бұрын
Hold my functor!
@GeorgijTovarsen
@GeorgijTovarsen 3 ай бұрын
for about 15 years
@ZombieJig
@ZombieJig 3 ай бұрын
Functor? Damn near killed her.
@mtxn
@mtxn 3 ай бұрын
the best form of learning (in my case) is starting a new project with minimal planing and 0 language knowledge, making a "TODO" section in the README file and treat the rest like the quest in a sandbox game like factorio or satisfactory.
@gristlelollygag
@gristlelollygag 3 ай бұрын
how do you determine what kind of project with that new language?
@mtxn
@mtxn 3 ай бұрын
I just make what I think is useful. mostly cli-utils. learning a language without purpose in mind is pointless
@gristlelollygag
@gristlelollygag 3 ай бұрын
@@mtxn so usually you decide to make a specific new project, and then realize "oh this new language could do this well"? i mean i don't have a problem with learning a new language just to see "what the fuss is about" if it is being increasingly mentioned
@mtxn
@mtxn 3 ай бұрын
essentially, yes. I recently started to learning java and kotlin this way. just to make android app. I do not saying that trying a new language is a bad idea however if you do not plan to use it, take that to consideration if it's really worth your time
@minecraftermad
@minecraftermad 3 ай бұрын
32:05 i always think of a monad being a monoid in the family of endofunctors.
@coderz4life
@coderz4life 3 ай бұрын
6:15 I think pandoc is probably the most prominent piece of software written in Haskell that I used frequently. Looking at the source code is quite an adventure, too.
@stevenspring9889
@stevenspring9889 18 күн бұрын
merging, creating a bunch of non linear history A---B---C feature-branch \ / D---E---F main rebase A'---B'---C'---D---E---F main After working with some extremely large Git repos as a DevOps Engineer, there is only one viable ways to do things.
@thunder____
@thunder____ 3 ай бұрын
“This is how I plan my shorts” But I thought you simplified your wardrobe so you didn't have to plan your clothes at all. Prime plot hole!
@no.no.4680
@no.no.4680 3 ай бұрын
Plot hole so big you could stick your leg through it!
@lamspam
@lamspam 3 ай бұрын
@@no.no.4680 this could've been a kid that posted the original comment. what are you doing? at least 2 legs fit in shorts
@tubeincompetence
@tubeincompetence 3 ай бұрын
Why did I first read the title as "I learned haskell in 15 minutes".. oh well :P
@IgorGuerrero
@IgorGuerrero 3 ай бұрын
Lol, did you believe it?
@tubeincompetence
@tubeincompetence 3 ай бұрын
@@IgorGuerrero I felt "that's impossible!". Then i got disappointed when I figured out it really is impossible 😁
@thingsiplay
@thingsiplay 3 ай бұрын
@@tubeincompetence Not impossible if you are already well versed in functional programming through other languages.
@Daniel_WR_Hart
@Daniel_WR_Hart 3 ай бұрын
@@thingsiplay But how many decades does it take to master Clojure or OCaml?
@stevenhe3462
@stevenhe3462 3 ай бұрын
I read "learn haskell in y" in 15 minutes and everything made sense to me. And then, I never used it. Lol.
@notapplicable7292
@notapplicable7292 3 ай бұрын
When Haskell chads talk about pure fuctions I start wondering if I am infact a functional bro just waiting to be born.
@Bolpat
@Bolpat 3 ай бұрын
4:00 Prime showing us his notebook and starts making jokes about those, when there’s “netbook” (NET-book) written in the article.
@pesterenan
@pesterenan 3 ай бұрын
The kid that came with a black jacket showing you his notebook: 5:04 *cool* - you say, nervously...
@MikkoRantalainen
@MikkoRantalainen 3 ай бұрын
7:27 "I am always a rebase guy because I properly know how to use use git." Amen, brother!
@TJ-hs1qm
@TJ-hs1qm 3 ай бұрын
I Learned Haskell In 15 Years was headlining Hackr news last week :D
@NickCombs
@NickCombs 3 ай бұрын
That's a beautiful notebook sweetie
@samgould8567
@samgould8567 3 ай бұрын
“dictly-typed” is my new metric for programming language selection
@jayjeckel
@jayjeckel 3 ай бұрын
C# with readonly structs and iterators. It doesn't matter the language, immutability reduces the number of moving parts and simplifies so much. As with anything, there are limits, like gui widgets, that map better to mutablity, but more often than not, immutable is just plain better.
@krtirtho
@krtirtho 3 ай бұрын
Your POV: It took him 15 years to learn Haskell?! My POV: He finished learning Haskell?!
@sacredgeometry
@sacredgeometry 3 ай бұрын
Mine: He started?
@redcollard3586
@redcollard3586 3 ай бұрын
Thank you, Prime. The burrito metaphor has finally made everything clear to me. You got however many layers of logic all wrapped up in an i/o layer that makes it portable. Holy guacamole.
@lamspam
@lamspam 3 ай бұрын
yeah, I kinda wish he expanded on the burrito metaphor in the video 😂
@TankorSmash
@TankorSmash 3 ай бұрын
Sorta! It's more like any monad, lists, promises, optionals and yeah IO, are able to have internal state with a preset API
@Schindlabua
@Schindlabua 3 ай бұрын
@@lamspam It's an ancient Haskell meme that there are as many monad tutorials as there are haskell programmers and then theres that ancient webcomic about how moands are just burritos. Truth is that monads aren't that complicated (you just need two functions, one that puts stuff in a burrito and another that tells you how burritos can be rewrapped into new burritos) but to actually grok it you need to learn a few fancy words and concepts. (And as a haskell enjoyer I'd be happy to talk about it)
@LorenzoGiovenali
@LorenzoGiovenali 3 ай бұрын
@@Schindlabua Please tell us about them. I didn't understand sh1t from the burrito inside your parenthesis..
@Schindlabua
@Schindlabua 3 ай бұрын
@@LorenzoGiovenali Functions take a value of some type and produce another. For a function f we can state the fact as `f :: A -> B`. Functions are cool and we all love them. Here's one that takes numbers and returns strings. const stringify = (x: number) => {/* magic */} We can then put in some number value and get a string back. stringify(4) === "4"; Love me a good function. *Audience laughs and claps* By the way don't get me started about generics. Have you ever wondered about generics? Like, `LinkedList` is a type, and `LinkedList` is a type and `LinkedList`. But *what* is `LinkedList`? *Audience laughs, then goes silent* Like it's not a type is it. It only becomes a type if we give it another type. So uhm we pass in something and get back some other thing? Like a function? *Audience gasps* idk I'm tired of this bit but yeah generics are functions on types. If we give `LinkedList` the type `Int` as an argument you get back a `LinkedList` and turning stuff into other stuff is what functions do. And that's an interesting mindset shift for programmers because for us a function is just a bunch of code that computes a value and how would you write down the `LinkedList` function as code (you can't) and when you turn `Int` into `LinkedList` you're not really computing anything either, but in fact we can do all the mathsy functiony stuff with `LinkedList` like look at it's domain (all types) and it's codomain (all types of lists) etc. As you know a favourite pastime of mathematicians is categorizing things into categories, like we can look at multiplication of real numbers and people will say hey multiplication is associative and commutative and invertible and therefor the real numbers together with multiplication form we shall call a "group". Or mayhaps we could even say that (ℝ, *) is part of the category of groups. `(ℝ, *) ∈ Obj(Grp)` I guess idk. And yeah when we look at generics like LinkedList or HashSet or Promise, we also often observe common traits so we like categorizing those too. Like, often we have a canonical way of turning a T into a Generic which is kinda interesting. Take List: `const makeList = (x: T) => [x];` Or Promise: `const makePromise = (x: T) => Promise.resolve(x);` or for c-heads, we can turn any T into a Pointer, like so: `&x`. Or something slightly more complicated: type WithEnvironment = { value: T, environment: { USE_DATABASE: string; TIMEOUT: string; } }; const makeWithEnvironment (x: T) => { value: x, environment: process.env }; Turns out many generic types can be "mapped over". That is we can for example take any regular ass function and canonically make it so it suddenly works on lists. That is, we take `fn :: a -> b` and mold it into `fn :: List -> List` using a `mapList` function. List: const mapList = fn => list => list.map(fn); // types omitted for brevity Promise: const mapPromise = fn => promise => promise.then(fn); Pointer: err... `pointer_t *map_pointer(fn, pointer) { return &func(*pointer); }` (lets not think about it too hard) WithEnvironment: mapWithEnvironment = fn => ({ value, environment }) => ({ value: fn(value), environment }); Okay and so whenever you see any generic type that has a map function like that, we call it an "Endofunctor". `(List, mapList) ∈ Obj(End)` as it were... an object in the category of endofunctors. Which is not quite monads but close. This is some preliminary things and me rambling to get you googling :) Monads are Endofunctors with some added stuff. (like our make* functions.) They're important because they're about sequencing things and doing stuff in sequence is pretty common in programming.
@kuhluhOG
@kuhluhOG 3 ай бұрын
7:35 Rebase is great until you need to bisect to find out what could have gone wrong (because the code itself doesn't really tell) and all the commits which were rebased besides the top one don't even compile anymore thanks to rebase.
@radfordmcawesome7947
@radfordmcawesome7947 3 ай бұрын
i'm team rebase, but this is a good point. there is no one-size-fits-all strat, and there is no substitution for really understanding your commit graph
@isodoubIet
@isodoubIet 3 ай бұрын
I'm also on team rebase but I've found I spend a lot of time planning how to do rebases "correctly" while keeping intermediate commits working, and it is an investment for sure.
@ahmedkhaled7960
@ahmedkhaled7960 3 ай бұрын
shellcheck is written in Haskell btw
@BeneSim
@BeneSim 3 ай бұрын
Funny, instantly thought about the same when it was mentioned in the video ;) This has been burned into my brain because I needed to compile GHC for armv7l since some nix derivations used writeShellApplication from nixpkgs which uses shellcheck as a linter ... I believe GHC was the longest compile ever for me with Linux, gcc, llvm and the other usual suspects not even getting close to it ...
@samtheman1868
@samtheman1868 3 ай бұрын
Really?
@RegrinderAlert
@RegrinderAlert 3 ай бұрын
Pandoc as well
@NostraDavid2
@NostraDavid2 3 ай бұрын
As is hadolint (Haskell Dockerfile linter)
@Antagon666
@Antagon666 3 ай бұрын
Compared to prolog, Haskell is the most intuitive programming language on the planet
@davidjohnston4240
@davidjohnston4240 3 ай бұрын
That must be why I hate Haskell. I find Prolog straight forward.
@piq-dg3vz
@piq-dg3vz 3 ай бұрын
haskell mentioned. LFG!
@ancalagonyt
@ancalagonyt 3 ай бұрын
The guy in the article did clearly learn something about Haskell after dabbling intermittently for years. But let's not pretend that it took him 15 years of solid effort to learn something about Haskell. He literally just dabbled occasionally, until that one time he tried in a basically serious way and made substantial progress. The problem people have when learning Haskell is that they think it's basically the same as any other language. But most of it is different from most other programming languages. If you've never used a functional language, that's a totally different mindset. But even if you have, pure functional is different. Haskell isn't really harder than anything else, it's radically different from anything else.
@sacredgeometry
@sacredgeometry 3 ай бұрын
8:20 What on earth are you talking about? Undoing a merge is orders of magnitude easier than undoing a rebase.
@Reashu
@Reashu 3 ай бұрын
You don't "undo" a rebase and turn it back into the original commits. You just revert the rebased commit(s), which is trivial.
@sacredgeometry
@sacredgeometry 3 ай бұрын
​@@Reashu You can undo a rebase by either aborting it if its still in progress or resetting --hard to the correct commit. So either by keeping a record of the hash or looking at the reflog. The point was that its a lot easier to get the branch back into a pre merge state than it is to get it into a pre rebase state. Reverting just creates a new commit that un does the changes.
@Reashu
@Reashu 3 ай бұрын
@@sacredgeometry yes, and reverting via new commit is the way you should always do it if your code has been shared
@sacredgeometry
@sacredgeometry 3 ай бұрын
@@Reashu Thats true but (and I might be misremembering this) that wasn't the context of this was it? He literally says he does rebases on pull using the git pull --rebase command.
@Reashu
@Reashu 3 ай бұрын
@@sacredgeometry yes - you rebase your local changes on top of the shared branch so that when you push you don't include merge commits, which can get messy to revert
@isodoubIet
@isodoubIet 3 ай бұрын
Rebase when pulling from upstream, merge --no-ff when including downstream changes
@lamspam
@lamspam 3 ай бұрын
there are so many other scenarios that it really depends on whether to use rebase or merge. I'm not exactly sure what Prime was talking about because there are common reasons why merge is better than rebase, especially when working on a large team, or an org of teams contributing to the same repo/project, etc.
@isodoubIet
@isodoubIet 3 ай бұрын
@@lamspam Like with everything you may need to break the rules on occasion, but you need some rules in place if you want any hope of understanding what's going on in a repo's history.
@someguyO2W
@someguyO2W 3 ай бұрын
The Elm Architecture, or Flux architecture is an architecture that pushes a unidirectional flow of data. If you used redux, that's an example.
@robindeboer7568
@robindeboer7568 3 ай бұрын
Im pretty sure folder instead of fold R killed me instantly XD
@Elkmor2
@Elkmor2 3 ай бұрын
People still mistakenly associate Haskell with programming languages while in fact it is just a mathematical riddle.
@lamspam
@lamspam 3 ай бұрын
I almost think it's meant to serve as a barrier to obtaining a CS degree, just to see if a student can approach a programming problem from a completely different direction, but idk lol
@jasonleo
@jasonleo 3 ай бұрын
😂
@ProjectVastness
@ProjectVastness 3 ай бұрын
Never used Haskell, but since I do a lot of stuff in F# , maybe I'll give a try to haskell someday
@wotwithbert7591
@wotwithbert7591 3 ай бұрын
That "someday" is crucial since the first actual step to learning Haskell is forgetting you have been wanting to learn it, ultimately resulting in forgetting you have had a thought about wanting to learn Haskell, until that thought reappears some day in a year or so
@evergreen-
@evergreen- 3 ай бұрын
Never start learning Haskell today. Start learning it tomorrow!
@Ellefsen97
@Ellefsen97 3 ай бұрын
What’s the benefit of writing things in F# instead of writing in C#? I’m fairly proficient in C#, but I am curious about F#
@DryBones111
@DryBones111 3 ай бұрын
@@Ellefsen97 Discriminated unions, function composition syntax, and option types to name only 3 benefits.
@z0nx
@z0nx 3 ай бұрын
@@Ellefsen97 I would absolutely recommend fsharp, just try not to write csharp in fsharp. Which means, writing mostly simple immutable functions and making use of discriminated unions. Haskell certainly has more potential theoretical learning value since it forces you to write pure functions, similar to how async/await is forced all the way up the call stack.
@schtauffen-plays
@schtauffen-plays 3 ай бұрын
rebase for short lived branches. merge for long lived (or shared) branches
@litlclutch
@litlclutch 3 ай бұрын
I'm pretty sure that notebook of his, which looks like a rather nice notebook, has more functionality then a netbook...
@WayOfTheCode
@WayOfTheCode 3 ай бұрын
India has a worker coop ride hailing app written in haskell backend and purescript frontend.
@knowledgedrinker7002
@knowledgedrinker7002 3 ай бұрын
Juspay is in Haskell btw, Hasura too
@WayOfTheCode
@WayOfTheCode 3 ай бұрын
@@samuraijosh1595 india has few multi million user real time applications in Haskell. Search for NammaYatri (ride hailing app launched to protect against Uber Lyft Ola like capitalists). NammaYatri works on ONDC framework of GovOfIndia. There is a globally known GQL toolkit-> Hasura also written in Haskell. There are many smaller (early in utilisation not small in code base) libraries that are part of the tech ecosystem here for some reason especially in web3.
@WayOfTheCode
@WayOfTheCode 3 ай бұрын
@@knowledgedrinker7002 I knew of Hasura but not Juspay but make sense since JusPay is what Monetises NammaYatri.
@VitisCZ
@VitisCZ 3 ай бұрын
I think the reason why after rewriting falcor you ended up with pretty much the same code is because you solved the exact same issue the exact same way as the person before you
@galaxyguy9873
@galaxyguy9873 3 ай бұрын
Haskel is a good language. make fun of it all you want. it is used for powerful real world applications were formal methods are needed. sorry no glitchy shit software allowed im haskel land.
@ilyavasylevsky3229
@ilyavasylevsky3229 3 ай бұрын
Yeap, confirm, exact same with tutorials, I start and after few steps just roing on my own not following tutorial...
@albertoarmando6711
@albertoarmando6711 3 ай бұрын
"why the lucky stiff" mentioned. Nostalgia
@BeOnlyChaos
@BeOnlyChaos 3 ай бұрын
One day we'll get Prime to write some Haskell. He's already preparing his body and soul.
@evandrofilipe1526
@evandrofilipe1526 3 ай бұрын
I would be so mad if I wasn't constantly laughing
@vatne4eg
@vatne4eg 2 ай бұрын
last time when I decided to "not to propose to use haskell and just use typescript as it would be better for team and project" led to rewriting backend on haskell because TS "senior software engineers" was too busy to fix slow load times and implement features, lol
@vatne4eg
@vatne4eg 2 ай бұрын
and by the way, I used haskell here and there for 14 years already and still don't think that I dig deep enough. I am not participating in the `*morphism`- talks, haven't used lenses or do not know how to write template haskell. Persistent-postgres, Servant and co, Aeson, mtl, transformers, containers, stm-chans are most of my tools, aside of expressive type system to model domain specific stuff to provide constraints and limitations to reduce a risk to screw things up, hehe. And the worst thing that it looks like the best tool/language that I know now, which is scare given how "many" jobs in haskell are there)
@thaRealShady1
@thaRealShady1 3 ай бұрын
I never got why people thought Haskell was that hard of a language. It really is not. Sure there are a tons of compiler extensions that make things a bit more complicated but it's the same for other languages (Java!). But the core of the language is actually pretty simple.wybe it's because of how the language is communicated. There is absolutely 0 need to know anything about category theory to understand Haskell.
@MikkoRantalainen
@MikkoRantalainen 3 ай бұрын
33:33 One programming language worth learning enough to fully grasp its design-by-contract feature is Eiffel. I think that language has even less real world use than Haskell but the design-by-contract feature is obviously useful in any language, even though Eiffel is the only language with full native support for it. Other languages use assert()s to emulate the missing feature.
@MikkoRantalainen
@MikkoRantalainen 3 ай бұрын
@@TapetBart Interesting... I tried to look for some examples but ATS code seems practically unreadable for me so I didn't understand how the design-by-contract feature would work if that's indeed supported.
@jimiscott
@jimiscott 3 ай бұрын
We did Eiffel at Uni - great language.
@davidjohnston4240
@davidjohnston4240 3 ай бұрын
@@jimiscott As did I. Machester Uni, 1989-91. Prolog, ML, Eifell, Modula. Lots of interesting languages.
@ktxed
@ktxed 3 ай бұрын
rebase and conflicts, sounds good alright
@lukenaylor6458
@lukenaylor6458 3 ай бұрын
8:10 "you guys aren't reading the docs and it's showing" after completely misunderstanding the command a chatter was posting about. His ignorant confidence is kinda annoying at times tbh.
@IgnacioTaranto
@IgnacioTaranto 3 ай бұрын
Shellcheck: "Am I a joke to you?"
@mage3690
@mage3690 3 ай бұрын
To "cotton on" to something is a Southernism from the Mark Twain era. When you're harvesting cotton, it sticks to everything with static electricity, hence the phrase. It means you decided something was/is a good idea, perhaps to an inflated degree.
@alexandertownsend5079
@alexandertownsend5079 3 ай бұрын
So is like saying, "I am warming up to that" or "It's growing on me"?
@mage3690
@mage3690 3 ай бұрын
@@alexandertownsend5079 yeah, but a little more post facto I think. The context I most often hear it in is "he cottoned on real quick," which has an identical meaning to "he caught on real quick" but with a bit more punch or flair.
@kahnfatman
@kahnfatman 3 ай бұрын
Yup. Elm taught me Haskell. I started to learn Haskell in 2015. i really started to understand the language in 2021. m word because there is a class of functions that can be applied on the applicative functors/monoids, like mconcat, mfilter… To learn Haskell means to change your worldview.
@lamspam
@lamspam 3 ай бұрын
did you ever take a class in college that required you to learn Haskell, like a functional programming course?
@TankorSmash
@TankorSmash 3 ай бұрын
Yeah Haskell was way easier to learn after learning Elm. I'm glad to hear ThePrimeagen respects both languages so much! I'd be interested to see how close you can make a TUI in Haskell that would do the tower defense stuff.
@kahnfatman
@kahnfatman 3 ай бұрын
@@lamspam I did only OOP during formal higher education. Some kids whispered the term “Haskell” during a class in 2009. When React was touted as “functional” and “declarative” around 2015, I started the functional journal head-on.
@Qrzychu92
@Qrzychu92 3 ай бұрын
@@lamspam I took "scala programming" in university, but I learned that Scala is supposed to be functional just couple years ago :D that course sucked balls
@AlexRodriguez-gb9ez
@AlexRodriguez-gb9ez 3 ай бұрын
Use Clojure/Racket/OCAML its an easier Haskell then learning Haskell makes more sense.
@notapplicable7292
@notapplicable7292 3 ай бұрын
Prime seems like a fun guy to have done LSD with
@vincentmackryansalvan6929
@vincentmackryansalvan6929 3 ай бұрын
Sick Jacket bro!
@noredine
@noredine 3 ай бұрын
MONADS! How do they work?
@pauljarski7590
@pauljarski7590 3 ай бұрын
A monad is just a monoid in the category of endofunctors.
@yayinternets
@yayinternets 3 ай бұрын
MATHS
@Bolpat
@Bolpat 3 ай бұрын
1:00 It’s always fascinating how many “educated” Americans utterly lack foreign language skills. In Germany, a high-school degree requires you lean 2 foreign languages, usually one is English and the other is among French, Spanish, and Latin. I learned English, Latin, Spanish, and Italian, and apart from English, my skills in them aren’t that good, but good enough to skim a random Wikipedia article and tell you what it is about and to judge if a translation you present me is probably genuine or nonsense.
@P-39_Airacobra
@P-39_Airacobra 3 ай бұрын
Optimizations are good depending on how you define optimization. If it's just a trade-off, go for the most maintainable choice. If it's a simplification, ALWAYS go for it.
@rumplstiltztinkerstein
@rumplstiltztinkerstein 3 ай бұрын
5:00 wtf is that???? Is that.... paper???? I haven't seen one in years....
@cmelgarejo
@cmelgarejo 3 ай бұрын
Chat never deployed anything to prod, thats why they dont use rebase
@NullboyCode
@NullboyCode 3 ай бұрын
bro theprimeagen really needs obsidian or emacs org mode
@Tanmaydeshpande-nl5jy
@Tanmaydeshpande-nl5jy 3 ай бұрын
primes t shirt is uncanny
@TheFreddieFoo
@TheFreddieFoo 3 ай бұрын
is this guy like Bill Burr for computer nerds?
@opposite342
@opposite342 3 ай бұрын
7:20 gitignores? branch and checkout? properly handling merge conflicts? Anyway I think you overestimated people's ability to learn new things sometimes.
@TatianaRacheva
@TatianaRacheva 27 күн бұрын
I agree on rebase vs. merge.
@drooplug
@drooplug 3 ай бұрын
6:56 I watched. Theo video where he talks about how colleges should be teaching CS students git and how he wouldn't hire an engineer unless they knew how to use it.
@somebody-anonymous
@somebody-anonymous 3 ай бұрын
He didn't say colleges should be teaching git
@Tom-jy3in
@Tom-jy3in 2 ай бұрын
theo is an idiot
@Tomyb15
@Tomyb15 3 ай бұрын
Prime thinks haskell is the whitepaper language that nobody uses for real world, production level work. The reality is that haskell is used quite a bit (obviously not nearly as much as all the popular ones you know) but has it's definite place. What he should actually look for are languages like agda or coq (yes, coq. Pronounced like you'd expect). These not only do nothing but produce papers, but also the programs written in them are almost always not even run! The task is done after it compiles (or more specifically, when it type checks). Haskell is not the language Prime thinks.
@DouweHummeling
@DouweHummeling 3 ай бұрын
NETbook.
@eliasmai6170
@eliasmai6170 3 ай бұрын
i know of two people who uses Haskell on their day to day job.
@Octogenico
@Octogenico 3 ай бұрын
They're skin walkers
@SaiyaDev
@SaiyaDev 3 ай бұрын
Free 🇵🇸🇵🇸
@olivetom1599
@olivetom1599 Ай бұрын
16:20 Saying DOM is slow is a lie. React was created around 2013, I was using DOM and JS since around 2008, and it was fast, at least it was never limiting. I used to build and rebuild browser based games (like Ogame) with userscripts, and I transformed their UI which was based on links to a SPA that used xhrRequests to update parts of the dashboard I needed. Well, that is to say, DOM was there, I used it a lot, if you used it correctly, you'd be able to do anything you want. On the other hand, React was slow AF and felt like a truck for a long time.
@GerinoMorn
@GerinoMorn 29 күн бұрын
28:00 I have such a class. I wrote it 3 times in PRD already, with probably 30 or 300 draft versions . And it's also caching problem. It's still awful.
@twoolivetreesarise
@twoolivetreesarise 3 ай бұрын
Notebook? Usb support? Antiglare? What about battery life? I don't get it... what if I want to transfer my files or share them? How do I stop someone from hacking my notebook? So confused.
@andrewdunbar828
@andrewdunbar828 3 ай бұрын
Claims Git can be learned in 13 seconds Spends 13 minutes riffing on incomprehensible difficulties in Git
@ymi_yugy3133
@ymi_yugy3133 2 ай бұрын
The DOM can still be slow. It's not unusual to have thousands of elements in the DOM. Now go use a slow budget phone from 5 years ago, you know the kind they sold your grandpa at the carrier store and enable some accessibility features. Then try to have a slider input and rerender the entire page while dragging the slider. That's the reason most frameworks are moving to signals, even the component based rerender of react isn't fine grained enough.
@GerinoMorn
@GerinoMorn 29 күн бұрын
You can learn about version control systems, you can be taught, but then you go and find a job and they are using PVCS. Good luck.
@macroMindGames
@macroMindGames Ай бұрын
haha, 2000 was my last year of college ...i spent two semesters learning haskell in 1997 (spring and repeat in summer:)
@einargs
@einargs 3 ай бұрын
I found learning Haskell very natural. The key to understanding monads (and monad transformers) is to use them and write your own version of them. Soon they become second nature, and then you become able to puzzle out the really weird ones like the coroutine monad or CPS (which I fortunately/unfortunately haven't yet had cause to use). I also recommend doing a parser in haskell; Haskell has the best parsing libraries in the world. What I Wish I Knew About Haskell, although not currently being updated, is still an invaluable overview of many different topics and a great jumping off point.
@alastairleith8612
@alastairleith8612 2 ай бұрын
the Data61Functional Programming course is in Haskell and has lots of parser exercises. I did a three day condensed version of this semester long course and it fried my brain but was amazing watching the parse library put to use by a fluent Haskell coder (Tony Morris) in action. You'll find it around online and other people teaching the course who didn't write it.
@alastairleith8612
@alastairleith8612 2 ай бұрын
@@samuraijosh1595 the syntactic elegance of Haskell seems to be unmatched, but I'm no professional coder!
@Tomyb15
@Tomyb15 3 ай бұрын
Just try it. It can be as hard and obtuse as you want it to be. It doesn't have to be, but like with any truly functional language, it's gonna be hard to break out of old imperative habits when you start. In fact, I'd say Rust can be harder than haskell sometimes, as Rust imposes this linearity on types globally and you have to wrestle with the compiler across move semantics and lifetime annotations that also seem needless and obtuse (on the surface). But Rust has very good reasons for doing that. Also the tooling in haskell can be a bit of a pain to work with, but it's a bit beside the point.
@vsolyomi
@vsolyomi 3 ай бұрын
You can write python as (almost) anything. I like to write it like lisp. So py's literally a worse version of every language on the planet. Even python itself :)
@TheCheD3
@TheCheD3 25 күн бұрын
You sounded so hurt that chat didnt care about your notebook and just wanted to dunk on you for misreading it. Dont worry prime, I'm interested in your cool planning netbook 4:53
@Tom-jy3in
@Tom-jy3in 2 ай бұрын
You are severely skillgapped if you think that git merge is something that only someone who doesn't understand git would do
@SaiKrishnaDubagunta
@SaiKrishnaDubagunta 3 ай бұрын
Damn!!! @theo just did a video where Git should be taught at school and should know before getting employed... hmm ... I controversy here.
@HyperionStudiosDE
@HyperionStudiosDE 3 ай бұрын
Git is easy yet somehow my colleagues still manage to fuck up and bitch about git rebase.
@yayinternets
@yayinternets 3 ай бұрын
Rebase is definitely the only way to use git. If you've never worked on big projects that are frequently deployed with lots of engineers, I could see why you have the skill issue of not understanding why rebase is superior.
@TheFoyer13
@TheFoyer13 21 күн бұрын
I actually enjoy solving merge conflicts
@GrimChu69
@GrimChu69 3 ай бұрын
As long as you tell them that you know Git it doesn't matter if you know Git, kind of
@con_sci
@con_sci 3 ай бұрын
I actually known a guy who got fired largely because he wasn't able to learn git for weeks on the job
@Jabberwockybird
@Jabberwockybird 3 ай бұрын
A monad is like a burrito. How is that different from a module?
@sorek__
@sorek__ 2 ай бұрын
The part of learning C++ is first to learn C, then read about all C++ quirks and features and still write C code but sometimes just use those lovely 0 cost abstractions and QOL stuff.
@Zweimt
@Zweimt 3 ай бұрын
If you have backward compatible migrations, all you need is copies of the previous code, with merging vs rebase. If you have docker containers of previous builds, it is not necessary to revert the main repository, imo I think commit history > less commit history
@Reashu
@Reashu 3 ай бұрын
... But reverting a commit in git *is* rolling forward.
@re1konn
@re1konn 2 ай бұрын
pull is also for people who don't know how to use git. Use fetch
@liamconverse8950
@liamconverse8950 2 ай бұрын
Netflix sucks. Nothing good to watch
@twoolivetreesarise
@twoolivetreesarise 3 ай бұрын
Um... Netflix? Thought you quit that gig.
@the.real.ipatch
@the.real.ipatch 3 ай бұрын
your shirt would be more comfortable if it were dtg printed instead of the vinyl transfer 😩
@TJ-hs1qm
@TJ-hs1qm 3 ай бұрын
Category Theory "very easy" mode kzbin.info/www/bejne/g2Xbe6d3drqcf6c
Complete Software Engineer Roadmap in 2024 | How to become a Software Engineer
20:38
Compilers, How They Work, And Writing Them From Scratch
23:53
Adam McDaniel (kiwi)
Рет қаралды 189 М.
How do Cats Eat Watermelon? 🍉
00:21
One More
Рет қаралды 11 МЛН
когда не обедаешь в школе // EVA mash
00:57
EVA mash
Рет қаралды 3,8 МЛН
ДЕНЬ УЧИТЕЛЯ В ШКОЛЕ
01:00
SIDELNIKOVVV
Рет қаралды 3 МЛН
Spongebob ate Patrick 😱 #meme #spongebob #gmod
00:15
Mr. LoLo
Рет қаралды 20 МЛН
Prime Reacts: From C to C++ to Rust to Haskell
40:54
ThePrimeTime
Рет қаралды 316 М.
HaskLUL
25:25
ThePrimeTime
Рет қаралды 97 М.
Scams In Software Engineering
31:44
ThePrimeTime
Рет қаралды 778 М.
You dont know OOP
50:48
ThePrimeTime
Рет қаралды 337 М.
268% Higher Failure Rates For Agile
25:34
ThePrimeTime
Рет қаралды 131 М.
Haskell Is Faster Than C | Prime Reacts
31:46
ThePrimeTime
Рет қаралды 131 М.
Use Java For Everything
38:35
ThePrimeTime
Рет қаралды 396 М.
HTMX Sucks
31:45
ThePrimeTime
Рет қаралды 145 М.
How do Cats Eat Watermelon? 🍉
00:21
One More
Рет қаралды 11 МЛН