[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
From: Herbert J. Bernstein <yaya@bernstein-plus-sons.com>
To: Group finalising DDLm and associated dictionaries <ddlm-group@iucr.org>
Cc: FCB <fcb@epsilon.pair.com>
Sent: Wednesday, 12 January, 2011 19:29:29
Subject: Re: [ddlm-group] Simon's elide proposal
My thanks for John for giving these translations into
Simon's proposal. They are similar to what we have
had to do for many years with the line folding protocol
in CIF1 and semi-colon-delimited string.
Correcting my typos and summarizing thre first couple of
examples, it appears that we are being presented with the following
choice. Ralf, Simon and John, please correct me for what
I have misunderstood. If I have this right, Ralf's proposal
seems a cleaner way to do each task, but Simon's does
seem able to cope. I have verified that Simon's proposal
is a valid non-conflicting subset of Ralf's proposal, even
including the end-of-line elide to post elide the extra
quote marks. All the more reason to support the proposed
compromise -- start with Simon's proposal and then explore
fully extending to the cleaner whole of Ralf's proposal.
Note that the r"""...""" and r'''...''' constructs would
do a particularly neat job of preserving elides to be
passed on to higher levels.
A. Ralf's proposal:
One way to deliver " to an application would be """\""""
One way to deliver ' to an application would be '''\''''
An alternative, is, of course '"' in the first case, and "'"
in the second, but if we are working with both, as in say,
to deliver '"O'" to an application we could use """'"O'\""""
or '''\'"O'"'''
One way to deliver \" to an application for its own elide
processing would be r"""\""""
One way to deliver \' to an application for its own elide
processing would be r'''\''''
An alternative, is, of course '\"' in the first case, and
"\'" in the second, but if we are working with both, as in
say to deliver '"O'\" to an application we could use
r"""'"O'\"""".
B. Simon's proposal
One way to deliver " to an application would be """"\\n"""
One way to deliver ' to an application would be ''''\\n'''
An ternative is, of course '"' in the first case, and "'"
in the second, but is we are working with both, as in say
to deliver '"O'" to an application we could use
"""'"O'"\n""" or ''''\n"I'"'''
One way to deliver \" to an application for its own elide
processing would be """\\\"\\n"""
One way to deliver \' to an application for its own elide
processing would be '''\\\'\\n'''
An alternative, is, of course '\"' in the first case, and
"\'" in the second, but if we are working with both, as in
say to deliver '"O'\" to an application we could use
"""'"O'\\\"\\n""".
=====================================================
Herbert J. Bernstein, Professor of Computer Science
Dowling College, Kramer Science Center, KSC 121
Idle Hour Blvd, Oakdale, NY, 11769
+1-631-244-3035
yaya@dowling.edu
=====================================================
On Wed, 12 Jan 2011, Bollinger, John C wrote:
> On Wednesday, January 12, 2011 7:39 AM, Herbert J. Bernstein wrote:
>
>> Please state the proposal F handling of the following strings, both syntax and semantics, here presented in their python form
>
> I take this as a response to James's invitation, but inasmuch as he is (I hope) sleeping at the moment, I will endeavor to pick up the flag.
>
>> """\""""
>> '''\''''
>
> Taking the first of these as representative of this pair:
>
> This is a string containing one quote character. The best elision under proposal F would be
> """"\
> """
> Easier, however, would be to write it as one of these:
> '"'
> '''"'''
>
>> r"""\"'''
>> r'''\''''
>
> Supposing that you mean r"""\"""" in the former case, and taking the second as representative of the pair:
>
> This is a string containing a backslash character followed by an apostrophe character. The best proposal F elision would be
> '''\'\
> '''
> Simpler representations would be
> '\"'
> '''\"'''
>
>
>> """\
>> \"\
>> """
>
> The string contains one quote character, just like the first example. The elision is therefore the same.
>
>> r"""\
>> \"\
>> """
>
> This is a string containing six characters: backslash, newline, backslash, quote, backslash, newline. The best elision for this string under proposal F would be:
> """\\
> \\"\\
> """
> There is an equivalent form using ''', but it is no simpler.
>
>
> Cheers,
>
> John
> --
> John C. Bollinger, Ph.D.
> Department of Structural Biology
> St. Jude Children's Research Hospital
>
>
>
>
> Email Disclaimer: www.stjude.org/emaildisclaimer
>
> _______________________________________________
> ddlm-group mailing list
> ddlm-group@iucr.org
> http://scripts.iucr.org/mailman/listinfo/ddlm-group
>
_______________________________________________
ddlm-group mailing list
ddlm-group@iucr.org
http://scripts.iucr.org/mailman/listinfo/ddlm-group
Reply to: [list | sender only]
Re: [ddlm-group] Simon's elide proposal
- To: Group finalising DDLm and associated dictionaries <ddlm-group@iucr.org>
- Subject: Re: [ddlm-group] Simon's elide proposal
- From: SIMON WESTRIP <simonwestrip@btinternet.com>
- Date: Wed, 12 Jan 2011 21:07:21 +0000 (GMT)
- In-Reply-To: <alpine.BSF.2.00.1101121400400.85750@epsilon.pair.com>
- References: <AANLkTimdAavg2KCjPZTj1xDYXDQ1JLiQCkQb4snyBErZ@mail.gmail.com><alpine.BSF.2.00.1101120536370.71134@epsilon.pair.com><AANLkTimA8+YXbJ8yS0AtKgFjq9221oMFjR6habn6DsXR@mail.gmail.com><alpine.BSF.2.00.1101120834010.42232@epsilon.pair.com><8F77913624F7524AACD2A92EAF3BFA54166D7D1EA8@SJMEMXMBS11.stjude.sjcrh.local><alpine.BSF.2.00.1101121400400.85750@epsilon.pair.com>
I accept that in these examples, Ralf's proposal provides a 'cleaner'
presentation when using the treble-quotes delimiters (I note though that
using \n; delimiters would provide an even 'cleaner' presentation in many of these examples).
I also cannot fault the python approach per se, but am uneasy about its suitability in the
context of CIF.
Perhaps most importantly with regard to using proposal F as a building block for
a more complete python-type eliding scheme, I am concerned that proposals of type F
that operate after the identification of the delimiters, are not appropriate when
using the initial lexical analysis to handle escape sequences. For example, using scheme F,
if the \<newline> were to be processed in the sequence "\<newline>"" before the "" were processed,
would the lexer not think it had found the closing """ ?
The intention of scheme F is to address the issues of storing values that may contain all the CIF delimiters
within a CIF, with the bonus of providing a line-folding protocol that is part of the base syntax, with
minimal overhead with respect to manipulation of the data to be stored and the complexity of CIF syntax.
Unfortunately, I don't believe it can be considered a subset of python - so doesn't help the compromise much :-(
Cheers
Simon
presentation when using the treble-quotes delimiters (I note though that
using \n; delimiters would provide an even 'cleaner' presentation in many of these examples).
I also cannot fault the python approach per se, but am uneasy about its suitability in the
context of CIF.
Perhaps most importantly with regard to using proposal F as a building block for
a more complete python-type eliding scheme, I am concerned that proposals of type F
that operate after the identification of the delimiters, are not appropriate when
using the initial lexical analysis to handle escape sequences. For example, using scheme F,
if the \<newline> were to be processed in the sequence "\<newline>"" before the "" were processed,
would the lexer not think it had found the closing """ ?
The intention of scheme F is to address the issues of storing values that may contain all the CIF delimiters
within a CIF, with the bonus of providing a line-folding protocol that is part of the base syntax, with
minimal overhead with respect to manipulation of the data to be stored and the complexity of CIF syntax.
Unfortunately, I don't believe it can be considered a subset of python - so doesn't help the compromise much :-(
Cheers
Simon
From: Herbert J. Bernstein <yaya@bernstein-plus-sons.com>
To: Group finalising DDLm and associated dictionaries <ddlm-group@iucr.org>
Cc: FCB <fcb@epsilon.pair.com>
Sent: Wednesday, 12 January, 2011 19:29:29
Subject: Re: [ddlm-group] Simon's elide proposal
My thanks for John for giving these translations into
Simon's proposal. They are similar to what we have
had to do for many years with the line folding protocol
in CIF1 and semi-colon-delimited string.
Correcting my typos and summarizing thre first couple of
examples, it appears that we are being presented with the following
choice. Ralf, Simon and John, please correct me for what
I have misunderstood. If I have this right, Ralf's proposal
seems a cleaner way to do each task, but Simon's does
seem able to cope. I have verified that Simon's proposal
is a valid non-conflicting subset of Ralf's proposal, even
including the end-of-line elide to post elide the extra
quote marks. All the more reason to support the proposed
compromise -- start with Simon's proposal and then explore
fully extending to the cleaner whole of Ralf's proposal.
Note that the r"""...""" and r'''...''' constructs would
do a particularly neat job of preserving elides to be
passed on to higher levels.
A. Ralf's proposal:
One way to deliver " to an application would be """\""""
One way to deliver ' to an application would be '''\''''
An alternative, is, of course '"' in the first case, and "'"
in the second, but if we are working with both, as in say,
to deliver '"O'" to an application we could use """'"O'\""""
or '''\'"O'"'''
One way to deliver \" to an application for its own elide
processing would be r"""\""""
One way to deliver \' to an application for its own elide
processing would be r'''\''''
An alternative, is, of course '\"' in the first case, and
"\'" in the second, but if we are working with both, as in
say to deliver '"O'\" to an application we could use
r"""'"O'\"""".
B. Simon's proposal
One way to deliver " to an application would be """"\\n"""
One way to deliver ' to an application would be ''''\\n'''
An ternative is, of course '"' in the first case, and "'"
in the second, but is we are working with both, as in say
to deliver '"O'" to an application we could use
"""'"O'"\n""" or ''''\n"I'"'''
One way to deliver \" to an application for its own elide
processing would be """\\\"\\n"""
One way to deliver \' to an application for its own elide
processing would be '''\\\'\\n'''
An alternative, is, of course '\"' in the first case, and
"\'" in the second, but if we are working with both, as in
say to deliver '"O'\" to an application we could use
"""'"O'\\\"\\n""".
=====================================================
Herbert J. Bernstein, Professor of Computer Science
Dowling College, Kramer Science Center, KSC 121
Idle Hour Blvd, Oakdale, NY, 11769
+1-631-244-3035
yaya@dowling.edu
=====================================================
On Wed, 12 Jan 2011, Bollinger, John C wrote:
> On Wednesday, January 12, 2011 7:39 AM, Herbert J. Bernstein wrote:
>
>> Please state the proposal F handling of the following strings, both syntax and semantics, here presented in their python form
>
> I take this as a response to James's invitation, but inasmuch as he is (I hope) sleeping at the moment, I will endeavor to pick up the flag.
>
>> """\""""
>> '''\''''
>
> Taking the first of these as representative of this pair:
>
> This is a string containing one quote character. The best elision under proposal F would be
> """"\
> """
> Easier, however, would be to write it as one of these:
> '"'
> '''"'''
>
>> r"""\"'''
>> r'''\''''
>
> Supposing that you mean r"""\"""" in the former case, and taking the second as representative of the pair:
>
> This is a string containing a backslash character followed by an apostrophe character. The best proposal F elision would be
> '''\'\
> '''
> Simpler representations would be
> '\"'
> '''\"'''
>
>
>> """\
>> \"\
>> """
>
> The string contains one quote character, just like the first example. The elision is therefore the same.
>
>> r"""\
>> \"\
>> """
>
> This is a string containing six characters: backslash, newline, backslash, quote, backslash, newline. The best elision for this string under proposal F would be:
> """\\
> \\"\\
> """
> There is an equivalent form using ''', but it is no simpler.
>
>
> Cheers,
>
> John
> --
> John C. Bollinger, Ph.D.
> Department of Structural Biology
> St. Jude Children's Research Hospital
>
>
>
>
> Email Disclaimer: www.stjude.org/emaildisclaimer
>
> _______________________________________________
> ddlm-group mailing list
> ddlm-group@iucr.org
> http://scripts.iucr.org/mailman/listinfo/ddlm-group
>
_______________________________________________
ddlm-group mailing list
ddlm-group@iucr.org
http://scripts.iucr.org/mailman/listinfo/ddlm-group
_______________________________________________ ddlm-group mailing list ddlm-group@iucr.org http://scripts.iucr.org/mailman/listinfo/ddlm-group
Reply to: [list | sender only]
- Follow-Ups:
- Re: [ddlm-group] Simon's elide proposal (Herbert J. Bernstein)
- References:
- [ddlm-group] Simon's elide proposal (James Hester)
- Re: [ddlm-group] Simon's elide proposal (Herbert J. Bernstein)
- Re: [ddlm-group] Simon's elide proposal (James Hester)
- Re: [ddlm-group] Simon's elide proposal (Herbert J. Bernstein)
- Re: [ddlm-group] Simon's elide proposal (Bollinger, John C)
- Re: [ddlm-group] Simon's elide proposal (Herbert J. Bernstein)
- Prev by Date: Re: [ddlm-group] Simon's elide proposal
- Next by Date: Re: [ddlm-group] Simon's elide proposal
- Prev by thread: Re: [ddlm-group] Simon's elide proposal
- Next by thread: Re: [ddlm-group] Simon's elide proposal
- Index(es):