• 6 Posts
  • 15 Comments
Joined 10M ago
cake
Cake day: Dec 28, 2023

help-circle
rss

Tangentially related, but I love how http://ai is an actual website that you can visit. We’re so used to thinking of websites as <something>.<tld> that it’s really weird to see a website hosted directly on a top level domain with no subdomain.


YAML is good for files that have a very flexible structure or need to define a series of steps. Like github workflows or docker-compose files. For traditional config files with a more or less fixed structure, TOML is better I think



zipped xml!

Learned this when I needed to extract some data from an excel file.




Template source: https://web.archive.org/web/20210304000634/https://www.government.nl/topics/coronavirus-covid-19/visiting-the-netherlands-from-abroad/checklist
fedilink

reasoning

What reasoning? I’m not trying to make any logical deductions here, I’m just expressing annoyance at a inevitable, but nevertheless cumbersome outcome of the interaction between numpy and mypy. I like python and I think mypy is a great tool, I wouldn’t be using it otherwise.


Explanation: Python is a programming language. Numpy is a library for python that makes it possible to run large computations much faster than in native python. In order to make that possible, it needs to keep its own set of data types that are different from python's native datatypes, which means you now have two different `bool` types and two different sets of `True` and `False`. Lovely. Mypy is a type checker for python (python supports static typing, but doesn't actually enforce it). Mypy treats numpy's `bool_` and python's native `bool` as incompatible types, leading to the asinine error message above. Mypy is "technically" correct, since they are two completely different classes. But in practice, there is little functional difference between `bool` and `bool_`. So you have to do dumb workarounds like declaring every bool values as `bool | np.bool_` or casting `bool_` down to `bool`. Ugh. Both [numpy](https://github.com/numpy/numpy/issues/18876) and [mypy](https://github.com/python/mypy/issues/10385) declared this issue a WONTFIX. Lovely.
fedilink

I don’t know shit about fuck, but you explanation seems correct.

I do remember hearing that precisely because of the limitations of vinyl compared to CD, music is mastered differently for each medium. So the CD master of a certain song might be more compressed (dynamic compression, not digital compression) to make it sound “louder”, while the vinyl release has a wider dynamic range. So some people might prefer the vinyl version because it actually does sound different to the CD version.

Keep in mind tho, I might be spreading misinformation here.


Digital music can be taken as easily as it can be given.

Digital does not always mean DRM. You can pry my bandcamp FLACs from my cold dead hands. Physical media nowadays is more about the experience than functionality. Maybe there are snobs who claim that vinyls are somehow functionally superior, but generally the people who use vinyls or CDs or tapes instead of digital are really just looking for that physical experience in a highly digitalized world.

They have sound quality as good as digital

CD quality is actually superior to streaming services like spotify (I personally can’t tell the difference tho).


tries to install R packages by first looking in bioconductor and then trying the rejects through conda-forge, and then the rejects from that are compiled from source

Just do all of these in parallel to maximise the change of installing the correct version



So there are many different commands that compile LaTeX, right? pdflatex, pdftex, latexmk, etc. But they all do that thing where they ask for your input as soon as they encounter an error, right? Well, if you just pipe an empty echo command to them, it notices that stdin has reached end-of-file, and gives up trying to ask the user for input, and just exits on first error. So instead of pdflatex mydocument.tex, you can do echo | pdflatex mydocument.tex and it won’t ask you for input if it sees an error, it’ll just exit. There’s probably a “proper” way to achieve the same behaviour, but I can’t be arsed to read the docs.

Speaking of stupid TeX hacks, at one point I had a script called latex_compile_and_install_packages_until_it_works.sh. It’s essentially a loop that repeatedly tries to compile a document, searches the output of the compiler for anything that looks like a missing package error, and pipes it to sudo tlmgr install. The “fuck it” of package management, arbitrary code execution exploit included!

(Sorry for the screenshot, I lost the original script in text form, probably for the better)


Yeah, what the hell is up with that? I always just echo | pdflatex to make it shut up and exit on error. Maybe one day I’ll learn how to actually use that interactive compilation thing, but not today lol.


Never heard of it before, but might give it a try at some point. From the website, it seems like something halfway in between LaTeX and Markdown? Sounds exactly like what I need at times, tbh.


Accurate. LaTeX is great, it makes you feel like you have superpowers compared to “office suite”-style software. But every once in a while you just run into some bullshit that feels like it’s stuck in 1985 and it completely breaks your flow. I remember wanting to make a longtable where text in the “date” column would be rotated by 90 degrees to leave more horizontal room for the other columns. It took me two rotateboxes, a phantom, a vspace, a hspace and 40 minutes of my life to get the alignment right. Would probably have taken a duckduckgo search and three clicks in Libreoffice.


You’re completely correct. But what I meant by that graphic is “poor solutions leading to more problems”, not “breaking down problems into smaller ones”. It was inspired by a cube drone comic that made the same complaint, but I can’t find that particular comic now


Please dont take this seriously guys its just a dumb meme I haven't written a single line of code in half of these languages
fedilink