3 ms·
This is already known as "multi-stage programming" or "staged programming" -- I don't see a need for a new term https://en.wikipedia.org/wiki/Multi-stage_progr
by chubot 2y ago
This is already known as "multi-stage programming" or "staged programming" -- I don't see a need for a new term
https://en.wikipedia.org/wiki/Multi-stage_programming https://en.wikipedia.org/wiki/Multi-stage_programming
https://okmij.org/ftp/meta-programming/index.html https://okmij.org/ftp/meta-programming/index.html
Comment from 2019 about it, which mentions Zig, Terra/Lua, Scala LMS, etc.:
https://news.ycombinator.com/item?id=19013437 https://news.ycombinator.com/item?id=19013437
We should also mention big data frameworks and ML frameworks like TensorFlow / Pytorch.
The "eager mode" that Chris Lattner wanted in Swift for ML and Mojo is to actually to get rid of the separation between the stage of creating a graph of operators (in Python, serially) and then evaluating the graph (on GPUs, in parallel).
And also CMake/Make and even autoconf/make and Bazel have stages -- "programming" a graph, and then executing it in parallel:
Language Design: Staged Execution Models - https://www.oilshell.org/blog/2021/04/build-ci-comments.html#language-design-staged-execution-models https://www.oilshell.org/blog/2021/04/build-ci-comments.html...
- deleted 2y ago[deleted]
- 0xfaded 2y agoI'm going to hijack the mention of ML to share xbyaku, a c++ library presenting a DSL for assembling machine code at runtime (useful for JIT). It's used by some of the pytorch back ends. https://github.com/herumi/xbyak https://github.com/herumi/xbyak Example use: https://github.com/oneapi-src/oneDNN/blob/main/src/cpu/aarch64/brgemm/jit_brdgmm_kernel.hpp https://github.com/oneapi-src/oneDNN/blob/main/src/cpu/aarch... I learned about these through a blog post about speeding up pytorch on ARM: https://pytorch.org/blog/optimized-pytorch-w-graviton/ https://pytorch.org/blog/optimized-pytorch-w-graviton/
- sitkack 2y agoI was just looking for an in memory assembler. Thanks!