Re: JS Doors for Synchro
By: art to All on Tue Dec 15 2009 19:10:56
This has the restriction of relying on the Synchro JSOM and therefore unportable to other BBS platforms. Another downside is uncompiled source for all to see--not a problem in this case as I don't mind open sourcing
Apart from these restrictions, what are the downsides to this approach?
Well, JavaScript does have the upside that you don't need to re-compile it for the multitude of different systems that are available. A JavaScript door will run wherever Synchronet runs, whether that be Windows, Linux, BSD, etc.. But the fact that it relises on the Synchronet JSOM is a significant downside.
Another downside for some doors is speed - If you're writing something that needs to be very fast, JS isn't always the best languge. Not too long ago, I wrote a Synchronet JS door that can solve Sudoku puzzles, but I noticed that it's noticebly slower than a compiled C++ version using the same algorithm. Furthermore, for the algorithm I used (a brute force solving algorithm I found on Wikipedia), there are worst-case Sudoku puzzles that it takes much more time to solve; for the JavaScript version, the JS engine arbitraily terminated the script once it had reached some high number of iterations - The JS engine (falsely) assumed it was in an infinite loop and thus terminated the script. So, for some things, JS might not be the best language.
Nightfox
---
� Synchronet � Digital Distortion: digitaldistortionbbs.com