matrix

kennytilton 2023-03-14T18:59:56.811339Z

I'll start with Matrix. Does this look OK? https://github.com/kennytilton/matrix/blob/main/cljc/matrix/README.md

phronmophobic 2023-03-14T19:07:49.263999Z

> Matrix solves this problem on its own: when (7) changes, how do we re-calculate (9) just once? I might be a bit more explicit here. Something like: Matrix solves this problem: when an input changes (7), how do we re-calculate its dependents just once (11, 8, 2, 9, 10)?

phronmophobic 2023-03-14T19:09:57.343479Z

In this section, https://github.com/kennytilton/matrix/blob/main/cljc/matrix/README.md#including-matrix-in-a-project I like to use ` for the requires and deps so that they're on their own line and easier to copy/paste.

phronmophobic 2023-03-14T19:10:29.811849Z

> More to come RSN. RSN?

phronmophobic 2023-03-14T19:10:38.094049Z

Love the cheat sheet!

phronmophobic 2023-03-14T19:12:08.982659Z

I might wrap the code blocks inside the cheat sheets with inline code block annotations. For whatever reason, seeing code in non-monospace trips up my brain.

phronmophobic 2023-03-14T19:16:42.008369Z

Since it's an intro, I might include a very small, illustrative example of what using matrix looks like (if possible).

kennytilton 2023-03-14T21:29:19.121519Z

RSN? Uh-oh, I am getting old: http://www.catb.org/jargon/html/R/Real-Soon-Now.html 🙂 "I might include a very small, illustrative example of what using matrix looks like (if possible)." I was disappointed when I realized all my Matrix examples, aside from the Common Lisp RoboCells, were UI-related. I actually used it in a catch context recently, but under NDA. Hmmm, Lemme see if the RoboCells work will play. Ugh, surprised I forgot the bash thing on the backquotes. Thx, and I'll see about cleaning up the code in the cheatsheet! Thx for the close look @smith.adriane! 🙏

phronmophobic 2023-03-14T21:32:42.233999Z

> RSN? Uh-oh, I am getting old: It might be just me. I'm constantly having to look up TLAs.

kennytilton 2023-03-14T22:11:28.858079Z

Matrix solves this problem on its own: when (7) changes, how do we re-calculate (9) just once?
I might be a bit more explicit here. Something like:
Matrix solves this problem: when an input changes (7), how do we re-calculate its dependents just once (11, 8, 2, 9, 10)? (edited) 
That's my Socrates wannabe thing. I wanted to engage the reader by first making them wonder why the goal was at all challenging, then have them discover the difiiculties on their own, and then have them marvel at how MX could solve the problem in the general case, without tedious (boilerplate) guidance. Come to think of it, I need a conditional arrow from 11 to 8 to really mess them up. 🙂

kennytilton 2023-03-14T22:12:47.847069Z

Had to look up TLA. 🤣

😄 1
phronmophobic 2023-03-14T22:18:12.649319Z

> I wanted to engage the reader by first making them wonder why the goal was at all challenging Yea, it's definitely a style thing. My technical writing style is to blurt out the punch line before the joke's setup is finished.

phronmophobic 2023-03-14T22:22:22.396219Z

http://www.jargon.net/jargonfile/t/TLA.html > In 1989, a random of the journalistic persuasion asked hacker Paul Boutin "What do you think will be the biggest problem in computing in the 90s?" Paul's straight-faced response: "There are only 17,000 three-letter acronyms." (To be exact, there are 26^3 = 17,576.)

kennytilton 2023-03-14T22:38:00.415829Z

This feels like over-explaining (and requires that extra 11->8 arrow:

Matrix solves this problem on its own, given only:

  v11 = v7 + v5
  v8 = (+ v3 (when (> v11 42) v7); and
  v9 = v11 + v8

...when (7) changes, how do we re-calculate (9) just once, in the general case?
Mind you, this is just a hook. If I were trying to explain it I would follow the Army training handbook: • tell them what I am going to explain; • explain it; then • tell them what I just told them.

kennytilton 2023-03-14T23:50:59.676869Z

Made the opening teaser a bit more expansive: https://github.com/kennytilton/matrix/blob/main/cljc/matrix/README.md

phronmophobic 2023-03-15T00:35:50.555519Z

To be honest, I think your original version was bit better. This version introduces both psuedo-code and a diagram. I don't think either is too hard to figure out, but for a fresh user, it might be a lot to decipher if you're just trying to figure out what #matrix is all about.

phronmophobic 2023-03-15T00:38:03.988819Z

I was just checking the intro for some FRP libs. http://www.flapjax-lang.org/ > Flapjax is a new programming language designed around the demands of modern, client-based Web applications. Its principal features include: > • Event-driven, reactive evaluation > • An event-stream abstraction for communicating with web services > • Interfaces to external web services > Flapjax is easy to learn: it is just a JavaScript framework. Furthermore, because Flapjax is built entirely atop JavaScript, it runs on traditional Web browsers without the need for plug-ins or other downloads. It integrates seamlessly with existing JavaScript code and other frameworks. https://mobx.js.org/getting-started.html > Conceptually MobX treats your application like a spreadsheet.

phronmophobic 2023-03-15T00:38:34.724339Z

Obviously, condensing what your library is about is pretty hard. I've never been particularly good at it.

kennytilton 2023-03-15T00:39:50.370949Z

I am looking to attract senior front-end folks at this point, so I am comfortable bamboozling the noobs at this point. But, yeah, the first version was nice and tidy.

phronmophobic 2023-03-15T00:41:39.147779Z

Your original readme intro was also pretty good: > Welcome to the "mono" repo for Matrix, a generic, fine-grained, reactive engine that began as Common Lisp https://github.com/kennytilton/cells twenty-five years ago.

kennytilton 2023-03-15T00:52:16.639989Z

Yep, those are both high on my prior/concurrent art lists. MobX (original) is especially close. I am not sweating the doc too closely, btw. Just don't want it to be an active turn-off. I am fairly sure the only way to promote this is to create small opportunities for folks to bang out a few lines of Web/MX on their own. In my experience, it does not take long for an experience UX programmer to see the light. And without that, the paradigm is quite hard to pick up. The shift is too great. That said, I think next I will start building the Web/MX Inspector, in small steps. I might be able to carve out suggested exercises during that sequence, but the main goal will be to convey to experienced CLJS U/X devs the power of MX-wrapped UIs. Thx for your help!

👍 1