by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Daniel Buckmaster
    @crabmusket
    FWIW on the one large project I've used it on, we found the codebase was so small and sensible that it was pretty easy to manage even without support or development from others
    especially because so much of it is just virtual-dom, which is not dead
    GÁBOR Áron Zsolt
    @ashnur
    @evanhackett afaik I know Raynos considers mercury a finished product that is done in the sense that it doesn't really worth building anything on the core.
    I think that the best way to think about mercury is an example microframework that you can just use as a template. You can add whatever other module you want and replace the things that you don't want. I for example replaced for a project this year all observe-* functions with datascript and added js-csp to it so I can handle all data flow nicely. It became a way more robust and scalable system than mercury is in its current form.
    Evan Hackett
    @evanhackett
    Ah I see. Cool, thanks all
    Jake Verbaten
    @Raynos
    "finished". "done"
    GÁBOR Áron Zsolt
    @ashnur
    well, i hope i haven't misrepresented your views @Raynos :D
    Jake Verbaten
    @Raynos
    @ashnur I think you know what I know :D
    GÁBOR Áron Zsolt
    @ashnur
    @Raynos I wish :D. But you see, I am putting together another quick frontend for a PoC and my colleagues are like, will you use Angular or React? :D and I am like "not going to waste time on those"
    I think that's my quote for the year with the expression "x is/are/am like" :(
    quota*
    Jake Verbaten
    @Raynos
    @ashnur I heard vue2.0 is simple :P
    GÁBOR Áron Zsolt
    @ashnur
    i will have to check it out, maybe they figured something out
    the domdelegator business that's built into virtual-dom is still giving me a hard time time-to-time, but i still don't know any better approach
    i think its the DOM's fault
    (monday is blaming day)
    vuejs/vue#2873 looks good lol
    Daniel Buckmaster
    @crabmusket
    @ashnur I agree, dom-delegator is still the most impenetrable part of mercury for me
    GÁBOR Áron Zsolt
    @ashnur
    it's not that complicated
    i think that mercury overconfigures this part, we shouldn't have magic that wraps the handlers, instead we should always wrap it manuall
    then you can just pass the handlerWrapper to the views and everything gets a bit simpler
    Daniel Buckmaster
    @crabmusket
    am I right in thinking that dom-delegator actually performs some kind of event delegation to save memory and not attach new listeners to every element? but that it needs support in virtual-dom to do this?
    GÁBOR Áron Zsolt
    @ashnur
    @eightyeight not sure if you still need an answer, but it's not because of saving memory
    afaik
    the crucial problem is that you want static views that can be serialized, however event handlers are not static most of the time they need some bit of state. so dom-delegator wraps events to solve this problem
    Daniel Buckmaster
    @crabmusket
    huh. I can't say I fully understand, but thanks, that makes it a bit clearer. I'd seen a lot of advice about using event delegation (in jQuery, etc.) on pages with lots of elements to improve performance, and the name of the module suggested something similar.
    Steve Lacy
    @stevelacy
    Question regarding large app state.
    I'm on a large (100+ nested views and components) mercury app and would like to 'split out' features into their own render loops.
    I am currently using a hook on load to attach the child view to the dom via appendChild.
    Is there a current documented way of splitting an app into many separate state atoms?
    Grant Callaghan
    @gcallaghan
    hey all, I'm trying to implement the drag handler like in the geometry example. however, I don't enter a render loop until the mouseup event so elements "jump" to position. does this sound familiar to anyone? anybody know what I could be doing wrong?
    Grant Callaghan
    @gcallaghan
    I was able to work around this
    Grant Callaghan
    @gcallaghan
    Looks like it was a difference in behavior between observ-struct and observ-varhash. changes to a varhash value did not seem to invoke a render call
    Grant Callaghan
    @gcallaghan
    @ashnur do you have an example of where you used datascript with mercury? I couldn't find it easily trawling your github repos?
    GÁBOR Áron Zsolt
    @ashnur
    @gcallaghan i will have to put it there, so far i only have it elsewhere, and the version i can share is not very complete because it was a constantly evolving project :)
    because i definitely wanted to use js-csp to hook internal communication up
    and i was running into problems
    then someone mentioned that the next level in this direction is the OTP architecture from Erlang ... :)
    GÁBOR Áron Zsolt
    @ashnur
    actually, i remember that it was @bodil https://twitter.com/bodil
    Grant Callaghan
    @gcallaghan
    @ashnur thanks for the links :smile:
    GÁBOR Áron Zsolt
    @ashnur
    :D
    Grant Callaghan
    @gcallaghan
    has anybody else run into a performance problem using observ-*? what have you done about it? I am attempting to create a moderately large graph in svg that is draggable. storing translateX and translateY and using the technique found in the geometry example lead to extremely slow performance when compared with a d3 implementation
    GÁBOR Áron Zsolt
    @ashnur
    svg will be slow anyway
    canvas is at least a hundred times faster (apart from firefox)
    i have not tried to use observ for large values because i was having issues with querying the data from it
    also, d3 is very well optimized, for such task, i would use d3 in all situations ;)
    this is also a "draggable" graph
    to some extent :D
    GÁBOR Áron Zsolt
    @ashnur
    @gcallaghan all that said, i am not quite sure in your case what would be the actual cause of bad performance...
    maybe there are too many updates triggering, and some simple event caching/collapsing/skipping would help a lot
    Grant Callaghan
    @gcallaghan
    @ashnur I tracked it down to the individual "sets" when have every node be an observable
    If the graph is a single observable, performance is equivalent to d3
    GÁBOR Áron Zsolt
    @ashnur
    well, observables are weird functions that have a method, and the whole construction is (IMHO) not very JIT friendly, BUT, this might be just tremendous bullshit, so don't trust me on it :)