• for me ," is bugged

    From Rosario19@21:1/5 to All on Sun Nov 19 07:17:48 2023
    Don't you think I don't like APL, or I think I have right...
    for me ," is bugged

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

    Why the same result when
    This object
    ({leftshoe},1)
    has different type of this
    1
    ?

    The same
    ,{dieresis} (1 1)(2 2)(3 3)
    +3-------------------+
    +2---+ +2---+ +2---+
    1 1 2 2 3 3
    +~---+ +~---+ +~---+2
    +?-------------------+
    ,{dieresis} 1 2 3 4
    +4------------------+
    +1-+ +1-+ +1-+ +1-+
    1 2 3 4
    +~-+ +~-+ +~-+ +~-+2
    +?------------------+

    why in this last, each element is boxed, but in the other above, not?

    One good question for resolve would be to find the recursive answer in
    APL of this codegolf question


    https://codegolf.stackexchange.com/questions/34491/list-the-combinations-of-elements-in-a-set


    I think for base of induction one function q solution has to return as
    1 q 1 2 3 4
    +4------------------+
    +1-+ +1-+ +1-+ +1-+
    1 2 3 4
    +~-+ +~-+ +~-+ +~-+2
    +?------------------+
    and as
    4 q 1 2 3 4
    +----------+
    +4-------+
    1 2 3 4
    +~-------+2
    +?---------+

    so all solution make wrong the base of induction for me are wrong, in
    count the codegolf answers in the site.

    This hould be one solution

    q{leftarrow}{leftbrace}{alpha}{rightcaretunderbar}{notequalunderbar}w{leftarrow}{omega}:{leftshoe}{omega}{diamond}{alpha}{leftcaretunderbar}1:{leftbrace}1{rightcaretunderbar}{equalunderbar}w:,{dieresis}w{diamond}{leftshoe}{dieresis}w{rightbrace}{diamond}(
    {alpha}{del}a),({leftbrace}w[1],{omega}{rightbrace}{dieresis}({alpha}-1){del}a{leftarrow}1{downarrow}{omega}){rightbrace}

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rosario19@21:1/5 to All on Sun Nov 19 12:24:30 2023
    On Sun, 19 Nov 2023 07:17:48 +0100, Rosario19 <Ros@invalid.invalid>
    wrote:

    Don't you think I don't like APL, or I think I have right...
    for me ," is bugged

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

    Why the same result when
    This object
    ({leftshoe},1)
    has different type of this
    1
    ?

    The same
    ,{dieresis} (1 1)(2 2)(3 3)
    +3-------------------+
    +2---+ +2---+ +2---+
    1 1 2 2 3 3
    +~---+ +~---+ +~---+2
    +?-------------------+
    ,{dieresis} 1 2 3 4
    +4------------------+
    +1-+ +1-+ +1-+ +1-+
    1 2 3 4
    +~-+ +~-+ +~-+ +~-+2
    +?------------------+

    why in this last, each element is boxed, but in the other above, not?

    One good question for resolve would be to find the recursive answer in
    APL of this codegolf question


    https://codegolf.stackexchange.com/questions/34491/list-the-combinations-of-elements-in-a-set


    I think for base of induction one function q solution has to return as
    1 q 1 2 3 4
    +4------------------+
    +1-+ +1-+ +1-+ +1-+
    1 2 3 4
    +~-+ +~-+ +~-+ +~-+2
    +?------------------+
    and as
    4 q 1 2 3 4
    +----------+
    +4-------+
    1 2 3 4
    +~-------+2
    +?---------+

    so all solution make wrong the base of induction for me are wrong, in
    count the codegolf answers in the site.

    This hould be one solution

    q{leftarrow}{leftbrace}{alpha}{rightcaretunderbar}{notequalunderbar}w{leftarrow}{omega}:{leftshoe}{omega}{diamond}{alpha}{leftcaretunderbar}1:{leftbrace}1{rightcaretunderbar}{equalunderbar}w:,{dieresis}w{diamond}{leftshoe}{dieresis}w{rightbrace}{diamond}
    ({alpha}{del}a),({leftbrace}w[1],{omega}{rightbrace}{dieresis}({alpha}-1){del}a{leftarrow}1{downarrow}{omega}){rightbrace}

    this seems shorter

    q{leftarrow}{leftbrace}{alpha}{rightcaretunderbar}{notequalunderbar}w{leftarrow}{omega}:{leftshoe}{omega}{diamond}{alpha}{leftcaretunderbar}1:{leftbrace}1{rightcaretunderbar}{equalunderbar}w:,{dieresis}w{diamond}{leftshoe}{dieresis}w{rightbrace}{diamond}(
    {alpha}{del}a),w[1]{jot},{dieresis}({alpha}-1){del}a{leftarrow}1{downarrow}{omega}{rightbrace}

    it seems
    {jot},{dieresis}
    can be ok
    because the answer of these below are differents ({leftshoe},1){jot},{dieresis}1 2
    +2----------------+
    +2-----+ +2-----+
    +1-+ +1-+
    1 1 1 2
    +~-+ ~2 +~-+ ~2
    +?-----+ +?-----+3
    +?----------------+
    1{jot},{dieresis}1 2
    +2------------+
    +2---+ +2---+
    1 1 1 2
    +~---+ +~---+2
    +?------------+

    so it seems ok for the q function
    Someone can make shorter this?

    {leftbrace}1{rightcaretunderbar}{equalunderbar}w:,{dieresis}w{diamond}{leftshoe}{dieresis}w{rightbrace}

    But increase the numeber of fuction for me is not ok

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rosario19@21:1/5 to All on Mon Nov 20 13:50:47 2023
    On Sun, 19 Nov 2023 12:24:30 +0100, Rosario19 <Ros@invalid.invalid>
    wrote:

    On Sun, 19 Nov 2023 07:17:48 +0100, Rosario19 <Ros@invalid.invalid>
    wrote:

    Don't you think I don't like APL, or I think I have right...
    for me ," is bugged

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

    Why the same result when
    This object
    ({leftshoe},1)
    has different type of this
    1
    ?

    The same
    ,{dieresis} (1 1)(2 2)(3 3)
    +3-------------------+
    +2---+ +2---+ +2---+
    1 1 2 2 3 3
    +~---+ +~---+ +~---+2
    +?-------------------+
    ,{dieresis} 1 2 3 4
    +4------------------+
    +1-+ +1-+ +1-+ +1-+
    1 2 3 4
    +~-+ +~-+ +~-+ +~-+2
    +?------------------+

    why in this last, each element is boxed, but in the other above, not?

    One good question for resolve would be to find the recursive answer in
    APL of this codegolf question

    https://codegolf.stackexchange.com/questions/34491/list-the-combinations-of-elements-in-a-set


    I think for base of induction one function q solution has to return as
    1 q 1 2 3 4
    +4------------------+
    +1-+ +1-+ +1-+ +1-+
    1 2 3 4
    +~-+ +~-+ +~-+ +~-+2
    +?------------------+
    and as
    4 q 1 2 3 4
    +----------+
    +4-------+
    1 2 3 4
    +~-------+2
    +?---------+

    so all solution make wrong the base of induction for me are wrong, in
    count the codegolf answers in the site.

    This hould be one solution
    q{leftarrow}{leftbrace}{alpha}{rightcaretunderbar}{notequalunderbar}w{leftarrow}{omega}:{leftshoe}{omega}{diamond}{alpha}{leftcaretunderbar}1:{leftbrace}1{rightcaretunderbar}{equalunderbar}w:,{dieresis}w{diamond}{leftshoe}{dieresis}w{rightbrace}{
    diamond}({alpha}{del}a),({leftbrace}w[1],{omega}{rightbrace}{dieresis}({alpha}-1){del}a{leftarrow}1{downarrow}{omega}){rightbrace}

    this seems shorter

    q{leftarrow}{leftbrace}{alpha}{rightcaretunderbar}{notequalunderbar}w{leftarrow}{omega}:{leftshoe}{omega}{diamond}{alpha}{leftcaretunderbar}1:{leftbrace}1{rightcaretunderbar}{equalunderbar}w:,{dieresis}w{diamond}{leftshoe}{dieresis}w{rightbrace}{diamond}
    ({alpha}{del}a),w[1]{jot},{dieresis}({alpha}-1){del}a{leftarrow}1{downarrow}{omega}{rightbrace}

    it seems
    {jot},{dieresis}
    can be ok
    because the answer of these below are differents >({leftshoe},1){jot},{dieresis}1 2
    +2----------------+
    +2-----+ +2-----+
    +1-+ +1-+
    1 1 1 2
    +~-+ ~2 +~-+ ~2
    +?-----+ +?-----+3
    +?----------------+
    1{jot},{dieresis}1 2
    +2------------+
    +2---+ +2---+
    1 1 1 2
    +~---+ +~---+2
    +?------------+

    so it seems ok for the q function
    Someone can make shorter this?

    {leftbrace}1{rightcaretunderbar}{equalunderbar}w:,{dieresis}w{diamond}{leftshoe}{dieresis}w{rightbrace}

    But increase the numeber of fuction for me is not ok

    Above it seems ,{dieresis}{leftshoe}{dieresis}
    make all the input output as i searched, and so we have the APL 46
    char solution

    q{leftarrow}{leftbrace}{alpha}{rightcaretunderbar}{notequalunderbar}w{leftarrow}{omega}:{leftshoe}{omega}{diamond}{alpha}{leftcaretunderbar}1:,{dieresis}{leftshoe}{dieresis}{omega}{diamond}({alpha}{del}a),w[1]{jot},{dieresis}({alpha}-1){del}a{leftarrow}1{
    downarrow}{omega}{rightbrace}


    ,{dieresis}{leftshoe}{dieresis}
    it seems apply to
    (1 1)(2 2)(3 3)
    or to
    1 2 3 4
    make box elements of array elements
    in both cases

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bob Smith@21:1/5 to All on Mon Nov 20 11:31:58 2023
    On 11/19/2023 1:17 AM, Rosario19 wrote:
    Don't you think I don't like APL, or I think I have right...
    for me ," is bugged

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

    Why the same result when
    This object
    ({leftshoe},1)
    has different type of this
    1
    ?

    The expression

    (⊂,1),¨1 2 ←→ ((,1),1) ((,1),2), and
    1 ,¨1 2 ←→ ( 1 ,1) ( 1 ,2)

    catenating a one-element vector to a scalar is the same as catenating a
    scalar to a scalar, so the results are the same.


    The same
    ,{dieresis} (1 1)(2 2)(3 3)
    +3-------------------+
    ¦+2---+ +2---+ +2---+¦
    ¦¦ 1 1¦ ¦ 2 2¦ ¦ 3 3¦¦
    ¦+~---+ +~---+ +~---+2
    +?-------------------+
    ,{dieresis} 1 2 3 4
    +4------------------+
    ¦+1-+ +1-+ +1-+ +1-+¦
    ¦¦ 1¦ ¦ 2¦ ¦ 3¦ ¦ 4¦¦
    ¦+~-+ +~-+ +~-+ +~-+2
    +?------------------+

    why in this last, each element is boxed, but in the other above, not?

    One good question for resolve would be to find the recursive answer in
    APL of this codegolf question


    https://codegolf.stackexchange.com/questions/34491/list-the-combinations-of-elements-in-a-set

    Because NARS2000 has a Combinatorial Operator, a short answer is

    set←1 7 4 ⋄ inp←2
    set[010 1‼inp,⍴set]
    1 7
    7 4
    1 4

    or if you want the answer in lexicographic order

    set[010 2‼inp,⍴set]
    1 7
    1 4
    7 4


    I think for base of induction one function q solution has to return as
    1 q 1 2 3 4
    +4------------------+
    ¦+1-+ +1-+ +1-+ +1-+¦
    ¦¦ 1¦ ¦ 2¦ ¦ 3¦ ¦ 4¦¦
    ¦+~-+ +~-+ +~-+ +~-+2
    +?------------------+
    and as
    4 q 1 2 3 4
    +----------+
    ¦+4-------+¦
    ¦¦ 1 2 3 4¦¦
    ¦+~-------+2
    +?---------+

    so all solution make wrong the base of induction for me are wrong, in
    count the codegolf answers in the site.

    This hould be one solution

    q{leftarrow}{leftbrace}{alpha}{rightcaretunderbar}{notequalunderbar}w{leftarrow}{omega}:{leftshoe}{omega}{diamond}{alpha}{leftcaretunderbar}1:{leftbrace}1{rightcaretunderbar}{equalunderbar}w:,{dieresis}w{diamond}{leftshoe}{dieresis}w{rightbrace}{
    diamond}({alpha}{del}a),({leftbrace}w[1],{omega}{rightbrace}{dieresis}({alpha}-1){del}a{leftarrow}1{downarrow}{omega}){rightbrace}


    Good job! That works.

    --
    _________________________________________
    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)
  • From Rosario19@21:1/5 to Bob Smith on Fri Nov 24 11:49:45 2023
    On Mon, 20 Nov 2023 11:31:58 -0500, Bob Smith wrote:

    On 11/19/2023 1:17 AM, Rosario19 wrote:
    Don't you think I don't like APL, or I think I have right...
    for me ," is bugged

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

    Why the same result when
    This object
    ({leftshoe},1)
    has different type of this
    1
    ?

    The expression

    (?,1),1 2 ?? ((,1),1) ((,1),2), and
    1 ,1 2 ?? ( 1 ,1) ( 1 ,2)

    catenating a one-element vector to a scalar is the same as catenating a >scalar to a scalar, so the results are the same.


    The same
    ,{dieresis} (1 1)(2 2)(3 3)
    +3-------------------+
    +2---+ +2---+ +2---+
    1 1 2 2 3 3
    +~---+ +~---+ +~---+2
    +?-------------------+
    ,{dieresis} 1 2 3 4
    +4------------------+
    +1-+ +1-+ +1-+ +1-+
    1 2 3 4
    +~-+ +~-+ +~-+ +~-+2
    +?------------------+

    why in this last, each element is boxed, but in the other above, not?

    One good question for resolve would be to find the recursive answer in
    APL of this codegolf question


    https://codegolf.stackexchange.com/questions/34491/list-the-combinations-of-elements-in-a-set

    Because NARS2000 has a Combinatorial Operator, a short answer is

    set?1 7 4 ? inp?2
    set[010 1?inp,?set]
    1 7
    7 4
    1 4

    or if you want the answer in lexicographic order

    set[010 2?inp,?set]
    1 7
    1 4
    7 4

    I find that

    {leftbrace}{omega}[010 2{\x203C}{alpha},{rho}{omega}]{rightbrace}

    solve the problem if {alpha}>1.

    this below would solve the problem for each {alpha} in Ints

    {leftbrace}{alpha}{leftcaretunderbar}1:{commabar}{omega}{diamond}{omega}[010 2{\x203C}{alpha},{rho}{omega}]{rightbrace}

    but the autor of the question said is not possible to use combinations functions and should work for each {alpha} in Ints
    so this is my little solution

    {leftbrace}{alpha}{leftcaretunderbar}1:{commabar}{omega}{diamond}{omega}[{rightshoe}{uparrow},/b{leftshoe}{dieresistilde}{upcaret}/{dieresis}2</{dieresis}b{leftarrow},{iota}{alpha}{rho}{notequalunderbar}{omega}]{rightbrace}

    34 chars solution.
    I dont know if {iota}{alpha}{rho}{notequalunderbar}{omega} is allowed
    because it seems generate each {alpha} index in
    1..{notequalunderbar}{omega}
    1 f 5 6 7 8
    +1-+
    4 5
    6
    7
    8
    +~-+
    3 f 5 6 7 8
    +3-----+
    4 5 6 7
    5 6 8
    5 7 8
    6 7 8
    +~-----+
    4 f 5 6 7 8
    +4-------+
    1 5 6 7 8
    +~-------+
    5 f 5 6 7 8
    +5-+
    0 0
    +~-+
    6 f 5 6 7 8
    +6-+
    0 0
    +~-+
    0 f 5 6 7 8
    +1-+
    4 5
    6
    7
    8
    +~-+

    I think for base of induction one function q solution has to return as
    1 q 1 2 3 4
    +4------------------+
    +1-+ +1-+ +1-+ +1-+
    1 2 3 4
    +~-+ +~-+ +~-+ +~-+2
    +?------------------+
    and as
    4 q 1 2 3 4
    +----------+
    +4-------+
    1 2 3 4
    +~-------+2
    +?---------+

    so all solution make wrong the base of induction for me are wrong, in
    count the codegolf answers in the site.

    This hould be one solution

    q{leftarrow}{leftbrace}{alpha}{rightcaretunderbar}{notequalunderbar}w{leftarrow}{omega}:{leftshoe}{omega}{diamond}{alpha}{leftcaretunderbar}1:{leftbrace}1{rightcaretunderbar}{equalunderbar}w:,{dieresis}w{diamond}{leftshoe}{dieresis}w{rightbrace}{
    diamond}({alpha}{del}a),({leftbrace}w[1],{omega}{rightbrace}{dieresis}({alpha}-1){del}a{leftarrow}1{downarrow}{omega}){rightbrace}


    Good job! That works.

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