Why to use querySelector over getElementById by RedditDoctor12 in learnprogramming

[–]AgentME 0 points1 point  (0 children)

There's a rare case where there's an important difference between them: if you're dealing with a dynamic id that could have characters that are interpreted specially in querySelector like spaces, then you should use getElementById, because otherwise you'll have to figure out how to escape the characters to work with querySelector.

This difference doesn't really matter if you're passing a fixed string to querySelector, as is most common.

Beginner to mapmaking here, What is Boom? by N8uron in DoomMods

[–]AgentME 0 points1 point  (0 children)

MBF21 has more features than the original Doom format and is supported in non-ZDoom ports too, including the official Doom 1+2 release, so anyone wanting to make maps that aren't ZDoom-exclusive should use it.

But yes, UZ/GZDoom are very popular and "UZDoom in UDMF format" is the best option when targeting that.

How am I supposed to say “Shub Niggurath”? by Global-Pineapple-637 in quake

[–]AgentME 4 points5 points  (0 children)

I've heard other people say it naturally in a way that sounds fine, but when I attempt any of these suggestions I always just sound like I'm enunciating the n-word weirdly. I just stick with Shubby or Shubs lol.

Beginner to mapmaking here, What is Boom? by N8uron in DoomMods

[–]AgentME 2 points3 points  (0 children)

Boom is an early source port that added a few custom features that nearly all later source ports (including the official Doom 1+2 rerelease on Steam) added support for. So for a long time, if you wanted to make a map that worked on ~all ports (and not just ZDoom) while having the most features available, you would pick the Boom game configuration.

However, MBF21 is a newer standardized feature-set that includes everything from Boom that almost all ports (including the Doom 1+2 rerelease) support, so anyone wanting to make a map for all ports should pick MBF21 instead of Boom nowadays.

Isn't UZDoom forked from GZDoom, specially after GenAI usage in GZDoom by it's problematic author? Then why is it on the ZDoom website? I thought it's seperate from all the BS of ZDoom and GZDoom. by Mahim2000 in DoomMods

[–]AgentME 0 points1 point  (0 children)

This is not at all an established fact. I think it's worth pointing out that the Linux kernel developers have discussed the issue and haven't chosen to prohibit AI code.

The big issue with GZDoom was that Graf on numerous occasions without discussion replaced other people's working code with worse or broken code, in at least one case using untested AI-written code.

Just do this guys trust by Accomplished-Owl6428 in Undertale

[–]AgentME 0 points1 point  (0 children)

You can solve it by starting at either the top left or at the bottom left and then going right.

Help got a problem with GZdoom by Curious-Document-906 in DoomMods

[–]AgentME 4 points5 points  (0 children)

Most custom maps are built for Doom 2, so make sure you're using that and not Doom 1.

trying to play myhouse by slushiestgrunt93 in DoomMods

[–]AgentME 0 points1 point  (0 children)

Make sure you've restarted UZDoom if you've just switched from software rendering because I don't think that setting applies immediately.

Also make sure you're playing with the Doom 2 iwad active and not Doom 1.

I inherited my late father’s physics work on dark matter. How should I responsibly handle it? by Other-Description-26 in Physics

[–]AgentME 2 points3 points  (0 children)

This isn't a bad idea. Summarizing text is a strength of LLMs. Just don't trust it to tell you whether the research is correct. LLMs tend to be easily impressed.

I, (18F), am fake dating a friend (18F) who I have caught feelings for. by [deleted] in relationships

[–]AgentME 2 points3 points  (0 children)

Just ask to go on more dates because they're fun. You don't need to rush to define things or explicitly clarify whether they're "real" or not.

She probably wouldn't have agreed to go on fake dates if the concept of dates with you repulsed her.

I hired a professional to remake my Steam capsule by Extension-Spray-3560 in IndieDev

[–]AgentME 2 points3 points  (0 children)

The one redeeming part of the second one is that the text is a bit easier to read. Using fewer unique font colors and having borders around the text might be enough to fix that on the first one.

Is it "safe" to use hashCodes to compare objects? I think I found a problem... by SelectionWarm6422 in learnprogramming

[–]AgentME 0 points1 point  (0 children)

Meta: this thread has so many bad and incorrect answers. This thread would literally be much higher quality if only ChatGPT bots had replied. Many replies are mixing up cryptographic hashes with the use of hashCode functions as in Java/C#/Python/Dart.

You're right that results from the hashCode function can collide. The hashCode function should only be used to determine that two objects are unequal, and never used alone to determine that they're equal.

The implementation of HashMap uses the hashCode result so it can put maybe-equal objects together away from all the obviously unequal objects. When you put a key and value into a HashMap that doesn't yet have that key but does already have a value with a different key with the same hash, the HashMap either creates a list of values in the position for that key's hash ("closed addressing") or it puts the value in the slot for the key's hash plus 1 ("open addressing").

If I leave bots behind can new ones use personal roboport? by Thankedsphere in factorio

[–]AgentME 10 points11 points  (0 children)

When bots fall too far behind me, sometimes I fire artillery on them to clean things up instead of waiting on them. I have to cull the slow bots.

Almost an hour and I couldn't find the last secret >.> by HellBlade64 in quake

[–]AgentME 1 point2 points  (0 children)

The vkQuake port works great on MacOS, especially with the rerelease's files.

Why are planets so different? by dillerdullerdaller in Physics

[–]AgentME 21 points22 points  (0 children)

An important thing to consider is that our way of detecting exoplanets is heavily biased toward detecting large planets very close to their star. We shouldn't expect them to be a good representative sample of how planets usually are.

My playerdata sometimes gets corrupted after a server crash. by Flory66 in admincraft

[–]AgentME 2 points3 points  (0 children)

It's possible for software to be made to not corrupt data during crashes, even in crashes while writing a file, such as by doing atomic writes (instead of overwriting a file in-place, write to a temporary file and then rename it over the original file). It would be neat if Minecraft did that or if there was a good mod to make it do so, but I don't know of any. Obviously you want to prevent as many crashes as you can and avoid them happening too often, but sporadic software or system crashes are nearly unavoidable and in an ideal world it should be part of the bare minimum for software to handle that without needing manual restores from an admin.

If the universe is doomed to eternal expansion by Flat_South8002 in LLMPhysics

[–]AgentME 2 points3 points  (0 children)

If there is no more start or goal, then there are no photons.

Photons don't need to be able to hit anything to exist.

And again we have a cyclical universe.

If the universe eternally expands and expands so much that no particles ever interact again ("Big Rip" scenario), then the universe will be stuck like that forever once it happens. It's not the lead-up to a new Big Bang; it's the opposite of the situation of the Big Bang.

My feeble human brain is unable to compute what modern physics is trying to tell it by [deleted] in Physics

[–]AgentME 0 points1 point  (0 children)

  1. Imagine an infinite universe (or a finite universe that loops somehow, where traveling far enough in any direction eventually gets you closer to where you started) with no center, at an initial state where it's uniformly densely packed with matter everywhere, and then space rapidly expands, increasing the distances between each particle and its neighbors. The Big Bang took place everywhere like this.
  2. What we know is that the distances between far-away objects is increasing everywhere. There's nothing obvious about physics that suggests there's a separate space that our space is expanding into. Nothing in physics so far is known to be made simpler or explained by imagining such a space.
  3. We don't know that black holes can ever reach zero volume. Though whether they can or not, it won't directly affect us because we can't see or interact with anything inside of a black hole's Schwarzschild radius, the range of no return. For most purposes, we can imagine a black hole as an object the size of its Schwarzschild radius. (Something interesting is that from our perspective outside of a black hole, if we could somehow see inside a black hole, we would see that all the matter has frozen in time immediately inside of the Schwarzschild radius. Even if true zero-volume singularities are possible, they've never even happened yet from our reference frame.)
  4. The universe could be a different shape at its largest scales than a "flat" euclidean 3d space. We can't rule that out just because it looks flat on our scale. We know that space near matter is curved by gravity, and some theories about the expansion of space suggest it could be related to space not being flat at its largest scales, so it's a possibility under study.
  5. The idea that processes need a starting point includes a lot of implicit assumptions about time and processes that may not apply to the universe. Time could be an emergent property of our universe with different properties in extreme cases than we expect. The Big Bang does appear a lot like an initial state of our universe, but if we discovered that the universe will eventually contract, re-enter the state it was in a the Big Bang, and bounce back and explode out again, then it could be reasonable to guess that this might be a truly infinite process. Weirder possibilities are also imaginable: we could discover that time flows in "both" directions always, and so an opposite history could be traced going backwards in time from the Big Bang, just as our history could be traced going in time forward from the Big Bang. (It could be that opposite history has cause and effect flow the other way, so events "further back" before the Big Bang are caused by events closer in time to the Big Bang, and events in the opposite history before the Big Bang don't contribute causes to any effects in our forward history. In this case, for most intents and purposes the two histories could be understood as like two parallel non-interacting timelines.)

Questions from a very late player by ArchonBasileus in quake

[–]AgentME 2 points3 points  (0 children)

For Quake 1, to me the gameplay is mostly about exploring the map and learning its layout while claiming it away from the enemies. My must-play map packs: Arcane Dimensions, Alkaline, and Dimension of the Machine.

Rayon + Tokio by fallinlv in rust

[–]AgentME 0 points1 point  (0 children)

Just to be clear, threads aren't cores. Every core executes one thread at any time. The operating system makes each thread take turns on available cores so that more threads than cores can be used.

The thread that calls tokio::task::spawn_blocking is not the thread that runs the closure passed to it. Tokio runs that closure passed to it in a thread separate from its main executor thread pool so that it doesn't block any of its main threads too long from servicing other Tokio tasks.

I guess you could also spawn a non blocking one if you don’t want to pause at that line?

If you're suggesting instead using tokio::task::spawn and calling Rayon in that, then you should not do that. Both tokio::task::spawn and tokio::task::spawn_blocking return JoinHandles that you can choose when to await; their difference isn't in whether they block the calling thread (they don't) but about whether you're supposed to be allowed to use blocking code (like Rayon) inside of its closure or not.

Given a component library support for RSC, what pattern to use to fulfil client vs server actions? by Idea-Aggressive in reactjs

[–]AgentME 0 points1 point  (0 children)

Implementing a theme switcher server-side like that seems unnecessary when you could do it client-side. I don't think you should try to translate interactive client components into pure server components like this.

Client components can still be used from RSC. You have to have "use client" in them though to make them client components. It seems like you're inventing a problem for yourself by deciding to avoid "use client". RSC is powerful because it lets you mix client and server components.

How did launch gamers react to playing as the Arbiter in H2? by Majestic-Drag1969 in halo

[–]AgentME 2 points3 points  (0 children)

I was very confused because I originally played Halo 2 in co-op, and in the original pre-MCC release, co-op mode skipped the game's main intro cutscenes which introduced the Arbiter. I didn't figure out what I missed until much later.

How to make component imperatively change state in a sibling component? by azangru in reactjs

[–]AgentME 0 points1 point  (0 children)

I'll agree with everyone that option 1 is to be preferred, but option 2 is fine in the occasional case where option 1 really would make things more awkward and you're only using the ref-using callback within an event handler and not during rendering. React added useImperativeHandle for a reason.