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

how many lines of code do you think you could do it in?


I dont know - it’s a genuine question. I honestly didnt expect this to be a complex problem, let alone incredibly complex. I genuinely want to understand where the challenge lies.


The PDF spec is of byzantine complexity, and is full of loose ends where things aren’t fully and unambiguously specified. It also relies on various other specs (e.g. font formats), not to mention Adobe’s proprietary extensions.


If you want a datapoint, Origami is a "pure Ruby library to parse, modify and generate PDF documents".

That library cloc's in at 13,683 lines of code and 3,295 lines of comments.


Thats not a lot of code tho, but i see your point.


Try getting GPT-4 to spit out that much code and have it be coherent and run together.


In the case of a PDF parser it has to embed a full PostScript interpreter




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

Search: