drewp for 2006

<Y
Y>

2006-01-02T21:12:17 using synergy without clipboard or screen-edge switching:

One host has a dual screen gfx card where one screen is my projector.

I want to send the mouse from my main workstation to the projected screen sometimes, but I don't want to slide it off the edge of my main workstation screen all day long, and I definitely don't want to mix the clipboards of my main workstation and the other screen on the projector's gfx card.

To make synergy not switch at screen edge and use a special key instead, I used this config:

section: options
  switchDoubleTap = 1 # try to disable most switching
  keystroke(F15) = switchInDirection(left)
end

where 'left' on each screen means to jump to the other screen. I couldn't find a way to disable clipboard copying, so I asked for one (which also lists my workaround).

2006-01-29T17:04:41 SHDH 7 :

Super Happy Dev House 7 report:

I got started on gasuse and rearranged some things. Donovan helped me with a nested sequence in nevow. Nevow is hard because of all the things you can't see, but isn't omitting things you don't need to see the point of programming languages?

Then I got distracted with Jesse's request for some demo tiles to ship with his scrolling map widget in dojo. I had recently made some renderings of the TIGER streetmap data, so I hacked that code some more to output tiles at multiple zooms. Then, to make our demo tiles somehow better than the tiles you get with gmaps, I added rendering of address numbers on the streets. My renderings still had various embarrassing artifacts, so I spent the rest of the night cleaning some of them up. I'm especially pleased with the results of the street name repeater code, which tries to write a street name label every 200 pixels. Text alignment still needs work; and we didn't get to try any street-smoothing algorithms.

/attachment/weblog/2006/01/29/0/map.png

Meanwhile, David Weekly was jacking into ODB-II ports on people's cars to see what they would output, and I didn't even notice! I'd love to get that going on my Accord. Logs with accurate speed and timestamps would make great plots on my street maps.

Pictures of me at SHDH:
http://flickr.com/photos/kadavy/92456814/ http://flickr.com/photos/cirne/92489223/ http://flickr.com/photos/cirne/92555832/ http://flickr.com/photos/laughingsquid/92721073/in/set-72057594055844028/

2006-02-11T18:00:04 posted gasuse:

http://gasuse.bigasterisk.com now runs the latest gasuse code, including some SVG line graphing. The data is fixed RDF (read from xml). Next comes authentication so I can start adding new records in the field from my cell phone.

2006-03-12T17:43:38 SHDH8 report:

My semfile project is not especially active, but when Jim said he wanted to write some UI for storing local tags on local files, I decided to clean up semfile. My hope is that instead of starting over (which is tempting, since this type of project is very easy to start), he'll build on my semfile design. (That design so far consists mostly of "use rdf".) Anyway, I did some cleanup and wrote test cases for the cmdline tools. I also revised the file URIs to include hostnames, which is going to be an ongoing issue. Home users have various networked and non-networked files that they will want to tag.

Someone told me in passing that beagle uses extended file attributes on certain file systems for some of its tracking. In particular, it may leave an id in the attrs to rediscover files that are moved. semfile has that concern, and I haven't even started to think about what solution I want.

Suchi (no home page?) is interested in analyzing human behavior from passively-collected events, and I have years of logs from my various home automation projects.

Kragen's cool PWM encoding demo on an atmel microcontroller reminds me that I should try my pixel project with atmel, since that project is largely stalled due to issues with programming PICs from linux (both the getting-my-code-written-in-non-asm and the install-code-into-the-chip types of programming).

I have other projects that do boring queries on RDF stores, and they want to give really fast results. Kragen pointed me to some truth maintenance research. We also talked about how to optimize cases like mine, although I'm really interested in general-case optimizations that don't have to change when I adjust my queries.

While SHDH7 was low on food I liked, this one was quite well-stocked.

Pictures of me at SHDH8:
http://flickr.com/photos/cirne/111286521/ http://flickr.com/photos/cirne/111286276/ http://flickr.com/photos/elea/111462897/

2006-04-11T23:50:21 ayttm logging patch:

I upgraded from everybuddy to ayttm, but I wanted to bring my patch with me. This patch puts full times (except tzone) onto the display and log files, giving you a much better chance of analyzing them later. Also, I backslash-escape newlines and backslashes, so that the log records aren't ambiguous. This revised patch also includes a fix to a const error in yahoo.c, which I think the proper ubuntu package has its own fix for.

This was my first time working with ubuntu packages, and I learned almost nothing. To apply my patch, run something like this:

apt-get source ayttm
tar xvzf ayttm_0.4.6+26.orig.tar.gz
cd ayttm-0.4.6+26
patch -p 1 -i ../new_ayttm-0.4.6+26_log.diff
dpkg-buildpackage -nc -rfakeroot
cd ..
dpkg -i ayttm_0.4.6+26-1build1_i386.deb

The good logs will look like this:

20060411 23:20:13 drewperttu:  log test 2

Patch is here: http://bigasterisk.com/post/new_ayttm-0.4.6+26_log.diff

[Comments] (1) 2006-05-15T23:17:27 SHDH 9:

I just barely made it to this one. For the short time I was there, I tried to configure the impossible polypaudio. It's harder than sendmail!

Pictured here: http://flickr.com/photos/elea/137670654/

http://0pointer.de/lennart/projects/polypaudio/

2006-05-20T14:21:52 new projector bulb for $12:

My 1024x768 VGA projector, besides costing under $300 to start with, takes $12 replacement bulbs! (or $8 for the non-long-life one)

Bulbster delivered in about 2 days. http://bulbster.com/zcart/index.php?main_page=product_info&products_id=312&zenid=acde6be331ee2516f5154e3ffb0d5476

The long-life bulbs are rated with 'average life' of 100h. Since my computer turns my projector on and off, I should be able to track my exact failure times.

2006-05-22T09:41:51 dmacro for emacs:

install http://www.pitecan.com/DynamicMacro/dmacro.el

add this to .emacs:

  (autoload 'dmacro-exec "dmacro" nil t) 
  (defconst *dmacro-key* "\C-t" "repeat") 
  (global-set-key *dmacro-key* 'dmacro-exec)

Now you perform some sequence of commands two times, and press C-t to keep repeating it.

Also, check out follow-mode, which ties multiple windows in the same frame (which you probably make with C-x 3) so that the second window always shows the lines that come after the visible lines in the first window, etc. I might have named it newspaper-columns-mode. Now I can easily see an 300-line program on one screen.

And if you like columns, don't miss the experimental support in firefox, for example here or here (messier).

2006-06-06T21:21:25 Xyron cutter:

I really want this Xyron Personal Cutting System paper cutter to be computer controlled. It's normally controlled by removable AT45DB041B 4-megabit flash chips, but it has a secret usb port in it (among a few other secret connectors). The brain is an Atmel ATMEGA64 talking to two L6219DS motor drivers. If I can't talk to the CPU, I will have to talk to the motor drivers (hard to access) or straight to the motors, with my own drivers.

I plugged the usb into a ubuntu laptop, but I didn't see any usual usb handshaking in my logs. Unfortunately there's no reference program to sniff the protocol from. For all I know, the usb port is asleep until the right flash chip is plugged in.

http://quickwitretort.com/xpcs/

[Comments] (1) 2006-06-20T00:29:34 New driver for Xyron Personal Cutting System:

I gave up on all the software interfaces to the cutter and built a new driver for the one interface I knew, which is the stepper motor. I constructed the most obvious circuit from two FAN8200 motor drivers and a small relay (the darlington I had was dropping too much voltage and the blade solenoid wouldn't fire). It connects to a parallel port and uses the same 16V power supply as the XPCS came with.

With a trivial program, I can now drag the mouse on the screen and the blade will chase after the mouse position, and I can press spacebar to toggle the blade up/down position.

motor driver and hacked-up XPCS closeup of motor driver sample cutout

Next, I need to write software to drive the blade over precise curves, and start figuring out what the constraints are. For one thing, you can't draw a pointy V the normal way, because the blade won't turn around fast enough and it'll pick up the paper on the way back up. For that shape, you have to round the corner, or draw two separate downward strokes.

2006-07-22T19:55:41 connecting the loggers of mochikit, firebug, and divmod:

This will save you about 50 seconds of RTFS, but maybe that's all that was stopping you from having a comfortable logging setup.

The plan is to redirect mochikit log() messages and divmod log messages into firebug, whose console will stay active over a reload, and can be turned on and off more easily than a mochikit in-the-page page.

Divmod.logger.addObserver(function(ev) {
  if (ev.channel == "transport") {
    return;
  }
  console.info("divmod (%s): %s", ev.channel, ev.message);
});

logger.addListener('logConsole', null, function(msg) {
  console.info(msg);
});

Now:

log("mochikit message");
console.info("firebug message");
Divmod.log("divmod message");

2006-07-22T19:57:10 ayttm logging patch:

I upgraded from everybuddy to ayttm, but I wanted to bring my patch with me. This patch puts full times (except tzone) onto the display and log files, giving you a much better chance of analyzing them later. Also, I backslash-escape newlines and backslashes, so that the log records aren't ambiguous. This revised patch also includes a fix to a const error in yahoo.c, which I think the proper ubuntu package has its own fix for.

This was my first time working with ubuntu packages, and I learned almost nothing. To apply my patch, run something like this:

apt-get source ayttm
tar xvzf ayttm_0.4.6+26.orig.tar.gz
cd ayttm-0.4.6+26
patch -p 1 -i ../new_ayttm-0.4.6+26_log.diff
dpkg-buildpackage -nc -rfakeroot
cd ..
dpkg -i ayttm_0.4.6+26-1build1_i386.deb

The good logs will look like this:

20060411 23:20:13 drewperttu:  log test 2

Patch is here: http://bigasterisk.com/post/new_ayttm-0.4.6+26_log.diff

2006-07-23T00:41:47 shdh 11:

Worked a tiny bit on RDF view maintenance for http://picreferer.bigasterisk.com, checked out the new sparql parsing in rdflib. Chatted about my plan to track programmer time spent per line of code: hook into the editor to learn what lines are getting visited, try to adjust historical line numbers as lines are added/removed. The result will be reports like "this function has required the more bug fixes than anything else in the code" or "programmers often come to read these lines before they work on anything in these files".

http://flickr.com/photos/alienvenom/195918903/

2006-09-06T10:01:30 hiding firefox bars:

There are some web pages that I want to leave on my screen a lot, e.g. my tiddlywiki page. I would like a firefox command to hide all menus/toolbars/statusbars at once, and only for my selected windows.

The closest I have right now is some menu options that turn off most of the bars, but I can't turn off the top menubar. But, the settings affect future windows I create unless I undo them, and that workflow is a pain. I'd prefer one key to show/hide the UI, like photoshop's tab key (toggles all palettes on and off).

While we're at it, there should be a page mangler that collapses any empty elements so that my always-on-screen page can take up minimal space.

https://addons.mozilla.org/firefox/786/ may be relevant, haven't tried it yet.

also http://www.aqua-soft.org/board/showthread.php?t=36979#4

2006-09-07T22:45:49 procmail lock failure:

My procmail runs every 2 min and gathers an mbox (over nfs) from one box and delivers maildir on another box. The procmail-runner uses lockfile-create/touch/remove to supposedly protect from repeated processing of the same mbox contents, but that lock failed somehow. Cron jobs piled up, and the same message got delivered dozens of times. Every message was going though spambayes, which helped throttle things.

So thanks, fdupes author and ubuntu packagers, for helping me get everything cleaned up in about 10 minutes. I just ran "fdupes -f .path.to.affected.folder/cur | xargs rm" a few times, slowed the procmail down until I feel like looking into that problem, and everything's fine again.

I used to use fslint a lot, but fdupes showed up first in a package search.

I'm also using delicious now (http://del.icio.us/drewpca) since bloglines screwed up and is hiding my hundreds of saved articles. Delicious looks like a better way to gather articles, and they're probably less likely to screw up on their core function than bloglines is to screw up one of its side functions.

Bloglines, if you at least send me the links to all the articles I had marked as keep-new, I'll post an update here saying that you did.

2006-09-28T21:25:38 new monitor:

For the third time, one of my two CRT monitors broke and I got a replacement via craigslist.org for about $100 (and a few hours of driving). This one came from Mountain View.

I now have a http://www.superwarehouse.com/NEC_MultiSync_FE2111SB-BK_Black_22_CRT_Monitor/FE2111SB-BK/p/203914 and a http://reviews.cnet.com/NEC_MultiSync_FE1250/4507-3175_7-1524466.html?tag=nav

The dead one (FE1250+) never matched in color very well, but the new one matches very well.

Stores really aren't carrying CRTs anymore, so I hope that when my craigslist sources eventually dry up, I can get the same resolution with a few LCD monitors. Today, a 1920x1200 LCD monitor is about $800.

2006-10-11T13:17:13 interval.py review:

http://members.cox.net/apoco/interval/

This is an excellent model of how to write and publish doctests. Try http://members.cox.net/apoco/interval/docs/public/interval.Interval-class.html and click the 'between' method. You get a longer docstring and doctest examples of the two interesting modes.

The module itself seems to be doing a good job of cleaning up a lot of min/max junk in my code, too, which is just what I wanted.

2006-10-20T00:42:32 creating deb packages with checkinstall :

I'm trying out http://www.plope.com/software/supervisor/ and it looks good so far. Part of my setup will be to have supervisord running on 4+ ubuntu boxes, and there's no ubuntu package (that I'm aware of). I'd like a package since that will make it incredibly easy to upgrade and downgrade the version on all my boxes all at once or to rebuild a box based mostly on the pkg list.

I found http://www.coffeebreaks.org/blogs/?p=65 which relies on http://asic-linux.com.mx/~izto/checkinstall/. checkinstall watches what files get written by a command (e.g. 'make install') and gathers those files into a package. checkinstall has a decent console UI for setting the simple metadata about a package. If I aliased 'sc' to 'sudo checkinstall', it would practically be EASIER to make packages out of everything I install than not to make them. It's ridiculous.

I'm not sure how to provide package dependencies to checkinstall (e.g. supervisor depends on python), so I guess that might require some more debian pkg tool fu. But I don't really need deps to solve my current problem.

[Comments] (1) 2006-11-02T22:19:01 laptop stickers:

After reading http://jeffwinkler.net/2006/08/04/python-and-the-nod/ , I printed stickers of things I like and put them on my laptop. I deliberately chose the old-style python logo.

Bloglines gave me a hires version of their logo, but asked that I fax their legal department a permission/licensing form. In some other cases, I just used a low res image. This project is not about image quality.

The hardware is all attached with velcro. I can rip off the gps and stick it to my car's ceiling, for example, or stick the usb drive to a sweater. I wish I had a right-angle usb connector and a small, flat hub so I could connect the usb devices all the time.

/attachment/weblog/2006/11/02/0/laptop1.jpg

2006-11-04T23:00:35 gps tracker:

Today I wrote a thing with the python gps module (from gpsd), a nevow website with livepage, and google maps. Then I went out on the road with a gps receiver, laptop, and Treo 600 and broadcasted my position. You could watch me move at http://maps.bigasterisk.com

darcs get http://darcs.bigasterisk.com/maps

to get the code, or just look at:

http://darcs.bigasterisk.com/maps/serve

http://darcs.bigasterisk.com/maps/postPosition

for the good parts.

2006-11-24T14:41:13 Sprint Treo 650 bluetooth DUN notes:

http://www.newt.com/debian/treo650.html is the best page about doing bluetooth hotsync and DUN with a sprint treo 650. The main trap on hotsync is that if you disobey and put in a hostname along with the host ip address, various things will stop working. Use "tcpdump -i ppp0" after ppp connects to debug. Also, treo camera pictures don't backup with "pilot-xfer -b .". I'm not sure how to make those backup, but you probably put them on an SD card anyway.

The DUN section of that page is for t-mobile, and I use sprint. My /etc/chatscripts/sprint is like this:

TIMEOUT 3
ABORT ERROR
ABORT BUSY
ABORT VOICE
ABORT "NO CARRIER"
ABORT "NO DIALTONE"
ABORT "NO DIAL TONE"
ABORT "NO ANSWER"
"" "ATZ"
"" "AT&FH0L3"
OK-AT-OK "ATDP#777"
TIMEOUT 75
CONNECT

The first timeout is small because the first AT command always times out for me, and the connection seems to work fine. On ubuntu, my /etc/ppp/peers/sprint starts with "/dev/rfcomm1".

I use 'pon sprint' to start the dialing instead of ifup.

2006-11-29T11:36:30 RDF literals as subjects:

Any proposal about allowing RDF literals as subjects, especially one that's for language purposes (in this case it's direction support), needs to address why RDF's current design has the exceptional 'language' attribute on literals. If your proposal is so good, why didn't RDF allow arcs from literals in the first place and avoid the langage/datatype special cases altogether?

I really know nothing about the direction support issue, but if it's one of the last few language-specific issues and it really ought to be separate from the 'langauge' attribute, I am inclined to prefer one more special case on literals than a total redo of the constraints on rdf graphs. My main concern with literals as subjects is that people will treat them like "casual" URIs that aren't universally unique.

2006-12-17T23:01:14 SHDH 14:

I worked on maps.bigasterisk.com (which is probably still broken as you read this). My plan was to add estimated arrival times to the map, but without ever specifying my destination. There would just be arrival times all over the map (but maybe not behind me, where it's clear I'm not going). I was going to attempt SVG-over-gmaps for the time display.

Then I remembered I also wanted a lightweight live chat for concurrent viewers of my web page, so I wrote that. Then I installed it to maps.bigasterisk.com, and the live chat didn't work. I narrowed this down to a problem with apache, since the same server and client would work without apache in the middle. Debugging the issue started taking forever, so I'm now considering replacing my apache proxy server with something else.

I also heard some praise for google reader and konqueror and offered some praise for mochikit.

Depictions: http://flickr.com/photos/progrium/324628287/ http://flickr.com/photos/strategicpause/325410145/ http://flickr.com/photos/strategicpause/325410533/ http://flickr.com/photos/strategicpause/325409537/

2006-12-25T16:01:06 Visualizing python profile results:

34 0.000 0.000 0.000 0.000 ConfigParser.py:335(optionxform)
6 0.000 0.000 0.000 0.000 ConfigParser.py:338(has_option)
28 0.001 0.000 0.001 0.000 ConfigParser.py:495(get)
28 0.000 0.000 0.000 0.000 ConfigParser.py:559(_interpolate)
1 0.000 0.000 0.000 0.000 ElementTree.py:1022(__init__)
1 0.000 0.000 0.000 0.000 ElementTree.py:1038(close)
3124 0.045 0.000 0.065 0.000 ElementTree.py:1043(_flush)
3123 0.019 0.000 0.019 0.000 ElementTree.py:1061(data)

As fun as those are to look at, I want to quickly find out where the bottlenecks are; whether they're in my code or not; and any other clues that will help me fix them. I couldn't find anything that performs further visualization on python profile output.

So I wrote a quick one with output like this. It parses profiler output back in for easiest use with "twistd -p", which means it only has base names of .py files. I attempted to color local files by their top dir, which helps a little.

The next big step is to use the profile output directly.

I also might make the report viewer into a full web server so it can do interesting sorts and filters. Or I might tag up the data well enough and do the UI in javascript. That would be harder to write, but it would mean that the report could be a standalone file to archive, share, etc. An example of "interesting filter" would be to show one function and all the deeper calls (as much as we can tell with the profile data).

drewp for 2006

<Y
Y>

[Main]

Unless otherwise noted, all content licensed by Drew Perttula
under a Creative Commons License.