From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#36697: 27.0.50; gnus: some articles with score 0 are killed Date: Mon, 27 Jul 2020 23:45:06 +0200 Message-ID: <87eeow63a5.fsf@gnus.org> References: <87tv924nad.fsf@gnus.org> <87a7au2lma.fsf@gnus.org> <87tv90v80p.fsf@gnus.org> <8736c7y7nr.fsf@gnus.org> <87d04ro6m2.fsf@gnus.org> <87lfjanxmv.fsf@gnus.org> <87o8o5aq6m.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14701"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 36697@debbugs.gnu.org To: Sam Steingold Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 27 23:46:09 2020 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 1k0Awj-0003i4-Aw for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 27 Jul 2020 23:46:09 +0200 Original-Received: from localhost ([::1]:37302 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k0Awi-0000DT-CN for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 27 Jul 2020 17:46:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45224) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k0Awc-0000DI-Hd for bug-gnu-emacs@gnu.org; Mon, 27 Jul 2020 17:46:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44333) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k0Awc-0002lW-8U for bug-gnu-emacs@gnu.org; Mon, 27 Jul 2020 17:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k0Awc-0005xk-6w; Mon, 27 Jul 2020 17:46:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Mon, 27 Jul 2020 21:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36697 X-GNU-PR-Package: emacs,gnus Original-Received: via spool by 36697-submit@debbugs.gnu.org id=B36697.159588631922869 (code B ref 36697); Mon, 27 Jul 2020 21:46:02 +0000 Original-Received: (at 36697) by debbugs.gnu.org; 27 Jul 2020 21:45:19 +0000 Original-Received: from localhost ([127.0.0.1]:55879 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k0Avv-0005wn-4v for submit@debbugs.gnu.org; Mon, 27 Jul 2020 17:45:19 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:55128) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k0Avt-0005wW-CY for 36697@debbugs.gnu.org; Mon, 27 Jul 2020 17:45:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=iHa4rEbCLZ+LoVbScwnFHvSBINJDkarVBbKUBjWX3pA=; b=oHNBwFL3es2Cxq/51B/rApH+XW 6DYzqBR9/3T1yUKWSBj/44M7g3u3Waqbl/KT0yZ6mou0SgJncjBOpfEs7OKZj5c72TMuzPwXCQwJD 0fMvAAVPKDkYVgYlpGvly4/xCXBkVDT7a3fCbCen9Sy08AeKmzfW27nkSeKiyd+wV8ss=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k0Avj-0004sR-TF; Mon, 27 Jul 2020 23:45:10 +0200 In-Reply-To: (Sam Steingold's message of "Fri, 24 Jul 2020 14:37:32 -0400") 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" Xref: news.gmane.io gmane.emacs.bugs:183599 Archived-At: Sam Steingold writes: > So what's the verdict? > Fix the code or modify my regexp and document the "feature"? I think is documented... Yup: @item Negated character classes If you say stuff like @code{[^abcd]*}, you may get unexpected results. That will match newlines, which might lead to, well, The Unknown. Say @code{[^abcd\n]*} instead. But that doesn't mean we couldn't change it now. >> It's just very, very old code, trying to be maximally fast. > > you wrote it over 20 years ago, right? > time flies... Almost 30 years ago, and I didn't write it -- it was Per Abrahamsen. :-) I would never have come up with such a great hack. > I have no idea - but a general "code modernization", including a switch > to lexical bindings and using return values instead of global variables > to pass information around - would probably speed up the code. > (and make it thread safe!) I don't think there's any global variables used, but there's a lot of variables with dynamic extent used to speed up scoring; yes. That's still faster than using parameters, as far as I know. I'm all for rewriting this... unless it makes Gnus significantly slower. Usability takes precedence over code prettiness. But computers have gotten slightly faster the last 30 years. So if this can be rewritten to be backwards-compatible (and fast), but not have the negated character class quirk, that'd be nice. I think when Per wrote this stuff, the re-search approach was like a 10x speedup over the loop-and-string-match approach. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no