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=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 21996 invoked from network); 9 Jul 2021 20:50:48 -0000 Received: from 1ess.inri.net (216.126.196.35) by inbox.vuxu.org with ESMTPUTF8; 9 Jul 2021 20:50:48 -0000 Received: from mail-pl1-f177.google.com ([209.85.214.177]) by 1ess; Fri Jul 9 16:44:30 -0400 2021 Received: by mail-pl1-f177.google.com with SMTP id u3so521221plf.5 for <9front@9front.org>; Fri, 09 Jul 2021 13:44:21 -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=hQXgkKFUIE71PORN1aTKaGqSJI4OlV4XQmRDQ0czXQk=; b=ITAQYGPvpcwGnqFHhgX710+4VdYgkbcJ8MAaxj/8lci7ynVWC7O1VyVABbI2piqTPu WxwXnQpGJHa6JGPPDqEwLGLxetHL/LIMSLRF3CMc6nnX9h1dyReA897HVkGkHcAZu6F0 xU9gFHpJaYzSIp8VraNZHtCA9qy9hKQfO6KGUAiX/wLiRey5RrKrkVy2+9zNNX5g5Eyv X8Yp2V6Pl7L5UrJLg8FOgU5xHovzeq24afC8tqmS+KmvtYGf1h1VLHDZKFzTG3A5mTPb q2NSU7glPi99J+Nij5NITlmsqLBtITtyhR1X2jV6aYvcG3eD2jpxR3wuomchsERJu2zk oFtg== 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=hQXgkKFUIE71PORN1aTKaGqSJI4OlV4XQmRDQ0czXQk=; b=Sl1amQGsLW1vIjjbHGm/rNmyRvaivmaBaP3DJNaYtWjPnPG5AGvCW6mD/POcOGxHM4 9gWaJYzIM8YRDTPIaNpR8x9j44Qgaen7hzE+1mXCjR6RFkng2oiFhoJRBVV98FBWJvC3 BYxIbXbP6HhB6uecrUya+Z2LtA80W/w5TYMfCLwxJthg5gdKHXTgdppnaha+u6IKkxbB RteYPCzrMr0YkWXLpWN6JD2oCqaSiZe5JBs4DPaZtKfWYFcbvNCEiLsqieRslAvG2yPs vPX0OY4kI6NEPqNY2C5NlgEQvMMczOCrSkiDggIgctnx1v0ivTWleCJp/mTjUdmKF098 a3Dg== X-Gm-Message-State: AOAM530VbSoPGjsDOWTrrRsMOeQUoLRHEsFWgAD35SQYEUDAw8UC8U8A 4owxSlfJZ7gLtt5QgNKbADPJwHfAts1SNKt2ltjqZ81e X-Google-Smtp-Source: ABdhPJx9+qj0+tTvWjv5S2BNfV43J2vtT/tbhAiK3VEVqvV6zz9UWIpRpxQOJaLO+OUN0DweEvn4wuwYnmpB8lAJbX8= X-Received: by 2002:a17:90a:530e:: with SMTP id x14mr35786605pjh.128.1625863460439; Fri, 09 Jul 2021 13:44:20 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:6a20:a002:b029:1e:dcb9:6f96 with HTTP; Fri, 9 Jul 2021 13:44:19 -0700 (PDT) In-Reply-To: References: <270BEC567655102DE0C764820FA16F74@eigenstate.org> <4754C6E8-2D26-46FC-B1EB-44AECD8DC0B5@stanleylieber.com> From: hiro <23hiro@gmail.com> Date: Fri, 9 Jul 2021 22:44:19 +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: reduce/map hardware hosting-aware locator Subject: Re: [9front] Re: commit 2f8a59f4b5bfe028c022855acc19666d69eed909 Reply-To: 9front@9front.org Precedence: bulk i finally found a workable example, but i had to troll the irc logs to find= 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 >> >