|
Doom Mathematic posted:But why doesn't Bash check the syntax of a call to its own builtin before run time? If it's an external executable with a funny name, fine, but the builtin is right there. I suppose it would be theoretically possible to augment the grammar to check the syntax of [ commands, if someone wants to take up the task. It's just not necessary. Arguably what could be done was done with the [[ command. Gazpacho fucked around with this message at 20:37 on Oct 11, 2017 |
# ? Oct 11, 2017 20:27 |
|
|
# ? Jun 8, 2024 15:40 |
|
You should consider as well that the information needed to check "test" syntax while parsing is not necessarily "right there", since the external test command could take arbitrary computed arguments, including computed operators. You can say that's bad practice, but it's still standardized legacy behavior.
|
# ? Oct 11, 2017 21:51 |
|
reminder that if you are in a position to care about bash handling of syntax errors in [ expressions, you already hosed up. rewrite that script in an actual programming language and watch as the 1970s problems vanish!
|
# ? Oct 11, 2017 21:57 |
|
Wrap it up compileailures, Bash is as legitimate as lisp or js
|
# ? Oct 11, 2017 22:00 |
|
Soricidus posted:reminder that if you are in a position to care about bash handling of syntax errors in [ expressions, you already hosed up. rewrite that script in an actual programming language and watch as the 1970s problems vanish! which is preferable: bash scripting or nodejs scripting
|
# ? Oct 11, 2017 22:04 |
|
MALE SHOEGAZE posted:which is preferable: bash scripting or nodejs scripting jcl
|
# ? Oct 11, 2017 22:06 |
|
Gazpacho posted:Wrap it up compileailures, Bash is as legitimate as lisp or js https://www.youtube.com/watch?v=0WhuikFY1Pg
|
# ? Oct 11, 2017 22:07 |
|
MALE SHOEGAZE posted:which is preferable: bash scripting or nodejs scripting nodejs, a thousand times
|
# ? Oct 11, 2017 22:07 |
|
you're right. there is no legitimate use for lisp
|
# ? Oct 11, 2017 22:10 |
|
Sapozhnik posted:nodejs, a thousand times I would rather not have to install nodejs just for a script when Bash is built into the install.
|
# ? Oct 11, 2017 22:59 |
|
just give up on all pretense of legibility and write it in perl
|
# ? Oct 11, 2017 23:04 |
|
ratbert90 posted:I would rather not have to install nodejs just for a script when Bash is built into the install. lol if node isn't already installed on ur box
|
# ? Oct 11, 2017 23:07 |
|
akadajet posted:lol if node isn't already installed on ur box I would rather not install (extra) trash scripting languages onto my computer. You might as well ask me to run a loving PHP script. Why use node when python is a thing?
|
# ? Oct 11, 2017 23:09 |
|
ratbert90 posted:Why use node when python is a thing? (That's Node's tagline, right?)
|
# ? Oct 11, 2017 23:13 |
|
Fiedler posted:Because you're a terrible coder who only knows javascript. No, because that's implying their coders.
|
# ? Oct 11, 2017 23:18 |
|
MALE SHOEGAZE posted:which is preferable: bash scripting or nodejs scripting
|
# ? Oct 11, 2017 23:52 |
|
MALE SHOEGAZE posted:which is preferable: bash scripting or nodejs scripting lisp scripting obviously
|
# ? Oct 11, 2017 23:54 |
|
have you ever encountered a bug in bash and had to check the bash source code? i don't wish that on my worst enemies
|
# ? Oct 11, 2017 23:58 |
|
http://git.savannah.gnu.org/cgit/bash.git/log/ here's a start
|
# ? Oct 11, 2017 23:59 |
|
Looking through that, it's not so bad. Ever had to debug TI DSP kernel code? This was years ago, but when we asked for help TI said "oh yeah, the ONE engineer we had supporting that code in India left. You are on your own." This was a year after the chip was released. Edit: This was a TI DM368
|
# ? Oct 12, 2017 00:11 |
|
ratbert90 posted:Looking through that, it's not so bad. arm926 released in 2011, nice
|
# ? Oct 12, 2017 00:16 |
|
MALE SHOEGAZE posted:which is preferable: bash scripting or nodejs scripting the end of post-modern society right here
|
# ? Oct 12, 2017 00:20 |
|
ratbert90 posted:Why use node when python is a thing? WebSockets requires Python 3.4 for async coroutines, easier to target with Node until places update. That's my excuse.
|
# ? Oct 12, 2017 00:20 |
|
quote:why use anything else when Lisp is a thing?
|
# ? Oct 12, 2017 00:22 |
|
hobbesmaster posted:arm926 released in 2011, nice Yeah, and we asked for help mid 2012. TI is trash.
|
# ? Oct 12, 2017 00:24 |
|
idk where you are finding all these unreadable bash scripts but probably they are written by the same people who write unreadable code in any lang
|
# ? Oct 12, 2017 00:49 |
|
Suspicious Dish posted:have you ever encountered a bug in bash and had to check the bash source code? i don't wish that on my worst enemies i did that with freebsd's sh and added some extra documentation to the man page about one of the config options + $PS1/$PS2
|
# ? Oct 12, 2017 01:04 |
|
Gazpacho posted:idk where you are finding all these unreadable bash scripts but probably they are written by the same people who write unreadable code in any lang if someone’s going to write bad code, I’d rather they did it in a real programming language with a standard debugger and an extensive standard library and some kind of diagnostics when something goes wrong. not a shell whose idea of debugging is “print every command before it gets executed”, and which relies on spawning other processes and parsing their textual output to achieve anything, and whose idea of error handling is “maybe check exit codes some of the time, maybe some stuff might sometimes get printed to stdout and/or stderr, good luck!”
|
# ? Oct 12, 2017 01:11 |
|
hifi posted:i did that with freebsd's sh and added some extra documentation to the man page about one of the config options + $PS1/$PS2 i admit it's not ideal, but neither is it all that difficult to slurp all the patches into the VCS of your choice, as long as you have some program lying around that can generate and execute a series of Unix commands
|
# ? Oct 12, 2017 01:27 |
|
Sapozhnik posted:i'm glad YouTube Herpes is (mostly) no longer a thing and you can click "don't ever loving show me anything like this poo poo again" on its recommendations now why are you visiting youtube with cookies enabled
|
# ? Oct 12, 2017 02:48 |
|
perl and nodejs are both better than bash
|
# ? Oct 12, 2017 05:04 |
|
Gazpacho posted:he's referring to the fact that the bash maintainer doesn't use git in the Age of Git but posts diff files on the GNU download site much the same way as when it was being distributed over usenet no, i'm referring to the actual codebase. but a teaser for how bad it actually gets comes in the form of the lovely patchlevel management system the maintainer uses
|
# ? Oct 12, 2017 05:27 |
|
it def. reflects the coding practices of the period in which it was originally written and i understand that radical restructuring would be opposed in view of how system critical it is. otoh the changelog for the last release mentions fixes for issues that should never have passed code review in the first place bourne said that one of his regrets was that he never wrote a shell compiler & i wonder what it would look like to split script execution between compiling to primitives and executing them, would it be easier to verify? (note that compiling to C is not what i have in mind) Gazpacho fucked around with this message at 06:27 on Oct 12, 2017 |
# ? Oct 12, 2017 06:19 |
|
Soricidus posted:if someone’s going to write bad code, I’d rather they did it in a real programming language with a standard debugger and an extensive standard library and some kind of diagnostics when something goes wrong. this is 100% right, but consider this counterpoint: umm... umm.. fuk u i like bash
|
# ? Oct 12, 2017 16:08 |
|
*shell execs from a java app* finally programming like a grown up
|
# ? Oct 12, 2017 16:12 |
|
Notorious b.s.d. posted:perl and nodejs are both better than bash a sharp stick in the eye is better than bash
|
# ? Oct 12, 2017 16:13 |
|
Notorious b.s.d. posted:perl and nodejs are both better than bash lol, gently caress no. NodeJS is bad because it gives javascript script-kiddies the ability to gently caress up your system, not just your browser.
|
# ? Oct 12, 2017 16:15 |
|
node perl and bash all solve fake problems invented by using Linux.
|
# ? Oct 12, 2017 16:16 |
|
even java is a better scripting language than bash
|
# ? Oct 12, 2017 16:43 |
|
|
# ? Jun 8, 2024 15:40 |
|
Sapozhnik posted:even java is a better scripting language than bash lol
|
# ? Oct 12, 2017 16:48 |