To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 8508
8507  |  8509
Subject: 
Re: Calling all Meta-commands
Newsgroups: 
lugnet.cad.dev
Date: 
Wed, 19 Mar 2003 13:07:42 GMT
Viewed: 
1293 times
  
In lugnet.cad.dev, Paul Gyugyi writes:
One approach to namespace management is to have format the commands like so:
0 MODULENAME COMMAND blah

This is the approach that Michael Lachman on MLCAD.  In an email, where he
gave us permission to include his meta-command descriptions in our LDraw
specification (yay!) he indicated that he has started to use MLCAD as his
module name for all new meta-commands he defines.

I can see pros and cons on this one.  It certainly addresses the namespace
pollution issue, but for some reason "0 MLCAD ROTSTEP" doesn't seem as nice
to me as "0 ROTSTEP".  ROTSTEP is an extremely powerful and fundamentally
useful mechanism for building instructions, as is buffer exchange.  Its use
and impact goes well beyond MLCAD.

Having said that, LPub would support the concepts no matter what they were
called ;-)


Authors would ask for a unique MODULENAME string to use, and prefix that
in front of any "experimental" commands.  For example, say I want to
create a VRML-style "billboard", a rectangle containing text, with the
centerpoint defined, that always faces the camera, for example to use
for numbering steps.  I'd request the string "LDLITE", and then implement
my new command as:
0 LDLITE BILLBOARD Step 1

Later, some other cad tool might use:
0 L3DGLVIEWCAD BILLBOARD "Step 1"
Since maybe it had trouble with some character and needed quotes,
or just thought they looked nice.

Both authors would propose a new BILLBOARD command to the steering committe,
and discussion would happen about whether the quotes were good, and rev 2.1
of the .DAT syntax would then define the "0 BILLBOARD ..." meta command.  At
which point the tools authors implement the new command, and probably leave
their old command around for compatibility.

Yes.  This has been recommended in this thread before, and I think it makes
a lot of sense for experimental meta-commands, as well as very application
specific data.  I've had people ask for user overrides of program defaults
to be recorded directly in the LDraw file.  Since these are clearly LPub
specific it would make a lot of sense to use the LPUB namespace for this (if
I choose to record the user overrides this way.)



If for some reason two tool authors wanted to both support a set of new
commands (for example, having bricks cast shadows), they could ask for a
MODULENAME, such as "X-SHADOW" and then both tools could use commands like
"0 X-SHADOW SHADOW_SOFTNESS=0.5".

Yes.


-gyug



In lugnet.cad.dev, Larry Pieniazek writes:
In lugnet.cad.dev, Kevin Clague writes:

Would the authors of LDraw compatible applications please list the
meta-commands they have created?  I will compile the list of applications and
the meta-commands they define.

One thing that I think would help reduce namespace pollution is if everyone
did what LTrax did... prefix the command with the app name for uniqueness.
Not a perfect solution, of course.



Message is in Reply To:
  Re: Calling all Meta-commands
 
One approach to namespace management is to have format the commands like so: 0 MODULENAME COMMAND blah Authors would ask for a unique MODULENAME string to use, and prefix that in front of any "experimental" commands. For example, say I want to (...) (21 years ago, 18-Mar-03, to lugnet.cad.dev)

154 Messages in This Thread:
(Inline display suppressed due to large size. Click Dots below to view.)
Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR