Our minds cannot repel logic of that magnitude!
General
What if I were a Dwarf Fortress character?
Jan 20th
So this morning in the standard IRC channel that myself and a few friends troll throughout the working day in order to maintain sanity, a friend of mine promptly went into a craze, describing me as if I was a dwarf from the awesome game Dwarf Fortress and you had just examined me. This came promptly after I went into a rant referring to myself in the third-person complaining about the hassles of budgets and money. So this is, apparently, what I would say if I were in Dwarf Fortress and you inquired about my thoughts:
Jiffy has been irritated about money lately. He slept in a fantastic bedroom recently. He spoke to a friend recently. He was satisfied at work lately. He admired own fine Bed recently.
Jiffy is a worshipper of Freedomassurance the Constitution of the United States.
Jiffy likes Tungsten, video games, Lizzy, dogs for their loyalty and tentacle demons for their corrupt intentions.
Jiffy is quick to anger. He is somewhat reserved. He finds rules confining. He is self-disciplined. He needs alcohol to get through the working day. He likes working outdoors and grumbles only mildly at inclement weather.
Now, to be perfectly honest, all of this is perfectly describing of me – with the exception of liking tentacle demons for their corrupt intentions. That part I’m not too sure about. But all in all, great job, and kudos to thp!
Contact Form Issues
Jan 5th
Hello everybody! I just now noticed (and corrected) an issue with the contact form. Previously, I was not able to see any of your messages, or even who the messages came from, due to my not setting up the plugin properly. If you have ever sent me a message through the contact form (there’s only three of you), if you could please send your message again I’ll do my best to get back to you in a ridiculously fast manner!
Happy New Year!
Jan 5th
Well everybody! Since it’s been a while, here’s to doing what I do best: waiting months before giving anybody an update! So, here’s the update! It’s a new year (happy new year everybody, btw), and with a new year I usually decide to make a ton of changes, so here’s the game-plan!
This weekend I plan on getting the next release of the WordPress-SMF Bridge Plugin completed. This is a major bugfix release that was made possible by all the fine folks reporting issues with the plugin!
Secondly, most major categories are going to be split into subdomains that are going to act like separate blogs. Notably, my rounds through my new Dwarven Fortress, Beerdragon the Apex of Man, will be available for reading at dwarffort.jonnyfunfun.com, gaming-related posts will be available at gaming.jonnyfunfun.com, programming-related posts will be available at programming.jonnyfunfun.com, and the projects page will be forwarding you to my Google Code profile page and from there you will be able to choose where you want to go. Each of these subdomains will have a different look and feel about them (hopefully, if I can get it working) that is a bit more appropriate for the topic. The main site will also be receiving a facelift.
Now, on that note, changes to my website are not the only things coming down the pipe. On top of that, Vault Head Games is going to make a splash while we rigorously start working on our first iPhone app – so that website will be receiving some well-needed, and far over-due TLC. I will also be starting a new job on the 11th, which being less of a drive and better hours is going to provide much more time for me to actually keep this blog up and moving.
So, with all that, happy new year everybody, and let’s make a big splash here in 2010!
Flex 3: Forcing Numeric Sort of XML Data in a Data Grid
Nov 20th
Recently I’ve ran into some problems with AdvancedDataGrids in Flex with data loaded from a hierarchical data provider built from an XML object. When you try to sort on a column with numeric values, the data grid does not sort the values numerically. Instead it sorts them lexicographically. This is because Flex 3 treats all the attributes of an XML node as strings. So if you have an/some attribute(s) that is numeric amongst all of your nodes, Flex treats these as strings when sorting. It is apparently not smart enough to realize that the values are numeric and should be sorted as such.
Unfortunately, Flex doesn’t appear to provide an easy way to say that a certain column contains numeric values. A simple attribute of the AdvancedDataGridColumn element called valueType or something along those lines that you could simply say valueType=”Number” would be incredible, but that functionality does not exist. So what you have to do is write a sortCompareFunction for each of these columns. Well, if you have a bunch of different columns you would usually have to write one sortCompareFunction for each column.
That could get tedious and time consuming. Instead, declare the following function:
private function xmlDataGridNumericSorter(field:String):Function { return function (xml1:Object, xml2:Object):int { var diff:Number = ((Number)(xml1.attribute(field)) - (Number)(xml2.attribute(field))); return (diff > 0) ? 1 : ((diff < 0) ? -1 : 0); } }
What this function does is return a compare function that would compare the values of two XML node’s attribute (field:String). So what you do from there forth is loop over your columns that are numeric and do the following to each column, referenced in the example as col:
col.sortCompareFunction = xmlDataGridNumericSorter(col.dataField);
After that each of the columns you modified in this way will have a sortCompareFunction built to compare two XML nodes’ respective attributes numerically. Keep in mind with the above code that if your column’s dataField is prefixed with an at sign (@), which it very well should since you’re probably referencing an XML attribute, you will need to remove it when you are passing the dataField into the xmlDataGridNumericSorter function by adding .replace(“@”,”") after col.dataField.
I hope this helps people as much as it has helped me in the past few weeks!
A Simple Flex IRC Client
Nov 18th
For those of you who use Adobe Flex and IRC, the simple IRC client written in Flex that I use on The Brew Place is now available on Google Code and is released under the MIT License! Check it out here:
http://code.google.com/p/simpleflexirc/
More Adobe Flex and other projects are expected to make the migration to Google Code within the next few weeks, so keep yourselves posted!
Lots of things in the pipe – busted hand keeping it back
Nov 16th
Okay, so first thing is first – there’s a lot of things in the pipe that I haven’t gotten to announcing. Namely, my projects have been moved from their old Redmine-powered site, and they are now being hosted between GitHub and Google Code. They will be posted shortly with each of their individual details. Also in the pipe is another website of mine, followed closely by another project that has yet to catch the wind!
Now, on a rather grim note – what’s been holding most of this back? Well, a few weeks ago I busted up my hand really good. Now, it’s not in a cast, but what I do have is some really awesome damage to the muscles and ligaments. That means that typing is followed by a boatload of pain, almost promptly followed by painkillers, and this process will continue for, what the doctor says, up to three weeks. Lovely.
LANRails Website and now Unified Logins!
Oct 28th
So, with my slated date for LANRails’ beta launch (scheduled for this weekend – hopefully I can hit the date), I figured it was about time to set up an actual webpage for it. So, feel free to go to the new LANRails website: http://lanrails.jonnyfunfun.com/. LANRails will hopefully be fully functional by the weekend, and if so will be posted up on the LAN69 website (www.lan69.com) to run the signups and pre-registrations for my first LAN party since the purchase of the new house, scheduled for the second weekend in December.
Also coming with the LANRails website is unified logins! When you create a user on either the base website, or on the LANRails website, or any website part of my network (hereon dubbed the RicePaddy Network), you will be able to use that username and password amongst all of the websites! So, if you have registered here on my personal site, your username and password combination will work on the LANRails website and vice-versa. They’re also the same for the forums, which are active on the LANRails site.
Beginning my iPhone development…
Sep 18th
Well, I’ve finally broken down and done it. I’ve replaced my Windows desktop with a Mac, and now I’ve been sucked in to the realm of iPhone development. So if anybody has been wondering why it’s been a while since I’ve made a post – it’s because I’ve been spending my time working, being with the family, and developing for the iPhone. So keep your eyes peeled, because sooner than later, Vault Head Games is going to have a game on the App Store! More details to come soon!
Colloquy Mobile and ZNC – pushing even when I’m connected?
Aug 26th
Okay, so I recently picked up Colloquy Mobile for my iPhone so that I could stay connected to my IRC channels while I’m on the go. Now, since I do not own a mac (unfortunate, I know) I cannot run Colloquy itself, so using my desktop to send push notifications to my iPhone was not going to happen. As a result, I decided to set up a ZNC Bouncer and use the push module for ZNC that Colloquy provides. Everything went well, but I found one problem – even if I had my desktop machine connected to ZNC the module pushed notifications to my iPhone. That wasn’t cool. If I have some desktop IRC app connected to ZNC, I don’t want push notifications to my iPhone. So what did I do? I was a good programmer geek, and decided to make some mods to the module in order to get it working the way I wanted it to. Here’s what I came up with:
In colloquy.cpp (available here without my modification) around line 506, find the Push function:
bool Push(const CString& sNick, const CString& sMessage, const CString& sChannel, bool bHilite) { bool bRet = true; vector<CClient*>& vpClients = m_pUser->GetClients(); // Cycle through all of the cached devices for (map<CString, CDevice*>::iterator it = m_mspDevices.begin(); it != m_mspDevices.end(); it++) { CDevice* pDevice = it->second;
After the vector vpClients line, at about 510, add the following:
if (m_pUser->IsUserAttached()) { return false; }
The result should be the following:
bool Push(const CString& sNick, const CString& sMessage, const CString& sChannel, bool bHilite) { bool bRet = true; vector<CClient*>& vpClients = m_pUser->GetClients(); if (m_pUser->IsUserAttached()) { return false; } // Cycle through all of the cached devices for (map<CString, CDevice*>::iterator it = m_mspDevices.begin(); it != m_mspDevices.end(); it++) { CDevice* pDevice = it->second;
After making those mods, simply build the module, load it, and you will no longer receive push notifications when a client is attached to your ZNC bouncer! If you do not wish to modify the file yourself, it can also be downloaded from here: www.jonnyfunfun.com/pub/code/colloquy.cpp

















































