poetry == npm
pyenv == nvm
pipx == npx
No big difference, IMO.
484 karma · joined August 16, 2016
poetry == npm
pyenv == nvm
pipx == npx
No big difference, IMO.
A) (if possible) migrate away from the services you mentioned.
B) lock-in deeper and deeper with the biggest advertising company on the planet.
I've been driving the same car for 20 years. I remember cleaning the bugs from the roof rack after each longer trip. There were so many bugs, the front of the rack was entirely covered with a dark coat. These days the roof rack stays completely free of bugs. I simply don't have to clean the rack any more.
The high-level-variant is a dynamic language with optional typing, which is good for scripting, fast prototyping, fast time-to-market, etc.
The low-level-variant is similar to the high-level-variant (same syntax, same features mostly, same documentation), but it has no garbage collector, typing is mandatory and it runs fast like C/C++/Rust. Compiled packages that are written in the low-level-variant can be used from the high-level-variant without additional effort at all. The tooling to achieve this comes with the language.
A language like this would be insane, IMHO.
You can use mypy for that: https://github.com/python/mypy
I compile my cli tools with nuitka [0], the resulting binaries take half the time to start. I find the difference quite notable.
replace pyenv with asdf [0]. asdf is like pyenv, but it works for all major programming languages.
In case of Python, I use asdf to install the needed interpreter version and I use pipenv to create/handle the virtual environments. It's a perfect combo.
For example, if I have to design software for a micro-controller that uses C/C++ I sometimes write down the algorithm in Python (with editor support: auto-formatting, etc.), then I implement it in C/C++. There is no better way to write pseudo-code that I know of.
Python is also great to create a prove of concept for something. It allows for rapid prototyping due to the simple syntax, the high-level features, the huge ecosystem and the dynamic type system. Most of the time the result is good enough for production. You can add type annotations and get statically typing via mypy [0] to harden the code base. This works really well. (See: JS->TypeScript).
Python has a well developed FFI which allows you to call C/C++/Rust, without large performance hits. I think this is one of the main reasons for Python's success. It can be used as a high level interface to a huge low level ecosystem. ML wouldn't exist in Python without that.
Python is a great language to create simple scripts as well. I use it as a bash replacement.
But beware: Python can get really ugly if you rely too heavily on OOP/Inheritance. There is a lot of ugly Python code out there. I think Python shines the most if you use it in a procedural/semi-functional style and describe data-types for your business logic (almost) entirely with (dump) dataclasses [1] and namedtuples [2].
Beware2: Python's packaging story (package manager, etc) is currently in a messy state. There are good solutions, but it's difficult to find the right tools for a newcomer. I think it will take a couple of years for the dust to clear, but you might want to check out pipenv [7] or poetry [8]
These packages will make your life a lot easier. I use them for every project:
- black [3] or yapf [4] (auto-formatter)
- mypy [0] (statically typing with editor support for VSCode)
- pylint [5] or flake8 [6] (linter)
[0] https://github.com/python/mypy
[1] https://docs.python.org/3/library/dataclasses.html#module-da...
[2] https://docs.python.org/3/library/typing.html#typing.NamedTu...
[3] https://github.com/psf/black
[4] https://github.com/google/yapf
[5] https://github.com/PyCQA/pylint/
[6] https://github.com/PyCQA/flake8
I made a round trip over the last years from React/TS to Elm to ReasonReact back to React/TS. React/TS is the least attractive, but it's the one I get most done with. Plus the situation in React has gotten much better since Hooks, PureComponents, Context API. I'm glad the mess with class components is finally over.
From the points you make it seem like you haven't really figured out how to use mypy...
TS and Python/Mypy are my daily drivers. I don't find the experience working with mypy any worse than working with TS. In fact I prefer composing and consuming types via dataclasses and NamedTuples over interfaces and TS classes.
There is https://pyo3.rs/v0.7.0/
Then I must be lucky. I've been using arch on my dev machine without notable breakages for about 2 years.
I drop a doc-string like this one in every build script and get the command line interfaces for free:
"""
Install:
pipenv install --dev
Usage:
make.py [<command>] [options]
Commands:
build Build wheel.
push Push wheel to pypi.
test Run tests.
bump Run interacitve bump sequence.
git Run interactive git sequence.
Options:
-h, --help Show this screen.
"""You could simply write the complete interface down in Python/FastAPI without actual implementation and generate the OpenAPI spec from that interface. That way both teams could start soon.
Have you tried digitalocean's kubernetes offering? It takes about 10 clicks to create a cluster and download a config.
This is for example the reason why there won't be a large mathy/scientific ecosystem in golang.
I think it will be difficult to grow a large ecosystem for a language with very poor FFI performance [0] in the long run. Golang's poor FFI performance is the number 1 reason I wouldn't use it for my own projects.
And if you need "to create a redistributable executable with all your dependencies". You can either use pyinstaller [0] or nuitka [1] both of which are very actively maintained/developed and continually improving.
[0]: https://github.com/pyinstaller/pyinstaller [1]: https://github.com/Nuitka/Nuitka
I think this has to do with golangs poor FFI performance.
{#if user.loggedIn}
<button on:click={toggle}>
Log out
</button>
{/if}
To me such template language is a huge step back from JSX. JSX is JavaScript, thus you get the full power of the language (JS/TS) with the full support from your editor (type checking, auto-completion, etc.).