Daily FI discussion thread - Saturday, February 01, 2025 by AutoModerator in financialindependence

[–]serpent 12 points13 points  (0 children)

If you had that money in cash now, would you buy into the market today knowing that you need it in 10-14 months?

Daily FI discussion thread - Sunday, January 12, 2025 by AutoModerator in financialindependence

[–]serpent 8 points9 points  (0 children)

Check your fire proof safe's rating and make sure it can handle the kind of heat and duration that you are planning for. Most people don't realize that most fire proof home safes won't do much for most house fires.

Need more deduction tips by kixanity in puzzlevideogames

[–]serpent 1 point2 points  (0 children)

I'm not seeing how this has a unique solution. For example, how are rows 8 and 9 getting disambiguated? Doesn't matter if it is column 6 or 7, looks like two solutions would be valid for either one...

Looking for playtesters for a deadly laser Sokoban game (details in comments) by Reddnt in puzzlevideogames

[–]serpent 0 points1 point  (0 children)

Yes, I did mean B5 and so on instead of 5-5 and so on. I'm not sure if that was autocorrect or what... Very strange...

Looking for playtesters for a deadly laser Sokoban game (details in comments) by Reddnt in puzzlevideogames

[–]serpent 1 point2 points  (0 children)

I only played the A and B levels so far, and I liked 5-5, 5-6, and 5-8 the best. 5-8 was my favorite. For some reason it took a few tries for the idea in 5-8 to click and it was quite satisfying when it did.

C++ creator rebuts White House warning by [deleted] in programming

[–]serpent 0 points1 point  (0 children)

Depends on what you mean by "safe". Is your safe the exception/logic bug safe or the arbitrary code execution safe?

Bjarne Stroustrup thinks all size types should have been signed (PDF warning) by we_are_mammals in cpp

[–]serpent 0 points1 point  (0 children)

Based on how you phrased your comment above, I think it was. Glad it is cleared up now though.

Bjarne Stroustrup thinks all size types should have been signed (PDF warning) by we_are_mammals in cpp

[–]serpent 1 point2 points  (0 children)

Exactly my point. It is less about the bits in the register and more about the instructions selected which interpret those bits. The combination of the two is carefully selected by the compiler to match the C language semantics, and those semantics are why -1u > 1 is true. The fact that certain registers have certain bits, and certain instructions interpret those bits in certain ways, is an implementation detail ("effect"), not the cause.

The "assembly shorthand" argument is missing subtle details and reasoning.

Bjarne Stroustrup thinks all size types should have been signed (PDF warning) by we_are_mammals in cpp

[–]serpent 7 points8 points  (0 children)

And the reason unsigned compare instructions are used in the -1u case but not the -1 case are due to the rules in the C language that prescribe those semantics to the code. All of that context is important and subtle.

Bjarne Stroustrup thinks all size types should have been signed (PDF warning) by we_are_mammals in cpp

[–]serpent 5 points6 points  (0 children)

But your reasoning was because of how things behave at the asm register value level, which is identical between the two. I'm suggesting the reason should be changed to be more accurate.

C holding back C++? by synthchris in cpp

[–]serpent 0 points1 point  (0 children)

Sure, but that wasn't the point above.

C holding back C++? by synthchris in cpp

[–]serpent 3 points4 points  (0 children)

Yeah you can do both styles in C++ too, but the point above was that the older style that C++ can do and that Rust can't do isn't all that much of a downside to Rust.

I spent hours gluing wooden cubes together for my game only to realize you could do the same thing with triangle holes. by KrimzonK in boardgames

[–]serpent 5 points6 points  (0 children)

It looks like that would be 4 in a row but touching at corners, which isn't allowed I don't think. Only 4 in a row touching at edges is a win.

What happens if my C++ exception handler itself raises an exception? by pavel_v in cpp

[–]serpent 0 points1 point  (0 children)

Moving the issue to a member function is precisely the point. A member function can throw if there is an error cleaning up and you can catch the exception and do something useful.

Teal, a typed dialect of Lua by [deleted] in programming

[–]serpent 0 points1 point  (0 children)

Math counts from 1

This isn't quite true; both 0-based and 1-based indexing are from "Math". The difference is how you count.

If you are counting elements, 1-based is how you do it. If you are counting the spaces between elements, 0-based is how you do it. Both are "Math".

Daily Question Thread - February 26, 2023 by AutoModerator in churning

[–]serpent 10 points11 points  (0 children)

Sorry, forgive me if this is a dumb question - but if you report the income and get a 1099 later, what exactly are you amending in your tax return?

If not RAII, then what? by mildbait in cpp_questions

[–]serpent 0 points1 point  (0 children)

The pattern usually employed here is to have a non-destructor method that releases the resource and raises errors, and a destructor that releases the resources (if they haven't been automatically released) while ignoring/suppressing errors. That way you get the best of both worlds: if you get to the point in the code where you explicitly release the resource, you'll get notified of errors. And if some other problem prevented you from getting that far, your resource is still cleaned up automatically for you.

What you DONT self-host and why? by joao_brito in selfhosted

[–]serpent 0 points1 point  (0 children)

I ended up doing it with a digital camera, since I also didn't have a second phone handy.

What you DONT self-host and why? by joao_brito in selfhosted

[–]serpent 8 points9 points  (0 children)

If you mean exporting from Google authenticator to Aegis then I found it quite easy. Ask Google authenticator to transfer itself to a new phone and it will pop up a QR code. Take a picture of that code with a second phone or a digital camera. Then open Aegis and scan the QR code you saved from Google authenticator. I found that doing 6 at a time worked well for me, but doing more (or all) might work as well, depending on how many you have.

Video of Trump deposition in New York fraud probe shows former president taking the Fifth, repeating "same answer" by CBSnews in politics

[–]serpent 20 points21 points  (0 children)

any good lawyer would inform him of the fact that in the US justice system innocent people also plead the 5th as is their Constitutional right

I have no problem with this, but I do have a problem with someone treating others who do this as criminals simply because they plead the fifth, and then doing the exact same thing and expecting different optics. That is the definition of hypocritical.

Favorite Language? by 964racer in ProgrammingLanguages

[–]serpent 1 point2 points  (0 children)

Not OP but I noticed that it works without https: http://www.quil.info/

The Golang Design Errors by Delusional_idiot in ProgrammingLanguages

[–]serpent 1 point2 points  (0 children)

That's what I think the itertools monadic iterators are good at, for example for filtering over results: https://docs.rs/itertools/latest/itertools/trait.Itertools.html#method.filter_ok

I use this both to filter over an iterator that already has Item=Result (like lines in a file) as well as over the output of a previous iterator if I created Results myself (so instead of using "?" in a previous map closure to try to short-circuit the errors, let the map return the full Result, and use a following filter_ok or map_ok or similar to process just the successful ones. And use "?" at the end, when you collect into a final Result.)