Thanks for being skeptical, looked it up because of that. Looks like the primary study people cite is this one, which indicates around 65% of people filing for bankruptcy cite a medical contributor of their bankruptcy. That includes medical bills (highest contributor overall) and loss of income due to medical issues.
The person you replied to specifically listed multiple studies that do account for socioeconomic factors. Take a look at the second paper, and in the introduction you’ll see that they did sub group analysis for multiple socioeconomic factors. I.e. among people of the same geographic, economic, and ethnic backgrounds, those with higher ACE were at higher risk for a bunch of diseases.
Not to say that I think it’s useful to focus so much on personal trauma outside of therapy, I don’t. But dismissing evidence presented to you without engaging with it doesn’t feel useful either.
Trying to understand better where the JWT vulnerability was here, you said:
“So you could log in with my username and password, grab the JWT, and then send that along with your request.”
Am I understanding here that you weren’t validating the sub/userId or role in the JWT? I.e. any user with a valid JWT could hit the admin api endpoints? Or did I misunderstand that?
I mean, as someone who's played drums from a very young age (30+ years now), I disagree with that description of how playing drums works. I went ahead and looked up that phrase, and it seems to be popular in the last couple of years, but it's the first time I've heard it.
I'd honestly liken it to typing; each of your fingers are attempting to accomplish independent goals along with your other fingers to accomplish a coordinated task. In percussion, your limbs are maintaining rhythms separate from each other, but need to coordinate as a whole to express the overall phrase, rhythm, and structure of the music you're playing. When you're first learning a new style (the various latin beats are great examples), it can feel very disjunct, but as you practice more and more the whole feels very cohesive and makes sense as a chorus of beats together, not separate beats that happen to work together.
It's not dangerous in practice. Reading through NEC in the US, there's plenty of leeway for mixing ampacity ratings on circuits, within certain limits. For example, it's fine to have 10x 15A duplex on a 20A circuit. It results in less wiring, and allows for logical grouping of circuits. Electrical code starts from the the most common causes of electrical failures, and tries to design down from there. The ampacity ratings on devices and various components of the circuit are designed to reject the common causes of failure, and conductor failure at the device isn't one of them (appliance manufacturers are more likely to get their devices certified, so if there's a failure in the appliance, some other part of the appliance's electrical system will fail before the conductors do).
So the ampacity of the connector (duplex and plug) is meant to reject certain combinations (plugging a 30amp appliance into a 15amp duplex/circuit). It's obviously very easy to get around that by just wiring things together wrong (18AWG wire on a 30Amp circuit), but by design, a 30amp appliance with the proper plug cannot be plugged into a 15amp outlet.
Of course, this is informed by the electrical code in my home country, so I understand that other places and people have different experiences, but electrical accidents have been on a steady downward trend since the 80's, so the NFPA NEC has to be doing at least some things right.
It is indeed very regional, e.g. the UK has its own thing going on with ring mains and fused plugs.
Over in my 230V corner of the EU, CEE 7/3 sockets are pretty much the only thing I'm aware of for new wiring, with the unearthed CEE 7/1 sockets still present in older installations. Both are rated for 16A, with either 10A/1.5mm² or 16A/2.5mm² branch circuits from the distribution board. It would be unheard of to wire those up with any higher ampacity at risk of overloading the sockets - although recent experience with e.g. EVs has shown that they're not actually suitable for sustained loads at 16A, given e.g. wear and tear on the sockets.
Unearthed appliances do commonly have CEE 7/16 plugs rated for 2.5A, particularly things like wall warts or USB chargers, which does fit into a CEE 7/3 socket.
I recall seeing CEE 7/16 (2.5A europlug) sockets, although those may have been imports from elsewhere in the EU. I suppose those would have the same issues if wired up to the same distribution circuits. But extension cables for those are rarer, the only ones I've ever seen are CEE 7/7 plug (16A) -> CEE 7/16 sockets (2.5A).
For residential/commercial loads over 16A / 3.2kW, it's all CEE / IEC 60309 connectors, and those are treated like distribution circuits with overload protection sized appropriately for the connectors/cables.
"ampacity" means "capacity in amperes" or more literally "ampere capacity." You could say current capacity too but it takes longer. Ampacity is the language used in the electrical code.
"amp" also seems to be more common to write than "A" for electricians. Remember that the SI standardization of unit abbreviations is actually a pretty modern thing, so lots of fields existed before unit abbreviations were standardized and continue to use existing practices.
Nah, it's fine to be nitty. If you glance at my comment again, you'll see my usage devolve from A to amp halfway through, my brain can't help but write what it sounds like to me.
Yes though, ampacity is the correct word (for my home country). "Current" is an instantaneous measurement of current flow. That they use the same unit is pretty convenient for planning circuits.
https://en.wikipedia.org/wiki/Ampacity#:~:text=Ampacity%20is....
Just wanted to say that I checked out your app, and it’s really impressive! When building it, did you bootstrap by asking it what developers like me would want out of a site like that?
It actually came of my own use of the default ChatGPT interface: I was working on an indie game in my spare time and using it to spitball new mechanics with personas
But it was really tedious to prompt ChatGPT into being properly critical about an idea that doesn't exist: A basic "make me a persona" prompt will give you an answer, but if you can really break down the generation of the persona (ie. instead of asking for the whole thing, ask who are the people likely to use X, what's the range of incomes they have, etc) you get a much better answer
The site just automates that process and presents chats that are seeded with the result of that process so the LLM is more willing to imagine things. For example, if a persona complains about a feature, when can hit 'Chat with X' and interrogate them about it instead of running into 'As a LLM' you should get an actual answer
This is not true since the vast majority of electric whole home heating units sold today are heat pumps, which are up to 300% efficient [1]. If the power generation and distribution is 33% or higher efficiency, then a heat pump will outperform a natural gas furnace operating at 100% efficiency.
EDIT - Here's a video that explains it much better than I could, although it's a bit long, this YouTuber is great. [2]
Wouldn’t that last example be incorrect mathematically? For example, if the Int8 was -10 and the UInt16 was 10, what would that casting do? Would a better promotion be Int32 for both? Just curious, Julia is a language I’ve been very interested in using for a long time, just haven’t had the opportunity to sit down and learn yet.
> Wouldn’t that last example be incorrect mathematically? For example, if the Int8 was -10 and the UInt16 was 10, what would that casting do?
Well....
Signed integer arithmetic and unsigned integer arithmetic do not differ. At all.
The difference between an Int16 and a UInt16 is not in the 16 defined bits. It's in the infinite number of implicit bits representing place values above 2^15. Those bits are always 0 for the UInt16, but they're identical with the high bit of the Int16.
So it's not clear what it would mean for the result type to be "incorrect mathematically". Mathematically, an Int16 and a UInt16 are the same thing.
However, the path by which you promote the values does matter. I don't know what Julia does. But:
One of those should be the result Julia gives. I tend to hope it's the first one. That would correspond to a promotion strategy of "always expand the type to its full width before converting between signed and unsigned". Expansion (and shift, I guess) is the only operation for which the difference between signed and unsigned is relevant.
> Would a better promotion be Int32 for both?
Probably not; that would imply that when you add two UInt16s together, you expect to get a UInt32 (or UInt17...) back.
It took me a couple of readings to make sure I understood what you were saying, thanks for the reply. I think my misunderstanding was from not knowing Julia and thinking about promotion of values as having a permanent effect on the variables used, which isn’t what’s happening. As well, it requires the user to understand what they’re doing when they’re using an operator that uses automatic promotion, and to think about what they want to happen. For example, if Int8 = -10 and UInt16 = 5, and I’m expecting an answer of -5, then I’ll need to be more explicit to get the number I’m looking for. If I’m expecting 65530, then the implicit promotion works fine. Of course, this is no different from any other programming language that allows addition of differing types.
> For example, if Int8 = -10 and UInt16 = 5, and I’m expecting an answer of -5, then I’ll need to be more explicit to get the number I’m looking for. If I’m expecting [65531], then the implicit promotion works fine.
That depends on what you're hoping to do with the number you're looking for. If you wanted -5 as an Int16, the bit pattern would be 1111 1111 1111 1011 or 0xFFFB.
If you wanted 65531 as a UInt16, the bit pattern for that is 1111 1111 1111 1011 or 0xFFFB. You're getting the same result either way. And any values you compute from that result [that is, by arithmetic] are going to be unaffected by whether you labeled the result "Int16" or "UInt16", because that's just a label. If you labeled 0xFFFB a "Snerf", the arithmetic would still be the same.
There are only a very restricted set of places where you need to be explicit about whether you think of your variable as an Int or a UInt:
1. When you're widening it.
2. When you're doing a right shift.
3. When you're formatting it for display to a human.
Yeah, case three was the one I was thinking of, though cases one and two are interesting as well. Number two requires you to think about using an arithmetic or logical right shift, though I'm struggling to think of a situation where you'd be promoting types and then not know what your intent was if you're then doing a right shift. I guess my confusion here is simply related to the idea that if you're getting that deep into binary, you'd probably want to be more explicit about what types you want to promote to, rather than relying on the Julia defaults. It's been a while since I've needed to think deeply about bitwise operations, still just as interesting as I remember.
Yeah, it's a little iffy. Finding a sensible set of promotion rules is hard. I don't know the reason (this was decided before I was involved), but if I had to guess, it would be because unsigned types are much less common, so if the user has them, they probably want to keep them for a reason.
This is completely off topic here, but the first promotion of Int64 -> Float64 is also iffy as not every Int64 is exactly representable. The Int64 -> Float16 promotion also looks weird to me because Float16 range is so small
You think negative numbers in a signed type are a 1-in-a-1000 case, really?
Silently casting signed integers to unsigned is a terrible idea, and a recipe for bugs. And completely unnecessary to boot, because you could promote Int8 to Int16, and (Int16, UInt16) to (Int32, Int32).
Related, an integer bug that can't be fixed in C is that "unsigned short" promotes to "int" instead of "unsigned int", so this doesn't produce the result you want.
unsigned x = (unsigned short)65535 * (unsigned short)65535;
(It overflows even though it's less than UINT_MAX, and worse it's UB.)
Hemochromatosis is one, I was suspected to have it when I was younger and regular blood donations was an effective way to reduce my blood iron. Turns out I don't actually have the condition (it's genetic and doesn't go away as you age, whereas my extremely high iron resolved on its own), but I'm not mad about it, just a change I've welcomed.
Haha, this happened to me for the first time recently. Asked a question, didn’t get any answers, ended up updating my post with the answer I eventually found. Even had a couple of responses thanking me for the follow up. Five years later, ran into the same problem and forgot the answer, my answer was the top result on google.
I was once looking to see if there were any projects or discussions regarding <insert niche domain> via the google search "<niche domain> Hacker News". I clicked on the top link because, read the comment, and was annoyed that it didn't actually address the <niche> things I wanted it to.
Then I realized I wrote the comment. I didn't address the <niche> things because I was looking for it then and I'm stilling looking for it.
https://pmc.ncbi.nlm.nih.gov/articles/PMC6366487/
I’d like to see what information you have that’s different though.