9front - general discussion about 9front
 help / color / mirror / Atom feed
From: sirjofri <sirjofri+ml-9front@sirjofri.de>
To: 9front@9front.org
Subject: Re: [9front] bc and < >
Date: Thu, 13 Jan 2022 12:17:28 +0000 (UTC)	[thread overview]
Message-ID: <4c465ba9-2e6f-41c2-beca-62482e850617@sirjofri.de> (raw)
In-Reply-To: <B84509A7FB381136200853A1CD700D12@prosimetrum.com>


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.

      reply	other threads:[~2022-01-13 12:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-10 11:49 Benjamin Riefenstahl
2022-01-10 12:14 ` Eckard Brauer
2022-01-10 12:29   ` Benjamin Riefenstahl
2022-01-10 12:14 ` 有澤 健治
2022-01-10 13:25   ` Benjamin Riefenstahl
2022-01-10 12:23 ` Eckard Brauer
2022-01-10 13:24   ` Benjamin Riefenstahl
2022-01-10 14:00     ` Eckard Brauer
2022-01-11  6:29       ` cinap_lenrek
2022-01-12  8:00         ` Eckard Brauer
2022-01-12  9:13           ` Marc Chantreux
2022-01-13  5:22           ` umbraticus
2022-01-13 12:17             ` sirjofri [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4c465ba9-2e6f-41c2-beca-62482e850617@sirjofri.de \
    --to=sirjofri+ml-9front@sirjofri.de \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).