[ / / / / / / / / / / / / / ] [ dir / asmr / bbbb / hentai / hwndu / ita / maka / radcorp / vp ][Options][ watchlist ]

/tech/ - Technology

You can now write text to your AI-generated image at https://aiproto.com It is currently free to use for Proto members.
Name
Email
Subject
Comment *
File
Select/drop/paste files here
* = required field[▶ Show post options & limits]
Confused? See the FAQ.
Expand all images

[–]

 No.802629>>802644 >>802667 >>802686 >>802810 [Watch Thread][Show All Posts]

One shell script to rule them all

Note: This is strictly about scripting. There is no need for any debate over the best user interface, as Fish shell exists. The science is settled here. Only fish deniers on the fringe say otherwise.

Suppose we have created the ideal operating system. It is implemented in your favorite low level language with a performant implementation Ada, but now we need a scripting language to glue bits together.

If there could be only one, which would it be? Does Posix really matter to you. Do you believe in the cross-platform meme? Bourne, Bash, Ksh, Fish (as a scripting language no) or perhaps you think a general purpose language like Python, Perl or even Scheme should be used.

 No.802630>>802728

Powershell


 No.802644>>803066

File (hide): faf43f07f07ab41⋯.jpg (84.1 KB, 625x415, 125:83, 1505032907477.jpg) (h) (u)

>>802629 (OP)

>My First Fish-Price Shell

There is no need for any debate over the best user interface, as ZSH shell exists.


 No.802667

>>802629 (OP)

If I could only have one it'd probably be python. It's not the greatest scripting language, but it's versatile and can do everything I'd ever require of a scripting language on any system I'd need to use.


 No.802683>>802700

c


 No.802686>>802700

>>802629 (OP)

The ideal operating system would include the ideal scripting language (ie not fucking Python)


 No.802700>>803108

>>802686

And what would that be...?

>>802683

Even javascript wouldn't be a worse choice than C.


 No.802728>>803105

>>802630

-PowerShellIsGreat -ItsLikeWritingJavaButNowAsShellscript -StupidGnuFagsAndTheirShortCommandlines -HowWouldYouPadBillableHoursThatWay


 No.802744>>802846 >>802852

Core in Ada, Scripted in Scheme: This needs to exist.


 No.802810

>>802629 (OP)

I choose execline. The only scripting language so simple and lightweight it doesn't need a runtime interpreter. Also one of the very few good applications of continuation passing style.

https://skarnet.org/software/execline/


 No.802820

bat

I get shivers every time I read @echo off


 No.802846

>>802744

Make it happen. I'd use it.


 No.802852

>>802744

>not Core in Haskell, Scripted in Brainfuck

cuck


 No.802898>>803103

Smalltalk scripting.


 No.802906>>802911

Do you mean best besides Bash shell scripting? It's strange you would ask a question where the answer is already commonly known.


 No.802910

File (hide): 9e9fa77501e8c64⋯.gif (8.31 KB, 440x282, 220:141, high five.gif) (h) (u)

Was gonna come in here and recommend FISH but it seems OP is already a patrician of high taste.


 No.802911>>803074

>>802906

Bash is a mess, it's not the best we can do.


 No.802957>>802959

Assembly for the relevant CPU. When you press enter it's assembled and executed.

If you run a different kind of CPU the same thing happens but it's run in an emulator.


 No.802959

>>802957

LARPers leave


 No.803066

>>802644

If only it had a good scripting language


 No.803074>>803091

>>802911

We? I'm sorry were you involved an any aspect of creating ... anything?


 No.803091>>803107

>>803074

Take a remedial English course.


 No.803103

>>802898

A very interesting choice, that's a very readable language.


 No.803105

>>802728

Thanks to automatic parameter shortening in Powershell your custom parameters can be written as

-p -i -s -h


 No.803107

>>803091

I'll take this as no


 No.803108>>803112 >>803120

>>802700

The ideal scripting language doesn’t exist. Maybe the perfect operating system doesn’t even need a scripting language because every aspect of the operating system is written in a high level interpreted language that can be modified by the user on the fly. Now shoo.


 No.803112>>806798

>>803108

>high level interpreted language

Interpreted by what, the processor?

> Now shoo.

Ah, you're a weirdo as well as having no clue how computers work.


 No.803120

File (hide): dbc576d0b3f3dfc⋯.jpg (39.6 KB, 500x335, 100:67, ourlord.jpg) (h) (u)

>>803108

>Maybe the perfect operating system doesn’t even need a scripting language because every aspect of the operating system is written in a high level interpreted language that can be modified by the user on the fly.


 No.806760>>806815 >>806818 >>806830 >>807298

Right tool for the right job.

/thread


 No.806798

File (hide): ca94566c84cd4be⋯.jpg (142.15 KB, 605x474, 605:474, wizard_RESIZE.jpg) (h) (u)

>>803112

A JIT compiler


 No.806815

>>806760

> I'll just quote aphorisms and expect to get the final word.

Some tools are never right, like Perl.


 No.806818

>>806760

Sit in a corner and think about what you said


 No.806830>>806839

>>806760

Bash(also sh but not so often) and python are the best scripting languages in systems. Lua and racket/scheme are the best when embedded in programs.

zsh, csh, ksh are just hackjobs, trying to lure innocent kids into using them because of a single ,,glamorous,, feature.


 No.806839>>806864

>>806830

>Bash

Disgustingly inconsistent, you want to talk about a hack, that how bash has been extended to do more that it ever should have.

http://www.tldp.org/LDP/abs/html/string-manipulation.html


 No.806864>>806884

>>806839

Bash is good by virtue of being widely used and popular.


 No.806872

HolyC unironically


 No.806884>>806941

>>806864

As a redditor, and occasional coder, I really think we need to move the community towards convergence on Javascript. Lots of activity in that space, and quite empowering when combined with container computing like docker.


 No.806941

>>806884

>As a redditor, and occasional coder, I really think we need to move the community towards convergence on Javascript. Lots of activity in that space, and quite empowering when combined with container computing like docker.


 No.807298>>807696

>>806760

Bingo. Knowing which tool to use is almost an art in and of itself. You don't want a bunch of logic in the shell script; it should be process glue only.

On my Windows 10 development workstation, I have a lot of automation. I've got a shortcut key mapped to an AutoHotkey script launches a script selection dialog, dynamically populated by my script directory (usually .bat and powershell scripts). The scripts will re-launch themselves in Administrator mode if necessary, and then call .NET or Java executables to do any heavy lifting.


 No.807696

>>807298

>you don't want a bunch of logic in the shell script, it should be process glue only

Which is why execline is so great. The inherent simplicity of it makes process glue fast and bunches of logic slow, encouraging good scripting practice.




[Return][Go to top][Catalog][Screencap][Nerve Center][Cancer][Update] ( Scroll to new posts) ( Auto) 5
39 replies | 4 images | Page ?
[Post a Reply]
[ / / / / / / / / / / / / / ] [ dir / asmr / bbbb / hentai / hwndu / ita / maka / radcorp / vp ][ watchlist ]