News for hackers. Stuff that matters.

Kafka

Re:The Future of Programming on Tuesday July 30, 2013 @06:15PM (#6130445)
I'm not sure but I came to think of the HATEOAS constraint of REST.
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
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

Re:Muscular Hydrostats for Games on Thursday December 27, 2012 @07:42PM (#4975880)
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.

Could you please explain why it would output that?
Re:Ethiopian Multiplication on Thursday September 06, 2012 @05:10PM (#4486265)
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
Re:This is not an image. It's an HTML table. on Tuesday August 28, 2012 @03:12AM (#4442500)
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

Re:Can you beat 99% of programmers? Try the FizzBuzz challenge on Monday December 19, 2011 @06:27PM (#3371559)
1.upto(100){|n|puts [["Fizz"][n%3],["Buzz"][n%5]].inject{|m,e|m=m.nil? ? e:m+=e||""}||n}
Re:Can you beat 99% of programmers? Try the FizzBuzz challenge on Monday December 19, 2011 @05:20PM (#3371370)
NoMethodError: undefined method `first' for "":String in Ruby 1.9.3
Re:In the Shadow of John McCarthy on Friday November 04, 2011 @06:58AM (#3195589)
From the comment by David Luckham.
Re:In the Shadow of John McCarthy on Friday November 04, 2011 @06:58AM (#3195586)
"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"
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.
Re:The State of the Art is Terrible on Monday October 03, 2011 @06:31PM (#3068445)
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.
Re:The State of the Art is Terrible on Monday October 03, 2011 @06:27PM (#3068429)
I wish there was a video of "The Mother of All Demos" where you could actually read the text.
Re:"Algorithm" is not a four letter word on Thursday September 29, 2011 @08:25PM (#3054945)
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".

Re:Lispy Abuse of Ruby. Marriage Made In Hell. on Tuesday September 06, 2011 @06:09PM (#2967494)
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?
Re:Evidence based software development on Tuesday June 28, 2011 @06:45PM (#2707670)
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!

Evidence based software development

Some time ago I read the slides from Greg Wilsons excellent presentation Bits of Evidence.Today I found out that it's on YouTube (see comment).I find it fascinating that the scientific studies of software development apparently seems to be mostly ignored or unknown to our community.

( Read More... | 1 comment | on HN )
Re:Code which every programmer must read before dying on Wednesday April 20, 2011 @08:32AM (#2466314)
The Sudoku solver by Peter Norvig http://norvig.com/sudoku.html and not only for the code but also for the excellent essay.
Re:Html5 Fractal on Thursday April 07, 2011 @06:22AM (#2418959)
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
Re:Did the Microsoft Stack Kill MySpace? on Friday March 25, 2011 @08:03PM (#2370876)
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.
Re:Did the Microsoft Stack Kill MySpace? on Friday March 25, 2011 @07:56PM (#2370862)
> 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-...

Re:Alexander Graham Bell's Delightfully Weird Sketchbooks on Tuesday March 22, 2011 @06:48PM (#2356898)
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.

I wonder how the algorithm would be affected by weave mazes. http://weblog.jamisbuck.org/2011/3/4/maze-generation-weave-m...
Next time you think something is odd please explain what that is. Please.
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.

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/

Older »