Pure JavaScriptSolved

I have an application written entirely in javascript html and css, it is exported to the desktop via a framework called electron. The website says that LimeLM supports any language, but I cannot figure out how one might go about using it within a pure javascript implementation, because Nodejs is exported to the client machine within the framework I have access to the system and can call native modules etc which i assume will at least make it possible, but i don't know how.

The alternative is that LimeLM only supports every language because of its online API, this wouldn't be ideal because it would require internet access, but also not the end of the world.

Any help on how this might be doable, would be greatly appreciated as I'm at a bit of a loss.

Hey Joshua,

We don't have an example for electron (currently -- it's something we've considered making an example for in the future).

But short answer: yes you can use LimeLM (TurboActivate and TurboFloat) with Electron built apps. There are a few ways to do it, but the best way is likely using node-ffi: https://github.com/node-ffi/node-ffi

That way you can use the native functions in TurboActivate and TurboFloat in your JS app. Does that make sense?

We can help you by writing a couple of functions if that will help you get started.

Hi Wyatt,

Thanks for getting back to me.

Yeah I looked into using node-ffi before i posted, but I can't even get that to npm install on either OSX or Windows and without knowing if it was going to be the correct route i didn't give it my all to solve. I'll see if i can get that done and hopefully get back to you.

I tried using a different package called edge, that lets you access the dlls, but from the LimeLM documentation from object oriented languages it seems like you import the class and then invoke the constructor, so i couldn't really tell how i might specify the entry point to the dll via edge. I'm not sure its the easiest solution anyway i couldn't really tell how types were going to work in edge either, from the documentation i could find node-ffi did look the easiest if i could get it installed.

If it wouldn't be a huge hassle a few starting functions would be great, if it is a hassle then let me give it a bit more of a bash myself first and then get back to you.

Hey Joshua,

The best place to start is the C/C++ example and documentation. It's not object oriented -- it's all functional: https://wyday.com/limelm/help/using-turboactivate-with-c-plus-plus/

>> "If it wouldn't be a huge hassle a few starting functions would be great, if it is a hassle then let me give it a bit more of a bash myself first and then get back to you."

We have a few higher priority items that we need to get to first. So if you handle more of the leg work we can help you out along the way.

TurboActivate and TurboFloat 4.1 are now out with full JavaScript (NodeJS / Electron) articles and examples:

https://wyday.com/limelm/help/using-turboactivate-with-electron-nodejs/

https://wyday.com/limelm/help/using-turbofloat-with-electron-nodejs/