News for hackers. Stuff that matters.

umangsh

Re:YouTube search results full of AI slop on Thursday January 16, 2025 @01:23AM (#42721995)
Most, if not all top results uploaded in the last 3 months, are AI generated. Not sure if there's a way to restrict searches to older, pre-AI content.
Re:Most states start school too early in the morning on Wednesday January 03, 2024 @04:21PM (#38860120)
Belief in "the science" akin to religious faith, is counter to the scientific method.

Good science happens when the best scientist is wrong.

Re:Ask HN: What does your self hosted stack look like? on Thursday August 17, 2023 @03:37PM (#37166837)
Personal website built using Django + Hugo, hosted on fly.io.

My most successful side project (www.famnom.com) built using Django, code on github, app code + db hosted on Heroku, data buckets on S3. Not particularly happy with postgres pricing on Heroku, but having found a cheaper option that's as convenient to manage.

30B fp16 takes ~500 ms/token on M2 Max 96GB. Interestingly, that's the same performance as 65B q4 quantized.

65B fp16 is ungodly slow, ~300,000 ms/token on the same machine.

Re:PostgREST – Serve a RESTful API from Any Postgres Database on Thursday December 29, 2022 @10:43AM (#34173739)
DRF (https://www.django-rest-framework.org/) provides a lot of functionality out of the box for REST views. In addition, DRF braces (https://django-rest-framework-braces.readthedocs.io/en/lates...) helps share form and serializer objects reducing a lot of duplicate effort.
Re:The Obsessive Calorie Counters of Reddit on Monday December 05, 2022 @11:59AM (#33868192)
Note: Article is from 2019.

While the risk of nutritional deficiencies when tracking 1200 calories/day is higher, it's possible to make choices with whole foods that are satiating and satisfy daily micro-nutrient requirements despite low calorie intake.

For instance, for a 1500 cal/day diet, the following mealplan is quite a bit of food:

Sample Lunch: https://i.imgur.com/ZTeKsX4.png

Sample Dinner: https://i.imgur.com/sX2g5dL.png

Daily nutrition tracker: https://i.imgur.com/YrGjSQJ.png

Re:The Essential Django Deployment Guide on Saturday December 03, 2022 @10:59AM (#33844390)
That's a great list! decouple (https://pypi.org/project/python-decouple/) is a useful alternative for managing secrets. It converts values to the correct data type which is nice.

Another detail that matters deciding VPS vs PaaS - batch job processing. Heroku dynos restart once every 24 hours, longer jobs can't be scheduled.

Cool site, the sliders are super intuitive for exploration. I was pleasantly surprised to see Cauliflower rank high in Choline, it's more readily available from animal sources. Do the portion sizes differ for each item? Eggs have 7.6x times Choline from Cauliflower per 100g based on USDA data:

Cauliflower nutrition: https://fdc.nal.usda.gov/fdc-app.html#/food-details/169986/n...

Eggs nutrition: https://fdc.nal.usda.gov/fdc-app.html#/food-details/748967/n...

Calcium can inhibit iron absorption. If your multi-vitamin has calcium, it likely won't have iron.
Besides Iron and Zinc - keep an eye on daily intake for Magnesium, Potassium and Calcium. I wasn't happy with the increasing number of supplements in my diet, so I set out to hit daily RDIs on macro and micro-nutrients without any supplements. See the evolution of my meal planner tech stack here: https://www.umangsh.com/blog/the-right-tool-for-the-job/

Most repeated food suggestions by the planner:

1. Almonds (Vitamin E), Chia, Pumpkin seeds are micro-nutrient dense.

2. Liver is nature's multivitamin, Chicken/Beef/Turkey liver all good choices (Vitamin A, Iron, Zinc).

3. Eat your greens - mix of Arugula, Spinach, Kale, Collards, Chard (Magnesium, Potassium).

Re:Caffeine and Exercise Performance on Thursday September 29, 2022 @01:46PM (#33024486)
> You also get to see what foods have what, it’s interesting. Like how one little prickly pear has 200% of your vitamin E needs.

Do you have a source for this (USDA FDC data and google-fu don't concur)? I'd love to have alternate options for Vit E besides almonds :). It's a fat soluble vitamin, available from nuts and nut oils - vegetable sources are harder to find.

https://www.famnom.com/my_food/294b1d1d-6ca3-47ac-9cd4-bfbd6...

https://www.google.com/search?q=prickly+pear+nutrition

Re:Caffeine and Exercise Performance on Thursday September 29, 2022 @01:29PM (#33024214)
Besides Magnesium, Vit D and Zinc, Potassium and Calcium are other micro-nutrients that affected general well-being for me. Both have relatively high daily RDIs (Potassium - 4700mg/day, and Calcium - 1300mg/day for adults) which can be difficult to hit without supplements, unless your diet includes servings of vegetables and dairy.

Potassium: https://www.famnom.com/nutrient/1092/

Calcium: https://www.famnom.com/nutrient/1087/

Re:An app can be a home-cooked meal (2020) on Tuesday September 13, 2022 @04:05PM (#32829560)
I really enjoyed the article. I've several personal apps, and as with home cooked meals, I've a favorite 'home-cooked app' that I iterate on more than others.

Famnom evolved from spreadsheets, to python scripts, to a web-only django app hosted locally, to a web + ios + android client apps. I find it useful daily, and it has a few other regular users (besides my family), though arguably my family are my toughest users :).

Re:Ask HN: What's the best source code you've read? on Sunday September 11, 2022 @12:07AM (#32796740)
https://github.com/django/django Django's codebase is a pleasure to read. The directory structure is intuitive to navigate, and test coverage is great.
FDA RDIs are useful as an average guideline imo, while individual acceptable limits can vary. 2300 mg/day (https://www.accessdata.fda.gov/scripts/cdrh/cfdocs/cfcfr/cfr...) Sodium is not that hard to exceed when consuming processed foods:

1. One serving of TGI Friday fries is 33% of daily sodium intake: https://www.famnom.com/my_food/8eaaea4d-e97d-4a38-8125-4b923...

2. One cheese pizza slice is 28%: https://www.famnom.com/my_food/485759ea-8507-4af7-9efe-bf61b...

Eat food, not too much, mostly unprocessed foods.

Liver is a nutrient powerhouse! Chicken, beef, lamb liver all good choices in moderation. However, few are unsafe for consumption even in small quantities - https://www.nature.com/articles/164530a0
FDA RDIs (https://www.fda.gov/media/99069/download):

- Vitamin B6: 1.7mg

- Vitamin B12: 2.4mcg

The study uses 100mg Vitamin B6 (~60x RDI) and 1000mcg Vitamin B12 (~417x RDI) for a month. High doses have been previously associated with toxicity symptoms:

- Vitamin B6 (> 100mg/day): https://pubmed.ncbi.nlm.nih.gov/18060778/, https://pubmed.ncbi.nlm.nih.gov/15473987/.

- Vitamin B12 (1000mcg/day for 2 weeks): https://pubmed.ncbi.nlm.nih.gov/31018715/

Personally, I would try to get Vitamin B6/B12 from diet as much as possible. B6 is available from a variety of foods (https://www.famnom.com/nutrient/1175/). Interestingly, Vitamin B12 is available from dairy and milk (https://www.famnom.com/nutrient/1178/), not just meat.

Re:Removal of Heroku free product plans on Friday August 26, 2022 @02:10PM (#32610840)
Just moved a django app from heroku hobby to fly.io. flyctl CLI, the documentation was super easy to work with. Fly.io Trial Plan is a decent alternative for Heroku hobby dynos (SSL certs through Let's Encrypt was a pleasant surprise).
Re:Ask HN: Meal Planning App? on Tuesday August 02, 2022 @02:43PM (#32322691)
Famnom's (https://www.famnom.com) MealPlanner allows meal planning for families optimizing for available foods / recipes in the kitchen, nutrition preferences (customizable) and taste preferences (customizable) (no shopping lists though).

Code's available at https://github.com/umangsh/famnom and https://github.com/umangsh/famnom_flutter if you want to run your own app and server.

Flutter worked really well for Famnom (https://news.ycombinator.com/item?id=32204944). Write once - run anywhere, solid documentation, rich plugins and libraries (for e.g state management through https://bloclibrary.dev/), and an expanding developer community are great.

However, there are observable performance gaps with native. For e.g. scroll performance and dropdown fields can sometimes feel abrupt.

"The Oracle" sounds like a cool feature!
Thanks! MealPlanner generates suggestions through a constraint programming solver, taking into account any foods consumed earlier in the day. The home page tracker shows nutrient consumption (and deficits) for the day.
Demo account WIP. https://github.com/umangsh/famnom README has sample user journeys that may be helpful in the meantime.
> Some changes that more-or-less stuck: - More sun for Vitamin D - More Avocados - Omega-3 from fish oil - Nutritional Yeast for B Vitamins - More greens (especially for magnesium) - Spinach in smoothies - Less sugars, carbs, and bread - Parmesan cheese for calcium - More beans

+1 for blind spots. Choline (eggs), Iodine (Iodized salt, seaweed), Zinc (pumpkin seeds, etc) are a few others in my experience. Intuition builds up steadily after tracking a while. Good luck!

Noted, thanks for the feedback. A demo account would be useful.
Absolutely open to contributions :). Didn't pay attention to licensing yet, will look at options.
Thanks!
Data is sourced from USDA, and it's updated every six months. Whole hog ingestion happens here: https://github.com/umangsh/famnom/blob/main/nutrition_tracke...

Older »