A brand new and shiny version of rfoaas is now on CRAN. The rfoaas package provides an interface for R to the most excellent FOAAS service--which provides a modern, scalable and RESTful web service for the frequent need to tell someone to f$#@ off.
There are two (internal) changes of merit in this version. First off, as FOAAS was refactored upstream, we are now forced to supply an accept: text/plain http request header. Which, sadly enough, is not something the url() function in R can do---so we brought in more cavalry and now depend on the httr package by Hadley, and use its GET() method. A second change is that we added a (simple but effective enough) regression test which simply calls all foaas entry points available throug rfoaas, and compares this to the anticipated result. To run it, you need to set an environment variable RunFOAASTests=yes as eg out Travis script does. Finally, we aligned the version number with upstream to signal that we cover all available entry points of that version.
As usual, CRANberries provides a diff to the previous release. Questions, comments etc should go to the GitHub issue tracker.
This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.
There was a regression in Linux 3.2.65, which unfortunately was
included in this weekend's Debian stable point release (7.8) as I
didn't point out the
bug
reports to the stable
release team. At least some systems are now failing to resume after
suspending to RAM; instead they reboot.
I have tracked down the change that caused this, and it should be
fixed as part of a security update soon. The change is in code
specific to 64-bit x86 (i.e. the Debian amd64 architecture). If you
need suspend/resume to work, you might wish to avoid upgrading the
linux-image-3.2.0-4-amd64 package until that future update.
Update: I have uploaded packages with the
problematic changes reverted to people.debian.org.
The version number is 3.2.65-1+deb7u1~test (lower than the next
security update will be). Mail
774436@bugs.debian.org
if this doesn't work for you.
A maintenance release of RcppClassic, now at version 0.9.6, went out to CRAN today. This package provides a maintained version of the otherwise deprecated first Rcpp API; no new projects should use it.
No changes were in user-facing code. The Makevars file was change to accomodate a request by the CRAN Maintainer to keep it free of GNU Make extensions. At the same time, we overhauled the look and feel of the (very short) vignette. Build instructions were updated both in the vignette and in the included example package. Other accumulated changes since the last release were updates to the DESCRIPTION and NAMESPACE file as well two namespace-related R code updates.
Courtesy of CRANberries, there is the set of changes relative to the previous release.
Questions, comments etc should go to the rcpp-devel mailing list off the R-Forge page.
This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.
First sequel to my Link Pack series (I ll remove the quotes when it s LP#05): Link Pack #01.
This time I m going for fewer articles, to try to keep things less overwhelming. There s no special theme, and I m actually leaving out some nice things I read recently. On the plus side, that means I have good material for a Link Pack #03.
Also, I m gonna stick with Link Pack as a name, because it s good enough :-).
Bottom Line: The low-fat, high-carb diet recommended by the mainstream nutrition organizations is a miserable failure and has been repeatedly proven to be ineffective. ( ) Bottom Line: Low-carb diets are the easiest, healthiest and most effective way to lose weight and reverse metabolic disease. It is pretty much a scientific fact at this point.GM s hit and run: How a lawyer, mechanic, and engineer blew open the worst auto scandal in history
Countless articles have been written about General Motors and its massive recalls earlier this year. What hasn t been fully told is how GM might have gotten away with multiple counts of consumercide were it not for the efforts of three men: a Georgia lawyer, a Mississippi mechanic, and a Florida engineer. ( ) Brooke Melton needn t have died that night. She was killed by a corporation s callous disregard for the safety of its customers, made worse by a regulatory agency reluctant to regulate.The Long Game: Part 1 and The Long Game: Part 2
A new release of my random package for truly (hardware-based) random numbers as provided by random.org is now on CRAN.
The main change is a switch to the curl() function from the eponymous package by Jeroen Ooms. This was caused by random.org now using https instead of http, annd the fact that te url() function from R does not cope well with the redirect. Besides this (enforced) change, everything else remains the same.
Courtesy of CRANberries comes a diffstat report for this release. Current and previous releases are available here as well as on CRAN.
This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.
A new release of the RcppCNPy package is now on CRAN.
This release mostly solidifies and fixes things. Support for saving integer objects, which was expanded in release 0.2.3, was not entirely correct. Operations on big-endian systems were not up to snuff either.
Wush Wu helped in getting this right with very diligent testing and patching particularly on big-endian hardware. We also got a pull request from Romain to reflect better const correctness at the Rcpp side of things. Last but not least we obliged by the CRAN Maintainers to not assume one could call gzip from system() call because, well, you guessed it.
Changes in version 0.2.4 (2015-01-05)CRANberries also provides a diffstat report for the latest release. As always, feedback is welcome and the rcpp-devel mailing list off the R-Forge page for Rcpp is may be the best place to start a discussion. GitHub issue tickets are also welcome.
- Support for saving integer objects was not correct and has been fixed.
- Support for loading and saving on 'big endian' systems was incomplete, has been greatly expanded and corrected, thanks in large part to very diligent testing as well as patching by Wush Wu.
- The implementation now uses const iterators, thanks to a pull request by Romain Francois.
- The vignette no longer assumes that one can call
gzipviasystemas the world's leading consumer OS may disagree.
This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.
Right on the heels of yesterday's BH release 1.55.0-2 bringing Boost Fusion, we now have release 1.55.0-3 bringing Boost Graph. To recap, BH is our CRAN package providing (a large part of the) Boost C++ libraries as a set of template headers for use by R and of course Rcpp.
And as a small project I am working on--and which should now be so much closer to release--needed not only Boost Fusion but also Boost Graph, I had to bother the CRAN maintainers twice in two days. This new version closes issue ticket 9, and may be of interest to other packages such as the venerable RBGL formerly on CRAN and now a BioConductor package which includes its own copy of this graph library (plus depends).
A brief summary of changes from the NEWS file is below.
Changes in version 1.55.0-3 (2015-01-04)Courtesy of CRANberries, there is also a
- Added Boost Graph requested in GH ticket #9 by Dirk for RcppStreams
diffstat report for the most recent release.
Comments and suggestions are welcome via the mailing list or the issue tracker at the GitHubGitHub repo.
This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.
My monthly report covers a large part of what I have been doing in the free software world. I write it for my donators (thanks to them!) but also for the wider Debian community because it can give ideas to newcomers and it s one of the best ways to find volunteers to work with me on projects that matter to me.
Debian LTS
This month I have been paid to work 20 hours on Debian LTS. I did the following tasks:
systemctl preset during package installation. I filed bug #772555 to get this fixed (in Stretch, it s too late for Jessie :-().
Saltstack
I m using salt to automate some administration task in Kali, at home and at work. I discovered recently that the project tries to collect Salt Formulas : those are ready to use instructions for as many services as possibles.
I started using this for some simple services and quickly felt the need to extend salt-formula , the set of states used to configure salt with salt. I submitted 5 pull requests (#73 and #74 to configure salt in standalone mode, #75 to enable the upstream package repositories, #76 to automatically download and enable the desired salt formulas, #77 for some bugfixes) and they have all been merged in less than 24 hours (that s the kind of thing that motivates you to contribute again in the future!).
I also submitted a bug fix for samba-formula and a bug report in salt itself (#19180).
BTW I have some salt states to setup schroot and sbuild. I will try to package those as proper salt formulas in the future
Misc stuff
Mailing list governance. In Debian, we often complain about meta-discussion on mailing lists (i.e. discussions about how we discuss together) and at the same time we need to have that kind of discussions from time to time. So I suggested to host those discussions in a new mailing list and to get this new list setup, our rules require to have other people interested in having this list. The idea had some support when we discussed it on debian-private, so I relaunched it on debian-project while filing the official request in the BTS: #772645. Unfortunately, I only got one second. So if you re interested in pursuing this idea, speak up now
Sponsorship. I sponsored another Galette plugin this month: galette-plugin-fullcard. Thanks to Fran ois-R gis Vuillemin for his work.
Publican. Following one of my bug report against Publican and with the help of the upstream author, we identified the problem and I submitted a patch.
Thanks
See you next month for a new summary of my activities.
One comment Liked this article? Click here. My blog is Flattr-enabled.
A new release of BH, our package providing (a large part of the) Boost C++ libraries as a set of template headers for use by R, is now on CRAN.
This is a relatively minor change which expands the set of Boost libraries included in the package to Boost Fusion per issue ticket 7. Boost Fusion is a very clever library providing a fusion of both compile-time meta-programming and run-time programming to provide something similar to the STL (i.e. containers, algorithms, ...) for heterogenous tuples. I also added pointers to both the mailing list and the GitHub issue tracker to the DESCRIPTION file, README and main manual page.
A brief summary of changes from the NEWS file is below.
Changes in version 1.55.0-2 (2015-01-03)Courtesy of CRANberries, there is also a
- Added Boost Fusion requested in GH ticket #7 by Dirk for RcppStreams
diffstat report for the most recent release.
Comments and suggestions are welcome via the mailing list or the issue tracker at the GitHubGitHub repo.
This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.
| Publisher: | Pragmatic Bookshelf |
| Copyright: | 2005 |
| Printing: | May 2006 |
| ISBN: | 0-9745140-5-5 |
| Format: | Trade paperback |
| Pages: | 785 |
? and !
convention for methods that return booleans or modify objects in-place is
brilliant in its simplicity, and something I'd love to see in more
languages. And the way Ruby implements ubiquitous code blocks for both
iterators and for any temporary objects is lovely once one gets used to
it. It's similar to Python's context managers, except more general and
built deeper into the language. Returning to the review of the book,
rather than the topic, Programming Ruby has a good, clear
explanation of blocks, iterators, and yield.
If you're interested in getting a grounding in Ruby, this book still feels
like a solid introduction. The edition I read is getting a bit long in
the tooth now that we're on Ruby 2.1, but the pace of language change has
slowed, and most of the book is still applicable. (If you're buying it
new, you should, of course, get the later edition.) The table of contents
makes it seem like the book is covering the same ground multiple times,
but that organizational strategy worked better than I expected. Ruby is
not the most organized language in the world, so I still felt a bit
overwhelmed with random method names in places, but I never felt lost in
the mechanics of the language.
In short, recommended if you want a good introduction to the language,
although probably in a later edition.
Rating: 8 out of 10
| Series: | Hunted Earth #1 |
| Publisher: | Tor |
| Copyright: | December 1990 |
| ISBN: | 0-8125-3014-4 |
| Format: | Mass market |
| Pages: | 500 |
| Publisher: | Princeton University |
| Copyright: | 1998, 2007 |
| Printing: | 2010 |
| ISBN: | 0-691-14600-4 |
| Format: | Trade paperback |
| Pages: | 259 |
Having just blogged about today's 5k, I noticed that I did not blog at all about running in 2014. There wasn't much, but another Ragnar Relay in February, again as an Ultra team. I more-or-less live tweeted this though: Pre-race warning (and that was my route!), Team photo at start, Leg 1, Leg 2, Leg 3, Leg 4, Leg 5, Leg 6, and Chilling
I also ran the Philly Half-Marathon in November following up on the Penn R Workshop, and posted some tweets: Post race selfie, Strava result (thinking it was a 13.5 miler race--WTF), and Post-race chill.
This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.
Nice, crisp and pretty cold morning for the 2015 New Year's 5k. I had run this before with friends: 2003, 2005, 2006 and 2007.
Needless to say, I am a little slower now: A hand-stopped 23:13 for a 7:27 min/mile pace is fine by me given the weather, lack of speedwork in the last few months, and generally reduced running---but also almost a minute slower than the last time I ran this.
In case you're a fellow running geek and into this, Strava has my result nicely aggregated.
This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.
Each software tool exists to solve some problem. For each problem,
there are many possible solutions. Even when different programs
basically do the same thing, they can have quite different shapes.
As an example, this morning I was wondering if it would be possible
for me to use notmuch to index my entire mail archive. For that, I
needed to convert a number of mbox folders to Maildir format. That's a
resonably easy problem, given access to suitable programming
libraries, but there's an existing tool for that, called mb2md.
Unfortunately, it has the wrong shape for my needs.
mb2md doesn't just convert one mbox to one maildir. It's designed to
for a mail admin converting all server-side mbox folders for a user
into a corresponding structure of Maildir folders. This seems to be
necessary when switching IMAP servers. That's a fairly specialised
problem, and the program has been written to make it easy for a mail
admin to do that.
What I need is part of the problem solved by mb2md and indeed it can
do just that part. However, the overall shape of mb2md is such that
my part is hard to do. The incantation is quite unintuitive and
requires careful reading of the documentation.
The shape of a solution matters. mb2md could easily have been
written in a way that provides a simple tool for the single folder
conversion, and then a more complex tool for the mail admin's more
complicated problem. This would have resulted in a much more general
tool, and that would make it easier for more people to use it without
much effort.
Mail folder format conversions are a fairly esoteric thing to do.
However, the lack of generality is a frequent issue with how programs
are designed. It is easy to fall into the trap of writing a highly
specialised tool, instead of taking a step back and making a more
general purpose tool. The specialised tool will help a small number of
people. The general tool will help many people.
Examples of this are fairly common. Debian has a set of tools for
making Debian live CDs; they are not quite able to make a bootable
hard disk image as well (thus,
vmdebootstrap). There's programs for
computing cyclomatic complexity, which produce HTML reports, rather
than something that can be processed by other programs without too
much effort. There's tools for managing address books that are limited
to specific cultures, e.g., by hardcoding assumptions of what a
person's name looks like (thus, clab).
One of my favourite examples is xargs, which by default does the
wrong thing by assuming its input is whitespace delimited. Any
whitespace, not just newlines. Any sensible use requires adding the
-0 option, which makes xargs that much more tedious to use.
Furthermore, I've often found that the more general tool is simpler.
It's functional specification is simpler; it's implementation is
simpler, and has fewer special cases; it's user experience is simpler.
That's not always true, but often it is.
Sometimes the general solution shape is not worth it. But it's always
worth considering whether it might be.
One of the parts of the Unix culture I really like is the preference
for general tools that are easy to combine together.
| Series: | Craft #1 |
| Publisher: | Tor |
| Copyright: | October 2012 |
| ISBN: | 1-4668-0203-0 |
| Format: | Kindle |
| Pages: | 336 |
I just watched a CCC
talk
in which the speaker claims Perl is horribly broken. Watching it was
fairly annoying however, since I had to restrain myself from throwing
things at the screen.
If you're going to complain about the language, better make sure you
actually understand the language first. I won't deny that there are a
few weird constructions in there, but hey. The talk boils down to a
claim that perl is horrible, because the list "data type" is "broken".
First of all, Netanel, in Perl, lists are not arrays. Yes, that's
confusing if you haven't done more than a few hours of Perl, but hear me
out. In Perl, a list is an enumeration of values. A variable with an '@'
sigil is an array; a construct consisting of an opening bracket ('(')
followed by a number of comma- or arrow-separated values (',' or '=>'),
followed by a closing bracket, is a list. Whenever you assign more than
one value to an array or a hash, you need to use a list to enumerate the
values. Subroutines in perl also use lists as arguments or return
values. Yes, that last bit may have been a mistake.
Perl has a concept of "scalar context" and "list context". A scalar
context is what a sub is in when you assign the return value of your sub
to a scalar; a list context is when you assign the return value of your
sub to an array or a hash, or when you use the list construct (the
thing with brackets and commas) with sub calls (instead of
hardcoded values or variables) as the individual values. This works as
follows:
sub magic
if (wantarray())
print "You're asking for a list!";
return ('a', 'b', 'c');
else
print "You're asking for a scalar!";
return 'a';
print ("list: ", magic(), "\n");
print "scalar: " . magic() . "\n";
The above example will produce the following output:
You're asking for a list!
list: abc
You're asking for a scalar!
scalar: a
What happens here? The first print line creates a list (because things
are separated by commas); the second one does not (the '.' is perl's
string concatenation operator; as you can only concatenate scalars, the
result is that you call the magic() sub in scalar context).
Yes, seen as how arrays are not lists, the name of the wantarray()
sub is horribly chosen. Anyway.
It is documented that lists cannot be nested. Lists can only be
one-dimensional constructs. If you create a list, and add another list
as an element (or something that can be converted to a list, like an
array or a hash), then the result is that you get a flattened list. If
you don't want a flattened list, you need to use a reference instead.
A reference is a scalar value that, very much like a pointer in C,
contains a reference to another variable. This other variable can be an
array, a hash, or a scalar. But it cannot be a list, because it must be
a variable -- and lists cannot be variables.
If you need to create multi-dimensional constructs, you need to use
references. Taking a reference is done by prepending a backslash to
whatever it is you're trying to take a reference of; or, in the case of
arrays of hashes, one can create an anonymous array or hash with [] resp
. E.g., if you want to add a non-flattened array to a list, you
instead create a reference to an array, like so:
$arrayref = [ 'this', 'is', 'an', 'anonymous', 'array'];
you can now create a multi-dimensional construct:
@multiarray = ('elem1', $arrayref);
Or you can do that in one go:
@multiarray = ('elem1', [ 'this', 'is', 'an', 'anonymous', 'array']);
Alternatively, you can create a non-anonymous array first:
@onedimarray = ('this', 'is', 'not', 'an', 'anonymous', 'array');
@multiarray = ('elem1', \@onedimarray);
In perl, curly brackets can be used to create a reference to anonymous
hashes, whereas square brackets can be used to create a reference to
anonymous arrays. This is all a basic part of the language; if you don't
understand that, you simply don't understand Perl. In other words,
whenever you see someone doing this:
%hash = 'a' => 'b' ;
or
@array = [ '1', '2' ];
you can say that they don't understand the language. For reference, the
assignment to %hash will result in an (unusable) hash with a single
key that is a reference to an anonymous hash (which cannot be accessed
anymore) and a value of undef; the assignment to @array will result
in a two-dimensional array with one element in the first dimension, and
two elements in the second.
The CGI.pm fix which Natanel dismisses in the Q&A part of the talk as a
"warning" which won't help (because it would be too late) is actually
a proper fix, which should warn people in all cases. That is, if you do
this:
%hash = 'name' => $name, 'password' => $cgi->param('password') ;
then CGI.pm's param() sub will notice that it's being called in list
context, and issue a warning -- regardless of whether the user is
passing one or two password query-parameters. It uses the wantarray()
sub, and produces a warning if that returns true.
In short, Perl is not the horribly broken construct that Natanel claims
it to be. Yes, there are a few surprises (most of which exist for
historical reasons), and yes, those should be fixed. This is why the
Perl community has redone much of perl for Perl 6. But the fact that
there are a few surprises doesn't mean the whole language is broken.
There are surprises in most languages; that is a fact of life.
Yes, the difference between arrays and hashes on the one hand, and
lists on the other hand, is fairly confusing; it took me a while to
understand this. But once you get the hang of it, it's not all that
difficult. And then these two issues that Natanel found (which I suppose
could be described as bugs in the core modules) aren't all that
surprising anymore.
So, in short:
Next.