mastodon.sdf.org is part of the decentralized social network powered by Mastodon.
"I appreciate SDF but it's a general-purpose server and the name doesn't make it obvious that it's about art." - Eugen Rochko

Administered by:

Server stats:

2.6K
active users

Learn more

LdBeth

@ramin_hal9001 @screwtape let me state this: shell could benefit more from FP, but it missed the point that FP does not cover what essentially shell provided: a unified data structure interface that allows individual programs communicate with each other. In fact elv.sh/ integrates a scheme inspired fp language into shell programming and I think it works great as I uses it daily. Plan 9 rc is also a good design.

Elvish Shell

elv.sh

@ldbeth
I didn't quite get it. Is the unified data structure interface piping text around?
@ramin_hal9001

@screwtape @ramin_hal9001 the elvish shell approach is more than that, it allow pass arbitrary data structures through pipes as if they are enclosed in lazy queues and converts text streams from/to queued strings by splitting texts on newlines.

@ldbeth yes, I believe Nushell does this as well.

And I have heard of projects to add a --json flag to replacements for various GNU coreutils which make tools like ls, find, and cat output and/or consume JSON structured data so that you can use structured data in the pipelines. Programs like bat to replace cat, and ripgrep to replace grep can do this sort of thing. It is generally a good idea.

That said, in Lisp everything is structured as S-Expressions, and so that is the structured data which you can pass around between functions. I see people nowadays using JSON as a serialization format used in command line tools, it makes me think that these folks are only just now re-discovering the lost art of using homoiconic languages.

@screwtape

GitHub - nushell/nushell: A new type of shellGitHub