@scy@chaos.social
@scy@chaos.social avatar

scy

@scy@chaos.social

Nerd. Freelance Software Dev. Relationship Anarchist. Sometimes lives in a van. Queer white cis dude, promotes anti-capitalism, anti-fascism, intersectional feminism, the fight against climate change, and thoughtful, ethical behavior in general.

Toots in English or German about software development (mainly Python, JavaScript, Shell), Linux, Vim, electronics/µCs, van life, politics, sex, (inter)personal & emotional things, music, Star Trek, beverages.

May contain awful puns.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

zekjur, to random
@zekjur@mas.to avatar

Wow, apparently Python virtualenvs can break when you update your system:

zsh: /home/michael/src/pretix/env/bin/pip3: bad interpreter: /home/michael/src/pretix/env/bin/python3.11: no such file or directory

The env/bin/python3.11 symlink points to /usr/bin/python3.11, which no longer exists (it’s now python3.12).

Apparently the --copies flag is available to prevent this, but not enabled by default.

scy,
@scy@chaos.social avatar

@zekjur Not sure whether --copies would really fix this, because upgrading from 3.11 to 3.12 might also get rid of some runtime files or move them to unexpected places.

Also, depending on your Python version, some dependencies might install in different versions, or not at all, or new ones might be introduced.

Really, upgrading the system Python interpreter is kinda disruptive and venv recreation probably the best thing to do.

Or use pyenv for completely independent interpreter installs.

scy, to vim
@scy@chaos.social avatar

There are days when I'd like to throw Vim at the wall.

:set stl=%f%{&modified?'\ •':''}

will have a status line like

README.md •

with the bullet point (•) if the file is modified.

:set stl=%{fnamemodify(expand('%%:p'),':~:.')}%{&modified?'\ •':''}

will eat the space before the bullet point for some reason.

All I did is replace %f with the %{…} expression.

This happens both in 9.0.1378 and 0.7.2, and also if I replace • with any other character.

Ideas, anyone?

scy,
@scy@chaos.social avatar

@deoxys314 Yes. Feel free to try it out.

scy,
@scy@chaos.social avatar

Adding a second space before the bullet point in the %{&modified expression fixes it, i.e. there's now a single space between the file name and the bullet point.

So apparently Vim doesn't eat all of the leading spaces, but only the first one.

There are bug reports for this since 2017, with https://github.com/vim/vim/issues/3898 being the one that's currently still open. People are hesitant to fix it, for xkcd 1172 reasons.

Well then.

commits the two-space version to dotfiles, moves on

scy,
@scy@chaos.social avatar

@pianosaurus Apparently it is, thanks. Just found it too while preparing to open an issue about it.

scy,
@scy@chaos.social avatar

@taxorubio Yeah I just found https://github.com/vim/vim/issues/3898 which is basically it.

scy,
@scy@chaos.social avatar

@deoxys314 I've reproduced it even in Neovim 0.10 just now 🤷‍♂️

scy,
@scy@chaos.social avatar

@deoxys314 With an existing file.

scy,
@scy@chaos.social avatar

@deoxys314 I don't think this matters, even setting

:set stl=%{''}%{&modified?'\ M':''}

will result in the status line being just

M

without a leading space, but the second expression is clearly returning one.

scy,
@scy@chaos.social avatar

Okay, I did not move on, I've opened https://github.com/neovim/neovim/issues/28918 in Neovim, maybe they're willing to break compatibility here to make it more consistent.

kunsi, to random German
@kunsi@chaos.social avatar

500ml Spezi getrunken.
Jetzt bin ich müde.

🙄

scy,
@scy@chaos.social avatar

@kunsi sicher dass es nicht Spät-zi war? 🤡

scy, to python
@scy@chaos.social avatar

Since sometimes I'm eagerly waiting for to update to a new version, I now have a small command to check it for me.

https://codeberg.org/scy/dotfiles/src/commit/5679998191b7c6f76058050b26976b94c35e1e52/bin/codeberg-version.py

(Made it a goal to not require third-party libraries or tools for such a small task, but damn I totally get why nobody is using 's builtin HTTP client directly 😬)

scy,
@scy@chaos.social avatar

@fogti Yes it is.

• You have to split the URL into scheme, host, and path yourself.
• You have to choose whether to create an HTTPConnection or HTTPSConnection based on the scheme.
• You have to supply the Host header manually.
• Instead of .request() returning the response object, you have to get it using an additional .getresponse() call.
• There's no convenience method like requests' .raise_for_status().

scy, to random German
@scy@chaos.social avatar

Da steht: Trauerfeierlichkeiten für Irans Präsidenten

Ich las: Trauerfeierlichkeiten für trans Präsidenten

scy, to random
@scy@chaos.social avatar

The fact that OpenAI chose Scarlett Johansson, of all people, to fuck with, is somewhat hilarious to me.

That's the person who sued fucking Disney(!) and made them pay her an additional $40M (on top of the $20M in her contract) when they released Black Widow (2011) to Disney+ simultaneously to the cinematic release.

https://en.wikipedia.org/wiki/Black_Widow_(2021_film)#Lawsuit#Lawsuit)

Classic techbro hybris.

blotto, to random
@blotto@chaos.social avatar

„Praxis“ Tipps

scy,
@scy@chaos.social avatar

@blotto :

Zwei laminierte A4-Schilder an einer Holztür.

Das obere zeigt eine Art blaues Siegel, umrahmt mit den Worten "Patientenschutz hat Vorrang", darin der Text "In unserer telematikfreien Praxis sind Ihre Daten sicher".

Das untere beinhaltet den eher hässlich layouteten zentrierten Text: "Aufgrund des aktuellen Datenschutzgesetzes bitte Wartezimmertür immer schließen. Vielen Dank für Ihre Mithilfe."

arne, to random
@arne@spezi.social avatar

Tell me your favourite chart type!

scy,
@scy@chaos.social avatar
scy, to random German
@scy@chaos.social avatar

Eben in nem Forgejo-Diff das Wort "gevendort" gelesen und es für den Username irgendeiner Niederländerin gehalten

Nee, es ist die deutsche Übersetzung einer Markierung an Third-Party-Dateien, die im Englischen "vendored" heißt.

Gevendort halt 🤷‍♂️😬

https://forgejo.org/docs/latest/user/language-detection/

scy,
@scy@chaos.social avatar

@n0toose Nein, ich glaube, das ist wahrscheinlich schon das beste bzw. korrekteste Wort dafür. Es ist einfach nur… sehr selten.

Like, "vendored" is not a very common word to begin with, and translating that participle to German makes it even more uncommon. And on top of that it's not helpful that it starts with "geven", which looks really Dutch :)

scy,
@scy@chaos.social avatar

@n0toose Das ist keine gute Idee, das ist sogar eine exzellente Idee. Weil ja, ich hatte mich definitiv gefragt, was das für ne Markierung ist, wo sie herkommt, was sie bedeutet und warum sie wichtig ist. Ein Info-Icon würde helfen, vielleicht am ehesten mit einer kurzen Erklärung (ein paar Wörter reichen, sowas wie "third party files that did not originate in this repository"), und einem Link zu https://forgejo.org/docs/latest/user/language-detection/ für weitere Infos.

scy,
@scy@chaos.social avatar

@jendrik linguee.com kennt auch Milchmädchen nicht als Verb, trotzdem können du und ich uns beide was unter "die Abrechnung war gemlichmädchent" vorstellen.

scy, to random
@scy@chaos.social avatar

Interesting educational video on how duct tape works, and the engineering challenges that had to be overcome. It only scratches the surface, but it's nevertheless an intriguing overview.

https://youtu.be/E-F2QQuZZGk (11 min)

jyn42, to random
@jyn42@mastodon.social avatar

Ok, ich hab jetzt einige Zeit in der Public Timeline verbracht, aber so richtig angefixt hat mich Mastodon nicht. Was mache ich falsch? Fehlt mir hier die Wohlfühl-Bubble?

scy,
@scy@chaos.social avatar

@jyn42 Denke, was du vor allem "falsch" machst: es eilig haben. Du bist keine 24h hier.

Die meisten Leute sind inzwischen gewohnt, von nem absichtlich auf Sucht, FOMO und Engagement ausgelegten Algorithmus kontinuierlich Kram vorgesetzt zu bekommen.

Das gibt's hier aber halt nicht.

Tipps:

Such nach ein paar Hashtags zu Themen, die dich interessieren. Folge dort großzügig Leuten. Entfolgen kannst du später immer noch, wenn's nicht passt. Und: Du kannst Hashtags folgen. Kann auch cool sein.

scy,
@scy@chaos.social avatar

@jyn42 Gerne :) Um da noch nen positiven Spin reinzubringen, du machst auch einiges richtig, nämlich Fragen stellen (die Leute hier beantworten liebend gern Dinge, manchmal sogar mehr als gut ist) und einfach mit random Leuten interagieren.

Du kannst aber auch einfach schreiben, was dir in den Sinn kommt, so als wär's nur für dich. Manchmal sehen das dann Leute in der Public Timeline und reagieren drauf.

Bisschen was in dein Profil schreiben schadet auch nicht, und wenn's nur n Spruch ist ;)

scy, to random
@scy@chaos.social avatar

Did you know that you can have a CLI config file? Pretty handy for changing the default memory limit, output format, or even print a nice banner.

Here's mine:
https://codeberg.org/scy/dotfiles/src/commit/dbe858184c07634d16065773e31bf6c1cb50b357/.sqliterc

It allows SQLite to use up to 1 GiB of page cache, uses nice Unicode box drawing characters, and tracks the runtime of queries by default. It also reminds me of how to turn these things off again.

(Pro tip: Set .timer on last, else it will print the stats for each of the start-up commands … 😬)

scy,
@scy@chaos.social avatar

Also, if you have a look at https://sqlite.org/cli.html you'll see that you can customize the prompt using the .prompt "first line" "continuation" command.

And I've tried to create a fancy, colorful, nerd font prompt … and failed.

That's because both of the prompt strings are limited to 20 bytes by default (including a terminating null byte, I think). Also, even if you manage to cram ANSI codes into 20 bytes, the cursor positioning will have trouble with the non-printable characters. 😭

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • kavyap
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • tacticalgear
  • cubers
  • Youngstown
  • mdbf
  • slotface
  • rosin
  • osvaldo12
  • ngwrru68w68
  • GTA5RPClips
  • provamag3
  • InstantRegret
  • everett
  • Durango
  • cisconetworking
  • khanakhh
  • ethstaker
  • tester
  • anitta
  • Leos
  • normalnudes
  • modclub
  • megavids
  • lostlight
  • All magazines