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.
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.
Claes Wallin (韋嘉誠) 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.
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. :(
2018-04-12T07:58:26Z via Identi.ca Web To: Public CC:Thought for the day: "Tyrannosaurus Regina"
- 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. :(
- 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!
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.