ELM Webapps Architecture

Simple Web apps architecture divides the 3 main functions in separate modules:

  • 1. Model
  • 2. Update
  • 3. View


Introduction to “functional” ELM:

https://guide.elm-lang.org/

https://guide.elm-lang.org/architecture/

Implement ELM with Kotlin:

https://proandroiddev.com/taming-state-in-android-with-elm-architecture-and-kotlin-part-1-566caae0f706

https://proandroiddev.com/taming-state-in-android-with-elm-architecture-and-kotlin-part-2-c709f75f7596

(Part 3… to be continued)

Symmetry, Algebra and the “Monster”

Very good introduction of Modern Math concept “Group” to secondary school math students by an American high school teacher.

https://www.quantamagazine.org/symmetry-algebra-and-the-monster-20170817/

Summary:

  • Symmetry of a Square
  • Isometry (*) or Rigid Motion (刚体运动) = no change in shape and size after a transformation
  • What is a Group (群 “CAN I” ) ? = Closure Associative Neutral Inverse
  • Monster Group = God ?
  • String Theory: Higgs boson (玻色子) aka “God Particles”

Note (*): “保距映射” (Isometry),是指在度量空间 (metric space) 之中保持距离不变的”同构“关系 (Isomorphism) 。几何学中的对应概念是 “全等变换”

The Building of an Interpreter: Lel

Lisp is an excellent FP (Functional Programming) language to write another language interpreter or a “DSL” (Domain Specific Language) . Likewise with Clojure (a Lisp dialect) , Kotlin or Haskell FP languages.

To go further, the interpreter can do more (before execution) to :

  • Generate Java bytecodes, which you then run on JVM machines (eg. Android); or
  • Generate native codes (using another tool “LLVM“) to run on other platforms (eg. MacOS / iOS, Windiws, Linux/ Unix)

https://francisstokes.wordpress.com/2017/08/16/programming-language-from-scratch/

JVM Language – Kotlin

Kotlin (Google official support since May 2017) is one of the few JVM (Java Virtual Machine) languages (eg. Scala, Java, etc *), but with added nice “FP” Functional Programming features (See Reference # below).

* Note: Other FP languages like “Haskell”, “Clojure” (Lisp dialect) are unfortuantely not (yet) JVM compatible, hence can’t run on Android. Scala is a hybrid of “Object-Oriented + FP”, which runs on JVM (slow ?).

JVM machine recognises any “.class file” which contains the Java “bytecodes” executable on any platforms (Windows, Linux, Unix, MacOS, Android, iOS).

Any JVM language must produce ” .class” regardless whether it is Java or Kotlin or Scala.

If you intend to run on Android platform but hate Java (like I do), then choose another JVM language such as Kotlin.

https://dzone.com/articles/kotlin-on-the-jvm-how-can-it-provide-so-many-featu

[Reference #]
Nice Introduction to Functional Programming : Although FP is based on Math “Category Theory” using abstract concepts : Monad, Monoid, Functor (eg. Map), you don’t need to know it well before coding in FP.

https://academy.realm.io/posts/altconf-2017-james-majors-functional-programming-introduction

Kotlin: apply, run, let, also

https://dzone.com/articles/examining-kotlins-also-apply-let-run-and-with-intentions

UK Textbooks à la Chinese / Singapore Math Style

[Original Financial Times Article] Google: UK maths books fail DfE test

\boxed {\text {Ideal Math = (Chinese + English) * French }}

UK, USA, France are copying Chinese Math (from which the “Singapore Modeling Math” derived) in Primary schools, this proves my above-mentioned “Ideal Math” formula is correct. The 2 Asian countries were top in 2015 PISA Math Test for 15-year-old students, while UK was ranked 27th.

It remains to see if China / Singapore reciprocate the French Math theoretical foundation rigor in High Schools (Junior Colleges) and in the first 2 years of undergraduates for STEM (Science, Technology, Engineering, Math) students.

Compared with Fields Medals (equivalent to Nobel Prize in Math), the picture is reversed – where USA, France and UK are top. The secret lies in the formula : the multiplying factor – (* French), ie the math theoretical foundation notably in French Math.

Note: 2 Chinese Fields Medalists are listed in the nationalities of “British / HK, now China” (ST Yau 丘成桐), Australia (Terence Tao 陶哲轩 ).