Skip to content

Comment on Really Slow Site for Testing HTTP Caches.

Comments

This site is slow :)

I don't know Ruby, but how does this work:

    get '/', :agent => /curl/ do
      (slow_thing, time) = slow_down(DEFAULT_SLEEP)
      "SLOWER THAN #{slow_ting}. Putting the brakes on for #{time} seconds.\n"
    end
It binds slow_thing and then references it as slow_ting (without the h) in the interpolation? What?

It appears twice so it must be intentional?

Oops, that's a typo in code that hasn't been deployed yet. Our regression suite missed it ;-)

Ah, makes sense, you just get the empty string instead of "turtles marching through peanut butter".

I am used to Perl where your code won't compile if you reference an undefined variable in a string interpolation.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.