Fast langs, which to try..
For piker, python is glue and a great interactive lang for getting things done in a readable maintainable way. Using it does not preclude using faster (compiled) langs for processing.
There's the the usual suspects we're ok with including as deps like cython and numba, maybe mypyc once it matures a little.
There's a decent little list of the Python options on the pyjion repo.
There are a few newer langs I'm personally very interested in having first class support for as stream processing delegates:
-
rustas a replacement for C++ seems super promising given thePy03effort and especially since there is a growing ndarray community and crate set-
maturinlooks like a fantastic publisher for python bound rust binaries - delegating to a
numpyapi implemented inrustusingrust-numpy. - Rust for a pythonista - Why and when?
- sentry's blog post on fixing source mapping using
rust -
awaiting rust futures from python using
Py03🏄🏼 (triosupport wen, cuz here'sasynciosupport 😿 ) - wasm runtime for python
wasmer-pythonlet's you call into rust code using the wasm JIT
-
-
zig as a C alternative:
- was thankfully pointed to some python integration tips in ziglang/zig#5795
-
nim as maybe a replacement for both?
-
Arraymanceris looking quite nice with the right motivation and built-in broadcast semantics - in theory we can make
nimwork well using the compile time extensions on import ofnimporter - interesting 2 year old comparison with
numpyand followup reddit discourse
-
- how could we forget chapel (thanks @salotz)
-
arkouda provides
numpy-like arrays - a pretty interesting (from a data perspective) set of dependents
-
arkouda provides
-
vale: https://vale.dev/- comparison on "easyness" vs. C++ and rust: https://vale.dev/comparisons
- compiler repo: https://github.com/ValeLang/Vale
-
mojo: https://docs.modular.com/mojo/why-mojo.html- much thanks to one of our community members for finding this one @sirdinkus :sunglasses:!
- coorp: https://docs.modular.com/
- manual: https://docs.modular.com/mojo/programming-manual.html
- notebook for tinkering: https://docs.modular.com/mojo/notebooks/BoolMLIR.html
- blog intro: https://www.theregister.com/2023/05/05/modular_struts_its_mojo_a/
-
codoncompiler project, found from the above: https://www.theregister.com/2023/03/11/python_codon_compiler/
-
- critique: biggest issue i have is that they haven't FOSS-ed the compiler (yet) and their goals seem pretty lofty, but i mean if they do it all we would need is a community to take up mindshare and i think you'd see a swath of people consider moving to it.
More to come, please feel free to pipe in lurkers ;)
Chapel: https://chapel-lang.org/
Ada. Not going to be very popular though. e.g. http://www.inspirel.com/articles/Ada_Python_Binding.html
Thanks to @salotz for pointing out that pyston just had a v2 release. Though geared for web micro-benchmarks, could be handy to try soon since it has better compat with 3.8 then pypy.
Also a good read on rust vs. ocaml (somewhat relevant since original compiler was written in latter).
Interesting bit on working together with ocaml from jane street:
https://blog.janestreet.com/using-python-and-ocaml-in-the-same-jupyter-notebook/
Here's their big schpeal on why ocaml:
https://www.youtube.com/watch?v=v1CmGbOGb2I
There's an emerging branch of languages which are essentially high level interfaces to low-level parallel computing interfaces with a GPU focus, i.e. CUDA, OpenCL, etc.
-
futhark :: purely (truly) functional language written in Haskell
- targets: C, OpenCL, CUDA
- integration: generate source code and call with FFI like normal helper
- very domain specific and focused, because of this is efficient and easy to write, but can only be integrated at build time.
-
c-mera :: Common Lisp like language/alternative syntax for C etc.
- targets: C, C++, CUDA, GLSL
- integration: unsure
-
scopes :: lisp like language with hybrid s-exp and whitespace syntax. Run time JIT compilation mixed with interpreted code, sort of like numba.
- targets: SPIR-V, C, GLSL
- integration: not sure, looks like its more oriented in being a self-contained thing
- More of a contender to something like Python itself or as an alternative to a low level language coupled to a higher level languages, much like the Python-C relationship.
One other low-level GC-less "fastlang" I am interested in is Odin.
Its kind of like a less ambitious Zig. No exceptions or async. No macros but has support for compile time programming. I like the simplicity. Probably will be similar to the Jai language from Joe Blow.