Pinned toot
Pinned toot

If you ever find yourself wondering whether your design is good enough, remember that because the Golang developers opposed generics so adamantly the Kubernetes community ended up with a code generation script (which has the templates defined as string literals and only seems to run in $GOPATH) that is being used to provide type safe client objects for every single API resource. Yikes!

I think I wasted over 4 hours this week trying to access Traefik's (it's a reverse proxy and load balancer) dashboard. I didn't realize that I was using /dashboard instead of /dashboard/ and there was no redirect, just a 404.

🤦‍♂️

I almost gave up on but day 20 was actually pretty fun. I'll have to give day 19 another try.

There are also other APIs that PyPI provides that pip probably uses. The problem is that you might not always be using PyPI. That's the case for me and my package index supports none of the fancy APIs. PEP 503 is the lowest common denominator and that's kind of what we're stuck with.

It's also worth mentioning that IIRC PyPI's APIs don't have full coverage of all packages. So with some, you might get complete information in an easily digestible format, with others some stuff might be missing.

Show thread

I forgot PEP 503 does actually provide two kinds of metadata. One is a Python version constraint provided in the `data-requires-python` attribute of the HTML `a` element pointing to a specific file. There are also checksums of the files. Where? Of course in the fragment part of the URL pointing to the file (the part after `#`). That's it.

Show thread

I imagine the only "standard" is what pip does for which you'd have to go digging through its sources and copy their implementation because they don't expose a function for parsing file names (or anything else for that matter).

Or you can try to guess how it works on your own. Because that's definitely how one should tackle this problem. By figuring out the pattern and parsing it with a half-assed regex, right? I mean, how else would you figure out which file to download?

Show thread

Oh, and did I mention that the API is so bare that it doesn't even contain *any* metadata? Yes, really. It not only doesn't provide information about dependencies (you have to download the package for that) but also lacks version, format, and platform data! You have to extract that all from the file names and I've yet to see where that's standardized (there's python.org/dev/peps/pep-0625/ but it's just a draft and nobody follows it).

Try to make sense of this:
pypi.org/simple/numpy/

Show thread

All that to download somewhere between a few KB and MB of data. So I need to do that manually but the package index API, while technically "simple" (it's in the name) requires me to parse HTML, which is slow and is really uncomfortable to do using the stdlib parser (or any other popular parser that I've seen).

python.org/dev/peps/pep-0503/

Show thread

Python's packaging is still a mess.

I need to download source distributions to later build them on a remote system. Python's package manager "pip" turns out to be useless for this. It has no programmatic API and can't solve this simple task even as a subprocess. Even when I request no dependencies of a package to be downloaded, its metadata will be collected which for source distributions means executing setup.py, which means installing build dependencies which means wasting a ton of time.

It's funny but is making me fix my sleeping schedule by having me wake up consistently at 6 am.

Anyway, it's the 7th time I'm participating, it's still the same old fun winter event. All my solutions eventually get posted on GitHub. I wonder how long I'll stick with it this time around (guessing about 15 days).

github.com/LiquidLemon/advent-

I found this some time ago and it's one of the few articles I've seen that look both at the good and bad parts of Go. It's a good read whether you like the language or not because it probably highlights some stuff you rarely think about.

It's a little outdated but it would be a shame not to link because it's rare to see something so objective.

bluxte.net/musings/2018/04/10/

I must have hosted my first Minecraft server over 10 years ago. And here I am today, probably twice as old, configuring yet another instance to play with friends. Just one of the constants of life, huh.

I've got no almost no rest past week and I'm entering this one with a slight sleep deficit and yet looking back it was one of the more enjoyable weeks I had in the recent months.

I really should get some more sleep though.

I love reading about stuff like this. hackmud is mostly dead at this point and other similarly complex games (think EVE Online) are huge time sinks but I would love to one day experience a virtual world with such a breadth of human interaction.

rockpapershotgun.com/lizard-ga

I love this approach. If you're not working with tools that make your job easier, then what are you doing?

rachelbythebay.com/w/2020/02/0

Fascinating for two reasons - the bug is pretty unexpected but it also shows how essential it is to be able to modify systems you don't have physical access to.

rapitasystems.com/blog/what-re

I always thought variadic arguments in C were the weirdest thing and it turns out it's that way for a good reason:

retrocomputing.stackexchange.c

(it's trying to preserve historic hacks if you haven't guessed it)

l really need to set aside a couple of hours every week for programming. I work out more than I code recently but my brain needs a workout too!

I keep coming up with cool project ideas and then

not
doing
them

Show more
0x3c.pl

Spokojna przystań dla hakerów, mejkerów, i wszelkiej maści kreatywnych i technicznych osób z okolic trójmiasta. Celem 0x3c.pl jest łączyć osoby zaangażowane w różne społeczności na terenie trójmiasta i pozwalać na wymianę wspólnych zainteresowań.