Posts

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

domi, to random
@domi@donotsta.re avatar

@puniko puniiii please fix https://fedi.absturztau.be/emoji-packs/ :neocat_pleading:

pretty thanks in advance

domi,
@domi@donotsta.re avatar

@puniko redir? –><– old packs still point to the bad url and it got me confusd

puniko,

@domi i need to rebuild my toolchain anyways so i can pack up new stuff more easily ​:neocat_googly_woozy:​

domi, to OH
@domi@donotsta.re avatar

#OH:

  • “what if we made an ISP over AC?”
  • “BGP over Avian Carrier?”
lanodan,
@lanodan@queer.hacktivis.me avatar

@domi IP over semaphores

domi, to random
@domi@donotsta.re avatar

i did not have “Linus makes a bash shitpost” on my 2024 bingo card

RE: https://donotsta.re/objects/37a2da66-6494-4f20-a6ee-615b9a5b25d5

domi, to random
@domi@donotsta.re avatar

love seeing comments like those in my code

i’m now myself (?) from the future of that future and I doubly don’t remember what that TODO was about

lanodan,
@lanodan@queer.hacktivis.me avatar

@domi # TODO (2 me from later didn't remember that todo)

domi, to OH
@domi@donotsta.re avatar

: how have you not dissolved into the floor yet

lanodan,
@lanodan@queer.hacktivis.me avatar

@domi LORE IS JAVA

domi,
@domi@donotsta.re avatar

@lanodan NOOOOOOOO

domi, to random
@domi@donotsta.re avatar

AAAAAAAAAAAAAAAAAAAAAAAAAA

lanodan,
@lanodan@queer.hacktivis.me avatar

@domi Dammit Nebraska :D

domi, to random
@domi@donotsta.re avatar

It’s again!

Being on the internet (which, I think you are right now - sorry to break the news to you :neocat_hug:), you’ve probably heard the term “cat abuse” from some reply guy. Usually it boils down to something like this:

cat a | grep meow

cat, and, by extension, the pipe, are redundant here because grep can just read a file. There are certain arguments for, and against this (i.e. when editing a regexp, it may make sense to do cat abuse, as you don’t have to scroll through the filename with each iteration); But this is not what I call cat abuse. There’s one way that’s even more cursed, but also makes some sense to use in a script.

Have you ever wanted to filter a file and send the output back into the same file, with no intermediates? Or maybe prepend a 2nd file to your first one, without creating a mess? Try this:

cat <<< "$(cat "$subtemplate" "$tmp")"" > "$tmp" 

This is taken from HTTP.sh, the templating engine to be precise. That file is kind of cursed and not necessarily good code in general, but this line is special and i’ve been reusing it in a bunch of places.

Bash pipes and redirects have a few levels of precedence. By default, if you execute cat b a > a, the a file gets overwritten before it can be read. Instead, we use a subshell in a herestring (although a herestring is not strictly necessary for this trick). A subshell always takes precedence before the redirect, thus our file can be read and written in a single command chain!

Another neat oddity is that pipes act very similarly to subshells! Similarly, that “cat abuse” from before could be rewritten to a somewhat simpler form:

cat b a | tee a
# works like you'd expect!

On the contrary, you might have noticed that it’s impossible to set a variable in a pipe chain and read it back later:

$ echo meow | read n
$ declare -p n
bash: declare: n: not found

Now, this can be solved by using a herestring! Just restructure it like so:

$ read n <<< "$(echo meow)"
$ declare -p n
declare -- n="meow"

All this can be slightly confusing, but I hope this post made it a bit simpler :blobcatheart:

domi, to random
@domi@donotsta.re avatar

you cannot spell SIGNUP without spelling GNU

domi,
@domi@donotsta.re avatar

@wolf480pl so i was searching for GNU in a shalib and that was a random string that I found

don’t ask, it doesn’t make any sense xD

lanodan,
@lanodan@queer.hacktivis.me avatar

@domi nohup my beloved. :D

domi, to random
@domi@donotsta.re avatar

sorry for DoSing your server,,, i just needed your custom emojis

i was really hungy

domi, to random
@domi@donotsta.re avatar

i wonder how much faster akkoma would be if it didn’t store JSON objects in a massive object table

i know why it’s done like this, but perf suffers soooooo baaaaadlyyyyyyy

filmroellchen,
@filmroellchen@donotsta.re avatar

@domi @linus how do they not just use fields for the common entries and put other stuff in a "rest" json blob?

lanodan,
@lanodan@queer.hacktivis.me avatar

@filmroellchen @domi @linus One of the reasons for this is how ActivityStreams doesn't have static types, so you'd need to normalise that all and never get it wrong, because then it would be migrating several gigabytes of data (or indexing 2+ fields, which sounds horrible), which would likely take days for most people given how long it even took when the change from incremental IDs to FlakeIDs was done, and those were in regular db fields.

domi, to OH
@domi@donotsta.re avatar

  • what is it?
  • floor cleaner
  • what?
  • it clears the floor
lanodan,
@lanodan@queer.hacktivis.me avatar

@domi vacuum cleaner, it cleans your vacuums.

feld,
@feld@bikeshed.party avatar
domi, to random
@domi@donotsta.re avatar

thanks to @iro_miya i’m now aware that my pronunciation of the word “quirky” is, in fact, quirky

iro_miya,
@iro_miya@mk.absturztau.be avatar

@domi @april sorry D: Tour mispronunciations are few and far in-between, it was funny that we encountered two this morning, but you otherwise speak English pretty well ​:neocat_hug_heart:​

We all had these moments, I had a very weird pronunciation of "blimey" for instance

lanodan,
@lanodan@queer.hacktivis.me avatar

@domi @iro_miya Heh, for me there's not true english prononciation.
(I even refuse that for french… where some could actually try to argue there's some kind of official versions)

domi, to random
@domi@donotsta.re avatar

"how was your trip to the Netherlands? did you see any Ghasts?"

domi, to random
@domi@donotsta.re avatar
domi, to random
@domi@donotsta.re avatar

do people really enjoy programming?

outside of isolated cases, i spend half of the time dissociating and the other time vaguely writing code

elly,
@elly@donotsta.re avatar

@domi I mean, lowlevel stuff is fun. The moment you get stuff to work you go "MY FINEST CREATION IS FINALLY ALIVE MWHAHAHAH" and stuff

domi,
@domi@donotsta.re avatar

@elly RISC-V has a lot of extensions, and while making use of them is a pain, on a core level it’s somewhat cleaner than ARM was at a few points in its life.

fwiw, if i wanted an easy assembly bytecode, i’d just go for the 6502 :blobcat3c:

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