[EM] ABIF: Optional use of asterisk instead of colon (Re: Ballot Data Format)

Rob Lanphier roblan at gmail.com
Mon Jun 7 00:25:30 PDT 2021

Hi Jan,

Thanks again for reviving this thread.  I agree with you that ABIF has
potential to be simultaneously readable, versatile, and robust, as
well as easy to type for people discussing elections in online forums
(and reasonably easy to embed in an email). We need to be ruthless
about cutting features to keep it simple (more on this in a bit).

There's other stuff to cover in your email, but I'm going to focus on
the asterisk vs colon issue in this email, because I think it's
important to get it right now (before too many parsers and writers get
written).  More below:

On Sun, Jun 6, 2021 at 4:30 AM Jan Šimbera <simbera.jan at gmail.com> wrote:
> If the multiplier separator is made variant (asterisk / colon / both), [...]

My initial instinct is to say "sure!  let's allow many delimiters!",
because that seems easy enough at this stage, and getting
implementations like Pivot on board will help adoption.  But the more
optional representations that we add, the more complicated that
writing parsers for the format is going to be.  Perhaps we should
replace the colon with an asterisk.  I'm not sure.  We should decide
whether we're going to have an optional (non-preferred) delimiter, and
a delimiter that is preferred for software emitting this format.
Small decisions now will have a big impact later.

So let's talk about asterisks.  What you seem to be suggesting is that
ALL of the following test cases should be valid:

A - inlined labels with colon
   27: [Doña García Márquez]/5, [Steven B. Jensen]/2, [Sue Ye (蘇業)]/1,
[Adam Muñoz]/0
   26: [Doña García Márquez]/3, [Steven B. Jensen]/5, [Sue Ye (蘇業)]/3,
[Adam Muñoz]/1
   24: [Doña García Márquez]/2, [Steven B. Jensen]/1, [Sue Ye (蘇業)]/5,
[Adam Muñoz]/2
   23: [Doña García Márquez]/1, [Steven B. Jensen]/0, [Sue Ye (蘇業)]/3,
[Adam Muñoz]/5

B - inlined labels with asterisk
   27 * [Doña García Márquez]/5, [Steven B. Jensen]/2, [Sue Ye
(蘇業)]/1, [Adam Muñoz]/0
   26 * [Doña García Márquez]/3, [Steven B. Jensen]/5, [Sue Ye
(蘇業)]/3, [Adam Muñoz]/1
   24 * [Doña García Márquez]/2, [Steven B. Jensen]/1, [Sue Ye
(蘇業)]/5, [Adam Muñoz]/2
   23 * [Doña García Márquez]/1, [Steven B. Jensen]/0, [Sue Ye
(蘇業)]/3, [Adam Muñoz]/5

C - labels in header with colon delimiter   [Doña García Márquez]: DGM
   [Steven B. Jensen]: SBJ
   [Sue Ye (蘇業)]: SY
   [Adam Muñoz]: AM

   27: DGM/5, SBJ/2, SY/1, AM/0
   26: DGM/3, SBJ/5, SY/3, AM/1
   24: DGM/2, SBJ/1, SY/5, AM/2
   23: DGM/1, SBJ/0, SY/3, AM/5

D - labels in header with asterisk delimiter
   [Doña García Márquez]: DGM
   [Steven B. Jensen]: SBJ
   [Sue Ye (蘇業)]: SY
   [Adam Muñoz]: AM

   27 * DGM/5, SBJ/2, SY/1, AM/0
   26 * DGM/3, SBJ/5, SY/3, AM/1
   24 * DGM/2, SBJ/1, SY/5, AM/2
   23 * DGM/1, SBJ/0, SY/3, AM/5

(Examples A, C, and D above are equivalent to test cases 4, 5, and 9
on the ABIF wiki page: <https://electowiki.org/wiki/ABIF>)

All of the examples above (A, B, C, and D) seem easy enough to write
parsing code for.  Still, we need to be opinionated about what format
new ABIF writers should emit, so that we can steer people toward a
single, simple format, and possibly deprecate unused aspects of the
format.  We also want to reduce the complexity of the format now so
that we can add stuff after the format is more widely-used.

You'll note that there's a whitespace difference between examples C
and D.  When using colon, it seems more natural to put the colon
directly after the number.  For asterisk, it seems better to put a
space in to make it clear that it's not intended to be used as a
footnote (like the dagger † and double-dagger ‡ frequently are as
well).  Note that many fonts display asterisks in superscripted
format, which makes it a confusing replacement for the multiplication
symbol ("×") for non-programmers.  Of course programmers look at
asterisk and immediately think of multiplication, but then also start
thinking about the order of operations, and want to see a parenthesis
or two to make it clear that each line isn't being multiplied by the
first candidate.

I'd love to have Pivot on board for ABIF compatibility, so (for now)
I'm publishing a test case on the ABIF page for asterisk being used
instead of colon.  As of right now, I personally prefer colon, but
could be convinced that asterisk is a better choice.  Regardless, we
should decide which one is the preferred delimiter and which one is
the optional delimiter.

I filed this as an issue in the Electorama github issue tracker for ABIF here:

We can continue discussing this on the mailing list, but we can also
discuss it on GitHub.  I'm fine with either for now, since the ABIF
repository on GitHub is new (I made it a few hours ago).


More information about the Election-Methods mailing list