Live data from Hacker News

Ask HN: What's your proudest hack?

news.ycombinator.com

331–340 of 414 posts

Re: Ask HN: What's your proudest hack?

#331
post #269
post #258

I hosted a server, in my bedroom back in the late 90s. By server, I mean a desktop running Slack, connected to the internet and allowing me to SSH into it. It could recover just fine from a power outage, but unfortunately due to a RAM issue it would just randomly die - and RAM just wasn't something the local computer store was ready to bring in. Enter my Lego Mindstorm. I effectively built a box, on wheels with a big…

For the confused: Slack isn't just the modern messaging platform.

Slack == slackware.

Re: Ask HN: What's your proudest hack?

#332
post #34

I was color calibrating a prototype holographic printer with a 30Hz pulsed laser spatially modulated by a 60Hz LCOS, phase locked of course. I was chasing down a funny issue where the response curve of the LCOS seemed to change every time we power cycled the machine - specifically, it would randomly flip between one of two modes. I had a suspicion that the LCOS was flickering (they're known to do that) and that there…

very cool

Re: Ask HN: What's your proudest hack?

#333
I’ll start by saying I’m a lawyer, not ever a professional coder. Years ago, I wanted to help a friend translate a Japanese video game and release a fan translation. I had some experience in assembler a long time before it, but I had forgotten most. I had little experience in disassembly. I also had never learned anything about compression algorithms or theory.

Turns out this particular game company (Falcom) had a habit of implementing their own compression on their assets. So I had to painstakingly read the disassembly. It got to the point that I had notebooks of hand written disassembly so I could read and think about the code when not at a computer. Eventually I figured out how to both decompress images and text and then save the decompressed assets in a way that bypass the compression. I wrote the hack and patch and was super happy. Of course it blew up the size of the game assets for translated materials, but it worked.

Re: Ask HN: What's your proudest hack?

#335
post #192

I was 16 or 17 and had a guest account on the local universities Ultrix server. I discovered that all of /dev/tty* was world-readable UNTIL someone had successfully signed in. So a “cat /dev/tty* > passwords.txt” and waiting an hour collected the credentials of everyone logging in to the server. At some point, I had logged into the account of one of the sysadmins who msgd me and let me know he’d changed his password…

On Ultrix, /dev/mem and /dev/kmem were world readable.

Fun times!

Re: Ask HN: What's your proudest hack?

#336

I spilled water on my favorite keyboard and broke it, then let it dry and fixed it by using a pencil to trace over the damaged circuits. It worked fine again after that! (Graphite in pencil lead is a weak conductor, enough to make the keyboard circuit work)

You can use the same trick to repair 'broken' TVs and monitors; ones that just mysteriously stop displaying but are otherwise ok.

Re: Ask HN: What's your proudest hack?

#337
In the early 80's I built an Apple II clone. There was a known problem with power supplies failing due to excessive (short interval) power cycles by the user. This was due to the game developers hijacking the reset key forcing the user to cycle the power to reboot. I modified my ROM to force a reboot when a joystick button was pressed at the same time as the reset. Then they introduced the IIe ... and stole my idea :-)

Re: Ask HN: What's your proudest hack?

#338
Had a school homework problem: Find the last 3 digits of 7^9999. We were supposed to try manually and see that it was periodic. Instead I used my home computer. I had 12 Kb of memory, so using 1 byte for each digit I could have the result in memory once. I did the multiply by seven with seven additions, as the CPU didn't have multiply instructions. (RCA 1802, if you are curious). I managed to get the result, saved it on a cassette tape, and went to see a friend who had a printer. Printed the number out, if I remember right it was about 3 pages long. Drew a circle around the last three digits, and showed to my teacher. She was suitably impressed.

Re: Ask HN: What's your proudest hack?

#339
Self-modifying code in a EPROM, written backwards. It was the start-up sequence of the boot ROM for my home computer, based on the RCA 1802 chip way back in the 1970's... It had to save the contents of (almost) all the registers for debugging. I was short of space - I had added 2.5 kb to the 2kb program, and the EPROM was only 2kb, so we needed to optimize everything we could. The shortest way to save the registers relied on self-modifying code. Such can not run from an EPROM, so it had to be copied in RAM. Luckily we had other stuff to copy, so copying a bit more did not cost extra bytes. And the shortest copy loop was using an auto-increment load instruction and a auto-decrement push instruction, so the stuff had to be written backwards in the rom.

There were other dirty tricks, for example the table of (one-letter) commands was at the end of the ROM, and was terminated by a letter with the 8th bit set, which we got by reading the address after the ROM. As a aside effect, you could extend the commands by installing a second ROM in the proper place.

That time I knew the instruction set for the 1802 by heart. I even dreamed directly in hex.

Re: Ask HN: What's your proudest hack?

#340

Earlier quoted context omitted.

Cool. Kind of unrelated, but is there anything stopping someone from just generating a sawtooth DPCM sample at runtime and using the channel as normal without having to use crazy timing stuff?

Yes, it comes down to how the DPCM channel encodes sound data. A sawtooth gets most it's energy and harmonics from the sudden jump at one end. This impulse is impossible to encode in 1-bit delta encoding, the closest you can get is a slightly steeper slope. The audible effect is similar to a low pass, with the strength dependent on the intended amplitude, so instead of a nice sharp saw, you get a muddy not quite tria…

Ah sure, but how about just generating a triangle using a small block of code in RAM? Then you're not wasting any storage.
Post reply on HN