what are the tradeoffs of lifecycles in your opinion?
michaniskin
lifecycles are a hack
like they make it impossible to make good abstractions
things that can be composed transitively
without exposing the transitive dependencies
because lifecycles don't compose
like IBeforeMount
once you start composing things you start to need IBeforeBeforeMount
ad inf
i've run into this myself many times
when i was being confused
it always ends up that later i realize my confusion and rethink things, and the lifecycles go away
to be replaced by composition and scopes
scopes and closures are the lifecycles of lisp
noprompt
it's interesting though. because the thing we are building hasn't had to worry much about that sort of thing. we only have one hook in componentWillMount which is to add a watch to the cell/formula and then render which is merely the dereferenced value of the cell/formula.
oh and of course when the thing unmounts, you need to remove the watch. it's a very small amount of code.
michaniskin
when you start to make general purpse components and you compose them into other general purpose components you will need them
like most people make web apps the same way they used to with php
the app might be clientside, but it's still just a big printf
noprompt
lol
michaniskin
once you go beyond that you start to have problems
i want to do more ambitious things
like get free of text files
noprompt
we do have some issues wrt controlling when certain things happen and where that happen, notably things which must operate outside of the render part of the lifecycle.
michaniskin
i want to make elements that can be composed uniformly
noprompt
well you'll get no argument from wrt text files.
michaniskin
and compose them in a visual tool
when you have lifecycles you can't really just compose things anymore
noprompt
it's funny that you mention that because that is exactly the next thing we're doing once we get the compiler/data-format stabilized.
michaniskin
yeah it's crucial
the virtual dom is working against you with that
like with a visual design tool
because the dom isn't virtual
mr-foobar
hey michaniskin whats up !
michaniskin
hey man!
how's the research?
noprompt
speaking of research, michaniskin do either your alan have any links to spread sheet papers that are *free*?
mr-foobar
will research again in march. closing of my consulting gigs :)
mr-foobar can't wait to code clojure after phpeee
noprompt
omg php
michaniskin
noprompt: the flapjax paper was all we needed really
there really isn't much more to it than that
mr-foobar
michaniskin: how is the css-hoplon thingy coming along ?
michaniskin
mr-foobar: i haven't had much time to work on it lately
been busy with work and boot and stuff
mr-foobar
noprompt: its not so bad given hiphop :)
michaniskin: I think my biggest pain with css is automatic cascading
what I really want is mixins but runtime !
came across a presentation by react folks who are looking into inline dynamic css or something
michaniskin: i suppose the next reasonable question to ask is: what are your thoughts on centralized application state?
hayohayo has quit
michaniskin
noprompt: i'm for it!
mr-foobar
noprompt: centralised state too simplistic. What you really want is a centralized database !
michaniskin
noprompt: with cells you can do it a lot better than with om for instance
noprompt
for us, we've taken that approach in the extreme. there is no component local state. everything reads and writes data to the same location and that data source coordinates the propigation of that data through the cell network.
michaniskin
because you can have multiple "stem cells"
noprompt
right.
michaniskin
noprompt: oh, that i'm against :)
crazydiamond has quit
it's important for "custom elements" (i don't want to say "component" because i don't mean the react type of component) to manage their own state
noprompt
we never do any equality checks below the central source.
michaniskin
that interferes with separation of ceoncerns and composability
in my experience
noprompt
michaniskin: not if it's transparent.
michaniskin
it's crucial i think to have scopes
we don't invent a new scope model, we just use the existing lisp scope mechanism
which is deifnitely sufficient for any programming need
when you have all state in a global blob, you either have to reinvent a coconut scope and a lisp-in-lisp interpreter, or you give up on the concept of scope
we don't want to do either of those things
noprompt
i agree there. i mean it is possible if you want to go off main source to let a cell. our compiler has no issues with that.
michaniskin
yeah we leverage that to the max
elements can have their attributes set to cell values
that's how they connect to the rest of the program
hayohayo joined the channel
but those cell values can be anonymous cells created by another element
mr-foobar
michaniskin: there is one important use case for globalish scope. error handling and the likes of it.
michaniskin
we have state that's stored in "stem cells", which are cells that contain state external to the program
mr-foobar: i agree there, but that's via dependency injection in debug mode
like when you're debugging you can walk the cell graph and see the anonymous cells, no problem
but you don't want to expose that explicitly
mr-foobar
not in debug, but in the application level.
michaniskin
oh, i don't see any need for that
mr-foobar
how do you handle data flow jerks ?
michaniskin
in fact i haven't found error handling to even be a thing in javelin
jerks?
mr-foobar
a -> b -> c -> oops the value isn't right -> d ...
michaniskin
i don't understand
you get an exception there
you fix the bug, and move on
it's pretty hard to have wrong values in cells like that
mr-foobar
yup thats pretty much where globalish stuff can help.
michaniskin
definitely a bug you want to fix
right, but in debug, not in production
mr-foobar
even in production you need to show some kinda error right ?
michaniskin
nothing other than a generic "something went wrong" message
it's extremely rare to have that happen, in practice
like how often do you get ###VALUE### in excel?
i mean once you've debugged your formulas
hardly ever
mr-foobar
but its definitely useful to have something more than a generic error
michaniskin
what would be an example message?
mr-foobar
that would be like ENUM in C :)
*ERRNO
michaniskin
you're not going to show your users some kind of weird cell stack trace
you're just going to tell them that what they tried to do failed
for some technical reason that they can't do anything about
mr-foobar
heh I want to show precisely a cell stack trace.
michaniskin
then deploy production in debug mode?
mr-foobar
except in better prose.
michaniskin
so you need a specialized debug mode
mr-foobar
in games for example, "loading scenes, loading graphics .... "oops something went wrong" ...."
crazydiamond joined the channel
michaniskin
well that wouldn't have anything to do with cells though
sequential processes aren't modeled with cells
you'd do that using js promises, core.async, or just queues manually