Questions tagged [embedded-language]

Anything related to languages (designed to be) embedded in other applications and their implementations. DO NOT use this tag to mark questions related to embedded devices, unless it also relates to embedding a language in a bigger application.

Filter by
Sorted by
Tagged with
69 votes
7 answers
128k views

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.
Brian R. Bondy's user avatar
54 votes
4 answers
21k views

Are there any statically typed, embeddable scripting languages? [closed]

I am wondering if there are any statically typed, embeddable scripting languages. Python, JavaScript, etc. are great languages, but they are dynamically typed (that is, types are checked at run time). ...
Nathan Osman's user avatar
  • 72.3k
45 votes
13 answers
11k views

Embedded Prolog Interpreter/Compiler for Java

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 ...
Sami's user avatar
  • 3,263
31 votes
2 answers
14k views

Why do we need an embeddable programming language like Lua?

What are the typical use cases of using an embeddable programming language? Do I understand it correctly that such language should be embedded into some program environment and should be able to be ...
Vladimir Kostyukov's user avatar
27 votes
3 answers
7k views

Stopping embedded Python

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 ...
Anton L.'s user avatar
  • 2,477
26 votes
2 answers
10k views

Embedded language: Lua vs Common Lisp (ECL) [closed]

Does anybody here have a experience with Common Lisp as a embedded language (using ECL)? If so, how good is ECL compared to Lua?
linkit's user avatar
  • 269
24 votes
8 answers
4k views

Embedding a Low Performance Scripting Language in Python [closed]

I have a web-application. As part of this, I need users of the app to be able to write (or copy and paste) very simple scripts to run against their data. The scripts really can be very simple, and ...
Ian's user avatar
  • 3,689
20 votes
4 answers
5k views

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 ...
John Smith's user avatar
  • 4,442
20 votes
5 answers
18k views

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 ...
Firas Assaad's user avatar
  • 25.4k
17 votes
5 answers
12k views

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

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 ...
FFox's user avatar
  • 1,570
16 votes
4 answers
11k views

Python vs Lua for embedded scripting/text processing engine

For a project I'm currently working on, I'm looking to embed a scripting engine into my C++ code to allow for some extensibility down the line. The application will require a fair amount of text ...
Wade Tandy's user avatar
  • 4,074
15 votes
13 answers
5k views

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 ...
Soviut's user avatar
  • 90k
15 votes
2 answers
6k views

How to embed LLVM?

The LLVM Core project consists of: Compiler - converts source code to LLVM IR VM - executes compiled IR code How can I embed the VM to a C++ application?
Alon Gubkin's user avatar
  • 56.9k
9 votes
2 answers
7k views

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)", "...
jmucchiello's user avatar
  • 18.9k
9 votes
2 answers
2k views

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

That is, is there an embedded R interpreter available?
Dan Goldstein's user avatar
8 votes
1 answer
5k views

Embedding Google V8 into ANSI C Application - where to start?

I would like to embed a javascript engine into an ANSI C application. In fact, I would like to be able to run some code entered on runtime, while being able to interact with some C variables and ...
Stasik's user avatar
  • 2,598
8 votes
3 answers
2k views

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 ...
David Robbins's user avatar
7 votes
3 answers
5k views

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 ...
Milan Babuškov's user avatar
7 votes
3 answers
1k views

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 ...
user avatar
7 votes
1 answer
2k views

How to import a closure from groovy to java?

I'm trying to extract a closure from a groovy script. I define the closure as def printMe = {str ->println str} in my groovy file, and then try to use it by grabbing it from the binding as ...
brice's user avatar
  • 24.8k
7 votes
3 answers
3k views

Embedded script languages for PHP?

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/...
Rolf's user avatar
  • 73
7 votes
1 answer
432 views

Embedded Python - Blocking operations in time module

I'm developing my own Python code interpreter using the Python C API, as described in the Python documentation. I've taken a look on the Python source code and I tried to follow the same steps that ...
R. C.'s user avatar
  • 71
6 votes
3 answers
8k views

Embedding XQuery in Java

I need to retrieve some details from a MusicXML (xml) file in Java. I managed to read xml files in java - but through a web service (where I have to be online, connected to internet when I'm running ...
Dolphin's user avatar
  • 353
6 votes
1 answer
635 views

Embed a Python persistance layer into a C++ application - good idea?

say I'm about to write an application with a thin GUI layer, a really fat calculation layer (doing computationally heavy calibrations and other long-running stuff) and fairly simple persistance layer. ...
Rickard's user avatar
  • 1,784
6 votes
1 answer
8k views

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 ...
Firas Assaad's user avatar
  • 25.4k
6 votes
4 answers
2k views

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

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 ...
kpowerinfinity's user avatar
5 votes
5 answers
3k views

Looking for an embeddable scripting language for C++ with 64-bit support and Cross Platform

I'm looking for a scripting language that works on 32-bit and 64-bit machines as well as on Windows and Linux. I will be embedding it into a C++ application so I prefer it to be natively written in C++...
Tr41n's user avatar
  • 93
5 votes
2 answers
1k views

How do I dynamically load a Clojure script from outside of my classpath from java?

I wish to enable user defined Clojure scripts to interact with my Java App. The problem is, I don't know in advance where the Clojure scripts will be located, so I can't include them in my classpath ...
brice's user avatar
  • 24.8k
4 votes
4 answers
953 views

Any systematic way to avoid "reentry" problem? (embedded system) [closed]

We are using C to build a system on ARM core (i.e. an embedded system). The question is: how can we avoid reentry problem in a formal way so that we are confident all reentry bugs are removed. This ...
user avatar
4 votes
4 answers
2k views

C# instead of IronRuby as an embedded "scripting" language in .NET 3.5

What is the best practice for using C# as an embedded internal scripting application for a .NET 3.5 application? I have an app with a few small IronRuby scripts in it. None of which is really ...
BuddyJoe's user avatar
  • 70.5k
4 votes
2 answers
1k views

Which javascript interpreter is the easiest to embedd in a C application?

There are a few available and i want to support many platforms so i guess V8 isn't that good unless someone has written an interpreter patch for it.
Lothar's user avatar
  • 12.8k
4 votes
2 answers
2k views

embedded scala vs embedded groovy

i'm searchin embedded language for my application. application writen in pure scala. i want to added some functional at runtime. and i have question, is scala embedded more faster than groovy embedded ...
webus's user avatar
  • 49
4 votes
1 answer
369 views

Lua 5.2 Sandboxing in different objects with C API

Consider the following C++ code using the Lua C API: #include <string> #include <cassert> #include <lua/lua.hpp> class AwesomeThing { lua_State* _lua; std::string _name; ...
Addy's user avatar
  • 2,464
4 votes
1 answer
2k views

Python object to C++ pointer problem

this is my first post :). I could convert a python extended object into a C++ pointer, but I have a problem. First I will show you my code and then I will explain the problem. This is my class: #...
user575883's user avatar
4 votes
1 answer
388 views

Embedded mono crashes with GetThreadContext failed (Windows 7)

I'm using mono-2.11.4 on Windows 7 in 32 bit and 64 bit for embedding into my C++ application. Since updating from an rather old 2.6.4 mono I'm getting an error "GetThreadContext failed" from the GC ...
FFox's user avatar
  • 1,570
3 votes
6 answers
2k views

What is the best scripting language to embed in Mac OS X 10.6 applications?

Is there any other scripting language that can be used to embed scripts inside applications, which can access Mac OS X, or application classes with the same features, or most of the features seen in F-...
apaderno's user avatar
  • 29.1k
3 votes
5 answers
4k views

Embedding Mono vs Google V8?

We want to add scripting to a project. We are hesitating which script engine to use. I have used in the past V8 and it's quite impressive. I have used Mono as well but in toy-projects or prototypes ...
Ghassen Hamrouni's user avatar
3 votes
4 answers
5k views

Embedded Lua "print" not working in debug mode from Visual Studio

I am using Luainterface 2.0.3 to embed Lua in a c# application. Everything is working fine, except in visual Studio's debug mode, the Lua's print function does not get written to the console (nor to ...
Oli's user avatar
  • 1,772
3 votes
4 answers
4k views

PHP: Is it possible to embed HTML in the middle of a ternary operator somehow?

For example, can I do something like the following? <? $foobar = 1; $foobar==0 ? ?> <span>html goes here.</span> <? : ?> <span>something else.</span> <? ; ...
trusktr's user avatar
  • 45.8k
3 votes
2 answers
1k views

Can IntelliJ treat a Java text block as syntax such as SQL or XML to assist editing/formatting?

Java 15 brings us the new JEP 378: Text Blocks feature. This eases working with multi-line strings. Can IntelliJ be made to parse the text within that block as some kind of syntax? Is there a way for ...
Basil Bourque's user avatar
3 votes
1 answer
293 views

How can I dynamically load perl extensions in an embeded perl interpreter?

I am embeding perl interpreter in my C code (what fun!). I need to dynamically load perl extensions (an extension that extends perl, written in C). When I run a perl script (using my embeded perl ...
Vertilka's user avatar
  • 183
3 votes
2 answers
6k views

Calling a Lua string with C

I'm trying to learn how to use Lua with C, so by now I want to try running a script without loading it from a file, since I don't want to be bothered with messing up with files. Can anybody tell me ...
user avatar
3 votes
8 answers
2k views

Embedded scripting engine for DSL

I'm working on a project which needs an embedded DSL to fullfill its expected requirements. The DSL would be user defined event based. Here goes a mockup of the desired syntax: user-defined-event-1 {...
Dario Castañé's user avatar
3 votes
3 answers
5k views

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 (...
Jason Maskell's user avatar
3 votes
2 answers
866 views

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

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 ...
user avatar
3 votes
2 answers
740 views

Embedding a Prolog engine in Obj-C projects

I'm looking for a light-weight Prolog engine to be embedded in an Obj-C application under Mac OSX. In Java there are some excellent implementations with the characteristics I need: deployability, ...
qfwfq's user avatar
  • 976
3 votes
2 answers
600 views

Pros/cons of embedded scripting environments?

There are several scripting environments available for .NET applications (e.g.this post). My question is, what are the pros/cons of using each of them? Examples include (but not limited to) ...
pomeroy's user avatar
  • 1,437
3 votes
1 answer
1k views

Lua C API - loading multiple files with variables and functions of the same names

Say I have two Lua files which I'll be using from the standard Lua C API, that share a common library: common.lua function printHello(name) print("Hello from " .. name) end file1.lua require "...
Addy's user avatar
  • 2,464
2 votes
6 answers
1k views

What is a good embeddable language for an existing Java application?

I want to embed a dsl or existing full language within my application. It should be a simple, full Turing complete language but simple and light enough that the code can be interpreted without too ...
Berlin Brown's user avatar
  • 11.6k
2 votes
5 answers
3k views

Small RISC emulator

I'm looking to build a VM into a game and was wondering if anyone knew of any really simple VM's (I was thinking RISC/PIC was close to what I wanted) that are usually used for embedded projects such ...
Christopher Lightfoot's user avatar