bleistift2

joined 8 months ago
[–] bleistift2@sopuli.xyz 2 points 8 hours ago* (last edited 8 hours ago)

Ich bin seit 2 Jahren in dieser Firma. Ich wurde eingestellt, als sich (geschätzt) 10.000 Menschen insgesamt in Deutschland angesteckt hatten.

[–] bleistift2@sopuli.xyz 4 points 8 hours ago* (last edited 8 hours ago) (2 children)

Meh… GIFs klauen ist schwer… Hier die ganze Szene: https://www.youtube.com/watch?v=rDcK9gvbtas

[–] bleistift2@sopuli.xyz 6 points 9 hours ago* (last edited 9 hours ago)

Ich bin davon ausgegangen, dass die Wählerströme aus Umfragen hochgerechnet sind. Wie wollte man diese Bewegungen aus den reinen Wahlergebnissen raten?

[–] bleistift2@sopuli.xyz 14 points 9 hours ago (4 children)

Ich frage mich, was bei den Leuten los ist, dass 7 von 8 sagen, ihre Wirtschaftliche Lage sei schlecht. Und warum war die wirtschaftliche Situation vor der Wirtschaftskrise 2008 schlecht und ist dann plötzlich gut geworden?

[–] bleistift2@sopuli.xyz 3 points 14 hours ago (1 children)

My initial guess was that sudo would eat up the echo’d foo as the password. Maybe sudo works differently when invoked via zsh?

[–] bleistift2@sopuli.xyz 6 points 14 hours ago (6 children)

Can’t reproduce.

16:22:48:~/tmp$ echo foo | sudo tee newfile
[sudo] Passwort für bleistift2:         
foo

16:23:02:~/tmp$ ls -l newfile
-rw-r--r-- 1 root root 4 Feb 23 16:22 newfile
[–] bleistift2@sopuli.xyz 35 points 14 hours ago* (last edited 14 hours ago)

(Rick and Morty, S01E05)

 

I’m using two keyboard layouts, German (QWERTZ) and German (neo).

I’d like to be able to switch between these two using the Super+Space shortcut. However, that only works for switching from QWERTZ to neo. When the current layout is neo, Super+Space does nothing.

On the other hand, when I’m in neo, Shift+Space does switch the layout, but it’s not supposed to.

How can I fix these two issues?

These are my keyboard settings from the system settings UI:

System:
  Kernel: 5.15.0-133-generic x86_64 bits: 64 compiler: gcc v: 11.4.0 Desktop: Cinnamon 6.0.4
    tk: GTK 3.24.33 wm: muffin vt: 7 dm: LightDM 1.30.0 Distro: Linux Mint 21.3 Virginia
    base: Ubuntu 22.04 jammy
[–] bleistift2@sopuli.xyz 5 points 15 hours ago* (last edited 15 hours ago)

internen Wiki

lol

Erst kürzlich hat er nach dem Zweck einer Datenbank gefragt.

Mein aufrichtiges Beileid.

[–] bleistift2@sopuli.xyz 10 points 16 hours ago (3 children)

So etwas gibt’s bei uns auch. Ich erkläre mir das damit, dass Wissen, das man nicht regelmäßig braucht, zugunsten der ganzen neuen Informationen, die dies Kollegy verarbeiten muss, verworfen wird.

Ich weiß nach meinem Urlaub auch nicht mehr, wie man For-Schleifen schreibt.

 

Kann ich das auch für Menschen haben?

[–] bleistift2@sopuli.xyz 1 points 18 hours ago

Braucht es wirklich eine Direktverbindung nach London? Von wo aus überhaupt? Wer fährt denn regelmäßig von Kontinentaleuropa nach England, besonders jetzt, wo eine EU-Grenze dazwischen liegt.

 
 

Auch wenn es aussieht wie ein geschreddertes Küken, habe ich aus diesem Schreiben keine sinnändernden Abschnitte entfernt.

Die monatliche Grundgebühr […] beträgt ab dem 03.04.2025 32,79€ statt bislang 31,66€.

Die [… Preisanpassung] erfolgt auf Grundlage der Preisanpassungsklausel gemäß Ziffer 9 der […] AGB.

[…]

Wir […] können […] Ihnen [außerdem] mitteilen, dass wir […] die Preisanpassungsklausel […] aus Ihren AGB streichen.

[…]

Sie können der Preispanpassung […] widersprechen […]. Widersprechen Sie […], läuft der Vertrag zu den bisherigen Konditionen weiter.

Was geht hier vor sich?

 
 
 
 

First, some context.

I’ve written a program that starts running when I log on and produces data every two seconds. This daemon keeps all the collected data in memory until it gets terminated (usually when I shutdown the system), when it will dump the collected data to a file on disk.

(These are questionable design decisions, I know, but not the point of this post. Though feel free to comment on them, anyway).

I’ve written another program that reads the data file and graphs it. To get the most current data, I can send the USR1 signal to the daemon, which causes it to dump its data immediately. After restarting the renderer, I can analyze the most current data.

The tech (pregnant women and those faint of heart, be warned)

  • The daemon is written in TypeScript and executed through a on-the-fly transpiler in Node.
  • The data file is just a boring JSON dump.
  • systemd is in charge of starting and stopping the daemon
  • The renderer is a static web page served via a python3 server that uses compiled TypeScript to draw pretty lines on the screen via a charting library.
  • All runs on Linux. Mint, to be specific.

As I’m looking for general ideas for my problem, you are free to ignore the specifics of that tech stack and pretend everything was written in Rust.

Now to the question.

I would like to get rid of the manual sending of the signal and refreshing the web page. I would like your opinions on how to go about this. The aim is to start the web server serving the drawing code and have each data point appear as it is generated by the daemon.

My own idea (feel free to ignore)

My first intuition about this was to have the daemon send its data through a Unix pipe. Using a web server, I could then forward these messages through a WebSocket to the renderer frontend. However, it’s not guaranteed that the renderer will ever start, so a lot of messages would queue up in that pipe – if that is even possible; haven’t researched that yet.

I’d need a way for the web server to inform the daemon to start writing its data to a socket, and also a way to stop these messages. How do I do that?

I could include the web server that serves the renderer in the daemon process. That would eliminate the need for IPC. However, I’m not sure if that isn’t too much mixing of concerns. I would like to have the code that produces the data to be as small as possible, so I can be reasonably confident that it’s capable of running in the background for an extended period of time without crashing.

Another way would be to use signals like I did for the dumping of data. The web server could send, for instance, USR2 to make the daemon write its data to a pipe. But This scenario doesn’t scale well – what if I want to deliver different kinds of messages to the daemon? There are only so many signals.

 
 
 
view more: next ›