@l3viathan@mastodon.social
@l3viathan@mastodon.social avatar

l3viathan

@l3viathan@mastodon.social

Computational Linguist, Software Developer, etc. Recreational linguistics, distributional gastronomics, and applied galettalogy. <3 Vim, Python, JSON, Unicode

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

l3viathan, to random
@l3viathan@mastodon.social avatar

Picking up my brother-in-law from Basel airport, which has a few peculiarities not found in other airports: Despite being on French soil, half the airport pretends to be in Switzerland, and you're effectively crossing a border when walking across the third floor. (There's also a toll-free road coming directly from Switzerland (where Basel actually is)).

l3viathan,
@l3viathan@mastodon.social avatar

@xahteiwi WizzAir (one of the shadiest/cheapest airlines) serves Basel, but not Zürich. (Also, the final destination is Freiburg.)

l3viathan, to random
@l3viathan@mastodon.social avatar

I'm looking for a replacement KVM switch. Minimum specs:

  • 2 computers
  • at least 4 USB-A peripherals
  • (optional) power supply, for power-hungry devices

Everything I find online looks indistinguishable to me, so I'm looking for stuff you've used personally.

blinry, to random
@blinry@chaos.social avatar

Germany currently has a ticket that allows you to use all regional trains in the whole country!

Today, I wanna play a game of random travel with it!

And I need your help: During my trip, I'll post a couple of short-running polls, and you can vote for which train I should take, or where to get off. 😆

My hope is to see new places and get lost! I'll make up the rules as I go.

I will start at Hamburg Central Station. First poll soon!

l3viathan,
@l3viathan@mastodon.social avatar

@blinry can we vote for your accommodation at the end of the day?

l3viathan, to random
@l3viathan@mastodon.social avatar

-Mastodon: Was benutzt ihr als Karten-App zur Routenfindung? Google Maps ist enttäuschend.

scy, to vim
@scy@chaos.social avatar

Hey & bubble:

I’m thinking of writing a small plugin that defines a cmdline mapping to insert the first-level heading, if the current buffer contains a document. The idea is that you have something in the file like

2023-09-25 Meeting Notes

and then, later on, do

:w <some-mapping>.md

which expands to

:w 2023-09-25 Meeting Notes.md

Questions:

• Does such a plugin already exist?
• What would be a good key for that? I’m thinking of <C-R><C-T>, see :h c_CTRL-R

l3viathan,
@l3viathan@mastodon.social avatar

@scy <C-R><C-T> would partially break https://github.com/junegunn/vim-peekaboo (gives you a preview window with the contents of your registers when you press <C-R>)

l3viathan,
@l3viathan@mastodon.social avatar

@scy The built-in stuff is taken care of by peekaboo. If you map something to <C-R><C-T> then <C-R> will be ambiguous and the preview won't work (I've just tried it). I said "partially" because the normal mode functionality of peekaboo is of course unaffected.

l3viathan,
@l3viathan@mastodon.social avatar

@scy (okay, it's not completely broken, because you can just wait the timeout amount and then see the preview window)

l3viathan,
@l3viathan@mastodon.social avatar

@scy Ah! I somehow missed that you specified "cmdline mapping", I guess I just read <C-R> and my mind immediately went to insert mode, sorry.
No problem then, peekaboo doesn't define a mapping for cmdline mode.

l3viathan,
@l3viathan@mastodon.social avatar

@scy IMHO it's fine to consider your software "done"; it works very well for me for years.

It's of course also fine for you to not care about conflicting with a plugin you don't use.

Or you could have the mapping be configurable and fall back to the (IMO pretty good) <C-R><C-G>.

scy, to python
@scy@chaos.social avatar

I need to add timespans (like “5h23m + 8h16m”) often enough that I’ve now built a small Python script that allows me to do that. As a bonus, it displays the result in fractional hours. Good for writing invoices. 😁

$ addtime.py 5:39:03 58:6 51:58 30:49 1:14:1
5:39:03 + 0:58:06 + 0:51:58 + 0:30:49 + 1:14:01 = 9:13:57 (9.23 h)

https://codeberg.org/scy/dotfiles/src/commit/3c1338be3336ec1ec6907fb467504218a9a08325/bin/addtime.py

l3viathan,
@l3viathan@mastodon.social avatar

@scy without any additional files, or would you be fine installing a pytest plugin?

l3viathan,
@l3viathan@mastodon.social avatar

@scy pytest is very extensible. You can write a plugin that you only need to install with pip and then it will automatically be available and enabled. There are also other ways pytest can find plugins (https://docs.pytest.org/en/7.1.x/how-to/writing_plugins.html#plugin-discovery-order-at-tool-startup) but I don't think any of them are any easier.

To make this work, you need to add a special entrypoint, see the pyproject.toml in this repo: https://github.com/L3viathan/pytest-fixture-rtttg

As for the plugin itself, this seems to work: https://gist.github.com/L3viathan/241f092983524f8b94190fa2666e351d

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

Ich so: „Smarte Beleuchtung wär schon nice, aber ich hab gerade keinen Kopf dafür, mich für ein System und konkrete Hardware zu entscheiden. Später mal.“

Lampe im Flur: popp

Und nein, ich hab keine Ersatz-E27-Birnen mehr da.

Was habt ihr so? Ansprechbar mit Open Source (z.B. HAss) ist ein Muss, dimmen auch. Flackerfrei, ich bin da empfindlich. Einstellbare Farbtemperatur (zwischen kalt & warm) wär super. RGB brauch ich nicht unbedingt. Wi-Fi oder mit Hub, mir halbwegs egal.

l3viathan,
@l3viathan@mastodon.social avatar

@scy ich habe eine Shelly Duo (und sonst Shelly Plugs), erfüllt alle deine Anforderungen, glaube ich.

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

Aufgewacht mit dem Gedanken: Stell dir vor, du hast eine Großveranstaltung oder nen Vergnügungspark oder so, irgendwas mit vielen Einlass-Schlangen nebeneinander.

Jetzt stell dir vor, die Schlangen wären nach Farbe sortiert. Also, Haarfarbe oder Kleidung oder beides.

Und dann macht man Luftaufnahmen.

Ob man so nen halbwegs brauchbaren Regenbogen hinkriegen würde?

Wahrscheinlich nicht. Aber über so Zeug denk ich nach.

l3viathan,
@l3viathan@mastodon.social avatar

@scy Bei Kleidung wäre interessant zu sehen, ob sich das einpendelt ("oh, niemand trägt pink, also ziehe ich es an, um eine kürzere Schlange zu haben", etc.)

foo, to til
@foo@fosstodon.org avatar

in :

a = a[0] = [[]]

This results in "a" being a list with one item, itself. Thankfully the repr recognizes this as being an infinite recursion:

>>> a
[[...]]
>>> a[0]
[[...]]

So a[0] is in a, obviously?

>>> a[0] in a
True

But what about...

>>> a in a[0]
True

The "payload" is "[[]]" here for prettiness, but just needs to be a list of something, and could easily be "['foo']". But, philosophically, does 'foo' exist in the list? There's no way to "reach" it once evaluated...

l3viathan,
@l3viathan@mastodon.social avatar

@foo nope, got replaced by assigning to a[0]

l3viathan, to random
@l3viathan@mastodon.social avatar

Names for chess pieces in other languages:

  • King: (pretty much universally king)
  • Queen: vizier (Arabic), flag (Estonian)
  • Rook: ship (Russian, Thai), cannon (Bulgarian, Croatian), chariot (Chinese), elephant (Telugu)
  • Bishop: elephant (Arabic, Chinese, Russian), fool/jester (Romanian, French), camel (Hindi), tortoise (Georgian)
  • Knight: jumper (German), donkey (Sicilian), horse (pretty much all other languages)
  • Pawn: farmer (German), soldier (Arabic, Russian)
l3viathan, to random
@l3viathan@mastodon.social avatar

The Russian army is the second best army in

2021: the world
2022: Ukraine
2023: Russia

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

Wieso heißt es „nächtlicher Samenerguss“ und nicht „Penne mit Sahnesauce“?

l3viathan,
@l3viathan@mastodon.social avatar

@scy aua

blinry, to random
@blinry@chaos.social avatar

Found a Big Blue Button in Akihabara's Electric Town today! \o/

l3viathan,
@l3viathan@mastodon.social avatar

@blinry what does it do?

LadyDragonfly, to random

You can spell "banana" by drawing a banana.

l3viathan,
@l3viathan@mastodon.social avatar

@LadyDragonfly you can spell "left" by drawing an arrow to the left

rixx, to random
@rixx@chaos.social avatar

This is fun: Getting an AI to reveal a password in different difficulty stages: https://gandalf.lakera.ai/

l3viathan,
@l3viathan@mastodon.social avatar

@rixx How far did you get? I'm stuck at level 4..

jon, (edited ) to random
@jon@gruene.social avatar

OK, wenn etwas kompliziert ist... braucht es ein Diagramm!

Woher weisst man, wo das Deutschlandticket gültig ist?

Diese Links führen immer zu der aktuellsten Versionen.
Hochauflösendes PNG: https://jonworth.eu/deutschlandticket/Deutschlandticket-DE.png
PDF: https://jonworth.eu/deutschlandticket/Deutschlandticket-DE.pdf

Alle Dateien - auf deutsch und auf englisch:
https://jonworth.eu/deutschlandticket

Und wenn Sie einen Fehler entdecken, sagen Sie mir, und ich werde ihn in der nächsten Version korrigieren

(Diagramm ist jetzt Version 3.1.0 DE)

l3viathan,
@l3viathan@mastodon.social avatar

@jon keinen Fehler, nur ein Beispiel für eine Seilbahn, in der es gültig ist: Waldseilbahn in Stuttgart (Teil des regulären Nahverkehrs)

l3viathan, to random
@l3viathan@mastodon.social avatar

Recommendations for a cloud-free/cloud-optional vacuum robot?

l3viathan,
@l3viathan@mastodon.social avatar

@xahteiwi I do mind, but it's a fallback, I guess. Thanks!

l3viathan,
@l3viathan@mastodon.social avatar

@xahteiwi I don't need (too much) automation. Tbh I'd be fine with manually turning it on. Smarter (local) things would be nice, but are not required.

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