You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nlpcraft.apache.org by Rahul Padmanabhan <ra...@mail.concordia.ca> on 2021/08/08 00:52:13 UTC
Conf File Format Change
Hello NLPCrafters,
I came across this issue while working on NLPCRAFT-394<https://issues.apache.org/jira/browse/NLPCRAFT-394> when I wanted to add configurable values to the python setup.
The current "conf" files (nlpcraft.conf and application.conf) are not in a JSON/YAML/XML format. This makes it a little more of an effort when you want to read/parse the file from a different language (in my case, Python). In my opinion, having them in JSON/YAML/XML will be better for the ease of interaction with other languages and would be a more standardized format.
For reference, other projects like Hadoop/Ignite etc. largely use XML files.
Since we will be catering to developers, I think that it would better to provide a standardized format so that it is not only easier to configure but also, ensures simple interoperability across languages. I don't know how much of an effort a change like this would be but I wanted to mention this.
I'm interested in knowing your thoughts on this.
Thanks,
Rahul Padmanabhan
Re: Conf File Format Change
Posted by Dave Fisher <wa...@comcast.net>.
My Python experience makes me think that json and yaml are much easier to use compared to xml.
See https://github.com/apache/infrastructure-pelican/blob/master/plugins/asfdata.py
This uses all three.
Regards,
Dave
Sent from my iPhone
> On Aug 7, 2021, at 7:04 PM, Rahul Padmanabhan <ra...@mail.concordia.ca> wrote:
>
> Thanks for the clarification. I wasn’t aware of this (or about what HOCON is) until now. This helps me out a lot.
>
> -Rahul
>
> Get Outlook for iOS<https://aka.ms/o0ukef>
> ________________________________
> From: Nikita Ivanov <ni...@gmail.com>
> Sent: Saturday, August 7, 2021 9:46:50 PM
> To: dev@nlpcraft.apache.org <de...@nlpcraft.apache.org>
> Subject: Re: Conf File Format Change
>
> Hi Rahul,
> Let me quickly chime in on this.
>
> NLPCraft uses HOCON format [1]. There's also a well maintained Python
> reader for HOCON [2] available. Generally, HOCON is a better option
> for configuration, while JSON/XML is better for general data
> serialization.
>
> Hope this helps,
> --
> Nikita Ivanov
>
> 1. https://github.com/lightbend/config
> 2. https://github.com/chimpler/pyhocon
>
>> On Sat, Aug 7, 2021 at 5:52 PM Rahul Padmanabhan
>> <ra...@mail.concordia.ca> wrote:
>>
>> Hello NLPCrafters,
>>
>> I came across this issue while working on NLPCRAFT-394<https://issues.apache.org/jira/browse/NLPCRAFT-394> when I wanted to add configurable values to the python setup.
>>
>> The current "conf" files (nlpcraft.conf and application.conf) are not in a JSON/YAML/XML format. This makes it a little more of an effort when you want to read/parse the file from a different language (in my case, Python). In my opinion, having them in JSON/YAML/XML will be better for the ease of interaction with other languages and would be a more standardized format.
>>
>> For reference, other projects like Hadoop/Ignite etc. largely use XML files.
>>
>> Since we will be catering to developers, I think that it would better to provide a standardized format so that it is not only easier to configure but also, ensures simple interoperability across languages. I don't know how much of an effort a change like this would be but I wanted to mention this.
>>
>> I'm interested in knowing your thoughts on this.
>>
>> Thanks,
>>
>> Rahul Padmanabhan
Re: Conf File Format Change
Posted by Nikita Ivanov <ni...@gmail.com>.
Sure - note that HOCON is just a human-readable JSON with a few
relaxed rules (like comments, includes, etc.)
Best,
--
Nikita Ivanov
On Sat, Aug 7, 2021 at 7:04 PM Rahul Padmanabhan
<ra...@mail.concordia.ca> wrote:
>
> Thanks for the clarification. I wasn’t aware of this (or about what HOCON is) until now. This helps me out a lot.
>
> -Rahul
>
> Get Outlook for iOS<https://aka.ms/o0ukef>
> ________________________________
> From: Nikita Ivanov <ni...@gmail.com>
> Sent: Saturday, August 7, 2021 9:46:50 PM
> To: dev@nlpcraft.apache.org <de...@nlpcraft.apache.org>
> Subject: Re: Conf File Format Change
>
> Hi Rahul,
> Let me quickly chime in on this.
>
> NLPCraft uses HOCON format [1]. There's also a well maintained Python
> reader for HOCON [2] available. Generally, HOCON is a better option
> for configuration, while JSON/XML is better for general data
> serialization.
>
> Hope this helps,
> --
> Nikita Ivanov
>
> 1. https://github.com/lightbend/config
> 2. https://github.com/chimpler/pyhocon
>
> On Sat, Aug 7, 2021 at 5:52 PM Rahul Padmanabhan
> <ra...@mail.concordia.ca> wrote:
> >
> > Hello NLPCrafters,
> >
> > I came across this issue while working on NLPCRAFT-394<https://issues.apache.org/jira/browse/NLPCRAFT-394> when I wanted to add configurable values to the python setup.
> >
> > The current "conf" files (nlpcraft.conf and application.conf) are not in a JSON/YAML/XML format. This makes it a little more of an effort when you want to read/parse the file from a different language (in my case, Python). In my opinion, having them in JSON/YAML/XML will be better for the ease of interaction with other languages and would be a more standardized format.
> >
> > For reference, other projects like Hadoop/Ignite etc. largely use XML files.
> >
> > Since we will be catering to developers, I think that it would better to provide a standardized format so that it is not only easier to configure but also, ensures simple interoperability across languages. I don't know how much of an effort a change like this would be but I wanted to mention this.
> >
> > I'm interested in knowing your thoughts on this.
> >
> > Thanks,
> >
> > Rahul Padmanabhan
Re: Conf File Format Change
Posted by Rahul Padmanabhan <ra...@mail.concordia.ca>.
Thanks for the clarification. I wasn’t aware of this (or about what HOCON is) until now. This helps me out a lot.
-Rahul
Get Outlook for iOS<https://aka.ms/o0ukef>
________________________________
From: Nikita Ivanov <ni...@gmail.com>
Sent: Saturday, August 7, 2021 9:46:50 PM
To: dev@nlpcraft.apache.org <de...@nlpcraft.apache.org>
Subject: Re: Conf File Format Change
Hi Rahul,
Let me quickly chime in on this.
NLPCraft uses HOCON format [1]. There's also a well maintained Python
reader for HOCON [2] available. Generally, HOCON is a better option
for configuration, while JSON/XML is better for general data
serialization.
Hope this helps,
--
Nikita Ivanov
1. https://github.com/lightbend/config
2. https://github.com/chimpler/pyhocon
On Sat, Aug 7, 2021 at 5:52 PM Rahul Padmanabhan
<ra...@mail.concordia.ca> wrote:
>
> Hello NLPCrafters,
>
> I came across this issue while working on NLPCRAFT-394<https://issues.apache.org/jira/browse/NLPCRAFT-394> when I wanted to add configurable values to the python setup.
>
> The current "conf" files (nlpcraft.conf and application.conf) are not in a JSON/YAML/XML format. This makes it a little more of an effort when you want to read/parse the file from a different language (in my case, Python). In my opinion, having them in JSON/YAML/XML will be better for the ease of interaction with other languages and would be a more standardized format.
>
> For reference, other projects like Hadoop/Ignite etc. largely use XML files.
>
> Since we will be catering to developers, I think that it would better to provide a standardized format so that it is not only easier to configure but also, ensures simple interoperability across languages. I don't know how much of an effort a change like this would be but I wanted to mention this.
>
> I'm interested in knowing your thoughts on this.
>
> Thanks,
>
> Rahul Padmanabhan
Re: Conf File Format Change
Posted by Nikita Ivanov <ni...@gmail.com>.
Hi Rahul,
Let me quickly chime in on this.
NLPCraft uses HOCON format [1]. There's also a well maintained Python
reader for HOCON [2] available. Generally, HOCON is a better option
for configuration, while JSON/XML is better for general data
serialization.
Hope this helps,
--
Nikita Ivanov
1. https://github.com/lightbend/config
2. https://github.com/chimpler/pyhocon
On Sat, Aug 7, 2021 at 5:52 PM Rahul Padmanabhan
<ra...@mail.concordia.ca> wrote:
>
> Hello NLPCrafters,
>
> I came across this issue while working on NLPCRAFT-394<https://issues.apache.org/jira/browse/NLPCRAFT-394> when I wanted to add configurable values to the python setup.
>
> The current "conf" files (nlpcraft.conf and application.conf) are not in a JSON/YAML/XML format. This makes it a little more of an effort when you want to read/parse the file from a different language (in my case, Python). In my opinion, having them in JSON/YAML/XML will be better for the ease of interaction with other languages and would be a more standardized format.
>
> For reference, other projects like Hadoop/Ignite etc. largely use XML files.
>
> Since we will be catering to developers, I think that it would better to provide a standardized format so that it is not only easier to configure but also, ensures simple interoperability across languages. I don't know how much of an effort a change like this would be but I wanted to mention this.
>
> I'm interested in knowing your thoughts on this.
>
> Thanks,
>
> Rahul Padmanabhan