Kirsle.net logo Kirsle.net

Tagged as: Software

Text-Based CyanChat Client
October 24, 2008 by Noah
I was looking at my CPAN directory the other day and noticed that my CyanChat modules were poorly documented, to the point where if I was somebody else and didn't know about Kirsle's Perl CyanChat Client, I'd have no example code to reference to figure out how to use these modules.

So, I've decided to update the modules and add some better examples in its documentation. I also thought it would be nice to include a demonstration program for a CyanChat client. The distribution already comes with a sample server script, but none for a client. I didn't wanna include a bot though, because then CyanChat would have these bots entering the room from people testing the demo script, and nobody likes bots. And then, PCCC is a heavy program to include as an example script. So, I decided to make a new CyanChat client that would be light enough to work.

So, I've created a text-based CyanChat client:
Terminal CyanChat Client

The script is mostly standalone: just one Perl script that uses Net::CyanChat. And also Term::ReadKey, which is easy to install. It doesn't use Curses or any other terminal GUI toolkit: it's all plain old text and ANSI colors. I built in my own kind of buffer system, and any time the chat dialog (or typed message prompt) changes, the window is cleared and redrawn from top to bottom, keeping track of how many characters and lines are being written so that it cuts off the buffer directly at the bottom of your terminal. And it works no matter what your terminal's dimensions are.

More screenshots:

Intro
The main menu screen, changing the CC host back to using port 1812 (I used 1813 as the default port number for development purposes).

Chatting
The CyanChat client in full operation.

Update: It works on Windows too (to much amazement as the command prompt completely sucks):

Win32 Console

Tags: 2 comments | Permalink
Favicon Generator
October 15, 2008 by Noah
Dynamic Drive has one, and now I do too: a Favicon Generator. It's a lil CGI application that takes an uploaded image and converts it into a Win32 icon file, specifically the 16x16 resolution variety that are used as favorites icons for websites.

Dynamic Drive's was cool and I've been using it thus far to generate all my favicon files (and some regular icons for use in some of my software like PCCC and ErrorGen), but my generator 1up's that by also being able to include 96x96 resolution icons (Windows Vista size).

To those curious, I mainly used the Perl modules GD and Imager to manipulate the uploaded image and save it as a Win32 icon. I won't give out the code behind my favicon.cgi though because it's really not that hard to figure out just from the manpages of the Imager module (see Imager::File::ICO).

Tags: 0 comments | Permalink
New Terminal Utilities Uploaded
October 6, 2008 by Noah
I've uploaded a couple of new terminal utilities that some people might find useful.

sayto is a wall-like program I wrote at work which acts like wall but only broadcasts the message to a single user (instead of to every user), and takes care not to broadcast to any terminals that are running VIM, or any other process besides plain old bash (or other shells).

kbackupd is a backup daemon script I wrote for my web server. Others might find it useful so I've provided it for download.

Check them out on the Terminal Utilities page.

Tags: 0 comments | Permalink
Tk::StyleDialog
September 18, 2008 by Noah
Since there was enough interest in my two-year-old program, ErrorGen, I've created a Perl/Tk module that does basically what ErrorGen does.

Here's a screenshot:
Synopsis

It's only a module so far that can be included in other Perl/Tk applications. But it's one very large step closer to me creating a simplified tool to spawn error boxes which could be provoked from batch files or scripts. It will probably have a syntax similar to the GNOME program, Zenity.

CPAN takes a few hours to index module updates but the new module will be available at Tk::StyleDialog on CPAN.org.

UPDATE: I've thrown together a quick program called ZenMsg (a name derived from GNOME's Zenity, but since my program only does dialog boxes, it's called ZenMsg).

I've added it as a new tab to the ErrorGen page. Let me know if it can be improved. I had to use ActiveState PerlApp to compile it because PAR::Packer (which I usually prefer to use) was giving me trouble and I didn't have the time or motivation to setup a clean new compiling environment for it. PerlApp may be a bit too limiting.

Tags: 0 comments | Permalink
Software Tabs
August 11, 2008 by Noah
All there is to report is that a few bugs in the software pages (specifically, the ones that use the new tabbed system) have been fixed. On Windows + Internet Explorer, clicking a tab would unfocus the IE window (bringing whatever window is next on your Alt+Tab list to the front of your screen, but keeping IE as the active window, so you had to click off the IE window and back onto it to see the page again).

It turned out I was calling a blur() method on a variable that wasn't actually there, so on Windows IE it defaulted to the browser window. The intention was to remove focus on the hyperlink so that the dotted border wouldn't remain when clicking the tab.

Also, a small tweak in the style sheet means that the tab borders don't intersect through the top of the selected page.

Tags: 0 comments | Permalink
Forum Spambots
July 8, 2008 by Noah
There's a retarded new breed of forum spam bot crawling the web lately. Unlike the spam bots that try to stuff posts full of links to virus-ridden websites, these bots just seem to register and say things like "Nice site! Where'd you get it?"

The RiveScript.com YaBB forum has gotten at least two of these low-hanging spam bots recently. I modified the YaBB source to try and stop these things from being able to register by employing some of the same techniques that keep Cuvou.com safe from "dumb submitter bots" and we'll see if that helps...

Remind me to write a big long article about spam bots and how to fight them. I have some pretty good techniques that seem to work quite effectively but I currently don't have the motivation to write about them at this point in time.

Update: I've written an article about stopping dumb submitter bots: Trapping "Dumb Submitter Bots".

Tags: 0 comments | Permalink
New Software Pages
June 12, 2008 by Noah
I've come up with a new design for my software pages. The 4 pages under the Software heading on the navigation bar use the new page style so far. I'll work on the other ones later.

Basically, I went with a tab approach. Instead of having EVERYTHING be all on a single page, they're divided up into tabs. JavaScript tabs, so clicking from tab to tab is instantaneous. Users without JavaScript will just get a normal hyperlink to a new page where their selected tab is visible.

Also they're getting their own 400x90 pixel logos. So I think the pages are a little more fun now. :)

Tags: 0 comments | Permalink