Fork me on GitHub
#hoplon
<
2015-08-28
>
xificurC09:08:36

I just watched the Om Next presentation from David and got thinking - he is showing that the components only need to define how to pull data they need. Isn't that what hoplon already does?

micha13:08:07

well better than that really

micha13:08:39

because you need to be able to decide how the things are wired up from outside the component, too

micha13:08:47

when you assemble the application

xificurC13:08:43

@micha: I won't understand what you said until I start working on something I guess simple_smile

xificurC13:08:56

I have an app I wish to write, maybe you could give me some tips

alandipert13:08:31

i haven't seen the presentation, but i can say hoplon doesn't try to innovate here

alandipert13:08:42

in lisp, functions "pull data" from the environment and arguments

alandipert13:08:48

this is also what cells do

xificurC13:08:34

there's data stored in a DB of my choice and I want to have an SPA that lets you do some CRUD. There's all this datomic, datascript etc stuff flying around though and it's hard to decide what to do how exactly.

xificurC13:08:08

Like how would one create a table view that can be updated and the updates would be sent to the database. Undo/redo support

micha13:08:28

@xifi: you can't undo side effects

micha13:08:44

rewinding the UI is not undo

micha13:08:57

altering a database is a side effect

xificurC13:08:09

@alandipert: I haven't tried om but what I was referring to is that he said he's dropping cursors because in om next you just define what you need via datomic pull syntax

micha13:08:09

the only way to undo is like with git, you make a new commit

xificurC13:08:56

isn't that where datomic shines

alandipert13:08:15

@xifi: i see. the difficulty with that in my experience is all data must be addressable in a global namespace (the datomic database)

micha13:08:16

if datomic were hermetically sealed, yes

alandipert13:08:25

vs. cells, which can be local and anonymous, and are subject to lexical scoping

micha13:08:25

but in the real world many things are looking at datomic

micha13:08:35

and launching nukes when things change

micha13:08:47

so you can't really undo in general

micha13:08:24

the purpose of datomic is to coordinate things that happen in the real world

micha13:08:49

so retracting a fact does not necessarily reverse actions in the real world that were taken as a result of the assertion

alandipert13:08:58

i put datalog queries in cells

xificurC13:08:58

undo/redo isn't the most important thing though and I might have different means to achieve that in my case

micha13:08:10

the tic-tac-toe example in hoplon-demos has undo/redo

micha13:08:13

because it's a toy

micha13:08:31

it's just not so simple in the real world, and it can't be

micha13:08:58

with a toy demo you can make undo/redo in like one line of code

micha13:08:31

it's easy to make a cell that contains a list of histories

micha13:08:47

and your app formulas are based on the head of that list

micha13:08:01

then you can pop the list whenever you want to undo

micha13:08:07

and push to redo

micha13:08:33

but the serious question is what about the nukes you launched?

xificurC13:08:23

yeah nevermind the undo functionality, not that important in this case really, was just curious

xificurC13:08:44

so for a private app I can just stick it all in sqlite

micha13:08:28

ah right, it does depend on what kind of application you're making simple_smile

xificurC13:08:20

ooh I can go home 1,5 hours early, woot

xificurC13:08:13

you guys are at the beginning of your day right

xificurC13:08:32

thanks for the chat for now, I might be around later. Oh and @micha feel free to drop a short answer on 2-4 from yesterday 😛

micha13:08:59

i'll do it when you're around simple_smile

micha13:08:10

rather than type into outer space

alandipert13:08:29

@xifi: :re bacwn, it was cool, it's one way to do it. definietly no The Way

alandipert13:08:51

like with lisp, we have the types, what goes in them an dhow we arrange them is application-dependent

alandipert13:08:21

maybe the om next way is awesome for the kinds of stuff david is interested in building

donmullen13:08:14

@alandipert @xifi I know others who have used cells + datascript successfully — would be interested to know of anyone using combination datascript on front-end w/ datomic on the backend.

donmullen13:08:15

@alandipert: would it be technically feasible to combine javelin cells with ReactNative?

alandipert13:08:45

@donmullen: i don't know much about reactnative, but cells can go anywhere javascript can

donmullen13:08:17

@alandipert: ReactNative runs primarily as javascript which calls into native for UI