Hacker News new | ask | show | jobs
by suralind 56 days ago
My stack today is kinda nice but perhaps a bit odd:

- Go - backend + CLIs

- TypeScript - fronted, occasionally zx for more complex scripts

- Nushell as my scripting language (I’ve been relentlessly using it everywhere I can instead of bash/zsh and man it is such an improvement)

I heard so much good stuff about both Zig and Rust and would love to eventually get to know one of them.

2 comments

nushell + 1. After ~20 years of bash+zsh, I'm translating all my scripts to nu.

Yesterday I noticed I still don't know how to write

  ls | where modified < ((date now) - 3wk) | each { |fn| rm $fn.name } 
in zsh after all years.

   find . -type f -mtime +21 -delete
Or if you have fd

   fd -t f --changed-before 3w -X rm
I use fish as daily shell, and for this kind of script I would rather jump to ruby. But it looks rather readable.
Whoa. You people freak me out with your fancy new toys.
Nushell, from their website, looks a lot like PowerShell's idea of a shell, but less verbose.
Yup. Which is kinda funny, because back when I was a young dev using Windows I never liked nor understood PS.
> when I was a young dev … never understood PowerShell

This makes me feel old.

PowerShell is not really that much more verbose. This is the equivalent of the nushell command by crabsand.

  dir | ? LastWriteTime -lt (Get-Date).AddDays(-21) | del
Too much casing changes, IMO
Sorry. Fixed it for you.

  dir | ? lastwritetime -lt (get-date).adddays(-21) | del
PowerShell is not case sensitive (but nushell and bash are).