Live data from Hacker News

Ask HN: What rabbit hole(s) did you dive into recently?

news.ycombinator.com

191–200 of 443 posts

Re: Ask HN: What rabbit hole(s) did you dive into recently?

#191

PDF files, and why the heck they are so slow to read. Hours upon hours of perf(1) and fiddling with ugly things in C. My main takeaway is everyone in the world is doing things HORRIBLY wrong and there's no way to stop them. (Digression: did you know libpng, the one everyone uses, is not supposed to be an optimized production library—rather it's a reference implementation? It's almost completely unoptimized, no really…

Question since you are probably knowledge-able about it right now.

> Another observation: lots of people create PDF's at print-quality pixel density that's useless for screens, and greatly increases rendering latency.

Is this relevant to text in the PDF? I would assume text is vectorized, meaning resolution is not relevant until you _actually_ print it?

Or is it just relevant to rasterized content like embedded images?

Re: Ask HN: What rabbit hole(s) did you dive into recently?

#193
post #35

So, I decided to install Linux on my formerly-Windows-only laptop, and thought it was cool enough to go full time and ditch Windows completely. The downside was the lack of access to top tier games. No problem though, my plan was to take a break from gaming, figuring that by the time Linux had caught up with compatibility, computers would also be much more powerful and I'd be able to resume gaming at some point in th…

The old-laptop -> install-linux-because-windows-wont-run -> tech-career pipeline is absolutely real.

It got me to learn C, graphics programming, operating systems, networks and firewall, literally everything I wanted to do required a couple of days deep in arch linux wiki learning about all kinds of inter-connected systems.

Re: Ask HN: What rabbit hole(s) did you dive into recently?

#194
post #35

So, I decided to install Linux on my formerly-Windows-only laptop, and thought it was cool enough to go full time and ditch Windows completely. The downside was the lack of access to top tier games. No problem though, my plan was to take a break from gaming, figuring that by the time Linux had caught up with compatibility, computers would also be much more powerful and I'd be able to resume gaming at some point in th…

It was a big moment for me too when I realized that the real world has infinitely many interesting things to do and explore. The real world is incredibly detailed.

Re: Ask HN: What rabbit hole(s) did you dive into recently?

#195
I was curious about how people with seizure disorders safely click links not knowing what lies ahead. Investigating the current best practices for building for epileptics, using this great resource (1) as my starting point.

This took me down a rabbit hole on current methods to detect seizure onset... I came across a very interesting journal article on applying ML in an implantable that can detect seizures within 3 seconds, which spurred my current research on less invasive detection methods. Like any good rabbit hole, I've strayed from the original mission.

Seizures seem scary and I don't want to give them to people, but the causes of their onset seem to be too nuanced and patient-specific to build with any guarantees. The best I can do is avoid the obvious and hope the cutting edge detection and mitigation research bears fruit.

1. https://developer.mozilla.org/en-US/docs/Web/Accessibility/S...

Re: Ask HN: What rabbit hole(s) did you dive into recently?

#196
I fell into the rabbit hole of delinking programs back into object files.

Long story short, I was inspired by the Super Mario 64 and REDRIVER2 decompilation projects and wanted to do one. I picked a PlayStation video game from my childhood, started Ghidra and then I quickly realized that the game code's a complete mess. It's bad enough that I don't see myself ever finishing this project unless I can somehow divide-and-conquer this problem into manageable pieces. But you can't exactly break a program into pieces... can you?

So I've started to think for a bit and remembered the basic toolchain workflow: source files are compiled into assembly files, which are assembled into object files, which are all linked together into a program. The last bit stood out to me and I wondered: what if I could undo the work of the linker? I'd get a bunch of object files, dividing the original reverse-engineering problem into smaller pieces.

I searched online and found absolutely nothing on the topic. That should've tipped me off, but instead I started scribbling on a piece of paper. Object files are made up of sections (named arrays of bytes), symbols (named offsets within these sections) and relocations (spots to patch with a symbol's address). The linker lays out the sections, computes the addresses of the symbols and then patches the relocation spots to produce the program. I can't just take the program bytes and stuff them into object files because of these applied relocations, but if I could somehow undo them...

The good idea fairy struck, and the fairy struck hard.

I'm writing scripts in Jython and after a couple hundred lines I get results on sample test cases. I try them on the game and it takes forever due to algorithmic complexity. I rewrote a new implementation in Java, forking Ghidra in the process. I rewrote it a couple more times because my analyzer kept hitting edge cases. I built an elaborate and exhaustive test harness because I keep introducing hard to track down regressions. I submitted a couple of pull requests to Ghidra to solve some painful points and reduce the size of the diff, which spanned thousands of lines. I reply to the questions from the Ghidra team with walls of texts trying to explain my use-case, but the PRs get rejected because they don't fit the current design of Ghidra well.

When the Ghidra team rejected my stuff probably because at this point I was probably speaking in the native language of Cthulhu, I really should've taken the hint.

Instead, I spin off my fork as a Ghidra extension to alleviate the maintenance burden, which by now was getting closer to ten thousand lines. I keep rewriting my MIPS relocation analyzers again and again to improve their correctness, always hitting a new edge case. I've decided to start a blog, because I'm tired of trying to explain this stuff from basic principles to people since there's no literature on this topic. I get side-tracked writing a complete series of articles on the basics of reverse-engineering to introduce the topic. I get side-tracked again writing a series of articles on the applications of delinking related to software ports, with a case study on a x86 program that requires me to write relocation analyzers for this architecture and perform refactorings to support multiple ISAs and object file formats.

I'm finally back on reverse-engineering the video game that started all of this and get side-tracked once more because I'm documenting the process in another series of articles. By sheer luck I stumble upon a SYM debugging symbols file, but I don't have the matching executable for it, so I build a placeholder one that matches its shape, then import the placeholder into Ghidra, then write about a thousand lines of Java to import this data on top of the placeholder, then write a bunch of scripts and my own correlators to version track it onto a executable I do have because Ghidra doesn't know what to do with a source executable that doesn't have a single initialized byte to its name. I've tried to engage with the Ghidra community about this latest problem, but no answer. I assume they're probably busy trying to find an exorcist, so I carry on regardless.

Two years. Two years I've spent digging this rabbit hole that's probably worth a thesis or two. I know enough about delinking now that I could probably write a book that would read like a Lovecraftian horror story to people that develop linkers for a living. I've automated this stuff down to making a selection inside Ghidra and clicking on "File > Export Program...", but there's only so much you can do to make accessible or even understandable a technology that allows you to literally rip out code from a Linux program and shove into a Windows program or from a PlayStation game into a Linux program and have it work, in spite of ABIs or common sense.

TL;DR I've developed a reverse-engineering technique by accident that would give professors teaching Computer Sciences 101 an existential crisis.

Re: Ask HN: What rabbit hole(s) did you dive into recently?

#197

Collatz conjecture

I've been looking at that particular rabbit hole since a professor of mine mentioned it in 2003 or something. Once or twice a year, I'll read about some theorem or something and think it can be applied to Collatz somehow and dive back in.

I've actually proved it several times...except for the insignificant detail that I glossed over that didn't seem important but tanks the proof.

Someday I'll have to publish my "book of lemmas that don't prove the collatz conjecture."

Re: Ask HN: What rabbit hole(s) did you dive into recently?

#198
Group theory.

Something is incredibly beautiful to me about classifying the kinds of symmetry things can have.

I’m trying to understand where the sporadic simple groups come from. Starting with the Matthieu groups. So far it seems to be due to some anomaly in Pascal’s triangle, but I’m still trying to put it together. “Another Roof” on YouTube has a good video about this.

Re: Ask HN: What rabbit hole(s) did you dive into recently?

#200
After the post the last week about the DIY GPS receiver, I decided to get out my RTL-SDR and set it up. Took a couple of days of fiddling around with it, but now I've got SDRtrucking setup. Spent one morning listening to the public safety radio traffic. That was a wild ride on it's own with all sorts of things going on in this metropolitan area.
Post reply on HN