• 0 Posts
  • 10 Comments
Joined 1 year ago
cake
Cake day: March 3rd, 2024

help-circle

  • sure!

    1. it wasn’t tough to get started. it generally reads like a normal Unix shell with some exceptions. i don’t think many Linux power users would have a hard time doing basic file system tasks or launching programs, etc. there are going to be some issues, like you can’t just paste bash commands in because && isn’t supported, multiline strings don’t require the \ character, and string escaping is totally different. those are intentional deviations that i personally agree with, but they take some getting used to. and then obviously stuff that is specific to nushell like working with tables.
    2. definitely the killer feature out of the box is manipulating, parsing, and reading structured data. the “aha” moment for me was when i needed to change a value over a thousand or so JSON objects and did it with a one liner. then i use it with some extra overlays to do stuff like connect to a k8s cluster like k8s connect (helm stage dev.0) which reads my YAML config and connects to the cluster specified in that file. or making a call to our internal package store to get the latest version by parsing the returned JSON.
    3. it works out of the box with your existing PATH (or Path if you’re nasty). you can just drop into it and it will have all the path stuff inherited just like if you launched zsh or bash. you’ll have to set that up if you want to use it as a system shell—like i do—, but otherwise it’s pretty seemless.

    you can check out my collection of scripts here: https://github.com/covercash2/dotfiles/tree/main/nuenv

    ETA: if you do have compatibility problems or need your old muscle memory to do something quick, it’s easy enough to use bash -c old_script.sh or just drop into a different shell


  • i’m a big nushell fan.

    i was once sitting where you are. when PowerShell was released on Linux i thought about switching and read the manual. i really liked some of the philosophy:

    • descriptive names for commands. cat and ls have canonical short names to save disk space on the systems they were created for. this is no longer a constraint and aliasing a longer command name is better than “git gud n00b” when it comes to discoverability.
    • structured data. “everything is a string” is great when programs play nice. it breaks apart when programs prefer human readable output or worse don’t provide structured output, like format=json or whatever.
    • modern control flow semantics. yes, pipes are great, let’s keep those, but why do i have to rtfm every time i want to bang out a simple script with an if-else control flow?

    i looked around at a few solutions. xonsh uses Python. eshell is integrated into emacs and uses Elisp. i briefly tried to hack something together using Kotlin Script. and yeah, i tried PowerShell.

    i settled on nushell not just because it fulfilled the above requirements, but also:

    • simple data types. string, number, list, record, and table are about the only types you deal with.
    • wide support for structured data. JSON, YAML, TOML, CSV, etc have parsers built in. jq and other such tools are made irrelevant because you just load it into nushell query with a unified DSL using common syntax like select and where.

    honestly, these are the killer features. there are so many more. context aware autocomplete, modules and overlays, super easy custom completions, extension functions (one of my favorites is git remote open), cross platform (if you’re forced to use Windows), plugins, and i can contribute since i do Rust development for work.

    give PowerShell a shot, but i think nushell is the happy medium





  • it’s not worth it to me. the battery life is a huge feature, and it does feel like Asahi development has slowed. i have enough computers to tinker with. i bought my Macbook specifically to be an entry point into my other machines, i.e. from the airport or brewery or coffee shop.

    maybe when it makes sense to buy a new laptop i’ll find some time and motivation to contribute, but just using Asahi doesn’t really appeal to me.



  • i completely understand. as a Rust developer that uses Neovim, i have some hills like that too. and if i was more of an OS dev and/or had the time i might be interested to help improve the platform. my last attempt was a Thinkpad, but i had to have an external mouse for that thing, the fans were causing me to fail stealth checks, and the battery was basically a UPS.


  • i know a laptop that’s amazing in almost every aspect except that it doesn’t run Linux. the Macbook Pro. to me there’s barely any real comparison to be made unless Linux or Windows or the keyboard layout is a hill worth dying on to you.

    i have servers and my gaming PC on Linux, but i wouldn’t trade my Macbook with its unified memory, incredible battery life, best in class touchpad, and top notch screen for anything else. Windows is dying, and chip designers (outside of Apple) seem more interested in cashing in on AI than providing a user experience. i was excited to see what Qualcomm would do, but it doesn’t seem like OEMs or Windows are particularly interested in supporting that platform as a next leap forward, while Intel is bleeding on the side of the road and AMD is constantly side-eyeing Nvidia. i think it would be peak irony for Nvidia to come out of left field with a desktop class ARM processor that’s Linux native, but that’s a pipe dream. what the ecosystem needs is a real competitor to Apple that is more focused on desktop machines than enterprise contracts. maybe RISC-V Frameworks will break out in a meaningful way. but it just seems like anything else these days in a compromise based on some biased preference or moral judgement.

    anyway all that said i’m glad there’s an ecosystem of people who are stubborn enough to work on this platform. i have my own stubbornness, but i just don’t have the motivation to apply it here