• 10 Posts
  • 134 Comments
Joined 1 year ago
cake
Cake day: May 27th, 2024

help-circle



  • vga@sopuli.xyztoTechnology@beehaw.orgEthical alternatives to Spotify
    link
    fedilink
    arrow-up
    10
    arrow-down
    2
    ·
    edit-2
    8 days ago

    Daniel Ek is investing in European defense companies. This is not unethical.

    Spotify paying like shit to their artists and platforming Joe Rogan are totally valid reasons to move away though. But the thing is that Spotify is sort of like radio. How much did radio pay for artists for each time the song was played? Genuinely asking.

    What I do is I do 90% of my listening on Spotify. Then when I hear something really good, I buy and download their album, usually on Bandcamp and mostly keep listening them on Spotify because it’s just so much lesser hassle. Seems like the best of both worlds. Thought about going to vinyls but I’m not hipster enough.









  • Yeah, I figured there would be a workaround. Also

    >>> (10).years()
    Traceback (most recent call last):
      File "<python-input-0>", line 1, in <module>
        (10).years()
        ^^^^^^^^^^
    AttributeError: 'int' object has no attribute 'years'
    

    But the other thing is also: can you add methods to the int class so that they’re available everywhere? I suspect that you cannot in python, at least without significant hackery. And I also suspect that it’s probably something they decided to prevent knowingly.


  • Ruby is object-oriented, modelled after Smalltalk mostly. So

    irb(main):001:0> 10.class
    => Integer
    

    So you’ll just have implement the method “years” on the Integer (or something more generic like Numeric) class and then “ago” on whatever class the years method returned.

    You might imagine that you can do something like 10.years().ago() in python but the parser prevents you:

    >>> 10.years
      File "<python-input-0>", line 1
        10.years
          ^
    SyntaxError: invalid decimal literal
    

    Doesn’t seem like it would have to prevent it, back in ruby:

    irb(main):001:0> 10.0.class
    => Float
    

    Ruby is a pretty cute language in my opinion, and I find it sad that python kinda drove over it.