Sunday, 12 September 2010

The Catsters YouTube Channel: Lectures on Category Theory

Just quickly posting to mention my finding a neat little YouTube channel with lectures on Category Theory: The Catsters.

The folks on the channel giving the lectures are enthusiastic nerds (what else?) and their lectures are actually really well done. One can even read what they scribble on the board. Usually.

The quality of the videos is pretty poor though, and the buzzing of the sound and poor balance of voice and ambient noises, as well as the amplification problems (sometimes, especially on the Monads video, the voice just blows out the mic amp's range) make it a little hard to follow the lectures. It won't, of course, prevent a real enthusiast from watching them. The explanations' quality is good (as far as I could tell.)

I increasingly find the lecture format of Internet videos a little nicer than your average run-of-the-mill lecture, where you sit with some 100 folks in one room. Granted, my own course of studies usually put me into rooms of no more than 20 people, but I still find it quite useful to be able to view lectures on demand. There's something to be said for both formats.

Go check it out! And I'll try to find some original content to post again :-P

Tuesday, 6 July 2010

Generalised Algebraic Data Types in Haskell

I will just ignore the fact that I haven't posted anything here in more than 1.5 years. It's still my blog :-) Maybe there's gonna be a follow-up on how/what I was doing, but right now, I'll skip right over it.

Heinrich Apfelmus has posted an absolutely enlightening video explanation of Haskell's generalised algebraic data type system on his blog. It gives a newcomer quite a nice perspective on why GADTs are so powerful, and how one can use them. There's a couple of caveats: first, if you're totally new to Haskell this won't make too much sense to you. You'll have to understand at least data type declarations, type constructors and maybe the infix function notation (and the fact that every type constructor is a function!)

The example he chose (algebraic expressions) is quite nice & simple, but it's also a toy example. It would be nice to see GADTs used in an example that is still intuitive but maybe a little more... engaging. I'm thinking of 2-sorted Typed logic, and/or typed lambda-calculus with embedded FOPL. I'm currently implementing something along those lines and hope to release the code soon :-)

EDIT: I just discovered a newer post of his about the fixed point combinator; and it even taught me some new and interesting things! I really like the style of his videos... and his cute accent ^^.

Thursday, 4 December 2008

The Good the Bad and the Funny

Credit where credit is due. Vladimir Putin may be a despisable person, but, damn, he's so Russian, he sweats Vodka:

French media had quoted Putin as saying in a heated conversation with French President Nicolas Sarkozy in Moscow on August 12 that Saakashvili should be "hung by his balls" for starting the war which was roundly condemned by the West.
Source: Reuters

The Russian soul is an intrepid one. They like their unbashed, dauntlessly honest attitude, they sell it as a feature, where some might consider it outright rude. Can't say I blame them for that. Hearing one of the most "important" persons on the world talking like that does find favor with me. That's probably my Slavic side, or maybe even the faint Mongolic or Thrakian genes, so I don't expect you westerners to understand that. It's great, because it's stupid, but it's manly, which is even more stupid, and that in turn, makes it great again.

He goes on:

"Seriously speaking, both me and you know about tragic events in another region of the world, in Iraq, invaded by American troops due to a concocted pretext of searching for weapons of mass destruction," said Putin.

"They found no weapons, but hanged the head of state, albeit on other charges ... " said Putin, referring to the 2006 execution of former Iraqi President Saddam Hussein.

"I believe it is up to Georgia's people to decide what kind of responsibility must be borne by those politicians who led to these harshest and tragic consequences," he said.
ibid

No matter what you may think about Mr. Putin, it does take quite some self-confidence to accuse the Americans so openly of wrongdoing. Demanding to hang the Georgian president by his balls for attacking another country under "false" premises is indirectly asking to do the same thing to George. Bush. Jr. Not that I would mind.

And I'd like to take that as an opportunity to remind everybody that, despite these brutish words, Putin is a man of extreme subtlety, and no doubt even those words were duly prepared and carefully placed (…or maybe I overestimate him?) I still think he's one of the most dangerous people on this planet (known to me, anyway) and I'm watching the current political "developments" in Russia with great unease.

Thursday, 20 November 2008

Tough Questions

Apparently, it's been "Philosopher Day" recently. Not that I noticed. BBC took it as an excuse to feature an article on "Four Philosophical Questions that will Make Your Brain Hurt." So far, my brain feels fine, and I'm only slightly amused. Let's consider them in turn.

Should we kill healthy people for their organs?

I first misread that as "Should we kill wealthy people for their organs" and thought to myself: "My, what a good idea! that's no hard question at all." Unfortunately, on second glance, the question turns out to be the same old utilitarian vs. moralistic clash. And mind you, that's not strict philosophy, it's more like ethics.

You cannot justify utilitarian reasoning with moral doctrine. But you can doubt the utilitarian thought on other grounds: Since there is no way of predicting the future, utilitarian maximes will always be based on assumptions and guesswork. See the world as a system of interdependent states. Killing someone is quite an action on this system, and can have unpredictable consequences. Letting someone die of natural cause might be seen as part of the system, and will have the usual consequences.

Trying to answer this question without having a look at the big picture isn't sensible, but that's what they're doing here. And that's stupid. The big picture doesn't care about one person or five. WWII eradicated the same amount in Millions, per year. Humanity recovered. The human race is such that it can compensate for the loss of individuals. The current human (Western) society is such that it cannot (easily) compensate for the (open) loss of individual values. On the other hand, doing such things implicitly, is perfectly valid, even in the most "civilized" of nations. Or when did you last flush your fecal matter down the toilet, while children in other parts of the world die because of the lack of (clean) water.

Are you the same person who started reading this article?

Ugh. Not again that ol' "Who am I?" question. Heraklit (sortof) says: "You cannot go into the same river twice, since the river always changes." The question is the definition of "same." Ergo, the definition of individuality. If you like to think of time as nothing more than another dimension, you'll just say, it's me, over there. A state change does not indicate a change in kind. Or does it? Anyway, this doesn't make my brain hurt, it merely provides a nice distraction best discussed with friends over some pints of beer.

Is that really a computer screen in front of you?

Solipsism. How boring. For all I know, yes it is. It is safe to assume it is. If I'm mistaken, so be it. Conventionalism is the keyword here. Yes, senses can be fooled, but, what isn't perceived isn't there. What isn't perceived by me, isn't there for me. Since I call it a computer screen, and you call it a computer screen, it is a computer screen. If it turns out to be a sentient life form, disguising itself as something useful, I'd probably still call it a computer screen, at least until I find a better name and use for it.

Did you really choose to read this article?

Quoth the article:
Suppose that Fred existed shortly after the Big Bang. He had unlimited intelligence and memory, and knew all the scientific laws governing the universe and all the properties of every particle that then existed. Thus equipped, billions of years ago, he could have worked out that, eventually, planet Earth would come to exist, that you would too, and that right now you would be reading this article.

Ever heard of quantum physics? This scenario is as absurd as it is impossible, because there is no way of knowing all state in the universe. Even if you did, there is no way of predicting how that state would evolve.
But I like the idea of calling god 'Fred.'

TeX on Blogger

It's done! After about an hour of desperately trying to set it up using various approaches, I finally came across Yourequations.com. Sounds very Web2.0, but it works!

\mathbf{Proof.\mbox{ }}\mathrm{ By\mbox{ }example:} \sum_{n\in\mathbm{N}} p. \mbox{ }\Box
Now that was one one-liner! Two problems remain: in-line (in-text) LaTeX symbols (this script requires the use of <pre> tags, which, by definition, open a new line) and the fact that I have to first publish the post, before I see the results.

I had hoped to take Blogspot's lacking LaTeX support as an excuse to roll out my own server and CMS. Meh, now I'll have to find another reason.

Like, nicer fonts in the equations, using my favorite font package. Yes, that's it!

Update:

Reading the source code, it may be possible to do in-line \LaTeX{} after all. Yeah. Just use the <code> tags instead.

Now you can expect to see several posts that have been rotting in my drafts section for a while due to lack of formula support. Let's just hope I don't promis you too much.

Wednesday, 19 November 2008

Overheard in Tübingen

"Ja, es gibt ja halt Zahlen."
"Ja."
"Und mit denen kannst Du dann rechnen."
"Jaaa."
"Und damit kannst Du dann halt so Daten verschlüsseln."
"Aha."

Saturday, 11 October 2008

(defun perspective (person) ( … ))

Dan Bikel has written a nice statistical CYK parser for Java, and it reads and writes Lisp syntax, namely Sexps. While I was coding on a project today, I was being watched and supported by a colleague. When I used Dan Bikel's Sexp class, hilarity ensued.
I countered her chuckles with an explanation of basic Lisp syntax. This prompted a curious reply of hers:
The inventors must have been lonely people.
Well, contracting 'symbolic expressions' to a word reminiscent of what computer freaks stereotypically lack may seem an awkward coincidence to some, but drawing a connection may seem like a stretch to others. Sadly, there probably is a grain of truth in such… assumptions.
Upon demonstrating to her some real world examples of Lisp code, and after the inevitable "all those parens!", she uttered
The inventors really must have been lonely people. And bored ones at that.
Poor Lisp. Is that what people think of you today?
Lisp is old. Very old. But just as Prolog, it is still around, and that alone justifies its use. In fact, most of what people use XML for nowadays should rather be done in Lisp syntax.