What does HackerNews think of dotnet-script?

Run C# scripts from the .NET CLI.

Language: C#

>making powershell actually enjoyable to use

My solution was to stop using it and instead use dotnet-script

https://github.com/dotnet-script/dotnet-script

Scripting with the full power of modern C# has been a huge win for me. And same/similar scripts will work on Windows/Linux/Mac. As my work language is C#, I don't have to context switch to another language for scripting.

Thanks!

It didn't cross my mind to add IDE information. (I don't use an IDE, which may be a mistake. I want to give IntelliJ IDEA a serious try.) I'll be honest: I probably won't add this information. Sorry. N projects × M IDEs is a sizable number of fields to keep accurate by hand, and I've learned this kind of maintenance is best avoided.

I have tried https://github.com/dotnet-script/dotnet-script. It seemed like it could not download dependencies when you ran the script, only reference already installed dependencies. At that point I stopped and did not add it to the list, since it would not qualify. I may have been wrong. I have a mental note to look at it again.

I'll see what F# does. It may work differently from how I understood dotnet-script to work. (It isn't the criterion for inclusion, but as someone who enjoyed writing Standard ML and not so much Haskell, I am actually interested in F#.)

Yeah! F# has native support[1] and C# can do it with a third-party tool[2]. For both, the syntax for referencing a third-party NuGet package inside the script is e.g.:

    #r "nuget: Newtonsoft.Json"
[1]: https://learn.microsoft.com/en-us/dotnet/fsharp/tools/fsharp... [2]: https://github.com/dotnet-script/dotnet-script
I do agree.

I think .Net has got it right. And dotnet-script [https://github.com/dotnet-script/dotnet-script] has been a game-changer for me with a REPL-like experience for unit testing and writing command-line utilities.