Skip to content

Latest commit

 

History

History
241 lines (240 loc) · 10.4 KB

TODO.md

File metadata and controls

241 lines (240 loc) · 10.4 KB
  • windows lol
  • serialize (save on disk) REPL states
  • documentation generated from types
  • idioms... deforestation
  • mapMaybe hm
  • numpy einstein summation
  • documentation from types
    • quickcheck!
    • automatic differentiation (pytorch eh)

Features

  • https://hackage.haskell.org/package/containers-0.7/docs/Data-Sequence.html#v:cycleTaking (cycle til')
  • Use arc4random_buf and also arc4random_uniform, random, drand48
  • special case for 𝔯 0 1 :: float etc.
  • 𝔯 0 1 :: Arr sh int special case, apply bitmask over array?
  • folds/scans shouldn't take seeds
  • allow type signatures in lambdas?
  • mko executable - compile expression into .o file, with some name
  • random number generation
  • lift constants out of loops (precompute)
  • tuples idk.
    • float tuple return
  • reshape arrays
  • clz? (count leading zeroes = floor(log) -> digits)
  • flatness check (arrays)
  • generalize "diagonal"?
  • fold-along-diagonal for poly mult. https://code.jsoftware.com/wiki/Vocabulary/slashdot

Syntax

Unicode

Optimization

  • arrays in assembler: register indirection?
T13 = A_0
T16 = T13.dim[0]
  • Break dependency chains: use e.g. four accumulators per loop cycle when summing float array (see agner fog)

Performance

  • consolidate move-zero for floats and ints
    eor x5, x5, x5                           a5 00 05 ca
    fmov d2, x5                              a2 00 67 9e
    eor x5, x5, x5                           a5 00 05 ca
    
  • think of a better way to handle functions of tuples (internally)
    • πe which places in registers?
  • map-of-gen. idiom
  • bitmask immediates for and on aarch64
  • Use Word64 for sets of registers
  • Modify state (+1) instead of using lazy list to supply e.g. temps

Bugs

λa.λn. {log ← (%)⑂(_.∴ℝ); N ⟜ ⌊(log a n)+1; ~(ug. (λs. (s/.n, s|n)) a N)}

has universally quantified return type, should be existential!

 > enc'irange 0 10
Vec 11 [ 87960950128712
       , 131941424177260
 > (#f⊳)'⟨⟨#f,#f⟩,⟨#t,#f⟩,⟨#t,#t⟩,⟨#f,#t⟩⟩
Arr (4×3) [ [#f, #f, #f]
          , [#t, #f, #f]
          , [#t, #t, #f]
          , [#f, #t, #f] ]
 > (#f⊲)'⟨⟨#f,#f⟩,⟨#t,#f⟩,⟨#t,#t⟩,⟨#f,#t⟩⟩
Arr arepl: src/Hs/A.hs:35:15-34: Non-exhaustive patterns in \case

HasCallStack backtrace:
  bracket, called at libraries/haskeline/System/Console/Haskeline/InputT.hs:157:33 in haskeline-0.8.2.1-c961:System.Console.Haskeline.InputT
 > \xs.\rs. [(-y)'x]`{1∘[2],0} xs (rs::Vec 2 float)
λxs. (λrs. ((λx. (λy. (λx. x - y) ' x)) `{1∘[2],0} xs) rs)
    : Arr (2 × j) float → Vec 2 float → Arr (sh ⧺ j) float
 > \xs.\rs. [(-x)'y]`{0,1∘[2]} (rs::Vec 2 float) xs
λxs. (λrs. ((λx. (λy. (λx. x - x) ' y)) `{0,1∘[2]} rs) xs)
    : Arr (2 × j) float → Vec 2 float → Arr (2 × j) float
  • [ ]
 > :yank ix test/data/ixGen.🍏
 > :ix ⟨1.0,3,4⟩
zsh: illegal hardware instruction  cabal run arepl
  • :cmm \xs. [⟨x->1,x->2⟩]'(xs::Vec n (float, float))
  • segfault when aso is called pre-register allocation (arm)
  • Should display constraints
 > :ty (+)
a → a → a
 > :ty (⋉)
o → o → o
  • :asm [x(%.)(y::Arr(iConsjConsNil)float)] type inference??
  • xmm0 and xmm1 incorrectly marked as clobbered when return value is not actually in xmm0/xmm1 or whatever
  • fsin instruction requires reduction module 2pi or w/e
  • beta-reduction with 'rand' or w/e (needs to be llet ... in)
  • Pass over to ensure everything is monomorphized
  • itof (:xs) - would prefer w/o parens?
  • it would be nice to write _x%y instead of (_x)%y (parse precedence)
  • match doesn't check constraints on annotations

Type system

  • diagonal on higher-rank?
  • Check that bindings are not too polymorphic
    • after inlining
    • add a pass to prevent arrays of tuples of arrays
  • indexing with tuples (3-tuple for rank 3 array...)

Checks/Passes

  • Warn if irange or frange will exceed?

Examples

shortDiv :: [Integer] -> [Integer] -> [Integer]
shortDiv p1 (_:p2) = unfoldr go (length p1 - length p2, p1)
  where
    go (0, _) = Nothing
    go (i, h:t) = Just (h, (i-1, zipWith (+) (map (h *) ker) t))
    ker = negate <$> p2 ++ repeat 0

Visual/Art

Rosetta Code

Debug

  • sanity check negative dims