This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-06-02
Channels
- # announcements (37)
- # babashka (9)
- # beginners (172)
- # calva (7)
- # cestmeetup (28)
- # chlorine-clover (27)
- # clj-kondo (2)
- # cljs-dev (45)
- # cljsrn (8)
- # clojure (185)
- # clojure-dev (27)
- # clojure-europe (6)
- # clojure-finland (3)
- # clojure-nl (5)
- # clojure-uk (13)
- # clojuredesign-podcast (4)
- # clojurescript (54)
- # conjure (19)
- # core-typed (1)
- # cursive (40)
- # datomic (9)
- # emacs (5)
- # figwheel-main (34)
- # fulcro (238)
- # graphql (14)
- # hugsql (3)
- # leiningen (4)
- # malli (6)
- # off-topic (12)
- # pedestal (5)
- # portkey (19)
- # protorepl (8)
- # rdf (2)
- # re-frame (23)
- # reagent (3)
- # reitit (16)
- # shadow-cljs (29)
- # spacemacs (12)
- # sql (1)
- # xtdb (15)
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: https://github.com/riverford/compound https://github.com/juxt/pull https://github.com/den1k/subgraph 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. :)
https://github.com/threatgrid/asami and the talk about it - https://www.youtube.com/watch?v=tbVwmFBnfo4
"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?
Nope. And I doubt that it would be terribly useful since it's tailored for a particular project.
@mruzekw itâs not quite a CLJS map, but what about https://github.com/tonsky/datascript ?
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)
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)
https://github.com/ryansolid/solid Does it make sense for clojurescript? Perhaps as a new rendering engine to Reagent?
does reagent currently support any other rendering engines besides react?
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
one that i know of which isn't coupled with React is Moria, a wrapper for Mithril: https://github.com/owengalenjones/moria
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?
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 https://shadow-cljs.github.io/docs/UsersGuide.html#_build_report
We use figwheel. Is there an equivalent?
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
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.
sup Krzysztof đ I ran some experiments and wrote about them: https://www.blog.nodrama.io/clojurescript-serverless-graphql/ 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?
GraalVM can be used to address the latter at the cost of reduced performance after warm up
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/react-datetime.cjs.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
EDIT Also tested with cljs 1.10.773
Using bundle target, optimizations none@ingesol I have no idea if this might help https://webpack.js.org/loaders/source-map-loader/
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.