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) 727 other packages on CRAN.
Conrad recently released a new upstream version 9.900.1 of Armadillo which we packaged and tested as usual first as a release candidate build and then as the release. As usual, logs from reverse-depends runs are in the rcpp-logs repo.
Apart from the new upstream release, we updated Travis use, ornamented the README a little, and smoothed over a rough corner from the recent R 4.0.0 release. All changes in the new release are noted below.
Courtesy of CRANberries, there is a diffstat report relative to previous release. More detailed information is on the RcppArmadillo page. Questions, comments etc should go to the rcpp-devel mailing list off the R-Forge page. If you like this or other open-source work I do, you can now sponsor me at GitHub. For the first year, GitHub will match your contributions.Changes in RcppArmadillo version 0.9.900.1.0 (2020-06-08)
- Upgraded to Armadillo release 9.900.1 (Nocturnal Misbehaviour)
- faster
solve()for under/over-determined systems- faster
eig_gen()andeig_pair()for large matrices- expanded
eig_gen()andeig_pair()to optionally provide left and right eigenvectors- Switch Travis CI testing to R 4.0.0, use bionic as base distro and test R 3.6.3 and 4.0.0 in a matrix (Dirk in #298).
- Add two badges to README for indirect use and the CSDA paper.
- Adapt
RcppArmadillo.package.skeleton()to a change in R 4.0.0 affecting what it exports inNAMESPACE.
This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.
Debian comes with tons of fonts for all kinds of purposes,
you can easily list them all (almost) with: apt-cache search ^fonts-
Above you can see a nice composition with examples of several fonts.
The composition is published under the
MIT (Expat) license
and the source SVG (created with Inkscape) can be downloaded
here.
You will need the fonts to be installed in your system so the SVG is correctly rendered.
If you want to learn more you can have a look at the wiki page about fonts
(https://wiki.debian.org/Fonts),
and if you want to contribute or maintain fonts in Debian,
don't hesitate to join the Fonts Team!
This comic was based on this essay from Augusten Burroughs: How to live unhappily ever after. In addition to the essay, I highly recommend reading his books. It's also been described in psychology as flow.
With full English subtitles
Confict where it comes from and how to deal with it
Communication skills
Other languages
Distributed teams are where people you work with aren t physically co-located, ie. they re at another office building, home or an outsourced company abroad. They re becoming increasingly popular, for DevOps and other teams, due to recruitment, diversity, flexibility and cost savings. Challenges arise due to timezones, language barriers, cultures and ways of working. People actively participating in Open Source communities tend to be effective in distributed teams. This session looks at how to apply core Open Source principles to distributed teams in Enterprise organisations, and the importance of shared purposes/goals, (mis)communication, leading vs managing teams, sharing and learning. We'll also look at practical aspects of what's worked well for others, such as alternatives to daily standups, promoting video conferencing, time management and virtual coffee breaks. This session is relevant for those leading or working in distributed teams, wanting to know how to cultivate an inclusive culture of increased trust and collaboration that leads to increased productivity and performance.
This weekend I had some pretty good uncle time. My eleven year old nephew (after beating me in a fair match of tennis) wanted to play with his Lego Mindstorms set. He never even touches it unless I am around to help him, but then he quiet enjoys. As expected, when I ask him what we should try to build, he tends to come up with completely unrealistic or impossible ideas, and we have to somehow reduce the scope to something doable.
This time round, inspired by their autonomous vacuum cleaner, he wanted to build something like that. That was convenient, because now I could sell him what I wanted to try to do, namely make the robot follow a wall at more or less constant distance, as a useful first step.
We mounted the infra red distance sensor at an 45 angle to the front-left, and then I built a very simple control loop measure the distance, subtract 40, apply a factor, and feed that into the steering input of the drive action, and repeat. I must admit that I was pretty proud to see just how well that very simple circuit worked: The little robot turned sharp corners in both directions, and otherwise drove nicely parallel and with constant distance to the wall.
I was satisfied with that achievement and would have happily ended it here before we might be disappointed by more ambitious and then failing goals.
But my nephew had not forgotten about the vacuum cleaner, and casually asked if I could make the robot draw an outline of its path, and thus of the room, on the display. Ok, where do I begin to explain just how unfeasible that is yes, it seemed one can draw to the display. But how should the robot know where it is? How far it turns? How far it went? This is programming by connecting boxes, and I would not expect such an interface to allow for complex logic (right?). And I would need trigonometry and stuff.
But he didn t quite believe it, and thus got me thinking indeed, the arithmetic block can evaluate more complex formulas, involving sin and cos so maybe if I can somehow keep track of where the robot is heading well, let s give it a try.
So by dragging boxes and connecting wires, I implemented a simple logic (three variables, x and y for current position, alpha for current heading; in each loop add the steering input onto alpha, and add (sin(alpha),cos(alpha)) onto the current position; throw in some linear factors to calibrate; draw pixel at (x, y)). And, to my nephew s joy and my astonishment, the robot was drawing a curvy line that clearly correlates with the taken path!
It wasn t respecting the angles perfectly, a square might not properly close, but half an hour earlier I would have actively bet against that we would pull this off!
After a few turns
the program code would be doing this:int socket = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
According to the ;login: article, converting a C program to use TLS would normally modify only 5-10 lines in the code, which is amazing when compared to using for example the OpenSSL API. The project has set up the https://securesocketapi.org/ web site to spread the idea, and the code for a kernel module and the associated system daemon is available from two github repositories: ssa and ssa-daemon. Unfortunately there is no explicit license information with the code, so its copyright status is unclear. A request to solve this about it has been unsolved since 2018-08-17. I love the idea of extending socket() to gain TLS support, and understand why it is an advantage to implement this as a kernel module and system wide service daemon, but can not help to think that it would be a lot easier to get projects to move to this way of setting up TLS if it was done with a user space approach where programs wanting to use this API approach could just link with a wrapper library. I recommend you check out this simple and powerful approach to more secure network connections. :) As usual, if you use Bitcoin and want to show your support of my activities, please send Bitcoin donations to my address 15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b.int socket = socket(PF_INET, SOCK_STREAM, IPPROTO_TLS);
| Compression | Time | Size |
| zstd | 5.2s | 130m |
| zstd -9 | 28.4s | 114m |
| gzip -9 | 33.4s | 141m |
| bzip2 -9 | 3m51 | 119m |
| lzma | 6m20 | 97m |
| xz | 6m36 | 97m |
| zstd -19 | 9m57 | 99m |
| zstd --ultra -22 | 27m46 | 95m |
It's (yet again!) been a while since I blogged last, sorry...
It's been over ten years since I started
in Arm, and nine since I joined
Linaro as an assignee. It was
wonderful working with some excellent people in both companies, but around
the end of last year I started to think that it might be time to look
for something new and different. As is the usual way in Cambridge, I
ended up mentioning this to friends and things happened!
After discussions with a few companies, I decided to accept an
interesting-looking offer from a Norwegian company called Pexip. My good friend Vince had been raving
for a while about how much he enjoyed his job there, which was a very
good sign! He works from his home near Cambridge, and they were very
happy to take me on in a similar way. There will be occasional trips
to the UK office near Reading, or to the Norway HQ in Oslo. But most
of the time I'll be working in my home office with all the home
comforts and occasionally even an office dog!
As is common in the UK for senior staff, I had to give 3 months
notice with my resignation. When I told my boss in Arm
way way back in February that I had decided to leave,
I planned for a couple of weeks of down-time in between jobs. Perfect
timing! The third week of May in Cambridge is the summer Beer
Festival, and my birthday is the week after. All was looking good!
Then the world broke... :-(
As the "novel coronavirus" swept the world, countries closed down
and normal life all-but disappeared for many. I acknowledge I'm very
lucky here - I'm employed as a software engineer. I can effectively
work from home, and indeed I was already in the habit of doing that
anyway. Many people are not so fortunate. :-/ In this period, I've
heard of some people in the middle of job moves where their new
company have struggled and the new job has gone away. Thankfully,
Pexip have continued to grow during this time and were still very keen
to have me. I finally started this week!
So, what does Pexip do? The company develops and supplies a video
conferencing platform, mainly targeting large enterprise customers. We
have some really awesome technology, garnering great reviews from
customers all over the world. See the website for more information!
Where do I fit in? Pexip is a relatively small company with a very
flat setup in engineering, so that's a difficult question to answer!
I'll be starting working in the team developing and maintaining PexOS,
the small Linux-based platform on which other things depend. (No
prizes for guessing which distro it's based on!) But there's lots of
scope to get involved in all kinds of other areas as needs and
interests arise. I can't wait to get stuck in!
Although I'm no longer going to be working on Debian arm port
issues on work time, I'm still planning to help where I can. Let's see
how that works...
fping -c $count -q -b $backoff -r $retry -4 -b $packetsize -t $timeout -i $mininterval -p $hostinterval $host [ $host ...]
... where those parameters are, by default:
$count is 20 (packets)$backoff is 1 (avoid exponential backoff)$timeout is 1.5s$mininterval is 0.01s (minimum wait interval between any target)$hostinterval is 1.5s (minimum wait between probes on a single target)apt install prometheus-blackbox-exporter
dpkg-reconfigure prometheus-blackbox-exporter
prometheus.yml (the default blackbox
exporter configuration is fine):
scrape_configs:
- job_name: blackbox
metrics_path: /probe
params:
module: [icmp]
scrape_interval: 5s
static_configs:
- targets:
- octavia.anarc.at
# hardcoded in DNS
- nexthop.anarc.at
- koumbit.net
- dns.google
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: 127.0.0.1:9115 # The blackbox exporter's real hostname:port.
Notice how we lower the scrape_interval to 5 seconds to get more
samples. nexthop.anarc.at was added into DNS to avoid hardcoding
my upstream ISP's IP in my configuration.sum(probe_icmp_duration_seconds phase="rtt" ) by (instance)
Legend field to instance RTTDraw modes to lines and Mode options to staircaseLeft Y axis Unit to duration(s)Legend As table, with Min, Avg, Max and
Current enabled1-avg_over_time(probe_success[$__interval])!=0 or null
Legend field to instance packet lossAdd series override to Lines: false, Null point mode:
null, Points: true, Points Radius: 1, Color: deep red,
and, most importantly, Y-axis: 2Right Y axis Unit to percent (0.0-1.0) and set
Y-max to 1Repeat, on target,
vertically. And you need to add a target variable like
label_values(probe_success, instance).
Not bad, but not Smokeping
stddev(probe_icmp_duration_seconds phase="rtt",instance=~"$instance" )
stddev_over_time(probe_icmp_duration_seconds phase="rtt",instance=~"$instance" [$__interval])
stddev_over_time(probe_icmp_duration_seconds phase="rtt",instance=~"$instance" [1m])
The first two give zero for all samples. The latter works, but doesn't
look as good as Smokeping. So there might be something I'm missing.
SuperQ wrote a special exporter for this called
smokeping_prober that came out of this discussion in the blackbox
exporter. Instead of delegating scheduling and target definition
to Prometheus, the targets are set in the exporter.
They also take a different approach than Smokeping: instead of
recording the individual variations, they delegate that to Prometheus,
through the use of "buckets". Then they use a query like this:
histogram_quantile(0.9 rate(smokeping_response_duration_seconds_bucket[$__interval]))
This is the rationale to SuperQ's implementation:
Yes, I know about smokeping's bursts of pings. IMO, smokeping's data model is flawed that way. This is where I intentionally deviated from the smokeping exact way of doing things. This prober sends a smooth, regular series of packets in order to be measuring at regular controlled intervals. Instead of 20 packets, over 10 seconds, every minute. You send one packet per second and scrape every 15. This has the same overall effect, but the measurement is, IMO, more accurate, as it's a continuous stream. There's no 50 second gap of no metrics about the ICMP stream. Also, you don't get back one metric for those 20 packets, you get several. Min, Max, Avg, StdDev. With the histogram data, you can calculate much more than just that using the raw data. For example, IMO, avg and max are not all that useful for continuous stream monitoring. What I really want to know is the 90th percentile or 99th percentile. This smokeping prober is not intended to be a one-to-one replacement for exactly smokeping's real implementation. But simply provide similar functionality, using the power of Prometheus and PromQL to make it better. [...] one of the reason I prefer the histogram datatype, is you can use the heatmap panel type in Grafana, which is superior to the individual min/max/avg/stddev metrics that come from smokeping. Say you had two routes, one slow and one fast. And some pings are sent over one and not the other. Rather than see a wide min/max equaling a wide stddev, the heatmap would show a "line" for both routes.That's an interesting point. I have also ended up adding a heatmap graph to my dashboard, independently. And it is true it shows those "lines" much better... So maybe that, if we ignore legacy, we're actually happy with what we get, even with the plain blackbox exporter. So yes, we're missing pretty "fuzz" lines around the main lines, but maybe that's alright. It would be possible to do the equivalent to the InfluxDB hack, with queries like:
min_over_time(probe_icmp_duration_seconds phase="rtt",instance=~"$instance" [30s])
avg_over_time(probe_icmp_duration_seconds phase="rtt",instance=~"$instance" [5m])
max_over_time(probe_icmp_duration_seconds phase="rtt",instance=~"$instance" [30s])
The output looks something like this:
Looks more like Smokeping!
min_over_time function (incorrectly, IMHO)
returning zero. I haven't quite figured out how to fix that, and I'm
not sure it is better. But it does look more like Smokeping than the
previous graph.
Update: I forgot to mention one big thing that this setup is
missing. Smokeping has this nice feature that you can order and group
probe targets in a "folder"-like hierarchy. It is often used to group
probes by location, which makes it easier to scan a lot of
targets. This is harder to do in this setup. It might be possible to
setup location-specific "jobs" and select based on that, but it's not
exactly the same.
avg_over_time query idea.
Welcome to the May 2020 report from the Reproducible Builds project.
One of the original promises of open source software is that distributed peer review and transparency of process results in enhanced end-user security. Nonetheless, whilst anyone may inspect the source code of free and open source software for malicious flaws, almost all software today is distributed as pre-compiled binaries. This allows nefarious third-parties to compromise systems by injecting malicious code into seemingly secure software during the various compilation and distribution processes.
In these reports we outline the most important things that we and the rest of the community have been up to over the past month.
Recent years saw a number of supply chain attacks that leverage the increasing use of open source during software development, which is facilitated by dependency managers that automatically resolve, download and install hundreds of open source packages throughout the software life cycle.In related news, the LineageOS Android distribution announced that a hacker had access to the infrastructure of their servers after exploiting an unpatched vulnerability. Marcin Jachymiak of the Sia decentralised cloud storage platform posted on their blog that their
siac and siad utilities can now be built reproducibly:
This means that anyone can recreate the same binaries produced from our official release process. Now anyone can verify that the release binaries were created using the source code we say they were created from. No single person or computer needs to be trusted when producing the binaries now, which greatly reduces the attack surface for Sia users.Synchronicity is a distributed build system for Rust build artifacts which have been published to crates.io. The goal of Synchronicity is to provide a distributed binary transparency system which is independent of any central operator. The Comparison of Linux distributions article on Wikipedia now features a Reproducible Builds column indicating whether distributions approach and progress towards achieving reproducible builds.
binutils package ships its own, unreproducible, log files in its binary packages. It was followed-up by replies from Chris Lamb and Matthias Klose.
ocaml_cmti_files toolchain issue.
In Alpine Linux, an issue was filed and closed regarding the reproducibility of .apk packages.
Allan McRae of the ArchLinux project posted their third Reproducible builds progress report to the arch-dev-public mailing list which includes the following call for help:
We also need help to investigate and fix the packages that fail to reproduce that we have not investigated as of yet.In openSUSE, Bernhard M. Wiedemann published his monthly Reproducible Builds status update.
Chris Lamb made the changes listed below to diffoscope, our in-depth and content-aware diff utility that can locate and diagnose reproducibility issues. He also prepared and uploaded versions 142, 143, 144, 145 and 146 to Debian, PyPI, etc.
file now supports recognising JSON data. (#106).changes and .buildinfo handling to show all details (including the GnuPG header and footer components) even when referenced files are not present. (#122)BuildinfoFile comparator (etc.) regardless of whether the associated files (such as the orig.tar.gz and the .deb) are present. [ ].buildinfo, .changes, etc. [ ]apksigner(1). (#121).zip files. (#116).mobilepovision files. (#113)differences typo in the ApkFile handler. (#127)id="foo" anchor reference twice in the HTML output, otherwise identically-named parts will not be able to linked to via a #foo anchor. (#120)#. [ ]--json presenter; it will usually be too complicated to be readable by the human anyway. [ ]Command [ ] failed with exit code messages to remove duplicate exited with exit but also to note that diffoscope is interpreting this as an error. [ ]Command [ ] exited with 1 messages. (#126)debian Python module. [ ]stderr from if both commands emit the same output. [ ]apksigner test failures due to lack of binfmt_misc, eg. on Salsa CI and elsewhere. [ ].travis.yml as we use Salsa instead. [ ]Dockerfile improvements:
.dockerignore file to whitelist files we actually need in our container. (#105)ARG instead of ENV when setting up the DEBIAN_FRONTEND environment variable at runtime. (#103)build-essential during build so we can install the recommended packages from Git. [ ]shell=False keyword argument to subprocess.Popen so that the potentially-unsafe shell=True is more obvious. [ ]MissingFile s special handling of deb822 to prevent leaking through abstract layers. [ ][ ]try/except block when cleaning up temporary files with respect to the flake8 quality assurance tool. [ ]in_dsc_path to dsc_in_same_dir to clarify the use of this variable. [ ]debian_fallback class [ ] and add descriptions for the file types. [ ]Openssl command class to OpenSSLPKCS7 to accommodate other command names with this prefix. [ ]--debugger command-line argument to --pdb. [ ]stat(2) birth times (ie. st_birthtime) in the same way we do with the stat(1) command s Access: and Change: times to fix a nondeterministic build failure in GNU Guix. (#74)LibarchiveMember s has_same_content method was called regardless of the underlying type of file. [ ]
debian/py3dist-overrides to ensure the rpm-python module is used in package dependencies (#89) and moved to using the new execute_after_* and execute_before_* Debhelper rules [ ].
Chris Lamb also performed a huge overhaul of diffoscope s website:
absolute_url and relative_url where possible [ ][ ] and move a number of configuration variables to _config.yml [ ][ ].golang-packaging (toolchain issue, affecting times in minikube)jboss-logging-tools (toolchain issue, affecting date for resteasy)linux_logo (sort find output to avoid inheriting filesystem order)moonjit (generate reproducible output by default if SOURCE_DATE_EPOCH is set)vala (report ASLR nondeterminism)earlyoom (timestamps in Gzip files)fmt (Don t install sphinx-build cached files as they are unneeded & unreproducible)nvidia-settings (timestamp in Gzip files)ataqv.elinks.briquolo.cryptominisat.wolfssl.mistral.python-watcherclient.tree-puzzle.nulib2.process-cpp.bowtie2.properties-cpp.wand (forwarded upstream)vows.libstatgrab.texi2html.grub.systemtap.mono.mescc-tools: Inherit CFLAGS in a Makefile, allowing -ffile-prefix-map/-fdebug-prefix-map to sanitise build paths (merged upstream).1.8.1-1 to Debian unstable and Bernhard M. Wiedemann fixed an off-by-one error when parsing PNG image modification times. (#16)
In disorderfs, our FUSE-based filesystem that deliberately introduces non-determinism into directory system calls in order to flush out reproducibility issues, Chris Lamb replaced the term dirents in place of directory entries in human-readable output/log messages [ ] and used the astyle source code formatter with the default settings to the main disorderfs.cpp source file [ ].
Holger Levsen bumped the debhelper-compat level to 13 in disorderfs [ ] and reprotest [ ], and for the GNU Guix distribution Vagrant Cascadian updated the versions of disorderfs to version 0.5.10 [ ] and diffoscope to version 145 [ ].
libtool. [ ]_docs subdirectory to find the _docs/index.md file after an internal move. (#27)ltmain.sh etc. in preformatted quotes. [ ]SOURCE_DATE_EPOCH Python examples onto more lines to prevent visual overflow on the page. [ ]faketime to the project s Github page. (!57)
We operate a large and many-featured Jenkins-based testing framework that powers tests.reproducible-builds.org that, amongst many other tasks, tracks the status of our reproducibility efforts as well as identifies any regressions that have been introduced. Holger Levsen made the following changes:
let VARIABLE=0 exits with an error. [ ].buildinfo files with the same name. [ ]/usr merge variation on Debian unstable. [ ]molly-guard. [ ]debrebuild script. [ ][ ][ ][ ].buildinfo files. [ ][ ]
alpine_schroot.sh script now that a patch for abuild had been released upstream. [ ]
brcm47xx target to bcm47xx. [ ]
jenkins to run the blacklist command [ ] and the usual build node maintenance was performed was performed by Holger Levsen [ ][ ][ ], Mattia Rizzolo [ ][ ] and Vagrant Cascadian [ ][ ][ ].
Paul Spooren started a thread titled Reproducible Builds Verification Format which reopens the discussion around a schema for sharing the results from distributed rebuilders:
To make the results accessible, storable and create tools around them, they should all follow the same schema, a reproducible builds verification format. The format tries to be as generic as possible to cover all open source projects offering precompiled source code. It stores the rebuilder results of what is reproducible and what not.Hans-Christoph Steiner of the Guardian Project also continued his previous discussion regarding making our website translatable. Lastly, Leo Wandersleb posted a detailed request for feedback on a question of supply chain security and other issues of software review; Leo is the founder of the Wallet Scrutiny project which aims to prove the security of Android Bitcoin Wallets:
Do you own your Bitcoins or do you trust that your app allows you to use your coins while they are actually controlled by them ? Do you have a backup? Do they have a copy they didn t tell you about? Did anybody check the wallet for deliberate backdoors or vulnerabilities? Could anybody check the wallet for those?Elsewhere, Leo had posted instructions on his attempts to reproduce the binaries for the BlueWallet Bitcoin wallet for iOS and Android platforms.
#reproducible-builds on irc.oftc.net.
rb-general@lists.reproducible-builds.org
This month s report was written by Bernhard M. Wiedemann, Chris Lamb, Holger Levsen, Jelle van der Waa and Vagrant Cascadian. It was subsequently reviewed by a bunch of Reproducible Builds folks on IRC and the mailing list.
### The blockade has ended! For some introduction..
Back in 2016, Telmex Mexico's foremost communications provider and,
through the brands grouped under the *Am rica M vil* brand, one of
Latin America's most important ISPs set up rules to block connecitons
to (at least) seven of Tor's *directory authorities* (*DirAuths*). We
believe they might have blocked all of them, in an attempt to block
connections from Tor from anywhere in their networks, but Tor is much
more resourceful than that so, the measure was not too effective.
Only... _Some_ blocking did hurt Telmex's users: The ability to play
an active role in Tor. The ability to host Tor relays at home. Why?
Because the *consensus protocol* requires relays to be reachable in
order to be measured from the network's *DirAuths*.
### Technical work to prove the blocking
We dug into the issue as part of the work we carried out in the
project I was happy to lead between 2018 and 2019, *UNAM/DGAPA/PAPIME
PE102718*. In March 2019, I presented a paper titled [Distributed
Detection of Tor Directory Authorities Censorship in
Mexico](https://www.thinkmind.org/index.php?view=article&articleid=icn_2019_6_20_38010)
([alternative download](http://ru.iiec.unam.mx/4538/) in the [Topic on
Internet Censorship and Surveillance (TICS) track](https://tics.site/)
of the XVIII International Conference on Networks.
Then... We had many talks inside our group, but nothing seemed to move
for several months. We did successfully push for increasing the number
of Tor relays in Mexico (we managed to go from two to eleven stable
relays not much in absolute terms, but quite good relatively, even
more considering most users were not technically able to run one!)
Jacobo N jera, journalist participant of our project, didn't leave
things there just lying around waiting magically for justice to
happen. Together with Vasilis Ververis, from the [Magma
Project](https://magma.lavafeld.org/), they presented some weeks ago a
[Case study: Tor Directory Authorities Censorship in
Mexico](https://magma.lavafeld.org/guide/data-analysis.html#case-study-tor-directory-authorities-censorship-in-mexico).
### Pushing to action
But a good part of being a journalist is knowing _how_ and _when_ to
spread the word. Having already two technical studies showing the
blocking in place, Jacobo presented his findings with [an article in
GlobalVoices: *The largest telecommunications operator in Mexico
blocks the secure
network*](https://es.globalvoices.org/2020/05/28/en-mexico-el-mas-grande-operador-de-telecomunicaciones-bloquea-la-internet-segura/). Surprisingly
(to me, at least), this story was picked up by a major Mexican
newspaper: The same evening the story hit GlobalVoices, [Rodrigo
Riquelme](https://www.eleconomista.com.mx/autor/rriquelme) posted an
article, in the Technology section of *El Economista*, titled [Telmex
blocks seven out of ten accesses to the Tor network in
Mexico](https://www.eleconomista.com.mx/tecnologia/Telmex-bloquea-siete-de-10-accesos-a-la-red-Tor-en-Mexico-20200528-0078.html). And
that very same day, Telmex sent a reply I am translating in full (that
is now included at the end of Riquelme's article):
> Mexico City, May 28, 2020
>
> In relation to Tor navigation from TELMEX's network, the company
> informs:
>
> In TELMEX, we are committed to the full respect to navigation
> freedom for all of our users.
>
> TELMEX practices no application-level blocking policies; the Tor
> application, as well as the rest of Internet applications, can be
> freely accessed from our network.
>
> In order to protect the Internauts' information, the seven refered
> nodes were in their time reported because they were associated with
> the distribution of the WannaCry ransomware, which is the reason
> they were filtered, but this does not hamper the use of the Tor
> application.
### So we got an answer...?
Jacobo knew we had to take advantage of this answer, and act fast! He
entered rush-writing mode and, with the help of our good friend and
lawyer Salvador Alc ntar, we wrote [a short letter to Renato Flores
Cartas, Corporative Communication of Am rica
M vil](https://internetanonima.net/respuesta-a-telmex-sobre-la-red-tor-en-mexico/),
and sent it on June 1st.
Next thing I know, this evening Jacobo was asking me if I could
confirm the blocking was lifted. What I could not believe it! But,
yes Today Jacobo published the confirmation that [the seven blocked
IP routes were finally reachable again from ASN 8151 (UNINET / Telmex
/ Am rica
M vil)!](https://internetanonima.net/confirmamos-desbloqueo-de-las-7-direcciones-de-la-red-tor-por-telmex/)
Of course, this story was picked up again by El Economista [Telmex
unblocks IP addresses for the Tor network's directory authority server
IPs in
Mexico](https://www.eleconomista.com.mx/tecnologia/Telmex-desbloquea-direcciones-IP-de-servidores-de-autoridad-de-la-red-Tor-en-Mexico-20200604-0094.html).
### Wrapping up
How can I put this in words? I am very, very, very, *very, very,
very*, **very, very, very** happy we managed to see this through!
Although we have been pushing for increasing the usage of Tor among
users at risk in Mexico Being a journalist, defending human rights,
are still a high-risk profession in my country. We strongly believe in
this, and will continue trying to raise awareness of the usage.
But, just as with free software, *using* network anonymization tools
is not all. We need more people to become active, to become engaged,
to *become active participants* in anonymization. As the adage says,
*anonymity loves company* In order to build strong, sufficient
anonymization capability for everybody that needs it, we need more
people to *provide relay services*. And this is a *huge* step to
improve Mexico's participation in the Tor network!
---
Image credits: [*Seeing My World Through a Keyhole*, by Kate Ter
Haar](https://www.flickr.com/photos/katerha/4592429363) (CC-BY); [Tor
logo (Wikimedia Commons)](https://commons.wikimedia.org/wiki/File:Tor-logo-2011-flat.svg)
Here's a practical example of applying Template Haskell to reduce
the amount of boilerplate code that is otherwise required. I wrote the below
after following this excellent blog post by Matt Parsons. This post will be much higher-level, read
Matt's blog for the gorier details.
Liquorice
Liquorice is a toy project of mine from a few years ago that lets you
draw 2D geometric structures similar to LOGO. Liquorice offers two interfaces:
pure functions that operate on an explicit Context (the pen location:
existing lines, etc.), and a second "stateful" interface where the input and
output are handled in the background.
I prefix the pure ones P. and the stateful ones S. in this blog post for
clarity.
The stateful interface can be much nicer to use for larger drawings.
Compare example8b.hs,
written in terms of the pure functions, and the stateful equivalent
example8.hs.
The majority of the stateful functions are "wrapped" versions of the pure
functions. For example, the pure function P.step takes two numbers
and moves the pen forward and sideways. Its type signature is
P.step :: Int -> Int -> Context -> Context
Here's the signature and implementation of the stateful equivalent:
S.step :: Int -> Int -> State Context ()
S.step x y = modify (P.step x y)
Writing these wrapped functions for the 29 pure functions is boilerplate that
can be generated automatically with Template Haskell.
Generating the wrapper functions
Given the Name of a function to wrap, we construct an instance of FunD, the
TH data-type representing a function definition. We use the base name of the
incoming function as the name for the new one.
mkWrap fn = do
let name = mkName (nameBase fn)
return $ FunD name [ Clause (map VarP args) (NormalB rhs) [] ]
To determine how many arguments the wrapper function needs to accept, we need
to determine the input function's arity. We use Template Haskell's reify
function to get type information about the function, and derive the arity from
that. Matt Parson's covers this exactly in his blog.
info <- reify fn
let ty = (\(VarI _ t _ ) -> t) info
let n = arity ty - 1
args <- replicateM n (newName "arg")
We can use the list "args" directly in the clause part of the function
definition, as the data-type expects a list. For the right-hand side, we need
to convert from a list of arguments to function application. That's a simple
left-fold:
-- mkFnApp f [a,b,c] => ((f a) b) c => f a b c
mkFnApp = foldl (\e -> appE e . varE)
rhs <- [ modify $(mkFnApp (varE fn) args) :: State Context () ]
We use TH's oxford brackets for the definition of rhs. This permits us
to write real Haskell inside the brackets, and get an expression data-type
outside them. Within we have a splice (the $( )), which does the opposite:
the code is evaluated at compile time and generates an Exp that is then
converted into the equivalent Haskell code and spliced into place.
Finally, we need to apply the above to a list of Names. Sadly, we can't get at
the list of exported names from a Module automatically. There is an open
request for a TH extension for
this. In the meantime,
we export a list of the functions to wrap from the Pure module and operate
on that
import Liquorice.Pure
wrapPureFunctions = mapM mkWrap pureFns
Finally, we 'call' wrapPureFunctions at the top level in our state module
and Template Haskell splices all the function definitions into place.
The final code ended up only around 30 lines of code, and saved about the
same number of lines of boilerplate. But in doing this I noticed some missing
functions, and it will pay dividends if more pure functions are added.
Limitations
The current implementation has one significant limitation: it cannot handle
higher-order functions. An example of a pure higher-order function is
place, which moves the pen, performs an operation, and then moves it back:
P.place :: Int -> Int -> (Context -> Context) -> Context -> Context
Wrapping this is not sufficient because the higher-order parameter has
the pure function signature Context -> Context. If we wrapped it, the
stateful version of the function would accept a pure function as the
parameter, but you would expect it to accept another stateful function.
To handle these, at a minimum we would need to detect the function arguments
that have type Context -> Context and replace them with State Context ().
The right-hand side of the wrapped function would also need to do more work to
handle wrapping and unwrapping the parameter. I haven't spent much time
thinking about it but I'm not sure that a general purpose wrapper would work
for all higher-order functions. For the time being I've just re-implemented the
half-dozen of them.
For about two months I've been working on a new project, debplate,
which currently lives
at benh/debplate
on Salsa. This is a template system for Debian packages, primarily
intended to ease building multiple similar binary packages from a
single source. With some changes, it could also be useful for
making multiple source packages consistent
(issue
#9).
I want debplate to be capable of replacing the kernel team's
existing template system and a lot of its custom scripting, but it
is also meant to a general tool. I believe it's already capable of
supporting source packages with relatively simple needs, and there
are some examples of these in the debplate source. My long-term
goal is that debplate will replace most team-specific and
package-specific template systems, making those source packages
using it less unusual and easier to contribute to.
I gave
a short
talk about debplate at MiniDebConf Online on Sunday.
I was assigned 17.25 hours of work by Freexian's Debian LTS
initiative, and carried over 2.5 hours from April. I worked all
19.75 hours this month.
I sent
a request
for testing an update of the linux package to 3.16.83. I then
prepared and, after review, released Linux 3.16.84. I rebased the
linux package onto that and sent out
a further
request for testing. I then backported some additional security
fixes, but have still not made an upload.
I attended the LTS contributor meeting on IRC.
The eleventh release of littler as a CRAN package is now available, following in the fourteen-ish year history as a package started by Jeff in 2006, and joined by me a few weeks later.
littler is the first command-line interface for R as it predates Rscript. It allows for piping as well for shebang scripting via #!, uses command-line arguments more consistently and still starts faster. It also always loaded the methods package which Rscript only started to do in recent years.
littler lives on Linux and Unix, has its difficulties on macOS due to yet-another-braindeadedness there (who ever thought case-insensitive filesystems as a default where a good idea?) and simply does not exist on Windows (yet the build system could be extended see RInside for an existence proof, and volunteers are welcome!). See the FAQ vignette on how to add it to your PATH.
A few examples are highlighted at the Github repo, as well as in the examples vignette.
This release adds a new helper / example script installBioc.r for BioConductor package installation, generalizes the roxygenize() wrapper roxy.r a little, and polished a couple of other corners.
The NEWS file entry is below.
CRANberries provides a comparison to the previous release. Full details for the littler release are provided as usual at the ChangeLog page. The code is available via the GitHub repo, from tarballs and now of course also from its CRAN page and viaChanges in littler version 0.3.10 (2020-06-02)
- Changes in examples
- The
update.rscript only considers writeable directories.- The
rcc.rscript tries to report full logs by setting_R_CHECK_TESTS_NLINES_=0.- The
tt.rscript has an improvedncpufallback.- Several installation and updating scripts set
_R_SHLIB_STRIP_toTRUE.- A new script
installBioc.rwas added.- The
--erroroption toinstall2.rwas generalized (Sergio Oller in #78).- The
roxy.rscript was extended a little.- Changes in package
- Travis CI now uses R 4.0.0 and the bionic distro
install.packages("littler"). Binary packages are available directly in Debian as well as soon via Ubuntu binaries at CRAN thanks to the tireless Michael Rutter.
Comments and suggestions are welcome at the GitHub repo.
If you like this or other open-source work I do, you can now sponsor me at GitHub. For the first year, GitHub will match your contributions.
This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.
BigBlueButton, aka BBB, is a webrtc conferencing solution, that among many features, allows to record a conference, for later replay.
We have been working together with my colleague Fran ois Trahay, on a set of scripts (bbb-downloader) that will allow to easily (on Linux) download recordings of BBB conferences, for local backup, video editing, upload on video sharing platforms, etc. This is particularly useful in our distance learning contexts where students may have to catch up on a live session that was recorded.
We have integrated a hackish solution to capture, as a single video, presentations that contained slide deck presentations. Let me explain why this was necessary.
A nice feature of BBB is the fact that, to present a slides deck, you don t need to share your screen (as a video stream), but just have to upload your file, which is then auto-converted to images, that are sent to participants, in sync with your next/previous browsing of the slides.
This is great for participants with low bandwidth, which can see the slides ( static images) instead of receiving a full screen video stream.
But a side effect is that the recording of a class/conference that is done by BBB replays the slides just as it was done live : displaying images one after the other.
While it is easy to retrieve the audio, webcams of participants, or screen sharings as video streams, directly available from the recordings replay app, it is thus not the same for the slides, which don t come as a video.
Our script will perform a replay, using a Docker container which drives Selenium under the hood, to capture the full replay, as a single video, which then includes the slides and everything. You can see my demo of this process in the following video:
bbb-downloader full capture demo.
It takes long to replay, in real-time, the recordings, to perform this capture but it works. Kudos to elgalu/docker-selenium for the Docker env.
Feel free to test it and profit, or to report issues in the Guthub issues of the repo: https://github.com/trahay/bbb-downloader/.
Float/String Conversion in Picolibc: Enter Ry
I recently wrote about this topic
having concluded that the best route for now was to use the
malloc-free, but imprecise, conversion routines in the tinystdio alternative.
A few days later, Sreepathi Pai pointed me at some very recent work in this area:
int
__dtoa_engine(double x, struct dtoa *dtoa, uint8_t max_digits, uint8_t max_decimals);
This converts the double x to a string of decimal digits and a
decimal exponent stored inside the 'dtoa' struct. It limits the
total number of digits to max_digits and, optionally (when
max_decimals is non-zero), limits the number of fractional digits
to max_decimals - 1. This latter supports 'f' formats. Returns
the number of digits stored, which is <= max_digits. Less if the
number can be accurately represented in fewer digits.int
__ftoa_engine(float x, struct ftoa *ftoa, uint8_t max_digits, uint8_t max_decimals);
The same as __dtoa_engine, except for floats.double
__atod_engine(uint64_t m10, int e10);
To avoid needing to handle stdio inside the conversion function,
__atod_engine receives fully parsed values, the base-10
significand (m10) and exponent (e10). The value to convert is
m10 * pow(10, e10).float
__atof_engine(uint32_t m10, int e10);
The same as __atod_engine, except for floats.max_digits or max_decimals
were smaller. I'm not sure I managed to do that correctly, but at
least it appears to be passing all of the test cases I have. In normal
operation, Ry iteratively removes digits from the answer that aren't
necessary to disambiguate with neighboring values.
What I changed was to keep removing digits using that method until the
answer had few enough digits to fit in the desired length. There's
some tricky rounding code that adjusts the final result and I had to
bypass that if I'd removed extra digits.
That was about the only change necessary to the core algorithm. I also
trimmed the code to only include the general case and not the
performance improvements, then wrapped it with code to provide the
_engine interface.
On the string-to-float side, most of what I needed to do was remove
the string parsing bits at the start of the function and switch from
performance-optimized to space-optimized versions of a couple of
internal routines.
Correctness Results
Because these new functions are now 'exact', I was able to adjust the
picolibc tests to compare all of the bits for string/float conversion
instead of having to permit a bit of slop in the answers. With those
changes, the picolibc test suite passes, which offers some assurance
that things aren't completely broken.
Size Results
Snek uses the 32-bit float versions of the conversion routines, and
for that, the size difference is:
text data bss dec hex filename
59068 44 37968 97080 17b38 snek-qemu-riscv-orig.elf
59430 44 37968 97442 17ca2 snek-qemu-riscv-ryu.elf
362
362 bytes added to gain accurate printf/strtof results seems like a
good trade-off in this case.
Performance
I haven't measured performance at all, but I suspect that it won't be
nearly as problematic on most platforms as the source code makes it
appear. And that's because Ry is entirely integer arithmetic with no
floating point at all. This avoids using the soft fp code for
platforms without hardware float support.
Pointers to the Code
I haven't merged this to picolibc master yet, it's on the ryu branch:
Review, especially of the hack above to return short results, would be
greatly appreciated!
Thanks again to Ulf Adams for creating this code and to Sreepathi Pai
for sending me a note about it!
You may have heard of my search for Cloud solutions to run labs in an academic context, with a focus on free an open source solutions . You may read previous installments of this blog, or for a shorter, check the presentation I ve recorded last week.
I ve become quite interested, in the latest month, in 2 projects: NRELab s Antidote and Eclipse Che.
Antidote is the software that powers NRELabs, a labs platform for learning network automation, which runs on top of Kubernetes (k8s). The interesting thing is that for each learner, there can be a dedicated k8s namespace with multiple virtual nodes running on a separate network. This can be used in the context of virtual classes/labs where our students will perform network labs in parallel on the same cluster.
Eclipse Che powers Eclipse on the Cloud , making available software development environments, for developers, on a Kubernetes Cloud. Developers typically work from a Web page instead of installing local development tools.
Both projects seem quite complementary. For one, we both teach networks and software developments. So that would naturally appeal for many professors.
Furthermore, Eclipse Che provides a few features that Antidote is lacking : authenticating users (with keycloak), and persisting their work in workspaces, between work sessions. Typically what we need in our academic context where students will work on the same labs during scheduled classes, week after week, during or off-hours.
Thus it would be great to have more integration between the 2 environments.
I intend to work on that front, but that takes time, as running stuff on Kubernetes isn t exactly trivial, at least when you re like me and want to use a vanilla kubernetes.
I ve mainly relied on running k8s inside VMs using Vagrant and/or minikube so far.
A first milestone I ve achieved is making sure that Antidote and Eclipse Che aren t incompatible. Antidote s selfmedicate script was actually running inside a Vagrant VM, where I had difficulties installing Eclipse Che (probably because of old software, or particular networking setup details). I ve overcome this hurdle, as I m now able to install both environments on a single Kubernetes VM (using my own Vagrant setup).
Running Eclipse Che (alongsite Antidote) on a k8s Vagrant VM.
This proves only that there s no show stopper there, but a lot of work remains.
Stay tuned.
Update: I ve finally managed to get it to work on the antidote-selfmedicate base too. See my branch at: https://github.com/olberger/antidote-selfmedicate/tree/che
I have been quite absent from Debian stuff lately, but this increased since COVID-19 hits us. In this blog post I'll try to sketch what I have been doing to help fight COVID-19 this last few months.A vast majority of Covid pneumonia patients I met had remarkably low oxygen saturations at triage seemingly incompatible with life but they were using their cellphones as we put them on monitors. Although breathing fast, they had relatively minimal apparent distress, despite dangerously low oxygen levels and terrible pneumonia on chest X-rays.
![]() |
| MoSimPa's monitor main screen |
![]() |
| Plots of a patient's data |
![]() |
| Alarm thresholds setup |
![]() |
| ABM main screen |
![]() |
| ABM internments view |
Next.