Sydney, Australia

Font nerd, photo nerd, Linux nerd, Python nerd, web nerd. I make great toasted-cheese sandwiches

  • 2018-03-14T23:12:08Z via Web To: Public CC:

    I was trying to write a portable sed script recently, and POSIX basic regexes are the worst, so I figured I'd use POSIX extended regexes instead. The GNU sed manpage says "The -E option switches to using extended regular expressions instead; the -E option has been supported for years by GNU sed, and is now included in POSIX." so that's obviously the thing to use.

    In code-review I got pulled up because -E is not listed in the POSIX sed specification. Stack Overflow points to an issue in the POSIX issue-tracker where -E was added to the spec, but although the issue was resolved in 2012, the change is still not present in the 2016 edition.

    So, that's a friendly heads-up to not trust the GNU sed manpage.

    Claes Wallin (韋嘉誠), AJ Jordan likes this.

    AJ Jordan, AJ Jordan, AJ Jordan, AJ Jordan shared this.

    So... the POSIX spec moves fast, huh? =)

    JanKusanagi at 2018-03-14T23:31:35Z

    AJ Jordan likes this.

  • 2018-03-06T06:45:41Z via Web To: Public CC:

    Trying out this "standing desk" thing.

    On top of my coffee table, I have the step-ladder I use for changing lightbulbs and reaching tall shelves, then on top of that I have a bunch of books and then my laptop on top of that. It's a bit of a mess, but it's nice to have a sterner alternative to the lounge or my regular desktop.

    I hope the laptop doesn't fall off from there xD

    JanKusanagi at 2018-03-06T13:16:16Z

  • 2018-02-23T08:25:08Z via Web To: Public CC: Followers

    I'm working on a hobby Rust project with a bunch of plain-old-data records that somebody might plausibly want to store in a hashmap/dict or set, which means each item needs to be hashable, and the hash needs to be stable. In Python, making an item hashable is easy, but making the hash stable is hard, since Python doesn't really provide immutability, and the next-best-thing involves writing a lot of ugly getter functions. Meanwhile, Rust doesn't even understand immutability at all: if you own it and it has public fields, you can mess with them to your heart's content.

    Turns out, Rust's got this covered: when you stick your data record into a hash-based collection, the collection takes ownership and will only hand out read-only references, so even if you own the collection you can't modify the items inside it. And I didn't even have to write a single getter function.

    Charles Stanhope, AJ Jordan, Claes Wallin (韋嘉誠) likes this.

  • 2018-02-14T09:34:58Z via Web To: Public CC:

    Is there some website like imgur but for hosting SVGs instead/in addition?
  • 2018-01-05T08:46:00Z via Web To: Public CC:

    Today's the 5th of January, and I saw chocolate bunnies and hot cross buns in my local supermarket.
  • 2018-01-01T01:12:42Z via Web To: Public CC:

    The following packages will be upgraded: [...] seahorse-daemon
    Another entry for "Debian packages whose names are much cooler than their contents".

    McClane likes this.

    Scorpio, Scorpio, Scorpio, Scorpio and 2 others shared this.

  • 2017-12-10T09:13:18Z via Web To: Public CC:

    Today I learned: the Dire Wolf, beloved and weirdly-named antagonist of low-level Dungeons and Dragons players, is actually a real (extinct) species, Canis dirus. It wasn't nearly as big as the Monster Manual describes, being about the same size as an ordinary wolf, but it was around at the same time as the the sabre-toothed cat Smilodon fatalis—another entry in the "animals with really cool names" category.
  • 2017-12-09T04:21:27Z via Web To: Public CC:

    Apparently, a company called Lyrebird is working on technology that can analyze video and audio of a person speaking, and then use that information to produce new videos where that person says anything you like.

    As a geek, I am super-impressed; as a citizen, I'm more than a little scared.

    AJ Jordan likes this.

    Really creepy... but it was only a matter of time.

    JanKusanagi at 2017-12-09T04:25:23Z

  • 2017-11-16T05:19:44Z via Web To: Public CC:

    Sixteen minutes of limericks and doggerel about various features in and popular libraries for the Rust programming language. It's pretty adorkable.

  • 2017-10-07T10:35:13Z via Web To: Public CC:

    I don't have any production responsibilities right now, but when I did, it was always a challenge to figure out what led up to a particular failure and what might have caused it—lots of grepping of logs, and applying hard-won knowledge of all the intricate steps of whatever process had failed. Having some kind of correlator tool to automatically record that these log messages came from that process, as part of answering this query would have been great.

    The video actually goes one step further, demonstrating a system that not only finds all the details of a particular problematic query, but can find and summarize all the other queries contending for the same resources, which is amazing: usually when something fails, it's not because it actually broke, it's because some other thing changed the environment in an unforeseen way.

    Unfortunately, this is more a design pattern than an actual product (proprietary or open source), but I'm definitely going to keep it in mind the next time I have to add monitoring to something.
  • 2017-10-04T10:19:32Z via Web To: Public CC:

    The "Strange Loop" conference was held recently, and I'm picking my way through YouTube recordings of talks, looking for interesting stuff.

    Rebuilding The Cathedral talks about FLOSS maintainership. In 1999, Eric S. Raymond's essay The Cathedral and the Bazaar talked about the difference between traditional, centrally-planned software development and the amazing, egalitarian, decentralized future of FLOSS software that was about to descend. Nearly 20 years later, we know things didn't work out that way: only a tiny fraction of FLOSS projects have any kind of "bazaar" culture, and the vast, vast majority of them have only a single maintainer. The vast, vast majority of contributors only contribute once and then move on, rather than hanging around to share the maintainership load.

    Somewhat frustratingly, the talk doesn't really have any particular insights about what a "healthy" FLOSS project should look like, if not a Raymondian bazaar, or even what healthiness is, in this context. Nevertheless, I appreciated the wake-up call and I'll try to have a more open mind about what constitutes "success" for the projects I follow and whatever I might work on myself.

    Charles Stanhope, Claes Wallin (韋嘉誠) likes this.

    Scorpio, Scorpio, Scorpio and 5 others shared this.

    Here's nayafia's repo with an overview of ways of funding free software, and links to concrete examples of projects, plus case studies, for each form of financing.

    Claes Wallin (韋嘉誠) at 2017-10-05T04:21:41Z

  • 2017-09-19T09:55:25Z via Web To: Public CC:

    How to disable DRM support in your browser of choice:

    I was pleased to discover you can actually disable DRM support in Chrome, and amused to see how deeply buried it is. The phrase "bottom of a locked filing-cabinet stuck in a disused lavatory with a sign on the door saying Beware of the Leopard" springs to mind.
  • 2017-09-06T12:32:49Z via Web To: Public CC:

    If I require three items to do some task, but only have two, I would say I have "two out of three", or "2/3".

    For whatever reason, /proc/mdstat in Linux reports a degraded RAID-5 array (two working drives, one failed) as having "3/2" drives.

    This was super confusing to me, especially since I also had a RAID-1 partition on the same host that had two working drives out of two required and one spare, which I would legitimately describe as "3/2".

    I guess as a kernel interface to userspace, the contents of /proc/mdstat are set in stone and can never be changed... but I wish somebody had picked that up when the Linux software RAID feature was being reviewed.
  • 2017-08-20T06:52:57Z via Web To: Public CC:

    I wanted to answer a simple question: was Mastodon growing as fast as it was back in April, and if so, why wasn’t I seeing more friends on the service? The answer seems to be that Mastodon continues to grow, but a major engine of its growth is Japanese erotica.
    I guess this is the social medium free of central control that we asked for?

    AJ Jordan likes this.

    AJ Jordan, AJ Jordan, AJ Jordan, AJ Jordan and 2 others shared this.

  • 2017-08-02T05:05:07Z via Web To: Public CC:

    Is there such a thing as a grammar-checker I can feed Markdown into, and get GCC-style "filename:line:column:message" records out the other side?

    Claes Wallin (韋嘉誠) likes this.

    Claes Wallin (韋嘉誠), Claes Wallin (韋嘉誠), Claes Wallin (韋嘉誠), Claes Wallin (韋嘉誠) shared this.

    "Markdown implementations have diverged considerably over the last 10 years. As a result, users are often surprised to find that a document that renders one way on one system (say, a GitHub wiki) renders differently on another (say, converting to docbook using Pandoc)"

    Since there are so many different variations of Markdown that exist the first question should probably be: Which Markdown do you ask about? John Gruber's original (and unmaintained) version from 2004? GitHub's version of it? Or PHP's version of Markdown? Or Pandoc's version? Or maybe CommonMark? Or maybe one of the other variations?

    Jason Self at 2017-08-02T13:10:42Z

  • 2017-07-31T12:31:29Z via Web To: Public CC:

    A long time ago I heard that Sun was working on a JVM-based language called "Fortress" that (broadly) aimed to do to Fortran what Java did to C++... and then I never heard any more.

    Today somebody mentioned that Guy Steele gave a talk at JuliaCon 2016 called Fortress Features and Lessons Learned, and I'm finding it really interesting. Python is sometimes called "executable pseudocode" but only for programmers; apparently, Fortress was designed to be executable pseudocode for mathematicians: a mixture of programming and mathematical notations that can be used for high-performance computation or rendered as LaTeX.
    One neat idea: "juxtaposition" was an overloadable operator... in fact, two overloadable operators with different precedence. So "a[i,j,k]" is the variable "a" indexed by the tuple "(i,j,k)", while "a [i, j, k]" is "a" multiplied by the array "[i, j, k]" (assuming both those operations are meaningful on whatever type "a" happens to be).

    Screwtape at 2017-07-31T12:47:53Z

  • 2017-07-21T09:17:18Z via Web To: Public CC:

    Having given up on Sphinx, I came across MkDocs which is a similar idea, but simpler and based on Markdown instead of ReStructuredText.

    The resulting docs are a bit more primitive with respect to formatting and structure, but I still get multiple separate files stitched together into a single website, with a whole-site search feature. And it'll require less munging of my existing content, too.

    Claes Wallin (韋嘉誠) likes this.

    Given the idea of using Markdown (whichever version it is; there are so many) Pandoc may also be interesting. It supports many Markdown versions (including its own with some extensions) and can output to many formats.

    Jason Self at 2017-07-21T13:05:46Z

  • 2017-07-21T03:49:55Z via Web To: Public CC:

    I'm writing some documentation, and it started out as a simple as you'd expect... but it's grown and trying to maintain documentation in a single .md is difficult, especially when you need to start making assumptions about how the resulting markdown renderer will auto-linkify headings and such.

    I said "I know, I'll switch to a Real Documentation System, like Sphinx!" And sure enough, splitting documentation across multiple files and getting a table-of-contents and an index all for free is pretty sweet... but Sphinx doesn't make headings into link-targets at all. Which means for all the dozens of times I link between docs, I need to manually put an ID marker in front of every section header.

    That doesn't sound fun at *all*. :(

    Claes Wallin (韋嘉誠) likes this.

  • 2017-07-15T04:59:42Z via Web To: Public CC:

    I really like Identica, but every time there's an unannounced outage for a few days I wonder if maybe I should add "write my own ActivityPub server" to the end of my todo list. :/

    Timo Kankare, AJ Jordan likes this.

    Or just "install my own node" =)

    Either way, it couldn't hurt!

    JanKusanagi at 2017-07-15T13:16:25Z

    jxself likes this.

  • 2017-06-29T13:07:05Z via Web To: Public CC:

    When it comes to human-editable config and data files, XML and JSON are human-unfriendly, INI syntax is limiting and unspecified, and YAML has some nice ideas that don't scale up to medium-sized documents, le alone large ones (trust me, I've spent a lot of time wrestling with Ansible playbooks).

    So far, my favourite contender has been TOML (nearly as rich as JSON, much more human-friendly to write) but today I came across a thing called OGDL, the Ordered Graph Definition Language. The data-model is super-minimalist: the basic syntax produces an ordered tree of byte-strings, and there's an optional second pass that interprets some nodes as references back into another part of the tree to make a fully general directed graph. Since the data-model is simple, the syntax is deliciously simple too: write a word on a line, if the word on the next line has a greater indent, it's a child; if it has the same indent, it's a sibling, etc.

    I don't think I'd want to make it my standard config file format yet (for one, there's no Python library for it), but it's something I need to keep in mind for the future.

    Clacke moved to and, Charles Stanhope likes this.

    Clacke moved to and shared this.

    OGDL is interesting. It certainly seems promising for descriptions of complex objects that might refer to each other. Although, for a language intended for humans, I find it's definition of a comment a little strange and likely to lead to confusing errors (the grammar also doesn't seem to match the textual description). Also, I wonder why '#=' (more confusion for the comment character) was defined for an arc to a node instead of something like '->'.

    Charles Stanhope at 2017-06-29T14:33:53Z

    They needed a reserved character to begin a comment,  I guess they figured it would be easier to say hash-space begins a comment and hash-equals begins a reference, than to have multiple reserved characters for different purposes.

    On the other hand, I don't recall the spec describing what should happen with hash-followed-by-any-other-character, so that's a potential interoperability hazard, right there.

    Screwtape at 2017-06-30T15:14:34Z

    Claes Wallin (韋嘉誠), Clacke moved to and, Charles Stanhope likes this.