mksh R40b (nowadays with filled
in user s caveats (for R40, too!)
and packager s upgrade hints) has
just been released. This is a should-have upgrade, fixing a number of
admittedly some obscure bugs, changing things begun in R40, improving
upon others. Thanks to the PLD Linux guys for spotting all these errors;
thanks to them and phpnet.org both for adopting mksh so well.
I have also fixed a bug in nroff(1) which will lead to an even
nicer looking HTML manpage mksh(1) (after the next rebuild and upload of
a MirBSD snapshot scheduled RSN).
jupp 3.1.16 took on the task
of merging Debian joe changes (aiming at an upload). I also split the
jupprc file into three versions (2.8 generic/DOS, 3.1+jupp and 3.7/Unix)
because of the differences in the baseline executables making rc files
partially mutually incompatible (think Insert key), annoyingly warning
(think syntax, hmsg), or less usable (joe s new menu system).
jupp 2.8.2 is a companion to
jupp 3.1.16 mostly because of the new help window character map
Binaries for jupp should be updated RSN too.
Considering Banja Luka is arriving quickly, the r in RSN should be
taken with a few grains of salt. I ve also scheduled working on the pcc
Debian package for the next future; updating lynx and maybe others like
OpenSSH in MirBSD is also due; cvs(1) will receive more of my time, but
before the next Upload I d like to fix LP#12230 once verified.
Builds for Debian/m68k are also still running. I note I did in fact
not manage to make a new base image, yet (but 2.6.39 kernels
miss a patch, anyway, so waiting for 3.0 is ok). It s still using gcc-4.4
because nobody tests gcc-4.6 and gcj-4.6 FTBFS due to SIGSEGV, but that s
ok in my books. rsyslog is broken but sysklogd works.
The #ksh Freenode page finally
got a well-deserved link to Planet Commandline. Throw more my way!
Acronyms and translations,
too. (Got Norwegian and Rumanian covered in the meantime. No idea whether any
RTL languages will work in that beast. But I m young and need the money)
Since I m writing a wlog entry anyway let me thank Gunnar for a nice
summary on the current Free Culture discussion; my comments on Nina s site
seem to be eaten, but let me support it fully, although, of course, I normally
use a copycenter style licence, which
is specifically written for general works of authorship under copyright law,
not limited to software. I did in fact have that in mind. Maybe some people
will like it (it s less than one Kibibyte long) either generally or just for
their everyday random musings (they can then keep CC-BY-SA for the big works
if they so desire).
Wouter, grass background makes green headlines illegible. I ve never liked,
and never installed manually, cups either. (Benny tells me that Apple s new
version refuses to talk with a non-Apple cups, kinda defeating the whole idea
I think.) Port 9100 is JetDirect (probably with an HP in front and some subset
of trailing) and just nice. (Being able to talk ESC/P with your printer
like print '\033K\x07\0\x3E\x81\x99\xA5\xA5\x81\x3E' >/dev/lpa too
rocks though, IMHO. Yes, mine can, and I still can. /dev/lpa is BSD.)
Kai, thanks for your vimrc lines:
:highlight TrailWhitespace ctermbg=red guibg=red :match TrailWhitespace /\s\+$\ \+\ze\t/
Automatic removal is harmful, though I just fell into the trap since jupprc contains needed whitespace at EOL but manual removal (bound to ^K] in jupp) rocks. And I like that your solution uses such strong a colour vim users are the single most represented offender group for actually leaving the redundant whitespace at EOL there, and it should hurt their eyes. (Sadly there is some vehement disagreement preventing them from inclusion in grml-etc-core but that s why I re-post them here.) Ah, and jupp can of course display whitespace visibly (although it uses / , replacing the arrow with if no UTF-8, not ), accessible with ^Ov. Steve, want to put up a checklist for sites? We can crowdsource the testing to maybe get some interesting results Some other people would get more comments if they were idling in IRC (Freenode) or allow comments on their blog, specifically without too high an entrance barrier OpenID is ok, but many other things, and ECMAscript, are not; but I can t really say that loud because our wlog is static HTML compiled from a flat plaintext data source so it doesn t allow such either. I often forget what I wanted to add if I can t get it out quickly enough (especially at work). Sowwy Me like the cat picture postings (Amayita, Tiago, Gracias!).
In an earlier post, I asked a number of questions, most of
which are now answered. Here's a recap:
I wrote
I stumbled across some CF Engine-style definitions for puppet in a Debian Administration article (taken originally from puppet's own wiki, which have since been moved/deleted)Perhaps it was removed with good reason This is a fairly horrid solution to the problem. Phil was the first to suggest investigating Augeas, a neat tool that abstracts away the nasty specifics of parsing the myriad configuration file formats and provides a unified, tree-like interface for adjusting configurations. The interface reminds me of manipulating XML via the DOM. More on Augeas in a later blog post I also wrote
package [foo,bar]: syntax worked fine, but is a little verbose and the package list is awkward to maintain buried inside the puppet syntax. I spent some time trying to see whether I could populate a puppet list based on the contents of a file: then I could list the packages one-per-line in a separate file. I haven't found a way of doing that yet.I haven't found a more concise way of solving this problem, but as I have grown more familiar with puppet's syntax I have become less bothered by it. I igo suggested pre-processing the puppet configuration, but I'd rather not complicate my provisioning approach (VCS hooks) by attempting that. Finally I wrote
Using my laptop as a second node also exposed some interesting puppet client behaviour. Once I went off-site, the laptop tried to look upI'm pleased to report that the client is at least this clever: it refused to talk to a local puppetmaster that I setup at home.puppeton foreign networks (such as my home network). I would have assumed that, once the strong SSL association had been made, the client would try to connect to the FQDN of the server. This probably isn't a serious problem in practice, as we probably won't need to rely on nodes off-site talking to the configuration server, but I hope that the client doesn't trust any host that happens to answer topuppet...
Sanjog Misra, who
uses Rcpp for
Monte Carlo Markov Chain (MCMC) analyses in quantitative marketing, kindly set me a
short example of Rcpp use.
The example is based on a
blog post by Darren Wilkinson
which itself discusses and compares the suitability of R, Python, Java or C for MCMC analysis, using the
Gibbs sampler as a concrete example. Darren's post is worth checking out: he
stresses the rather pragmatic aspects of how fast and/or easy it is to write the code, rather than just the mere runtime. As such,
he is not too concerned with a speed advantage of Python over R which he sees at a factor of around 2.4, leaving him to continue to prototype in
R. Similarly, with C 'only' being faster than Java by a factor of two, he prefers Java for the numerically more demanding parts.
We do of course advocate the use of Rcpp to combine the best aspects of R and C++,
respectively. This Gibbs sampler example provides a nice backdrop. So working with Darren's example, consider the same Gibbs sampler for
a bivariate distribution (and apologies for the lack of latex typesetting on my blog)
where the conditional distributions aref(x,y) = k x^2 exp( -x y^2 - y^2 + 2y - 4x)
Sanjog then spotted and corrected a small error in the variance expression in Darren's derivation; this is now acknowledged on Darren's website. Full details are in the R script now committed in SVN. The R code for the Gibbs sample can therefore be written as follows below. Note that this uses thinning to minimize serial correlation in the conditional densities--which renders the computation more demanding as 'N times thin' draws have to be generated:f(x y) = (x^2)*exp(-x*(4+y*y)) ## a Gamma density kernel f(y x) = exp(-0.5*2*(x+1)*(y^2 - 2*y/(x+1)) ## a Gaussian kernel
A second variant can be computed using the R bytecode compiler which appeared with the recent release of R 2.13.0 (and which we analysed in this blog post from April). This is as easy as## Here is the actual Gibbs Sampler ## This is Darren Wilkinsons R code (with the corrected variance) ## But we are returning only his columns 2 and 3 as the 1:N sequence ## is never used below Rgibbs <- function(N,thin) mat <- matrix(0,ncol=2,nrow=N) x <- 0 y <- 0 for (i in 1:N) for (j in 1:thin) x <- rgamma(1,3,y*y+4) y <- rnorm(1,1/(x+1),1/sqrt(2*(x+1))) mat[i,] <- c(x,y) mat
Thanks to Rcpp and the inline package, we can also write a C++ variant that can be built and launched from R with ease. The C++ code is assigned to an R text variable## We can also try the R compiler on this R function RCgibbs <- cmpfun(Rgibbs)
gibbscode. (And we used to typeset such
code on the blog as a character string, ie in a faint red color---but have now switched to highlight it as if it were freestanding C++
code. It really is passed as a single string to R which then uses the cxxfunction() to compile, link and load a C++ function
built around the code. See previous posts on the inline package for more.)
It is noteworthy how the code logic is essentially identical between the basic R version, and the C++ version. Two nested loops control draws of x from a Gamma distribution, conditional on y, as well as draws of y from a Normal, conditional on x. Add a small amount of parameter passing to obtain the parameters## Now for the Rcpp version -- Notice how easy it is to code up! gibbscode <- ' using namespace Rcpp; // inline does that for us already // n and thin are SEXPs which the Rcpp::as function maps to C++ vars int N = as<int>(n); int thn = as<int>(thin); int i,j; NumericMatrix mat(N, 2); RNGScope scope; // Initialize Random number generator // The rest of the code follows the R version double x=0, y=0; for (i=0; i<N; i++) for (j=0; j<thn; j++) x = ::Rf_rgamma(3.0,1.0/(y*y+4)); y = ::Rf_rnorm(1.0/(x+1),1.0/sqrt(2*x+2)); mat(i,0) = x; mat(i,1) = y; return mat; // Return to R ' # Compile and Load RcppGibbs <- cxxfunction(signature(n="int", thin = "int"), gibbscode, plugin="Rcpp")
N and thin, allocation of a results matrix and setup of the random number generator state
to remain consistent with R, as well as a return of the matrix---and that is all.
As Darren's code uses the GNU GSL in its C variant, I also became interested in seeing how a C/C++ hybrid variant using our
RcppGSL package would fare. The code is below.
This code is similar to the version using just Rcpp, but we need to allocate space for the GSL random generator object (and later release that memory allocation), and we do of course call the GSL functions. This also necessitates declaring the function using the two header files listed as arguments for thegslgibbsincl <- ' #include <gsl/gsl_rng.h> #include <gsl/gsl_randist.h> using namespace Rcpp; // just to be explicit ' gslgibbscode <- ' int N = as<int>(ns); int thin = as<int>(thns); int i, j; gsl_rng *r = gsl_rng_alloc(gsl_rng_mt19937); double x=0, y=0; NumericMatrix mat(N, 2); for (i=0; i<N; i++) for (j=0; j<thin; j++) x = gsl_ran_gamma(r,3.0,1.0/(y*y+4)); y = 1.0/(x+1)+gsl_ran_gaussian(r,1.0/sqrt(2*x+2)); mat(i,0) = x; mat(i,1) = y; gsl_rng_free(r); return mat; // Return to R ' ## Compile and Load GSLGibbs <- cxxfunction(signature(ns="int", thns = "int"), body=gslgibbscode, includes=gslgibbsincl, plugin="RcppGSL")
include argument of
cxxfunction().
So how is the performance?
The script (now committed in Rcpp's SVN repo as
examples/RcppGibbs/RcppGibbs.R, and also part of the next release) creates the output below when running in non-interactive
mode (whereas interactive mode creates a few charts too):
edd@max:~/svn/rcpp/pkg/Rcpp/inst/examples/RcppGibbs$ r RcppGibbs.R
Replication # 1 complete
Replication # 2 complete
Replication # 3 complete
Replication # 4 complete
N=1000 N=5000 N=10000 N=20000
Elasped Time (R) 0.124 2.650 10.511 41.773
Elasped Time (RC) 0.081 1.916 7.594 30.280
Elapsed Time (Rcpp) 0.003 0.076 0.306 1.221
Elapsed Time (Rgsl) 0.002 0.049 0.196 0.784
SpeedUp Rcomp. 1.530 1.380 1.380 1.380
SpeedUp Rcpp 41.330 34.870 34.350 34.210
SpeedUp GSL 62.000 54.080 53.630 53.280
test replications elapsed relative user.self sys.self
4 GSLGibbs(N, thn) 10 7.845 1.000000 7.84 0
3 RcppGibbs(N, thn) 10 12.218 1.557425 12.22 0
2 RCgibbs(N, thn) 10 312.296 39.808286 311.98 0
1 Rgibbs(N, thn) 10 420.953 53.658764 420.59 0
The first block is a hand-computed comparison using four sets of parameters; the second block uses the excellent rbenchmark package to
compare ten runs at twenty-thousand draws.
We see a nominal increase in performance due to the bytecode compiler, saving roughly 38 percent which seems appropriate given that the R
code mostly controls the loops; actual work in undertaken in the already compiled RNG functions. The Rcpp variant is about 34 times faster
than the pure R code. Sanjog reported higher increases on his OS X machines (and Darren's post echos a similar order of
magnitude). However, on my i7 running Linux I always obtained an improvement in the mid- to high thirties. That is certainly already a
rather pleasant result.
What surprised and stunned me at first was that the GSL solution scores an improvement of around 53 times (close to the factor of 60
reported by Darren). A closer look at the code (shown above) makes it clear that there are very few compute-intensive operations outside of
the RNG draws. I validated this further with a second study timing just one million draws each from a Gaussian and Gamma using R via Rcpp,
and using the GSL. It turns out that the R code is about 2.5 times slower for random draws from the Gamma distribution than the GSL. Inspection of the
source code---in files src/nmath/rgamma.c for R and randist/gamma.c for the GSL shows why. R uses a much more complex
(and presumably more precise) algorithm. I may follow up with Martin Maechler to see if we can illustrative the numerical benefits of this
more expensive approach---this blog entry is getting long enough already.
So to sum up: Gibbs sampling is a somewhat resource-heavy Monte Carlo Markov Chain method for investigating multivariate distributions. R excels at
quick and simple explorations, albeit at somewhat slower execution speed. The
Rcpp package can help by providing easy
means to accelerate simulations by a significant factor. The example discussed here is now in SVN repository for
Rcpp and will be part of the next release.
Updated 2011-07-16: Darren has just updated his comparison; fixed two typos here too.
apt-get build-dep gnucash
apt-get install python-dev
As a non privileged user:
apt-get source gnucash
cd gnucash-N.N.N # varies depending on your version)
Then, edit debian/rules and add --enable-python-bindings to the dhautoconfigure command. I replaced the line:
--enable-locale-specific-tax
With the lines:
--enable-locale-specific-tax \
--enable-python-bindings
Then, update the change log with:
dch
Built the new package:
dpkg-buildpackage -rfakeroot -uc -b
I then wrote a python module. It logs into the server running our members database, runs a script to export tab delimited lists, and then imports them into our gnucash xml file.
It's far from perfect (I'm fairly new to python). Also - I have sheepishly inserted code that searches for certain values by accessing the gnucash file directly (via python's xml handling modules). I couldn't figure out how to do the search I needed with they available python methods, although it may very well be there and I just couldn't figure it out.
If anyone is interested in using it for a template:
#!/usr/bin/python
import sys
import os
import time
import csv
import warnings
from xml.dom.minidom import parse
from gnucash import Session, GncNumeric
from gnucash.gnucash_business import Customer, Invoice, Entry, BillTerm
from decimal import Decimal
import datetime
import tempfile
import subprocess
def main(argv = None):
if argv is None:
argv = sys.argv
path = os.environ['MFPL_GNUCASH_PATH']
if not os.path.exists(path):
print """Path (%s) does not exist. Please set
MFPL_GNUCASH_PATH environment variable\n""" % path
return 1
if os.path.exists(path + '.LCK'):
print """Lock file exists. Is GNUCash running?\n"""
return 1
command = argv[1]
import_file = None
if 2 in argv:
if argv[2] == '--from-file':
if argv[3]:
if os.path.exists(argv[3]):
file_path = argv[3]
import_file = open(file_path,'r')
else:
print "Can't find file to import: %s" % argv[3]
return 1
else:
print "Please pass path to file if using --from-file"
return 1
else:
print "I didn't understand the argument: %s" %s
# download import file if not provided
if import_file == None:
import_file = get_data(command)
# The file might be gzipped, so
# open and save it
s = get_gnucash_session(path)
s.save()
s.end()
# Wait a second, so we can create a backup
# without a name collision
time.sleep(1)
# Open for real now...
s = get_gnucash_session(path)
xml_dom = parse(path)
if command == "members":
ret = import_members_from_file(s, xml_dom, import_file)
if command == "invoices":
ret = import_invoices_from_file(s, xml_dom, import_file)
s.save()
s.end()
return ret
def get_data(command):
import_file = tempfile.NamedTemporaryFile()
if command == 'members':
remote_cmd = 'acc-member-list'
else:
remote_cmd = 'acc-invoice-list'
args = [ '/usr/bin/ssh', 'mayfirst@hay.mayfirst.org', '/home/mayfirst/bin/' + remote_cmd ]
subprocess.call(args,stdout = import_file)
return import_file
def import_invoices_from_file(s, xml_dom, csvfile):
dialect = 'excel-tab'
csvfile.seek(0)
reader = csv.reader(csvfile, dialect)
nodes = xml_dom.getElementsByTagName('gnc:GncCustomer')
already_entered = 0
entered = 0
for row in reader:
member_id = row[0]
invoice_id = row[1]
invoice_date = row[2]
invoice_amount = row[3]
invoice_desc = row[4]
if not member_id.isdigit():
# header line or not coded to a member?
continue
member_id = int(member_id)
invoice_id = int(invoice_id)
if invoice_exists(xml_dom, invoice_id):
# print "Already entered %s (%s)" % (invoice_date,invoice_id)
already_entered += 1
else:
if not member_exists(xml_dom, "No Name McGoo - fix me" , member_id):
print "Skipping member id %s, invoice id %s - member doesn't exist" % (member_id, invoice_id)
else:
invoice_enter(s, member_id, invoice_id, invoice_date, invoice_amount, invoice_desc )
entered += 1
print "Invoices entered from last two months: %s (%s already existed)" % (entered, already_entered)
return True
def get_guid_from_member_id(nodes,member_id):
member_id = pad_number(member_id)
for node in nodes:
for child in node.childNodes:
if child.nodeName == 'cust:guid':
guid = child.childNodes[0].data
if child.nodeName == 'cust:id':
if member_id == child.childNodes[0].data:
return guid
def import_members_from_file(s, dom, csvfile):
dialect = 'excel-tab'
csvfile.seek(0)
reader = csv.reader(csvfile, dialect)
already_entered = 0
entered = 0
for row in reader:
member = row[0]
member_id = row[1]
if not member_id.isdigit():
# header line?
continue
member_id = int(member_id)
if member_exists(dom, member, member_id):
#print "Already entered %s (%s)" % (member, member_id)
already_entered += 1
else:
member_enter(s, member, member_id )
entered += 1
print "Members entered from last two months: %s (%s already existed)" % (entered, already_entered)
return True
def get_gnucash_session(path):
with warnings.catch_warnings():
warnings.simplefilter("ignore")
return Session(path, is_new = False)
def member_enter(s, member, member_id):
print "Entering %s with id %s" % (member, member_id)
book = s.book
root = book.get_root_account()
commod_table = book.get_table()
USD = commod_table.lookup('CURRENCY', 'USD')
member_id = pad_number(member_id)
new_customer = Customer(book, member_id, USD, member)
def invoice_enter(s, member_id, invoice_id, invoice_date, invoice_amount, invoice_desc):
book = s.book
root = book.get_root_account()
commod_table = book.get_table()
USD = commod_table.lookup('CURRENCY', 'USD')
invoice_id = pad_number(invoice_id)
member_id = pad_number(member_id)
invoice_date_object = datetime.datetime.strptime(invoice_date, "%Y-%m-%d %H:%M:%S")
member = book.CustomerLookupByID(member_id)
assert( member != None )
assert( isinstance(member, Customer) )
assets = root.lookup_by_name("Assets")
recievables = assets.lookup_by_name("Recievables")
income = root.lookup_by_name("Membership Dues")
invoice = Invoice(book, invoice_id, USD, member, invoice_date_object )
invoice_value = gnc_numeric_from_decimal(Decimal(invoice_amount))
invoice_entry = Entry(book, invoice)
invoice_entry.SetDescription(invoice_desc)
invoice_entry.SetQuantity( GncNumeric(1) )
invoice_entry.SetInvAccount(income)
invoice_entry.SetInvPrice(invoice_value)
invoice_entry.SetDate(invoice_date_object)
invoice_entry.SetDateEntered(invoice_date_object)
print "Entering invoice %s %s %s" % (invoice_id, invoice_date, invoice_amount)
invoice.PostToAccount(recievables, invoice_date_object, invoice_date_object, "", True)
def pad_number(num):
return "%(number)06d" % 'number': num
def member_exists(dom, member, member_id):
member_id = pad_number(member_id)
for node in dom.getElementsByTagName('gnc:GncCustomer'):
for child in node.childNodes:
if child.nodeName == 'cust:name':
for grandchild in child.childNodes:
if member == grandchild.data:
return True
if child.nodeName == 'cust:id':
for grandchild in child.childNodes:
if member_id == grandchild.data:
return True
return False
def invoice_exists(dom, invoice_id):
invoice_id = pad_number(invoice_id)
for node in dom.getElementsByTagName('gnc:GncInvoice'):
for child in node.childNodes:
if child.nodeName == 'invoice:id':
for grandchild in child.childNodes:
if invoice_id == grandchild.data:
return True
return False
def gnc_numeric_from_decimal(decimal_value):
sign, digits, exponent = decimal_value.as_tuple()
# convert decimal digits to a fractional numerator
# equivlent to
# numerator = int(''.join(digits))
# but without the wated conversion to string and back,
# this is probably the same algorithm int() uses
numerator = 0
TEN = int(Decimal(0).radix()) # this is always 10
numerator_place_value = 1
# add each digit to the final value multiplied by the place value
# from least significant to most sigificant
for i in xrange(len(digits)-1,-1,-1):
numerator += digits[i] * numerator_place_value
numerator_place_value *= TEN
if decimal_value.is_signed():
numerator = -numerator
# if the exponent is negative, we use it to set the denominator
if exponent < 0 :
denominator = TEN ** (-exponent)
# if the exponent isn't negative, we bump up the numerator
# and set the denominator to 1
else:
numerator *= TEN ** exponent
denominator = 1
return GncNumeric(numerator, denominator)
if __name__ == "__main__":
sys.exit(main())
One of the ways in which EFI is *actually* better than BIOS is its native support for multiple boot choices. All EFI systems should have an EFI system partition which holds the OS bootloaders. Collisions are avoided by operating system vendors registering a unique name here, so there's no risk that Microsoft will overwrite the Fedora bootloader or whatever. After installing the bootloader the OS installer simply sets an NVRAM variable pointing at it, along with a descriptive name and (if they want) sets the default boot variable to point at that. The firmware will then typically provide some mechanism to override that default by providing a menu of all the configured variables.
Squashing release critical (RC) bugs is one of the most helpful way to contribute to Debian. Because those are the bugs that we need to get rid of in order to release the next stable version. Let s see how you can help.
The process is really simple:
$ rc-alert --include-dists TU --exclude-tags P+ --debtags implemented-in::perl,implemented-in::python Package: gwibber Bug: 608724 Title: gwibber bypasses certificate checking when providing the login/password for OAuth Flags: [ S ] (security) Dists: [STU] (stable, testing, unstable) Debtags: implemented-in::python, interface::x11, role::program, uitoolkit::gtk, works-with::im, x11::application [...]Get your fixed package uploaded Usually sending the patch to the BTS is more than enough. The maintainer or another Debian developer will pick it up at some point. But if you re interested in becoming a Debian maintainer/developer, it might be worth to push your changes more quickly and get credited by a proper upload with your name. Instead of just preparing a patch, you should also prepare a fixed package following the rules of a Non-Maintainer Upload. Put this package somewhere online (for example on mentors.debian.net). When you send your patch to the BTS, include the link to the updated package and express your wish to get this update sponsored. If you haven t heard anything from the maintainer after 2-3 days, try to find a sponsor on debian-mentors@lists.debian.org. NMUs are easier to review than completely new packages and many Debian developers like to kill RC bugs, so there s a good chance that you ll find someone. Now happy RC bug-squashing! And if you really enjoy it, you can subscribe to debian-bugs-rc (~3000 mails per month)
If you want to read more articles like this one, click here to subscribe to my free newsletter. You can also follow me on Identi.ca, Twitter and Facebook.
No comment Liked this article? Click here. My blog is Flattr-enabled.
Well, actually, just one, and it s not even mine.
Matt Stancliff benchmarked a few different
methods of SSL termination and found that nginx sucked
rocks relative to the other options. However, it
turns out the comparison wasn t as balanced as he originally thought, and
discovered that the SSL ciphers you use are quite
important.
As an aside, I like Matt s benchmark everything philosophy.
On Friday, June 24, the last day of Open Source Bridge, I won a scarf! It says, "Open Source Citizen."
I wasn't the only one. The attendees nominated people who "made an extra effort to help others and share their knowledge," and the conference committee chose the three people they felt exemplified this. The winners were Sumana Harihareswara, Igal Koshevoy, and me.
In case you don't know Sumana, she's the new Wikimedia Volunteer Development Coordinator, a friend, and a commenter here at Asheeshworld. In the photo of her and her new scarf, you can also see Ward Cunningham. I suggest reading her wrap-up about the conference, and checking out the notes from her talk.
I haven't met Igal, but I've learned he's a fixture of the Portland tech scene. He's user number one on opensourcebridge.org and one of the original contributors to calagator, the most important event calendar in the Portland tech world. That's just a brief summary; follow him on Twitter to keep in touch.
I started the conference a little shy, not wanting to introduce myself to people, so I hung out with Sumana. She talked to everyone she could find, and there I was standing next to her. On the first day, it was only because of Sumana's outgoingness that people knew who I was. On the second and third days, I was involved in two sessions: a panel on open source communities and a talk about the OpenHatch training missions.
I was extremely honored to be chosen. There were so many other spectacular people I met for the first time, like Valerie Aurora,
Jacinta Richardson, Brian Aker, and Alex Linsker. These are all people with three crucial traits: they're extremely knowledgeable, friendly, and opinionated. I'm glad I had a chance to attend and meet them!
Photo credits: Thanks to Noah Swartz for the photo of me. Sumana's photo comes from her post to wikitech-l. Igal's comes from his Open Source Bridge user profile.
Cineast and Free Culture activist Nina Paley wrote some days ago a rantifesto on why the FSF has a double standard: Why are the Freedoms guaranteed for Free Software not guaranteed for Free Culture?, by not following its own very strict rules on software when it comes to culture as a whole. Her post was widely circulated, and got (at least) one reply by fellow Debian Developer Wouter Verhelst, largely agreeing with her, and an anti-rantifesto by Joe Brockmeier Which was promptly answered again by Wouter with a very fun and inspired post, written from the right angle: From the viewpoint of a person who is both a programmer and a musician, and understands the concepts at hand.
I'd love to write a longer, better thought post But I'm tired and frankly stressed by many things, so I am just echoing their very interesting discussion to other people who might want to read it.
I have been thinking and writing bits on that subject over the last couple of months. An example of that was the talk I gave at the Senate ~6 weeks ago. Following that talk, I wrote a short article for Revista Z calo (a widely circulated magazine mainly dealing with Mexican politics and social issues) called simply Software libre, cultura libre (full text available, but in Spanish only You can try reading an automated translation if it suits you). I wrote the article, mind you, with very limited time, and I'll be the first to recognize the prose was quite poor this time :(
Anyway My point is that our nature is to share culture, to build it in a collaborative fashion, and having the Internet as a practically zero-cost, zero loss medium with which we can interchange our creativity with other like-minded people will naturally boost creativity. Free Software emerged before other Free Culture groups just because programmers had privileged access to Internet in the 80s and early 90s; as network access and digital creation tools have got to more people, it's just natural for all kinds of free culture to grow.
Software is just a form of knowledge. Code is just a notation for a certain kind of ideas, just as the mathematical or musical notations. I believe (and hope) it's just unavoidable for us all to eventually switch to a mainly free cultural creation system.
Barring a miracle, it looks like I won't be going to Debconf 11 this year which is a shame as that is a part of the world I have yet to visit. Anyway it got me thinking, I've neglected a lot of my Open Source activities this past year or so what with struggling to stay in good financial shape. As Chaturmasa started today in which we take up additional religious duties, I thought it might be a good time to recommit to getting all my projects up to speed again.
So during the next four months I aim to (in no particular order)
i386 systems are dying off and therefore building 32bit Debian packages in 64bit environments is important if you still need packages for i386. For some recent projects I had to set up 64bit-only environments with the need to provide 32bit packages for i386 as well as according i386 Linux kernel packages.
1) Common Debian packages
Just prepend the linux32 command to the build commands and use the -a386 option of dpkg-buildpackage(1). So use linux32 dpkg-buildpackage -ai386 , linux32 git-buildpackage -ai386 , linux32 debuild -ai386 , or whatever build tool you prefer to work with. I personally like using git-buildpackage -S together with cowbuilder. When using cowbuilder it s easy to get i386 Debian packages:
# create initial cow base directory, needs to be executed just once: cowbuilder --create --basepath /var/cache/pbuilder/wheezy32.cow \ --architecture i386 --distribution wheezy --mirror http://ftp.de.debian.org/debian # the "debbuildopts -b" says I want a binary-only build, see dpkg-buildpackage(1): linux32 cowbuilder --build --basepath /var/cache/pbuilder/wheezy32.cow \ ~/foobar_0.42.dsc --debbuildopts "-b"2) Debian Kernel packages If you re building your own kernel images you might be aware of setting ARCH for the common make targets, like:
ARCH=i386 make oldconfigTo build a linux-image Debian package you can use upstream s deb-pkg target, like:
ARCH=i386 make deb-pkgThis should provide you according linux-headers, linux-firmware-image, linux-libc-dev and linux-image i386 Debian packages. But if you need the according source and doc packages as well you might prefer make-kpkg of kernel-package instead, using options like:
DEB_HOST_ARCH=i386 setarch i386 make-kpkg --revision "$KERNELVERSION" \ --cross-compile - --arch=i386 --us --uc --initrd \ --rootcmd fakeroot kernel-image kernel-headers kernel-doc kernel-source3) Debian linux-2.6 kernel packages If you re interested in building Debian kernel images the same way as the Debian kernel team does (AKA linux-2.6) make sure to check out the kernel-handbook. After installing essential software packages I had to set up some symlinks for building:
apt-get install build-essential fakeroot devscripts fakeroot apt-get build-dep linux-2.6 ln -s /usr/bin/gcc-4.4 /usr/bin/i486-linux-gnu-gcc-4.4 ln -s /usr/bin/ld /usr/bin/i486-linux-gnu-ld ln -s /usr/bin/ar /usr/bin/i486-linux-gnu-ar ln -s /usr/bin/objcopy /usr/bin/i486-linux-gnu-objcopy ln -s /usr/bin/nm /usr/bin/i486-linux-gnu-nm ln -s /usr/bin/objdump /usr/bin/i486-linux-gnu-objdump ln -s /usr/bin/strip /usr/bin/i486-linux-gnu-stripThen executing:
apt-get source linux-2.6 cd linux-2.6* debuild -ai386 -us -ucprovided the according Debian packages (linux-doc, linux-headers, linux-image, linux-libc-dev, linux-manual, linux-patch-debian, linux-source, linux-support and linux-tools). 4) Out-of-tree kernel module packages If you want to build external modules which are available as $MODULENAME-source in Debian (e.g. tp-smapi-source) using module-assistant then use the DEB_HOST_ARCH environment variable, like:
DEB_HOST_ARCH=i386 m-a -v --text-mode -k /home/mika/linux-$KERNELVERSION -l $KERNELVERSION build tp-smapiIf the external module is not available for use with module-assistant then compile the module running:
make -C /lib/modules/$KERNELVERSION/build M=$(pwd)whereas /lib/modules/$KERNELVERSION/build is pointing to the build directory of your 32bit kernel.
Deutsche Version dieses Postings read the English Version instead Der Leiter der Abteilung Systemadministration einer Firma, welche in diesem Artikel ungenannt bleiben soll, wo der Zufall es will, da ich f r sie arbeite, m chte uns Mitarbeiter dazu zwingen, das Feature der persistenten Historie (also einen niedergeschriebenen Verlauf der abgesetzten Befehle) der Shell (Kommandozeile) auf allen Systemen zu benutzen. Nun hat die mksh dies vern nftigerweise, w hrend immer noch verf gbar, standardm ig aus Gr nden der Privatsph re deaktiviert, und ich finde, dies sollte sich nicht ndern. Es kann ja nicht sein, da man mir beim Arbeiten ber die Schulter guckt; was kommt als n chstes, Video berwachung der B ros? (Seine Argumentation l uft darauf hinaus, da er nachvollziehen/verstehen kann, wie ich (ha! ich! nicht die anderen, nein, ich!) ein Problem das letzte Mal gel st habe; es ist aber nichts anderes als rekonstru eren zu k nnen, wer wann was eingetippt/gemacht hat. Naja, Argumentationen sind eh relativ, andere jagen Flugzeuge in ihre eigenen Verteidigungsministerien, welche gerade zuf llig umgebaut werden ) Ich habe dies nat rlich in die F hrungsetage eskaliert, und unser Gesch ftsf hrer versteht meine Bedenken und m chte nun ein Gespr ch anraunen, um eine L sung zu finden. Die meisten meiner Kollegen im Bereich Systemadministration denken leider nichtmals dr ber nach, obschon ich in anderen Bereichen Gleichgesinnte gefunden habe. Einen Betriebsrat haben wir auch gro er Fehler, ich wei nicht (aber ich s e eh nicht drin, ich hasse Politik jeder Art). Dies l t mich in dringender Not, Argumente wider diese Total berwachung aller (insbesondere auf der Kommandozeile arbeitenden also besonders mich) Kollegen zu finden, idealerweise solche, die durch deutsches Recht gest tzt sind. Wenn ihr solche habt, bitte mailt die schnell an meine eMail-Adresse, welche da nicht junk@mirbsd.org lautet, sondern mit einem tg vor dem Klammeraffen (dies dient der Abwehr unerw nschter Werbemails). Vielen Dank bereits im Voraus! Update 12.07.2011: Wir haben geredet, und wie viele kommentierten keine L sung auf rechtlicher Ebene gefunden, sondern stattdessen, nachdem wir festgestellt hatten, da mir dieses Problem sehr am Herzen liegt, nach anderen L sungen f r das eigentliche Ziel des Chefadmins gesucht; dies z hlt als ein Entgegenkommen auf Seiten der Firma. Ich habe zugestimmt, meine L sungen in kleine Skripte zu verpacken und ins VCS zu committen f r das Herausfinden, wann was auf einem Server ge ndert wurde, im Fehlerfall, denken wir uns gerade ohnehin was aus. Danke an alle, die kommentiert haben!
English version of this posting lese stattdessen die deutsche Version The head system administrator of a henceforth unnamed company I happen to be employed at wants to force us to use the shell s persistent history feature disabled by default in mksh as is sensible, for privacy reasons on all systems, so he can retrace what we do (of course, his wording was more like, so he can reconstruct how I fixed a problem the last time it occurred yeah, sure). Now I ve escalated this to the boss, since this just cannot happen, what ll be next, video monitoring our offices or what and the boss said he sees my concerns and would like a meeting to get an agreement between all parties involved. Most sysadmin coworkers actually don t even think about this, they are sheeple, really; but my project manager (for when I m not a sysadmin but a programmer) and the leaderess of our QA department agree with me, luckily. Now I m in dire need of arguments, especially German-Legalese, to fight this total surveillance of employees, mostly targetted at these who use the command line almost exclusively, which I m a prime example of. Please mail me at my address, which is not junk@mirbsd.org but with tg instead of the waste part here to catch address grabbers (sending mail to that address yields a 24-hour total blacklist of your IPv4 address I ve yet to get enough spam via IPv6 to say filtering it is worth the cost). Thanks in advance!
You might have noticed the release of mksh R40 recently, after
more than a year of development. Well, stay tuned for both
R40b (with accumulated fixes) and R41 (intent to speed up
array handling a lot and prepare for what we postponed to
mksh R42 now associative, multi-dimensional arrays).
You should also upgrade, if you have not yet done so, to kwalletcli 2.11.
Finally, jupp 3.1.15
was left out to the world, including Minix 3 users this time,
by special request of one of these on our mailing list. In
addition to the MidnightBSD mport which has been there in
like forever and the MirPort and the FreeWRT package, in
December 2011 a user submitted it to FreeBSD ports, and Benny
is going to add it to NetBSD pkgsrc soon, he said. (He also
updated their mksh source package. Thanks!) I ve been asked by
two people, independent from each other, when I ll upload it to
Debian proper, instead of the private-repo packaging. Maybe I
should indeed do that, comments?
Ten years ago, I started to use ZSH, a shell designed for
interactive use but which is also powerful for scripting usage. I had
a fairly comprehensive .zshrc file splitted in several parts. I have
decided to rewrite it for several reasons:
head, awk,
sed that could be replaced by some ZSH machinery (something easier
to read like $ $ (f)~~"$(</etc/hosts)" %%\#* ).
oh-my-zsh, a nice project trying to
provide a generic and flexible ZSH configuration:
A community-driven framework for managing your zsh configuration. Includes 40+ optional plugins (rails, git, OSX, hub, capistrano, brew, ant, macports, etc), over 80 terminal themes to spice up your morning, and an auto-update tool so that makes it easy to keep up with the latest updates from the community.The idea of such a project is to fork it and make the changes that you need. I was previously hacking around Phil! s ZSH Prompt for my prompt.
oh-my-zsh contains a close theme (jonathan). Neat.
However, I decided to write my .zshrc from scratch (but with some
snippets stolen from oh-my-zsh). Why? Mostly because I want to
precisely configure ZSH. Even with its plugin architecture and its
override mechanism, oh-my-zsh provides some features (options,
aliases, functions) that I do not want. Of course, thanks to git, you
can fork and make any local changes you want but since I would have
modified most of the files, it seemed easier to just start from scratch.
I have published the result on GitHub. You can use it as is,
fork it or (better) steal and adapt some snippets for your own
usage. Here is the mandatory screenshot for the prompt (no much space
left for the commands):
Here is a short snippet used to select a sensible EDITOR depending
on what is available. It uses anonymous functions (to restrict the
scope of local variables), arrays and flags in parameter
expansion. For another example, take a look on
how I select a valid locale.
() local -a editors local editor editors=( "emacs23 -Q -D -nw" # Fast emacs "jove" "mg" "jed" # Emacs clone "vim" "vi" # vi "editor") # fallback for editor in $editors; do (( $+commands[$editor[(w)1]] )) && export EDITOR=$editor break done
__() local -a editors local editor ... && __
Two promising new developments need to be mentioned. First, we were approached
by companies that develop hardware for brain-imaging and psychophysics
research. They were curious to learn about Debian as an integrated platform
that offers free software solutions that an increasing amount of their
customers demands (e.g. PsychoPy). Apparently, the movement towards open
research software has finally made it into the business plans of companies, as
they seem to start perceiving compatibility with free software systems as a
competitive advantage. We explained how software gets into Debian, and how its
release cycle is managed. To foster their motivation we also pointed them to
the existing open-source software that is already available or even present in
Debian. Let s see whether we see more Debian-certified research products in
the future.
Lastly, we started talking with folks from the INCF to explore possibilities of
collaborating on INCF projects using Debian as the integration and development
platform. The INCF is an OECD-funded organization that develops collaborative
neuroinformatics infrastructure and promotes the sharing of data and computing
resources to the international research community. At least one INCF project is
already relying on the efforts of the NeuroDebian project. We are going to continue
this discussion during a workshop in September. A report will follow...
Debian people at the booth (f.l.t.r): Michael Hanke, Yaroslav Halchenko, Stephan Gerhard, Dominique Belhachemi. Not shown: Swaroop Guntupalli.
Next.