Static-dynamic interaction


#1

Clojure gets static-dynamic interaction right. Immutability gives solid ground for dynamic features to shine. I got an urge to try to apply static-dynamic interaction to a wider set of problems.

This isn’t a technical blog post. It’s more of a philosophical musing. I think I’m taking a chance posting it here. Regardless, let’s see what happens!

Static-dynamic interaction

Comments appreciated!

Teodor


Does anyone know anything about being an octopus?
#2

static-dynamic language, it should be Julia, but it’s a lot more complicated than Clojure.

Compared with the traditional GUI, In use, react is the most complex GUI I’ve ever seen. so I think it’s a bit inappropriate in the architecture (data modeling).

I don’t like overly complex things, and maybe the dataflow-driven GUI will be better. The data model is like the vesa-lite of data visualization. Previously, I used this method to write the WinForms app using Clojure-CLR.


#3

Hello @linpengcheng!

Thanks for the comment. I agree that Julia is interesting. A dynamic interface to a statically compiled language; an attempt to get the best performance possible given that you can work with the constructs in a dynamic way.

I didn’t quite catch how you related static-dynamic interaction to GUI frameworks. Did you think of it in relation to a specific paragraph in the article?


#4

I liked it. Definitely a bit philosophical, but also with practical implications.

It reminds me of a theory about the universe I had read of. Can’t remember its actual name. But it hypothesize that the universe is fully chaotic. But that you can prove that within any chaotic system, you can have a subcontext with discernable patterns. Thus all laws of physics can hold, but only within their context. That might mean they hold only within part of the universe, and only for a set period of time for example.

Basically, chaos is dynamic by nature, but given context, it can have stability as well. And it might be that the universe is chaotic, yet we can still, within our context, take advantage of the patterns and the predictability of our surrounding.

I think a distinction needs to be made between chaos and dynamism though. Chaos is unpredictable, random, undeterministic, while dynamism is just a function of some input with a deterministic output. Static would be a constant, or deterministic function of no input.

Given a context, chaos can have dynamic and static components, as well as continue to show chaotic behaviors.


#5

I don’t like the design of react, so I don’t think it’s suitable
as an example of this.

In Taiji figure, Yin (static, black) and Yang (dynamic, white) are strictly dividing lines, Yin (static, black) interacts with Yang (dynamic, white) similar to playing table tennis.

If the dynamic and static blend together, for the language, the project, the Code, It’s too messy, too complicated, too ugly.

Metaphor:

  • Yin (Static, black): Warehouse, strict standardized immutable data model (Clojure persistent data structure with spec), RMDB.

  • Yang (dynamic, white): Workshop, industrial production line, My Pure Function Pipeline Dataflow, Clojure

  • Table Tennis Ball: Products that meet industrial standards (finished goods, raw materials, middleware), strictly standardized and immutable data

  • Table Tennis Net: Yin (Static) and yang (dynamic) dividing lines, Quality Control Department, Customs, jdbc, I/O, ring.

taiji2

561cbc8ff10c0


#6

@linpengcheng,

I want to say that I really appreciated your comment. I haven’t responded until now because, frankly, you got me thinking. Reading about your Pure Function Pipeline Dataflow feels familiar to what I meant in the Yin and yang: religion and philosophy already knows paragraph.