From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Implement fast verisons of json-parse functions Date: Sun, 31 Mar 2024 18:44:00 +0300 Message-ID: <864jcmbe4f.fsf@gnu.org> References: <87h6h2rsgn.fsf@gmail.com> <867chy3vpm.fsf@gnu.org> <87cyrqrqnb.fsf@gmail.com> <865xxi3tsu.fsf@gnu.org> <874jd2rnwj.fsf@gmail.com> <864jd14lqs.fsf@gnu.org> <87edc1rzig.fsf@gmail.com> <865xx4dv0g.fsf@gnu.org> <871q7snffr.fsf@gmail.com> <86plvbdgcx.fsf@gnu.org> <87wmpjmsie.fsf@gmail.com> <86zfufasz6.fsf@gnu.org> <60B7A2FC-93BC-4759-91EE-DEE179009142@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1335"; mail-complaints-to="usenet@ciao.gmane.io" Cc: geza.herman@gmail.com, emacs-devel@gnu.org To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Mar 31 17:45:13 2024 Return-path: Envelope-to: ged-emacs-devel@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 1rqxMu-000Ae3-Iy for ged-emacs-devel@m.gmane-mx.org; Sun, 31 Mar 2024 17:45:12 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rqxLp-0001XA-6J; Sun, 31 Mar 2024 11:44:05 -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 1rqxLo-0001Wz-B1 for emacs-devel@gnu.org; Sun, 31 Mar 2024 11:44:04 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rqxLo-0003N8-2T; Sun, 31 Mar 2024 11:44:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=NypyLDcoPjCYrbCy209CV1lGwSk1sOLFijdEboZTG3A=; b=Nimm9XT4wt1iJOU3egaH 8IJ8CVN2IfNT7PKgu33mTRmMg+lPilWID7tIe5HPmJWbauZikIz2TBgL5WUWlB6BCFJw2JK0NswsD nAXt1x7A3hQNtPns58M+iXcHXi/wis5QQw9LsKQPcGjfiSMIcaf6TIpm6dV+ErYzy/3g+t2My4mzD WMrySUK7KnOgZYk75zrWqw9v3DZ2BaaTBHPlwlubd8DWI0YVpegagNBYxDIKPS5N4WkhoO7iRfZan qTYeyyYBeGQ0lDT4Ez9pYR2zLHm6Z5EFsADvwLuQZ3nchX//s+s2jyCTG7VvT8b373YwOGBYIbWUy sOigYyTLi+nXNQ==; In-Reply-To: <60B7A2FC-93BC-4759-91EE-DEE179009142@gmail.com> (message from Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Sun, 31 Mar 2024 16:51:34 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:317430 Archived-At: > From: Mattias Engdegård > Date: Sun, 31 Mar 2024 16:51:34 +0200 > Cc: Géza Herman , emacs-devel@gnu.org > > 31 mars 2024 kl. 07.08 skrev Eli Zaretskii : > > > Well, it's "kind-of" wrong argument: a string with embedded null > > bytes. But I'm also interested to hear from Mattias on this (and from > > anyone else who might have an opinion about the kind of error we > > should signal in this case). > > I don't think users care much about the exact error we produce as long as it's reasonably descriptive. It's only when user might reasonably discriminate between different errors programmatically that it really matters. We certainly shouldn't have a special message for NULs. > > I spent a slow morning speeding up the new JSON parser substantially by not doing stupid work, and all UTF-8 decoding errors will now be `json-utf8-decode-error` instead of `json-parse-error`. I think we can live with that. I'm okay with changing the errors we signal, but let's please document in NEWS all the changes in this area.