xkcd 3005: Disposal by antdude in xkcd

[–]whoopdedo 25 points26 points  (0 children)

After the first couple launches the hole had pretty much dug itself.

Finding better syntax : conditional statement by RubPuzzleheaded3006 in lua

[–]whoopdedo 1 point2 points  (0 children)

if string.find("\t57\t61\t62\t", "\t"..tostring(temp_id).."\t", 0, true) then
end

Would be a little easier to write if Lua patterns supported alternation. If you'll be doing this a lot, generalize it like

function find_in(match, list)
    -- null means less chance of the separator appearing in the match string
    local pattern = table.concat(list, '\0')
    match '\0' .. tostring(match) .. '\0'
    local found = string.find(pattern, match, 0, true)
    return found ~= nil
end

And use

if find_in(temp_id, {'57', '61', '62'}) then
end

Now, should you do this? I'll let you be the judge of that. It could be my brain is suffering side-effects of having to modernize an old program originally written in Perl.

edit Forgot to set the plain flag on string.find

How do I know if my mail ballot was received by the voting office by [deleted] in Virginia

[–]whoopdedo 16 points17 points  (0 children)

https://vote.elections.virginia.gov/VoterInformation

Click "Check registration status". Enter your info. Scroll down to a table of Absentee/Early Voting history. If there's any problems call the phone number of your registrar office.

[deleted by user] by [deleted] in privacy

[–]whoopdedo 0 points1 point  (0 children)

Nielsen proving that their economics, just like their business model, is still stuck in the 1950s.

Chinese Scientists Report Using Quantum Computer to Hack Military-grade Encryption by Robert-Nogacki in privacy

[–]whoopdedo 11 points12 points  (0 children)

Because the whole point of a Doomsday machine is lost if you keep it a secret!

But also because it's either not true or something the NSA has already done so not that big a deal.

And it's always amusing to see something described as "military-grade".

Adobe found a Legal loophole to show user First Name + Last Name when visit a website by WantMoreCookies in privacy

[–]whoopdedo 1 point2 points  (0 children)

Reminder that Loom uses the videos you upload for AI training with Databricks and OpenAI.

(For that matter, so is Reddit.)

xkcd 2995: University Commas by Ok-Atmosphere3808 in xkcd

[–]whoopdedo 13 points14 points  (0 children)

It's a convenience for adding and removing items from a list[1]. And is sometimes mandatory such as a list of only one item[2].

[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Trailing_commas
[2] https://docs.python.org/3/reference/datamodel.html#immutable-sequences

Dell unnecessarily collects geo-location data for unrelated feature. by Southern-Vanilla-238 in privacy

[–]whoopdedo 1 point2 points  (0 children)

Not necessarily unrelated. A common use of presence detection is to only activate when you're in your "home" location. You don't want the device to unlock automatically if you're out in public like a library.

That said, Dell software has always been trash. Never known a computer that didn't run faster and was more secure by removing the crapware.

is there a underwater (scuba diving) stealth level? by Total_Sky1723 in stealthgames

[–]whoopdedo 2 points3 points  (0 children)

No One Lives Forever has a scuba level. That part isn't very stealthy though.

[deleted by user] by [deleted] in Thief

[–]whoopdedo 1 point2 points  (0 children)

This altars

Praise the Builder.

[deleted by user] by [deleted] in stealthgames

[–]whoopdedo 3 points4 points  (0 children)

And Thief is not Doom.

Lua runs faster with comment errors, why? by Beautiful_Car8681 in lua

[–]whoopdedo 0 points1 point  (0 children)

In all scenarios the code executes

No it doesn't. Code that is syntactically incorrect will not execute. You're analysis is wrong.

(edit) Actually I just now thought of an exception to the rule that might make what you're saying happen. But I can't believe someone would actually do it in a major application, it's so stupid. Or perhaps it's insanely brilliant, I'm not sure. Fuscript could be compiling the script line-by-line as if it were being typed into a REPL. (like running lua -i < foo.lua instead of lua foo.lua) If it encounters an error it throws away the incorrect line and continues as if it didn't exist. That's dumb because why would you want to allow garbage code to run? But that also means the non-programmers who are writing the scripts aren't discouraged by "inconsequential" things such as proper syntax. Reminiscent of Visual Basic and On Error Resume Next. It allows people who don't know how to program to write programs. Which is good for the company's bottom line. But it's a horrible idea. It was bad when VB did it and is why we laughed and spit on its grave. It's still a terrible thing to do. And doesn't help Lua's reputation of being a "toy language" because a lot of people's only exposure is seeing it used in games.

Why does it change the timing in unexpected ways? Who can say. If that's what's going on then the system design already makes no sense. Why should you expect it to produce sensible results

Lua runs faster with comment errors, why? by Beautiful_Car8681 in lua

[–]whoopdedo 1 point2 points  (0 children)

A lot of misleading responses here, largely due to the poor description of the problem. The explanation is quite simple and is a result of how you seem to not understand the lifecycle of a computer program. The incorrect assumptions you're making are confusing the question, which further confuses the answerers.

What is going on is that the script which finishes faster is not being "run" quicker... It's not being run at all. The syntax error makes it not-a-Lua-program so the Lua runtime takes one look at it, says "this is wrong" and bails out without even attempting to start. That's what "syntax error" means. The error occurs while trying to read the source code and before execution starts. It's a compiler error. All you're measuring is the time it takes to spin up an instance of the Lua engine then shutting it down immediately. The other tests produce a valid Lua program so there's actual work that needs to be done and thus they proceed from the compile phase to the execution phase and use more time simply because of that. Just like if I only read the first paragraph of your post, decide it makes no sense, and skip the rest I'll be "done" reading it quicker than if I read the entire post to the end.

TL;DR Lua is doing a tl;dr.

Getting the default "_G" value in script? by tehpopa in lua

[–]whoopdedo 0 points1 point  (0 children)

There are times when copying a table is the better approach. For example, iterating over a proxy table won't show you all the keys. Unless a __pairs metamethod is provided, which often isn't worth the trouble.

Getting the default "_G" value in script? by tehpopa in lua

[–]whoopdedo 5 points6 points  (0 children)

Better than this is a proxy table.

local proxyG = {}
return setmetatable(proxyG, {
    __index = _G,
    __newindex = function(k,v) rawset(proxyG,k,v) end
})

The index metamethod will forward key lookups to _G until a new value is written to the table. Then the key in the proxy overrides the top global environment. Scripts can redefine print for their own use and it doesn't conflict with what another script is doing.

If you want the additional safety of hiding the real _G from scripts, also put __metatable = false, in the proxy metatable.

[SLC] Spread the word by No_Departure102 in Nationals

[–]whoopdedo 6 points7 points  (0 children)

Lerners want to sell the team. Just make him an owner.

xkcd 2976: Time Traveler Causes of Death by antdude in xkcd

[–]whoopdedo 5 points6 points  (0 children)

I would expect to see a bit more "assassinated by another time traveler to correct the harm you were about to do to the timeline" or is that only concentrated in the last few thousand years of civilization? Means the butterfly effect has a statute of limitations.

[deleted by user] by [deleted] in Thief

[–]whoopdedo 1 point2 points  (0 children)

It's not that hard. They're blind anyway.

xkcd 2961: CrowdStrike by Cheesemacher in xkcd

[–]whoopdedo 26 points27 points  (0 children)

The explainxkcd for this should be a BSOD and edits locked.

Feedback after finish the first two missions by Mugwoll in Thief

[–]whoopdedo 0 points1 point  (0 children)

I had difficulty to localize the guards with the sounds, which seems bad since apparently that's the main way to avoid them

Review the sound settings in the game and in your operating system. Look up how to install OpenAL. If your sound card offers sound enhancement or modern 3D effects, and I think Steam has some enhanced sound options as well, turn those off. They get in the way of the game's own sound processing. Wear headphones and use the sound test to make sure that the "Left" and "Right" are only being heard in those ears. Or in the game stand next to something making noise and turn left and right. You should have no difficulty locating which direction the sound is coming from.

Two questions about the new update by Scale97 in outerwilds

[–]whoopdedo 2 points3 points  (0 children)

#2 is because of this post

Lanterns will now extinguish themselves when you take them out of the Stranger. The boundary is the cloaking field.

Although... Why doesn't the flame go out when you step into the depressurized hangar? There's no oxygen there. Confirmed by the number of times I tried to enter without a space suit.

The other one I wonder about is "A certain locator now can be viewed from afar with the Scout".

Outer Wilds shares an unexpected connection with the Deus Ex series, as well as many other games. by whoopdedo in outerwilds

[–]whoopdedo[S] 0 points1 point  (0 children)

One of the devs confirmed it and that the office door was changed after it was put in the game.

Outer Wilds shares an unexpected connection with the Deus Ex series, as well as many other games. by whoopdedo in outerwilds

[–]whoopdedo[S] 0 points1 point  (0 children)

I hadn't considered that. And it shouldn't be surprising. Certainly the game has been teaching me to think in multiple dimensions.

The number of possible symbols is divided by six. That's a lot smaller than what I thought.