• 0 Posts
  • 192 Comments
Joined 2 years ago
cake
Cake day: June 13th, 2023

help-circle
  • bc nu does everything pwsh does, but without the odd and verbose syntax. their exceptions and error codes are two different systems and don’t make sense by default. instead of making shell cmds easy to parse I find myself having to use dotnet versions of things, which would be fine if the syntax for that wasn’t so terrible. nu still feels like a unix shell for the most part.

    pwsh has its place, especially since it’s default. I’ve written plenty of pwsh scripts at work for ci and the like. I can get over the verbose naming in a text editor. using it from a repl isn’t my favorite experience


  • I love alternative shells. my shell has been set to fish and zsh for about a year each, xonsh for a few years, and now nushell for a couple years, and I think that’s probably my ranking as well.

    fish and zsh are both nicer than bash, but they don’t give you as much as xonsh and nu do. you get nice completion and configuration and such, but it’s still a shell when it comes to the programming tasks.

    I don’t want just a shell, I want a programming language with a good repl that makes it easy to deal with commands. xonsh and nushell both do that.

    my major problem with xonsh was that there was python syntax, and there was shell syntax. it didn’t feel great to interleave sh cmds and py fns. everything had to be parsed and then everything had to be formatted to go back into sh cmds. the standard library of sh cmds doesn’t really exist either. you either use the py version of libraries for paths/processes/whatever, or you call and parse the os version. the former seems like the intended one. I found myself having to find a pip package for whatever task.

    nu solves all my problems with xonsh without sacrificing much. there isn’t really a split between nu commands and shell ones syntactically. parsing is easy, most cli things output data as lines, ascii tables, or have a json flag, and nu has nice ways to deal with all of those. nu commands generally work given a single element or a list or a full table if they make sense to. running a command on each element in a list and dealing with the output is easy as opposed to having to break your pipeline and write a for loop. they also have plenty of builtins and plugins so the things I generally want to parse are already done. ls returns a table, ps returns a table, I can pass lists into rm, etc. there’s community plugins for git so I don’t have to remember their syntax for searching for commits, I just query in nu. aws cli has a json flag so I can explore logs and such as nu data. and if I just want.

    now downsides to nu. it’s not bash so you can’t just source whatever file that a command probably gives you, and there’s no source-bash like xonsh has, so you’re stuck translating it to nu. if it just sets env vars it’s not awful since you can just shell out to bash, but doesn’t work for more complicated. for things like python you have to make sure you use the correct tool to make your venv since builtin one doesn’t give you a nu file to load. not sure about support in other tools.

    overall it’s great and not really that much learning, especially if you just use it like a shell to begin with. it’s not much commitment to try a new shell since you can still call scripts written in your previous one. I’d say try it and see how it goes



  • worst case you’re parsing command output like you would in bash, so you’re not really worse off. I’ve got a handful of aliases that wrap commands I run often so I only dealt with parsing in the beginning. there are enough builtins that output structured data, or applications that have a json flag that it’s still useful.

    speaking of powershell, it’s easy enough in nushell to write an alias that shells out to pwsh and calls ConvertTo-Json then from json on the nu side. that gives you plenty of extra commands that are structured, at least on windows



  • net 6 to 8 wasn’t even a significant upgrade for us. I don’t know why you’d want to continue on a community fork instead of upgrading. granted we don’t have that large of a codebase but it was a one afternoon project for a jr dev to upgrade a couple asp.net and a couple wpf apps.

    dotnet has kept pretty small with their breaking changes for new versions recently. net framework 4.5 to net 6.0 was awful though





  • briantoProgrammingBest Alternative to Postman?
    link
    fedilink
    arrow-up
    2
    ·
    25 days ago

    I can use insomnium for almost everything, but it’s not as complete as postman. randomly I’ll run into some problem that makes me go back.

    for instance, there’s no way to just enter binary data on a readable format to send over websocket. with postman there’s an obvious dropdown to send hex encoded data as a binary message.


  • briantoFediverse@lemmy.worldDon't reply "just Google it"
    link
    fedilink
    English
    arrow-up
    5
    ·
    1 month ago

    on one hand I agree. on the other, google has historically been afraid of the verb to google becoming generic, so of course I’d like to see that happen.

    I think the middle ground is say google it, but make it clear you mean google it on an alternative search engine









  • but stability isn’t something that would drive a gentoo user away either.

    a lot of the draw of gentoo from what I saw was being able to configure everything down to how it gets compiled. it’s simple to apply a patch to a package before it gets built or maintain a custom kernel config in nixos, as well as all the advantages of declarative os