Jul 112020
 

So I am currently messing around with a tiling window manager on my laptop – I prefer tiling window managers in general (I use Awesome on my main desktops). These are (in general) not “desktop environments” but just manage windows (and sometimes a “status bar”).

As it happens the window manager I’m messing with doesn’t come as part of a distribution package with a pre-prepared file for GDM3 to use. So I created a ~/.xsession file – something that has worked since display managers first arrived.

Didn’t work.

Turns out that I need to “hack” GDM3 to make a long standard bit of functionality functional again. As an aside (and especially to the GNOME people), all you had to do to keep this functional was detect if someone had a ~/.xsession file and then offer that up as a menu option. Not that difficult to do and even if it isn’t your preferred way of doing things, it’s a nice thing to do for us old-timers.

Anyway, to restore this functionality all it took was to create a file in //usr/share/xsessions/ called xsession.desktop with the following contents :-

[Desktop Entry]
Name=XSession
Comment=This session uses the custom xsession file
Exec=/etc/X11/Xsession
Type=Application
DesktopNames=GNOME-Flashback;GNOME;
X-Ubuntu-Gettext-Domain=gnome-flashback

Dead simple.

And yes I stole this and adapted it myself – I’m putting this up here so that I know where to look when I need it again.

Jul 112020
 

So the pubs have re-opened and our media is full of images of rowdy crowds busy drinking and blithely ignoring social distancing recommendations. And “more sensible” people are reacting by claiming that it was too soon to re-open pubs.

Well, … perhaps.

It was always inevitable that re-opening the pubs was going to be met with a bit of a major drinking session, but was it really as bad as it was portrayed? Whilst I do not have figures (and this anecdote only applies to one of many locations), I got the impression that Saturday night was much quieter than you might expect.

I live on a busy road that whilst does not have many drinking establishments (four plus four licensed restaurants), is often used by city centre drinkers on their way home. Saturday nights are usually quite lively, and special occasion Saturday nights can be quite rowdy. And this Saturday night didn’t seem as busy as an ordinary Saturday night.

What we do not see are the pictures of less controversial pub gatherings where social distancing is observed. Whilst the daft went out in droves on Saturday night, many people did not go out.

There are many different kinds of pubs – to give just two examples, there are the city centre “party pubs” and there are the quiet country pubs with a beer garden. And yes a pub can be more than one kind at different times.

Crowding into a busy city centre pub with lots of people on their way to getting quite sloshed is a relatively high risk activity; having a quiet drink with one or two others in a beer garden is a relatively low risk activity.

It is quite possible – indeed likely – that the daft people who went out on Saturday night are already participating in relatively high risk activities. So opening the pubs may only be increasing the risk of more infections only slightly.

And given the other side of opening pubs – business survival, jobs for those who work in pubs, and the ability of us all to pop into a quiet pub at the end of a long walk (or similar), why not?

Jul 052020
 

This is inspired by a tweet claiming that something was an example of mediæval blood libel; I remembered it being earlier than that, looked it up, and found the relevant tweet had disappeared off the bottom of the page.

So this blog posting.

The earliest reference to the blood libel in the relevant Wikipedia article was an accusation that Jews sacrificed Greeks in the temple in Jerusalem in the BCE era.

Calling this “blood libel” is mildly controversial – there are those who prefer to stick to a very specific definition which specifies christians accusing Jews. Whilst I’m fine with a definition this specific for a specific instance (“The Blood Libel”), being too pedantic prevents discussions about instances (real or theoretical) of similar accusations by other groups against other groups (“a blood libel”).

In addition, if you prohibit the use of the phrase “a blood libel” in reference to any accusations which don’t meet a specific definition too closely, it makes discussing generic blood libel accusations somewhat tricky – be too quick to dismiss the fictional accusation that atheists use the blood of neo-pagan children to make “holy bread” as not being “The Blood Libel” and you risk implying that it’s not that bad.

Whilst the Jews are a popular target for the evil ones that like emphasising the “us versus them” (frequently as a means of bolstering their own power), they are not the only target – from a Eurocentric perspective those other targets include the Romani, blacks, Irish, Asians, and immigrants of any kind.

This general demonisation of “them” isn’t any kind of blood libel of course, but it is possible that non-Jewish blood libel accusations have been made against “them” ever since religion became a source of power for priests – well before history (the written record) began, and well before the Jewish people called themselves Jews.

The blood libel is specifically a false accusation that Jews sacrifice the children of christians (or Greeks in the earliest examples) to use their blood to make a “holy bread”. Ignoring the ethnic groups, the key elements of a blood libel are :-

  1. The accusation is false (or it wouldn’t be a libel).
  2. The accusation involves blood consumption – blood has been important symbolically since forever.
  3. The religious aspect – consuming the blood is a religious act. Well, religion has been the curse blighting humanity ever since it began.

There is nothing in there that is dependent on the identity of the perpetrator or the target group (because I’ve removed it), but doesn’t it cover the essentials of a blood libel?

Being cynical about human nature, I’m pretty sure that blood libels have been around ever since religion could be used to divide us and them. Which is a good deal further back than the last 2,000 years.

None of this is meant to undermine the seriousness of the blood libel against Jews.

No Fun At The Fair

Jun 272020
 

So Apple has announced that it is replacing Intel processors with ARM processors in its Mac machines. And as a result we’re going to be plagued with awful puns endlessly until we get bored of the discussion. Sorry about that!

This is hardly unexpected – Apple has been using ARM-based processors in its iThingies for years now, and this is not the first time they have changed processor architectures for the Mac. Apple started with the Motorola 68000, switched to the Motorola/IBM Power architecture, and then switched to Intel processors.

So they have a history of changing processor architectures, and know how to do it. We remember the problems, but it is actually quite an accomplishment to take a macOS binary compiled for the Power architecture and run it on an Intel processor. It is analogous to taking a monolingual Spanish speaker, providing them with a smartphone based translator and dropping them into an English city.

So running Intel binary macOS applications on an ARM-based system will usually work. They’ll be corner cases that do not of course, but these are likely to be relatively rare.

But what about performance? On a theoretical level, emulating a different processor architecture is always going to be slower, but in practice you probably won’t notice.

First of all, most macOS applications very often consist of a relatively small wrapper around Apple-provided libraries of code (although that “wrapper” is the important bit). For example, the user interface of any application is going to be mostly Apple code provided by the base operating system – so the user interface is going to feel as snappy as any native ARM macOS application.

Secondly, Apple knows that the performance of macOS applications originally compiled for Intel is important and has Rosetta 2 to “translate” applications into instructions for the ARM processors. This will probably work better than the doom-sayers expect, but it will never be as fast as natively compiled code.

But it will be good enough especially as most major applications will be made ARM natively relatively quickly.

But there is another aspect of performance – are the ARM processors fast enough compared with the Intel processors? Well, the world’s fastest supercomputer runs on the ARM processors, although Intel fanboys will quite rightly point out that a supercomputer is a special case and that a single Intel core will outperform a single ARM core.

Except that with the exception of games, and specialised applications that have not been optimised for parallel processing, more cores beats faster single cores.

And a single ARM core will beat a single Intel core if the later is thermally throttled. And thermals has been holding back the performance of Apple laptops for quite a while now.

Lastly, Apple knows that ARM processors are slower than Intel processors in single core performance and is likely pushing ARM and themselves to solve this. It isn’t rocket science (if anything it’s thermals), and both have likely been working on this problem in the background for a while.

Most of us don’t really need ultimate processor speed; for most tasks merely the appearance of speed is sufficient – web pages loading snappily, videos playing silkily, etc.

Ultimately if you happen to run some heavy-processing application (you will know if you do) whose performance is critical to your work, benchmark it. And keep benchmarking it if the ARM-based performance isn’t all that good to start with.

And most of these tasks can be performed fine with a relatively modest modern processor and/or can be accelerated with specialised “co-processors”. For example, Apple’s Mac Pro has an optional accelerator card that offloads video encoding and makes it much faster than it would otherwise be.

Apple has a “slide” :-

That implies that their “Apple silicon” processors will contain not just the ordinary processor cores but also specialised accelerators to improve performance.

Jun 222020
 

I have a problem with serial ports (usually “virtual ones” or USB←→serial port dongles) – I have too many of them, and I usually end up with the wrong one. And selecting a TrueRNG serial port and connecting a terminal emulator to it gets very messy very quickly.

So I was searching around, semi-idly wondering if I could somehow build a device name to USB name mapping that I could stuff into rofi (or dmenu) and I discovered the /dev/serial/by-id/ which did 99% of the work for me.

So yes, I can invoke kermit and up will pop a menu allowing me to select which serial port to connect to :-

ls /dev/serial/by-id |\
  rofi -dmenu -l 20 -p "Pick a serial device" -font "mono 20"

That is the core of it, but to make it functional I need to embed it into a command line argument to kermit :-

alias kermit='kermit -C "set line /dev/serial/by-id/$(ls /dev/serial/by-id | rofi -dmenu -l 20 -p "Pick a serial device" -font "mono 20"),set carrier-watch off"'

Which is admittedly a bit of a mouthful!

But so useful if you have two or three USB to serial adopters plugged in plus a switch’s console port and a Linux widget that provides a serial console.

WP2Social Auto Publish Powered By : XYZScripts.com