Our great sponsors
nushell | jq | |
---|---|---|
159 | 272 | |
22,639 | 24,098 | |
1.3% | - | |
9.9 | 2.3 | |
6 days ago | 18 days ago | |
Rust | C | |
MIT License | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
nushell
-
Why should I care wether my shell is POSIX compliant?
I've been using nushell as my daily driver shell for a while. It's still very much in development, but it's got some nice features, like Windows cross compatibility, proper data types, and syntax highlighting
-
FUSTA: quickly & easily edit, slice, 'n dice ((very) large) FASTA files
Now, I guess the deeper question is ‶is the text-based, line-delimited, pipe-oriented, interaction model between programs that don't know each other still relevant″; and we have seen new, more structured, approaches being tested, for instance with PowerShell or NuShell.
-
VanadiumOS: Portable, multi-user Unix-like OS
You can install PowerShell on Linux now, if you like - or there's nushell: https://www.nushell.sh/
-
What’s everyone working on this week (1/2023)?
I'll add the long awaited support for nushell in broot.
-
Telegraph and the Unix Shell
But that and xplr are both programs used within the shell and don't address that the shell is still outputting plain-dumb-dataless-text. https://www.nushell.sh/ promotes right on the homepage Everything is data so it's exciting to see and hope for a better future!
-
Rust-shell: what features you would you like to see in a shell ?
I don't understand what you mean by Graphics integration or graphical frontend. Do you have an example? Instead of du - I recommend dust. The data features - are basically the features of nushell, are you using it? Regarding the variables - excellent idea, I will implement this. What do you mean by menu creation? What syntax would you use for "skip next line"?
-
GNU nano is my editor of choice (2021)
> Different components can integrate and coordinate through standards.
We've tried that and for the most part, it doesn't actually work in practice. Hell, it doesn't even work between standard Unix programs. They don't "integrate and coordinate" at all. They just push unstructured text around, and in some cases that's sufficient to perform some very basic compound tasks.
There is an upcoming project though that tries to make Unix pipelines work the way they are supposed to: Nushell[1]. It has real composability with strongly typed data that flows between commands.
Guess how they're doing it? Yup, that's right: They're building it all as a monolithic system where the entire pipeline is supervised and interpreted by the shell. Unix is too fragmented and standards are too difficult to develop and implement for any other approach to be realistically feasible. "Small programs" are an evolutionary dead end.
-
Like seriously why does not one does it ?
Finally, I really do recommend looking into Nushell. It should give you a much better idea of how a shell could work if it weren't tied to ASCII blobs as its core data type.
If you're discontent with the state of shell scripting, you should give nushell a try: nushell.sh
-
Life is much simpler with bash
If structured data is what excites you about pwsh, you should check out nushell: https://www.nushell.sh/. It is cross-platform like pwsh, and takes a similar approach to structured data, but has a much simpler syntax that I find more readable and much nicer to type than pwsh.
jq
-
🐘 PostgreSQL EoLs as a table ⏳
🪛 jq
-
How I back up all my open tabs to a text file without using an extension.
3) Install the jq utility on your computer. jq is a json parser/filter. https://stedolan.github.io/jq/
-
Solving Advent of Code with Jq
Repo author here, let me promote jq a bit – it's much more than a simple command-line JSON processor you know it for:
* It is a generator-based language which means you operate streams of values rather than single values. Takes some time to get used to, but you'd never want to go back to traditional model, at least for data processing. See 'Generators and iterators' section of the man page: https://github.com/stedolan/jq/blob/cff5336ec71b6fee396a95bb...
* Designed for CLI, it makes it easy and even pushes you to express your program as a single pipeline. You rarely need variables, functions or any control structure. And pipelines are great to build iteratively, debug and compose (see https://jqplay.org, https://jqterm.com)
* Core language is small but powerful with features like slicing, destructuring, complex assignments and error handling. And you are already an expert in it's (immutable) data structures – it is just JSON
* Batteries included in the stdlib – regex, path operations, C math/dates, algorithms. Modules are supported, but I did not need any dependencies for solving Advent of Code.
* jq is ubiquitous. Often pre-installed, tiny binary, no dependencies, basically single version (ok, awk is better – anything else?)
Being a go-to tool for JSON is sort of a double-edged sword – people just don't look past that. But nowadays JSON is the format for data, everything is convertible to it. And you can feed plain text into jq using --raw-input flag. i.e.:
jq -nR '[inputs]' /etc/hosts
-
What are peoples favorite free and open source software
Jq (sed for JSON files)
-
What daily terminal based tools are you using for cluster management?
Jq: https://stedolan.github.io/jq/ (for quick json extraction)
-
Checkout ls-go (my fork), best alternative to ls
Supports producing structured JSON and CSV output (to use with jq or similar tools). I was inspired by nushell.
-
Jqjq: Jq Implementation of Jq
I think it has been turing complete for a long while. Here is the first prototype in haskell before it was convert to C https://github.com/stedolan/jq/commit/eca89acee00faf6e9ef55d..., it's very basic but i would guess it has enough things to be turing complete.
-
For everyone using gallery-dl to backup twitter: Make sure you do it right
If you have jq installed you can run gallery-dl https://twitter.com/YOUR HANDLE/following --dump-json | jq ".[][2].legacy.screen_name|""https://twitter.com/""""+." -r to get a list of everyone you follow
-
Tools for automation and daily tasks
https://github.com/nginx-proxy/acme-companion https://github.com/nginx-proxy/docker-gen https://github.com/projectdiscovery/dnsx https://github.com/projectdiscovery/httpx https://github.com/projectdiscovery/mapcidr https://github.com/debauchee/barrier https://github.com/stedolan/jq https://github.com/ddosify/ddosify https://github.com/kubernetes-sigs/kind https://github.com/mailcow/mailcow-dockerized https://github.com/motiv-labs/janus
-
Designing a Programming Language: I
> What DSLs might someone make today?
Oh, but there are SO many!
These two super-categories I am very fond of:
- Query languages
- Infrastructure specification languages
Here are some concrete examples:
GraphQL: An API query language: https://graphql.org/
jq: A JSON command-line processor: https://stedolan.github.io/jq/
HCL: A DSL for expressing Terraform assets: https://developer.hashicorp.com/terraform/cdktf/concepts/hcl...
Troll: A DSL for expressing dice roll simulations: http://hjemmesider.diku.dk/~torbenm/Troll/
fvg: Functional Vector Graphics: https://github.com/lemmih/fvg
Kleenex: Optimal regex-based stream processor: https://kleenexlang.org/
Futhark: High-performance purely functional data-parallel array programming: https://futhark-lang.org/
> And when should they be libraries instead?
A friend recently told me that DSLs (stand-alone) and eDSLs (embedded in an existing language) have the main difference that DSLs are overgrown configuration files, and eDSLs are overgrown libraries.
I'd say: When you want to call your DSL from more than one programming environment, it is good to have an abstract representation that transcends one particular syntax-tree definition. A library is good until then.
What are some alternatives?
yq - Command-line YAML, XML, TOML processor - jq wrapper for YAML/XML/TOML documents
fish-shell - The user-friendly command line shell.
starship - ☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!
elvish - Elvish = Expressive Programming Language + Versatile Interactive Shell
dasel - Select, put and delete data from JSON, TOML, YAML, XML and CSV files with a single tool. Supports conversion between formats and can be used as a Go package.
PowerShell - PowerShell for every system!
xonsh - :shell: Python-powered, cross-platform, Unix-gazing shell
volta - Volta: JS Toolchains as Code. ⚡
alacritty - A cross-platform, OpenGL terminal emulator.
gojq - Pure Go implementation of jq
oil - Oil is a new Unix shell. It's our upgrade path from bash to a better language and runtime. It's also for Python and JavaScript users who avoid shell!
json5 - JSON5 — JSON for Humans