live coding kotlin native snake
play

Live Coding Kotlin/Native Snake - PowerPoint PPT Presentation

Live Coding Kotlin/Native Snake github.com/dkandalov/kotlin-native-snake @dmitrykandalov Lightning talk What is Kotlin/Native? Kotlin/Native is an LLVM backend for the Kotlin compiler, runtime implementation, and native code


  1. Live Coding Kotlin/Native Snake github.com/dkandalov/kotlin-native-snake @dmitrykandalov

  2. ⚡ Lightning talk ⚡

  3. What is Kotlin/Native?

  4. Kotlin/Native is an LLVM backend for the Kotlin compiler, runtime implementation, and native code generation facility using the LLVM toolchain.

  5. 🤸

  6. Kotlin/Native is an LLVM backend for the Kotlin compiler, runtime implementation, and native code generation facility using the LLVM toolchain.

  7. IR

  8. IR

  9. Compiler frontend IR

  10. Compiler backend IR

  11. Compiler backend IR

  12. Compiler backend IR

  13. Kotlin/Native is an LLVM backend for the Kotlin compiler, runtime implementation, and native code generation facility using the LLVM toolchain.

  14. LLVM

  15. Kotlin/Native IR

  16. Kotlin/Native LLVM IR IR

  17. Kotlin/Native LLVM IR IR Done by LLVM

  18. C/C++ (clang) Objective-C Rust Swift Julia Graal VM

  19. Kotlin/Native is an LLVM backend for the Kotlin compiler, runtime implementation, and native code generation facility using the LLVM toolchain.

  20. kotlin.String java.lang.String

  21. kotlin.String java.lang.String JS string

  22. kotlin.String java.lang.String JS string KString

  23. kotlin.* JVM JS Native

  24. - reference counting - native-specific code

  25. Kotlin/Native is an LLVM backend for the Kotlin compiler, runtime implementation, and native code generation facility using the LLVM toolchain.

  26. Why?

  27. 1. Performance

  28. 2. C APIs

  29. - POSIX - native OS UI - interop between languages - C libraries (search for “awesome-c“)

  30. 3. Kotlin

  31. End of the ⚡ Lightning talk ⚡

  32. Live coding

  33. Disclaimer: Very few unit tests 😔

  34. Disclaimer: This is a happy path 🌉🦅

  35. There are more native things…

  36. - C and Objective-C interop - concurrency with workers - object.freeze() -object.pin() - @CName, @ThreadLocal

  37. - memory leaks - segmentation faults

  38. Takeaways

  39. Kotlin/Native

  40. Kotlin/Native Rust Scala Native

  41. Kotlin/Native Rust Scala Native

  42. See also: github.com/dkandalov/rust-snake github.com/dkandalov/scala-native-snake github.com/dkandalov/go-snake github.com/dkandalov/graalvm-snake

  43. It’s early days for Kotlin/Native

  44. - slow compilation 😵 - only CLion & AppCode - tools are not perfect yet

  45. What can you do next?

  46. Kotlin/Native 😏

  47. The End github.com/dkandalov/kotlin-native-snake @dmitrykandalov

  48. The End github.com/dkandalov/kotlin-native-snake @dmitrykandalov

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend