Preferences

_ZeD_
Joined 2,264 karma

  1. But but

    I don't want a promotion. I don't want a new role.

    I want more money to keep doing what I already do.

  2. The whole idea is to make the rich people poorer, even if just a little.

    The money taken from 1000 or 2000 rich people may be used for the rest of the 130000 ones

  3. Yeah... No. I've 10+ years of python under my belt and I might have had need for this kind of micro optimizations in like 2 times most
  4. keep in mind that, apart from the money throw at js runtime interpreters by google and others, there is also the fact that python - as a language - is way more "dynamic" than javascript.

    Even "simple" stuff like field access in python may refer to multiple dynamically-mapped method resolution.

    Also, the ffi-bindings of python, while offering a way to extend it with libraries written in c/c++/fortran/... , limit how freely the internals can be changed (see the bug-by-bug compatibility work done for example by pypy, just to name an example, with some constraint that limit some optimizations)

  5. What's wrong with metal spoons?
  6. Sooo... Is this a post about python envy?
  7. Honestly I don't buy it. Worse, this is one of the reason I prefer to do "minimal integration tests" instead of unit tests. Take the example snippet of code

        def get_user_settings() -> str:
            with open(Path("~/settings.json").expanduser()) as f:
                return json.load(f)
    
        def add_two_settings() -> int:
            settings = get_user_settings()
            return settings["opt1"] + settings["opt2"]
    
    and the very first comment just below

    >>> The thing we want to avoid is opening a real file

    and then the article goes and goes around patching stdlib stuff etc.

    But instead I would suggest the real way to test it is to actually create the damn file, fill it with the "normal" (fixed) content and then run the damn test.

    This is because after years of battling against mocks of various sort I find that creating the "real" resource is actually less finicky than monkeypatching stuff around.

    Apart from that; yeah, sure the code should be refactored and the paths / resources moved out of the "pure logical" steps, but 1) this is an example and 2) this is the reality of most of the actual code, just 10x more complex and 100x more costly to refactor.

  8. gosh...

            try {
                val user = authService.register(registrationRequest.email, registrationRequest.password)
    
                return user
            } catch (exception: Exception) {
                // log exception
                throw exception
            }
    
    
    
    no, no, no!

    the whole point of the exceptions (and moreso of the unchecked ones) is to be transparent!

    if you don't know what to do with an exception do NOT try to handle it

    that snippet should just be

        return authService.register(registrationRequest.email, registrationRequest.password)
  9. > This is the wrong take. Economic dependence on China is a massive national security threat.

    and instead dependence on the U.S.?

  10. How does it makes sense?
  11. and yet not one of them has a monitor of 17" or more...
  12. > artisan croissants [...] “emblem of French gastronomy,”

    and yet italian cornetti are better grin

  13. why it should happen?
  14. what baffles me is how much more rage is coming from any other creative workers (painters, filmmakers, musicians) than from programmers.

    Why are programs - the result of the ingenuity of people working in software field - not protected against AI slop stuff.

    Why is there not any kind of narrative out there describing how fake and soulless is code written by any AI agent?

  15. Honestly, in my experience, the only good reason to have microservices in a "software solution" is to be able to match 1 service -> 1 mantainer/team and have a big (read "nested", with multiple level of middle-managers) group of teams, each that may have different goals. In this way it's very easy to "map" a manager/team to a "place" in the solution map, with very explicit and documented interactions between them
  16. everything.
  17. what do you propose to handle translation messages? how do you think they should map the compiler codes to human messages?
  18. the second item is

    exa modern replacement for ls/tree, not maintained

    "not maintained" doesn't smell "modern" to me...

  19. uhmm...

    >>> As a weekend project, I hacked together a physical phone, a Raspberry Pi running Asterisk and Twilio, to let toddlers safely make international calls.

    how often do toddlers make international calls???

  20. but then the websites may offer a banner to ask the user to opt-in again and this information can be saved in a cookie, so it would not be asked again

    maybe they can call it the "cookie banner"

    oh, and also, if it would be annoying to keep saying "no, I don't want to opt-in again" the websites owners may say that it is government fault, as now they are required by law to show this banner

  21. The thing is... are we happyer now?
  22. everyone will lose money.
  23. good luck with that syntax - it would be as possible as passing an inline-defined def as parameter instead of a lambda
  24. > I would gladly take a command line flag that I can pass to python that makes all module loading lazy.

    oh, you want a "break my libraries" flag? :D

    seriously, in theory lazy imports may be "transparent" for common use cases, but I've saw too many modules rely on the side effects of the importing, that I understand why they needed to make this a "double opt in" feature

  25. NO! I don't want my source code filled with this crap.

    I don't want to lose multiple hours debugging why something did go wrong because I am using three versions of numpy and seven of torch at the same time and there was a mixup

  26. Sora 2: Frato
  27. Ummm... it seems that it doesn't work on Firefox mobile for android. I just see a black screen.

This user hasn’t submitted anything.

Keyboard Shortcuts

Story Lists

j
Next story
k
Previous story
Shift+j
Last story
Shift+k
First story
o Enter
Go to story URL
c
Go to comments
u
Go to author

Navigation

Shift+t
Go to top stories
Shift+n
Go to new stories
Shift+b
Go to best stories
Shift+a
Go to Ask HN
Shift+s
Go to Show HN

Miscellaneous

?
Show this modal