Re: Suggested dual human/binary interface for proc/devfs

From: Bill Wendling (wendling@ganymede.isdn.uiuc.edu)
Date: Tue Apr 11 2000 - 11:20:53 EST


Also sprach Ed Carp:
} > Have you ever used XML? It's actually quite useful for a number of
} > things. It's based off of SGML, which has been around for quite a while.
} > And it has a number of really nice features.
}
} Yes, I have. I've written programs that generate XML. Several of them, in fact.

Then you know that it isn't the "newest whiz-bang" thing. It's been
around for quite a while (3-4 years) and has 4-5 "whiz-bang" features.

} > Why are you so violent against its use?
}
} For the same reason I'm "violent" against the use of anything that's not EASILY machine parseable. THINK SIMPLE, Bill.
}
} <DEVICE>
} eth0
} <IP_ADDRESS>
} 192.168.201.116
} </IP_ADDRESS>
} </DEVICE>
}
} or
}
} device {
} eth0
} ip_address {
} 192.168.201.116
} }
} }
}
} is a complete and total waste of computer cycles to parse with a script, not to mention a pain in the patootie.
}
} But:
}
} device=eth0;ip_address=192.168.201.116,netmask=255.255.255.0
}
} for example, is a LOT easier for a script to parse and use. Add a little whitespace and it's a lot easier for humans to parse, too.
}
} Why are people so damned insistent on making this thing as hard as possible to do? Is it sexier or something to make it difficult?

Your last example doesn't say to me that ip_address/netmask are sub
elements of device. It's rather more ambiguous.

Parsing text is your basic waste of cycles no matter what you do. Having
a clean, simple standard format which is good for both humans and
machines is much more fitting. If not XML, then your second example would
be the one I pick.

I'm really not all that concerned with what format we use, though I do
think "inventing" one is silly since there are other out there already.

(BTW, Ed, please use line breaks).

-- 
|| Bill Wendling			wendling@ganymede.isdn.uiuc.edu

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Apr 15 2000 - 21:00:16 EST