You are going to have to revive jesus to come up with a functional language that simplifies coding over a procedural one. Especially over an object oriented one.
Programming with Categories
71–80 of 113 posts
Re: Programming with Categories
#72When taught in January at MIT, a highlight was something I'd not seen elsewhere: someone called it the "aftermath" (3-pun). After the one-hour traditional-ish lecture (on video), the room was reserved for an additional hour. When previously taught, people would remain afterwards to ask questions, discuss math, and chat. So this was an iterative-improvement formalization of that. People would gather in front of the bl…
Why are you paying for that nonsense?
Re: Programming with Categories
#73When taught in January at MIT, a highlight was something I'd not seen elsewhere: someone called it the "aftermath" (3-pun). After the one-hour traditional-ish lecture (on video), the room was reserved for an additional hour. When previously taught, people would remain afterwards to ask questions, discuss math, and chat. So this was an iterative-improvement formalization of that. People would gather in front of the bl…
wait, you are saying that at MIT you had to sit for a video? Why are you paying for that nonsense?
Re: Programming with Categories
#74As someone who respects functional programming (because it removes geniuses from competing in my space) here's a nice video https://www.youtube.com/watch?v=ADqLBc1vFwI What is the beautiful monospace font in the pdf here http://brendanfong.com/programmingcats_files/cats4progs-DRAF... ?
Re: Programming with Categories
#75Earlier quoted context omitted.
At a meta level, Category Theory requires some comfort with abstraction, which really only comes with a mathematical education. So while it may stand apart from much math, it relies on your strong mathematical foundations.
As so many undergraduate math textbooks say, "No background is assumed beyond sufficient mathematical maturity."
“How much salt should I add?”
“Oh, not too much.”
Practically guarantees a withering glare from me.
Re: Programming with Categories
#76https://github.com/zio/zio-prelude
It's a brand new library for Scala that contains reusable mathematical structures. Still based on algebra and category theory, but it expresses them more or less differently than how they've been expressed in Haskell (and similar languages). For example, unlike Haskell (and Scala's own cats and ScalaZ), it doesn't present the "traditional" Functor -> Applicative -> Monad hierarchy. Instead, it presents the mathematical concepts in a more orthogonal and composable way.
One example out of many, you don't have a Monad. You have two distinct structures:
* Covariant functor, with typical map operation `map[A, B](f: A => B): F[A] => F[B]`
* IdentityFlatten which has a flatten operation `flatten[A](ffa: F[F[A]]): F[A]` and an identity element `any: F[Any]`
When combined together (Scala has intersection types), you get something equivalent to the traditional Monad.
The project is in its infancy, so it may still change significantly, though. Look here for more detailed explanation:
https://www.slideshare.net/jdegoes/refactoring-functional-ty...
Re: Programming with Categories
#77I've read a lot about Category Theory, and I'm amazed at the abstraction level that lets you compose with different mathematical domains (geometry, topology, arithmetic, sets, ...). And yet, the current mathematics relies heavily on the ZFC set theory. Why is that ? (Is that assumption even correct ?) From what I've learned so far, the set theory suffers from Russel's Paradox[0] (does the set of all sets that does no…
I don't think that's right. The original invention of type systems in programming had nothing to do with Type Theory. The motivation wasn't from any theory. The point was to tell Fortran whether to treat a value as an integer or a floating-point number, which affected storage format and a bunch of other things. (Before Fortran, there was floating-point arithmetic, but the type was still just a computer word. The programmer had to keep track of what format it was in.)
Re: Programming with Categories
#78Earlier quoted context omitted.
Which is kind of ironic, because students take classes exactly because they feel 'immature' with respect to that subject.. Honestly, most of my smoothest educational experiences with hard topics assumed some immaturity on my part, and that that was OK
People don’t generally take category theory because they don’t really understand how proofs work or how to read definitions. The maturity required is about being able to cope with proving things and following proofs based on definitions which will probably seem somewhat bizarre at first and unmotivated at first. The immaturity you seem to talk about is people taking category theory because they don’t know category th…
Endofunctor: A -> A, for category A
Functor: A -> B, for categories A and B
Re: Programming with Categories
#79As someone who respects functional programming (because it removes geniuses from competing in my space) here's a nice video https://www.youtube.com/watch?v=ADqLBc1vFwI What is the beautiful monospace font in the pdf here http://brendanfong.com/programmingcats_files/cats4progs-DRAF... ?
Hitler: What's a monad anyway? No one who understands monads can explain what they are Underling (hurriedly): A monad is just a monoid in the category of endofunctors This caused me to choke on my coffee.
A helpful analogy can be drawn by comparing two facts: a composition of something with its inverse produces the identity (a.k.a. unity, to use the Latin root), while a composition of something (e.g. a functor) with its "adjoint" (not quite the inverse) produces something similar that is better said in Greek.