• 0 Posts
  • 224 Comments
Joined 1 year ago
cake
Cake day: August 6th, 2023

help-circle
  • Yeah. ‘lib’ isn’t a standard Python library, it’s the name of the abomination that this person created. Since python has quite a bit of useful introspection, they can do something like:

    • get the stack
    • find the exact call to abomination.add()
    • reparse the text of that line, turn the text of the comment into actual numbers, and add them

    Now, I don’t know if python keeps the comments around, so it may involve getting the filename and line number, reading the file, and manually extracting the comment text from that line.



  • Sure, but let’s just clarify that this is someone going out of their way to create this problem, using Python’s ability to read it’s own code.

    Basically, you can load any text file, including a source code file, and do whatever you want with it.

    So, a function can be written that finds out whatever’s calling it, reads that file, parses the comments, and uses them as values. This can also be done with introspection, using the same mechanism that displays tracebacks.






  • bastion@feddit.nltolinuxmemes@lemmy.worldSnap...
    link
    fedilink
    arrow-up
    4
    ·
    1 month ago

    Auto-updates are a hell-no for me.

    There was a perfectly good user interface for updates. Then Ubuntu decides “wait… What if we made updates compulsory and effectively random and skipped the UI. The user can do system updates whenever they want, because those don’t matter for security or something, but these apps must be updated whenever snap determines they must.”

    Oh, snap!





  • bastion@feddit.nltoMemes@sopuli.xyzI don't get this post!
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    1 month ago
    Traceback (most recent post last):
      The_Picard_Maneuver in memes
        I don't get this post <image>
      Hjalmanger
        I don't get this post
      Ifera
        Dumb fuck! (I also don't get it)
      CaptainBlagbird
        Dumb fuck! (Dumb fuck!) ((I also don't get it))
      Viking_Hippie
        Error! Recursion loop! Danger, Will Fuckheadson! <image>
    DumbFuckError while processing 'Error! Recursion loop!' <image>:
      DumbFuckError("Got 'Error! Recursion loop!'(Dumb fuck! (Dumb fuck!) ((I also don't get it))), but i don't get it.")
    

  • Late stage capitalism.

    The issue is that capitalism fundamentally requires forward thinkers and enlightened (or at least rational) perspective to function sustainably.

    But capitalism rewards short term thinking, everywhere from corporate leadership, to the workforce, to the consumers caught by ads designed to catch and hold their ever-shortening attention spans.

    Fundamentally, it needs regulation to thrive. The true cost of a purchase, including environmental and decommissioning/disposal costs must be tied to the initial purchase value. Through this, we might get a functional capitalism.








  • I’ve seen an arthritic goat hobbling around in agony.

    With nature, you don’t generally peacefully breathe out your dying breath, even if there are no predators. You live until life as it is is torturous enough that you no longer live.

    There is no alternative to life, and death is compulsory and often painful. We, as humans, are lucky enough to be capable to, at times, make that process quick, and, at times, painless.

    Predation is not wrong. The quality of life is what matters - and because of that, death is necessary.

    Life offers joy, but can dish out misery just as deeply. If life gives you joy, it lasts as long as it can. If life gives you misery, the depth of it is limited by death.