Replies: 3 comments
|
Hey that's great news! Yes, this is definitely worth it. Many people have complained about the lack of new features. I'm really glad to hear you're investigating this! I'm definitely interested in replacing Otto with something more modern. I haven't put much thought into it due to other priorities. I'd gladly accept a PR. Lately I've been shifting things away from JavaScript. I have an experimental branch that moves a lot of helpers.js to Go. However, that doesn't help the core problem of being tied to an old JS interpreter. As far as which system to move to (Sobek or QuickJS), I'll defer to you. My hunch is to pick the one that will have the most active development long into the future. It's tough to make predictions, especially about the future. I confess I don't know what an event loop is in this context. Is that something we need or do we simply run dnsconfig.js through the interpreter "one and done"? Here are my thoughts:
|
|
I've given this a bit more thought. I think that if we're going to change engines, we only want to do it once. Therefore, going with QuickJS feels like the right path forward. Any interest in pursuing that? |
|
Definitely. I'll take a look when I get back from family vacation (~2 weeks) and see what I find. If it seems like it's going to be a bad fit, I'll post back and we can discuss further. The Sobek branch will continue to be there. The major benefit I see to Sobek is that it's backed by Grafana, where as quickjs is a C -> Go mechanical translation. quickjs comes with all the features, but it's also going to require some overhead to marshal anything passed into a |
Uh oh!
There was an error while loading. Please reload this page.
Is there any appetite to look at replacements JS engines? Sobek or QuickJS come to mind. I actually have a branch that uses Sobek and passes all the tests. I did remove the event loop though -- no test exercise it, but maybe someone is doing some crazy with it?
I was getting frustrated by having to remember to use older syntax. Sobek was the "quick and easy" migration but is incremental on the ECMAScript version moving it to ~5.1 over 5.0 that otto targets.
QuickJS would likely be bigger lift, though I'm not sure how much bigger at this time. The major benefit would be full EMCAScript 14 support, no more having to remember what works and what doesn't.
Neither Sobek or QuickJS include an event loop by default, but again, I don't know what anyone is using it for and no tests exercise it's use. We could implement them ourselves (Sobek is based on Goja which has an eventloop library that would be easily ported, if necessary.)
For now, I'm just wondering if this is worth investing any more time into.
All reactions