embedded-language

Calling python from a c++ program for distribution

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. ...

What is a good embeddable language I can use for scripting inside my software?

What mature embeddable languages are available (or reversed, which popular languages have as a stated feature the ability to be embedded in other software) and more importantly What embeddable languages have a really good tutorial on embedding their language and extending it for your specific software Bonus points: Embeddable la...

How to embed Ruby in C++?

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 ...

How do I compile Perl code within a C program?

I have a C program with an embedded Perl interpreter. I want to be able to precompile some Perl code from within the program. How do I do that? Rationale (if anyone is interested) is to be able to compile it once, store the parse tree, and execute many times (as long as the compiled code does not change). Thanks! Madhu PS: I am using ...

Macro/Scripting language for non-developers with a simple GUI-based editor

Hello, We wish to provide people to be able to add some logic to their accounts(say, given a few arguments, how to compute a particular result). So, essentially, this would be tantamount to writing simple business rules with support for conditionals and expressions. However, the challenge is to provide them a simple online editor where ...

How to use embedded c within Shoes? (ruby-serialport)

Is it possible to use something like: require 'serialport.o' with Shoes? serialport.o is compiled c code as a ruby extension. When I attempt to run the following code in shoes, I see no visible output to the screen and shoes crashes on OS X. Thank you CODE: require "serialport.o" port = "/dev/tty.usbserial-A1001O0o" sp = Serial...

Deploying application with Python or another embedded scripting language

I'm thinking about using Python as an embedded scripting language in a hobby project written in C++. I would not like to depend on separately installed Python distribution. Python documentation seems to be quite clear about general usage, but I couldn't find a clear answer to this. Is it feasible to deploy a Python interpreter + standar...

How do I set an embedded Groovy scripts classpath?

I am trying to extend an Eclipse code builder (for generating DTOs from Hibernate VOs) - and it uses Groovy for its template system. The code it uses to create the groovy Script is a little weird (not what I see in the Groovy docs) but it works, mostly: GroovyShell shell = new GroovyShell(); script = shell.parse(source); Then, later...

Python embedding -- how to get the if() truth test behavior from C/C++?

I'm trying to write a function to return the truth value of a given PyObject. This function should return the same value as the if() truth test -- empty lists and strings are False, etc. I have been looking at the python/include headers, but haven't found anything that seems to do this. The closest I came was PyObject_RichCompare() with ...

What is the easiest way to build Python26.zip for embedded distribution?

Hello, I am using Python as a plug-in scripting language for an existing C++ application. I am able to embed the python interpreter as stated in the Python documentation. Everything works successfully with the initialization and de-initialization of the interpreter. I am, however, having trouble loading modules because I have not been a...

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

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...

SpiderMonkey vs JavaScriptCore vs ?

I have a C++ desktop application (written in wxWidgets) and I want to add support for some scripting language. Scripting would mostly be used for run-time conversions of strings, numbers and dates by user supplied JavaScript code. I'd like to use JavaScript because it is widely used and everyone is familiar with the syntax. Googling ...

How to use JPL (bidirectional Java/Prolog interface) on windows?

I'm interested in embedding a Prolog interpreter in Java. One option is using JPL, but the download links on the JPL site are broken, and the installation page mentions a jpl.zip that I can't find. I downloaded SWI-Prolog which seems to include JPL (it lists it as a component when installing), but I'm still not sure how I'd use it along ...

What characters can I use to quote this ruby string ?

I'm embedding JRuby in Java, because I need to call some Ruby methods with Java strings as arguments. The thing is, I'm calling the methods like this: String text = ""; // this can span over multiple lines, and will contain ruby code Ruby ruby = Ruby.newInstance(); RubyRuntimeAdapter adapter = JavaEmbedUtils.newRuntimeAdapter(); String...

Is it possible to load and execute C# snippets using DLR?

The majority of material I have found regarding DLR is related to IronPython. Can you parse and execute C# using DLR? If so is there over head that would prevent you from attempting this on a web server with about 30 users? More specifically I would like to script the configuration of my workflow objects when a user first initiates a ...

What factors drive you to use embedded scripting in your applications?

What factors do you weigh in your decision process when you select an embedded scripting, and can issues of configuration and variation be overcome purely with IOC and the Plugin pattern? Many times the Strategy Pattern and Decorator Pattern are good way to tame variation in domain logic. The problem set I am faced with is that calcula...

Embedded script languages for PHP?

Hi, i was wondering if anybody knows of a nice scripting language that can be embedded into php? Javascript would be favorite and although there are several attempts they are either much too shaky/slow/outdated (phpjs, j4p5) or a real pain to get up and running on shared hosts (pecl spidermonkey). The background is: I would like to ha...

What replacements are available for vbscript in an application?

An application I maintain has been around since VB6 days - ported to .Net 1.1, and now being updated/rewritten across to .Net 3.5 The application provides a mechanism to run VBScripts - this was done in a highly integrated way - allowing the program to parse multiple .vbs files and produce a list of all of the subroutines and functions ...

python object to native c++ pointer

Im toying around with the idea to use python as an embedded scripting language for a project im working on and have got most things working. However i cant seem to be able to convert a python extended object back into a native c++ pointer. So this is my class: class CGEGameModeBase { public: virtual void FunctionCall()=0; virtu...

[Embedded Python] Invoking a method on an object

Given a PyObject* pointing to a python object, how do I invoke one of the object methods? The documentation never gives an example of this: PyObject* obj = .... PyObject* args = Py_BuildValue("(s)", "An arg"); PyObject* method = PyWHATGOESHERE(obj, "foo"); PyObject* ret = PyWHATGOESHERE(obj, method, args); if (!ret) { // check error....