Russ Allbery: Review: Regeneration
| Series: | Species Imperative #3 |
| Publisher: | DAW |
| Copyright: | 2006 |
| ISBN: | 0-7564-0345-6 |
| Format: | Hardcover |
| Pages: | 543 |
| Series: | Species Imperative #3 |
| Publisher: | DAW |
| Copyright: | 2006 |
| ISBN: | 0-7564-0345-6 |
| Format: | Hardcover |
| Pages: | 543 |
An new version 0.0.9 of RcppAnnoy, our Rcpp-based R integration of the nifty Annoy library by Erik, is now on CRAN. Annoy is a small and lightweight C++ template header library for very fast approximate nearest neighbours.
This release corrects an issue for Windows users discovered by GitHub user 'khoran' who later also suggested the fix of binary mode. It upgrades to Annoy release 1.9.1 and brings its new Manhattan distance to RcppAnnoy. A number of unit tests were added as well, and we updated some packaging internals such as symbol registration.
And I presume I had a good streak emailing with Uwe's robots as the package made it onto CRAN rather smoothly within ten minutes of submission:
Changes in this version are summarized here:![]()
Courtesy of CRANberries, there is also a diffstat report for this release.Changes in version 0.0.9 (2017-08-31)
- Synchronized with Annoy upstream version 1.9.1
- Minor updates in calls and tests as required by annoy 1.9.1
- New Manhattan distance modules along with unit test code
- Additional unit tests from upstream test code carried over
- Binary mode is used for
save(as suggested by @khoran in #21)- A new file
init.cwas added with calls toR_registerRoutines()andR_useDynamicSymbols()- Symbol registration is enabled in
useDynLib
This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.
Here is my monthly update covering what I have been doing in the free software world in August 2017 (previous month):
diffoscope is our in-depth and content-aware diff utility that can locate and diagnose reproducibility issues.
A second fix-up release is needed following on the recent bi-monthly RcppArmadillo release as well as the initial follow-up as it turns out that OS X / macOS is so darn special that it needs an entire separate treatment for OpenMP. Namely to turn it off entirely...
Armadillo is a powerful and expressive C++ template library for linear algebra aiming towards a good balance between speed and ease of use with a syntax deliberately close to a Matlab. RcppArmadillo integrates this library with the R environment and language--and is widely used by (currently) 384 other packages on CRAN---an increase of 54 since the CRAN release in June!
Courtesy of CRANberries, there is a diffstat report. More detailed information is on the RcppArmadillo page. Questions, comments etc should go to the rcpp-devel mailing list off the R-Forge page.Changes in RcppArmadillo version 0.7.960.1.2 (2017-08-29)
This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.
I was recently asked to sort things out so that
snap builds on Launchpad
could themselves install snaps as build-dependencies. To make this work we
need to start doing builds in LXD
containers rather than in chroots. As a
result I ve been doing some quite extensive refactoring of
launchpad-buildd: it previously
had the assumption that it was going to use a chroot for everything baked
into lots of untested helper shell scripts, and I ve been rewriting those in
Python with unit tests and with a single Backend abstraction that isolates
the high-level logic from the details of where each build is being performed.
This is all interesting work in its own right, but it s not what I want to
talk about here. While I was doing all this refactoring, I ran across a
couple of methods I wrote a while back which looked something like this:
def chroot(self, args, echo=False):
"""Run a command in the chroot.
:param args: the command and arguments to run.
"""
args = set_personality(
args, self.options.arch, series=self.options.series)
if echo:
print("Running in chroot: %s" %
' '.join("'%s'" % arg for arg in args))
sys.stdout.flush()
subprocess.check_call([
"/usr/bin/sudo", "/usr/sbin/chroot", self.chroot_path] + args)
def run_build_command(self, args, env=None, echo=False):
"""Run a build command in the chroot.
This is unpleasant because we need to run it in /build under sudo
chroot, and there's no way to do this without either a helper
program in the chroot or unpleasant quoting. We go for the
unpleasant quoting.
:param args: the command and arguments to run.
:param env: dictionary of additional environment variables to set.
"""
args = [shell_escape(arg) for arg in args]
if env:
args = ["env"] + [
"%s=%s" % (key, shell_escape(value))
for key, value in env.items()] + args
command = "cd /build && %s" % " ".join(args)
self.chroot(["/bin/sh", "-c", command], echo=echo)
chroot method with a call to Backend.run, but
it s easier to see what I m talking about in the original form.)
One thing to notice about this code is that it uses several adverbial
commands: that is, commands that run another command in a different way.
For example, sudo runs another command as another user, while chroot
runs another command with a different root directory, and env runs another
command with different environment variables set. These commands chain
neatly, and they also have the useful property that they take the subsidiary
command and its arguments as a list of arguments. coreutils has several
other
commands
that behave this way, and
adverbio is another
useful example.
By contrast, su -c is something you might call a quasi-adverbial
command: it does modify the behaviour of another command, but it takes it as
a single argument which it then passes to sh -c. Every time you have
something that s passed to a shell like this, you need a corresponding layer
of shell quoting to escape any shell metacharacters that should be
interpreted literally. This is often cumbersome and is easy to get wrong.
My Python implementation is as follows, and I wouldn t be totally surprised
to discover that it contained a bug:
import re
non_meta_re = re.compile(r'^[a-zA-Z0-9+,./:=@_-]+$')
def shell_escape(arg):
if non_meta_re.match(arg):
return arg
else:
return "'%s'" % arg.replace("'", "'\\''")
cd /build && ..., but that s another
command that s only quasi-adverbial, since the extra shell means an extra
layer of shell quoting.
(Ian Jackson rightly observes that you can in fact write the necessary
adverb as something like sh -ec 'cd "$1"; shift; exec "$@"' chdir. I
think that s a bit uglier than I ideally want to use in production code, but
you might reasonably think that it s worth it to avoid the extra layer of
shell quoting.)
I therefore decided that this was a feature that belonged in
coreutils, and after a bit of
mailing list
discussion
we felt it was best implemented as a new option to
env(1).
I sent a patch for this which has been
accepted.
This means that we have a new composable adverb, env --chdir=NEWDIR, which
will allow the run_build_command method above to be rewritten as something
like this:
def run_build_command(self, args, env=None, echo=False):
"""Run a build command in the chroot.
:param args: the command and arguments to run.
:param env: dictionary of additional environment variables to set.
"""
env_args = ["env", "--chdir=/build"]
if env:
for key, value in env.items():
env_args.append("%s=%s" % (key, value))
self.chroot(env_args + args, echo=echo)
env --chdir option will be in coreutils 8.28. We won t be able to use
it in launchpad-buildd until that s available in all Ubuntu series we might
want to build for, so in this particular application that s going to take a
few years; but other applications may well be able to make use of it sooner.

1. How to install Remindr
Install Remindr from PyPI:
# pip3 install remindr2. How to configure Remindr First, start by writing a messages.txt file with the following content:
o en Send scheduled messages to both Twitter and Mastodon with the Remindr bot https://carlchenet.com/send-scheduled-messages-to-both-twitter-and-mastodon-with-the-remindr-bot #remindr #twitter #mastodon x en Follow Carl Chenet for great news about Free Software! https://carlchenet.com #freesoftwareThe first field only indicates if the line is the next one to be considered by Remindr, the o indicates the next line to be sent, x means it won t. The second field is the 2-letters code language your content is using, in my example en or fr. Next content on the line will compose the body of your messages to Mastodon and Twitter. You need to configure the Mastodon and the Twitter credentials in order to allow Remindr to send the messages. First you need to generate the credentials. For Twitter, you need to manually create an app on apps.twitter.com. For Mastodon, just launch the following command:
$ register_remindr_appSome information will be asked by the command. At the end, two files are created, remindr_usercred.txt and remindr_clientcred.txt. You re going to need them for the Remindr configuration above. For the Remindr configuration, here is a complete configuration using the
[mastodon] instance_url=https://mastodon.social user_credentials=remindr_usercred.txt client_credentials=remindr_clientcred.txt [twitter] consumer_key=a6lv2gZxkvk6UbQ30N4vFmlwP consumer_secret=j4VxM2slv0Ud4rbgZeGbBzPG1zoauBGLiUMOX0MGF6nsjcyn4a access_token=1234567897-Npq5fYybhacYxnTqb42Kbb3A0bKgmB3wm2hGczB access_token_secret=HU1sjUif010DkcQ3SmUAdObAST14dZvZpuuWxGAV0xFnC [image] path_to_image=/home/chaica/blog-carl-chenet.png [entrylist] path_to_list=/etc/remindr/messages.txtYour configuration is complete! Now we have to check if everything is fine. 3. How to use Remindr Now let s try your configuration by launching Remindr the first time by-hand:
$ remindr -c /etc/remindr/remindr.iniThe messages should appear on both Twitter and Mastodon. 4. How to schedule the Remindr execution The easiest way is to use you user crontab. Just add the following line in your crontab file, editing it with crontab -e
00 10 * * * remindr -c /etc/remindr/remindr.iniFrom now on, your message will be sent every day at 10:00AM. Going further with Remindr

Remember, Mastodon is a new decentralized social network, based on a free software which is rapidly gaining users (already there is more than 1.5 million accounts). As I ve created my account in June, I was a fast addict and I ve already created several tools for this network, Feed2toot, Remindr and Boost (mostly written in Python).
Now, with all this experience I have to stress out the importance of choosing the correct Mastodon instance.
First, let s quickly clarify something about the decentralized part. In Mastodon, decentralization is made through a federation of dedicated servers, called instances , each one with a complete independent administration. Your user account is created on one specific instance. You have two choices:
You can move your user account from one instance to another, but you have to follow a special procedure which can be quite long, considering your own interest for technical manipulation and the total amount of your followers you ll have to warn about your change. As such, you ll have to create another account on a new instance and import three lists: the one with your followers, the one with the accounts you have blocked, and the one with the account you have muted.
From this working process, several technical and human factors will interest us.
As a social network, Mastodon is truly decentralized, with more than 1.5 million users on more than 2350 existing instances. As such, the most common usage is to create an account on an open instance. To create its own instance is way too difficult for the average user. Yet, using an open instance creates a strong dependence on the technical administrator of the chosen instance.
The technical administrator will have to deal with several obligations to ensure its service continuity, with high-quality hardware and regular back-ups. All of these have a price, either in money and in time. Regarding the time factor, it would be better to choose an administration team over an individual, as life events can change quite fast everyone s interests. As such, Framasoft, a French association dedicated to promoting the Free software use, offers its own Mastodon instance named: Framapiaf. The creator of the mastodon project, also offers a quite solid instance, Mastodon.social (see below).
Regarding the money factor, many instance administrators with a large number of users are currently asking for donation via Patreon, as hosting an instance server or renting one cost money.
If anybody could have guessed the previous technical points since the recent registration explosion on the Mastodon social network, the following point took almost everyone by surprise. Little by little, different instances show their culture , their protest action, and their propaganda on this social network.
As the instance administrator has all the powers over its instance, he or she can block the instance of interacting with some other instances, or ban its instance s users from any interaction with other instances users.
With everyone having in mind the main advantages to have federalized instance from, this partial independence of some instances from the federation was a huge surprise. One of the most recent example was when the Unixcorn.xyz instance administrator banned its users from reading Aeris account, which was on its own instance. It was a cataclysm with several consequences, which I ve named the #AerisGate as it shows the different views on moderation and on its reception by various Mastodon users.
If you don t manage your own instance, when you ll have to choose the one where to create your account, make sure that the content you plan to toot is within the rules and compatible with the ideology of said instance s administrator. Yes, I know, it may seem surprising but, as stated above, by entering a public instance you become dependent on someone else s infrastructure, who may have an ideological way to conceive its Mastodon hosting service. As such, if you re a nazi, for example, don t open your Mastodon account on a far-left LGBT instance. Your account wouldn t stay open for long.
The moderation rules are described in the about/more page of the instance, and may contain ideological elements.
To ease the process for newcomers, it is now possible to use a great tool to select what instance should be the best to host your account.
Remember that, as stated above, Mastodon is decentralized, and as such there is no central authority which can be reached in case you have a conflict with your instance administrator. And nobody can force said administrator to follow its own rules, or not to change them on the fly. Think Twice Before Creating Your Account
If you want to create an account on an instance you don t control, you need to check two elements: the availability of the instance hosting service in the long run, often linked to the administrator or the administration group of said instance, and the ideological orientation of your instance. With these two elements checked, you ll be able to let your Mastodon account growth peacefully, without fearing an outage of your instance, or simple your account blocked one morning because it doesn t align with your instance s ideological line.
To help me get involved in free software and writing articles for this blog, please consider a donation through my Liberapay page, even if it s only a few cents per week. My contact Bitcoin and Monero are also available on this page.
Follow me on Mastodon
Translated from French to English by St phanie Chaptal.
setting up a coreboot build environment, including an Ada compiler
So without much explaination, this is how lynxis told me how to setup a
coreboot build environment, which contains an Ada compiler which is needed
to build the free graphics initialisation for Intel cards (=so no binary VGA
bios blob is needed).
The Ada compiler is build automatically by default if it's build depends are
installed:
sudo apt install build-essential bison flex zlib1g-dev ncurses-dev gnat git clone --recursive https://review.coreboot.org/p/coreboot.git cd coreboot/ git submodule update --init --checkout 3rdparty/blobs # for the x230 this only contains microcode updates make iasl CPUS=$(nproc) make gnumake CPUS=$(nproc) make crossgcc-i386 CPUS=$(nproc)coreboot is then build as usual:
make menuconfig makeThat's it. (I've just left out the steps to choose the coreboot revision and validating it, as well as choosing a configurationwith make menuconfig as this is better documented elsewhere.)
I recently upgraded a bunch of systems from Jessie to Stretch, and as a result of that one of my hosts has started showing me a lot of noise in an hourly cron-email:
Command line is not complete. Try option "help"
I've been ignoring these emails for the past while, but today I sat down to track down the source. It was obviously coming from facter, the system that puppet uses to gather information about hosts.
Running facter -debug made that apparent:
root@smaug ~ # facter --debug
Found no suitable resolves of 1 for ec2_metadata
value for ec2_metadata is still nil
value for netmask_git is still nil
value for ipaddress6_lo is still nil
value for macaddress_lo is still nil
value for ipaddress_master is still nil
value for ipaddress6_master is still nil
Command line is not complete. Try option "help"
value for netmask_master is still nil
value for ipaddress_skx_mail is still nil
..
There we see the issue, and it is obviously relating to our master interface.
To cut a long-story short /usr/lib/ruby/vendor_ruby/facter/util/ip.rb contains some code which eventually runs this:
ip link show $interface
That works on all other interfaces I have:
$ ip link show git
6: git: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 1000
But not on master:
$ ip link show master
Command line is not complete. Try option "help"
I ninja-edited the code from this:
ethbond = regex.match(%x /sbin/ip link show '# interface ' )
to:
ethbond = regex.match(%x /sbin/ip link show dev '# interface ' )
And suddenly puppet-runs without any errors. I'm not 100% sure if this is a bug bug, but it is something of a surprise anyway.
This host runs KVM guests, one of the guests is a puppet-master, with a local namemaster. Hence the name of the interface. Similarly the interfacegitis associated with the KVM guest behindgit.steve.org.uk.
Reproducibility --------------- Packages should build reproducibly, which for the purposes of this document [#]_ means that given - a version of a source package unpacked at a given path; - a set of versions of installed build dependencies; - a set of environment variable values; - a build architecture; and - a host architecture, repeatedly building the source package for the build architecture on any machine of the host architecture with those versions of the build dependencies installed and exactly those environment variable values set will produce bit-for-bit identical binary packages. It is recommended that packages produce bit-for-bit identical binaries even if most environment variables and build paths are varied. It is intended for this stricter standard to replace the above when it is easier for packages to meet it. .. [#] This is Debian's precisification of the reproducible-builds.org definition _.
.buildinfo files and providing user interfaces in APT and elsewhere and probably also systematic rebuilds by us and other parties. And 6% or 7% of the archive is still a lot of packages, eg. in Buster we currently still have 273 unreproducible key packages and for a large part we don't have patches yet so there is still a lot of work ahead.".buildinfo files and much more.reproducible-check program to report on the reproducibility status of
installed packages.
Packages reviewed and fixed, and bugs filed
Upstream reports:
SOURCE_DATE_EPOCH
support.name attribute over path to avoid leaking
comparison full path in output.HOME for the "control" build. (Closes: #860428)debian/changelog with Santiago's changes.--host-distro flag to support that too.From that, Bacon elaborates possible reasons for the apparent decline of the GPL. The graphic used in the article was actually generated by Stephen O'Grady in a January article, The State Of Open Source Licensing, which said:![]()
In Black Duck's sample, the most popular variant of the GPL version 2 is less than half as popular as it was (46% to 19%). Over the same span, the permissive MIT has gone from 8% share to 29%, while its permissive cousin the Apache License 2.0 jumped from 5% to 15%.Sullivan, however, argued that the methodology used to create both articles was problematic. Neither contains original research: the graphs actually come from the Black Duck Software "KnowledgeBase" data, which was partly created from the old Ohloh web site now known as Open Hub. To show one problem with the data, Sullivan mentioned two free-software projects, GNU Bash and GNU Emacs, that had been showcased on the front page of Ohloh.net in 2012. On the site, Bash was (and still is) listed as GPLv2+, whereas it changed to GPLv3 in 2011. He also claimed that "Emacs was listed as licensed under GPLv3-only, which is a license Emacs has never had in its history", although I wasn't able to verify that information from the Internet archive. Basically, according to Sullivan, "the two projects featured on the front page of a site that was using [the Black Duck] data set were wrong". This, in turn, seriously brings into question the quality of the data:
I reported this problem and we'll continue to do that but when someone is not sharing the data set that they're using for other people to evaluate it and we see glimpses of it which are incorrect, that should give us a lot of hesitation about accepting any conclusion that comes out of it.Reproducible observations are necessary to the establishment of solid theories in science. Sullivan didn't try to contact Black Duck to get access to the database, because he assumed (rightly, as it turned out) that he would need to "pay for the data under terms that forbid you to share that information with anybody else". So I wrote Black Duck myself to confirm this information. In an email interview, Patrick Carey from Black Duck confirmed its data set is proprietary. He believes, however, that through a "combination of human and automated techniques", Black Duck is "highly confident at the accuracy and completeness of the data in the KnowledgeBase". He did point out, however, that "the way we track the data may not necessarily be optimal for answering the question on license use trend" as "that would entail examination of new open source projects coming into existence each year and the licenses used by them". In other words, even according to Black Duck, its database may not be useful to establish the conclusions drawn by those articles. Carey did agree with those conclusions intuitively, however, saying that "there seems to be a shift toward Apache and MIT licenses in new projects, though I don't have data to back that up". He suggested that "an effective way to answer the trend question would be to analyze the new projects on GitHub over the last 5-10 years." Carey also suggested that "GitHub has become so dominant over the recent years that just looking at projects on GitHub would give you a reasonable sampling from which to draw conclusions".
Indeed, GitHub published a report in 2015 that also seems to confirm MIT's popularity (45%), surpassing copyleft licenses (24%). The data is, however, not without its own limitations. For example, in the above graph going back to the inception of GitHub in 2008, we see a rather abnormal spike in 2013, which seems to correlate with the launch of the choosealicense.com site, described by GitHub as "our first pass at making open source licensing on GitHub easier". In his talk, Sullivan was critical of the initial version of the site which he described as biased toward permissive licenses. Because the GitHub project creation page links to the site, Sullivan explained that the site's bias could have actually influenced GitHub users' license choices. Following a talk from Sullivan at FOSDEM 2016, GitHub addressed the problem later that year by rewording parts of the front page to be more accurate, but that any change in license choice obviously doesn't show in the report produced in 2015 and won't affect choices users have already made. Therefore, there can be reasonable doubts that GitHub's subset of software projects may not actually be that representative of the larger free-software community.![]()
The long history of Debian creates a perfect subject to evaluate how FOSS licenses use has evolved over time, and the popularity of licenses currently in use.Sullivan argued that the Debsources data set is interesting because of its quality: every package in Debian has been reviewed by multiple humans, including the original packager, but also by the FTP masters to ensure that the distribution can legally redistribute the software. The existence of a package in Debian provides a minimal "proof of use": unmaintained packages get removed from Debian on a regular basis and the mere fact that a piece of software gets packaged in Debian means at least some users found it important enough to work on packaging it. Debian packagers make specific efforts to avoid code duplication between packages in order to ease security maintenance. The data set covers a period longer than Black Duck's or GitHub's, as it goes all the way back to the Hamm 2.0 release in 1998. The data and how to reproduce it are freely available under a CC BY-SA 4.0 license.
Sullivan presented the above graph from the research paper that showed the evolution of software license use in the Debian archive. Whereas previous graphs showed statistics in percentages, this one showed actual absolute numbers, where we can't actually distinguish a decline in copyleft licenses. To quote the paper again:![]()
The top license is, once again, GPL-2.0+, followed by: Artistic-1.0/GPL dual-licensing (the licensing choice of Perl and most Perl libraries), GPL-3.0+, and Apache-2.0.Indeed, looking at the graph, at most do we see a rise of the Apache and MIT licenses and no decline of the GPL per se, although its adoption does seem to slow down in recent years. We should also mention the possibility that Debian's data set has the opposite bias: toward GPL software. The Debian project is culturally quite different from the GitHub community and even the larger free-software ecosystem, naturally, which could explain the disparity in the results. We can only hope a similar analysis can be performed on the much larger Software Heritage data set eventually, which may give more representative results. The paper acknowledges this problem:
Debian is likely representative of enterprise use of FOSS as a base operating system, where stable, long-term and seldomly updated software products are desirable. Conversely Debian is unlikely representative of more dynamic FOSS environments (e.g., modern Web-development with micro libraries) where users, who are usually developers themselves, expect to receive library updates on a daily basis.The Debsources research also shares methodology limitations with Black Duck: while Debian packages are reviewed before uploading and we can rely on the copyright information provided by Debian maintainers, the research also relies on automated tools (specifically FOSSology) to retrieve license information. Sullivan also warned against "ascribing reason to numbers": people may have different reasons for choosing a particular license. Developers may choose the MIT license because it has fewer words, for compatibility reasons, or simply because "their lawyers told them to". It may not imply an actual deliberate philosophical or ideological choice. Finally, he brought up the theory that the rise of non-copyleft licenses isn't necessarily at the detriment of the GPL. He explained that, even if there is an actual decline, it may not be much of a problem if there is an overall growth of free software to the detriment of proprietary software. He reminded the audience that non-copyleft licenses are still free software, according to the FSF and the Debian Free Software Guidelines, so their rise is still a positive outcome. Even if the GPL is a better tool to accomplish the goal of a free-software world, we can all acknowledge that the conversion of proprietary software to more permissive and certainly simpler licenses is definitely heading in the right direction.
[I would like to thank the DebConf organizers for providing meals for me during the conference.] Note: this article first appeared in the Linux Weekly News.
I had bought the boys a book about the eclipse, which they were reading before and during the event. They were both great, safe users of their eclipse glasses.
Jacob caught a toad, and played with it for awhile. He wanted to bring it home with us, but I convinced him to let me take a picture of him with his toad friend instead.
While we were waiting for totality, a number of buses from the local school district arrived. So by the time the big moment arrived, we could hear the distant roar of delight and applause from the school children gathered at the far end of the field, plus all the excitement nearby. Both boys were absolutely ecstatic to be witnessing it (and so was I!) Wow! Awesome! And simple cackles of delight were heard. On the drive home, they both kept talking about how amazing it was, and it was once in a lifetime.
We enjoyed our eclipse neighbors the woman from San Antonio next to us, the surprise discovery of another family from just a few miles from us parked two cars down, even running into relatives at a restaurant on the way home. The applause from all around when it started and when it ended. And the feeling, which is hard to describe, of awe and amazement at the wonders of our world and our universe.
There are many problems with the world right now, but somehow there s something right about people coming together from all over to enjoy it.
whois -h whois.radb.net -- '-i origin AS50896'
Another bunch of batch capable whois services are provided by Team Cymru.
They've some examples at the end of https://www.team-cymru.org/IP-ASN-mapping.html.
In this specific case the spam was for "www.robotas.ru" which is
currently terminated at CloudFlare and redirects via JS document.location
to "http://link31.net/b494d/ooo/", which in turn redirects via JS
window.location to "http://revizor-online.ga/" which is again hosted
at CloudFlare. The page at the end plays some strange
youtube video -
currently at around 1900 plays, so not that widely spread. In the end an
interesting indicator about spam campaign success.
On the heels of the very recent bi-monthly RcppArmadillo release comes a quick bug-fix release 0.7.960.1.1 which just got onto CRAN (and I will ship a build to Debian in a moment).
There were three distinct issues I addressed in three quick pull requests:
is() method of our S4 class. Thanks to Kevin Ushey for reminding me we had is()..registration=TRUE), so ensured we only have one fastLm symbol.configure check now also wants g++ 4.7.2 or later just like Armadillo.Courtesy of CRANberries, there is a diffstat report. More detailed information is on the RcppArmadillo page. Questions, comments etc should go to the rcpp-devel mailing list off the R-Forge page.Changes in RcppArmadillo version 0.7.960.1.1 (2017-08-20)
This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.
Three months ago, I gave a talk at the Compose::Conference in New York about how Chris Smith and I added the ability to create networked multi-user programs to the educational Haskell programming environment CodeWorld, and finally the recording of the talk is available on YouTube (and is being discussed on reddit):
It was the talk where I got the most positive feedback afterwards, and I think this is partly due to how I created the presentation: Instead of showing static slides, I programmed the complete visual display from scratch as an interaction within the CodeWorld environment, including all transitions, an working embedded game of Pong and a simulated multi-player environments with adjustable message delays. I have put the code for the presentation online.
Chris and I have written about this for ICFP'17, and thanks to open access I can actually share the paper freely with you and under a CC license. If you come to Oxford you can see me perform a shorter version of this talk again.
TL;DR: With its implementation of IPv6 routing tables using radix trees,
Linux offers subpar performance (450 ns for a full view 40,000 routes)
compared to IPv4 (50 ns for a full view 500,000 routes) but fair memory usage
(20 MiB for a full view).
struct fib6_node. When
a node has the RTN_RTINFO flag set, it embeds a pointer to
a struct rt6_info containing information about the
next-hop.
fib6_lookup_1() function walks the radix tree in two
steps:
static struct fib6_node *fib6_lookup_1(struct fib6_node *root, struct in6_addr *addr) struct fib6_node *fn; __be32 dir; /* Step 1: locate potential candidate */ fn = root; for (;;) struct fib6_node *next; dir = addr_bit_set(addr, fn->fn_bit); next = dir ? fn->right : fn->left; if (next) fn = next; continue; break; /* Step 2: check prefix and backtrack if needed */ while (fn) if (fn->fn_flags & RTN_RTINFO) struct rt6key *key; key = fn->leaf->rt6i_dst; if (ipv6_prefix_equal(&key->addr, addr, key->plen)) if (fn->fn_flags & RTN_RTINFO) return fn; if (fn->fn_flags & RTN_ROOT) break; fn = fn->parent; return NULL;
2001:db8:1::1 and 2001:db8:3::1
would get those two cache entries:
$ ip -6 route show cache 2001:db8:1::1 dev r2-r1 metric 0 cache 2001:db8:3::1 via 2001:db8:2::2 dev r2-r3 metric 0 cache
ip6_dst_gc() function
controlled by the following parameters:
$ sysctl -a grep -F net.ipv6.route net.ipv6.route.gc_elasticity = 9 net.ipv6.route.gc_interval = 30 net.ipv6.route.gc_min_interval = 0 net.ipv6.route.gc_min_interval_ms = 500 net.ipv6.route.gc_thresh = 1024 net.ipv6.route.gc_timeout = 60 net.ipv6.route.max_size = 4096 net.ipv6.route.mtu_expires = 600
gc_elasticity) after a 500 ms pause.
Starting from Linux 4.2 (commit 45e4fd26683c), only a PMTU exception would
create a cache entry. A router doesn t have to handle those exceptions, so only
hosts would get cache entries. And they should be pretty rare. Martin KaFai
Lau explains:
Out of all IPv6Here is how a cache entry with a PMTU exception looks like:RTF_CACHEroutes that are created, the percentage that has a different MTU is very small. In one of our end-user facing proxy server, only 1k out of 80kRTF_CACHEroutes have a smaller MTU. For our DC traffic, there is no MTU exception.
$ ip -6 route show cache 2001:db8:1::50 via 2001:db8:1::13 dev out6 metric 0 cache expires 573sec mtu 1400 pref medium
ip6_route_output_flags() function and
correlate the results with the radix tree size:
2400::/16 to 2a06::/16 is scanned (it contains more than half of the
routes). For the /128 scenario, the whole /108 subnet is scanned. For the /48
scenario, the range from the first /48 to the last one is scanned. For each
range, 5000 addresses are picked semi-randomly. This operation is repeated until
we get 5000 hits or until 1 million tests have been executed.
The relation between the maximum depth and the lookup time is incomplete and I
can t explain the difference of performance between the different densities of
the /48 scenario.
We can extract two important performance points:
fib_lookup() and
IPv6 s ip6_route_output_flags() functions have a
fixed cost implied by the evaluation of routing rules, IPv4 has several
optimizations when the rules are left unmodified5. Those optimizations
are removed on the first modification. If we cancel those optimizations, the
lookup time for IPv4 is impacted by about 30 ns. This still leaves a 100 ns
difference with IPv6 to be explained.
Let s compare how time is spent in each lookup function. Here is
a CPU flamegraph for IPv4 s fib_lookup():
fib_table_lookup() function is executed twice: once with the local routing
table and once with the main routing table.
The equivalent flamegraph for
IPv6 s ip6_route_output_flags() is depicted below:
CONFIG_SMP, CONFIG_IPV6,
CONFIG_IPV6_MULTIPLE_TABLES and CONFIG_IPV6_SUBTREES options enabled. Some
other unrelated options are enabled to be able to boot them in a virtual machine
and run the benchmark.
There are three notable performance changes:
struct rt6_info (commit 887c95cc1da5). This should have lead to
a performance increase. The small regression may be due to cache-related
issues.struct fib6_node) and routing information (struct
rt6_info) are allocated with the slab allocator7. It is therefore
possible to extract the information from /proc/slabinfo when the kernel is
booted with the slab_nomerge flag:
# sed -ne 2p -e '/^ip6_dst/p' -e '/^fib6_nodes/p' /proc/slabinfo cut -f1 -d: name <active_objs> <num_objs> <objsize> <objperslab> <pagesperslab> fib6_nodes 76101 76104 64 63 1 ip6_dst_cache 40090 40090 384 10 1
struct rt6_info matches the number of routes while the
number of nodes is roughly twice the number of routes:
struct rt6_info (336 bytes) compared
to the size of IPv4 s struct fib_alias (48 bytes): IPv4 puts most information
about next-hops in struct fib_info structures that are shared with many
entries.
CONFIG_IPV6_MULTIPLE_TABLES option incurs a fixed penalty of 100 ns by lookup,ip -6 route add 2001:db8:1::/64 \ from 2001:db8:3::/64 \ via fe80::1 \ dev eth0
Welcome to the tenth post in the rarely ranting R recommendations series, or R4 for short. A few days ago we showed how to tell the linker to strip shared libraries. As discussed in the post, there are two options. One can either set up ~/.R/Makevars by passing the strip-debug option to the linker. Alternatively, one can adjust src/Makevars in the package itself with a bit a Makefile magic.
Of course, there is a third way: just run strip --strip-debug over all the shared libraries after the build. As the path is standardized, and the shell does proper globbing, we can just do
$ strip --strip-debug /usr/local/lib/R/site-library/*/libs/*.so
using a double-wildcard to get all packages (in that R package directory) and all their shared libraries. Users on macOS probably want .dylib on the end, users on Windows want another computer as usual (just kidding: use .dll). Either may have to adjust the path which is left as an exercise to the reader.
The impact can be Yuge as illustrated in the following dotplot:
gcc version. Anyway: I fired up a Docker container, installed r-base-core plus three required -dev packages (for xml2, openssl, and curl) and ran a single install.packages("tidyverse"). In a nutshell, following the launch of Docker for an Ubuntu 17.04 container, it was just
$ apt-get update
$ apt-get install r-base libcurl4-openssl-dev libssl-dev libxml2-dev
$ apt-get install mg # a tiny editor
$ mg /etc/R/Rprofile.site # to add a default CRAN repo
$ R -e 'install.packages("tidyverse")'
which not only worked (as expected) but also installed a whopping fifty-one packages (!!) of which twenty-six contain a shared library. A useful little trick is to run du with proper options to total, summarize, and use human units which reveals that these libraries occupy seventy-eight megabytes:
root@de443801b3fc:/# du -csh /usr/local/lib/R/site-library/*/libs/*so
4.3M /usr/local/lib/R/site-library/Rcpp/libs/Rcpp.so
2.3M /usr/local/lib/R/site-library/bindrcpp/libs/bindrcpp.so
144K /usr/local/lib/R/site-library/colorspace/libs/colorspace.so
204K /usr/local/lib/R/site-library/curl/libs/curl.so
328K /usr/local/lib/R/site-library/digest/libs/digest.so
33M /usr/local/lib/R/site-library/dplyr/libs/dplyr.so
36K /usr/local/lib/R/site-library/glue/libs/glue.so
3.2M /usr/local/lib/R/site-library/haven/libs/haven.so
272K /usr/local/lib/R/site-library/jsonlite/libs/jsonlite.so
52K /usr/local/lib/R/site-library/lazyeval/libs/lazyeval.so
64K /usr/local/lib/R/site-library/lubridate/libs/lubridate.so
16K /usr/local/lib/R/site-library/mime/libs/mime.so
124K /usr/local/lib/R/site-library/mnormt/libs/mnormt.so
372K /usr/local/lib/R/site-library/openssl/libs/openssl.so
772K /usr/local/lib/R/site-library/plyr/libs/plyr.so
92K /usr/local/lib/R/site-library/purrr/libs/purrr.so
13M /usr/local/lib/R/site-library/readr/libs/readr.so
4.7M /usr/local/lib/R/site-library/readxl/libs/readxl.so
1.2M /usr/local/lib/R/site-library/reshape2/libs/reshape2.so
160K /usr/local/lib/R/site-library/rlang/libs/rlang.so
928K /usr/local/lib/R/site-library/scales/libs/scales.so
4.9M /usr/local/lib/R/site-library/stringi/libs/stringi.so
1.3M /usr/local/lib/R/site-library/tibble/libs/tibble.so
2.0M /usr/local/lib/R/site-library/tidyr/libs/tidyr.so
1.2M /usr/local/lib/R/site-library/tidyselect/libs/tidyselect.so
4.7M /usr/local/lib/R/site-library/xml2/libs/xml2.so
78M total
root@de443801b3fc:/#
Looks like dplyr wins this one at thirty-three megabytes just for its shared library.
But with a single stroke of strip we can reduce all this down a lot:
root@de443801b3fc:/# strip --strip-debug /usr/local/lib/R/site-library/*/libs/*so
root@de443801b3fc:/# du -csh /usr/local/lib/R/site-library/*/libs/*so
440K /usr/local/lib/R/site-library/Rcpp/libs/Rcpp.so
220K /usr/local/lib/R/site-library/bindrcpp/libs/bindrcpp.so
52K /usr/local/lib/R/site-library/colorspace/libs/colorspace.so
56K /usr/local/lib/R/site-library/curl/libs/curl.so
120K /usr/local/lib/R/site-library/digest/libs/digest.so
2.5M /usr/local/lib/R/site-library/dplyr/libs/dplyr.so
16K /usr/local/lib/R/site-library/glue/libs/glue.so
404K /usr/local/lib/R/site-library/haven/libs/haven.so
76K /usr/local/lib/R/site-library/jsonlite/libs/jsonlite.so
20K /usr/local/lib/R/site-library/lazyeval/libs/lazyeval.so
24K /usr/local/lib/R/site-library/lubridate/libs/lubridate.so
8.0K /usr/local/lib/R/site-library/mime/libs/mime.so
52K /usr/local/lib/R/site-library/mnormt/libs/mnormt.so
84K /usr/local/lib/R/site-library/openssl/libs/openssl.so
76K /usr/local/lib/R/site-library/plyr/libs/plyr.so
32K /usr/local/lib/R/site-library/purrr/libs/purrr.so
648K /usr/local/lib/R/site-library/readr/libs/readr.so
400K /usr/local/lib/R/site-library/readxl/libs/readxl.so
128K /usr/local/lib/R/site-library/reshape2/libs/reshape2.so
56K /usr/local/lib/R/site-library/rlang/libs/rlang.so
100K /usr/local/lib/R/site-library/scales/libs/scales.so
496K /usr/local/lib/R/site-library/stringi/libs/stringi.so
124K /usr/local/lib/R/site-library/tibble/libs/tibble.so
164K /usr/local/lib/R/site-library/tidyr/libs/tidyr.so
104K /usr/local/lib/R/site-library/tidyselect/libs/tidyselect.so
344K /usr/local/lib/R/site-library/xml2/libs/xml2.so
6.6M total
root@de443801b3fc:/#
Down to six point six megabytes. Not bad for one command. The chart visualizes the respective reductions. Clearly, C++ packages (and their template use) lead to more debugging symbols than plain old C code. But once stripped, the size differences are not that large.
And just to be plain, what we showed previously in post #9 does the same, only already at installation stage. The effects are not cumulative.
This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.
At the Debian Policy BoF
at DebConf17, Solveig suggested that we could post summaries of recent
activity in policy bugs to Planet Debian, as a kind of call for
participation. Russ Allbery had written a script to generate such a
summary some time ago, but it couldn t handle the usertags the policy
team uses to progress bugs through the policy changes process. Today
I enhanced the script to handle usertags and I m pleased to be able to
post a summary of our bugs.
Consensus has been reached and help is needed to write a patch
#172436 BROWSER and sensible-browser standardization
#273093 document interactions of multiple clashing package diversions
#299007 Transitioning perms of /usr/local
#314808 Web applications should use /usr/share/package, not /usr/share/doc/
#425523 Describe error unwind when unpacking a package fails
#452393 Clarify difference between required and important priorities
#476810 Please clarify 12.5, Copyright information
#484673 file permissions for files potentially including credential informa
#491318 init scripts should support start/stop/restart/force-reload - why
#556015 Clarify requirements for linked doc directories
#568313 Suggestion: forbid the use of dpkg-statoverride when uid and gid ar
#578597 Recommend usage of dpkg-buildflags to initialize CFLAGS and al.
#582109 document triggers where appropriate
#587279 Clarify restrictions on main to non-free dependencies
#587991 perl-policy: /etc/perl missing from Module Path
#592610 Clarify when Conflicts + Replaces et al are appropriate
#613046 please update example in 4.9.1 (debian/rules and DEB_BUILD_OPTIONS)
#614807 Please document autobuilder-imposed build-dependency alternative re
#616462 clarify wording of parenthetical in section 2.2.1
#628515 recommending verbose build logs
#661928 recipe for determining shlib package name
#664257 document Architecture name definitions
#682347 mark editor virtual package name as obsolete
#683222 say explicitly that debian/changelog is required in source packages
#685506 copyright-format: new Files-Excluded field
#685746 debian-policy Consider clarifying the use of recommends
#688251 Built-Using description too aggressive
#757760 please document build profiles
#759316 Document the use of /etc/default for cron jobs
#761219 document versioned Provides
#767839 Linking documentation of arch:any package to arch:all
#770440 policy should mention systemd timers
#773557 Avoid unsafe RPATH/RUNPATH
#780725 PATH used for building is not specified
#793499 The Installed-Size algorithm is out-of-date
#810381 Update wording of 5.6.26 VCS-* fields to recommend encryption
#823256 Update maintscript arguments with dpkg >= 1.18.5
#833401 virtual packages: dbus-session-bus, dbus-default-session-bus
#835451 Building as root should be discouraged
#838777 Policy 11.8.4 for x-window-manager needs update for freedesktop menus
#845715 Please document that packages are not allowed to write outside thei
#853779 Clarify requirements about update-rc.d and invoke-rc.d usage in mai
Wording proposed, awaiting review from anyone and/or seconds by DDs
#542288 Versions for native packages, NMU s, and binary only uploads
#582109 document triggers where appropriate
#630174 forbid installation into /lib64
#645696 [copyright-format] clearer definitions and more consistent License:
#648271 11.8.3 Packages providing a terminal emulator says xterm passes -
#649530 [copyright-format] clearer definitions and more consistent License:
#662998 stripping static libraries
#732445 debian-policy should encourage verification of upstream cryptograph
#737796 copyright-format: support Files: paragraph with both abbreviated na
#756835 Extension of the syntax of the Packages-List field.
#786470 [copyright-format] Add an optional License-Grant field
#835451 Building as root should be discouraged
#844431 Packages should be reproducible
#845255 Include best practices for packaging database applications
#850729 Documenting special version number suffixes
Merged for the next release
#587279 Clarify restrictions on main to non-free dependencies
#616462 clarify wording of parenthetical in section 2.2.1
#732445 debian-policy should encourage verification of upstream cryptograph
#844431 Packages should be reproducible
Next.