On 09/27/2011 06:46 PM, Kent A. Reed wrote: > Andy and Sebastian: > > I was/am just looking for consistency. > > Sebastian cites the halcmd man page, which, it turns out, is > inconsistent with the output from halcmd if one asks for "help linkps" > or "help linksp". Unfortunately, that's where I started.
I checked the manpage first and didn't look at the halcmd help until now. I see what you mean now, the halcmd help is at odds with the manpage, and that's not right. Some quick experiments show that "halcmd net" accepts any number of '=' characters in arrows (1 or more), it sometimes talks about one and sometimes two in the docs, and it sometimes produces one and sometimes produces two in its output. I agree, that is inconsistent and that's a bummer. > Still, the argument that it's ok to do things inconsistently because "it > really doesn't matter" rings hollow to me. One can never predict how > someone is going to use this stuff. The great beauty of the Unix > platform is the ease with which one can pipe data from one program to > another. I think until someone cares enough to scrub all this inconsistency out of the code and the various docs, you've got the right answer - accept both. Hey, that reminds me of another Unix pattern, the Robustness Principle, which helps you deal with inconsistent software like halcmd: https://secure.wikimedia.org/wikipedia/en/wiki/Robustness_principle Many of my favourite Unix tools are ones with totally predictable, machine-parsable output, because that feature makes them script-friendly. But some useful Unix tools are not that way, they make human-parsable output that's annoying to parse with scripts. Some tools, like git, straddle the line with varying degrees of success. I'd say halcmd is towards the "annoying to parse" side of the spectrum, and it never bothered me because i never tried to parse its output programmatically. I took a quick look around and it seems like there's no complete python interface into hal. There's the "hal" python module which lets you write userspace hal components in python, but it does not export all halcmd-like functionality to manipulate and examine the hal wiring. It certainly lacks documentation! Maybe hal.py and _hal.so could be extended to export more of libemchal.so to python? Then you wouldnt have to parse anything, you could examine the structures directly. > All this would have been over in 30 seconds if we had been talking over > a beer. Yes, this got overblown and I'm sorry about that. Next time you're in Colorado, come by Boulder for a beer! -- Sebastian Kuzminsky ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2dcopy2 _______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
