@bugaevc@floss.social avatar

bugaevc

@bugaevc@floss.social

Unix hacker. I do obscure and cursed things.

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

I use GNOME, and contribute to freedesktop / GNOME projects sometimes (systemd, PipeWire, GLib, GTK, etc).

I like Rust and dislike Docker.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

bugaevc, to random
@bugaevc@floss.social avatar

Let's look into C++ 20 coroutines 🧵

I assume you're already familiar with general ideas of coroutines, async/await, and CPS / state machine transformation from other languages.

bugaevc, to random
@bugaevc@floss.social avatar

Is Linux secure?

Let me rephrase, is a huge pile of C code, running in privileged mode in a shared address space, highly concurrent, using its own homegrown memory model based on volatile instead of the one the language spec defines and the compilers implement, dealing with untrusted data, implementing many complex protocols, data formats, & functionality, managing a bunch of "objects" with complex ownership and lifetime semantics, embedding its own JIT — secure?

bugaevc, to random
@bugaevc@floss.social avatar

Let's look into virtualization on ARM

🧵

bugaevc, to random
@bugaevc@floss.social avatar

The way consoles / terminals work on the is... pretty cool, but oh boy, where do I even start

So there is the term translator, /hurd/term, that implements all the Unix tty features (like ^C sending a SIGINT). It is instances of this translator that sit on /dev/console, /dev/tty1, /dev/com1, and so on.

bugaevc, to random
@bugaevc@floss.social avatar

Hm, so the way this works is while i386 doesn't have %eip-relative addressing for data like x86_64 does (all those foo(%rip)'s), it does have a %eip-relative call instruction (though it's still rendered just 'call foo' in assembly and disassembly).

So they %eip-relative call __x86.get_pc_thunk.xx (of which there is a separate local copy in each DSO), and then they can do %eip-relative data accesses based on that.

bugaevc, to random
@bugaevc@floss.social avatar

Today's adventures:

the freshly built GTK has hideous font rendering, which is of course in stark contrast with the 😍 font rendering we enjoy over on GNOME.

So I spent hours trying altering the gtk-xft* settings (turns out they had reasonable values already) and messing with fontconfig defaults (why is fontconfig even used on Windows?),

bugaevc, to random
@bugaevc@floss.social avatar

needs to learn that Linux is not an operating system unto itself.

No really, like 95% checks for host_machine.system() == 'linux' are wrong, unless you really care about kernel specifics like Linux kernel modules. Typically what you want to check is:

  • is my compiler GCC / Clang? (use the Meson compiler object for that!)
  • is my libc (a recent enough) glibc?
  • does this system use a "freedesktop" GUI stack?
  • etc etc

have_ld_preload = ['linux', 'freebsd', 'darwin', 'dragonfly'].contains(host_machine.system()) (from cairo/meson.build) because surely glibc's ld.so checks which kernel it's running on, and only enables LD_PRELOAD if running on Linux, right?
# Linker flags if host_machine.system() == 'linux' common_ldflags += cc.get_supported_link_arguments([ '-Wl,-Bsymbolic', '-Wl,-z,relro', '-Wl,-z,now', ]) endif (from pango/meson.build) Because surely only Linux builds deserve security features like relro!

bugaevc, to random
@bugaevc@floss.social avatar

This is ld.so starting up in the second bootstrap task (future exec server!) after having successfully done an RPC to the first bootstrap task (ext2fs)!!

And that of course means the SHARED glibc build also works at least somewhat 🙂

bugaevc, to random
@bugaevc@floss.social avatar

== Notes on Mach VM object copy strategies ==

But first, what's a VM object, even? A VM object (also called a pager) is something that can be mapped into an address space. For that to happen, it must implement the memory object API, which is basically:

  • please give me the page at offset x!
  • here, have your page at offset x back, maybe write it to persistent storage or something

(but actually much more complicated than that)

bugaevc, to random
@bugaevc@floss.social avatar

As of today, the x86_64-gnu port of glibc is fully and officially upstream! 🎉

You can build it by fetching the latest Git master and running

$ ../configure --host=x86_64-gnu && make

(If you want to actually run it on today's GNU Mach, you'll need to apply a little patch: change BRK_START in x86_64/vm_param.h to 0x20000000)

Next up: seeing what it would take to build and run the Hurd itself! I already have the core libraries and servers building.

bugaevc, to random
@bugaevc@floss.social avatar

Polished up my GHurdFileMonitor implementation for glib some more & made a draft MR out of it

https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3626

bugaevc, to random
@bugaevc@floss.social avatar

So, is there a Git hosting platform that is:

• FLOSS, self-hostable
• low maintenance (e.g. uses SQLite over PostgreSQL)
• looks pretty, including on mobile
• does not promote AI, blockchain, plaintext email, Docker
• is performant, does not choke on long source files and discussion threads
• does not come with its own distribution of Ruby
• is not written in any of Go, Perl, Zig, V, Hare, Nim

?

bugaevc, to random
@bugaevc@floss.social avatar

If you're a systems developer, what could "we" do to make it easier for you to care about and test on the ? :gnu:

(I understand that you might not care about the Hurd for other reasons, but we could at least try to make this as friction-less as possible for you to care.)

There already are both preinstalled qemu images and installation isos of Debian GNU/Hurd readily available. Would perhaps adding them to osinfo-db help? Are the docs not good enough? Anything else?

bugaevc, to random
@bugaevc@floss.social avatar

I need 'git commit --llm' that would ask me a bunch of questions and then write a commit message for me based on my explanations.

Like, I fixed this complicated issue, and even though the patch itself is quite small, it takes 6 paragraphs of prose to explain what the issue even was and how it could happen.

bugaevc, to random
@bugaevc@floss.social avatar

Fun little weekend hack: can I figure out enough of Vala, Flatpak, creative XML, and libadwaita? Looks like I can 😀️

(and if you're reading this, posting still works, too!)

Tube, with overlay sidebar collapsed
Tuba, showing the back/history menu in the header bar, and the sidebar in the expanded state
Tuba at a small width, with the navigation bar at the bottom

bugaevc, to random
@bugaevc@floss.social avatar

"found pkg-config 'C:\Strawberry\perl\bin\pkg-config.BAT' but it is Strawberry Perl and thus broken. Ignoring..."

But at least I'm not running Eunice so I'm good, right?

bugaevc, to random
@bugaevc@floss.social avatar

Some things just sound less impressive to non-tech people

"Oh so you're a what, a computer programmer? So what programs have you written?"

"Well.. for instance, me and some friends all over the world, we have written our very own OS and a Browser, from scratch"

"An OS? Like iOS?" (looks at screenshots) "That looks like ancient Windows, I don't like it. Anyway, have you seen that new TV show?"

(to be clear, these are not actual quotes; but I've had several conversations that went like that)

bugaevc, to random
@bugaevc@floss.social avatar

"having started to develop in 1990, the GNU/Hurd has yet to reach version 1.0"

🙄 gosh, there we go again

Should I post a patch to bump the version to 100.0? The version number is indicative of exactly nothing.

bugaevc, to random
@bugaevc@floss.social avatar

wl-clipboard 2.2 is finally out 🎉

(took so much longer than expected! I know, right?)

Featuring the CLIPBOARD_STATE protocol, Meson wrap subprojects, user-friendly error messages, revised man page, and many bug fixes. Read the full release notes here: https://github.com/bugaevc/wl-clipboard/releases/tag/v2.2.0

If you're a packager, please update your package! If you're just a user, you can build wl-clipboard from source and still enjoy it! (And if you're a KWin developer, contact me, I'll explain what you need to fix 🙃)

bugaevc, to random
@bugaevc@floss.social avatar

Really, Mozilla?

Well, for some reason, I will not be troubleshooting what went wrong with your installer.

bugaevc, to random
@bugaevc@floss.social avatar

And this is nano :)

bugaevc, to random
@bugaevc@floss.social avatar

cursed

bugaevc, to random
@bugaevc@floss.social avatar

speaking of cursed things:

"In May 1997, Jürgen Kahrs felt the need for network access from awk"

bugaevc, to random
@bugaevc@floss.social avatar

Stop doing Flatpak

• Apps were not supposed to be distributed to end users by their developers

• Years of OSTree yet no real-world use found for referring to OS-es by their SHA256 hash

• Wanted to distribute a piece of software for a laugh? We have solutions for that, it's called "distributions"

• Yes please give me org.gtk.Gtk3theme.Arc-Darker of something. Please give me org.freedesktop.Platform.VAAPI.Intel of it — statements dreamed up by utterly deranged

🙃

bugaevc, to random
@bugaevc@floss.social avatar

To contribute to my new project, you must send patches over plain text ActivityPub. That is to say, post them as comments on Mastodon.

And if they don't fit into the 500 characters limit (per patch), then well you should've made your patches more granular; we're not going to bend the rules for you!

Don't forget to set your "email" to your Fediverse handle, like so:
$ git commit --author="Sergey Bugaev <@bugaevc>"
and watch your replies for the code reviews!

🙃

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • mdbf
  • everett
  • tacticalgear
  • magazineikmin
  • thenastyranch
  • rosin
  • tester
  • Youngstown
  • khanakhh
  • slotface
  • ngwrru68w68
  • kavyap
  • DreamBathrooms
  • megavids
  • InstantRegret
  • osvaldo12
  • GTA5RPClips
  • ethstaker
  • normalnudes
  • Durango
  • cisconetworking
  • anitta
  • modclub
  • cubers
  • Leos
  • provamag3
  • lostlight
  • All magazines