Hey folks, I've gone dark since 2019 because I've ...
# random
t
Hey folks, I've gone dark since 2019 because I've been working on several intensive projects, all good though. What have I missed?
👍 1
a
Compose Multiplatform is a thing
💯 2
e
science is somehow picking up Kotlin, but there is a lot of (python) resistance
👍 1
l
Some folks are making a Kotlin to Python compiler, see #C01EY9ZF9B5 and #C0289CS37AS
👍 2
There's this Twitter account: https://twitter.com/KotlinForData
t
Excellent, looks like a lot has happened. Coming up for a breath after doing Python and C for a while and have a Kotlin differential programming project possibly with a client.
l
Facebook started an OSS project on differential programming, they made an article about it several months ago
t
I heard, a vendor search party came to me yesterday and I'm wondering if Facebook's the client. I'll know for sure tomorrow when I meet them.
👀 1
Can Kotlin be used for microcontrollers yet? I'm announcing a flight sim hardware in a few weeks and an Xbox/BLE version a few months later, but I'm doing it all in C. https://twitter.com/yawmanflight
l
Not really, it's not in JetBrains current priorities for at least one extra year I think. Since I really want it to come true, I explored Kotlin to C/C++ a tiny bit, and then realized the kotlin-python project could be made so it can also output MicroPython compatible/optimized code, and it's being worked on a bit. See #C8C6E5S82, @Piotr Krzemiński is the one that brought the kotlin-python project to my attention.
🚀 2
t
Interesting... will check it out.
p
see also #C01EY9ZF9B5 and #C0289CS37AS, these are channels dedicated to Kotlin/Python backend (still work-in-progress). Plus, the README: https://github.com/krzema12/kotlin-python/blob/python-backend/python/README.md
l
FYI, a JetBrainer is doing 20% of his work time on that Kotlin fork that compiles to Python, so it's a "community" led project 🙃
e
the main problem with microcontrollers was/is the size of the runtime, as far as I remember
t
I've never been a fan of transpilers, especially since practical code will almost always have libraries that won't easily transpile. But I'll give this a look because if anybody can pull it off I'm sure JB can...
l
Intrinsinc implementations and other optimizations can take a transpiler from Meh to Great.
💯 2
t
@elect that's correct. I've been using Arduino for this flight sim handheld device and the Arduino is a VERY thin layer on top of the C layer.
l
Isn't it ln top of C++?
e
btw, how the hell can Facebook pass type parameters in between square brackets?
Copy code
fun getFirst(input: Tensor<[BatchSize, Height, Width]>): Tensor<[Height, Width]> {
 ...
}
t
@louiscad I think it does both C and C++, you're right.
p
intrinsics, DCE, allowing calling "native" Python - that's all in plans, but not in schedule for Kotlin/Python 🙂 we're now pushing towards having anything for the common Python, and trying to push MicroPython to be equally well supported with what we already have
t
@elect that's a good question. That's pretty ugly. The "client" wants my feedback on the API design as well as make their tutorials and docs.
I will bring that up if I move forward with the project
@Piotr Krzemiński alright then! Interesting stuff.
l
@elect @thomasnield it's parameters of type parameters, so I think they do this to avoid any ambiguity, which seems fine to me as square brackets are unused in the type parameter context in Kotlin right now.
👍 1
e
even
Copy code
typealias Height = 40
typealias Width = 50
is not valid kotlin syntax..
l
I think they are in the process of finding out the right syntax that can co-exist with the rest of Kotlin, and they plan to use a compiler plugin to make it work. I recall reading their article throughly, and not getting it though 😅
I mean, not getting the idea of differentiable programming
e
so, they do need to hack into the compiler..
t
@louiscad it's more or less putting first class support in a programming language for calculus derivatives. Francois Chollet has a great book explaining that and other deep learning-related topics. https://www.amazon.com/Learning-Python-Second-Fran%C3%A7ois-Chollet/dp/1617296864/
e
btw Thomas, I'm always looking for candidate to advocate for Kotlin in (data)science in our research institute.. do you want to have a little stage to show off your last projects?
t
@elect I'll take inventory, but I'm not sure how much new Kotlin stuff I have since I last checked in. I did some stuff in Python for O'Reilly, including the Essential Math for Data Science book. I've also been busy doing system safety with AI and developing techniques to keep "self-driving" cars and planes from getting in accidents. I'm helping one of my clients create red tape for that. https://aviationsafety.usc.edu/courses/artificial-intelligence-system-safety-aisys/