[Owfs-developers] ow* Output - leading spaces trimmed?

2014-03-17 Thread Michael Markstaller
Hi, one question/suggestion: I have in several clients/languages for each and every query a left-trim-function to remove the leading spaces in the output of values of owget,owhttp(text/json),.. What are these leading spaces good for? In the libow they might make sense (which=?) but in

Re: [Owfs-developers] ow* Output - leading spaces trimmed?

2014-03-17 Thread Paul Alfille
The values are formatted with the standard C format parameters: %d, %u, %G in /module/owlib/src/c/ow_parseoutput.c With no particular reason to choose otherwise, no left-justification was done. The default justification looked better when printed out (it tended to stack better in tables).

Re: [Owfs-developers] ow* Output - leading spaces trimmed?

2014-03-17 Thread Michael Markstaller
Thanks Paul, I understand, just asking myself if changing this in the backend would really break something? Understand it looks nicer in owget - but anywhere else it is programatically just annoying.. I guess any client/function has to implement some parser for removing the leading whitespaces

Re: [Owfs-developers] ow* Output - leading spaces trimmed?

2014-03-17 Thread Jerry Scharf
Michael, I agree with Paul on this. I think it is wrong to make a change to the existing behavior for this kind of reason. The law of least surprise says that what people have seen as OWFS output for the last decade should be the default way it continues to output things. It's not a question

Re: [Owfs-developers] ow* Output - leading spaces trimmed?

2014-03-17 Thread Vajk Fekete
In my opinion having to trim the value is a miniscule annoyance compared to have an increasing number of redundant virtual directories. Vajk On Mon, Mar 17, 2014 at 6:49 PM, Jerry Scharf sch...@lagunawayconsulting.com wrote: Michael, I agree with Paul on this. I think it is wrong to make a

[Owfs-developers] 1-wire stability problems rasberry pi - usb and parasite power

2014-03-17 Thread Jan Sennesael
I have a 1-wire network running on my raspberry pi (owfs v 2.9p0 running on raspbian) The master is a DIY board build around a DS2490 and an DS9053 (basically this (http://www.dgkelectronics.com/blog/wp-content/uploads/2012/03/1-wire_adapte r.png) schematic but with a MAX8873 The hubs I made are

Re: [Owfs-developers] ow* Output - leading spaces trimmed?

2014-03-17 Thread Michael Markstaller
Jerry, as I already wrote: I'm not sure if it might break something - but looking at my own code in Perl, python, bash, JS, C its always about removing the leading whitespaces. It won't fail if they aren't there.. Stripping the whitespaces in owhttp is - for me - rather a dirty workaround, but I

Re: [Owfs-developers] ow* Output - leading spaces trimmed?

2014-03-17 Thread Michael Markstaller
On 17.03.2014 20:57, Vajk Fekete wrote: In my opinion having to trim the value is a miniscule annoyance compared to have an increasing number of redundant virtual directories. Vajk Ack, a separate Directory is IMHO no option, it's easier to ltrim.. Michael

Re: [Owfs-developers] 1-wire stability problems rasberry pi - usb and parasite power

2014-03-17 Thread Michael Markstaller
Jan, your're using Ethernet-Hubs to distribute 1-Wire?? Check your HW, I guess this is nothing to blame owfs with.. Michael -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new

Re: [Owfs-developers] ow* Output - leading spaces trimmed?

2014-03-17 Thread brucek
OK, my 2 cents worth: I use the returned length to determine if I have had a valid read or not...so I would not like it to change. How about a startup switch? Bruce -Original Message- From: Michael Markstaller [mailto:m...@elabnet.de] Sent: Monday, March 17, 2014 4:47 PM To:

Re: [Owfs-developers] ow* Output - leading spaces trimmed?

2014-03-17 Thread Paul Alfille
Why is command line argument (--trim) a bad idea? On Mon, Mar 17, 2014 at 8:38 PM, Michael Markstaller m...@elabnet.de wrote: Hmm, if you get null, is this different from a bunch of spaces with no value? Either fully or not, a switch is another bad workaround.. My other 2 cents..