search


Clojure script to change Google dynamic DNS
Thu Oct 01 00:00:00 UTC 2020

Download dns.clj Change the wifi-device, username, password, hostname for your own use then run the script. The wifi-device can be identify using ifconfig. Execute from commandline using clojure commandline tools % clj dns.clj The output of the script is a URL you open in web browser to change your DNS and also a command to flush your local DNS cache. If you don't flush your DNS cache, you might not see the new IP address



One Step forward, two steps back
Wed Jan 02 00:00:00 UTC 2019

One year ago I set out to create a Webtop which came from building datascript <-> datomic synching to build 'MS-Access for the Web'. The idea has morphed into building a 2d/3d application browser that can run on multiple platforms: Android, iOS, Windows, Linux, MacOS. There should be no difference in deveoping a productivity app from a 2d or 3d game. Developing apps and games should be unified using the same programming model/tools and work across all of the major platforms.

Similar project exists

The projects above were envisioned in the era of the desktop, but today we live in the era of multi-core processors, mobile devices, cheap storage/bandwidth, agumented reality, artificial intelligence, and blockchain technologies. Those projects are not suitable for the current era. Of the 3 projects, Project Croquet, written in Small Talk is closest to what I want to build.

Personal data is becoming increasingly centralized and controlled by big corporations like Google, Facebook, Apple, Amazon, dubbed the Four Horsemen of the Digital Apocalypse. Apps are given away for free in exchange users signing away their privacy to corporations. As the saying goes,"If you're not paying for it, you're the product". New business models for software are needed.

The EU General Data Protection Regulation (GDPR) is a direct response to this issue of data privacy and ownership. It is a step in the right direction. However, it is almost impossible for a skilled software engineer to audit millions of lines of code and determine with absolute certainty that the code is in compliance. For a government beaucrat, who might not even be an engineer or not familar with the code, to determine compliance is not just almost impossible but is absolutely impossible. GDPR has good intentions but its enforcement is arbitary and misused as tool to extort large companies with deep pockets. I have no sympathy for these companies but arbitary enforcement of such an important law is not and cannot be good for the software industry.

Software architecture must be rethought in the context of GDPR. Apps already have a separation of code and data which is stored in a persistent datastore like an SQL database. This design should be taken further with distributed databases with each database owned and operated by independent entities which can be people or other software agents/systems. Apps must explicitly ask permissions to read or write to a user's database. To prevent apps from sharing user data with third parties, apps must run within a VM that enforces privacy policies. The VM will prevent the app from doing I/O to unapproved third parties. When the app has completed processing, the VM will self-destruct deleting both the code and the user's data.

I am a big Clojure/ClojureScript fan. However, I've decided to build this system in Gambit Scheme. This decision was not made lightly because I am more proficient with the Clojure ecosystem than with the Gambit Scheme ecosystem. However, the driving factor for this decision was cross-platform. Clojure on Android is terrible. Clojure on iOS is non-existent. Gambit Scheme can compile code for Android, iOS, Desktop (Linux, Mac, Windows) and Webassembly. Since the app browser will be implemented with Vulkan anyway, it will not depend on native widgets but will draw widgets itself similar to how Flutter does it. I've made one step forward but two steps back so that I can achieve cross platform development using Gambit Scheme.

Another reason for using Gambit Scheme is because of its interoperability with C/C++ libraries like Tensorflow for machine learning, ARCore/ARKit for augmented reality, OpenCV for computer vision, libsodium for crypto

Another benefit for using Gambit Scheme is that it can run on bare metal without an Operating System making it ideal for creating a unikernel LISP Machine.

Here's a list of orthogonal projects I will need:

  • A 2d/3d browser implemented with Vulcan
    • Architecture inspired by NeWS using Scheme instead of PostScript
    • Creating UI should follow the model of creating a web page using HTML.
      • Implement a simplify version of HTML/CSS. There should be only one element type: div
      • CSS for layout and look and feel
      • Use Hiccup to represent the scene graph
  • Distributed Tuple Space to implement a Triplestore
  • Datalog query engine
    • Subset of Prolog. More powerful query language than SQL for quering the Tuple Space.
  • A parser generator for context free grammars.
    • Use parser combinators to transform popular languages like Python, Java, JavaScript, C# into an AST that can be interpreted in Gambit Scheme. This is necessary because it would be difficult to convince mainstream programmers to adopt a LISP.
  • WASM VM implemented in Gambit Scheme
  • Algorand Blockchain