Search Results: "ana"

24 November 2008

Wouter Verhelst: Rails? Stay the f* away from my system.

I knew for a long time that rails is somewhat fun to work with. The first time I read something about it, I went to check it out, and kindof liked the idea. Web development really isn't my cup of tea, so I didn't do anything with rails; but really, the idea made somewhat sense to me. It's unfortunate that the implementation is such a piece of crap. Luckily I don't have to deal with it firsthand, but the stories I hear and read everywhere speak for themselves. I won't enumerate them all; but in case you're not familiar with them, the Debian Ruby team has a pretty clear explanation on their website. In addition to complaints by packagers, I also hear that many ruby developers recommend that you install gems inside the project you're running (or that you ship your software in such a way that it includes those libraries as part of your source). Oh, the horror. Now, however, they've really topped it. Via Koen's blog, I found some other page that contains this:
Now, in theory, to update to the latest version of RubyGems, you just need to run

sudo gem update --system

But - depending on what version of RubyGems you have installed, running that command may lie and tell you that you have nothing to update. If you re currently on RubyGems 1.1 or 1.2, you need to run a different set of commands to update RubyGems:

sudo gem install rubygems-update
sudo update_rubygems
Seriously. This is why we have distributions, packagers, and, really, people spending a whole shitload of time making sure everything works together nicely. This is why there is Debian, RedHat, CentOS, Mandrake, SuSE, and whatever. Me touching rails? Not with a 10-foot pole. Not if you pay me a million, in any currency. Stay away from my system!

23 November 2008

Matthew Garrett: Nngh.

Sebastian K gler dissects my dissection, except in fact he appears to be responding to a pile of stuff I didn't write.

First of all, Matthew assumes that the setting "powersave" will actually use the powersave cpufreq governor - citation needed.

the "conservative" governor, which indeed is an "ondemand" governor, meaning it gives you the extra needed CPU power when you ask for it - more slowly than ondemand does, resulting in extra power draw. Never run conservative unless your P-state latency is so high that ondemand won't work.

Powerdevil doesn't offer such option, so Matthew will be happy about this item - I didn't say it did. However, it is a common myth that thermal management is part of the job a power management policy should play. CPU frequency changing is a mechanism that can be driven by two policies - power management and thermal management. The fact that they share a mechanism does not mean that these policies should be conflated. Really. I wasn't just talking about Powerdevil here.

"3d takes more energy than 2d" is something I didn't actually say. I brought this up because various people have advocated disabling compiz to save power and because Powerdevil appears to have a "Disable Kwin compositing" button.

Lesson learned: Don't have an immediate emotional response to perceived criticism and fail to actually read what you're responding to. I would have commented on Sebastian's entry directly, but he forbids comments, so fuck that.

Matthew Garrett: Making sure we do power management the right way

I saw a posting about PowerDevil, the new KDE power management interface. It's somewhat disheartening - for the most part, it falls into the same traditional errors made in power management (ie, letting you change cpufreq settings, using "presentation" as a power management setting rather than getting applications to actually do the right thing). But my point isn't to bitch about PowerDevil. My concern is more about why we're still failing to get the message across about certain power management myths. Implementing power management incorrectly leads to wasted power, dead polar bears and wet carpets. It's important that we get this right.
One of the problems is probably that most desktop programmers don't know how hardware behaves. How can we change that?

22 November 2008

John Goerzen: Tree Classics

A few years ago, not long after we got married, it was getting close to Christmas — the first Christmas we’d spent together. We set out one Saturday morning in Indianapolis to find a Christmas tree. We both have allergies, so a real tree was out of the question. An artificial tree it is. We went to the mall. We went to Sears, to Target, and to any number of other places that I’m sure I’m forgetting. We saw trees that spun, trees that had red needles, trees with fiber optics in them, trees with some incredibly fake-looking snow, pre-decorated “generic” trees, and all sorts of things that just screamed “tacky.” What we didn’t find were trees that looked like… trees. I think there were a few Terah would have been OK with, until I had to veto them on the grounds that they were too fake, too short, to skinny, or whatever. So I thought I’d check the Internet. I came upon Tree Classics, and we ordered a 7.5ft Evergreen Supreme. We (or, well, *I*) got some good-natured teasing for being crazy enough to order a tree over the Internet. This was before people were quite used to the idea that you can buy anything online — and, as far as I know, Tree Classics was the only company (except perhaps for Sears) selling trees online back then. But it arrived and we put it up and liked it. It looked like a tree, it was nice and full. And it shipped direct from the manufacturing plant in Illinois. The downside to that particular tree was that it took several hours to assemble each year. Over the years, whatever unlucky family members happened to be visiting our house over Thanksgiving would get a nice Thanksgiving dinner — and then a pile of tree branches to shape. We started getting more haphazard over the years, and this year, decided that our now 7-year-old tree had survived three moves and a toddler, and we could do with a new, easier-to-assemble model. So I hopped online again. We didn’t even bother with the big box stores this year. There are more places selling Christmas trees these days, but we wound up buying another tree from Tree Classics. They had basically the same types of trees as other places, but a wider selection and generally better prices. Though their website isn’t quite as fancy. We got a 7.5ft Kensington Spruce this year. It arrived Monday and we set to assembling it as soon as we could. Our Christmas tree has had this tradition of getting put up on about Dec. 23 and then staying up until about Valentine’s Day because we are great at procrastinating with the long job of assembling it (and the almost-as-long job of disassembling it.) We got a pre-lit tree (standard incandescent white light bulbs, of course) this year. It came in about 4, rather than several dozen, sections. The injection-molded branch ends are amazingly realistic. We got it assembled in record time. But it didn’t look very full. The injection-molded ends seemed all squished together, and despite following the instructions, didn’t really bend out like we thought they should. So Terah called Tree Classics today. The woman that answered gave her a tip on how to do it (”splay” them out, side to side, then shape them up and down after that). She’s got it started, and we’ll probably finish out the shaping tomorrow. Tree Classics had also exchanged a few emails with me prior to our purchase to help answer questions about whether their current trees are easier to assemble than their prior ones, and questions about the appearance of their different standard and LED pre-lit options. Overall, we’ve been happy with them and will order from them again in the future, I’m sure.

21 November 2008

Steve Kemp: You've had this coming since the day you arrived

Yesterday I wrote that I'd ordered a new ASUS EEE PC, the 901 model, and today it arrived. The machine is gorgeous though I suspect in the long term I'll regret ordering the white model. This entry was written on the device, slowly due to my fat fingers, with its new Debian Lenny operating system. To save time I didn't even use the default system, I just immediately rebooted it into the installer via a 2Gb USB stick. Unfortunately I had to run through the installation twice, because I made some bad partitioning decisions and decided to fix them rather than live with them. Happily everything on the device appears to work perfectly, although there were a few hiccups along the way. The only niggle is that suspend to RAM seems a little flaky; 50% of the time I try to resume and just get a blank window not my X.org desktop. Happily suspend-to-disk works perfectly, and the bootup/restoration process looks very pretty with the splashy package installed. There are times when I really love using Debian, and this is definitely one of them. Together we've produced an operating system which just works on an amazing array of devices and systems and gets better and better as time goes on! For example in the past I'd always regarded Network Manager as "that thing we remove to stop breaking our system" - but now I see it working correctly with no effort on my part at all. Amazing! I guess I'll be returning my Nokia internet tablet in the near future. This device is bigger, but much more capable and versatile. ObFilm: St Trinians (the recent remake; not too bad. Bonus points for the Shampoo cover).

MJ Ray: Libraries, Cooperatives, OCLC and TTLLP

Thanks to Koha, TTLLP is partly a library services worker cooperative and just now there’s a massive flame-storm about the largest library services consumer cooperative - OCLC, the Online Computer Library Center - because it just updated the terms for sharing its book data collection. OCLC seems to be treating it as a private asset that it can exploit, not the common resource that many librarians thought it was. I’ve been watching this fire with interest - because, at best, I don’t think it’s helping other cooperatives that sell to libraries - and here is my summary. OCLC and the Great Library Scandal is a good introduction and there’s a summary of the Talis Podcast about OCLC WorldCat Record Use Policy with Karen Clahoun and Roy Tennant which reveals some of the OCLC thinking. Just like CC and Open Source? Still No is a great illustration of how some librarians think OCLC is reaching the wrong conclusion, which then leads to asking Is OCLC truly cooperative? and What would it look like if OCLC was broken up? A commenter on Tom Watson: Library data asks: “Why would libraries play this game?” Well, the road to hell is paved with good intentions and this road has taken 40 years. First off, OCLC is essentially a good idea - libraries cooperating to act as a counter-weight to the large library service companies. However, I believe OCLC predates many recent company rule innovations (stronger common asset locks) and data licensing innovations (Share-Alike, Fiduciary Licensing and the general free and open source software movements), so there’s nothing to stop them trying to privatise the assets (library data) that the libraries have given to OCLC and it was only a matter of time before someone tried. I’m having a similar discussion with another organisation that has been given data by its members under vague terms and is now apparently about to exploit that data for the organisation’s benefit, to the detriment of some members. TTLLP is a member but has not contributed much data because I was suspicious of the lack of terms. In time, hopefully, asset locks and more awareness of data licensing will eliminate these problems, but there’s going to be a lot more people getting burnt first. Finally, a quick shout-out to the Open Library Environment as a possible emerging alternative to OCLC for practical services. Raw Thought: Stealing Your Library: The OCLC Powergrab covers some of its motivation (and includes a link to a petition to OCLC, if you want something to sign), but I share Stefano’s (now there’s someone I’d not read in 7 or so years) analysis of some of the challenges:
“any grass-root approach that will get big enough to take on OCLC on the metadata collection and redistribution service that libraries need will have to incorporate under the pressure of its users (if only for legal liability protection) and will have to find an answer to the same set of problems (policy, governance, financial sustainability) that OCLC has.”

20 November 2008

Clint Adams: We are the owls. We sing falsetto in the night.

I'm not too old to mosh with Dr. Bubbles in front of a Christian rock band. (Obviously this couldn't happen. Why would we be near a Christian rock band?) Bitch, I am is as constant as the Northern Star. Where dat at?

Gunnar Wolf: Remember, remember, the 20th of November...

This might be a good message to write in Spanish... But then again, a long time ago I decided this is an English-posting site. So be it, I'll only have to give more background information.
This day marks the date when, 98 years ago, Francisco I. Madero started the Mexican Revolution - About a decade of unrest, civil war and ideologies. The revolution is what created the violent, uncivil image of the Mexican, which accompanied us for long years in many foreigners' minds. The revolution brought to an end 30 years of a single-man rule, the Porfiriato. But that's only the major symptom - The Revolution had many, many other consequences. About one million (out of a 10 million population) people died. There was a very significative rearrangement of the society, a rearrangement that took about half a century to settle. But I won't write more background - You can always ask the wikipedia about our Revolution.
The reason I am posting this is that, as it usually happens in this time of year, several so-called analysts in the media have started asking, was the Revolution really worth it? Did it change anything at all? Did the Revolution in the end win, or was it defeated from within? Should we still celebrate it?
And there are, yes, reasons to doubt it. Renato Leduc, at the same time a great journalist and a delicious poet, says it as many - while at the same time, as nobody else: Tiempos en que era Dios omnipotente / y el se or Don Porfirio presidente / Tiempos, ay! tan iguales al presente, or ya se est n muriendo todos / Jes s qu desilusi n...! / se est volviendo gobierno / Ay dios...! La revoluci n.
Anyway... Our media overlords insist on us forgetting the struggles and the real changes that came from them, on rewriting the history... Probably they will push us later on to have the cristeros as the real fathers of the Nation?
Even if so many bits of reality didn't change after Porfirio Diaz's regime fell in 1910, I find it insulting to think that even 70 years of PRI -with very sharp differences between periods, with huge differences between the PRI-born governments- are comparable to 30 years of a one-man rule; even with brutal repressions such as the dirty war against so many subversive movements in the 50s-80s (as officially There Was No Armed Struggle Anymore, just some pesky communist subversives), it cannot be compared to the Porfirian Peace (ask Cananea and R o Blanco). Today we might have a shameful concentration of money and power in very few hands (including the world's richest man), but it certainly does not reach the point of 1910 where most of the Mexican soil was owned by less than 30 families, with latifundios as big as many states...
Anyway - So far, nothing new - just bits I heard here and there, and my reactions to them. But this morning, around 8:25, I tuned in to Noticias IMER, the news program of one of the few public, non-gubernamental, independent radio stations. An interview was under way, but I could not get the interviewed person's name (I guess, a historian - will write to ask for his data). His comments were very interesting, and very worth echoing. I'll try not to distort him.
The Revolution started off very organized, and with a very simple goal: Get Porfirio Diaz out, and call for real federal elections. Sufragio efectivo, no reelecci n. Of course, the fight was very short, and Madero became the president, with an overwhelming majority. Of course, also, the reactionary sectors set up a coup and killed Madero. Victoriano Huerta seized the power - and that's where the real revolution really began. Groups all over the country (some of which were at unrest since Madero, as they were not seeing the changes they needed - changes that would bring an end to the huge class differences and disrespect to the native Mexican population) rose in arms, and forced Huerta into exile. Then, they battled each other for many more years. It became known as la bola - When somebody joined the revolutionary forces, people said he went to fight with the crowd. But, inside the crowd, there were very different points of view. No, Carranza, Villa and Zapata (the foremost leaders in the hardest part of the fight) were not power-hungry barbarians - much to the contrary. They had very full, very complex views of the problem and possible solutions. I won't delve much into them, also, as I'm not an expert...
Villa and Zapata had the most compatible approaches, seeking an aggresive land redistribution, a communal property system (closest to most of the indigenous population's roots, what we would now call usos y costumbres). For the government, both favored going towards a Europe-like parliamentary system, where the parliament were the real force, and the president (or prime minister or whatever) would only be the designated person to implement the parliament's decision. Both Villa and Zapata feared the evil stemming from the unlimited power that the Presidential Chair symbolized (Fui soldado de Francisco Villa / de aquel hombre de fama mundial, / que aunque estuvo sentado en la silla / no envidiaba la presidencial). They met at the Aguascalientes convention, and were quite close to each other - but were defeated by the superior Venustiano Carranza (Constitucionalista) army.
Carranza, although vilified for his corruption (nowadays, carrancear is still a synonim for stealing), had an opposite view - also originating from a very deep analysis. Carranza saw that what brought down Madero was, in the end, the lack of power of the President to rule the country without support from the legislative power. So, he pushed a political program making the President the strongest man in Mexico. He and his people wrote and passed the 1917 Constitution, valid today. This constitution goes to great lengths pushing revolutionary ideals - Land and wealth redistribution, universal and free education, keeps a complete separation between state and church, ensures state control over strategic areas... The 1917 constitution is one of our history's greatest achievements.
But, of course, it is not perfect - it paved the way for a hegemonic party controlling the real power behind it all. PRI started as a very heterogeneous mixture of the whole revolutionary family, but slowly became a bureaucratic, stagnated monolith.
And in a somehow ironic twist of destiny, the forces that today push for deepest changes, and precisely in the same direction that Villa and Zapata wished, are... Ej rcito Zapatista de Liberaci n Nacional (EZLN) and Frente Popular Francisco Villa (FPFV). EZLN is far more successful and advanced in its social experiment. Again, I won't comment further in what I don't really understand.
As a last point, the commenter I'm quoting (and whose name I must get, to update this post!), said that practically in every country that has transited from any sort of dictatorship towards a more-or-less believable democracy (say, everywhere in South America, or Spain, or Eastern Europe, or...), one of the first steps has been to update or replace the constitution with a new one, preventing the mistakes overlooked by the previous one from being reinstated. In our country, we have long heard about the "Reforma del Estado", a very nice-sounding-term which nobody believes in. After the 2006 electoral mess (no matter who won in the end, everybody will agree it was a mess that should be prevented from happening again, we had high hopes of real changes being introduced. A parliamentary, or at least semi-presidentialist regime was strongly suggested as a way forward. Changing the electoral system towards having second-rounds if needed. _anything!_ But no, we were stuck with... The same as always.
So, did the Revolution win or lose? It is clear to me. It won, and it really shaped -for better- what would happen in the next 100 years. However, in a century, we have been able to twist the law to make it turn against itself. I have to agree with my EZLN-minded friends (I sympathize with EZLN's general goals, but don't think its way forward is the right way to go): Pushing the change from within the government is just wishful thinking, but a strong delusion. However, is there a way to push our country forward without repeating a violent cycle? I really hope so. Our current situation is simply pathetic.
I lack a good closing for this post... So I'll let good old Jefe Pluma Blanca, Renato Leduc, do it for me.
Tiempos de Pancho Villa
y de la guerra de mentadas y tiros en la sierra.
Tiempos de fe
no en Dios sino en la tierra
Por el cerro de la Pila
fueron entrando a Torre n
mi general Pancho Villa
y atr s la revoluci n...
Ay jijos...! ya se nos hizo
cu nto diablo bigot n... Ya viene Toribio Ortega
subiendo y bajando cerros
y no te enredes ni enga es
que ah anda Pablito Se ez
haciendo ladrar los perros. Cu nto usurero barb n...!
Ay jijos... c mo les vuela
de la levita el fald n...!
Ay jijos... ya se nos hizo:
triunf la revoluci n...! Tenemos camino andado...
No hay que juntarse con rotos
siempre te juegan traici n
ya Madero est vengado
ya muri la usurpaci n. En su caballo retinto
lleg Emiliano Zapata
bonita su silla charra
y sus botones de plata
pero mucho m s bonito
su famoso Plan de Ayala... Este gallo es de navaja
y no es gallo de espol n
si quieres tierra trabaja
trabaja no seas huev n... Ya lleg don Venustiano
con sus anteojos oscuros
y Villa y Zapata gritan:
No s que tengo en los ojos...
porque ya en Pablo Gonz lez
se vislumbra la traici n
Ay reata no te revientes
que es el ltimo jal n...! ya se est n muriendo todos
Jes s qu desilusi n...!
se est volviendo gobierno
Ay dios...! La revoluci n.

John Goerzen: The Demise of PC Magazine

I just read the news that PC Magazine is being canceled. It’s not exactly a shock, given the state of technical magazines right now. I haven’t read one of those in years, since they turned to be more of a consumer than a technical publication. But I hope I am not the only one out there that remembers PC Magazine from the mid to late 1980s. I had two favorite parts in each issue: the programming example, and the “Abort, Retry, Fail” page at the back of the magazine. The programming example was usually some sort of DOS (or, on occasion, OS/2) utility. It was usually written in assembly, and would be accompanied by a BASIC program you could type in to get the resulting binary, as assemblers weren’t readily available. The BASIC program was line after line of decimal numbers that would decode them and write out the resulting binary — sort of a primitive uuencode for paper. Trying to type those in gave me some serious eyestrain on more than one occasion. By now, I forget what most of those utilities did, but I remember one: BatchMan. It was a collection of tools for use in DOS batch files, and could do things like display output in color or even — yes — play monophonic music. It came with an example that displayed some lyrics about batch programming on-screen, set to what I later realized was the Batman theme. Geek nirvana, right? But Batchman was too big to publish the source code, or the BASIC decoder, in print. It might have been one of those things that eventually led me to a CompuServe account. PC Magazine had some deal with CompuServe that you could get their utilities for free, or reduced cost — I forget. CompuServe was probably where I sent my first email, from my account which was 71510,1421 — comma and all. In later years, you could pay a small fee to send email to the Internet, and I had the amazingly attractive email address of 71510.1421@cis.compuserve.com. Take that, gmail. PC Magazine eventually stopped running utilities that taught people about assembly or batch programming and shifted more to the genre of Windows screensavers. They stopped their articles about how hard disks work and what SCSI is all about, and instead have cover stories like “Vista made easy!” I am, sadly, not making this up. Gone are the days of investigating alternative operating systems like OS/2. It appears that “Abort, Retry, Fail” is gone, too. It was a one-page thing at the back of each magazine that featured braindead error messages and funny stories about people that did things like FAX an image of a floppy disk to a remote office — before such stories were cliche. Sort of like DailyWTF these days. The sad truth is that the people that would FAX an image of a floppy are probably the ones that are reading PC Magazine today. I still have a bunch of PC Magazine issues — the good ones — in my parents’ basement. I also still have my floppies with the utilities on them somewhere. One day, when I get some time — I’m estimating this will be about when Jacob goes to college — I’ll go back and take another look at them.

18 November 2008

Joey Hess: a year of haskell (not really)

Guess it's really been longer than a year that haskell has been on my mind, though not much lately. Things are aligning again. I'll shortly be visiting the Bay Area again -- last time I piled up haskell documentation for the plane trip. This time I'm looking forward to the Real World Haskell book waiting in the mailbox when I get back. I read and commented on the first several draft chapters, hoping my ignorance would be useful, and I know one of the authors (though if I'm not mistaken I've never met him). So I'm looking forward to reading it, but also feeling guilty that I haven't managed to do anything serious with haskell yet. No new project that I dared, or had the patience, to attempt in it. But that's what the book's supposed to solve. Getting over the gap from a basic understanding to being able to add the language as another tool in the kit. And hey, it's better than seriously learning javascript would be, right?
Right now I can't think about haskell without thinking about Buddhism. I won't bore you with why they're connected in my head.

Adrian von Bidder: SyncML (new toy)

Q: is a mobile phone (nice hardware, shitty firmware, btw) waterproof? A: I now got this new toy (Sony Ericsson S500i) as aresult. And because I don't really like losing contacts again (I never managed to connect to the old phone from Linux and was too lazy to use the Windows software), I have now fired up kitchensync with the OBEX SyncML client from the OpenSync project. And was very surprised that after only very little fiddling with the configuration I could indeed copy the contacts from the phone to KDE's addressbook. There seems to be a — not so usual anymore in this decade — utf8 problem somewhere (it looks as if the encoding from the phone is converted to utf8 twice, or it is latin1 to utf8 encoded but was already utf8 on the phone), and synchronisation is only one way so far (from the phone to KDE-PIM), with changes on the KDE side being overwritten. No idea which component those bugs are in, and documentation I've found is not very verbose. So, to start with: I've gotten this nice dump with hcidump. Now, how do I extract the actual data streams from that dump? I know I have to use wbxml2xml on the data, but first I need to unwrap the network data, and I haven't found that (probably read past it in the manpage of hcidump because I'm a bit tired.) Of course, if anybody out there has solved my issues I'd be just as happy with information on how that was done instead. In the mean time, I at least have reasonable back up of my phone's contact database again.

Matthew Garrett: Aggressive graphics power management

My current desktop PC has an RS790-based Radeon on-board graphics controller. It also has a Radeon X1900 plugged in. Playing with my Watts Up, I found that the system was (at idle!) drawing around 35W more power with the X1900 than with the on-board graphics.

This is clearly less than ideal.

Recent Radeons all support dynamic clock gating, a technology where the clocks to various bits of the chip are turned off when not in use. Unfortunately it seems that this is generally already enabled by the BIOS on most hardware, so playing with that didn't give me any power savings. Next I looked at Powerplay, the AMD technology for reducing clocks and voltages. It turns out that my desktop hardware doesn't provide any Powerplay tables, so no joy there either. What next?

Radeons all carry a ROM containing a bunch of tables and scripts written in a straightforward bytecode language called Atom. The idea is that OS-specific drivers can call the Atom tables to perform tasks that are hardware dependent, even without knowledge of the specific low-level nature of the hardware they're driving. You can use Atom to do several things, from card initialisation through mode setting to (crucially) setting the clock frequencies. Jerome Glisse wrote a small utility called Atomtools that lets you execute Atom scripts and set the core and RAM frequencies. Playing with this showed that it was possible to save the best part of 5W by underclocking the graphics core, and about the same again by reducing the memory clock. A total saving of 9-10W was pretty significant.

The main problem with reducing the memory clock was that doing it while the screen is being scanned out results in memory corruption, showing up as big ugly graphical artifacts on the screen. I'm a fan of doing power management as aggressively as possible, which means reclocking the memory whenever the system is idle. Turning the screen off to reclock the memory would avoid the graphical corruption but introduce irritating flicker, so that wasn't really an option. The next plan was to synchronise the memory reclocking to the vertical refresh interval, the period of time between the bottom of a frame and the top of the next frame being drawn. Unfortunately setting the memory frequency took somewhere between 2 and 20 milliseconds, far too long to finish inside that time period.

So. Just using Atom was clearly not going to be possible. The next step was to try writing the registers directly. Looking at the R500 register documentation showed that the MPLL_FUNC_CNTL register contained the PLL dividers for the memory clock. Simply smacking a new value in here would allow changing the frequency of the memory clock with a single register write. It even worked. Almost. I could change the frequency within small ranges, but going any further resulted in increasingly severe graphical corruption. Unlike the sort I got with the Atom approach to changing the frequency, this corruption manifested itself as a range of effects from shimmering on the screen down to blocks of image gradually disappearing in an impressively trippy (though somewhat disturbing) way.

Next step was to perform a register dump before and after changing the frequencies via Atom, and compare them to the registers I was programming. MC_ARB_RATIO_CLK_SEQ was consistently different, which is where things got interesting. The AMD docs helpfully describe this register as "Magic field, please use the excel programming guide. Sets the hclk/sclk ratio in the arbiter", about as helpful as being told that the register contents are defined by careful examination of a series of butterflies kept somewhere in Taiwan. Now what?

Back to Atomtools. Enabling debugging let me watch a dump of the Atom script as it ran. The relevant part of the dump is here. The most significant point was:
MOVE_REG @ 0xBC09
src: ID[0x0000+B39E].[31:0] -> 0xFF7FFF7F
dst: REG[0xFE16].[31:0] <- 0xFF7FFF7F
, showing that the value in question was being read out of a table in the video BIOS (ID[0x0000+B39E] indicating the base of the ROM plus 0xB39E). Looking further back showed that WS[0x40] contained a number that was used as an index into the table. Grepping the header files gave 0x40 as ATOM_WS_QUOTIENT, containing the quotient of a division operation immediately beforehand. Working back from there showed that the value was derived from a formula involving the divider frequencies of the memory PLL and the source PLL. Reimplementing that was trivial, and now I could program the same register values. Hurrah!

It didn't work, of course. These things never do. It looked like modifying this value didn't actually do anything unless the memory controller was reinitialised. Looking through the Atom dump showed that this was achieved by calling the MemoryDeviceInit script. Reimplementing this from scratch was one option, but it had a bunch of branches and frankly I'm lazy and that's why I work on this Linux stuff rather than getting a proper job. This particular script was fast, so there was no real reason to do it by hand instead of just using the interpreter. Timing showed that doing so could easily be done within the vblank interval. This time, it even worked.

I've done a proof of concept that involved wedging this into the Radeon DRM code with extreme prejudice, but it needs some rework. However, it demonstrates that it's possible to downclock the memory whenever the screen is idle without there being any observable screen flicker. Combine that with GPU downclocking and we can save about 10W without any noticable degradation in performance or output. Victory!

I gave the code to someone with an X1300 and it promptly corrupted their screen and locked their machine up. Oh well. Turns out that they have a different memory controller or some such madness.

So, obviously, there's more work to be done on this. I've put some test code here. It's a small program that should be run as root. It should reprogram an Atom-based discrete graphics card[1] to half its memory clock. Running it again will halve it again. I don't recommend doing that. You'll need to reboot to get the full clock back. This isn't vblank synced, so it may introduce some graphical corruption. If the corruption is static (ie, isn't moving or flickering) then that's fine. If it's moving then I (and/or the docs) suck and there's still work to be done. If your machine hangs then I'm interested in knowing what hardware you have and may have some further debugging code to be run. Unless you have an X1300, in which case it's known to break and what were you thinking running this code you crazy mad fool.

Once this is stable it shouldn't take long to integrate it into the DRM and X layers. I'm also trying to get hold of some mobile AMD hardware to test what impact we can have on laptops.

[1] Shockingly enough, it's somewhat harder to underclock graphics memory on a shared memory system

Russell Coker: Keating College

Some time ago I spoke to Craig Keating about his plans for a new secondary school in the center of Melbourne. His plan was to focus on the core academic areas and cater to academically gifted students. He had some interesting ideas for his business, one of which was to pay teachers rates that are typical for private schools (higher rates than government schools) but not have any sport programs in the evenings or weekends (private schools typically require teachers to work every Saturday and one evening every week in coaching a sport). This would therefore give an hourly pay rate that was significantly higher than most private schools offered and would thus allow recruiting some of the most skilled teachers. One of his ideas was to intentionally keep the school small so that every teacher could know every student. One of the problems with most schools is that they take no feedback from the students. It seems that this serious deficiency would be largely addressed if the teachers knew the students and talked to them. He pointed out that in the history of our school system (which largely derived from the UK system) the private schools had a lot of sporting activities as a way of filling time for boarding students, given that few schools accept boarders (and those that do have only a small portion of the students boarding) the sports are just a distraction from study. This is not to say that sports are inherently bad or should be avoided. He encouraged parents to take their children to sporting activities that suit the interests of the child and the beliefs of the parents instead of having the child be drafted into a school sport and the parents being forced to take an unwilling child to sporting activities that they detest (which I believe is a common school experience). My own observation of school sport is that it is the epicentre of school bullying. There is an inherent risk of getting hurt when engaging in a sport. Some children get hurt every lesson, an intelligent person who ran a school with an intensive sports program might statistically analyse the injuries incurred and look for patterns. Children who are not good at sport are targeted for attack, for example when I was in year 7 (the first year of high school) one of my friends was assigned to the “cork bobbing” team in the swimming contest - this involved a contest to collect corks floating in the toddler pool for the students who were really bad at swimming. At that moment I knew that my friend would leave the school as the teachers had set him up for more intensive bullying than he could handle. Yet somehow the government still seems to believe that school sports are good! This is not to say that physical activity is bad, the PE 4 Life program [1] (which is given a positive review in the movie Supersize Me [2]) seems useful. It has a focus on fitness for everyone rather than pointless competition for the most skilled. I have just seen a sad announcement on the Keating College web site [3] that they will not be opening next year (and probably not opening at all). The Victorian Registration and Qualifications Authority (VCRA) announced in November that the application to be registered as a school (which was submitted in March) was rejected. The first reason for the rejection was the lack of facilities for teaching woodwork and metalwork. As the VCRA apparently has no problems registering girls’ schools that don’t teach hard maths (a teacher at one such school told me that not enough girls wanted to study maths) it seems unreasonable to deny registration to a school that doesn’t teach some crafts subjects and caters to students who aren’t interested in those areas. The second reason was the lack of facilities for sport and PE. Given the number of gyms in the city area it seems most likely that if specific objections were provided eight months earlier then something could have been easily arranged to cover the health and fitness issues. When I spoke to Craig he had specific plans for using the city baths, gyms, and parks for sporting activities, I expect that most parents who aren’t sports fanatics would find that his plans for PE were quite acceptable. The third reason is the claim that 600 square meters of office space is only enough to teach one class of 24 students. That would mean that 25 square meters is needed for each student! I wonder if students are expected to bring their own binoculars to see the teacher or whether the school is expected to provide them. :-# The government has a list of schools that work with the Australian Institute of Sport [4]. These schools provide additional flexibility in studies for athletes and probably some other benefits that aren’t mentioned in the brief web page. I don’t object to such special facilities being made available for the small number of students who might end up representing Australia in the Olympics at some future time. But I think that a greater benefit could be provided to a greater number of students if there were a number of schools opened to focus on the needs of students who are academically gifted. This doesn’t require that the government spend any money (they spend hundreds of millions of dollars on the AIS), merely that they not oppose schools that want to focus on teaching. Currently the government is trying to force Internet censorship upon us with the claim that it will “protect children” [5]. It seems obvious to me that encouraging the establishment of schools such as Keating College will protect children from bullying (which is a very real threat and is the direct cause of some suicides). While so far no-one has shown any evidence that censoring the net will protect any child.

Matthew Palmer: Dependency Resolution Failure

So, the yum package manager (and, I assume, RPM underlying that) has a fairly neat (to my naive eyes, anyway) implementation of multiarch support -- on an amd64 system you can install i386 packages, and they go into a separate lib tree, and there's no conflicts or unhappiness. It even installs both the i386 and x86_64 versions of libraries automatically when you ask for them, which is a nice touch. However, the dependency resolver doesn't quite seem to have gotten the hang of some of the corner cases. For instance, if you want to install a noarch package that depends on an architecture-specific package, but for some reason only the i386 version is available (say, your local package repo hasn't quite built the x86_64 version yet) then yum will happily install the i386 version and say "OK, dependency resolved". Nice try, but no cigar. What makes it a bit more irritating is that once you work this out and the x86_64 package is available, you need to remove the i386 version of the package by hand in order for it to pick up the x86_64 package and install it. Just asking yum "hey, can you install this package" results in "nope, it's already installed, go away".

17 November 2008

John Goerzen: Converted to WordPress

I have been using Serendipity on my blog for some time now. Overall, I’ve been pleased with it, but the conversion was a pain. Serendipity is a simple blog engine, and has a wonderful built-in plugin system. It can detect what plugins need upgrading, and install those upgrades, all from directly within the management interface. There’s no unzipping stuff in install directories as with WordPress.

On the other hand, Serendipity has had some long-standing issues. #1 in the list is spam protection. I’ve been using the Captha system, but as some others have commented on here periodically, it can be a hassle for legitimate humans. The Serendipity implementation in particular, I mean. Another issue was with the plugins themselves. Because the software does updates itself, and plugins tend to write things in the install directory, your Serendipity install directory has to be writable by the webserver. Morever, it is difficult to keep track of local changes — forcing me to use git on the tree, and even then, it’s difficult. Finally, there has been some long-standing weirdness with the RSS feeds. I switched to WordPress over the weekend. It doesn’t solve everything, but it is a nice improvement. It has a ton of themes available, though many of them are not as high-quality as the themes in Serendipity, and it is hard to pick out the good ones quickly. WordPress has a larger development community and seems to be getting new features and improvements at a more rapid rate than Serendipity. I particularly like how it automatically saves drafts as I’m typing. That is a wonderful feature. I can’t tell how many draft posts I’ve lost by accidentally clicking on the wrong thing. Serendipity has a ton of plugins as well. I looked for Twitter plugins today. There are maybe a dozen of them. But there is no central tracking of them, so I have no idea which ones might be nicely peer-reviewed and which ones might rm -rf / on my server. Also, I don’t know which ones are going to be supported and upgraded over time. I’m happy with the way most WordPress themes work nicely with widgets. Though I am baffled that some WP themes hard-code in things like the calendar or archives when they could just let people insert a widget for it. The Conversion Process This was a real pain. I started with a Serendipity to WordPress converter. But alas, it only supports Serendipity databases in MySQL and mine’s in PostgreSQL. I used SQuirreL SQL with the DBCopy plugin to convert it. This worked… sorta. A few tables didn’t convert, but I didn’t need those. Some others had indexes that wouldn’t convert, and after re-trying it enough times, it went. Then I ran the converter. Alas it had some bugs and had to be fixed up with current table names and some things like that. Also I hacked it to preserve ID numbers. So eventually this migrated over the posts and categories. It did not preserve the category hierarchy. It also didn’t recognize when nl2br was disabled, and munge the post appropriately. And it didn’t migrate over tags, so I wrote a Haskell program to do that. Then it was a matter of crafting a bunch of RedirectPermanent and RewriteRule entries for Apache to try to redirect the old article pages and RSS feeds to their new locations as much as possible. Final Thoughts I’m glad I did it, and I don’t plan to do this again for a long time.

Martin Michlmayr: Tracking GCC 4.4 related build errors

I started building the Debian archive with GCC 4.4 ten days ago to report build errors. I've completed the archive build now and reported about 220 bugs (the majority with patches). There are roughly 30 build failures left that I haven't analyzed yet. There are also about 35 packages that fail because the boost headers don't work with GCC 4.4. I'll try to build them when the boost headers get fixed. The majority of GCC 4.4 build errors are trivial. The large majority of failures is because of missing #include statements. There are also about 20 build errors because of improved preprocessor checks. I'll try to do another archive build when the gcc-4.4 package is in Debian.

Russell Coker: The National Cost of Slow Internet Access

Australia has slow Internet access when compared to other first-world countries. The costs of hosting servers are larger and the cost of residential access is greater with smaller limits. I read news reports with people in other countries complaining about having their home net connection restricted after they transfer 300G in one month, I have two net connections at the moment and the big (expensive) one allows me 25G of downloads per month. I use Internode, here are their current prices [1] (which are typical for Australia - they weren’t the cheapest last time I compared but they offer a good service and I am quite happy with them). Most people in Australia don’t want to pay $70 per month for net access, I believe that the plans which have limits of 10G of download or less are considerably more popular. Last time I investigated hosting servers in Australia I found that it would be totally impractical. The prices offered for limits such as 10G per month (for a server!) were comparable to prices offered by Linode [2] (and other ISPs in the US) for hundreds of gigs of transfer per month. I have recently configured a DomU at Linode for a client, Linode conveniently offers a choice of server rooms around the US so I chose a server room that was in the same region as my client’s other servers - giving 7 hops according to traceroute and a ping time as low as 2.5ms! Currently I am hosting www.coker.com.au and my blog in Germany thanks to the generosity of a German friend. An amount of bandwidth that would be rather expensive for hosting in Australia is by German standards unused capacity in a standard hosting plan. So I get to host my blog in Germany with higher speeds than my previous Australian hosting (which was bottlenecked due to overuse of it’s capacity) and no bandwidth quotas that I am likely to hit in the near future. This also allows me to do new and bigger things, for example one of my future plans is to assemble a collection of Xen images of SE Linux installations - that will be a set of archives that are about 100MB in size. Even when using bittorrent transferring 100MB files from a server in Australia becomes unusable. Most Australians who access my blog and have reasonably fast net connections (cable or ADSL2+) will notice a performance improvement. Australians who use modems might notice a performance drop due to longer latencies of connections to Germany (an increase of about 350ms in ping times). But if I could have had a fast cheap server in Australia then all Australians would have benefited. People who access my blog and my web site from Europe (and to a slightly lesser extent from the US) should notice a massive performance increase, particularly when I start hosting big files. It seems to me that the disadvantages of hosting in Australia due to bandwidth costs are hurting the country in many ways. For example I run servers in the US (both physical and Xen DomUs) for clients. My clients pay the US companies for managing the servers, these companies employ skilled staff in the US (who pay US income tax). It seems that the career opportunities for system administrators in the US and Europe are better than for Australia - which is why so many Australians choose to work in the US and Europe. Not only does this cost the country the tax money that they might pay if employed here, but it also costs the training of other people. It is impossible to estimate the cost of having some of the most skilled and dedicated people (the ones who desire the career opportunities that they can’t get at home) working in another country, contributing to users’ groups and professional societies, and sharing their skills with citizens of the country where they work. Companies based in Europe and the US have an advantage in that they can pay for hosting in their own currency and not be subject to currency variations. People who run Australian based companies that rent servers in the US get anxious whenever the US dollar goes up in value. To quickly investigate the hosting options chosen for various blogs I used the command “traceroute -T -p80” to do SYN traces to port 80 for some of the blogs syndicated on Planet Linux Australia [3]. Of the blogs I checked there were 13 hosted in Australia, 11 hosted independently in the US, and 5 hosted with major US based blog hosting services (Wordpress.com, Blogspot, and LiveJournal). While this is a small fraction of the blogs syndicated on that Planet, and blog hosting is also a small fraction of the overall Internet traffic, I think it does give an indication of what choices people are making in terms of hosting. Currently the Australian government is planning to censor the Internet with the aim of stopping child porn. Their general plan is to spend huge amounts of money filtering HTTP traffic in the hope that pedophiles don’t realise that they can use encrypted email, HTTPS, or even a VPN to transfer files without them getting blocked. If someone wanted to bring serious amounts of data to Australia, getting a tourist to bring back a few terabyte hard disks in their luggage would probably be the easiest and cheapest way to do it. Posting DVDs is also a viable option. Given that the Internet censorship plan is doomed to failure, it would be best if they could spend the money on something useful. Getting a better Internet infrastructure in the country would be one option to consider. The cost of Internet connection to other countries is determined by the cost of the international cables - which can not be upgraded quickly or cheaply. But even within Australia bandwidth is not as cheap as it could be. If the Telstra monopoly on the local loop was broken and the highest possible ADSL speeds were offered to everyone then it would be a good start towards improving Australia’s Internet access. Australia and NZ seem to have a unique position on the Internet in terms of being first-world countries that are a long way from the nearest net connections and which therefore have slow net access to the rest of the world. It seems that the development of Content Delivery Network [4] technology could potentially provide more benefits for Australia than for most countries. CDN enabling some common applications (such as Wordpress) would not require a huge investment but has the potential to decrease international data transfer while improving the performance for everyone. For example if I could have a Wordpress slave server in Australia which directed all writes to my server in Germany and have my DNS server return an IP address for the server which matches the region where the request came from then I could give better performance to the 7% of my blog readers who appear to reside in Australia while decreasing International data transfer by about 300MB per month.

16 November 2008

Steve Kemp: We should just deal with nice people

For various reasons I've recently been thinking about forums. Many technical users dislike forums, because they are things that are hard to follow. Even with RSS feeds & etc you need to keep a login and remember to return to see if your post(s) have been answered. However non-technical users love forums, and from a community-building perspective they're very cheap and easy. Particularly if you manage to appoint moderators from within the comunity. I currently find myself in a position where I'd kinda like to have a forum package. Something that I can integrate into existing site easily. Unfortunately most of the "best" forum packages are PHP-based, and have their own complex login, group, and admin facilities. That makes it hard to update them to authenticate against my existing MySQL table(s). (We'll leave my PHP-allergy in the background) So, once more, I've been contemplating the bad route; create my own forum software. I'm well aware that down that path lies badness madnesss. Let us recap. What is a forum? Sound familiar? It should if you use email: So, the unthinkable, could we convert (bi/uni-directinally?) from a Maildir hierarchy to an online forum? Would that make sense? On the face of it. Yes. There are implementation details - the forum index would be essentially a list of Maildir folders (perhaps "~/Maildir/topic1/.title" would be require to give it a pretty name). Each thread topic would be a rendered display of the messages in the folder. So, what are the drawbacks? Well reading Maildir folders gives us threading, and subjects, bodies, etc. But it does mean a fair bit of overhead parsing messages. (Times like this I remember Hughe. Every time we've gotten together for beer & geekery the topic of an extensible perl-based IMAP server comes up. I'm sure it should be written ..) I'll wrap this up now. I'm sure I've made the point. There are some details which have impact - Should the forum accept new posts online? Or only via gated email-delivery? Will it work? Should it be Maildir, or IMAP based? Still at least filtering your SPAM would be easy ;) More questions. Some questions have no answers. Some answers we ignore because we don't like. I need to sleep. ObFilm: 007: Quantum of Solace Bad film. Don't waste your pennies.

Biella Coleman: Where have all the women gone?

Today, the NYT has an interesting piece on the declining numbers of women in the field of computer science. Ultimately the article presents a bleak picture but does not give a firm sense of why this is so (I think because it is so hard to answer). I do agree that if girls are not hopping on the computer at a young age and are not using it as a tool for production (they do use it a social tool), they are always going to have trouble catching up to men. Many CS majors, not to mention most hackers, develop quite intimate relations with the computer from a young age and thus have a level of comfort and expertise they have is nothing short of astonishing. If women are not developing that expertise as children but only much later in life, there will always be two classes of citizens in computing. Men, in other words, are native speakers, while women learn computing as a second language. The comment I agree with less is the following:
Ms. Cassell identifies another explanation for the drop in interest, which is linked to the pejorative figure of the nerd or geek. She said that this school of thought was: Girls and young women don t want to be that person.
It seems to be that in fact in the 80s and prior to that, the only word in town to describe computer folks were nerds. But geek arose to take its place and in part to take away the pejorative sting. Geek is cool. Nerd is not. And geek is now associated with all sorts of computer cultures in a way that it was not before. So it seems to be that more than ever, there is a positive geeky association with computing so in fact this would open the doors to more people than before.

15 November 2008

Clint Adams: I know that time is a single picture

Amanda and Sarah and Anna and I were in the back room, with the nice guy who can't sing. At least I'm told that he was nice and can't sing. Things were said that did not come to fruition. It's like that girl in the movie where everyone is skating on the edge, and though she keeps running, the weave and the weft get in the way, and the needle which was threaded at the Delly Place threatens to puncture someone's eye in the shadow of the factory where the angels watch poor souls trying to express themselves in coffee shops. A long time ago, Whatsherface explained to me the purpose of going to church: not the one where you meet business contacts, or cruise for ass, or get credit in some moral superiority program, or get harassed by some jackhole named even though he's not Russian, or to serve a higher power, or any of that, but the one where you become part of a greater whole. On the other side of the swimming pool, someone is dipping vis toe into the water. The conventional wisdom is that ve should plunge right in, withstand the shock of the temperature change, and be clearly better off for it. There is no doubt in the mind of conventional wisdom that this is the best outcome for ver. All factors are deemed irrelevant at this point. The same cannot be said for someone about to eat a poison ivy sandwich. I'm gonna need an Almdudler, gespritzt.

Next.

Previous.