Sonotsugipaa
- 0 Posts
- 34 Comments
Sonotsugipaa@lemmy.dbzer0.comto
Programmer Humor@programming.dev•French programmers be like:English
13·1 month agoFrench people saying “water”:

Sonotsugipaa@lemmy.dbzer0.comto
Programmer Humor@programming.dev•Is Windows FOSS now?English
4·2 months ago
Sonotsugipaa@lemmy.dbzer0.comto
Programmer Humor@programming.dev•Is Windows FOSS now?English
6·2 months agoWhile I agree², their use of “steal” makes sense in the analogy because the apple doesn’t belong to the “thief”; besides, you can’t pirate an apple
Sonotsugipaa@lemmy.dbzer0.comto
Privacy@lemmy.dbzer0.com•Your ring camera is being used to abduct your neighborsEnglish
1·3 months agoRead my first comment
Sonotsugipaa@lemmy.dbzer0.comto
Privacy@lemmy.dbzer0.com•Your ring camera is being used to abduct your neighborsEnglish
4·3 months agoThat was on demand though, not passively fed to Flock
Sonotsugipaa@lemmy.dbzer0.comto
Privacy@lemmy.dbzer0.com•Your ring camera is being used to abduct your neighborsEnglish
131·3 months agoIt is a surprise to me, I didn’t know they weren’t doing it yet.
Sonotsugipaa@lemmy.dbzer0.comto
Programmer Humor@programming.dev•Oh no! Linus doesn't know AI is useless!English
572·3 months ago
Sonotsugipaa@lemmy.dbzer0.comto
Programmer Humor@programming.dev•;DR blame the devEnglish
1·3 months agoo7
I did random bullshit written on the Internet for DAYS to get my browser to use a decent file chooser, it’s harder than it has any right to be
Sonotsugipaa@lemmy.dbzer0.comto
Programmer Humor@programming.dev•;DR blame the devEnglish
2·3 months agoJust in case you have this problem with other software: it’s probably an XDG desktop portal issue, I haven’t used Sway specifically for a while but it took me a lot of trial and error to wrangle my portals into submission without using Plasma.
Sonotsugipaa@lemmy.dbzer0.comto
Programmer Humor@programming.dev•It was best as a silly toy language in the 1990's...English
203·5 months agoMore like, no true scotsman
One even recommended I take a prompt engineering boot camp

Answer: Why don’t you try searching for the question first?
Me (confused face): How tf do you think I found this page?

That’s just the average stackoverflow comment
Your description of the problem has words I’ve heard before, like “a” and “even”; marked as duplicate.
Sonotsugipaa@lemmy.dbzer0.comto
Programmer Humor@programming.dev•I_fucking_hate_them_nowEnglish
2·7 months agoI use Zsh too, though at this point is becoming detrimental to my (already limited) Bash skills because of features like the
${^array}{1,2,3}syntax which I use in some scripts of mine, which in turn I wouldn’t dare try to translate to Bash.
Sonotsugipaa@lemmy.dbzer0.comto
Programmer Humor@programming.dev•I_fucking_hate_them_nowEnglish
3·7 months agoIf the path to the dir is longer than
$HOME, say,$HOME/Tools/modding/hd2-audio-modder/wwise/v123456789_idr_but_its_a_long_one/random file name with spaces, it makes more sense.I’ll try using the braces syntax, if it does prevent word splitting I wasn’t aware of it, though it’s still slightly inconvenient (3 key inputs for each brace on my kb) and I’d probably still use quotes instead if I had to use Bash and had the file path in a variable for some reason.
… though at this point I’m probably overthinking it, atm I don’t recall better examples of my distaste for Bash expansion shenanigans.
Did some testing, here’s what I found.
Beware, it devolves into a rant against Bash and has little to do with the original topic - I just needed to scream into the void a little.# Zsh function argn { echo $#; } var='spaced string' argn $var # Prints 1: makes sense, no word splitting here var=(array 'of strings') argn $var # Prints 2: makes sense, I'm using a 2-wide array where I would # want 2 arguments (the second one happens to have # a whitespace in it)# Bash function argn { echo $#; } var='spaced string' argn $var # Prints 2: non-array variable gets split in 2 with this simple reference; # I hate it, but hey, it is what it is argn ${var} # Prints 2: no, braces do not prevent word splitting as I think you suggested var=(array 'of strings') argn $var # Prints 1: ... what? echo $var # Prints array: ... what?!? # It implicitly takes the first element? # At least it doesn't word-split said first element, right? var=('array of' strings) argn $var # Prints 2:
Upon further investigation:
# Bash mkdir /tmp/bashtest ; cd /tmp/bashtest touch 'file 1' touch 'file 2' stat file* # Prints the expected output of 'stat' called on both files; # no quotes or anything, globbing just expands into # 2 arguments without *word* splitting files=('file 1' 'file 2') stat $files # stat: cannot statx 'file' # stat: cannot statx '1' # WHY? WHY DOES GLOBBING ACT SENSIBLY WHEN ARRAYS DO NOT?I get that the Bash equivalent to Zsh’s
$arrayis${array[@]}, but making$arraybehave like it does in Bash has no advantage whatsoever.
… IS WHAT I WOULD SAY IF THAT WERE TRUE! YOU ALSO HAVE TO QUOTE"${array[@]}"BECAUSE WE LOVE QUOTES HERE AT BASH HQ!# ... continued from before stat "prefix ${files[@]}" # stat: cannot statx 'prefix file 1' # (regular 'stat' output for 'file 2')While this behavior doesn’t make much sense to me, it also doesn’t make sense for me to write that “prefix” within the quotes in the first place, right?
YES. BECAUSE SPLITTING IS NOT WHAT YOU EXPECT WHEN YOU PUT STUFF IN QUOTES.Sorry, I’ll stop.
Sonotsugipaa@lemmy.dbzer0.comto
Programmer Humor@programming.dev•I_fucking_hate_them_nowEnglish
2·7 months agoExpansion matters because using parameters without quotes automatically splits words, and IIRC a quoted array parameter can still be split into its members — as opposed to Zsh, where word splitting doesn’t happen unprompted and quoted array parameters are flattened into a single string.
Generally if I want to run
$HOME/random executable with spaces.exethrough Wine in a terminal I copy the path in Dolphin (CTRL+SHIFT+C, or CTRL+ALT+C idr) and paste it, within quotes if needed (the four extra key inputs are the annoying part).I find that much faster than manually typing
find "$HOME" -name "random executable with spaces.exe" -type x -exec wine "{}" \;, or opening an editor to insert backslashes.
Sonotsugipaa@lemmy.dbzer0.comto
Programmer Humor@programming.dev•I_fucking_hate_them_nowEnglish
19·7 months agoThey’re annoying to deal with when interactively using command-line shells, especially so when pasting unquoted and unescaped file paths, doubly especially so with Bash where parameter expansion makes no goddamn sense if you know at least one other programming language

The cruelest part is not formatting it correctly :c
#include <sys/types.h> #include <signal.h> #include <unistd.h> int main() { pid_t pid = fork(); if (pid == 0) { // Child process while (1); } else { // Parent process sleep(2); kill(pid, SIGKILL); // Force kill child printf("Child process killed.\n"); } return 0; }