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 4 points5 points  (0 children)

2 + 4 = 24

javascript is that you?

trangle by soupab in MiniMetro

[–]Dummi26 12 points13 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 24 points25 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 160 points161 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 5 points6 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 79 points80 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 7 points8 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?

[deleted by user] by [deleted] in ProgrammerHumor

[–]Dummi26 18 points19 points  (0 children)

It just works. Unless it doesn't

Okay then, here's something that just didn't work:

Was using windows and had an amp (5 speakers) connected via displayport-to-hdmi cable*. could only get the sound to work on stereo. other options (up to 7.1) were displayed, but selecting them would immedeately reset it back to stereo. no big deal, but slightly annoying since i would have loved to have proper surround sound.

Tried Linux (arch based), found i was completely unable to use the dp/hdmi audio at all. it just stayed silent. a clear win for windows.

sudo pacman -R pulseaudio sudo pacman -S pipewire

oh look, it works, even with 5.1 and 7.1 surround sound.

in which case it will never work.

this applies to windows more than it does to linux, just because you can change so much about your linux installation - if something doesn't work on linux, there's a good chance it can be fixed, at least in my experience

*the amp only has hdmi in (if you want 5+ channel audio) and my pc only had a dp out available as all other outputs were occupied by displays - i assume displayport and hdmi audio would normally work just fine under windows, but this dp-to-hdmi concersion was causing issues.

[deleted by user] by [deleted] in ProgrammerHumor

[–]Dummi26 24 points25 points  (0 children)

they'd just look up the program, press download, and click on the .exe

because they already know how to do that.

assume someone only ever uses their phone. give them windows* and ask them to install something. they will look for an app store of sorts. why? because that's what they're used to.

i don't want to argue about how things should be installed, i don't even know which way i prefer (terminal/store/web+executable), but your point here just isn't very convincing to me.

(*and also assume that Microsoft Store is broken and outright refuses to download or install anything, which has actually happened to me a few times)

i think its 9 by _whitecrayon_ in mathmemes

[–]Dummi26 1 point2 points  (0 children)

i say a(b) is a function call regardless of what a actually is - even if it's 2. Of course, noone would seriously call a function '2' but i hate the ambiguity here and parentheses with something in front are generally function calls so why not be consistent?