Search Results: "ag"

23 April 2009

Sean Finney: embedding youtube videos in ikiwiki

so i had a couple videos to mention and i figured i'd use the chance to write an ikiwiki template to do so. it's not the most flexible, but it works! current template code, put into templates/youtube.mdwn:
<div class="youtube">
 <object width="445" height="364" 
     data="http://www.youtube-nocookie.com/v/<TMPL_VAR raw_v>&fs=1&border=1" >
  <param name="allowFullScreen" value="true" />
  <param name="allowscriptaccess" value="always" />
  <param name="movie" 
     value="http://www.youtube-nocookie.com/v/<TMPL_VAR raw_v>&fs=1&border=1" />
 </object>
</div>

using it:
[[!template  id=youtube v="sPq3c5D65hE"]]

gets you:
(not sure if that will show up on a syndicated site) it's also xhtml compliant, unalike the default "share this" text and what's produced by the deprecated embed plugin. it also uses the "no automatic cookies" option provided by youtube. i might try and break out a few more options into parameters the next time i post videos. on a related note, does anyone know a good way to include/display the code of a template on a page? this stuff here is just cut/pasted but it would be nicer to be able to not have to do that to keep it up to date.

Biella Coleman: Viral Videos

I am sure many have seen this video pirates. drugs. gay marriage and I think it speaks for itself. But I have to say, this video caught be off guard early this morning when I am first exposed to the day s viral videos, memes, and other savory and unsavory delights. Though I have been consuming and digesting this stuff for awhile now, I am still amazed by the craziness, creativity, outrageousness (often offense) that circulates every day, without fail, on the internets. Most of the stuff, even if pretty low brow can be said to be artistic in one classical sense of art: l art pour l art , with the aesthetics being focused on some combination of shock, irony, and humor. But how about the political activists? They are not dipping into this genre enough and it s high time they use start using these tactics/viral videos to shock/shame their opponents, using the sugar coating of humor and raw audacity to spread their message.

Petr Rockai: darcs sprint 2009-04

As you might know, as part of the Haskell Hackathon 5 in Utrecht, the second darcs hacking sprint took place. Thanks to generous donations to the Darcs project, I have been able to attend. I took the overnight train from Prague on Thursday evening interestingly, we managed to accumulate about 90 minute delay in Germany, but by skipping some detours (throwing passangers out at more convenient ones) we managed to get to Utrecht on time. (Wow.) After a while of confusion, we managed to get our strippencards and find the right bus and get to the UU campus (at that time, we have already met with Thorkil, whose train was combined with mine in the middle of the night somewhere in Germany). The first thing there was to get our name tags and a round of introductions followed I was fairly surprising by (large) number of darcs hackers among the general Haskell population present at the Hackathon. Overall during the sprint, various topics have been discussed ranging from theory issues to actual implementation bits in current darcs. Some roadmapping has taken place. It was great to see all those darcs people together. More interestingly, it sort of convinced me that actually something is going on with darcs. Although most people seem to be pretty short on time, at least I got the impression that people have actual intent to keep advancing darcs, in one form or other. Also, there s been some preliminary plotting on what is the life expectancy of darcs 2, roughly. My current plan is to use darcs 2 as an implementation vehicle, because people use it in real life, for carrying out the actual work on hashed-storage. That way, we should be able to de-couple low-level repository and file access code from darcs itself, also meaning it should be reasonably easy to plug it into camp later (or maybe it turns out we instead want to remodel darcs so that we can plug camp-core in time should tell). We have done some bits of work on darcsit (gitit) migration of wiki.darcs.net, although it hasn t been so much of a smooth sailing. I have even tried to set up gitit on one of my machines, but cabal-installed happstack went eventually crashing and burning instead of doing anything useful. I m stuck on that front, hoping that Eric and Gwern can get test.darcs.net running within reasonable resource usage. I have thrown a chat with various people about hashed storage and I have explained various problems of the current darcs hashed repositories and how hashed storage addresses those. Also, I have talked with Benedikt about his filecache and we entertained some initial thoughts on how those two play together. We have also spent a while at a whiteboard with Eric discussing what needs to be fixed in sources handling: the file that lives under _darcs/prefs/sources and that keeps track of related branches of a given repository. The catch is, that when inappropriate entries get into that file, bad things can happen: darcs repeatedly waiting for a nonexistent remote machine to answer, or triggering automount a few thousand times by probing just the wrong directory. These need to be remedied and we came up with a reasonable action plan. Hope to have this in 2.3, as it should be moderately hard to fix and it has potential to sweep a fair amount of silly and obscure performance bugs. All in all, it seems to me that the important part of the sprint this time was talking to people and thinking about things. Still, I did manage to get some hashed-storage coding done (but mostly cleaning up and documenting work) during the sprint. I expect the fruit of the sprint discussions to take shape in form of code improvements in following months.

Joey Hess: AT blogs

Finding power and internet to post to a blog while hiking for half a year up the Appalachian Trail doesn't seem like a very likely combination, but nowadays some people manage it in various ways. I've read and enjoyed three or four books about AT thru-hikes, but blogs are a more immediate, interactive medium. I've been following with interest a group who came down with food poisoning as they hiked along the Holston Mtn. ridge in my "backyard" and look forward to reading about others as they pass by. So, I'm aggregating all such blogs I can find for the 2009 season on a page I call Planet A.T.. It's a nice way to read these contrasting accounts juxtaposed together in real time. One includes cell phone photos and fairly frequent updates of a hiker who's already reached Damascus; another is frequently updated by Blackberry by a guy I could well have crossed paths with on Roan this week; another has more infrequent, interesting long essays by a hiker who has just reached Tennesee; another is a teacher sending educational videos home to his school. There's even an 86 year old who I understand is the oldest person to hike the whole trail -- and is doing it again. I thought I'd only find a few blogs, but I've now added over a hundred! So maybe one in ten of all thru-hikers this year have a blog. And the number of bloggers will presumably dwindle toward twenty-five before they reach the end in Maine.

Holger Levsen: beautiful blend

Even if I knew about the BrDesktop project for some years, I never really saw it. Then by chance, I stumbled on their webpage, which has beautiful screenshots of a pure blend Debian installer and an understandable download page.

And the best is, it's pure Debian! Very nice work.

Romain Beauxis: Lastfm no longer free as in free beer (and some bits about xml in OCaml)

Lastfm no longer free as in free beer As I was trying move the code of ocaml-lastfm [1] from the unmaintained xml-light [2] to xmlm [3], I discovered that it now fails to request track in anonymous mode. Then, I went on the lastfm [4] site, and discovered that now I cannot find any full content available for anonymous users. Some more researches and I found this [5]:
Today we are making the changes to the radio that were previously announced here. This means that from today, listeners to Last.fm Radio outside of the USA, UK and Germany will be asked to subscribe for 3.00 per month, after a 30 track free trial period. In the USA, UK and Germany, where it's feasible to run an ad-supported radio service, there won't be any changes. Everything else on Last.fm (scrobbling, recommendations, charts, biographies, events, videos etc.) will remain free in all countries, like it is now.
JPEG - 42.5 kb
Alcool ! Voil l'ennemi.
Poster by French painter and missionary Fr d ric Christol (1850-1933) warning of the dangers of absinthe and other alcoholic drinks.
Although I will not comment this with the same violence as in the comments of the above message, this is not a good news at all. I totally understand how it can be difficult to find financial resources for this kind of business, and how complicated it can be after few years to maintain an activity that initially was breaking new and attracting investors. However, given the current global [6] propaganda [7] campaign [8] that is organized [9] by the major music companies, I do not believe this decision has only to do with lastfm's financial resources. In particular, also the legality of Deezer [10] was challenged by universal [11] such that they had to require registration [12] and also limit drastically the available titles. The current situation is now really becoming worse and worse. Not only the music companies are trying to push for dangerous laws for the civil rights while pretending to fight against illegal music sharing, but also they are trying to shutdown all the new competitors that were successful in doing exactly what they refused to do during the same time. All of this is just simply pathetic, and I strongly hope there will soon be an end to this, which will surely mean for these companies adapt or perish.. Or perhaps they plan to impose their restricting and dangerous laws in any country in the world ? Another remark about all this is that it clearly demonstrate the importance of having the right to copy and store for your own usage any copyrighted material. Indeed, these are not only products but also artistic productions, and for this reason it is important to be able to save them in some place in order to not loose track of it if the streaming company was to be shutdown, as it seems to be the trend now.
JPEG - 71 kb
Viktor Oliva: The Absinthe Drinker.
The original painting can be found in the Caf Slavia in Prague.

Moving from xml-light to Xmlm The other part of this post is about moving from xml-light to xmlm. This is in fact very easy, and should only be a matter of adding a piece of code like this:
type xml =
Element of (string * (string * string) list * xml list)
PCData of string

let parse_string s =
let source = String (0,s) in
let input = Xmlm.make_input source in
(* Map a tag representation in xmlm to
* (name, attributes list) where attribute = string*string. *)
let make_tag (x,l) =
(* Forget about the uri attribute *)
let l =
List.map (fun ((_,y),z) -> (y,z)) l
in
snd x,l
in
let rec get_elems l =
if Xmlm.eoi input then
l
else
match Xmlm.input input with
El_start tag ->
let elem = get_elems [] in
let (name,attributes) = make_tag tag in
get_elems ((Element (name, attributes, List.rev elem)) :: l)
El_end -> l
Data s ->
get_elems ((PCData s) :: l)
Dtd _ -> get_elems l
in
let elems = get_elems [] in
Element ("", [], List.rev elems)
This is a very simple code that surely needs more fixes, but starting from that, you can parse a string into an equivalent representation of the xml data, and then use it as before in your code..


[1] Ocaml-lastfm: http://www.rastageeks.org/lastfm.html [2] Xml-light: http://tech.motion-twin.com/xmlligh... [3] Xmlm: http://erratique.ch/software/xmlm [4] Lastfm: http://www.last.fm/ [5] "Radio Subscriptions": http://blog.last.fm/2009/04/22/radi... [6] "New Zealand: safe from Big Music. Or is it?": http://www.p2pnet.net/story/19074 [7] " La Quadrature du Net discr dit e aupr s des d put s anti-Hadopi": http://www.numerama.com/magazine/12.... Link is in french. It explains how, after filling a so-called petition with hundreds of signatures from employees presented as artists, or artists abused by the presentation of the content, these companies complain about the "totalitarian methods" used to verify the validity of the signature, which were simply based on the public available information on these names on the web, while they propose a system that would automatically cut the internet access to probably 1.000 people a day in France... [8] "Faux proc s : Les pirates paient": http://www.ecrans.fr/Faux-proces-Le.... again, in french, the article reports a Danish study that prove once again that people who tend to download a lot of music are also much more likely to spend their money in the music business, being concert, records or else.. [9] ""Three strikes" for Ireland - Eircom, music industry settle filtering case": http://tjmcintyre.com/2009/01/three... [10] Deezer: http://www.deezer.com/ [11] "Universal Music challenges the legality of Deezer, a free streaming website": http://french-law.net/universal-mus... [12] "Now Deezer Required Registration": http://forums.techarena.in/technolo...

Adrian von Bidder: Let's kill KHTML

Reading Kyle's view on Konqueror and KHTML's current status: I couldn't agree more. I use konqueror instead of Firefox because I quite like its GUI, and its integration into KDE is obviously better than Firefox'. Issues with various websites prompt me to have an Iceweasel window open as well quite a large part of the time. Let's just switch to WebKit, so the market only has to care about Gecko and WebKit and can ignore one more marginal rendering engine. I see libqt-webkit 4.5 is in experimental and a Google query on debian konqueror webkit at least shows an Ubuntu packaging effort of the Konqueror WebKit KPart, so the days of khtml on my Desktop are certainly nearing its end. At this point: Kudos to the KDE folks (Debian and upstream). KDE4.2 is really, really usable, the remaining issues are really small. And, if I don't try to manually interfer like I did in my first attempt, migrating the KDE settings from ~/.kde4 to ~/.kde actually did work just fine on my netbook.

Manoj Srivastava: Manoj: Ontologies: Towards a generic, distribution agnostic tool for building packages from a VCS

This is a continuation from before. I am digressing a little in this post. One of the things I want to get out of this exercise is to learn more about Ontologies and Ontology editors, and on the principle that you can never learn something unless you build something with it (aka bone knowledge), so this is gathering my thoughts to get started on creating an Ontology for package building. Perhaps this has been done before, and better, but I ll probably learn more trying to create my own. Also, I am playing around with code, an odd melange of my package building porcelain, and gitpkg, and other ideas bruited on IRC, and I don t want to blog about something that would be embarrassing in the long run if some of the concepts I have milling around turn out to not meet the challenge of first contact with reality. I want to create a ontology related to packaging software. It should be general enough to cater to the needs any packaging effort in a distribution agnostic and version control agnostic manner. It should enable us to talk about packaging schemes and mechanisms, compare different methods, and perhaps to work towards a common interchange mechanism good enough for people to share the efforts spent in packaging software. The ontology should be able to describe common practices in packaging, concepts of upstream sources, versioning, commits, package versions, and other meta-data related to packages. vcs-pkg concept diagram I am doing this ontology primarily for myself, but I hope this might be useful for other folks involved in packaging software. So, here follow a set of concepts related to packaging software, people who like pretty pictures can click on the thumbnail on the right:

Y Giridhar Appaji Nag: Today's vote

Dear Friends,

When you go out to vote today, please remember that it is most likely not local issues that should dominate your choice. The fact that there is a perpetual ditch on your way to work, no bus shelter at the bus stop that you use, or a poor neighbourhood road that disappears each monsoon should not determine the choice of candidate. Your MP doesn't have much to do in these areas, at-best they can spend the Rs. 2 crore under the MPLAD scheme to try and keep you happy. Local issues should be your primary concern in the municipality elections or perhaps in the legislative assembly elections, not in the general elections.

The members of parliament decide policy, laws and future of the country at a national level. You should be worried about their participation in the law and policy making process (what issues did they bring up in the parliament, which laws do they support, what questions do they ask in the sessions etc.). Please do keep that in mind. Some of the candidates may even take up issues that are clearly not important for the city in which you live, that is OK (like I said before, these are not your local elections).

Also, don't hesitate to vote for an independent candidate or a candidate from a small party just because they don't belong to a popular national level or state level party. While you may feel that your vote isn't being "used" well, you would want to encourage good people to contest elections. Having them lose their deposit each time they get into the fray is not the way to do that.

Thank you.

22 April 2009

Joachim Breitner: Buzz free

My Openmoko FreeRunner suffered from the infamous hardware bug that causes bad buzzing for my dialog partner, making it relatively useless for me. Last week, though, a collegue of my brother fixed it for me (by applying some soldering-skills), and indeed, the audio quality is above bearable now! I plan to get Debian on the FreeRunner up to date again with the other developments in the community now. Or at least soon, depending on how much time I ll be able to spare.

Russell Coker: Links April 2009

P. W. Singer gave an interesting TED talk about the use of robots in war [1]. He briefly covered some of the ethical and social issues related to robot soldiers as well as showing many pictures of existing robots. Since November 2007 there has been a request for Google Gears to support Iceweasel (the Debian name for Firefox due to trademark issues)[2]. Apparently supporting this different name is not easy for the Google people. If you visit the Google Gears Terms and Conditions page [3] then it will work with Iceweasel on the i386 platform - but not for AMD64 (or at least not my Debian/Lenny AMD64 system). Charles Moore gave a disturbing TED talk about the Great Pacific Garbage Patch [4]. Pollution in the oceans from waste plastic is worse than I realised. Ressuka documented how to solve the Time went backwards problem on Xen DomUs [5]. Run echo jiffies > /sys/devices/system/clocksource/clocksource0/current_clocksource or use clocksource=jiffies in your DomU kernel boot parameter list. Nassim Taleb [6] has written Ten principles for a Black Swan-proof world [7], this is in regard to the current US financial crisis. It s worth noting that he made a significant amount of money due to successfully predicting some aspects of the crisis. James Duncan Davidson has some good advice for speakers based on his experience in filming presentations [8]. Some of the ones that were not obvious to me were:
Take off your name-tag - it doesn t look good
Stay in the part of the stage with the best light

Gunnar Wolf: Rodrigo denying evasions and religion

Umh, is today the quote your neighbour day? No? Thought so... Still, for the second time in a couple of minutes, I'm quoting/translating here. This time, I'm quoting a short text posted by fellow Mexican Debian guy Rodrigo Gallardo: Deceptions (hmm... Not in the let you down sense, but in the deceiving sense. Sometimes it is hard to translate a single word without twisting it around). My translation is far from perfect - Read it in Spanish, you will enjoy it more. Rodrigo says:
Things and actions are what they are, and the consequences of them will be what they will be; why then should we desire to be deceived? Joseph Butler
I was in Colima, sitting on a slide in a city park, that day I understood why somebody might want to be drunk. Several years later, this time in Tlalpan, I understood why somebody would want to believe in a god. And sometimes I am truly sorry not to be able to embrace neither of both longings. The idea of letting go the facts, to believe they have an inner order, although covered in mistery, or they are just far away, blurry. But where others see destiny, I see things falling naturally in their place. Where others see beauty in the mistery, I see a challenge. And even more beauty in an elegant explanation, in understanding. Motivation, not in the promise of future welfare but in the certainty of this limited but tangible present welfare. Freedom in the absence of a purpose, and inmortality in the little pebble I am in the great human building. I suppose that if Revernd Butler knew his phrase inspired this divagation, it would not make him precisely happy. But, things are what they are, and his argument says what it says.

Alastair McKinstry: pkg-config, -as-needed and multiple compilers

At work I've been promoting the use of pkg-config and modules to solve the problems of avoiding hard-coded paths and an environment where we've multiple compilers. In summary, "module load intel-cc" to load the intel compiler, "module load netcdf-intel" to, which among other things appends /ichec/packages/netcdf/4.0-intel/pkgconfig to $PKG_CONFIG_PATH, and then:
NCDF_INCS :=  pkg-config netcdf --cflags 
NCDF_LIBS :=  pkg-config netcdf --libs 
in the application code. Replace "intel-cc" and "netcdf-intel" with "gcc" and "netcdf-gcc", and it builds with gcc. This would work better if upstream supplied .pc files, which means the next stage in world domination is to send patches to do just that. But it's not that easy, apparently. netcdf (for example) supplies two libraries, libnetcdf.so and libnetcff.so, with the second including code only needed for Fortran. So, for gcc I have the following netcdf file:
prefix=/ichec/packages/netcdf/4.0-gcc
exec_prefix=$ prefix 
libdir=$ prefix /lib
includedir=$ prefix /include
Name: netcdf
Description: netCDF libraries, include files and development tools (gcc version)
Version: 4.0
Libs: -L$ libdir  -Wl,--as-needed -lnetcdf   -lnetcdff 
Cflags: -I$ includedir 
While for Intel I have:
prefix=/ichec/packages/netcdf/4.0-intel
# Add fortran libs 
forlibs=/ichec/packages/intel/fce/11.0.081/lib/intel64
exec_prefix=$ prefix 
libdir=$ prefix /lib
includedir=$ prefix /include
Name: netcdf
Description: netCDF libraries, include files and development tools
Version: 4.0
Libs: -L$ libdir  -lnetcdf -L$ forlibs   -lnetcdff -lifcore
Cflags: -I$ includedir 
The main problem is that --as-needed is not understood by non GNU-ld linkers, and must be conditionally removed somehow. Any ideas ? (There is a second wrinkle of needing to add additional libraries for Intel Fortran here, but I'm sure I can remove that with the addition of more .pc files.). A second issue is that --as-needed can break otherwise working pkg-config usages. Thanks to galtgendo at PhP Bugs for this example:
alastair@ailm:~$ cc -o testx  -Wl,--as-needed  pkg-config glib-2.0 --cflags  test.c  pkg-config glib-2.0 --libs 
works, but:
alastair@ailm:~$ cc -o testx  -Wl,--as-needed  pkg-config glib-2.0 --cflags    pkg-config glib-2.0 --libs  test.c
/tmp/ccsUEwtk.o: In function  main':
test.c:(.text+0x20): undefined reference to  g_print'
collect2: ld returned 1 exit status
The problem being that --as-needed removes libraries as unnecessary before the linker sees the test.o code. Tags , , , , ,

Gunnar Wolf: The streets and the numbers of Cuernavaca

I usually use this blog to post about stuff I have written or that is somehow related to my work / professional life. This time, however, I'll just use it to share with you a short text my father published in the column he writes in the La Uni n de Morelos newspaper, Academia de Ciencias de Morelos: La Ciencia, desde Morelos para el mundo. My father has lived for over 20 years in Cuernavaca, la Ciudad de la Eterna Primavera (the city of the eternal Springtime), ~80Km south of Mexico City. Cuernavaca was for long years known mostly as a weekend city for Mexico City's middle-upper class, but it has grown way beyond that. According to Wikipedia, in Cuernavaca's metropolitan area there are about 700,000 inhabitants. And the city is blatantly built with no planning, no urbanistic analysis of any kind. I have been familiar for many years with the program to put some rational order renumber Cuernavaca's streets. Roberto Tamariz, the sociologist who built my father's house (yes, in a stroke of genius he acted as an architect for a piece of land he had bought - the results are quite decent, given his real occupation, but his lack of architectural background tends to literally come up from the floor every now and then), was involved in a municipal project to renumber Cuernavaca's streets, probably some 15 years ago. Anyway, Roberto's work was never really finished due to the severe lackings of our political culture. In this (one-and-a-third pages long, quite easy to read) text I am attaching to this post, my father writes about Cuernavaca's strange street naming system, the mathematical solutions (and political intrincacies) about renumbering a two dimensional space (and, of course, he could not help but wander into the third- and fourth-dimentional spaces, although very briefly). I like how this guy writes, all in all. Enjoy!
AttachmentSize
Calles y numeros de Cuernavaca.pdf231.99 KB

MJ Ray: UK Budget Day 2009 and other days

The UK Budget is out. I m pretty disappointed for TTLLP - the headlines for business look rather unhelpful to our co-op. I m thinking that our co-op will see more benefit from the EU capping mobile telecoms prices, Earth Day or even Plone Day than UK Budget Day 2009. What s in the UK budget for you? I may have missed something useful for cooperatives, so please tell us if you spot something in it for us, too!

Martin Michlmayr: OSI signs an MOU with the Korea Software Copyright Committee

I visited Seoul last week to represent the Open Source Initiative (OSI) at an open source conference and to sign a Memorandum of Understanding (MOU) with the Korea Software Copyright Committee (SOCOP). SOCOP organized a conference with the title "Free Open Source Software License Insight Conference", and the international speakers included Brett Smith of the FSF, Brendan Scott of Open Source Law, Michael Cot of RedMonk and myself. From the questions we received, it seems that there is a lot of interest in legal questions related to open source. There were a number of folks from hardware companies that asked specific questions what they could do and couldn't do (e.g. related to including sources for GPL code and properly giving credit for BSD code). I think the conference was a great success. The talks were of high value and we got good questions. The audience was quite mixed, ranging from managers to developers. Even though they had simultaneous translation of the talks, the majority of the people listened in English... this gives me hope that some of these folks will end up becoming involved in the international open source community. Mr Koo and Dr Michlmayr signing MOU SOCOP is working on a number of activities related to open source, including: The day after the conference, I went to the SOCOP office to sign the MOU between SOCOP and OSI with Mr Yung Bo Koo, the chairman of SOCOP. The MOU says that we'll share knowledge and expertise, help with promotional activities and support each other's activities in other ways. I was delighted to sign the MOU between SOCOP and OSI, and I look forward to a fruitful cooperation between our organizations in the future. It's great to see so much interest and so many activities around open source in the Republic of Korea.

Dirk Eddelbuettel: Boston Marathon 2009

Monday was the 113th Boston Marathon. Just like in 2007 (and having skipped last year as I ran London the week before), I went as part of a group of local running friends. We once again had a blast---Boston on Marathon weekend is a real spectacle. Lots of people, lots of excitement, and this time even great weather. The race itself was challenging. Having done it once before, and having come off a really decent last marathon, I may have underestimated the impact of the famous hills. This really is a wonderful but challenging course. Combined with the poor training conditions during this last Chicago winter which forced us indoors for quite a few long runs, as well as a somewhat upset stomach which forced a two-minute break, I came up short and posted an underwhelming second half. The head wind was also a factor that was mentioned in a few reports on the comparatively slow times of the elite runners. So when all was said and done, I ended up with a time of 3:30:13 and 8:01 min/miles which is a little slower than last time. All in all a really great marathon weekend. As my time from Berlin qualifies me for Boston 2010, I may well be back next year.

Matthew Palmer: Really, Really Distributed Revision Control

While I'm not a fan of cut-n-paste coding, on the odd occasion it's handy to grab a snippet of code out of someone else's blog and plop it in. Jeff Atwood of Coding Horror has a solution to some of the downsides of ripping a bit of code from somewhere on the Internet: publishers of code snippets generate a new GUID, tag each code snippet with a GUID, and you paste that comment in with the rest of the code when you take it. Then, if you (or someone else) needs to look at the context of the chunk of code, find it's author, look for improvements or commentary, or see who else has used that snippet in their own projects, you can search for that GUID and you should come up with only that GUID as a result.
What I propose is this:
// codesnippet:1c125546-b87c-49ff-8130-a24a3deda659
- (void)fadeOutWindow:(NSWindow*)window 
        // code
 
Attach a one line comment convention with a new GUID to any code snippet you publish on the web. This ties the snippet of code to its author and any subsequent clones. A trivial search for the code snippet GUID would identify every other copy of the snippet on the web:
http://www.google.com/search?q=1c125546-b87c-49ff-8130-a24a3deda659
How very, very cunning. He also proposes that if you modify a snippet and republish it, you should keep the old GUID and also add one of your own, so you can track the origin and help other people find your alternate version. Attaching unique identifiers to chunks of code and sending them all around the Internet. Does this sound like distributed revision control to anyone else? A lot easier to master than Git's UI, too...

Russell Coker: Vibration and Strange SATA Performance

Almost two years ago I blogged about a strange performance problem with SATA disks [1]. The problem was that certain regions of a disk gave poor linear read performance on some machines, but performed well on machines which appeared to be identical. I discovered what the problem was shortly after that but was prevented from disclosing the solution due to an SGI NDA. The fact that SGI now no longer exists as a separate company decreases my obligations under the NDA. The fact that the sysadmins of the University of Toronto published all the most important data entirely removes my obligations in this regard [2]. In their Wiki they write after SGI installed rubber grommits around the 5 or 6 tiny fans in the xe210 nodes, the read and write plots now look like and then some graphs showing good disk performance appear. The problem was that a certain brand and model of disk was particularly sensitive to vibrations. When that model of disk was installed in some machines then the vibrations would interfere with disk reads. It seems that there was some sort of harmonic frequency between the vibration of the disk and that of the cooling fans which explains why some sections of the disk were read slowly and some gave normal performance (my previous post has the graphs which show a pattern). Some other servers of the same make and model didn t have that problem, so it seemed that some slight manufacturing differences in the machines determined whether the vibration would affect the disk performance. One thing that I ve been meaning to do is to test the performance of disks while being vibrated. I was thinking of getting a large bass speaker, a powerful amplifier, and using the sound hardware in a PC to produce a range of frequencies. Then having the hard disk securely attached to a piece of plywood which would be in front of the speaker. But as I haven t had time to do this over the last couple of years it seems unlikely that I will do it any time soon. Hopefully this blog post will inspire someone to do such tests. One thing to note if you want to do this is that it s quite likely to damage the speaker, powerful bass sounds that are sustained can melt parts of the coil in a speaker. So buy a speaker second-hand. If someone in my region (Melbourne) wants to try this then I can donate some old IDE disks. I can offer advice on how to run the tests for anyone who is interested. Also it s worth considering that systems which make less noise might deliver better performance.

Neil Williams: package lists without fluff

(Sometimes a blog is just somewhere to put stuff you'll otherwise forget.)

dpkg -l colrm 90 colrm 1 2 grep '^ ' column -t

(There are two spaces in that grep, just in case it doesn't come out right in the final blog rendering.)

For those times when you just want the package list without the fluff - or, as a script that can accept a parameter:

#!/bin/sh
dpkg -l "$*" colrm 90 colrm 1 2 grep '^ ' sort column -t


$ ~/scripts/versiontable.sh apt* dpkg*

Could add grep ii as an extra pipe in that (after the initial dpkg -l call) to only list installed versions etc.

$ ~/scripts/versiontable.sh dpkg* apt*
apt              0.7.21
apt-arm-cross 0.7.11
apt-cross 0.13.0
apt-doc 0.7.21
aptitude 0.4.11.11-1+b1
apt-show-source 0.10
apt-utils 0.7.21
dpkg 1.14.26
dpkg-cross 2.5.1
dpkg-dev 1.14.26
dpkg-www 2.54+nmu1


Interesting side-effects though - *foo* is different to "*foo*" or \*foo\*. Might be better to use $@ but that means always needing quote marks for multiple package queries.

Next.

Previous.