Fork me on GitHub

@smith.adriane New version of membrane with skia/svg support works fantastic! So fantastic!!! Thank you for pushing out that release! Posting video and source code in a reply. 🙏🎉


21m video on getting it working here! Source to make the demo run here: AMAZING!!!! I think I’ll be able to make a new vega-lite graph for every frame, plotting the current turn in a different color. (Maybe — not sure how fast spinning up a new GraalJS instance is, which darkstar does for every vega>SVG transform. I’ll try that tonight or tomorow!)


PS: About 42ms to convert vega-lite>SVG. I could generate each graph for each frame in a future ahead of time — pretty sure it will work great!!! 🎉


Those are three different Vega-lite SVG graphs, by the way. So great!! 🎉 🎉 🎉

🔥 1

Very cool! Some sort of lazy loading should work well for that.


When the window stops responding to the close event and new windows no longer show up, that usually either means the main thread is blocked or that AWT has mucked with things (or both).


One trick you can try is to call (skia/run #(/ 1 0)) to try and throw an exception on the main thread and hopefully clean things up so you can get back to a normal state, but that only works sometimes depending on the issue.


@smith.adriane having fun getting some Vega-lite graphs working — will have something to show off in next day or two. I think the SVG capability is quite a fantastic unlock — you mentioned wanting to use graphviz for force directed graph diagrams. It can emit SVG And there’s apparently even a version that runs entirely in, umm, Java and GraalJS… (??) So no need to shell out to it.


Neat! Would love to hear experience reports if you give it a shot. I think what I really want is access to the underlying graph layout algorithms. Between, java, js, and the underlying c, there's a lot of layers to wade through. Last time I checked, I think that even the underlying c library was heavily oriented towards the dot DSL. I also seem to remember that the shapes, text, and fonts used by graphviz were deeply embedded, but maybe there's a way to manually feed in shapes. If I were to use graphviz, I would also heavily consider cutting out a few layers by using the underlying c library via My experience is that C libraries tend to be more data oriented than their Java wrappers!


Hmmm, seems that I haven't actually tried this since the creation of clong.


Too many cool ideas to try!


Calling into C. Amazing and also crazy!! (But probably quite routine for you, given the embedded browser and skia stuff you do all the time.) Apparently the Java library I mentioned calls into this library, which is graphviz compiled into WASM. Which is equally (well, actually, even more) crazy! But I’m also in awe that all these possibilities are even doable!


And you’re so right — the Java wrapper is opposite of data oriented.


C code is actually not too bad to work with compared to many Java and C++ libs. Wrapping a Java library is usually so much more painful than wrapping a c library.


@smith.adriane I integrated the vega-lite/SVG into my membrane app! 1:15m movie here! (I compute the SVG each frame, which is dragging the frame rate down. But it was quickest route to get something running.)

🤯 2

That is so cool!