Show newer

@vaporeon_ i’ve developed distaste fur bash features (to be clear, specificallyin shell scripts, not when using it as an interactive language) out of a long-held purrefurence fur writing as compatibly as i am able. so this biases my opinions;.i don’t actually know bash well enough that i feel like i could rate it fairly

i think the shell is very good at what it is designed to do. i adore it. i do think that actually writing scripts in it is usually pushing it beyond its capabilities unless the scripts are small. (but it’s GREAT at writing small scripts that are really useful!) i don’t think bash’s extra features sufficiently make up fur the shell’s deficicies at handling large scripts well so if i really wanted to use a bash feature in my script i would start considering whether i should use another language instead

the footguns are annoying as hell though, i’ve definitely exploded on weird subtle semantic things i furgot about more than once

@vaporeon_ @wallhackio i don’t bother to set up services fur packages i installed from my package manager if they already come with systemd configurations

@wallhackio @vaporeon_ the issue was only ever that systemd was not configured to restart it after it got OOM-killed, and more broadly that i had configured the various components of mastodon in such a way that the server had to deal with memory purressure in the furst place

Yes yes yes I know that having kittens around open flames is a disastrously bad idea, but this print was obviously very special to someone. It is by far the biggest one in my collection at 11 x 14 inches!

@Lady @wallhackio @vaporeon_ ftr i didn't actually end up thinking switch (true) was better and wouldn’t do it again because it’s just about equally as terrible as that

@wallhackio @vaporeon_ when was the last time you actually had to complain to me that it was broken

@wallhackio @vaporeon_ the equality check on strings in most languages with a string type is an implicit strcmp, yeah. python does this

@vaporeon_ @wallhackio you wanna see some real fucked up shit? switch (true):

  // the navbar links to every chunk of the gallery.
// the current page does not get a link.
// index 0 links to `/`.
/** @type {Node[]} */
const linksByIndex = [];
for (let i = 0; i < chunkedImages.length; i++) {
switch (true) {
case i === chunkIndex:
linksByIndex.push(li({ class: "active" }, `${i + 1}`));
break;
case i === 0:
linksByIndex.push(li({}, a({ href: "/" }, `${i + 1}`)));
break;
default:
linksByIndex.push(li({}, a({ href: `/${i + 1}.html` }, `${i + 1}`)));
}
}

not a serious take 

@wallhackio @vaporeon_

:blobmeow_sadafterreach:​ if else

:blobmeow_sadafterreach:​ switch

:blobmeow_forereach:​ map whose values are the corresponding handler to run

@wallhackio not an undergrad but purrsonally i just despise how if-elseif chains look

Show older
📟🐱 GlitchCat

A small, community‐oriented Mastodon‐compatible Fediverse (GlitchSoc) instance managed as a joint venture between the cat and KIBI families.