talkingpumpkin

joined 2 years ago
[–] talkingpumpkin@lemmy.world 5 points 1 day ago (2 children)

almost 300 billion

Which would be... more than 5% of the German GDP?

I'm too lazy to properly fact-check this, but it smells like BS (may be the article, may be a brain fart of mine)

[–] talkingpumpkin@lemmy.world 3 points 3 days ago (1 children)

Don't try to fool me: that's a small scale prototype for the death star superlaser

[–] talkingpumpkin@lemmy.world 16 points 3 days ago

100% powered by renewable energy

Is the supercomputer off the grid and powered by an independent renewable source?

The EU says that JUPITER “runs entirely on renewable energy” to limit its impact on the environment. Lippert says that this is achieved by paying to use only renewable energy from Germany’s national grid.

Oh, so it's greenwashing nonsense and the computer uses the same grid everybody uses, which is only in part powered by renewables. Go figure.

[–] talkingpumpkin@lemmy.world 5 points 4 days ago* (last edited 4 days ago)

Russia has used the widely-banned weapons "extensively"

It must be said that neither Russia nor Ukraine signed the Convention on Cluster Munitions (nor did the US or China or Israel, in case you are wondering... basically, they are banned in roughly half the world - including western Europe, the Commonwealth, and Japan - and perfectly legal in the other half).

Of course, this is not to say that Ukraine used cluster munitions in the same amount or in the same way as the Russians did: the differences in doctrine between the two armies are great and go well beyond cluster munition (see War crimes in the Russian invasion of Ukraine on wikipedia - yes, of course crimes have been reported on the Ukrainian side too, to a much lesser scale).

[–] talkingpumpkin@lemmy.world 10 points 4 days ago

I've long been torn whether we should just ignore this kind of nonsense or call it out.

For a while I believed in ignoring it but, seeing as people seem unable to learn by themselves (at least, in the small world of my acquaintances), I'm now trying calling it out. If nothing else, this will serve to make me feel like I've done something (not much more I can do, honestly).

[–] talkingpumpkin@lemmy.world 78 points 4 days ago (1 children)

After the inverse defense of Russia from Ukraine aggression (the kind of defense where you invade another country that is aggressing you by opposing your invasion), Putin now issues an inverse declaration of war (the kind of declaration of war where you declare someone else is at war with you). What a total buffoon.

[–] talkingpumpkin@lemmy.world 2 points 4 days ago (1 children)

A/C is nice, but you can live without it.

That depends on where you live.

It's now 29°C where I am (feels like 32°), and if you don't find a parking spot in the shade (quite likey, given how coveted they are) entering your car will feel like entering an oven.

Yes, I could survive without A/C (we used to in the olden days), but I am not more likely to buy a car without proper A/C than a Dane is to buy one without heating.

those moped cars [...] are too slow to not even impede the relatively slow traffic in cities

They go 45km/h... how fast do you drive inside the city? (I agree that they are slow and a PITA to encounter outside cities)

[–] talkingpumpkin@lemmy.world 1 points 4 days ago* (last edited 4 days ago) (3 children)

Those aren’t real cars, they have no A/C (yes, I live down south)

[–] talkingpumpkin@lemmy.world 3 points 4 days ago* (last edited 4 days ago)

I had a call with Putin and he says he's really intimidated by the European response and that he will surely stop being a naughty boy from now on (BTW I talked with Nethanyahu the other day and he said the same).

[–] talkingpumpkin@lemmy.world 9 points 4 days ago

Can we get a group discount if we deport ministers from other countries together with him?

[–] talkingpumpkin@lemmy.world 1 points 4 days ago

the translations on the database are for entities on the db

Oh, then you could consider having one extra table per entity (one-to-many) with the translatable stuff:

create table some_entity (
    id .. primary key,
    -- fields for attributes that are not translated
    price ..,
    created_on ..,
    deleted_on ..,
    ..
);
create table some_entity_i18n(
    id .. primary key,
    some_entity_id .. foreign key references some_entity(id),
    locale ..,
    -- one field per translatable attribute
    title ..,
    description ..,
    ..
);

IMHO putting everything in one big table will only complicate things in the long run.

[–] talkingpumpkin@lemmy.world 1 points 5 days ago (4 children)
INSERT INTO TextContent (OriginalText, OriginalLanguage)
VALUES ("Ciao", "it");

Shouldn't that be TextContent(TextContentId, OriginalText)? Something like

(then you should make the id a primary key, index originaltext and make the id in the other table a foreign key)

I could drop TextContent too, and just have a Translations table with TextContentId

Sure, but the you would have to reference the text via TextContentId in your code, which would be very annoying.

Instead you could have a function, say t("Ciao") that kinda runs something like (of course loading all the translations in ram at startup and referencing that would be better than running a query for each and every string).

select t.translation
  from textcontent tc
       join translations t on t.textcontentid = tc.textcontentid
 where tc.originaltext = ?
   and t.language = ?

The function could also return the originaltext and log an error message if a translation is not found.

BTW 1: most frameworks/languages have i18n facilities/libraries - you may investigate one and use it instead of rolling your own.

BTW 2: why would you put the translations in a database? what's the advantage compared to files?

 

A lot of selfhosted containers instructions contain volume mounts like:

docker run ...
  -v /etc/timezone:/etc/timezone:ro \
  -v /etc/localtime:/etc/localtime:ro \
  ...

but all the times I tried to skip those mounts everything seemed to work perfectly.

Are those mounts only necessary in specific cases?

PS:

Bonus question: other containers instructions say to define the TZ variable. Is that only needed when one wants a container to use a different timezone than the host?

 

Prometheus-alertmanager and graphana (especially graphana!) seem a bit too involved for monitoring my homelab (prometheus itself is fine: it does collect a lot of statistics I don't care about, but it doesn't require configuration so it doesn't bother me).

Do you know of simpler alternatives?

My goals are relatively simple:

  1. get a notification when any systemd service fails
  2. get a notification if there is not much space left on a disk
  3. get a notification if one of the above can't be determined (eg. server down, config error, ...)

Seeing graphs with basic system metrics (eg. cpu/ram usage) would be nice, but it's not super-important.

I am a dev so writing a script that checks for whatever I need is way simpler than learning/writing/testing yaml configuration (in fact, I was about to write a script to send heartbeats to something like Uptime Kuma or Tianji before I thought of asking you for a nicer solution).

 

I'm not much hoepful, but... just in case :)

I would like to be able to start a second session in a window of my current one (I mean a second session where I log in as a different user, similar to what happens with the various ctrl+alt+Fx, but starting a graphical session rather than a console one).

Do you know of some software that lets me do it?

Can I somehow run a KVM using my host disk as a the disk for the guest VM (and without breaking stuff)?

 

I have two subnets and am experiencing some pretty weird (to me) behaviour - could you help me understand what's going on?


Scenario 1

PC:                        192.168.11.101/24
Server: 192.168.10.102/24, 192.168.11.102/24

From my PC I can connect to .11.102, but not to .10.102:

ping -c 10 192.168.11.102 # works fine
ping -c 10 192.168.10.102 # 100% packet loss

Scenario 2

Now, if I disable .11.102 on the server (ip link set <dev> down) so that it only has an ip on the .10 subnet, the previously failing ping works fine.

PC:                        192.168.11.101/24
Server: 192.168.10.102/24

From my PC:

ping -c 10 192.168.10.102 # now works fine

This is baffling to me... any idea why it might be?


Here's some additional information:

  • The two subnets are on different vlans (.10/24 is untagged and .11/24 is tagged 11).

  • The PC and Server are connected to the same managed switch, which however does nothing "strange" (it just leaves tags as they are on all ports).

  • The router is connected to the aformentioned switch and set to forward packets between the two subnets (I'm pretty sure how I've configured it so, plus IIUC the second scenario ping wouldn't work without forwarding).

  • The router also has the same vlan setup, and I can ping both .10.1 and .11.1 with no issue in both scenarios 1 and 2.

  • In case it may matter, machine 1 has the following routes, setup by networkmanager from dhcp:

default via 192.168.11.1 dev eth1 proto dhcp              src 192.168.11.101 metric 410
192.168.11.0/24          dev eth1 proto kernel scope link src 192.168.11.101 metric 410
  • In case it may matter, Machine 2 uses systemd-networkd and the routes generated from DHCP are slightly different (after dropping the .11.102 address for scenario 2, of course the relevant routes disappear):
default via 192.168.10.1 dev eth0 proto dhcp              src 192.168.10.102 metric 100
192.168.10.0/24          dev eth0 proto kernel scope link src 192.168.10.102 metric 100
192.168.10.1             dev eth0 proto dhcp   scope link src 192.168.10.102 metric 100
default via 192.168.11.1 dev eth1 proto dhcp              src 192.168.11.102 metric 101
192.168.11.0/24          dev eth1 proto kernel scope link src 192.168.11.102 metric 101
192.168.11.1             dev eth1 proto dhcp   scope link src 192.168.11.102 metric 101

solution

(please do comment if something here is wrong or needs clarifications - hopefully someone will find this discussion in the future and find it useful)

In scenario 1, packets from the PC to the server are routed through .11.1.

Since the server also has an .11/24 address, packets from the server to the PC (including replies) are not routed and instead just sent directly over ethernet.

Since the PC does not expect replies from a different machine that the one it contacted, they are discarded on arrival.

The solution to this (if one still thinks the whole thing is a good idea), is to route traffic originating from the server and directed to .11/24 via the router.

This could be accomplished with ip route del 192.168.11.0/24, which would however break connectivity with .11/24 adresses (similar reason as above: incoming traffic would not be routed but replies would)...

The more general solution (which, IDK, may still have drawbacks?) is to setup a secondary routing table:

echo 50 mytable >> /etc/iproute2/rt_tables # this defines the routing table
                                           # (see "ip rule" and "ip route show table <table>")
ip rule add from 192.168.10/24 iif lo table mytable priority 1 # "iff lo" selects only 
                                                               # packets originating
                                                               # from the machine itself
ip route add default via 192.168.10.1 dev eth0 table mytable # "dev eth0" is the interface
                                                             # with the .10/24 address,
                                                             # and might be superfluous

Now, in my mind, that should break connectivity with .10/24 addresses just like ip route del above, but in practice it does not seem to (if I remember I'll come back and explain why after studying some more)

 

I want to have a local mirror/proxy for some repos I'm using.

The idea is having something I can point my reads to so that I'm free to migrate my upstream repositories whenever I want and also so that my stuff doesn't stop working if some of the jankiest third-party repos I use disappears.

I know the various forjego/gitea/gitlab/... (well, at least some of them - I didn't check the specifics) have pull mirroring, but I'm looking for something simpler... ideally something with a single config file where I list what to mirror and how often to update and which then allows anonymous read access over the network.

Does anything come to mind?

view more: next ›