Ask HN: Which alternative to Python for personnal use would you recommend?
21–30 of 38 posts
Re: Ask HN: Which alternative to Python for personnal use would you recommend?
#22You will probably like .NET's CLI tooling after Python: brew install dotnet-sdk # or sudo dnf/apt install dotnet-sdk-8.0 dotnet new web dotnet run curl localhost:5050 C# will give you, in some ways, Python-esque experience if you make many one-off programs as you can simply write Main as python script but with 10-50x performance. You can also go very low-level with C syntax with unsafe, or take a middle ground with p…
For simple scripts, you don't even need to bother with a `Main` method anymore; you can just write statements outside of any structure like in PHP or JS: https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals...
Re: Ask HN: Which alternative to Python for personnal use would you recommend?
#23If you're looking for a high-level scripting language for small projects that you keep to yourself, Ruby is the obvious alternative to Python. Lua not so much - it's fine when embedded but doesn't have the ecosystem for standalone use. However, if you want to make programs for others to download and use, I'd recommend a language that can be compiled into easily-distributable binaries. As long as the overhead of a gar…
Re: Ask HN: Which alternative to Python for personnal use would you recommend?
#24Recently taught myself Python and now I just love it. Sorry you had a bad encounter with it.
That being said, for personal projects that don’t really see the light of day, Python is a perfect multi-tool type language
Re: Ask HN: Which alternative to Python for personnal use would you recommend?
#25This list is not meant to say "this is the best language for this", but rather, "you'll have an interesting learning experience with this": - web backend => ruby (with RoR) - web frontend => JS - network => go - gui => dart - perf sensitive => rust - mac os only => swift - windows only => F# - cli scripting => nim - embed => zig - new perspective on programming => lisp - want to experience clean theoretical concept =…
Re: Ask HN: Which alternative to Python for personnal use would you recommend?
#26Ruby is the closest match from Python and PHP. Have you considered JavaScript too?
I am already using Javascript professionally and for Discord bot development through node.js Ideally I would like to have another language in my dev pocket and take a break from the languages I use at work. Also Javascript doesn't seems like a good choice for desktop apps (apart from Electron that suffers in the performance field) or CLI tools (unsure about this one as I never used it in this field) does it ?
Re: Ask HN: Which alternative to Python for personnal use would you recommend?
#27If you're looking for a high-level scripting language for small projects that you keep to yourself, Ruby is the obvious alternative to Python. Lua not so much - it's fine when embedded but doesn't have the ecosystem for standalone use. However, if you want to make programs for others to download and use, I'd recommend a language that can be compiled into easily-distributable binaries. As long as the overhead of a gar…
An important note: If you plan on sticking to an editor that has LSP integration like Vim/VSCode and so, stay away from Ruby as Ruby's language server solargraph is just not good. Personally, this is my main reason for staying away from languages like Ruby, Kotlin etc.
Also RubyMine (IDE from Jetbrains) seems to have its own LSP integrated.
Re: Ask HN: Which alternative to Python for personnal use would you recommend?
#28I authored this site to help with this exact question: https://cdaringe.github.io/programming-language-selector/ Try it out, give me (friendly) feedback!
Re: Ask HN: Which alternative to Python for personnal use would you recommend?
#29Re: Ask HN: Which alternative to Python for personnal use would you recommend?
#30Earlier quoted context omitted.
How is Nim for cli scripting? I tend to use Bash for simple scripts, and Python once I need more than one command line argument. I've been looking for a compelling case to try out Nim.
It's Python-like, but it compiles, so you get a stand alone exec like go, that you can copy on other machines without having to provide an interpretter. It's better than bash for anything longer than 5 lines, works on Windows and Unix and has a lean syntax. Now I would use Python for scripting, especially since uv and hatch have inline deps support now, so it's a blast. But OP is looking for something new, so I list…