"Fourteen ways in which you can avoid starting a flame war on a Debian mailing list".In the end I went for something more technical, but I've never stopped thinking about liw's challenge. I ended up writing talk notes about such a potential talk. Here they are. The classics
chef before deliverydadadodo before deliverypolygen-generated messages before
deliverychef before deliverydadadodo before deliverypolygen-generated messages before deliveryMany Africans interpret near-death experiences as somewhat evil, a bad omen or a sign that they were somehow “bewitched.” Among 400 Japanese NDErs that participated in a study, many reported seeing long, dark rivers and beautiful flowers, two common symbols that frequently appear as images in Japanese art. East Indians sometimes see Heaven as a giant bureaucracy, and frequently report being sent back because of clerical errors. Americans and Brits often say they are sent back for love or in order to perform a job or task. Natives of Micronesia often visualize Heaven as a large, brightly lit American city with loud, noisy cars and tall buildings.I’m not sure what’s worse — returning from death to rectify the inadvertent omission of a certificate of service on a motion for leave to file a reply brief in excess of the ten-page limit (maybe I should have picked a different profession) or getting additional time on Earth because the powers-that-be failed to complete a 27B/6. I really prefer the beautiful flowers, but it’s probably too late for that. 1Is there a term of art for such blogs? E.g., a blog discovered from an unrelated Google search that turns out to be worth adding to the blogroll.
GoToTheNextTrickyBit someVal
where someVal = DoThisAndThisAndThat...
mailTo customer =
let customerName = getCustomerName customer
customerAddr = getCustomerAddr customer
in
makeMailingTo customerName customerAddr
mailTo customer = makeMailingTo customerName customerAddr
where
customerName = getCustomerName customer
customerAddr = getCustomerAddr customer
This is my answer:
- It would be very useful if the means for indicating the supported
data formats was more comprehensive. This could mean a lot of
expanding in the "works-with-format" section of the vocabulary, which
doesn't even include formats such as gif or mpg at the moment. I don't
know how feasible it is to alter underlying debtags functionality, but
perhaps it would be the easiest to make "works-with-format" a special
case tag which allows for formats not listed in the vocabulary.
Good point. The idea has popped up in the past to list supported mime types among the package metadata, so that one could point to a file and get a list of all the packages that can work with it. I'm not sure it's a good idea to encode mime types in debtags and I'd like to see something ad-hoc for it. In the meantime works-with-format is the best we can do, but we should limit it to the most common formats.This is the fun idea: if
works-with-format is the best we can do, what can we
do with it?
Earlier today I worked on resurrecting some old code of mine to expand Zack's
ls2rss with Dublin Core
metadata extracted from the files. The mime type scanner was ready for action.
Some imports:
import sys
# Requires python-extractor, python-magic, python-apt
# and an unreleased python-debtags from http://bzr.debian.org/bzr/pkg-python-debian/trunk/
import extractor
import magic
from debian_bundle import debtags
import re
from optparse import OptionParser
import apt
A tenative mapping between mime types and debtags tags:
mime_map = (
( r'text/html\b', ("works-with::text","works-with-format::html") ),
( r'text/plain\b', ("works-with::text","works-with-format::plaintext") ),
( r'text/troff\b', ("works-with::text", "works-with-format::man") ),
( r'image/', ("works-with::image",) ),
( r'image/jpeg\b', ("works-with::image:raster","works-with-format::jpg") ),
( r'image/png\b', ("works-with::image:raster","works-with-format::png") ),
( r'application/pdf\b', ("works-with::text","works-with-format::pdf")),
( r'application/postscript\b', ("works-with::text","works-with-format::postscript")),
( r'application/x-iso9660\b', ('works-with-format::iso9660',)),
( r'application/zip\b', ('works-with::archive', 'works-with-format::zip')),
( r'application/x-tar\b', ('works-with::archive', 'works-with-format::tar')),
( r'audio/', ("works-with::audio",) ),
( r'audio/mpeg\b', ("works-with-format::mp3",) ),
( r'audio/x-wav\b', ("works-with-format::wav",) ),
( r'message/rfc822\b', ("works-with::mail",) ),
( r'video/', ("works-with::video",)),
( r'application/x-debian-package\b', ("works-with::software:package",)),
( r'application/vnd.oasis.opendocument.text\b', ("works-with::text",)),
( r'application/vnd.oasis.opendocument.graphics\b', ("works-with::image:vector",)),
( r'application/vnd.oasis.opendocument.spreadsheet\b', ("works-with::spreadsheet",)),
( r'application/vnd.sun.xml.base\b', ("works-with::db",)),
( r'application/rtf\b', ("works-with::text",)),
( r'application/x-dbm\b', ("works-with::db",)),
)
Code that does its best to extract a mime type:
extractor = extractor.Extractor()
magic = magic.open(magic.MAGIC_MIME)
magic.load()
def mimetype(fname):
keys = extractor.extract(fname)
xkeys =
for k, v in keys:
if xkeys.has_key(k):
xkeys[k].append(v)
else:
xkeys[k] = [v]
namemagic = magic.file(fname)
contentmagic = magic.buffer(file(fname, "r").read(4096))
return xkeys.has_key("mimetype") and xkeys['mimetype'][0] or contentmagic or namemagic
Command line parser:
parser = OptionParser(usage="usage: %prog [options] filename",
version="%prog "+ VERSION,
description="search Debian packages that can handle a given file")
parser.add_option("--tagdb", default="/var/lib/debtags/package-tags", help="Tag database to use (default: %default)")
parser.add_option("--action", default=None, help="Show the packages that allow the given action on the file (default: %default)")
(options, args) = parser.parse_args()
if len(args) == 0:
parser.error("Please provide the name of a file to scan")
And here starts the fun: first we load the debtags data:
# Read full database
fullcoll = debtags.DB()
tagFilter = re.compile(r"^special::.+$ ^.+::TODO$")
fullcoll.read(open(options.tagdb, "r"), lambda x: not tagFilter.match(x))
Then we scan the mime type and look up tags in the mime_map above:
type = mimetype(args[0])
#print >>sys.stderr, "Mime type:", type
found = set()
for match, tags in mime_map:
match = re.compile(match)
if match.match(type):
for t in tags:
found.add(t)
if len(found) == 0:
print >>sys.stderr, "Unhandled mime type:", type
else:
If the user only gave the file name, let's show what Debian can do with that
file:
if options.action == None:
print "Debtags query:", " && ".join(found)
query = found.copy()
query.add("role::program")
subcoll = fullcoll.filterPackagesTags(lambda pt: query.issubset(pt[1]))
uses = map(lambda x:x[5:], filter(lambda x:x.startswith("use::"), subcoll.iterTags()))
print "Available actions:", ", ".join(uses)
If the user picked one of the available actions, let's show the packages that
do it:
else:
aptCache = apt.Cache()
query = found.copy()
query.add("role::program")
query.add("use::"+options.action)
print "Debtags query:", " && ".join(query)
subcoll = fullcoll.filterPackagesTags(lambda pt: query.issubset(pt[1]))
for i in subcoll.iterPackages():
aptpkg = aptCache[i]
desc = aptpkg.rawDescription.split("\n")[0]
print i, "-", desc
\o/
The morale of the story:
Netflix’s streaming service will differ from existing online movie services like those from Amazon, Movielink, and Apple iTunes. Those services offer rentals of movies for a fixed time period (e.g., 24 hours) or downloads-to-own, known in Hollywood jargon as ESL for Electronic Sell-Through. In contrast, Netflix will let users pick from a catalog of available films and let users watch any of them for up to a fixed number of hours per month, according to their subscriber level, such as six hours per month for entry-level subscribers. The service will launch with a catalog of about 1,000 titles, the same number as are available on Movielink’s rental service. The video delivery scheme that Netflix is using is a streaming-only technology that senses the user’s Internet bandwidth and adjusts the video quality accordingly; thus it is analogous to RealNetworks’s Rhapsody music service.Limiting the catalog to 1,000 titles undermines Netflix’s key selling point: enormous selection and a long-tail business model. I could probably find those same 1,000 titles at any Blockbuster Video. So all I’m saving is a trip down the street? In return, I get something I can only watch on my computer (with Windows) for a limited number of hours? Apparently, if I want to watch the same scene a few times, or with the director’s commentary (is that even available?), I’m using up my six hours per month.Even cable movies-on-demand is a better service. Don’t get me wrong — I love Netflix as a DVDs-by-mail service. I also think the Netflix web interface and collaborative filter is pretty great, although the third-party Netflix Queue Manager Bookmarklet is a definite improvement. Based on this initial announcement, I can’t think of a single reason why I would prefer the online streaming version of Netflix. Usually I have the foresight to figure out what I want to say 24 hours in advance (the delivery time for Netflix-by-mail) and having three DVDs at once gives me sufficient options in case I’m unsure. Ultimately, I suspect Netflix just wants to send the message that it’s in the Internet-delivery market, which ultimately of course will decimate its existing business model. I just wish it had a more impressive first offering.
If I do get a call from someone who spotted it (rare, once every 3 months), the recruiter is 99/100 an asshole he isn't going to ask you to do something you want. Really!Yeah, I can imagine that. One of the reasons I've put up a mini CV is that every few months I'm asked some of these basics usually found on CVs because of my art - I have some poetry on my page that is very popular, and every now and then someone wants to use it in school; teachers always want people to be able to tell something about the author. In such cases, I find it actually worth to highlight that I'm a math and computer science guy, to make people see that it isn't an either-or thing, language and science.]
| [0] | I brought my bike along, for transport and exploring. This involved packing a bit of extra stuff, borrowing a friend's Tranzbag, arriving early at the airport to get it boxed to ensure a safer journey, picking it up in Dublin, and somehow getting it to Limerick, where I'd have to reassemble it. I wasn't really looking forward to the trip. It turned out to be stressless, as I said. The boxing cost me 10 Franks at the airport and was completed in less than 5 minutes, nobody at the check-in counter said anything, as if it was the most normal thing for them to check in bikes, some dude retrieved the box in Dublin and placed it on my cart, and while I was waiting, I found out that I wouldn't have to hop on a coach (bus) to go to the Dublin train station, catch a train to Limerick, and then finish the last mile in a taxi: a bus operates fairly regularly directly from Dublin airport to Limerick, taking four hours for the journey. That's about how long it would have taken me via the train station, but I only had to pay 19 the train itself would have been 25 , plus the taxi charges. The coach driver was curious when he saw the box, but I didn't have to pay extra, and after watching Airport on my laptop and listening to the new Katatonia album, I found myself with my bag and the bike next to the university's main entrance, with Mel and Daren on the way to pick me up. Five minutes later, I was in my home-to-be-for-five-weeks. |
Next.