Why Haskell Is Next

Поділитися
Вставка
  • Опубліковано 17 вер 2024
  • We teach you Haskell

КОМЕНТАРІ • 21

  • @0xvector850
    @0xvector850 Рік тому +5

    This is really cool! Please continue doing videos like this!

  • @raianmr2843
    @raianmr2843 Рік тому +10

    So many languages, so little time to learn. Right now my learning queue goes like Rust -> Clojure -> Haskell -> programming endgame?. Would've probably started Haskell by now if it were more popular and man do I wish Haskell were more popular.

    • @ProjectExMachina
      @ProjectExMachina 11 місяців тому

      How is it going?

    • @vikingthedude
      @vikingthedude 10 місяців тому

      Clojure is great. I'm a year into it and I love its simplicity. it takes a bit more thought to create an "elegant" solution to problems if you're from an imperative/OOP background, but once that kind of thinking becomes second-nature, the code really does read very well

    • @AndreiGeorgescu-j9p
      @AndreiGeorgescu-j9p 7 місяців тому

      It's pretty popular, but go learn PureScript instead which works on node and the browser

  • @sachindraragul1094
    @sachindraragul1094 Рік тому +1

    Great intro to Haskell for Javascript devs

  • @hashtag9990
    @hashtag9990 Рік тому +9

    javascript will never be fixed, that's the beauty of it.

    • @raianmr2843
      @raianmr2843 Рік тому +5

      sounds like ur in a toxic relationship my dude

    • @hashtag9990
      @hashtag9990 Рік тому

      @@raianmr2843 if javascipt was to be fixed, it would've been ages ago, and we don't have to rely on transpilers, 100s of frameworks

    • @echoptic775
      @echoptic775 Рік тому +1

      ​@@hashtag9990its impossible to change js cuz you cant make any breaking changes

  • @vgilalejandria
    @vgilalejandria Рік тому +2

    Got a notification from this channel and I was like "who is this girl?, Why I'm subscribe to her?, Why does she have a better voice than I?" Until I realized the channel theme 😛...

  • @licriss
    @licriss 11 місяців тому

    Lol the lodash description for curry is absolutely horrendous

  • @DB-nl9xw
    @DB-nl9xw Рік тому +1

    can you explain the a -> a -> a I still don't understand

    • @stevenpe781
      @stevenpe781 11 місяців тому

      related to partial application (a 2 param fun is in fact a 1 param fun returning a function)

    • @licriss
      @licriss 11 місяців тому

      The Haskell:
      a -> a -> a
      add x y = x + y
      In plain JS terms that would be like:
      function add(x) {
      return (y) => x + y;
      }
      And calling it would be like:
      const x = add(1)(2)
      In this case 'a' refers to the type for the values, so x, y, z should all be the same type for it to be equivalent to "a -> a -> a" meaning
      const x = add("Hello ")("Currying")
      Would also fit that function type

  • @Takyodor2
    @Takyodor2 11 місяців тому

    I hope nobody considers "true + 1 = 2" to be a "feature". That language broken, yo.

  • @taududeblobber221
    @taududeblobber221 Рік тому +3

    i watched the first 2 minutes of this and i don't really understand it at all. maybe it's because i only know python and scratch.

    • @raianmr2843
      @raianmr2843 Рік тому +2

      come back to this video next year, im sure it'll make a whole lot more sense then. i have a whole playlist of videos that i return to every single year and it's testament to my learning that i always find something new in them.

  • @kazuhisamatsumoto9383
    @kazuhisamatsumoto9383 Рік тому +1

    I'm not fluent in English, so I use Google Translate.
    Thanks for the interesting video. I'm just starting to re-learn category theory using Haskell and Javascript. I wrote a simple program about function composition, associativity, identity morphism, and unit rate.
    Javascript
    f = x => { return (x + 2) }
    g = x => { return (x * 2) }
    h = x => { return (x ** 2) }
    i = x => { return h( g(x)) }
    j = x => { return g( f(x)) }
    id = x => { return x }
    c1 = x => { return h(g(f(x))) }
    c4 = x => { return i ( f(x) ) }
    c5 = x => { return h(j (x) ) }
    c1 (3) => c4 (3) => c5 (3) => 100
    c1(id(3)) => c4(id(3)) => c5(id(3)) => 100
    id(c1(3)) => id(c4(3)) => id(c6(3)) => 100
    Haskell
    f = \x -> x + 2
    g = \x -> x * 2
    h = \x -> x ^ 2
    i = h . g
    j = g . f
    c1 = h . g . f
    c2 = (h . g) . f
    c3 = h . (g . f)
    c4 = i . f
    c5 = h . j
    c1 3 => c2 3 => c3 3 => c4 3 => c5 3 => 100
    Since Haskell provides id (identity function) as standard, we omit the explanation. The result is similar to Javascript.
    It was so timely and I was so happy that I commented.