by dean@strelau.net

NYC Composite Photos

WOW

(via catbird)

Return with Splat in Ruby 1.9

This looks like a bug to me…(‘cept I’m sure it’s not)

$ cat splats.rb 
def splat1
  rv = [nil]
  return *rv
end

def splat2
  rv = [nil,nil]
  return *rv
end

foo = splat1
bar, baz = splat2

puts foo.inspect
puts bar.inspect
puts baz.inspect

$ ruby -v
ruby 1.8.7 (2009-04-08 patchlevel 160) [i686-darwin9.6.0]
$ ruby splats.rb 
nil
nil
nil

$ ruby -v
ruby 1.9.1p129 (2009-05-12 revision 23412) [i386-darwin9.7.0]
$ ruby splats.rb 
[nil]
nil
nil

(Notice the difference when returning the splatted array [nil].)

EDIT: I forgot to check the ‘question’ box on Tumblr, but if you know what’s going on here, please get it touch.

what?

I obviously am missing something here.

$ which thin
/opt/local/bin/thin
$ thin
-bash: /usr/bin/thin: No such file or directory

UPDATE: /opt/local/bin/thin does actually exist and is executable.

The language of Chief Justice George’s decision seemed almost regretful, as he wrote that “our task in the present proceeding is not to determine whether the provision at issue is wise or sound as a matter of policy or whether we, as individuals, believe it should be a part of the California Constitution.” Instead, he wrote, “our role is limited to interpreting and applying the principles and rules embodied in the California Constitution, setting aside our own personal beliefs and values.

California Supreme Court Upholds Ban on Same-Sex Marriage

This quote is nested all the way at the very end of page 2 of the article. It’s sad when the justices don’t even agree with what they’re upholding.

For example, I’ve been wanting to tweet to my foodie friends about different foods and flavor combos I’ve been eating — but without spamming my whole list every breakfast, lunch, and dinner. […] With the new @reply setup, I could register @well_fed (just did) and reply to it whenever I want to describe my food. And any friends who wanted to do the same could also follow @well_fed so we could see each other’s food tweets.

Now We Can Rig Up Twitter “Groups”!

Let’s make lemonade out of lemons, folks.

(via @atebits)

And maybe when you’re really sloshed at a party and your whole frontal lobe is on vacation in the outer rings of Saturn, you’ve noticed that your lizard brain knows exactly how to grab that cute girl by the waist for a twirl on the dance floor.

http_require

Wouldn’t it be cool if you could just require “http://my-host/my-lib.rb” in ruby?

No, because that would be evil.

Now You Can! Using our “http_require” gem! :-)

That’s it, I’m moving to Python.

The other day he asked me why people aren’t interested in getting in touch with old friends anymore, and I told him that the Internet just isn’t very popular right now. What else was I supposed to say?

Classmates.com Employees Don’t Have Heart To Tell CEO About Facebook

(via peterclark)

EDIT: via The Onion, just so you’re not too confused.

This category of applications is often used for the purpose of infringing third party rights. We have chosen to not publish this type of application to the App Store.

Apple Bans BitTorrent Software

This is Apple’s response to Maza Digital about why their app that controls the Transmission BitTorrent client was rejected. That’s right, the app itself does no uploading or downloading but was still rejected because it might be used to infringe copyright.

This is unacceptable. I love the convenience and quality of the App Store, but if this kind of behavior keeps up, I’m going to have to reevaluate whether or not to keep doing business with the App Store.

War Zone in Helvetica

The detail in this is simply  superb, with rubble flying everywhere and bullets causing dirt to fly up from the ground. Be sure to click through.

(via @ministryoftype)

War Zone in Helvetica

The detail in this is simply superb, with rubble flying everywhere and bullets causing dirt to fly up from the ground. Be sure to click through.

(via @ministryoftype)

1987 - Larry Wall falls asleep and hits Larry Wall’s forehead on the keyboard. Upon waking Larry Wall decides that the string of characters on Larry Wall’s monitor isn’t random but an example program in a programming language that God wants His prophet, Larry Wall, to design. Perl is born.
The Three Projections of Futamura are a sequence of applications of a programming technique called ‘partial evaluation’ or ‘specialisation’, each one more mind-bending than the previous one. But it shouldn’t be programmers who have all the fun. So I’m going to try to explain the three projections in a way that non-programmers can maybe understand too. But whether you’re a programmer or not, this kind of self-referential reasoning can hurt your brain. At least it hurts mine. But it’s a good pain, right?

The Three Projections of Doctor Futamura

Yep, that hurt. A good hurt, though.

Brute forcing all md5(x)=x means checking 2.410^38 values. My quick test implementation can test some 2.310^9 values per hour, meaning it would take almost exactly 10^29 hours to brute force it. Let’s say I get a million people to help me out, then we’re down to 10^23 years.. And let’s say the algorithm gets a million times faster with some clever optimization, and we’re down to 10^17 years. And let’s pretend computers get a million times faster over night, and we’re down to 10^11 years, which is significantly longer than the universe has existed for.

md5(x) = x<

See also: the MD5 Game, which keeps track of significant overlaps.

How time travel works in Primer

Primer is by far the biggest mindfuck of a movie I&#8217;ve ever seen. It was extremely low budget—just $7K according to Wikipedia—but very, very good. I&#8217;ve only watched it once, so I dare not say that I actually understand it, but this diagram helps quite a bit. I think I may have to revisit this one soon.

(via dailymeh)

How time travel works in Primer

Primer is by far the biggest mindfuck of a movie I’ve ever seen. It was extremely low budget—just $7K according to Wikipedia—but very, very good. I’ve only watched it once, so I dare not say that I actually understand it, but this diagram helps quite a bit. I think I may have to revisit this one soon.

(via dailymeh)

My mom knows I care by how I don’t curse at her that much when she calls for tech support.