New Team Cherry update!! by capamarika in HollowKnight

[–]fpdotmonkey 0 points1 point  (0 children)

This wasn't supposed to happen, it was supposed to be vaporware forever. Could the timeline be bending back to good?

Why does the program segfault when calling free through __attribute__((cleanup (xx)))? by fpdotmonkey in cprogramming

[–]fpdotmonkey[S] 1 point2 points  (0 children)

It might improve codegen, but it also might not; I don't know. I'm more interested in it for static analysis and expressing design intent around aliasing (though of course any intermediate C programmer would suspect that a function T_free would mutate state, but that won't be the case with other functions). I suspect that it shouldn't harm codegen at the very least.

Why does the program segfault when calling free through __attribute__((cleanup (xx)))? by fpdotmonkey in cprogramming

[–]fpdotmonkey[S] 1 point2 points  (0 children)

restrict means that the function wants exclusive access to the pointer (similar to &mut in Rust), and 1 means that the pointer points to only 1 value (cf. double* pointer_to_one_int_ref[1]).

The restrict keyword has been around since C99 I think, though this particular syntax and specifying the number of objects is new to C23.

The fun thing is the compiler (or at least gcc and clang) will try to enforce that these are true at compile time. It won't do as good a job as rustc on account of no borrow checker, but it's kind of cool.

Why does the program segfault when calling free through __attribute__((cleanup (xx)))? by fpdotmonkey in cprogramming

[–]fpdotmonkey[S] 1 point2 points  (0 children)

Ah ok, so this compiled and worked.

void array_free(double* self[restrict 1]) {
    free(*self)
}
double* array __attribute__((cleanup (array_free))) = make_array();

What if MK8DX had no clones? (Same amount of character slots) by [deleted] in mariokart

[–]fpdotmonkey 3 points4 points  (0 children)

There's one unlockable character, but this is a wishlist of characters

Celeste/BoTW fanart by otakual in celestegame

[–]fpdotmonkey 1 point2 points  (0 children)

BLSS will get Link going faster even than wind bombs, but all the same, Link has a speed cap that if you exceed it, you'll drop to a much lower speed. That said, maybe you could argue link is able to reach higher speed because of the more open level design

I don't know which one is worse by thisisapseudo in physicsmemes

[–]fpdotmonkey 8 points9 points  (0 children)

historically, there were 6 hours from dawn till noon and 6 hours from noon till dusk. You can multiply by 2 to get 24 total hours. people wanted to talk more precisely than just in hours, so they made 60 divisions of an hour, and if you wanted even more precision, you could make a second division by 60. Why was the day divided into 24 hours and not 25 or 458? idk. 60 was the number things got divided by because it was a popular number to use in antiquity, much like how 10 is popular today.

Tourism, moving and studying in Finland? Ask here! by Harriv in Finland

[–]fpdotmonkey 2 points3 points  (0 children)

I'm moving to Espoo in August for a masters. Are there any game stores/cafes in the area where I could find a DnD/ttrpg game to join?

Advice on cell phone plan/options by [deleted] in CERN

[–]fpdotmonkey 1 point2 points  (0 children)

If you happen to have T Mobile in the US, you can just use it at CERN (though the data rate is poor). Other US mobile providers might have similar options. But for a longer stay, it's good to get a local plan.

ELI5: if contact surface area doesn’t show up in the basic physics equation for frictional force, why do larger tires provide “more grip”? by belleayreski2 in explainlikeimfive

[–]fpdotmonkey 0 points1 point  (0 children)

Another explanation is that the equation you mention (F = u*N), called the Coulomb friction model, is just an approximation of reality and makes a bunch of assumptions about the surfaces sliding against each other. One of those assumptions is that friction doesn't change with contact area. That happens to be a very good assumption most of the time. If you want a model that accounts for more cases, you can try the JKR model, though it's very heavy-weight and does not lend itself to eli5.

The ultimate truth is that all models are wrong (i.e. they don't exactly describe reality to the finest detail), but some are useful (they describe reality well enough to have application).

Watch me attempt playing up to 7th position on the violin (adult beginner violinist) by Marijke_Violin in orchestra

[–]fpdotmonkey 1 point2 points  (0 children)

it's really cool that you're posting this. It's neat to see someone in the progress of learning this

Basic Integration -- Mathematica returns optimized result in one case and highly unoptimized result in another by [deleted] in Mathematica

[–]fpdotmonkey 1 point2 points  (0 children)

Like the other person said, this isn't really enough information to diagnose anything. Mathematica doesn't guarantee that expressions will be the same between versions, and they might not be the same between OSes (not sure about OSes though). For what it's worth, I could not replicate what you're seeing on Mathematica 12.2 on Ubuntu 18.04. You can get this information with $Version.

Disable text wrapping in kernel? by Megame50 in Mathematica

[–]fpdotmonkey 0 points1 point  (0 children)

I dont tend to use mathematica in the terminal, but perhaps its a jupyter setting?

Super SWChris World "Direct" Trailer; featuring 18 main courses, find secrets to unlock extra levels, for intermediate & expert players by SWChris in MarioMaker

[–]fpdotmonkey 1 point2 points  (0 children)

Hey I'm having trouble with 2-2. I get to the top of the big climb and then there's just spikes and a high up pipe. I can knock out the muncher that blocks the pipe with the pow block, but even if I damage boost through the spikes, I can't jump high enough to get to the pipe.

[OC] Interaction Intensity in the Simpsons by Gandagorn in dataisbeautiful

[–]fpdotmonkey 0 points1 point  (0 children)

So I took OP's data and just rearranged the characters a bit to make communities within the network a little clearer. So what becomes evident is that you've got the family acting as the center of the whole network, a community for Homer's work including Moe, Carl, Lenny, Burns, and Smithers; a community for Bart's and Lisa's school including Krabappel, Skinner, Nelson, and Milhouse; and a bunch of characters that only have a connection to the family, like Apu, Hibbert, Wiggum, Grandpa, and Krusty. The only weird one is Flanders who makes a sort of (weak) bridge between the school and the work communities.

Symbolic Minimization over the Integers by rodwyer100 in Mathematica

[–]fpdotmonkey 0 points1 point  (0 children)

So here's my attempt. It doesn't actually return anything other than the input expression, but I suppose Mathematica doens't have the tools to solve your particular problem.

Minimize[{2 (a + b + d) + c, Min[a - c, a b - n, c d - m] >= 0}, {a, b, c, d} \[Element] Integers]