These are chat archives for canjs/canjs

7th
Apr 2015
Julian
@pYr0x
Apr 07 2015 00:00
you mean travis?
Justin Meyer
@justinbmeyer
Apr 07 2015 00:00
and then FTP's the built app to your production site
yes ... this way, you can use node to build everything, but still run php only in production
travis or some other type of build server
I'm not a dev-ops person
Julian
@pYr0x
Apr 07 2015 00:01
yes thats one way, but for small projects that is an overkill
and when the client want something to change, i cant
so what i pick on this chat, is that i sould create a bundle of canjs with requirejs
to minify the requests
Justin Meyer
@justinbmeyer
Apr 07 2015 00:03
probably
Julian
@pYr0x
Apr 07 2015 00:03
ok.. thats sounds good
Justin Meyer
@justinbmeyer
Apr 07 2015 00:03
or help us get StealJS's global export to work in an AMD setting
Julian
@pYr0x
Apr 07 2015 00:04
i will gladly help.. but as use see, javascript is not my first language
so thanks for help... but now i must go to bed, its 2 o'clock in the morning.. :)
Chris Gomez
@akagomez
Apr 07 2015 15:06
[Gomez] Test
[Gomez] Neat. I’m typing this message from the Kato client.
Chris Gomez
@akagomez
Apr 07 2015 15:13
[Gomez] @imjoshdean Try it out!
Kato?
Chris Gomez
@akagomez
Apr 07 2015 16:03
[Justin Meyer] awesome
[Chris Gomez] We should probably create a proxy account.
Matthew Phillips
@matthewp
Apr 07 2015 18:03
@akagomez not sure if you are meaning for these messages to appear in gitter
Justin Meyer
@justinbmeyer
Apr 07 2015 21:10
So @matthewp @daffl I've been looking into virtual dom tech for CanJS
I have a version of can.view.target that produces a form of VDOM
however, https://github.com/Matt-Esch/virtual-dom/blob/master/docs/widget.md makes me think that VDOM is a fad that will wear out
b/c that seems to imply that for widgets, you have to implement a diffing algorithm in your widgets (this is in update)
seems kinda gross
Matthew Phillips
@matthewp
Apr 07 2015 21:13
you don't have to diff in user code if that's what you mean
Justin Meyer
@justinbmeyer
Apr 07 2015 21:15
you do
in your widgets
Matthew Phillips
@matthewp
Apr 07 2015 21:15
why?
Justin Meyer
@justinbmeyer
Apr 07 2015 21:16
look at the example
Matthew Phillips
@matthewp
Apr 07 2015 21:16
i see it, but i don't see where it has to be done this way
Justin Meyer
@justinbmeyer
Apr 07 2015 21:16
?
Matthew Phillips
@matthewp
Apr 07 2015 21:16
virtual-dom is a low-level library
it doesn't have widgets
Justin Meyer
@justinbmeyer
Apr 07 2015 21:16
it has a widget type of node
you could merge some view-state yourself
but then we are merging it
we are doing a viewModel.attr( addedVM.attr() ) every tick
Matthew Phillips
@matthewp
Apr 07 2015 21:18
i'm not following you
Justin Meyer
@justinbmeyer
Apr 07 2015 21:19
everything only works by diff
widgets are doing a diff of there state
there = their
Matthew Phillips
@matthewp
Apr 07 2015 21:21
yes i see that, but this is not representative of what user code really looks like
Justin Meyer
@justinbmeyer
Apr 07 2015 21:21
please elaborate
even if it doesn't look like that
there's still a diff
Matthew Phillips
@matthewp
Apr 07 2015 21:22
yes, there is always a diff, but in user code you just create your component's vdom
this is the higher-level library from the virtual-dom authors, look at that example: https://github.com/Raynos/mercury
Justin Meyer
@justinbmeyer
Apr 07 2015 21:23
yeah, but there's still a diff .. that feels really dirty to me
Matthew Phillips
@matthewp
Apr 07 2015 21:24
how so?
Justin Meyer
@justinbmeyer
Apr 07 2015 21:25
because .. you are having the re-initialization time of an entire component / widget / etc
Chris Gomez
@akagomez
Apr 07 2015 21:25
<Same-o-matic> Whoops! You've exceeded your hourly message limit on this free Tube (it will reset in 34 minutes). Limited tubes only process 30 messages an hour. Visit: https://sameroom.io/pricing to upgrade to unlimited messaging.
Justin Meyer
@justinbmeyer
Apr 07 2015 21:25
and then diffing
instead of just changing the state
Matthew Phillips
@matthewp
Apr 07 2015 21:26
yes, i think react has workarounds for this
this is by one of the authors: http://calendar.perfplanet.com/2013/diff/
Chris Gomez
@akagomez
Apr 07 2015 21:31
@justinbmeyer Is the problem that they're diff'ing the state?
Justin Meyer
@justinbmeyer
Apr 07 2015 21:55
sorry, back
@matthewp you don't think it's a little weird that a new instance of the component needs to be created
and then have it's state diffed
and then it's internals rendered, and then diffed again
Matthew Phillips
@matthewp
Apr 07 2015 21:58
if a new component was created every time it wouldn't really have a state
Justin Meyer
@justinbmeyer
Apr 07 2015 22:00
yes, because the new one's values are copied over
to the old one
Matthew Phillips
@matthewp
Apr 07 2015 22:13
maybe virtual-dom is not the right library to use then
it shouldn't require recreating the component every time