Posts

Showing posts from May, 2009

checking in...

Hey, so it's been a bit since you've heard from us so here is a bit of an update. We are working at getting the august dates booked for tour, and its going smoothly so far, we will be announcing specific shows once more details come in.... We received the acetate for our LP this week and it sounds great. It should be going off to the pressing plant sometime within the next few days. With luck it should be out by early-mid July. More updates to come...

en-code: the quickest way to encode your snippet

Update I have created an inline callback that could be used to show en-code in every page or as bookmark: WebReflection::encode (just a click to give it a try) javascript:(function(src,w,h,i,s){if(this.WebReflectionEncode)return this.WebReflectionEncode();function p(){s.top=(document.documentElement.scrollTop||(document.body&&document.body.scrollTop)||0)+'px'};try{i=document.createElement('<iframe frameborder="0" src="'+src+'"></iframe>')}catch(e){i=document.createElement('iframe');i.src=src};s=i.style;s.border='1px solid black';s.width=w+'px';s.height=h+'px';s.position='absolute';s.right=0;s.zIndex=99999;p();w=setInterval(p,250);(document.body||document.documentElement).appendChild(i);this.WebReflectionEncode=function(){clearInterval(w);i.parentNode.removeChild(i);w=h=s=i=null;this.WebReflectionEncode=null;}})('http://www.3site.eu/encode/',280,320); P.S. WOW, to make it po

Template Engine - Why Bother? XML + XSLT

I am not sure I read the entire recent " war " in the PHP general mailing list about the best PHP Template Engine Option but, generally speaking, this argument is truly loads of solutions and controversial opinions. Here I am with mine. PHP 5 And In Core DOM, XML and XSLT Apparently, all these " Smarty adorers " did not consider that PHP 5 introduced a lot of core classes to work over DOM, XML, and transform them via XSL files. Nothing to do, they prefer to move an entire template application rather than use the best native, fast, in core, solution . Here a couple of reasons to generally prefer XML and XSL Transformations rather than whatever engine, specially those written in PHP itself, a not that fast interpreted programming language. Think Portable Apparently developers like to be stuck forever in a single programming language , something I cannot even try to consider, since Information Technology means Flexibility and Updates . An extremely valid point to cho

Basic Ajax Twitter Application

Yesterday I posted a work in progress of a Full PHP Ajax Proxy , today I would like to show you what you could do with that file. Twitter API Directly via Ajax Thanks to basic realm authentication support, it is extremely simple to create your own twitter app in your home page. Here the example: <style type="text/css"> div.twit { font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Verdana, Tahoma, sans-serif; width: 320px; } div.twit h3, div.twit h4 { margin: 0; padding: 0; } div.twit h3 { font-size: 10pt; color: blue; } div.twit h4 { font-size: 7pt; font-weight: normal; text-align: right; color: #999; } div.twit span { font-size: 8pt; } </style> <script type="text/javascript" src="http://vice-versa.googlecode.com/svn/trunk/build/vice-versa.min.js"></script> <script type="text/javascript"> function addIntoList(info, container){

PHP Full Proxy ... A Work In Progress

Something " truly dangerous " to play with: a proxy file able to understand everything via XMLHttpRequest, enabling any sort of cross site requests (no COMET yet, it could arrive soon). Dunno even why I am posting this " little monster ", but I am sure a lot of people would like to have " access to the entire web " simply using Ajax, and nothing else, something like this: function website_exists(url){ var xhr = new XMLHttpRequest; xhr.open("HEAD", "proxy.php?url=" + (url), false); xhr.send(null); return 199 < xhr.status && xhr.status < 400; }; if(website_exists("http://gogle.com")) alert("Of Course, It's Big G!"); WebReflection PHP Proxy <?php /** XMLHttpRequest PHP Proxy * @author Andrea Giammarchi * @blog http://webreflection.blogspot.com/ * @license Mit Style License * @requires curl and Apache webserver * @description basic authe

[ECMAScript 5] Do Not Remove arguments.callee !

Being subscribed in dunno how many developers mailing list, I completely forgot to follow up the arguments and arguments.callee discussion. Accordingly to this John post , is with extreme surprise that I am discovering how critical is the gap between programming language developers and programming languages active users. Even if I read more than once piece of SpiderMonkey or Google Chrome, I am part of programming languages users and I can tell you for sure that the decision to remove arguments.callee from the language will be a complete mess. The Main Aim Of ECMAScript 5: Do Not Break What We Have So Far Unfortunately, Internet Explorer will be broken , because named function persists in the scope , causing naming conflicts everywhere ! setTimeout(function f(){ alert(window.f); }, 1000); Above code will alert the function f in every Internet Explorer . Moreover, as you can read in one comme of John's entry, Internet Explorer has function interpretation "problems" , d

google caja, what's wrong with "new" ?

In JavaScript we mainly have two type of variables: primitives (string, number, boolean, null or undefined) object related (Array, Object, Function, unknown for IE) Due to this difference, a primitive string and a new String are two different worlds: var s1 = "abc"; var s2 = new String("abc"); s1 instanceof String; // false s2 instanceof String; // true The nature of primitive constructor is to return a typeof constructor, but if we use new in front of the same constructor, it will obviously return an instance of that constructor. This is the nature of javascript, summarized in this snippet: function I1(){ return 1; }; function I2(){}; var i1 = new I1(); var i2 = new I2(); In both cases, o1 and i2 will be respectively an instanceof I1, and I2. In few words, if a function is caled via new , the assigned value will be an instance o the constructor itself or, if it returns an instanceof Something , the instanceof something value. function I3(){ return n

re-introduction to JSON.hpack

Let me try again, this time with an official project page and a nearly complete wiki page . JSON.hpack, the Fat-Free Alternative to JSON JSON.hpack is a lossless, cross language, performances focused, data set compressor. It is able to reduce up to 70% number of characters used to represent a generic homogeneous collection. To understand how to use JSON via JavaScript, PHP, or C# (Python coming soon and hopefully other languages as well), please have a look into the wiki page or if you want, try out the demo page ! I am waiting for comments :-)

[OT] United Kingdom Internet Restrictions - You Are Doing It Wrong!

I though the worst case scenario about " politicians and internet relationship " was Italy, where politicians average age is 65 and internet is still considered an " uncontrolled porn and communists place " and nothing else ... but I was wrong. Today I bought an USB pen for mobile broadband to have access to the net with a pay as you go solution, until I will solve my flat+internet problems. It has been extremely simple: You go to the shop, you buy the pen, you top up what you want, you surf the web ... fair enough, the installation under Windows XP SP3 was quick and simple ( anyway, I wonder when this companies will realize that main operating systems are 3, not just PC and Mac ... I cannot use the the software under my Ubuntu partition ... annoying ! ) The first step, after installation, has been go to edit a post I published yesterday evening and with extreme surprise I found a bar on the top of the blogger platform which showed me the name of the company, rather

Ajax better than Flash AMF? Optimized homogeneous collections

I found this dojo related post extremely interesting and I instantly though in our application we have similar JSON structure which is effectively redundant and, for thousands of database rows, it slows down visualization responsiveness (not that much in intranet, enough via internet). JSON.hpack I am developing on spare time an "all web languages" homogeneous collection packer in order to speed up client/server interaction specially for database results where the column name could be considered as a key and each field in the same column as a row. So far I created a JavaScript version which seems to work perfectly and results are quite impressive. For example, the total size of the 5000 items used in that dojo article switched from 37.23Kb to 26.27Kb , gzipped size, while number of characters to send / retrieve are 776133 against 99575 . As example, the host where I put the initial test does not allow more than 50Kb as uploaded data, this means that without JSON.hpack is not

Nonsense

yo so we have a new show on july 31 at don pedro's. it's our good friend jake noodles' birthday show (he runs the place)... his band wellington welfare ladies' league is playing, as well as a bunch of other bands, so come out.. also, that's going to be our tour kick-off show, which we are booking now, so if you can help out in any of the following cities, please e-mail me: markperro@gmail.com july 31 - don pedros, nyc aug 1 - nj aug 2 - philly aug 3 - baltimore aug 4 - pittsburgh aug 5 - ohio aug 6 - ohio aug 7 - detroit word -mark

Artwork

Image
Here is the cover for our LP, in case you were interested.

Hymen - Do The Downies

Image
The Men and Highway Gimps have a collaborative band together called HYMEN. This particular song features Chris on guitar, Alex on bass, Andrew's pre-recorded drum loops, and Alex and Chris on Vocals. You can download "Do The Downies (Ouahhhh!)" right here Expect more from this ensemble soon!

Hey, if you're not doing anything on Friday...

Image
The other band I am in called Fatal Erection is playing @ Death By Audio in Brooklyn along with the fantastic Little Lungs and others for a sweet art installation...There will be beer, awesome artwork, cool people and good tunes. If you are not doing anything please come out and hang with us and support some rad artists.

THIS SATURDAY

Image
Show is free, 2 dollar beers! LETS GET GREASY

Unfortunate Events

Image
Vile Gash had to drop off of the Philly show, so therefore the show is canceled. Bummer. Sorry friends.

See You in a 01!

Quick one from work ... new flat, no internet, my extra activities are now these: unpack begs: tar xvf begs.tar use some namespace: from IKEA import essential.forniture reload the net: $connection = FIBER_OPTIC_AVAILABLE ? 'Virgin Media' : 'start panic mode!'; But, in the meanwhile, you can follow me on Twitter ;)

fireEvent for FireFox, Safari, and others

Just a quick update about vice-versa , I have implemented fireEvent to fire, as the method name says itself, events after attachEvent. Do you prefer the dispatchEvent way with at least 3 different ways to initialize an event usually fired only to call the callback? It is this: a.addEventListener("click", function(evt){ location.href = evt.target.href; evt.preventDefault(); return false; }, false); // powerful uh? now think // when you used something different // from defaults ... var evt = document.createEvent("MouseEvents"); evt.initMouseEvent( "click", true, true, this, 0, 0, 0, 0, 0, false, false, false, false, 0, null ); a.dispatchEvent(evt); against what I think is often all we need: a.attachEvent("onclick", function(){ location.href = event.srcElement.href; return event.returnValue = false; }); a.fireEvent("onclick"); and that's it :)

GIMPWORKS

Image
Hey, our dear friends in HIGHWAY GIMPS now have a blog where you can keep up with their crazy antics. They also will be posting awesome records for download as opposed to just info about themselves... They have a tape out right now which is great, and you can download it there as well. highwaygimps.blogspot.com