Luigi Scarminio
11/22/2021, 12:17 PMspierce7
11/22/2021, 3:20 PMBig Chungus
11/22/2021, 3:29 PMe: java.lang.IllegalStateException: Unsupported Xcode version 12.4, minimal supported version is 12.5.
Looks like kotlin 1.6.0 apply targets are not supported in GH actions due to old xcode. Is there any workaround for this?benkuly
11/23/2021, 3:58 PM@Test
fun test() {
val input = listOf("本", "日")
val output = input.sorted()
val expected = listOf("日", "本")
assertEquals(expected, output)
}
Nikky
11/24/2021, 11:50 AM> Task :linkReleaseExecutableMingwX64 FAILED
e: /home/nikky/.konan/dependencies/llvm-11.1.0-linux-x64-essentials/bin/clang++ invocation reported errors
The /home/nikky/.konan/dependencies/llvm-11.1.0-linux-x64-essentials/bin/clang++ command returned non-zero exit code: 1.
output:
lld: error: unable to find library -lcurl
clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
anyone got this to work yet ?Zode
11/30/2021, 8:09 AMIain Merrick
12/02/2021, 5:22 PMDraget
12/02/2021, 8:28 PMDraget
12/02/2021, 8:52 PM/home/draget/.konan/dependencies/clang-llvm-8.0.0-linux-x86-64/bin/clang++: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
(I have libtinfo.so.6)Draget
12/02/2021, 9:12 PM213-1.5.10-release-949-IJ5744.223
.212-1.6.0-release-799-IJ5457.46
? =/rudolf.hladik
12/03/2021, 2:19 PMdeinit
function in Kotlin? it would be fine to have that feature at least at nativeMain
moduleRob Elliot
12/05/2021, 1:42 PMnatario1
12/05/2021, 8:50 PMJavaVM* vm;
GetJavaVM(&vm);
With kotlin.cinterop types and my solution seems so verbose. Are there better APIs that I'm missing?
val vm: CPointerVar<JavaVMVar> = allocPointerTo()
val vm2: CPointerVar<CPointerVar<JavaVMVar>> = allocPointerTo()
vm2.pointed = vm
GetJavaVM(vm2.value!!)
zt
12/07/2021, 6:10 PMnapperley
12/09/2021, 4:25 AMtmpArena.clear()
MJegorovas
12/09/2021, 2:13 PM- (void) MonitorWifiInterface
{
m_pathMonitor = nw_path_monitor_create();
nw_path_monitor_set_update_handler(m_pathMonitor, ^(nw_path_t _Nonnull path) {
NSLog(@"[NetInterfaceUtilies] Network path changed");
});
nw_path_monitor_start(m_pathMonitor);
}
Have no idea what to do in ^(nw_path_t _Nonnull path)
partBrian Donovan
12/09/2021, 3:21 PMAlexander Black
12/10/2021, 1:26 AMzt
12/11/2021, 6:07 AMmartmists
12/11/2021, 4:22 PMstatic PyObject *
spam_system(PyObject *self, PyObject *args)
{
const char *command;
int sts;
if (!PyArg_ParseTuple(args, "s", &command))
return NULL;
// ...
return Py_INCREF(Py_None);
}
What I've got so far:
private val spamSystem = staticCFunction { self: PyObjectT, args: PyObjectT ->
val command = ???
if (PyArg_ParseTuple(args, "", ???) == 0) {
return@staticCFunction null
}
// ...
Py_None.incref()
}
martmists
12/11/2021, 7:45 PMBrian Donovan
12/13/2021, 1:12 AMClocks
12/13/2021, 6:57 AMBailey Pollard
12/13/2021, 7:40 PMvalue: kotlinx.cinterop.CValuesRef<platform.posix.uint8_tVar>
Zode
12/14/2021, 3:29 AMRUNTIME_NOTHROW void Kotlin_initRuntimeIfNeeded()
do? This function is in kotlin/kotlin-native/runtime/src/main/cpp/Runtime.cpp
.
1. I found it got called all the time when trying to run my iOSApp, then I got a runtime exception when it ran into InitOrDeinitGlobalVariables(INIT_GLOBALS, result->memoryState);
. It looks like the runtime environment had not fully created at that point, and it has already called OC bridge function, then caused an exception.
2. I also found another problem when using k/n. Top-level properties declared in kotlin will always return null when running iOSApp. I made it a top-level function and it worked. This problem also happened when KN was running into Kotlin_initRuntimeIfNeeded()
.
3. btw, debug shared.framework and k/n lib with disasm showed in lldb is tough. Is there any way to debug k/n from source when running iOSApp?
Does anyone has any idea here?My Nguyen
12/14/2021, 9:26 AMdata class MyNumber(
var x: Int
) {
val isBig1: Boolean = x >= 10
val isBig2: Boolean
get() = x >= 10
}
fun main() {
val number = MyNumber(9)
println("isBig1 before: ${number.isBig1}")
println("isBig2 before: ${number.isBig2}")
number.x = 11
println("isBig1 after: ${number.isBig1}")
println("isBig2 after: ${number.isBig2}")
}
martmists
12/15/2021, 10:05 AMWhen calling variadic C functions spread operator is supported only for *arrayOf(...)
How can I avoid this? Can I write a wrapper function in the .def or something? I already tried *arrayOf(*x.map { ... }.toTypedArray())
but that was also invalid?Benoye
12/15/2021, 1:56 PMiosMain
:
fun NSData.toByteArray(): ByteArray = ByteArray(this@toByteArray.length.toInt()).apply {
usePinned {
memcpy(it.addressOf(0), this@toByteArray.bytes, this@toByteArray.length)
}
}
This one allows to convert a NSData
in Objective-C to a ByteArray
in Kotlin
Is it possible to use this function directly in XCode on a NSData
object ?Zode
12/17/2021, 3:52 AMdependencies {
add(PLUGIN_CLASSPATH_CONFIGURATION_NAME, Dependencies.xxxx)
}
Does adding this plugin to k/n take effect during k/n compilation(for iOS)? It looks like this plugin doesn’t work.caffeine
12/17/2021, 11:01 PMcaffeine
12/17/2021, 11:01 PMnapperley
12/17/2021, 11:19 PMcaffeine
12/17/2021, 11:29 PMnapperley
12/17/2021, 11:53 PMcaffeine
12/18/2021, 12:09 AMjimn
12/18/2021, 1:48 PM