Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
pkrumins
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
78 ms
·
841.
▲
Swedish Army Personality Test
(rekryt.mil.se)
51 points
by
pkrumins
17y ago
|
46 comments
842.
▲
by
pkrumins
17y ago
Yes, but you can also measure it by input value, like I did. It makes more sense to me to plot n vs. time(Fib(n)), because practically I'd want to know how "how fast" my algo runs if i give it n. What do you think about that?
843.
▲
by
pkrumins
17y ago
That's right!
844.
▲
On the Linear Time Algorithm For Finding Fibonacci Numbers
(catonmat.net)
41 points
by
pkrumins
17y ago
|
27 comments
845.
▲
by
pkrumins
17y ago
Only Python 2.6 I think, and it does not print negatives very nicely (it prints bin(-x) = -bin(x), instead of some number representation).
846.
▲
by
pkrumins
17y ago
There is a divide and conquer strategy, that will come in advanced bithacks article. I agree 1-5 are basic. That's why I say at #6 "Now it finally gets more interesting!!! Bit hacks #1 - #5 were kind of boring to be honest." I included them
847.
▲
by
pkrumins
17y ago
that's not good, hackers, that's not good!
848.
▲
by
pkrumins
17y ago
Unfortunately it is not possible to do that efficiently with just a few bit operations because of the following theorem: Theorem. A function mapping words to words can be implemented with word-parallel add, subtract, and, or, and not instru
849.
▲
by
pkrumins
17y ago
for example, those 8 devices were 8 LEDs, some of them on, and you'd want to turn the rightmost led off. :) edit: i'll look into more serious applications when i write that article on bit trick applications.
850.
▲
by
pkrumins
17y ago
that is true, hackers, that is true.
851.
▲
by
pkrumins
17y ago
Exactly! And you can get these questions even in job interviews. If you want to score the intervieews, then you better know the quick ways!
852.
▲
by
pkrumins
17y ago
oh no! totally forgot about this classic. :)
853.
▲
by
pkrumins
17y ago
Thanks, that's a good question and comment. I'll try to write another part of the article with applications to these hacks! There are plenty in embedded engineering, kernel programming, cryptographic algorithms, space efficient data structu
854.
▲
by
pkrumins
17y ago
Seconded. That is an amazing book. I also recommend this much more complete article on bit hacks: http://graphics.stanford.edu/~seander/bithacks.html
855.
▲
by
pkrumins
17y ago
Not quite! These are embedded programmer tools of trade. For example, you don't want to loop over bits to count number of bits in it (not covered in this article, but will be in the next part of the article). It can be done with several shi
856.
▲
Low Level Bit Hacks You Absolutely Must Know
(catonmat.net)
139 points
by
pkrumins
17y ago
|
76 comments
857.
▲
by
pkrumins
17y ago
"Internal Server Error..." when i tried to view Voyager 1 from Voyager 2 in the year 2025.
858.
▲
by
pkrumins
17y ago
Python 3100 :)
859.
▲
by
pkrumins
17y ago
I wouldn't call it "short."
860.
▲
by
pkrumins
17y ago
I have collected some Feynman lectures as well. See this: http://freescienceonline.blogspot.com/2008/12/richard-feynma...
861.
▲
by
pkrumins
17y ago
It also has a positive side of being impressively huge and it certainly creates a ftw moment for the friends.
862.
▲
by
pkrumins
17y ago
noob question: what's a "condo"?
863.
▲
by
pkrumins
17y ago
How brain damaged do you have to be to drink even a liter of cola per day?
864.
▲
by
pkrumins
17y ago
What would I do with it? It would have a computing power of a calculator... I'd better buy a MacBook that I have never tried. A lot more expensive, but also a lot more positive comments about and reasonable screen/computing power...
865.
▲
by
pkrumins
17y ago
hmm... i wouldn't buy a $40 computer.
866.
▲
by
pkrumins
17y ago
I recommend Skiena's "The Algorithm Design Manual (2nd ed)": http://www.amazon.com/Algorithm-Design-Manual-Steven-Skiena/...
867.
▲
by
pkrumins
17y ago
Thanks! I did not know there was the 2nd edition!
868.
▲
Plurk launches real-time conversation search!
(blog.plurk.com)
2 points
by
pkrumins
18y ago
|
0 comments
869.
▲
by
pkrumins
18y ago
it's redirecting to youtube now. but the recording is total crap - no slides.
870.
▲
by
pkrumins
18y ago
who was the moron who recorded this lecture? all the most important information is in the slides. i want to see them.
More ›