I hate how much Linux relies on bash scripts, which might be the least portable and least readable scripting language they could’ve chosen
I literally can’t even sync my .bashrc files between Linux systems because the prewritten gobbledegook is different for each system and they aren’t compatible with each other
me: *registers for a GoodReads account because maybe I can find some fiction books that I can comfortably read*
GoodReads in my inbox constantly from then on: what is UP book lover!! make sure to vote in our poll where we’re choosing this year’s 🔥🔥HOTTEST🔥🔥 trendy new books!!
chat the rising trend in American bagel size is unsustainable. something must be done before it’s too late
oh, you’ve been doing your own research? I’d love to have a look at the P-values. you’ve made sure that your hypothesis is falsifiable right? and I’m sure you have a very solid and nuanced understanding of the data that would be expected if the null hypothesis is true, right?
and clearly you must be highly knowledgeable and qualified in the field, to be overturning decades of scientific studies - presumably through in-depth meta-analyses of the relevant research
oh - you’re not? your criticism must be much more fundamental, then. you must know a lot about epistemology, the scientific method, and what constitutes “justified belief”… right?
shoutout to the random WoW player who told me “shadow dance is the entire point of subtlety rogue. you should play as assassination rogue instead if you don’t want to use it”
I hope you’re enjoying your life as a fun-hating optimization-poisoned tryhard
you are what you eat, which means that humans are made out of delicious delicious food
As I understand it, a character "being in the public domain" isn't a thing, that's just sort of how fans tend to think about it cus we tend to see characters as discrete units. I am not an expert on copyright law and I refuse to learn, but my impression at lest is that specific works featuring a character can be in the public domain and that makes the character de facto in the public domain as long as you draw soely from those works.
The Doyle estate have been famously persnickety about Sherlock Holmes adaptions containing elements from the later stories, which was still under copyright for a while (it's a moot point now, if i dont misremember all of Sherlock Holmes is in the public domain so as long as he doesnt look like Benedict cumberbatch, you can write all the Sherlock Holmes yaoi you could possibly want).
“we have Lisp at home”
the Lisp at home:
from operator import mod, add, eq, mul
[print(
(str(i), "fizz", "buzz", "fizzbuzz")
[add(eq(0, mod(i, 3)),
mul(2, eq(0, mod(i, 5))))])
for i in range(1,21)]
imagine taking a nap and then waking up feeling more rested than when you started the nap
people need to stop abbreviating their content warnings omg
there’s a post on r/GoneWildAudioTrans and one of its content warnings is “very light sph*” and I have no idea what that’s supposed to mean, which defeats the whole purpose of it being a content warning. and I can’t google for it either because it’s got a special character in it
and tbh googling for content warning abbreviations generally doesn’t work anyway because stuff like “uspol” or “mh-“ is too obscure to have meaningful results
when millie purrs she sounds so much like a geiger counter i feel like i should express the state of her bliss in counts per minute
uwu has a wikipedia entry
I’ve been reading a book about Common Lisp lately (Land of Lisp) and it’s given me a new appreciation for object-oriented programming
specifically what I love about OOP is how it adds context to data and data manipulations. so that your code doesn’t just show what specific data manipulations you’re doing, but also why you’re doing those manipulations, what implications those manipulations have for the meaning of the data, and even what exact format of data is expected in the first place
for example here’s a data structure that represents all of the paths that you can take in a text adventure game:
paths = [
["living-room", ["garden", "west", "door"],
["attic", "upstairs", "ladder"]],
["garden", ["living-room", "east", "door"]],
["attic", ["living-room", "downstairs", "ladder"]],
]
can you tell what each section of this data is meant to represent? it’s not exactly self-explanatory
but how about now?:
living_room_paths = AdventureGamePaths(
location="living-room",
paths=[
AdventureGamePath(
leads_to="garden",
direction="west",
description="door",
),
AdventureGamePath(
leads_to="attic",
direction="upstairs",
description="ladder",
),
],
)
garden_paths = AdventureGamePaths(
location="garden",
paths=[
AdventureGamePath(
leads_to="living-room",
direction="east",
description="door",
),
],
)
attic_paths = AdventureGamePaths(
location="attic",
paths=[
AdventureGamePath(
leads_to="living-room",
direction="downstairs",
description="ladder",
),
],
)
paths: dict[str, AdventureGamePaths] = {
"living-room": living_room_paths,
"garden": garden_paths,
"attic": attic_paths,
}
obviously this code is dramatically more verbose but it’s also so much clearer what all of those strings actually mean. grouping data into objects adds so much context and meaning to the data. it also ensures that I’m following exactly the right data format at every step
now let’s pretend that we’re working with the first style of data structure (nesting simple structures like lists and dicts) and we want to make a function that prints descriptions of all of the paths from a given room:
def describe_path(path):
return "there is a " + path[2] + " going " + path[1] + " of here"
def describe_paths(location, paths):
return '\n'.join(map(describe_path, paths[location]))
looking at this, can you tell exactly what format of data structure describe_paths() accepts for its path argument? or what about the data structure that describe_path expects? you can definitely figure it out eventually but it’ll take some sleuthing and some assumptions on the part of the reader
also, where is the data that these functions are meant to operate on? is it in this file, or somewhere else? it’s disconnected from the functions, so it could be anywhere. so if you have a nasty monolithic data structure in an unknown format, how are you supposed to figure out which functions you can use on it and which functions you can’t? how do you pull up a list of useful operations for that specific data?
you might be thinking that I’m deliberately making my code overly terse and arcane, but this is a 1:1 recreation of some example code in my Lisp book - I just converted it into Python instead
now compare those two functions above to this instead:
@dataclass
class AdventureGamePath:
leads_to: str
direction: str
description: str
def describe(self) -> str:
return "there is a " + path.description + " going " + path.direction + " of here"
@dataclass
class AdventureGamePaths:
location: str
paths: list[AdventureGamePath]
def describe_paths(self, location: str) -> str:
path_descriptions = ""
for path in self.paths:
path_descriptions += path.describe() + "\n"
return path_descriptions
again, this is much more verbose, but it’s also much clearer isn’t it? now if I see an AdventureGamePaths object I know exactly what it represents (more than one AdventureGamePath) and exactly what I can do with it (I can tell it to describe its paths)
I feel like functional programming tends to result in code that’s very terse but that doesn’t have much context behind it. there are often weird data structures left lying around without any hint about what they represent or what you can do with them - and lying next to them are arcane one-liner functions that may or may not be meant to operate on those data structures. maybe if you stare at those one-liner functions for long enough you can figure out what data manipulation they do, but what does that data manipulation mean?
so I have a renewed appreciation for classes and objects because they allow you to:
with all of this said, I don’t think that all functional programming is doomed to be arcane and unclear. I’ve heard about a concept called “typeclasses” that some functional programming languages have. I don’t know too much about them but it sounds like they’re a mathy functional programming take on classes. and those might be able to replicate the advantages of classes and objects without exactly being classes and objects
a mildly interesting thing just happened: I put on my bluetooth earbuds and before they finished connecting I pressed “play”
and for a split second my phone started playing audio, but then my earbuds finished connecting and it switched to them instead
I didn’t realize that my earbuds could send the “play” signal without being fully connected
I will never stop being bitter about how in schools there’s a mandatory class called “English” (implying it’s teaching you how to communicate) whose purpose is to teach kids the “objectively correct” way to engage with art
and the “correct” way is specifically to analyze its symbolism. no other way is considered valid or correct, and even then you have to guess what the “correct” symbolism is. the art is also chosen for them and is often disturbing, but they’re forced to read it anyway
there are at least 9 different reasons why everything I just said is fucked up and wrong
and keep in mind that kids could be learning literally anything else instead of this
kiosk at the local chicken place crashed to desktop so I did what had to be done
Please boost far and wide. For my curiosity only. This is a Mastodon poll. Do you have a job?