Re: "GetNextSimpleOption" "is broken"

2014-09-03 Thread Dominik Vogt
On Wed, Sep 03, 2014 at 10:39:39PM +0100, Thomas Adam wrote:
> On Tue, Sep 02, 2014 at 11:14:11PM +0100, Dominik Vogt wrote:
> > On Tue, Sep 02, 2014 at 11:09:49PM +0100, Thomas Adam wrote:
> > > On 2 September 2014 23:04, Dominik Vogt  wrote:
> > > > Can you write the missing sub-rule for the Test command
> > > > (the one that has to do with infostore)?
> > > 
> > > Will do in the next half-hour or so.
> > 
> > Great.  This is the last missing piece of the conditional commands.
> > I'm eager to get over with the basic parsing description draft so
> > I can try some practical things.  :-)
> 
> Are we OK to lay a steak in the ground, and for me to merge
> document-parsing to master?

I don't really care whether it's in the master or elsewhere.

> Then we can consider what to do next, etc?

I'd like to gather some experience with splitting functions into
interface and implementation before tackling the real parser.

> We can always continue fleshing this out over time, etc.

Yes.

Ciao

Dominik ^_^  ^_^

-- 

Dominik Vogt



Re: "GetNextSimpleOption" "is broken"

2014-09-03 Thread Thomas Adam
On Tue, Sep 02, 2014 at 11:14:11PM +0100, Dominik Vogt wrote:
> On Tue, Sep 02, 2014 at 11:09:49PM +0100, Thomas Adam wrote:
> > On 2 September 2014 23:04, Dominik Vogt  wrote:
> > > Can you write the missing sub-rule for the Test command
> > > (the one that has to do with infostore)?
> > 
> > Will do in the next half-hour or so.
> 
> Great.  This is the last missing piece of the conditional commands.
> I'm eager to get over with the basic parsing description draft so
> I can try some practical things.  :-)

Dominik,

Are we OK to lay a steak in the ground, and for me to merge
document-parsing to master?  Then we can consider what to do next, etc?

We can always continue fleshing this out over time, etc.

Kindly,

-- Thomas Adam

-- 
"Deep in my heart I wish I was wrong.  But deep in my heart I know I am
not." -- Morrissey ("Girl Least Likely To" -- off of Viva Hate.)



Re: "GetNextSimpleOption" "is broken"

2014-09-02 Thread Thomas Adam
On Tue, Sep 02, 2014 at 11:14:11PM +0100, Dominik Vogt wrote:
> Great.  This is the last missing piece of the conditional commands.
> I'm eager to get over with the basic parsing description draft so
> I can try some practical things.  :-)

Done.

Heh, I've sneakily been starting a few things, but left it...

-- Thomas Adam

-- 
"Deep in my heart I wish I was wrong.  But deep in my heart I know I am
not." -- Morrissey ("Girl Least Likely To" -- off of Viva Hate.)



Re: "GetNextSimpleOption" "is broken"

2014-09-02 Thread Dominik Vogt
On Tue, Sep 02, 2014 at 06:22:28PM -0400, Dan Espen wrote:
> > I don't mind.  But I certainly _dislike_ the ridiculous tokens we have
> > now in terms of w., i., etc., etc.  I'd much rather we
> > deferred that part until much later on, as I've a few notes regarding
> > expansion versus information coming out of fvwm (and how that's stored
> > in fvwm, etc.)
> 
> Just kibitzing here, but when I do re-factoring,
> I like to start with consistent names.

> I could see how changing names might cause git -> cvs issues.

That's actually something I'd like to move as far into the future
as possible.  I'd rather start with all the changes that would not
prevent to push fixes in fvwm to the new code.  But eventually it
will happen.

Ciao

Dominik ^_^  ^_^

-- 

Dominik Vogt



Re: "GetNextSimpleOption" "is broken"

2014-09-02 Thread Dominik Vogt
On Tue, Sep 02, 2014 at 06:18:14PM -0400, Dan Espen wrote:
> Dominik Vogt  writes:
> 
> > On Tue, Sep 02, 2014 at 06:07:44PM -0400, Dan Espen wrote:
> >> Dominik Vogt  writes:
> >> > By the way, does anybody know what this "infostore" stuff is
> >> > about?
> >> 
> >> Thomas does, but just in case he doesn't find his own email...
> >> 
> >> https://www.mail-archive.com/fvwm-workers@fvwm.org/msg02706.html
> >> 
> >> Seems reasonable, but I suggest, from infostore.h:
> >> 
> >>   MetaInfo *new_metainfo(void);
> >>   void insert_metainfo(char *, char *);
> >>   char *get_metainfo_value(const char *);
> >>   void print_infostore(void);
> >> 
> >> the new, insert and get functions should all
> >> use the word "infostore", not "metainfo".
> >
> > Hm, is this in a stable release already?  I find the syntax a bit
> > clumsy (the name is not very intuitive, and $[infostore] is so
> > much to type), and if while we're rewriting the parser we might
> > clean that up as well.
> 
> We have SetEnv.
> Does SetVar work for you?

Of course, but it's closely related to parsing and command line
expansion.

> All of 2.6 is stable.

But 2.6.6 is not released.

Ciao

Dominik ^_^  ^_^

-- 

Dominik Vogt



Re: "GetNextSimpleOption" "is broken"

2014-09-02 Thread Dominik Vogt
On Tue, Sep 02, 2014 at 11:15:44PM +0100, Thomas Adam wrote:
> On Tue, Sep 02, 2014 at 11:11:56PM +0100, Dominik Vogt wrote:
> > On Tue, Sep 02, 2014 at 06:07:44PM -0400, Dan Espen wrote:
> > > Dominik Vogt  writes:
> > > > By the way, does anybody know what this "infostore" stuff is
> > > > about?
> > > 
> > > Thomas does, but just in case he doesn't find his own email...
> > > 
> > > https://www.mail-archive.com/fvwm-workers@fvwm.org/msg02706.html
> > > 
> > > Seems reasonable, but I suggest, from infostore.h:
> > > 
> > >   MetaInfo *new_metainfo(void);
> > >   void insert_metainfo(char *, char *);
> > >   char *get_metainfo_value(const char *);
> > >   void print_infostore(void);
> > > 
> > > the new, insert and get functions should all
> > > use the word "infostore", not "metainfo".
> > 
> > Hm, is this in a stable release already?  I find the syntax a bit
> > clumsy (the name is not very intuitive, and $[infostore] is so
> > much to type), and if while we're rewriting the parser we might
> > clean that up as well.
> 
> I don't mind.  But I certainly _dislike_ the ridiculous tokens we have
> now in terms of w., i., etc., etc.

Agreed.

> I'd much rather we
> deferred that part until much later on, as I've a few notes regarding
> expansion versus information coming out of fvwm (and how that's stored
> in fvwm, etc.)

Yes, of course.  Expansion is a terrible mess right now and needs
to be cleaned up, and that will require much thought and planning.

I'd prefer to either make expansion much more similar to what
shells do (i.e. make the general syntax more shell-like) *or* to
do something completely different that does not interfere as much
with the parsing of the underlying shell (maybe easier to
understand and use).

Ciao

Dominik ^_^  ^_^

-- 

Dominik Vogt



Re: "GetNextSimpleOption" "is broken"

2014-09-02 Thread Dan Espen
Thomas Adam  writes:

> On Tue, Sep 02, 2014 at 11:11:56PM +0100, Dominik Vogt wrote:
>> On Tue, Sep 02, 2014 at 06:07:44PM -0400, Dan Espen wrote:
>> > Dominik Vogt  writes:
>> > > By the way, does anybody know what this "infostore" stuff is
>> > > about?
>> > 
>> > Thomas does, but just in case he doesn't find his own email...
>> > 
>> > https://www.mail-archive.com/fvwm-workers@fvwm.org/msg02706.html
>> > 
>> > Seems reasonable, but I suggest, from infostore.h:
>> > 
>> >   MetaInfo *new_metainfo(void);
>> >   void insert_metainfo(char *, char *);
>> >   char *get_metainfo_value(const char *);
>> >   void print_infostore(void);
>> > 
>> > the new, insert and get functions should all
>> > use the word "infostore", not "metainfo".
>> 
>> Hm, is this in a stable release already?  I find the syntax a bit
>> clumsy (the name is not very intuitive, and $[infostore] is so
>> much to type), and if while we're rewriting the parser we might
>> clean that up as well.
>
> I don't mind.  But I certainly _dislike_ the ridiculous tokens we have
> now in terms of w., i., etc., etc.  I'd much rather we
> deferred that part until much later on, as I've a few notes regarding
> expansion versus information coming out of fvwm (and how that's stored
> in fvwm, etc.)

Just kibitzing here, but when I do re-factoring,
I like to start with consistent names.
I could see how changing names might cause git -> cvs issues.

-- 
Dan Espen



Re: "GetNextSimpleOption" "is broken"

2014-09-02 Thread Dan Espen
Dominik Vogt  writes:

> On Tue, Sep 02, 2014 at 06:07:44PM -0400, Dan Espen wrote:
>> Dominik Vogt  writes:
>> > By the way, does anybody know what this "infostore" stuff is
>> > about?
>> 
>> Thomas does, but just in case he doesn't find his own email...
>> 
>> https://www.mail-archive.com/fvwm-workers@fvwm.org/msg02706.html
>> 
>> Seems reasonable, but I suggest, from infostore.h:
>> 
>>   MetaInfo *new_metainfo(void);
>>   void insert_metainfo(char *, char *);
>>   char *get_metainfo_value(const char *);
>>   void print_infostore(void);
>> 
>> the new, insert and get functions should all
>> use the word "infostore", not "metainfo".
>
> Hm, is this in a stable release already?  I find the syntax a bit
> clumsy (the name is not very intuitive, and $[infostore] is so
> much to type), and if while we're rewriting the parser we might
> clean that up as well.

We have SetEnv.
Does SetVar work for you?

All of 2.6 is stable.

-- 
Dan Espen



Re: "GetNextSimpleOption" "is broken"

2014-09-02 Thread Thomas Adam
On Tue, Sep 02, 2014 at 11:11:56PM +0100, Dominik Vogt wrote:
> On Tue, Sep 02, 2014 at 06:07:44PM -0400, Dan Espen wrote:
> > Dominik Vogt  writes:
> > > By the way, does anybody know what this "infostore" stuff is
> > > about?
> > 
> > Thomas does, but just in case he doesn't find his own email...
> > 
> > https://www.mail-archive.com/fvwm-workers@fvwm.org/msg02706.html
> > 
> > Seems reasonable, but I suggest, from infostore.h:
> > 
> >   MetaInfo *new_metainfo(void);
> >   void insert_metainfo(char *, char *);
> >   char *get_metainfo_value(const char *);
> >   void print_infostore(void);
> > 
> > the new, insert and get functions should all
> > use the word "infostore", not "metainfo".
> 
> Hm, is this in a stable release already?  I find the syntax a bit
> clumsy (the name is not very intuitive, and $[infostore] is so
> much to type), and if while we're rewriting the parser we might
> clean that up as well.

I don't mind.  But I certainly _dislike_ the ridiculous tokens we have
now in terms of w., i., etc., etc.  I'd much rather we
deferred that part until much later on, as I've a few notes regarding
expansion versus information coming out of fvwm (and how that's stored
in fvwm, etc.)

-- Thomas Adam

-- 
"Deep in my heart I wish I was wrong.  But deep in my heart I know I am
not." -- Morrissey ("Girl Least Likely To" -- off of Viva Hate.)



Re: "GetNextSimpleOption" "is broken"

2014-09-02 Thread Dominik Vogt
On Tue, Sep 02, 2014 at 11:09:49PM +0100, Thomas Adam wrote:
> On 2 September 2014 23:04, Dominik Vogt  wrote:
> > Can you write the missing sub-rule for the Test command
> > (the one that has to do with infostore)?
> 
> Will do in the next half-hour or so.

Great.  This is the last missing piece of the conditional commands.
I'm eager to get over with the basic parsing description draft so
I can try some practical things.  :-)

Ciao

Dominik ^_^  ^_^

-- 

Dominik Vogt



Re: "GetNextSimpleOption" "is broken"

2014-09-02 Thread Dominik Vogt
On Tue, Sep 02, 2014 at 06:07:44PM -0400, Dan Espen wrote:
> Dominik Vogt  writes:
> > By the way, does anybody know what this "infostore" stuff is
> > about?
> 
> Thomas does, but just in case he doesn't find his own email...
> 
> https://www.mail-archive.com/fvwm-workers@fvwm.org/msg02706.html
> 
> Seems reasonable, but I suggest, from infostore.h:
> 
>   MetaInfo *new_metainfo(void);
>   void insert_metainfo(char *, char *);
>   char *get_metainfo_value(const char *);
>   void print_infostore(void);
> 
> the new, insert and get functions should all
> use the word "infostore", not "metainfo".

Hm, is this in a stable release already?  I find the syntax a bit
clumsy (the name is not very intuitive, and $[infostore] is so
much to type), and if while we're rewriting the parser we might
clean that up as well.

Ciao

Dominik ^_^  ^_^

-- 

Dominik Vogt



Re: "GetNextSimpleOption" "is broken"

2014-09-02 Thread Thomas Adam
On 2 September 2014 23:04, Dominik Vogt  wrote:
> On Tue, Sep 02, 2014 at 11:00:13PM +0100, Thomas Adam wrote:
>> On Tue, Sep 02, 2014 at 10:55:43PM +0100, Dominik Vogt wrote:
>> > By the way, does anybody know what this "infostore" stuff is
>> > about?
>>
>> https://www.mail-archive.com/fvwm-workers@fvwm.org/msg02706.html
>
> Thenks.  Can you write the missing sub-rule for the Test command
> (the one that has to do with infostore)?

Will do in the next half-hour or so.

-- Thomas Adam



Re: "GetNextSimpleOption" "is broken"

2014-09-02 Thread Dan Espen
Dominik Vogt  writes:

> On Tue, Sep 02, 2014 at 05:48:05PM -0400, Dan Espen wrote:
>> Dominik Vogt  writes:
>> 
>> > Just found this comment in CMD_Test:
>> >
>> >/*
>> > * unfortunately, GetNextSimpleOption is
>> > * * broken, does not accept quoted empty ""
>> > */
>> >
>> > Actually, GetNextSimpleOption() is _not_ broken.  The parsing
>> > library guarantees never to return empty tokens.  This is a
>> > feature, albeit a questionable one.
>> 
>> The CVS command you are looking for is "annotate".
>> 
>> 1.107 (migo 13-Aug-05): /* unfortunately, GetNextSimpleOption is
>
> Well, I thought it might be worhtwhile to mention it in public
> while we're working on the parser anyway.
>  
>> Could be that it was broken when the comment was written.
>
> No, it has always been this way.  This guarantee is used in many
> places where parsing is done, and when I coded
> GetNextSimpleOption() this was in there from the start (because it
> simply uses the same underlying implementation of the tokenisation
> functions as the rest of the parsing library).
>
> By the way, does anybody know what this "infostore" stuff is
> about?

Thomas does, but just in case he doesn't find his own email...

https://www.mail-archive.com/fvwm-workers@fvwm.org/msg02706.html

Seems reasonable, but I suggest, from infostore.h:

  MetaInfo *new_metainfo(void);
  void insert_metainfo(char *, char *);
  char *get_metainfo_value(const char *);
  void print_infostore(void);

the new, insert and get functions should all
use the word "infostore", not "metainfo".

-- 
Dan Espen



Re: "GetNextSimpleOption" "is broken"

2014-09-02 Thread Dominik Vogt
On Tue, Sep 02, 2014 at 11:00:13PM +0100, Thomas Adam wrote:
> On Tue, Sep 02, 2014 at 10:55:43PM +0100, Dominik Vogt wrote:
> > By the way, does anybody know what this "infostore" stuff is
> > about?
> 
> https://www.mail-archive.com/fvwm-workers@fvwm.org/msg02706.html

Thenks.  Can you write the missing sub-rule for the Test command
(the one that has to do with infostore)?

Ciao

Dominik ^_^  ^_^

-- 

Dominik Vogt



Re: "GetNextSimpleOption" "is broken"

2014-09-02 Thread Thomas Adam
On Tue, Sep 02, 2014 at 10:55:43PM +0100, Dominik Vogt wrote:
> By the way, does anybody know what this "infostore" stuff is
> about?

https://www.mail-archive.com/fvwm-workers@fvwm.org/msg02706.html

-- Thomas Adam

-- 
"Deep in my heart I wish I was wrong.  But deep in my heart I know I am
not." -- Morrissey ("Girl Least Likely To" -- off of Viva Hate.)



Re: "GetNextSimpleOption" "is broken"

2014-09-02 Thread Dominik Vogt
On Tue, Sep 02, 2014 at 05:48:05PM -0400, Dan Espen wrote:
> Dominik Vogt  writes:
> 
> > Just found this comment in CMD_Test:
> >
> > /*
> >  * unfortunately, GetNextSimpleOption is
> >  * * broken, does not accept quoted empty ""
> >  */
> >
> > Actually, GetNextSimpleOption() is _not_ broken.  The parsing
> > library guarantees never to return empty tokens.  This is a
> > feature, albeit a questionable one.
> 
> The CVS command you are looking for is "annotate".
> 
> 1.107 (migo 13-Aug-05): /* unfortunately, GetNextSimpleOption is

Well, I thought it might be worhtwhile to mention it in public
while we're working on the parser anyway.
 
> Could be that it was broken when the comment was written.

No, it has always been this way.  This guarantee is used in many
places where parsing is done, and when I coded
GetNextSimpleOption() this was in there from the start (because it
simply uses the same underlying implementation of the tokenisation
functions as the rest of the parsing library).

By the way, does anybody know what this "infostore" stuff is
about?

Ciao

Dominik ^_^  ^_^

-- 

Dominik Vogt



Re: "GetNextSimpleOption" "is broken"

2014-09-02 Thread Dan Espen
Dominik Vogt  writes:

> Just found this comment in CMD_Test:
>
>   /*
>* unfortunately, GetNextSimpleOption is
>    * * broken, does not accept quoted empty ""
>*/
>
> Actually, GetNextSimpleOption() is _not_ broken.  The parsing
> library guarantees never to return empty tokens.  This is a
> feature, albeit a questionable one.

The CVS command you are looking for is "annotate".

1.107 (migo 13-Aug-05): /* unfortunately, GetNextSimpleOption is

Could be that it was broken when the comment was written.

-- 
Dan Espen



"GetNextSimpleOption" "is broken"

2014-09-02 Thread Dominik Vogt
Just found this comment in CMD_Test:

/*
 * unfortunately, GetNextSimpleOption is
 * * broken, does not accept quoted empty ""
 */

Actually, GetNextSimpleOption() is _not_ broken.  The parsing
library guarantees never to return empty tokens.  This is a
feature, albeit a questionable one.

Ciao

Dominik ^_^  ^_^

-- 

Dominik Vogt