somewhere to talk about random ideas and projects like everyone else

stuff

Can Anyone Beat This? 14 October 2008

The original vX function was 337b. Now, it’s been reduced down to 293 bytes, while adding a new feature (callback is now optional).

X=function(u,f,p,x){x=window.ActiveXObject?new ActiveXObject(‘Microsoft.XMLHTTP’):new XMLHttpRequest();x.open(p?’POST’:’GET’,u,!0);p?x.setRequestHeader(‘Content-type’,’application/x-www-form-urlencoded’):p;x.onreadystatechange=function(){x.readyState==4?f?f(x.responseText,x):f:0};x.send(p)}

Apparently, the above stuff doesn’t work (Wordpress?)

It’s really quite amazing. The big things that reduced size were using lots of condititional things, really obfuscated unreadable stuff, and using !0 instead of true, and !1 instead of false.

If you want to use it, try building your own copy from.

http://vxjs.googlecode.com/svn/trunk/build.htm

The usage has signifigantly changed though, there, everything’s namespaced under an underscore, so it’s _.X(“url”)


vX JS Library 12 October 2008

Built on top of the vX Ajax Function, is the vX JS Library. It’s probably the world’s smallest JS Library, in total, about 1.45kb, with things like Animations, Ajax, JSON Serialization, URL Encoding, Cloning, Event Handling, Fade Effects, and more. It’s signifigantly less elegant than jQuery and others, but it is extremely lightweight and quite cross-platform. The code has been optimized down to each individual byte.

http://code.google.com/p/vxjs/

It’s not too useful. It may be useful for some tiny things, but it’s not really that useful.

It’s not good enough to make things really high-quality, or complex such as the Ajax Animator. It’s good only if your making like something small, where you might want some ajax, but still want it to load fast.

Also, another thing, not exactly part of the library is vXg, a Get-Only version of vX that’s only 221 bytes. http://vxjs.googlecode.com/svn-history/r26/trunk/ajaxget.js

vXg(URL, CALLBACK)


vX Ajax Function 07 October 2008

For one of my projects, I needed a really simple, lightweight one. It’s super lightweight. I mean really. really lightweight. Only 337 bytes (though 1 kilobyte of random crap in front of it would make it 1337 bytes). Most libraries are over 60kb! If you’re using it only for ajax. You’re using 180 TIMES what you really need.

This one can do GET/POST requests with a callback

/*vX Ajax Function. (C) Antimatter15 2008*/
function vX(u,f,p){var x=(window.ActiveXObject)?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();
x.open(p?"POST":"GET",u,true);if(p) x.setRequestHeader("Content-type","application/x-www-form-urlencoded");
x.onreadystatechange=function(){if(x.readyState==4&&x.status==200) f(x.responseText)};x.send(p)}

It takes 3 parameters. the URL, the Callback function, and the post parameters (optional).

vX(AJAX URL, CALLBACK FUNCTION[, POST PARAMETERS]);

Note that here the callback is required, not optional, though it could probably be made to do that by changing f?f(x.responseText):x.

To Use:

GET:

vX("ajax.php?you=suck&howmuch=alot", function(responsetext){alert(responsetext)})

POST:

vX("ajax.php", function(responsetext){alert(responsetext)}, "you=suck&howmuch=alot")

That’s it. In case your wondering what the name is, I wanted somethign that was short so it was lightweight. I didnt want it to be single letter because single-letter names are likely to collide with other libraries. Also because “V” and “X” are two widely overused characters anyway. Another reason might be that you dont know what version it is :P


Project Wikify Prototype 5 Released 18 September 2008

I just released Project Wikify prototype 5 revision 9. The highlights are support for ‘Channels” which let you have your own private “fork” of the internet. Also, Full IE support, and a completely redesigned website. On the backend, there’s a new communication protocol. Saving is only done through POST, no more JSONP/GET stuff. Loading is done differently too.

Again, you can get it from http://wikify.antimatter15.com

As with all the major updates before, the database was trashed in the process.


Project Wikify Success 09 September 2008

Project Wikify is working out really well. My blog is getting vandalized a lot, and I actually find it really funny.

So, thanks spammers! You’ve just made my day (seriously). And posting this probably constitutes a change in the template, and will screw up Project Wikify.

For all of you who don’t have either Project Wikify, RWK, or the Project Wikify GreaseMonkey Userscript, follow the nex link to view the vandalized page (it’s the RWK version, not the full Wikify one, so you can’t edit it on that.).

[View my super-vandalized blog]

javascript:(function(){var%20A=document.createElement("script");A.src="http://wikify.antimatter15.com/server/rwk?url="+window.location.href;document.getElementsByTagName("head")[0].appendChild(A)})()

[Edit] Amazingly, it turns out Wordpress assigns IDs to posts, so it actually works (cool)! which is far better than I expected. So, it really shows how this project is working out way better than I imagined. and I’m sure someone is gonna edit this.

[Edit v0.2 Pre Alpha Beta Prototype 3 revision 1 Stable (Development) Testing Build 44 ASCII codename: copying the ajax animator’s insanely long version names] For all of you who haven’t tried this magical program yet, try so here at wikify dot antimatter15 dot com

[Edit Again]

Okay, I was wrong, it did screw up the template :( Wikify is messed up now :(