It's that time of the year :-) And FOSDEM is fun. But this year I won't be
going; there was a scheduling conflict, and I didn't really have anything
new to present (although I probably could have shifted around priorities
to get something).
But FOSDEM 2017 also means there's a year since FOSDEM 2016, where I
presented Nageru, my live video mixer.
And that's been a pretty busy year, so I thought I'd do a live cap
from high up above.
First of all, Nageru has actually been used in production we did
Solskogen
and Fyrrom, and both
gave invaluable input. Then there have been some non-public events,
which have also been useful.
The Nageru that's in git right now is evolved considerably from the
1.0.0 that was released last year. diffstat shows 19660 insertions
and 3543 deletions; that's counting about 2500 lines of vendored
headers, though. Even though I like deleting code much more than
adding it, the doubling (from ~10k to ~20k lines) represents a
significant amount of new features:
1.1.x added support for non-Intel GPUs. 1.2.x added support for
DeckLink input cards (through Blackmagic's proprietary drivers),
greatly increasing hardware support, and did a bunch of small
UI changes. 1.3.x added x264 support that's strong enough that
Nageru has really displaced VLC as my go-to tool for just
video-signal-to-H.264-conversion (even though it feels overkill),
and also added hotplug support. 1.4.x added multichannel audio
support including support for MIDI controllers, and also a disk
space indicator (because when you run out of disk during production
without understanding that's what happens, it really sucks),
and brought extensive end-user documentation.
And 1.5.x, in development right now, will add HDMI/SDI output,
which, like all the previous changes, requires various rearchitecting
and fixing.
Of course, there are lots of things that haven't changed as well;
the basic UI remains the same, including the way the theme (governing
the look-and-feel of the finished video stream) works. The basic design
has proved sound, and I don't think I would change a lot if I were to
design something like 1.0.0 again. As a small free software project,
you have to pick your battles, and I'm certainly glad I didn't start
out doing something like network support (or a distributed architecture
in general, really).
So what's for the next year of Nageru? It's hard to say, and it will
definitely depend on the concrete needs of events. A hot candidate
(since I might happen to need it) is chroma keying, although good
keying is hard to get right and this needs some research. There's
also been some discussion around other concrete features, but I
won't name them until a firm commitment has been made; priorities
can shift around, and it's important to stay flexible.
So, enjoy FOSDEM! Perhaps I'll return with a talk in 2018.
In the meantime, I'll preparing the stream for the 2017 edition
of Fyrrom, and I know for sure there will be more events, more
features and more experiences to be had. And, inevitably, more bugs. :-)
/samples) between to limiting values, as below:QSoas> generate-buffer -2 2By default, the values are taken equal to . However, generate-buffer also takes an optional formula to directly set the values:
QSoas> generate-buffer -10 10 sin(x)From version
2.0, it is possible to generate several datasets in a row using the /number option, and to color them using the /style option (but only since version 2.1). Each dataset is generated according to the formula, and number is a special number that starts at 0 and increases by 1 for each dataset. Here's what I used to generate the picture on the right:QSoas> generate-buffer -2 2 sin(PI*x)**(number+1) /number=30 /style=red-to-blueAbout QSoasQSoas is an open source data analysis program that focuses on flexibility and powerful fitting capacities. It is described in Fourmond, Anal. Chem., 2016, 88 (10), pp 5050 5052.
Lenovo-ThinkPad-T500 Source Wikimedia commons
What probably pissed me is the condensing note in the comment, how does he know what pressures an another individual might be in. It s almost like saying You are refugee because you made a wrong life choice or something to that effect which again is stupid.
I actually feel/felt embarrassed to bring this up as I truly am lucky to be safe, secure, have food on the table, am able to sleep on a bed at night, have a workstation AND a laptop, have somewhat of a sound mind
and a body which is able to move around without any hassles. Add to that, incredibly as it may sound, was also able to see another country for a few days
In relation to people being persecuted and having to run off to save their own lives or even people living on the streets, I am actually living in luxury. While I can t go through life feeling guilty for all the good things that have happened with me, I do feel disgusted when I see some people put blinding statements like that.
One of the biggest reasons that GNU/Linux and Debian in particular gelled with me was that it s incredibly flexible and generous. Nobody tells me which packages I should or shouldn t have. I do right things, good, I do something wrong, an opportunity to learn and hopefully learn from my mistakes. In either case, one of the most forgiving kind of system to learn and hack on.
While speaking of mistakes, could somebody look at #849684 . It almost feels like a tennis match going between the maintainers concerned. While I don t have the technical skills to ascertain who s right and who is not, it would be nice if some cooler heads can make sense and see if a way could be found out. Can somebody help ?
Debian LTS
November marked the 21st month I contributed to Debian LTS
under the Freexian umbrella. I had 8 hours allocated which I used
for:
$ ./run python examples/trip-query.py --when=21:00 Essen Gelsenkirchen
Loaded provider de_db
Start: Essen Hbf
End: Gelsenkirchen Hbf
Trip #1
Start: Essen Hbf
Departure: 2017-02-02 21:18
Delay: 0
End: Gelsenkirchen Hbf
Arrival: 2017-02-02 21:26
Delay: 0
Switches: 0
Trip #2
Start: Essen Hbf
Departure: 2017-02-02 21:22
Delay: 0
End: Gelsenkirchen Hbf
Arrival: 2017-02-02 21:33
Delay: 0
Switches: 0
Trip #3
Start: Essen Hbf
Departure: 2017-02-02 21:44
Delay: 0
End: Gelsenkirchen Hbf
Arrival: 2017-02-02 21:52
Delay: 0
Switches: 0
Working with Date, Calendar, SimpleDateFormat in Android. As I mentioned In my last blog, I would talk about how I used Calendar and Date classes for the user to designate silent mode by setting time constraints and weekdays, in Lumicall. Date class to used to interpret dates as year, month, day, hour, minute, and second values. I had to compare whether the current time falls between Start Time and End Time specified by the user. So that, silent mode can be enabled within that time frame. I used Calendar Class to get the current hour in 24-Hour format and minute.
Calendar now = Calendar.getInstance(); int hour = now.get(Calendar.HOUR_OF_DAY); int minute = now.get(Calendar.MINUTE);Now, Since the user enters the Time in EditText Widgets, the values were retrieved as strings.
SimpleDateFormat simpleDateFormat= new SimpleDateFormat( HH:mm , Locale.ENGLISH); Date currentTime = parseDate(hour + ":" + minute) Date timeCompareOne = parseDate(hhStart + : +mmStart); Date timeCompareTwo = parseDate(hhEnd + : +mmEnd);
if(timeCompareOne.before(currentTime) && timeCompareTwo.after(currentTime)) Switch on the silent mode;Added a try catch block to handle the exception which will arise if the SimpleDateFormat.parse method is unable to parse the given Java String.
public Date parseDate(String date) try return inputParser.parse(date); catch (java.text.ParseException e) return new Date(0);Comparing Time? Done!
Calendar calendar = Calendar.getInstance(); int day = calendar.get(Calendar.DAY_OF_WEEK);If it s sunday, value returned by calendar.get(Calendar.DAY_OF_WEEK) is 1, if monday, 2 and so on..
Thanks for reading,
The past few days I've been doing more arduino-work. In between dying of sleep-exhaustion.
One thing that always annoyed me was that I had to hard-code my WiFi credentials in my projects, with code like this:
//
// Connect to the SCOTLAND network
//
WiFi.mode(WIFI_STA);
WiFi.hostname("tram-clock");
WiFi.begin("SCOTLAND", "highlander1");
//
// Attempt to connect - TODO: Timeout on failure
//
while (WiFi.status() != WL_CONNECTED)
delay(500);
//
// Now we're connected show the local IP address.
//
lcd.print("WiFi connected ");
lcd.print(WiFi.localIP());
Whilst looking at another project I found a great solution though. There is a library called WiFiManager which behaves perfectly:
//
// Connect to WiFI with saved credentials, if any.
//
// Otherwise work as an access-point, named TRAM-TIMES, and
// let the user fill out their details.
//
WiFiManager wifiManager;
wifiManager.autoConnect("TRAM-TIMES");
This means my current project, which continues to revolve around tram-times, is so very much more user-friendly. It is a product you could package and take to a friends house, not a project you have to recompile to tweak.
For that reason, user-niceness, I reworked the on-board HTTP status-page to use bootstrap, be themed, and look nicer. Other than being housed in a horrid case the project actually looks like a product. Not one I'd buy, but neither one I'm ashamed of sharing.
It is a new month, and time to publish the next chapter in
Hacker Noir. This is chapter 2, titled
"Development setup phase". I hope you enjoy it. Feedback via
email, irc, identi.ca, twitter are welcome. Or come talk to me at
FOSDEM if you're there.
I got myself a bunch of Raspberry Pi 3s a short while ago:
...the idea being that I can use those to run a few experiments on.
After the experiment, I would need to be able to somehow remove the
stuff that I put on them again. The most obvious way to do that is to
reimage them after every experiment; but the one downside of the
multi-pi
cases
that I've put them in is that removing the micro-SD cards from the Pis
without removing them from the case, while possible, is somewhat fiddly.
That, plus the fact that I cared more about price than about speed when
I got the micro-SD cards makes "image all the cards of these Raspberry
Pis" something I don't want to do every day.
So I needed a different way to reset them to a clean state, and I decided to
use ansible to get it done. It required a bit of experimentation, but
eventually I came up with this:
---
- name: install package-list fact
hosts: all
remote_user: root
tasks:
- name: install libjson-perl
apt:
pkg: libjson-perl
state: latest
- name: create ansible directory
file:
path: /etc/ansible
state: directory
- name: create facts directory
file:
path: /etc/ansible/facts.d
state: directory
- name: copy fact into ansible facts directory
copy:
dest: /etc/ansible/facts.d/allowclean.fact
src: allowclean.fact
mode: 0755
- name: remove extra stuff
hosts: pis
remote_user: root
tasks:
- apt: pkg= item state=absent purge=yes
with_items: " ansible_local.allowclean.cleanable_packages "
- name: remove package facts
hosts: pis
remote_user: root
tasks:
- file:
path: /etc/ansible/facts.d
state: absent
- apt:
pkg: libjson-perl
state: absent
autoremove: yes
purge: yes
This ansible playbook has three plays. The first play installs a custom
ansible fact (written in perl) that emits a json file which defines
cleanable_packages as a list of packages to remove. The second uses
that fact to actually remove those packages; and the third removes the
fact (and the libjson-perl library we used to produce the JSON).
Which means, really, that all the hard work is done inside the
allowclean.fact file. That looks like this:
#!/usr/bin/perl
use strict;
use warnings;
use JSON;
open PACKAGES, "dpkg -l ";
my @packages;
my %whitelist = (
...
);
while(<PACKAGES>)
next unless /^ii\s+(\S+)/;
my $pack = $1;
next if(exists($whitelist $pack ));
if($pack =~ /(.*):armhf/)
$pack = $1;
push @packages, $1;
my %hash;
$hash cleanable_packages = \@packages;
print to_json(\%hash);
Basically, we create a whitelist, and compare the output of dpkg -l
against that whitelist. If a certain package is in the whitelist, then
we don't add it to our "packages" list; if it isn't, we do.
The whitelist is just a list of package => 1 tuples. We just need the
hash keys and don't care about the data, really; I could equally well
have made it package => undef, I suppose, but whatever.
Creating the whitelist is not that hard. I did it by setting up one
raspberry pi to the minimum that I wanted, running
dpkg -l awk '/^ii/ print "\t\""$2"\" => 1," ' > packagelist
and then adding the contents of that packagelist file in place of the
... in the above perl script.
Now whenever we apply the ansible playbook above, all packages (except
for those in the whitelist) are removed from the system.
Doing the same for things like users and files is left as an exercise to
the reader.
Side note: ... is a valid perl construct. You can write it, and the
compiler won't complain. You can't run it, though.
| Series: | Wayfarers #2 |
| Publisher: | Harper Voyager |
| Copyright: | October 2016 |
| ISBN: | 0-06-256942-2 |
| Format: | Kindle |
| Pages: | 384 |
$ mkdir ~/hookdir
$ ln -s /usr/share/doc/pbuilder/examples/D65various-compiler-support ~/pbuilder-hookdir
(modify your pbuilderrc as adding 1 line like below)
HOOKDIR=/home/henrich/pbuilder-hookdir
$ sudo CHOOSE_COMPILER="clang-4.0" cowbuilder --build yourpackage_1.0-1.dsc
mdoc). But while I wrote debmans in Python, debiman is written
in Go. debiman also seems much faster, being
written with concurrency in mind from the start. Finally, debiman is
more feature complete: it properly deals with conflicting packages,
localization and all sorts redirections. Heck, it even has a pretty
logo, how can I compete?
While debmans was written first and was in the process of being
deployed, I had to give it up. It was a frustrating experience because
I felt I wasted a lot of time working on software that ended up being
discarded, especially because I put so much work on it, creating
extensive documentation, an almost complete test suite and even
filing a detailed core infrastructure best practices report In the
end, I think that was the right choice: debiman seemed clearly
superior and the best tool should win. Plus, it meant less work for
me: Michael and Javier (the previous manpages.debian.org maintainer)
did all the work of putting the site online. I also learned a lot
about the CII best practices program,
flask, click
and, ultimately, the Go programming language itself, which I'll refer
to as Golang for brievity. debiman definitely brought Golang
into the spotlight for me. I had looked at Go before, but it seemed to
be yet another language. But seeing Michael beat me to rebuilding the
service really made me look at it again more seriously. While I really
appreciate Python and I will probably still use it as my language
of choice for GUI work and smaller scripts, but for daemons, network
programs and servers, I will seriously consider Golang in the future.
The site is now online at
https://manpages.debian.org/. I even got credited in the
about page which makes up
for the disappointment.
When I was younger, and worked in an "old HP" test and measurement division,
I sometimes sat at lunch in the cafeteria with a group of older co-workers
who I grew to have immense respect for. They told great stories. I learned
a lot of practical electronics from them... and other things too.
Each carried on their person a copy of the US Constitution and Bill of
Rights, and most also had a "concealed carry" permit, which they would refer
to as their "redneck license". I quickly learned that they weren't all gun
fanatics... at that time, the vetting process for such a permit was a bit
daunting, and having one was their way of "proving" that they were honest,
law-abiding citizens. Citizens who knew their rights. Who enjoyed debating
boundary conditions in those rights inspired by current events at the lunch
table. I miss those guys and those conversations.
I mention this because it's one of those things that I realize now had a
significant formative impact on my adult values and world view. Freedom
matters. That's why, despite my long-standing appreciation for and support
of the organization's activities, I'm embarrassed to admit that it wasn't
until this week that I personally joined the
American Civil Liberties Union
and sent them a donation.
Exactly on the schedule, Weblate 2.11 is out today. This release brings extended stats available to users and various other improvements and bug fixes.
Full list of changes:
demo account using demo password or register your own user. Weblate is also being used on https://hosted.weblate.org/ as official translating service for phpMyAdmin, OsmAnd, Aptoide, FreedomBox, Weblate itself and many other projects.
Should you be looking for hosting of translations for your project, I'm happy to host them for you or help with setting it up on your infrastructure.
Further development of Weblate would not be possible without people providing donations, thanks to everybody who have helped so far! The roadmap for next release is just being prepared, you can influence this by expressing support for individual issues either by comments or by providing bounty for them.
Filed under: Debian English phpMyAdmin SUSE Weblate 0 comments
My monthly report covers a large part of what I have been doing in the free software world. I write it for my donors (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
I was allocated 10 hours to work on security updates for Debian 7 Wheezy. During this time I did the following:
No comment Liked this article? Click here. My blog is Flattr-enabled.
Next.