Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Information Dump

This page contains a dump of current TODO items and unorganized thoughts and tasks. This will likely stay a mess.

Tasks / Bugs

  • Allow binary operations and pipes to be used as curried functions
  • Nested destructing, removing mat pattern case
  • User defined constraints for broadcasting/others, eg: let f (x : a) (y : b) : c where (a b +> c) = x + y
  • Type annotations for arbitrary terms
  • Type aliases with parameters
  • Curried builtin functions for partial application
  • Auto lift f : float -> float to work over vecs?
  • Add builtin GLSL function callers or GLSL extern libraries
  • uintBitsToFloat instead of fat structs to represent variants, instead storing as uvec4 in raw bits
  • Reuse fields with same type for structs / defunctionalization
  • Tuples and static arrays
  • when clause for match statements
  • Add types to new passes like specialize_params
  • Potentially some kind of recursive types like type list['a] = Nil | Cons of 'a * list['a]
  • Passing constraints to mono is a bit weird, they should concretize that in typecheck step
  • Merging specialize and mono passes since they interplay like they're supposed to be the same pass
  • Mutual recursion
  • Add a guide or overview to playground
  • Refactor Makefile if needed to shared playground build files, since we rebuild playground on serve
  • Add common GLSL builtins: #radians / #degrees, #refract, #faceforward, #dFdx, #dFdy, #fwidth,#matrixCompMult, #transpose, #inverse, #determinant

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
  • Function inlining / specialize (but likely everything is specialized)
  • Dead code elimination
  • Constant folding/propagation (Sparse conditional constant propagation)
  • 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
  • Add language reference and examples to mdbook

Potentially Interesting Thoughts

  • wasm_of_ocaml build? Core seems to cause Error: Base_am_testing not implemented
  • Write Nix derivation for Javascript and OCaml bindings
  • Emit on compilation what data needs to be passed from host
  • Indexing vectors by arbitrary terms?
  • Differentiate int and float division explicitly
  • Have int <: float be a true subtype (currently can't assign let (x : option[float]) = Some 5)
  • WebGPU backend for computer shaders and SSBOs?
  • Export to shadertoy?

Resources