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.
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.
2017-06-28T03:14:00Z via Identi.ca Web To: Public CC:I'm not stressing it particularly hard; I'm just writing documentation so I don't need much more than copy/paste and finding text by regex. Still, I'm already annoyed by the way sam has its own custom window-management system (instead of just opening multiple top-level windows I can manage with my normal window-manager), and its own custom clipboard (Both of those are true to the original Plan 9 version, although the custom-window-management thing is slightly more idiomatic there).I keep wondering how difficult it would be to try and bolt structural-regular-expression handling and multiple-cursors onto something like a GTK text-box widget...
2017-06-25T02:16:31Z via Identi.ca Web To: Public CC:Somebody on lobste.rs rhetorically asked why anyone should care if the general public finds it difficult to learn to program. After all, we nerds learned well enough without help, and the average Joe doesn't really need an algorithm to pay his rent or buy his groceries.My reply:People need to know programming for the same reason people need to know arithmetic or how laws get made: because other people already know those things, and many of those other people are quite happy to use that information to exploit people who don’t know those things. Consider how much of an advantage payday loan sharks have over people who haven’t internalised the mechanics of compound interest, or how much of an advantage organisations with professional lobbyists have over other organisations, and compare that to how much of an advantage Google and Facebook have over people who don’t understand data-mining and automated data processing in general.People really need to know programming, but it’s the kind of need that’s most obvious in retrospect, when it’s too late to do anything about.
Claes Wallin (韋嘉誠) likes this.
2017-06-18T00:55:32Z via Identi.ca Web To: Public CC:Note to self: if I'm ever making up monsters for a story or game, I should have a metallic icthyoid and refer to it as "the Silverfish, or argentuna".
2017-06-04T05:44:09Z via Identi.ca Web To: Public CC:Yesterday on Hacker News, I read an article that claimed to be an inside perspective on What Really Happened With Windows Vista. It's pretty interesting, but there was one idea that I hadn't previously encountered. A given software implementation balances functionality against the resources (time, storage, etc.) available, but both user expectations and hardware resources change over time. The article mentions two different responses to such changes:
- Hardware Supports Software: software is always complex and difficult, so if we can add complexity to the platform (OS, compiler, runtime) in a way that makes applications simpler, more reliable, more maintainable with the same level of functionality, we should. If that means spending extra hardware resources on computational overhead like runtime checks and managed code, that's a trade worth making. The article claims this was Microsoft's mindset at the beginning of Vista's development.
- Software Supports Hardware: people buy hardware to fulfil some particular function, but while some software is necessary to make it work, too much software just slows everything down. Therefore, software should be restricted to what's necessary to provide functionality, and extra hardware resources should mean everything just runs better. The article claims this was the mindset behind Apple's iOS.
Both viewpoints have merit, but they're clearly incompatible. Now that they've been pointed out, I suspect a lot of the technical discussions I've participated in over the years were at least partly based on "Hardware Supports Software" people looking at a project based on "Software Supports Hardware" ideals and boggling, or vice versa. For example, I reckon the systemd and GNOME teams are squarely in the Hardware Supports Software camp, while Software Support Hardware presumably hosts the suckless guys, and anybody who owns an Arduino.
joeyh likes this.
2017-05-26T14:31:09Z via Identi.ca Web To: Public CC:For a Python script parsing command-line arguments, it seems there's only a few candidates:
Argparse is definitely not great with subcommands, but that's the one I've settled on. I would like to try click sometime, but the framework thing is a barrier. I also would like to try Google's "fire" at some point to see where it might be appropriate to use: https://github.com/google/python-fire
- "optparse" in the standard library, which is quite limited, and besides which was removed in Python 3
- "argparse" in the standard library, which is pretty flexible, but which produces weird, un-intuitive "--help" output if you have subcommands.
- "docopt", which generates a parser from "--help" output, but traditional "--help" output glosses over a lot of details that I want to specify, like which options are valid with which commands.
- "click", which seems to support all the features I need and produce the pretty output I want, but it's a framework that takes over your program rather than a library you call into, and I find that kind of API endlessly frustrating.
2017-05-23T04:19:53Z via Identi.ca Web To: Public CC:I decided to write up the instructions for combining GNOME Flashback and i3 that I mentioned the other day, and in the process I figured out how to make them simpler, and not require root access. I'm pretty pleased with that:It's pretty nice to have fast, space-efficient i3 on my tiny laptop screen, and have the special screen-brightness and audio-volume keys Just Work.
2017-05-22T10:12:40Z via Identi.ca Web To: Public CC:Writing technical documentation, trying not to start every single paragraph with "However" or "Unfortunately" or "Luckily" or "Previously" or "Therefore".
2017-05-21T05:58:38Z via Identi.ca Web To: Public CC:The weak misanthropic principle: "humans can be hard to get along with"The strong misanthropic principle: "humans are fundamentally horrible"
2017-05-20T07:09:07Z via Identi.ca Web To: Public CC:Welp, I managed to cobble together the "GNOME Flashback" desktop with the i3 window manager, so I get convenient, automated window-management with all the GNOME goodies like handling media keys and auto-mounting USB disks.
Unfortunately, it requires dropping a bunch of files in /usr/share (GNOME components don't seem to check /usr/local/share, annoyingly) so I'm not sure how I can package up or document this to make it more widely available.
2017-05-08T06:25:03Z via Identi.ca Web To: Public CC:I love i3 for being super-light-weight and super-productive, I love GNOME for being pretty and making all the funky bits of my laptop Just Work, and I wish there was a way to make them play nice together.I still haven't found one, but I came across a gnome-shell extension called ShellTile, which lets me easily group windows side-by-side, subdivide them and resize the inner borders... a bit like panes in tmux. It doesn't have any of the keyboard shortcuts of i3 and doesn't make GNOME any lighter-weight, but it might be a nice way for GNOME users to try out the idea of a tiling WM without going all the way.
Charles Stanhope likes this.
2017-05-05T07:58:40Z via Identi.ca Web To: Public CC:I read somewhere once that the original Unix documentation was written in a style where each clause or section of each sentence got put on a separate line. The typesetter was going to re-layout the text anyway, and with line-oriented editors like ed(1) and ex(1), it was easier to retype a whole line than to edit a few words in the middle.In the modern age, nobody uses ed or ex, and reflowing a paragraph isn't hard, but having changes localised to a single line makes diffs easier to read and text-editor keyboard shortcuts are still fairly line-oriented, so there's still some benefit to the practice.But when I read back over what I've written, it's hard to avoid reading it as free-verse poetry.