Here's an example of logical comparisons and arithmetic in rc without them as first-class features, from a script I use to generate passwords

paste.sr.ht/~sircmpwn/cbe2b6c9

How palatable would this be to you?

Follow

@drewdevault
Crazy idea, what about an `next` builtin?

i=0
next i # i == 1
next i 5 # i == 6
next i -2 # i == 4

x=0x0F
next x # x == 0x10

s=the
next s # s == thf

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.