Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does this allows to embed into software as a script language? #73

Open
Wohlstand opened this issue Sep 17, 2021 · 1 comment
Open

Does this allows to embed into software as a script language? #73

Wohlstand opened this issue Sep 17, 2021 · 1 comment

Comments

@Wohlstand
Copy link

Just a stupid question: does this interpreter has an ability to embed it into certain software to make it being a script language of it? Including of two-dimensional calls bindings where you can call C functions from LOL, and call LOL functions from C, and transfer data between both sides, etc. Absolutely the same way on how Lua is used.

@leyarotheconquerer
Copy link
Contributor

From what I've read of the code, no, this interpreter does not yet have a well-defined API to integrate with other C applications. It's primarily designed as a terminal application to run LOLCODE files.

However, the future branch does demonstrate ways that external C functions can be integrated into the language (i.e. inet sockets: https://github.com/justinmeza/lci/blob/future/inet.h, and file/string libraries: https://github.com/justinmeza/lci/blob/future/binding.c#L271). It isn't quite to the level of integrating arbitrary compiled shared library files (*.dll/*.so files with a header of some form), but it does demonstrate how that could be done.

The project is structured such that, with a little bit of knowledgeable C work, you could probably adapt it for an embedded scripting language, like Lua. That would be really cool to see if you manage to do it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants