Just a quick update for SELinux in etch. With Manoj picking up work on it again
(you might have noticed the large influx of new SELinux related packages these
days, bringing our toolchain up to date again), and rjc having setup a SELinux
development box for me, we're actually making some progress on SELinux for etch
now.
Uwe Hermann also blogged about
SELinux on Debian recently.
There are tons of small nuisances with SELinux on Debian left. I've started
filing bugs and tagging them with the
"selinux" usertag. It's in the details. For example mawk and gawk both try to ioctl any
file they read as if it were a serial terminal. Which of course causes SELinux
to log an audit error, since the init script or whichever was calling awk
didn't have the permissions to ioctl a config file.
Then there is /dev/xconsole - it's created by the syslogd init script
(shouldn't maybe this be handled by udev), it's barely used by anyone, and
SELinux policy upstream wants to keep it in the xserver policy, and claims its
main use is to be able to feed it the output from programs started by the
window manager (instead of .xsession-errors). Which is a seriously broken
design, since it's not multiuser capable. Anyway, our current options are to
- diverge from upstream in policy, putting xconsole into logging policy
- make xserver an mandatory policy module
- convince the syslogd maintainer to disable xconsole by default
- convince upstream to at least split it out from the xserver module into
a separate xconsole module and make that mandatory
Of course I was quickly flamed for filing a bug against exim stating that there
currently is no SELinux policy for it, and people thus will have to use postfix
or sendmail instead. But heck: people trying out SELinux on Debian
will
run into this problem, you know. I'd certainly prefer people to use exim
instead of sendmail (I'm more of a postfix guy), but unless someone writes
a policy for exim, people can't use it with SELinux. I have no idea how exim
works (where its queues live, expected behaviour and so on), so I can't write a
policy.
Now to start a real flamewar - how about making postfix the new default MTA
for Debian with etch? /me runs and hides.
Whew.
Ichthux has released, and now I can breathe again!
When I joined the
Ichthux development team, they had produced their “proof of concept” release as yet-another-Knoppix-remaster. At that time, I encouraged them to move away from tacking their work on as a derivate of a derivative and instead become a
CDD. I argued that as a
CDD Ichthux would last, while as a Knoppix-remaster, it would just be another marginal custom livecd that went nowhere. They got the message. So you may well be surprised to hear our first release is based on Kubuntu, and not Debian.
So, what’s the story here? Have you defected?
Nope. It just happens that most of the team ended up being actively involved in Ubuntu development. Also, when we first started casting about for the best way to package a livecd/install disk, it seemed to us that Ubuntu already had a head start on this.
What about being a CDD? It looks to me like that idea has fallen by the wayside.
Nope again. We’re a joint team now, and though we’ve started out with Ubuntu, we’ll be pushing changes back into Debian. The goals of a
CDD are well understood by the whole team: to best meet the needs of our users, we design the system to mesh well with the parent distributions, not forking and making a derivative, but working inside those distributions to improve them for our particular subgroup of users.
Hold on now, aren’t you contradicting yourself? A CDD’s development is all within Debian, but Ubuntu itself is a derivative, and what’s worse, Kubuntu is a derivative of a derivative! Aren’t you right back where you started?
Well, on the last count, you’d be wrong. Kubuntu is
not a fork. And as for Ubuntu being a derivative, well, sure it is. But the Ubuntu/Debian relationship is different from other derivatives, and although
there is friction, I’m enough of a crazy idealist to believe a joint Debian/Ubuntu
CDD is quite doable, benefits both projects more, and serves our users better than if we were to split up and each go work on our own.
We were occupying the entire park bench when the strange girl
approached. She was strange in the sense that we had never
seen her before; in the grand scheme of things she was not all
that strange. I mean, she was wearing bellbottoms, which was
not the norm, and her feet were caked with mud, which might
have indicated inclinations toward being a neo-hippie, and while
that might be pretentious and lame, it's not all that strange,
considering.
Eying the occupants of the bench, she asked if any of our laps
were free. The art of sitting on someone's lap is largely a
lost one; I don't know where people learn the proper technique,
but I do know that most people don't even know it exists to be
learned. I know that I was surprised when it was revealed to
me.
Anyway, I never discovered whether or not she knew how to
properly sit on a lap, because we all kinda glanced at each
other and told her to fuck off. Two days later, she was
screwing the guy to my right.
That didn't last long. Neither did her mode of dress or her
behavior. She lopped off her long, brown hair, bleached it
blond, and got a few facial piercings. She started doing
heroin and boasting that she gave the best blowjobs in a
certain geographical region. She shacked up with a girl
named after an invertebrate. I'm guessing that she didn't
continue on to greatness.
Then there was another strange girl. She was strange because
she was stuck in the 50's. She was also as dumb as a rock,
so the only two interesting things about her were her
50's fetish and her profoundly deep bass voice. When I say
she was stuck in the 50's, I don't mean that she lived through
them and failed to move on. I mean that she wore saddle shoes,
sported memorabilia from the golden age of rock and roll, and
became very hostile when anyone challenged her adamant insistence
that no good music was ever produced after 1959.
Her sister was a model, also as dumb as a rock, and with the same
freakishly low voice. Her sister was also a giant slut.
In contrast, 50's Girl publicly had sex with a 50-year-old guy
while his wife and kids were in Virginia. Having sex in public
is generally bad form. I know this because the last time I tried
to have sex in a moving vehicle, the driver forbade it.
Actually what she said was that we weren't allowed to have
sex in her car until she had done so first. Then she proceeded
to never have sex in that car, which I thought was a rather rude
and deceptive practice.
Anyway, 50's Girl met this schmuck with spiky hair, piercings
and tattoos galore, combat boots, and a penchant for crashing
motorcycles. Really, you didn't need to look far below the
surface to know that he was a festering douchebag, but if you
did, you would find out that he was a pathological liar and
backstabbing snake.
They hit it off, and just like that, the 50's persona was cast
to the wind. She dyed her hair some sickly color, started
dressing in leather and listening to hardcore. Her elderly
friend, who had little trouble relating to clinging to the 50's,
now suddenly found herself in the position of possibly needing
to get herself a subscription to some kind of magazine.
Not too far away, a lollergirl took a break from plumping up and
spotted a ticket. If you were lucky, she told you about it.
In a project, I need two "blobs" compressed; the first one is the usual mix of ARM code, Thumb code and data, the second is a piece of firmware to be uploaded into an FPGA. Both of these show obvious signs of redundancy (the ARM condition code "always" appears quite often, and FPGA blobs have a lot of zeros).
So I thought that it might be an interesting idea to use the extra knowledge we have to build a better compressor. The easy answer, of course, would be zlib and a static table that emphasizes on the typical distribution of ARM code, however that is still quite suboptimal, for example we know that the heightened probability for the "always" condition code is only given in the condition code field, so we have to look at words, which is not very zlib-ish.
Also, the redundancy goes further. Except for very few exceptions, registers are a lot more likely to be used as source operands if they had been a destination operand since the last unconditional jump that was not a forward branch.
That much intelligence comes at the price of making the decompressor pretty complex, though, which I'd like to avoid. One of the main reasons for actually thinking about this stuff is that zlib's inflate code is too big for the 16kB space I have, and compiling it in Thumb mode leads to an ICE. So complex decompression code is pretty much a non-option.
Almost the same thing goes for the FPGA data. The gzipped data is still more than 50% of the uncompressed size, so I believe there is room for improvement here as well. Being able to use the same decompressor is a bonus, of course, but as long as the decompressor itself compresses well, a minor issue.
Today on Slashdot, there is a
story and interesting discussion about an article entitled
Consumer electronics ate my child's imagination.
The main point of the article is that children today are spending a lot of time in front of the TV and playing videogames. As a result, they are less able to reason about the world, and even have a
higher rate of depression. Apparently children today
average about 2-3 years behind children from just 15 years ago on cognitive tests.
The Slashdot discussion was (surprise!) interesting as well. One point raised was that the entire notion of childhood is fairly modern concept since most children had to work as soon as they were able up until modern times.
This is something that Terah and I have been thinking about already. Terah was shopping for high chairs one day, and was reading reviews online at Amazon. We were both shocked that some chairs were being panned in the reviews because children "got uncomfortable after more than 2 or 3 hours in the chair". Huh?? After reading some more reviews, it seems that people are using high chairs as a place to just plonk down kids for a few hours while the parents are trying to get work done around the house. I can't imagine any high chair being a good place to put a kid for hours. Some parents also complained that the kids could get out of the chair if left unattended for awhile (which brings up a whole LOT of questions).
Then of course, there are plenty of parents that use the TV (or PlayStation or handheld videogames) as a cheap babysitter.
Terah and I have talked about this already, and though we don't have any sort of detailed parenting plan, we certainly do NOT want to be that kind of parents. Some people react by saying, "oh sure, you may say that now, but once you have the kids, you'll change your tune." Yes, that's right, some parents don't even try, and what's more, believe that it's impossible to treat children any other way.
We know plenty of parents that are successfully raising children without buying them hundreds of beeping electronic toys, using the TV (or high chair) as a babysitter, etc. We know it's possible and that's what we're going to aim for, too.
For a site I'm building with Rails, I wanted to paginate the results of a database query with the build in pagination utilities. However, out of the box, paginate doesn't take a
:limit option, because that's used to get a certain number of results per page. This is the workaround I put together. Perhaps there are better ways, but this was quick and efficient.
In the controller:
class StoreController < ApplicationController
# This is for Pagination.
DEFAULT_OPTIONS[:first_n] = nil
This lets you use a new option to paginate,
:first_n (which isn't the best name, but was the first thing that popped into my head).
Now, you override this method:
def count_collection_for_pagination(model, options)
unless options[:first_n].nil?
return options[:first_n]
else
return model.count(:conditions => options[:conditions],
:joins => options[:join] options[:joins],
:include => options[:include],
:select => options[:count])
end
end
So, if you only want N results, you then do:
@prod_pages, @products = paginate(:products, :condition => condition, :first_n => 100)
Seems to be pretty quick and simple, so it works for me, although I'm sure a Ruby expert could make it look even nicer.
So i have travelled to Slovakia again, for a weekend this time.
I have been painting window frames. Since i have a new iPod (4G nano,
black, yummy), i could also listen to music (Tristania, In Flames,
Kamelot). The last time, it was somewhat of a patience exercise, but
this time... I guess i got better at painting and maybe i have become
more patient, too :). It was pretty enjoyable, more than i would have
thought a work like that could be. And i am sure the music helps, too.
(The next day)
And to continue the last blog... There, i have concluded that hardship
was important factor in becoming better:
And apart from hardship... Problem is, hardship alone, if it stays the
same, is not enough to make people change. It is the change from
contentment to unhappiness, that drives people forward. Because in
that change, one starts to change, and hardship together with dynamics
helps a lot. Static, unchanging hardship will only do little to change
a person. One can get used to it, like to anything else. Like to
contentment. So an initial change can start a cascade. Like for me,
breakup caused a domino effect. The change alone brought a lot of
hardship with it, and i had to change to accomodate to it. And the
change in me provoked more changes and so on. I have learned many new
things, or, things i have learned before but went unnoticed took my
notice. And in light of such things, i had to change again, because i
knew i couldn't be happy any other way.
A human being is as good as dead, when captured in a period of
stagnation, in an unchanging moment that lasts. Only through change,
through dynamics of life, we are alive. A man that does not change is
a statue, a dead piece of matter, only useful as a memento. And that
was what i have become, and now the statue is again starting to move,
to breathe, to live. Because there is just no perfection that one
could capture in a moment. No matter how perfect a moment, if frozen,
the perfection decays, the little cracks are noticed. That is why
trying to freeze time is futile, trying to preserve. One cannot enter
the same stream twice. Life is a constant change, and this constant
change is its only manifestation. Take the change away and you take
the life away.
The past is important. The past is what resulted into present, and
present is what makes future. Every moment, in a succession of
moments, is important. But without the moment before and the moment
after, the moment does not mean anything. The moment is void, without
predecessor and successor. We move in time, and the motion is what
becomes important, not the points we moved through. They are only
important in the relation to our trajectory, not in isolation. And so
is the direction which we take, the vector of our motion, and the
shifts in direction.
There is no eternity, only the eternity of its own
absence. Immortality and death are the same, the very same
notion. Because every time we change, there is a little death and a
little birth. And immortality is only possible in
staticness. Immortality is a point in time, without motion. And
without motion, there is no life to be.
And same goes for relationships. Make a relationship immortal and you
make it die. Relationship needs a possibility of death to live. Like
humans, like every living being. Without death, there is no life. The
transition from being into non-being is essential, because it is the
precondition to change. As i have already described, every change is a
death followed by rebirth, but the entity reborn is not the one that
has died. And therefore, without the ability to die, there is no
ability to change. And death, the conventional death, as we know it,
is just a death without rebirth. Something dies, and there is nothing
more to take its place. But... The death makes others change. And
therefore, the one who dies definitively, is again reborn, as part of
those others that have died, but haven't died, but are reborn. And the
one definitely dead enters those new, reborn creatures, as a little
fraction of them. And the cycle of life is closed, and the change can
perpetuate itself.
Every day, i die a thousand times. But there are deaths that are
important and deaths that go unnoticed. And most of the important ones
are only noticed in retrospect, by a being that resulted, after many
hours, or days, or weeks or even longer. And many more deaths. We only
exist through our succession, because only what is born from us
remembers what we were. And the very moment we are born, we die again,
and a new being remembers. The memory lives on, but the beings are
already dead. And the memory changes as well, because memory itself
does not mean anything, only the being possesing it can give it
meaning. And every successive being that we become gives it a slightly
different meaning.
And so the delicate, complex dynamics of individual life are
established. Not only the living being changes itself, but the
memories of the previous beings change. There is certain gravity
toward stagnation, because often the changes are only very slight, and
the being remembers his predecessors that were fairly happy and tries
to remain so. Because the bigger the change, the bigger risk. And
therefore all beings are susceptible to stagnation, to the stasis cell
of past success. Because past success is one's own enemy, even if it
is something that is a precondition to one's own being. So we need to
learn to live with our past success, but to not try to revive it. The
effort to bring back past is a wasted, contraproductive effort. It
seems so, it is almost natural, that if there was happiness in the
past, restoring the same past will bring the same happiness. But
there, that is not true, in the light of previous paragraphs. The trap
is so obvious, that description is probably redundant, but let me do
it once again anyway, maybe because i have fallen in it so many times
already. Yes, the trap is in the stagnation, in absence of new
things. Because even if one cannot restore the original condition no
matter how much he tries, one can, and that is for sure, replicate it
very closely. And that way lies a trap, a temporary (or even
permanent) thermal death of stagnation.
(Later that day, outside, on a nearby hill)
And now, like before, there's nothing more to stand between me and
myself. I sit in the grass, alone. My being alone complements me, in a
way. There are waves in the grass, as air moves. Music is playing,
apart from the few houses i can see downhill, my only connection with
the rest of people. And this what belongs to me, this paper, this
pen. This book by Italo Calvino that Enrico Zini has given me. If on a
winter's night a traveller. But it is late summer. I can see vineyard
in distance, on a slope different from mine. I call this slope mine
because i am the one sitting there. And the time to collect the grapes
is close. And here, next to me, an apple tree, with red apples on it.
And a white butterfly in the distance, beating the air with its light,
small wings. And i blow away a tiny spider who has lost its way on my
trousers. I feel being part of all this around me, and still so
foreign. And the butterfly appears again, but it may be a different
one.
The sun shines behind my back, alhtough i sit in shade of a tree. And
neither the sun nor the tree are my enemies, or my friends. But still,
i feel sympathy for both of them, one gives me light and warmth and
the other shields me from too much of it. And the setting, the scenery
soothes my senses, my mind, my feelings. Here, i am close to the
loving mother of us, living beings, the nature. Here she is tender and
forgiving and caresses my hair and it feels good.
And these feelings, i would love to pass on, to other people, so they,
too, could feel well. But i see that this is not quite
possible. Although these lines will hopefully give something to
someone, they probably can't carry what i feel. And i would bring
someone with myself here, so they could feel it with me. But presence
of other person would spoil it, it would be something else then. Maybe
beautiful in a way, different from this one, maybe very pleasant. I
love people, and when i see them happy, it fills me with gladness.
(And in the evening, on a train...)
And here i am, moving with speed, from one place to another. The
speed, sound of loud music in my ears, the landscape drifting away. I
could say i was happy, happy in the sense of change, everything
changing around me, sun setting behind distant horizon, the train
moving through the country. The semaphore lights. In the headphones,
heavy guitar riffs competing with the roaring of the train. Cold air
blowing in my face, flowing in my hair.
And now in another train, sitting in a compartment with stranger, a
girl, trying to guess who she could be, from her dress, from what she
is reading, from cues. Who she could become. What she means to me, a
passing stranger on the path of life. I have been reading the Calvino
book till now, but i thought i could write down my thoughts before
they perish, like they do. It is fairly silent now here, even while we
are on a train. The engine and the outside are muffled, the window and
the door are closed. We are in a strange kind of privacy with this
girl, neither knowing anything about the other. I, writing this text
here, she reading some sort of magazine. Looking up from what we do at
occasions. The train is accelerating now, and the sounds are more
intense. It is a bit shaky, too. My hearing is still lightly impaired
from the loud music from the previous train.
We arrived to a station. Short stop, then another long motion. Always
toward Brno, toward my flat, toward the night and tomorrow. The girl
is reading a horse races program. Here, i intrude her privacy and
write that here. I hope she wouldn't mind. I don't have a name other
than "the girl" for her, since all the words we exchanged was me
asking whether i can sit down in the compartment and her answer. And i
suppose i won't say anything and she won't, neither. Maybe a goodbye.
And now, we share a sort of almost intimacy. Two lone people in a
compartment, tired and waiting to arrive somewhere. An invisible bond
between us, doesn't mean anything, just that element at random brought
us there together, for a short moment. Chances are, we won't ever meet
again. And still, she is almost falling asleep, with her feet up, like
if i were a trustworthy friend of old. And i feel sympathy for that, i
feel honoured by a trust given by a complete stranger. She seems
comfortable, feeling safe. And it feels good to have that trust, it
feels important. It nearly gives warm fuzzies.
(To be continued, further...)