From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: from zero.zsh.org (zero.zsh.org [IPv6:2a02:898:31:0:48:4558:7a:7368]) by inbox.vuxu.org (Postfix) with ESMTP id C822624B50 for ; Thu, 23 May 2024 14:59:07 +0200 (CEST) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1716469147; b=gUozjtv6sYE+UdAhmQKvnu7jhxXPXOKKAS77KfAsVyXknNtW53rk1jibqCsrlUwqrz1GndJjmj 27X0xSrzjXgG8f6+5kkwnRPNd7JpDWoLnIpPPT68N+iDsxx8CJf8rfdq+saq+dYNabjf5+FvIL 7Q0LJ1Ux4oMTxP09HqKP3vNDf3zTiOqg2K30rQbKAyL/uACykZmDCO2+TkcvLrTuFonNCgNptT l4v9BLid/SrRMQL/ijS6Zp/72ev3jt+cG11dg/1dgoE0BBh7K/cKBmzimooJo6NCZiBE5wdgWr UXWUCw33CPkLLzEj4I0u68rVHMPa/Viue/fBl5qMTIfGQA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mta03.eastlink.ca) smtp.remote-ip=24.224.136.9; dmarc=none header.from=eastlink.ca; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1716469147; bh=kXT23z74fnZizgv4rjvhjcghiqGKhSXojflISEUnxpM=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:To:Subject:MIME-Version:Date:Message-ID:DKIM-Signature; b=pnzYjlK1PtC8rdHQFreuLNu5fuuwZWfvX1HnAQOkq6ejZH9Q37d4/M6IuzWytqOJeuDOFHctYA 6UkdjHbH/iSQ9W1meMF4HNg4XBJ0mMwKXjJVOFyzRBZcS6L2+9SkKADCXaBc9sLkQQp9YfIdBg NElxHdzmxsXChbt9yd5+9LWke5yyySyTWtl0gWT07tszDHuAvy5hbNn/g/YjHhrepOF56OzG8c p0mo2hZDEyeO2EJhRU5IYbh2ChtIwtRnv887jV27PLUHWaj7OBlHIN2WZ/eq27jZSWMspldmjh gwGkLx5JkX7rWLbU/3KtDVcd8KA9JF8Q3rBv3J5GkpiDfg==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-transfer-encoding: Content-type:In-reply-to:From:References:To:Subject:MIME-version:Date: Message-id:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=2Ii7NSY3NOPbvYWFIj73IzwIE/oEtwbRdkjb/0i6SoE=; b=iyMaoc4DbD5c3fZ2zj9JQ2VxgK yEmsWNEFnrtJTzHMdNc8MnJuC2mEq3c5azyGW9FcKiignddlKs9nIB1ajjuMNyIBCWqsrIC74WW6x 15IyL6aPjij6Qivnys3UX/hWNXeQUJ5U2Aia4ez+m+bcAw4zUImlqMc5USTreJCkveEBAUL1e5QVE s6QZvKJ28pRed1Yvrw0749NgZ0JGrjq+KYO8FCPqs60CdpRzf29cd+Y0DuoiHLi/TZqWd9U2p7SMY C1wgqJ4l1mUrXcuD+WVZA23MmDmX7mERDm6DIhc3VmjJtu2Xm1pBsryQpXG2+be7latynUM91S2E5 wdFc6QXw==; Received: by zero.zsh.org with local id 1sA82E-0003MI-R4; Thu, 23 May 2024 12:59:06 +0000 Authentication-Results: zsh.org; iprev=pass (mta03.eastlink.ca) smtp.remote-ip=24.224.136.9; dmarc=none header.from=eastlink.ca; arc=none Received: from mta03.eastlink.ca ([24.224.136.9]:57811) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1sA81R-0002h4-OP; Thu, 23 May 2024 12:58:18 +0000 Received: from csp01.eastlink.ca ([71.7.199.166]) by mta03.eastlink.ca ([24.224.136.9]) with ESMTPS id <0SDX2BBW3VY1NKC0@mta03.eastlink.ca> for zsh-users@zsh.org; Thu, 23 May 2024 09:58:16 -0300 (ADT) Received: from [192.168.0.15] (host-24-207-19-13.public.eastlink.ca [24.207.19.13]) by csp01.eastlink.ca ([71.7.199.166]) with ESMTPSA id A81Psfl6Q98niA81PsylY8 (version=TLSv1_2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256); Thu, 23 May 2024 09:58:16 -0300 X-Authority-Analysis: v=2.4 cv=C75KyhP+ c=1 sm=1 tr=0 ts=664f3d68 a=e7T7DzMKK1R988ZCg0wLyw==:117 a=e7T7DzMKK1R988ZCg0wLyw==:17 a=IkcTkHD0fZMA:10 a=keBD0gqIA4tLs9hDygMA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdeiiedgheekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecugfetuffvnffkpffmpdfqfgfvnecuuegrihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuffvfhfhjggtgfesthekredttddvjeenucfhrhhomheptfgrhicutehnughrvgifshcuoehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgeqnecuggftrfgrthhtvghrnhepteffhffgvdeffeelveelhfegudevkeduhfehheevhfekhfevieehjeejheefvefgnecukfhppedvgedrvddtjedrudelrddufeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvgedrvddtjedrudelrddufedphhgvlhhopegludelvddrudeikedrtddrudehngdpmhgrihhlfhhrohhmpehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgdpnhgspghrtghpthhtohepvddprhgtphhtthhopeerredprhgtphhtthhopeiishhhqdhushgvrhhsseiishhhrdhorhhgpdhgvghtqdgkihhprfgrshhsfigupehtrhhuvg X-Vade-Score: 0 X-Vade-State: 0 X-EL-AUTH: rayandrews@eastlink.ca Message-id: Date: Thu, 23 May 2024 05:58:15 -0700 MIME-version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: the splits To: zsh-users@zsh.org References: <75784205-3d78-4dd8-8474-e2eb48598307@eastlink.ca> <0b6a048b-4fbf-4162-a31a-d5f6f963d72a@eastlink.ca> <91c546cf-ec25-49ff-bd14-b6f3105e0d12@app.fastmail.com> <8b434c8d-4618-49bd-998b-72644a2727fd@eastlink.ca> <527f680d-6c71-4eb0-9586-bb4cd253b76e@app.fastmail.com> Content-language: en-US From: Ray Andrews In-reply-to: Content-type: text/plain; charset=UTF-8; format=flowed Content-transfer-encoding: 8bit X-Seq: 29973 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: On 2024-05-22 19:31, Mark J. Reed wrote: > The shell is fundamentally an interpreter; stuff written in shell > can't possibly be as fast as the code that is interpreting it. In > general, native tools are going to be more efficient. > > ... > As I see it, the shell is best utilized as commander and coordinator > rather than actually doing the hands-on nitty-gritty work; that's > better delegated to more efficient (and usually more specialized) > tools. The shell can absolutely do it, but it won't be the best > application of the available resources. Makes sense.  I understand that the more time spent interpreting (vs. spent in compiled code), the slower.  OTOH there's Lawrence's 'weakest tool' rule.  Just grabbing a subscript in zsh wouldn't be expected to take very long.  Dunno, I'd have to be able to look under the hood to really see which attitude prevails in any given situation.  Besides, in my original post, speed is nearly irrelevant, it's an error msg that I just want to look pretty.  Mind ... getting rid of the 'grep', as you first showed, really did make a noticeable difference.  What I was looking for was the most 'direct' -- really the most legible -- solution.  I value clarity above all.  Nice tho to be able to discuss elegance and fine tuning, vs. getting something to work at all -- which is more normal for me!