Should SRFI-69 should always evaluate in same order? Jakub T. Jankiewicz (14 Jan 2024 12:18 UTC)
Re: Should SRFI-69 should always evaluate in same order? Jakub T. Jankiewicz (14 Jan 2024 15:35 UTC)
Re: Should SRFI-69 should always evaluate in same order? Jeronimo Pellegrini (14 Jan 2024 15:53 UTC)
Re: Should SRFI-69 should always evaluate in same order? Marc Nieper-Wißkirchen (14 Jan 2024 16:10 UTC)

Re: Should SRFI-69 should always evaluate in same order? Jakub T. Jankiewicz 14 Jan 2024 15:35 UTC

I think that I've quoted a wrong SRFI. I wanted to ask about macro
`independently` (SRFI-236) that evaluate the code in unspecified order.

The example implementation always execute in reverse order. Can the order be
random?

On Sun, 14 Jan 2024 10:09:12 -0500
John Cowan <xxxxxx@ccil.org> wrote:

> I'd say that the SRFI is unspecified.  However, there is a tradeoff.  In
> some cases, randomization can be valuable to mitigate DoS attacks.
> However, there is a cost to using it all the time, and it compromises the
> reproducibility of builds (this may not matter in a JS environment).  I'd
> say, make it an option when the hash table is created.
>
> You might want to consider the more modern SRFI 125 (which depends on SRFIs
> 128 and 126).
>
> On Sun, Jan 14, 2024 at 7:19 AM Jakub T. Jankiewicz <xxxxxx@onet.pl> wrote:
>
> > I have a question about SRFI-69. Example implementation R7RS always
> > evaluate
> > in the same order. Is this implementation ok according the SRFI, or should
> > it
> > always run the code in different order (random)?
> >
> > Is unspecified, can be always the same or can it be random?
> >
> > I implemented lips macro for LIPS Scheme that use randomize of the code
> > before returning the results.
> >
> > My code use JavaScript Array::sort with Math.random, that is not real
> > random
> > like real shuffle but it give different result each time.
> >
> > --
> > Jakub T. Jankiewicz, Senior Front-End Developer
> > https://jcubic.pl/me
> > https://koduj.org
> >

--
Jakub T. Jankiewicz, Senior Front-End Developer
https://jcubic.pl/me
https://lips.js.org
https://koduj.org