Sergey Bugaev

@bugaevc@floss.social
1.2K Followers
275 Following
3.9K Posts

I hack on GTK / GNOME, GNU Hurd / glibc, wl-clipboard, Darling, SerenityOS / Ladybird, Owl, etc.

I like Rust and dislike Docker.

GitHubhttps://github.com/bugaevc
Pixelfedhttps://pixelfed.social/bugaevc
TZMSK / UTC+03
LINGUASru en eo

#wayback, a small project gluing together wayland components to turn Xwayland into a full X environment, is now published: https://github.com/kaniini/wayback

there's definitely a gazillion bugs, which will need work across the entire stack to solve.

however, unlike Xlibre, this is a sustainable path that is intended to reduce the number of X components in distributions.

GitHub - kaniini/wayback: experimental X11 compatibility layer

experimental X11 compatibility layer. Contribute to kaniini/wayback development by creating an account on GitHub.

GitHub

I posted this meme I made in my local hackerspace chat and immediately someone took it seriously

sobbing

#ScriptSaturday with enough alias magic, bash can have real try-catch syntax!

libsh module here; BSD-3 :)

Rust 1.88.0 has been released! ✨🎊 🦀

This release brings you let chains, naked functions, automatic Cargo cache cleaning, Cell::update, proc_macro span locations, various as_chunks methods on slices, and more!

Check out the blog post and release notes for all the details: https://blog.rust-lang.org/2025/06/26/Rust-1.88.0/

Announcing Rust 1.88.0 | Rust Blog

Empowering everyone to build reliable and efficient software.

Valgrind is an instrumentation framework for dynamic analysis tools. It translates your program into an intermediate representation (VEX). Valgrind tools (like memcheck) transform/instrument the VEX representation. Valgrind then uses classic compiler optimizations on that internediate representation. And finally the VEX is translated back to machine code.

Florian Krohm made a list of missing constant folding operations: https://bugs.kde.org/show_bug.cgi?id=506211

Take a peek if you would like to hack on Valgrind!

506211 – Constant folding improvements

Golang is unusual because in most languages the type system tells you when you made a mistake, but in Golang the type system tells you when Rob Pike made a mistake.
Thanks to the work of pioneers from #postmarketos it is actually easy to install any Linux OS on some phones. Here is #gnomeos on a OnePlus 6 that was installed through USB using systemd-repart. A few tweaks here and there, but it is almost stock GNOME OS.
And also, let me emphasize: sd_notify() is fantastic for services, but the concept is so simple and powerful, that it is also great for any other tool too. i.e. it's not just journalctl, busctl, varlinkctl that benefit from the concept, it's really any tool that can be somewhat long-running and has an initialization phase about whose completion the caller might want to know.

Naively forking off journalctl, busctl, varlinkctl won't give you this kind of synchronization. In many test scripts people work around this race by simple trying a couple of times, applying timeouts and so on.

systemd-notify --fork is here to improve things on this front. As it turns out since a while journalctl, busctl, varlinkctl will already send out sd_notify() READY=1 messages once they have established their watches. By invoking these tools via systemd-notify --fork, we can easily…

@llvm clang has __attribute__((internal_linkage)); would be great if GCC had that too
×

#ScriptSaturday with enough alias magic, bash can have real try-catch syntax!

libsh module here; BSD-3 :)

one thing I wasn’t able to do yet is multiple catch clauses for different return codes. it would be wicked cool, but I couldn’t figure out a neat syntax for it (my best attempt required a newline after catch <number>, because aliases only catch top-level grammar elements)

still! i think this might be useful to someone. :3

@domi wait, but it only actually catches if you wrap it in a subshell, otherwise it just exits the whole shell after executing the catch and finally blocks?
@wolf480pl sorry i copied the wrong snippet, it’s fixed now

@domi oh, ok.

hmm... wouldn't it make more sense to set the trap inside the subshell?

@wolf480pl required some fiddling, but done! I could move essentially everything into that subshell, but i’m gonna leave out the other functions for now for slightly better readability

@domi does that mean one can now

try (
try (
return 1
) catch (
echo catch 1
) yrt
) catch (
echo catch 2
) yrt

?

@wolf480pl jesus christ

wrong braces, but. maybe? i’m gonna check

@domi wrong braces on purpose, otherwise I'm gonna redefine _catch :(

@wolf480pl okay, nesting is broken. i tried restructuring more stuff into the subshell and it “works” but some catches get redefined as the generic one

i’ll work on it more tomorrow :)

@domi actually, my example is stupid because the correct behaviour is only "catch 1" and it's indistinguishable from the outer catch getting overwritten. I should've used finally.
@domi oh and to be clear: I'm not likely to actually use this, I'm just nerdsniping you :P
@domi i do think it's cool tho

@wolf480pl the horrifying part is that this provides enough utility that I may want to use it! and this only started as a “what if?” :D

nerdsnipes are appreciated. i don’t have anyone else do code review, so this is nice

@domi lol curly braces and try…yrt (yurt? :D)
@lanodan i was inspired by if..fi and case..esac ;)
@domi Yeah, just funny to have both curlies and if…fi styles
@lanodan yeah this part kinda sucks… but I wanted the curlies for readability, and i couldn’t figure out a way to not have a terminator keyword at the end