Search Results: "ron"

21 November 2008

Joey Hess: netbooks

I've been looking at netbooks, since indications are that my laptop's hard drive will die again soon, and that its LCD may follow. I can't seem to find any netbook with a resolution better than 1024x600. I'm used to 1280x768; dropping down will be a real shame, but seems unavoidable. I'm very interested in a machine with no moving parts. So far the only one I've found is the Dell Inspiron Mini 9, which has passive cooling, so no fan, and of course uses a SSD. I'm not completly sold on it though -- its battery is only a 4 cell; its wifi may not be well supported. The Eee 901 is attractive due to its battery, but has a fan. I'm very noise sensative these days, and the fan would have to be whisper quiet to be acceptable. And even then I think it would annoy me. (Even quiet laptop hard drives annoy me.) All in all, I wish I could wait another 6 months to a year and see if the next generation improves any. OTOH, I could buy both of these for less than the price of my current laptop.

John Goerzen: If Programming Languages Were Christmas Carols

Last spring, I posted If Version Contol Systems Were Airlines, which I really enjoyed. Now, because I seem to have a desire to take a good joke way too far, it’s time for: IF PROGRAMMING LANGUAGES WERE CHRISTMAS CAROLS I apologize in advance. (Feel free to add your own verses/carols in the comments.) Away in a Pointer (C) (to Away in a Manger) Away in a pointer, the bits in a row.
A little dereference to see where they go.
I look down upon thee, and what do I see?
A segfault and core dump, right there just for me. I saw thy init there, a reaping away
My process, from its address space, so sorry to say.
I thought I had saved thee, from void pointers all,
But maybe I missed one, and doomed you to fall. Be near me, debugger, I ask thee to stay
Close by my terminal, and help me, I pray;
To find all the bugs and the void pointers too,
And if my kernel oopses, help me reboot for you. Joy to the Wall (Perl) (to Joy to the World) Joy to the Wall, the Perl is come!
Let awk receive her King;
Let every grep prepare him room,
And bash and sed shall sing,
And bash and sed shall sing,
And bash, and bash, and sed shall sing. Joy to the keyboard, we’ll use it all!
Let men, shift keys, employ;
Implicit variables, and globals never fall.
Repeat the line noise now,
Repeat the line noise now,
Repeat, repeat, the line noise now. Perl rules the world with truth and ASCII,
And makes the doctors prove
The glories of carpal tunnel hands,
And we do it more than one way,
And we do it more than one way,
And we do it, and we do it, more than one way. Hark! The Herald Coders Sing (Haskell) (to Hark! The Herald Angels Sing) Hark! The herald coders sing,
“Map and fold, recursive King;
Recursion and patterns wild,
Pure and IO — they’re reconciled!”
Joyful, all ye functions rise,
Join the typeclasses of the types,
With recursion, do proclaim,
“Laziness is born in this domain.” Refrain
Hark! The herald coders sing,
“Map and fold, recursive king!” Monads, by highest Heav’n adored;
Monads, their depths still unexplored;
Late in time, behold they’re good,
Never once were understood.
Veiled in functions, the Monads stay,
Used for IO, and more, each day,
With excitement, Monads say,
“Arrows are stranger, so with us stay.” (Refrain) Hail the glorious compiler of Glasgow!
Hail the threaded run-time system!
Join the beautiful Cabal of Hackage,
Upload there thy perfect package.
We know best, what we will Handle,
You’re safe with us: no pointers, no vandals.
Born to make your exceptions throw,
Unless you unsafePerformIO. (Refrain) Lispy the Paren (to Frosty the Snowman) Lispy the paren was a jolly happy soul,
With a lot of cars and a little cons
And two ends made out of curves.
Lispy the paren is a fairy tale, they say,
He was just common, but the children know
how he came to life one day.
There must have been some magic in that
Old Symbolics they found.
For when they placed him on its disk,
It recursed around and ’round. O, Lispy the paren,
Was recursive as can be.
And the coders say it would take a day
To put his parens away.
Clunkety clunk clunk,
Clunkety clunk clunk,
Look at Lispy go.
Clunkety clunk clunk,
Clunkety clunk clunk,
Consing on the car. Lispy the snowman knew
The keyboard was hot the day,
So he said, “Let’s cons and we’ll have some fun
now before they Scheme away.”
Down to the function,
With a list there in his RAM,
Running here and there,
all around the LAN, saying
“cdr me if you can.”
He led them down the streets of disk
Right to the traffic bus.
And only paused a moment when
He heard them holler (quit). Oh BASIC Night (to O Holy Night) Oh BASIC night, the LEDs are brightly glinting;
It is the night of the dear GOSUB’s birth!
Long lay the world in sin and error printing,
Till you appeared and the RAM felt its worth.
Shiver of fear, line numbers do inspire,
For yonder breaks a mostly harmless GOTO.
Fall on your bits, O hear the Visual voices!
O BASIC divine, O BASIC where GOTO was born!
O BASIC, O Holy BASIC, O BASIC, you’re mine! Some want to say, “GOTO is harmful always,”
But what of them, in their post-modern world.
We PRINT the truth, in the line-numbered goodness,
But Dijkstra appeared, and the faith, it was lost.
A thrill of hope, when .NET BASIC announces,
But Visual BASIC, what kind of thing are you?
Fall on your GUI, O see the old line numbers!
Behold BASICA, O BASIC when DOS was born!
O numbers, O lines, spaghetti divine! Guido We Have Heard on High (Python) (to Angels We Have Heard on High) Guido we have hard on high
Sweetly indenting o’re the code,
And the functions in reply
Their exceptions sweetly flowed. Refrain Indent….. in your whitespace careful!
Indent…… in your whitespace careful! Spaces, why this jubilee?
Why semicolons have you so wronged?
What backslashes must we use
If we want our lines so long? (Refrain) Come to Guido here to see
“One Right Way” is good, of course.
There’s no need for Perl, you know,
We have to be more verbose. (Refrain) Now the PEP will show the way
To the future, we shall see.
Banish lambda and the rest
Of the things we liked the best. (Refrain)

Alexander Reichle-Schmehl: Dear Lazyweb,

I have several Linux systems (mostly workstations) which are in desperate need of a backup solution. However the "official" backup server runs Windows 2003. It's out of a questions to migrate that to a better system. Now I'm wondering about a good backup strategy... and am failing to find a working software. Constraints: I want' to have weekly full backups and daily incremental backups. I would like to have a central service, where I can see if some machines haven't been backed up for some time (ideally I would like to get a mail, if a machine hasn't been backed up for some time). It would be nice if I didn't need to install any special software on the systems to be backed up; but if it can't be done otherwise so be it. I have the resources to set up an additional Linux systems, but due to various circumstances the hard discs I can use in that machine are not very reliable. Therefore backups must end on the Windows system; either directly or via cifs / network share. So far I have looked at BackupPC which seems very nice, but depends on a file system supporting hard links. Which isn't the case here :( Bacula seems a bit overkill, but better to much functionality than missing functionality ;) However, Bacula needs a Database, and I wouldn't know where to set up that. As said, the local Linux system which would run the backup server might have a disc crash, therefore the database should run somewhere else. Bacula may use SQLite as database; where I could store the SQLite files on the Windows server via network share, however the Bacla Documentation doesn't recommend using SQLite on a production environment. I looked at amanda, too; but honestly I didn't understood the documentation very well :( So much for the first ideas... Any good pointers where I should go next? I know, it's a quiet unusual scenario, but there must be some kind of solution, mustn't it?

David Moreno Garza: Book meme

“De esta triste estancia en la capital de Colombia se rescata el que pudieron ver jugar al m tico Real Madrid contra el Millonarios.” Translation: “From this sad stay in the capital of Colombia, it was worth they saw the mitical Real Madrid play Millonarios.” From Ernesto Guevara tambi n conocido como el Che (Ernesto Guevara also known as Che), by Paco Ignacio Taibo II.

Julien Danjou: Implementing desktop notification in awesome

Since version 3.1, awesome is bundled with naughty, a notification library which allow to raise pop-up in front of the screen to display information you chose. A sort of notification-daemon, but not plugged into D-Bus. Last days I've began to work on awesome 3.2 (aka the 'next' branch in awesome repository). I've started to chat with Leon Winter on IRC about the possibility to implement notification specifications into awesome. awesome had since version 3.0 a very light D-Bus support, since it only allowed to evaluate Lua remotely, without getting an answer anyway. I've hacked it so now there's a D-Bus hook, which is called upon a D-Bus message received. This, plus the possibility to return various data type (not all are implemented as of this day) allowed Leon to enhance the naughty library and to add support for a primary notification support. I just have to add more D-Bus data type support, and we may be able to support all the specs, with icons support, etc.

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.

Gintautas Miliauskas: Book meme

I am a bit of a bookworm, so I could not resist this meme: The book is actually a Lithuanian translation, but I'll translate the sentence into English for you: After entering the palace, he seduced the king's wife, killed the king with her help and seized his throne. Can you guess which book the sentence is from?

Martin Michlmayr: Case stories of good and bad community interaction

It is often argued that companies have to work with the FOSS community and there are good reasons for doing so. I've tried to collect a number of case stories of good and bad community interaction that may help as a starting point for further exploration of this topic: Can you think of other examples? (Originally published on FOSSBazaar where comments are possible)

19 November 2008

Junichi Uekawa: Macbook dmesg.

Macbook dmesg. I've got a new macbook (MacBook 4,1). dmesg is noisy, something is wrong. It's telling me it's having something wrong with /dev/hda several times a second.

18 November 2008

John Goerzen: Real World Haskell Update

Times are exciting. Our book, Real World Haskell, is now available in a number of venues. But before I get to that, I’ve got to talk about what a thrill this project has been. I created our internal Darcs repository in May, 2007. Since then, the three of us has made 1324 commits — and that doesn’t count work done by copyeditors and others at O’Reilly. We made available early drafts of the book online for commenting, which served as our tech review process. By the time we finished writing the book, about 800 people had submitted over 7,500 comments. I’ve never seen anything like it, and really appreciate all those that commented about it. As for availability, RWH is available: People are talking about it on blogs, twitter, etc. We’re excited!

Uwe Hermann: Migrating bdb svn repositories from one version to another and to fsfs

Today I had to work with a really old svn repository again, which was still in the old bdb format (not in the newer and recommended fsfs one). This caused quite some problems, like, um... you cannot checkout, update, or commit anything. $ svn co file:///path/to/myrepo
svn: Unable to open an ra_local session to URL
svn: Unable to open repository 'file:///path/to/myrepo'
svn: Berkeley DB error for filesystem '/path/to/myrepo/db' while opening environment:
svn: DB_VERSION_MISMATCH: Database environment version mismatch
svn: bdb: Program version 4.6 doesn't match environment version 4.4 A quick search revealed that this is bug #342508, a solution is/was supposedly mentioned in /usr/share/doc/subversion/README.db4.3 (which does no longer exist in the Debian unstable package). Luckily this blogpost has some details. So, the short HOWTO for upgrading an svn repository of one Berkeley DB version to another one is: $ cd /path/to/myrepo/db
$ db4.4_checkpoint -1
$ db4.4_recover
$ db4.4_archive
$ svnlook youngest ..
$ db4.6_archive -d In this case I upgraded from 4.4 to 4.6 (do "apt-get install db4.4-util db4.6-util" if necessary). While I was at it, I also switched the repository to the fsfs format then: $ svnadmin dump /path/to/myrepo > myrepo.dump
$ mv /path/to/myrepo /path/to/myrepo.bak
$ svnadmin create --fs-type fsfs /path/to/myrepo
$ svnadmin load /path/to/myrepo < myrepo.dump Maybe this is helpful for some other people out there.

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

MJ Ray: How to Check Web Shops for Basic Security

I just had a very nice chat on the phone with a man whose first attempt at online shopping seemed to have resulted in a fraudster using his card to buy mobile phone top-ups. I don’t understand why he called us (it wasn’t one of my web shops), but I hope I did the right thing by directing him back to his credit card company’s fraud department. While I was talking to him, I was checking the shop he had problems with. I wouldn’t have bought from it. Here’s how I checked it:- 1. Check the Page Open the front page of the site in one browser window and then use another window to get to a page that ought to be secure (the payment/checkout page is my usual one). Look at them both. Do either of them show any logos from well-known payment (Barclays, RBS, Protx, …) or security-checking services (thawte - who else?)? That’s not entirely reliable, but it’s usually a good sign because those companies attack people using their marks without permission. Look at the payment/checkout page - does the address in the address bar start “https”? If so, is the padlock in the browser status bar (usually bottom right) closed? That usually means it’s encrypted with a Secure Sockets Layer (SSL) certificate. 2. Check the Certificate Open the certificate details. In Firefox-based browsers, double-click the padlock, then click the “View Certificate” button. Then pick “Subject” in the second list box. Usually, it looks like this:-
screenshot

Basic Certificate Screenshot


in that case, as long as the “CN” (common name) is the webserver you thought you were using and the “O” (organisation) and country code (C) make sense, then there’s nothing wrong. Some shops now use Extended Validation certificates and give a bit more information. Here’s one from a train company:-
screenshot

Extended Validation Screenshot


In addition to the CN and O, it shows Organisational Unit (OU), Location (L), State (ST) and also other address parts and company number that Firefox doesn’t display neatly. This is a bit more reassuring, but also a lot more expensive for the shop owner (around 20 times more, last I checked), so I don’t blame shops for not using them. 3. Check the Registrations By this point, the payment processing and actual transaction are looking pretty good. Finally, I check the recipient. Find the business details on the web shop. Does it include a geographic address? If it contains a company registration number, look it up on the Companies House website. Then I find the business details on the domain names - you can use CoolWhois to look up domain names. If any of the addresses or numbers don’t match (Website, SSL Certificate, Whois), then I call them to ask why their website says they’re based in Bristol but their domain name is registered to Bolton. If they don’t answer messages, or - worse - the domain name says “Non-trading Individual” and the address has been omitted from the public listing, I give up on them and look for another shop. There’s no point securely paying someone that you can never reach if there’s a problem. 4. Buy Stuff and Check the Statements All being well, I then buy stuff and check my credit card statement each month before I pay it. I think any web shop owner (or webmaster - I help some people with this sort of thing) should be taking care of the basics above. Do your shops measure up? Despite the above checks, I can only remember not buying something online once in the last year. A couple of times, I’ve worked through the above steps and it’s changed which shop I bought from - and I’m pretty sure it saved me from losing 400 on one purchase.

John Goerzen: Web Design Companies That Understand Technology

There are a lot of companies out there that do web design work that looks fabulous. Unfortunately, a lot of these sites look fabulous only when viewed in IE6 build xxxx, with a 75dpi monitor, fonts set to the expected size, running on Windows XP SP2, with JavaScript enabled. Try looking at the site through Safari, Firefox, with larger-than-expected fonts, and things break down: text boxes overlap each other, buttons that should work don’t, and it becomes a mess. So, if your employer wanted a web design company that has a good grasp of Web standards and the appropriate use of them, where would you look? A company that can write good HTML, CSS, and JavaScript, and still make the site look appealing? A company that has heard of Apache and gets the appropriate nausea when someone mentions ColdFusion or Frontpage? So far, I’ve seen these places mentioned by others: WebDevStudios.com
Happy Cog
Crowd Favorite

Alastair McKinstry: Hubble open for Business

Just as life was getting frantically busy, and as catdynamics predicted, Hubble is back open for business with a Supplemental Call for Observing Proposals. So an idea I bounced off my supervisor has rebounded with a deadline attached. Fun predicted. Tags , ,

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.

MJ Ray: Connecting from the k608i with SSL

The mobile phone I travel with is pretty good and I use JabberMixClient to instant message from it. Version 2.1 finally got rid of the avatar-replacement bug, so I only wanted to solve my inability to make an SSL connection to our servers. (The linked email is slightly wrong: it’s signed by our own Certificate Authority, not self-signed.) The answer was to install TTLLP’s Certificate to the phone, as suggested on Sony Ericsson’s developer site. After a few unsuccessful atttempts, I corrected my two mistakes: firstly, I needed to install our CA certificate, not the server certificate; secondly, use PEM format, like on tjworld’s k800i. The exact command was obexftp -b $PHONE -p ca.pem and then the phone prompted me whether I wanted to install it. Now I can jabber from the phone without the phone company eavesdropping and without having to MidpSSH to a server. Can’t I?

Next.

Previous.