aboutsummaryrefslogtreecommitdiff
path: root/source/primitives
AgeCommit message (Collapse)Author
2019-04-16Play around with a vector typeHEADmasterAdrian Kummerlaender
Using _vectors_ as fundamental datatype could make for a really neat experience. Imagine e.g.: * fundamental arithmetic operations that apply to both vectors and scalars * implicit component-wise or vector-wise operations * scalar values as 1D vectors * higher order functions to manipulate those vectors * `map` function that applies a (quoted?) word to all vector elements and returns the result * efficient parallel operations * a rich library of vector manipulation functions * or even: matrices as a fundamental datatype? * problem: probably harder to conveniently enter via a 1-D repl * sound more and more like a RPN version of APL… Back to reality, here is what this prototype actually adds: * new `DList!int` based datatype alongside the existing int, string and bool types * basic support for printing such values in a readable fashion * new fundamental `:` word that constructs a vector of two elements * `1 2 :` yields `[1, 2]` * adapted `+` and `*` to support component-wise operations * `1 2 : 3 +` yields `[4, 5]`
2017-04-18Rename `over` to `ovr` so that all stack operations are three letter wordsAdrian Kummerlaender
2017-04-18Rename boolean operatorsAdrian Kummerlaender
2017-04-17Add logic negation operation; and, or conditionsAdrian Kummerlaender
2017-04-17Add debug instruction for non-destructive printing of the whole stackAdrian Kummerlaender
2017-04-17Add some more Forth stack operatorsAdrian Kummerlaender
2017-04-16Clean up state, primitives, processing distinctionAdrian Kummerlaender
2017-04-16Extract variable management, move into `state` packageAdrian Kummerlaender
2017-04-15Hide module implementation detailsAdrian Kummerlaender
2017-04-15Clearly separate handling of core, conditional and definition primitivesAdrian Kummerlaender
2017-04-15Handle definition, conditional primitive words in respective modulesAdrian Kummerlaender
2017-04-15Perform custom word definition at the same level as conditional primitivesAdrian Kummerlaender
2017-04-15Add README.md, exampleAdrian Kummerlaender
2017-04-14Convert structure to _dub_ build systemAdrian Kummerlaender