This looks similar to the property lists used in the Mac world (the NeXTSTEP flavor). This format could be a good choice because it is a “standard”; for instance, Apache Commons Configuration (in the Java world) can read parameters defined in property lists, among a whole set of other sources such as INI files, XML files, a JDBC data source, etc.


Gonzalo Diethelm


From: [] On Behalf Of Andrew Hume
Sent: Tuesday, 24 August, 2010 08:51
To: 0MQ development list
Subject: Re: [zeromq-dev] Devices and config files


if i might offer a counterpoint.


most people find explicit scopes easier to work with,

rather than, say, subtle indentation based stuff.

(python has succeeded as far as it has DESPITE indentation, not because of it.)


for example, i manage my many RAIDs with a config file that looks like


storage tc00 {

        default fs=xfs

        default access=rw

        default mountpoint=/l


        dev rmfs0001 { ctlr=0 node=ant10 }

        dev rmfs0002 { ctlr=1 node=ant11 }



storage pk04 {

        default fs=ufs

        default access=rw

        default mountpoint=/l


        dev rmfs0313 { ctlr=0 node=kow20 }

        dev rmfs0314 { ctlr=0 node=kow20 }

        dev rmfs0315 { ctlr=0 node=kow20 }


        dev rmfs0310 { ctlr=1 node=kow21 }

        dev rmfs0311 { ctlr=1 node=kow21 }

        dev rmfs0312 { ctlr=1 node=kow21 mountpoint=/l/ng_scr00 }



the semantics are unimportant, although i'd bet most readers on this list could figure 90% out

just by looking at it. sure, the tab indent helps readability, but the '{}' are easier to determine scope.

everything is strings internally, but insisting on quotes would probably be cleaner.


by the way, i use the ruby treetop parser to parse this language, but writing a C version would be trivial.


one last point: please make these files easy to machine-generate. (this is likely the most tedious

part of indenting-based schemes.) i find i am almost always finding ways to generate most of my config files

automatically from other sources.




On Aug 24, 2010, at 8:18 AM, Pieter Hintjens wrote:

On Tue, Aug 24, 2010 at 2:02 PM, gonzalo diethelm <> wrote:

Ok. Any pointers yet?


Here is a sketch.


Basically it's stripped down to the minimum, and should be parsable

with simple code.  With regexps, trivial.  Without, a little more work

but nothing as complex as XML or JSON.




Andrew Hume  (best -> Telework) +1 732-886-1886  (Work) +1 973-360-8651

AT&T Labs - Research; member of USENIX and LOPSA




Declaración de confidencialidad: Este Mensaje esta destinado para el uso de la o las personas o entidades a quien ha sido dirigido y puede contener información reservada y confidencial que no puede ser divulgada, difundida, ni aprovechada en forma alguna. El uso no autorizado de la información contenida en este correo podrá ser sancionado de conformidad con la ley chilena. Si usted ha recibido este correo electrónico por error, le pedimos eliminarlo junto con los archivos adjuntos y avisar inmediatamente al remitente, respondiendo este mensaje.

Disclosure: This Message is to be used by the individual, individuals or entities that it is addressed to and may include private and confidential information that may not be disclosed, made public nor used in any way at all. Unauthorized use of the information in this electronic mail message may be subject to the penalties set forth by Chilean law. If you have received this electronic mail message in error, we ask you to destroy the message and its attached file(s) and to immediately notify the sender by answering this message.