Re: Thoughts on language-level configuration support?

2009-04-01 Thread Aaron Brady
On Mar 30, 8:40 am, jfager jfa...@gmail.com wrote: I've written a short post on including support for configuration down at the language level, including a small preliminary half-functional example of what this might look like in Python, available athttp://jasonfager.com/?p=440. The basic

Re: Thoughts on language-level configuration support?

2009-04-01 Thread Kay Schluehr
Discoverable, as in built-in tools that let you have the following conversation: Program, tell me all the things I can configure about you - Okay, here they all are. No digging through the source required. But this doesn't have any particular meaning. If I run a dir(obj) command all

Re: Thoughts on language-level configuration support?

2009-04-01 Thread jfager
On Apr 1, 3:29 am, Kay Schluehr kay.schlu...@gmx.net wrote: Discoverable, as in built-in tools that let you have the following conversation:  Program, tell me all the things I can configure about you - Okay, here they all are.  No digging through the source required. But this doesn't

Re: Thoughts on language-level configuration support?

2009-04-01 Thread Aaron Brady
On Apr 1, 6:29 am, jfager jfa...@gmail.com wrote: On Apr 1, 3:29 am, Kay Schluehr kay.schlu...@gmx.net wrote: Discoverable, as in built-in tools that let you have the following conversation:  Program, tell me all the things I can configure about you - Okay, here they all are.  No

Re: Thoughts on language-level configuration support?

2009-04-01 Thread Rhodri James
On Wed, 01 Apr 2009 05:15:19 +0100, jfager jfa...@gmail.com wrote: On Mar 31, 10:44 pm, Rhodri James rho...@wildebst.demon.co.uk wrote: [...] What restrictions can be put on the value you get back? What can the help system say about this, or do we have to go back to doing all that by hand?

Re: Thoughts on language-level configuration support?

2009-04-01 Thread CTO
 I just mean that there should be a clear and easy way to do it, that it should be considered a basic service, and that if the best way to satisfy all the goals is to integrate it directly into the language, that shouldn't be shied away from. Honestly, the programming language and the

Re: Thoughts on language-level configuration support?

2009-04-01 Thread Steven D'Aprano
On Mon, 30 Mar 2009 06:40:00 -0700, jfager wrote: The basic idea is that a language could offer syntactic support for declaring configurable points in the program. The language system would then offer an api to allow the end user to discover a programs configuration service, as well as a

Re: Thoughts on language-level configuration support?

2009-04-01 Thread jfager
On Apr 1, 8:56 pm, CTO debat...@gmail.com wrote:  I just mean that there should be a clear and easy way to do it, that it should be considered a basic service, and that if the best way to satisfy all the goals is to integrate it directly into the language, that shouldn't be shied away

Re: Thoughts on language-level configuration support?

2009-03-31 Thread jfager
On Mar 30, 9:31 pm, Rhodri James rho...@wildebst.demon.co.uk wrote: On Mon, 30 Mar 2009 16:59:12 +0100, jfager jfa...@gmail.com wrote: It's the configuration problem.  Right now you would use something like ConfigParser or optparse to populate some configuration object, which you would then

Re: Thoughts on language-level configuration support?

2009-03-31 Thread David Stanek
On Mon, Mar 30, 2009 at 9:40 AM, jfager jfa...@gmail.com wrote: I've written a short post on including support for configuration down at the language level, including a small preliminary half-functional example of what this might look like in Python, available at http://jasonfager.com/?p=440.

Re: Thoughts on language-level configuration support?

2009-03-31 Thread rustom
I am not sure I understand your solution. I certainly think that the problem is big, very much bigger than is appreciated. Think of the hoopla in the RoR world about convention-over- configuration. On the other hand I feel that emacs is becoming messier and messier because it has taken up

Re: Thoughts on language-level configuration support?

2009-03-31 Thread jfager
On Mar 31, 2:54 am, David Stanek dsta...@dstanek.com wrote: On Mon, Mar 30, 2009 at 9:40 AM, jfager jfa...@gmail.com wrote: I've written a short post on including support for configuration down at the language level, including a small preliminary half-functional example of what this might

Re: Thoughts on language-level configuration support?

2009-03-31 Thread CTO
On the one hand, I can 110% see why you want to reduce boilerplate code and provide a discoverable, common mechanism for automating the two and three-quarters parsers that a lot of applications have to write to handle a config file, CLI, and/or registry values, but why introduce a syntax for it? A

Re: Thoughts on language-level configuration support?

2009-03-31 Thread Steven D'Aprano
On Mon, 30 Mar 2009 23:06:50 -0700, jfager wrote: On Mar 30, 9:31 pm, Rhodri James rho...@wildebst.demon.co.uk wrote: ... This would be a interesting idea, but ultimately no more than a veneer over the current set of configuration possibilities.  Quite how such a system would tell whether to

Re: Thoughts on language-level configuration support?

2009-03-31 Thread jfager
On Mar 31, 3:08 am, rustom rustompm...@gmail.com wrote: I am not sure I understand your solution. Any questions, please ask. I certainly think that the problem is big, very much bigger than is appreciated. Think of the hoopla in the RoR world about convention-over- configuration.

Re: Thoughts on language-level configuration support?

2009-03-31 Thread jfager
On Mar 31, 3:30 am, CTO debat...@gmail.com wrote: On the one hand, I can 110% see why you want to reduce boilerplate code and provide a discoverable, common mechanism for automating the two and three-quarters parsers that a lot of applications have to write to handle a config file, CLI, and/or

Re: Thoughts on language-level configuration support?

2009-03-31 Thread jfager
On Mar 31, 3:40 am, Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: On Mon, 30 Mar 2009 23:06:50 -0700, jfager wrote: On Mar 30, 9:31 pm, Rhodri James rho...@wildebst.demon.co.uk wrote: ... This would be a interesting idea, but ultimately no more than a veneer over the current

Re: Thoughts on language-level configuration support?

2009-03-31 Thread Kay Schluehr
On 30 Mrz., 15:40, jfager jfa...@gmail.com wrote: I've written a short post on including support for configuration down at the language level, including a small preliminary half-functional example of what this might look like in Python, available athttp://jasonfager.com/?p=440. The basic

Re: Thoughts on language-level configuration support?

2009-03-31 Thread David Stanek
On Tue, Mar 31, 2009 at 3:19 AM, jfager jfa...@gmail.com wrote: Simply having a configuration file - okay.  What format?  What if the end user wants to keep their configuration info in LDAP?  Did the library I'm including make the same decisions, or do I have to do some contortions to adapt?  

Re: Thoughts on language-level configuration support?

2009-03-31 Thread jfager
On Mar 31, 5:57 am, Kay Schluehr kay.schlu...@gmx.net wrote: On 30 Mrz., 15:40, jfager jfa...@gmail.com wrote: I've written a short post on including support for configuration down at the language level, including a small preliminary half-functional example of what this might look like

Re: Thoughts on language-level configuration support?

2009-03-31 Thread jfager
On Mar 31, 6:02 am, David Stanek dsta...@dstanek.com wrote: On Tue, Mar 31, 2009 at 3:19 AM, jfager jfa...@gmail.com wrote: Simply having a configuration file - okay.  What format?  What if the end user wants to keep their configuration info in LDAP?  Did the library I'm including make the

Re: Thoughts on language-level configuration support?

2009-03-31 Thread David Stanek
On Tue, Mar 31, 2009 at 10:01 AM, jfager jfa...@gmail.com wrote: On Mar 31, 6:02 am, David Stanek dsta...@dstanek.com wrote: On Tue, Mar 31, 2009 at 3:19 AM, jfager jfa...@gmail.com wrote: Simply having a configuration file - okay.  What format?  What if the end user wants to keep their

Re: Thoughts on language-level configuration support?

2009-03-31 Thread Lorenzo Gatti
On 31 Mar, 09:19, jfager jfa...@gmail.com wrote: On Mar 31, 2:54 am, David Stanek dsta...@dstanek.com wrote: On Mon, Mar 30, 2009 at 9:40 AM, jfager jfa...@gmail.com wrote: http://jasonfager.com/?p=440. The basic idea is that a language could offer syntactic support for declaring

Re: Thoughts on language-level configuration support?

2009-03-31 Thread jfager
On Mar 31, 2:16 pm, Lorenzo Gatti ga...@dsdata.it wrote: On 31 Mar, 09:19, jfager jfa...@gmail.com wrote: On Mar 31, 2:54 am, David Stanek dsta...@dstanek.com wrote: On Mon, Mar 30, 2009 at 9:40 AM, jfager jfa...@gmail.com wrote: http://jasonfager.com/?p=440. The basic idea is that

Re: Thoughts on language-level configuration support?

2009-03-31 Thread Lawrence D'Oliveiro
In message 36148830-22c0-4f19-ab23- d04d8755a...@s28g2000vbp.googlegroups.com, jfager wrote: I've written a short post on including support for configuration down at the language level ... If you're advocating anything resembling php.ini, you deserve to die. --

Re: Thoughts on language-level configuration support?

2009-03-31 Thread jfager
On Mar 31, 9:42 pm, Lawrence D'Oliveiro l...@geek- central.gen.new_zealand wrote: In message 36148830-22c0-4f19-ab23- d04d8755a...@s28g2000vbp.googlegroups.com, jfager wrote: I've written a short post on including support for configuration down at the language level ... If you're

Re: Thoughts on language-level configuration support?

2009-03-31 Thread David Stanek
On Tue, Mar 31, 2009 at 9:42 PM, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message 36148830-22c0-4f19-ab23- d04d8755a...@s28g2000vbp.googlegroups.com, jfager wrote: I've written a short post on including support for configuration down at the language level ... If

Re: Thoughts on language-level configuration support?

2009-03-31 Thread Rhodri James
On Tue, 31 Mar 2009 07:06:50 +0100, jfager jfa...@gmail.com wrote: On Mar 30, 9:31 pm, Rhodri James rho...@wildebst.demon.co.uk wrote: On Mon, 30 Mar 2009 16:59:12 +0100, jfager jfa...@gmail.com wrote: It's the configuration problem.  Right now you would use something like ConfigParser or

Re: Thoughts on language-level configuration support?

2009-03-31 Thread jfager
On Mar 31, 10:44 pm, Rhodri James rho...@wildebst.demon.co.uk wrote: On Tue, 31 Mar 2009 07:06:50 +0100, jfager jfa...@gmail.com wrote: On Mar 30, 9:31 pm, Rhodri James rho...@wildebst.demon.co.uk wrote: On Mon, 30 Mar 2009 16:59:12 +0100, jfager jfa...@gmail.com wrote: It's the

Thoughts on language-level configuration support?

2009-03-30 Thread jfager
I've written a short post on including support for configuration down at the language level, including a small preliminary half-functional example of what this might look like in Python, available at http://jasonfager.com/?p=440. The basic idea is that a language could offer syntactic support for

Re: Thoughts on language-level configuration support?

2009-03-30 Thread Steven D'Aprano
On Mon, 30 Mar 2009 06:40:00 -0700, jfager wrote: I've written a short post on including support for configuration down at the language level, including a small preliminary half-functional example of what this might look like in Python, available at http://jasonfager.com/?p=440. The basic

Re: Thoughts on language-level configuration support?

2009-03-30 Thread jfager
On Mar 30, 11:17 am, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Mon, 30 Mar 2009 06:40:00 -0700, jfager wrote: I've written a short post on including support for configuration down at the language level, including a small preliminary half-functional example of what this

Re: Thoughts on language-level configuration support?

2009-03-30 Thread Rhodri James
On Mon, 30 Mar 2009 16:59:12 +0100, jfager jfa...@gmail.com wrote: It's the configuration problem. Right now you would use something like ConfigParser or optparse to populate some configuration object, which you would then pass around and extract values from. This would provide two advantages