![]() ![]() ![]() iterating numbers, or file list from a previous command, or was there anything specific about piping inside the scripts (there is not, but you have to be mindful of config like `set -euo pipefail`) etc. But at one point it became a death by a thousand paper cuts thing I know I can do the task but I can never quite remember all the little annoying details when e.g. > It's not a great language but it gets the job done, literally.Īgreed, I have achieved a lot with bash and `parallel` alone. I suppose with more experience in it it would become feasible. Just not sure how economical it is to reach for it for throwaway one-off tasks. Same, I love it more than I loved almost any other tool I tried in my life. > At the moment I'm having great fun with Rust instead Nowadays I love Elixir and I reach for it in many scenarios where I don't expect CPU-bound workloads but I am acutely aware that the startup times (when scripting) are atrocious, plus working with it in business context for 4.5 years made me painfully aware of the problems caused by a lack of static typing. Same, I used to be a Ruby (and Rails) fanatic a long time ago but this has subsided. > I currently have the dynamic language blues. Here are the resulting files (available for 5 days) so you can see what it looks like: http.bin to be used on any linux system, and not care if Python is installed to play with httpie. Now you have a nice stand alone AppImage you can call with. Python -m nuitka $(which http) -onefile -linux-onefile-icon /usr/share/pixmaps/python3.xpm -follow-imports -assume-yes-for-downloads You need to have a C compiler and python headers around as well (gcc on linux will do, E.G: sudo apt install build-essential python3-dev on ubuntu). Python -m pip install nuitka httpie -user This will let you do "python http.pyz" anywhere you have a modern python and enjoy httpie without the need to pip install it.įor an exe (this is an example on linux, the commands are a bit different for windows and mac): (download httpie, and creates a http.pyz file that will contains httpie and all it's dependancies, plus code to trigger the http command when called) Python -m shiv httpie -o http.pyz -c http Python -m pip install shiv -user # (Yes, I realize how ironic this is). Here is an example procedure for both (run them in a venv). I regularly see cli python tools that output stack traces on errors, and it should not happen.Īnyway, if you want those tools to be always around, I really encourage you to grap a usb stick, and put them on there as pyz and binaries. It's a shame, because cli tools should be black boxes, people should not have to think about the implementation. Things like httpie, jupyter, etc should be provided as pyz and binaries as well, not just pip installable, but python devs don't do that really often. ![]()
0 Comments
Leave a Reply. |