Canadian software engineer living in Europe.

  • 3 Posts
  • 58 Comments
Joined 1 year ago
cake
Cake day: June 7th, 2023

help-circle

  • Daniel Quinn@lemmy.catoLinux@lemmy.mlIs Linux As Good As We Think It Is?
    link
    fedilink
    English
    arrow-up
    28
    arrow-down
    1
    ·
    1 month ago

    You make an excellent point. I have a lot more patience for something I can understand, control, and most importantly, modify to my needs. Compared to an iThing (when it’s interacting with other iThings anyway) Linux is typically embarrassingly user hostile.

    If course, if you want your iThing to do something Apple hasn’t decided you should want to do, it’s a Total Fucking Nightmare to get working, so you use the OS that supports your priorities.

    Still, I really appreciate the Free software that goes out of its way to make things easy, and it’s something I prioritise in my own Free software offerings.





  • That you cannot understand technology without understanding the people. And you cannot understand people without understanding politics. Every choice you made has an impact on the world.

    As it happens, I had this very conversation with a high school kid yesterday who was in my office on work experience. She said something to the effect of “I’m not political” to which I looked her dead in the eye and said: “You should be. Everything is political”.

    Thanks for sharing. It’s always good to see people advocating for Free licensing for the right reasons.






  • This might be fun to write actually. Basically you need a central server you connect to via a websocket that would plot points out on a map (maybe with leaflet?) on receipt of notifications pushed via said socket.

    The trouble of course is that with a central server, you tend to incur costs, so you’d have to pay, unless some sort of P2P mesh could be established between participating parties. That’d be a fun problem to solve for sure.




  • Daniel Quinn@lemmy.catoLinux@lemmy.mlStopping a badly behaved bot the wrong way.
    link
    fedilink
    English
    arrow-up
    25
    arrow-down
    1
    ·
    edit-2
    6 months ago

    Not throwing any shade, just some advice for the future: try to always consider the problem in the context of the OSI model. Specifically, “Layer 3” (network) is always a better strategy for routing/blocking than “Layer 5” (application) if you can do it.

    Blocking traffic at the application layer means that the traffic has to be routed through (bandwidth consumption) assembled and processed (CPU cost) before a decision can be made. You should always try to limit the stuff that makes it to layer 5 if you’re sure you won’t want it.

    The trouble with layer 3 routing of course is that you don’t have application data there. No host name, no HTTP headers, etc., just packets with a few bits of information:

    • source IP and port
    • destination IP and port
    • A few other firewall-specific bits of information like whether this packet is part of an established connection (syn) etc.

    In your case though, you already knew what you didn’t want: traffic from a particular IP, and you have that at the network layer.

    At that point, you know you can block at layer 3, so the next question is how far up the chain can you block it?

    Most self-hosters will just have their machines on the open internet, so their personal firewall is all they’ve got to work with. It’s still better than letting the packets all the way through to your application, but you still have to suffer the cost of dropping each packet. Still, it’s good enough™ for most.

    In your case though, you had setup the added benefit of Cloudflare standing between you and your server, so you could move that decision making step even further away from you, which is pretty great.






  • These are fun questions! There’s a few other things you have to consider though before you can have some answers.

    If the work was done for your employer (non-commercial, academic, or otherwise) you should be sure that your work for that organisation did not include the transfer of ownership of the work you create to said organisation. Most organisations that employ people to write software usually include a stipulation in your contract that anything you create “in the course of your employment” (this is a legal term meaning work you do for your job as well as work you might do related to you job as inspiration/necessity for your job etc) is owned by the employer. If that’s the case for you, you can’t simply re-license the software, even if it’s already publicly viewable. You need to seek the consent of the copyright owner to either (a) transfer the ownership to you, or (b) agree to a new license.

    Which brings me to the first thing people tend to forget about copyright: unless otherwise stipulated (like through the inclusion of a LICENSE file) all creative works are copyrighted and cannot be copied, imported, modified, distributed, etc. without the express consent of the copyright holder (usually through a licensing agreement).

    So with that in mind, and assuming that you already have the copyright to this code, I’ll answer your three questions:

    1. Can I just add a license after the fact and it will be valid for all prior work?

    This is fun question because it hinges on a silly technicality of software development. If you add a license to your repo today, the license applies to the code as of that point in the commit history. There’s no official way to say (through the standard of including a file in the repo) that this license applies retroactively, but if you’re the sole copyright holder (see notes on this below) of the work in its current state as well as everything that came before (ie. you didn’t get PRs from other people thinking they were committing to a project under a proprietary license) then practically speaking, you can apply a Free license to all the old versions because you’re the copyright holder – you can do whatever you want. The problem is a practical one: without a LICENSE file, it’s not clear that this software is Free.

    Unless you’ve got a bunch of other people/teams/organisations working off of forks of your current codebase though, it’s really just a thought experiment: no one will care because the latest version is Freely licensed. Someone could conceivably fork your repo from an earlier point in history, but without a LICENSE file in that fork, legally speaking that code is solely your property, so copying it would be illegal unless you made a copy for them with a LICENSE file included.

    2. Do I have to make sure the license is included in all branches of the repo, or does this not matter? There are for instance a couple of branches that are used to freeze the state of code at a certain time for reproducibility’s sake (I know this could be solved in a better way, but that’s how it is).

    There’s a lot of overlap here with #1. Basically your old release branches will be copyrighted by you and not licensed Freely. If it’s important to you that these releases also be under your new Free license, then yeah, you’re going to have to include a new commit on each release branch with your LICENSE file. Personally though, I wouldn’t bother. If anyone is using an old release, they’ll get the Free version once they upgrade and that’s usually good enough for most people.

    3. I have myself reused some of the code in my current work for a commercial entity (internal analysis work, only distributed within the organization). Should this influence the type of license I choose? I am considering a GPL-license, but should I go with (what I believe to be) a more permissive license like MIT because of this?

    So much of this centres around the current ownership of all code in the repo. If this were a personal project into which no one but you has ever committed any code and for which there’s no existing contract stating that your-employer-not-you owns the code, then the answer is really simple: it’s your work, you can do whatever you like.

    For example, you can write a program, license it under the AGPL3, and post it on GitLab for all the world to see. Strangers from the other side of the planet can download it, modify it, and run it in their own projects so long as they adhere to the AGPL3 license. So long as you don’t accept any merge requests from anyone else, you can also re-license the code (or a portion thereof) to a private company (your employer, a contract gig, whatever). Remember, it’s your code, you can do with it as you like, so if you choose to give it to a company to build into their proprietary project, there’s no problem.

    The problem comes once you accept code from someone else. If I submit a merge request to your project that fixes a bug, I do so under the terms of that project’s license. My code is AGPL3 because the project’s license is AGPL3. You can’t now take my bugfix and copy that into a private project because I didn’t grant you that right. This is why re-licensing a Free software project, even from GPL-2 to GPL-3 can be really painful: you have to contact each contributor and acquire the right to change the license.

    So, TL;DR: if it’s 100% your code, you can make 10 copies, all under different licenses. Do whatever you want. If it’s 99% your code, you’re bound by the license in affect at the time those other contributions were made.

    [Source: I’m a Free software nerd with a penchant for copyright, so much so that I married a copyright lawyer so we talk about this stuff a lot.]



  • Nifty! I wrote something similar a couple years ago using Vosk for the stt side. My project went a little further though, automating navigating the programs you start. So you could say: “play the witcher” and it’d check if The Witcher was available in a local Kodi instance, and if not, then figure out which streaming service was running it and launch the page for it. It’d also let you run arbitrary commands and user plugins too!

    I ran into two big problems though that more-or-less killed my enthusiasm for developing on it: (1) some of the functionality relied on pyautogui, but with the Linux desktop’s transition to Wayland, some of the functionality I relied on was disappearing. (2) I wanted to package it for Flatpak, and it turns out that Flatpak doesn’t play well with Python. I was also trying to support both arm64 and amd64 which it turns out is also really hard (omg the pain of doing this for the Pi).

    Anyway, maybe the project will serve as some inspiration.