skysight-inc/HackerNews huggingface dataset:
Ask HN: Help with Nginx Internal Redirect Based on Subdomain Validation
I'm trying to set up an NGINX server block to handle requests based on subdomain validation. Here’s what I’m aiming for:

Incoming Request: A request comes in with a subdomain (e.g., jiffy.example.com).
Validation: The subdomain gets validated by my backend API which is an upstream server(http://backend_api/api/user/validate/$subdomain). The API responds:
200 OK if the subdomain is valid.
404 Not Found if the subdomain is invalid.
Internal Redirects: Based on the API response, NGINX should:
Route valid subdomains to a @userPage location (proxying to a userPage service).
Route invalid subdomains to a @not_found location (proxying to a custom "not found" page).

Here's what I have so far:

```
server {
listen 443 ssl;
server_name ~^(?<subdomain>.+)\.${USERPAGE_SERVER_NAME}$;

ssl_certificate ${SSL_CERT_PATH};
ssl_certificate_key ${SSL_KEY_PATH};

ssl_protocols TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers on;
ssl_ciphers HIGH:!aNULL:!MD5;

# Validate the subdomain
location / {

set $validation_url http://backend_api/api/user/validate/$subdomain;

proxy_cache valid_subdomains;
proxy_cache_key "$subdomain";
proxy_pass_request_headers off;
proxy_set_header Host $host;
proxy_pass $validation_url;

}

# Handle valid subdomain redirect
location @userPage {
proxy_pass https://${DEVELOPMENT_USERPAGE_URL};
}

# Handle invalid subdomain redirect
location @not_found {
proxy_pass https://${DEVELOPMENT_NOT_FOUND_URL};
}
}

```

What am i doing wrong here? I read about X-Accel-Redirect flag but I am not able to understand how to capture that flag in the response header if I send it as a response header from my api?

Any help would be appreciated.
Idk how much of an advantage this has turned out to be. Like GP said, FaceTime is not as popular outside of the US because it isn’t on Android. Even its US popularity is limited by the fact that it doesn’t work with Android/PC users, mandating that you have another app (which likely works as well as FaceTime) on hand for those situations. I think this is more of an example of them shooting themselves in the foot for no advantage, but not caring because they have like 300 feet.
For me, a key point is "everybody _was_saying_". An implication is that early on, or before release, people thought the price seemed too high. Possibly some of those people no longer think so. Or possibly the price really is too high _for_them_.

Could also be that some of those people just don't expect to get enough use (or some other kind of 'enough') out of a service for a given price point. There are loads of people who have no problem paying for YouTube Premium, while others find the price too high.

Some people pay for the highest-end smartphones, getting them as soon as they come out. I think they're crazy. (-:
While that was a problem, the larger one was that the cars were too fast for the tires and safety equipment of the time.

In a 13 month period there were three fatal accidents that were down to drivers losing control and crashing on their own. The last two coming in successive months. The repeated accidents killed off Group B and the nascent Group S that was supposed to replace it.

Modern WRC cars much higher cornering speeds than the Group B cars because of advances in tire technology. They aren’t as fast in a straight line, but they are massively safer in the event of a crash.
I think you're taking the metaphor about a string quartet as a "conversation among equals" too literally.

In terms of perception, I'm not sure there's much of a relationship to a human conversation. To make things equal, the string players would need to take turns soloing while the others wait more or less silently to respond, each with their own solo response. You'd be bored out of your gourd if string quartets were written that way.

But more to the point, the vast majority of time in a string quartet is devoted to two or more of the players producing phrases of music in parallel, and that is musically coherent and pleasing to the players and audience. Most humans cannot track two humans speaking in parallel at all. That alone tells us that music cognition is a very different phenomenon than speech cognition.

In short, I'm not sure why a string quartet would be considered the optimal genre for humans to produce music together. And even if it is, the reasons why are even less likely to do with the protocols around human speech cognition, and certainly not with some bizarre equivalent of the "theory of mind" associated with the musical phrase produced by one of the instruments[1].

1: Small digression-- In Elliott Carter's 2nd String Quartet he actually started with a concept that each instrument was a kind of "character" in a play among the quartet. In this case, the problem with OP's metaphor becomes obvious even in the introduction-- the homogenous timbre of a string quartet makes it difficult to hear the differences among the characters. (IIRC I think even Carter admitted this.)
Steward Health Care Regulation in Mass. What Happened?
Using a static char buffer would indeed UB but we just made the change to C2Y that this ok (and in practice it always was). Incorrect use of sockaddr_storage may lead to UB. But again, most socket code I see is actually correct.
Maybe I'm mistaken, but that graph would be for passing by places, as it doesn't include the time it would take to slow down from that constant acceleration, if you want to actually visit any other places than your zipping spaceship.
In prison the state pays for his health care.
> SMS providers are unreliable and expensive, it's eating their business.

Is it actually though? At least in the UK I still get every business message (delivery notifications, booking confirmations etc.) via SMS. I haven't received a single one via WhatsApp. And WhatsApp has 100% penetration here so that isn't a barrier.
This drama is more entertaining than the US election
Nope - nobody in Europe uses WhatsApp as a payments platform. Does it even have one?

It succeeded because it was around at the time where SMS messages where expensive, but smart phones where exploding in popularity.
Next we will find out that dolphins are right up there w the mice? "So long, and thanks for all the fish!"
I really prefer USB C over both DisplayPort and HDMI.

Reasons:

- Easy to hook up to modern laptop (all MacBooks) that only have USB-C outputs.

- This allows your TV to become a hub.

- I have invest in a lot of high quality USB C cables rather lots of differ types of cables all of which requires either hubs, or built-in converters.

Can you hook up a USB C display to a iPhone or Android phone directly yet?

My ask of TV manufacturers:

Modern TVs should have built in cameras/microphones (or the ability to pull in a cameras via USB and mount it on top) to enable video conferencing so that my chromecast/Google TV device can run get me into Zooms/Google Meets without any other devices.
You mean 4 days ago?
Memory Layers at Scale
> still rare to find a TV where all HDMI ports are 2.1

On a couple of 4K Samsung monitors I have, HDMI port 1 is HDMI 1.4 and HDMI port 2 is HDMI 2.0.

Couldn't be simpler. The HDMI version is on the port label. Something about the situation makes me chuckle.
What is it that you imagine C++ is doing that Rust has traded off?
Google NYPD Viper Unit
> From its very first version HDMI features CEC

That depends on whether or not you consider single-link DVI-D as the "very first version" of HDMI.
It collects people's contacts and social graphs, which are then used to influence ad targeting in Meta's other platforms.

That's why it insists so badly on having full access to your contacts.
I needed a reminder of this turn of phrase. Thank you.

Flanges up well after "Ready. Fire. Aim!"
To make 1 gram of antimatter, from E=mc^2, would take about 90 Terajoules. For reference, the atomic bomb that dropped on Hiroshima released about 60 Terajoules of energy.

So you would need at least (and with the efficiency loss of production, much more than) 1.5 Little Boy atomic bombs worth of energy to make a single gram of antimatter.
> How many people, a couple of generations on, would remember the precise dates

The people who witnessed Pompeii in person probably remembers it pretty well. This is why I trust his recollection, even if Pliny wrote it down decades later.

It's also not unreasonable to assume he talked about it several times between the event and when it was written down, so that it was easy to remember the details.
Perfect job-seeker frame of mind. Completely relaxed and having a good time. At worst, you're making other candidates look less weird!
Hopefully Von Neumann probes will be much lighter than a Kg and we can construct receiving stations on the other end and transport the information we care about back and forth directly at light speed.
Innovations Don't Happen in Meetings
[^n] indexing is mapped to an 'Index' struct by Roslyn which can then be applied to any array or list-shaped type (it either has to expose Index-accepting indexer, or a plain integer-based indexer and Count or Length property. There really isn't much to optimize away besides the bounds check since there are no object allocations involved.

A similar approach also works for slicing the types with range operator e.g. span[start..end].
Also, even though GPT is not trademarked, it is probably best to leave it out of any non-OpenAI product names.
The NYT article covers the context of the responses, the climate change vs. overkill debate w.r.t megafauna extinctions better: https://www.nytimes.com/2024/12/04/science/mammoth-extinctio...

It always seemed like a false choice to me. It's not like humans need to literally hunt a species to extinction to wipe it out. We can (and have) done it by disrupting the food chain, altering environments and introducing invasive species as well.

The push back against ancient humans causing or at least, significantly contributing to extinctions feels odd. Few would argue that human activity, even absent hunting or advanced technology, can threaten species today, but for some reason it's considered impossible for ancient peoples.
What's the point of making a thing avilable to the public online if you're only going to pull it offline as soon as regular people start using it? I'm sure there are corporations and data brokers quietly collecting info on us using every scrap of publicly avilable data including traffic cams, but the moment regular folks start getting in on the fun and they post a pic of themselves being surveilled on twitter suddenly it's time to shut everything down?

If it's a problem as soon as the average American starts using something, it's probably better if those resources stop being made available period.
Harvard Releases Free AI Training Dataset Funded by OpenAI and Microsoft
this is like saying that AMD making chips that intel/nvidia employees can buy and use to do their jobs is a bad strategy for AMD. lol. ok not every single strategic choice needs to both grow the top line and be anti-competitive. some can just grow the top line.
Nobody gets out alive, get over it.
Sadly very few politicians from his party voted for impeachment (although more than zero). Goes to show how if only his party had 15 more members he might not be getting impeached.
SQLite is actually bundled with Windows as winsqlite. You can install your own copy if you want to take control of the version, but you usually don’t need to.
The actual money doesn't evaporate, someone somewhere always has some in an account and/or in notes and coins.

If all the money ends up in one place, from one single person to an entire group, if they have no need to spend any of it ever because the robots they control will make everything for them, then the rest invent a replacement currency and contine their own disconnected economy without the results of the automation.

But the very fact that some person or group is capable of hoarding all the money because they no longer need to spend it, means they have no real reason to care if it's taken away or diluted by government orders for "inflationary" (in this case more like "anti-deflationary") money printing.

How well that new economy works for those without automation is difficult to guess and depends on what real resources (if any, currency in the abstract doesn't count but precious metals might) get monopolised by those with automation, though the transition to it would likely be disruptive.

But that disconnect only happens when the robots can, amongst other things, make more robots (if robots can't do that then humans get paid to make robots), at which point money as we use it today stops being relevant — if I had such automation, it stops mattering to me if my tenants pay rent or not, irregardless of if they have that automation themselves, and I can tell a robot to make another robot and then give it to my tenant without meaningful loss to myself.
To avoid accidentally sending an email in Outlook, I once learned a useful trick: add a nonexistent email address, like sdfsdf to the To or CC field. Email would not be sent until you removed it. Lo and behold, one day I entered sdfsdfsdf, and it resolved. Someone of course was using this as a test group name.
> Can you hook up a USB C display to a iPhone or Android phone directly yet?

Your phone should have a video output inside the usb-c port.
I take that to mean that it is basically so slow as to be useless and that you would in fact need a Macbook to be able to run this model locally.

This whole thread has become a bit frustrating with comments about how other laptops are competitive with a Macbook. But no one can actually name a single laptop that can do all the things that a Macbook can.
Could HN be a borderline belief?
Dunno what's wrong with this guy, I understand he's a former prosecutor who locked up presidents Lee and Park. Now he somehow repeats the same mistakes, declares martial law, sends the army to the Parliament to arrest the uncooperating opposition? And it all backfires because the National Assembly can always override the President. He'll probably end up in prison. He should have known better. What is wrong Korean politicians (both ROK and obviously DPRK) and abuse of power? At least in the ROK they have a functional democracy with at least two former convicted presidents.
It’s pretty simple: SMS functionality sucked and was super expensive.

Before WhatsApp there was blackberry messenger (BBM). When I was growing up kids were running around with blackberry phones, marketed at businessmen, purely for BBM. WhatsApp was just this, except on a platform that didn’t suck.

WhatsApp also predates iMessage and FaceTime.
C++ itself doesn't have the owning mutex, but there is one in Boost for example.

The problem with an owning mutex in such a language is that you can (on purpose or by mistake) keep accessing the thing it owned after you've released the protecting mutex. Rust's Mutex<T> owns the T but it has the behaviour you want where if you tried to keep the access to T but give back the mutex that doesn't compile. "I tried to unlock the mutex but I still need it, d'oh".

And the same problem applies broadly, you should not share write access to things without an ordering guarantee, but it's hard to ensure that guarantee is followed in C++.
And conversely mice may be unreliable models of human disease [1]

[1] - https://www.youtube.com/watch?v=hKTV2R6TT0Y [video][31 mins]
They bought WhatsApp to keep businesses on Facebook and to prevent it from being an actual "everything app", though in the end they started offering WhatsApp Business anyway.

A lot of this became public from FTC vs Meta: https://www.businessinsider.com/ftc-facebook-lawsuit-makes-z...
Werner Herzog muses on mysteries of the brain in Theater of Thought
>What’s their profit model here anyway?

users data, perhaps? your data feed into FB's machine. I'm sure they will figured out how to make money.
Don’t ever tell a 2 wisdom teeth story: https://youtu.be/cRdjDTMSTtY?si=4Qz0OR6B8t2MG7E9
Your LLM seems unfamiliar with *Canticle for Leibowitz.”

https://en.m.wikipedia.org/wiki/A_Canticle_for_Leibowitz
I can speak for LATAM, here WhatsApp it's much more reliable and faster than SMS
Even humble hydrogen can be dangerous in high enough concentrations. This, and daylight savings time doesn't actually add any hours of sunlight.
It's a matter of perspective. If you think of the GPU as a separate computer, you're right. If you think of it as a coprocessor, then the use of RPC is just an implementation detail of the system call mechanism, not a semantically different thing.

When an old school 486SX delegates a floating point instruction to a physically separate 487DX coprocessor, is it executing an instruction or doing an RPC? If RPC, does the same instruction start being a real instruction when you replace your 486SX with a 486DX, with an integrated GPU? The program can't tell the difference!
>> A fast piece of metal is different from a slow piece of metal, from a legal perspective.

I’d like to hear more about this legal distinction because it’s not one I’ve ever heard of before.
Nvidia’s hardware optimized for gaming was the best crypto miner out of the gate, although it was eventually surpassed for crypto mining by asics. NVIDIA’s cards which (by market share) were mostly sold as crypto miners, were nonetheless the best llm accelerators out of the gate. When in three years the best selling compute task is suddenly fleeple inverting, 900 lines of CUDA will turn Nvidia’s LLM cards into the worlds fastest fleeple inverters, while TPUs will continue to be very good token predictors
> I really care about the environment but it is getting a bit exhausting

I recognise it's a silly, tiny, small-minded thing to get hung up on, but it irritates me to no end that if I stop at McDonalds to grab a milkshake I've gotta drink it through a shitty cardboard straw that disintegrates half way through, while celebrities are flying around in private jets unimpeded.
Government contractors are working on behalf of the government. Ergo, not civilian.

What sources have you checked for (1)? A counter example I would put forward is a police officer. They are not a civilian, nor are they military. What are they?

Civilians in government can be a thing to distinguish military, but the actions of civilians on behalf of government are not civilian actions. Eg: "I am a civilian, I work for the government. When I do things on behalf of the government, it is not as a civilian."
LD50 is (an estimate) of the 50th percentile (i.e., 50% chance of dying), but that doesn't mean it's linear. It _certainly_ doesn't mean that 1% of people will die at 2% of that value, which I think is what you're implying.

The lowest example of a lethal dose I can find in the literature is 57mg/kg. Caffeine overdoses are so rare that we don't know the true distribution, but it's clearly not the case that millions people will die from a few coffees.

Your other comment calculated the lethal dose as *a gallon of espresso*. That's like 125 shots. That is not a remotely normal amount of coffee. It would take multiple people over an hour to make that much espresso for you.

---

Edit: I can't reply, but "LD1" isn't a group of people and you can't just claim it's 1% of the population. LD50 doesn't imply anything about the population distribution or how it varies by person. It refers to a particular experimental set up (or estimate from a natural experiment) in which 50% of the subjects died after a certain dosage.

For example, the LD50 of falling is ~50ft. Some people will be more susceptible to dying by falling a certain distance than others, but there are many other factors involved and it makes no sense to say someone is in 1% of falling-death-probability.

I agree that LD50 doesn't tell you everything you'd want to know, like the lowest possible dose that might kill someone. There might be people who are extremely sensitive to a substance, or situations in which it's particularly dangerous (in combination with other substances or another health condition, for example). For something safe and widely used like caffeine, I'd expect that the vast majority of people would experience roughly similar toxicity (say, within 2x of the median) with a tiny population of outliers; but you can't just assume that there's 1% of the population that's drastically more sensitive.
WhatsApp is not a "everything" platform in most of Europe. Do you open WhatsApp to play music, games, order takeout, order online, pay for rent? It is just a very popular chat application in most of Europe in contrast to a "everything" app like WeChat where you do all of those things.

[1] https://www.whatsapp.com/payments/in
Hackers Possibly Stole Personal Data from Bitcoin ATM Operator Byte Federal
What’s the exact, quantifiable payoff of tethered bottle caps?

And how many degrees will the earth cool down if everyone switched to EVs? The truth is that everything related to “carbon” has no quantifiable value. It’s like tithing at a church with the hope that God smiles upon you. How many tons reduction of CO2 results in a movement of the temperature? Let’s be precise because if we are making policy on this, the public has a right to know the exact benefit. And is the cost of that less expensive than the cost of not doing it? What exactly is the cost of not doing it? I’ve been hearing for 20+ years how we are just ten years away from disaster. 10 years is just long enough that it’s a few election cycles — so the politicians pushing this nonsense are rarely accountable for being continually wrong. Nothing in Al Gore’s movie came true. Ice caps were supposed to be done by now. They aren’t. So why are we still following that religion? It’s like a modernized version of a doomsday cult: “repent or rising seas will destroy the cities with the wrath of a vengeful Climate God.”

Are we allowed to question any of this? Shouldn’t someone be following the money to see who is getting rich off of this and who is enacting the policies that make those people rich?

Without those numbers, how can we determine if something is “progress?” We should be focused on real pollution: chemicals in the air and water, plastics in the ocean. CO2 isn’t a poison, nor a carcinogen, nor a toxin.

Why doesn’t the environmental movement unite behind banning high fructose corn syrup? Obesity in the U.S. is killing more people than climate change ever will.
Whatsapp is such a big cultural force that many of my non technical friends and family members refuse to use anything else. No mail for full res photos is one thing, but you can't make them use anything else. Everything lives in Whatsapp. Todos, notes, reminders, sharing stuff (airdrop is the only exception if everyone involved has iOS). It is less because of whatsapp features (Nobody uses any features like payments), and more because of the simplicity and ease of use.
> IP rights, or even IP itself as a concept, isn’t fundamental to existence nor the default state of nature.

This is correct. Copyright wasn't a thing until after the invention of the printing press.
> It succeeded because it was around at the time where SMS messages where expensive, but smart phones where exploding in popularity.

Not sure that’s true everywhere. In Slovenia we had unlimited texting way before we had smartphones.

By around 2005 all carriers offered a “teenager” plan with unlimited texting and near zero phone minutes. Data was not yet a selling point.
At least here in Brazil, WhatsApp consolidated its position by working well in feature phones that ran J2ME and dominated the low-end market before Android. It took testing and adaptation to each and every available phone (as far as I can remember, J2ME was kind of a loose standard so developing a J2ME on one device did not guarantee it ran well, or at all, in any other). This, coupled with the possibility of eliding the outrageous SMS rates and the availability of EDGE data plans.
Romania and Bulgaria are granted full Schengen membership, with one caveat
Recall issued for 2.6M travel mugs over burn risk