Yep, it's not going to be easy.Except that every time Martin makes a change to the master source that change will need to be converted in the open source version.
message ref: 11345
TEMPLOT 3D PLUG TRACK - To get up to speed with this experimental project click here. To watch an introductory video click here. See the User Guide at Bexhill West.
Templot5 - To join this open-source project on GitHub click here. For news of the latest on-going developments click here. Templot5 is now included with Templot2 - download. WIKI
Yep, it's not going to be easy.Except that every time Martin makes a change to the master source that change will need to be converted in the open source version.
The parser is only responsible for converting a stream of tokens into an internal representation of the structure - classes, methods etc. It's the emitter that has to handle to conversion to another language / platform.
In your CharGPT version, for example, converting a byte to a number will probably not work while saving/loading binary box files. The correct conversion is byte > Int8Array.
@nickomI'm sure you're correct. It was just a quick example of converting basic Pascal types to Javascript types. There are specifics that would need to be catered for.
I would suggest that PHP tends to be used for server-side, whereas Javascript is more generally targeted at client-side (although frameworks like Node.js etc. muddy those waters...)@nickom
Hi Nick,
Any particular reason for choosing Javascript?
PHP seems the obvious choice for a web-based application. I find it much easier to write than Javascript, and it might integrate nicely with this forum, and the Companion pages, and the full Search on here.
Martin.
@Rob ManchesterThe issue with breakfast is to remember if you had any never mind what it was !
That's a bit a curate's egg! Interesting to see you managed to get it running in DCE which alleviates many of the problems with converting to Lazarus, all for minimum code translation. It would avoid any problems or need to convert the code to a new language.I thought it worth seeing what would happen in the Delphi Community Edition. After much commenting-out I have managed to get Templot running in the DCE -- here is some evidence:
Obstacles
- We need to convert the pascal code over to Javascript (not 100% sure about this).
- noidea is working on a code parser to do this
Pas2js
- lazbuild now can compile pas2js projects by passing the environment variable PAS2JS with the path of the pas2js executable.
- Project groups with pas2js projects now can compile without being opened.
- New project type Progressive Web Application
- New project type Electron Web Application
- pas2jsdsgn now uses the SimpleWebServerGUI package, replacing its own http server controller.
- F9, Run now builds, starts a HTTP server and a browser
@RustyI have manage to compile and run OpenTemplot on all 3 platforms to varying degrees. The Linux and osX versions run okay but need tweaking
Yes - sort of! I compiled OpenTemplot and it is running natively on an Apple Mac (M1 chip which they are using now instead of an Intel chip). I can't claim it works very well at the moment as there seem to be some issues with the sizing of the panels and redrawing of the panel. However the menu's appear to work and pop up various different forms. Not spent a great deal of time on it so numerous teething issues to investigate but it did run.Sorry to be a bit dim, but does that mean you have got OpenTemplot running natively on an Apple Mac? (I know nothing about Macs.)
I said I wasn't going to do any more with the files -- but here I am tinkering about in Lazarus. If I don't stop this and get back to plug track I can't see us having the K-crossings in time for Scaleforum.
But first venture out into the sun and find a pleasant spot to consume the contents of your rucksack
@Steve_CornfordHow was your packed lunch?
@nickom @NoIdea @Rusty @Alistair Ward @graeme @James WaltersJust for your information, i don't expect you to do anything about it.
Having replaced Lazarus 2.2.6 with Lazarus 3.4 and attempted the automatic project conversion again
Ah but was it the walk or the contents of your rucksack?My walk this afternoon did produce a possible idea to try.
I appreciate you may not want to hear this given previous experience but this is exactly what Git version control handles very quickly and very efficiently.That means that Templot2 would be synced from OpenTemplot, rather than the other way round. That's a lot to think about, and it is largely dependent on finding a simple means of file transfer between them. If that could be fixed, users could easily swap to Templot2 when they need the functions not available in OpenTemplot -- chiefly the sketchboard and native PDF output. So finding a file fix is back at the top of the to-do list. My walk this afternoon did produce a possible idea to try.
@RustyJust offering it as one potential solution - perhaps it might help if I set a simple demo repository up first to show how it could work.
Yes, I'm more than happy to do so. However just a small caveat, it will take me a little time to plan out and setup a demo as I'd like to make it relevant to the Templot code. Work commitments at the moment limit my spare time but I will work on something as soon as I can.Hi Rusty,
Would it be possible for you to give a Zoom seminar on using the GITHUB, hosted by Martin if he is agreeable?
Steve
@Steve_CornfordAm I right in thinking that the SWAPBOX file format is non-binary?
Do we assume that you have now discounted the Delphi Community edition route?
@NoIdea @James WaltersI agree with Phil -- it's a great leap forward!
I'm looking forward to 245a to examine the new format files.
I don't know if this helps but I thought I'd outline a roadmap of sorts:
Is that broadly what you had in mind?
- Complete the K crossings for Scale Forum.
- Switch to Lazarus
- Think about open sourcing and syncing the closed and open sourced versions
I'm thinking now in terms of providing the sketchboard and native PDF functions as linked helper executables created in Delphi5.
@Phil GI fully agree with you, time spent on an open source version of Templot, will ultimately be the better option. As it also opens the door for more contribution from others, and thus in the long run much less stress on yourself.
If I can now get all the ongoing development of Templot into open-source others might be more interested in getting involved