kena

Archive for November, 2012|Monthly archive page

Haskell’s magic wand is stunted, on purpose

In lecture on November 25, 2012 at 12:00

An absolutely stunning feature of the lambda calculus is that it allows us to define functional recursion without using recursion. That is, the concept of recursion is fundamentally a by-product of being able to reproduce multiple copies of a function’s input in its output.

In other words, the “essence” of functional languages does not require recursion, because it is theoretically possible to define recursion from other functional concepts without using recursion itself.

But Haskell can’t do.

Read the rest of this entry »

Advertisements

On the Turing Completeness of C – part 2

In lecture on November 20, 2012 at 22:00

Two days ago I started to investigate whether C was Turing Complete. With help from two serious people also interested in the topic, I came to the preliminary conclusion that it is probably not. Here is a summary of the arguments so far.

Read the rest of this entry »

On the Turing-Completeness of C

In address, lecture on November 18, 2012 at 12:00

On November 17th, 2012, a link to a Brainfuck interpreter written using the C preprocessor language was posted to Hacker News. In the necessary flurry of HN comments that followed, the question of CPP’s Turing Completeness came up, to be answered negatively: the proposed interpreter needs to be extended manually for each possible loop upper bound, which makes it barely equivalent to Hofstadter’s BlooP language from Gödel, Escher, Bach.

However a gem was hidden in the midst of these comments: is the C language Turing-Complete?

Despite the appearance of controversy, with some commenters leaning on the side of “yes” and some other on the side of “no,” there is only one correct answer from the perspective of the language specification. But it’s not intuitive.

Read the rest of this entry »

In the dark

In poetry, reflection on November 13, 2012 at 23:00

There’s this guy I know, and this guy, and this guy Read the rest of this entry »

The politics of the author list

In lecture on November 12, 2012 at 12:00

Most published scientific articles display two or more authors. This does not necessarily mean that more than one person was involved in writing the article. The “author list” of scientific articles, like marriage in traditional cultures, is usually decided by unwritten political rules rather than love and the personal preferences of the people involved. Here’s an overview.

Read the rest of this entry »

Proper analysis does not need Bayes

In address on November 10, 2012 at 12:00

A recent XKCD post makes fun of frequentist statisticians and hails Bayesian statisticians for their superior skill at predicting trivial outcomes. This comic makes it look like only Bayesian approaches are sane and reality-compatible when predicting outcomes. This annoys me. There is no need to invoke Bayes’ theorem and Bayesian statistics to evaluate a machine that predicts the sun exploding with a random bias.

Read the rest of this entry »

The holy printing altar

In hack on November 5, 2012 at 12:00

We have in our office this awesome networked multi-function laser color printer able to churn out hundreds of pages in a few minutes. It’s also our coffee corner at work. Which means I spend time quite often next to it. And therefore that I see stuff coming out of it.

Read the rest of this entry »

Comments on A. Kay’s talk on Programming and Scaling

In lecture on November 4, 2012 at 12:00

In 2011 Alan Kay gave a talk/lecture on Programming and Scaling at the Hasso-Platner-Institute Potsdam. The take away is that you have to be creative and step out of the box to design new software that is both very simple and very powerful. The Cairo compositing system is his example. Here’s are a few comments.

Read the rest of this entry »

Making Scrabble more fun

In hack on November 3, 2012 at 12:58

So there’s this bunch of friends who wanted me to play Scrabble with them. I’d like to play with them. Unfortunately, my relationship with words does not involve decomposing them into individual letters: I learn and use them as a whole, not an assembly of their parts. So I can’t “see” words when faced with a set of Scrabble tiles. Therefore, I suck at Scrabble.

But then there are two components to the game: finding candidate words (which I suck at) and then finding good positions to place them on the board and maximize your score (which I suck less at). Maybe if I could get some help on the first part, Scrabble could be fun. And then I figured computers are good at finding things.

So I decided to make a program to help me.

Read the rest of this entry »