• 0 Posts
  • 31 Comments
Joined 1 year ago
cake
Cake day: June 16th, 2023

help-circle
  • The performance is just a “nice to have”.

    Python package management, especially at scale is infuriating. At work we use python microservices in docker containers and it infuriates me trying to update the one our team is responsible for.

    I always like to rant that python 3rd party package management tools are a mistake. We should’ve gone for an “as simple as possible” setup instead of all this.

    So I’m sceptical of UV on principle since it’s yet another 3rd party package manager but if it can do all of this and not be a nightmare I’ll be ok with it.








  • At work we have a lot of old monolithic OOP PHP code. Dependency injection has been the new way to do things since before I started and it’s basically never used anywhere.

    I assume most people just find it easier to create a new class instance where it’s needed.

    I’ve never really seen a case where I think, “dependency injection would be amazing here” I assume there is a case otherwise it wouldn’t exist.


  • It looks like it’s 3x faster than the previous cpython wasm compilation. Recall that most of the performance improvements in python have been done in the last ~2 releases.

    My distro is debian based so it’s still on 3.10 which I would guess this new wasm implementation is much closer to in performance.

    Compiling to wasm also means that you can distribute a binary rather than needing people to have python installed.











  • I’m not sure if the rules are different with macros, I’ve never written one but this lint is generally caused because you set a var to a value and then overwrite that value before you use it. e.g.

    let mut a = 1; a = 2; println!(“{}”, a);

    This will throw the same warning because 1 is never used, this could’ve just been:

    let a = 2; println!(“{}”, a);

    So first I’d double check that I NEED last at all. Maybe try:

    cargo clippy

    See if it can tell you how to fix it.

    If that doesn’t work, it’s sometimes necessary to skip certain lints. E.g. if you make a library, most of the code will be flagged as dead code because it isn’t used and you can use an #[allow(dead_code)] to stop the linter warning. You might be able to use #[allow(this_linting_rule)].

    Hope something here helps.