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

The prompts are slightly tailored towards a textbook but are otherwise generic. If you have a Gemini API key, you can specify any title and get your own book. It can take several hours for a larger book (can be done faster and slightly cheaper with async queries, but I thought that an unnecessary complication for a small pilot). It is easy to disagree on the resulting quality of the book; for me it feels more like an extended Google query than anything. But as an exercise where the size of your prompt stack is larger than 1, it was fun and, in parts, thought-provoking.

If I am to name just one prompting trick that I discovered to be useful, that'll be hierarchical budgeting. I have a total word budget for the whole book and I ask Gemini to allocate that budget for chapters, and so on recursively. Fun part, the sum of parts does not always equal the total, but the difference was never bigger than 5%. That's some stochastic summing happening.


I think with our modern day lives it's tough to accomplish. There is more multitasking going on our part, some of it necessary for work or social relations, so we learn to switch easier. The downside, it becomes harder to focus. Not to discourage, just to say it'll have to be long term work, commitment.

Personally, I try to: - prioritize older, existing projects, - have an explicit daily schedule, - keep a handwritten journal (just as a commitment to be away from the computer).

Helps a little bit.

And in actually answering the question, one occasion where my focus was certainly higher than average is when I had an opportunity between jobs to travel for a few months to another country. I had a laptop with me but for security reasons there was hardly anything on it, just basic browsing. I didn't even have passwords for my Netflix account, etc. Quite quickly I could focus really well on just a few tasks, say learning a new language. Of course, such a solution is hardly applicable in most cases.


Thanks! For animations I wrote some custom rendering code, with a simple API that exposes a canvas and the ability to paint either constant pixels, which never change in colour, or dynamic pixels that can fade out with time. Then each frame I would simply paint the pixels at the search frontier and the rendering code would take care of the fading out when exporting. Also used the Lab colour space for colour blending.

The rest of the pipeline was straightforward. I exported individual frames in a .ppm format, which was easiest to program, and then stitched them into an .apng animation using ffmpeg. Did quite a few tests initially to choose between .apng and .webp and back then .apng was least glitchy across the devices I have.


I wrote this blog back in 2023 but since then I became a frequent lurker on HN and decided to repost the blog here. For me, writing it was about connecting the dots between dynamic optimization techniques I've studied as an economist and the more general search algorithms studied in CS. (This is a second submission for I erroneously put Show HN in the title the first time around.)


Thank you for the tip, will do so. I thought I saw some interactive blogs under Show HN, but maybe I'm mistaken. The guidelines are indeed explicit. (Tried to do so but was a bit too late, I guess, because the edit option is not there. Reposting doesn't seem to work, probably need to wait some time.)


No worries—it's a great blog post! We'll put it in the second-chance pool (https://news.ycombinator.com/pool, explained at https://news.ycombinator.com/item?id=26998308), so it will get a random placement on HN's front page.


[Show HN] Admittedly much less visually engaging :), but some time back I was interested in the twin paradox, so I made a website where you fly a toyish spaceship between three stars and see how the various clocks and the space itself change. It's flat spacetime, so relatively easy to simulate and everything just runs in JS: https://twinparadox.org

The original motivation was, can one make a game with relativistic spaceships, conceptually speaking? The issue is that if a player calls another player IRL it'll be like instantaneous communication... In flat spacetime, though contradictory to its postulates, one can choose a preferred frame of reference, say the planets, and allow instantaneous communication within that plane, not leading to any inconsistencies in a game, I think. Curved spacetime doesn't admit a notion of simultaneity, so that's completely out, no black holes in a game :( Never really got to the point of modelling multiple ships though, the life caught up. So it's just a single ship on the website for the moment.


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

Search: