membrane

chromalchemy 2022-09-27T00:15:41.460789Z

maybe more high level, but.. • Best practices w regard to styling. • LiveReload Live Programming lifecycle: Lifecycle of a “window”, how to [start, close, restart, refresh] • Direct manipulation patterns ? maybe some of this in the blog already, still working through.

👍 1
phronmophobic 2022-09-27T00:24:49.444639Z

> • LiveReload Live Programming lifecycle: Lifecycle of a “window”, how to [start, close, restart, refresh] This is a really good topic to add! > • Best practices w regard to styling. I'm not sure I've totally figured out this piece yet, but something is probably better than nothing > • Direct manipulation patterns I'm not totally sure what you mean by this

chromalchemy 2022-09-27T00:47:52.084729Z

I refer to direct manipulation as when you surface part of app state with reactive UI controls (Ie control panel UI, or interact with component directly). Is this just a subset of reactive programming? But direct in the sense that through a ui event (especially a touch event) the user “directly “controls app state, with realtime feedback. I think this is probably old and somewhat obvious idea, embodied in most games and apps. But perhaps Membrane makes this affordance more accessible on a bespoke fine-grained level? Like how are Membrane apps more “moldable” than an average UI framework? Components auto-instrumented with “editor” UI? I think your dataflow repl editor example was great showcase, combined with incremental views of functions/editors!

👍 1
phronmophobic 2022-09-27T02:21:09.274409Z

Honestly, I think just trying to write idiomatic clojure goes a long ways. Building on top of plain ol clojure data makes a huge difference. Most UI libraries don't even have the opportunity since they're almost exclusively built on top of some OO model (web DOM, UIKit, GTK, Swing, etc.) I think you a great point though. I should definitely include something about why avoiding the typical OO foundations makes a big difference.

chromalchemy 2022-09-27T14:02:35.497359Z

👍 Yes, your perspective on this is valuable. Some of these things are so intuitive conceptually, yet such a reach when it comes to wrangling competing fameworks/runtimes, that the imagination is prematurely forclosed. Like the idea you highlighted before about being able to just get and use current component state values. Kind of outside the view of certain declarative straight-jackets (css).

chromalchemy 2022-09-27T00:55:29.848209Z

Pattern for doing Devcards style n-up variations on data?

phronmophobic 2022-10-12T01:26:41.515549Z

For basic usage, making an alternate viewer for clerk wasn't too bad, https://github.com/phronmophobic/desk

Ben Sless 2022-10-12T04:42:40.000089Z

Dude! That's awesome!

2
Ben Sless 2022-10-12T04:46:19.085449Z

You could connect it with the dag editor to create a dataflow editor!

😎 1
phronmophobic 2022-10-12T04:47:57.486129Z

I think you would have to build the DAG engine in addition to the UI

Ben Sless 2022-10-12T04:54:42.919319Z

There are several implementations of dataflow engines in Clojure already Plug and play

phronmophobic 2022-10-12T04:55:54.675839Z

I listed what I thought the requirements would be in https://clojurians.slack.com/archives/CQT1NFF4L/p1657482280025899. It didn't seem like any of the current options fit, but it would be great if I just overlooked something.

Ben Sless 2022-10-12T04:56:48.380409Z

What about propagators?

phronmophobic 2022-10-12T04:57:25.946579Z

Is that a library?

Ben Sless 2022-10-12T04:58:08.273499Z

https://github.com/tgk/propaganda

phronmophobic 2022-10-12T05:00:09.402229Z

It doesn't seem like it has side effects in mind

Ben Sless 2022-10-12T05:01:13.414419Z

In what sense?

phronmophobic 2022-10-12T05:02:21.285029Z

If it's using STM to run the steps within a transaction, then you shouldn't have side effects in the step.

phronmophobic 2022-10-12T05:02:56.892959Z

It seems like there's a second implementation

Ben Sless 2022-10-12T05:03:03.543149Z

Iirc there's also an immutable implementation without stm, eg system>system

Ben Sless 2022-10-12T05:03:08.015019Z

Ninjad

🌠 1
phronmophobic 2022-10-12T05:04:17.734739Z

maybe, the last time I thought about propagators was about when this library was last updated

Ben Sless 2022-10-12T05:05:27.606329Z

Propagators seem like a natural fit for dataflow

phronmophobic 2022-10-12T05:06:01.422779Z

I seem to remember something about propagators running until the system becomes "stable"

Ben Sless 2022-10-12T05:06:21.335019Z

Not for the immutable implementation 🙂

Ben Sless 2022-10-12T05:06:52.627369Z

Also, what about pathom?

Ben Sless 2022-10-12T05:07:17.458189Z

The immutable implementation has a step semantic you can run until fixed point. Like macro expansion

phronmophobic 2022-10-12T05:08:21.099729Z

pathom might help

phronmophobic 2022-10-12T05:08:27.963599Z

or any graph library really

phronmophobic 2022-10-12T05:09:23.666129Z

does pathom help you run your resolvers?

phronmophobic 2022-10-12T05:09:42.883939Z

and can you inpsect the results as it's resolving?

Ben Sless 2022-10-12T05:09:58.991089Z

I'm not a pathom expert 😅

phronmophobic 2022-10-12T05:10:06.621039Z

me neither 🤷

phronmophobic 2022-10-12T05:10:25.312959Z

propagators are nice because you can have cycles

Ben Sless 2022-10-12T05:10:30.020449Z

But I THINK there's an implicit context which passes along with everything

Ben Sless 2022-10-12T05:10:37.975559Z

Yeah I dont know if pathom has cycles

phronmophobic 2022-10-12T05:10:56.459149Z

supporting cycles might be a requirement

Ben Sless 2022-10-12T05:11:15.950609Z

The people demand propagators 🙂

1
Ben Sless 2022-10-12T05:12:44.476339Z

Btw, dataflow + code editor = write code and visually see what values are doing throughout your code AS YOU ARE WRITING

Ben Sless 2022-10-12T05:14:22.000139Z

We have a hackathon at work soon 🤔

🎉 1
phronmophobic 2022-10-12T05:14:42.189879Z

my evil plan is spreadsheet for pure functions, data flow for impure functions, https://twitter.com/phronmophobic/status/1471612491645874176?s=20&t=CQ6vQtKoOS0eF4xWTDg1DA

phronmophobic 2022-10-12T05:15:46.602769Z

I'm pretty happy with the spreadsheet (and use it regularly), but the data flow editor is still vaporware

Ben Sless 2022-10-12T05:18:13.719669Z

Why spreadsheet and not something slightly more visual? (Like dag?)

Ben Sless 2022-10-12T05:18:36.748459Z

I already nerd sniped you to write a graph editor 😄

phronmophobic 2022-10-12T05:25:56.075449Z

that's a good question. I'm not sure they're mutually exclusive, but I think spreadsheets are very effective for pure functions and immutable values. generally speaking, the annoying thing about DAGs is density and tedium, especially if adding 2 numbers requires 3 nodes.

phronmophobic 2022-10-12T05:27:18.362979Z

I think DAGs are much better at the flow aspect, where it's important to see where the data is coming and going. spreadsheet are nice for pure functions because each cell is kind of an island

phronmophobic 2022-10-12T05:28:01.025599Z

and spreadsheets can be more visual, https://twitter.com/phronmophobic/status/1495102204520263680?s=20&t=_SZwU-5BoY0Q2nCvMx05jA

Ben Sless 2022-10-12T05:30:08.778869Z

Isn't this just a specific visual representation of a graph?

Ben Sless 2022-10-12T05:30:21.975729Z

Why not toggle between the two views?

phronmophobic 2022-10-12T05:31:13.746539Z

yea, that could work

phronmophobic 2022-10-12T05:31:20.323269Z

right now, I only have the one view

Ben Sless 2022-10-12T05:31:38.975859Z

But you could have another 🙃

phronmophobic 2022-10-12T05:31:52.450939Z

yea, that's goal

Ben Sless 2022-10-12T05:31:55.094339Z

"I'm a stick" "But you could be fire"

Ben Sless 2022-10-12T05:33:05.172889Z

The spreadsheet is closed source at the moment, right?

Ben Sless 2022-10-12T05:33:49.881949Z

And wrt dataflow and representation, the spreadsheet currently won't be able to handle feedback loops, although pure

👍 1
phronmophobic 2022-10-12T05:35:52.067329Z

it's closed source, but not for any particular reason

phronmophobic 2022-10-12T05:36:17.434299Z

if you were interested in trying it, I could try to make it usable

Ben Sless 2022-10-12T05:39:31.739809Z

Usable? Where's the fun in that? I would connect it to desk and use the mechanism to represent data flowing through code as you edit it

phronmophobic 2022-10-12T05:42:40.978009Z

I guess usable is the wrong word. I thought it depended on a bunch of local extensions to membrane, but I think all of those have since been released

phronmophobic 2022-10-12T05:43:35.923179Z

I used the word "usable" when I really meant runnable on a second computer

phronmophobic 2022-10-12T05:44:37.903009Z

oh, it depends on another unreleased project for the mini UI editor

Ben Sless 2022-10-12T05:48:17.291199Z

This is an unrelated thought about code organization, but I wonder if such projects should be organized in monorepo where all the ancillary modules are under a modules directory

phronmophobic 2022-10-12T05:51:27.920509Z

probably

phronmophobic 2022-10-12T05:52:03.270019Z

I have a janky setup where I use :local/root and then change it when I commit and push to github. I think polylith solves this problem, but I haven't tried it

phronmophobic 2022-10-12T05:53:13.061109Z

since the spreadsheet already breaks apart your code and it doesn't live in a traditional file format, I've also been investigating how to store code directly in the db rather than on the file system, but there are still problems to be solved there

phronmophobic 2022-10-12T05:57:33.343929Z

haha

Ben Sless 2022-10-12T05:58:05.048279Z

I've been playing with that but the tools analyzer output isn't ideal

phronmophobic 2022-10-12T05:58:22.761239Z

someone else also posted about a similar topic as well, https://clojurians.slack.com/archives/C053AK3F9/p1665518469317489

Ben Sless 2022-10-12T05:58:52.346119Z

It would be better if the keywords were qualified. And I'm not sure how to replace the entities with ids correctly

Ben Sless 2022-10-12T06:00:13.802539Z

Codeq only does git, not the code itself

Ben Sless 2022-10-12T06:00:43.420729Z

I might try throwing it into asami

phronmophobic 2022-10-12T06:05:45.570039Z

of all the db options, I really liked asami

phronmophobic 2022-10-12T06:06:09.916339Z

I don't think it supports range queries though, which can be important for some use cases

Ben Sless 2022-10-12T06:07:06.646209Z

I don't have an opinion on the matter yet

phronmophobic 2022-10-12T06:09:00.752149Z

I'm still pretty new to using them, but xtdb also seems good

phronmophobic 2022-09-27T01:01:25.952159Z

> Pattern for doing Figwheel style n-up variations on data? I'm not that familiar with figwheel and googling didn't help. Is there a link or resource that explains this feature?

chromalchemy 2022-10-12T13:03:03.683009Z

I would love to try the spreadsheet editor/repl out.

Ben Sless 2022-10-12T18:38:34.030279Z

Managed to ingest the AST to datascript @smith.adriane

phronmophobic 2022-10-12T18:39:05.386509Z

nice

phronmophobic 2022-10-12T18:39:50.567499Z

Once you have the AST, you can turn it back into code you can eval, right?

Ben Sless 2022-10-12T18:53:47.885939Z

yup

chromalchemy 2022-10-12T19:22:04.305019Z

I’ve not had a chance yet to get into Datalog db’s, but have always been attracted by the idea of high-level graph query. Interesting how it might be utilized in the localized UI context.

phronmophobic 2022-10-01T16:33:33.035189Z

dev cards is cool. Looks like there's a lot of overlap with something like clerk. I wonder how much work it would be to build an alternate viewer for clerk.

chromalchemy 2022-10-01T18:18:08.012739Z

Yes, that’s what I meant, devcards! Interesting that Clerk also provides simultaneous visualizations of multiple related functions.

rolt 2022-09-29T16:15:33.480609Z

i don't think figwheel provides any help for that. Are you talking about devcards ? they work outside of figwheel but it was created by the same author. https://github.com/bhauman/devcards/

chromalchemy 2022-09-27T14:05:26.906179Z

https://figwheel.org/docs/

chromalchemy 2022-09-27T14:08:14.661959Z

I’ve not really used it. Looks like a batteries included Clojurescript Repl setup. But my understanding was that one feature it allowed was developing components with visual isolation, and simultaneously developing n permutations of a component side by side. ie designing for different screen proportions simultaneously.

chromalchemy 2022-09-27T00:58:11.105269Z

Using results from (headless?) webview if one had to render some html?

phronmophobic 2022-09-27T01:00:28.960459Z

there are some examples in the https://github.com/phronmophobic/clj-cef project, but it doesn't seem like people are that interested (although I think they should be)

chromalchemy 2022-09-27T21:55:17.546419Z

That does look interesting