Hi TT, Are you familiar with mnemonic techniques? A very common technique is to use one's own body to remember lists of things.
Perhaps that is how the Oksapmin got its start. Ref: *Moon Walking with Einstein* by Joshua Foer, *The Memory Book* by Harry Lorayne and Jerry Lucas, *How To Develop a Brilliant Memory* by Dominic O'Brien On Friday, October 11, 2019 at 6:45:12 AM UTC-7, @TiddlyTweeter wrote: > > In another thread Mark S. presented a magic macro to convert from decimal > to other bases. > > I think its a rather marvellous bit of coding.* I have no idea how it > works*, but it does work well. > > Its a VERY good illustration of using TW macros to achieve something > specific in a direct very useful, economic way. > > This is my slight cosmetic re-order of it for converting decimal to > base-2 through to base-36. > > \define base-convertor(num,base,result:"") > <$list filter="[<__num__>remainder<__base__>add[1]]" variable=remidx> > <$list filter="[<__num__>divide<__base__>trunc[]]" variable=num> > <$list filter="[enlist<syms>nth<remidx>addsuffix<__result__>]" > variable="result"> > <$list filter="[<num>!regexp[^0$]]" emptyMessage=<<result>>> > <$macrocall $name=base-convertor num=<<num>> base="$base$" > result=<<result>>/> > </$list> > </$list> > </$list> > </$list> > \end > > \define re-base(base,num) > <$vars > syms="0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P Q R S T U V W X > Y Z" > > > <<base-convertor $num$ $base$>> > </$vars> > \end > > Syntax: re-base "base" "decimal input" > Supports base-2 to base-36. > > ;Examples > :1025 decimal = <<re-base 2 1025>> base 2 > :1025 decimal = <<re-base 10 1025>> base 10 > :1025 decimal = <<re-base 16 1025>> base 16 > :1025 decimal = <<re-base 26 1025>> base 26 > :1025 decimal = <<re-base 27 1025>> base 27 > :1025 decimal = <<re-base 36 1025>> base 36 > > > Partly Mark responded because I needed that tool to properly document > non-Westren body-part counting systems. > As soon as I had it up I wrote a note for a culture that counts in > base-27. I could not have done it without it. > > Thanks Mark! > > [image: Annotation 2019-10-11 145847.jpg] > > > Best wishes > TT > -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/ece25766-02d4-4714-a77e-7acd7456c0b5%40googlegroups.com.

