• La funzione dei tipi in APL

    From Rosario19@21:1/5 to All on Fri Nov 17 08:37:57 2023
    Forse in qualche giorno sono riuscito a riscrivere la funzione dei
    tipi...

    Un tipo non e' altro che uno scalare di tipo int per gli scalari
    oppure se non si tratta di scalare una lista di numeri tipo int
    Scrivere in APL una funzione dei tipi T che ritorna i seguenti valori
    |¯1 errore
    |1 Zilde
    |2 Float|3 Int|4 Char|5 Complex,Quaternion or Oction|6 other scalar|7 multi elementi|8 int float|32 List|33 Matrix|34 Tensor

    Esempi
    o{leftarrow}{quad}fmt
    o T 1
    3
    ~
    o T 23.89
    2
    ~
    o T 8J9
    5
    ~
    o T '4'
    4
    ~
    o T '445'
    +2----+
    ¦ 32 4¦
    +~----+
    T (2.8 2 2)(1 5 {overbar}3)({overbar}1 {overbar}3 {overbar}1)
    32 7
    T {epsilon}(2.8 2 2)(1 5 {overbar}3)({overbar}1 {overbar}3
    {overbar}1)
    32 8
    o T ,2 2{rho}(1 0)(2 0)(2 0)(4 0)
    +3-------+
    ¦ 32 32 3¦
    +~-------+
    o T 2 2{rho}(1 0)(2 0)(2 0)(4 0)
    +3-------+
    ¦ 33 32 3¦
    +~-------+
    o T {leftshoe}{leftshoe}{rightshoe}(2.8 2 2)(1 5
    {overbar}3)({overbar}1 {overbar}3 {overbar}1)
    +4--------+
    ¦ 6 6 33 8¦
    +~--------+
    o T {leftshoe}{leftshoe}(2.8 2 2)(1 5 {overbar}3)({overbar}1
    {overbar}3 {overbar}1)
    +4--------+
    ¦ 6 6 32 7¦
    +~--------+
    o T 1,{dieresis}1 2 3 4
    +3-------+
    ¦ 32 32 3¦
    +~-------+
    o T {leftshoe}(2.8 2 2)(1 5 {overbar}3)({overbar}1 {overbar}3 {overbar}1)
    +3------+
    ¦ 6 32 7¦
    +~------+
    o T (2.8 2 2)(1 5 {overbar}3)({overbar}1 {overbar}3
    {overbar}1)
    +2----+
    ¦ 32 7¦
    +~----+
    o T {rightshoe}(2.8 2 2)(1 5 {overbar}3)({overbar}1 {overbar}3 {overbar}1)
    +2----+
    ¦ 33 8¦
    +~----+
    o {rightshoe}(2.8 2 2)(1 5 {overbar}3)({overbar}1 {overbar}3 {overbar}1)
    +3----------+
    3 2.8 2 2¦
    ¦ 1 5 ¯3¦
    ¦ ¯1 ¯3 ¯1¦
    +~----------+
    o T {zilde}
    1
    ~
    o T {zilde}{zilde}{zilde}{zilde}{zilde}{zilde}{zilde}{zilde}{zilde}{zilde}
    +2----+
    ¦ 32 1¦
    +~----+
    o T {iota}1 2 3 4
    +3-------+
    ¦ 34 32 3¦
    +~-------+
    o T ({leftshoe},1)
    +3------+
    ¦ 6 32 3¦
    +~------+
    o T ({leftshoe},{apostrophe}5{apostrophe})
    +3------+
    ¦ 6 32 4¦
    +~------+

    Qualcuno nota qualcosa che non va?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rosario19@21:1/5 to All on Mon Nov 20 11:40:13 2023
    ({leftshoe},1)( (1 2) (1 3))
    +2---------------------+
    ¦+----+ +2------------+¦
    ¦¦+1-+¦ ¦+2---+ +2---+¦¦
    ¦¦¦ 1¦¦ ¦¦ 1 2¦ ¦ 1 3¦¦¦
    ¦¦+~-+2 ¦+~---+ +~---+2¦
    ¦+?---+ +?------------+3
    +?---------------------+
    (,1)(1 2)
    +2----------+
    ¦+1-+ +2---+¦
    ¦¦ 1¦ ¦ 1 2¦¦
    ¦+~-+ +~---+2
    +?----------+

    It seems that the type of (,1) is the same of the type of (1,2): list
    of integer
    but the type of ({leftshoe},1) is not the same of the type ((1 2)(3
    4))
    so (,1) is a list of integer but ({leftshoe},1) is not a list of list
    of integer
    is that right? Why?

    It seems to me that if (,1)(1 2) is one array of array of integers ({leftshoe},1)( (1 2) (1 3)) has to be one array of array of array of
    integers

    or I think not ok

    T ({leftshoe},1)( (1 2) (1 3))
    +2----+
    ¦ 32 7¦
    +~----+
    T (,1)(1 2)
    +3-------+
    1 32 32 3¦
    +~-------+

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rosario19@21:1/5 to All on Wed Nov 29 17:35:40 2023
    On Mon, 20 Nov 2023 11:40:13 +0100, Rosario19 <Ros@invalid.invalid>
    wrote:

    ({leftshoe},1)( (1 2) (1 3))
    +2---------------------+
    ¦+----+ +2------------+¦
    ¦¦+1-+¦ ¦+2---+ +2---+¦¦
    ¦¦¦ 1¦¦ ¦¦ 1 2¦ ¦ 1 3¦¦¦
    ¦¦+~-+2 ¦+~---+ +~---+2¦
    ¦+?---+ +?------------+3
    +?---------------------+
    (,1)(1 2)
    +2----------+
    ¦+1-+ +2---+¦
    ¦¦ 1¦ ¦ 1 2¦¦
    ¦+~-+ +~---+2
    +?----------+

    It seems that the type of (,1) is the same of the type of (1,2): list
    of integer
    but the type of ({leftshoe},1) is not the same of the type ((1 2)(3
    4))
    so (,1) is a list of integer but ({leftshoe},1) is not a list of list
    of integer
    is that right? Why?

    It seems to me that if (,1)(1 2) is one array of array of integers >({leftshoe},1)( (1 2) (1 3)) has to be one array of array of array of >integers

    or I think not ok

    T ({leftshoe},1)( (1 2) (1 3))
    +2----+
    ¦ 32 7¦
    +~----+
    T (,1)(1 2)
    +3-------+
    1 32 32 3¦
    +~-------+

    vediamo se funziona l'allegato

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rosario19@21:1/5 to All on Fri Dec 1 07:21:56 2023
    On Wed, 29 Nov 2023 17:35:40 +0100, Rosario19 <Ros@invalid.invalid>
    wrote:

    On Mon, 20 Nov 2023 11:40:13 +0100, Rosario19 <Ros@invalid.invalid>
    wrote:

    ({leftshoe},1)( (1 2) (1 3))
    +2---------------------+
    ¦+----+ +2------------+¦
    ¦¦+1-+¦ ¦+2---+ +2---+¦¦
    ¦¦¦ 1¦¦ ¦¦ 1 2¦ ¦ 1 3¦¦¦
    ¦¦+~-+2 ¦+~---+ +~---+2¦
    ¦+?---+ +?------------+3
    +?---------------------+
    (,1)(1 2)
    +2----------+
    ¦+1-+ +2---+¦
    ¦¦ 1¦ ¦ 1 2¦¦
    ¦+~-+ +~---+2
    +?----------+

    It seems that the type of (,1) is the same of the type of (1,2): list
    of integer
    but the type of ({leftshoe},1) is not the same of the type ((1 2)(3
    4))
    so (,1) is a list of integer but ({leftshoe},1) is not a list of list
    of integer
    is that right? Why?

    It seems to me that if (,1)(1 2) is one array of array of integers >>({leftshoe},1)( (1 2) (1 3)) has to be one array of array of array of >>integers

    or I think not ok

    T ({leftshoe},1)( (1 2) (1 3))
    +2----+
    ¦ 32 7¦
    +~----+
    T (,1)(1 2)
    +3-------+
    1 32 32 3¦
    +~-------+

    vediamo se funziona l'allegato

    TT?{m?T¨,??1=?k??m:k?(3 2)=k[?k]:8?7}
    TT?{m?T¨,??1=?k??m:k?(3 2)=k[?k]:8?7}

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bob Smith@21:1/5 to All on Sat Dec 2 03:01:28 2023
    On 12/1/2023 1:21 AM, Rosario19 wrote:
    On Wed, 29 Nov 2023 17:35:40 +0100, Rosario19 <Ros@invalid.invalid>
    wrote:

    On Mon, 20 Nov 2023 11:40:13 +0100, Rosario19 <Ros@invalid.invalid>
    wrote:

    ({leftshoe},1)( (1 2) (1 3))
    +2---------------------+
    ¦+----+ +2------------+¦
    ¦¦+1-+¦ ¦+2---+ +2---+¦¦
    ¦¦¦ 1¦¦ ¦¦ 1 2¦ ¦ 1 3¦¦¦
    ¦¦+~-+2 ¦+~---+ +~---+2¦
    ¦+?---+ +?------------+3
    +?---------------------+
    (,1)(1 2)
    +2----------+
    ¦+1-+ +2---+¦
    ¦¦ 1¦ ¦ 1 2¦¦
    ¦+~-+ +~---+2
    +?----------+

    It seems that the type of (,1) is the same of the type of (1,2): list
    of integer
    but the type of ({leftshoe},1) is not the same of the type ((1 2)(3
    4))
    so (,1) is a list of integer but ({leftshoe},1) is not a list of list
    of integer
    is that right? Why?

    It seems to me that if (,1)(1 2) is one array of array of integers
    ({leftshoe},1)( (1 2) (1 3)) has to be one array of array of array of
    integers

    or I think not ok

    T ({leftshoe},1)( (1 2) (1 3))
    +2----+
    ¦ 32 7¦
    +~----+
    T (,1)(1 2)
    +3-------+
    1 32 32 3¦
    +~-------+

    vediamo se funziona l'allegato

    TT?{m?T¨,??1=?k??m:k?(3 2)=k[?k]:8?7}
    TT?{m?T¨,??1=?k??m:k?(3 2)=k[?k]:8?7}

    It looks like your newsgroup client uses a message encoding other than
    UTF-8. Please find that setting, and change it to UTF-8. This change
    will allow you to display APL chars natively in this newsgroup. Search
    for the word "encoding" in your newsgroup settings and change the value
    to UTF-8.

    --
    _________________________________________
    Bob Smith -- bsmith@sudleydeplacespam.com
    http://www.sudleyplace.com - http://www.nars2000.org

    To reply to me directly, delete "despam".

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)