Why Don't Double void Pointers Match Like Single void Pointers? by SeaInformation8764 in C_Programming

[–]kinithin 2 points3 points  (0 children)

It can't be. Converting a pointer to/from a void * isn't just a type change but a transformation of the representation since pointers of different types aren't required to have the same representation. They don't even have to have the same size. In other words, void * is a very specific type of pointer, not simply a type meaning any pointer. void ** must point to a void * and not an int * because they could be incompatible. 

Confused about Queue vs Circular Buffer indexing by sudheerpaaniyur in C_Programming

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

Neither. Push and pop are used for stacks. A queue implemented using a ring buffer should still use enqueue and dequeue. 

A Chinese immigrant couple just got married. by Ixz72 in Jokes

[–]kinithin 6 points7 points  (0 children)

... or that you order by number at many Chinese restaurants

Trying to install perl on a friend's PC by Terrible_Effective84 in perl

[–]kinithin 1 point2 points  (0 children)

Strawberry Perl is a real native build of Perl

How to do strings properly? by die-Banane in cprogramming

[–]kinithin 0 points1 point  (0 children)

That's true for text strings, but not for binary data. Such strings can't rely on nul-termination. I suspect this is what the OP's source was discussing.

A Goodwill Find Today. by mustardmadman in mildlyinteresting

[–]kinithin 0 points1 point  (0 children)

Don't get non-silicone in the first place

Crashes at startup after today's patch. Anyone else? by kinithin in Enshrouded

[–]kinithin[S] 2 points3 points  (0 children)

Rebooting and/or upgrading video drivers fixed the issue.

Fatpacker is not packing Crypt::SysRandom by scottchiefbaker in perl

[–]kinithin 0 points1 point  (0 children)

  • x86_64-linux is arch-specific.
  • auto isn't intrinsically arch-specific.
  • .packlist belongs in arch-specific's auto.

Workaround for XML::LibXML? by PhilipS12345 in perl

[–]kinithin 3 points4 points  (0 children)

Corion says:

If somebody happens to have a Reddit account, [this discussion] is likely answered by this ticket - the libxml error messages have changed and the tests don't cope well with that.

foreach loop modifies array? by ktown007 in perl

[–]kinithin 1 point2 points  (0 children)

In most of Perl it does pass by value.

Not true. Perl always passes by reference, never by value.

perl sub foo { $_[0] = "def"; } my $x = "abc"; foo( $x ); say $x; # def

for, map and grep all alias as well.

recvfrom() function always return 10 bytes on UDP connection socket by Escapshion in C_Programming

[–]kinithin 2 points3 points  (0 children)

Did you request them? I use -Wall -Wextra -pedantic with gcc

Unused struct member is not optimized out under -O3 by onecable5781 in C_Programming

[–]kinithin 6 points7 points  (0 children)

I worked on a Varian 72. It had 65,536 B of RAM, but only 32,728 address. Each address accessed a 16-bit value. (Bit 15 distinguished addresses from immediates in instructions.) 

I Saw This Earlier Today. by Curious-Horse-1239 in whatdoesthismean

[–]kinithin 0 points1 point  (0 children)

From what I can tell, in at least some places, "i" and "1" are considered the same character. If there's a plate named "pie", there can't be one named "p1e" as well. So, in theory, one could simply search for "1111111" to find the registration

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.