[Nothing related to Debian here, move on if you don't care about my recurring obsession with the end of the world, Cassandra pains, or Big Phat Living Room Revolution yearnings].[Emphasis mine]
At what point does human culture depart from the Natural? With the invention of computers? TV? Cars? The cotton gin? Electricity? Taco stands? Gunpowder? The printing press? Written language? Shoes? Crop cultivation? Yurts? The wheel? Did humans become unnatural when the good old days of picturesque, endless agrarian toil, feudal oppression, unchecked disease, ignorance, and death from dysentery at 35 turned into the bad new days of urban post-industrial capitalism where a pound of fair-trade organic coffee costs $12.99 and your email inbox is full of spam?
ah. Everything humans do, or have ever done, is natural. We can t do anything else. The idea that modern culture is un-natural is nostalgic and inaccurate. Living off the grid in a yurt is good in some absolute sense, whereas driving an SUV from a suburban bungalow to the stripmall is bad ? Come on. This a romantic, but misguided view. The cosmic reaction to a 20 Ford Expedition is the same as to a sanctimonious Prius: bupkis. The universe doesn t give a fuck about you or your lifestyle choices. It doesn t give a fuck about the economy, oil spills, or civil unrest in Blargistan. It doesn t give a fuck about katydids. Eventually our whole planet will be erased from space, and the galaxy won t bat an eye. The inevitable extinction of our species (imminent, according to research here at Spinster Laboratories) via the exhaustion of available resources is as natural as a fresh-picked peach. As Andre 3000 and other dude philosophers have observed, nothing is forever.
Yes, yes, when people use the word natural what they really mean is free of chemical additives and maybe some of the assorted hippie concepts that go with that narrative. Barter economies, home furnishings made from bamboo, vegan cookbooks, living in the country. While I would argue that it is just as natural for people to put chemical additives in things as it is to not put chemical additives in things, I admit that it is appealing to fantasize that the source of human misery is an unnatural isolation from Nature, and that doing yoga on an organic rubber mat and drinking organic spinach smoothies will put me back in sync with the cosmos.
But alas, I m already in sync with the cosmos, and so are you. In other words, this is it. This is what we ve become, and this is what we get. Which is not to say that a person can t fantasize about a verdant paradise full of songbirds and polar bears and Bengal tigers, untouched by human influence. Only, that world isn t a world we could actually live in. The minute you add contented children, lazy from a carefree day at the swimming hole, eating ripe plums on the porch at sunset to that scenario, natural history changes, and it s right back to our scorched-earth dystopia. Our giant brains use up resources, it s as simple as that.
As long as we re still here, though, we might as well try to make the best of it.
http://blog.iblamethepatriarchy.com/2010/06/19/heads-up-art-week-starts-on-monday/
# apt-get install postgresql-8.4 postgresql-8.4-postgis postgresql-contrib-8.4Well, yes, I know Squeeze is still Testing and such, but as libkrb5-3 and libgssapi-krb5-2 are required but seem to be unavailable, I wonder when this issue will get solved? There seems no bug report for postgresql-8.4, libkrb5-3 or libgssapi-krb5-2. Is that for a reason? Or is the reason for uninstallable postgresql-8.4 something else? UPDATE:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation: The following packages have unmet dependencies.
postgresql-8.4: Depends: libgssapi-krb5-2 (>= 1.8+dfsg) but it is not going to be installed
Depends: libkrb5-3 (>= 1.6.dfsg.2) but it is not going to be installed
Depends: libpq5 (>= 8.4~0cvs20090328) but 8.3.11-0lenny1 is to be installed
Depends: postgresql-client-8.4 but it is not going to be installed
postgresql-contrib-8.4: Depends: libpq5 (>= 8.4~0cvs20090328) but 8.3.11-0lenny1 is to be installed
E: Broken packages
# apt-cache policy postgresql-8.4
postgresql-8.4:
Installed: (none)
Candidate: 8.4.4-2
Version table:
8.4.4-2 0
500 http://ftp.de.debian.org squeeze/main Packages
# apt-cache policy libkrb5-3UPDATE 2:
libkrb5-3:
Installed: 1.8.3+dfsg~beta1-1
Candidate: 1.8.3+dfsg~beta1-1
Version table:
*** 1.8.3+dfsg~beta1-1 0
500 http://ftp.de.debian.org/debian/ squeeze/main amd64 Packages
100 /var/lib/dpkg/status
A lot is being said on how Ruby is packaged in Debian and Ubuntu. In this post, I m trying to go through the most common myths and give my position as a Debian Ruby maintainer. Note that those are my views, not necessarily those of the other Debian Ruby maintainers.
Myth: Ruby is completely outdated in Debian and Ubuntu
There s a culture in the Ruby community of always using the latest bleeding-edge version. There s also a culture (though this one has recessed a bit, I think) that it s perfectly fine to change APIs in incompatible ways if it makes the software slightly better.
In Debian (and Ubuntu) stable releases, we try to provide a rock-solid version of Ruby that won t be allowed to change API during the support lifetime of a release. Bugfixes for important bugs can be applied, but that s basically all. So it s not surprising that Ruby in released versions of Debian and Ubuntu is behind the latest upstream version.
In development branches, we are following the latest upstream versions quite closely. Debian 6.0 squeeze , to be released by the end of the year, includes Ruby 1.8.7-p302, and will include 1.9.2-p0 (the currently of Ruby 1.9.2 in squeeze is currenty a SVN snapshot from beginning of august).
There are people interested in installing a packaged Ruby that just works, and other people interested in installing their own version of Ruby (through RVM and such). People in the Ruby community tend to forget about the first category, and consider that, because they install Ruby from source or with RVM, that should be the solution for everybody.
We need the Ruby community to respect that different people have different ways of using Ruby, and to stop recommending that everyone using Debian and Ubuntu should install Ruby from source.
We also need to leverage the backports services for both Debian and Ubuntu to provide a way to install the latest upstream version on stable releases. The only reason why we are not doing it yet is lack of time.
Myth: Ruby is split into a myriad of packages in Debian
In the past (pre-2005), a decision was made to split some libraries from the standard library into separate packages. This was motivated by:
gem update --sytem is disabled in the Debian package, because that would replace code from the Rubygems Debian package with code downloaded from the Internet, and can break your system in subtle ways. We have changed this (in SVN, not in any package in the archive yet) to allow gem update --system if a specific environment variable is set, which gives us the opportunity to display a warning message.
Myth: Ruby is slow on Debian
Ruby is built with the pthread threading code, because not using it breaks many native Ruby libraries (Ruby-gnome2, for example). And other Linux distributions are doing the same.
There are some very old benchmark results floating around in some blogs that show that the pthread code has a performance impact of about 20%. There are been patches for that for a long time (applied in Ruby Enterprise Edition), but they were never properly sent back. Actually, all the discussions about this issue were rumors and blog posts, and there wasn t even a bug report about it!
After the bug was reported properly, it was fixed in a timely manner. The fix is not yet included in the Ruby 1.8.7, but is being applied as a patch to the Debian package since 1.8.7.299-2. (So the Debian package is actually newer and faster than upstream Ruby in that regard).
What makes Ruby so difficult to maintain in Debian?
The main problems we have with Ruby are portability issues. The only officially supported platform for Ruby is IA32 (i386 in Debian), and everything else is best effort. It means that it is not even supported officially on x86_64/amd64! Debian supports a dozen of architectures, and the Ruby package has to work on each of them. Ruby 1.8 is mostly OK nowadays thanks to the help of Debian porters, but we still have serious problems with 1.9.2, since the test suite fails on sparc, hppa, ia64 and Debian GNU/kFreeBSD.
Why doesn t Ruby use the alternatives system on Debian?
The alternatives system provides a way to switch between different software providing the same functionality. Currently, if you want to use Ruby 1.9.2, you need to use the ruby1.9.1 executable (1.9.1 = ruby compatibility version here). The alternatives system would allow to switch ruby to ruby1.9.1 on a system-wide basis.
However, the situation of applications and libraries working only with Ruby 1.8 should be clarified: those should use /usr/bin/ruby1.8 instead of /usr/bin/ruby. Another problem is that the way to specify packages dependencies still need to be determined. There s nothing impossible to do about that, it just needs someone to do the work.
Where do we go from here?
The Ruby developers (or expert users) community is generally very hostile towards Debian. Many harsh words and insults are used in discussions mentioning Debian in the ruby-core@ mailing list, and there are frequent recommendations to avoid the Debian packages and install from sources, which is quite demotivating (Actually, what prompted that blog post is someone calling Debian-specific changes unforgivable).
This atmosphere makes it hard to recruit people, and the Debian Ruby teams are completely understaffed, which is clearly the major blocker to improving the situation further. We are 3 co-maintainers for the interpreter packages, and I m the only Debian Developer that is really active on a regular basis in the pkg-ruby-extras team (that does libraries and applications packaging). We desperately need help, but at the same time I have no time to improve our documentation and make it easier to join the team.
While I haven t reached a final decision yet, I am also likely to stop doing Ruby work in Debian after squeeze is released, as I am getting increasingly tired and demotivated.
Peter Cox on model complexity
As mentioned in my last blog post the GuruPlug Server Plus needs some major refactoring before it can be used. Not doing so will make you end up with a fried brick. There are various stories in the forums about cooling it properly, so you might want to have a look first instead of following mine blindly. And of course - whatever you do - it is your fault when you end up with a brick, not mine!.
Not sure if I could introuce some more load, the CPU had a load of 6 running stress. Network traffic was around 2x100MBit/s again. I could imagine with 2xGBit the CPU and PHY would become much hotter (no idea if it would be able to handle it at all, though). The PHY was usually a bit cooler than the CPU, so I didn't spend time to measure the temperature properly.
It is a while since we managed to get below the 1000 stable RC mark. Last weekend we managed the next mark, that is we are below 900 now! Obviously my effort during the RCBC did take us a fair step in that direction, but I don't want to take full credit for it.
The last bit that got us below the 900 happened through an event of last weekend: The current point release of lenny. Be aware that the BTS doesn't know about proposed-updates, so bugs closed through uploads to there only are seen when they hit the main pool which is the reason for point releases. It were something around 25 RC bugs that were closed by that. I haven't checked who exactly is to thank here, but looking at the non-DSA packages one finds some perl packages and at least two font packages. Thanks to the corresponding teams for their help!
I plan to continue these efforts, so if you think it's a good idea you might want to flattr it. I think this quote sums up the motivation behind this pretty well:
<jwilk> Yay, only 900 bugs to fix and we can release lenny! Oh wait...
AltOS The Altus Metrum Operating System
Altos is the core of the software
for all of the Altus Metrum products.
It runs on the 8051-based micro-controllers within both the flight
computer and the ground station devices. AltOS a small cooperatively
multi-tasking operating system.
AltOS Version 0.7.1 Released
Bdale and I have just released
AltOS version 0.7.1.
Version 0.7.1 is the first release to include the new Java-based
ground station software which runs on Linux, Mac OS X and various
Windows flavors.
AltOS Changes in 0.7.1
strace, it appeared that exchanges with the remote
server were apparently fine, so an issue on the client-side SOAP
machinery got suspected. So let s enable tracing:
use SOAP::Lite +trace => 'all';
Tada! The issue was indeed local: malformed XML got received, leading
to a die call issued from the XML-RPC layer. Thankfully, one can set
up a fault handler, which I used to display the range of bug IDs which
triggered that bug, so that people can look into it and determine what
to add to the blacklist until the underlying issue s been investigated
(presumably, bugzilla s at fault).
Speeding things up
With that blacklisting of buggy bugs, one can then try to move to
other queries, dealing with more bugs. Some examples follow:
reporter=kibi@d.o
product=xorg&component=Driver/VMWare
product=xorg&component=Driver/nouveau
product=xorg&component=Server/general
product=xorg&component=Driver/intel
Moving from 2 bugs to 10-100 bugs (Julien s or VMWare s) was OK. But
then moving to several hundreds of bugs (Driver/nouveau = 500+ bugs) led to
noticeable performance issues. Not to mention what happened when one
reaches several thousands of bugs (Driver/intel = 2500+ bugs). Indeed, even
with network exchanges cached into a local file, processing data was
taking up to several dozens of minutes.
I knew about Perl s -d:DProf, which helps figuring out where time is
spent, but was pointed to -d:NYTProf (and its accompanying tool,
nytprofhtml). Some hotspots got noticed:
DateTime::Format::Natural fallback, leading to a big
performance penalty. Fixed with a trivial regular expression.Prophet (the engine under the hood) backends,
so one can play with:
PROPHET_REPLICA_TYPE=sqlite # the default for SD
PROPHET_REPLICA_TYPE=prophet
Switching to prophet was a big win, but still not good
enough. Indeed, many tiny files are written, and most of the time is
spent in I/O. Although I m nothing like a performance guru, I guessed
that running on an average laptop, with ext3 and its default commit
interval of 5 seconds might not be helping, so I gave a quick try to
-o remount,commit=60, and that seemed to help.
Even though there are probably other tricks to find in that area
(which hopefully won t require root privileges ), there s already a
patch which landed in prophet s master branch, replacing
File::Spec->catfile with an optimized version: that function alone
was eating 10% of runtime
In the sqlite case, disabling the auto-commit feature helped
reducing the I/O load, but a proper patch is still lacking for now
(running into locked database issues, or into missing tables after
having created them isn t fun, so I postponed debugging that).
Since performance issues looked like they could be solved eventually,
I switched back to implementing missing features.
Handling more than comments
Currently 3 types of stuff are currently fetched from the bugzilla
server:
Prophet::ChangeSet objects.
That s where the fun begins, since properties in the bug status may
not match properties in the bug history, so one needs to establish
property correspondence. Also, some properties can be multivalued for
added fun. I believe that s where most of the time is going to be
spent while developing a new replica type in SD: once one knows how to
get a hand on needed info on the remote server, the main question is
what to do with it. For now, I decided to ignore many fields to make
it possible to do a big sync like Server/general, property support
will be improved later on.
Screenshots
Instead of pasting lengthy terminal excerpt, let s use some
screenshots instead (sorry, I m not sure how to present such things in
an accessible way, suggestions welcome).
Cloning Julien s bugs, listing all open tickets, listing all
tickets, searching using a regular expression:
Displaying bug 42 (that s the local ID):
Now, let s start the embedded web server through sd server --port
1234 and point the browser there.
List of RESOLVED bugs:
Status and comments for bug 42:
History for bug 42:
Compared to the
original bugzilla page:
Next time
Some items which need work:
sd to sync new changes since last time, if
any. This will probably lead to rewriting how fetching is currently
done, which is: discover all bugs, then fetch all comments and all
history items, for all of them. Properties like last_change_time
will probably be of some help here.
Backlight control is one of those things that you'd think would be simple, but ha ha this is computing so of course it's an utter disaster and everything is a huge mess. There's three main classes of backlight control in the x86 world, all of which have drawbacks:
If you do care about having good samba packages in squeeze, you can
help.
If you're in a hurry and don't want to read the blah-blah, just skip
to the end of this story and read the last paragraph.
Thanks to the confidence of the release team, we (samba packagers)
have been "authorized" to upload samba 3.5.4 in unstable, thus
targeting having that version in squeeze.
Up to July, we were indeed targeting 3.4.8 for squeeze, on the
assumption that, as usual, samba upstream releases need some
maturation before being strong guarantee that no regression happens.
In July we were ready to move and finally upload in unstable the 3.5 packages we
kept in experimental until then. The final decision was to be taken
during DebConf10. It was roughly taken with Steve Langasek, but....I
couldn't upload immediately (most people know that working on major
packages during DebConf is a dream)...and had holidays afteer.
In the meantime, the freeze happened so we got theoretically
screwed...
Still, I could manage to convince the release team that long term
support for samba 3.5 will certainly be better than 3.4...and that
functionality in that version (particularly several Win7-related fixes
and a much improved code for printing support) and we got a notice
"please upload to unstable and come back to us in a few weeks".
That happened, finally.
So, now, we need YOU, samba users and admins, to test these
packages. Merging our packaging branches was hard (thanks, Steve
Langasek, for your help) and glitches are always possible. So, please
TEST these packages by installing samba, winbind, libsmbclient and
friends from unstable....and report bugs, preferrably the release
critical ones....
PS This post also gives me a chance to comment
on a so called "community
page" of mine on Facebook. As I've briefly commented a few days
ago I've nothing to do with that page. TTBOMK its content is
just automatically injected from
Wikipedia. The "Stefano Zacchiroli is on Facebook" claim on the
upper left is true only in the sense that there are other
people with my name on Facebook. IANAL, but such a claim (not
the page in itself) will probably be considered an abusive
advertisement in many countries around the world.
update: re-word the
identi.ca/debian paragraph, to better blend with
surrounding text
Facebook is not very popular among free software hackers. When I announced my Facebook page on identi.ca (see here) I got a few replies suggesting it was odd for me to use Facebook.
Indeed there are many good reasons why Facebook should be avoided: it is a centralized and proprietary service that is not very privacy-friendly. But the truth is that lots of people are using it (even Debian developers, can you recognize them on the picture?) and some are using their Facebook news feed as their main source of news.
You might wonder how many persons that represents, so here are the figures: the Debian Facebook page has 48,361 fans and the Ubuntu one has 247,932 fans. That s right, an announce put on the Debian facebook page would reach more persons than the most popular announce list that Debian is currently running (debian-announce@lists.debian.org has about 29,000 subscribers). Unfortunately that Debian Facebook page is empty and I don t even know who the administrator is. The Ubuntu page on the contrary is properly configured to relay news from The Fridge and Jono Bacon is posting some custom updates from time to time.
Debian contributors regularly mention world domination as the ultimate goal of the universal operating system (I even feature this in my blog header banner!
Please, those of you who send me emails, remember the following:-
net.ipv6.conf.all.forwarding=1Due to a issue in Lenny, this setting had basically no effect on the old server. Sysctl.conf was called before the IPv6 interface went up, so this setting failed or never got active. Meanwhile in Squeeze IPv6 seems to be enabled at an earlier point in the boot process and the forwarding setting will succeed. This in return resulted in my not working IPv6 setup. When I disable the line in sysctl.conf everything works just fine: the domU honors the Router Advertisments of radvd again and everything is fine again. Sometimes the solution is so simple, you can't find it yourself. :-)
Christian Robert, whose blog I
commented-on here once before, had
followed up on a recent set of posts by Radford Neal which had appeared both on Radford's blog and on the
r-devel mailing list.
Now, let me prefix this by saying that I really enjoyed Radford's posts. He obviously put a lot of time into finding a number of (all somewhat
small in isolation) inefficiencies in R which, when taken together, can make a difference in
performance. I already spotted one commit by Duncan in the SVN logs for R so this is being looked at.
Yet Christian, on the other hand, goes a little overboard in bemoaning performance differences somewhere between ten and fifteen percent -- the
difference between curly and straight braces (as noticed in Radford's first post). Maybe he spent too much time waiting for his MCMC runs to
finish to realize the obvious: compiled code is evidently much faster.
And before everybody goes and moans and groans that that is hard, allow me to just interject and note that it is not. It really
doesn't have to be. Here is a quick
cleaned up version of Christian's example code, with proper assigment operators and a second variable x. We then get to the
meat and potatoes and load our
Rcpp package as well as
inline to define the same little test function in C++. Throw in
rbenchmark which I am becoming increasingly fond of for these little timing tests,
et voila, we have ourselves a horserace:
# Xian's code, using <- for assignments and passing x down f <- function(n, x=1) for (i in 1:n) x=1/(1+x) g <- function(n, x=1) for (i in 1:n) x=(1/(1+x)) h <- function(n, x=1) for (i in 1:n) x=(1+x)^(-1) j <- function(n, x=1) for (i in 1:n) x= 1/ 1+x k <- function(n, x=1) for (i in 1:n) x=1/ 1+x # now load some tools library(Rcpp) library(inline) # and define our version in C++ l <- cxxfunction(signature(ns="integer", xs="numeric"), 'int n = as<int>(ns); double x=as<double>(xs); for (int i=0; i<n; i++) x=1/(1+x); return wrap(x); ', plugin="Rcpp") # more tools library(rbenchmark) # now run the benchmark N <- 1e6 benchmark(f(N, 1), g(N, 1), h(N, 1), j(N, 1), k(N, 1), l(N, 1), columns=c("test", "replications", "elapsed", "relative"), order="relative", replications=10)And how does it do? Well, glad you asked. On my i7, which the other three cores standing around and watching, we get an eighty-fold increase relative to the best interpreted version:
/tmp$ Rscript xian.R
Loading required package: methods
test replications elapsed relative
6 l(N, 1) 10 0.122 1.000
5 k(N, 1) 10 9.880 80.984
1 f(N, 1) 10 9.978 81.787
4 j(N, 1) 10 11.293 92.566
2 g(N, 1) 10 12.027 98.582
3 h(N, 1) 10 15.372 126.000
/tmp$
So do we really want to spend time arguing about the ten and fifteen percent differences? Moore's law gets you
those gains in a couple of weeks anyway. I'd much rather have a conversation about how we can get people speed increases that are orders of
magnitude, not fractions. Rcpp is one such tool. Let's get more of them.
operator(). But it's a more than that: it's closer from a closure, something that Scheme fans are very familiar with: the closure code block captures its outter environment in its body.
Closures are a very powerful tool that are being retrofitted in many languages (for instance Java). They can be used as building blocks for many useful programing idioms such as continuations.
Enough for theory, let's have a look at this new beast.
How do they look like?
[](int i) return i + 1; ;This is the increment lambda. You can declare a lambda in any function or method. Written like this, the lambda compiles[1] but it's not very useful: it's an anonynous lambda that is neither stored nor used. How to read this? The square brackets open the declaration of a lambda. Then you declare lambda parameters and its body. Nothing suprising so far except for the declaration opening. Using a lambda To use it add arguments, for instance:
[](int i) return i + 1; (0);would compute the value
1.
Storing a lambda
The type of a lambda is automatically deduced. You can hint its return type if you need to. To store it you need to use another new C++0x keywork, auto, that was taken back from C:
auto inc = [](int i) return i + 1; ; std::cout << inc(0) << std::endl;Notice that calling a named lambda is not different from calling a function. If you need to hint the lambda return type you can use
->:
auto mult = [](int x, double y) -> double return x * y; ;Capturing environment You can use lambdas to capture outter environment. A more complex, not working, example:
void f()
int x = 5;
[](int w) return w + x; (0);
Tha lambda declaration + invocation does not work, because the x variable we're referring to is declared in the outter scope. To enable capture of the outter scope, we can rewrite the previous example like this:
void f()
int x = 5;
[=](int w) return w + x; (0);
The = sign in the square brackets (which are really the capturing clause) means we will copy every variable from the outter scope. Hence we can access x from our anonymous lambda. Now what if you want to change x?
void f()
int x = 5;
[=](int w) return w + ++x; (0);
This does not compile: the environment is read-only by default. If you really want to increment x then you need to write:
void f()
int x = 5;
[=](int w) mutable return w + ++x; (0);
Yes, mutable. The value returned from the lambda is what you would expect. But guess what? x value is not changed when the lambda returns. Indeed, we've copied outter scope variables by value. To really affect outter scope you need to change the capture clause:
void f()
int x = 5;
[&](int w) return w + ++x; (0);
We use the ampersand to capture the environment by reference, and thus we can change x value. We could also be more explicit about what we want to capture:
struct A
int z;
A() : z(0)
void f()
int x = 5;
[this, &x](int w) z = w + ++x; (0);
std::cout << "x: " << x << ", z: " << z << std::endl;
;
The lambda in f() explicitely mentions environment variables which are captured by value: this, because we change this->z, and also the local variable x.
Complete example
It's easier to write functionnal-style code. As Sarah just said: 10 years from now everyone will realize how powerful functional programming is, then we'll be the masters of the universe!
#include <algorithm> #include <iostream> #include <vector> int main(int argc, char* argv[]) std::vector<int> v = 1, 2, 3 ; // Show then increment std::for_each(v.begin(), v.end(), [](int& e) std::cout << e++ << std::endl; ); // Show content now std::for_each(v.begin(), v.end(), [](int e) std::cout << e << std::endl; ); return 0;[1] Use
g++-4.5 --std=c++0x to activate C++0x modeNext.