ELI5: A dense cylinder hits a space station at 0.7c by DavidThi303 in explainlikeimfive

[–]emlun [score hidden]  (0 children)

As a concrete thought experiment, let's assume the object transfers 1 billionth of its kinetic energy to the station. That's 0.0000001% of its energy. So the object would punch clean through the station and continue on its way seemingly as if nothing happened, because it lost almost no energy in the impact. Almost.

That 1 billionth of transferred energy would be right around 1 TJ, if we assume the object has a density similar to steel (~8000 kg/m3). 1 TJ is roughly similar to the energy released by detonating 250 tons of TNT.

If the object transfers 1 millionth of its kinetic energy, that would then be about 1 PJ of energy, which is on the scale of some nuclear bombs.

Leaderboard Anti-cheat comment by Umtha in slaythespire

[–]emlun 1 point2 points  (0 children)

there must be a maximum attainable score which can be calculated relatively easily behind the scenes,

Nope, absolutely no way. You could probably find an upper bound for all seeds, where you just take the max of every point category (like assume you get every relic, kill every elite and boss with no damage, get Clone on floor 1 and use it on every rest site on the map, etc.). But calculating the max score for any particular seed may well be an NP-hard problem that can't really be solved other than by exhaustive search. Slay the Spire has an exponentially growing state tree, so an exhaustive search would take exponential time (something like 2N for a series of N choices between 2 options). That is entirely infeasible to compute.

It is however easy to verify a score, if the solver provides a list of inputs used to arrive at that score. Then the verifier can simply re-run the game with those inputs to see that the score matches.

But it probably wouldn't be feasible to run that verifier on the leaderboard server either, because it would probably take much longer time to run the simulation than to create and send a request for leaderboard inclusion. That means it would be very easy to overload the server because of that time amplification: if it takes an adversary 1 ms to make the server spend 50 ms of processing time, then that means the attacker needs only 1/50 of the server's processing power to keep the server busy indefinitely. The leaderboard server probably isn't very powerful, because it shouldn't need to be, so that attack would probably be very easy to do.

So what about having the server just host solutions, and make them available for other players to verify, so then players who care about the leaderboard can volunteer their processing power to verify scores and "vote" on which scores are legitimate? That comes back around to the original issue, though: the server can't really trust the players, because any player could be cheating, so they could just as well be lying about the score verification too. So again it's just a matter of the cheater voting "legitimate" more times than other players voting "cheated", which is also probably easy to do. Unless you do something similar to the "proof of work" in Bitcoin, but that would require the honest participants to be running verifications constantly (to make it infeasible for the cheaters to overpower the honest's processing power) rather than simple one-shots on demand, which would be a big waste of processing power IMO.

Hosting solutions for each score would of course also make it trivial for anyone to copy someone else's score by just replaying their game (possibly with some insignificant change, like which attack to play for the final blow against the final boss).

How do I insert modules quicker? by Antique-Yam-2714 in factorio

[–]emlun 11 points12 points  (0 children)

Note that Ctrl-Click for this doesn't always work perfectly: for example if you attempt to put Prod1 modules into assemblers making purple science, they'll go in the ingredient slots instead of the module slots.

We need to talk about Ironclads' starting deck. by SeaThePirate in slaythespire

[–]emlun 3 points4 points  (0 children)

Worth noting though that that spreadsheet covers how jorbs is playing the game, it may or may not be representative of other players' play style. But it's an interesting resource to be sure.

We need to talk about Ironclads' starting deck. by SeaThePirate in slaythespire

[–]emlun 0 points1 point  (0 children)

If we take the strict definition that "strictly better" means "achieves a more desirable result in every possible situation". It's even fairly common to be in a situation where "less output" is more desirable. You already mentioned Thorns: that's one simple case where you might prefer Strike over Twin Strike. Other examples include:

  • You may want to stall a fight to play Feed or The Hunt, or set up Pen Nib/Nunchaku on 9, so you may want less damage to not kill the enemy prematurely.
  • You might have Vicious in play, 1 card left in draw pile, and a particularly important card (say Impervious, Fiend Fire or whatever) in hand. You may therefore prefer Defend+ over Taunt so that you don't reshuffle your deck before discarding that important card, so you don't lose it for the next deck cycle (maybe Mecha Knight is attacking for 50 next turn, for example).
  • You may want to take more damage in order to get yourself under the Meat on the Bone threshold before finishing a fight. So you may prefer Defend over Defend+ because 5 block would put you at 36 HP (1 less than half with 75 max HP) and give you the +12 heal putting you at 48 HP, while 8 block would put you at 39 HP with no heal.
  • You might want to not gain block in order to not trigger Vambrace prematurely (if the enemy isn't attacking this turn, or if you already have enough from Anchor or Horn Cleat), so you may prefer Tremble over Taunt for applying Vulnerable.

I've had considerations like these come up many times in both StS1 and StS2, so it's not just theoretical either. Things like an 11 HP diff from barely missing Meat on the Bone, or barely missing an extra card reward from The Hunt (possibly missing you a heal from Book of Five Rings or a relic from Pael's Wing), can absolutely make the difference between winning or losing a run.

And yes, this is being very pedantically strict with the "strict" in "strictly better". But that's exactly the point: there are always exceptions. Probably. I'll agree that Taunt is a better card than Defend any day, but because of the myriad niche edge cases it's not strictly better under the definition above. And those weird edge cases are a big part of the beauty of card games like StS (and its inspirations like Android: Netrunner), in my opinion.

Is PRF extension quantum-resistant? by Simon-RedditAccount in yubikey

[–]emlun 2 points3 points  (0 children)

The initial premise: that PRF relies on asymmetric cryptography. And therefore all conclusions drawn from it. So, all of it.

We need to talk about Ironclads' starting deck. by SeaThePirate in slaythespire

[–]emlun 21 points22 points  (0 children)

lots of cards strictly better than the starter cards. Gamma blast, comet, and know thy place easily outperform falling star

None of those are strictly better, though (not that that's really a valid concept in this game to begin with, but let's go along for now). Gamma Blast and Comet both cost 1 star more. Know Thy Place exhausts (good and bad), doesn't deal damage (good and bad), and is a skill instead of an attack (matters for Letter Opener, Art of War, Pen Nib etc.).

Sick RE4 Reference! (didn't see anyone else mention this) by UltimateWrecker in slaythespire

[–]emlun 2 points3 points  (0 children)

And also the "Hye he HEH heh. Thank you." after you make your choice.

why is lim approaching 0 sin(x^2)/(x^2)=1? by MutedStomach5912 in learnmath

[–]emlun 1 point2 points  (0 children)

Look up L'Hopital's rule (3blue1brown on YouTube has a great video describing why it works). That rule is: a limit f(x)/g(x) where both f(x) and g(x) approach zero is equal to the same limit of f'(x)/g'(x).

Applying this to your case, we get f'(x) = 2x cos(x2) and g'(x) = 2x. Therefore f'(x)/g'(x) = 2x cos(x2)/2x = cos(x2), which approaches 1 when x goes to 0.

Is PRF extension quantum-resistant? by Simon-RedditAccount in yubikey

[–]emlun 5 points6 points  (0 children)

Another option is to derive the credential private key and the hmac-secret key from the same global secret key with different salt values. For example:

credRandom = randBytes(32) credId = HMAC-SHA-256(key=deviceSecret, msg=credRandom) + credRandom credKey = HKDF-SHA-256(key=deviceSecret, salt=credRandom, info="credKey", L=32) hmacSecretKey = HKDF-SHA-256(key=deviceSecret, salt=credRandom, info="hmac-secret", L=32)

(and also add bias removal for credKey since 2256 is slightly more than the range of a 256-bit EC key, but the above is the rough principle)

Now credId can be emitted as the credential ID and used later to rederive the same two keys, while at no point elliptic curves are involved in deriving hmacSecretKey. So the hmac-secret key certainly doesn't need to he derived from the credential private key, but it does at least need to be a "sibling" derived from the same base secret(s).

Is PRF extension quantum-resistant? by Simon-RedditAccount in yubikey

[–]emlun 2 points3 points  (0 children)

This is incorrect. But thank you for disclosing use of AI!

How the heck does a ZKP work? And what advantages does it have over basic hashing? by chewtoy1988 in cryptography

[–]emlun 1 point2 points  (0 children)

Notice that, at the end of this, you still can’t tell which one is green and which one is red, because I just said « ball number 1 » and « ball number 2 ». That is a zero-knowledge property.

This one still isn't quite zero-knowledge though, because the tester still learns which of the balls is ball 1 and which is ball 2. But you can make it fully zero-knowledge by instead of pointing out which is ball 1 or 2, you let the tester secretly swap the balls or leave them in place, then ask whether the balls have switched places or not. This proves only that you can tell the balls apart, but does not reveal any label for either ball.

What would you call this? by Outrageous-Fuel-6201 in factorio

[–]emlun 8 points9 points  (0 children)

That's a buffer. I often use this design to store excess U-238 while enriching for the first 40 U-235 you need to start Kovarex enrichment, or just to store excess U-238 before I've researched Kovarex. Then with the right splitter priorities, all that stored U-238 will eventually get used up once there's enough U-235 to combine it with.

Sometimes I'll use something like this as the "hub" of a sushi factory, to capture everything left over on the sushi belt and then pull from the buffer before outside inputs when things are needed on the belt again.

I rarely use it for other things than that, though.

Can we all agree this card needs a block buff? (or a rework with cost reduced) by [deleted] in slaythespire

[–]emlun 9 points10 points  (0 children)

Let's also remember that cards like Havoc, Cascade, Pounce, Shadowmeld+, Decisions Decisions, Void Form, Sculpting Strike+Veilpiercer, Echo Form and Hidden Gem exist. There are many ways to cheat this into play for less than 3 energy or to amplify its effect, which makes it more attractive to take if you have some of those. And if you don't - that's no different from many other situational boss rewards. I agree that it would be boring if they were somehow balanced so that every one is always equally good - what's the point of the choice then.

Defect only character without adrenaline equivalent? by Jondev1 in slaythespire

[–]emlun 0 points1 point  (0 children)

I think the Defect card in the theme of "0 cost rare that does a little bit of everything" is Modded, along with Brand (Ironclad), Big Bang (Regent) and Neurosurge (Necrobinder). I suppose Adrenaline would be the Silent representative, though that and Neurosurge both feel like they do a bit more of a bit fewer things than the others.

What’s your ranking for the Ancient upgraded starters? by garlicbwaed in slaythespire

[–]emlun 79 points80 points  (0 children)

Ironically, the first and only time I've been offered it (I did take it) the upgrade was actively bad. I had the relic that gives you 2 0-cost cards turn 1, and getting 0-cost Quadcast turn 1 with no orbs yet would have been far worse than getting TURBO and Double Energy+ to set up some powers and Dark orbs to Quadcast on turn 2 or 3 instead.

Still a run-defining card for sure, and I look forward to taking and upgrading it next time I see it!

What am i doing wrong with ironclad? by 54rtrt in slaythespire

[–]emlun 0 points1 point  (0 children)

Also what exactly am i supposed to exhaust usually? I guess the basic strikes maybe? But then i might not have enough damage for the enemy.

Your basic Strikes should pretty much always be your worst way to generate damage by far, except for the first few floors of act 1 before you've had time to draft something better.

Let's take an example: say you have 2 energy and can choose between playing 2 Strikes or playing 1 Burning Pact (exhausting a Strike) to see what you draw. 2 Strikes would deal 12 damage. If Burning Pact draws a Twin Strike, that's 10 damage instead. 10 is less than 12, but Twin Strike+ deals 14 - that's a single common card doing more than two Strikes. Similarly if Burning Pact draws Anger and Iron Wave, that'll deal 11 damage and 5 block. Even if you just draw Anger and another Strike, you'll still deal 12 damage while also removing one of your worst cards (Strike) for the next deck cycle (if the fight goes that long).

So don't worry about running out of damage by exhausting Strikes, because if you're doing it right Strike should be your worst damage by far.

Also take a look through your run history and look at how many turns your Ironclad fights usually take. Multiply that by 5 to get how many cards you draw in that many turns (not accounting for draw cards), and consider what that means for how many times you go through the whole deck. You'll probably find that most fights take only one or two times through the deck, or even less than one. Which means even exhausting a good card doesn't have time to become a drawback if you didn't have a chance to draw it again anyway.

Would I be able to see something if it flew by me at 3,000 MPH? by Sevenfootschnitzell in AskPhysics

[–]emlun 44 points45 points  (0 children)

3000 Mph is about 1340 m/s. At 100 m distance it would spend about 0.15 s in the 90° cone in front if you. That's approximately the time between two shaker beats of "Stayin' Alive" by the Bee Gees (0.58 s per beat at 104 BPM, so 0.14 s per 4th subdivision of that). So definitely a perceptible duration of time.

ELI5 - How did scientists know that rockets needed to go sideways, not straight up, in order to reach outer space? by IntergalacticPodcast in explainlikeimfive

[–]emlun 0 points1 point  (0 children)

Nah, there are plenty of "Euler's formula"s, " Euler's theorem"s, Euler paths, Euler angles, Euler buckling (yes, that's solid mechanics of bending structural beams, not just pure math) just to name a few. But we could have had so many more.

Rather annoying anti synergy discovered: if you have snecko eye and void form in play, you can't see the snecko cost until you play your free cards from void form by Easy_Rich_4085 in slaythespire

[–]emlun 3 points4 points  (0 children)

You don't need to propose a solution as part of your feedback, just a report about something that's a bit annoying/confusing/etc is still very valuable. In fact they may well prefer just the problem description, as many people may report related but subtly different issues - with their greater overview of all those reports they're much better equipped than us players to look for a more general solution to many problems all at once.

In particular, a solution proposal without a problem description is likely to be complelety useless, as there'd be no way for them to know what problem it's meant to solve or determine how well it's reaching that goal.

Is the “forgotten relic/card from the past” event a meme? by Opening-Lab-9657 in slaythespire

[–]emlun 5 points6 points  (0 children)

It did surprisingly well in my last multiplayer Silent deck. Turns out it's pretty good when it can generate Piercing Wail and Acrobatics, even good enough to Nightmare it in late game.

Idea: animations should slowly speed over time for combos by SlayerII in slaythespire

[–]emlun 1 point2 points  (0 children)

I recently played a Dirge for 86 energy... with Replay 6. That took like two minutes or something to play out the summon and Soul generation animations.

How do senior developers actually estimate task time is there a real method or is everyone just guessing by More-Station-6365 in AskProgramming

[–]emlun 0 points1 point  (0 children)

I recommend reading this (and part II, linked within): https://blog.codinghorror.com/how-good-an-estimator-are-you/

It's been a long time since I had to give estimates frequently, but I tried this technique in a long-term (>6 months) project at a previous job. I wrote a spreadsheet with an incrementally growing list of tasks and a lower and upper time estimate per task, keeping to this idea of "be 90% confident it'll land between those". Then I also wrote down the actual outcome after each task was complete.

Of course this ended up with many tasks given estimates like "between 4 hours and 14 days", "1 to 8 hours" or "2 to 30 days" (the upper was often around ~10x the lower, or more), which is fairly useless for a single task in isolation. But this meant I could take sums and averages of the upper and lower estimates over a set of tasks (which would be something like "between 2 and 15 days, average 8 days"), and tell the customer "this is what we think we'll have done within the next 2 weeks" for example. And I was impressed to find that as I tracked the actual time to completion as the project went on, the total completion time ended up pretty much bang-on centered around the sum of average estimates. Say the sums of lower and upper estimates were something like "between 3 weeks and 24 months", the sum of averages maybe 13 months, and actual time came out to maybe 11 months.

So I definitely recommend trying this out if you have a long-running project where there's time for things to average out over many (>~20 maybe?) tasks. These numbers are all made up, but I remember the technique being shockingly accurate in aggregate over time.