From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: * X-Spam-Status: No, score=1.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,RDNS_NONE autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 13012 invoked from network); 10 Jul 2021 10:15:46 -0000 Received: from unknown (HELO 1ess.inri.net) (216.126.196.35) by inbox.vuxu.org with ESMTPUTF8; 10 Jul 2021 10:15:46 -0000 Received: from mail-oi1-f171.google.com ([209.85.167.171]) by 1ess; Sat Jul 10 03:32:51 -0400 2021 Received: by mail-oi1-f171.google.com with SMTP id w127so15469666oig.12 for <9front@9front.org>; Sat, 10 Jul 2021 00:32:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-transfer-encoding; bh=VTLMV2dk1BnjmALTfn8MGEGRHb9G/CnPjg9qMjEgdjI=; b=leXwTjKiuoWF7IVU6Yx+XMh+BrfUt0ECxNS1L1C9OKArIaDp/JlJFOyr176xLod0pK qiPhV00jBafXe9qFJfuQ6ABD0L0JK+UsVKzUnWGOBRebwUMKrL9rwnuyuf3OFYvJVFUW i1Je813O52MwN7wip2eW3fwdaCO8UMD5G8L72ZJrFiZWQayPlLPIRmVSJ1PGsjfSy0xT Rpa0lIvTO4rVsAHT0S9kcLVSLXJEEayZeN4XzTIiNe9idSmehR0paGawu3FCtPNDRCka IKFkU2Kl/xKgtzaYP304osRZ5K21FKrthBQS9Z7YqrPB9Y4aYqV43O7NFqtfQ2jO5k9H 9Usg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-transfer-encoding; bh=VTLMV2dk1BnjmALTfn8MGEGRHb9G/CnPjg9qMjEgdjI=; b=X//vzt33a8ntR2dW1eSBnPXEHLZAjE57WAT+Nga4T7Qiv/I1QuuolexJ8Mox7upSDB Adx6XRj2qcXgbK39OwSoiSKZ/5gEBPux5zXCf4BamCvZifOrJhoE/lxOgG93DuIQWbDr wjl8hpMKZPJQ1/QCmV06U0tv09VgiuDr9vl6FTMi6y0Rw4vrbshSybM/DCqbC+eN6W80 RSBuD015HYtMfkKwNEWYOINSCC/voIO2+nMeaiqxOESusswC7/Yy6lYafjLA+L2pbEma 1h8kwf5mTrdoch5ZdPuvWsRiU92cT1NdTn+2gUmGqXhQG/vFIwKhZNrt3W8hsR6c1bga yQpQ== X-Gm-Message-State: AOAM532dHEXWpROPSO9WRSRPnYVpHMOskxLmCZCbCkPhMAc+TDaZoTJE 7AuYmUPWHcH92Sd6J2gLbFsiFOXHNB5eX2qJue3GLvH6 X-Google-Smtp-Source: ABdhPJygQfpuOgDnzMuIrcEmmvajxCtMWHdSN2Y0iu7NDWb1b2ZPmdrdZArOx+RiRTKeXw7aEIKirMH5SVngszfhHkE= X-Received: by 2002:a17:90b:3712:: with SMTP id mg18mr41627857pjb.164.1625901948939; Sat, 10 Jul 2021 00:25:48 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:6a20:a002:b029:1e:dcb9:6f96 with HTTP; Sat, 10 Jul 2021 00:25:48 -0700 (PDT) In-Reply-To: References: <270BEC567655102DE0C764820FA16F74@eigenstate.org> <4754C6E8-2D26-46FC-B1EB-44AECD8DC0B5@stanleylieber.com> From: hiro <23hiro@gmail.com> Date: Sat, 10 Jul 2021 09:25:48 +0200 Message-ID: To: 9front@9front.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: SSL configuration table Subject: Re: [9front] Re: commit 2f8a59f4b5bfe028c022855acc19666d69eed909 Reply-To: 9front@9front.org Precedence: bulk that is how every subshell works, yes. the change regards delcaring a function in a way that it will thereafter always become a subshell, regardless how it is run. On 7/9/21, Stanley Lieber wrote: > On July 9, 2021 4:44:19 PM EDT, hiro <23hiro@gmail.com> wrote: >>i finally found a workable example, but i had to troll the irc logs to fi= nd >> it >> >>23:36:05 ori =E2=86=92 ok, rc updated - now if you need early exits in >>functions, 'fn foo @{...; exit; ...} >> >> >>On 7/9/21, hiro <23hiro@gmail.com> wrote: >>> the examples are all weird. i still do not understand what this allows >>> you to do. >>> >>> On 7/9/21, Stanley Lieber wrote: >>>> On July 9, 2021 11:01:19 AM EDT, ori@eigenstate.org wrote: >>>>>Quoth Stanley Lieber : >>>>>> On July 9, 2021 3:48:39 AM EDT, Anthony Martin >>>>>> wrote: >>>>>> >> rc: add subshell-function syntax >>>>>> >> >>>>>> >> fn foo @{bar} is now equivalent to >>>>>> >> fn foo {@{bar}}. As a side effect, >>>>>> >> this disallows creating functions >>>>>> >> named after keywords without first >>>>>> >> quoting them. >>>>>> > >>>>>> >Respectfully, this is just wrong. @ is a >>>>>> >unary operator. Repurposing it to define >>>>>> >a new special kind of function is a bit >>>>>> >much. >>>>>> > >>>>>> >What does this buy you over being explicit >>>>>> >at the call site? >>>>>> > >>>>>> > fn foo { bar } >>>>>> > >>>>>> > @foo >>>>>> > >>>>>> >One color of function is enough. What's >>>>>> >next? >>>>>> > >>>>>> > fn foo !{ bar } >>>>>> > >>>>>> >to mean that foo always negates the exit >>>>>> >status of its body? >>>>>> > >>>>>> >The new quoting requirement for functions >>>>>> >named after keywords seems fine, on the >>>>>> >other hand. But is it worth the backwards >>>>>> >incompatibility? >>>>>> > >>>>>> >Thanks, >>>>>> > Anthony >>>>>> > >>>>>> >>>>>> if we're introducing breaking changes to important programs like the >>>>>> shell, can we please at least post a warning on the mailing list? >>>>> >>>>>(caveat -- it's compatible unless you >>>>>happen to be using functions named '@', >>>>>'`', etc -- which, again, you >>>>>can't use without quoting.) >>>>> >>>>>I don't think most people even realize >>>>>that it's possible to name an rc function: >>>>> >>>>> '@{this is a valid} function name!' >>>>> >>>>>Either way, noted -- I'll post next time. >>>>> >>>>> >>>> >>>> thanks. changes to rc are tricky since of all things we expect it to >>>> behave >>>> consistently from day to day. I do think I misunderstood the change >>>> itself. >>>> I've been running sysupdate from cron and piping the output to an >>>> e-mail >>>> to >>>> myself -- the commit messages as printed by sysupdate are truncated. >>>> >>>> sl >>>> >>> >> > > wait, this will exit only the subshell and not the parent? that's useful = for > sure. > > sl >