

ah sweet, code that does something slightly different every time i compile it
ah sweet, code that does something slightly different every time i compile it
Because to a certain extent Python is duck typed. Python has no concept of interfaces, unless you count the abc
module combined with manual isinstance()
checks, which I’ve never seen anyone do in production. In order to be passed to some function that expects a “file-like object”, it just has to have methods named read()
, seek()
, and possibly isatty()
. The Python philosophy, at least as I see it, is “as long as it has methods named walk()
and quack()
, it’s close enough to a duck for me to treat it as one”.
Duck typing is distinct from weak type systems, though.
For the last time, Python is not weakly typed. It is dynamically typed. The statement 5 + "hello"
results in a type error. Bash is weakly typed, and that same addition results in 5hello
Huh. Neat feature. That’s in C# I assume?
(i’m gonna do something evil)
Sounds like you’d really like Nix.
The second one isn’t valid syntax in any programming language I’m familiar with. What does it do?
why would you call it anything other than the ternary operator
…either an empty string, a single character, or the same sequence of characters repeated more than once?
You know what? I’m gonna Sonarr and Jellyfin even harder
ohhh nooooo, who could possibly have seen this coming
not like that repo was getting constantly vandalized as people realized it contained copyrighted code that the winamp owners didn’t have the rights to which the project managers were halfheartedly playing whack-a-mole with
FFmpeg has FFV1 which is lossless
with the most recent call last, but the actual exception at the top
programmerhumor lemmy continuing the fine r/programmerhumor tradition of memes that are only tangentially related to technology and have dick all to do with programming posted by non programmers who want to hang out with the hackermen
maybe they’ll take inspiration from their avatar and next learn a programming language that’s actually good
you should learn Rust. the type system is so comprehensive that half the time you can guess what a function does (or at the very least what you’re supposed to pass to it) without a single line of human written documentation.
what kind of config file is short enough to fit on a single screen with line breaks?
Alright, the YAML spec is a dang mess, that I’ll grant you, but it seems pretty easy for my human eyes to read and write. As for JSON – seriously? That’s probably the easiest to parse human-readable structured data format there is!
I see Programmer humor lemmy is continuing the fine r/programmerhumor tradition of non programmers posting vaguely technology related memes that have dick all to do with programming
Some data formats are easy for humans to read but difficult for computers to efficiently parse. Others, like packed binary data, are dead simple for computers to parse but borderline impossible for a human to read.
XML bucks this trend and bravely proves that data formats do not have to be one or the other by somehow managing to be bad at both.
nah, that’s code that does something slightly different every time you run it. that’s a different beast.