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.0 required=5.0 tests=none autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 15265 invoked from network); 13 Jan 2022 12:25:15 -0000 Received: from 4ess.inri.net (216.126.196.42) by inbox.vuxu.org with ESMTPUTF8; 13 Jan 2022 12:25:15 -0000 Received: from sirjofri.de ([5.45.105.127]) by 4ess; Thu Jan 13 07:17:36 -0500 2022 Received: from sirjofri.de ([95.90.218.152]) by sirjofri.de; Thu Jan 13 13:17:30 +0100 2022 Date: Thu, 13 Jan 2022 12:17:28 +0000 (UTC) From: sirjofri To: 9front@9front.org Message-ID: <4c465ba9-2e6f-41c2-beca-62482e850617@sirjofri.de> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Correlation-ID: <4c465ba9-2e6f-41c2-beca-62482e850617@sirjofri.de> List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: open-source agile polling-based metadata Subject: Re: [9front] bc and < > Reply-To: 9front@9front.org Precedence: bulk 13.01.2022 06:22:34 umbraticus@prosimetrum.com: > depending on what you want you can also do Peano-like stuff... > > ; one = one > ; two = (one $one) > ; three = (one $two) > ; five = ($two $three) > ; four = $five($#two-) > ; quinque = `{seq 5} > ; if(~ $#five $#quinque) echo equal > equal Iirc, someone built a math rc library using this technique. Also you can just use numbers: valuefive=`{seq 5} if(~ $#valuefive 5) echo is five combined=($valuefive $valuefive) if(~ $#combined 10) echo is ten sirjofri PS: it's a nice toy. But don't do that. Use the right tool.