Better HN
topnewbestaskshowjobs
Log inSign up

Kafka

245 karma · joined Sep 23, 2009 (17y ago) · 51 submissions

[ my public key: https://keybase.io/jonelf; my proof: https://keybase.io/jonelf/sigs/dCHC8PfORlVzdGCyjCLOwaTPix8gTGKjykrPNk8Kd_M ]
Submissions

comment 13y ago · link · parent

I'm not sure but I came to think of the HATEOAS constraint of REST.

comment 13y ago · link · parent

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

comment 13y ago · link · parent

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

comment 13y ago · link · parent

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.

comment 14y ago · link · parent

Could you please explain why it would output that?

6.

Primitive Obsession, Custom String Types, and Self Referencing Generic(haacked.com ↗)

3 points · by Kafka · 14y ago · discuss

comment 14y ago · link · parent

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

comment 14y ago · link · parent

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

comment 14y ago · link · parent

1.upto(100){|n|puts [["Fizz"][n%3],["Buzz"][n%5]].inject{|m,e|m=m.nil? ? e:m+=e||""}||n}

comment 14y ago · link · parent

NoMethodError: undefined method `first' for "":String in Ruby 1.9.3

comment 15y ago · link · parent

From the comment by David Luckham.

comment 15y ago · link · parent

"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"

comment 15y ago · link · parent

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.

comment 15y ago · link · parent

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.

comment 15y ago · link · parent

I wish there was a video of "The Mother of All Demos" where you could actually read the text.

comment 15y ago · link · parent

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".

comment 15y ago · link · parent

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?

comment 15y ago · link · parent

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!

19.

Evidence based software development

1 points · by Kafka · 15y ago · 1 comment

20.

All list comprehensions are not created equal (Sudoku solver in CoffeeScript)(alicebobandmallory.com ↗)

1 points · by Kafka · 15y ago · discuss

comment 15y ago · link · parent

The Sudoku solver by Peter Norvig http://norvig.com/sudoku.html and not only for the code but also for the excellent essay.

comment 15y ago · link · parent

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

comment 15y ago · link · parent

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.

comment 15y ago · link · parent

> 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-...

comment 15y ago · link · parent

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.

26.

Memory access ordering - an introduction(blogs.arm.com ↗)

2 points · by Kafka · 15y ago · discuss

comment 15y ago · link · parent

I wonder how the algorithm would be affected by weave mazes. http://weblog.jamisbuck.org/2011/3/4/maze-generation-weave-m...

comment 15y ago · link · parent

Next time you think something is odd please explain what that is. Please.

comment 15y ago · link · parent

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.

12