piker icon indicating copy to clipboard operation
piker copied to clipboard

Fast langs, which to try..

Open goodboy opened this issue 5 years ago • 7 comments

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:






  • 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/
      • codon compiler 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 ;)

goodboy avatar Aug 11 '20 19:08 goodboy

Chapel: https://chapel-lang.org/

salotz avatar Aug 11 '20 19:08 salotz

Ada. Not going to be very popular though. e.g. http://www.inspirel.com/articles/Ada_Python_Binding.html

salotz avatar Aug 22 '20 00:08 salotz

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).

goodboy avatar Nov 05 '20 17:11 goodboy

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

goodboy avatar Nov 05 '20 17:11 goodboy

Also of note for AOT compilation is pythran as a numpy backend; source.

goodboy avatar Nov 06 '20 20:11 goodboy

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.

salotz avatar Dec 12 '20 21:12 salotz

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.

salotz avatar Dec 12 '20 21:12 salotz