Archives for 2007

Unofficial Gnash 0.8.1 build for Win32

Back in July, I ranted about Flash and mentioned Gnash, the GNU Flash movie player. Since then, I’ve gotten into the source and have been working on producing Win32 builds Gnash. You can try these unofficial builds out, if you’re interested:

As of this moment, 0.8.1 is the latest release. Everything “works” although not very well (jittery sound, etc.) — it’s a great start, though.

To get started, just unzip the archive into your Program Files directory–the archive contains the files in a Gnash subdirectory. There’s no self-executing installer for Win32 yet, nor have I built the npgnash.dll browser plugin for Win32, either. I’ll work on those for a future release.

I just discovered that on Win32 in MSYS and/or Cygwin, executing fltk-gnash.exe with no arguments gives you program usage output but under WinXP’s cmd.exe, you get nothing. So, here’s the text you should have gotten from the 0.8.1 build:

Error: no input file was specified.

usage: gnash [options] movie_file.swf

Plays a SWF (Shockwave Flash) movie
options:

  -h, --help    Print this info.
  -s <factor>   Scale the movie up/down by the specified factor
  -c            Produce a core file instead of letting SDL trap it
  -d num        Number of milliseconds to delay in main loop
  -v            Be verbose; i.e. print log messages to stdout
  -va           Be verbose about movie Actions
  -vp           Be verbose about parsing the movie
  -m <bias>     Specify the texture LOD bias (float, default is -1.0)
  -x <id>       X11 Window ID for display
  -w            Produce the disk based debug log
  -j <width>   Set window width
  -k <height>   Set window height
  -1            Play once; exit when/if movie reaches the last frame
  -g            Turn on the Flash debugger
  -r <0|1|2|3>
                0 disables both rendering & sound (good for batch tests)
                1 enables rendering & disables sound
                2 enables sound & disables rendering
                3 enables both rendering & sound (default)
  -t <sec>      Timeout and exit after the specified number of seconds
  -b <bits>     Bit depth of output window (16 or 32, default is 16)
  -u <url>      Set "real" url of the movie
                (useful for downloaded movies)
  -U <url>      Set "base" url for this run
                (used to resolve relative urls, defaults to movie url)
  -P <param>    Set parameter (ie. "FlashVars=A=1&b=2")
  -V, --version Print gnash's version number and exit

keys:
  CTRL-Q, CTRL-W, ESC   Quit/Exit
  CTRL-P          Toggle Pause
  CTRL-R          Restart the movie
  CTRL-[ or kp-   Step back one frame
  CTRL-] or kp+   Step forward one frame
  CTRL-B          Toggle background color

Feel free to give the 0.8.1 binaries a try–I’d love to hear how it works for you.

Tags: , , ,

del.icio.us/dossy links since September 3, 2007 at 09:00 AM

del.icio.us/dossy (RSS) links since September 3, 2007 at 09:00 AM:

Cracking the monthly nut

Every month, it pains me to see how much I pay to various companies for an assortment of poorly delivered services, which cost way too much. Sure, I probably have a large cost-of-living footprint, but with some clever lifehacks and more frugal alternatives, I’m betting there’s a way to decrease that footprint without sacrificing much quality of life. The first step is, of course, to take a look at where all the money’s going …

Verizon: $86/mo

$86/mo to Verizon for local and international calling on 3 landlines. Two of those landlines are for Panoptic, one for voice and the other for faxes. The third is the house phone.

One easy way to save $9/mo would be to eliminate the fax line. Currently, I’ve got a fax modem connected to it and use HylaFAX as a fax server and JHylaFAX as a client. I already have a VoIP DID through Junction Networks which I haven’t done much with, except for set up Asterisk to test that it works. I should spend some time getting faxing to work on Asterisk if it’s possible, then get rid of the dedicated fax line.

I could similarly get Asterisk fully set up to answer voice calls as a proper automated attendant/IVR and let it ring-through to my cell phone. I’m paying $9/mo for the Panoptic voice line as well as $8/mo extra for Verizon’s voicemail service. This would be a way to save $17/mo.

Of course, I’d really be saving slightly less, since the DIDs through Junction Networks cost $2/mo each and $0.029 a minute. But, the $8/mo for Verizon voicemail would be the same as a $2/mo DID and 200 minutes a month, which is probably a lot more than I actually use right now.

MCI: $38/mo

$38/mo to MCI for long distance and a toll-free number for Panoptic.

I rarely use US domestic long distance–almost all our long distance calling is international, either to England or South Africa. I picked MCI because it had the lowest rates of the major telcos: for $4/mo, you get the MCI Global Connection calling plan, with $0.07/minute to England and $0.39/minute to South Africa.

The toll-free number costs $5/mo and currently rings into the voice landline. Ideally, I’d get Asterisk set up and have it ring into that.

Cutting costs here might be tough, as my wife is the one who does the international calling and getting her to use a PC-based softphone could be difficult. However, Skype’s international rates to South Africa–$0.068/minute to landlines and $0.233/minute to cellphones–might just be worth the trouble.

Cingular: $155/mo

$154/mo to Cingular for 1,000 shared minutes between two Treo 650’s, including two unlimited PDA data plans at $39.99/mo each and 1,000 text messages at $9.99/mo.

It is mind-boggling that I ever agreed to pay this much for such lously cellphone service. It’s amazing what poor quality we, as consumers, will tolerate. In the 1990’s, the memorable tagline was Sprint’s “so clear, you can hear a pin drop” to Verizon’s “can you hear me now?” The jitter and lag on your average cell-to-cell call is so dramatic that I’d rather text someone than try to make out what they’re trying to say in between entire dropped syllables.

While the shared roll-over minutes between the two phones guarantee that we’ll never exceed our minutes, Cingular’s policy that each phone has to have its own $39.99/mo unlimited PDA data plan is a rip-off. Based on this past year’s usage, it seems that I average 30-50 MB of usage per month, while my wife usually stays under 10 MB. Effectively, I’m paying $0.80/MB for mobile bandwidth while my wife pays $4/MB. Cingular’s data plan pricing for PDA’s is insane.

I guess as long as we want to keep our Treo 650’s and have unlimited data plans, we’re stuck paying this outrageous price. Perhaps its time to upgrade to the iPhone–although whatever we’ll save per month will be spent on buying the phone. Two iPhones on the family plan will cost $109.99/mo. a saving of $45/mo. But, at $800 to purchase the two iPhones, it’ll be 18 months before it pays for itself. Sigh.

DirecTV: $63/mo

$63/mo to DirecTV, so that we can fill our TiVo with crap to watch.

Fortunately, we bought the Series 2 TiVo with a lifetime subscription for $300, but figuring on a 5-year life span on the thing, it’s effectively $5/mo. I can live with that.

However, considering all the trouble we’ve had lately with the shoddy DirecTV receiver–we’ve had the receiver replaced, and are on our second new access card–I’m really starting to see if we’d save money switching to Optimum Online. Unfortunately, the reason why we went with DirecTV in the first place is because Cablevision totally screwed us around on our install order–the installer was over 3 hours late and showed up without the necessary equipment to do the actual install–so we cancelled the install and went with DirecTV.

***

So, do you see any ways I could shave these monthly costs down? Without simply cancelling these services and “doing without”? Share your tips in the comments below!

Tags: , , , , , ,

jQueryCamp07, in Boston on October 27th

John Resig, the creator of jQuery, just blogged about jQueryCamp07, to be held in the Boston/Cambridge area on October 27th, 2007. I’m going to try and attend and if you’re in the northern NJ area and want to travel together, let me know.

Tags: , ,

Congratulations, and thanks, Russell

I’m busy working this weekend, but my wife and children are down in Delaware in support of my brother-in-law, Russell. Tomorrow, he will be stepping down from his position as Wing Commander of the Delware Wing of the Civil Air Patrol (CAP).

Over the years, he has volunteered an enormous amount of time and effort to the organization. He has received a number of awards–most recently the Daily Point of Light No. 3547 from the Points of Light Foundation, which goes into greater detail about Russell’s accomplishments.

It takes a very special person to give so much of himself as Russell has. The CAP is a valuable organization and has benefitted greatly from his contributions. Through his generosity, all our lives have been affected for the better.

Even though I can’t be there tomorrow for your Wing Change of Command ceremony, congratulations and thanks for everything you’ve done and continue to do.

Tags: , ,

Google Reader (finally) gets search-within-subscriptions

Back in April 2007, when I decided to switch over from Bloglines to Google Reader for my RSS reading pleasure, I made a point to complain about the fact that Google Reader had no easy way to search for entries within your subscriptions. The good news is apparently that all changed, yesterday: Google Reader now has a search box!

Google Reader gets a Search box!

This is good news, since that was pretty much the only feature I’d actually missed when I gave up Bloglines. It’s good timing on Google’s part, since the latest Bloglines beta UI improvements have really closed the gap–although I’m not happy enough with them to consider switching back, yet.

Tags: , ,

Planet AOLserver, aggregating AOLserver-related feeds

In the grand scheme of “why does Dossy go off and do things without asking people first” … I’ve set up Planet AOLserver:

http://dev.aolserver.com/planet/

The current subscriptions list is populated with the feeds of blogs I’ve been able to find over the years of people who have blogged about or use AOLserver in one way or another. I’m betting the list is incomplete: if you’d like your feed added to the subscriptions list, please email the URL to me. Similarly, if your feed appears on the list and you’d like it removed, just ask me to remove it.

I’m using a simple regexp filter to pick out (hopefully) only the relevant entries:

filter = (?i)(AOLserver|Tcl|OpenACS|MySQL|PostgreS(QL)?)

Think something should be added to the filter? Is there an entry in your feed that you think should be included in the Planet but isn’t? Again, let me know and I’ll try to fix it.

Tags: ,

del.icio.us/dossy links since August 27, 2007 at 09:00 AM

del.icio.us/dossy (RSS) links since August 27, 2007 at 09:00 AM:

tcl-mysql-udf 0.2 and Win32 DLL binary

Last week, I released some code that would enable MySQL to evaluate Tcl scripts as a stored function, which I called tcl-mysql-udf. My friend Steve asked if I could prepare a Win32 DLL binary for him, so I worked on that tonight and am releasing version 0.2, along with the DLL:

In order to play with this, you’ll need the following prerequisites installed:

  • MySQL (I’m testing on 5.1.21-beta)
  • Tcl (I’m testing on 8.4.15.0)

Inside the tcl-mysql-udf-0.2-dll.zip will be the file tcl-mysql-udf.dll. On MySQL 5.0.x, it expects it to reside in the Program Files\MySQL\MySQL Server 5.0\bin directory, so copy it there. On MySQL 5.1.x, however, it expects it to be in the Program Files\MySQL\MySQL Server 5.1\lib directory. Pay close attention to what version of MySQL you’re using and the correct directory to copy the DLL into.

Once you’ve got everything installed and copied to the right locations so far, connect to your MySQL database with your favorite MySQL client, and issue the following command (you only type what’s in bold):

mysql> CREATE FUNCTION TCL RETURNS STRING SONAME 'tcl-mysql-udf.dll';
Query OK, 0 rows affected (0.10 sec)

We can check what version of Tcl we’ve loaded this way:

mysql> SELECT TCL('info patchlevel') AS script;
+--------+
| script |
+--------+
| 8.4.15 |
+--------+
1 row in set (0.04 sec)

Here’s a goofy example of storing Tcl scripts in the database and having MySQL evaluate them:

mysql> CREATE TABLE code (
n INT NOT NULL AUTO_INCREMENT,
script TEXT NOT NULL,
PRIMARY KEY pk_code (n)
) ENGINE=MyISAM;

Query OK, 0 rows affected (0.20 sec)

mysql> INSERT INTO code (script) VALUES
('set x 123'),
('expr {$x + 432}'),
('clock format [clock seconds]'),
('incr x [clock seconds]'),
('expr {$x * rand()}');

Query OK, 5 rows affected (0.04 sec)
Records: 5  Duplicates: 0  Warnings: 0

So, we now have a table with five rows in it, each row containing a Tcl script. We can have MySQL evaluate those Tcl scripts like this:

mysql> SELECT n, TCL(script)
FROM code
ORDER BY n;

+---+---------------------------------------------------+
| n | TCL(script)                                       |
+---+---------------------------------------------------+
| 1 | 123                                               |
| 2 | 555                                               |
| 3 | Fri Aug 31 12:41:25 AM Eastern Daylight Time 2007 |
| 4 | 1188535408                                        |
| 5 | 6935485.39171                                     |
+---+---------------------------------------------------+
5 rows in set (0.05 sec)

So what, right? How about fetching HTML documents via HTTP, right from within MySQL?

mysql> CREATE TABLE urls (
n INT NOT NULL AUTO_INCREMENT,
url VARCHAR(255) NOT NULL,
PRIMARY KEY pk_urls (n)
) ENGINE=MyISAM;

Query OK, 0 rows affected (0.03 sec)

mysql> INSERT INTO urls (url) VALUES
('http://dossy.org/'),
('http://aolserver.com/'),
('http://njgeeks.org/');

Query OK, 3 rows affected (0.00 sec)
Records: 3  Duplicates: 0  Warnings: 0

mysql> SELECT n, url, TCL(
'package require http;'
'set url [lindex $args 0];'
'set token [http::geturl $url];'
'set data [http::data $token];'
'http::cleanup $token;'
'regexp -all -inline {<title>.*?</title>} $data',
url) AS script
FROM urls
ORDER BY n \G

*************************** 1. row ***************************
     n: 1
   url: http://dossy.org/
script: {<title>Dossy's Blog</title>}
*************************** 2. row ***************************
     n: 2
   url: http://aolserver.com/
script: <title>AOLserver</title>
*************************** 3. row ***************************
     n: 3
   url: http://njgeeks.org/
script: {<title>NJ Geeks | - New Jersey's IT Community</title>}
3 rows in set (1.54 sec)

This query uses the Tcl “http” package to fetch the documents specified by the url column and plucks out the <title> tag using a regular expression. The TCL() stored function takes a variable number of arguments, the first being the Tcl script to evaluate, followed by zero or more arguments that are placed into the $args Tcl variable. In this case, we pass in “url” so that on each row, we execute our Tcl script with the value from that row.

Be aware that this stored function is a security issue: allowing database users to execute arbitrary code has obvious risks, especially since that code will be executed as the user that the MySQL server is running as.

Hopefully this is enough to get you started and might even give you an idea as to how this could be useful to you in some way. If you have any questions, just leave them in the comments below.

Tags: , , ,

libpurple patch to extend the purple::cmd Tcl command

As of Pidgin 2.1.1, the Tcl plugin can only register and unregister commands using the purple::cmd Tcl command. However, without the ability to execute commands, it’s pretty pointless. So, here’s a patch to add the subcommands “do”, “help” and “list” to purple::cmd. I’ve submitted this as Ticket 2873.

If you’d like to try this out, here’s a Win32 build of tcl.dll for Pidgin 2.1.1 after applying this patch:

Just extract that into your Program Files\Pidgin\plugins directory, after making a backup copy of your old tcl.dll, of course.

If you have any questions about or concerns with this patch, let me know in the comments below. Thanks!

Tags: , ,