|
reminds me of that one (unconfirmed) thing that GCC does where it detects somebody trying to use the XOR swap trick and just replaces it with a SWAP instruction. I guess they probably detect a "tmp = a; a = b; b = tmp" type sequence and replace it with a SWAP already so I could believe them adding a similar pattern-match for XOR swapping too.
|
# ? Nov 2, 2014 19:55 |
|
|
# ? May 16, 2024 17:57 |
|
Kiwi Ghost Chips posted:i like systemd because anything that makes me less likely to look at bash scripts is good as a programming language bash suffers from syntax / usability issues almost as bad as applescript
|
# ? Nov 2, 2014 20:18 |
|
It's more to prevent against input like DAEMON="-n" breaking the script.
|
# ? Nov 2, 2014 20:20 |
|
Soricidus posted:it's a cargo-cult practice you'll see a lot in bad scripts. i guess some shell once had a bug where empty variables caused a syntax error even if you quoted them or something? in any case it's unnecessary in that instance and whoever wrote that did not understand why they were doing it any more than you did. If the variable in question doesn't exist you will end up with a parsing error, adding quotes fixes it in modern bash but not older ones I think. code:
|
# ? Nov 2, 2014 20:36 |
|
bash is loving terrible and i hate people who use it and then dump their unmaintainable horseshit all over u like a giant ethereal anus
|
# ? Nov 2, 2014 20:39 |
|
gently caress perl too
|
# ? Nov 2, 2014 20:39 |
|
MrMoo posted:If the variable in question doesn't exist you will end up with a parsing error, adding quotes fixes it in modern bash but not older ones I think. so how's life on the island, has john frum brought you anything nice lately?
|
# ? Nov 2, 2014 20:39 |
|
backticks or subshells huh, which one fuckers `ur -gay` $(ur -gay)
|
# ? Nov 2, 2014 20:40 |
|
pram posted:giant ethereal anus mods
|
# ? Nov 2, 2014 20:40 |
|
Suspicious Dish posted:It's more to prevent against input like DAEMON="-n" breaking the script.
|
# ? Nov 2, 2014 20:40 |
|
pram posted:gently caress perl too no, perl is nice + cool if you don't use it like an idiot
|
# ? Nov 2, 2014 20:51 |
|
lmao no
|
# ? Nov 2, 2014 20:57 |
|
although i will give perl one thing. its been dead for so long you can be sure your code will work even on ancient hpux and aix poo poo
|
# ? Nov 2, 2014 21:00 |
|
Suspicious Dish posted:It's more to prevent against input like DAEMON="-n" breaking the script. oh yes, i knew there was a better reason (and the fact that that gotcha had escaped my memory is a perfect illustration of why i've been trying to persuade people that, no, they really should be using at least perl or python or something, for the love of god please stop writing important things in ksh)
|
# ? Nov 2, 2014 21:00 |
|
well unless you used a module, good luck getting cpan to work
|
# ? Nov 2, 2014 21:02 |
|
pram posted:bash is loving terrible and i hate people who use it and then dump their unmaintainable horseshit all over u like a giant ethereal anus pram posted:gently caress perl too
|
# ? Nov 2, 2014 21:08 |
|
Mr Dog posted:reminds me of that one (unconfirmed) thing that GCC does where it detects somebody trying to use the XOR swap trick and just replaces it with a SWAP instruction.
|
# ? Nov 2, 2014 21:17 |
|
pram posted:bash is loving terrible and i hate people who use it and then dump their unmaintainable horseshit all over u like a giant ethereal anus
|
# ? Nov 2, 2014 21:18 |
|
pram posted:gently caress perl too at least perl has a debugger pram posted:although i will give perl one thing. its been dead for so long you can be sure your code will work even on ancient hpux and aix poo poo i have ported a perl codebase from 5.10 on linux to 5.6 on hpux. i will never be the same man. if you look into the abyss, the abyss looks back
|
# ? Nov 2, 2014 21:19 |
|
notorious bsd was correct on the one hand perl is cool and kinda enjoyable and does everything youd like a shell scripting language to do but is also a real language (real data structures allowed!) on the other it's a nightmarish web of weird special context dependent behaviors intended to help but sometimes they hlep you instead, a thousand different ways to do the same thing for no real good reason, cryptic syntax only larry wall could love, and constantly nagging annoyances due to the way that complex data structures were hacked into the language
|
# ? Nov 2, 2014 21:43 |
|
I don't think that systemd's rejection of scripts has anything to do with readability, it's more that scripts create subprocesses for literally everything and then don't tell the service manager which ones it needs to monitor, maybe this could have been addressed in a politically correct way by defining a protocol for startup scripts to write info back to init on stdout but none of the beards has bothered to do that in 20 years so
|
# ? Nov 2, 2014 21:47 |
|
Gazpacho posted:it's more that scripts create subprocesses for literally everything i don't understand why bash still does this
|
# ? Nov 2, 2014 21:48 |
|
Gazpacho posted:I don't think that systemd's rejection of scripts has anything to do with readability, it's more that scripts create subprocesses for literally everything and then don't tell the service manager which ones it needs to monitor, maybe this could have been addressed in a politically correct way by defining a protocol for startup scripts to write info back to init on stdout but none of the beards has bothered to do that in 20 years so smf did this, and it is/was really awesome. smf was just a process monitor. it didn't even try to replace pid 1. smf starts daemons and monitors them, that's it. systemd does about sixty things and hijacks stuff that previously worked just fine. it is complicated and a little scary and not an opt-in item. it is forced on you. people are mad about systemd because they didn't get to choose systemd. there was no positive case made. folks didn't migrate to it by choice. it just showed up one day, uninvited
|
# ? Nov 2, 2014 21:49 |
|
Kiwi Ghost Chips posted:i don't understand why bash still does this bash does it less than any previous shell. a lot of stuff that used to live in /bin is implemented as bash builtins it's just that shell scripting is an abomination. no number of builtins will ever make it a sane way to write software
|
# ? Nov 2, 2014 21:50 |
|
Gazpacho posted:I don't think that systemd's rejection of scripts has anything to do with readability, it's more that scripts create subprocesses for literally everything and then don't tell the service manager which ones it needs to monitor It's both. There's a bunch of reasons that systemd rejected init scripts.
|
# ? Nov 2, 2014 21:52 |
|
I remember when I was in college and I thought c/c++ development was the most noble calling. What I'm saying is I was p. loving stupid when I was young.
|
# ? Nov 2, 2014 21:52 |
|
supervisord still exists guys
|
# ? Nov 2, 2014 21:53 |
|
Kiwi Ghost Chips posted:i don't understand why bash still does this
|
# ? Nov 2, 2014 21:55 |
|
Gazpacho posted:Because it is a command shell i mean poo poo like command substitution causing bash to fork even for a builtin
|
# ? Nov 2, 2014 22:10 |
|
I'm sure you can find a useful explanation for the why in the commit log
|
# ? Nov 2, 2014 22:17 |
|
pseudorandom name posted:I'm sure you can find a useful explanation for the why in the commit log hahaha
|
# ? Nov 2, 2014 22:20 |
|
Notorious b.s.d. posted:smf did this, and it is/was really awesome. smf was just a process monitor. it didn't even try to replace pid 1. smf starts daemons and monitors them, that's it. Gazpacho fucked around with this message at 22:37 on Nov 2, 2014 |
# ? Nov 2, 2014 22:34 |
|
rc more like wreck haha lol
|
# ? Nov 2, 2014 22:37 |
|
Gazpacho posted:If you're going to talk complexity you better be comparing systemd to the rc system as a whole and not just to init, and as for choice well I'd consider that a consequence of not fixing what was broken in the rc system for so long yes that is the point smf fixed the rc system without the need to break logging, replace init, set up a system dbus etc etc
|
# ? Nov 2, 2014 23:05 |
|
its almost like commercial unixes were designed by competent people and not committees of mouthbreathing spergs
|
# ? Nov 2, 2014 23:08 |
|
pram posted:its almost like commercial unixes were designed by competent people and not committees of mouthbreathing spergs someone has never used AIX or HP-UX
|
# ? Nov 2, 2014 23:10 |
|
ive used both and AIX isnt bad i mean smit is good and odm is fine hpux well, itanium lol
|
# ? Nov 2, 2014 23:12 |
|
IPvSH6T posted:someone has never used AIX or HP-UX Whatever else you can complain with about AIX, properly configured it is one of the most stable and secure choices for a UNIX system.
|
# ? Nov 2, 2014 23:14 |
|
lol at describing aix or hp-ux in the present tense
|
# ? Nov 2, 2014 23:16 |
|
|
# ? May 16, 2024 17:57 |
|
uhh aix is still in a ton of places because of DB2
|
# ? Nov 2, 2014 23:17 |