So I just pushed a bug fix to the Tweepy library. I found a bug here: https://github.com/tweepy/tweepy/issues/41 that seemed like low hanging fruit. The loop that was reading information from the server response was very naive and basically assumed there would be no problems. I changed it to check the server status before each loop. This should solve the problem.
Pull Request: https://github.com/tweepy/tweepy/pull/139
Diff: https://github.com/tjr1351/tweepy/commit/d459ab929b18409534f15920e32ff35d0adc36f7
Although the change itself is not huge, I had to do a bit of research to figure out how to get the server status and then what status numbers to look for.
Sunday, December 11, 2011
Node.js for gaming
So I'm taking a class now that is focused on open source social/ casual games. We're focusing on creating games with javascript and html5. Because of this I've decided to use Node.js to help write my game.
Node.js is a server architecture written in Javascript that allows for very easy, fast web applications. One of the huge benefits of Node.js is it's callback structure. It wraps a lot of costly, slow operations such as file system calls and database queries in a callback that does not block. Also, everything is run on a single process so, unlike other server architectures, it's very easy to see what users are online and pass information between them or two certain groups. Both of these features make it very easy to create multiplayer games.
I recently found an awesome blog post by Daniel Baulig showing how to link a Node.js server to a libary called Socket.io. Linking the two libraries to the same session ID allows you to now send dynamic messages to the client using a socket FROM your server. Normally with no configuration these two libraries run independently and cannot be called from within one another.
I'm still not sure what I want to do for my game but I'm leaning towards some sort of MMO turned based strategy game. Maybe one where it queries popular open source websites for your user name and gives your character bonuses based on your open source contributions.
Here's some other good Node.js references:
Express.js
Socket.io
nodetuts.com
Node.js is a server architecture written in Javascript that allows for very easy, fast web applications. One of the huge benefits of Node.js is it's callback structure. It wraps a lot of costly, slow operations such as file system calls and database queries in a callback that does not block. Also, everything is run on a single process so, unlike other server architectures, it's very easy to see what users are online and pass information between them or two certain groups. Both of these features make it very easy to create multiplayer games.
I recently found an awesome blog post by Daniel Baulig showing how to link a Node.js server to a libary called Socket.io. Linking the two libraries to the same session ID allows you to now send dynamic messages to the client using a socket FROM your server. Normally with no configuration these two libraries run independently and cannot be called from within one another.
I'm still not sure what I want to do for my game but I'm leaning towards some sort of MMO turned based strategy game. Maybe one where it queries popular open source websites for your user name and gives your character bonuses based on your open source contributions.
Here's some other good Node.js references:
Express.js
Socket.io
nodetuts.com
Wednesday, August 10, 2011
POSSE Hackfest '11
I'm currently hanging out with the Foss Box and some professors from various local schools. We're trying to teach them about all things open source. I've been playing with Open Video Chat again to see if it works on the newest Sugar build. Sugar 0.92.2 is now running on Fedora 14. Hopefully this means it either has the version of Telepathy we need or we can install it. I was able to get OVC running on two XO's and connected them. When it tried to connect the pipes I got an error though. Seems to be a break at a file open :/ I'll have to look at this more.
Side Note: The XO's automagically start an adhoc network and connect to eachother again! WOOOOO!
Side Note: The XO's automagically start an adhoc network and connect to eachother again! WOOOOO!
Friday, July 22, 2011
jQuery VideoBox
jQuery VideoBox is a modification of jQuery LightBox designed to work with local video sources using Html5. Video formats currently supported: mp4, ogv, and webm. Source code and download can be found on GitHub.
Currently tested on Firefox 5. Please let me know if you have problems with other browsers.
I should be updating GitHub soon with a detailed user manual. For now consult the example index.html.
Currently tested on Firefox 5. Please let me know if you have problems with other browsers.
I should be updating GitHub soon with a detailed user manual. For now consult the example index.html.
Monday, July 18, 2011
Prototype
Just got some web hosting space from my friend Greg. We were trying to get some space on the Foss@Rit servers but they aren't ready yet. You can find our prototype at http://gregjurman.com/trose/firstemt/. We deleted the video so we don't nuke his bandwidth. ^_^
In other news... I got the jQuery plugin working. It's still just a hack so I'm not going to publish it yet... I need to clean the code up a ton before then.
In other news... I got the jQuery plugin working. It's still just a hack so I'm not going to publish it yet... I need to clean the code up a ton before then.
Wednesday, July 13, 2011
RIP Gnome3 Hot Corner
FINALLY!
After weeks of anguish I have finally figured out how to disable the hot corner on Gnome 3 that has been the bain of my existence since switching to Fedora 15.
What's the problem with a Hot Corner?
Well if aren't familiar with Gnome 3 there is an Overview that allows you to quickly open programs and switch between currently open ones.
The hot corner is in the top left corner of the screen and activates when the cursor is in the (0,0) coordinate. The problem with the hot corner is that you often accidentally activate it when trying to click things close to the top left corner. It's also highly redundant since the "Activities" button there has the same functionality. Personally, when I want to use the Overview I just hit the super key (windows key).
The Solution
You need to modify the javascript backend for gnome panel. Yeah Gnome 3 is partly in javascript... You'll find the necessary file under /usr/share/gnome-shell/js/ui/. Next you want to open panel.js in your favorite text editor. I like Geany :P You'll need to find this line:
this._corner = new Clutter.Rectangle({ width: 1, height: 1, opacity: 0, reactive: true });
and modify it to say "reactive: false". This will disable the hot corner functionality without disabling Overview.
I found this solution here and credit goes to Jinx.
After weeks of anguish I have finally figured out how to disable the hot corner on Gnome 3 that has been the bain of my existence since switching to Fedora 15.
What's the problem with a Hot Corner?
Well if aren't familiar with Gnome 3 there is an Overview that allows you to quickly open programs and switch between currently open ones.
The hot corner is in the top left corner of the screen and activates when the cursor is in the (0,0) coordinate. The problem with the hot corner is that you often accidentally activate it when trying to click things close to the top left corner. It's also highly redundant since the "Activities" button there has the same functionality. Personally, when I want to use the Overview I just hit the super key (windows key).
The Solution
You need to modify the javascript backend for gnome panel. Yeah Gnome 3 is partly in javascript... You'll find the necessary file under /usr/share/gnome-shell/js/ui/. Next you want to open panel.js in your favorite text editor. I like Geany :P You'll need to find this line:
this._corner = new Clutter.Rectangle({ width: 1, height: 1, opacity: 0, reactive: true });
and modify it to say "reactive: false". This will disable the hot corner functionality without disabling Overview.
I found this solution here and credit goes to Jinx.
Monday, July 11, 2011
Success!!! kind of...
So I've got an interactive webpage made that dynamically generates buttons based on an xml file. It even updates on the fly with a drop down menu to switch between languages. One small problem though... the javascript I hacked together to make the pretty video popups is scanning the page before the other javascript has dynamically populated the page. So basically the video isn't working at all. Tomorrow I'll have to look at possible solutions. I think the best route is to actually get around to finishing jQuery-izing the video plugin. Then I can just attach a listener to a <div> and link it to the video proper. Luckily tomorrow is the Foss@Rit hackfest so I'll have plenty of time ^_^
Subscribe to:
Posts (Atom)

