News for hackers. Stuff that matters.
Re:Show HN: PDF Inverter for macOS (In Golang) Darken Your PDFs by shoo on Monday November 23, 2020 @03:32AM (#25184707)
It may be possible to replace the dependency on the python script by using objective c to call the required libraries, then expose a c API that can be called from the go application. E.g. https://gist.github.com/porty/6b94f7f908ed7af0f070 https://github.com/caseymrm/menuet

That said, I've seen messier things than python-in-go shipped and used reliably in production to solve business problems.

Re:Show HN: PDF Inverter for macOS (In Golang) Darken Your PDFs by rootVIII on Monday November 23, 2020 @12:00PM (#25188825)
That's a fantastic idea. I actually looked into it because I really didn't want to use Python to create the output PDFs. I have experience making C bindings in Go, but had issues with Objective C (I also don't know Obj-C). If you are able to remove the Python dependency with a CGo please open a PR! Thanks for the feedback too...
Re:Show HN: PDF Inverter for macOS (In Golang) Darken Your PDFs by jamil7 on Monday November 23, 2020 @08:22AM (#25186464)
That or just write the whole script in Python and avoid a needless Go dependency.