The only really bad thing with Ubuntu is that they release every 6 months. This means that every 6 months the web is flodded with articles about installing Ubuntu; articles about what’s good, articles about what’s bad, articles about how to fix what’s bad and thereby showing that Ubuntu still is good, articles about upgrading, articles about installing on a clean system, articles about Ubuntu chaning lives, articles about how installing Ubuntu saves a kitten…
If this continues the web will become useless. Seriously, it will!
It’s been hard to avoid the whole Dunc-Tank debacle that’s been going on in Debian for a while now. I can’t say I care a whole lot, but after reading the position statement posted by a few DDs I got to thinking.
At about the time of Warty Warthog I jumped on the Ubuntu band wagon. I had been using Debian for a few years already. Becoming a DD was something I thought was worth persuing, but it was hard work. I didn’t even find anyone to upload my packages. Disappointment struck and I jumped ship. In Ubuntu I found a new community, a community that was growing and actively supported people who were interested in contributing. Due to circumstances I couldn’t put in as much work as I wanted and I still had that nagging feeling that to really contribute, even to Ubuntu, I needed to contribute to Debian. After all Ubuntu is a fork of Debian. There was also a kind of built-in inequality in Ubuntu. There were first-rate citizens and second-rate citizens. First-rate citizens were employed by Canonical. In the end my Ubuntu days ended during Breezy and I went back to Debian. There were several reasons for my switch back, but one was that in Debian everyone is equal. You can go as far as you want in Debian, you just have to put in the work. It is a meritocracy.
So, where do my thoughts on DT come? Well, here it is; DT threatens that equality. Debian runs the risk of becoming a project with tiered membership. Luckily the members are vocal, opinionated, and not afraid of using their MUAs. I still have trust in Debian. We live and we learn.
The basic idea of DT (paying people to work on Debian) isn’t all bad but maybe they should have let the DDs elect who gets paid to work on Debian? Or maybe it should be run similar to Google’s summer of code, with project proposals and DDs electing projects worth investing in?
First off, keep in mind that the State st a type is a function type (st -> (st, a)) and that returnState a wraps a into a function that returns a state-value,value pair when it’s applied to a state-value.
bindState is a bit complicated to think about. It takes two arguments, both functions. The first (m) is of type st -> (st, a) (i.e. State st a). The second (k) is of type a -> (st -> (st, b)) (i.e. a-> (State st b)). In other words, this second argument is a function that takes a value and returns a function that we can apply to a state, the return function has “wrapped up” in it the end result of the computation. Looking more into the implementation of bindState we see that it returns a function taking one argument (st) where m is used to calculate a new state-value,value (st' and a) pair based on st. Next k is used to “wrap” a into a function (m') that we can apply a state_value to. The last step is to apply the new state (st') to the function wrapping the new value (m').
Looking at mapTreeStateM on (Leaf a) we see that f a is m in bindState. \b -> returnState (Leaf b), from our look at bindState we can see that b here will be our newly calculated value (i.e. the new value coming out of f a will be wrapped into a leaf again).
I found it easier to understand when I applied an “identity function” to a tree:
doNothing :: Integer -> State Integer Integer
doNothing a = returnState a
Working through, on paper, what goes on when applying doNothing, a tree of one leaf, and an initial state of 0 made it quite clear what is happening.
Analysing the recursive step after this is fairly straight forward. Adding parentheses makes it a bit easier to read and I found it helpful to rewrite it to only consider the left branches:
mapTreeStateMLO :: (a -> State st Integer) -> Tree a -> State st (Tree Integer)
mapTreeStateMLO f (Leaf a) =
(f a) `bindState` (\b -> returnState (Leaf b))
mapTreeStateMLO f (Branch lhs rhs) =
(mapTreeStateMLO f lhs) `bindState` (\lhs' ->
returnState (Branch lhs' (Leaf (-1))))
The extension to right branches comes fairly naturally after that.
I wrote a few functions to play with mapTreeStateM. All of them use a single integer to represent its state.
State is the number of leaves in the tree:
countLeaf :: Integer -> State Integer Integer
countLeaf a = \st -> (st + 1, a)
State is the maximum value of a leaf
maxLeaf :: Integer -> State Integer Integer
maxLeaf a = \st -> (max st a, a)
This function that numbers each leaf in the tree.
numberLeaf :: Integer -> State Integer (Integer, Integer)
numberLeaf a = \st -> (st + 1, (st, a))
I’m not a Debian Developer, so the recent Firefox/Icedove debacle hasn’t caught my attention that much. Basically I trust Debian to do the right thing. It seems in this case they are, again, doing the right thing.
GNOME’s Dave Neary says it’s ill-advised of Mozilla to care more about practicality and usability than freedom. He’s right! I read a few of the comments, and as so often people (i.e. users) say that freedom only matters to developers. That is simply not true! Please think about it! How does the freedom in source empower you to do what you want to do?
I’ve heard a few stories of people who are switching from Windows to Linux, but who can’t make a total switch because of iTunes. Since iTunes is closed (and defective by design) they have no choice but to keep Windows around in order to access the music they’ve bought. (It’s also higly ironical that Apple has written a program that keeps people using Windows.)