HN2new | past | comments | ask | show | jobs | submitlogin

Also I really like Python stdlib for those kinda of throwaway scripts. While `cargo` is a far better tool than `pip` for dealing with dependencies, if you don't need to dependencies at all it is even easier, and most times when using Python I don't really need to install any third party libraries even when doing non-trivial stuff (i.e.: sometime ago I did a script that scrapped a page for a download link for some APK and sideloaded it to my Android smartphone).

Someone also said the REPL, and while the REPL in Python is not as powerful as, i.e.: Clojure, it is still something that feels essential for a exploratory workflow that is the scripts case. Testing is not the same, it is much slower to interact, specially when you just want to check a hypothesis (also, most scripts I don't want to write tests, they will probably break anyway in a few months like the example of web scrapping I said above).



> Someone also said the REPL, and while the REPL in Python is not as powerful as, i.e.: Clojure, it is still something that feels essential for a exploratory workflow that is the scripts case.

Check out IPython if you haven't, the REPL is a game changer.


What features make it a game changer for you? For me it felt like just a small quality of life improvement, but I've never delved that deeply into its feature set.


- readline functionality and history

- Hints and completions behind the Tab key

- Syntax highlighting as you type, along with auto-indentation

- Dynamic introspection with "?" and "??"

- Being able to run shell commands with "!" and capturing their output with "!!"

- Magic commands behind "%" and "%%"

- File system navigation


I know IPython, and yeah, it is very nice. But most of the time I just to test something fast the default REPL is already enough.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: