Piotr Krzemiński

Results 127 comments of Piotr Krzemiński

```diff - python3 python/e2e-tests/out/python-consumer.py > python/e2e-tests/out/output.txt + micropython python/e2e-tests/out/python-consumer.py | tee python/e2e-tests/out/output.txt ``` Using `tee` seems to solve the `OSError: [Errno 13] EACCES` issue.

TODO: check why `__new__` (magic method) was used, and if some non-magic method can be used instead.

Thanks to the below snippet I was able to generate a dependency diagram of lowerings: (to be pasted in `compiler/ir/backend.py/src/org/jetbrains/kotlin/ir/backend/py/JsLoweringPhases.kt`) ```kotlin fun main() { println("@startuml") println("skinparam componentStyle rectangle") println("left to...

It's not trivial - enabling it with the flag produces an empty file. It needs deeper investigation.

Why is it needed? Just to generate prettier Python? I'm also not sure if there's a Kotlin counterpart so that we can translate it 1:1 to Python.

I tried with Qodana on a separate branch (https://github.com/krzema12/kotlin-python/commits/onboard-qodana), but it now can only analyze the whole project. It takes over 4 hours to complete.

Experimenting on https://github.com/krzema12/kotlin-python/tree/python-stdlib Trying with ``` dist/kotlinc/bin/kotlinc-py -libraries libraries/stdlib/python/build/libs/kotlin-stdlib-python-js-1.6.255-SNAPSHOT.klib -Xir-produce-js -output out_ir.py python/experiments/python.kt ``` but getting ``` exception: java.lang.IllegalStateException: Internal function 'jsEqeq' not found at org.jetbrains.kotlin.ir.backend.py.JsIrBackendContext.getJsInternalFunction$backend_py(JsIrBackendContext.kt:384) at org.jetbrains.kotlin.ir.backend.py.JsIntrinsics.getInternalFunction(JsIntrinsics.kt:367) at org.jetbrains.kotlin.ir.backend.py.JsIntrinsics.(JsIntrinsics.kt:31)...

I'm unblocked and continuing with integrating the new stdlib. Current status can be found on [python-stdlib](https://github.com/krzema12/kotlin-python/tree/python-stdlib) branch.

Iterating with: ``` ./gradlew dist && ./gradlew :kotlin-stdlib-python:build && dist/kotlinc/bin/kotlinc-py -libraries libraries/stdlib/python/build/libs/kotlin-stdlib-python-js-1.6.255-SNAPSHOT.klib -Xir-produce-js -output out_ir.py python/experiments/python.kt ```

I'm pausing it to focus on project cleanup. It now doesn't fail at runtime for some simple example, but I had to remove a lot of Python backend pieces, which...