Questions tagged [language-interoperability]

Language Interoperability is the ability of code to interact with code that is written using a different programming language. Language Interoperability can help maximize code reuse and, therefore, improve the efficiency of the development process.

193 questions
0
votes
2 answers

How to use Kotlin parameter callback interoperable with a java class

This question is about the parameter callback in Kotlin, which is by the way a very nice feature from my point of view! I have a method written in Kotlin like this one which expects a callback as argument. The callback itself expects a String…
Mario646
  • 43
  • 5
0
votes
1 answer

Instantiate VHDL entity with 2D array from SystemVerilog

There seems to be very little documentation on how to pass 2D arrays between VHDL and SystemVerilog. I have a port of the following type in VHDL: package my_package is type my_array_t is array (natural range <>) of std_logic_vector(N-1 downto…
0
votes
2 answers

How to Override a suspend function in java class

Consider the following interface in kotlin: LoginRepository.kt interface LoginRepository { suspend fun login(): LoginResponse } LoginRepo.java class LoginRepo implements LoginRepository { public Object login(@NonNull Continuation
Abbas
  • 3,529
  • 5
  • 36
  • 64
0
votes
0 answers

Interoperability issue in Python/MATLAB with early bound COM object created in C# .NET Core 6

I am creating a COM object in C# .NET Core 6. The COM object has to enable both early and late binding. I am using Visual Studio and a .NET Core 6 class library, where I created a COM object, a COM interface and an idl-file for generating the type…
Spikxz
  • 35
  • 5
0
votes
3 answers

Matlab Builder JA - Compile Matlab into a Java jar - Free Version?

Please keep in mind that I know nothing about Matlab. Matlab Builder JA lets developer build Matlab applications and export them into Java jars. That's great, I just have to produce a jar and I can then use it from other java code. Does anyone know…
Marsellus Wallace
  • 17,991
  • 25
  • 90
  • 154
0
votes
1 answer

Interoperability issues in reading CSV files between Excel, R, and Python

I am working on a project that requires me to independently verify the results of my Python code using another person's R code and a third person's Excel spreadsheet. (Yeesh.) Python was able to read the Excel file containing the source data, but…
0
votes
1 answer

Decrypt AES/GCM/PKCS5Padding in PHP from Java payload

I want to do a simple encryption from SecureGMC java to be decrypted in PHP using AES/GCM/PKCS5Padding. The data I'm suppose to be decrypting derives from the local bank, which emphasizes on IV_SIZE=96 and TAG_BIT_LENGTH=128; they recommended me…
0
votes
1 answer

Passing a ctypes callback function around in C causes memory related problems

I've come across a slightly complicated bug in some C code that I'm porting to Python using ctypes. I've been able to reproduce the problem in a minimal working example and was hoping to get some help with it. The essence of the problem is that…
CiaranWelsh
  • 7,014
  • 10
  • 53
  • 106
0
votes
1 answer

Access violation when using ctypes callback feature

I'm trying to use the ctypes callback feature to pass a python function to a C function as a function pointer. Here's the C: typedef void(*f1)(); void function_that_takes_a_function(f1* fn){ printf("I'm a function that takes a function\n"); …
CiaranWelsh
  • 7,014
  • 10
  • 53
  • 106
0
votes
0 answers

common javascript api between iOS & Droid / nativescript core

Just looking into Nativescript; the "core" bit of it seems really interesting in that you can call native APIs directly from JS, but it seems it is a completely different API for iOS and Droid (e.g. matching the respective native APIs on each…
0
votes
1 answer

Should signature of equals be equals(x: Any) or equals(x: AnyRef)

If the equals method in Scala is supposed to implement the original Java boolean Object.equals(Object x) method, I think it should be written def equals(that: AnyRef): Boolean. IntelliJ generates instead def equals(that: Any): Boolean. Online I've…
ragazzojp
  • 477
  • 3
  • 14
0
votes
1 answer

Integrating IBM Rhapsody models into VS 2019

I am here for help in one of my tasks to integrate IBM Rhapsody models into VS 2019 C++ project.Here is what we are trying to do. Please note: I am not an expert in IBM Rhapsody Systems Engg tool. My expertise is WPF and .net application We have…
Asma
  • 1
0
votes
1 answer

How to provide Java callbacks (with 'void' return type), to Scala?

I've made a library in Scala that has a Java API. I'd like to provide such a callback (Java): private static void onB(Stats stats) { //... implementation does not matter } The Scala API has this as a class parameters or a method of an abstract…
akauppi
  • 17,018
  • 15
  • 95
  • 120
0
votes
1 answer

How to deal with the "platform specific dynamic library" problem with uploading to PyPI?

I have a Python package that depends on binaries. I've build the linux version and it is available on PyPI. The key was setting the package_data argument to ensure the *.so files were also uploaded to PyPI. Now I want to do the same thing with…
CiaranWelsh
  • 7,014
  • 10
  • 53
  • 106
0
votes
1 answer

Why is the return value of this `ctypes` wrapper function `c_long(0)` and not `c_long(3)`?

Why is the return value of this ctypes wrapper function c_long(0) and not c_long(3)? // main.cpp #include class AComplicatedCPPObj { int *d_; public: explicit AComplicatedCPPObj(int *d) : d_(d) { } int…
CiaranWelsh
  • 7,014
  • 10
  • 53
  • 106