[x3d-public] X3D to .py conversion refinement, continued: wild duck chase
yottzumm at gmail.com
Thu May 9 18:09:50 PDT 2019
I suggest we try to track down the existing AttributeError’s without reintroducing more AttributeError’s.
I’ve checked in the pipelining serializer with TODO, so you can pursue removing unwrapping SFString. Then we can pursue fixing X3DJSAIL as you say.
As far as more readability, that’s a good idea. I just need like a 1 week break before I try again.
I don’t do casting, I do wrapping, just like the Java code used to do. There’s a jnius.cast (I think this is right spelling) that is available. I think casting would make the code super ugly and bring us back to the other style of code from the other serializer (which works just fine without casting or wrapping). But casting may be required to smash the remaining errors.
Sent from Mail for Windows 10
From: Brutzman, Donald (Don) (CIV)
Sent: Thursday, May 9, 2019 11:31 AM
To: John Carlson
Cc: X3D Graphics public mailing list
Subject: X3D to .py conversion refinement, continued: wild duck chase
Hi John, thanks for checking in your useful improvements .x3d -> python conversion into our pyjnius subversion directory.
Diff log: Moved sets to same line as constructor
The latest version (fewer line breaks) runs without problems and looks good for me too. Example of current output (both python and java) attached.
Suggestion #1: for readability, don't skip lines when only a single close-parenthesis appears, simply append to end of line. See .java as an example:
Suggestion: also please check in your removal of all of the X3D type casting (SFString) (SFFloat) (SFInt32) etc. for further testing. Let's chase Duck Typing.
You reported encountered a few problems with the SFString casting... OK, am thinking it would be best to grasp those nettles, look at all of the exceptions closely, and (hopefully) fix each. We've already made great progress on that score. Often the full fix is pretty simple, i.e. adding another utility method to X3DJSAIL that might have been previously overlooked.
It typically takes a while (all night) to run the full set of .x3d -> .py conversions on all X3D Examples Archives, and so will wait for when you are ready (tonight, tomorrow night, whenever). That next build will give us another round of diffs to review and issues to diagnose/fix.
In the meantime, I will also try to reduce the repetitive/excessive number of "regex failed due to insufficient memory" provoked during pyjnius invocation of X3DJSAIL. If those can be silenced (for now) then I think the build log will again be manageable.
Hope this finds you well. Thanks as ever for the excellent steady progress! 8)
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...
More information about the x3d-public