4 ms·
I'm working on a project that leans heavily on matrix vectorization and large dirty datasets. I'm not a scientist, though. Here's how I work. * Hack together
by berkes 3y ago
I'm working on a project that leans heavily on matrix vectorization and large dirty datasets. I'm not a scientist, though.
Here's how I work.
* Hack together a PoC with python, sed, awk, grep, cut, xsv etc.
* Clean that up, run it on larger sample sets (samples made with said sed/awk/cut etc)
* Attempt to run it on the full dataset.
* Rewrite it in rust.
Step 2 and 3 are hit-or-miss in python. I find it near impossible to do any refactoring without static types and/or tests. And quite often, I'm looking at a run for over an hour to have it crash on that one broken line. Whereas the same happens in the rust version in seconds: crucial for my trial-and-error style of building.
So: Python because I must, rust, as soon as it's clear what I'm going to do.
- zozbot234 3y agoDoesn't Python support optional static types these days?
- gigatexal 3y agoIt's got type annotations and mypy has a discussion about it here as well: https://github.com/python/mypy/issues/1282 https://github.com/python/mypy/issues/1282
- berkes 3y agoIt supports type hinting. Which helps, but is far from the tool (crutch) that I need when refactoring. Still far too much guessfactoring and not the confident "it compiles. tests are green. it's Friday: let's deploy!" that rust (or java, or even typescript) offer me.