Information Dump
This page contains a dump of current TODO items and unorganized thoughts and tasks. This will likely stay a mess.
Tasks
- Inline/fold effectful while loops
- Inline
main_purefunction intomainpotentially vec<_, float>syntax for size polymorphism- Type annotations for arbitrary terms
- Add builtin GLSL function callers or GLSL extern libraries
uintBitsToFloatinstead of fat structs to represent variants, instead storing as uvec4 in raw bits- Reuse fields with same type for structs / defunctionalization
- static arrays
whenclause for match statements- Potentially some kind of recursive types like
type list['a] = Nil | Cons of 'a * list['a] - Mutual recursion
- Add a guide or overview to playground
- Add common GLSL builtins:
#radians/#degrees,#refract,#faceforward,#dFdx,#dFdy,#fwidth,#matrixCompMult,#transpose,#inverse,#determinant - Caching the intermediary values for “const” 0 arg functions for lift_consts
Example Ideas
- Raymarched volumetric clouds
- Buffer passing uses (e.g. Game of Life)
- Lava lamp-like example
- Example storing functions and hotswapping functions during executions to justify DFns in variants
- Pathtracing
- Make logo with GLML (finish beaver)
Long Term Tasks
- Update GLML screenshot
- Implicit error field added to every function to propagate error color back
- Add support for LSP hover or something, at least a simple [inspect] for the playground
- Size dependent types
- Swizzle syntax or some kind of rank polymorphism
- Doc strings or emission of helpful comments
- Better benchmarking tests
- Add sliders in playground to change values
- Update blog posts
- Set up Neovim/Emacs/Treesitter plugins
- Set up Github organization
Potentially Interesting Thoughts
wasm_of_ocamlbuild?Coreseems to causeError: Base_am_testing not implemented- Emit on compilation what data needs to be passed from host
- Indexing vectors by arbitrary terms?
- Differentiate int and float division explicitly
- WebGPU backend for computer shaders and SSBOs?
- Export to shadertoy?
Resources
- Janet to GLSL Compiler
- Articles on SDFs
- Size-Dependent Types
- Futhark In-place Records
- Futhark Size-Dependent Types
- Writing Nix Derivations
- Typing Haskell in Haskell
- Type Inference with Constrained Types
- Demystifying Typeclasses
- Compiling Pattern Matching to Good Decision Trees
- Compiler Pattern Matching
- Sparse Conditional Constant Propagation