Search Results: "mak"

23 May 2007

Evan Prodromou: 3 Prairial CCXV

I just finished reading Ben Yoskowitz's Top 10 reasons to join a startup, and I feel like I have to say something. As an experienced programmer, I think of a startup as an abusive relationship. Most technology startups I've been in have been run by charismatic sociopaths with no actual management or technology experience. They make wild, ignorant, unfounded promises to employees, investors and potential customers, then get increasingly anxious and unpleasant as their unsupportable predictions of schedule and market share don't come through. Employees end up working 80-hour weeks, typically for low or no pay and worthless stock options that never pay out. Guilty that living the "startup lifestyle" (work from home, come in late, have fun) has caused schedule or feature slips, they push themselves too hard at work, to the detriment of their health and home life. It doesn't help you much get another job later. Most startups don't succeed, which means that you end up with 1, 2 or 3 years of space on your r sum consumed by a made-up company name that no one has ever heard of and whose phone line has been disconnected. If people have heard of the name, they'll associate it with failure ("Oh, yeah, wasn't that the company that spent all that money and went nowhere?"). On top of all that, the tech experience of working in a startup is usually pretty bad. The engineers are typically unexperienced -- just out of school, or close to it -- and they waste a lot of time and effort trying to reinvent the wheel. The idea that you're changing the world encourages this kind of bad engineering. You end up cutting a lot of corners and developing a lot of bad habits that you have to unlearn later on. Schedule pressures make you drop important engineering steps like analysis, design, unit tests, documentation. That is, if you even knew you were supposed to do them in the first place. It takes a lot of experience in this kind of pressure-cooker environment to come out of a startup sane, healthy, and wealthy. The vast majority of people end up with broken relationships, poor mental and physical health, and not much in the way of money to show for their efforts. tags:

Wikiclock in the news So, Niko, Hugh, Mike and Leoben Richardson all blogged about the Wikiclock. As far as I know, no MSM coverage yet, but it should be coming down the pipe any day. I talked to Niko tonight, and he said that he saw Hugh at La ka, and Hugh was updating the wikiclock. They traded off updating all afternoon. Sigh. It's actually quite addictive. tags:

Transit strike We've got a transit strike on in Montreal (see the CBC for deetz). It's a pretty heinous problem -- the maintenance workers are asking for X% pay increases over Y years with blah blah blah pension and fie fo fum and... Whatever. The city is refusing to budge, which makes our mayor, G rald Tremblay, officially a hypocritical idiot. Tremblay has been wagging fingers at provincial, federal and international figures for years about sticking to the Kyoto protocol, but when the hard decisions had to be made, he was willing to shut down Montr al's transit system... in summer... after one of the warmest winters in history. You can blame both sides on this issue, but when it comes down to it the union's job is to get the best deal it can for its workers, and Tremblay's job is to keep the Montreal M tro running. Someone's not doing his job. The city spends millions trying to get commuters out of their cars and into the public transit system. And all that work's out the window, now. Despite the public call for more people to rollerblade to work (riiiiiiiight), traffic is way up and auto use is way up. That means air quality is going to go down, and our city can go from being an environmental leader to an environmental mistake. I'm glad to hear that the Quebec government is stepping in to break up the fight, but I hope it doesn't take too long. tags:

Calling graphic designers: Universal edit button One of the interesting movements to come out of RoCoCoCamp this weekend is the idea of a universal wiki edit button. This would be an icon similar to the RSS radio-wave icon that's become ubiquitous for indicating an RSS feed. The UWEB would symbolize that the current page can be edited. Folks at AboutUs.org have taken the lead on this effort, which could be really interesting. Getting a universally-understood sign for "edit this page" would greatly help with acceptance of the wiki way by the general public. I don't think it'd have to be limited to wikis; any page that could be edited (e.g., on a CMS) could also have the UWEB. I highly encourage skilled graphic designers who want to take a crack at designing the Next Big Icon to look at the UWEB effort and give it a try. tags:

John Goerzen: Real-World Haskell

Today, Bryan O'Sullivan, Don Stewart, and I are announcing a new book we're working on with O'Reilly: Real-World Haskell. I'm excited about the book and about working with Bryan and Don on this project.

O'Reilly has agreed to publish this book under a Creative Commons license! We plan to post drafts of chapters incrementally at the book's website, seeking feedback from readers and reviewers as we go.

Haskell makes a great practical parsing and scripting language, but this aspect of it has been under-documented. I look forward to helping change that!

Joey Hess: new d-i lab machine

A while back I set up a d-i test lab, a kind of automated mechanical computer torture rack, which has been trying (and frequently failing) to automatically install Debian onto a half-dozen varied machines every day for a couple of years. Problem is that hardware sucks, even when it's tucked away in a friend's basement and so not blaring at you with its combined total of 100 fans and 50 disk drives. It has an annoying habit of dying, especially if it's oddball machines for different architectures. Cords have a habit of getting unplugged. It's hard to automate booting from installation media. And so on. A while ago I decided to go virtual. Now, thanks to Dann and Matt and HP, I've gone from this: big rack of stuff to this: top HP donated hydra, a maxed out 8-way Xeon with 4 (soon 8) disks. The idea is that it can run 7 or so virtual machines, all doing test installs, in parallel. Fast. I'm using kvm for the amd64 and i386 tests. Since Debian has mips and mipsel kernels specially built for running under qemu, I'm able to test the installer for both those arches. Hercules will cover s390, once the kernel gets fixed. This leaves some architectures still todo: I also still have to write enough installation test cases to keep this monster machine firing on all 8 cores all day long. It can probably handle around 300-400 installation tests per day. Since hydra has the disk space, and these emulators are generating lots of disk images with Debian pre-installed, I have also set it up to retain the disk images. I imagine that some of these disk images will eventually be useful for devleopment, since it's much easier to boot a disk image rather than sit through a slow qemu install on an arch like mips. I haven't worked out how to make these images publically available yet, but hydra is located on the name network as gluck.debian.org, if anyone wants to get access to them. Update: I also have qemu doing a 'savevm 1' before shutting down, so you can even restore the running system from the disk images. Especially useful if the install failed somewhere in d-i! :-) BTW, I can give out accounts on hydra to any Debian developers who need a fast machine to run kvm/qemu on, or to anyone who is interested in setting up their own installation tests.

22 May 2007

Eddy Petrișor: gettext: lesson 2

The first lesson was about wrong assumptions that people do when it comes to i18n. This article is mostly targeted at developers which want to support i18n properly, in particular, plural forms.

This is my second n?getetxt lesson.
This is about making your update-po target to include all the strings you want localized in the pot file.

Probably, at some point you, as a developer have written something like:

print("You won %d point%s", points, points>1?"s":"" ) ;


Well, is nice and dandy that you want to make the proper choice of words when you have more than one point. I appreciate that, but you are doing it wrong. There is a tool for that, as I explained before.

Now, lesson 2.

You have understood what you have to do, but you just hate typing ngettext/gettext all over the place, so you probably defined something like:

#define _(X) gettext(X)
#define _n(sg,pl,n) getext(sg,pl,num)

So now you can write trhis piece of code:

print(_n("You won %d point", "You won %d points", points), points ) ;

The problem: how to convince xgettext to add those strings to the pot file?

Nothing simpler... just add _n as an additional keyword when invoking xgettext... but you have to specify that this is a definition for ngetetxt, so, you will end up having in your update-po target something like this:

xgettext ../src/*.c --keyword=_ --keyword=_n:1,2


TADA!

Steve Kemp: Long journeys wear me out but

I was suprised to see Michal iha suggesting that memcached wasn't helping his site enough. I've been a huge fan of Danga's Memcached for the past year or two. I'm using it very heavily upon the Debian Administration website, and also upon my new dating site. There are, of course, issues with making sure you flush the cache when things are updated, but I've got a good pair of test suites for that now :) With a nice singleton accessor I can use the code as easily as:
1
2
3
4
5
6
7
8
9
10
11
sub recent_users
 
    my $cache   = Singleton::Memcache->instance();
    my $results = $cache->get( "recent_users" );
    return( $results ) if ( $results );

    # fetch from database
    
    $cache->set( "recent_users", $results );
    return( $results );
 
Obvious once you've done it a few times, but right now I can feel the difference if I disable the cache upon either of the sites. Page loadtime just drops. I guess the effectiveness depends upon the site you're using, and how often things can be usefully cached. I know that for my uses I tend to have large items which would be expensive to fetch which occur on every page (such as "currently online users", or "recent weblogs".) That probably means I benefit more than others, still I've become so enamoured of the project I feel the need to pimp it a little!

Cameron Dale: May-22-2007: The Long Weekend of Documentation

I spent most of this past weekend (a long weekend in Canada, thanks to our royal heritage) writing documentation for the DebTorrent code. The original BitTornado code was seriously lacking in this area, having only 670 lines of comments out of almost 20,000 total lines of code, which is 3.5% if you're counting. (In fairness, this may be due in part to it being based on the original bittorrent client.) Since Python is supposed to be known for it's well-documented code, I decided to tackle this shortcoming sooner rather than later. It's also a good opportunity for me to become familiar with all of the code. I'm only about halfway there, but the end result of my weekend's worth of work is this diffstat:
DebTorrent/BT1/Choker.py             99 ++++++++
DebTorrent/BT1/Connecter.py         313 +++++++++++++++++++++++++++
DebTorrent/BT1/Downloader.py        448 ++++++++++++++++++++++++++++++++++++++-
DebTorrent/BT1/Storage.py           418 ++++++++++++++++++++++++++++++++++--
DebTorrent/BT1/__init__.py            9
DebTorrent/BT1/btformats.py          47 ++++
DebTorrent/BTcrypto.py              147 ++++++++++++
DebTorrent/ConfigDir.py             248 +++++++++++++++++++++
DebTorrent/ConnChoice.py             12 -
DebTorrent/CurrentRateMeasure.py     69 +++++-
DebTorrent/__init__.py               14 +
DebTorrent/bencode.py               193 ++++++++++++++++
DebTorrent/bitfield.py               89 +++++++
DebTorrent/clock.py                  53 ++++
DebTorrent/download_bt1.py          380 ++++++++++++++++++++++++++++++++-
DebTorrent/inifile.py                70 ++++--
btcompletedir.py                     25 ++
btcopyannounce.py                    20 +
btdownloadheadless.py               111 +++++++++
btlaunchmany.py                      56 ++++
btmakemetafile.py                    19 +
btreannounce.py                       6
btrename.py                          11
btsethttpseeds.py                     6
btshowmetainfo.py                     6
bttrack.py                            6
setup.py                             20 +
27 files changed, 2809 insertions(+), 86 deletions(-)
I've also started using the epydoc program to automatically generate some documentation web pages for easy browsing of the code. So far it's worked out great! So well that I decided to use some of the new features available in a recent beta release that was not yet in the debian archive. The packaging seemed simple enough, so I created my own package containing the new upstream version, which is now available in my repository.

Alastair McKinstry: Election 2007: Choices in Galway West ?

Has anyone seen a recent poll for Galway West? (In the Irish General Election, that is). The last poll was March 26th, which is way out-of-date : long prior to the election being called, before the Cryptosporidium Crisis, etc. The result is, I'm in the unusual position of having to make a decision. Ordinarily I'd vote Number 1 for Niall O'Brolch in (Green) and 2. Micheal D. Higgins (Labour). Ireland uses the unusual Single Transferable Vote system, with multi-member constituencies. Galway West is a 5-seat constituency, and Micheal D. is a long-sitting TD, who most would have expected to be automatically returned. Niall O'Brolch in is fairly new; he's a member of the City Council and current Mayor of Galway (thats a relatively powerless post in the Irish local council scheme of things, though). Unfortunately news from the Labour camp appears that too many people assume he will be automatically returned; the word they are getting on the street is "Yes, you'll be getting my no.2 ". But in the STV system, this could mean he wouldn't be in the running. Those votes for the Greens and others will perhaps stay with the Greens and won't transfer to him. So the choice, Vote 1. Greens, which is my natural preference, or 1. Labour, in the hope of getting both Micheal D. and Niall elected? a poll of the current situation would help. BTW, for voting geeks, following the link and reading about STV is worth it. It makes Irish election counts the most fun election counts in the World. One of the main arguments against electronic voting in Ireland has been that it would take all the fun out of the count, which would be over too soon ... Tags ,

Alastair McKinstry: Irish, Schools and the Election

Well, theres a General Election here in Ireland on the 24 May, and the politicans are well and truly on the last lap of the campaign trail. We're a bit rural to see them all, for those who don't make it to the door, here's something to think about. In Moycullen we are on the edge of the Gaeltacht. Various institutions, such as the main primary school, have been struggling to retain that status with the encroachment of the B arla 'burbs (suburbs of the Gaeltacht where English dominates). Our children go to Baile Nua, the villages' gaelscoil. To hold standards, the school has a policy of capping its current enrollment (to 84, I think), to keep class sizes small, until the potential intake is large enough to justify another teacher. Fair enough. However this has the side-effect that, in an area supposedly set aside to protect the Irish language, students are necessarily turned away from the only Irish-language school in the Village. Any comments? Tags , , ,

Wouter Verhelst: Battlestar Galactica on VT4!

I just saw an ad on VT4 that they're going to be broadcasting the excellent Battlestar Galactica series—that is, the reimagined version. Caught me by surprise there, because I was actually expecting Kanaal2 to broadcast this—they're usually the SciFi channel in .be. Not that this matters, of course. Luckily, they're also going to broadcast this at an excellent time slot: Sunday at 23:25 (or something), meaning, not prime time; as a result, I might actually be able to follow it this time around. Living together with people who like to watch prime time pulp would make watching this rather impossible during reasonable hours, otherwise. Not this time. As it happens, I bought the original 1978 version of Battlestar Galactica only a few weeks ago. That one's a bit dated though, and not half as much fun.

Erich Schubert: Birthday dancing

Tonight I turned 27. By chance, this fell onto a Tuesday, and there is a great dancing party every Monday. This monday, there was also a great band, the Souvenirs. They're pure fun and great for dancing - so I obviously opted to celebrate my birthday there.This probably was the nicest birthday party I've ever had: lots of friends showed up (though mostly girls, but thats fine with me :-)), we danced a lot. And danced. And danced. :-) And I'll probably spend some more hours today dancing later this day.And with dancing I mean: Swing, Lindy Hop, Balboa. I just love this music and these dances. So playful, sometimes cheeky - swinging...
Would you like to swing on a star
Carry moonbeams home in a jar
Todays music was also great, a nice speed and patterns you could play with... I don't know what it is, adrenaline?, that makes dancing so much fun. And probably the communication. Dancing is all about communication. There was this class titled "Moves that make the follow smile" once... That is the best moment in a dance, when you managed to lead the follow into some slight variations or some fun move matching the music, it worked out great and you see this flash of delight in their face... this "I'm not sure what we just did, but it felt just so right"-smile. The "I didn't know we could do that"-smile. That's what I'm striving for. Sometimes there are some moments in a song where this works out great, and occasionally there is a song where it works out through most of the song. These are the really great moments when dancing.Sorry, no pictures or videos. Just memories.Keep on swingin'!I'm really looking forward to events such as Senigallia (Summer Jamboree) or the Munich Lindy Exchange.And of course our regular events here in Munich, such as our Thursday open air get-together at Hofgarten, sundays in Salon Erna and mondays in Cord.

21 May 2007

Benjamin Mako Hill: One Stop Shop

I appreciate the appropriate, if not entirely intuitive, juxtaposition of items in aisle 7F of my local drug store.
Aisle 7F: Health Care, Diet Needs, Ice Cream

Stefano Zacchiroli: on the power of grillo

On the Power of a Blog (and of the Vatican) That the Vatican in Italy is a relevant institution able to (directly or indirectly) influence the media is not a big news, actually is not even a news. So it does not come as a surprise that the BBC documentary "Sex Crimes and Vatican" about the so called Crimen Sollicitationis (dated 29 September 2006) has never been mentioned on popular italian newspapers and televisions ... until a couple of days ago. So far so "good". What annoys me quite a bit is that the day after Beppe Grillo posted something on the subject on his blog (which according to the author is in the top ten of most read blog on the net, even though I've never checked the validity of such claim) the news is first on Repubblica, one of the most read italian newspaper, and then topic of a national debate for its possible presentation on an italian tv show, held by Michele Santoro. Come on, of course journalists do not need a blog to get their news. Someone please make me think something else than that seeing a post on a popular blog removes the shyness of journalists about "disclosing" such a news to Italians...

Evan Prodromou: 1 Prairial CCXV

I just got back from taking Zach Copley to the airport, and for the first time in a few days I'm sitting in front of my desktop computer again, trying to get back on track. I think it's probably a good idea to get my notes about RoCoCoCamp down on electronic paper while the experience is still fresh in my mind. (I wrote about the first day in Journal/29 Flor al CCXV). Saturday morning I got up considerably later than I had the day before, and I took my time getting to SAT. Which was OK, since things went much smoother in the morning. The only really annoying thing about Saturday was that I had to wash about 50 cups by hand -- we'd run out of clean cups, and I couldn't figure out how to run the dishwasher. It didn't take long, but it meant that I had my head down in the sink as people came in and didn't get to spend as much time talking to them. I was glad to hear that people had a good time going to L'Utopik on Friday night. Apparently a few people who'd flown in late on Friday got a chance to meet up with the experienced crew at L'Utopik, so they were well-prepped for Saturday. Probably the biggest buzz of the pre-sessions was SJ Klein's pair of functional OLPC laptops. They were cute and fun -- I got a few minutes to play with them, and I enjoyed the interface tremendously -- although it took me a few tries to open it. People were fiddling with them throughout the day -- including Amita June, who came late in the afternoon -- and Tristan P loquin even blogged about them. My first session was about wiki and other technologies, which I titled Wiki And.... (I borrowed the name from Last Exit to Brooklyn, in which it seems no-one eats anything but "coffee and".) My main point was that a) wiki people tend to overuse wiki where other software tools may be more appropriate and b) we need to be careful with impedance mismatches when using wiki with technologies with other cultures behind them. Wikis and blogs mismatch; wikis and forums mismatch. You need to work out ways to make them work culturally. As a proof-of-concept that there are ridiculous applications for wiki, I created in about 3 minutes before the session the wikiclock. It's a computer clock that runs on wiki technology: the time is kept up-to-date by human beings editing the page, rather than with software. I was so pleased with myself that I twittered about it, and from there it's taken on a life of its own. The clock is implemented on the amazing minimalist system pageoftext.com. I heard about p.o.t. from Liz Henry's April report from Palo Alto Wiki Wednesday, and I think it's totally great. It's a cross between a pastebin and a wiki -- like an open-edited ImageShack for text. Brilliant. The second session I did was a hyper-focused one on a particular Semantic Web problem. Both Wikitravel and Open Guides have tons of information on "places" in various cities. (That is, restaurants, bars, nightclubs, hotels, museums, parks, etc.). It would be good to export our data on these places to each other, so we could possibly keep them in sync. For example, if a restaurant changes its hours , that info could be updated on The Open Guide to London and automatically synched to the Wikitravel page on London. So we went over some ways to do this kind of interchange; we'd brainstormed before about it on the Open Guides' RDF Workshop, but it was good to sit down with Earle Martin and do some face-to-face hacking on the idea. We don't yet have a vocabulary for it, but we'll get something going on the new wikirdf.org site (which also emerged from this session). I had a great lunch with a lot of people from RoCoCo on the terrace at the Bar St. Sulpice, about 8 blocks away on rue St. Denis. The sun was out, it was cool, and we had a very nice time. It was especially nice to see Marcus Bornfreund and Tina Pipers of Creative Commons Canada, who'd come to talk about the PDwiki, a project to collaboratively document Canadian works in the public domain (see Canadian Public Domain Registry Announced). We talked quite a bit about the social challenges of getting a community excited about such a dry subject, but I think we got some good ideas about it. In the afternoon I led a session on MediaWiki. We were lucky enough to have Tim Starling sit in, and he told everyone about the new developments going on with MW. He's refactoring some very deep parts of the storage and rendering sections of the code, which will result in considerably better reliability, performance, and flexibility. I think it sounds great. I had to work the registration desk for the last session of the day, which was pretty great because I ended up baby-sitting Anoushka Jaroski-Biava for most of the time. But I missed Robin Millette's cool talk about BuzzyBee, which looks to be really fun to play with. We rounded out the evening with music, pizza, and beer at the SAT. tobias.dj played some great dance music, and we had some wiki-collaborative VJ-ing using the SAT's fancy screen systems. All the kids were there -- Mark and Allegra's daughter No ma as well as Amita June. Fun. Sunday morning I didn't have to start coffee until 9AM -- luxury! We had a great Open Space Technology convergence -- a way to turn the discussions of the previous few days into action items for going forward. I did a convergence session on the future of RecentChangesCamp. We had most of the interested parties available (except for the RCC Portland organizers, who had to fly out early that morning). We made some decisions about future RCCs, and we made some plans for next year's RCC -- in the Bay Area (California). Last night we brought back the Keiki gang to our house, since it was great to have them all in Montreal for the event. We did a big brainstorming session on next steps to launching the project, and we also did some graphic design review of potential logos. We have some great designs coming; I'm really happy we got Sarven Capadisli and Bridget to work on the site. I had to crash out at 10:30PM -- Amita and I fell asleep together -- but others were up late talking and thinking. I don't know how they did it -- I was all talked out by the end of RoCoCo. All in all I had a fantastic time -- the event far surpassed my expectations. It was hard -- too hard. I bit off far more than I could chew. But I think we did a good job of establishing Montreal as a technology city -- Wiki City Canada -- in the international mind, and I think we also brought together some really interesting people for some fruitful and productive work. You can see some of the projects that came directly out of RoCoCo on the FutureChanges page -- an ingenious name courtesy of Pm. And there are some indirect ones that we can expect soon. tags:

Cause and solution So, Technorati has a good listing for rocococamp items, but I especially liked Steve Faguy's post: Wiki: The cause of, and solution to, all of life s problems. Steve was an extremely game participant in the event, which I think was pretty incredible. He wrote a good overview of wikis in the Montreal Gazette this year. A funny thing happened on Friday evening during the daily wrap-up known as "Evening News". We had Open Space's minimalist instructions posted on the walls of the SAT, so people would see and remember them. Steve pointed out that the first of Open Space's "four principles" is grammatically incorrect: Whoever comes is the right people. He said, "In the spirit of wiki, I'm going to correct it right now!" And to applause, he got up with a marker and changed the "is" to "are". This stimulated an interesting discussion. One person noted that the "is" is there because possibly only one person could show up for a session, and that's OK. Finally, Brandon CS Sanders stood up and said, "I like 'is' because when we come together like this, we form a cohesive group, however temporary -- 'a people'. So I'm going to change it back." And he did -- to lots of applause, again. Steve came up to me at the end of the night, laughing. "I got reverted! I should have started an edit war!" It was a hoot; he's got a good sense of humour. tags:

MJ Ray: the Cooperative Group: United merger

bill watson commented:
"Excellent report. I'm a member of Co-op Group (Northern) and also United. United is an extremely well run outfit with well maintained shops. They also have about 30 petrol stations, mostly in Yorkshire and Greater Manchester. The fear from United members, on the proposed merger, is that focus will be lost and regional investment diluted. United are also trialing factory made shop units which are erected on-site (similar to the way McDonalds do it). This gives a turnaround time of about 16 weeks from start to shop opening. There is one not far from me (Ditton) and it's very popular. The United website United Acquisitions gives lots of info on this and other things."
I've mixed feelings on modular build (McStores?) - it makes the construction greener, but there seems little information on the long-term energy use of the store. Maybe it's simply unknown yet. The offer of a finder's fee for new store sites is interesting. I wonder if that will spread to the Co-operative Group after the merger. As I understand it, the fear from tCG members is that we're getting a lot of new members and a new chief exec who seems to have a very different focus to the members. I'm sure we'd be happy to see well-run and well-maintained shops, but will it mean even more centralisation and all the mistakes that means? Like stocking no Somerset Cheddars in some Somerset stores, with the confusing excuse that (as far as I could understand - see previously-mentioned answers to AGM food questions) no supplier offers enough units that meet the specifications or it's unsuitable for our type of stores ("Welcome"). I'm glad so many people liked the report, anyway.

Alexander Schmehl: Playing with the package file

For Meikes thesis, we needed a csv-File from the Debian-Package file, so I wrote a small script to do that. You can get it from my repository (or via websvn). (Not yet perfect, but worked well enough for us; patches welcome.) If you just need the csv to copy the data in a database (like she did), don't try to guess, how long a textfield (e.g. for depends or the long description) should be; we tried and failed several times (Sure... 2000 characters should be enough for a long description.). We finally used the following database (We used PostgreSQL, should work similar on other database systems): CREATE TABLE packages ( package character varying (75) NOT NULL, source character varying (75), priority character varying(10) NOT NULL, section character varying(20) NOT NULL, installedsize integer NOT NULL, maintainer character varying(150) NOT NULL, architecture character varying(4) NOT NULL, version character varying(40) NOT NULL, depends character varying(5000), conflicts character varying(5000), recommends character varying(5000), suggests character varying(5000), enhances character varying(500), predepends character varying(500), provides character varying(500), replaces character varying(500), buildessential character varying(3), essential character varying(3), filename character varying(200) NOT NULL, md5sum character(33) NOT NULL, origin character varying(100), sha1 character(41) NOT NULL, sha256 character(65) NOT NULL, size integer NOT NULL, tag character varying(1000), task character varying(400), description text NOT NULL, longdescription character varying(30000), CONSTRAINT pk PRIMARY KEY (package) );. Now that you've created a table, you need to fill it. Easiest method is to use the COPY statement, as follows: copy packages (package, source, priority, section, installedsize, maintainer, version, depends, conflicts, recommends, suggests, enhances, predepends, replaces, buildessential, essential, filename, md5sum, origin, sha1, sha256, size, tag, task, description, longdescription) FROM '/path/to/your/csv-file' DELIMETER ';' CSV;. You should now have a nice database to play with :) Some examples... Which are the packages with the longest longdescription?
debian_packages=> select package, length(longdescription) as length from packages order by length desc limit 5;
        package           length
------------------------+--------
 texlive-latex-extra       25337
 texlive-fonts-extra        5719
 emacs-goodies-el           4502
 xbase-clients              4403
 postgresql-contrib-7.4     4223
(5 rows)
Or... Which maintainer have the most packages?
debian_packages=> select maintainer, count(*) as anzahl  from packages group by maintainer order by anzahl desc limit 5;
                            maintainer                              anzahl
------------------------------------------------------------------+--------
 Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>            465
 Debian QA Group <packages@qa.debian.org>                              458
 Debian X Strike Force <debian-x@lists.debian.org>                     274
 Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>      261
 Daniel Baumann <daniel@debian.org>                                    255
(5 rows)
Or... Is there a package, whose sha256-sum contains Meikes birthday?
debian_packages=> select package, sha256 from packages where sha256 like '%261081%';
           package                                           sha256
------------------------------+-------------------------------------------------------------------
 libobject-realize-later-perl   5188126108146fc0b1328473125687fb388bd8d87f460e335952dbb1b66aa3d1
(1 row)
And another goodie (We needed to alter the database several times, to make this package fit into it): Which is the package with the longest name?
debian_packages=> select package, length(package) from packages order by length(package) desc limit 1;
                         package                           length
---------------------------------------------------------+--------
 libmaypole-plugin-authentication-usersessioncookie-perl       55
(1 row)
A lot of fun... and a lot of interesting facts to be discovered...

Benjamin Mako Hill: National Free Culture Conference

Harvard Free Culture is helping to organize this years' National Free Culture Conference -- the meeting for North American Free Culture student groups. The whole shindig is planned for May 26, 2007 at Harvard University here in Cambridge, Massachusetts. The schedule is solidifying and I will presenting and arguing for adoption or support of the Free Cultural Works Definition within the FC student movement and probably also be talking about community building and advocacy in some free software groups I've worked with. Housing is available and the event is open to the public. If you d like to attend, speak, or help out with the conference, please email freeculture@hcs.harvard.edu or check out the Facebook event. If you're on the fence about attending, you can read this glowing endorsement of the conference by high protectionist James DeLong at IP Central.

20 May 2007

Julien Blache: Fixing SANE s SCSI interface in 32/64bit mixed environments

I’ve just uploaded to unstable a new revision of SANE which fixes the longstanding SCSI interface problem in 32/64bit mixed environments. If you own a SCSI scanner, please read on and give it a go. For the past several years, it wasn’t possible to scan using a SCSI scanner if you were running a 64bit kernel and a 32bit userland. The sg_hdr struct, which is the base of the Linux SG3 interface, contains pointers (you see that coming, right?) so its size obviously differs in 32bit and 64bit mode; and a 32bit pointer is kind of useless as-is for a 64bit kernel. The SG3 asynchronous interface (read/write calls on /dev/sgX) does not handle the 32/64bit conversion and returns an error while sanity checking the sg_hdr struct passed to it. Hopefully, the SG_IO ioctl interface, also part of SG3 and now generalized to every SCSI device (not limited to /dev/sgX), uses the same sg_hdr struct with the added bonus that the ioctl 32bit compat layer built into the kernel converts the 32bit sg_hdr it gets from userland to a 64bit sg_hdr it passes on to the 64bit ioctl handler, and back again. Only difference, the SG_IO ioctl interface is synchronous, whereas the read/write interface is asynchronous and thus allows command queueing. So SANE (sanei_scsi) now has lost its command queueing feature but it looks like (after testing) it wasn’t making any difference anymore. This problem affects users on the following architectures, when running a 64bit kernel with a 32bit userland: i386/amd64, MIPS, MIPSel, SPARC, PowerPC, ia64. That makes for an important part of our supported architectures. If you own a SCSI scanner, here’s a test you can do: scan using the current version of SANE in unstable (1.0.19~cvs20070505-2), then with the new, patched version (1.0.19~cvs20070505-3) and report back if: If all goes well, this patch will make it into SANE upstream RSN.

Steve Kemp: I dont mind not knowing what lies down the track

I ve got my first real rails application working correctly a simple online bookmark system, which is scuttle-lookalike. (This is part of my master-plan to remove PHP utterly from the few remaining places where it exists upon my server(s), so it isn t as pointless a project as it appears to be!) It is pretty neat, and it handles most of the things you d expect. Fetch it from CVS and install it with the following recipe:
cvs -d :pserver:anonymous@cvsrepository.org:/home/cvs login
cvs -d :pserver:anonymous@cvsrepository.org:/home/cvs co bookmarks
cd bookmarks/
mysql --user=root -p -e "CREATE DATABASE Books_development" 
rake db:migrate
ruby script/server
Once that is done point a browser at http://localhost:3000/ and you should see something like this. (If there is no admin user setup it will display a signup link, once there is an admin defined this will go away. When you re an admin you can view/edit/modify all the bookmarks which are set to private .) I m new to rails, and ruby for that matter, so if this is packaged badly, or is missing something to make it work please do let me know. Updated: Changed from download to the CVS repository. I also have a collection of tools for exporting from Insipid & Scuttle if they are useful let me know.

Steve Kemp: Tell you, might not believe it, but

I would like to have a simple way of mirroring a webpage, including any referenced .css, .js, and images. owever to complicated matters I wish to mandate that the file will be saved as index.html regardless of what it was originally called. This appears to rule wget out, as the -output=index.html option trumps the -page-requisites flag (which is used to download images, etc which are referenced.) Is there a simple tool which will download a single webpage, save it to a user-defined local filename and also download referenced images/css files/javascript files? (Rewriting the file to make them work too) Using Perl I could pull down the page, and I guess I could parse the HTML manually but that seems non-trivial but I d imagine there is a tool out there to do the job. So far I ve looked at curl, httrack, and wget. If I m missing the obvious solution please point me at it .. (Yes, this is so that I can take snapshots of links added to my bookmark server.)

Steve Kemp: When the light begins to change

All being well I now have a blog working using Typo, instead of Wordpress 2 and no broken links! We ll see. Now to make sure that my server load doesn t rise through the roof this time. For future reference importing entries from Wordpress2 -> Typo will almost certainly give you this error:
1
2
3
4
5
const_missing': uninitialized constant TestRequest (NameError)
        from ./db/converters/../../config/../app/models/blog.rb
...
..
.
This can be fixed by changing:
1
2
3
4
5
def really_send_pings(serverurl = blog.server_url, articleurl = nil)
   return unless blog.send_outbound_pings
   ...
   ...
end
To this:
1
2
3
def really_send_pings(serverurl = blog.server_url, articleurl = nil) 
   return
end

Next.

Previous.