Piotr Krzemiński
11/17/2020, 5:52 PMPiotr Krzemiński
11/17/2020, 5:52 PMPiotr Krzemiński
11/17/2020, 5:53 PMPiotr Krzemiński
11/17/2020, 5:53 PMPiotr Krzemiński
11/17/2020, 6:02 PMvisitExpression
. This file's 99.9% is the standard lib (JS flavor), and you can see that the first function fold
is generated almost entirely :) I work now by looking for places that are missing (visit...
) and adding a needed mapping. Quite slow, but surprisingly entertaining process to see the Python code appear bit by bit :)CLOVIS
11/17/2020, 8:27 PMPiotr Krzemiński
11/21/2020, 8:54 PM> tail -1 python/experiments/python.kt
fun returnString() = "Hello from Kotlin!"
> tail -2 python/experiments/out_ir.py
def returnString():
return 'Hello from Kotlin!'
> cat python/experiments/consumer.py
from out_ir import returnString
print(returnString())
> python3.8 python/experiments/consumer.py
Hello from Kotlin!
but for dead-simple functions - treat is a tracer bullet. I'm still working on getting the standard library to work. For now I just made it interpret without Python returning syntax error 🙂 so that the generated module can be loaded by Python and this little simple function can be invoked.
More importantly, I got in touch with @Roman Artemev [JB] from Kotlin compiler's team who gave me directions where to go next, like creating black-box tests. Roman is super-helpful, a pleasure to learn about Kotlin internals from him. So called 'box tests' are a bunch of high-level tests, some of them platform-specific, and some of them platform-agnostic. Ultimately I'm aiming at making all platform-agnostic box tests pass, and short-term I'll use this test infra to test against some simpler cases. As soon as simple functions using Kotlin's stdlib work properly, it will be another nice milestone.Piotr Krzemiński
11/23/2020, 9:40 PMPiotr Krzemiński
01/27/2021, 12:42 PMPiotr Krzemiński
05/14/2021, 5:51 PMmartmists
07/03/2021, 4:53 PMPiotr Krzemiński
07/15/2021, 7:56 PMPiotr Krzemiński
07/16/2021, 11:50 AMSerVB
07/19/2021, 10:26 AMPiotr Krzemiński
11/13/2021, 7:53 PMBig Chungus
12/01/2021, 10:48 AMPiotr Krzemiński
12/19/2021, 5:55 PMPiotr Krzemiński
12/23/2021, 8:06 AMandylamax
12/26/2021, 5:35 AMmartmists
05/02/2022, 10:30 PMPiotr Krzemiński
05/06/2022, 5:57 AMSrSouza
06/22/2022, 10:47 PMNathan Fallet
11/18/2023, 1:13 PMJulius
11/29/2023, 9:19 AMEdward Kauna
05/09/2024, 6:39 PMEdward Kauna
05/13/2024, 6:27 AMelect
05/16/2024, 8:59 AMMarcos Boyington
10/29/2024, 4:50 PMMarcos Boyington
10/29/2024, 4:55 PMexpect / actual
as other KMP languages, & support interop with python (e.g. similar to kotlinx.cinterop.CPointer
), I'd be happy to jump in & help starting to implement native libs,e.g. collections & coroutinesMarcos Boyington
10/29/2024, 5:15 PMexpect / actual
support (with ability to call python libs) & coroutine support & collections support, is not just an MVP, it's completely usable