Posts

Showing posts from July, 2011

About JavaScript apply arguments limit

Just a quick one from ECMAScript ml ... it is true that browsers may have a limited number of arguments per function. This may be actually a problem, specially when we use apply to invoke a generic function that accepts arbitrary number of arguments. String.fromCharCode This is a classic example that could fail with truly big collection of char codes and here my suggestion to avoid such limit: var fromCharCode = (function ($fromCharCode, MAX_LENGTH) { // (C) WebReflection - DO THE FUCK YOU WANT LICENSE return function fromCharCode(code) { typeof code == "number" && (code = [code]); for (var result = [], i = 0, length = code.length; i ) { result.push($fromCharCode.apply(null, code.slice(i, i + MAX_LENGTH))); } return result.join(""); }; }(String.fromCharCode, 2048)); // example alert(fromCharCode(80)); // P alert(fromCharCode([80, 81, 82, 83, 84])...

because shit happens

When you spend half week of holidays recovering because of a dislocated shoulder, when you come back and spend 1 month recovering after a shoulder surgery, or for any other smaller or bigger shitty situation life could offer us, there is now a customisable way to express our anger: fuckn.es ! 100% Embedded HTML5 Application One project that always fascinated me is py2exe , an utility able to convert whole python applications into a single executable file. This concept is similar in OS X Applications, where everything is transparently contained in a single file. I have tried to reproduce a similar concept with this stand alone web page application where the manifest is hilariously the only external dependency, totally superfluous but necessary for mobile devices. In any case, fuckn.es is a portable, " copy and paste source ready to go ", cross platform tiny app, where rather than #! /bin/sh at first line, the user should simply double click it and run within a (modern) bro...

Random Rant On CSS3 Transitions

Update Thanks to @gregersrygg for his link and hints, this is a hackish way to solve the problem apparently cross browser and trustable ... still a hack! // this save one char, how cool is that! !function(document){ // (C) WebReflection (As It Is) - Mit Style // we all love function declarations function redraw() { // clientHeight returns 0 if not present in the DOM // e.g. document.removeChild(document.documentElement); // also some crazy guy may swap runtime the whole HTML element // this is why the documentElement should be always discovered // and if present, it should be a node of the document // In all these cases the returned value is true // otherwise what is there cannot really be considered as painted return !!(document.documentElement || 0).clientHeight; } // ideally an Object.defineProperty // unfortunately some engine will complain // if used against DOM...

Perished.

I accidentally deleted the album on this blog that contained past show flyers, pictures, etc. from every post. If you have any cool show flyers and/or pictures of us and you'd like to submit them, we'd love that. Send all submissions to - c.g.hansell@gmail.com

SUMMER TOUR DATES

August 4 - Brooklyn @ 538 Johnson w/ Nomos, Brain F, and Only the Messenger 5 - New Jersey @ Brick Moose Lodge w/ Nomos 6 - Philly @ Kung Fu Necktie w/ Whatever Brains, Streetwalker 7 - Pittsburgh @ Helter Shelter w/ Slices and Free Clinic 8 - Cleveland, OH @ Now that's Class w/ Jerk 9 - Columbus, OH @ Carabar w/ IceAge, Unholy Two, White Walls 10 - Louisville, KY @ Cahoots w/ Cross and Tropical Trash 11 - Indianapolis, IN @ Vibes Music 12 - Chicago, IL @ Water Worx w/ Birth, Nomos //// In store at Permanent Records 13 - Minneapolis, MN @ The House of Lard w/ Punch, Loma Prieta, and Condiminium 14 - St Louis, MO @ APOP Records 15 - Tulsa, OK @ the Sound Pony w/ Lizard Police 16 - Lawrence, KS @ Replay Lounge w/ Jabberjosh 17 - Denver, CO @ Rhinoceropolis w/ Religious Girls 18 - Bozeman, MT @ The Filling Station 19 - Missoula, MT @ Total Fest w/ Milk Music, White Shit, Pygmy Shrews, tons of other bands 20 - Seattle, WA @ The Josephine w/ Milk Music, Big Crux 21 - Olympia, WA @ Old S...

Online Base 64 Converter

Update apparently I am more than late since datauri.com does similar stuff ... oh well, better two options than nothing, right? Thanks @mathias for the update. Right, you may think this is the most useless thing ever but actually embedded content is freaking cool and this is the reason I have created a truly simple page in 3site.eu/base64 . What The Hack Is That Nothing truly special, you choose a file, you get its representation in base64 compatible with inline data url. Best Available Option ... is converting data accordingly with your browser: who better than a browser can know how to understand inline data? Chrome or any other HTML5 Enabled Browser should work offline without problems, but if you are masochist and stubborn, it may fallback into server side encoding. Latter case may be dropped as soon as my cheap space in my cheap website will suffer too many requests so ... did I say already use a decent browser? And that's all folks :)