danielquinn

joined 1 year ago
[–] danielquinn@lemmy.ca 6 points 16 hours ago

Filed under "Ties that inexplicably existed in the first place".

[–] danielquinn@lemmy.ca 5 points 17 hours ago

Generally, I agree. I think what I meant by the above is "how would you tell someone how to use the thing". My favourite example is email vs email-with-PGP.

How do you send an email?

  1. Open client
  2. Click "send new email"
  3. Type your email
  4. Click send

How do you send a PGP-encrypted email

Let's first talk about this thing called a "keyserver". Once you know what that is, you'll have to go out and find some keys to add to it. We're not going to talk about styling your message 'cause that's not something you should be able to do... etc. etc.

[–] danielquinn@lemmy.ca 13 points 18 hours ago (4 children)

This is a common problem with Free software, and honestly I think it's our biggest one: we build stuff for ourselves and stop there. If we want our stuff to be adopted (which, for things that rely on network effects, we do) then we need to pay more attention to usability.

Here's a suggestion for anyone starting a project they think they might share. Before you start writing any code, write the documentation. Then rewrite it from the perspective of the least tech-literate person you know who you'd still want to use the project. Only after you've worked out how easy it should be for this person to get started, then you can start writing the thing.

[–] danielquinn@lemmy.ca 3 points 2 days ago

Honestly, her party needs more people like her.

[–] danielquinn@lemmy.ca 3 points 2 days ago (2 children)

That was really interesting, thanks for sharing!

[–] danielquinn@lemmy.ca 1 points 4 days ago

So let's get the licensing bit out of the way first. I am 100% confident that you're wrong on this. The GPL is a copyright license and like all copyright licenses, it applies to the work and your rights to copy it. If you choose to copy the contents of a GPL project's code into your own project, the license dictates that you must license your project under the GPL. For example, if you were to build a new kernel for your own special operating system and copy out significant portions of the Linux kernel to do it, your new kernel will be covered by the GPL.

You may be confusing the GPL with the LGPL here, which specifically has an exemption for linking. Under that license, you can link to a GPL project (it's not clear if a Python import would qualify as this was originally written for external modules in C projects) without your project being covered by the GPL.

You're also misunderstanding "distribution" here. While it's true that there's a distinction between the GPL and AGPL in how this word is defined, it does not affect how the license applies. To use another example, the fuzzywuzzy project is GPL-licensed, so if you were to use it in your Django project, it would necessarily make your Django project GPL. However, as "distribution" under the GPL applies only to sharing copies of the project with others and not to services provided over the web, your project will be GPL, but you'll be under no obligation to share the source with anyone unless you were to copy the project onto someone's laptop. So long as your project is just a webserver sending HTML to the user, you're under no obligation to share the source code for your server.

The AGPL on the other hand includes accessing the software over a network under its definition of "distribution" and so if fuzzywuzzy were AGPL licensed, this would require you to publish your Django project's source publicly.

Source: I too have been reading heavily on this front for about 23 years, so much so that I married a copyright lawyer. We talk about this stuff a lot.

Regarding the secrets in-repo, I'm not going to fight you on this. In my experience it's a Great Big Pain In The Ass to manage these things and I think you may be overlooking just how many of the devs on your team may need the rights to read/write production values.

As for the making the distinction between settings and configuration, again I think you're going to live to regret this as every company I've started at that employs this pattern has. You simply can't have your development, testing, and production environments running different middleware classes (as your example suggests) and not be due for a surprise in production. No, your settings should be as close to production in all environments as possible, and breaking your settings up like this is just begging for deviation.

As for the claim that only 99% of problems in production are data-related, that too is not my experience with such systems. If you're talking to S3 in production and local folders in development, or SQS in production and synchronous execution in development, you will have problems, and you won't be able to detect them, let alone debug and fix them in an environment that doesn't match the place you're deploying to.

[–] danielquinn@lemmy.ca 5 points 1 week ago

Israel has worked very hard to build that assumption everywhere it can, driving home that a lack of support for anything Israel does is somehow antisemitic. They use people like your wife as a shield for their crimes and a disturbing portion of her community is cheerleading their genocide.

They are doing this in her name, whether she "cares about politics" or not, so I would suggest she get out there with her community and remind the world that Israel does not speak for her.

[–] danielquinn@lemmy.ca 4 points 1 week ago (1 children)

Or just to bring the housing prices down for them to afford.

[–] danielquinn@lemmy.ca 12 points 1 week ago

GitLab. The CI is fantastic.

[–] danielquinn@lemmy.ca 3 points 1 week ago

Please tell me that your username is a reference to Rainbow Rangers. My 5 year old daughter would be tickled pink.

[–] danielquinn@lemmy.ca 55 points 1 week ago (5 children)

I think what he's missing is that he's approaching the question of "how do I make these people care?" from a liberal position. It just seems like such a weird question to even ask someone who cares about others by default.

If you think of it from the perspective of a self-centred conservative though, you can ask the question as "how can I frame the pain of others as their problem?"

Try talking about solutions in a way that affects them personally:

  • You want transit and bike lanes 'cause nothing reduces traffic other than viable alternatives to driving. Get those other people off the road so you can drive.
  • You want to stop sending weapons to Israel because we're spending your money on weapons for their war.
  • You want to divest from fossil fuels because renewables have better energy security. Your costs don't go up whenever those people start a war over there.
  • You want high taxes on the rich because they're festering parasites sleeping on a pile of gold and we want to spend that money on the poor so they aren't so desperate that they steal your shit.

The people do not (cannot?) care about how many children are killed by our bombs or about the fate of some bird, so constantly appealing to emotional arguments meant for liberals will never work on them.

62
Developing with Docker (danielquinn.org)
submitted 3 weeks ago* (last edited 3 weeks ago) by danielquinn@lemmy.ca to c/python@programming.dev
 

I've been writing code professionally for 24 years, 15 of which has been Python and 9 years of that with Docker. I got tired of running into the same complications every time I started a new job, so I wrote this. Maybe you'll find it useful, or it could even start a conversation, but this post has been a long time coming.

Update: I had a few requests for a demo repo as a companion to this post, so I wrote one today. It includes a very small Django demo user Docker, Compose, and GitLab CI.

 

...so I found out how to fix it

 

It would seem that I have far too much time on my hands. After the post about a Star Trek "test", I started wondering if there could be any data to back it up and... well here we go:

Those Old Scientists

Name Total Lines Percentage of Lines
KIRK 8257 32.89
SPOCK 3985 15.87
MCCOY 2334 9.3
SCOTT 912 3.63
SULU 634 2.53
UHURA 575 2.29
CHEKOV 417 1.66

The Next Generation

Name Total Lines Percentage of Lines
PICARD 11175 20.16
RIKER 6453 11.64
DATA 5599 10.1
LAFORGE 3843 6.93
WORF 3402 6.14
TROI 2992 5.4
CRUSHER 2833 5.11
WESLEY 1285 2.32

Deep Space Nine

Name Total Lines Percentage of Lines
SISKO 8073 13.0
KIRA 5112 8.23
BASHIR 4836 7.79
O'BRIEN 4540 7.31
ODO 4509 7.26
QUARK 4331 6.98
DAX 3559 5.73
WORF 1976 3.18
JAKE 1434 2.31
GARAK 1420 2.29
NOG 1247 2.01
ROM 1172 1.89
DUKAT 1091 1.76
EZRI 953 1.53

Voyager

Name Total Lines Percentage of Lines
JANEWAY 10238 17.7
CHAKOTAY 5066 8.76
EMH 4823 8.34
PARIS 4416 7.63
TUVOK 3993 6.9
KIM 3801 6.57
TORRES 3733 6.45
SEVEN 3527 6.1
NEELIX 2887 4.99
KES 1189 2.06

Enterprise

Name Total Lines Percentage of Lines
ARCHER 6959 24.52
T'POL 3715 13.09
TUCKER 3610 12.72
REED 2083 7.34
PHLOX 1621 5.71
HOSHI 1313 4.63
TRAVIS 1087 3.83
SHRAN 358 1.26

Discovery

Important Note: As the source material is incomplete for Discovery, the following table only includes line counts from seasons 1 and 4 along with a single episode of season 2.

Name Total Lines Percentage of Lines
BURNHAM 2162 22.92
SARU 773 8.2
BOOK 586 6.21
STAMETS 513 5.44
TILLY 488 5.17
LORCA 471 4.99
TARKA 313 3.32
TYLER 300 3.18
GEORGIOU 279 2.96
CULBER 267 2.83
RILLAK 205 2.17
DETMER 186 1.97
OWOSEKUN 169 1.79
ADIRA 154 1.63
COMPUTER 152 1.61
ZORA 151 1.6
VANCE 101 1.07
CORNWELL 101 1.07
SAREK 100 1.06
T'RINA 96 1.02

If anyone is interested, here's the (rather hurried, don't judge me) Python used:

#!/usr/bin/env python

#
# This script assumes that you've already downloaded all the episode lines from
# the fantastic chakoteya.net:
#
# wget --accept=html,htm --relative --wait=2 --include-directories=/STDisco17/ http://www.chakoteya.net/STDisco17/episodes.html -m
# wget --accept=html,htm --relative --wait=2 --include-directories=/Enterprise/ http://www.chakoteya.net/Enterprise/episodes.htm -m
# wget --accept=html,htm --relative --wait=2 --include-directories=/Voyager/ http://www.chakoteya.net/Voyager/episode_listing.htm -m
# wget --accept=html,htm --relative --wait=2 --include-directories=/DS9/ http://www.chakoteya.net/DS9/episodes.htm -m
# wget --accept=html,htm --relative --wait=2 --include-directories=/NextGen/ http://www.chakoteya.net/NextGen/episodes.htm -m
# wget --accept=html,htm --relative --wait=2 --include-directories=/StarTrek/ http://www.chakoteya.net/StarTrek/episodes.htm -m
#
# Then you'll probably have to convert the following files to UTF-8 as they
# differ from the rest:
#
# * Voyager/709.htm
# * Voyager/515.htm
# * Voyager/416.htm
# * Enterprise/41.htm
#

import re
from collections import defaultdict
from pathlib import Path

EPISODE_REGEX = re.compile(r"^\d+\.html?$")
LINE_REGEX = re.compile(r"^(?P<name>[A-Z']+): ")

EPISODES = Path("www.chakoteya.net")
DISCO = EPISODES / "STDisco17"
ENT = EPISODES / "Enterprise"
TNG = EPISODES / "NextGen"
TOS = EPISODES / "StarTrek"
DS9 = EPISODES / "DS9"
VOY = EPISODES / "Voyager"

NAMES = {
    TOS.name: "Those Old Scientists",
    TNG.name: "The Next Generation",
    DS9.name: "Deep Space Nine",
    VOY.name: "Voyager",
    ENT.name: "Enterprise",
    DISCO.name: "Discovery",
}


class CharacterLines:
    def __init__(self, path: Path) -> None:
        self.path = path
        self.line_count = defaultdict(int)

    def collect(self) -> None:
        for episode in self.path.glob("*.htm*"):
            if EPISODE_REGEX.match(episode.name):
                for line in episode.read_text().split("\n"):
                    if m := LINE_REGEX.match(line):
                        self.line_count[m.group("name")] += 1

    @property
    def as_tablular_data(self) -> tuple[tuple[str, int, float], ...]:
        total = sum(self.line_count.values())
        r = []
        for k, v in self.line_count.items():
            percentage = round(v * 100 / total, 2)
            if percentage > 1:
                r.append((str(k), v, percentage))
        return tuple(reversed(sorted(r, key=lambda _: _[2])))

    def render(self) -> None:
        print(f"\n\n# {NAMES[self.path.name]}\n")
        print("| Name             | Total Lines | Percentage of Lines |")
        print("| ---------------- | :---------: | ------------------: |")
        for character, total, pct in self.as_tablular_data:
            print(f"| {character:16} | {total:11} | {pct:19} |")


if __name__ == "__main__":
    for series in (TOS, TNG, DS9, VOY, ENT, DISCO):
        counter = CharacterLines(series)
        counter.collect()
        counter.render()
 

My father is 75 and not very capable on a computer. He's got an old MacBook Air at home behind a typical ISP router for which he has no access controls (so no port forwarding).

My immediate need is actually not his machine at all, but the Raspberry Pi I installed at his house before I left the country and forgot to enable cron on so it's not doing what I need yet. However, it would be really nice if I could also do one of the following as well:

  • VNC (or something) into his computer whenever something "isn't working" rather than doing the talk-him-through-it dance over Skype.
  • Install a new OS (the Mac is no longer supported by MacOS). I don't know how plausible this is though.

My current plan is to email him a shell script that should create a reverse SSH tunnel to a server in Montréal or something and then I can shell into his Mac through there. It's not ideal though since we're still talking shell scripts and he's easily frustrated.

I know that in Windows land there are all sorts of tools scammers use to take over a machine remotely. Does Mac allow for the same thing? Note that I only have Linux machines available to me on this side of the Atlantic.

 

I'm working on a some materials for a class wherein I'll be teaching some young, wide-eyed Windows nerds about Linux and we're including a section we're calling "foot guns". Basically it's ways you might shoot yourself in the foot while meddling with your newfound Linux powers.

I've got the usual forgetting the . in lines like this:

$ rm -rf ./bin

As well as a bunch of other fun stories like that one time I mounted my Linux home folder into my Windows machine, forgot I did that, then deleted a parent folder.

You know, the war stories.

Tell me yours. I wanna share your mistakes so that they can learn from them.

Fun (?) side note: somehow, my entire ${HOME}/projects folder has been deleted like... just now, and I have no idea how it happened. I may have a terrible new story to add if I figure it out.

 

I've got a very simple Kodi setup:

  • Arch Linux on a laptop behind the TV
  • Media files on a server upstairs, shared over NFS

I've been running Kodi quite successfully on this machine for years, but with the Omega update, videos play without audio for about 10seconds, then freeze. Sometimes if I wait a while, I see subtitles for the episode while the video is frozen. Music doesn't play either. The interface freezes too, to the point where I have to kill -9 it. Switching from Wayland to Xorg hasn't had an effect.

I tried deleting ~/.kodi and restarting, but nothing changes.

Has anyone else run into this?

 

A break from the usual in this community, but I trust it'll be appreciated. I think this is very solarpunk: using technology to improve the lives of all creatures.

 

I've been playing a lot of Fallout 4 over the holidays. I started and finished the Nuka World DLC (killed all the baddies), made it to level 90, etc.

Today I was playing on my Deck as the battery got a little low (11%) so I saved my game, exited the game, and went to shut down.

As it was shutting down, the Deck displayed a message, something like "Syncing to Steam Cloud" as the logo was spinning.

A few hours later, on a full charge, I booted it back up, started Fallout 4 again and... some of my old saves are there, but only about 30% of them, and critically not the most recent ones.

Has this ever happened to anyone else? Is this a known issue? Can I fix it, or report it? I've basically lost interest in finishing the game now.

 

His original post , titled I can't sleep, is some brilliant writing. When we talk about the chilling effect that criticism of Israel creates in industries everywhere (including ours) this is what that looks like.

 

I needed something for a presentation I'm doing on advanced Linux, so I thought something like this might be appropriate.

Annoyingly, I can't seem to get Bing to generate an image that isn't square.

view more: next ›