Earlier quoted context omitted.
As a former Perl hacker who started using Python in 2005, I saw Python ride several waves. (Numerical computation, data science, deep learning) Perl was the leading tool for scripting and text parsing. Python didn’t really supplant it for a long time — until people started writing more complicated scripts that had to be maintained. Perl reads like line noise after 6 months whereas I can look at Python code from 20 ye…
I agree with you, and I'll put it slightly stronger. Ruby is a better language than Python in every way except the very most important two: - Imports in Ruby seriously suck compared to Python. Everything requires into a global scope and an ecosystem like bundler which encourages centralizing all imports for your entire codebase into one file. - Python has docstrings encouraging in code documentation. Add common ecosy…
GraalPy – A high-performance embeddable Python 3 runtime for Java
91–100 of 151 posts
Re: GraalPy – A high-performance embeddable Python 3 runtime for Java
#92Earlier quoted context omitted.
As a former Perl hacker who started using Python in 2005, I saw Python ride several waves. (Numerical computation, data science, deep learning) Perl was the leading tool for scripting and text parsing. Python didn’t really supplant it for a long time — until people started writing more complicated scripts that had to be maintained. Perl reads like line noise after 6 months whereas I can look at Python code from 20 ye…
I agree with you, and I'll put it slightly stronger. Ruby is a better language than Python in every way except the very most important two: - Imports in Ruby seriously suck compared to Python. Everything requires into a global scope and an ecosystem like bundler which encourages centralizing all imports for your entire codebase into one file. - Python has docstrings encouraging in code documentation. Add common ecosy…
These two issues would have been quite easy to fix and would have led to a completely different development experience. Python had a good implementation with a nice C FFI (CPython) right from the beginning, whereas Ruby MRI had lots of efficiency issues with long-running computations. IMHO this is one of the reasons why Python won. Building a numerics stack on top of MRI did not look very promising.
Re: GraalPy – A high-performance embeddable Python 3 runtime for Java
#93Earlier quoted context omitted.
I agree with you, and I'll put it slightly stronger. Ruby is a better language than Python in every way except the very most important two: - Imports in Ruby seriously suck compared to Python. Everything requires into a global scope and an ecosystem like bundler which encourages centralizing all imports for your entire codebase into one file. - Python has docstrings encouraging in code documentation. Add common ecosy…
It's a shame Python has a strong anti-FP stance with crippled lambdas. And an OO system that looks like it has been bolted in, compared to Ruby which is essentially a Smalltalk with Perl-like syntax and some Lisp influence. These two issues would have been quite easy to fix and would have led to a completely different development experience. Python had a good implementation with a nice C FFI (CPython) right from the…
I think the two languages just have different design philosophies. In Python, functions are fundamental and classes are built on top of them. In Ruby, objects are fundamental and functions (i.e. Procs etc) are themselves objects.
You could just as well claim that in Ruby, functions look like they have been bolted in. For example, you can’t call a Proc itself but need to call one of its methods.
Re: GraalPy – A high-performance embeddable Python 3 runtime for Java
#94Earlier quoted context omitted.
I agree with you, and I'll put it slightly stronger. Ruby is a better language than Python in every way except the very most important two: - Imports in Ruby seriously suck compared to Python. Everything requires into a global scope and an ecosystem like bundler which encourages centralizing all imports for your entire codebase into one file. - Python has docstrings encouraging in code documentation. Add common ecosy…
I think your comment needs to mention that Python has syntax for type annotations and two mature type checkers (mypy and pyright) with more under development. Python is thus very much part of the modern statically typed languages scene (moreso than Go) whereas Ruby isn't at all. Many people wouldn't touch Python today if it weren't for this.
I’ve never quite understood how this works. Surely a type system is absolutely fundamental to a language - how can you have multiple incompatible ones?
Do you need to choose a particular type checker for each project? Are you limited to only using third-party libraries that use the same type checker?
Re: GraalPy – A high-performance embeddable Python 3 runtime for Java
#95Earlier quoted context omitted.
I'm assuming you mean "how well does JVM concurrency play with Python concurrency"? Python concurrency works perfectly well on its own, Java/Clojure concurrency works very well on its own, trying to pass multithreaded information across the JVM boundary to Python while bypassing the GIL will result in a segfault (Edit: but there are "with-gil" wrappers you can use to prevent that, at a slight performance hit). In pra…
This is pretty interesting, what's the benefit over using python so directly with java? I mean, is the overhead of having these as seperate services / processes too much? I'm not trying to provoke I'm genuinely curious about the use case. Also, what's the dev workflow like? When I'm coding python I basically live inside the debugger (a.k.a the carmark method), do you use an IDE that understands both java and python?…
I also tend to live inside the debugger for some things but for other things I really enjoy the Clojure/lisp style "in editor evaluation" (where the result appears right after your cursor when you evaluate the S-expression).
The usescasses question is a good one. Python has some pretty good libraries. For one project, we have a (Clojure) ring server and GCP cloud resources. Using the Python GCP secret manager to access protected cloud resources allows me to have the same code in dev and prod with minimal configuration.
Also sometimes it's just political. Maybe your workplace is a Clojure/Java only shop -- in that case, sometimes you can make the case Python is "just a library" and get some cool toys, in other circumstances where its Python only you can at least dev using your lisp REPL.
So if that kind of thing sounds fun to you (and you like emacs) you'll like this. If that sounds like hell to you, then it is!! I really tried hard to optimize around "fun" for the API, but it's also really performant, and great fun for hacking.
In particular I really love doing silly stuff with Python LLMs in the Clojure REPL.
So, tl;dr, I'd say it is really great if you are a certain kind of hacker who wants all the most fun toys and as an added bonus it also works in production.
Re: GraalPy – A high-performance embeddable Python 3 runtime for Java
#96Earlier quoted context omitted.
I agree with you, and I'll put it slightly stronger. Ruby is a better language than Python in every way except the very most important two: - Imports in Ruby seriously suck compared to Python. Everything requires into a global scope and an ecosystem like bundler which encourages centralizing all imports for your entire codebase into one file. - Python has docstrings encouraging in code documentation. Add common ecosy…
I think your comment needs to mention that Python has syntax for type annotations and two mature type checkers (mypy and pyright) with more under development. Python is thus very much part of the modern statically typed languages scene (moreso than Go) whereas Ruby isn't at all. Many people wouldn't touch Python today if it weren't for this.
Python’s type system is substantially more complex than Go’s - it’s probably more complete, but given it’s optional nature, less sound.
In “modern” type systems, is completeness considered more important than soundness? The success of TypeScript suggests it is.
Re: GraalPy – A high-performance embeddable Python 3 runtime for Java
#97Earlier quoted context omitted.
I'm assuming you mean "how well does JVM concurrency play with Python concurrency"? Python concurrency works perfectly well on its own, Java/Clojure concurrency works very well on its own, trying to pass multithreaded information across the JVM boundary to Python while bypassing the GIL will result in a segfault (Edit: but there are "with-gil" wrappers you can use to prevent that, at a slight performance hit). In pra…
This is pretty interesting, what's the benefit over using python so directly with java? I mean, is the overhead of having these as seperate services / processes too much? I'm not trying to provoke I'm genuinely curious about the use case. Also, what's the dev workflow like? When I'm coding python I basically live inside the debugger (a.k.a the carmark method), do you use an IDE that understands both java and python?…
Not even GraalVM has that! Not yet, anyway.
So there's a lot of easy perfomance synergies over microservices, but I'm the kind of dev where I tend to prioritize fun over performance as long as it's "performant enough". Fortunately, Chris (author of libpython-clj) is an ex-Nvidia performance obsessed dev though so the performance there is on point.
Re: GraalPy – A high-performance embeddable Python 3 runtime for Java
#98Earlier quoted context omitted.
It's a shame Python has a strong anti-FP stance with crippled lambdas. And an OO system that looks like it has been bolted in, compared to Ruby which is essentially a Smalltalk with Perl-like syntax and some Lisp influence. These two issues would have been quite easy to fix and would have led to a completely different development experience. Python had a good implementation with a nice C FFI (CPython) right from the…
> an OO system that looks like it has been bolted in, compared to Ruby I think the two languages just have different design philosophies. In Python, functions are fundamental and classes are built on top of them. In Ruby, objects are fundamental and functions (i.e. Procs etc) are themselves objects. You could just as well claim that in Ruby, functions look like they have been bolted in. For example, you can’t call a…
Re: GraalPy – A high-performance embeddable Python 3 runtime for Java
#99Earlier quoted context omitted.
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.
As a former Perl hacker who started using Python in 2005, I saw Python ride several waves. (Numerical computation, data science, deep learning) Perl was the leading tool for scripting and text parsing. Python didn’t really supplant it for a long time — until people started writing more complicated scripts that had to be maintained. Perl reads like line noise after 6 months whereas I can look at Python code from 20 ye…
I wrote Ruby when I got started because it was the most accessible and the Rails learning content was top notch. Now I use python when I need more than a few `bash` pipes to accomplish anything, but if I were to solve a capital-P Problem, of course the tool often chooses the project after constraints.
Re: GraalPy – A high-performance embeddable Python 3 runtime for Java
#100I 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?
I am willing to live with Python as the Lisp we deserve to have, on this AI wave, when it finally gets a proper JIT story we can rely on, regardless of the workload. Currently it is a mix and match of an herculean engineering effort mostly ignored by the community (PyPy), DSLs for GPGPUs, bunch of C and C++ libraries that people keep referring to as "Python" when any language can have similar bindings, jython, IronPy…
So you gain the perf of a JIT, while losing out on most everything else high-performance in the Python ecosystem.