Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I don't know if it's interesting, but here it is.

The local branch of the company I work for has recently included a food allowance of 8 eur/day as a perk. I don't like / have opportunities to eat out most days, so I have built a little utility that fetches via a REST API the offers at the deli / grocery store on the way to my kid's nursery, and solves a knapsack problem to generate the most optimal shopping basket (i.e., closest to but not exceeding 8 euros). I extracted the API from the deli's website, as it seems to be something custom. Of course, I might not care about some of the items that the utility includes in the most optimal basket. To mitigate this, the utility iteratively refines the basket by asking me if there is something I want to remove, and then replaces it with the next most optimal items to fill up the remaining budget.




What's this deli / grocery store that has a REST API?


Like a local joint. They have a few stores around the country. It’s a small country, the API powers their website so you can see what is on offer in your local branch.


Ah, cool. On second read you did say, "I extracted the API from the deli's website, as it seems to be something custom."




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: