all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#56416: 29.0.50; cl-loop cl-psetq problem
@ 2022-07-06  5:01 Sean Whitton
  2022-07-06 11:41 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Sean Whitton @ 2022-07-06  5:01 UTC (permalink / raw)
  To: 56416

Evaluating

(cl-loop with list = '(1 2 3 4)

	 for l in list
	 for x = l and y = l

	 collect x)

yields (1 1 2 3) but it should yield (1 2 3 4).

-- 
Sean Whitton





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#56416: 29.0.50; cl-loop cl-psetq problem
  2022-07-06  5:01 bug#56416: 29.0.50; cl-loop cl-psetq problem Sean Whitton
@ 2022-07-06 11:41 ` Lars Ingebrigtsen
  2022-07-06 16:06   ` Mattias Engdegård
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2022-07-06 11:41 UTC (permalink / raw)
  To: Sean Whitton; +Cc: Mattias Engdegård, 56416

Sean Whitton <spwhitton@spwhitton.name> writes:

> Evaluating
>
> (cl-loop with list = '(1 2 3 4)
>
> 	 for l in list
> 	 for x = l and y = l
>
> 	 collect x)
>
> yields (1 1 2 3) but it should yield (1 2 3 4).

It's the `and' that's triggering this bug, I guess?

I seem to vaguely recall Mattias doing something about these corner
cases -- I may totally misremember, but I've added him to the CCs
anyway; perhaps he has a comment.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#56416: 29.0.50; cl-loop cl-psetq problem
  2022-07-06 11:41 ` Lars Ingebrigtsen
@ 2022-07-06 16:06   ` Mattias Engdegård
  2022-07-07  7:53     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Mattias Engdegård @ 2022-07-06 16:06 UTC (permalink / raw)
  To: Lars Ingebrigtsen
  Cc: Tino Calancha, Noam Postavsky, Philipp Stephani, dick,
	Sean Whitton, 56416

6 juli 2022 kl. 13.41 skrev Lars Ingebrigtsen <larsi@gnus.org>:

> I seem to vaguely recall Mattias doing something about these corner
> cases

Were you thinking of 8e3868125c? That was only an optimisation for the non-parallel case, and shouldn't affect this problem.

Past work on this particular feature was done in bug#29799 and bug#40727; this bug might actually be a dup of bug#6583 (?). Better ask those who did the work at the time.






^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#56416: 29.0.50; cl-loop cl-psetq problem
  2022-07-06 16:06   ` Mattias Engdegård
@ 2022-07-07  7:53     ` Lars Ingebrigtsen
  2022-07-07  8:07       ` Mattias Engdegård
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2022-07-07  7:53 UTC (permalink / raw)
  To: Mattias Engdegård
  Cc: Tino Calancha, Noam Postavsky, Philipp Stephani, dick,
	Sean Whitton, 56416

Mattias Engdegård <mattiase@acm.org> writes:

>> I seem to vaguely recall Mattias doing something about these corner
>> cases
>
> Were you thinking of 8e3868125c? That was only an optimisation for the
> non-parallel case, and shouldn't affect this problem.

I probably just misremembered altogether...

> Past work on this particular feature was done in bug#29799 and
> bug#40727; this bug might actually be a dup of bug#6583 (?). Better
> ask those who did the work at the time.

Ah, yes, this looks like a duplicate of 6583, so I'll merge the two.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#56416: 29.0.50; cl-loop cl-psetq problem
  2022-07-07  7:53     ` Lars Ingebrigtsen
@ 2022-07-07  8:07       ` Mattias Engdegård
  0 siblings, 0 replies; 5+ messages in thread
From: Mattias Engdegård @ 2022-07-07  8:07 UTC (permalink / raw)
  To: Lars Ingebrigtsen
  Cc: Tino Calancha, Noam Postavsky, Philipp Stephani, dick,
	Sean Whitton, 56416

7 juli 2022 kl. 09.53 skrev Lars Ingebrigtsen <larsi@gnus.org>:

> I probably just misremembered altogether...

Thanks for notifying me anyway -- the problem seems to stem from a confusion between iteration stepping vs materialising the variable value. It's a mess and I'm probably not the right man to fix it (no fan of cl-loop in general).






^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-07-07  8:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-06  5:01 bug#56416: 29.0.50; cl-loop cl-psetq problem Sean Whitton
2022-07-06 11:41 ` Lars Ingebrigtsen
2022-07-06 16:06   ` Mattias Engdegård
2022-07-07  7:53     ` Lars Ingebrigtsen
2022-07-07  8:07       ` Mattias Engdegård

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.