[x3d-public] C/C++/C#---X3DCSAIL/ECMAScript 6 apps/module work

John Carlson yottzumm at gmail.com
Thu Aug 27 00:04:53 PDT 2020


We are currently working on an ECMAScript serializer.   We will also
probably need an X3dToES6.xslt.   I suggest looking into Facebook’s
Transcoder or OpenAI’s GPT-3

My serializer is here and runs as part of local.sh or server.sh

https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/node/ECMAScriptSerializer.is

It’s easy to change folders and issue the command ‘sh local.sh’. In the
shell folder


The current code runs as JavaScript and puts ECMAScriptcode in
net/ecma/data.   But this requires a second pair of eyes in short term.

While the code runs there are many type warnings.  And a very small amount
of output.


Hand generated apps can be found in github.com/coderextreme/es6x3d/app.js
and app2j.js. These are currently what’s driving the effort.

There is hopefully a small amount of effort involved in generating some
thing compliant with the es6 effort.

On Wed, Aug 26, 2020 at 4:00 PM Don Brutzman <brutzman at nps.edu> wrote:

> Hi John, here are answers to your questions.
>
>
>
> On 8/11/2020 9:48 AM, John Carlson wrote:
>
> >
>
> > After perusing the previous efforts found in www.web3d.org/x3d/languages
> <http://www.web3d.org/x3d/languages>
>
>
>
> thanks for looking.  am not finding anything there... you must mean in
> subversion:
>
>
>
> * https://svn.code.sf.net/p/x3d/code/www.web3d.org/x3d/languages
>
>
>
> alternatively
>
>
>
> *
> https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/languages/
>
>
>
> > it looks like the C and C++ SAI implementations need the most effort.
>  The C# libraries are the most complete. I haven't been able to tell if the
> libraries are hand generated, or auto-generated. If they were
> autogenerated, it would be nice to have the tool which auto-generated them.
>
> >
>
> > In short, it appears (but a second set of eyes is welcome) that we have
> C, C++ and C# proposed standards for language binding at the ISO CD level,
> found on github?   And a C# library and C/C++/C# SAI examples on
> sourceforge?
>
>
>
> The source we have is a year old.
>
>
>
> The request to Myeong Won Lee is regarding what is latest.
>
>
>
> > What is the next step after CD for the C/C++/C# standards?
>
>
>
> First step is working draft, we need code implementation to document in
> the draft spec.
>
>
>
> > Would the new work give us an opportunity to switch implementation
> efforts to github?
>
>
>
> am not eager to change our entire workflow while pushing to meet multiple
> X3D deadlines this year.
>
>
>
> first law of engineering: "if it ain't broke, don't fix it"
>
>
>
> > To be clear there, there are 5 efforts:
>
> >
>
> > 1) standardizing a specification.   This is primarily documenting
> various interfaces and dictionaries.
>
> >
>
> > 2) implementing a specification
>
> >
>
> > 3) implementing validation tools (schemas), especially for loosely typed
> encodings.
>
> >
>
> > 4) implementing example apps
>
> >
>
> > 5) implementing comprehensive test cases and test frameworks.
>
> >
>
> > I am primarily interested in efforts 3-5.  It seems like we are
> currently working on 1 and 2 with some examples that go into the
> standards?   Are we prepared to work on 3-5 yet?
>
>
>
> No disagreements in general, makes sense.  Meanwhile I think if you look
> at my prior recent mail (replying to you 11 August 2020, also found below)
> on this topic you will find an entire plan of action laid out already,
> steps a through p.
>
>
>
> * [x3d-public] C/C++/C#---X3DCSAIL
>
>    http://web3d.org/pipermail/x3d-public_web3d.org/2020-August/013403.html
>
>
>
> I am wondering if we can find C/C++/C# experts who want to help.  Getting
> APIs correct, repeatable and reusable are guru-level challenges.
>
>
>
> > ============================================
>
> > I primarily got interested in the ES6 work because it looked like we
> were divorcing the ECMAScript and Python implementations from outside
> dependencies (X3DJSAIL), plus I wanted a firm footing in ES6 classes
> instead of a transpiled version of Java, one that used ES6 best practices
> instead of Java best practices. However, that work has been delayed due to
> lack of examples and my own ennui/listlessness.  That is, I find it hard to
> work on both apps and libraries at the same time, and I would prefer to
> work on apps.  I've stated this before. This might provide an additional
> revenue stream.
>
>
>
> motivation is up to you.  hard to imagine anyone with more wonderful 3D
> challenges and opportunities than us!  8)
>
>
>
> > I do think that ES6 and X3DJSAIL effort should be separated.   This
> would allow an implementation separate from the npm java module and/or
> nashorn/GraalVM.
>
>
>
> still agreed
>
>
>
> > While I tried to implement an ES6 library, it's still a long way from
> working with a whole test suite.
>
>
>
> still think that we do not need a whole test suite.  As with X3D in
> C/C++/C#, and as with X3D in Java Python Turtle and JSON, we simply need
> good design patterns.  Then we use X3DUOM and write a custom stylesheet (or
> other converter) that produces the whole codebase suite.
>
>
>
> Same story as before, demonstrated repeatedly as a successful approach.
> "Nothing succeeds like success." 8)
>
>
>
> > I do not know exactly where we are with ES6 X3D standardization?   What
> are the tasks to accomplish for standardization?
>
>
>
> We must finish X3D4 before Dick Puk and I will work on any other
> X3D-related specifications.
>
>
>
> Once started, the various language bindings and file encodings for X3D4
> will all be quite similar, each variations on the same themes.
>
>
>
> We have X3D SAI for Ecmascript.  When that is updated, I think you want to
> propose ES6 for Node.js.
>
>
>
> Hope this makes sense.
>
>
>
> > John
>
> >
>
> > On Tue, Aug 11, 2020 at 9:01 AM Don Brutzman <brutzman at nps.edu <mailto:
> brutzman at nps.edu>> wrote:
>
> >
>
> >     John, thanks for posting.  There are a number of steps still to go,
> here is more information.
>
> >
>
> >     a. We currently 2/3 complete in our virtual 3-week-long annual
> meeting for ISO Standards Committee 24.  Ordinarily this is a dedicated
> 1-week face-to-face meeting, it is quite involved.
>
> >
>
> >     b. Dr. Myeong Won Lee of Suwon University has provided an update to
> the C/C++/C# language bindings for X3D that were first proposed two years
> ago.
>
> >
>
> >     [1]     Web3D Consortium Members are now considering C, C++ and C#
> language bindings for
>
> >              #X3D Graphics International Standard. Member value
> continues to grow, early adopters are advised to join!
>
> >              All community feedback is welcome too.
>
> >     https://twitter.com/Web3DConsortium/status/984257256270135296
>
> >
>
> >     c. The Scene Access Interface (SAI) language bindings are strictly
> defined by X3D specifications.  No proprietary technology or
> external-library dependencies are required.
>
> >
>
> >     [2]     Web3D Recommended Standards
>
> >     https://www.web3d.org/standards
>
> >
>
> >     d. We have captured all X3D scene-graph structure and typing in the
> X3D Unified Object Model (X3DUOM).
>
> >
>
> >     [3]     X3D Unified Object Model (X3DUOM)
>
> >     https://www.web3d.org/specifications/X3DUOM.html
>
> >
>
> >     e. We have achieved autogeneration from X3DUOM to open-source
> implementations that support SAI for Java, Python and Turtle.  This occurs
> through careful consideration of design patterns to hold strictly designed
> data structures.  This does not include any form of rendering or
> platform-specific adaptations.
>
> >
>
> >     [4]     X3D Graphics Standards Relationships
>
> >
> https://www.web3d.org/specifications/X3dSpecificationRelationships.png
>
> >
>
> >     f. A major benefit of autogeneration is that everything is exactly
> correct and can always track X3D4 refinements.
>
> >
>
> >     g. As you know, we hope to repeat this pattern for JavaScript.  Your
> experience with X3DJSONLD and JavaScript means that an autogenerated
> implementation oriented to Node.js is appealing.
>
> >
>
> >     h. Once implementations are stable, we will have to write
> corresponding X3D SAI specifications to match, likely next spring.
>
> >
>
> >     i. Professor Lee has also produced an example code library that
> should serve as a good basis for design templates.
>
> >
>
> >     j. We hope to begin tackling this new task after SIGGRAPH.
>
> >
>
> >     k. Since an unavoidable FAQ will be "How are the C/C++/C#
> implementations and specifications similar, and how are they different?"
> the X3D working group currently plans to work all three in tandem and
> submit all three specifications simultaneously.  This approach will
> maximize consistency and best-of-breed design patterns.
>
> >
>
> >     l. Clearly we will need multiple X3D experts who are each familiar
> with C, C++ and C# in order to achieve our goals of useful reusable
> open-source libraries and specifications.
>
> >
>
> >     m. This is not a debate about programming styles or preferences,
> rather how do we produce the most platform-neutral APIs that are widely
> reusable.
>
> >
>
> >     n. Resulting codebases will be hooked up to regression testing of
> the X3D Examples Archives.
>
> >
>
> >     [5]     X3D Resources, Examples: Scene Archives for X3D
>
> >
> https://www.web3d.org/x3d/content/examples/X3dResources.html#Examples
>
> >
>
> >     o. Success is measured by how these libraries encourage adoption of
> X3D by C/C++/C# applications, either open source or commercial. Original
> announcement follows.
>
> >
>
> >     [6]     [x3d] X3D C and C++ language bindings NWIPs [corrected copy]
>
> >
> http://web3d.org/pipermail/x3d-public_web3d.org/2018-April/008598.html
>
> >
>
> >     p. I'll be sending out an annual Web3D ISO liaison report to Web3D
> Consortium members in another week, once the SC24 meeting is complete.
> This report will get released publicly sometime afterwards.
>
> >
>
> >     q. So the answer to most of your questions below is "same as before"
> with Java, Python, Turtle.
>
> >
>
> >     Hope this makes sense.  These are new big projects, adapting and
> repeating capabilities that we have already demonstrated three times.
>
> >
>
> >     Worthy mountains to climb that make X3D ever-more available.
> Usually this is where business plans add a sentence saying, approximately,
> "total world domination to follow."  8)
>
> >
>
> >     Thanks everyone for considering the possibilities.  Have fun with
> X3D4!  8)
>
> >
>
> >
>
> >     On 8/10/2020 5:10 PM, John Carlson wrote:
>
> >      >
>
> >      > We're looking for some programmers to contribute to a project
> creating X3DCSAIL, a C/C++/C# version of X3DJSAIL.
>
> >      >
>
> >      > My question is, how will X3DCSAIL be different from OpenInventor
> or Coin3D or FreeWRL?  Can these run headless?   Can we adapt one of these
> to run headless?  It looks like OpenInventor has a headless mode, but I'm
> not sure about the others.
>
> >      >
>
> >      > How might we pursue this library?  What are the requirements?
> Who are the customers?   Should we just create examples, and adopt one of
> the existing open source X3D browser implementations?  Is there a website
> describing the goals of this project?  Should I create one?
>
> >      >
>
> >      > I have something written in C++ that reads in X3D JSON and writes
> out X3D XML, but that's pretty much a prototype at this stage--works with a
> couple of cases.  This opens up C++ X3D browser to the X3D JSON
> capabilities similar to how X3DJSONLD transformed X_ITE and X3DOM.
>
> >      >
>
> >      > The cplusplus version in in <X3DJSONLD>/src/main/cplusplus/src
>
> >      >
>
> >      > More testing is welcome!
>
> >      >
>
> >      > We currently do not have a X3dToC.xslt, but would appreciate
> examples of C++ code that people would like to develop to use X3DCSAIL, so
> we can pattern the appropriate stylesheet for the X3DCSAIL library.
>
> >      >
>
> >      > O can provide a C++ Serializer that will convert a DOM document
> to C++ using JavaScript code, but  I'm also wondering what kind of target I
> should hit, similar to what we might do with a stylesheet.
>
> >      >
>
> >      > So we're just looking for C++ test cases at this point.
>
> >      >
>
> >      > Thanks,
>
> >      >
>
> >      > John
>
>
>
> all the best, Don
>
> --
>
> Don Brutzman  Naval Postgraduate School, Code USW/Br
> brutzman at nps.edu
>
> Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
>
> X3D graphics, virtual worlds, navy robotics
> http://faculty.nps.edu/brutzman
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20200827/754da57e/attachment-0001.html>


More information about the x3d-public mailing list