My favorite Linux brain teaser, udev, has changed its rule language somewhat.

Previously, I had the following rule:


BUS="usb",
SYSFS{product}="Palm Handheld",
KERNEL="ttyUSB[13579]",
OWNER="lemire",
GROUP="tty",
MODE="0660",
SYMLINK="m500"

Now, you need to have


BUS=="usb",
SYSFS{product}=="Palm Handheld",
KERNEL=="ttyUSB[13579]",
OWNER="lemire",
GROUP="tty",
MODE="0660",
SYMLINK="m500"

This makes perfect sense, except that there was no error message to explain the required change. So an hour later, I learned way more than I needed about a crazy piece of software.

In general, another lesson learned is that rule languages are hard and generally unfriendly. Yes, I would throw CSS into the fold.

2 Comments »

  1. Weird change = -> ==, and it does not seem consistent… !?! (Unless it is a difference between assumed to be constant versus variable?)

    Comment by RivestF — 8/2/2007 @ 10:32

  2. I think you have to read….

    a==1, b==2,c=4

    as

    i( a == 1 and b == 2) then c = 4

    By rule-language people hate the “if something then something else”. They work very hard not to use it.

    Comment by Daniel Lemire — 8/2/2007 @ 11:02

Leave a comment

Warning: When entering a long comment, please ensure that you make copy of your text prior to submitting it. If the server should fail or if you hit a bug, you might lose your work. I am not responsible for your lost effort.

To spammers: I carefully review every single post and make sure that spam gets deleted. You are wasting your time if you are manually entering spam using this form. Read my terms of use to see what I consider to be abusive.

Example: duo plus septem is '9'. The numbers are expressed in latin numerals but you should give your answers using ordinary digits.

 

« Blog's main page

Powered by WordPress