From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Okamsn via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#73431: Add `setf` support for `stream.el` in ELPA Date: Thu, 24 Oct 2024 02:51:05 +0000 Message-ID: References: <827cc7fc-10be-4b93-bd67-f275193e5d84@protonmail.com> <932d7782-5685-4a43-b34c-fc0bb3a958e4@protonmail.com> <87zfnk6ydj.fsf@posteo.net> <9db72ab8-604e-451d-b9a0-74fa5b3fa81f@protonmail.com> <87a5fic3om.fsf@posteo.net> <7de379ab-a4f2-4853-96dc-cdf05dd7218e@protonmail.com> <09504d12-9ca6-4b4d-84ff-c7f9d1087192@protonmail.com> <87o73dmp7q.fsf@web.de> <87ed48mgbu.fsf@web.de> Reply-To: Okamsn Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2422"; mail-complaints-to="usenet@ciao.gmane.io" Cc: philipk@posteo.net, nicolas@petton.fr, monnier@iro.umontreal.ca To: michael_heerdegen@web.de, 73431@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 24 04:51:57 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t3nx6-0000TR-JN for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 24 Oct 2024 04:51:57 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t3nwk-0004iE-U0; Wed, 23 Oct 2024 22:51:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t3nwi-0004hg-Tk for bug-gnu-emacs@gnu.org; Wed, 23 Oct 2024 22:51:33 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t3nwi-0004SE-LS for bug-gnu-emacs@gnu.org; Wed, 23 Oct 2024 22:51:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:From:Date:To:Subject; bh=cOGDf3Izf3LZvJMAYYUex9PxNWFxy+8nIQkSIQ2o8Fk=; b=qQ3IYWdkbusOY9Oxf7KV63g7lcvxQeucqmssctnIw8z4N8xwEldvNjST34sqW9wOuWGRj1m4m4laK8R6s5upxG7nqc7NEuvNThMidH0DQtZJ63VPo1UHtKQqVfr8GANu2/SbgwAi7efWEDWTuy1AXabt87zciLGGvrqCP6WKhbqSzCksuBb4yjjnIMFcVFZL66A55w3DCiWdqIZwnCZCxXSjZXyMuM/fomZiq2hJBVvohY7BKKAo96uWjkGNc+dMEQDsxQup3KRMDAYrLjeXm18DuMKgHu0uWaweh0c+tyn1tM/BKUP+5hMLERMVqGJQF+J8w7ybKbDfYxObnV4siA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t3nxC-0007Qv-Bt for bug-gnu-emacs@gnu.org; Wed, 23 Oct 2024 22:52:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Okamsn Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 Oct 2024 02:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73431 X-GNU-PR-Package: emacs X-Debbugs-Original-To: Michael Heerdegen , "Michael Heerdegen via \"Bug reports for GNU Emacs, the Swiss army knife of text editors\"" X-Debbugs-Original-Cc: philipk@posteo.net, nicolas@petton.fr, 73431@debbugs.gnu.org, monnier@iro.umontreal.ca Original-Received: via spool by submit@debbugs.gnu.org id=B.172973831328553 (code B ref -1); Thu, 24 Oct 2024 02:52:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 24 Oct 2024 02:51:53 +0000 Original-Received: from localhost ([127.0.0.1]:33069 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t3nx2-0007QR-Tk for submit@debbugs.gnu.org; Wed, 23 Oct 2024 22:51:53 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:34048) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t3nwv-0007Q1-K8 for submit@debbugs.gnu.org; Wed, 23 Oct 2024 22:51:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t3nwR-0004gr-5B for bug-gnu-emacs@gnu.org; Wed, 23 Oct 2024 22:51:15 -0400 Original-Received: from mail-4316.protonmail.ch ([185.70.43.16]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t3nwO-0004PC-JW for bug-gnu-emacs@gnu.org; Wed, 23 Oct 2024 22:51:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1729738268; x=1729997468; bh=cOGDf3Izf3LZvJMAYYUex9PxNWFxy+8nIQkSIQ2o8Fk=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=arRcaYPnr49VwdXwiCQmVkaiwVcD1q5j0Y5JkxFne0AXnTsODbfKHN2SVySfXUwsa dZkA6oPQiYXFnZn2do6WfwzLKipSH7agZno2NjKnfo9B/bLFa8YSHYWipEy68zBxMi brKGb87xh+7xlSZCAmUt3CR2s3DSyBxv3sA6VEBYoLuMd2cm61obASLezvF/L0D5gs D5E8PaSxk05GdOtpl1qQLLT+RgcwS40vUS8KSI88J3c5ejQRZgE/KI2cAft5N+IxDv KAlKHbyP9DewmN9bun7xuKJ1O7+mJa6WmAZ9anOY8j87zcLxj/+kFpxsA+Z1NBSBbG MGvcyZ6HFBFqw== In-Reply-To: <87ed48mgbu.fsf@web.de> Feedback-ID: 25935600:user:proton X-Pm-Message-ID: 264ccdbb03327488f50ef2115397809c6c90c187 Received-SPF: pass client-ip=185.70.43.16; envelope-from=okamsn@protonmail.com; helo=mail-4316.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:294161 Archived-At: Michael Heerdegen wrote: > Okamsn writes: >> * stream.el (stream): Define the structure using 'cl-defstruct'. Set >> safety to 0 using 'cl-declaim' to avoid checking the type of the=20 argument >> to 'stream--force' multiple times. Instead, explicitly check a=20 single time >> in 'stream--force', which must be used inside the public functions=20 anyway. > > How much slower or faster is forcing with this change, in the end? In my tests of iterating through the stream, the increase in speed from=20 disabling the safety checks ranged from about 10% to about 20%. > > >> + (bad-output >> + (error "Bad output from stream updater: %s" >> + bad-output))) > ^^ > > Should this better be %S (we use %s for strings only)? I have fixed this in the local version. I will send an updated set of=20 patches after a better doc string for `seq-take-while` is chosen, to=20 reduce noise. Michael Heerdegen wrote: > Also: when compiling using master I get >=20 > | stream.el:395:15: Warning: docstring wider than 80 characters > | stream.el:421:15: Warning: docstring has wrong usage of unescaped singl= e > | quotes (use \=3D' or different quoting such as `...') >=20 > Could you please try to care about these? For shortening the first line of the documentation of `seq-take-while`,=20 do you think changing "Return a stream of the successive elements for=20 which (PRED elt) is non-nil in STREAM" to "Return a stream of serial=20 elements in STREAM for which PRED returns non-nil" works? Also, do you=20 think that the documentation string for `seq-drop-while` should also be=20 changed for consistency? > But apart from these details your patches look fine to me. Thanks for > working on this. Thank you for testing the patch with el-search.