Tutorials on writing the mix of Clojure/Erlang atop of Python/JS infrastructure

  • I’m very impressed with the Elixir language by its pattern-matched (poly)functions and Actor-based programming.
  • Also, I want a dynamic free-typed Lispy language closer to Clojure but oriented on using JS-like objects in place of classical lists.
  • Smalltalk is the best with the feel of a live system.

So, I want to mix them in my own language, oriented primarily for interactive web development (data-driven programming), with some elements of business intelligence and IoT/embedded automation (DataWeb) – some datalang built atop of homoiconicity and metaprogramming as a primary principle.

As Python now becomes the most known data-satanic language, I need to grab most libraries by implementing my language runtime over Python for backend + JS for frontend parts. The unreachable target is the use of clouded backend nodes and client browsers as distributed runtime.

Another lock on Python is implied by my employer’s requirements. There are no languages other than Python, and Django is its glorious prophet.

What books and tutorials are undoubted must have to be eaten to execute this scary mission?

  • original SICP
  • The BEAM Book (Erlang runtime details)
  • maybe Chris Okasaki Purely Functional Data Structures – I highly doubt the usefulness of such a runtime complication and immutability.

Maybe some others you can advise?

Speaking about the core Object model I mentioned above, I’m thinking about an abstracted AST node that can hold both attributes and nested subgraphs, and behave simultaneously like vector/list and map/dict.

class Object:
    def __init__(self, V):
        self.type  = self.__class__.__name__.lower() # or self.__class__
        self.value = V
        self.slot  = {}
        self.nest  = []

Next, the glorious power of Lisp can be extrapolated on attribute grammar concept works over the graph of such objects (I think wider than a tree to describe control loops and data flows). I played a bit with this data model by building source-like graph structures from Object-inherited nodes, and it looks very native for human thinking. Due to the homoiconicity of this symbiotic code/data model, it also looks great for describing any cyclic structures, as nest[] is a vector of references that can be recursive.

The pair of type/value fields are implied by the PLY library, which is good for syntax prototyping – it is not needed for the lispy reader, but it is very easy to experiment with infix syntaxes. Indeed, I’m not sure about infix as it makes macro thinking must more complex, but in turn, makes the language promotion simpler. The best way of cause is making the language to be syntax-agnostic, by providing reader-construction mechanics available for any newbie adopter (grammar tools included in the language core).