Sydney, Australia

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

  • 2018-12-12T08:10:18Z via Web To: Public CC: Followers

    Apparently Microsoft has finally changed the Windows 10 terminal colours from the traditional Windows 3.1 16 color palette to something a bit more readable.

    Unfortunately, GNOME Terminal doesn't exactly make it easy to set a custom palette. There's a lot of cool colour schemes in the world and a bunch of weird colour-scheme formats; it seems like there's a great opportunity for somebody to write a tool to convert between them.

    Aaaah, the wonderful world of Konsole and Yakuake 🀘

    JanKusanagi at 2018-12-12T13:05:37Z

  • 2018-11-03T04:22:47Z via Web To: Public CC: Followers

    Somebody filed a bug on a Python library I wrote ages ago, so I'm back in the Python ecosystem for a bit.

    I wanted to parse a filename from the command-line, and the standard library's argparse module has a FileType helper that does just that, and handles the "dash means stdin" convention and everything. Huzzah!

    Unless you need to read from the file in binary mode, in which case you get bitten by Issue 14156, created and a bugfix created in 2012 and not yet resolved. *sigh* ❌ likes this.

  • 2018-11-03T02:43:09Z via Web To: Public CC: Followers

    I've been on a real Coldplay kick recently. I know they're soulless pop music and (even worse) last decade's soulless pop music, but man, their first album is super-chill and easy-going and just a little bit wistful, and I keep coming back.
  • 2018-09-27T01:38:11Z via Web To: Public CC: Followers

    "cc1plus: warning: unrecognized command line option β€˜-Wno-unknown-warning-option’"

    Ah, software development. ❌ likes this.

    Well, at least in software development, the tool actually complains when there's something wrong xD

    JanKusanagi at 2018-09-27T01:47:10Z

  • 2018-09-20T23:43:25Z via Web To: Public CC: Followers

    An update on the Alacritty pasting thing: my issue got closed as a duplicate. Following links to other issues,
    • 2018-03-03: the problem is introduced (a regression)
    • 2018-05-08: the regression is reported
    • 2018-05-08: a PR is created fixing the regression
    • 2018-05-09: a concern is raised about the approach of the PR
    • 2018-05-11: the PR is updated, addressing the concern
    • up until today, four months later: crickets chirping
    Ah, open source. :/
  • 2018-09-20T04:13:08Z via Web To: Public CC: Followers

    The GPU-accelerated terminal "Alacritty" recently got updated to support scrollback, so my biggest reason for not wanting to try it out went away.

    McClane likes this.

  • 2018-09-14T08:14:51Z via Web To: Public CC:

    Currently trying out Sudo as a terminal font. I like how it's got a bit more personality than most monospaced fonts, but is nearly as crisp and compact as Envy Code R.

    McClane likes this.

    Good name, not at all confusing xD

    JanKusanagi at 2018-09-14T11:44:22Z

  • 2018-08-02T12:58:20Z via Web To: Public CC:

    I've been feeling down on myself recently because I've had all manner of programming stuff I wanted to achieve, but rarely got much done on any given day, and wasn't really enjoying it as much as I used to back in the day.

    Today I was plugging away, and to my surprise I was really getting into it - figuring out how to make things happen, trying stuff and learning. Then I said to myself "ah, but before I dive in and make changes, I should write a bunch of tests to ensure I don't cause regressions" and within twenty minutes of starting that, all my motivation had drained away again.

    I mean, I'm not going to *stop* writing tests, but maybe I need to figure out a way to interleave test-writing and fun stuff?

    Unit testing sounds like a real PITA xD

    JanKusanagi at 2018-08-02T13:42:41Z

  • 2018-06-06T06:02:49Z via Web To: Public CC:

    Spoiler: Debian comes with a lot of neat packages, and Wine is cool.

  • 2018-06-04T02:58:16Z via Web To: Public CC:

    The task-list feature in Evolution (GNOME's email client) defaults to showing both complete and incomplete tasks. There's a built-in filter to show only complete tasks, and one to show "active" tasks (whatever that means; apparently I have no active tasks), but apparently no option for "show me the list of things I need to do", so I added it myself as a custom search.

    Evolution doesn't bother to remember when custom searches are active, so every time I switch back to the "task" view, I have to choose it from the searches menu again.

    I get the distinct impression this feature is designed for a use-case I don't have, not for basic to-do tracking.
    OK, GNOME also includes an app called "gnome-todo" that reads the same task database (so all my tasks are already there), but (a) it defaults to hiding completed tasks, and (b) there's menu option for "clear all completed tasks" so right there that's a dramatic workflow improvement.

    Screwtape at 2018-06-04T03:03:53Z

  • 2018-05-23T12:34:42Z via Web To: Public CC:

    I'm trying to write a GTK+-based UI for my favourite terminal-based editor, Kakoune. Kakoune heavily uses its own completion menus, so I couldn't really use the existing GTK+ popup menus, but rather added my own that matched Kakoune's expectations.

    Under X11, this is fine and works beautifully.

    Under Wayland, well...
    • Wayland (or GDK's Wayland backend) tells every window its position is (0,0), so I can't make a menu change direction if it would pop up off the screen.
    • Wayland (or GDK's Wayland backend) always reports the full size of the monitor rather than cropping off the space used by launchers/docks/etc., so I can't prevent my menu from overlapping those either
    • Thanks to client-side decorations, when I ask "how big is my window" I get a rectangle whose origin is a little bit up and to the left of my actual drawing area, so my menu always appears a bit up and to the left as well.
    • GTK+'s built-in menus suffer none of these problems, because GDK provides a special function that does exactly what I want, but it's private and unstable so it's not listed in the documentation and I can't call it.
    I really thought that since GTK+ 3.x was declared stable, it'd be ready and complete by now. Maybe GTK+ 4 will actually work for me? ❌ likes this. ❌, ❌, ❌ shared this.

    Β» Screwtape:

    β€œ[...] Thanks to client-side decorations [...]”


    JanKusanagi at 2018-05-23T13:06:17Z

    Screwtape likes this.

  • 2018-05-15T13:48:54Z via Web To: Public CC:

    Ah, GTK+. I wanted to receive mouse-up events, so I connected a callback to the "button-release-event" event, and nothing happened. I added GDK_EVENT_BUTTON_RELEASE_MASK to my widget's event mask, and still nothing happened. Then I added GDK_EVENT_BUTTON_PRESS_MASK, and even though I didn't have a callback for it, my button-release events started firing.

  • 2018-05-09T12:17:49Z via Web To: Public CC:

    I'm guessing not a lot of people here will be interested, but just in case: if you're interested building software with Rust but the official "rustup" toolchain installer doesn't quite meet your needs, I've written a bunch of libraries to help you build your own, customised toolchain installer, and written an article that shows you how to put them together:

  • 2018-05-01T08:36:59Z via Web To: Public CC:

    You know what's super-awesome for writing prose documentation?
    • Using inotify-tools ("inotify-tools" in Debian) so that when I save a source file in my editor, the HTML version is automatically rebuilt.
    • Using livereload ("python3-livereload" in Debian) so that when the HTML version is built, it automatically reloads in my browser.
    I'd previously experienced livereload as part of the mkdocs site-building tool, but I only recently discovered that it was a separate thing I could use anywhere. Definitely making more use of this in the future.

    Ben Sturmfels, ❌ likes this. ❌, ❌, ❌ shared this.

    Similar to inotify-tools there's , which I love because of its minimal and very unix-philosophy interface. ❌ at 2018-05-02T03:58:02Z

    Screwtape likes this.

    Wow, entr looks super-handy!

    Ben Sturmfels at 2018-05-02T06:51:17Z

  • 2018-04-27T01:34:40Z via Web To: Public CC:

    So, I'm working on a software project that's important to me, where I feel I understand the problem space fairly well, and which I feel could be useful to a lot of people, so as well as working on the software itself I'm writing docs, writing blog-posts, keeping an eye out for relevant forum posts I could help with, that kind of thing... I think it'll be worthwhile, but it's pretty draining.

    On the other hand, I have a side-project that I'm not even sure I would use, I don't know the problem-space at all, and I'm unconvinced it will ever work... but I can't stop thinking about it and planning out the bits I want to explore next.

    Dammit, brain. :(

    McClane, ❌ likes this.

  • 2018-04-12T07:58:26Z via Web To: Public CC:

    Thought for the day: "Tyrannosaurus Regina"
  • 2018-04-10T12:03:03Z via Web To: Public CC: Followers

    Given how much Rust gets right about reliable, robust systems programming, I'm extremely disappointed to discover the Rust standard library does not include the relevant filename when reporting "file not found" errors. Yes, OK, POSIX doesn't report it, and Rust wants its standard library to be the thinnest portable abstraction, but goddamn, not reporting error context is one of the biggest crimes against debuggability I can think of. :(

    Evan Prodromou, AJ Jordan, Jason Self likes this.

  • 2018-04-03T06:03:47Z via Web To: Public CC: Followers

    After using the i3 window manager for several years, I finally stumbled onto the hide_edge_borders option, which lets windows butt up against the edge of the screen instead of leaving a 2px gap on every side. Apart from the minor screen-real-estate savings, this means my browser "new tab" button is always in the bottom-right corner so I can just fling my mouse at it and hit it every time.

    Yay for Fitt's Law!

    Would't it be best to just use Ctrl+T or whatever keyboard shortcut your browser uses? =)

    JanKusanagi at 2018-04-04T13:33:24Z

    Sometimes I've got my mouse in one hand and a mug of hot tea in the other!

    Screwtape at 2018-04-05T05:56:40Z

  • 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. ❌, 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