Category Archives: Computer Language / Compiler
Python 3.0 Functional Programming
50 Years of IT Language War
50年编程语言榜单战争史,估计里面的开发语言很多你都不认识
Only C++ stays relevant in Top 10 position for 35 years.



Anders: from Turbo Pascal to Typscript
Monad (functional programming) – Wikipedia
Python 6 Practical Tricks
5 Reasons Python is Still the King of Programming Languages
Python Tips
The first intuitive programming language “SilQ” for quantum computers | ETH Zurich
Mathematics and programming: exploring the links – Raspberry Pi
ALGOL 60 at 60: The greatest computer language you’ve never used
A modern ‘Hello, World’ program needs more than just code
Programming A Scripting Language in C++17
The World’s First Chinese Computer Language 文言Lang
文言文 Chinese programming language Wenyan-lang (文言lang) by a young Chinese Carnegie Mellon University student.
文言文 is succinct,shorter, less ambiguous than 白话文.
https://spectrum.ieee.org/tech-talk/computing/software/classical-chinese
Mandelbrot Set Drawing Program:
C++20: Concepts – Predefined Concepts – ModernesCpp.com
C wins Programming Language of the Year award for 2019 – JAXenter
Revitalized Modern C++ 11/14/17…20
C++11 and the subsequent major releases every 3 years, namely C++14 (2014) , C++17 (2017) and C++20 (in 2020)… are different products from the old C++ before, below are the major changes :
Mobile Apps Development Approaches
Native vs Cross-Playform Framework Approaches:
- Naive : Java / Kotlin (Android) or Objective-C / Swift (iOS)
- Cross-platform Framework: Flutter / Dart (Google), React Native
Introduction to functional programming with Python examples
The “Bible of Functional Programming” 《Structure and Interpretation of Computer Programs》
Microsoft Python Tutorials
Microsoft 40+ series of FREE Python Tutorials on Youtube : AI / Machine Learning, Data Analytics, Automation Scripting.
Github:
C++17 Ideal for Mobile Cross-Platform Development
Mobile Cross-Platform :
- Android
- iOS
- Windows
- Linux
- Web
- HongMeng (aka Harmony) OS
- IoT
Cross-platform C++ in IDE :
- Mac : Xcode, Android Studio, Visual Studio on Mac (fee), Eclipse
- Windows : Visual Studio (full featured, pay fee), VS Code (limited feature, free), Eclipse
- Linux : many eg. Eclipse…
“So you want to write cross platform code, PAL? (Part I)” by Gal Shelef https://link.medium.com/ijqPGGDWd0
Apps Architecture:
- Cross-platform Language: C++ (preferred version 17 with STL for Functional Programming)
- Apps divided into 2 parts:
- UI logic: platform specific
- Android : Java / Kotlin in Flutter framework
- iOS: Swift / Objective-C
- Core logic: C++17
- UI logic: platform specific
Platform-specific Binding : PAL
What is Harmony OS? Huawei’s “Android rival” explained!
https://www.androidauthority.com/huawei-harmony-os-1030848/
1. Harmony OS : Micro-Kernel for ‘1+8+N’ IoT devices
2. ARK Compiler for Android code compatibility (Java, C/C++, Kotlin, JS), yet 60% faster
3. AppGallery : confirmed ‘Yes’ for Facebook, WhatsApp, Insragram. Next ? will be Google Mobile Services (YouTube, Gmail, Google Map, Google Playstore )
4. HMS (Huawei Mobile Services) : $1 billion Apps development fund by Huawei
Learn C++11 in one hour
Lambdas: The Functional Programming Companion of Modern C++
“Lambdas: The Functional Programming Companion of Modern C++” by Deepak K [Daksh] Gupta https://link.medium.com/yHpn3xmx9Z
https://www.codeproject.com/Articles/1267996/Functional-Programming-in-Cplusplus
Kevlin Henney 2017 – Functional C++
Very good presentation of Functional C++ by the guru Kevlin Henney.
Piping (Functional Composition) in Channels Asynchronously Concurrency:
h
…
Functional C++ for Fun and Profit
5 Must-Have Android Libraries For Smooth App Development
https://android.jlelse.eu/5-must-have-android-libraries-for-smooth-app-development-a85ecbdd8a54
Five Android Libraries :
Example: Glide
…
Flutter vs React Native vs Xamarin or Native Codes: Which is the best choice for 2019?
Mobile Apps developed for cross-platform : iOS, Android, Web… (Huawei HongMengOS ? )
- Flutter (Google) — Dart
- Xamarin (Microsoft) — C#
- React Native (Facebook) —Javascript
The above analysis for the 3 tools is neutral – beauty is in the eye of the beholder – they are more or less the same family based on current Object-Oriented paradigm.
However, I would recommend a 4th option with additional future-promising Functional Pragramming (FP) paradigm for multi-platform mobile apps:
4. Native Codes in C++ (Version 17) with Standard Template Library.
- C++ can be developed in Android Studio, called by Java / Kotlin / Flutter via JNI interface.
- Or in React Native IDE.
- IEEE 2019 Ranking : C++ / C is ranked 3rd popular language behind Python (1st) & Java (2nd), but it is unique in multi-paradigm & multi-platform, an advantage compared to the others.
“The dawn of a new era in app development”
[Source: please read the below link:]
“The dawn of a new era in app development” by gk_ https://link.medium.com/fDulXo3zWZ
The dilemma of maintaining 4 code bases for multi-platfofms:
- iOS,
- Android,
- Windows,
- Web.
Key Points:
- Cross-platform tools for Web / Native codes.
- Google’s future Android-replacement Fuchsia OS (OO&FP Logic : C++/C, Phone UI: Dart, Web: Rust, Server: Go) Flutter framework for iOS / Android / Windows / Web [Notice: the conspicuous absense of Java]
华为 鸿蒙 Huawei HongMeng‘s answer : “1+8+N” iOT multi-platforms (which will soon obsolete Apple iOS & Google Android)
- Smart HD TV (out in August 2019)
- Mobile Phones / Notepads (April 2020 Huawei P40)
- Driverless Car
- PC Desktop
- Earphones
- AI Sound boxes
- Virtual Reality (VR)
- Wearables
- (+ N) All iOT devices
Remark:
C++ version 17 (Standard Template Library ‘STL‘ for Functional Programming) is multi-paradigm : Imperative, OO & FP. It curently supports Android as Native codes (ie bypass JVM).
The Future of Programming is Dependent Types
Read the example in this excellent blog for explanation of Dependent Type (ie Type depends on its Value) :
eg.
Type ArrayOfOne with value ‘length’ of INT 1.
Type ArrayOfTwo with value ‘length’ of INT 2.
Type ArrayOfThree with value ‘length’ of INT 3.
Then compiler will know if correct (before run time error) :
ArrayOfThree = ArrayOfOne + ArrayOfTwo
or wrong if:
ArrayOfTwo = ArrayOfOne + ArrayOfThree
What Makes Functional and Object-oriented Programming Equal
http://codinghelmet.com/articles/what-makes-functional-and-object-oriented-programming-equal
Comparison of 4 Functional Programming (FP : F#, Lisp/Clojure Haskell, Scala,… ) concepts in Object-Oriented (OO: C#, C++, Java,… ) :
[Not covered here] : There are other FP techniques lacking in OO: Functor (FoldMap), Monad, etc.
1. Function:
2. Closure (variable binding)
3. Currying
4. Function Composition
…
…Conclusion:
Programming languages: Python predicted to overtake C and Java in next 4 years | ZDNet
Programming with Math (Exploring Type Theory)
If you are inventing a new language, start to study Type Theory.
These 3 are the same thing:
Logic = Category = Type
…
Unfortunately Milewski’s presentation was cut short due to time constraint, he only presented the first few “Type” functions:
- Unit,
- Product,
- Sum,
- Exponential,…
(these are from Category Theory refound in Type Theory).
…
Beginner Notes on Type Theory
Key Points :
- Types in programming language prevent run-time errors
- Use Java Types as examples
- Prove them using Math : Symbolic / Predicate Logic.
Static Type (Compile-Time Check ) vs Dynamic Type (Run-Time Check)
Weak Type vs Strong Type
La Theorie des Types
TicTacToe in Bosque and Kotlin
From Discover on Google https://www.jworks.io/tictactoe-in-bosque-and-kotlin/
Microsoft Bosque is the latest language, Kotlin is Google supported Java-compatible language.
Learn NUMPY in 5 minutes – BEST Python Library!
MIT Online Free Courses
One of the BEST in the world is “Linear Algebra” by Prof Gilbert Strang
https://ocw.mit.edu/courses/most-visited-courses/
Kotlin FP: Interface vs Extension
When more specific behavior needed, use “interface”.
eg. Interface Vehicle: drive()
-> car.drive ();
-> motorcycle.drive ();
If it is a common general behavior, use extension.
https://blog.oozou.com/interface-in-kotlin-and-when-to-use-it-5d32caab19be