41 questions
0
votes
0
answers
523
views
Is there a way to generate a vega(-lite) graph from java (other than programming one, from scratch)?
I have recently evaluated freely available software-packages / frameworks for producing complex, flexible and high quality graphics of statistical data for displaying such data in a machine-learning - ...
1
vote
2
answers
4k
views
Use Python to call a JavaScript function that is on a webpage
I created a webpage that has one JavaScript function called foo(z). For the sake of this question, let's assume that all foo(z) does is call console.log(z).
Is it possible to run a Python script that ...
2
votes
0
answers
188
views
Writting a wrapper for a customized lua-based scripting language
I have a program which is an extension of Lua, i.e. it includes a bunch of additional objects and functions. This program can now be used to execute lua scripts which make use of the additional ...
1
vote
0
answers
451
views
language binding error with Fortran: why won't it link to MPI library?
I'm trying to create language bindings for a message passing interface but the compiler can't recognize my reference to the C functions...
I'm currently using gfortran as my compiler on a linux ...
4
votes
2
answers
786
views
Catching fortran runtime errors and signals in C++ binding
I would like to be able to catch a terminating Fortran runtime errors in a C++ binding.
I have a legacy F90 code to bind to and expect all kind of errors e.g. numerical, IO etc.
I managed to handle ...
1
vote
1
answer
62
views
Terminology for function interface/DLL used only to fix parameter types between different languages?
I have several cases where I needed to make an interface library somewhat "dummy", meaning that it is just needed to make an application written in language A call a library written in language B, in ...
0
votes
1
answer
2k
views
pybind11 cmake example cannot find the main function
I git cloned pybind11's cmake exmaple. Then I built it with pip install ./cmake_example. My python file contains the following:
import cmake_example
print(cmake_example.add(1, 2))
This works fine. ...
5
votes
0
answers
541
views
How can I write a library usable from multiple languages?
I am trying to write a library which can be used from multiple programming languages, for example:
CLR languages (C#, F#..)
JVM languages (Java, Kotlin, Scala..)
Native languages (C/C++, Rust, ...
12
votes
1
answer
6k
views
Running C code in Elixir/Erlang: Ports or NIFs?
I've found that Elixir programs can run C code either via NIFs (native implemented functions) or via OS-level ports. Having read those and similar links, I'm not a hundred percent clear on when to use ...
1
vote
3
answers
344
views
calling c code from lua
I tried to follow this: http://www.troubleshooters.com/codecorn/lua/lua_lua_calls_c.htm
I tried to compile the c code like it says in the guide:
gcc -Wall -shared -fPIC -o power.so -I/usr/include/...
7
votes
2
answers
858
views
What kinds of C++ functions can be placed in a C function pointer?
I have a C library that uses a struct of function pointers for callbacks. The callbacks will be called from C code.
extern "C" {
typedef struct callbacks_t {
void (*foo) (const char*);
int (*...
0
votes
2
answers
308
views
Does Qt/Gtk+ allow programming in two languages at once?
Widget toolkits like qt/gtk+ have multiple language bindings. Suppose I want to develop an application in c++ but want to use gtk+ C language bindings for my gui. Is it possible to write the source ...
2
votes
1
answer
544
views
How does calling C or C++ from python work?
There are multiple questions about "how to" call C C++ code from Python. But I would like to understand what exactly happens when this is done and what are the performance concerns. What is the theory ...
1
vote
1
answer
737
views
Objective-C binding pointer array to C#
I am trying to make a binding between an Objective-C library and C# within Xamarin. The class header that I am trying to bind is this:
@interface MGLPolyline : MGLMultiPoint <MGLOverlay>
+ (...
1
vote
1
answer
309
views
How to convert exceptions to errors and error messages when wrapping C++ classes API for C consumption?
The problem
Say you've got a C++ class.
Say you want to export its constructor(s) and methods to C.
Say you followed the advices given in the solution to the "Wrapping C++ class API for C ...