[x3d-public] local files. Help debugging with X3DJSAIL runtime errors? Maven. Next steps. Continuous Integration

John Carlson yottzumm at gmail.com
Mon Oct 23 14:50:02 PDT 2017


More thoughts.   Someone should probably bite the bullet and buy Saxon-JS.
 We need to localize File, Stylesheet and Properties classes in X3DJSAIL to
something that can be replaced in JavaScript in node.js or possibly the
browser.

Alex, can you set up a ci server configuration? We'd like it to use ant and
work on svn check-in to the x3d-code/www.web3d.org folder on sourceforge.
 Please give me a figure for the amount you want to be paid for this work.
 We'd like to be able to fire off builds from the web as well.   Please
check all configuration files except passwords into GitHub.  Ultimately I
think we will have Leonard or someone follow up after you to install on a
web3d server, so be sure to create documentation on what you did.  Or maybe
you and Leonard can work together.

The idea Don, is to collect various ant targets that you want built on
checkin, periodically, or on demand, and then you can run them from the
web.   People can then download products directly from the ci server when
they see something is successful.  And there's likely a date associated
with the product.  So you can have your history of products as well.  It
really is quite nice.   I guess I'd go with oracle's ci server if it's
free.  Or choose an open source one (Travis ci seems popular).

Note don, that the ci works on checked in code which is outside your cycle.

John


On Oct 23, 2017 5:07 PM, "John Carlson" <yottzumm at gmail.com> wrote:

Alex, I'm probably going to be spending some time working with Don going
over minor details and futures of X3D.  You are welcome to join me.   I
will pay for deliverables now, not by the hour.


On Oct 23, 2017 4:12 PM, "Don Brutzman" <brutzman at nps.edu> wrote:

Hi John, thanks for looking at this.

Netbeans provides excellent debug support, am able to troubleshoot anything
in X3DJSAIL using it.  Setting breakpoints is no problem.


Familiarity with the code is usually required.  I've never programmed an
X3DJSAIL app by hand, and you have.





Typically I test using the quite-long examples/HelloWorld.java which has
numerous "smoke tests."  Set a breakpoint there or in classes, trace
values, step, etc.

I only have a little experience with Maven, so that is a better addition
for someone else.  Open source, contributions welcome.


Yep, have whole maven project in a separate repository.


Before going to continuous integration, it might be advisable to build a
unit-test suite.  I haven't wanted to spin off into test land from our
primary development since dev workflow usually looks like


Yes, I have a regression testing suite.   Unit test suite could be
generated similar to X3DJSAIL and placed in a test folder.


        idea >
        modify source for compile checks >
        copy/paste into creation stylesheet >
        fix XSLT stylesheet logic, validation >
        regenerate source >
        recompile >
        add or use test code in HelloWorldProgram >
        debug as needed >
        confirm view >confirm outputs using version diffs >
        multiple validation tests of X3D products >
        confirm display view >
        rinse lather repeat >
        commit changes and deploy

        plus periodically run 3904 unit tests when recompiling models in
X3D Example Archives

happy to note is that it is REALLY REALLY HARD for undetected errors to
creep in.  A great many tests get applied throughout.  8)

this past weekend saw a number of tooltip improvements that get integrated,
plus addition of some simple validation tests (i.e. when coordIndex
colorIndex etc. are needed).

for me, CI pushes part of the above pretty-intense testing loop into the
far distance, probably wouldn't help my progress.  Might well help multiple
contributors with running tests tho.


Yes, but I would think you could show your unit tests to customers as
evidence of code quality.   We are professionals?   That said, I need to
make unit tests in my code too.  Code coverage is probably important.


Sorry but Web3D is a bare-bones non-profit.  Ideas welcome to get major
sponsorship to support dev ops such as yours.  Who is writing proposals?


one can do ci with ant of course.   It just requires a ci server and
configuration.

I don't have the grant writing facilities of an educational institution,
nor the degree.   I could discuss ideas for getting a degree that I've
considered, including a combination of programming by demonstration,
sequence clustering, imitation learning, one shot imitation learning, and
throw in AR/VR into the mix for grins.


have been hoping that you can just use one of the jars to greatly simplify
your workflow, how is that working out?


Works fine as long as I don't need to make changes.   If we could integrate
all the bug reports I've made in the last 5 months.  And recent changes to
generate JS from X3DJSAIL which don't work because of an unknown bug in
npm-jvm.js.


am keen to pursue nashorn and X3DJSONLD correspondences/integration when
you are ready, that will be great.


Yes, the only thing sticking there would be a working npm-jvm.js.  or
alternatively, support for X3dToES6.xslt.   or whatever ES Standard Nashorn
is at with Java 9.


getting python design patterns might encourage us to automate library
production... X3DPSAIL anyone?!


I have successfully integrated X3DJSAIL with Python using pyjnius.   I am
not sure we need pure python.   Probably our Asian friends agree, and why
we haven't heard from them.

So Python and nashorn can use X3DJSAIL, but we don't have a real browser
solution or a node.js solution.  We also don't have a X3dToPy.xslt.   I do
not think full X3DJSAIL is appropriate for the browser and would encourage
a more limited profile, or modular ES6.


am hoping "java code to large" from huge arrays might get fixed by Java 9,
or we figure out a better X3dToJava.xslt pattern than breaks arrays into
more manageable blocks.  Perhaps predefinition of such arrays in blocks?


Break each subarray into a class.  Proven successful with X3DJSONLD I
believe.


will update our X3D Unified Object Model writeups soon.  each loop is
good.  onward!


On 4/5/2017 2:08 AM, yottzumm at gmail.com wrote:

> Don,
>
> Hmm.  Maybe set breakpoints by the ProtoInstances and ProtoDeclare.  I can
> bring up in the debugger, but so far, I haven’t been running any IDE.
> Would be nice if we could “Create new X3DSAIL project” in an IDE (hint,
> hint).
>
> I would say it’s nested prototypes which are thwarting the current
> algorithm, but would have to put it under a debugger to make sure.  I’m
> getting a lot of these fieldValue errors.  You should at least write out to
> one format in  your app code, maybe provide methods for each format, with
> an  output file parameter.
>
> We should investigate uploading a version of X3DJSAIL to a Maven 2
> repository for testing with Maven and IDEs.
>
> What you probably should do is create a maven POM for building X3DJSAIL.
> I can probably help, but will require source to be in
> PROJECT/src/main/java/org/… as per normal Maven projects—that is, I don’t
> know how to use stylesheets in Maven, except that it probably goes in the
> generate-sources phase.  The pom.xml will go in PROJECT.  Your example will
> go in PROJECT/src/test/java/.  resources (stylesheets) go in
> PROJECT/src/main/resources/.
>
> Time to advance to the state of the art for both of us?  I’ve been writing
> shell scripts **blush**.
>
>
> I will write a test project once the main X3DJSAIL pom is written.
>
> This will make X3DJSAIL palatable for the majority of Java programmers,
> and will allow for versioning, etc.
>
> Should we set up a meeting to go over Maven?  Roy?
>
> I’m wearing out my processors running 8 jobs at a time.  Any chance I can
> get consortium resources once we get these maven projects built and put
> into continuous integration.  That is, an account on the continuous
> integration web page?  I’d like to see the whole thing built and redeployed
> automatically (if build is successful) whenever something is checked in.  I
> do believe this is very realizable.   We can set up separate projects for
> each JSAIL language.
>
> Should I be working towards a JNI version of X3DJSAIL for C++, or go to
> back to python and work on the serializer there (in addition to tracking
> down runtime issues—in any language)?   Or push forward on Nashorn? IKVM
> (convert jars to dlls) may be the best solution for python, C# (windows).
>
> I’m getting many more code too large with the function Java style.
> Perhaps it’s not a good approach if it has more compiler errors than the
> more typical java approach?
>
> Getting the rest of the append errors solved is probably highest priority
> for me.
>
> John
>
> Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for
> Windows 10
>
> *From: *Don Brutzman <mailto:brutzman at nps.edu>
> *Sent: *Wednesday, April 5, 2017 2:59 AM
> *To: *yottzumm at gmail.com <mailto:yottzumm at gmail.com>
> *Subject: *Re: local files. Help debugging with X3DJSAIL runtime errors?
>
>
> looks like you have nested prototypes here.  so if you are sure protos are
> declared before they are instanced, that may be thwarting the current
> algorithm and will require further sleuthing.
>
> On 4/4/2017 11:45 PM, yottzumm at gmail.com wrote:
>
>  >
>
>  >
>
>  > Don wrote:
>
>  >
>
>  > Box.java
>
>  >
>
>  >
>
>  >
>
>  > You get the following error because parent ProtoInstance and related
> ExternProtoDeclare/ProtoDeclare aren't yet connected to the same
> SceneObject, making it impossible to check for correct types.
>
>  >
>
>  >
>
>  >
>
>  > Must also say that your example illustrates classic Java style very
> well, and is thus hard to read/follow.  Certainly legal, but (as this
> example shows) requires more housekeeping.
>
>  >
>
>  >
>
>  >
>
>  > In the functional style, these are connected before it gets to the
> fieldValue invocation.
>
>  >
>
>  >
>
>  >
>
>  > They are?  Please run new attached code (trying to please 😊).  I
> rewrote my serializer for this, so we’d better get it working!  I can
> revert my code if necessary.  Actually, I changed an old serializer…
>
>  >
>
>  >
>
>  >
>
>  > This is the same proto example that everyone is surprised by.  I think
> we may have the same surprise in store for you again!
>
>  >
>
>  >
>
>  >
>
>  > This code is in the more functional style (except one array I think).
>
>  >
>
>  >
>
>  >
>
>  > 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/brutzma
> n
>
>

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/20171023/f83472d7/attachment-0001.html>


More information about the x3d-public mailing list