A Modest Amendment

Update

The bills I discuss below were withdrawn on the 27th of February, 2017, because they faced almost certain defeat.  The issue of reform was referred to the Queensland Law Reform Commission.

Two related private member’s bills are currently before the Queensland Parliament. The Abortion Law Reform (Women’s Right To Choose Bill) 2016 removes abortion from the Queensland Criminal Code, lock stock and barrel. This is necessary, as the Explanatory Note makes clear, because “[t]he current law in Queensland is causing great hardship and personal suffering.” Further, according to Dr Carolyn De Costa, “This is the only health procedure that is dealt with like this in criminal legislation. It’s way, way out of date and belongs in the 19th century. We’re practising medicine in the 21st century.” The “Benefits of the Bill” include the following. “The Bill will repeal outdated laws that can criminalise women and doctors for a basic human right and a medical procedure…These archaic laws are dangerous and have no place in modern society where women should always have control over their own bodies. This Bill will protect vulnerable Queensland women and the doctors that are currently risking prosecution to assist them.”

Continue reading “A Modest Amendment”

find: files only with scm directory pruning

The version of find I’m discussing here is
find (GNU findutils) 4.7.0-git
I use this pattern frequently—
$ find . <conditions> |xargs grep <pattern>
to find files containing, say, a regular expression.  If the search tree contains mercurial or git directories, I usually want to exclude their contents from the search.

Continue reading “find: files only with scm directory pruning”

tikadiff: graphical diff for text from “binary” files

Code

The code is from the Downloads area of my Atlassian Bitbucket repository; see the README online.

Version Control Systems (VCSs)

VCSs like mercurial, git and bazaar (to mention only a few) are great for keeping track of changes to source files, but their utility doesn’t stop there.  If you’re working on documents in applications like Word, OpenOffice or LibreOffice, especially when you are asking others to review those documents, a VCS program can save you a lot of anguish.

However, people who work not with source code, but with research papers, academic assignments and the like, are not inclined to make themselves familiar with the tools that geeks have grown used to.  Considering how long it took for software developers to embrace those tools, it’s hardly surprising. Continue reading “tikadiff: graphical diff for text from “binary” files”

Help for digest checking

Updated 2018-02-14

It’s pretty important to check the digests of software you download.  When a downloaded file is accompanied by a signature file, for example a gnupg .asc file, you can verify the signature with various tools.  Often though, a download site will include the MD5 or SHA1 digest hash of the file, which allows a quick check on the file’s integrity.  OS X has an /sbin/md5 command, and includes the openssl distribution.  Within openssl, the digest subcommand allows for the generation of digests for an array of digest algorithms, including MD5 and SHA1.  So it’s simple enough to generate the appropriate digest for that file you just downloaded.

Comparing them is a bit tedious, though.  If you’re like me, you skim across the two digests – the one you generated and the one that the authors published – and look for eye-catching patterns near the beginning, middle and end.  That works pretty well in practice, but its hardly rigorous.

Continue reading “Help for digest checking”

Monad; that’s a wrap!

Just like everybody else who starts to look at monads, I found it was like coming to the face of a sheer cliff.  Let me qualify that: just like every other programmer who is not a mathematician (and that’s most of us).  I am looking at monads in the context of clojure, so code snippets will generally be written in clojure-like syntax.

I have found these resources the most helpful:

Continue reading “Monad; that’s a wrap!”

Schrödinger’s Baby

Ms Schrödinger is pregnant; and Ms Schrödinger is not.

Her pregnancy confirmed, she experienced joy or resignation; and she cursed the inconvenience or shrugged her shoulders.  She sought advice from her friends about obstetricians; and she sought advice about clinics and prescription drugs.  She has expectations of new life; and she has expectations of her old life. She is immersed in a whirlpool of change and growth, of ultrasound images and another heartbeat, of wonder and retching sickness, of anxiety about the future; and she has recovered the status and statis of the recent past.

Continue reading “Schrödinger’s Baby”

zargrep: grep files in a zip archive

How do you search for strings within a zip archive?

I’m tinkering with EPUB3 files, and I wanted to be able to find certain strings within .epub files, so I had a look around, and I immediately found zgrep and family. The trouble was that zgrep assumes a single zipped file, not an archive.

So, without further ado, I wrote the following script, which I called, naturally, zipgrep. It uses grep and unzip, which it assumes to be available on the PATH.  Not wanting to have to pick through the argument list, I decided to mark the end of arguments to grep with the traditional ‘‘, after which I could stack up as many zip file names as I liked.

Continue reading “zargrep: grep files in a zip archive”

Redefining marriage

Brendan O’Neill raises a point which I have never heard in the discussion before, but which I have always felt is critical. This unprecedented redefinition of the basic building block of human society rewrites the contract that the State entered into with every currently married person. How’s that for retrospective legislation? I will return to this point below.

Continue reading “Redefining marriage”

Setting environment variables in MacOS Big Sur

This method uses launchctl to manage environment variables for programs invoked directly from Finder.  See the launchctl man page, especially the section LEGACY SUBCOMMANDS.  It’s not entirely accurate, but that’s not unusual.  The critical subcommands are getenv, setenv, and unsetenv. The man page indicates that the export subcommand is available; it is not.

Continue reading “Setting environment variables in MacOS Big Sur”

Identity Theft

On the 10th of October, 2010, Natasha Mitchell interviewed Thomas Metzinger on the Australian Broadcasting Corporation’s Radio National network program All in the Mind. The show was titled You are not a self! Bodies, brains and the nature of consciousness. The ABC is the Government-financed public broadcaster in Australia. Radio National (RN) is an AM radio network dedicated to cultural and scientific topics that do not get much airplay on commercial radio. Metzinger was introduced on the programme like so:

Professor Metzinger is based at the Johannes-Gutenberg University in Mainz in Germany, and has long collaborated with neuroscientists and artificial intelligence researchers and others. And in his new book The Ego Tunnel: The Science of the Mind and the Myth of the Self he makes the case that there is no such thing as a self.

Continue reading “Identity Theft”