Older blog entries for pasky (starting at number 12)

A green-blue Gentoo blues

I feel the urge to teach! Pretty funny. Well. I would so much like to try it... I think I wouldn't suck at it (but I never really tried before) and I really love sharing my knowledge, more so in an interactive way. I will surely try to apply for teaching some practice classes for Unix next year. Teaching Programming practice classes could be interesting but OTOH I hate the idea of having to deal with massive amounts of Pascal code. Teaching Internet would be just boring, I guess. And teaching Discrete mathematics practices would be well over my head, at least so far. So my only hope for now is an unofficial thin-circle lecture on efficient bash (well, readline applications in general) and vim usage I was offered to someday hold on the campus. ;-)

I've been playing with Gentoo again. I've made my first ebuild, filing few bugs along the process. The ebuild tool is really awfully confusing for a newcomer. For some funny reason I kept writing <kbd>/usr/share/portage</kbd> instead of <kbd>/usr/portage</kbd>, so after some encouragement from <code>#gentoo-bugs</code> I decided to change my <code>PORTDIR</code> and see what will break. ;-)

There are some other rough edges I'm slowly discovering; on my TODO list I have an implementation of <kbd>emerge -T</kbd> which is like <kbd>-t</kbd> but shows the dependency tree with some asciiart, not just indentation (I find the indentation pretty hard to process by my optical brain centers). Also, when I'm doing a big many-packages emerge, I would like the summary of all package "installation notes" to be printed at the end, not scattered during the process where it is extremely unlikely I will ever read them. In the longer term, I want to investigate how well are the binary packages supported etc. I hope to finally learn at least some of the Python along the process. ;-)

BTW, in order to get dvifb to work, I had to restart gpm from inside the chrooted Gentoo system. But don't ever do that through the "standard" way - that will cause the dependencies to be triggered, it will happily remount your fstab (causing live filesystems to be remounted, bypassing the safety checks somehow) and so. I will try to make the system pretend those things were already done so that I can slowly restart all the stuff inside the Gentoo chroot so that I'm sure everything works when I do the final switch. I might try to switch bind to Gentoo tomorrow and also build my custom qmail ebuild (without dependencies on the other djb stuff like daemontools, which I dislike a lot).

Another BTW - if you also hate the bind9's host utility, you may find my comparison chart against bind8's host useful. On the new Gentoo system I just installed some standalone <kbd>host</kbd> utility whose output seems to be rather bind8-like. There are some glitches though, i.e. <kbd>-al</kbd> might not produce a valid zone. I might do some patches. ;-)

I will have to investigate all this funny trackback stuff, RSS feeds etc. (But it looks like at least those of my blog entries also forwarded to Advogato should have RSS feeds. Note however that I forward only articles which have prevailing technical contents which might be interesting/useful for the Advogato audience.) This weblog site could do with some CSS facelift, too. (Note to self: Remember to check why root.cz's CSS causes everything to be centered in ELinks.)

Also, please feel encouraged to tell me about any grammatical errors or awkwardness I will commit - please help improve my English! :-) (I will have to once write up about me, writing, English etc.)

Dum-tu-dum-tu-dim-ta-dum-dwamm-dum-tu-tam-dam. I should go sleep. Now.

#

Living on my console

I've read this very nice article calling for a console distribution few while ago, so I decided to followup on my blog. I think I have some things to say, using the Linux console (virtual terminal, virtual console, Linux terminal, call it how you like - just the thing your system scribbles its startup messages to; I'll further call it just "console") almost exclusively on my home desktop and exclusively on my notebook. Some popular console applications also originate from my software stable, namely ELinks, which I've originally created (read as forked from Links) and been maintaining until this autumn. So much for the self-advertisement. ;-)

I manage a Debian installation on my notebook and I simply refused to install X there. And sometimes it was pretty challenging to edge my way through the dependencies forest so that nothing I really want and is in fact for console doesn't depend on X too. It's basically impossible for SDL applications with both X and fb backends (unless I compile them myself). Eventually I gave up and let it install the xlibs. I still don't have any X server or so there, but so many things were linked to xlibs even though they had framebuffer frontend too, that I decided the disk space is worth it. The situation is generally getting better though - i.e. gnuplot-nox depended for some reason on gnuplot-x11, now it only suggests it. Of course it is more complicated with games, since even SDL-based ones which should work fine in framebuffer often depend on xlib (I'm sorry that I'm unable to come up with a specific example now since I have my notebook at work right now).

On my "desktop" home machine the situation is of course better just because I have a LFS-based own distribution there. So I get to decide what goes there and what does not and what links against what. As I said in my previous blog entry, I'm migrating to Gentoo which also has this sane dependencies advantage, so it seems things will go fine there, too.

So, how is life on the console for me? Well, I'm a programmer, not typical office computer user. So I never really needed any office suite for console since I simply doesn't use any. If I need to write something pretty-looking, I usually do it in TeX, and wvWare mangles most .doc files to some usable format successfully. Otherwise, I indeed can live fine with vim, Mutt, ELinks, irssi, mpg123 and ADOM ;-). I've been doing some TeX work lately and got some specs in PDF, but fbi (comes with fbgs so that I can watch .ps and .pdf files, too) and dvifb handle it all excellently. (Well, fbi still has a long way to come, because it is pretty much unusable for viewing i.e. photos since it does not support rotation well; I will start producing patches soon, I think.) Note that without a framebuffer (that is, if you have a video device w/o accelerated framebuffer), you can alternatively use dvisvga and zgv for these tasks.

So, am I ever using X? I don't have an X server on the notebook, so not there (and never needed it yet). On the desktop machine, I have to spawn Mozilla for some webpages - but much more rarely than you would say. (I usually went the ELinks-Links2-Mozilla path in the past but websites not working in ELinks didn't work in Links2 more often than not and since I got a faster machine this intermediate step really wasn't worth it anymore.)

Otherwise, long time ago (before I got a graphics card supporting framebuffer and VIDIX) I had to use X for movie playing movies, but CVIDIX is simply excellent so I don't need X for that anymore. X can be useful for debugging SDL applications (i.e. OpenTTD) - even though they run fine in framebuffer, it's difficult to gdb them there :-). And the only other thing I run X for is XMMS, since has a nice alarm plugin with fadein. I used to use mpg123 + <kbd>at</kbd> before, but this is more convenient; I could live without it, though. I also used XMMS for doing some transcripts lately. I patched mp3blaster's <kbd>splay</kbd> utility so that it does some seeking too, but it is not fine-grained enough for transcripts and I was just lazy to touch the patch ;-).

So, I live on the console and I'm happy. I don't mind using X when necessary, but it really isn't needed but very rarely. The writer of the original article wondered why an office suite isn't an itch for any console developers. I guess that if you are already "hardcore" enough to live exclusively on the console, you just won't need to do office stuff in office application, since you can usually mine the contents from the office formats and write own office-like documents in some markup. And regular users are scared of the console anyway. >:)

#

28 Jul 2004 (updated 28 Jul 2004 at 21:15 UTC) »

blm: Hi, I couldn't find your email at your homepage (which is apparently non-existant, looking too much default ;), so I hope you will read this through the recentlog or so. And this could be interesting for other people as well.

You say that noone wants you in their project, but that's not how most free software projects work (at least the bazaar-like ones, and I suggest you to prefer those especially when taking off). You do not ask people to let you join their team. You join it and integrate to it smoothly by sending patches. Most projects are based on meritocracy - your virtual "position" in the virtual team is based on your merit for the project. More you bring in, the more credit you get and the more people listen to you.

So, you do not look for projects with team willing to accept you. You look for projects which are exceptionally interesting for you, which give you some motivation for working on them (be it ideological, fascinating technically or scratching own itch).

From these, you choose those where you have clear idea what to contribute and of course you choose projects which aren't technically over your head, be it code complexity, insane coding style, being too low-level or the code is simply too big for you (it takes too long to update, compile or grep on your machine). But do not be too afraid; of course when you are newbie Perl coder you do not start by hacking Perl6 internals, but do not be afraid to peek into Mason. Remember, you get from the newbie level only by experience and hacking someone else's code is often much more valuable than coding something from scratch.

Actually, often the best way to start is to fix some easy bug. Do not get afraid by looking at the code. It could grin at you and make obscene remarks, but it can't harm you. It is laid on the canvas of your screen, waiting to be read, understood, grasped and touched by your fine coding hand. It is too big and takes too long to understand? Keep yourself focused.

First, be sure you skim over the documentation, both user and dev (if there is any). Then, you can look around briefly, but do not try to read everything, just try to see how is the code generally organized and how the grand scheme of things looks like; this step is optional. And then, do not look left, do not look right, look ahead and stay focused. Try to find the exact location of the code you will need to work on - grep the sources. Grep for the irritating error messages, grep for likely related keywords, patiently go through the results and identify the victim. Then look what causes it - be sure you at least generally grasp what the routine does (do not be afraid to look at the functions it calls, just do not descend too deep; grep - or better, use ctags), grep for the callers and work straightly towards the fix, not spending too much time on the non-involved code which is just distracting you. So, the synonym for getting oriented in the codebase and understanding the code is <kbd>grep</kbd>. You get used to grepping and the code holds no mystery to you.

So, you fix the bug (ok, we skipped a lot now, but that's already up to you; I told you to find something easy ;). Now you make the patch (google it if you don't know how to make a patch), the devs will prefer you to do that against the very latest version, preferrably from their CVS or SVN or whatever are they using; but usually, patch against the latest release will do too, if you are too afraid. So, you submit the patch and wait until it gets integrated. Do not be afraid to take the criticism; learn from it, absorb the conventions used by the project, be sure to look how they actually changed the patch before integrating it. Sometimes, the patch gets ignored; you either don't care and let it stay forever in the mailing list archives, googlable for anyone, or you care and push it; just do not push too hard, resent it once per week or so and eventually someone will at least tell you what's wrong. Again, absorb the criticism, adapt yourself and your patch. You don't like the way the project operates? First work your way up with the patches, you either see why is it good for the project or chagne it. Or, if you really think they are stupid, you care enough, your contribution is big, and the project is small, you can fork.

So, that's how it usually works. To sum it up - you choose the project which is exceptionally interesting for you and not over your head, and start by doing some simple patch. When understanding the codebase, grep is your best friend, and you focus only on the bit of codebase relevant to you. When submitting the patch, you learn from the criticism and do not get turned away by absence of a warm and enthusiastic response.

Minor update

I'm sorry that I didn't post any updates lately, but basically I had to do other things and started another massive time waste, and I started delaying next posts after this and that and the BlueCode release etc. Well, let's see.

BTW I got finally invited to Orkut few days ago, so it was another timesink for a while. It's amazing to see the social network emerging around you and see that you are just one or two nodes away from very interesting people. OTOH the communities I'm interested in are a little less... attuned to my carrier frequency ;-) (or rather vice versa).

So right now we agreed with thement and left IRC. For some time at least. Gotta do useful things, really. So, finished writing another sequel to my CVS series for root.cz, and now time for BlueCode.

#

The surprise is always there, even right near end of the journey

[Boring school part start (just skip it ;)]

So, on the last Real School Report (in this half-year; then, only the mature exam report will come to follow), I will have the first note of 4 in my life (on a school report, that is).

The Czech school notes system is that 1 is the best, 5 is the worst, and it scales variously between. I never did worse than 3 on the reports, and was pretty embarassed even of the 3s, back then ;-). But the last time I will get such an report, I will have one note of 4 there, for the first time.

It is from Biology and I pretty honestly believe that it's absurd. We were just having ONE written exam for the half-year, and whatever you get you have on the final report, which violates even a few rules of the school system (where it is said that you need to have at least two notes, preferrably three at the minimum). But we have the schoolmaster for Biology, so he can do whatever he wants, and it's tough when she's an... well. No comment.

In fact, I didn't really care anymore, I gave the corrected exam paper just a blank stare when I saw the note on it. It is not my profile subject (that is, anything which would really matter when getting onto the university) neither would it carry my reports average over any significant threshold. So who cares, when it's the last year? And I couldn't do really anything about it anyway, she said there's no way how to correct it. So why to worry at all?

Otherwise it wasn't too bad today, I was writing quite exhaustive and tiresome exam paper from Math (vectors and analytical geometry in plane and space). It wasn't hard, but full of really long and exhausting computations (and well, I didn't have a look at it at all so given that it is a revision from a year ago I already forgot few details, but the book of math tables we are allowed to used and which contains most of the useful formulas came to help). At the end of two hours marathon, I had just one sign in one part of a vector wrong, otherwise it looks like it's all ok, so I'm really happy I didn't make any more significant mistake in the whole thing.

[Boring school part end]

Besides, I was watching The Virgin Suicides (no, that is not any porn; and imdb is strange, I can't see how this could be a Comedy in any way), as someone recommended in his diary entry on Advogato (unfortunately I cannot remember who it was; if you read it, please tell me; we really need a way to do a full-text search over the diaries ;-). And it was really a great movie. Very emotional, and relieving in some strange sense. Quite sad but I would not say depressing, unlike some "sweeter" ones. I do not know how the director achieved this, but she did it really well! I think I "liked" (it sounds cynical in the context of the storyline but I mean it in the artistic sense; basically what touched me most) especially the start part, and then the ending from point when Lux was forced to burn her records and ending by what happenned when Lux left the visitors in house alone (carefully worded to include only minimal spoilers). I didn't pay much attention to the final party so I lost the story there a little, but I'm certainly going to watch this again anyway. Certainly a must-see.

Now I'm getting Eisenstein's Battleship Potemkin and then Citizen Kane, I really wonder how it will feel like. They say these are the very best movies at all, and I have no clue what to imagine under than, how will they look and flow like etc. So I'm looking forward for finally seeing them :-).

Otherwise some fixing of GTS scripts and I also really finished both seminary works today. Tommorow afternoon I will take them to the copy shop and by Friday I should have this whole thing finally sorted out. I hope I will get back to doing anything interesting on Friday, and it will be ELinks. Besides finally releasing 0.9.1, I also hope to get a peek at few ugly bugs together with Jonas, and I will write some simple TODO list for 1.0.0; Bugzilla is good for tracking bugs but I think it is too clumsy for a simple major features list which you could have all the time in front of you.

Thanks to Slashdot, I have read some Tog's articles about proper user interface design etc, and it inspired a whole chain of new ideas in me. I've dreamt about writing my own clone of FluxBox which would follow the guidelines presented there, and doing something with the terrible UI of GIMP (others who did some research said there's currently no project working on redoing GIMP's UI; on the other side even others said that the development branch of GIMP made a huge leap in this aspect; I'm sure someone informed on Advogato could follow up, please...?). Well, whatever, you know the dreams :-). I have so many dreams that I don't know what to do (I mean which to fulfill) first (regarding the software ones, of course).

I'm so lazy to properly hyperlink my diary entries, I'm sorry.

#

Overslept

First, as you can probably see (if it's all working as it should), I've improved the Advogato XML-RPC push a little. Now, the links etc should work fine, and you Advogato people can actually see the caption somehow.

I've overslept today. I woke up at 8:45, and I decided it makes no sense to go to the school anymore (only to P.E. and then one class of English). So I slept on to about 11:00 ;-). I usually attend the school relatively regularily (unless I'm sorta ill/sick), but it's getting worse with me by time.

Then, I released ELinks-0.9.1rc2, because the rc1 release was of course messed up (and besides, some interesting bugfixes appeared during the night). I got surprisingly negative feedback by some people about the compile-time configuration switch from ./configure arguments (except the very major stuff) to feature.h (sorta vim-like). So I opened a thread for it at the mailing list, we'll see how it turns out.

Looks like they've released Linux-2.6.1. I like Linus' jokes. I think the maintainership workload split with Andrew did him very good, at least judging subjectively. I think his mailing list activity raised by few hundred percents (minimally) and his writing seems more relaxed :-).

Otherwise, this was another lazy day. I got some new TODO items from the GTS people, I checked whether Ariadne is still working somehow (it is) and otherwise I was slowly working on BlueCode. It is already basically usable but some vital features are still missing for a public release.

I was looking forward for listening to \"Toulky ceskou minulosti\" in radio (it's very interesting broadcast about Czech history, I've became addicted to it), but they stopped broadcasting it at this time! (I'll have to tune in on Thursday afternoons, which sucks.) I was seriously annoyed and it disrupted me quite a lot. But coding is a very good cure for bad mood, from my experience.

<small>#</small>

Not much new today. I've glanced at the official solutions for the Math Olympics --- it's not looking exceptionally well, it is less similiar to what I wrote than I expected ;-). I was also watching a BBC document about weather (wind, in particular). It was quite interesting, I didn't know about the jet stream at all.

Otherwise, I was in M-Soft (computer shop / small ISP) doing another seminary for its workers (I'm sorta contracted so that I'm taking care of their security [more or less, well ;] and do various things they can't do themselves for them and I get free net [64kbps microwave] from them in exchange). It boiled down to ratelimiting Postfix, some SpamAssassin dances and then fixing Debian installation over there to upgrade their kernels (while the system there was still hand-hacked RedHat, it was running 2.2.25 and I didn't have to worry about things like mremap()! ;-).

Oh and of course I've released ELinks 0.9.1-rc1 today. I originally planned to just roll out 0.9.1, but when I saw the huge amount of changes from the last night and today, I decided to let people catch at least the most obvious mispasted-code bugs. Go ahead to test it if you want ;-). It will bring various bugfixes, progressbar in status, new compile-time configuration (the ./configure parameters were getting out of hand so now you tweak feature.h), support for saving and restoring a session etc. Jonas is already the main driving force, which is good. More power to him! ;-)

The problem with me is my love for surprises. I really like making (hopefully pleasant) surprises for people, and because people also read this weblog (what a brave assumption), I can't speak out freely even here. However that doesn't matter, from the large part writing a diary for me is important because of the reflection, and usually I write this stuff down anyway, then I realize I would be telling things I shouldn't, and delete it again ;-).

Sorry for lack of update yesterday, I was quite tired because of too little sleep and it's same today. So briefly about yesterday, basically I was attending the Czech Math Olympics - category P (Programming). It was the regional round, and there usually aren't too many people there from this region --- we've been six or seven at best. It's the Computer Science style, that is not those stupid \"Code silly mouse-clicking detecting gadget in half an hour\" practical exercices (I've been on few as well). You had just paper and you ought to describe your thoughts and write your program there. The tasks weren't easy.

Actually, one thing I really hate is writing computer programs (in C or Pascal or another computer language) on paper. It just seems really stupid. They are here to program computers, therefore they should be written into computer. On the other side, they were mostly really just suplementary to the algorithm description, which was the main challenge.

The last year, I thought I did it rather well. Then my best rank was IIRC five of ten points in one task or so. Thus I'm better quite sceptical this time, but I still believe I did better than the last year. I certainly didn't reach the most optimal solutions in all tasks (at least in two I know I'm being suboptimal), but they all should work. Let's see. It's quite important because if you're good enough to progress to the national round, you're also automatically enrolled to MFF of CUNI CZ. That's really tempting and a good motivation. Maybe I'll describe some of the problems from the regional round later if I'll be in mood and have enough time.

Ihaquer confirmed my 2.2 theories, it is indeed not vulnerable.

We've been celebrating the Orthodox Christmas this night.

I'm currently mostly working on BlueCode, chattering on IRC, reviewing few ELinks patches (and I implemented some really simple quick'n'dirty <object> tag support) and now I should be sleeping. Tommorow I'm gonna visit my beloved school again.

I should implement paging of my weblog page (it's already over 100kb), and I should maybe insert some small automagic footer to the XML-RPC message sent to Advogato that my real weblog is elsewhere and only selected entries are cc'd to there (or here, depending on your POV ;). But I'll do that after I will actually sometimes submit some non-technical entry which would have nothing to do on Advogato.

Now I should yet have a look at the History stuff we're supposed to take an exam from tommorow. Bah. (Roughly) 1400 --- 1620. That's gonna be fun. And I should finish the missing bits of my seminary works. I'm translating one piece from Douglas Hofstadter's GEB: EGB in my seminary work for English (I must add some one-page introduction and closing for the translation); I'll be writing about that marvelous book in some other entry surely. The other work is to Math, I'm doing some general overview of Fibonacci (and related) numbers there. It's really just browsing the net looking for interesting stuff. But now I'll be doing only some practical applications (it's easy to talk about various occurences in nature, then some applications in art etc) and a little bit of history (Bonacci, Lucas, ...).

Woohoo, I've actually finally added at least some workaround to always reconnect to the db, this should temporarily fix my weblog page being blank besides the caption most of the time ;-).

Okay, I've planned to do various great stuff today. Well, regarding that, nothing came out of it (as usual). Oh well, I've wrote one paragraph for my article. Otherwise, well, I'm not exactly sure what have I been doing, I can remember some more ELinks reviewing, and some IRC idling.

Then, I've noticed that Linux-2.4.24 came out (fixing the mremap() vulnerability), so I had at least some fun for the evening. First, I was hunting for the vulnerability in 2.2 tree, as it was suggested by the advisory. However, when trying to backport the 2.4 fix (not Linus' 2.6 one, which is quite general and potentially having some side-impacts, so I'm afraid to port it to 2.2), I've found that sys_mremap() in 2.2 is missing that concerned code at all.

Basically, (supposedly) the exploit relies on ability to pass newaddr to mremap(), but in 2.2 mremap() doesn't take it yet. So the only alternative to exploit that is to have the new address automatically assigned by mremap() (and the new address would need to be \"dangerous\" one). However, that's impossible because new size of mremap() must be zero for the exploit and in that case, mremap() would always just munmap() it. Possibilities:

  • There is something I don't know about.
  • The advisory is mistaken and the 2.2 line is NOT vulnerable.
  • If it is vulnerable and I'm not even more misleaded, the 2.4 fix is not complete.

Anyway, mremap() looks dirty, maybe some other vulnerabilities will be discovered in it soon, some people say they are on a track of something. Quite possibly nothing will come up from it, though.

Then I was cleaning up the Kernel's homepage. Basically enhancing w3c compatibility and tidying it up a little. Now I'll just sit and watch how hpa rejects or drops my patches ;-).

And last I was talking with Dave Weinehall, and he said that he'll make 2.0.40-rc7 available later this week (-rc6 is from May 2002) if everything will go well. Great to see 2.0 still maintained.

And I'll be sleeping for only 6 hours again. Screw it.

You know, I committed myself to so many great things today. I slept very little last night so I promised to go sleep early (between 11pm and midnight, hah!) today, I'm going at school tommorow again, after two weeks of Christmas holiday (I'll write some more about last-year school pains in some other entry). And I thought I'll be reviewing some more ELinks commits (well I did but far less than I expected) and be fixing some ELinks glitches (well I did but far less than I expected). And I wanted to do some more BlueCode work (will be worthy mentioning only if I get back to it and then you'll read about it for sure in another entry as well), I did none. At least I finally fixed all the GTS bugs I knew about.

Pah, this CIA thing is indeed pretty time-consuming. But I'm finished with it, I'll just fix bugs in my ciabot.pl CVS CIA client from now on! And I also did some hacking on my own CVS commits-over-mail announcer (which I consider the best one available by now [I'll be happy to be presented by some better one so that I can catch up ;], except that it doesn't support CCMAIL and CVS_SILENT [yet]).

My current plan is pretty clear. First BlueCode, then PaVS (how I'm looking forward for that). That mixed with random writing articles for root.cz (high-priority) and leading ELinks to 1.0 (lower-priority). And that intervowen by doing stuff to earn some money, of course (that is GTS hacking for now). Bah. Well, yes. There's the school as well ;-).

3 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!