Greetings Monks,

I have been thinking a lot lately about automation. Besides being a programmer, I just finished setting the timer on my sprinklers and put some timers on our holiday lights, and my coffee maker has a timer. I began thinking about how cool it would be if any of these devices were written in Perl. Or perhaps the lights in the house, or the heating and A/C. One hears about the houses of the future which came out in the 50s, with automated appliances, etc. We've only seen small pieces of such technologies, appliances probably controlled by C code, with complex functionality, but no centralized home systems.

Perl is a key language for building applications on the web, and I consider myself lucky to be a part of it, and to be able to create programs to do whatever task is at hand (for myself or friends). Seems unlikely, but what if Perl became the language of choice for home systems?

So, wise and creative monks, what part(s) of your home or office would you hope to be written in Perl, and what would you do with them. This could be a description of features, pseudocode, $lights->on(), whatever. What code would you write for your house?

bassplayer

Replies are listed 'Best First'.
Re: Perl of the Future
by Abigail-II (Bishop) on Dec 02, 2003 at 13:57 UTC
    So, wise and creative monks, what part(s) of your home or office would you hope to be written in Perl, and what would you do with them.
    My web browser. I want it to be smart enough that it can go to perlmonks all by itself, and answer the questions. As a step towards that goal, I envision a browser that goes to perlmonks all by itself and ask questions.

    In 30 years from now, no human will visit webforums anymore. It'll all be automated.

    A second thing I really want is a programmable backscratcher. Not in perl, but in a free flow language:

    A little higher! Faster! Yeah, that's right. Now down below!
    (In this language, lines not ending in an exclaimation mark are comments)

    Third, I want a programmable bathtub. Its language only has two functions: empty, with no arguments, and full with an optional arguments, the temperature of the water.

    And then there are the programmable cheese knife, the programmable house plants, and the programmable sex slave spouse.

    Abigail

Re: Perl of the Future
by thraxil (Prior) on Dec 02, 2003 at 16:29 UTC

    you can control this stuff with Perl!

    the BottleRocket library for controlling X10 equipment includes a perl module wrapper.

    if X10 weren't such an annoying company (pop-up adds, spy camera adds of a dubious nature, pushy sales tactics, general sliminess, etc), i'd be all over this stuff.

      Thanks. ybiC was kind enough to point me to this as well. It is cool to see this stuff around. I agree about the shadiness of X10, especially the spy-cam ads of inevitably sexual nature. I actually used to have a bunch of their modules back around 1988, and I controlled them with my Macintosh 512k. All very automated, but I didn't write a line of code. I was mainly hoping to foster fun and imaginative answers with this node, such as Abigail-II's. For me, I'd have my fridge detect low beer counts and food near the spoiling point. Perhaps have a bio-scanner to detect when I need another beer or some coffee...

      bassplayer

Re: Perl of the Future (X10)
by QM (Parson) on Dec 02, 2003 at 22:16 UTC
Re: Perl of the Future
by danger (Priest) on Dec 02, 2003 at 16:35 UTC

    I have used Perl and the ControlX10::CM17 module to control devices (on/off) in my home (via X10 FireCracker hardware) --- does that count? I never found it terribly interesting or useful though :-)

Re: Perl of the Future
by Aristotle (Chancellor) on Dec 03, 2003 at 06:17 UTC
    Every time I hear about home automation, I wonder whether the people excited over them have ever thought about the implications of security and privacy breaches with these systems. No thanks, I'm not too lazy to tap a light switch with my hand.

    Makeshifts last the longest.

Re: Perl of the Future
by dragonchild (Archbishop) on Dec 02, 2003 at 13:51 UTC
    I would hope none of my home/office would be written in Perl. It'd be nice to have an API that some enterprising hacker could code up a Perl interface to, but Perl is most definitely not suited to that type of embedded work.

    ------
    We are the carpenters and bricklayers of the Information Age.

    Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

      Absolutely.

      Over the years I have done a lot of work where embedded processors are used. In 'BIG' processor projects you will see some C being used, but in a lot of the work it is all in assembler. However as time and technology advances, and fewer people understand how to write in assembler, the balance is moving towards bigger processors and C. In a lot of embedded work a $1.50 CPU is okay, but a $4 part blows the budget entirely!

      jdtoronto

      Perl is most definitely not suited to that type of embedded work
      I'm pretty sure you meant to say that Perl is most definetly not yet suited .... :D
Re: Perl of the Future
by duff (Parson) on Dec 02, 2003 at 16:46 UTC
    So, wise and creative monks, what part(s) of your home or office would you hope to be written in Perl

    I don't think that's really that interesting. Here's a better dream ... how many devices of the future will have a parrot VM? :-) Then it wouldn't matter what language you automation tasks were written in as long as the language could be compiled to parrot.

    Others have mentioned that you can already control devices using X10 with Perl. About the only home automation that I would want would be things like turning the outside lights on/off at certain times, maybe the inside lights/TV/radio/etc. too with a "vacation" script, programming the Christmas lights to do something fancy, etc. The problem with using perl for many of these things is that the niche is well filled already. Take you alarm clock for instance. Programming it in perl would be cool, but it's already easy enough to set them for time A during the week and time B during the weekend or other such things.

Re: Perl of the Future
by mcogan1966 (Monk) on Dec 02, 2003 at 20:34 UTC
    To be perfectly honest, I don't see Perl as running my household. Though there would probably be a good number of Perl scripts and cron jobs monitoring some automated stuff.

    I see it more of a cluster of Java application, tied together with a nice touchscreen GUI created in Swing. IMO, that would provide a more direct act on anything using the GUI, and leave the automated jobs running small in the background. The OO nature of Java seems to be better, in this case, for something that requires more user interation to accomplish.