From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#58669: 28.2; bindat: str and strz not operating on vectors Date: Fri, 21 Oct 2022 12:47:37 -0400 Message-ID: References: <87tu3ymm51.fsf@cern.ch> <83y1t9upv1.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39648"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 58669@debbugs.gnu.org, nacho.barrientos@cern.ch To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 21 21:04:40 2022 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 1olxJv-000A0q-MC for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 21 Oct 2022 21:04:39 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1olxJl-0000t8-JF; Fri, 21 Oct 2022 15:04:29 -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 1olvBi-0001yA-Bd for bug-gnu-emacs@gnu.org; Fri, 21 Oct 2022 12:48:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1olvBi-0006Xr-3b for bug-gnu-emacs@gnu.org; Fri, 21 Oct 2022 12:48:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1olvBh-00005f-VJ for bug-gnu-emacs@gnu.org; Fri, 21 Oct 2022 12:48:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Oct 2022 16:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58669 X-GNU-PR-Package: emacs Original-Received: via spool by 58669-submit@debbugs.gnu.org id=B58669.166637086932732 (code B ref 58669); Fri, 21 Oct 2022 16:48:01 +0000 Original-Received: (at 58669) by debbugs.gnu.org; 21 Oct 2022 16:47:49 +0000 Original-Received: from localhost ([127.0.0.1]:38891 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olvBV-0008Vq-0m for submit@debbugs.gnu.org; Fri, 21 Oct 2022 12:47:49 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:32408) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olvBS-0008VH-QW for 58669@debbugs.gnu.org; Fri, 21 Oct 2022 12:47:47 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 2F86744169B; Fri, 21 Oct 2022 12:47:40 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id ADE96441697; Fri, 21 Oct 2022 12:47:38 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1666370858; bh=dAQXBzJWYevuMUVBEj1Z1Dh1poMHHniwr0l2u6d8PqE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=CO89MhyzBn4bCj5sSrxRSu7ijD0dpzgCTE3wY7K4UB3GU+G80D28ajUIcrUt1J/XJ /cmrQdv1ItBCd3tz1ewo8IIHaPOz1Gyy2AAzArW1oJyff/YwkDuuHISxTRAcxovxU7 6/RGXpAQET8ugILomouHmB2Z7uNI2Mey/EcH+FUjN9CKFeHLhDF4GXgfu7dt0p6Aax 2b4brXNgwwB362WQkTCSec8Rv3C0zHbiscyD78HI9NUA1BEoh6F1SxaAtncKX6Ycfj mVHm8qETBBL8l7khuACwRgSjJJjsc0w3RV+k3ekbwt/styqoPQTsFhRt0Bt6WTA4TO wABmDMwAPTFDw== Original-Received: from alfajor (alfajor.sf.umontreal.ca [10.33.232.38]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 57981120388; Fri, 21 Oct 2022 12:47:38 -0400 (EDT) In-Reply-To: <83y1t9upv1.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 21 Oct 2022 19:02:26 +0300") 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: , Original-Sender: "bug-gnu-emacs" Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:246000 Archived-At: >> Yes, I'm actually surprised I left this code in there as-is because >> I remember wondering how to make a unibyte string from a vector of bytes >> in an efficient way (and concluding that there's currently no good way >> to do that :-( ). > > Maybe I'm missing something, but what's wrong with > > (apply 'string (append VECTOR nil)) `append` takes the vector, turns it into a list (thus allocating N cons cells), then `apply` turns the list back into an on-stack "vector", and all of that just to create a 4x or 8x smaller string. It's silly. Stefan