Profile for q66

Display name
nina 🔜 39c3 📞 N1NA (6162)
Username
@q66@gts.q66.moe
Role
admin

About q66

Fields

website
https://q66.moe
irc, matrix
q66, @q66:matrix.org
xmpp
me@q66.moe
signal
@q66.66
age, pronouns
32, she/her
hrt
2025/01/30

Bio

early-30s czech girl currently living in galicia (the one north of portugal)

awkward and shy, craves interaction but afraid of people, soft and cuddly when comfy

may make cat noises

trans, pan, polyam

leftist, disappointed with the world but wanting to be her best self anyway

maybe into computers (especially fun non-x86 ones), but rarely techposting nowadays

made chimera linux (@chimera)

into baking (cooking too but a bit less), photography, audio things, trains, classic cars, motorcycles, anime, cute things, ...

webkitten at @igalia

moved from @q66

personal posting on followers-only so beware of that

followers will be subject to a basic vibe check (have a non-empty profile and don't be obviously malicious)

Stats

Joined
Posts
2613
Followed by
685
Following
152

Pinned posts

jump to recent

Recent posts

probably not unexpected but still pretty funny to me

i went to my desk at work to charge my phone a bit and i do not have a standard charger here because i have a stationary thunderbolt dock, which has a monitor connected to it as well as ethernet and sometimes keyboard and mouse

well i connect it and uh… the phone appears on the monitor

i disable mobile data and wifi and it still has network, and ethernet settings appeared in the menu, with network configuration and all

and the keyboard and mouse both work (even gestures that would normally be touch do)

i guess my expectations of ios for this kind of thing were not very high so it took me by surprise a little

posix (and other) shell crimes
Toggle visibility

btw, here is a fun cursed thing about behavior of the `command -v cmdname` in unix shells

so, posix specifies that `command -v somename` will resolve somename and print its path and return 0 if it can, else fail; shells in general follow this specific case correctly

the fun starts when you pass any extra arguments to it

let's start with the helpful one, which is dash:

it resolves the first argument, following the posix behavior, ignoring any further arguments; this is helpful because it lets you check if a particular commandline will execute (e.g. linux kernel build system relies on this because they check `command -v $(CC)` in their kbuild, and CC may contain arguments)

now, for the slightly less helpful one, freebsd sh (but not chimera sh because we switched to dash behavior):

if you pass extra arguments, it will error with incorrect number of arguments

this may be less helpful but is completely compliant and at least provides behavior that is consistent

let's move on to... bash! (is @domi aware of this?)

according to bash's own documentation, it should behave like dash; they specify one command, and extra arguments to it, and say command is checked

in practice, something more cursed happens; each token passed after -v is checked as if it was a separate command, any that resolve are printed on their own line, and if *at least one* resolves, you get a zero returncode; that means if you have a non-existent command and an argument list where any of the arguments may qualify as a valid command, you will get a zero retval, and potentially a spurious executable path

the ksh (oksh, mksh, etc.) family is also fun:

they behave basically like bash, resolving each token as a command and printing each that resolves, but only up until the first one that does *not* resolve; if any does not resolve, you get 1 returncode (unlike bash, where all have to not resolve to get 1 returncode) and it stops checking after the first one that does not resolve (even if the following ones do)

zsh, which is not a posix shell, behaves similarly; it will however resolve all commands, even after a non-resolvable token, though it also needs all of them to resolve to return 0, just like the ksh family

the fun part is that all these behaviors still follow posix in their core...

just got a call from the registry office that they have my new birth certificate again and i can pick it up from tomorrow (which means monday because flying there this weekend)

am government certified girl now :neocat_floof_happy:

a conversation that started like "at least the fascists did not get the ministry of the interior" turned into a joke about "ministry of interior design" which then took a scary turn because all the stuff we came up with that they could do just sounds unsettlingly plausible

gosh linux low level api is so silly

someone has decided that you can't really treat symlinks the same as other files (eg they have no permissions unlike e.g. bsds, so no chmod for you, though they have an owner and modification time)

which means O_NOFOLLOW passed to open() on linux errors out when given a symlink

but that would break a lot of things so you can get a descriptor with the combo of O_NOFOLLOW and O_PATH

but O_PATH file descriptors are limited in functionality so you can't do e.g. that chown or futimens on them, and since linux unlike other systems can't get non-O_PATH symlink file descriptors, what do?

take the *at functions like fchownat, which normally can't operate on O_PATH file descriptors because those are normally limited to purely descriptor level operations, and allow them to do so

how? add a new flag AT_EMPTY_PATH, pass an empty string as the path argument, and the file descriptor you want to operate on as the directory descriptor

so...

fchown(fd, uid, gid) == can't work with O_PATH

fchownat(fd, "", uid, gid, AT_SYMLINK_NOFOLLOW | AT_EMPTY_PATH) == can

i can't even imagine what kind of clusterfuck it takes to implement this at the low level, but it just feels pretty gross and like a violation of what O_PATH is supposed to do in the first place?

so i released chimerautils 15 and went a bit out of the way with extra goodies not present in upstream

so on top of all the stuff that freebsd 15 brings (which is already a lot of stuff people have been missing like -printf support for find(1) and much enhanced cp(1) with longopts and whatnot) we have a bunch of downstream things too:

- support for %q in printf(1) like gnu (like %s but shell-quotes it)
- support for -a/--arg-flag in xargs (read input from given file instead of stdin, preserve stdin for the thing it executes)
- atomic file swap with `mv -x`
- `command -v` shell builtin now ignores additional arguments like dash (and bash in theory but bash's behavior here is wonky and differs from its own documentation)
- ls(1) will now print entries it has failed to stat with ENOTCONN or EIO (in detailed listing mode, question marks will display in place of infos it could not fetch, like gnu ls does)

counterparts is such a good and underappreciated rush album

most people (tbf often rightfully) think prog rock and expect a bunch of elaborate semi unlistenable wank

this one is one of those i keep coming back to, it's still elaborate and neat but also very accessible and pretty much every track is good

fun, so the freebsd 15-based cp(1) started to consistently treat trailing slashes at the source, which was the whole reason why porting it was such a pain with the openat2 and whatever

basically what it means in practice is that (note the trailing slash at src/)

```
$ cp -R src/ dst
```

will effectively merge src and dst (any overlapping files get overwritten, including in subdirs, while missing stuff gets copied)

i guess this has been consistent with behavior of other bsd tools

i can potentially see this being kinda confusing to some people

otoh, it means you can merge dirs without needing rsync (which has the exact same slash behavior actually; gnu cp or busybox or whatever does not have any such functionality), which is kinda neat?

>be having a call with girlfriend in bed for the past hour and a half and it's around 3am
>we are talking about a topic
>become really eepy at this point so apparently i smoothly transition to sleep without realizing
>suddenly wake up
>"yeah you sounded asleep for the last 5 minutes"
>"so what were we actually talking about"
>is something entirely different than my brain made up
>try to recall what my brain made up; realize i can't

can we like, take 90% of the cars going through this city and make them disappear

the evening traffic is ridiculous and it's particularly "comfy" to wait for a bus in the rain while it's hopelessly stuck with everyone else moving their sole ass in a car

"this is a reasonable default state, this is how it should be, i want this" statements dreamed up by the utterly deranged

me this morning: "hmm, guess i'll rebase chimerautils on freebsd 15 today"

little did i know that this wasn't going to be very simple

a lot of the code in cp(1) now relies on AT_RESOLVE_BENEATH passed to all the f*at functions which linux doesn't have

it does have RESOLVE_BENEATH in the low level openat2 syscall (not exposed to libc) which is supposedly the same, maybe i could do an icky thing and obtain a file descriptor with direct openat2 syscall and then instead of like fchmodat do an fchmod on that as a special case with that flag

this will only work on kernel 5.6+ but then chimera doesn't really support anything older than 5.10