* [9fans] blank line in /lib/ndb/local
@ 2015-11-09 12:29 arisawa
2015-11-10 3:02 ` erik quanstrom
0 siblings, 1 reply; 6+ messages in thread
From: arisawa @ 2015-11-09 12:29 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
Hello,
manual ndb(6) says: "Each line starting without white space starts a new tuple. Lines starting with # are comments.”
assume we have an entry such as:
dom=foo
# a blank line follows
auth=bar
if the blank line contains a white space, then
ndb/query dom foo auth
will produce
dom=foo auth=bar
on the other hand, if the blank line is empty, then the command will produce
dom=foo
Is this a bug or a specification?
I want to believe this is a bug.
Kenji Arisawa
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [9fans] blank line in /lib/ndb/local
2015-11-09 12:29 [9fans] blank line in /lib/ndb/local arisawa
@ 2015-11-10 3:02 ` erik quanstrom
2015-11-10 4:01 ` arisawa
0 siblings, 1 reply; 6+ messages in thread
From: erik quanstrom @ 2015-11-10 3:02 UTC (permalink / raw)
To: 9fans
On Mon Nov 9 04:32:24 PST 2015, arisawa@ar.aichi-u.ac.jp wrote:
> Hello,
>
> manual ndb(6) says: "Each line starting without white space starts a new tuple. Lines starting with # are comments.”
>
> assume we have an entry such as:
> dom=foo
> # a blank line follows
>
> auth=bar
>
> if the blank line contains a white space, then
> ndb/query dom foo auth
> will produce
> dom=foo auth=bar
> on the other hand, if the blank line is empty, then the command will produce
> dom=foo
>
> Is this a bug or a specification?
> I want to believe this is a bug.
i can't replicate this:
; cat a.db
dom=fu
# comment
auth=bar
; ndb/query -f a.db dom fu
dom=fu
- erik
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [9fans] blank line in /lib/ndb/local
2015-11-10 3:02 ` erik quanstrom
@ 2015-11-10 4:01 ` arisawa
2015-11-10 4:05 ` erik quanstrom
0 siblings, 1 reply; 6+ messages in thread
From: arisawa @ 2015-11-10 4:01 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
hello,
your blank line doesn’t have a white space.
> 2015/11/10 12:02、erik quanstrom <quanstro@quanstro.net> のメール:
>
> On Mon Nov 9 04:32:24 PST 2015, arisawa@ar.aichi-u.ac.jp wrote:
>> Hello,
>>
>> manual ndb(6) says: "Each line starting without white space starts a new tuple. Lines starting with # are comments.”
>>
>> assume we have an entry such as:
>> dom=foo
>> # a blank line follows
>>
>> auth=bar
>>
>> if the blank line contains a white space, then
>> ndb/query dom foo auth
>> will produce
>> dom=foo auth=bar
>> on the other hand, if the blank line is empty, then the command will produce
>> dom=foo
>>
>> Is this a bug or a specification?
>> I want to believe this is a bug.
>
> i can't replicate this:
>
> ; cat a.db
> dom=fu
> # comment
>
> auth=bar
> ; ndb/query -f a.db dom fu
> dom=fu
>
>
> - erik
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [9fans] blank line in /lib/ndb/local
2015-11-10 4:01 ` arisawa
@ 2015-11-10 4:05 ` erik quanstrom
2015-11-10 5:07 ` arisawa
0 siblings, 1 reply; 6+ messages in thread
From: erik quanstrom @ 2015-11-10 4:05 UTC (permalink / raw)
To: 9fans
On Mon Nov 9 20:03:06 PST 2015, arisawa@ar.aichi-u.ac.jp wrote:
> hello,
>
> your blank line doesn’t have a white space.
>
> > 2015/11/10 12:02、erik quanstrom <quanstro@quanstro.net> のメール:
> >
> > On Mon Nov 9 04:32:24 PST 2015, arisawa@ar.aichi-u.ac.jp wrote:
> >> Hello,
> >>
> >> manual ndb(6) says: "Each line starting without white space starts a new tuple. Lines starting with # are comments.”
exactly. that's what the manual says. an otherwise blank like with only whitespace would
fit the definition of a line starting with whitespace, therefore not starting a new tuple.
- erik
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [9fans] blank line in /lib/ndb/local
2015-11-10 4:05 ` erik quanstrom
@ 2015-11-10 5:07 ` arisawa
2015-11-10 5:14 ` erik quanstrom
0 siblings, 1 reply; 6+ messages in thread
From: arisawa @ 2015-11-10 5:07 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
yes, your right.
the manual says what the code does.
however I don’t think it is a good idea to make sense in white spaces within blank line.
probably the code does not suppose blank lines within ndb entry.
> 2015/11/10 13:05、erik quanstrom <quanstro@quanstro.net> のメール:
>
> On Mon Nov 9 20:03:06 PST 2015, arisawa@ar.aichi-u.ac.jp wrote:
>> hello,
>>
>> your blank line doesn’t have a white space.
>>
>>> 2015/11/10 12:02、erik quanstrom <quanstro@quanstro.net> のメール:
>>>
>>> On Mon Nov 9 04:32:24 PST 2015, arisawa@ar.aichi-u.ac.jp wrote:
>>>> Hello,
>>>>
>>>> manual ndb(6) says: "Each line starting without white space starts a new tuple. Lines starting with # are comments.”
>
> exactly. that's what the manual says. an otherwise blank like with only whitespace would
> fit the definition of a line starting with whitespace, therefore not starting a new tuple.
>
> - erik
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [9fans] blank line in /lib/ndb/local
2015-11-10 5:07 ` arisawa
@ 2015-11-10 5:14 ` erik quanstrom
0 siblings, 0 replies; 6+ messages in thread
From: erik quanstrom @ 2015-11-10 5:14 UTC (permalink / raw)
To: 9fans
On Mon Nov 9 21:10:14 PST 2015, arisawa@ar.aichi-u.ac.jp wrote:
> yes, your right.
> the manual says what the code does.
> however I don’t think it is a good idea to make sense in white spaces within blank line.
> probably the code does not suppose blank lines within ndb entry.
>
i don't think it's a good idea, either. however, changing it is not of much value.
fwiw, there is a program ndb/vrfy that comes with a yacc grammar. i wote it
because with 30 people fiddling with ndb files, there were occasional mistakes
and it was nice to have a way to automaticly email folks with a list of potential
ndb errors.
if this program doesn't already whine about this iffy construct, i'd welcome
a patch!
- erik
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-11-10 5:14 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-09 12:29 [9fans] blank line in /lib/ndb/local arisawa
2015-11-10 3:02 ` erik quanstrom
2015-11-10 4:01 ` arisawa
2015-11-10 4:05 ` erik quanstrom
2015-11-10 5:07 ` arisawa
2015-11-10 5:14 ` erik quanstrom
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).