stingpie

joined 2 years ago
[–] stingpie@lemmy.world 1 points 3 days ago (2 children)

FP & OOP both have their use cases. Generally, I think people use OOP for stateful programming, and FP for stateless programming. Of course, OOP is excessive in a lot of cases, and so is FP.

OOP is more useful as an abstraction than a programming paradigm. Real, human, non-computer programming is object-oriented, and so people find it a natural way of organizing things. It makes more sense to say "for each dog, dog, dog.bark()" instead of "map( bark, dogs)".

A good use case for OOP is machine learning. Despite the industry's best effort to use functional programming for it, Object oriented just makes more sense. You want a set of parameters, unique to each function applied to the input. This allows you to use each function without referencing the parameters every single time. You can write "function(input)" instead of "function(input, parameters)". Then, if you are using a clever library, it will use pointers to the parameters within the functions to update during the optimization step. It hides how the parameters influence the result, but machine learning is a black box anyway.

In my limited use of FP, I've found it useful for manipulating basic data structures in bulk. If I need to normalize a large number of arrays, it's easy to go "map(normalize, arrays)" and call it a day. The FP specific functions such as scan and reduce are incredibly useful since OOP typically requires you to set up a loop and manually keep track of the intermediate results. I will admit though, that my only real use of FP is python list comprehension and APL, so take whatever I say about FP with a grain of salt.

[–] stingpie@lemmy.world 2 points 1 week ago (1 children)

My character (who is called Korppimmies) has a similarly vague background. His backstory is in broad strokes, but I keep accidentally adding more lore because of my poor choice of words.

The original backstory is that he comes from an isolated tribe which periodically exiles young adults whenever it reaches a maximum capacity. These young adults are then supposed to wander around and found their own tribes in different places. My guy never got past the wandering part and eventually reached "civilization." After a series of foibles and arrests, Korppimmies became paranoid and started wearing a plague doctor's outfit, as it is otherwise very difficult to hide the fact that you have a beak.

Anyway, he's barely got any skills in healing, but went from town to town as a travelling doctor until The Party™ recruited him to help fight a dragon.

Unfortunately, Korppimmies was too smart for the sake of the campaign, and trapped the BBEG in the astral plane way before we were supposed to defeat him, and the campaign is pretty much over now.

[–] stingpie@lemmy.world 5 points 1 week ago (4 children)

I would've expected Nevermore to be a kenku, but unless you really plan out your sentences kenku don't have any unique mechanics, but aarakocra do. It's kind of a shame, to be honest. I've been playing a kenku recently, and I'm not planning out my sentences or anything, but I do have an unconscious tendency to mimic people's style of speaking, so I at least have that going for me.

[–] stingpie@lemmy.world 7 points 1 week ago (5 children)

I think 'implies' asks whether it's possible that A causes B to be true. In other words, it is false if there is evidence that A does not cause B.

So:

If A is true and B is false, then the result is false, since A could not cause B to be true.

If A and B are both true, then the result is true, since A could cause B.

If A is false and B is true, then the result is true since A could or could not make B true (but another factor could also be making B true)

If A and B are both false we don't have any evidence about the relationship between A and B, so the result is true.

I don't know for sure, though. I'm not a mathematician.

[–] stingpie@lemmy.world 8 points 1 week ago

I think you may have a bit of sampling bias. The only animes that were worth importing to the US, or watching years after their release, are the good ones. If you lived in the US in the 80's or 90's and were a boy, most cartoons available to you would be stuff like Captain planet or GI Joe, but there were other cartoons in existence in the US. Character growth was still lacking, but girl's cartoons followed the assumption that girls wanted TV shows where people talk about their feelings, such as care bears or my little pony.

I think what you're talking about is the degree of serialization of cartoons. American cartoons mostly had self-contained episodes where everything reverts to the status quo at the end of an episode. This was so the children watching didn't have to construct a timeline of they had seen the episodes out of order. Well regarded anime, on the other hand, was highly serialized which allowed for character growth across multiple episodes and was less restrictive.

[–] stingpie@lemmy.world 24 points 2 weeks ago (2 children)

Periapt of health: this is a small vial with a red liquid inside attached to a small chain. While wearing this, all diseases that you would otherwise contract enter the small vial instead. If the vial is broken, the closest creature will immediately contract all diseases contained within.

Deck of many things (used): the previous owners of this deck got all that they could have wished for. The remaining cards might not be the best.

Ring of mind shielding: the creator of this ring was a bit over-zealous. Along with the usual effects, this ring will censor violence, sex, and other uncouth things.

Cloak of the bat: along with the usual effects, wearing this cloak will also make you speak bat. You will only be able to produce high-pitched squeaks.

Portable hole: this portable hole is bottomless! Anything that falls down the hole is lost forever.

[–] stingpie@lemmy.world 10 points 3 weeks ago (1 children)

There's no rule saying a dog can't play!

[–] stingpie@lemmy.world 22 points 3 weeks ago* (last edited 3 weeks ago) (1 children)

I personally think the change from master & slave was kind of silly, as far as I'm aware, it was a bunch of people with no background in CS who thought the application of the term to something that has neither race nor agency was an insult to black people.

But I digress. It led to better guidelines in the Linux kernel, which I think are useful. You should tailor the terms you're using to the specifics of the task. If you have a master process that only has outward interfaces through the slave processes, you could use the term 'director' and 'actor.' if the master process is managing slave processes which compete over the same resources, you can use the terms 'arbiter' and 'mutex holder.' If the slaves do some independent processing the master does not need to know the details of, you can use the term 'controller' and 'peripheral.'

Basically, use a term that is the most descriptive in the context of your program.

Edit: also, I don't know why no one mentions this, but you can also use master/servant. Historically, there wasn't a difference between servant and slave, but in modern days there is, so it's technically different, technically the same.

[–] stingpie@lemmy.world 7 points 4 weeks ago (3 children)

Unused memory is not useless, it is just unused. If I want to pull up a guide on how to giggle the grables in my favorite game Grable Giggler, I would be very happy if I had unused memory which I can now use for my browser.

Also, smaller RAM usage generally correlates to smaller file size, which is very useful on computers with limited storage.

And finally, there's also low spec gaming and accessibility. Minecraft, at least prior to the microsoft acquisition, was a very low spec game. I wouldn't say it was optimized, but a game of minecraft took less ram than chrome. There was nearly no computers at the time which couldn't run minecraft. At the time of minecraft's early boom, kids were getting low-spec hand-me-downs, and so minecraft was one of the most open-ended games they could play. What I'm trying to say is that minecraft—and Doom for that matter—owe a large part of their success to low memory usage.

[–] stingpie@lemmy.world 7 points 4 weeks ago

This is an old project of mine. I made it a few years ago, so it's pretty out of date, but I can tell you my experience with it:

When I was playing around with it, characters tended to be very one-dimensional. They all had a single personality trait, and the AI made sure you knew about it. The particular way I set up the dialog system, multiple AI characters could interact with each other, but that ended up to very long conversations which quickly got off track and everyone forgot the original goal (which is a little bit too realistic) The AIs also found clever ways of speaking for other characters.

As for an AI DM, it just wasn't there yet. It didn't have the initiative to actually switch from one scene to another, and wouldn't create any NPCs to talk to. I often had to manually edit what the DM had printed so the session could move forward.

It was an interesting project, and my friends seemed to love it, but I think their love is mostly due to the custom characters I made for it.

[–] stingpie@lemmy.world 49 points 1 month ago (3 children)

"Yes, okay, my name is... kllllaaaarrrrrg... i-ifer. Klargifer Caltrop."

"Klargifer is a strange name for a halfling."

"Yuh- yeah. Yeeesss. I suppose it is. That's why I hate my parents."

"Yeah? And what are their names?"

[Suddenly, a wizard or something appears and casts silence on everyone. So you can't ask that the question anymore]

view more: next ›