by Ricardo Fernández Serrata
Shows that processing can be done in JS and SH instead of AM, which decreases the block count dramatically.
The default expression to evaluate is 3x + 1 (where x is input), but you can change it to anything valid depending on language.
JS and MirBSD Korn Shell (MKSH) are very different languages, some expressions will have different valid syntax or the same syntax but different interpretation. In this example I show you something they have in common, for the sake of simplicity.
The result of some arithmetic can be vastly different, because MKSH uses 32bit integers that do wrap-around on overflow.
Text processing can be done in both, but JS is extremely better at it than AM and MKSH combined. Math is faster in MKSH, but there are no pow() nor log() functions.
The shell can do more things than just processing, it can do file operations like creating, editing, deleting, renaming, and moving files and directories. With curl command, you can do HTTP requests. With root (or ADB), it can also change any system setting and install more cmds.
Dialogs have more latency than shell, but the shell has more latency than AM even though some computations are faster in the shell.
MirBSD Korn Shell Manual: www.mirbsd.org/htman/i386/man1/mksh.htm
List of installed executable files and symlink binaries for each Android version: chromium.googlesource.com/aosp/platform/system/core/+/refs/heads/upstream/shell_and_utilities
Rate and review within the app in the Community section.