Hacker News Comments on
Hacker's Delight
·
2
HN points
·
14
HN comments
- This course is unranked · view top recommended courses
Hacker News Stories and Comments
All the comments and stories posted to Hacker News that reference this book.I'm a rising junior at Yale, and I know Sean well and we both took systems programming together. We definitely covered bit manipulation and bit tricks, as well as number representation and lots of other stuff.Sean's an incredibly bright guy but he's more interested in building world-changing apps and web dev. as opposed to low-level systems programming. There are other classes here where you have to code in assembly and do all sorts of bit manipulation (OS's comes to mind). The core CS sequence in our school is also in C, which differs notably from other places that use Python, Java, etc.
For anyone who wants to learn more about bit manipulation, Henry Warren's "Hacker's Delight" is a terrific book (http://www.amazon.com/Hackers-Delight-Henry-S-Warren/dp/0201...).
⬐ smikhanovWhy would anyone think they could write world-changing web apps without knowing bit-fiddling techniques?
If you like this sort of bit-level puzzles, this is a nice book: http://www.amazon.com/Hackers-Delight-Henry-S-Warren/dp/0201... -- probably the only book at such a low level I remember buying in many years.
Also recommend the book: Hacker's Delighthttp://www.amazon.com/Hackers-Delight-Henry-S-Warren/dp/0201...
⬐ adestefanProgramming Pearls is another excellent book in this realm.http://www.amazon.com/Programming-Pearls-2nd-Jon-Bentley/dp/...
⬐ kragenProgramming Pearls is excellent, but it has very little in common with Hacker's Delight, except that both are excellent books about programming. HD is specifically about the kinds of low-level tricks we're talking about here, while PP generally is not.
"Hacker's Delight" (http://www.amazon.com/Hackers-Delight-Henry-S-Warren/dp/0201...) is also a good source for these, as well as other techniques.
Whenever a discussion on rearranging bits and bytes comes up, I can't help but recommend Hacker's Delight by Henry S. Warren http://amzn.com/0201914654
⬐ anthonybYep, I just got that from Amazon a few days ago. I'm a Python/Web programmer in my day job, but I'm looking to get more into the low level stuff. I recently got a Nerdkit too - lots of fun :)
If you're interested in reading about more of these, and how they work I'd highly suggest reading the book Hacker's Delight by Henry S. Warren[1]. I know that I've used more than a few of the tricks in my day-to-day work.[1] http://www.amazon.com/Hackers-Delight-Henry-S-Warren/dp/0201...
⬐ swaitsIndeed, a great book. It's also mentioned in the article.
For more of this sort of thing:http://www.amazon.com/Hackers-Delight-Henry-S-Warren/dp/0201...
which should be on every serious programmers bookshelf. Take a look, also, at the wonderful MIT HackMem report. Its Wikipedia entry, http://en.wikipedia.org/wiki/HAKMEM, has pointers to online versions. The venerable PDP-10's influence shows, but there's lots of cool stuff there.
Knuth's Art of Computer Programming,read closely, occasionally divulges clever hacks, particularly in the exercises.
For those interested in these types of problems and solutions, check out "Hacker's delight", it's a pretty amazing read:
Thanks for this write-up RiderOfGiraffes.I'm one of the HNers that sent in code for the test. The feedback provided by RiderOfGiraffes was useful and the follow up questions were food for thought.
At the time I'd just failed a coding test for a systems programmer role and felt pretty low, which is why I decided to take this on.
In the interview I failed, I fared well in most of the questions, apart from one set involving heavy binary maths — I pretty much forgot basic binary computation from when I did my undergrad course. Following this, it prompted me to buy "Hacker's Delight" by Henry S. Warren. It's a great read if you're into high-performance algorithms http://amzn.com/0201914654
I can't wait to read the next part!
The article is not available at the moment so I am flying a bit blind here.H. Warren, Hackers Delight has a nice discussion of this problem. One of my favorite books, but I like to do code generators.
http://www.amazon.com/Hackers-Delight-Henry-S-Warren/dp/0201...
Another great resource for tidbits like this is _Hacker's Delight_, by Henry S. Warren, Jr. It covers a number of other tricks outside of bit twiddling, as well. Worth checking out for anyone who finds this sort of stuff fascinating.Link: http://www.amazon.com/Hackers-Delight-Henry-S-Warren/dp/0201...
For those who enjoy these kind of problems I highly recommend "Hacker's delight".http://www.amazon.com/Hackers-Delight-Henry-S-Warren/dp/0201...
⬐ pkruminsSeconded. That is an amazing book.I also recommend this much more complete article on bit hacks:
Also check out Hacker's Delight :http://www.hackersdelight.org/
http://www.amazon.com/Hackers-Delight-Henry-S-Warren/dp/0201...
Clever stuff. If you're interested in such things, best book I've seen is "Hackers Delight" http://www.amazon.com/Hackers-Delight-Henry-S-Warren/dp/0201...Author covers really clever techniques to count bits, count non zero bytes like this etc etc. Bit manipulation at its best.
⬐ pchristensenHoly crap, all 15 reviews of that book are 5 stars! That's the best average I've ever seen on Amazon.⬐ axod⬐ ytersI'd give it 5 also. It's a ridiculously clever fun book.I agree with some of the reviewers though, the title probably means less people manage to find it than if it was called "Bit manipulation bible" or something.
The author's website has all the source code for download: