Screwtape screwtape@identi.ca

Sydney, Australia

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

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


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

  • 2018-06-04T02:58:16Z via Identi.ca 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 Identi.ca 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?

    Claes Wallin (韋嘉誠) likes this.

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

    » Screwtape:

    “[...] Thanks to client-side decorations [...]”

    Yuck!

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

    Screwtape likes this.

  • 2018-05-15T13:48:54Z via Identi.ca 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.

    *sigh*
  • 2018-05-09T12:17:49Z via Identi.ca 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 Identi.ca 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, Claes Wallin (韋嘉誠) likes this.

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

    Similar to inotify-tools there's http://www.entrproject.org/ , which I love because of its minimal and very unix-philosophy interface.

    Claes Wallin (韋嘉誠) 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 Identi.ca 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, Claes Wallin (韋嘉誠) likes this.

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

    Thought for the day: "Tyrannosaurus Regina"
  • 2018-04-10T12:03:03Z via Identi.ca 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 Identi.ca 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 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.

    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 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 hope the laptop doesn't fall off from there xD

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

  • 2018-02-23T08:25:08Z via Identi.ca 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 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.
  • 2018-01-01T01:12:42Z via Identi.ca 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 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_sWHT8mo

    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 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:


    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.