Hacker Newsnew | past | comments | ask | show | jobs | submit | malkosta's commentslogin

If it's not intended to be done, then you are using the wrong name. Don't call it `TODO`.


Sometimes "TODO" means something you would do if you had infinite time, refactor the code completely or something that will likely need to be revisited in the future but currently adds no value to implement.


TODO is a pretty clear name. If it's not to be done, then it should be just a regular comment, no need to tag as TODO.


It's just a ~~reduce~~ loop, with an API call to an LLM in the middle, and a data-structure to save the conversation messages and append them in next iterations of the loop. If you wanna get fancy, you can add other API calls, or access to your filesystem. Nothing to go crazy about...


Technically it's `scan`, not `reduce`, since every intermediate output is there too. But it's also kind of a trampoline (tail-call re-write for languages that don't support true tail calls), or it will be soon, since these things loose the plot and need to start over.


Offset-based pagination will be a problem on big tables.


Cursor-based pagination (using a unique, indexed column like `created_at` with an ID tiebreaker) would be a more efficient alternative here.



I have a 60 LOC [bash script][1] to do something similar to my personal blog

[1]: https://github.com/alexandremcosta/alexandremcosta.github.io...


Also [Homerow](https://www.homerow.app/) is really good


That website crashes my browser on iOS (Orion fwiw). I recall this being an issue the last time I checked it out 6-12 months ago.

Hard pressed to think of any other sites that I’ve seen this issue with, super curious about what is actually happening there.


Too bad you didn't choose Phoenix/Elixir. Give it a try, and never come back to Rails.


It seemed to me like a lot of the value of Rails came from all the batteries that are included - would you say it’s the same for Phoenix/Elixir?


If you are doing anything serious, then yes. OTP is a top tier framework for writing any sort of complex parallel/distributed processing. I’d pick OTP over ActiveJobWhatever any day. Elixir code is also easier to maintain at scale due to stronger packaging and typing. OTP’s application abstraction is genius.


Truth


Just a simple webapp I made to help with decisions some of us have to make every month.


It reminds me of Joe Armstrong's "My favorite Erlang Program": https://joearms.github.io/published/2013-11-21-My-favorite-e...


To focus on short-term speed instead of long-term speed.


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

Search: