Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

Lisp Users: Due to the holiday next Monday, there will be no garbage collection.


devel / comp.lang.apl / qsortf one function that use one function for compare 2 elements

SubjectAuthor
* qsortf one function that use one function for compare 2 elementsRosario19
`* qsortf one function that use one function for compare 2 elementsSudleyplace
 `* qsortf one function that use one function for compare 2 elementsRosario19
  `* qsortf one function that use one function for compare 2 elementsBob Smith
   `- qsortf one function that use one function for compare 2 elementsRosario19

1
qsortf one function that use one function for compare 2 elements

<7ht5mi5qu2bi0t7qos49lovs1bcm5m7te5@4ax.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=404&group=comp.lang.apl#404

  copy link   Newsgroups: comp.lang.apl
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Ros@invalid.invalid (Rosario19)
Newsgroups: comp.lang.apl
Subject: qsortf one function that use one function for compare 2 elements
Date: Sun, 26 Nov 2023 08:41:50 +0100
Organization: A noiseless patient Spider
Lines: 40
Message-ID: <7ht5mi5qu2bi0t7qos49lovs1bcm5m7te5@4ax.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="d47165e020ceb5a5bc1613379d5841f9";
logging-data="3364067"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19CTGpRNVg6edHRE0mnzXTyBfA63yojaeU="
Cancel-Lock: sha1:jWmawxUBTDI3MXfSgbg4l2kJeu0=
X-Newsreader: Forte Free Agent 1.93/32.576 English (American)
 by: Rosario19 - Sun, 26 Nov 2023 07:41 UTC

In the page of internet of "rosetta code", there is one APL function
qsort
but here in Nars2000 there is some problem

qsort {leftarrow}
{leftbrace}1{rightcaretunderbar}r{leftarrow}{notequalunderbar}{omega}:{omega}{diamond}p{leftarrow}{omega}[?r]{diamond}({del}({omega}<p)/{omega}),(({omega}=p)/{omega}),({del}({omega}>p)/{omega}){rightbrace}

qsort 45 7 88 55 4 6 89
LIMIT ERROR

My workaround is not write ?r but use floor(r/2) instead. Than added
some code for use one extern compare function for 2 elements

qsortf{leftarrow}{leftbrace}1{rightcaretunderbar}r{leftarrow}{notequalunderbar}{omega}:{omega}{diamond}p{leftarrow}{omega}{rightshoe}{dieresistilde}{downstile}r{colonbar}2{diamond}k{leftarrow}{alpha}{alpha}{leftbrace}{omega}{alpha}{alpha}p{rightbrace}{dieresis}{omega}{diamond}({alpha}{alpha}{del}{del}(0<k)/{omega}),((0=k)/{omega}),({alpha}{alpha}{del}{del}(0>k)/{omega}){rightbrace}

This order using function -
-qsortf 45 7 88 55 4 6 89
+7-----------------+
¦ 89 88 55 45 7 6 4¦
+~-----------------+
this use the function -{dieresistilde} (im not so sure {dieresistilde}
is the right traslation)
-{dieresistilde}qsortf 45 7 88 55 4 6 89
+7-----------------+
¦ 4 6 7 45 55 88 89¦
+~-----------------+
this order using the first element of array element
{?[1]<?[1]:¯1??[1]=?[1]:0?1} qsortf (45 2) (7 9) (88 1) (55 3)
(4 5) (6 11) (89 8)
+7----------------------------------------------------+
¦+2----+ +2----+ +2----+ +2----+ +2---+ +2----+ +2---+¦
¦¦ 89 8¦ ¦ 88 1¦ ¦ 55 3¦ ¦ 45 2¦ ¦ 7 9¦ ¦ 6 11¦ ¦ 4 5¦¦
¦+~----+ +~----+ +~----+ +~----+ +~---+ +~----+ +~---+2
+?----------------------------------------------------+

someone note something wrong? is there some error (because i'm not
familiar in use function {alpha}{alpha} or {del}{del} )?

Re: qsortf one function that use one function for compare 2 elements

<e20b12a0-2192-4ff0-a4af-c51a2ccddcfen@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=416&group=comp.lang.apl#416

  copy link   Newsgroups: comp.lang.apl
X-Received: by 2002:a05:620a:2a03:b0:77d:4ad9:4e94 with SMTP id o3-20020a05620a2a0300b0077d4ad94e94mr374669qkp.4.1701051403172;
Sun, 26 Nov 2023 18:16:43 -0800 (PST)
X-Received: by 2002:a05:6a00:806:b0:6cb:a3f0:b3a9 with SMTP id
m6-20020a056a00080600b006cba3f0b3a9mr2900348pfk.3.1701051402785; Sun, 26 Nov
2023 18:16:42 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.apl
Date: Sun, 26 Nov 2023 18:16:42 -0800 (PST)
In-Reply-To: <7ht5mi5qu2bi0t7qos49lovs1bcm5m7te5@4ax.com>
Injection-Info: google-groups.googlegroups.com; posting-host=73.132.87.70; posting-account=SIxcTAkAAACAGK_O9EF33NhvdWpoD2d0
NNTP-Posting-Host: 73.132.87.70
References: <7ht5mi5qu2bi0t7qos49lovs1bcm5m7te5@4ax.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e20b12a0-2192-4ff0-a4af-c51a2ccddcfen@googlegroups.com>
Subject: Re: qsortf one function that use one function for compare 2 elements
From: bsmith@sudleyplace.com (Sudleyplace)
Injection-Date: Mon, 27 Nov 2023 02:16:43 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 4043
 by: Sudleyplace - Mon, 27 Nov 2023 02:16 UTC

On Sunday, November 26, 2023 at 2:42:34 AM UTC-5, Rosario19 wrote:
> In the page of internet of "rosetta code", there is one APL function
> qsort
> but here in Nars2000 there is some problem
>
> qsort {leftarrow}
> {leftbrace}1{rightcaretunderbar}r{leftarrow}{notequalunderbar}{omega}:{omega}{diamond}p{leftarrow}{omega}[?r]{diamond}({del}({omega}<p)/{omega}),(({omega}=p)/{omega}),({del}({omega}>p)/{omega}){rightbrace}
>
> qsort 45 7 88 55 4 6 89
> LIMIT ERROR

So sorry, you found a bug in NARS2000 which I've fixed in the beta version: https://www.nars2000.org/download/binaries/beta/. Please try running your qsort function again on the beta version.

> My workaround is not write ?r but use floor(r/2) instead. Than added
> some code for use one extern compare function for 2 elements
>
> qsortf{leftarrow}{leftbrace}1{rightcaretunderbar}r{leftarrow}{notequalunderbar}{omega}:{omega}{diamond}p{leftarrow}{omega}{rightshoe}{dieresistilde}{downstile}r{colonbar}2{diamond}k{leftarrow}{alpha}{alpha}{leftbrace}{omega}{alpha}{alpha}p{rightbrace}{dieresis}{omega}{diamond}({alpha}{alpha}{del}{del}(0<k)/{omega}),((0=k)/{omega}),({alpha}{alpha}{del}{del}(0>k)/{omega}){rightbrace}
>
> This order using function -
> -qsortf 45 7 88 55 4 6 89
> +7-----------------+
> Ś 89 88 55 45 7 6 4Ś
> +~-----------------+
> this use the function -{dieresistilde} (im not so sure {dieresistilde}
> is the right traslation)
> -{dieresistilde}qsortf 45 7 88 55 4 6 89
> +7-----------------+
> Ś 4 6 7 45 55 88 89Ś
> +~-----------------+
> this order using the first element of array element
> {?[1]<?[1]:Ż1??[1]=?[1]:0?1} qsortf (45 2) (7 9) (88 1) (55 3)
> (4 5) (6 11) (89 8)
> +7----------------------------------------------------+
> Ś+2----+ +2----+ +2----+ +2----+ +2---+ +2----+ +2---+Ś
> ŚŚ 89 8Ś Ś 88 1Ś Ś 55 3Ś Ś 45 2Ś Ś 7 9Ś Ś 6 11Ś Ś 4 5ŚŚ
> Ś+~----+ +~----+ +~----+ +~----+ +~---+ +~----+ +~---+2
> +?----------------------------------------------------+
>
> someone note something wrong? is there some error (because i'm not
> familiar in use function {alpha}{alpha} or {del}{del} )?

I'm not sure what you are expecting. Does the output look incorrect?

Also, it would be *so much easier* for me to help you if you were to use actual APL characters in your messages. To do this, copy the APL code from your NARS2000 session and paste it into your message, along with the boxed output. There may be other settings to change such as use an APL font, and UTF-8 encoding, but let's try just copying APL code first. Please, please do this.

Re: qsortf one function that use one function for compare 2 elements

<38samipg03u7adfkfbvtmisencvu1g5n4p@4ax.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=423&group=comp.lang.apl#423

  copy link   Newsgroups: comp.lang.apl
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Ros@invalid.invalid (Rosario19)
Newsgroups: comp.lang.apl
Subject: Re: qsortf one function that use one function for compare 2 elements
Date: Tue, 28 Nov 2023 05:52:08 +0100
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <38samipg03u7adfkfbvtmisencvu1g5n4p@4ax.com>
References: <7ht5mi5qu2bi0t7qos49lovs1bcm5m7te5@4ax.com> <e20b12a0-2192-4ff0-a4af-c51a2ccddcfen@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="cec14f2f8b983cc0858df9a2560b6eb4";
logging-data="176433"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/GRZ6/Olf9/82+YLXVEvEdsCZGs+oLMYo="
Cancel-Lock: sha1:9lJEkdK7vUu4MBViJT3mLzi9Plw=
X-Newsreader: Forte Free Agent 1.93/32.576 English (American)
 by: Rosario19 - Tue, 28 Nov 2023 04:52 UTC

On Sun, 26 Nov 2023 18:16:42 -0800 (PST), Sudleyplace
<bsmith@sudleyplace.com> wrote:
if there is one wuestion i would ask? yes one general apl question
why enter as input
1 1
is one array of 2 elements
the same of
(1 1)
?

Why (1 1) is not the array 1 1, enclosed?

Re: qsortf one function that use one function for compare 2 elements

<65669067$0$717$14726298@news.sunsite.dk>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=424&group=comp.lang.apl#424

  copy link   Newsgroups: comp.lang.apl
Path: i2pn2.org!i2pn.org!news.niel.me!news.gegeweb.eu!gegeweb.org!news.mb-net.net!open-news-network.org!weretis.net!feeder8.news.weretis.net!usenet.goja.nl.eu.org!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail
Date: Tue, 28 Nov 2023 20:14:14 -0500
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: qsortf one function that use one function for compare 2 elements
Content-Language: en-US
Newsgroups: comp.lang.apl
References: <7ht5mi5qu2bi0t7qos49lovs1bcm5m7te5@4ax.com>
<e20b12a0-2192-4ff0-a4af-c51a2ccddcfen@googlegroups.com>
<38samipg03u7adfkfbvtmisencvu1g5n4p@4ax.com>
From: bsmith@sudleydeplacespam.com (Bob Smith)
In-Reply-To: <38samipg03u7adfkfbvtmisencvu1g5n4p@4ax.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 35
Message-ID: <65669067$0$717$14726298@news.sunsite.dk>
Organization: SunSITE.dk - Supporting Open source
NNTP-Posting-Host: 46ab9802.news.sunsite.dk
X-Trace: 1701220455 news.sunsite.dk 717 bsmith@sudleyplace.com/73.132.87.70:53369
X-Complaints-To: staff@sunsite.dk
 by: Bob Smith - Wed, 29 Nov 2023 01:14 UTC

On 11/27/2023 11:52 PM, Rosario19 wrote:
> On Sun, 26 Nov 2023 18:16:42 -0800 (PST), Sudleyplace
> <bsmith@sudleyplace.com> wrote:
> if there is one wuestion i would ask? yes one general apl question
> why enter as input
> 1 1
> is one array of 2 elements
> the same of
> (1 1)
> ?
>
> Why (1 1) is not the array 1 1, enclosed?

The best description I've found to answer this question is from the APL2
Language Reference Manual (apl2lrm.pdf, p.37) which says

"In expressions of arrays, parentheses that do not separate and group
are redundant".

That is, in a←(1 1) the parens group but do not separate, and so they
are redundant, meaning that a←(1 1) is equivalent to a←1 1.

In a←(1 1) (2 2) as in a←(1 1) 2 2 the parens both group and separate,
and so they are not redundant, meaning that no set of parens may be
removed without changing the meaning of that expression.

In a←(1) (2) as in a←(1) 2 the parens separate but do not group, so they
are all redundant.

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

To reply to me directly, delete "despam".

Re: qsortf one function that use one function for compare 2 elements

<dqpemilnuus1ga0bgajcthjoo8nc5jn3o0@4ax.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=425&group=comp.lang.apl#425

  copy link   Newsgroups: comp.lang.apl
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Ros@invalid.invalid (Rosario19)
Newsgroups: comp.lang.apl
Subject: Re: qsortf one function that use one function for compare 2 elements
Date: Wed, 29 Nov 2023 17:31:39 +0100
Organization: A noiseless patient Spider
Lines: 32
Message-ID: <dqpemilnuus1ga0bgajcthjoo8nc5jn3o0@4ax.com>
References: <7ht5mi5qu2bi0t7qos49lovs1bcm5m7te5@4ax.com> <e20b12a0-2192-4ff0-a4af-c51a2ccddcfen@googlegroups.com> <38samipg03u7adfkfbvtmisencvu1g5n4p@4ax.com> <65669067$0$717$14726298@news.sunsite.dk>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="bb4e8a8403ade7a9d12eaa6db0d970cf";
logging-data="968179"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18q6TMfgPc0qRHpEW72CqVR6SVr56TeHB0="
Cancel-Lock: sha1:N2klqU89yDYy9nQmwj8CLVWuN5s=
X-Newsreader: Forte Free Agent 1.93/32.576 English (American)
 by: Rosario19 - Wed, 29 Nov 2023 16:31 UTC

On Tue, 28 Nov 2023 20:14:14 -0500, Bob Smith wrote:

>On 11/27/2023 11:52 PM, Rosario19 wrote:
>> On Sun, 26 Nov 2023 18:16:42 -0800 (PST), Sudleyplace
>> <bsmith@sudleyplace.com> wrote:
>> if there is one wuestion i would ask? yes one general apl question
>> why enter as input
>> 1 1
>> is one array of 2 elements
>> the same of
>> (1 1)
>> ?
>>
>> Why (1 1) is not the array 1 1, enclosed?
>
>The best description I've found to answer this question is from the APL2
>Language Reference Manual (apl2lrm.pdf, p.37) which says
>
>"In expressions of arrays, parentheses that do not separate and group
>are redundant".
>
>That is, in a?(1 1) the parens group but do not separate, and so they
>are redundant, meaning that a?(1 1) is equivalent to a?1 1.
>
>In a?(1 1) (2 2) as in a?(1 1) 2 2 the parens both group and separate,
>and so they are not redundant, meaning that no set of parens may be
>removed without changing the meaning of that expression.
>
>In a?(1) (2) as in a?(1) 2 the parens separate but do not group, so they
>are all redundant.

ok thank you

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor