HNHacker News
TopNewBestAskShowJobs

Kafka

245 karma · joined September 23, 2009

[ my public key: https://keybase.io/jonelf; my proof: https://keybase.io/jonelf/sigs/dCHC8PfORlVzdGCyjCLOwaTPix8gTGKjykrPNk8Kd_M ]
submissionscomments
Kafka··on The Future of Programming
I'm not sure but I came to think of the HATEOAS constraint of REST.
Kafka··on How many draws of a random number [0,1] are needed to sum to 1
Here's a Ruby one-liner

    n=1234567;(1..n).reduce{|t,n|s=i=0;loop{i+=1;s+=rand;break if s>=1};t+i}.to_f/n
Kafka··on Multiple vulnerabilities in parameter parsing in Action Pack
I might be the last one on earth that still runs a Rails 1.1.x app. This time the ancient one dodged a bullet.

"ah, actually 1.1.x isn't vulnerable. The issue first arrived in 2.0" - https://twitter.com/tenderlove/status/288777229276704768

Kafka··on Muscular Hydrostats for Games
Tried it on a Mac mini of age but still a Core 2 Duo. It was very slow in Google Chrome. If it's moving smoothly on more modern computer I guess It's time to upgrade.

On another note, I believe that this is why native still is around.

Kafka··on TypeScript: a language for application-scale JavaScript development
Could you please explain why it would output that?
Kafka··on Ethiopian Multiplication
In Ruby:

  # Ethiopian Multiplication
  # usage: ruby em.rb 673 7
  m, n = ARGV.map(&:to_i)
  product = 0
  while m >= 1
    puts "%4d : %4d %s" % [m, n, m.even? ? "Ignore" : ""]
    product += n unless m.even?
    m = m / 2
    n = n * 2
  end
  puts "Product: #{product}"
https://gist.github.com/3660240
Kafka··on This is not an image. It's an HTML table.
I played with the same kind of hack back in the nineties and then in JavaScript+HTML table in 2001. http://plea.se/me/galen_man.htm (it was hideously slow to scroll down back then)

http://plea.se/me/mandelnikala.html

Kafka··on Can you beat 99% of programmers? Try the FizzBuzz challenge
1.upto(100){|n|puts [["Fizz"][n%3],["Buzz"][n%5]].inject{|m,e|m=m.nil? ? e:m+=e||""}||n}
Kafka··on Can you beat 99% of programmers? Try the FizzBuzz challenge
NoMethodError: undefined method `first' for "":String in Ruby 1.9.3
Kafka··on In the Shadow of John McCarthy
From the comment by David Luckham.
Kafka··on In the Shadow of John McCarthy
"Even in 1969 the AI lab had a direct news feed from the New York Times. And on-line text chatting between users, with video support was possible"
Kafka··on Rich Hickey: "Simple Made Easy" from Strange Loop 2011 [video]
If I'm not mistaken he also mentions LINQ wich is a wonderful extensions of C# and the .NET Framework. It feels like LINQ and Clojure could be a interesting match.
Kafka··on The State of the Art is Terrible
That was what I thought he was aiming for to but then he, out of nowhere, suddenly praised PHP. I'm 99% sure that I don't have to check out PHP again to see if it's really something about it that I've missed.
Kafka··on The State of the Art is Terrible
I wish there was a video of "The Mother of All Demos" where you could actually read the text.
Kafka··on "Algorithm" is not a four letter word
Wonderful slides! I hope there will be video further on.

I didn't like "It is critical to remember that play is not exercise." and to improve it I would like to add something like "But it's totally fine if your exercise feels like play. If your exercise is fun it's so much easier to do".

Kafka··on Lispy Abuse of Ruby. Marriage Made In Hell.
I'll get straight to the elephant in the room and I'm even ignorant enough to ask it before I tried to find out myself (though at gun point I would lean more towards one that the other). Is it homoiconic?
Kafka··on Evidence based software development
http://www.slideshare.net/gvwilson/bits-of-evidence-2338367 - the slides from Bits of Evidence

http://www.youtube.com/watch?v=_5UwJM2kGfo - Bits of Evidence: Code inspections

Unfortunately it's divided in chapters without any indexing so it can get a bit confusing since you most probably aren't going to be able to watch them in the order he presented them. Still worth it!

Kafka··on Code which every programmer must read before dying
The Sudoku solver by Peter Norvig http://norvig.com/sudoku.html and not only for the code but also for the excellent essay.
Kafka··on Html5 Fractal
Neat but it seems the pixel plotting could be optimized but I guess I should keep my mouth shut until I've tried to draw that big with my http://plea.se/me/leif/canvas_leif.html
Kafka··on Did the Microsoft Stack Kill MySpace?
It depends on how many servers you are willing to run. When you have 500 million users, and a decent amount of them, accesses your site multiple times a day, CPU cycles per request starts to count.
Kafka··on Did the Microsoft Stack Kill MySpace?
> Goldman Sachs alone stores more data than the entire web

Why would you believe that Goldman Sachs stores more data than can be reached by HTTP?! Only YouTube amounts to petabytes of data. http://beerpla.net/2008/08/14/how-to-find-out-the-number-of-...

Kafka··on Alexander Graham Bell's Delightfully Weird Sketchbooks
As far as I can tell the triangles in triangles shaped aircraft sketch predates Sierpinski's discovery. http://bit.ly/hhH779 - the sketch http://en.wikipedia.org/wiki/Sierpinski_triangle - "who described it in 1915"

Maybe Bell studied 13th-century Cosmati mosaics.

Kafka··on Solving mazes using Python: Simple recursivity and A* search
I wonder how the algorithm would be affected by weave mazes. http://weblog.jamisbuck.org/2011/3/4/maze-generation-weave-m...
Kafka··on Something odd is happening at haskell.org (Edit: Domain registration lapse)
Next time you think something is odd please explain what that is. Please.
Kafka··on After A Four Year Run, Firefox Is No Longer The Top Browser On TechCrunch
I have a programming, computer security, and cryptography blog and it seems that that crowd either doesn't have, or runs another browser, Macs as often as the TechCrunch crowd.

Firefox 27,725 45.15%

Chrome 16,856 27.45%

Internet Explorer 6,191 10.08%

Safari 6,085 9.91%

Opera 2,165 3.53%

Mozilla Compatible Agent 1,395 2.27%

Mozilla 418 0.68%

Konqueror 185 0.30%

Opera Mini 126 0.21%

SeaMonkey 107 0.17%

OS:

Windows 35,928 58.51%

Linux 10,855 17.68%

Macintosh 10,709 17.44%

iPhone 1,726 2.81%

Android 926 1.51%

iPad 625 1.02%

not set 181 0.29%

iPod 159 0.26%

FreeBSD 88 0.14%

SunOS 69 0.11%

17% Mac users (even more if you count iPhone, iPad, & iPod) but still only 10% Safari.

Kafka··on Calculate the Average Salary (without revealing individual salaries)
Google cache:http://lukaszielinski.de/2010/10/06/calculate-the-average-sa...

It's a nice little trick.

You could also use my absolutely horrible looking http://average.heroku.com/

Kafka··on Algorithm for converting a finite state machine into a regular expression
Any mirror?
Kafka··on Cool hack gives Instant heart rate app for iPhone & Android
Me and a coworker tried it and also measured our heart rates by hand. It seems to be pretty accurate. I have a HTC Desire and he has a Hero.
Kafka··on Cool hack gives Instant heart rate app for iPhone & Android
Hard not to like usage of hardware in ways the vendors never anticipated. That said, I'm a little disappointed with 57bpm. I've decided I must have got a little excited.
Kafka··on Did Little Bobby Tables migrate to Sweden?
If it's an exact name of a party then it will be included. Almost all voters use the pre-printed ballots though.
Page 1 of 2Next →