How Go's compiler shares generic function bodies by GC shape and uses dictionaries for the concrete types.
Uma dica que pode te ajudar nos testes de acessibilidade
Algumas informações relevantes sobre um atributo tão mal interpretado
rsync built on cygwin doesn't understand windows drive letters. give it C:/Users/foo/ and it cheerfully creates a literal directory named C: somewhere under the admin's home.
Qual Ă© o meu plano se de fato sair de acessibilidade
i pushed a commit, immediately ran a deploy script that did git pull on a remote box, and watched it pull the *previous* version. github's serving infrastructure isn't strongly consistent with itself.
tried to add a reconnection wait inside a macOS CGEventTap callback. macOS killed the tap within seconds. event handlers must return immediately — always.
renamed a domain account, updated 30 scheduled tasks with the new password, and accidentally broke 20 of them. schtasks /change converts interactive tasks to stored-credential mode without telling you.
macOS quietly cleans /var/tmp between reboots. we had 12 scheduled jobs storing their config there. you can guess what happened.
GPT-5 mini started refusing our heartbeat prompt. each refusal was saved to the transcript. the next run saw the prior refusals and refused harder. a self-reinforcing context poisoning loop that ran silently for a week.
Electron's safeStorage uses DPAPI on Windows, which means any process running as your user can decrypt Signal's database. on macOS, Keychain actually isolates per-app.
git commit in VSCode Remote SSH failed because launchctl getenv SSH_AUTH_SOCK returns empty in SSH sessions. the fix was a stable symlink.
Gestern Abend haben wir uns ein Musical angeschaut, und das war leider eine ziemlich enttäuschende und zumindest rückblickend eine ganz und gar vermeidbare Erfahrung. Ich sollte an dieser Stelle vielleicht einleitend erwähnen, dass ich kein besonders geübter Musicalgänger bin. Nach dem König der Löwen 2019 in Hamburg und Fack ju Goehte 2024 war das gestern Abend mein erst drittes Musical. Es hätte auch leicht mein viertes sein können, wenn ich während meiner Abschlussfahrt 1997 nach London nicht viel zu cool für Starlight Express gewesen wäre. Aber das ist eine andere Geschichte. Gestern Abend war also Phantom der Oper angesagt, in der kleinen Olympiahalle in München. Allein schon beim Lesen dieses Satzes, sollte man stutzig werden, ich verstehe da jeden schlauen Einwand. Als wir die Tickets im Januar gekauft haben, gab es leider kein Warnsignal in meinem Kopf, als der 14-Jährige mit seinem iPhone in der Hand vor uns stand, und erklärte das nächsten Monat das Phantom der Oper in…
building a location tracker led me to google plus codes. they're open source, unlike what3words, and genuinely useful.
I discovered a neat pattern: using join with the function arrow ((-)) as a Monad. When you join over functions, you get: This lets you pass the same argument twice: once to determine what to do, and another to actually do it. In , we have validators with the signature type Validator = input - Validation. Most of our validation helpers are written in a point-free, un-applied style, which works great, except recently when I needed to inspect the input to decide which validator to run.
For Promise timeouts, I was overworrying about doing setTimeouts with an AbortController, and cleaning them up afterwards to avoid memory leaks: The gods of JS smiled in my favor this week when I found out about AbortSignal.timeout (thanks to ). It simplifies timeouts to a single call:
Recently, I came across two things I would call "Easter Eggs" in Google. The first happened while I was researching Cordyceps to add some facts to my review of Last of Us. I noticed that Google lets you "infect" the search results with the mushroom from the show. https://www.youtube.com/watch?v=SejPgNqyTI A few days later, I googled "six seven". I guess this is what parents do these days when they try to understand their kids slang. While keying it into the search field, I tried to remember the most strange jargon we used 30 years ago. I couldn't find much other than "cool", which has been in my bubble like forever, at least compared to how quickly these things seem to change nowadays. Then the Google results appeared and started to shake like this in front of my eyes. Again, I was surprised and smiled. Why do I love this? In the software industry, we call these things Easter Eggs), and I have always been attracted to them. In fact, 20 years ago, I created an Easter Egg myself, and…
Mit über 2 Tagen im Flieger dieses Jahr, stellt man sich mitunter auch mal merkwürdige Fragen, während man in der Blechbüchse gefangen ist. So begab es sich, dass der Flieger von Paris zurück nach Hause relativ lange auf der Startbahn hinter einem anderen Flieger stand. Die zwei Tage in Paris haben mein Gehirn scheinbar so nachhaltig geprägt, dass es ein Hupen als adäquate Aufforderung endlich den Weg freizugeben erwartet hat. Die Frage, ob Flugzeuge Hupen haben, hat mich dann den Flug über beschäftigt und in München angekommen, habe ich die Zeit in der S-Bahn dazu genutzt, diese Frage für mich zu beantworten. Die kurze Antwort ist: Ja, Flugzeuge haben Hupen. Die etwas längere: Die Hupen haben, wer hätte es gedacht, einen anderen Zweck und sie würden niemals ausreichen, um eine vorausfahrende Maschine mittels Hupkonzert auf sich aufmerksam zu machen. Unter Fachleuten heißt dieses System Ground Call oder auch Ground Vehicle Warning Horn. Es dient primär der Verständigung mit der…
Ich bin gerade mal wieder beruflich in Sofia und nach einem langen Tag mit viel zu vielen Meetings fragten die Kollegen, ob wir, die deutschen Besucher, Lust auf den deutschen Weihnachtsmarkt hätten. Ich dachte zuerst das sei ein Scherz, es stellte sich aber schnell heraus, das dem nicht so war. Von früheren Besuchen wusste ich bereits, das Bulgarien eine enge Verbindung zu Deutschland hatte und es noch immer viele Gemeinsamkeiten gibt. Also nicht nur, das sehr viele deutsche Firmen seit vielen Jahren Entwicklungszentren in Bulgarien haben, sondern auch das es eine gemeinsame Geschichte gibt. Ferdinand I). aus der Dynastie Sachsen-Coburg-Gotha war ab 1887 Fürst und von 1908 bis 1918 Zar von Bulgarien. Mit diesem Detailwissen zur Abstammung des Zaren aus meiner eigenen Heimatstadt Gotha ist für mich auch viel leichter nachvollziehbar, warum Bulgarien im zweiten Weltkrieg an der Seite der Deutschen gekämpft hat. Jedenfalls auf eben jenem deutschen Weihnachtsmarkt gab es nur Stände mit…
Saving this one for posterity since I seem to run into something like this once every couple of months. Really gotta get a Mac for my next dev machine. sudo apt update && sudo apt upgrade -y # Since you mention that you have set your user to be root: sudo sh -c 'echo "[user]\ndefault=root" > /etc/wsl.conf' wsl.exe -l -v # Confirm your distribution name for the following command: wsl.exe --terminate Ubuntu Credit to this StackOverflow answer.
I recently came back to an idea I started playing with back in January: sticking a game into the Jupyter notebook interface. The key problem to solve here is that, while Jupyter is designed to run the code you see and explain it, for game purposes I want the code to do the opposite: control the interface itself (and do so while being at least lightly obfuscated from the user). Adding, Running, and Removing Cells With IPyLab IPyLab has been a great (and really fun) tool for this purpose. You c
Just a quick shout-out to Home Assistant, who have relatively easy-to-follow documentation for setting the app up on a Synology NAS. Just download the container, add your time zone, make sure it's set to use the "host network", and make sure port 8123 is open on your firewall. I'd been putting off setting this up given the usual amount of lift involved in getting something new runing on my homelab, but it only took me about 10 minutes. Finally no more fiddling with the Hue app, and K can purchas
Prevent dangerous struct copies with noCopy sentinel and go vet's copylock checker. Protect mutexes and sync primitives from value copies.
Pin tool versions in Go 1.24 with the new 'tool' directive. Replace tools.go pattern with native go.mod support for project tooling.
Test functions that write to stdout/stderr in Go by capturing output with os.Pipe. Learn patterns to avoid deadlocks in concurrent tests.
There are a lot of tutorials out there for running a gunicorn server on systemd, but I wasn't able to find one that actually told me how to do so in selinux. Since I'd never used selinux before, this relatively simple task turned into hours of trial and error, but my loss is your gain. YMMV dependent on how custom your selinux setup is, but this worked for me: Assuming your project is in /www/myproject: /www/myproject/gunicorn_config.py: bind = 'unix:/run/gunicorn.sock' worker_class = 'sync'
I've slowly been getting more familiar with uv and the broader new school of python packaging ecosystems (sorry, I used virtualenv for a long time, it does the job fine), and one of the most exciting things to me is its use of dependency groups in a pyproject.toml file: finally, a non-janky way to use different packages in different environments. However, I think its documentation leaves a bit to be desired on this front, so I wrote down a few commands I find myself using regularly. To add a pa
Understand why io.Reader takes a byte slice parameter instead of returning one. Learn about heap allocations and buffer reuse in Go streams.
In googling for a stock image to put at the top of today's post, I discovered there's already a #100DaysofWriting movement. Apparently it's quite popular! The whole thing is based on showing up to the page with curiosity and gentleness. 'Showing up' can look like whatever you want. Five minutes of note scribbling? That counts. Research reading? That counts too, just as much as writing 1000 words. The point is regular connection without judgement. These people think it's okay to "set reasonable
I've been playing around with the idea of using Jupyter notebooks as a narrative game interface for a while, and finally got around to doing some prototyping this week. One thing I really wanted to do was require users to run code cells in Jupyter to unlock story beats: Jupyter notebooks are usually presented as a step-by-step tutorial, which is perfectly fine if you're trying to teach someone how to run a linear regression in sklearn but less so if you're trying to build suspense over the cours
Ran across this quote recently and went down a bit of a rabbit hole into Debussy and Saint-Saens' mutual hatred. I think it's important to remember that classical composers were all catty as hell and constantly beefing with each other. RIP Claude Debussy, you could have gotten in some great fights on Twitter. (Saint-Saens may have been sentimental but Danse Macabre still slaps).
du -cha --max-depth=1 / | grep -E "M|G" From this StackOverflow answer - ncdu is also a good tool for this, allegedly, but its output didn't really seem to have any correlation to the actual folders on my server. I feel like I have to do this once a year because of storage issues and always forget, so hopefully this serves as a reminder going forward. Turns out snap is the culprit, as per usual. In a fit of pique I uninstalled snap and all of its files, and lo and behold I'm able to finally upd
Learn variable indirection in Bash with ${!var} syntax. Build context-aware configs, function dispatch, and dynamic variable name resolution.
Clean up pytest test signatures using @pytest.mark.usefixtures to inject implicit fixtures without autouse or unused parameter warnings.
Catch method override errors at type-check time with Python's @override decorator from PEP 698, preventing typos and signature mismatches.
Speed up Python module imports with __getattr__ from PEP 562 for lazy loading, deprecation warnings, and dynamic attribute access.
Master Docker mount types: volumes, bind mounts, tmpfs, and build cache. Clear syntax comparison between -v and --mount options with docker-compose.
Automate environment variables per directory with direnv. Load .envrc files on entry, unload on exit. Integrate with Python venv and uv workflow.
Master Bash namerefs with declare -n to create dynamic variable references. Build generic functions for arrays and associative arrays without eval.
Test HTTP requests in Python with pytest-httpx for full mocking, respx for pattern matching, or VCR.py for recording real responses.
Write readable parametrized tests with pytest.param for better test names, conditional skips, custom IDs, and structured test data.
Make raw HTTP requests with Bash's /dev/tcp file descriptor. Build health check scripts without curl or wget using TCP socket connections.
Replace mkdir, cp, and chmod with a single install command. Copy files, create directories, and set permissions in one step with GNU coreutils.
A small web development thing I’d missed until yesterday: When you want a link to open a page in a new tab, you’ve long been able to add the attribute target="_blank" to the tag. The problem was, that actually gave the opened pages rights to their referrer: it opened a security hole that could potentially have leaked user information or opened the door to phishing. In response to that, the received wisdom was to also add rel="noopener" to the tag — or, more commonly, rel="noopener noreferrer",
Understand TypeIs vs TypeGuard in Python: TypeIs provides more intuitive type narrowing by narrowing both positive and negative branches.
Replace inheritance with the Strategy pattern in Go using interfaces. Achieve composable, testable code without class hierarchies.
Build retry logic in Go without reflection using generics. Implement exponential backoff and configurable retry strategies with type safety.
Master Go type assertions with i.(T) syntax and type switches. Extract concrete types from interfaces safely with ok idiom examples.