Fork me on GitHub
#off-topic
<
2020-10-11
>
souenzzo01:10:20

we will end up with clj -M borkdude.add io.pedestal/pedestal.service 0.5.8

seancorfield03:10:32

@souenzzo That doesn't look quite right... clojure -M -m borkdude.add ... maybe?

souenzzo13:10:40

I'm still a bit confused with that new clj stuff 😅

Vincent Cantin08:10:29

Question: do you think that React is declarative? and why?

Vincent Cantin10:10:14

I ask because it's written that React is declarative on its website and I disagree. Funtions are not readable.

valtteri10:10:07

I guess it’s that you’re not manipulating DOM manually, but giving a “declaration” how you want the DOM to be in terms of React components.

👍 3
valtteri10:10:28

In that sense I do think it is declarative.

teodorlu10:10:48

I'd say that React is more declarative than jQuery (don't write how the change to the DOM should be made, just write what you want), but less declarative than pure HTML, which just is (no functions).

dominicm11:10:44

To say what @U6N4HSMFW said in different words, you're essentially generating a declarative structure. There's ongoing changes right now to make react based more on data structures (don't know the details, sorry!). All of the function calls currently just generate an object. You could call a react-dom-generating-function and parse the output if you like.

souenzzo13:10:12

I think that react is declarative because every thing returns a data structure, over "do something and return nil" I think that react is not that declarative because the data struture returned by functions is opaque/hard to understand/manipulate

6
☝️ 6
thom15:10:31

Where on the spectrum of declarativeness do people think something like Enlive sits? That always felt more agnostic to the actual DOM tree and processing pipeline to me.

❤️ 3
Vincent Cantin06:10:08

@UTF99QP7V got a point .. we need to have a Declarativeness Scale to measure libraries. I will make one tonight.

kennytilton17:10:08

Let me know when you have the @U8MJBRSR5 Declarativeness Scale ready, I will measure #matrix. 🙏

Vincent Cantin01:10:26

I became hesitant to write that scale, for multiple reasons: • It’s not so simple, because it’s not on a 1 dimension axis. • It implies judging existing frameworks / libraries to place them on the scale. Doing so might start a flame war which would distract me from my work on Vrac. • It implies that I would know what I am doing, which is not granted.

leonoel09:10:50

Declarativeness is mostly about being able to clearly define a particular problem space. I think it's reasonable to say html is a declarative solution to the document representation problem, and react.js is a declarative solution to the document mutation problem. Declarativeness failures happen when the problem space becomes too broad or too vague, then your elegant DSL ends up bloated with turing-complete escape hatches. A modern webapp is considerably more complex than a document, html is not an acceptable declarative solution in that problem space, hence javascript. react.js kind of embraces that mismatch and still requires a fair amount of imperative logic to do anything useful.

👍 3
borkdude19:10:33

Made some progress this weekend on https://github.com/borkdude/glam, a new package manager that's designed to easily install executables in CI and for local directories/projects. Welcome to try it out or PR packages here: https://github.com/glam-pm/packages

6