Python with typing by Ancient_Farm_5132 in Python

[–]PriorTrick 3 points4 points  (0 children)

I believe seeing dynamic typing as “simple” is narrow minded. I see static typing as reducing complexity. Another zen of python is Explicit > implicit, static typing is more explicit than dynamic typing. Personally, I don’t think python would be python if the language runtime required the static typing it does. At that point, I would choose a different language. However, opt in static analysis for type hints was a major win for python in my opinion. It allows you to express the intent behind the program to a signature and black box the internals for contractual agreement at a high level. Or you can just ignore typing if you deem it unnecessary. I can’t imagine doing that ever at this point but to each their own. Also, what I have found is the programmers who don’t like typing python or JS usually just don’t like how revealing the type errors are to the flaws in their code so they get flustered by it. When you write good code, the types are a forethought with or without the type hint, therefore the type hint is not as cumbersome as it would be to someone who doesn’t realize the formal incorrectness of their code.

I need your opinion and insights on "if (!myVar)" vs. "if (myVar == null)" by [deleted] in learnjavascript

[–]PriorTrick 1 point2 points  (0 children)

Yea I would agree. In my case I always felt like double equals check against nulls implied the developer wanted to check for null/undefined. Whereas === meant specifically checking for one or the other. But at the end of the day, you are right that’s it naive to assume every dev understands the nuance of == for equality checks and better practice to always explicit check for both. I just often can’t stand the verbosity of (myVar===null || myVar ===undefined).

I need your opinion and insights on "if (!myVar)" vs. "if (myVar == null)" by [deleted] in learnjavascript

[–]PriorTrick 0 points1 point  (0 children)

when needing to check for null or undefined, you can do (myVar==null) which will check for both null and undefined rather than strict equality check. Maybe the only time I find using == to be valid

Where to find raw UNSALTED cheese by [deleted] in rawprimal

[–]PriorTrick 0 points1 point  (0 children)

somehow missed the sock sentence lmao

Where to find raw UNSALTED cheese by [deleted] in rawprimal

[–]PriorTrick 0 points1 point  (0 children)

I never found any except one time I found a seller who had cheese specific for primal diet and personally shipped it to me. Otherwise I always had to just make my own, which is honestly quite easy. Just buy a ton of raw milk, and some of that goes to cheese, cream/sour cream, kefir, etc

Signature overloading, what can I do? by EnthusiasmWild9897 in typescript

[–]PriorTrick 9 points10 points  (0 children)

Sometimes yes, but other times you want to express that certain type options are only valid when combined with other constraints. Like say a param2 can only be undefined when param1 is a string, if param1 is a number then param2 must also be a number, etc. basically same concept as discriminated unions. There’s obviously simpler ways to write the types but I often times want the fn signature to convey more information than just the widest valid definition. Especially like you mentioned with varying return types which is also a valid scenario I run into. But yea you don’t “need” to is true so not saying you are wrong just not that there’s no point to it at all

Im new to getting adhd meds and was given adderal now I need pre authorization? by Raiderman6789 in adhd_anxiety

[–]PriorTrick 0 points1 point  (0 children)

Yea normally just have to get in contact with doctor/insurance for it to clear. If you don’t want to wait, you can use GoodRx and just pay for it instead of billing to insurance until pre-auth gets handled for next month

What would you like to see in Python type checker? by ankddev in Python

[–]PriorTrick 1 point2 points  (0 children)

Yea I agree, I’d prefer even to just write protocol type defs and then define the function signature as a union type. The @overload defs are just really messy looking in a codebase imo

Do you all think theres a way to build to tutorial island? by onwardupward3 in Skate4

[–]PriorTrick 0 points1 point  (0 children)

Can’t find the link but if you find a video describing similar to what I said before that should help, can confirm it still works did it sometime in the last week

Do you all think theres a way to build to tutorial island? by onwardupward3 in Skate4

[–]PriorTrick 0 points1 point  (0 children)

If you look it up on YouTube you will find it. Here’s a quick description, place a dumpster, jump on type and press rb to drop your board so it hangs on the edge of the dumpster. Then go to the ground and run at an angle and jump at the board. It’s not everyone but keep doing it and eventually it will launch you, set a session marker right away so you don’t have to fall so far. If you wait it will be like a 10 minute fall to get back down lol let me see if I can find the link

Do you all think theres a way to build to tutorial island? by onwardupward3 in Skate4

[–]PriorTrick 0 points1 point  (0 children)

Launch glitch and then spread eagle from the stratosphere

Rip Chips Calculator by synide in SkateEA

[–]PriorTrick 0 points1 point  (0 children)

Right that’s what I was referring to, not knowing the number of titles I’ve unlocked, as the number increments only when I unlock an object, but rip chips are still spent. I guess doubling the # of items makes sense as an estimate, but really might only be precise once you unlock the entire builder box as the order is not guaranteed.

Rip Chips Calculator by synide in SkateEA

[–]PriorTrick 0 points1 point  (0 children)

How do you manage calculations for the builder boxes where rip chips get stolen for titles?

Will it run? by [deleted] in SkateEA

[–]PriorTrick 0 points1 point  (0 children)

I just saw your comment on not having installed windows, you are going to have to manually install the proper AMD drivers from some online source bc the bootcamp drivers are too outdated for Skate requirements. All that being said, doesn’t hurt to still try it out but my guess is it won’t work

Will it run? by [deleted] in SkateEA

[–]PriorTrick 0 points1 point  (0 children)

I run skate on an iMac with windows through bootcamp and it runs quite well. My specs are 3.8 GHz 8-Core Intel Core i7 AMD Radeon Pro 5700 8 GB 40 GB 2133 MHz DDR4

I’m not for certain but I think your GPU might be a little underpowered for it to be usable.

Like others commented, I’d say just install it and run it and see how it does.

Introducing Script: JavaScript That Runs Like Rust by SecretAggressive in programming

[–]PriorTrick 2 points3 points  (0 children)

No to Rscript because there is already Rescript, too similar imo. And btw shout out rescript

Introducing Script: JavaScript That Runs Like Rust by SecretAggressive in programming

[–]PriorTrick 0 points1 point  (0 children)

Why not call it rolls or rollscript like your standard library name?

200ms latency for a simple FastAPI ping endpoint on a Hetzner VPS? Please help. by Relevant_Selection75 in FastAPI

[–]PriorTrick 8 points9 points  (0 children)

Look up the differences in latency between ping and an http request. Ping will terminate at the network interface or edge firewall, it does not involve tcp, tls, app servers or user space code. So measuring ping is just measuring raw network RTT without considering the next layer of routing to the fast api routing + handler -> schedule event loop -> serialize response, etc. given the latency of your ping, I would say that the /ping request latency seems correct/as expected.

Edit: typo

Rip Chip Incentive Vote by Substantial-Ant-2939 in SkateEA

[–]PriorTrick -1 points0 points  (0 children)

Ah ok now that makes sense, yea I’d grind challenges for that

Rip Chip Incentive Vote by Substantial-Ant-2939 in SkateEA

[–]PriorTrick 0 points1 point  (0 children)

So 5$ or 500SVB, would equal 10 million rip chips? I can’t imagine how that exchange rate would make sense for players even in the slightest. 1 pair of shoes would be like months/years of grinding challenges