CoSy in an open to the x86 Forth uses whitespace as the prime delimiter of words , which makes it possible to make far more expressive names than either K or J which are also ( self ) restricted to the ascii keyboard .
The header of a CoSy list ( everything is a list ) is `( Type Count refCount )` . So the definition of ≢ , CoSy's ` i# is , at the naked x86 level , simply
: ≢ cell+ @ ;
` @
, Forth's ` fetch , is just 8B 00 mov eax,[eax]
C3 ret
But , getting to the point , one of the decisions in CoSy I am most happy with is modulo indexing . There is no intrinsic notion of dimension , ie: rank , specifically 0 rank .
For example , with modulo indexing :
10 _i iota
0 1 2 3 4 5 6 7 8 9
R0 i( 1 -1 )i +i
1 0 3 2 5 4 7 6 9 8
But there are a number of cases where ` singletons , lists of count 1 , are usefully special cased in a manner similar to scalars . In particular , if one argument is a singleton , it is generally convenient to disclose the result . I generally have variants for variations on the common task . For instance :
at _at at\ _at\
for selection with and without disclosure or conversion of raw integer on the stack .
Anyway modulo indexing generalizes scalar extension , and allows using negatives to index from the end of a list . My philosophy is the machine cycles are there to make my life evermore ` zipless . And it's remarkable how little it slows things down even with no special casing -- at least at my individual level of use .