I Learned Haskell In 15 Years

Поділитися
Вставка
  • Опубліковано 29 вер 2024
  • 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 місяці тому +284

    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 місяці тому +18

      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 місяці тому +41

      I never thought I would see Haskell and effortless in one sentence, with no negation or sarcasm.

    • @andrearaimondi882
      @andrearaimondi882 3 місяці тому +67

      @@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 місяці тому +19

      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 місяці тому +8

      @@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.

  • @throwaway3227
    @throwaway3227 3 місяці тому +26

    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 місяці тому +1

      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 місяці тому +1

      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 :)

  • @vatne4eg
    @vatne4eg 2 місяці тому +1

    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 місяці тому +1

      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)

  • @isodoubIet
    @isodoubIet 3 місяці тому +5

    Rebase when pulling from upstream, merge --no-ff when including downstream changes

    • @lamspam
      @lamspam 3 місяці тому +1

      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 місяці тому +2

    The Elm Architecture, or Flux architecture is an architecture that pushes a unidirectional flow of data.
    If you used redux, that's an example.

  • @IgnacioTaranto
    @IgnacioTaranto 3 місяці тому +2

    Shellcheck: "Am I a joke to you?"

  • @Bolpat
    @Bolpat 3 місяці тому +1

    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.

  • @some1and297
    @some1and297 3 місяці тому

    Hey, it's so cool hearing people describe the process I'm currently using to write a git files parser specifically for making invoices. Honestly rusts type system helps so much in modeling how the files are layout out on disk and doing this makes the actual application side dead simple and fantastic to work with.

  • @jagagemo8141
    @jagagemo8141 3 місяці тому

    We are literally the first team using git at my site. Other teams are doing to now (and better than us, honestly) but most of the old guard there are having to learn this new fangled tech that's like 20 years old.

  • @minecraftermad
    @minecraftermad 3 місяці тому

    32:05 i always think of a monad being a monoid in the family of endofunctors.

  • @eliasmai6170
    @eliasmai6170 3 місяці тому +2

    i know of two people who uses Haskell on their day to day job.

    • @Octogenico
      @Octogenico 3 місяці тому +4

      They're skin walkers

    • @SaiyaDev
      @SaiyaDev 3 місяці тому +1

      Free 🇵🇸🇵🇸

  • @Heater-v1.0.0
    @Heater-v1.0.0 3 місяці тому

    It took about twenty years from me seeing the source code of a Fast Fourier Transform, in BASIC in some computer magazine, to actually understanding how it worked well enough to write my own FFT from scratch. Imagine if I had wanted to write my FFT in Haskell. Complexity multiplies on complexity so it might take me 300 years to do it! I guess that means of have an IQ of about 7. But what can I do.

  • @GrimChu69
    @GrimChu69 3 місяці тому

    As long as you tell them that you know Git it doesn't matter if you know Git, kind of

  • @adjbutler
    @adjbutler 3 місяці тому

    only 15 years??? wow!!! this guy is a genius! no cap!

  • @CoughSyrup
    @CoughSyrup 3 місяці тому

    Your analog Word document is a weird flex, but okay.

  • @diamondtulip6186
    @diamondtulip6186 3 місяці тому

    I have never ever used git rebase, merge was always enough. If I want to return to previous commit I just manually copy over newest `.git` subfolder to previous version thus making negative diff not loosing any previous commit.

    • @Tom-jy3in
      @Tom-jy3in 2 місяці тому

      exactly, whats the problem with just doing git checkout on the previous commit?

  • @steveaguay
    @steveaguay 3 місяці тому

    Haskell jokes are always great, but with the end of xorg I and 11 other people really really miss xmonad. It was so stable and feature rich. Hyprland is good but xmonad was perfect

  • @alexandrustefanmiron7723
    @alexandrustefanmiron7723 3 місяці тому

    How I haven't learned C++ in 25y and I won't finish learning till my death!

    • @isodoubIet
      @isodoubIet 3 місяці тому

      Unlike Haskell, you can get started with C++ very easily. The complexity is unfolded gradually, whereas with Haskell you need a lot of understanding before you can even do anything. The learning curve is a cliff.

  • @drooplug
    @drooplug 3 місяці тому +4

    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.

  • @AnthonyBullard
    @AnthonyBullard 3 місяці тому

    Not the point of the video, but Marco Polo is a criminally underrated app

  • @dmitrysim
    @dmitrysim 3 місяці тому

    4:04 is this guy ritche intro or smth?

  • @abdelhakimkhabir
    @abdelhakimkhabir 3 місяці тому

    I learnt Haskell for 36:03 mins

  • @dforj9212
    @dforj9212 3 місяці тому +70

    Prime making fun of Haskell because he knows he could fall in the FP rabbit hole

    • @GerinoMorn
      @GerinoMorn 26 днів тому

      Or worse, even fail in the FP hole!

  • @mattymattffs
    @mattymattffs 3 місяці тому +119

    State management is the only programming paradigm that actually exists

    • @remrevo3944
      @remrevo3944 3 місяці тому +16

      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 місяці тому +20

      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

  • @Frostbytedigital
    @Frostbytedigital 3 місяці тому +90

    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 місяці тому +5

      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 місяці тому +1

      @@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

  • @newsofthenerd
    @newsofthenerd 3 місяці тому +32

    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

  • @MikkoRantalainen
    @MikkoRantalainen 3 місяці тому +11

    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

  • @Axu227
    @Axu227 3 місяці тому +14

    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 місяці тому +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 місяці тому +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 місяці тому +2

      @@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.

  • @thedarkknight-3894
    @thedarkknight-3894 3 місяці тому +75

    Hold my functor!

    • @GeorgijTovarsen
      @GeorgijTovarsen 3 місяці тому +4

      for about 15 years

    • @ZombieJig
      @ZombieJig 3 місяці тому +7

      Functor? Damn near killed her.

  • @njabulothwala2198
    @njabulothwala2198 3 місяці тому +34

    The C++ stuff hit home coz I just started learning this

    • @ethgraham
      @ethgraham 3 місяці тому +24

      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 місяці тому +1

      My condolences.

    • @kippers12isOG
      @kippers12isOG 3 місяці тому +1

      If you know Richard smith, it's really hard to be remotely close to a 10

  • @coderz4life
    @coderz4life 3 місяці тому +7

    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.

  • @tubeincompetence
    @tubeincompetence 3 місяці тому +17

    Why did I first read the title as "I learned haskell in 15 minutes".. oh well :P

    • @IgorGuerrero
      @IgorGuerrero 3 місяці тому +1

      Lol, did you believe it?

    • @tubeincompetence
      @tubeincompetence 3 місяці тому +2

      @@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 місяці тому +1

      @@thingsiplay But how many decades does it take to master Clojure or OCaml?

    • @stevenhe3462
      @stevenhe3462 3 місяці тому +1

      I read "learn haskell in y" in 15 minutes and everything made sense to me. And then, I never used it. Lol.

  • @thunder____
    @thunder____ 3 місяці тому +11

    “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 місяці тому +1

      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

  • @mattymattffs
    @mattymattffs 3 місяці тому +37

    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 місяці тому +2

      Rebase ftw

    • @georgehelyar
      @georgehelyar 3 місяці тому +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 місяці тому +1

      @@georgehelyar we use tags on master and dev. But having devs work against either of these just leads to conflicts.

    • @lamspam
      @lamspam 3 місяці тому +4

      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 місяці тому +1

      No, rebase your PRs before merging them. And squash merge PRs into main.

  • @krtirtho
    @krtirtho 3 місяці тому +3

    Your POV: It took him 15 years to learn Haskell?!
    My POV: He finished learning Haskell?!

  • @stevenspring9889
    @stevenspring9889 15 днів тому +1

    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.

  • @kuhluhOG
    @kuhluhOG 3 місяці тому +5

    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 місяці тому +2

      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 місяці тому +2

      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.

  • @redcollard3586
    @redcollard3586 3 місяці тому +8

    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 місяці тому +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 місяці тому +2

      @@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.

  • @mtxn
    @mtxn 3 місяці тому +5

    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 місяці тому +1

      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 місяці тому +1

      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

  • @pesterenan
    @pesterenan 3 місяці тому +2

    The kid that came with a black jacket showing you his notebook: 5:04
    *cool* - you say, nervously...

  • @BeOnlyChaos
    @BeOnlyChaos 3 місяці тому +2

    One day we'll get Prime to write some Haskell. He's already preparing his body and soul.

  • @ilyavasylevsky3229
    @ilyavasylevsky3229 3 місяці тому +2

    Yeap, confirm, exact same with tutorials, I start and after few steps just roing on my own not following tutorial...

  • @ProjectVastness
    @ProjectVastness 3 місяці тому +17

    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 місяці тому +8

      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 місяці тому +1

      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 місяці тому +1

      @@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.

  • @noredine
    @noredine 3 місяці тому +2

    MONADS! How do they work?

    • @pauljarski7590
      @pauljarski7590 3 місяці тому +4

      A monad is just a monoid in the category of endofunctors.

    • @yayinternets
      @yayinternets 3 місяці тому +1

      MATHS

  • @sacredgeometry
    @sacredgeometry 3 місяці тому +2

    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

  • @albertoarmando6711
    @albertoarmando6711 3 місяці тому +3

    "why the lucky stiff" mentioned. Nostalgia

  • @NickCombs
    @NickCombs 3 місяці тому +1

    That's a beautiful notebook sweetie

  • @MikkoRantalainen
    @MikkoRantalainen 3 місяці тому +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.

  • @foggyspinks
    @foggyspinks 3 місяці тому +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 місяці тому +1

      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 місяці тому +1

      @@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.

  • @lukenaylor6458
    @lukenaylor6458 3 місяці тому +1

    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.

  • @TJ-hs1qm
    @TJ-hs1qm 3 місяці тому +2

    I Learned Haskell In 15 Years was headlining Hackr news last week :D

  • @P-39_Airacobra
    @P-39_Airacobra 3 місяці тому +1

    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.

  • @GerinoMorn
    @GerinoMorn 26 днів тому

    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.

  • @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 26 днів тому

    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.

  • @Antagon666
    @Antagon666 3 місяці тому +1

    Compared to prolog, Haskell is the most intuitive programming language on the planet

    • @davidjohnston4240
      @davidjohnston4240 3 місяці тому +1

      That must be why I hate Haskell. I find Prolog straight forward.

  • @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.

  • @Elkmor2
    @Elkmor2 3 місяці тому +28

    People still mistakenly associate Haskell with programming languages while in fact it is just a mathematical riddle.

    • @lamspam
      @lamspam 3 місяці тому +2

      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 місяці тому

      😂

  • @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.

  • @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.

  • @GerinoMorn
    @GerinoMorn 26 днів тому

    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:)

  • @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.

  • @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.

  • @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.

  • @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.

  • @TheCheD3
    @TheCheD3 22 дні тому

    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

  • @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 :)

  • @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.

  • @_.-AAA-._
    @_.-AAA-._ 3 місяці тому

    So then it's finally time to ditch React and return to jQuery, or just return to DOM manipulations?

  • @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.

  • @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

  • @litlclutch
    @litlclutch 3 місяці тому

    I'm pretty sure that notebook of his, which looks like a rather nice notebook, has more functionality then a netbook...

  • @andrewdunbar828
    @andrewdunbar828 3 місяці тому

    Claims Git can be learned in 13 seconds
    Spends 13 minutes riffing on incomprehensible difficulties in Git

  • @NullboyCode
    @NullboyCode 3 місяці тому +1

    bro theprimeagen really needs obsidian or emacs org mode

  • @einargs
    @einargs 3 місяці тому +1

    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 місяці тому +1

      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!

  • @HyperionStudiosDE
    @HyperionStudiosDE 3 місяці тому

    Git is easy yet somehow my colleagues still manage to fuck up and bitch about git rebase.

  • @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

  • @ahmedkhaled7960
    @ahmedkhaled7960 3 місяці тому +10

    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)

  • @Omnifarious0
    @Omnifarious0 3 місяці тому

    Rebase does make sometimes. For example, using it when you `git pull` and someone has changed the branch you're on, it might well make sense, depending.
    But, in general, I absolutely despise it. It destroys history. And reverting is easy enough. You commit the revert change right on top of the change it's reverting, then you merge that into the branch you want reverted.
    Of course, I really hate git as well, and I use Mercurial to interact with almost all repositories.

    • @Tom-jy3in
      @Tom-jy3in 2 місяці тому

      same, git merge is superior in every way

  • @Jabberwockybird
    @Jabberwockybird 3 місяці тому

    A monad is like a burrito. How is that different from a module?

  • @robindeboer7568
    @robindeboer7568 3 місяці тому

    Im pretty sure folder instead of fold R killed me instantly XD

  • @re1konn
    @re1konn 2 місяці тому

    pull is also for people who don't know how to use git.
    Use fetch

  • @rumplstiltztinkerstein
    @rumplstiltztinkerstein 3 місяці тому

    5:00 wtf is that???? Is that.... paper???? I haven't seen one in years....

  • @TheFoyer13
    @TheFoyer13 18 днів тому

    I actually enjoy solving merge conflicts

  • @WayOfTheCode
    @WayOfTheCode 3 місяці тому +1

    India has a worker coop ride hailing app written in haskell backend and purescript frontend.

    • @knowledgedrinker7002
      @knowledgedrinker7002 3 місяці тому +1

      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.

  • @kahnfatman
    @kahnfatman 3 місяці тому +19

    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 місяці тому +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 місяці тому +2

      @@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 місяці тому +1

      Use Clojure/Racket/OCAML its an easier Haskell then learning Haskell makes more sense.

  • @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.

  • @TheRealBigYang
    @TheRealBigYang Місяць тому

    For the Git rant: it can be very confusing, if you use it for shit you don't need. Branch, switch, add, push and pull is all you need. Any PR can be done on the remote, or through actions/jenkins/whatever ass piping you use(if it's been automated already). Whatever you need outside of these is a yahoo search away, with explanations spanning from 45min tutorials to "git [command] [flag] [argument]"

  • @Reashu
    @Reashu 3 місяці тому

    ... But reverting a commit in git *is* rolling forward.

  • @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

  • @TheFreddieFoo
    @TheFreddieFoo 3 місяці тому

    is this guy like Bill Burr for computer nerds?

  • @liamconverse8950
    @liamconverse8950 2 місяці тому

    Netflix sucks. Nothing good to watch

  • @stevenhe3462
    @stevenhe3462 3 місяці тому

    Seems to me that bro did not spend enough time learning.

  • @twoolivetreesarise
    @twoolivetreesarise 3 місяці тому

    Um... Netflix? Thought you quit that gig.

  • @AndrewSayman
    @AndrewSayman 3 місяці тому

    `git rebase -i` is a core part of my workflow. Gotta squash all of those commits that are just "FUCK WHY DOESN'T THIS WORK"

  • @grudley
    @grudley 3 місяці тому

    "you just need to know 5 commands to know git"
    "i am always a rebase guy because I know how to use git"
    "merge is for people who don't know how to use git"
    "good luck reverting in a large codebase if you use merge"
    Maybe just knowing the commands is not enough to know how to use it well in a codebase, especially a large one? This is kind of like expecting someone to have good kitchen knife skills just because they have a knife and know its for cutting.

  • @Gunzy83
    @Gunzy83 3 місяці тому

    When I was an arch user btw, I used a niche unified package manager (could do repos and aur all in one) written in Haskell. It was really good but I tried to even read the code and failed. I think this is the only Haskell program I've ever used successfully.
    Also, having taught other engineers at work got internals, I'm with prime on rebase. Rebase is only hated if you don't understand git and know what you are doing.

  • @catcatcatcatcatcatcatcatcatca
    @catcatcatcatcatcatcatcatcatca 3 місяці тому

    This feels very much like my experience with lisp, specifically emacs-lisp. I still haven’t written a useful program or even a package. But I can recount years of progress and shifting understanding of the language, and I have little doubt this would change.
    I actually have spend a good amount of time on configuring how logging tasks is handled. Maybe it is my destiny as well to write a fully fledged worktime logging system that can generate reports for invoices.
    This basic capability of course is already included in org-mode and all emacs releases. But it doesn’t use sqlite, instead it relies on plaintext files like all of org-mode.