[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: (Possible) menu code rewrite

Chris Lawrence wrote:
> On Jul 16, Joey Hess wrote:
> > So there's an entire programming language in there, and this is
> > probably menu's worst problem. The language is ill-specified, has ad-hoc
> > syntax, is not very powerful, and the implementation is dog slow. Since
> > I do mostly agree that having a full programming language on tap for the
> > menu-methods files, given the great diversity of outputs they need to
> > support. What I have been feeling would be the best thing to do is to
> > pick a real programming language (perl or python), and make the files be
> > written in that. 
> That was my general feeling, as well.  What I have so far (the legacy
> menu file parser) is in Python, and seems reasonably fast.

Not suprising, but do note I was talking about the format of the
/etc/menu-menthods files themselves; not the menu program. I think
_they_ should be in python (or any equivilant language; a simplified
dialect might be better but I don't know how ameanable python is to
constructing special-purpose dialects out of it).

> specification, and the remaining 5% - mainly needs=wm|vc - we can do
> with vendor extensions if absolutely needed if the XDG people aren't
> receptive - which I hope won't be the case [i.e. I hope they will be
> receptive, to avoid the confusing double-negative]).

There are also weird little things like needs=wmappearance and other
window-manager specific stuff.

joey@silk:/usr/lib/menu>perl -lne 'print $a if ($a)=m/needs="?(\w+)"?/' * |sort | uniq -c |sort -n 
      2 wm
      5 vc
      6 wmappearance
     14 wmaker
     31 X11
     56 dwww
     74 text
    399 x11

> I'm also not entirely sure how to deal with dwww overloading the menu
> system for its own nefarious purposes if we do transition to something
> else, although I believe we can work this into the .desktop format too
> with the Link type.

The dwww thing seems to have died a well-deserved death. See doc-base
which does a lot of things dwww cannot do with the menu system. Of
course, doc-base files should probably be in xml. Really. :-)

joey@silk:/usr/lib/menu>find . -type f -not -name doc-base\* |xargs grep dwww |wc -l
joey@silk:/usr/lib/menu>find . -type f -name doc-base\* |wc -l     
joey@silk:/usr/lib/menu>find . -type f |wc -l
joey@silk:/usr/lib/pdmenu>dpkg -l |grep ^ii | wc -l

Given this sample, less than 1% of packages using dwww directly; with more
than 5x as many using doc-base.

see shy jo

To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Reply to: