Better HN
topnewbestaskshowjobs
Log inSign up

mmhelloworld

8 karma · joined Nov 9, 2013 (13y ago) · 4 submissions

Programming languages enthusiast. Interested in Idris, Haskell, Java, TypeScript currently.
Submissions

1.

Idris JVM 0.7.0 Release(mmhelloworld.github.io ↗)

5 points · by mmhelloworld · 2y ago · 2 comments

comment 3y ago · link · parent

This file https://github.com/mmhelloworld/idris-jvm/blob/main/libs/bas... demonstrates how the interop looks like currently. The `%foreign` directive takes an FFI descriptor to talk to the respective backends. Here you can see few scheme and JVM descriptors starting with "scheme:" and "jvm:" respectively. The JVM descriptors there show constructor calls `<init>`, instance methods `.lock` and static methods `getThreadData`.

comment 3y ago · link · parent

In the JVM backend, recursive calls are eliminated with loop. There is an option to enable trampoline for functions but I am currently working on replacing mutual recursion with loops so with that the trampoline option might be removed. As for data structures, there are Idris data structures like `List`, `SortedSet`, `SortedMap` etc. but only Idris `List` currently implements Java `List` interface.

comment 3y ago · link · parent

Hello, I am the author of Idris JVM. Thank you for your feedback. I will update the README to include a link for JVM interop. For now, this file https://github.com/mmhelloworld/idris-jvm/blob/main/libs/bas... , demonstrates how the interop looks like currently. The %foreign directive takes an FFI descriptor to talk to the respective backends. Here you can see few scheme and JVM descriptors starting with "scheme:" and "jvm:" respectively. The JVM descriptors there also show constructor calls `<init>`, instance methods `.lock` and static methods `getThreadData`.