So, I went ahead and decided to see how difficult it would be to convert the entire project to TypeScript, on the one hand, or else, while also considering just how difficult it might be to write a complete REACT environment from scratch. Maybe not that hard at all. Easy weekend project? Maybe. It is usually never actually that simple, but why not give it a whack?
First, I went ahead and started working on converting my CSignalView MFC class into TypeScript, since ideally JavaScript should be deprecated and not used for new work, but as usual, your mileage may vary.

So far, so good. Things look even better on the WebGL side, as far as doing some of the OpenGL initialization. That is to say, if any of this actually works.

So, the particular tool that I used seems to have just enough know-how to give me some boilerplate WebGL code that appears to have the ability to draw a grid and even plot some "waveform" data. So maybe if I decide to use Euclidean geometry, WebGL style, this could be adapted, while remaining faithful to the implementation details of the Euclid.cpp code. Not surprisingly, or perhaps quite surprisingly (take your pick), when trying to convert the Euclidean stuff, the tool that I tried using pretty much fell apart. Maybe it will work better if I ask it to convert one function at a time, which is pretty annoying.

As you can see, the conversion tool in question pretty much gave up on certain functions, like the pentagon construction, hexagon construction, and also the angle bisector stuff, and that is all just a bunch of straight-up function calling and simple mathematical manipulation. Like I said, maybe it will work better if I spoon-feed it one or two functions at a time. Yet it is kind of funny that it does so well with some really messy code like WebGL initialization, yet falls apart on the same code that Co-Pilot fell apart on a while back.
glgorman
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.