Lurker News
Cursed hacks, forcing proprietary software to do what you want through clever means, or just generally doing awful, beautiful things with technology?

Comments (499) 174 threads

Earlier comments
_bbih1 reply#
It's not the best story - I'm sure there are some greats here - but I tricked GitLab into running scripts that looked like https://gitlab.com/jyavorska/c64exec/-/blob/master/.gitlab-c... by modifying a runner to pass everything through the VICE Commodore BASIC emulator. It would even attach the output file as an artifact to the build.
gcr1 reply#
That’s incredible! Why though??
_bbih#
A small contribution to the increase of nonsense in the world
Kinrany1 reply#
I used SQLite for coordination between processes. It was a huge Python application that originally used the multiprocessing library and had to be migrated to Rust.

In hindsight, it would have been better to use a local HTTP server. Seemed like overkill at the time.

dehrmann1 reply#
I'm confused. Was SQLite for the migration?
hnfong1 reply#
Probably IPC.
dehrmann#
What I meant is that doesn't make sense for the Python version because multiprocessing has its own mechanisms for doing that. Same for the post-migration Rust binary.
nisalperi2 replies#
I built a writing/formatting product now used by 60k+ indie authors. One of the requirements was to format PDFs for print publishing with different themes and configurable layouts. Instead of building a custom PDF rendering engine, I decided to use Puppeteer to generate the PDFs.

But there were a bunch of issues we had to deal with:
- To render the gutter (margin in the middle) you had to know which side of the book each page would fall on.
- To generate the headers and footers, you had to know the exact page number for each of the pages.
- You had to know how many pages the table of contents would take up, but you couldn't know the page numbers for each chapter until the book was fully generated.
What I ended up doing was to generate multiple PDFs for each chapter, header, footer, and table of contents separately, then stitching them together very carefully to build the final export. Super hacky, but it ain't stupid if it works!

magnio#
Given what I know about the PDF spec and the various papercut I had with various PDF tools, your solution seems as sane as it can be tbh.
azalemeth#
Out of curiosity, did you consider transpiling to LaTeX? Memoir.cls is fantastic at those sorts of calculations and actually the formatting output from pandoc is usually quite good too.
wruza#
I had to connect an old accounting system to a web app with enhanced ui (an operator determines a payment on a visual graph of contracts between companies, plus graphs editor). There were two ways: a separate db with periodic sync, and a direct COM-connection to the old app, which was scriptable through js<=>COM library. I chose the latter, tests worked fine.

After a month or so I started to notice that something is wrong with performance. Figured out that every `object.field` access through a COM proxy takes exactly 1ms. Once there’s enough data, these dots add up to tens of seconds.
>_<
Instead of doing a rewrite I just pushed as much of js logic as possible beyond the COM, so there’s only a constant or little amount of `a.b.c` accesses on my side. Had to write a json encoder and object serialization inside the old app to collect and pass all the data in one go.
The web app was abandoned few months later for unrelated reasons.

Load more comments