[ / / / / / / / / / / / / / ] [ dir / 2hu / asmr / egy / m / strek / vore / vp / zoo ][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

File (hide): 5f993f3327b531f⋯.png (256.19 KB, 1000x1000, 1:1, shells.png) (h) (u)

[–]

 No.837971>>840842 [Watch Thread][Show All Posts]

 No.837976>>837978 >>837981 >>840987

If your shell's performance matters you've probably fucked up and shouldn't be using a shell in the first place.


 No.837978

File (hide): d8743ff55d2c99d⋯.jpg (24.06 KB, 403x433, 403:433, autismAnime.jpg) (h) (u)

>>837976

It matters because autism


 No.837981


 No.837998>>840687

File (hide): 8a054715756c9a1⋯.png (24.97 KB, 226x323, 226:323, picrelated.png) (h) (u)

I've been playing around with using ksh as an interactive shell. its tab completion is really comfy, with it putting the options in a pretty little numbered list, and you can type the numbers and press tab again to have it autocomplete that option.


 No.838108>>838124

Never write shellscript.


 No.838124>>840698

>>838108

Said no one ever


 No.840687>>840690

>>837998

You realize that is not ksh doing that but an argument of `ls` that ksh's default conf file probably aliases `ls` to, right?


 No.840690>>840691

>>840687

Actually it is ksh because I re-aliased it to ls --color=auto and it still does this.


 No.840691>>840695 >>840755 >>840981

>>840690

So ksh fucks with the default output of programs? You know what I call that? (((BLOAT)))


 No.840695

>>840691

the fuck are you talking about?

this is just how ksh does its tab completion

according to the benchmark the entire thread is based on, ksh is still faster than almost all other shells, even mksh


 No.840698>>840809 >>841490

>>838124

Everyone after the '90s had learned to avoid it and switched to languages like perl and python. I don't know why your generation suddenly thought it was cool again. It was the original cancer in Linux.


 No.840755>>840798

>>840691

>ksh bloated

wtf, literally one of the smaller shells. I think dash is a little smaller, but it's still extremely small.

https://deftly.net/posts/2017-05-01-openbsd-ksh-tab-complete.html


 No.840769

Aw shit! Now I have to come up with some shell benchmarks because I have a joke project coming up were shell performance could actually matter.


 No.840798>>840842 >>840862

>>840755

Dash I think is way smaller. Its whole point is to make system shell scripts run super fast and light. I don't even know if you can get tab-completion for it.

(if that is possible somehow and i'm just a brainlet, I would totally check it out though)


 No.840809

>>840698

>I don't know why your generation suddenly thought it was cool again.

Steve Jobs put it in his gay OS


 No.840816>>840827 >>840830 >>840842 >>840883

/bin/sh is in POSIX, and shit like Perl and Python aren't. That's why they matter. You'd know this if you did any real sysadmin work ever, and not just diddle underage Linux distros.


 No.840827>>840842

File (hide): f4410df59b9777f⋯.jpg (188.59 KB, 850x1126, 425:563, boy.jpg) (h) (u)

>>840816

>diddle underage Linux distros.

owo?


 No.840830>>840842

>>840816

real sysadmin here.

10k+ servers.

Perl and Python (and worse stuff) is on literally every one of them. Perl and Python are what we use instead of sh for anything beyond the tiniest and simplest of scripts. POSIX? who cares? We have CentOS and a lot of default stuff. If you're going to cut deeper than that you may as well work with a unikernel instead.


 No.840842>>840849

>>837971 (OP)

I switched to dash because of this thread. Thanks OP.

>>840798

Dash doesn't have tab completion. Just keep bash on your system so you can switch to it if you forget a command or need to use bash only scripts.

>>840830

Just because you do it that way doesn't make it the right way or best way. Some might only want performance say a dash shell over cross-platform say two million perl scripts and system dependencies thereby increasing disk bloat and proccessing bloat/time, but I don't know how perl translates commands to assembly so I couldn't speak about that.

>>840827

Get out now.

>>840816

Perl and python have use cases in cross-platform work you faggot.


 No.840849

File (hide): 02df67221d14f09⋯.png (734.1 KB, 1024x1651, 1024:1651, _cm__halfbody___sammy_shot….png) (h) (u)

>>840842

>I switched to dash because of this thread. Thanks OP.

You're welcome! Glad I could help!

>Dash doesn't have tab completion

For an interactive shell, this is a dealbreaker for me. I'll be using either ksh93 or busybox ash.

>Get out now.

You cant make me!


 No.840862>>840865 >>840884

>>840798

I looked into it, appears to be about 25% smaller as far as sloc goes. Pretty impressive, but like you mentioned lacking some features.

Just a note, everyone should keep a eye on oil shell, it's still in development but making some serious gains and might very well one day be able to compete with the best.

https://www.oilshell.org/


 No.840865

File (hide): 7f30ffee4c07cea⋯.jpg (203.12 KB, 802x854, 401:427, 7f30ffee4c07ceafdd6103e054….jpg) (h) (u)

>>840862

>(((dreamhost.com)))


 No.840874>>840881

Fish works nice enough for me. Sensible defaults and very little work to configure.


 No.840881

>>840874

Just came to post about fish and you beat me.


 No.840883>>840896

>>840816

>POSIX

Hello time-travelling '90s dude. Welcome to the future where the UNIX wars have ended with several free *NIXs running the show and "Linux compatible" has replaced "POSIX". You no longer have to worry about SunOS 4's fucked up awk or HP/UX's fucked up everything! Even Windows now supports a Linux compatible API, and you can cross-compile to Mac with almost no effort. You can even run your OS/360 stuff under Hercules!


 No.840884

>>840862

dash is still dog slow and as most non-trivial scripts are filled with gnuisms it requires a heavy amount of porting to work with it. I'd recommend spending that effort on a python conversion instead as you'll have the same issues with binary data, error handling, process management, etc. in dash.


 No.840890>>840893

>busybox ash

Deprecated by busybox hush.


 No.840893>>840901

>>840890

?

Are they replacing the shell again?


 No.840896

>>840883

Everybody uses "POSIX" as *BSD/Linux(glibc) nowadays, though.


 No.840901

>>840893

It's just their smallest bourne compatible shell.


 No.840981

>>840691

It shows it after you press TAB, not ENTER. At this point ls didn't run yet.


 No.840987

>>837976

This. Worrying about shell performance is like worrying about the strength of duct tape: if it really matters then you are using the wrong tool.


 No.840990

>all this autism over "minimalism"

zsh with grml-zshrc here. Literally best. oh-my-zsh is cancer.


 No.841004

Ksh93 is under a better license too.


 No.841490>>841522

>>840698

assuming you're not a troll Why exactly? I use shell scripts a lot for maintenance, administration, backups, etc. Is there really that good of a reason to switch when everything just works?


 No.841522>>841527

>>841490

>everything just works

Not everything works, though. It's extremely easy to write shell scripts that fail in edge cases.

Do all your shell scripts survive encounters with filenames with a leading dash?


 No.841527

>>841522

That's easy to solve, though. Anyway Perl (arguably an awk replacement) and Python can't replace the shell; they're not supposed to be the token-based executable glue language that sh is.

Now, you could make a really good shell, but you'll have to make big amends to POSIX (\0 instead of \n as a delimiter EVERYWHERE).




[Return][Go to top][Catalog][Screencap][Nerve Center][Cancer][Update] ( Scroll to new posts) ( Auto) 5
37 replies | 5 images | Page ?
[Post a Reply]
[ / / / / / / / / / / / / / ] [ dir / 2hu / asmr / egy / m / strek / vore / vp / zoo ][ watchlist ]