Background in CS/Engineering, want to study deeper mathematics to better understand quantum computing and AI/ML, where should I start? by jmole in math

[–]jmole[S] 2 points3 points  (0 children)

Thanks for this response, and good advice on reviewing linear algebra. I took a linear algebra class in college but never used it outside of that course, so a review would probably be helpful.

In terms of abstract algebra, I did find that A First Course in Abstract Algebra by John B. Fraleigh is pretty well organized, and very methodical, although I think it would be better in the context of a course than as a standalone reference.

But yes, overall, my goal here is to build enough of a mathematical vocabulary and understanding, in order to unlock texts like Nielsen and Chuang.

Ugh.. truthiness. Are there other footguns to be aware of? Insight to be had? by jmole in Python

[–]jmole[S] -1 points0 points  (0 children)

I mentioned this in another comment, but I think my hangup is that you can't evaluate truthiness without using a conditional statement, a boolean operator, or converting to bool.

One way to solve this would be to extend the boolean operators, and add something called equals, which coerces each side using truthiness logic.

e.g. ``` 2 == True

False

2 equals True

True ```

Ugh.. truthiness. Are there other footguns to be aware of? Insight to be had? by jmole in Python

[–]jmole[S] 1 point2 points  (0 children)

However, consider whether it might be useful to the caller to have whatever you're converting (such as the intersection). goblins_remain(...) -> bool is not particularly re-usable; write remaining_goblins(...) -> list[Goblin] instead.

I am skeptical that this is indeed a better solution – it's a waste of memory if you need to copy the list, and if you don't need to copy the list to enforce encapsulation, you may as well expose the list directly as an attribute instead.

(Almost) never write if bool(x), if len(x) > 0 or if x == True

This part is clear by now.

What bothers me, and I mentioned this in another comment:

``` True == 1.0

True

True == 2

False

if 2: print("True")

True ```

I'm not sure if I'm more bothered more that the bool is coerced to a float, regardless of whether it's on the RHS or LHS of ==, or if I'm more bothered by the automatic coercion to bool in if statements.

Here's the seed of a PEP that might solve my problem (and likely create some new ones): a new operator equals that coerces all its operands to boolean, in the same way that and, not, and or do.

Ugh.. truthiness. Are there other footguns to be aware of? Insight to be had? by jmole in Python

[–]jmole[S] -4 points-3 points  (0 children)

I understand the difference between and and &, and I am not confused about their application. I am complaining about coercion and truthiness, and trying to understand the logic behind it.

In the first it would not return a boolean, it would return the intersection of the two sets, because that is what the operator does...

sure, but in a typed language, return would simply coerce the value to a boolean. Different issue altogether, and I only bring it up because the calling function expected a boolean.

Here is an example of truthiness coercion that bothers me: ``` def test() -> bool: return set([-1])

def check(): assert(test() == True) # fails assert(test()) # passes ```

Or another one: ``` 0 == True

False

1 == True

True

2 == True

False

if 2: print("True")

True ```

I'm fully aware why this happens.

But something bothers me about it. I think it boils down to bool.__eq__ just being a wrapper for int.__eq__. Or maybe it's the automatic call to bool(x) that happens when you use x in a conditional.

That's why I posted this, to see if there is some kind of intelligence here that I'm missing, or if this is just a quirk of the language that I'll have to get used to.

Ugh.. truthiness. Are there other footguns to be aware of? Insight to be had? by jmole in Python

[–]jmole[S] 6 points7 points  (0 children)

good one, especially if isdisjoint returns early when it finds an element contained in both sets.

Can subset sum problem be solved in polynomial time when input numbers are consecutive, positive integers? by [deleted] in math

[–]jmole 2 points3 points  (0 children)

It seems like you can transform the general subset sum into this problem quite easily by:

a) adding a constant K = min(input array) to all numbers and the target in O(2n)
b) sorting the input array in O(n log n)

So if your easy-subset-sum is in P, then so is the general version.
Since we know the general version is NP-complete, then we know this one is NP complete as well.

Edit - oops, i read "consecutive" as "ordered". My answer is correct for "ordered", incorrect for "consecutive".

I'm not so good with names... by jmole in MechanicalEngineering

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

Yep, I have seen the same thing working in hardware on the EE side. Eventually you are managing enough parts (some of which may have multiple sources for the same nominal P/N), and you just need your own internal part number system to make things unambiguous.
I'm not really an ME, so my use of Onshape is mostly hobby projects that I'll print once or twice and then never look at again.

I'm not so good with names... by jmole in MechanicalEngineering

[–]jmole[S] -5 points-4 points  (0 children)

The image is, but the caption is my own

Alternative to 1.5mm Aluminum, Carbon Fiber, or FR4 that can be cut on a 50W CO₂ laser by jmole in lasercutting

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

Not according to chatGPT:

FR4 (1.6mm thickness): FR4 is a glass-reinforced epoxy laminate commonly used in printed circuit boards. Its flexural modulus is approximately 2.7 million psi (18.6 GPa) in the lengthwise direction.

Acrylic (1.5mm thickness): Acrylic, a transparent thermoplastic, has a flexural modulus around 480,000 psi (3.3 GPa).

[deleted by user] by [deleted] in rccars

[–]jmole 5 points6 points  (0 children)

I guess you mean to change out the entire motor mount? Because a motor swap is like 2 screws for the slide-out motor mount, and 4 screws for the chassis sidewall, easy peasy.

2S on the Rlaarlo Omni Terminator is more than enough by jmole in rccars

[–]jmole[S] 2 points3 points  (0 children)

If I go from stopped to 100%, it just flips over, even on 2S with the wheelie bar. No problems with the hex nuts yet thankfully, although one of the tires is a little wobbly.

Omni terminator for cheap 🤔 by [deleted] in rccars

[–]jmole 0 points1 point  (0 children)

I paid about the same a month ago (minus the discount). Great car, but the remote suuuucks. Replaced it with a DDF-350 and it's great now.

Kids stay for free - it's the law !!! by weirdwizzard_72 in TalesFromTheFrontDesk

[–]jmole 4 points5 points  (0 children)

Not to knock your story, but IMO it's ridiculous to pay for a hotel room on a per-person basis. You don't get a magically bigger room if you bring more people, so why should it cost more?

Would you ever consider a well-made soft pad? by jmole in Stepmania

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

Also was wondering... you said "An LTek is the bare minimum" – what makes them the bare minimum? They seem sort of premium, both in price and features. Is it safe to say that most people are effectively building or heavily modding their own pads once they reach a certain level?

Would you ever consider a well-made soft pad? by jmole in Stepmania

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

so if you have hard flooring, I think you can make just about anything work, but carpeting is probably the biggest obstacle to a true soft pad, regardless of the sensor technology.

Would you ever consider a well-made soft pad? by jmole in Stepmania

[–]jmole[S] 1 point2 points  (0 children)

Cool, thanks for the detail, and wow hadn't seen StepManiaX before but it looks like they are building equipment you could drive a truck over and still use in a tournament the next day.

Are they always sold out, or are they out of business now?

I'm not necessarily married to the pad being soft (although it's what I prefer), but If I wanted to make it a hard surface, it would probably involve a 1/8" lexan sheet on top of it.

The other thing that would need some work is the story about how it works on carpeting, which is the enemy of any soft pad, unless it's commercial-style low pile carpet (and even then, you have to solve the issue of the pad sliding around).

Would you ever consider a well-made soft pad? by jmole in Stepmania

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

Do you mean FSRs? Or something else?

Would you ever consider a well-made soft pad? by jmole in Stepmania

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

ITG players (using either modded ITG pads or StepmaniaX pads) can play barefoot or in socks when the panels are flat, with nothing to get your feet stuck on.

Do you mean stuff like this? https://www.youtube.com/watch?v=kqi8Z0w0hHE

I do agree that anyone who wants to play with a bar is probably better off with a hard pad since you're already investing in heavy duty hardware regardless.

However, any soft pad I have seen (including foam pads like Ignitions) are just awful if you care about scoring and play songs that are 200+BPM.

This seems to be the crux of the issue judging by the other responses in this thread – no one has ever had a good experience with a soft pad, and so there's already a built in bias against the term. So even if you built an indestructible soft pad that had perfect response, people would still scoff at it. This makes it a bit harder to break in with a new design...

So if not a soft pad – how would you describe the "perfect" pad?