• La funzione dei tipi in APL

    From Rosario19@Ros@invalid.invalid to comp.lang.apl on Fri Nov 17 08:37:57 2023
    From Newsgroup: comp.lang.apl

    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----+
    a 32 4a
    +~----+
    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-------+
    a 32 32 3a
    +~-------+
    o T 2 2{rho}(1 0)(2 0)(2 0)(4 0)
    +3-------+
    a 33 32 3a
    +~-------+
    o T {leftshoe}{leftshoe}{rightshoe}(2.8 2 2)(1 5
    {overbar}3)({overbar}1 {overbar}3 {overbar}1)
    +4--------+
    a 6 6 33 8a
    +~--------+
    o T {leftshoe}{leftshoe}(2.8 2 2)(1 5 {overbar}3)({overbar}1
    {overbar}3 {overbar}1)
    +4--------+
    a 6 6 32 7a
    +~--------+
    o T 1,{dieresis}1 2 3 4
    +3-------+
    a 32 32 3a
    +~-------+
    o T {leftshoe}(2.8 2 2)(1 5 {overbar}3)({overbar}1 {overbar}3 {overbar}1)
    +3------+
    a 6 32 7a
    +~------+
    o T (2.8 2 2)(1 5 {overbar}3)({overbar}1 {overbar}3
    {overbar}1)
    +2----+
    a 32 7a
    +~----+
    o T {rightshoe}(2.8 2 2)(1 5 {overbar}3)({overbar}1 {overbar}3 {overbar}1)
    +2----+
    a 33 8a
    +~----+
    o {rightshoe}(2.8 2 2)(1 5 {overbar}3)({overbar}1 {overbar}3 {overbar}1)
    +3----------+
    3 2.8 2 2a
    a 1 5 >3a
    a >1 >3 >1a
    +~----------+
    o T {zilde}
    1
    ~
    o T {zilde}{zilde}{zilde}{zilde}{zilde}{zilde}{zilde}{zilde}{zilde}{zilde}
    +2----+
    a 32 1a
    +~----+
    o T {iota}1 2 3 4
    +3-------+
    a 34 32 3a
    +~-------+
    o T ({leftshoe},1)
    +3------+
    a 6 32 3a
    +~------+
    o T ({leftshoe},{apostrophe}5{apostrophe})
    +3------+
    a 6 32 4a
    +~------+

    Qualcuno nota qualcosa che non va?

    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Rosario19@Ros@invalid.invalid to comp.lang.apl on Mon Nov 20 11:40:13 2023
    From Newsgroup: comp.lang.apl

    ({leftshoe},1)( (1 2) (1 3))
    +2---------------------+
    a+----+ +2------------+a
    aa+1-+a a+2---+ +2---+aa
    aaa 1aa aa 1 2a a 1 3aaa
    aa+~-+2 a+~---+ +~---+2a
    a+?---+ +?------------+3
    +?---------------------+
    (,1)(1 2)
    +2----------+
    a+1-+ +2---+a
    aa 1a a 1 2aa
    a+~-+ +~---+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----+
    a 32 7a
    +~----+
    T (,1)(1 2)
    +3-------+
    1 32 32 3a
    +~-------+

    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Rosario19@Ros@invalid.invalid to comp.lang.apl on Wed Nov 29 17:35:40 2023
    From Newsgroup: comp.lang.apl

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

    ({leftshoe},1)( (1 2) (1 3))
    +2---------------------+
    a+----+ +2------------+a
    aa+1-+a a+2---+ +2---+aa
    aaa 1aa aa 1 2a a 1 3aaa
    aa+~-+2 a+~---+ +~---+2a
    a+?---+ +?------------+3
    +?---------------------+
    (,1)(1 2)
    +2----------+
    a+1-+ +2---+a
    aa 1a a 1 2aa
    a+~-+ +~---+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----+
    a 32 7a
    +~----+
    T (,1)(1 2)
    +3-------+
    1 32 32 3a
    +~-------+

    vediamo se funziona l'allegato

    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Sudleyplace@bsmith@sudleyplace.com to comp.lang.apl on Thu Nov 30 07:40:54 2023
    From Newsgroup: comp.lang.apl

    On Wednesday, November 29, 2023 at 11:36:21rC>AM UTC-5, Rosario19 wrote:
    On Mon, 20 Nov 2023 11:40:13 +0100, Rosario19 <R...@invalid.invalid>
    wrote:
    ({leftshoe},1)( (1 2) (1 3))
    +2---------------------+
    +U+----+ +2------------++U
    +U+U+1-++U +U+2---+ +2---++U+U
    +U+U+U 1+U+U +U+U 1 2+U +U 1 3+U+U+U
    +U+U+~-+2 +U+~---+ +~---+2+U
    +U+?---+ +?------------+3
    +?---------------------+
    (,1)(1 2)
    +2----------+
    +U+1-+ +2---++U
    +U+U 1+U +U 1 2+U+U
    +U+~-+ +~---+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----+
    +U 32 7+U
    +~----+
    T (,1)(1 2)
    +3-------+
    1 32 32 3+U
    +~-------+
    vediamo se funziona l'allegato
    Sorry, but I don't see any attachment. You can communicate directly with me at bsmith@sudleyplace.com, and we can setup your email/browser for UTF-8 encoding which will allow you to see APL characters in the text.
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Rosario19@Ros@invalid.invalid to comp.lang.apl on Fri Dec 1 07:21:56 2023
    From Newsgroup: comp.lang.apl

    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---------------------+
    -a+----+ +2------------+-a
    -a-a+1-+-a -a+2---+ +2---+-a-a
    -a-a-a 1-a-a -a-a 1 2-a -a 1 3-a-a-a
    -a-a+~-+2 -a+~---+ +~---+2-a
    -a+?---+ +?------------+3
    +?---------------------+
    (,1)(1 2)
    +2----------+
    -a+1-+ +2---+-a
    -a-a 1-a -a 1 2-a-a
    -a+~-+ +~---+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----+
    -a 32 7-a
    +~----+
    T (,1)(1 2)
    +3-------+
    1 32 32 3-a
    +~-------+

    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}

    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Bob Smith@bsmith@sudleydeplacespam.com to comp.lang.apl on Sat Dec 2 03:01:28 2023
    From Newsgroup: comp.lang.apl

    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---------------------+
    -a+----+ +2------------+-a
    -a-a+1-+-a -a+2---+ +2---+-a-a
    -a-a-a 1-a-a -a-a 1 2-a -a 1 3-a-a-a
    -a-a+~-+2 -a+~---+ +~---+2-a
    -a+?---+ +?------------+3
    +?---------------------+
    (,1)(1 2)
    +2----------+
    -a+1-+ +2---+-a
    -a-a 1-a -a 1 2-a-a
    -a+~-+ +~---+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----+
    -a 32 7-a
    +~----+
    T (,1)(1 2)
    +3-------+
    1 32 32 3-a
    +~-------+

    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".
    --- Synchronet 3.21d-Linux NewsLink 1.2