Posts

Showing posts from June, 2010

JavaScript Random Hints

Update some point has been made more clear, thanks to Dmitry Soshnikov for suggestions. Forget the global undefined Too many developers relies into undefined variable in ES3, and all they should do is to set undefined = true on global scope and see if the application or all unit tests break or not. I am going to demonstrate how simple is, at least in ES3, to redefine by mistake the global undefined. // inside whatever closure/scope function setItem(key, value) { this[key] = value; } // later in the scope, setItem may be reused // through call or apply for whatever object setItem.call(myObject, myKey, "whatever value"); // if for some reason the first argument used as context // is undefined, the "this" will point to the global context // if for some reason the second argument used as key // is undefined, the accessor will cast it as undefined string // the result of latter call with these two // common or simple conditions // is the quivalent of: window.undefin

Summer Garbage.

Tour update, We will have a repress of the "Immaculada" LP that is limited to 200, a tour cassingle of two instrumental tracks that didn't make it on to "Immaculada" that is limited to 125, and some other goodies. Here are the dates... July 10 – Greenville, NC @ The Spazz Haus w/ Grids July 11 – Charlotte, NC @ The Yau House July 12 – Atlanta, GA @ the PS Warehouse w/ Ralph, Predator, Womens Prisons July 13 – Tampa, FL w/ Neon Blud, Ghost Hospital @ Heinrich’s Workshop July 14 – Gainesville, FL w/ Diet Cokeheads, St. Dad @ Wayward Council July 15 – ???????????? July 16 – Washington, DC @ the Treeswing House w/ Cigarette, Pizza, Gun Outfit July 17 – Brooklyn, NY @ 538 Johnson w/ Gun Outfit, Cairo Pythian July 18 – Philadelphia, PA @ The Brothel w/ The Chickens, Black Tar July 19 - Brooklyn , NY @ Bruar Falls w/ Divorce Money, White Suns, Pigeon Religion, Hell Kite

THIS WEEKEND!

Hey - two shows this weekend with the Men - related projects THURSDAY JUNE 24 Tommy's Tavern 1041 Manhattan Ave Brooklyn, NY 8 PM $5 ZULUS WaxEater (from INDIANA) PLANET MEAT DREAM POLICE (members of the men - FIRST SHOW) SATURDAY JUNE 26 538 Johnson Ave Brooklyn, NY 8 PM $5 Ascensions (member of the Men / Remnants - FIRST SHOW) Lake of Fires Tyrhombus Rex Water Temples --------------------------------------------------------------- COME

WebSocket Handshake 76 Simplified

update there was a superfluous CR+LN with char 0x00 that was causing buffer troubles, now fixed I am working during my free time (... recently extremely hard to have ...) over a little project that I'd like to show at the Front Trends event this October and WebSocket is the key of this project. While 2 days ago I eventually found a way to communicate in few lines of php with a WebSocket, yesterday Chromium blog announced they " simply changed it ", causing basically problems to all those projects based over the good old handshake75. After I have found in Axod's Hack that somebody else had basically my same thoughts, I still could not find any valid example able to do the new handshake ... so here I am with the first draft-ietf-hybi-thewebsocketprotocol-00 php implementation I know, inspired somehow from the go version . <?php class WebSocketHandshake { /*! Easy way to handshake a WebSocket via draft-ietf-hybi-thewebsocketprotocol-00 * @link http://w