2018-03-14T23:12:08Z via Identi.ca 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.
2018-03-06T06:45:41Z via Identi.ca 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'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.
2018-02-14T09:34:58Z via Identi.ca Web To: Public CC:Is there some website like imgur but for hosting SVGs instead/in addition?
2018-01-05T08:46:00Z via Identi.ca Web To: Public CC:Today's the 5th of January, and I saw chocolate bunnies and hot cross buns in my local supermarket.
2017-12-10T09:13:18Z via Identi.ca 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 Identi.ca 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.https://www.youtube.com/watch?v=YfU_sWHT8moAs a geek, I am super-impressed; as a citizen, I'm more than a little scared.
AJ Jordan likes this.
2017-11-16T05:19:44Z via Identi.ca 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 Identi.ca Web To: Public CC:Another talk from Strange Loop: The Holy Grail of Systems Analysis: from What to Where to Why.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 Identi.ca 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.
2017-09-19T09:55:25Z via Identi.ca 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 Identi.ca 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 Identi.ca Web To: Public CC:
I guess this is the social medium free of central control that we asked for?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.
AJ Jordan likes this.
2017-08-02T05:05:07Z via Identi.ca 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."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?
2017-07-31T12:31:29Z via Identi.ca 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).
2017-07-21T09:17:18Z via Identi.ca 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.
2017-07-21T03:49:55Z via Identi.ca Web To: Public CC:I'm writing some documentation, and it started out as a simple README.md 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 Identi.ca 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. :/
2017-06-29T13:07:05Z via Identi.ca 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 social.heldscal.la and datamost.com 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 '->'.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.