News for hackers. Stuff that matters.
Re:Berliner: Sinatra like Framework written in 16 lines of C... by pooriaazimi on Wednesday August 22, 2012 @11:14AM (#4417741)
I'm sorry, but I don't get this part:

    something.replace /^\/?/,'/' 
I'm a little sleepy, so maybe I'm missing something, but doesn't it replace a possible '/' at the beginning of some lines with '/'? Isn't that just a waste of CPU cycles? It effectively does nothing.
Re:Berliner: Sinatra like Framework written in 16 lines of C... by pygy_ on Wednesday August 22, 2012 @11:22AM (#4417787)
The key is the question mark. The regexp also adds a slash if none is present initially.