Fork me on GitHub

Hi all, do y'all have any favorite libraries to make a graph db out of a CLJS map? I'm looking at use it with re-frame, and I like the idea of a set interface for querying and mutating the app-db. Something that defines the db structure for me with a set interface so I don't have to. (I've done this too many times with Redux apps, and it gets old!) I notice theres these, and I wondered if there are any favorites here: I didn't get any responses in the re-frame room, so thought I would ask here. Thanks.


I ended up heavily modifying subgraph to fit my needs. Up to the point when there's no original code left. :)


Haha, thanks for sharing!


"And about 18 months later I found out about Datascript, which was very frustrating 'cause I would've just used that if I'd known about it" :D


But as I have mentioned plenty of times before - if you care about the performance, check it before going full-in with Datascript or anything like that. Prior to doing that, also think if you really need a graph database. In my projects, so far only the regular relational DBs were needed. And a couple of years ago when I tested Datascript performance vs Subgraph, Datascript was about 10x slower.


@U2FRKM4TW Do you use any tools for a relation DB via CLJ maps?


As I said above - a heavily modified version of subgraph.


That's open source? 🙂


Nope. And I doubt that it would be terribly useful since it's tailored for a particular project.


Alright, just curious


@mruzekw it’s not quite a CLJS map, but what about ?


Using :db.type/ref you can achieve a graph (if I’m understanding correctly what you’re looking for)


@raspasov That won't work for me since it doesn't fit well with the re-frame devtools (it expects a map)


I'd use it if it were (and assuming the payload size was worth it too)


Perhaps there’s a way to convert the Datascript “db” to a map before passing it to re-frame devtools (this is just a speculation, I haven’t used re-frame and/or devtools)


Yeah, don't know off the top of my head

awb9907:06:30 Does it make sense for clojurescript? Perhaps as a new rendering engine to Reagent?


does reagent currently support any other rendering engines besides react?

Chris McCormick08:06:23

there was talk of supporting Preact i am not sure if it works yet


I’m generally interested in adding alternative rendering engine support to some of the popular clojure UI libs. was hoping to find some examples. so far, it seems like most of the libs are strongly coupled with react and even more so with the DOM

Chris McCormick00:06:03

one that i know of which isn't coupled with React is Moria, a wrapper for Mithril:


does that mean it’s coupled to mithril?


hello, doe's anyone here has an experience with devcards? I've finally made devcards "work" but I get no components rendered on the screen, all I see is the devcards title and clojurescript logo.. how do I tell devcards to render those cards I have?


I get no errors, just an empty page


Hi everyone, any tips on optimizing the size of app.js and understanding the size of app.js? We have 4 external dependencies + react and the size is around 7 mb.


which tool do you use? with shadow-cljs you can generate a build report that will tell you exactly how big everything is


We use figwheel. Is there an equivalent?


none that I'm aware of


Shoot! Might have to do some manual digging to find out where the issues are.


If you don't want to or can't switch the project to shadow-cljs, you can maybe just build your project once with it. It will still require some work, but it may very well be worth it given that in my experience it's not a complicated procedure and manual digging is unpredictable.


Ok, cool. I will try this. Thank you!


Also, any tips / blog posts you recommend for switch from figwheel to shadow-cljs? Our setup for figwheel is quite standard and if shadow is better then we’d rather make the switch now.


if you can share your build config I can tell you how the shadow-cljs config would look

👍 4

only hurdle when switching typically involves figuring out what to do about cljsjs packages if you use any. if its just the standard re-frame setup with react then thats no issue but if you use custom packages it involves a bit of switching


Do you use cljs with google cloud functions or in amazon? I am curious about your experience.


i use them in aws. much better than than jvm due to faster start time.


sup Krzysztof 😉 I ran some experiments and wrote about them: Serverless + shadow-cljs with named exports for the lambda functions. Since then we have a Lambda running a Pathom API over websocket in production (clients connect to an AWS gateway, make requests and reply is done via a POST to the gateway endpoint).


Only custom component we had to add was a Redis instance to keep a mapping between the connected clients and authenticated users. If you go the vanilla route, and keep http request/response there's no need, and works pretty much as described in that simple example


How are you doing @U44NW9H34? 🙂


@U0E98NQG2 do you know how much faster?


Cold start time is tens of milliseconds for Node.js and several seconds for JVM.


GraalVM can be used to address the latter at the cost of reduced performance after warm up


From my tests, compiled Graal is still faster then Node


I don’t doubt that


and comparing this to Clojure (java) functions


I’m on clojurescript 1.10.764, still getting these in Chrome for many of my source maps:

DevTools failed to load SourceMap: Could not load content for webpack:///node_modules/react-datetime/dist/ HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
EDIT Also tested with cljs 1.10.773 Using bundle target, optimizations none


actually ignore that


Hi, I'm wondering if a generic "feedback for this page" clojurescript project exists. Ideally it would send the page location (url) that the person is viewing and their comments.


are custom formatters in chrome broken for everyone?