What is the use-case for GraalPy? To be honest I don't understand why would anyone want to use it.
GraalPy – A high-performance embeddable Python 3 runtime for Java
41–50 of 151 posts
Re: GraalPy – A high-performance embeddable Python 3 runtime for Java
#42What is the use-case for GraalPy? To be honest I don't understand why would anyone want to use it.
I worked at a company where data scientists wrote python code using pandas and we had port it to java and a library called keanu that was very useful but soon became unmaintained. Of course this was very time consuming and unrewarding, all because only java applications could be deployed to production due to a stupid top-down decision. This GraalPy sounds like something I wish existed back then.
Re: GraalPy – A high-performance embeddable Python 3 runtime for Java
#43Earlier quoted context omitted.
I worked at a company where data scientists wrote python code using pandas and we had port it to java and a library called keanu that was very useful but soon became unmaintained. Of course this was very time consuming and unrewarding, all because only java applications could be deployed to production due to a stupid top-down decision. This GraalPy sounds like something I wish existed back then.
Did you look into Jython back then?
Re: GraalPy – A high-performance embeddable Python 3 runtime for Java
#44I guess what makes Python interesting right now is the integration with ML toolchains, CUDA, Metal/MLX, pytorch, tensorflow, LLM encoders/decoders, etc. more than Python the language. But can GraalVM run those codes meaningfully when Python is merely used for glue code with the important bits implemented in native code?
The reasons for all this stuff having been developed in Python also make Python interesting right now, all by themselves. It did not happen by accident; this stuff was developed fairly recently and there was no shortage of mature languages to choose from.
Add to that the existing excellent ecosystem, the strong culture of scientific stacks and a very good story for providing c-extentions (actually the best one in all scripting languages because of things like cibuildwheel).
It's only in small tech bubbles like HN that devs find it surprising.
Re: GraalPy – A high-performance embeddable Python 3 runtime for Java
#45What is the use-case for GraalPy? To be honest I don't understand why would anyone want to use it.
Re: GraalPy – A high-performance embeddable Python 3 runtime for Java
#46Earlier quoted context omitted.
Graal let's you compile native binaries
Graal is many things (a marketing nightmare). The guest language part is orthogonal to the native packager AFAIK.
Thus, while swift and graal both depend on llvm, they use different variants and there's no real way to make inter-op between swift and graal (even using the llvm it which graal is said to be able to consume).
e.g., I believe this announcement represents the work to compile a python (3.11) and some proof-of-concept python packages using graal toolchain, to spur other packages to support the same.
So I'd really love to be wrong, but I believe building under the graal llvm is the common factor.
Re: GraalPy – A high-performance embeddable Python 3 runtime for Java
#47Is there a way to embed Python 3 into Swift like this?
There is (active, 2K stars) https://github.com/pvieito/PythonKit and I've heard of people being able to deploy apps with python on the app store. YMMV.
Re: GraalPy – A high-performance embeddable Python 3 runtime for Java
#48Re: GraalPy – A high-performance embeddable Python 3 runtime for Java
#49Earlier quoted context omitted.
I worked at a company where data scientists wrote python code using pandas and we had port it to java and a library called keanu that was very useful but soon became unmaintained. Of course this was very time consuming and unrewarding, all because only java applications could be deployed to production due to a stupid top-down decision. This GraalPy sounds like something I wish existed back then.
Did you look into Jython back then?
Re: GraalPy – A high-performance embeddable Python 3 runtime for Java
#50What is the use-case for GraalPy? To be honest I don't understand why would anyone want to use it.
Minecraft Mods can only be written in Java and I want my kid to learn python. Jython is still 2.x and it'd be nice to let my kid write a minecraft mod in python. Not a business use case but a use case.
Not sure if you were wanting Python specifically, but KubeJS lets you use JavaScript for mods. I think there's also a clojure integration.