Category Theory Lulz - Ken Scambler

Поделиться
HTML-код
  • Опубликовано: 28 янв 2025

Комментарии • 22

  • @okuno54
    @okuno54 8 лет назад +6

    Two minutes in, and I have a whole new perspective on why I hear certain programmers talk about category theory a lot, and why I should care. That may be a record for enlightenment-inducement.

  •  2 года назад

    9:39 here are my questions, (1) can there be an arrow that maps an object of a category to whole category full of objects? (2) can we define an arrow that indicates to which category an object belongs?

  • @anuragohri781
    @anuragohri781 9 лет назад

    Loved it. Would definitely want to see more!!

  • @vuto579
    @vuto579 7 лет назад

    Great presentation! Thank you!

  • @TomerBenDavid
    @TomerBenDavid 9 лет назад

    53:35 potatoList.
    .Select(mashEm)
    .Select(boilEm)
    .Select(stickEmInAStew)
    Question please:
    What happens if not only do i need to apply these methods one by another but also accumuate the result status of each one when running to report it back which function would i be using in scala? map isn't good enough right? I would need to change my data structures to contain that additional info and this would be a great change...

    • @kenscambler4618
      @kenscambler4618 9 лет назад +1

      Tomer Ben David The usual FP way is to have simple building blocks, and build more advanced things by recombining them with other things, not by adding features to them.
      You might implement this extra feature using something like a State monad, which could keep track of your status while still being a functor itself.

  • @vuto579
    @vuto579 7 лет назад +1

    In the example of "Immutable class and pure methods", objects are types and arrows are functions between types. So (+1) function receives a value of type Integer and returns another value of the same type Integer. The same object. Why isn't it considered the identity arrow?

    • @dupersuper1000
      @dupersuper1000 4 года назад

      Vũ Tô I know you posted this two years ago, but I think it’s worth clarifying. Simply getting back the same data type is insufficient to uphold the “laws” of a category. It must meet a stricter definition which is that the returned object must be structurally identical (including value). In this case, the only integer which satisfies this with `(+)` is zero. And none of the integers will satisfy it with `(+1)`.
      Another good example is the Functor. It has a `map` function which “maps” a second function over its contents, returning a new functor. But it’s not sufficient to match the types. Otherwise, `map` (for lists) could decide to reverse the list at the end, which still meets the type signature, but breaks the functor law that `map` should “preserve the structure” of the functor, including ordering.
      These rules that exist outside the type system are often included in what they call “properties” of categories. Naturally, many programmers want to verify that their own implementations satisfy the categorical laws, so they use “property-based testing” in order to prove what the type system cannot prove for them.

  • @TomerBenDavid
    @TomerBenDavid 9 лет назад

    25:11 why do hyperlinks don't compose? if I have a hyperlink from a.com to b.com and from b.com to c.com then don't they compose into a hyperlink from a.com to c.com? so if i call hyperlink from a.com to b.com f and from b.com to c.com g don't they compose into g(f())

    • @kenscambler4618
      @kenscambler4618 9 лет назад +1

      Tomer Ben David No; just because b.com page has a hyperlink to something, doesn't mean that a.com does. If we allow that, then any webpage has a hyperlink to pretty much everything on the internet!
      It's just a specific case of a graph; a graph A --> B --> C does not have an edge from A --> C. It's not a category unless all consecutive arrows A --> B --> C have a composite arrow A --> C, and all objects have an identity arrow.

    • @dialecticalmonist3405
      @dialecticalmonist3405 3 года назад

      Because they don't compose by rule.
      The fact that they might compose, does not satisfy the rules of category theory.
      Webpages are graph nodes at best. They are not composed by a set of rules that don't have any gaurantees related category theory.
      Categories compose by rules of math and logic only. "Webpages" cannot be PROVEN to compose in this way, because that kind of composibility is not a required part of the TCP/IP protocol.

  • @sccrstud92
    @sccrstud92 9 лет назад

    Is that list of endomorphisms composed in reverse order? Shouldn't the last function in the list be applied first?

  • @henrituhola
    @henrituhola 5 лет назад +1

    I wish people stopped saying it's nonsense. It's obviously not.

  • @coolabananers
    @coolabananers 7 лет назад

    Really good! Thank you

  • @Jaazzla
    @Jaazzla 6 лет назад +1

    Very useful. Thank you!

  • @OhadAsor
    @OhadAsor 9 лет назад

    good one

  • @thaddeusolczyk5909
    @thaddeusolczyk5909 8 лет назад

    Are the slides available somewhere?

    • @kenscambler4618
      @kenscambler4618 8 лет назад +2

      www.slideshare.net/kenbot/category-theory-for-beginners

  • @TechLord79
    @TechLord79 8 лет назад +2

    This is a nice talk and I like the use of pictures to try to clarify things. I do, however, find the part addressing a C#/.NET audience a bit lacking - there could have been clearer examples and better hints to F# which is much more of an option to a .NET audience than Haskell or Scala.
    Scott Wlaschin does a marvelous job at trying to explain functional programming benefits even trying to avoid the "bad words" like Monads or Category Theory: fsharpforfunandprofit.com/rop

  • @jyrikgauldurson8169
    @jyrikgauldurson8169 7 лет назад

    Nice, but examples should be in Haskell

    • @frechjo
      @frechjo 7 лет назад +1

      I say examples should be in Factor or Joy*. It's a better notation for composition:
      "c ∘ b ∘ a" is simply "a b c" ;-)
      But jokes aside, if anything, Javascript would be better than Haskell or C#.
      It's trying to present it in a language-agnostic and paradigm-agnostic way, precisely moving it away from Haskell, where it's almost a monopoly, and where you have enough material already.
      EDIT:
      (*) Oh, if Cat was still alive, that would be just perfect!