41 questions
Score of 0
0 answers
540 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 - ...
Score of 1
2 answers
3681 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 ...
Score of 2
0 answers
192 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 ...
Score of 1
0 answers
452 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 ...
Score of 4
2 answers
804 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 ...
Score of 1
1 answer
63 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 ...
Score of 0
1 answer
1630 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. ...
Score of 5
0 answers
547 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, ...
Score of 12
1 answer
5756 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 ...
Score of 1
3 answers
345 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/...
Score of 7
2 answers
869 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 (*...
Score of 0
2 answers
312 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 ...
Score of 2
1 answer
563 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 ...
Score of 1
1 answer
739 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>
+ (...
Score of 1
1 answer
313 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 ...