embedded-language

Any tutorial for embedding Clang as script interpreter into C++ Code?

萝らか妹 提交于 2019-11-28 05:28:49
I have no experience with llvm or clang, yet. From what I read clang is said to be easily embeddable Wikipedia-Clang , however, I did not find any tutorials about how to achieve this. So is it possible to provide the user of a c++ application with scripting-powers by JIT compiling and executing user-defined code at runtime? Would it be possible to call the applications own classes and methods and share objects? edit: I'd prefer a C-like syntax for the script-languge (or even C++ itself) I don't know of any tutorial, but there is an example C interpreter in the Clang source that might be

How to call R from within a web server (like Apache)?

风格不统一 提交于 2019-11-28 00:02:47
问题 That is, is there an embedded R interpreter available? 回答1: You could use Jeff Horner's excellent rapache. Other options that are CGI-alike are mentioned in the section 4 of the R FAQ which discusses Web interfaces. 回答2: You can used Shiny app into R http://shiny.rstudio.com/tutorial/ 来源: https://stackoverflow.com/questions/1395174/how-to-call-r-from-within-a-web-server-like-apache

Embedded Prolog Interpreter/Compiler for Java

会有一股神秘感。 提交于 2019-11-27 17:58:33
I'm working on an application in Java, that needs to do some complex logic rule deductions as part of its functionality. I'd like to code my logic deductions in Prolog or some other logic/constraint programming language, instead of Java, as I believe the resulting code will be significantly simpler and more maintainable. I googled for embedded Java implementations on Prolog, and found number of them, each with very little documentation. My (modest) selection criteria are: should be embeddable in Java (e.g. can be bundled up with my java package instead of requiring any native installations on

Is there a “safe” subset of Python for use as an embedded scripting language?

a 夏天 提交于 2019-11-27 08:25:53
In the many Python applications I've created, I often create simple modules containing nothing but constants to be used as config files. Additionally, because the config file is actually a Python code file, I can add simple logic for changing variables depending on a debug level, etc. While this works great for internal applications, I'd be wary about releasing such applications into the wild for fear of someone either accidentally, or maliciously, adding destructive code to the file. The same would hold true for using Python as an embedded scripting language. Is there a subset of Python that

Any tutorial for embedding Clang as script interpreter into C++ Code?

一个人想着一个人 提交于 2019-11-27 05:35:39
问题 I have no experience with llvm or clang, yet. From what I read clang is said to be easily embeddable Wikipedia-Clang, however, I did not find any tutorials about how to achieve this. So is it possible to provide the user of a c++ application with scripting-powers by JIT compiling and executing user-defined code at runtime? Would it be possible to call the applications own classes and methods and share objects? edit: I'd prefer a C-like syntax for the script-languge (or even C++ itself) 回答1: I

How to embed Ruby in C++?

别等时光非礼了梦想. 提交于 2019-11-27 01:51:04
问题 What's the best way to embed Ruby as a scripting language in C++? Using ruby.h? SWIG? Something else? What I need is to expose some C++ objects to Ruby and have the Ruby interpreter evaluate scripts that access these objects. I don't care about extending Ruby or accessing it in C++. I've found this article on embedding Ruby in C++, and while it's very useful, it's kinda old and I was wondering if there are any other resources on the subject (or open source implementations of similar engines).

Calling python from a c++ program for distribution

混江龙づ霸主 提交于 2019-11-26 23:50:16
I would like to call python script files from my c++ program. I am not sure that the people I will distribute to will have python installed. Basically I'm looking for a .lib file that I can use that has an Apache like distribution license. roo Boost has a python interface library which could help you. Boost.Python bhadra I would like to call python script files from my c++ program. This means that you want to embed Python in your C++ application. As mentioned in Embedding Python in Another Application : Embedding Python is similar to extending it, but not quite. The difference is that when you

Stopping embedded Python

岁酱吖の 提交于 2019-11-26 22:53:21
问题 I'm embedding Python interpreter to a C program. However, it might happen that while running some python script via PyRun_SimpleString() will run into infinite loop or execute for too long. Consider PyRun_SimpleString("while 1: pass"); In preventing the main program to block I thought I could run the interpreter in a thread. How do I stop executing the python script in embedded interpreter running in a thread without killing the whole process? Is it possible to pass an exception to the

Embedded Prolog Interpreter/Compiler for Java

大兔子大兔子 提交于 2019-11-26 19:17:47
问题 I'm working on an application in Java, that needs to do some complex logic rule deductions as part of its functionality. I'd like to code my logic deductions in Prolog or some other logic/constraint programming language, instead of Java, as I believe the resulting code will be significantly simpler and more maintainable. I googled for embedded Java implementations on Prolog, and found number of them, each with very little documentation. My (modest) selection criteria are: should be embeddable

Is there a “safe” subset of Python for use as an embedded scripting language?

萝らか妹 提交于 2019-11-26 17:45:55
问题 In the many Python applications I've created, I often create simple modules containing nothing but constants to be used as config files. Additionally, because the config file is actually a Python code file, I can add simple logic for changing variables depending on a debug level, etc. While this works great for internal applications, I'd be wary about releasing such applications into the wild for fear of someone either accidentally, or maliciously, adding destructive code to the file. The