Notes from building Ruvio

Blog

One feature or one problem per post: what it is for, the commands that do it, what it costs and where it stops.

RSS feed
  • Commands
  • Patterns

Seven small scripts I no longer write

Moving credit between wallets, selling the last ticket, keeping the newest timestamp. Each of these used to be a short Lua script. In Ruvio each one is a single command that either does the whole job or writes nothing.

TRANSFERHTRANSFERTAKEINCRBY MAXINCR EXSET IFGT

· 5 min read

Read the post
account:aaccount:b1002070503090?✕ not enoughTRANSFER a b 30 …Moved in one atomic step: a 70, b 50.TRANSFER a b 90 is refused. Balances stay put.
Balances that cannot go negativeTRANSFER moves an amount between two keys only when the source holds enough.