Fork me on GitHub
#hoplon
<
2016-12-04
>
fiddlerwoaroof01:12:52

@micha thanks, I was hoping someone had already solved this problem 🙂

onetom06:12:14

@flyboarder what did u use to generate that dependency graph? (imean the graph data itself; otherwise i see it's rendered by graphviz) i was just sniffing around the other day for a similar tool. there are not a lot...

mhr13:12:04

@micha it occurred to me that it might be worthwhile to adopt Elm's Architectural terminology of Model, Update, and View in Hoplon documentation, since that's (to me) what a Hoplon app looks like. The Model is state (cells and atoms). The Update are state transition functions. The View is the HLisp. If you look at https://github.com/hoplon/demos/blob/master/todoFRP/src/index.cljs.hl, I think it would be conceptually better to lump persisted state, local state, and computed state under Model; state transition functions under Update; and page under View. What do you think? I think it helps make things easier to reason about if this pattern is made explicit.

mhr13:12:31

*Update is

mynomoto13:12:09

@mhr Micha has avoided in the past telling people how to use Hoplon and what is "idiomatic" by saying everything is idiomatic. Not sure if this will change. I'm working on some version of what I think a good architecture for bigger Hoplon apps, but this is of course not official. There are lots of ways of using Hoplon specially for small apps where too much architecture is unnecessary and even harmful.

mhr13:12:21

I guess just for me, then, I struggled with how to think about Hoplon apps until I looked at Elm. I just found it hard to think about; it seemed too easy to write spaghetti code without some sort of discipline. Being able to ask myself "What is the Model, Update, and View for this application?" helped a lot.

mhr13:12:27

@mynomoto: can you describe what you think "good" Hoplon architecture looks like?

mynomoto13:12:51

@mhr a lot like redux I guess, which is like elm 😃 Views updated from a datascript db or a big atom in a cell (storage), a mechanism to receive events and update the storage (reducer).

mynomoto13:12:27

There is another version that is nice too, where there is no central storage, but some smaller ones. Trade offs.

mynomoto14:12:13

But for small apps, is put your data in cells, your views will update when you update cells 😉

flyboarder17:12:36

I like it, but doesn't yet have cljs support

flyboarder17:12:48

I opened a ticket for that

flyboarder17:12:31

It would also be cool if I could specify a namespace as an entry point for it to scan

alandipert19:12:29

^^ that's exciting, i'll take a look

micha20:12:01

@mhr i can show you some things i think came out well if you like

micha20:12:01

hoplon itself is pretty low-level library, there isn't any specific architecture it is really tied to

micha20:12:53

once you start building your application you will end up making decisions that will guide you toward some more specific set of patterns etc

mynomoto20:12:37

@micha I would certainly like to see the things that worked for you. A complaint that I heard about Hoplon in different occasions is that is has less structure than people feel comfortable with.

micha20:12:13

@mynomoto i'll make a demo with some things that i think worked out well

micha20:12:41

some of them are not easy to make into a library

micha20:12:57

because the library code ends up being redundant

mynomoto20:12:13

@micha cool! I'm eager for it hoplon

flyboarder21:12:55

@mynomoto: this was also a thing I was thinking about, structure is a huge thing, but with hoplon it's actually so much easier

mynomoto22:12:45

@flyboarder yeah, I find Hoplon pretty straight forward, even large apps still fit in my head, but I'm not sure how to convince people of that 😉

fiddlerwoaroof22:12:06

It seems to me, I generally end up with ~50-60% of the code I would normally write for equivalent functionality, but I haven't actually been using it all that long, so I can't tell if this is how it generally works out.

micha22:12:55

when i try to make a philosophy of it it all ends up being redundant and obvious

fiddlerwoaroof22:12:23

Some "prior art" for the cells model.

micha22:12:35

^^ re: kenny tilton cells manifesto

fiddlerwoaroof22:12:02

Cool, I was listening to the cognitcast episode about hoplon and wondered if you were aware of Tilton's work

micha22:12:58

javelin does a lot less, basically

micha22:12:45

i hadn't seen it till we had already made the initial javelin

micha22:12:17

we got most of the ideas from this microsoft thing called flapjax

micha22:12:35

which was more of a classical FRP type thing

micha22:12:57

so most of our original research was into the various FRP things

fiddlerwoaroof23:12:01

Cool, while thanks for making it.

alandipert23:12:08

there's a lot of pre-Tilton art also, also discovered post facto

alandipert23:12:10

as micha says, most of these people weren't builidng on a browser or an existing event system, so their things do way more

alandipert23:12:18

but usually the part that's like javelin... is like javelin

fiddlerwoaroof23:12:17

Yeah, I've actually compiled and played with Garnet recently.