SDF Chatter
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Kissaki@programming.devM to Nushell@programming.devEnglish · 16 days ago

This Week in Nushell #296

www.nushell.sh

external-link
message-square
0
fedilink
4
external-link

This Week in Nushell #296

www.nushell.sh

Kissaki@programming.devM to Nushell@programming.devEnglish · 16 days ago
message-square
0
fedilink
This week in Nushell #296 | Nushell
www.nushell.sh
external-link
A new type of shell.
alert-triangle
You must log in or register to comment.

Nushell@programming.dev

nushell@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !nushell@programming.dev

What is Nushell?

Nushell is a powerful shell and scripting language with strong typing, querying, and piping functionalities.

From the official documentation; Introduction:

The goal of this project is to take the Unix philosophy of shells, where pipes connect simple commands together, and bring it to the modern style of development. Thus, rather than being either a shell, or a programming language, Nushell connects both by bringing a rich programming language and a full-featured shell together into one package.

Nu takes cues from a lot of familiar territory: traditional shells like bash, object based shells like PowerShell, gradually typed languages like TypeScript, functional programming, systems programming, and more. But rather than trying to be a jack of all trades, Nu focuses its energy on doing a few things well:

  • Being a flexible cross-platform shell with a modern feel
  • Solving problems as a modern programming language that works with the structure of your data
  • Giving clear error messages and clean IDE support

Examples

Shell Examples…
0x[7F000001] | chunks 1 | each { into int } | str join "."
# => 127.0.0.1
ls | where size > 1kb
# => ╭───┬───────────────────┬──────┬─────────┬────────────╮
# => │ # │       name        │ type │  size   │  modified  │
# => ├───┼───────────────────┼──────┼─────────┼────────────┤
# => │ 0 │ Gemfile           │ file │ 1.1 KiB │ 3 days ago │
# => │ 1 │ Gemfile.lock      │ file │ 6.9 KiB │ 3 days ago │
# => │ 2 │ LICENSE           │ file │ 1.1 KiB │ 3 days ago │
# => │ 3 │ SUMMARY.md        │ file │ 3.7 KiB │ 3 days ago │
# => ╰───┴───────────────────┴──────┴─────────┴────────────╯
help commands | where name == each | first | get params.name
# => ╭───┬──────────────────╮
# => │ 0 │ closure          │
# => │ 1 │ --help(-h)       │
# => │ 2 │ --keep-empty(-k) │
# => ╰───┴──────────────────╯
http get https://programming.dev/api/v3/site | get all_languages | length
# => 184

http get https://programming.dev/api/v3/site | get taglines.content
# => ╭───┬────────────────────────────────────╮
# => │ 0 │ Broken communities have been fixed │
# => ╰───┴────────────────────────────────────╯

Web-Links

  • Website
  • GitHub (Rust, MIT)
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 1 user / day
  • 1 user / week
  • 12 users / month
  • 41 users / 6 months
  • 1 local subscriber
  • 78 subscribers
  • 14 Posts
  • 8 Comments
  • Modlog
  • mods:
  • Kissaki@programming.dev
  • BE: 0.19.8
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org