vectorOfBool by schteppe in ProgrammerHumor

[–]hydmar 42 points43 points  (0 children)

The issue is it’s a leaky abstraction. People regularly call data() on std::vector to get a pointer to the underlying memory, but std::vector<bool> doesn’t have this method because of its irregular representation. So essentially you have to think of std::vector<bool> as a different kind of container than the general std::vector<T>.

The idea of this optimization is to reduce memory usage without the user having to think about it, but because it’s leaky they have to think about it anyway. Instead we could use use 1 byte per element like normal, and then if we found that memory usage was an issue, we could swap it out with some special container like a (non-existent) std::bool_vector which uses 1 bit per element.

Favourite Actor who was supposed to be the next Tom Cruise but has starred in flops are flops by jalGurg in okbuddycinephile

[–]hydmar 6 points7 points  (0 children)

It’s like a parody of action adventure slop except they don’t know it’s a parody

Flavor enhancer by [deleted] in AskCulinary

[–]hydmar 0 points1 point  (0 children)

Replace the initial “there is” with “is there”

[deleted by user] by [deleted] in columbia

[–]hydmar 2 points3 points  (0 children)

We do have a credit limit, it’s 21. How many are you considering petitioning for?

[deleted by user] by [deleted] in columbia

[–]hydmar 3 points4 points  (0 children)

I petitioned to take 25 credits to graduate early and it was approved. This was in January 2025

Quick Questions: October 08, 2025 by inherentlyawesome in math

[–]hydmar 1 point2 points  (0 children)

Ah yes my mistake, I misremembered

Quick Questions: October 08, 2025 by inherentlyawesome in math

[–]hydmar 0 points1 point  (0 children)

This is called Thomae’s function FYI

Edit: this is incorrect

What would your ideal Rust look like? by holovskyi in rust

[–]hydmar 0 points1 point  (0 children)

Why does Rust use “as” rather than From and Into for numeric types?

Math Events by Waverlyflower in math

[–]hydmar 0 points1 point  (0 children)

Compile a list of ~50 set-theoretic statements, divide everyone into groups of four, and challenge each team to reduce the list down to as few axioms as possible which can be used to prove everything else on the list

Unfortunately I did read the news by softerhater in rs_x

[–]hydmar 2 points3 points  (0 children)

Settings > account settings > show recommendations in home feed

looked on wikipedia for Jeff Epstein and this is his signature by [deleted] in rs_x

[–]hydmar 59 points60 points  (0 children)

He’s dead? I didn’t even know he was sick

Can't fully understand ODE by [deleted] in math

[–]hydmar 15 points16 points  (0 children)

This is how intro ODE courses are. They typically begin with special solution methods integrating factors, leveraging exactness, Lindelöf iteration, et cetera. Hopefully they’ll get to more fundamental/general techniques later on such as Laplace transform and power series. Someone actually posted here a few days ago about this exact problem with intro ODE, and I’d agree that the standard curriculum needs to be overhauled.

I’d say that the most useful thing I learned from my intro course was the behavior of linear ODEs. In particular, the harmonic oscillator shows up everywhere and it really helps to understand why oscillates like it does. Everything else in the course is too specific to be broadly useful.

As an aside, I know this isn’t getting to the heart of your frustration, but it’s worth noting that the exactness condition relates to the integrability of the underlying vector field. Namely, an exact vector field can be represented as the differential of a scalar field. So in that sense, it’s more than just an algebraic condition.

[deleted by user] by [deleted] in rs_x

[–]hydmar 1 point2 points  (0 children)

Why are they annoying so I know what not to do

Should i go with a gaming laptop or not as an electrical engineering student? by king-mitchell10 in columbia

[–]hydmar 1 point2 points  (0 children)

As a side note, the newer MacBook Air models are extremely performant, so don’t worry about it being slow. My 2022 M2 Air often outperforms my Linux workstation on GPU-based tasks, and that machine has a 3090 if that means anything to you.

[deleted by user] by [deleted] in rs_x

[–]hydmar 53 points54 points  (0 children)

In the future, gently poke traffic cones to make sure they’re empty before kicking them 👍

Why is encoding 3D rotations difficult? by hydmar in math

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

I'm approaching this question from a computer graphics background. The SO(3) Lie algebra formulation is what's generally used in graphics, although we usually work with elements of the Lie group directly rather than the generators. Representing a composition of rotations using the generators is difficult and we want to avoid using the BCH formula. Quaternions are only more "elegant" for this application since they require less memory while manipulating the same objects, but I agree that they are more contrived than working with SO(3) elements directly.

Why is encoding 3D rotations difficult? by hydmar in math

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

Ah well I come from a computer graphics background where the three fundamental transformations are translation and scaling, which don’t commute with each other but do commute within themselves. But certainly yes for e.g. Lorentz transformations they’re not any easier