skysight-inc/HackerNews huggingface dataset:
A good pitch for dynamic (context) variables is that they're not globals, they're like implicit arguments passed to all functions within the scope.

Personally I've used the (ugly) Python contextvars for:

- SQS message ID in to allow extending message visibility in any place in the code

- scoped logging context in logstruct (structlog killer in development :D)

I no longer remember what I used Clojure dynvars for, probably something dumb.

That being said, I don't believe that "active" objects like DB connection/session/transaction are good candidates for a context var value. Programmers need to learn to push side effects up the stack instead. Flask-SQLAlchemy is not correct here.

Even Flask's request object being context-scoped is a bad thing since it is usually not a problem to do all the dispatching in the view.
The drone on mars uses visual navigation based on known imagery of the terrain. I suspect that would be easier on this planet.
Indeed. I also tracked everything I ate for a long time, many years ago. As soon as you eat something made by someone else you're basically guessing.
> read what others write

You started with this: "Which I'm reading like it's the ONLY way we know of how to "respect complexity" before embarking on tearing down strawmen.
I mean I eat very close to the same thing every day, so I am perhaps not the best example, but for example:

> - sauces you make yourself? I often mix some different oils, mustard, seeds, miso, bit of leamon juice and spices… but weighting and logging everything will take 3x the time to do the sauce itself

You weigh all this out once, store it as a recipe and just weigh how much sauce you're putting on things. Oils are so high calorie they're basically all the same, and the only other contributor is really if the seed mass is substantial. Log your upper end, and just assume the sauce comes out as that value. Your sauce recipe is hardly going to vary by an enormous amount, just provided you bias it towards the upper end for the purposes of tracking.

EDIT: Also since people have been dropping app links - https://github.com/davidhealey/waistline this is what I use on Android. Libre with nice integrations, works great.
it's not just managed service where you can move to your self hosted version when they stop managing it, it's a fully proprietary stack that's just no longer available to use.
It lacks a patron, shall we say.
Or since this is HN, stop working for his companies!
If I were to make an off topic comment and by no means I am picking on you personally, however as another Canadian, I find this general attitude of Canadians towards innovation unsettling and dare I say it's the reason why we are always playing catch up with US. It's also the number one reason why we are bleeding top talent to Americans which results our nation great economy loss.

I suppose you can argue that we have more of a "European" attitude, to which I would respond that while we pay high taxes like Europe, we hardly get any of the social security benefits that they enjoy, so in short we end up with worst of both worlds: high taxes, low salaries and limited benefits.

You can't expect a nation to develop the next FANG when people's idea of business is purchasing a home in the "suburbs" of Toronto and renting out its basement.

P.S I hope you are staying warm in this weather..
I'm not tracking right now, but used to. So I can answer your question with the caveat that yes it is a pain and I stopped doing it. :)

> sauces you make yourself? I often mix some different oils, mustard, seeds, miso, bit of leamon juice and spices… but weighting and logging everything will take 3x the time to do the sauce itself

Yes. The thing is that it also makes you aware of how much everything "costs" you in terms of calories. You become a lot more aware of how big a glug you give of that oil.

> different cooking time in one receive : oignons going first, tomato sauce in the middle and parsley at the end (but still cook a bit with residual heat)

I don't understand this part of your question.

> Leftovers nutrients decrease with time

My goal was not to be "accurate", but to lose weight. Overestimating slightly was in fact preferred. So this is not an effect I would have worried about.

> counting how much you take of a meal shared with others, especially when you serves yourself multiple time

You estimate. You know that the whole thing was X so if you eat a quarter of it that is 0.25*X.

> different species/cultivation methods like the rustic small and dense cucumber from your neighbor and the spongy one from the supermarket in January

Cucumber is flavoured water. Whatever is the variability in calories you can probably just ignore it.
It depends why you're tracking things, and what level of "everything" you care about.

Starting with pretty much everything can be a good idea for people to get a sense of what's in what foods. How much does an onion typically weigh? What's that actually adding? What's the difference between getting lean and fattier meat? How much oil are you really adding?

After that it's easier to start dropping things - if I'm trying to lose weight I simply do not care precisely how much celery I've added for the sofrito. I do care about the amount of butter, oil, rice, bread, pasta though.

I'm not concerned about getting fat adding paprika, so I'm not weighing spices. Even if I'm trying to track macros that's just not going to be a considerable contributor to anything.

> - different cooking time in one receive : oignons going first, tomato sauce in the middle and parsley at the end (but still cook a bit with residual heat)

Prep/measure things first.

Last three things that smooth things over for me

1. Meal prep on a different day. I'm not in as much of a rush at night, it's proportionally less time involved measuring something for a larger number of meals/sauces/components.

2. Having measuring spoons and fast scales nearby.

3. Measuring before & after amounts rather than exactly what to add. If I need to add butter to a sauce until it's the right consistency, or flour to a dough, or whatever then weighing as I go is a nightmare. Instead just weigh it before and after and you'll see what you used. This tip works pretty well for oil too.
Made something similar for Basic Vocabulary (Spanish and English so far):

* https://www.appicenter.net/Apps/VocabES/
* https://www.appicenter.net/Apps/VocabEN/

Uses Spaced Repetition and Audio but is not personalized which is less of an issue for basic words.
The hard part is getting good example sentences and "cross links".
I had though about use AI for that but have not followed through.
Return to In-Person Work
If you have to charge overnight, you miss out on all the benefits of sleep tracking which personally, has been essential in managing recovery and also illness
On the first point, you only need to do it once and then you can reuse the information in future (assuming you stick to the same recipe).

For the other points, I think with any kind of data measurement there is a balance between precision and convenience. Trying to consistently track calories is hard enough, trying to track nutrients at the level of precision you are suggesting sounds technically challenging and frankly exhausting. I think a lot of people will take "average" values for a cucumber, an onion, etc. Like others have said, consistency in measurement is probably more important than finding the absolute truth.
To everybody reading this and having doubts about starting your own venture: DO IT!

Yes it's a lot of risk, yes most startups fail, and yes you could make more money at FANG. However, this is one of the most exciting times to build a startup, thanks to AI.

The big winners of the all the AI advancements (especially OS) are devs and AI startups:

- No more vendor lock-in

- Instead of just wrapping proprietary API endpoints, developers can now integrate AI deeply into their products in a very cost-effective and performant way

- Price race to the bottom with near-instant LLM responses at very low prices are on the horizon

It's as if your product automatically becomes better, cheaper, and more scalable with every major AI advancement. This leads to a powerful flywheel effect: AI improves product -> better product attracts more users -> users generate more data

Besides the product perspective, AI also allows you to operate your startup a lot more efficiently.

Will we see a single-person unicorn soon? Very likely not.

Will we see very successful small and bootstrapped startups? Yes, already the case.
Peter, I'm a software engineer with a FAANG company, ~20 years experience and at the senior staff level. I lived in the US for a while with my family, and we all have green cards. Last year, we moved back to India (where we're from), with re-entry permits that are valid till July 2026. We'd like to continue living in India for a while (the next 8-10 years, till our kids finish school), but also keep our green cards so that we can move to the US afterwards without going through the Indian-citizen green card nightmare, especially for my kids. I go to the US every 3-4 months on work, my family less frequently. Been paying US taxes and no problems continuing to do so, but I don't own a house in the US. Is there a way I can keep my green card while living in India for 8-10 years? Or should I just give it up when my re-entry permit expires, and find a way to apply again?
Cambridge(shire) has also been forced to allow more real estate; Northstowe, Waterbeach New Town, the Eddington neighbourhood within Cambridge city limits, Springstead Village, even been a few noticeable changes around Cottenham.
I totally agree, but also wonder how to fight against this cancer. It seems to me like it’s a natural state of groups of people to devolve into this kind of group as the group grows in size. Are we simply doomed to failure?
The Apple Watch is also a terribly designed device for running. Too much of its functions rely on interacting with the touchscreen, something you are either unable to do with sweaty hands when running or don't want to do as it draws your attention away for a prolonged amount of time and hurts your form.

Garmin's unwavering commitment to physical buttons and how you can customize what they do is what makes them the gold standard in this area for me.
I wonder how these anti-cheat tools are impacted by flatpak and its partial sandboxing. Otherwise they sound quite invasive.
Ask HN: What's the right way to do layoffs?
Layoffs have generated a a lot of conversations over the years on HN, so what’s the right way to do it? Obviously, not getting to that point in the first place is best. What would be an acceptable way to do layoffs. How should leaders be made accountable?
that will be slightly relevant when they move all their engineers here
Not OP, but I briefly seconded to a team that used Scala at a big tech co and I was often frustrated by this feature specifically. They had a lot of code that consumed implicit parameters that I was trying to call from contexts they were not available.

Then again I guess it's better than a production outage because the thread-local you didn't know was a requirement wasn't available.
>The American Institute of Architects is also baffled that more expensive ornamentics trump functionalism.

Given that they're responsible for the visual eyesore that is modern public and landmark buildings, it's no wonder they're "baffled".

Apparently they never understood that beauty is also highly functional.
Show HN: I made an honest photo cleaner for iOS that puts you first
Hello HN!

Driven by the desire to avoid upgrading to the 2TB iCloud tier, I made a photo cleaning app for iOS that helps you systematically review your photos. While there are many similar apps, none of them checked all the boxes for what I wanted:

- Clear privacy guarantee that photos never leave your device

- Being honest about free limit usage. Some apps let you review photos only to reveal you can delete just a couple per day when you try to empty the trash. Basically taking your time hostage, when you've already gone through hundreds of photos

- Context for better decisions. A lot of the apps use swipe-based UIs that only show one photo at a time, making it hard/impossible to see surrounding photos to make a proper decision

- An enjoyable experience with features like zooming and sharing. You should be able to have fun and relive your memories, given you are already doing the tedious task of going through hundreds of photos

I hope that these factors illustrate why I decided to enter this crowded space with my own take.
Thank you for your time, and if you consider giving it a look, I would definitely appreciate any feedback.

Tony
No, Brexit was about returning such decisions from Brussels to Westminster.

The UK may decide less immigration, or skill-weighted immigration, or lots more indiscriminate immigration - but the vote should be in the Mother of Parliaments, where else?
I would imagine that having a camera videoing your preparation of ingredients and cooking would give enough data to classify the ingredients and the used volumes. From the video it should be easier to track the weight of everything... and perhaps depending on how the ingredients are used, determine/predict how the macronutrients are altered during the process.
Yes. Specifically a decline in vitality.
> A Microsoft 365 subscription (or even buying an Office 2024 license) is chump change because I know I am speaking Industry, not Libre.

The subscription fee is only part of the cost though. Another cost is that if Office works in a certain way that causes you problems your only choice is to adapt your workflow (or more likely, live with those problems).
Time to take the stand maybe, Sam.
In an alternative timeline, had Rust 1.0 been available when Docker pivoted away from Python into Go, and Kubernetes from Java into Go, due to having Go folks pushing for the rewrite, and most likely they would have been taken by RIIR instead, nowadays spreading across Python and JavaScript ecosystem, including rewriting tools originally written in Go.
Different people are embarrassed by different things. A frat student's probably going to overstate their alcohol consumption, a Morman understate.

People with bigger appetites underestimate their food consumption, people with smaller appetites overstate.

Not to mention the degree of over/under statement will vary wildly. "A big meal" might be 300 calories for somebody with an eating disorder, or 3000+ for somebody on the opposite end of the spectrum.
"It's actually not that similar, since butterflies are oviparous, and have ZW sexual determination" - my nerdy high school self completely missing the joke.
So what you're saying there's a great business opportunity in people paying to get locked in a diet-cell?
Salt has literally zero calories.

Spices and everything else in general have so little in them it doesn't matter. Something like seeds or pepper more so, but you're hardly going to add so many it changes anything.

Which is kind of the point: you look this stuff up once in order to get a sense of what you're actually doing, and quickly realize what is and isn't going to matter overall. If you're really concerned, you start from a fixed mass you'll season from, and then just use that up as you go.

i.e. if you know you'll be adjusting added sugar, then estimate the total amount of sugar you're comfortable putting in the meal up front, and work from that pool. If it's less, great.
Never stopped people from piss poor countries from enjoying all of those things.

Besides the change is probably the same for the better off Gen Z people as well.
What do you mean it performs poorly as a watch? Smartwatches sync time, change time zone as you travel, automatically apply DST. It's actually better watch than classic watch.
levels.fyi will give you some confidence in the wage.

Google, Meta, Amazon & microsoft all do banding, so the base wages is mostly public (hence why its all bollocks about wage negotiation, there isn't any.) The first level of senior for most of these orgs will tip the scales at around $300k

Having worked at both startup and FAANG, I don;t think startups actually give you the skills to flourish here in corp land. Sure, you might be a good coder, but most of the time its navigating politics that actually gets you promotion (that or good luck with a successful project)

You really don't need to be a good coder to be at a FAANG. Sure there are specialisms as you point out. but most of the time its just entry level CRUD, followed by manic debugging with shitty non-documented tools.
It is indeed using javascript to do those parts, eg https://github.com/internet-development/www-sacred/blob/4454... .

My limited JS and React knowledge says that CSS is the right way to do most of that, or if that's not possible I think JS's requestAnimationFrame. React doesn't seem to be necessarily the issue here, though it may not be helping.
On the initial choice yes. But on the second choice, that other door is a single door that is the sum of the odds of the other 99 doors. So you're second choice would be to keep the door you initially chose (1/100) or select the other door (99/100).

Remember, the host always knows which is the correct door, and if you selected incorrectly on the initial choice they will ALWAYS select the correct door for the second choice.
Counting works for people because it quantifies their food intake. For many people, that's an effective way to overcome a learned idea that portions should be huge, or that feeling hungry has to be addressed immediately, or that feeling "full" has to be constant. It's not perfect, and I don't recommend it to people with an ED history; however, after about a month or 2 of doing it, it can really change how you look at your meals, and snacking in particular. I don't obsess over it.

> - sauces you make yourself?

I don't count them. I keep my sauces simple and use them sparingly. I'm not trying to get down to sub-10% bf.

> - different cooking time in one receive : oignons going first, tomato sauce in the middle and parsley at the end (but still cook a bit with residual heat)

I count them raw, or if my tracker has them, count them as cooked. I don't care about them being super accurate.

> - Leftovers nutrients decrease with time

I don't care. The calorie counts are basically just estimates anyway. It's less a science than a mental game to control your ballpark calories in.

> - counting how much you take of a meal shared with others, especially when you serves yourself multiple time

If I'm making the meal, I count for the whole meal, then estimate for the share. See above for rationale (I don't care that much.) If my friend has cooked for me, I don't care at all, and just try to eat a "reasonable" portion.

> - different species/cultivation methods like the rustic small and dense cucumber from your neighbor and the spongy one from the supermarket in January

The differences are probably not going to matter all that much. By weight, a cucumber is a cucumber is a cucumber; I'm not trying to be perfect, just get a general sense of calories.
Valkey-GLIDE AZ Affinity feature reduce latency and lowering cloud cost
We recently published a blog post about designing an effective AZ Affinity Strategy to improve multi-AZ performance and reduce bill in cloud-based Valkey systems. The post dives into: Why cross-AZ latency matters and its impact on performance and cost.

Whether you're optimizing for high availability, minimizing latency, or cutting costs, this strategy offers insights that can apply to many cloud architectures—not just Valkey.

Check it out here: https://valkey.io/blog/az-affinity-strategy/

We’d love to hear your feedback and stories about handling affinity strategies in your own systems!
Microsoft joins CISPE, the Euro cloud crew that tried to curb its licensing
Solidfire (which never got talked about at all on HN) fits the bill nicely.
Some foods I know, eg. oil 9kcal/g, but mostly I just check the label. Every food in the EU has the calories/100g or calories/100ml on the label. If it's not packaged, I look it up it FDDB [1].

[1]: https://fddb.info/db/de/produktgruppen/produkt_verzeichnis/i...
Seems like a decent use of AI if we could use something like Glass to scan the label and plate to estimate calories and stuff. You could even record those portions to be used for audit.
Why do you think everybody else seems to be confusing it for that then?
At a high level, you can just simulate the game without cheats, sign that, and then do the cheats separately.
Healthy foods are not healthy in an excessive quantity. Diets don't need to be tracked to the individual calorie. We don't burn the same amount l number of calories each day and food labels show an average of the nutritional value. If a person is consistent, they will achieve the desired result; either gaining or losing weight.

I've been tracking consistently for about 5 years. It's feasible.
the young people are too busy porting their code to the language/framework of the week.
Is this sarcasm
Well, caloric value isn't that exact to begin with, so there is no point in being overly exact. Afaik it's derived by burning the food and measuring the heat it produces, but your body doesn't burn it (like pyrolysis), it uses specialized proteins. So the energy conversion varies, some can't be digested at all.
Wow. What an utter clown.
A gentleman knows is someone who how to use big-O notation and doesn't.

The only times I have used big-O in my career has been job interviews. It is my belief that it's mostly used to weed out people who didn't take computer science classes, and make them feel bad regardless of their real world skills.

It's the same thing with database normalization. It has come up twice in my twenty year career. Once in an interview, and once during an acquisition when someone from the purchasing company was I believe trying to "Gotcha!" me. 3NF just doesn't come up in normal day to day work.
Musk:

>The first Starships to Mars will launch in 2 years when the next Earth-Mars transfer window opens. These will be uncrewed to test the reliability of landing intact on Mars.

I vote they stick a remote operated drilling rig in there.
Hytradboi 2025: Have you tried rubbing a database on it?
Type Inference in Rust and C++
There is nothing that says you can't, but you have to convince the consulate that you did not have intent to immigrate when you applied/interviewed for the E3 and entered the US. The restriction is similar for the J1.

You can't land and immediately start applying for a green card, but if say you worked a 2-3 year contract and decided you wanted to stay, you could pursue a green card that you're eligible for. Most immigration firms that specialize in green cards will give you free advice on what the best route is (based on your background).

For some discussion: https://www.lightmanimmigration.com/blog/e-3-visa-green-card...
It seems it's more complex than that. Greece and Portugal are also getting the Polish treatment (Tier2), so are Iceland, Switzerland and Israel
We're far too generous with what we allow to be called "science".

There is no dietary research, because you can't pull off an unbiased dietary study over a meaningful period of time. Practical and ethical problems abound.

Maybe one day we can simulate n=10mm people from the neck down for a period of 30 years, and feed half of them bacon and half of them beans, but even that will have the major problems of being a simulation and that only from the neck down.

Read the original "fat = heart attacks" studies by Ancel Keys from the 1950's. I've done free online 5-minute long data science tutorials with more statistical rigor.