TSa:

> HaloO,

Hi!

> Ruud H.G. van Tol:
>> Yes, it could use a step:
>>
>> ^42.7   = (0, 7, 14, 21, 28, 35)
>> ^42.-7  = (35, 28, 21, 14, 7, 0)
>
> OK, fine if the step sign indicates reversal after creation.
> That is, the modulus is 7 in both cases.
>
>
>> ^-42.7  = (-35, -28, -21, -14, -7, 0)
>> ^-42.-7 = (0, -7, -14, -21, -28, -35)
>
> I would make these
>
>    ^-42.7  == (-42, -35, -28, -21, -14,  -7)
>    ^-42.-7 == ( -7, -14, -21, -28, -35, -42)

No, that spoils it. The first number is not in the range.
Written as -42.7^ it might have looked more familiar.


>> and (^-42.7 + ^42.7) has length 11, maybe better expressed as
>> ^-42.7.42,
>
> And the fact that you concatenate two six-element lists and get one
> with *11* elements doesn't strike you as odd?

Not at all: they just overlap at 0.


> I find it very
> disturbing! E.g. when shifting by 42 rightwards I would expect
>
>    ^-42.7.42 == (-42, -35, -28, -21, -14, -7, 0, 7, 14, 21, 28, 35)
>
> to become
>
>    ^84.7 == (0, 7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77)
>
> and of course
>
>    ^84.7 »- 42;
>
> or to more resemble your notation
>
>    -42 +« ^84.7;
>
> beeing two other forms to write this kind. Ahh, and should there be
> a warning about a remainder for
>
>    ^45.7 == (0, 7, 14, 21, 28, 35, 42) # rest 3

OK, a warning, but only at warning level 3 or more. Or maybe at 2,
mental arithmetic isn't popular these days.
(daughter in the background asks what's so funny)


> and how should a negative---err---endpoint be handled? I opt for
>
>    ^-45.7 == (-49, -35, -28, -21, -14, -7) # rest 4
>
> But the warning could be avoided with some dwimmery after we
> observe that 45 == 42 + 3 and -45 == -49 + 4 the respective rests
> mean to shift the list rightwards accordingly
>
>    ^45.7 == (3, 10, 17, 24, 31, 38, 45)        # shift right 3
>   ^-45.7 == (-46, -39, -30, -23, -18, -11, -4) # same
>
>
>    ^-45.7 == (-45, -38, -31, -24, -17, -10, -3) # shift right 4
>     ^45.7 == (4, 11, 18, 25, 32, 39, 46)        # same
>
> If you find the above odd, than use the homogenious cases
>
>    ^45.7  == ( 3,  10,  17,  24,  31,  38,  45)  # shift right  3
>
> and
>
>   ^-45.-7 == (-3, -10, -17, -24, -31, -38, -45)  # reversed shift
>           right -3 == -« ^45.7
>
> which results in pairwise nullification as expected
>
>    ^45.7 »+« ^-45.-7 == ^7.0 == (0,0,0,0,0,0,0)

I hope those all resulted from the spoiling step, because I got lost.


> Let's switch to a shorter example list and use the , to build
> some subsets of int
>
>   ^-21.7.0 , ^21.7.0 == (-21, -14, -7, 0,  7, 14)  # length: 42/7 == 6
>   ^-21.7.1 , ^21.7.1 == (-20, -13, -6, 1,  8, 15)
>   ^-21.7.2 , ^21.7.2 == (-19, -12, -5, 2,  9, 16)
>   ^-21.7.3 , ^21.7.3 == (-18, -11, -4, 3, 10, 17)
>   ^-21.7.4 , ^21.7.4 == (-17, -10, -3, 4, 11, 18)
>   ^-21.7.5 , ^21.7.5 == (-16,  -9, -2, 5, 12, 19)
>   ^-21.7.6 , ^21.7.6 == (-15,  -8, -1, 6, 13, 20)
>   ^-21.7.7 , ^21.7.7 == (-14,  -7,  0, 7, 14, 21)
>
> If the lists where extended on both sides to infinity then a
> shift of 7 changes anything, as can be seen from the last line.
>
> Hmm, the syntax is ambigous with respect to the . if we want to
> allow steps < 1.

No, that is invalid. But I had been thinking about a factor, like 1/5
for step 0.2.


Looks like a jobs for the colon:
>
>   ^21:7:0 == (0, 7, 14)
>
>   ^1:0.25 == (0, 0.25, 0.5, 0.75)
>
>   ^1:0.2:0.2 == (0.2, 0.4, 0.6, 0.8, 1.0)

    ^21.7
    ^1./4
    ^1./5
    ^PI.22/7 == (0)


> which perhaps just mean
>
>   ^1:step(0.2):shift(0.2)
>
> Please note that all of the above are *list literals* not
> prefix ^ operator invocations. If one wants to become variable
> in this type/kind then a @var is needed. A ^$x might be just
> a short form of capturing the kind of $x into ^x which not
> auto-listifies. Thus
>
>    my ^x $x = 7;
>
>    say ^x;   # Int

Nice: "The domain of x is Int."

>    say +$x;  # 7
>
> but
>
>    my ^a @a = (0,0,0);
>
>    say [EMAIL PROTECTED];  # 3
>    say ^a;   # Array is shape(3) of Int
>              # Array[^3] of Int
>              # Array[ shape => 3, kind => Int ]
>
> or however the structure of an array is printed.
>
>
>> which makes '^5' the short way to write '^5.1.0'.
>
> And ^0 is *the* empty list.

Unintentional, but that's how many great things are found.


> Hmm, and ^Inf.0 the infinite
> list full of zeros (0, 0, 0, ...), ^Inf.1 are of course
> the non-negative integers in a list (0, 1, 2, ...). Then
> if we hyperate it and pick the last entry (^Inf.1 »+ 1)[-1]
> we get the first transfinite ordinal Omega[0]. From there we
> keep counting transfinitely...

I suddenly feel whole again.


> And of course 10 * ^0.pi == 3.14...

And that's what we all do things for.

-- 
Grtz, Ruud

Reply via email to