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

help-circle
  • 418teapot@lemmy.worldtoSelfhosted@lemmy.worldProgrammatic access to discord
    link
    fedilink
    English
    arrow-up
    9
    arrow-down
    1
    ·
    2 months ago

    It is likely not worth your effort as whatever you come up with will likely result in discord deactivating your account for breaking their ToS, or them breaking their API forcing you to constantly play catch-up.

    This is why open communication protocols are so important. Email is still as ubiquitous as it is because it’s a protocol, not an API.

    I personally think it would be less overall effort to get your friends to switch to an open protocol like matrix, or XMPP than it would playing cat and mouse with proprietary APIs. But you do you, I wish you the best of luck!







  • 418teapot@lemmy.worldtoProgrammer Humor@programming.devaverage day in NPM land
    link
    fedilink
    English
    arrow-up
    35
    arrow-down
    4
    ·
    edit-2
    3 months ago

    It’s kind of insane how bad this whole is-number thing is. It’s designed to tell you if a string is numeric, but I would argue if you’re ever using that you have a fundamental design problem. I hate dynamic typing as much as anyone else, but if forced to use it I would at least try to have some resemblance of sanity by just normalizing it to an actual number first.

    Just fucking do this…

    const toRegexRange = (minStr, maxStr, options) => {
      const min = parseInt(minStr, 10);
      const max = parseInt(maxStr, 10);
      if (isNaN(min) || isNaN(max)) throw Error("bad input or whatever");
      // ...
    

    Because of the insanity of keeping them strings and only attempting to validate them (poorly) up front you open yourself up to a suite of bugs. For example, it took me all of 5 minutes to find this bug:

    toRegexRange('+1', '+2')
    // returns "(?:+1|+2)" which is not valid regexp
    

  • Yeah I’ve played with git-issue and agree it’s not ideal. Have you checked out Sourcehut? It is entirely email based but with some pretty great tooling around it to make it more accessible.

    I agree that in a perfect world we have a separate open protocol for all of the non-repository related workflows/data, that has all the features we need. But the nice thing about email is it’s decentralized, and everyone already has it. And in my opinion, with the right tooling built around it, it can get pretty close to the same quality of life as a github PR, but also degrade gracefully without it.


  • The problem isn’t the version control itself. Obviously git continues to function and I can commit things offline in a plane. What I can’t do is create/review PRs or read/open issues. That’s easy to brush off, but the most egregious thing is the fact that this used to be federated over email!

    All we needed was more user-friendly tooling to make it easier for new college grads to start contributing to FLOSS, but instead of better email based tooling we got the centralized trash that github is today.



  • I haven’t used any flatpacks, mostly because they don’t seem to have a good solution for running terminal programs. (Also I don’t like that the application developer chooses the permissions to expose rather than the user.

    However, I have been using bubblewrap which is what flatpack uses under the hood to sandbox. This allows me to run both gui and non-gui programs, and I have the control of exposing the minimum required permissions that I’m comfortable giving an untrusted piece of software.


  • I seem to be in the minority here but I personally prefer using $ and # to denote root. I like this because not everyone uses sudo and might not even have it installed.

    That being said, if you already have other commands that are using sudo -u ... to run commands as a different user then it might be best to just be consistent and prefix everything with it, but if there is only a few of those maybe a # cp foo bar && chown www-data bar is an alternative.



  • The way I remember the order is that the parentheses around the link would make grammatical sense outside of markdown (the goal of markdown is to still be fully readable even when looking at the raw source).

    For example if I were posting on a forum that didn’t have markdown support which one of these would make more sense:

    1. You can find that on this lemmy instance (https://lemmy.world).
    2. You can find that on (this lemmy instance) https://lemmy.world.

    Option 2 makes no sense grammatically. Then you just need to use the square brackets (which rarely show up in non-markdown text) to denote the link range.


    Alternatively, if you still have a hard time remembering the order, you can use reference-style links which make it even more readable outside of markdown rendered contexts (note that there are no parentheses in this version, nothing to get confused):

    [Here is a link][1] and [here is another link][2].
    
    [1]: http://example.org
    [2]: http://example.com
    

  • Personally I think Spotify is worth $10 a month.

    While I agree that there aren’t any great self-hosted solutions, more diversity in the music space is important. I refuse to use Spotify, and for me it’s not about price. In fact, if they charged more and actually paid their artists more I would probably hate it less. But overall I mostly refuse to use it for other reasons:

    It couples the company that delivers your music with the app you must use to stream your music. In my opinion these should be separate - perhaps an open protocol that streaming companies can all use and open source clients that can connect to one or many of them?

    Spotify made it clear that they don’t care about Linux users when they killed their Linux client. Yes I know about librespot, it’s only a trivial decision away from Spotify killing it. And unlike Reddit’s API changes, the backlash would be minimal since most people use the official one.

    It strongly relies on network effects to get everyone on the platform and keep them there. As mentioned above, this hurts independent artists because they are forced to publish their music on a platform that doesn’t pay well just because everyone is on that platform. But there are more than just network effects between artists and consumers: Spotify relies on social-network style antipatterns to keep users in their ecosystem. I’ve been told by my friends that I am “difficult” because I don’t use Spotify and they want to share something with me. That is Spotify’s manipulation

    Their official client is electron, I don’t want to have to run a whole browser stack to listen to music. Not to mention the fact that npm is plagued with supply chain problems and unless the Spotify devs manually audit every dependency of every dependency of every dependency any time they add or update one (doubt it), users are one attack away from being compromised.

    When I did briefly use Spotify many years ago I took the time to build up some playlists of music and randomly songs would disappear from the playlists when Spotify lost rights to stream it.


    I personally use Bandcamp for recommendations/discovery, and then purchase music I like to listen to and self-host it with MPD. It works great.

    I’m not saying this is for everyone, obviously streaming has its merits. But in my experience most people self host not because something costs money, but because they have zero control of the actual experience, and they want to avoid the vendor lock-in issue.


  • 418teapot@lemmy.worldtoMatrix@lemmy.mlGood Matrix homeservers?
    link
    fedilink
    arrow-up
    0
    arrow-down
    1
    ·
    1 year ago

    In my opinion getting on the federated messaging train is far more important than what initial homeserver you start on. Technologies like matrix, mastadon and lemmy suffer from network effects and I personally feel like the biggest hurdle is getting over that initial painful hump of getting yourself and the people you want to communicate with all using the technology.

    Once you are using the platform regularly you’ll have a much better outlook on which homeservers have the users/rooms that you mostly communicate with and you can move there.

    I used matrix.org as a home server for years until recently decided that I wanted to support the decentralization and stood up my own instance for me and my close friends to use.

    I plan on doing the same with lemmy. I just discovered lemmy today. I have always thought reddit-style boards were prime candidates for federating, but didn’t know about this project’s existence. I initially had the same hesitation as you when it came time to choose a lemmy instance, but realized it doesn’t matter. I just ended up choosing lemmy.world for now until I get more acclimated with the space and then will either stay here, move to another server or self-host.