Search Results: "aigarius"

6 March 2006

Aigars Mahinovs: Food rhythm

Today I was chatting with my friends (Coced and Livespirit), we were discussing effective use of time when I was describing my food preparation habits. Coced started describing his daily morning routine as an example of time-effective food consumption routine. Then we decided to blog our food rhythms and crosslink those posts. So here goes my daily rhythm:
  • Wake up (I am trying to start waking up at a fixed time lately, but I will blog about that another time)
  • Open the notebook, check email
  • Fill an electric teapot with water, put it to boil
  • Wash the mug
  • Go to the bathroom for the morning bathroom routine
  • Put tea leaves, 3 teaspoons of sugar and boiling water into the mug, stir
  • Make sandwiches from white bread (possibly sweet white bread with raisins), "Rama" margarine +sausage or cheese. Adding mayonnaise if I feel particularly hungry.
  • Make the bed
  • Sit down with the laptop and the tea continuing working and drinking tea
  • Every hour Gnome's "Take a break" timer goes off and I enter a "Break" subroutine:
    • Get up
    • Put water to boil
    • Wash the mug
    • Put tea leaves and sugar in the mug
    • Go to the bathroom
    • Do stretching or rhythm exercises for at least one song (depending on the mood and songs rhythm)
    • Put boiling water into the mug
    • Stir
    • Return to work and continue to drink the tea in small sips during the next hour
  • Once a day I prepare a major meal. And I really do mean Major meal. I had to buy a special 40cm plate so that I could place all my food on it without worrying of it spilling over the side.
  • Continue with a mug of tea per hour for the rest of the day. Most days I drink around 2 liters of tea.
I have stabilized my main meal to one of few dishes that I know how to prepare in a safe, nourishing and good tasting manner. I think that I will post some of my recipes with very detailed step by step instructions and pictures, so that everyone could see how simple my cooking really is and also suggest something to extend my daily meal routine. Oh and you might also get something interesting out of it too. :) Crosslinks: coced's morning (Russian)

Aigars Mahinovs: DPL platform runthrough 2: Missing man

Following up on my own review of the DPL platforms I give the review of the latecomer - the platform of Andreas Schuldei:
Andreas Schuldei
  • abstract and TOC present - feels a bit more professional
  • purpose-drive and predictable, with the purpose being having fun - sound much more balanced then some other approaches, hopefully not "Fair and Balanced"
  • "experience in implementing change in volunteer driven scenarios" - very precise definition of what we need
  • flashback to last years platform - looks like some progress is done, but most of it is still relevant
  • real-life meetings - Yes!
  • small teams - isn't that just splitting Debian up into small, easier to manage chunks?
  • more friendly environment - Teletuby alert?! Or should we just redirect all flamewars to the Sauna Cabal?
  • accept more leadership - good
  • more frequent and regular releases - please stop beating that horse. It is a fossil already. Does it really do as good as a project to have a release every year? Where is the stability in that?
  • care more - we can't care less, can we?
  • more resources - please elaborate, what do you mean by resources here? Global network of Debian approved anti-flamewar saunas?
  • DPL Team - isn't that just another name for nontransparent cabal running Debian instead of a single nontransparent individual?
  • set goals within teams to become purpose-driven - sounds good on the first glance, but would that not lead to segregation of purposes?
  • DPL milestones - timeout callback for a DPL. Might help to have a reason to report even if nothing is done, just to convey that information based on set deadlines. On the other hand that is extra "paper"work
  • "Important and/or controversial decisions are made in discussion with the whole team." - this seems to lack a critical part: "decisions are made by the DPL", because falling back to "our team decided" is just a lack of leadership and promotion of birocratcy and lack of responsibility.
Five word summary: purpose, RL meetings, team, schedules, resources It looks very thought out, but is it just me or is it also becoming very birocratic? Note: the promised interview is coming up tomorrow.

5 March 2006

Aigars Mahinovs: Top 10 libre timewaisters from Debian

This Saturday we had an installfest in LAKA with a topic of free games. It came to me to make my own top 10 of free Linux time wasting games that are packaged for Debian. Here we have the list for future reference: Honorable mention - Battle for Wesnoth: a turn based strategy game with a lot of scenarios for single player and also with multiplayer support.
  1. Enigma - A fine puzzle of precision ball moving around large and complex landscapes with a lot of different of tools and quirks
  1. Bygfoot - A football team manager with a lot of nice extra tools like transfers, injuries, salaries, sponsorship deals and a nice comentary for the games themselves. I only would love to see some kind of an online mode either in runtime mode or in turn-per-day mode.
  1. Blob wars - Funny and bloody as hell. Think Rambo as a bruised blob shooting other blobs and rescuing another blobs. Got a lot of laughs during the presentation.
  1. Pingus - Lemmings clone just with penguins. Nice graphics and control. Looks like there is a lot of levels too. Wonderful intro.
  1. LiquidWar - A very addictive and abstract game of liquid domination. Nothing much to explain - just play it with your friends or against a bunch of AI players.
  1. Tecnoballz - Arcanoid on steroids ... x4 ... with a shop ... and bosses ... and ballz ... lots of ballz. Must see.
  1. Scorched3D - The best 3D graphics I have ever seen for a free software project. Same old addictive blowing stuff up with nukes that we all love since Scorched Earth and Worms. Gameplay is better then the latest Worms. Great multiplayer fun. I only with the camera would be more intelligent.
  1. Frozen Bubble - instant classic of free software gaming. Wit and precision required. Fun supplied.
  1. Neverball - Great graphics. Wacky gameplay. Tilt the world with your mouse. Do not fall off. Try the harder levels for even more fun.
  1. Powermanga - Just plain fly and shoot. With powerups. Lots of powerups. Especially note the last powerup that upgrades your ship to a new model which has new weapons to upgrade. Waves and waves of enemies with an occasional big boss. Sadly no multiplayer.
Note: sometime later this week I will also add screenshots to the list.

4 March 2006

Aigars Mahinovs: Revisiting the summer

I recently uploaded these photos to a gratis stock photo site - MorqueFile for other people to use and that brought back all the good and warm memories of Debconf5 back again. So, enjoy the pictures, feel the summer, remember all the people that do not appear in these photos at all: http://static.flickr.com/56/107776270_7fc07e5dd8_t.jpg http://static.flickr.com/50/107776269_b04ad41adf_t.jpg http://static.flickr.com/40/107776267_5d68a95869_t.jpg http://static.flickr.com/46/107776265_c5b80b9a09_t.jpg http://static.flickr.com/46/107776264_fcd2cbb416_t.jpg P.S. Yes, MorqueFile people do know that their licenses are stupid, but they do not care enough to go to all the trouble of changing that.

Aigars Mahinovs: Just when you think you're done ...

Just a day after I announced my new blog, the server hosting it went off-line. The funny thing is - it was because of an upgrade. As it turns out after I updated Debian sid on the server, a new version of udev was installed. A version that did not work anymore with kernels << 2.6.12 and surely the kernel I had there was 2.6.11. I mean, what the hell is that? Why would you drop support for kernels that are only 4 version old??? Could you not just have a copy of the old code around and call that if the kernel is old? Anyway it appears that it was the udev that was tasked with loading the drivers for my servers network card and as the server was rebooted (power problems) it would not bring its network back up. I only today managed to get to that server and find out what the problem was. Oh and I also noticed that LVM packages are also just to be broken - apparently new packages will only work with kernel >> 2.6.14 . Just wonderful!

2 March 2006

MJ Ray: Other Views of the DPL 06 Platforms

  • Julien Blache gives crap reasons for a good conclusion, in my opinion. I'd like to see a list code adopted because debian is not a socially-consistent group, but they should be minimal standards that accept debian is not a monoculture, rather than a charter for cloneliness. FWIW, I don't like Ubuntu - but I have no strong opinion about it at the time of writing - and I agree about the inconsistent behaviour of some who want codes of conduct and expulsions for offensive emails: review the notorious August 2005 -private discussion and see who sent the most personally-insulting posts. That said, I don't understand the "raise your voice" call. Where was Julien Blache in the list discussions about social topics?
  • Aigars Mahinovs quotes a post from 2 years ago. How far back do you want to go? Best hope I never stand for DPL, as some stuff I posted in 1994 was really bad. Give him some rope and see if he hangs himself this year: yep, he already has, IMO.

28 February 2006

Aigars Mahinovs: Jonathan backslash

After last post I received a bunch of feedback both via (buggy) comment system and via email. People wondered about my support of Jonathan and pointed out some posts by him, like http://lists.debian.org/debian-women/2004/07/msg00217.html. That in my opinion is the type of post that the DPL should be acting harshly against. Personally. On a case-to-case basis. Just to be clear - my evaluation of the platforms did not take in account anything that candidates did do in their past as I somehow felt that it was not really relevant. I was just as wrong as most of USA voters in the last two presidential elections who only trusted information from their candidate. On one hand it shows the impression Jonathan's platform left on me when I approached it without prejudice, but on the other hand we clearly do not want developers to make a quick judgment only basing on candidates platform statement, do we? So, to redeem myself I decided to simply do a research on the past actions and statements of the current candidates and post that research on the blog too. I was also planning to post my opinion on the other pre-election activities the candidates will be involved in. That now becomes increasingly important so that at least I make an informed decision in the end and hopefully help some other people come to their own conclusions in the process. Note: to prevent unfair judgement based on year old data I have arranged with Jonathan for an interview/discussion where he will be able to express his opionion and I will be able to ask him some grilling questions so that we get to really understand what is his position now. The result will be posted in this very blog. If you have something you would like Jonathan to answer for, send me a message.

Aigars Mahinovs: Migration finished

Hello again dear Debian Planet! I have a surprise for you. While you were not watching I made myself a brand new shining blog using the fine Mnemosyne software. It is a blog written in Python that uses Kid templates and a lot of wonderful pythonic magic (for uninitiated) that generates a set of XML compliant static files. I added support for comments, tag cloud and some other dynamic features using the magic of AJAX. The feed for the planet is tweaked to only display things that have not been posted to the old blog, so this is no flood - it is only the new posts (and one old one for completeness). I especially hope the DPL platform comparison will get some feedback.

Aigars Mahinovs: DPL platform runthrough

I think more people should just publish their thoughts about platforms of our DPL candidates so that we can have more visibility and insight (and a reason to actually read those platform statements). Thanks go to MJRay for the idea, however I will try to be a bit more biased so that this post conveys more of my opinions then just a plain summary of the platforms.
Jeroen van Wolffelaar
  • ftp-team for a year, looks good
  • dpl-team as a good idea, wants team decisions to take less responsibility on his own. Might be wise, but could be un-leaderish.
  • pushes for smooth communication, I am not sure how that will work out - smooth communication means sanding off the edges, but we all know that the best development is always on the edge.
  • pushes for code of conduct. While the idea might be quite popular it also states that bad behavior in our community is becoming so widespread that a special code is needed to compensate for that. I do not feel that we are at such a bad state now - more flamewars are raised about the code of conduct then about the conduct itself. I feel this is were simple and decisive action by the DPL should be done and not a birocratic procedure to spread the blame of failure.
  • "insider reports" - good idea, like an internal Debian News Station (see Howard 100 News)
  • encouraging wiki, forums and IRC as official channels of external communication. Several questions arise here: as a user with specific question - where must I go? to which media? to which list, channel or forum category? It must not be too complex. Also there is the question of spreading knowledgeable users and developers too thin across multiple channels of voluntary support.
  • infrastructure transparency - good, but how? even tiny bits of paperwork there can slow the whole project to a crawl.
  • mediator in flamewar situations - good, DPL should be doing that.
  • media coverage - does Debian need more media coverage? I do not think so. I do believe that we need more coverage in more professional circles (even if in circles of professional psychiatrists) to attract more developers and make them understand us better, but I do not feel that attracting huge crowds of general public would do much good for the project.
  • in my opinion team players make mediocre leaders
Five word summary: transparent, wide, smooth, mediative, consensus
Ari Pollak
  • whoa ... pictures, so sweet :)
  • humor, so much needed in our project
  • good point about half-DPL - it would be nice to have DPL delegate as much as they possibly can but be strict and easy with what is left
  • Debian Police - sounds like a good substitute for Project Scud and the Finnish Inquisition :D
  • good take on licences, however I would add to the Gnocchi licence the phrase "And you must remove any copies of this licence from your memory as soon as you have finished reading it." That will show them lawyers ...
Five word summary: humor, half-*, police, anti-legalese, illustrations
Steve McIntyre
  • got in cheap, but a long time ago
  • The CD dude!
  • not much new on internal communication, same old "will tell you even that I not doing anything"
  • same stuff about the code of conduct, see above.
  • social skill test within NM. Good idea, but not a good implementation - you will not get much social conditioning with mentoring inside teams. We need someone to get on the candidate and roast them good - test their asbestos suits. After he has made a package, schedule for time and either call the newbie or IRC with him. Grill him about his package. Must sure to slide into personal insults, religion bashing and political discourses. Watch the response. Evaluate. Post audio online :)
  • open cabalish developments - there is little to be done beyond talking to cabal and making sure all semi-private developments use public Debian infrastructure for communication - draft on wiki and develop in svn, so that everyone can see.
  • very good points about professionalism. we must be able to be proud about Debian and demand some level of standards from packages inside Debian. The idea of regular DD reexamination might be a very good fit here, see below.
  • Steve looks like a good organizer to me
  • however he might be a bit too soft on leadership or simply too diplomatically inclined in his platform statement
Five word summary: professionalism, standards, MIA, tests, communication
Anthony Towns
  • not wanting to win too much
  • speed up! - release early, release often. Sounds good for the everyday processes, but not for The Release. I still want to see Debian as The Most Stable thing ever.
  • recruiting - I would ask, recruit for what? People can not just get into the interesting parts of the project and recruiting for general run of the mill development does not sound too engaging to me. You'd better make a contest for new security team members or new ftp masters or any other position that one person or only a few persons hold now. Have clear requirements and tests and actually get those people into doing those critical jobs. After that we can think about ...
  • ... compulsory turnover. Now there is a good idea that I'd like other DPLs to consider, but only with in conjunction with the previous one. We might not need full rotation, but we could have a rotating ftp team leader post that would iterate among ftp team members. That would alleviate the "hit by a bus" problem a bit more.
  • DPL as a discussion and direction leader is quite a nice and needed idea in my opinion.
  • I do not agree with aj about compulsory kindness and the general idea of expulsion on social grounds. Currently it creates more problems then it could solve in a lifetime.
  • Congrats on declassification thing, historians will surely thank us for that.
  • nice legal disclaimer, I like those kind of things :)
Five word summary: continuity, tempo, newbies, direction, bling
Andreas Schuldei Not online, to be put here when it appears.
Jonathan (Ted) Walther
  • photo, nice touch.
  • speak your mind. sound essential to a DPL.
  • Ubuntu good. Good.
  • Make love (and code) and not Desktop. Let Ubuntu make Desktop if they want to.
  • We all are strange people, face it.
  • Kicking people out is more harm to the project then those people could ever do.
  • Kicking fun out of Debian.
  • Great points about improving NM process and worshiping James Troup - I fully agree.
  • The best idea here - recertification of all Debian Developers every X years (where X is proposed to be 3 currently). This will almost automatically solve many problems we have in Debian: NM frustration, MIA developers, standards of professionalism, reiteration of best practices, social reshuffling.
Five word summary: Here, goes, my, vote, period. Alternate summary: geek, love, tolerate, recertification, statue.
Bill Allombert
  • math Ph.D. and researcher.
  • wanted to vot for Lars, but as he stepped down saw no one else good enough, so put himself forward. brave words. I like Lars too, bet it's not like we do not have good candidates this year besides him.
  • summary on effect of voluntarism and respectful communication. Quite plain if you ask me. Got me a bit bored there. Not a good sign.
  • think globally
  • assist others
  • help Debian specific software
  • observers - sounds like that Debian Action News Team minus all the fun.
  • "I am very patient" - be patient when reading and enthusiastic while writing, otherwise people might not read patiently
Five word summary: filler, communicate, more filler, patience I hope this summary gave someone as much food for thought as it did for me. My favorite is very clear, but can you guess who is my second choice? Leave a comment and let me know what you think :)

Aigars Mahinovs: 60 rants

To get my blogging up to a more regular schedule and also give you something to read that everyone could relate to, I decided to start regular commenting on the latest in 60 minutes
Stem Cells http://www.cbsnews.com/stories/2006/02/23/60minutes/main1341635.shtml I must say that I have not been following the stem cell research closely enough in last couple of years and I am very amazed that we can now actually tell a stem cell to develop into a particular type of cell. The sight of a bunch of cells grown into a slab of heart tissue was especially fascinating. First of all there are at least two problems that I see with the research as it was shown in the program: they are not using cells from the patient, they are simply injecting the cells "in the general direction of the problem". The first is probably a problem caused by politics - in a perfect world we would take a cell sample from a patient, take nuclei of those cell, put them in place of the nuclei of the stem cells and we would basically have cloned stem cells of the same patient that we plan to be treating. There would be no problem with nonacceptance of donor organs or confusion of living with another persons DNA inside your cells. Politics block those developments. The second problem is mostly the simple immaturity of the field of research and microsurgery in general - it is still very hard for us to grow a full slab of heart and surgically replace damaged tissue with it. There are pros and cons to that approach too. Injections do have lower level of post operational risks in the area of effect - there are no tissue scars to worry about. However, having heart tissue flowing in the blood stream does seem quite risky in that it could have unforeseen consequences in other parts of the body. For better or worse. However, even taking in consideration all that problems (that the scientists of the field) surely do know about very well, it is just plain ridiculously stupid how much the religious right in general and that incompetent president of theirs is grinding all the research to a halt. And do not tell me about that last weeks of him touring bio-diesel facilities, I will come to that too. In short - go California, but I would rather see Bush just getting his marbles together and banning stem cell research in USA altogether, so that all those scientists can come to us, to EU and other places with more reasonable legal systems, because otherwise it seems that they are just asking for trouble there. Trouble that will slow the research to half of its possible speed for next 10 years or so.
Port security http://www.cbsnews.com/stories/2006/02/24/60minutes/main1344473.shtml I can only say one thing about security and USA - 90% of the USA security forces only work to ensure that people feel secured: that they see the police, that they are searched regularly enough, that they are stopped from time to time to answer some questions, that they are being "protected" on the Internet (read: being spied upon), that they are feeling harassed enough to feel safe. If the regular people are harassed enough they will never forget that the police is there and they will assume that the real criminals get harassed even more. That instills both content and fear: content for being protected and fear because there is clearly something to be protected from. After four and a half years of this treatment people are becoming very cattle-like, i.e. easy to govern. And in the same time the real experts can easily see that for real terrorists all those protection measures are completely irrelevant - real terrorists do not try to hijack planes with matches or nail clippers. Real terrorists have people inside, good supplies of profession equipment and have all the information that your government will not tell you "for security reasons". Cocaine is being smuggled into USA by tons. If put a nuke or two into that stream with enough "green" wrapping, no one will notice anything. Anyone having enough resources to buy a suitcase nuke will have enough resources to get it into USA even if you implement the strictest police state measures the likes of which have not been seen before. Even if you mandate all citizens to implant RFID chips that could be used to track their location from satellite and shoot on (satellite) sight anyone without such chip, there will still be ways to nuke any place in USA if there were any motivation. Clearly there is none. This again show that only thing that are considered "ok to be debated upon" are being raised in USA nowadays - there has been more debate about that duck hunt incident then about millions of Americans being spied on by their own government. That says much about any country. I want to bring just one quote from this segment - "It is impossible to do proper inspections of everything without basically stopping all international commerce".
Montana coal diesel http://www.cbsnews.com/stories/2006/02/24/60minutes/main1343604.shtml The idea of making diesel from coal is new to me, but it really is just an old, forgotten technology put into action by Nazi Germany at one point. The idea is a nice plan in the local perspective (cheap gas, lots of jobs, ...) but from a global perspective that is a very dangerous idea. Anything that prolongs the inevitable transition to pure hydrogen economy is. I think that only thing that has a big future is pure electric power with storage in some kind of metallic hydride. You see, I am worried about global warming quite a lot. And burning any kind of fossil fuel bring carbon that has been laying in the ground for millions of years and throw it back into the atmosphere in the form of carbon dioxide (CO 2). That both speeds up global warming and reduces the amount of oxygen that we have left for breathing. Does look bleak in the long term perspective, doesn't it? Yes, digging up coal in your backyard is better then fighting wars halfway across the globe for oil, but not too much.
Dogs This week Andy was talking about dog shows. Not for me that kind of thing - I like cats much more. And not those lazy show cats, I like simple cats that must rely on their smart to survive (at least be calling their owner to feed them when they are hungry :)). So here we have the end of my first coverage of 60 minutes. Lets hope that it is not the last and lets also hope that you foud at least something here to be of a value to you. As always, feel free to comment on what could be done to improve all this.

Aigars Mahinovs: Mother's birthday photos

This post gives links to photos from my mothers 60th birthday. Please contact before using these photos anywhere. T nu radinieki, draugi un m tes darba kol i - visas izn ku s manis uz emt s fotogr fijas no manas m tes (Rasmas Mahinovas) 60t s dzim anas dienas svine anas var dab t eit: Abos arh vos bildes ir pil gi vien das, at ir s tikai kvalit te, jeb izm rs. Kop tur ir 267 fotogr fijas (katr arh v ). Ja ir vajadz ba dab t bildes v l liel k izm r , tad l dzu sazinieties ar mani pa tie o.

Aigars Mahinovs: Testing blogging from GMail

This particular post is being written from GMail, transfered to my blog server by email, processed by some massage scripts and then integrated into my blog without me doing much about it. Neat ne?
P rb d u ar r t Latvie u valod . , , .
This concludes language testing. :)

Aigars Mahinovs: Migrating from Blogger to your own Mnemosyne blog

As I decided to migrate my blog from blogger.com to my own blogging software on my own domain, I did not want to leave my old posts behind. As I had more then 150 of them, I had to do some automation to do that within my lifetime. The first step is to get the data from Blogger.com database to somewhere where you can access it in full. You will need FTP or SFTP access to a computer with a real IP address. The idea is to go to blogger.com and specifiy that you want to switch storage of your blog pages from their blogspot.com service to your of FTP or SFTP server. You will have to provide server address, URL, folder, username and password. URL does not matter at this point, but other parameters define where your data will be dumped to. Save the changes and republish the blog. After a few dozens of minutes all your data will be at your server in a set of complete html files. Now we need something that will parse those html files and write out something that your blogging software can understand. As I use Mnemosyne, my format is a set of mail message files. To allow me to use HTML formatted messages in my blog (and not only reST) I added this to my config.py:
class EntryMixin:
   def _init_content(self):
       """Read in the message's body, strip any signature, and format using
       reStructedText unless X-Format=='html'."""
       s = self.msg.get_payload(decode=True)
       if not s: return ''
       try: s = s[:s.rindex('-- \n')]
       except ValueError: pass
       body=False
       try:
               if self.msg['X-Format'] == "html":
                       body = s.replace("&nbsp;", " ")
                       body = re.sub(r'&(?!\w 1,10 ;)',r'&amp;',body)
                       body = xml.dom.minidom.parseString("<div>"+body+"</div>").toxml()
       except KeyError:
               pass
       except xml.parsers.expat.ExpatError, e:
               print "W: Parse failed for "+self.msg['Subject']+" at "+self.msg['Date']+" from "+str(int(time.mktime(time.strptime(self.msg["Date"],"%a %b %d %H:%M:%S %Y"))))
               print xml.parsers.expat.ErrorString(e.code), e.lineno, e.offset
       if not body:
               parts = docutils.core.publish_parts(s, writer_name='html')
               body = parts['body']
       self.cache('content', body)
       return body
This will try to parse messages as pure xHTML if custom header "X-Format" is set to "html" in the blog entry. There is one problem with this approach - xHTML must be valid, otherwise XML parser in Kid templating engine will fail and there will be no end of trouble. That is why even in HTML mode we reparse the body to XML and back to string again. If we get a parsing error at that point, we fall back to reST parser. Now we need something that will analyse our Blogger.com generated HTML files and get our content from there. Here is the script that I used:
#!/usr/bin/python
import os, os.path, time, sys, glob, re, xml.dom.minidom
id = 1
host = "old"
mdate = re.compile( r'\">(\d+) (\D+) (\d+)<' )
mbody = re.compile( r'</div>(.+)<div style=' )
mfooter = re.compile( r'<a href=\"http://example.com/(.+)\" title=\"permanent link\">(\d+):(\d+)</a></em>' )
files = glob.glob("old/*/*/*.html")
for file in files:
       year = 0
       month = 0
       day = 0
       hour = 0
       minute = 0
       subject = ""
       oldurl = ""
       body = ""
       date = ""
       title = ""
       footer = ""
       f = open( file, "r" )
       status = 0
       for l in f:
               if status == 0:
                       if l.find('class="date-header"')>0:
                               date = l
                               status = 1
               elif status == 1:
                       if l.find('class="post-title"')>0:
                               status = 2
                       if l.find('class="post-body"')>0:
                               status = 4
               elif status == 2:
                       if len(l.strip()) > 0:
                               title = l
                               status = 3
               elif status == 3:
                       if l.find('class="post-body"')>0:
                               status = 4
               elif status == 4:
                       if len(l.strip()) > 5:
                               body += l
                       if l.find('padding-bottom: 0.25em;')>0:
                               status = 5
               elif status == 5:
                       if l.find('posted by ')>0:
                               footer = l
                               break
       f.close()
       rdate = mdate.search( date )
       rbody = mbody.search( body )
       rfooter = mfooter.search( footer )
       year = rdate.groups()[2].strip()
       month = rdate.groups()[1].strip()
       day = rdate.groups()[0].strip()
       subject = title.strip()
       body = rbody.groups()[0]
       body = "<p>"+body+" </p>"
       body = re.sub(r'<img([^>]*?[^/])>',r'<img\1/>',body)
       if subject == "":
               subject = re.sub(r'<br.*?>','\n', body)
               subject = re.sub(r'</p.*?>','\n', subject)
               subject = re.sub(r'<.*?>','', subject)
               subject = subject.strip()
               line = subject.find('\n')
               if line > 45:
                       subject = subject[:40]+"..."
               else:
                       subject = subject[:line]
       oldurl = "http://oldblog.blogspot.com/"+rfooter.groups()[0].strip()
       hour = rfooter.groups()[1].strip()
       minute = rfooter.groups()[2].strip()
       mtime = time.mktime(time.strptime(day+" "+month+" "+year+"  "+hour+":"+minute, "%d %B %Y %H:%M"))
       outname = str(int(mtime))
       while os.path.exists( outname+"."+str(id)+"."+host ):
               id += 1
       outname = outname+"."+str(id)+"."+host
       out = open( "entries/new/"+outname, "w" )
       out.write("Date: "+time.ctime(mtime))
       out.write("\nSubject: "+subject)
       out.write("\nX-URL: "+oldurl)
       out.write("\nX-Tags: untagged")
       out.write("\nX-Format: html")
       out.write("\n\n")
       out.write(body)
       out.close()
Here I parse the HTML files using a simple state automata and then assemble all the data that we need to have, like timestamp in filename and Date field. In this script it is assumed that in the current directory there is "old/" directory with subdirectories like "2005", "2006", ... which have subdirectories for months in which there are xHTML files for individual posts. The output is written to "entries/new/$timestamp.$id.$host" files. After running this script and then running mnemosyne you will see a bunch of messages about failed parsing of some messages. That shows you where your xHTML is not valid. The usual problems are html entities ( like &euro; ) that the parser does not recognise and lack of closure on img or br tags:
This will fail because of &euro;
<img src="smile.png"> will fail, it must be <img src"smile.png"/>
My import script fixes img and br tags, but for other problems there is not much choice but going trough the entries and fixing them up manually. Also later on, if you will want to paste some custom HTML into your post, you will have to mark the whole post as HTML mode post and also check if you pasted HTML is valid XML manually. There are some other fun things in this blog, but I will go into that in later posts.

Aigars Mahinovs: The hockey fever has begun

With the opening of Turin Olympic games, the sport fever is officially on. Especially it is the fact in Latvia - this year is the ultimate hockey year: our team is in the Olympics and we have the world championship in our capital Riga in a couple months.



Tomorrow we have a chance at medals in biathlon and luge. I had no idea our guys were actually in top 5 there. That will be fun to watch tomorrow.



And on Wednesday the heat will be on: hockey, Latvia vs USA. We would have beaten USA to pulp at last years world championships if the judge would not have illegally rejected two goals shot by our team and given a large number of unfair penalties to our players. Even the coach of the USA team made a point after the game of saying that the judging was inadequate. However the real point is - we will crush you this time.



PS. I just found out that the championship is planned at the same time as the Debconf 6 in Mexico. NOOOOOOO!!!! This is the worst news - I'll miss all the fun. Crap. Really. Crap. I hope there will be some kind of coverage in Mexico.

10 February 2006

Aigars Mahinovs: The hockey fever has begun

With the opening of Turin Olympic games, the sport fever is officially on. Especially it is the fact in Latvia - this year is the ultimate hockey year: our team is in the Olympics and we have the world championship in our capital Riga in a couple months.

Tomorrow we have a chance at medals in biathlon and luge. I had no idea our guys were actually in top 5 there. That will be fun to watch tomorrow.

And on Wednesday the heat will be on: hockey, Latvia vs USA. We would have beaten USA to pulp at last years world championships if the judge would not have illegally rejected two goals shot by our team and given a large number of unfair penalties to our players. Even the coach of the USA team made a point after the game of saying that the judging was inadequate. However the real point is - we will crush you this time.

PS. I just found out that the championship is planned at the same time as the Debconf 6 in Mexico. NOOOOOOO!!!! This is the worst news - I'll miss all the fun. Crap. Really. Crap. I hope there will be some kind of coverage in Mexico.

9 February 2006

Aigars Mahinovs: Firefox backing up. A bug is bugging me up, but it...

Firefox backing up.
A bug is bugging me up, but it is unclear to me what is the cause, so no reporting or fixing is yet in sight - whenever I scroll up in Firefox using the mouse scroller there is ~10% chance that the "back" action will be executed. It has happened to me a lot of times now, and I haven't noticed similar symptoms in other programs.
Ubuntu Dapper, FF 1.5, USB mouse, HP nx6110 notebook. Any advise from the lazyweb?

8 February 2006

Aigars Mahinovs: Superball/bowl. So ... I tried to understand what ...

Superball/bowl.
So ... I tried to understand what this american football thing is all about. What got me interested in it was an anime from Japan called Eyeshield 21 where a boy that ran errants for bullies his whole school life goes into american football as a runner with his great speed and agility. That get me thinking about looking into that sport - it looked quite interesting in the anime.
Boy was I wrong.
So I watched the Superbowl XL - the biggest and most important event in the american football year. The first half was absolutely empty - nothing happened at all. The ads were much more interesting then the game. The halftime show was ok, not as good as ads.
And the second half just showed why this is the definitive american sport in the worst meaning of that - legalese. Steelers would have lost it the judges would have not interfered so much with the game. This sport has like hundreds of tiny rules that are very dependent on interpretation by the judges - that is what I call a sport for all the american lawyers to like. Cancelling several good Seahawks trows just because some guy was holding someone on the other part of the field, that must be givin an ecstasy for every law student. Not for me though.
And even without all that dilation with ridiculous rules (what's that stupidity with running clock and two minute warning ?!?) the game itself is kind of dumb - there are just too many people in the field for anything that a regular person can really understand. Strategies that almost never work out because of the other team interfering with their strategy. Too much chaos and still each person only does a one single thing. Even more - many of the players never will get any attention in the game just because they are on a supporting position, but the quarterback will always be the center of attention.
A very unbalanced game that is even more screwed by a ton of ads, a very heavy leaning on judging nitpicks and just 3-4 nice moments in the whole 1 hour game. I'll just stick back with hockey and anime :)

7 February 2006

Aigars Mahinovs: Also at the school reunion I took a lot of photos...

Rock the dance floor Apple tree and cherry tree ... Baiba A new sports hall of my old school
Also at the school reunion I took a lot of photos - 217 to be exact. So, here are a couple of the best shots that (as I think) look quite nice even without knowing the people or the circumstances of the pictures.

Note to self: I seem to be getting good on candid portraits and architecture, but group photos, candid action photos and still life need a lot of work.

Note to my ex-classmates: d rgie klases biedri, visas manis uz emt s fotogr fijas j s varat novilkt eit, ja tas links nedarbojas, vai jums vajag k du bildi augst k kvalit t - sazinieties ar mani pa epastu vai telefonu.

6 February 2006

Aigars Mahinovs: On the weekend I was at the school reunion and amo...

On the weekend I was at the school reunion and among other matters I gave my school a present of 50 Ubuntu CDs to use in school and to give out to the pupils most interested in computers. After that I talked to my IT teacher who is now an IT adviser to the principal. It seems that all that we were taught in high school (Office software) is being move down to grade school and it is currently unclear, what will be taught to high school students. It could be programming, but it would take a large pile of time and money to prepare all the teachers for that.
It is quite a food for thought - find something challenging enough to teach at 11th and 12th grade to children that have learned all of word processing and presentation making while in their 5th grade and in the same time make it very easy to prepare 40+ year old teachers to teach that material.
In this context I find the project Little Wizard very interesting - if basics of programming can be taught so easily, maybe we still have a chance of getting it into the mandatory curriculum.

5 February 2006

Aigars Mahinovs: On homosexuality Listening to some recordings of ...

On homosexuality

Listening to some recordings of the Howard Stern show got me thinking about homosexuality. I try not to have any prejudices, so I tried to view this phenomenon from a purely logical point of view with as little external data as possible, so help me if I'm wrong.

Close relationships between two persons are generally understood to contain four separate components: sex, legal matters, social matters and romantic matters.

First of all it is said that, while the percentage of homosexual people is low, many heterosexual people have had some kind of homosexual experience either as an experimentation or as an accidental exposure. It also is believed that if the person in question is not physiologically repulsed by the concept (i.e. homofobic) then they can experience sexual pleasure regardless of the gender of the partner, number of partners or even absence of such. In all we can basically conclude that while homofobia is a sexual disorder (it disorders sexual function), homosexuality is not about sex at all.

The legal perspective is very inconclusive - in some parts of the world even having homosexual relationships can be illegal, but in other parts of the world homosexual marriages are not uncommon. Also all the legal stuff is there to help people that can not help themselves, especially minorities. So the legal part should be all for the equalising homosexuality to heterosexuality unless that does direct and irreparable harm to the society (which it seemingly does not).

From social perspective homosexual couples look to be living the life very similar to the heterosexual couples - there are some that are going wild and there are some that honour strong and stable relationships for decades and love to go to theatre. It could even seem that homosexual people tend to have a higher percentage of creative people and intellectuals.

The only think left is love. Call it a quick romantic encounter or a the love of the lifetime, but that seems to be the major descriptive difference with homosexually oriented people - they just fall in love with types of people that tend to be of same gender as themselves. It could be related to behavioural predispositions or differences in hormonal perception, but ultimately we do not know enough about love to fully understand that difference.

So at this point I can only conclude that until we understand all the hormonal processes and that "love" thingy, we could just as well start counting homosexual males and homosexual females as two additional genders that can not be fully understood by other two genders, just like men can not fully understand women and the other way around. This difference is as real and as effective as the difference between male and female genders or (stretching the analogy a bit too far) like the difference between races and should be honoured just as much as these differences are honoured.

And now I coin the terms "omale" and "ofmale" as the new homosexual male and female gender descriptors and "oman", "omen", "owman" and "owmen" as terms for single homosexual male, multiple homosexual males, single homosexual female and multiple homosexual females respectively.

Next.

Previous.