News for hackers. Stuff that matters.

crankybear1337

Re:Ask HN: What has the past 12 months taught you? on Friday June 15, 2018 @06:57AM (#17318845)
> If you are bored, create something.

This is a bit rambly and tangential, but one thing I'd really want to emphasize is the "something" part.

Sometimes it's good to decompress by just making something that's neither conventionally useful nor well-engineered, but absurd, like an inside joke taken to the extreme.

A personal example: My friends and I have built an IRC bot that stores most of its code in Redis and is almost entirely developed on IRC by stuffing a bunch of incomprehensible JavaScript on a single line. It can pull data over HTTP and mangle it in various ways, it had a neural network trained with our IRC logs to generate random text, it has a Twitter client, can be used as a REPL, has a simple wiki-like database, etc. All these features are composable using an ad-hoc scripting "language" with a parser that sometimes breaks in hilarious ways. And most of the development happens when we are bored and just want to take a break.

None of the code we've written for it or the technical "design" is pretty or robust. But we have a ton of fun hacking on it because we get to build something while completely disregarding whether it'll be useful or even work properly. That's why we work on it.

Yeah, writing simple C programs using various constructs (switch/if/for statements, structs, different APIs, etc.) and then looking at the produced assembly is a good way to learn.

Another thing I like to do is to rewrite complex parts of the disassembly in pseudo-C (though radare has an option to do this automatically), which makes the overall logic easier to see (and is, of course, the entire point of decompilers like Hex-Rays).

Re:What is wrong with Microsoft buying GitHub on Monday June 04, 2018 @06:15AM (#17226293)
They also used to have CodePlex, but eventually they killed it and migrated projects over to GitHub.
Re:Decode Like It's 1999: MPEG-1 Decoder in JavaScript on Thursday March 01, 2018 @04:17AM (#16490635)
Can definitely recommend this!

A few years ago I wrote a JPEG encoder for a class, and it was one of the most fun projects I've had at the university. Seeing a picture with those iconic compression artifacts produced by your own implementation feels pretty nice :)

Re:The cost of forsaking C on Wednesday February 14, 2018 @02:46PM (#16378737)
Those explanations for the x86 register mnemonics were great, thanks!

To me the MIPS registers seem pretty logical too, though: $zr for zero, $sp for stack pointer, $a0-3 for arguments, $t0-7 for temporaries and $s0-7 for saved registers. Much better than the plain numbered registers on some assembly flavors.

Re:Digging for treasure in Aladdin’s source code on Thursday October 12, 2017 @04:35PM (#15461101)
Yeah, they do this for PC games as well.

A good example is the Steam release of Final Fantasy VII - it actually ships the original binaries from the 90's PC version mostly intact. Code for things like the Direct3D 6 and software renderers, and MIDI sound is still there in the binary, just unused. All the new features like cloud saves, achievements, and original music are implemented using a separate DLL that hooks a lot of stuff in the game, like the graphics and audio subsystems. It's a pretty fascinating thing to reverse engineer.

That must've been an interesting job :)

Re:Thinkpad X62 on Monday September 18, 2017 @04:01PM (#15279001)
You're in for a treat. Going from the crappy low-res TN panel to a FHD IPS feels almost like getting a whole new machine.
Re:Thinkpad X62 on Monday September 18, 2017 @10:30AM (#15276262)
The TN panel on the X230 is indeed absolute garbage, and mine was the first time I'd seen burn-in on a modern laptop screen.

I did the FHD mod on my X230 a while ago and can say it makes a world of difference. Well worth the effort of disassembling most of the machine and soldering the mod.

The 51nb folks have also made some other amazing mods like the X320/X330, an X220/230 fitted with a 13" panel: https://imgur.com/a/0m3a1