Apple array language
root
- app
- bench
- c
- exe
- include
- lib
- py
- pyc
- run
- src
- test
- tex
- vim
- .boring
- .ghci
- .stylish-haskell.yaml
- ASM.md
- CHANGELOG.md
- COPYING
- EXISTENTIAL.md
- IDIOMS.md
- LICENSE
- LITERATURE.md
- LOOPING.md
- MEM.md
- Makefile
- POW.md
- README.md
- TODO.md
- apple.cabal
- cabal.project
Apple Array System
Compiler-As-a-Library
Rather than an environment-based interpreter or a compiler invoked on the command line and generating object files, Apple generates machine code which can be used by a JIT compiler or in general.
Thus the same implementation can be used interpreted, compiled, or called from another language.
Documentation from Types
Like Haskell's Haddock or Doxygen, one can generate hyperlinked type signatures, e.g.
hypergeometric : Arr (i `Cons` Nil) float -> Arr (j `Cons` Nil) float -> float -> float
This saves the author from writing redundant documentation.
Programmatic type inference can be of aid in debugging.
Dimension As a Functor
This is based on J (and APL?). Looping is replaced by functoriality (map); we have a family of functors ('n)
Linear Memory Allocation
Rather than calling malloc
to create a new array, arrays
<!-- reuse analysis --> <!-- no gc etc., comes from array &c. -->
Special Combinations
Apple takes inspiration from J's special combinations.
Moving Code vs. Moving Data
> For a computation to take place the data and the program have to be at the > same point in space-time - this is just physics. You can move the data to the > program or the program to the data, or both somewhere else. ... > data movement predominates.
Property Testing
Types act as witnesses, as in QuickCheck.