News for hackers. Stuff that matters.
Re:“It's The Future” by IshKebab on Wednesday August 17, 2016 @08:58AM (#12304280)
How often do you actually need to do that. 99% of `foo | bar` command could easily be `foo > a && bar < a` which is pretty trivial to do in Python.
Re:“It's The Future” by mbrock on Wednesday August 17, 2016 @09:04AM (#12304329)
Well, how do you write that in Python?

I'm curious because these simple things that are delightfully easy in bash often turn out to be surprisingly tedious in other languages.

Of course, some things are tedious in bash too. But a basic principle of shell scripting is that you call other programs to do the stuff you don't want to do in shell.

Re:“It's The Future” by IshKebab on Wednesday August 17, 2016 @10:20AM (#12304878)
Like this: http://stackoverflow.com/a/1996540

I agree it is tedious, but to be honest, reading and writing to stdin/out isn't something that would commonly need to be done in a robust system. If the world were perfect you would use library functions.

I definitely think there is scope for a language that works well as an interactive shell, and as a general purpose language. They have somewhat conflicting constraints but I'm sure we can do better than Bash. Have you seen how [ is implemented?

Re:“It's The Future” by mbrock on Wednesday August 17, 2016 @11:09AM (#12305266)
No stdout or stdin for robust systems? I disagree.

Yeah, a nicer shell-like language would be cool. I've been thinking about it for a while.

Bash is quirky but it gets a lot of stuff right and once you understand it it can be extremely ergonomic and productive.

And not depending on language run times other than shell can be really glorious in some situations, too...

Re:“It's The Future” by prodigal_erik on Wednesday August 17, 2016 @02:47PM (#12307246)
Now you have to clean up 'a'. And decide whether /tmp or /var/tmp or a dir on some other filesystem has enough space to hold all of 'a' until 'bar' is finished. Is it a security problem that other processes could snoop the contents of 'a' or even tamper with it?