Archive for July, 2010

AjaxChat v0.4.2

Ok, so my previous version v0.4.1 did not fix the headers already sent error. I finally figured out what was going on with this. I have the php.ini variable ‘display_errors’ set to off. This turns off any error messages that may be displayed, so I was not getting the headers already sent message and everything was working fine. The problem, it turns out, is that the error message was foobaring the javascript/css. So really, all I needed to do was to suppress the errors using @header() when sending headers. Also, just in case, I turned on output buffering in the scripts that do send headers. What this does is queue up header requests and send them all once it’s parsed the entire script. Which should get rid of the error message altogether, but even if it doesn’t, the @ will suppress it so the javascript/css will function properly! Okay. I’m pretty sure we won’t be seeing the headers already sent message again. Hope this helps. Keep giving me feedback! It’s the only way I know when something’s wrong. Thanks again!

PS: You might have to wait a few minutes for the update to hit the WordPress servers (11:16 GMT-4)

AjaxChat fixes.

Wow, I did a significant amount of changes to try and speed up the AjaxChat plug-in, but it looks as though I’ve thoroughly broken it. Many apologies to those of you who are having trouble. For some reason, the main error ‘headers already sent’ I can not duplicate on my end. I have turned off output buffering and still I cannot get the error. I did make some changes yesterday which I thought would fix it, but it seems this isn’t the case. Today, I will be spending most of the day working on fixing issues with the plug-in, so please, bear with me as I try and solve you’re individual issues. If you have a certain error or it’s not functioning on your website, please comment the address of your website and any helpful information you can give. I will be posting updates here as I make progress in smoothing out the plug-in. Thank you for your time and again sorry for the bugs. :) Take care.

AjaxChat v0.4 Released

Well, I’ve done my best to clean up the code a bit, namely making as few calls to the database as possible and also transferring data as little as possible between the client and server. The servers I do development on are all local to me, so it’s hard for me to see what kind of performance we can expect over the internet. Everything works great over gigabit lines. :) If only we all had fiber…. ahh… soon enough. Anyways, I don’t think I really changed any features, just tried to speed it up as much as possible as that was the main feedback I was getting (too slow). It’s really a hard problem to solve. In order for the chat to be reasonably useful, we must get new messages at least every second and repeated calls to the server sometimes bog things down. Hmm, I also implemented the XMLHttpRequest.abort() method if we’re already trying to get new messages. That way, if the first request takes longer than 1 second, it won’t start another one until the first one is done. If that makes sense. Should be finishing it up here shortly and committing it to wordpress.org. Thanks. Let me know what you think.

Update: Just committed v0.4 @ 14:29 (GMT-4) 7/17/2010

Update: Bugfix for ‘headers already sent’ error: v0.4.1 committed @ 17:21 (GMT-4) 7/18/2010

Time flies

It’s amazing how quickly it does. I looked down and realized I hadn’t wrote anything in about 2 weeks. Where did the time go? I suppose I’ve been relatively busy lately. My spare time has been spent mostly playing around with project ideas. I have a good many projects that are currently in progress, but this is because I have the attention span of a kid who has just finished drinking a cappuccino. I switch to something else when I get bored with one project. I guess the most recent project is AjaxIRC. I’ve been implementing an IRC client completely in the browser. It uses a C daemon on the server side to connect to the IRC server and creates a unix socket for comms. The JavaScript on the site sends data through a php script, which sends it through the unix socket, to the IRC server. Data being received is dropped into a memcached implementation by the C daemon and fetched out by a PHP script, which is polled by the JavaScript. Hrmph, that’s a mouthful. Anyway, I’ve kind of taken a pause from that as well as I’ve had something else burning on my mind. I recently became aware of the TI LaunchPad with the MSP430 microcontroller. It just so happens that I’ve really been having a lot of fun playing with low-level electronics these past few weeks. In fact, I took a laser diode out of a DVD burner, hooked up an external power source to it. Then, I used the parallel port on my computer to drive a transistor to switch the power source on and off. Wham, programmable laser light on my computer. Right now it just informs me of new emails, but it was fun nonetheless. Anyways, this development board from TI (LaunchPad), is looking pretty neat and super cheap. It’s just under $5.00. We’ve got a couple of them on the way now for some testing. Very neat intro to microcontrollers for hobbyists such as myself. Should be able to do some interesting things with them. Anywho, that’s all for now I guess. Oh, and also, I’m going to throw up my GPG public key on my contact page as I’ve officially started signing all my emails and encrypting any important ones. It’s also on the MIT PGP key server. Later.

 
Ubiety v0.0.1
Chat ()