Hacker News new | ask | show | jobs
by thangalin 22 days ago
I have the opposite experience:

* https://repo.autonoma.ca/repo/treetrek/tree/HEAD/render/rule... - syntax highlighting for 40 languages and file formats in ~10 minutes

* https://shufflenblues.com/expenses/ - real-time expenses progress updates with payment vendor API in ~30 minutes

* https://repo.autonoma.ca/repo/treetrek/tree/HEAD/git - real-time, cache-free raw Git reader implementation with cloning in ~5 days

* https://repo.autonoma.ca/repo/notanexus - PDFjs integration in ~3 days

However, these are likely not the "hard" problems you've mentioned. I feel like I can architect solutions at a higher-level now, without having to be completely caught up in many technical nuances. I'd rather not learn the extensive PDFjs API, for example, because it would take weeks of effort to understand.

1 comments

Why reinvent the wheel? Syntax highlighting, git. I'm pretty sure there are PHP libraries to do that.

Your syntax highlighting is very basic as well. Just ask LLMs to provide tests where it would fail to render correctly.

The first thing that comes to mind after looking at it: print("# not a comment")

> Why reinvent the wheel?

Dependency-free, performance, FORTRAN, and it would take me more than ten minutes to find and integrate a highlighter that works across all of my code bases.

I searched for PHP-based Git libraries. All of them either invoked "git" using a system call or offered write abilities to the repo. I wanted a pure PHP solution that did not write to any files or invoke executable files (for security purposes). Maybe I didn't search long enough; at some point it becomes faster to tell the LLM what's wanted than to find a solution that fits.

> print("# not a comment")

Works correctly?

https://i.ibb.co/chgVkTz4/not-a-comment.png