Mister Eclectic (howeird) wrote,
Mister Eclectic

  • Location:
  • Mood:


After two weeks of trial and error and error and error, Automation  Guy finally sat down and figured out two things I needed to do to my code to make it work. As it turns out, only one of them was needed, and he did it wrong. But between that clue and the web, I managed to do what any other language would have done in 30 seconds.

Turns out that in tcl all variables are strings. This means if you create a variable, it is treated as a word instead of a number, even if it's a number. This means you can't do math on them. Stupid.

The way you get around this is use the command "expr" which stands for "expression" which is tcl for "pretend this is a number and not a word, and do math on it.

so if I set a variable named "var1" to 10 and set another variable named "var2" to 9, and I want to subtract var2 from var1, it looks like this:

set var1 10
set var2 9
set foo [expr {$var1 - $var2}]
puts $foo

(puts is the tcl "print to standard output (aka the screen) " command)

Most other languages do something like:
var1 == 10;
var2 == 9;
foo == ($var1 - $var2);
printf $foo

That's the short version. I won't bore myself with the long version.

Suffice to say it worked, and Automation Guy said he couldn't think of any reason to use this IRL. He is so very wrong about that.

So this gave me time to call Rebecca at Toyota and leave her a message about a) I haven't seen the refund on my Discover card for the trunk release which did not need to be installed (about $550) and b) the backup cam sucks, I have a Quality one on order and will have it installed by a Kenwood authorized dealer. She called back in a timely fashion and said she would check on a and talk to her service manager about b. I told her the bottom line with b is she got ripped off by her supplier, who charged her something like $600 for a $20 camera.

And I also had time to look up my Dad's patents (I think he had 11 of 'em) on www.uspto.gov. Except anything before 1976 needs a TIFF plug-in to9 view, and I couldn't get one to install on Chrome or FFox or IE at work, so I had to wait till I got home except for one I found on Google patents which blew me away:

Safety Device for Ballistic Missiles

He also co-authored one of the seminal papers on video data compression which is still referenced by patents which apply to the equipment I work on. Unfortunately the paper is so old that OSPTO has no links to it. Cited in patent 4,064,530 December 20, 1977 held by CBS:

Application of the principle of recursive filtering for noise reduction in television signals is described in a paper by Murray J. Stateman and Murray B. Ritterman entitled, "Theoretical Improvement In Signal To Noise Ratio of Television Signals By Equivalent Comb Filter Technique" published in 1954 in IRE National Convention Record, Volume 2, Part 4. This paper describes how redundancy and knowledge of the past signals can be used to reduce the noise reaching the television screen.

It amuses me that two Murrays co-authored.

Anyhow, it is a basic method still used to clean up streaming media signals.

Home by way of Walgreens, two items I wanted to get:
A key ring (the one holding the car key is too flexible and falls off)
Lindt chocolate for the Toyota sales rep - the one who sold me the car, not the one who messed up the camera order. (she has "liked" their page on FB).

They had no key rings as such, but I found one attached to a $3 lens cleaning kit, which I have a use for too.

Also remembered that today would have been Mom's 90th birthday, which means all three sisters have birthdays coming up next month. So I hung out in the card aisle finding appropriate paper cards. I will be visiting two of them on youngest's b'day, which is a few days before oldest's. Middle one I'll have to mail. Tomorrow.

Middle one is turning 60, so she will get a card a month till then. :-)

My favorite Mom picture:

I also love her wedding portrait:

I did the sepia toning, the original is B&W

Home, forgot to have dinner.

Bought a ticket for Avenue Q at Bus Barn. One or more friends are in it.

Plans for tomorrow:
No band practice
If sales rep is working I'll bring her the gifts (incl. one of my calendars)
Tags: family, gifts, olympics, work

  • Cloudy

    Woke up at 3 am, Hgl was 130, which means that was not what woke me up. Turned on the TV, made a glass of chocolate milk (and then another) and then…

  • Third Monday

    Monday was busy, yesterday was full of FAIL, so today was 3rd Monday. Morning was dull, no streamers so I watched some TV. 1 pm appointment at…

  • Rug victory, Magic Nails FAIL, more fish, more Spook

    After breakfast, vacuumed the rug with the new Bissel, and was able to smooth out the lumps and waves caused by the sofa. Wheeled the sofa back in…

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded