Cookie Notice

As far as I know, and as far as I remember, nothing in this page does anything with Cookies.


Namespace Corruption... [FAIL]

RScript - -- Auction software

RScript - -- Scripting interface to the R statistics software.

Rscript - -- Package for scripting on a remote host.

And I'm sure there's more.


Exercising futility ...

Run within R, it works. Run from, it doesn't. Why?

jacoby@oz:~/Desktop$ cat

use 5.010 ;
use strict ;
use warnings ;
use Carp ;
use Cwd ;
use File::Copy ;
use Statistics::R ;

my $cwd = getcwd ;

my $R = Statistics::R->new( ) ;
say 'starting R' ;
$R->startR ;

while ( ) {
chomp ;
my $line = $_ ;
next if $line =~ m{^q}mx ;
say $line ;
$R->send( $line ) ;
sleep 1;

$R->stopR() ;
say 'stopped R' ;

jacoby@oz:~/Desktop$ R

R version 2.7.1 (2008-06-23)
Copyright (C) 2008 The R Foundation for Statistical Computing
ISBN 3-900051-07-0

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> png(file="~/Desktop/plot.png")
> plot(pressure)
> postscript(file="~/Desktop/")
> plot(pressure)
> jpeg(file="~/Desktop/plot.jpg")
> plot(pressure)
> q("no")
jacoby@oz:~/Desktop$ ./
starting R
stopped R
jacoby@oz:~/Desktop$ ls plot.*
plot.jpg plot.png
jacoby@oz:~/Desktop$ "It works from R but not via Statistics::R. It does not make sense."
It works from R but not via Statistics::R. It does not make sense.


Kill Your Television

The House blocked the Digital TV Delay.

I live roughly 1/3 of the way between Indianapolis and Chicago. Since I moved here in 1993, I have, at best, only received one channel, the CBS station. Even that didn't come in well sometimes, even when my parents-in-law lived in the shadow of the broadcast tower. Before that, I lived in South Dakota, with only the in-town PBS channel coming in clear. Campus provided cable to the dayrooms. So, here, in 2008, it has been all 20 years of since I had to rely on over-the-air broadcast rather than cable.

(OK, I get satellite at home today, but for purposes of this discussion, that counts as cable, OK.)

And that's not the whole of it. I think I was in St Louis in 1985 when I last really watched broadcast. JoAnne Worley singing "You'll never be able to own your own telephone" from Rowan and Martin's Laugh-In in syndication, with Sports Illustrated giving away free football phones with a subscription between bits. That was the last time I watched TV over the air. And even then, we had cable, too.

I am fairly sure that I am not remotely alone here. I am sure that, even in places where there are many broadcast channels in range, most people pay for more channels. They pay to get news on demand with CNN or Fox News, to get weather on demand with the Weather Channel, to see grown men covered with muck or destroying stuff on the Discovery Channel, to get music bitchy and annoying people on demand from MTV.

The coming of TV killed radio. My suspicion is that the analog-to-digital switch will kill over-the-air video, and the difference between cable->settop box->TV screen and cable->computer->monitor will decrease even more as time goes on.

I do not understand why anyone would pay to get a digital converter box.

It is my prediction that broadcast (from digital over-the-air to digital over-cable, "everyone having to watch this show at 8pm Thursday") will be dead by 2020, given way to streaming or podcasting models.

So, when I find that the House blocked the Digital TV Delay, I range between "good for them" and "who cares?" I respond to digital broadcast TV with words I first heard from a Gallagher special on Showtime in the mid 80s: "Don't you wish there were a knob on the TV to turn up the intelligence There's one marked 'Brightness,' but it doesn't work."

My question is about the frequency range it vacates. What's going in there?
An important benefit of the switch to all-digital broadcasting is that it will free up parts of the valuable broadcast spectrum for public safety communications (such as police, fire departments, and rescue squads). Also, some of the spectrum will be auctioned to companies that will be able to provide consumers with more advanced wireless services (such as wireless broadband).
Am I way to cynical to think that the "Also, some of the spectrum will be auctioned off" is much more of a pusher for this technology than the "public safety communications"? If it means I get to have decent-speed bits of info flying to a hand-held gizmo I can shove in a pocket, then I'm all for that cynicism.

My friend Patrick has an idea for TV to be an entirely pay-for-play proposition. You want to watch a guy travel the world to find new and exciting ways to get covered with grease and animal dung? You subscribe, you pay $20 a year or so, said host travels the world, gets messy, and releases video. DRM-free video. You watch it. You maybe send an episode to a friend, who also pays $20 a year or so. I am not sure that will play. No. I'm not sure when that will play. I've seen interviews with Joss Whedon where he played with the possibility of new, fan-supported Firefly episodes before shooting it down. Thing is, this is pre-Dr. Horrible's Sing-Along Blog, which, beyond being something to do during the Writers' Strike, was pretty much an experiment on how to do a fan-supported internet video show.

My current hardware desire (besides memory! always more memory!) is a PCI HDTV card, so I can tell my PC what I want to watch and watch it when I want to watch it, where I want to watch it. This is the failure of DVRs that I see. I have 4 TVs in my home. All four have cable boxes, but only one had a DVR. It is in a room I hate to linger in, so I never get to watch it and never get to record from it. This way, my cable becomes like my podcasts, which is how I want it. I am fairly sure that I am not remotely alone here, either.


Making Plans...

This is a fairly random and disconnected post, more me making notes to prioritize my week's computing than anything else. This is part of the reason nobody reads this blog. B)

1) I'm liking trash-cli. I just emptied my trash can with empty-trash for the first time. I am considering adding it to my crontab, either daily or weekly. Thanks to my huge disk at home, space concerns are no longer urgent, though.

2) Must find a source package for the Gnome Window Selector, as Window Selector is the only thing I know of that knows the currently focused window. Once I have that power, I can combine it with wmctrl to gain WinSplit-like powers.

No wonder Randall Schwartz calls himself Merlyn. No wonder the book on early computer networking is called Where Wizards Stay Up Late. Programming is like magic, and when you have the source, you can add spells to your spellbook and change them to make them more powerful.

3) Planning a complete restart to my CSociety web page. Archiving the old stuff right now.

4) R. Also copying a huge data set to the local machine right now. Genomics data be huge. Part of my next trick is to graph contigs, and I'd rather have Perl do as little as possible in that process.

5) Remember last year how this guy made a Perl script to display the current weather on an HP printer? Purdue Weather is a twitter feed I put together that works from the same data. I'm the only follower of the feed, which seems like a shame. I'll have to talk about it here sometime, now that I have syntax highlighting together.


Using trash...

How easy is it?

sudo apt-get install trash-cli

Just that easy. Isn't Ubuntu wonderful?

The commands?

trash — Throw that file away.

list-trash — Show what's in the trash directory.

restore-trash — Take something out of the trash directory.

empty-trash — Finally toss that stuff away.

As a suspicion, I guess I will never really use the last three, the graphical equivalent being enough for me, but killing files? That's always been a command-line thing for me.


Reconsidering del...

It exists already.

In Python. Which is OK. Not my choice, but it works.

I could be wrong in my reading of The Spec, but my interpretation is that Gnome now follows the specification.


If I set an environment variable, $XDG_DATA_HOME, to $HOME/.local/share/Trash, I think I'm mostly there.

But I'm fine for using the normal graphical means to empty and recover trash. I'll try it and get back to you.


Considering del ...

Here is a shell-script replacement for rm. As you know, rm just kills a file or directory outright. Often this is what we want. But every windowing system I know uses an intermediate Trash Can, a place to store your deleted files in case you say "No, I really wanted that directory full of L0Lcats".

So, the question is, how do I get that functionality in your command line? They call it del, but I prefer trash, as del on Windows doesn't put it in the Trash Can, it blows it away.

Anyway, the code:

# !/bin/bash
mv -vi -- "$@" $HOME/.Trash

Problems. When I tried this, the file was moved to .Trash, because there was no .Trash dir. Why was there no .Trash dir? Because with Ubuntu Intrepid (and I have no idea when things changed), the Trash dir is $HOME/.local/share/Trash/. Specifically, there's $HOME/.local/share/Trash/files/, which holds the actual files and directories, and $HOME/.local/share/Trash/info/.

Let me show you a sample *.trashinfo file.

[Trash Info]

For each file and directory in the files directory, there's a .trashinfo file saying when it was deleted and where it restores to. So, obviously, the del/trash script is not up to the task of today's Gnome trashing. But what to do about it? More later, as I consider the problem set.

Testing A Syntax Highlighting Widget...

And it works!

I was considering making a thing that highlighted syntax and made pretty code samples. As this is my coding blog, I considered that essential.

Then I thought about code reuse and wheel reinvention, and I started looking for syntax highlighters.

Damien of Damien Learns Perl (which is a perfectly fine thing to blog, by the way) pointed me to FaziBear's Syntax Highlighter, as well as the code to add to make it work for Perl.

Thank you all.

I just typed "Thank you wall". So, thank you too, Larry Wall, for creating Perl in the first place.


use 5.010 ;
use IO::Interactive qw{ interactive } ;
use Net::Twitter ;

my $user = 'Ha!' ;
my $pass = 'DoubleHa!' ;
my $status = join ' ', @ARGV ;

#There's a hard limit on the size of twits
#$status = substr $status , 0 , 140 ;
if ( length $status > 140 ) {
say { interactive } 'Too long' ;
exit ;

say $status ;

my $twit = Net::Twitter->new( username => $user, password => $pass ) ;

if ( $twit->update( $status ) ) {
say { interactive } 'OK' ;
} else {
say { interactive } 'FAIL' ;

This is a simple command line Perl program that posts to Twitter for you. I like graphical things for displaying my feed, but for writing, it's often more convenient to go to one of my dozens of terminals running bash and typing I\'m twittering from work right now. or maybe | .


Having slain my foe...

I win at Catalyst.

OK, the next level boss, Authentication, looks to be tough, and the final boss, Running-Via-CGI-Instead-Of-The-Sandbox, scares me.

But I have beaten Join.

I have beaten Join!


Carrying Things...

Ever heard of the acronym EDC? It means Every Day Carry. It's my understanding that this specifically comes from people with concealed carry permits for handguns. If you need your gun enough to get a license to conceal it, you must need it every day, so thus ...

This is my phone. A Motorola K1M. I'm sure I got it free-to-cheap when I got it. It has a phone, a camera (both pics and vid), texting, an MP3 player. It holds a MicroSD card, so I can put things on it and take them off as needed. I rock Verizon, which means that they have it locked down so I can't do the kind of Bluetooth connection and phone-as-thumbdrive stuff that I would sincerely love to do.

My current plan/hope/dream is getting a Palm Pre, not because it's all cool and iPhone-y, but because I could (theoretically at this point) run it without changing services, and 2) because I could run abstract code (meaning code I write!) on it. Of course, that's theoretically true of the iPhone and Android. Of course, none of them are specifically coming to my provider, Verizon. This makes me sad.

The best piece of swag I ever got, a Leatherman Pulse. I use this all the time. There are better screwdrivers, better files, better pliers, better knives, better scissors, but it is useful to carry them all together all the time.

In my wallet, I carry many picks, from the Big Stubby to the Fender Medium. My favorite is the Clayton Gold, but you don't see them. My very very close second favorite is the Dunlop Ultex, the ones with the Rhino on them. To me, it's not a pick unless it's 1mm thick, and this is.

Little black spiral notebook. Spiral is good, because there's the space in the spiral to put the pen. Which is a Spiral G2 gel pen, which is the smoothest and coolest feeling pen I ever wrote with.

Dr. Dobbs Journal Fail ...

10 years of The Pearl Journal? The Pearl Journal? When you got it right in the next line?


I Am Curious (Yellow) ...

Or, rather, my monitor is.

Yellow, that is.

My Win7-running test PC has an AGP slot. I have never run anything in the AGP slot. I now remember why. Because it sucks. I'm running much better than 640x480. I'm fully capable of hitting 1600x1200. But in yellow.

Which is my hardware's fault, not Windows 7.

I'm thinking about a statement I once made. You don't need 3D acceleration to run a window manager. Yet.

It said it wants hardware acceleration to bring out all the glory and wonder that is the game Minesweeper. And again with Mahjong. Ye gods.

Well, my hardware is old and crappy. I know this. But I think that, when we start considering 3D graphics for the window manager, I should stand athwart yelling stop.

Until, of course, I get better hardware and get Compiz running.

Also, should we start calling it Windows System Seven?

Aww. Why not?

Walking through a new application...

Ever heard of Winsplit Revolution? It's a downright cool tool that automatically places your windows. Coding Horror pushed it, and I've since found it very useful, especially on the 24+" monitors at the former workplace.

But now I work on Ubuntu machines. And I get big, confused window placement. But I see a way out.

  • Consider Window Selector. You can know what the current window in focus is.
  • Consider wmctrl. You can tell it to move or resize a window, and it does it. From the command line, so it might as well be from anywhere.
  • You can bind keys to functions. That's easy.

    So, given that each of these things is doable, it should be doable to take A) the current window in focus and B) tell Gnome (or rather Metacity, or whatever WM you use within reason) to move and resize a window to this corner by C) hitting a certain key combination.

    But I do not, as of yet, know how to make this happen. But I will post here as I learn.
  • 2009/01/13

    Rounding up ...

    It seems that BeOS lost the CDROM during the process of installing on VirtualBox. Sucks.

    Been looking at Subversion. Someone, I thought it was Coding Horror but I can't find it right now, said there are four essential tools for a programmer: language, editor, bugtracker and revision control. The first two are the subject of many rounds of verbal sparring and not-entirely-rational attachment, while the second two are largely ignored. In most of the places I've worked, revision control is handled via the huge main system backups entirely, and bug tracking is done through your email queue. These, I am sure, are common ways of handling things. I am also sure they approach the categorization "dangerously stupid".

    But, as they say, the first step is to admit you have a problem.

    I'm Dave, and there's no significant RCS system on my resume.

    That's no longer quite true. This summer, I worked with Synergy. Which sucks the dust bunnies you find in long-neglected machines. But I still find this to be a problem.

    One I can easily rectify. I just installed Subversion on my work machine, but I can't help wondering if I'm doing it wrong. If they say file:///path/to/repository/, this gives little indication whether you should be using file:///home/me/path/to/repository/ or file:///home/me/path/to/.repository/ or file:///var/path/to/repository/ or what. So, any useful advice from those with great amounts of Subversion experience would be helpful.

    So, Ray Kurzweil wrote many things about the year 2009, back in 1999. What? Too long. Didn't read. But there was a deal on Slashdot about it. With comments. In a nutshell: Ray thought that we'd be all about the voice activation by now. Some think it would be a clear boon, and that many things, even programming, would be made easier. Others thought that programming would be the last thing to be voice-activated. I opined. I do this. This is what I do.
    Programmers won't even go for proportionally-spaced fonts.
    Go ahead and follow. In response, someone didn't notice I have a four-digit Slashdot ID and just might know a little bit about programming.

    There are a few interfaces where people have tried to make programming graphical. I've seen one or two windowing macros, and there's a picture-drawing IDE for mashing up web stuff. I forget the name. There's been some success, but all minor at best. There's one tool I've worked with, MatrixX, that takes pretty graphical tools and turned it into C++ code. You can't modify your code, you can just modify the graphics, which renders the code. This makes debugging a bear, I can tell you. It works for how some people work, but if the plotter's broken, it's hard to read your program, and you just cannot grep proprietary image formats, so finding out where you need to debug? Sucks.

    One of the comments said that I was posting in jest, and that programmers pick up tools that are useful to them. Well, sure, I guess. Except studies show that you can type faster with Dvorak keyboards and they're still rare as hen's teeth. And despite the complexities and a raft of new, young and limber editors, vi and emacs are still the number-one contenders.

    I can see a case for limited voice programming. There's a scene in ST:TNG where Geordie is working out a problem. I for get what, but basically, there's something he's looking for that the sensors don't normally sense. So, looking at it one way, he's having a conversation with the computer, but looking at it another way, he's doing a series of command-line queries into a database and piping the results through filters, but with his voice. I could see some variation of this becoming workable, if only because it was on Star Trek. I mean, we got our communicators, didn't we?

    But using the voice equivalent to a bash shell is not the same as deep programming, and I cannot imagine voice being the primary interface for programmers. You can't grep WAV files much easier than proprietary image formats. I am sure that programmers will keep desktop machines long after it's a dead thing for everyone else, because it works for that purpose. I'll say that in 2019, we'll have entertainment centers where it's impossible to tell where the difference between the phone and the TV and the computer. Broadcast and cable will be all but dead in favor of on-demand programming. Ear-conducting telephone earrings that can do videoconferencing with the webcam in your watch and can understand fairly complex voice commands. And computer programmers will sit, maybe with many large screens, and type into vi.

    Grading the Win7 Beta...

    I like the fish.

    The UI looks OK.

    Or at least it would. I can't better than 640x480x16bit, and nothing looks good at 640x480x16bit.

    They have integrated "Clear the screen" into the alt-tab, which is cool. But small fonts rendered big look bad. It networks, it seems OK, I might trust it on my family PC, but seriously. I've rarely had a piece of hardware not recognized by Linux installers riding on CDROMs. I've gotten 1600x1200 on this monitor, and now I'm getting 640x480 and it came on a DVD. WTF?


    Downloading Windows 7 Beta ...

    This is a screengrab. I'm downloading Win7 under XP, which I'm accessing via Remote Desktop on an Ubuntu machine. Doesn't that look cool? I should load up OpenSolaris to nest this mess some more.

    I'm keen to play with W7, but I don't know that I have machines powerful enough. They're recommending at least 1GB, and the one machine I own that has that much is not a machine I'm going to play with any time soon. Ars Technica has a big write-up on this, but they always seem to have access to hotter machines than I do.


    Contemplating My Desktop...

    Not on the computer. Under the computers.

    I have an L-shaped desk with a hutch at home. The hutch has a monitor-shaped spot that's actually too small for either of my two monitors. I have two tower machines connected via KVM and a laptop that's busted. I also have two monitors, both of which are huge CRTs that monopolize the space. Currently, my #1 machine has sat in the hutch with the flatbed scanner, but with the arrival of my new gear, it has become my #2 machine, and the 1/8"-to-RCA cable connected to my stereo can't reach my #1. So, there has to be a change.

    • Robbie (new #1)
      • Ubuntu
      • Much disc
      • Much DVD for burn and rip
      • Much processor. Well, 2.26GHz, which is faster than everything else I have
      • Want: 2GB memory, dual-head video card, TV tuner card so I watch on that, not a separate TV, LCD monitors

    • Tom Servo (new #2)
      • Ubuntu, for now
      • Not much disc
      • Much DVD but I think it's done burning
      • Soon to be my sacrificial, "I wonder how to install this..." machine
    • Maria
      • XP
      • Much RAM
      • Much DVD for reading but I think it can only burn CDs
      • Broken monitor. Strongly considering using it only remotely, via Remote Desktop, or...
      • Going to be receiving SSH for Windows soon. I wonder of you can use SSHFS to copy files to it. FuseSMB seems to not be a heavy-use alternative.

    Also, there's a TV. With the speaker broken the last time I looked inside to try to fix the built-in VCR.

    There's more, of course, but not on my desk.

    So, my plan is as follows: laptop and scanner into the hutch,


    Updating and Upgrading ...

    I pulled a drive off my shelf today, looking for some screws. 4000 MB. 4GB. I remember when I thought that was huge.

    I just put a 500GB hard drive into one of my machines. Also a DVD(plus/minus)R burner. I am currently in the final stages of using one to install Ubuntu 8.10 onto the other. I also vacuumed a gob of dust bunnies out of the case. It is almost done. After that comes the upgrading, the network configuration, and perhaps the creation of other accounts so the kids can use it, too. Or maybe not. I have a stack of MP3-containing CD-ROMs, so I am very sure, very very very sure that I could get to 100GB easy.

    In fact, it is now done. And I'm logged in. And I have nothing but a white pointer on a black background. I don't have sshd installed, so I can't get in any other way.

    Well, actually, I can.

    Reboot, CTRL-ALT-F1 at the GDM screen, and then sudo apt-get update && sudo apt-get upgrade . And if it doesn't work, I burn another copy and try it again. Or try OpenSolaris or FreeBSD. I'm not paranoid enough for OpenBSD.

    At least not for that box.

    On the big box, I have desktop! I guess that means that the default set on the 8.10 install disk kinda sucks.

    I'm now re-upgrading the thing with Synaptic. I'm also putting all my media on it with scp. Tonight, everything on the other machines. Later, all the stuff I burned to CD to save space.


    Birthday Gifts for K, Myself

    K wanted and received the single most expensive gift again this year. This year it's an EeePC, which is a netbook. That's 1024x768 in a 9" diagonal screen. It's also 120GB for hard drive. It's the best machine in the house in a form factor smaller than Learning Perl.

    I spent a part of the afternoon poking at it. It runs XP Home, which is her choice, not mine. I have installed, among other things
    • Firefox 3
    • OpenOffice
    • The Virtual Deskop PowerToy, because virtual desktops are nice verywhere but crucial on such a small screen
    • The Google Pack, including Google Talk, Google Desktop, Google Earth, Chrome, Picasa and a few more things
    • AVG Antivirus
    I was also getting a problem with it being able to find the Windows Network. It could ping Maria, my XP box, but it couldn't ID it via SMB. Through Shub-Internet, I found this link which explains a little on the magic incantation to convince your machine to talk to the Windows Network.
     Windows Registry Editor Version 5.00
    I ran it on both machines, and now I have a full view of the network. Yay!

    One tremendous benefit: It's kinda built for Skype. I don't have a phone for my desk, and in the sub-basement, we don't really get reception, so voice communications down there are cool.

    I have also discovered the use of Remote Desktop. Well, no, I knew about it from working at Computers4Cars, but I never used it on my own machines. I found GnomeRDP, which is an implementation of the Remote Desktop client ... server ... the part that you sit at to run a machine that's far away. I'm writing this on my Windows box, but using the monitor, keyboard and screen of my Ubuntu box to type, which is best, as my laptop's keyboard is broken. I was using Synergy to multiplex my keyboard and mouse across two machines and two screens, but there is something to having your one machine in the window of another.

    And, beyond the O'Reilly I gifted to myself, I did get something else that should be interesting to geeks. I got a DVD(plus/minus)R drive and a 500GHz hard drive for one of my machines. Big drives and burnable DVDs -> I live in the future. All IDE hardware -> I live in the past. But with a 500GB hard drive, I can do that little while longer. Yes, at some point I will kit out a new #1 machine and I'll put in multiple terabyte harddrives and I shall run FreeBSD or OpenSolaris so I will have all the benefits of ZFS. And I will gallop freely amongst the heards of unicorns. But in reality, I will upgrade my Robbie, my 2.26GHz Compaq, to be a relatively cool machine. The CDW Memory Finder says that I could get myself upto 2GB of memory for less than $100. I'll try to get that together by Spring Break.

    I have some ideas for a program relating to Twitter, but I'll cover that later. It's 2am, people. Gotta sleep sometime.