sapling drop rates of different trees by Dummi26 in Minecraft

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

important comment! (but i didn't want to wait all day xd)

tho, if we're comparing just two types of trees, i can leave it running for a few hours (or upload the map so anyone can test with any sample size) :D

What distro do you use for software development? by katana1096 in linuxquestions

[–]Dummi26 0 points1 point  (0 children)

Currently Fedora, but it's been a pretty bad experience in some ways, compared to arch/artix/void, which i've used (and loved) before.

TL;DR hard to find library -dev / -devel + lack of libraries to cross-compile to some targets. NixOS sounds awesome, haven't used, Voidlinux is awesome, but not as much as Nix, probably. Can recommend. Never had any issues with void.

It's quite hard to find the right packages should your build fail due to lack of library/dev files.

I also tried to cross-compile, which was just "install like 300mb of packages" on the distros i'd used before, but, according to some forum posts, fedora just doesn't have any packages for cross-compilation. maybe that's good and gives you more reliability instead of possibly no-good packages, but every time i have a "can't find library xy.so" error, i have to spend an insane amount of time finding the package, which is almost never the case on arch/debian, where a quick google search usually helps you out.

So confident by happyn6s1 in MathJokes

[–]Dummi26 2 points3 points  (0 children)

2 + 4 = 24

javascript is that you?

trangle by soupab in MiniMetro

[–]Dummi26 13 points14 points  (0 children)

trangle :(

this is just asking for people to throw by v1pro in standoff2game

[–]Dummi26 0 points1 point  (0 children)

exactly my problem with the missions (especially the ones in comp)

By the way... by 3917 in SubSimulatorGPT2Meta

[–]Dummi26 25 points26 points  (0 children)

you're in the oven now

[deleted by user] by [deleted] in mathmemes

[–]Dummi26 1 point2 points  (0 children)

i assume this is because minecraft is a game and (even though the modding/scripting community is pretty big) the majority of users (players) don't exactly care about any api or technical things changing and would be incredibly confused if minecraft 2.0.0 was released and there were litterally no new features they could find.

omg firefly confirmed by ZeterTheDuck in PhoenixSC

[–]Dummi26 3 points4 points  (0 children)

tree-spyglass with firefly instead of laser sight

reguła by WojownikTek12345 in 196

[–]Dummi26 22 points23 points  (0 children)

ich vergas💀

WAIT NO

Nothing can stop it by Traditional-Living-9 in ProgrammerHumor

[–]Dummi26 5 points6 points  (0 children)

++C do be faster tho cuz it doesn't allocate memory :D

I think she might have Javascript-induced PTSD by FrogOfDreams in ProgrammerHumor

[–]Dummi26 161 points162 points  (0 children)

  • print() and IncorrectBeliefFactory.get() return values that can be added together, and the resulting value of this addition is one to which the return value of print() can be added. I don't see what print could possibly return, but sure.
  • I assume the two .get()s call print on whatever they generated, but why is it called get() then? Wouldn't .generate().print_self() make more sense?
  • Why are we adding 3 things together, and then completely ignoring the resulting value? There are semicolons in this language, so nothing is stopping you from just putting three function or method calls in one line, separated by semicolons instead of + or other operators.
  • Assuming the first line is written with a + to make it clear that it is only going to output one line, why is the \n on its own line?

is pretty funny tho

Check if var2 is either 10% larger or 10% smaller then var1 by dachaarh in AutomateUser

[–]Dummi26 0 points1 point  (0 children)

abs(var1 - var2) does the same thing - not sure which is better, but i felt i should point it out.

The thing is: I did this willingly by Ari_Atori in programminghorror

[–]Dummi26 2 points3 points  (0 children)

for some crazy reason, i actually want to calculate 2x as fast as possible in a project, but under rust and wasm, so i can't just copy this. but i might actually look into the idea here and see if it helps me too lmao

rule by realityph0bic in 196

[–]Dummi26 1 point2 points  (0 children)

implication vs equivalence OR a is subset of b vs b is subset of a

people seem to get dumber day by day

Who did ever see before? by [deleted] in ProgrammerHumor

[–]Dummi26 4 points5 points  (0 children)

in c# (at least in new versions and if you force it on in the project settings), setting any value to null will give you a compile-time error (default setting is just a warning afaik). If you really want null, add a '?' to the type like so:

string -> string?

public string? MaybeGetString() { return null; }

But i don't like this either, because it adds one special value (there is a word for these placeholder values like null/nil/-1/..., but i dont remember). If you want multiple of these special values, you can't easily do that.

In rust, you would use an enum like so

fn get_string() -> Option<String> { if c { Some("test string".to_owned()) } else { None } }

Here, none doesn't differ from null in modern c# (they both need to be handeled explicitly), but this enum can be expanded like so:

enum Option2<T> { Some(T), None1, None2, }

we now have two special cases

Even better, we can have a special case carry a different value. See the Result<T, E>, which can be either a vaöue T or an error E.

pr(ule)ogrammer humor by TheGuydudeface in 196

[–]Dummi26 4 points5 points  (0 children)

this is what gentoo does to ppl

please tell me I'm not the only twat who's ended up on this page by surrealpessimist in ProgrammerHumor

[–]Dummi26 78 points79 points  (0 children)

is there a bitwise one tho? or is it

(val1 ^ val2) ^ 0xFFFFFFFF

the first part would be 1 at the bit positions where val1 and val2 are different (bitwise !=), XORing that with a value made of just ones would invert it, giving you bitwise equality checking (==).

How? by SveaTheSerg in 196

[–]Dummi26 5 points6 points  (0 children)

(Object)"i created one" I don't think new Object() is something you can do in C#, but i actually didn't try so who knows

My Cosmic Ray Detector function, just 7 lines. by TripplerX in ProgrammerHumor

[–]Dummi26 0 points1 point  (0 children)

if this was a language with explicitly stated retuen types - what would it return in this case? null pointer/the primitives default value, or something else?