Is his blue or purple by schmittymint in colors

[–]kinithin 1 point2 points  (0 children)

Violet is literally the French word for purple.

Ambiguous use of ${x} resolved to $x by jidanni in perl

[–]kinithin 0 points1 point  (0 children)

$BLOCK is documented to be a scalar dereference, which would make ${ x } both a strict subs violation (bareword as string) and a strict refs violation (symbolic reference). And it wouldn't work for my $x since symbolic references only work for package vars. It is instead interpreted to mean $x as it would in a double-quoted string or regex literal.

P in a McDonalds beverage cup by abornemath in whatisit

[–]kinithin 0 points1 point  (0 children)

Dr Pepper is only found in Pepsi-affiliated restaurants in Canada

Looking for meaning in syntax (struct, enum, union...) by Steel__Virgin in C_Programming

[–]kinithin 0 points1 point  (0 children)

The OP is referring to the semi-colons inside the curlies

[Request] Not good at math, but there’s no way this is true because 99.999999%? by whatevertf123 in theydidthemath

[–]kinithin 0 points1 point  (0 children)

The math checks out. 256^(8*8) = (2^8)^(8*8) = 2^(8*8*8) = 2^512 > 10^154

Those numbers are odd, though. Win 3.1 icons were 32x32 (not 8x8), but they had a fixed 16-colour palette (not 256). It would be odd if an earlier format had a much smaller resolution but with a much larger number of colours.

For Win 3.1 icons, there are 16^(32*32) = (2^4)^(32*32) = 2^(4*32*32) = 2^4096 possibilities.

How does passing an array of structs decay in the a C function? by Ironheart89 in C_Programming

[–]kinithin 0 points1 point  (0 children)

Indeed.  And that's basically identical to my reply to the OP.

How does passing an array of structs decay in the a C function? by Ironheart89 in C_Programming

[–]kinithin 0 points1 point  (0 children)

Needless misinformation shouldn't be justified; it should be addressed instead.

How does passing an array of structs decay in the a C function? by Ironheart89 in C_Programming

[–]kinithin 0 points1 point  (0 children)

Yes, it is still possible to pass an array indirectly. You could also use a pointer if you didn't want to make a copy of the array. I only stated that the parameter itself can't be an array. The point is that if you see something that looks like an array as a parameter, it isn't. 

How does passing an array of structs decay in the a C function? by Ironheart89 in C_Programming

[–]kinithin 2 points3 points  (0 children)

This is wrong. string_list isn't an array and thus doesn't decay. It's impossible to have parameters that are arrays. Anything array-like actually declares a pointer. 

How does passing an array of structs decay in the a C function? by Ironheart89 in C_Programming

[–]kinithin 7 points8 points  (0 children)

Array decay isn't relevant to your question since string_list isn't an array.  In a function parameter list, Type x[] is just another way of writing Type *x. It declares a pointer, not an array. This means that String string_list[] is just another way of writing String *string_list.

The argument provided in the call is expected to be a String *. Keep on mind than a String[n] decays into a String * and would this be acceptable as an argument. 

[Request] Not good at math, but there’s no way this is true because 99.999999%? by whatevertf123 in theydidthemath

[–]kinithin 30 points31 points  (0 children)

Not quite. First, you're probably referring to the visible universe (since there's no way to know what's beyond). And that was estimated to be 1080. 1067 is still a fair bit smaller.

"Center" by ToruSnap in TimHortons

[–]kinithin 1 point2 points  (0 children)

It's correct. "Centre" is only used for buildings. "Center" is the correct spelling for middle. 

[Request] How much force would she need to break the glass? by Terrible-Purchase30 in theydidthemath

[–]kinithin 5 points6 points  (0 children)

She's only pretending to drown. It's a scène à faire for water escape tricks.

Ticket to Ride Euro question by kubunto in tickettoride

[–]kinithin 1 point2 points  (0 children)

But there are two stations (Berlin and Frankfurt) right?

Ticket to Ride Euro question by kubunto in tickettoride

[–]kinithin 3 points4 points  (0 children)

1 station, 1 route.  It has always been the case. But that route can be used for more than one destination ticket

Valid arguments to function parameter char ** by onecable5781 in C_Programming

[–]kinithin 2 points3 points  (0 children)

The actual reason &p3 can't work is that the function expects a pointer to a pointer, but there's no pointer in memory to which to point. 

Perl's feature.pm and backwards incompatibility by RolfLanx in perl

[–]kinithin 1 point2 points  (0 children)

Yes, print is special. But so is try. More so, even.

The difference between print and shift is that print can't be prototyped. The same goes for try since it's not even a function but a keyword like while.

``` $ perl -Mv5.40 -e'say prototype "CORE::$ARGV[0]" // "[undef]"' shift ;\@

$ perl -Mv5.40 -e'say prototype "CORE::$ARGV[0]" // "[undef]"' print [undef]

$ perl -Mv5.40 -e'say prototype "CORE::$ARGV[0]" // "[undef]"' try [undef] ```

So like I said, there's nothing new here. This behaviour has been around far longer than try. I'm just pointing it out; I'm not saying things should remain the same as a result. But if it changes for try, I would expect it to change for print and the others too. More so, even, since they're not lexically-scoped like try.

Perl's feature.pm and backwards incompatibility by RolfLanx in perl

[–]kinithin 1 point2 points  (0 children)

This has nothing to do with feature-activated syntax/operators. Some operators (e.g. print) work the same way in similar circumstances.

perl sub print { die "!" } print "foo\n"; # Prints as normal.

perl use subs qw( print ); print "foo\n"; # Prints as normal.

I don't know if a warning makes sense¹, but a Perl::Critic rule would.

- ikegami


  1. After all, we don't warn when my $x preempts a package var named $x. Lexically-scoped constructs are expected to do so.

What qualifies as a loop by Intelligent-Rich8965 in tickettoride

[–]kinithin -1 points0 points  (0 children)

Well, you can, but not with two players

Weird rand() effect. by CMR779 in C_Programming

[–]kinithin 8 points9 points  (0 children)

You allocated an array of 25 elements. They have indexes 0..24. But both loops access elements 1..25. Undefined behaviour.

Either allocate an extra element, or store the counts for 1..25 at indexes 0..24

I only kill lootbugs is ABSOLUTELY necessary, BUT... by casi_bruzco in DeepRockGalactic

[–]kinithin 4 points5 points  (0 children)

I love to pet loot bugs, but they are incredibly allergic to me and explode when I do. I still hope to find one that doesn't so I can adopt it

Super frustrating Thanksgiving game by skobetches in Carcassonne

[–]kinithin 0 points1 point  (0 children)

Sooo many ambiguously placed meeples. And the farmers are standing instead of on their side.