6 ms·
Category Theory for Programmers
- hoprocker 12y agoI've been hearing so much about Haskell and category theory, and how they can change the way you think about programming. Thanks so much for this.
- reinhardt 12y agoWhat the heck, is it the unofficial Unreadable Site Day today? First https://news.ycombinator.com/item?id=9460277 https://news.ycombinator.com/item?id=9460277 and now this.. damn.
- amaks 12y agoI use Clearly for Chrome (https://chrome.google.com/webstore/detail/clearly/iooicodkiihhpojmmeghjclgihfjdjhj https://chrome.google.com/webstore/detail/clearly/iooicodkii...)
- simoncion 12y agoWhat? This site has nearly black serif type on a peach-ish white background. The layout, type choice, and color scheme seems to address pretty much every objection that I've seen the "I can't read light-colored text on any background" crowd advance. Edit: Here's a screenshot from my machine: http://i.imgur.com/W2QcLAp.png http://i.imgur.com/W2QcLAp.png (Chromium 41 on Linux) Can you explain exactly what makes the site unreadable for you?
- talideon 12y agoI'm guessing the small text.
- simoncion 12y agoIf his concern is too-small text, then he will surely be happy to learn of his user agent's "minimum font size" setting.
- cleverCostume 12y agoI agree with the readability issue. The small text is part of it, but I can zoom to adjust that. However, the square alignment is the bigger concern and something I can't quickly remedy as a reader.
- simoncion 12y agoI'm asking these questions out of a genuine sense of inquisitiveness and an earnest desire to understand what's going on here. I have no desire to belittle or criticize. I'm just confused and quizzical. What do you mean by "square alignment"? Are you talking about the full-justified [0] body text? If you are, then: 1) This confuses me, as this is exactly what the "I can't read light-colored text on any background" crowd says that studies show improves readability. 2) What about the full-justified body text makes it difficult to read? If you're not talking about the body text, then what are you talking about? Thanks in advance! :) [0] http://en.wikipedia.org/wiki/Typographic_alignment#Justified http://en.wikipedia.org/wiki/Typographic_alignment#Justified
- deleted 12y ago[deleted]
- cleverCostume 12y agoWe are talking about the same thing. Kerning is a good thing, it increases readability. In a perfect world everything would be hand kerned for the best results, but that's not realistic. The compromise is automatic kerning, which isn't as good, but isn't too shabby. However, when you full justify text you're forcing the computer to abandon its best attempt at good kerning. Like newspaper on silly putty it gets stretched into spacings that aren't clean. Even if it leaves the spacings between letters untouched that forces it to make large and uneven spacings between words. Some people might prefer that, and some people might prefer copy set to look like random letters. It's hard to have generalized rules that fit everyone. In general though I think it the standard position taught typography is to not justify text except in special situation.
- davidgerard 12y agoThere's a reason Alt-V, Y, N is my favourite Firefox key combination.
- ExpiredLink 12y agoHey, that's nice!
- istvan__ 12y agoJust use zoom, most of the major browsers let you do that. Some even let you define the minimum font size.
- skybrian 12y agoI subscribed for a while but it didn't succeed at being relevant for the kind of programming I do.
- Retra 12y ago"If you’re an experienced programmer, you might be asking yourself: I’ve been coding for so long without worrying about category theory or functional methods, so what’s changed? Surely you can’t help but notice that there’s been a steady stream of new functional features invading imperative languages. Even Java, the bastion of object-oriented programming, let the lambdas in. C++ has recently been evolving at a frantic pace — a new standard every few years — trying to catch up with the changing world. All this activity is in preparation for a disruptive change or, as we physicist call it, a phase transition. If you keep heating water, it will eventually start boiling. We are now in the position of a frog that must decide if it should continue swimming in increasingly hot water, or start looking for some alternatives." In other words, if you think this isn't relevant to the programming you do, it is likely that the programming you do is the exact kind of programming this was written to be relevant to.
- umanwizard 12y agoThat's a non sequitur. "Functional" doesn't imply having anything to do with category theory. You can learn functional programming (even including theoretical type theory, etc.) without knowing literally anything about category theory.
- tel 12y agoThe author doesn't say it so I will: Category Theory is like a treasure map to FP. Possibly many other systems interesting to programmers too—circuits, optimization, DSLs, API design, etc. CT is not required for practicing FP, but it can be a powerful guidepost to solving problems. A good CT intuition will lead you to recognize opportunities for nice abstraction in a way that's difficult to replicate otherwise. It'll also give you a tool belt for communicating them to others without any arm-waving. All together that's a powerful thing.
- arborist42 12y agoIf anyone is interested in a very good and accessible introduction to category theory that is not specifically geared towards programming I can highly recommend the book Conceptual Mathematics by Lawvere and Schanuel. It's very easy-going and can be read by someone in highschool, and it really teaches you how to think categorically about the world.
- rohanshah 12y agoThis is a great series. I also highly recommend Benjamin Pierce's book "Basic Category Theory for Computer Scientists" if you are interested in this http://mitpress.mit.edu/books/basic-category-theory-computer-scientists http://mitpress.mit.edu/books/basic-category-theory-computer...
- draven 12y agoHow accessible is the book (the google preview on that page does not help assessing how complex the text is) ? I guess it's better to start with "Types and programming languages" by the same author ? I don't have a formal education in these topics.
- istvan__ 12y agoPretty good series, using Haskell (it has a pretty decent type system and the type syntax is easy to understand, OCaml's is a bit more confusing) for the examples. Great coverage as well on types and category theory.
- leoh 12y agoI like the first lesson (http://bartoszmilewski.com/2014/11/04/category-the-essence-of-composition/ http://bartoszmilewski.com/2014/11/04/category-the-essence-o...). There are some neat challenge problems. It turns out Python does an excellent job of dealing with them: > Implement, as best as you can, the identity function in your favorite language (or the second favorite, if your favorite language happens to be Haskell). def identity(x): return x > Implement the composition function in your favorite language. It takes two functions as arguments and returns a function that is their composition. def compose(f, g): return lambda *args, **kwargs: f(g(*args, **kwargs)) Testing these out: >>> compose(lambda x: x+1, lambda y: y-1)(0) 0 >>> compose(identity, identity)(0) 0
- deleted 12y ago[deleted]
- bobwaycott 12y agoAll the links have target="_blank". Ridiculous.
- Merkur 12y agothe preface sold me - I sure want to learn more about it! after reading the first 3 chapters, I thought: that's not new I compose category's since I started programming! Train reached its destination, can't wait to discover more about that category point of view.