This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-05-03
Channels
- # aleph (6)
- # announcements (4)
- # babashka (73)
- # beginners (117)
- # calva (25)
- # chlorine-clover (59)
- # cider (21)
- # clara (3)
- # cljdoc (8)
- # cljs-dev (54)
- # cljsrn (15)
- # clojure (65)
- # clojure-france (5)
- # clojure-spec (3)
- # clojure-uk (13)
- # clojurescript (79)
- # conf-proposals (1)
- # conjure (17)
- # core-logic (11)
- # datomic (21)
- # fulcro (82)
- # graalvm (11)
- # helix (7)
- # jobs-discuss (11)
- # joker (2)
- # juxt (3)
- # local-first-clojure (1)
- # luminus (5)
- # nrepl (61)
- # off-topic (12)
- # pathom (70)
- # re-frame (3)
- # reitit (3)
- # rum (1)
- # shadow-cljs (58)
- # sql (1)
- # tools-deps (26)
- # xtdb (3)
The template is meant to be a starter for a production project, with tests, workspace cards, build targets, release configs, etc.
@ajsnow2012 We’ve got a little study group that meets on Wednesdays if you’d like to join in? Not sure what timezone you’re in?
Not necessarily, we’re pretty international, and a few of us are on the European side of things, but we meet at around 1115 utc, so not sure if you want to be up around ~6:15 am on Wed?
Even if not, we’ve got a google doc that we’re adding stuff as we learn and ask questions, so you could add to that =)…
rip, it would seem I am actually in the worst time zone. I wouldn't survive that early in the morning, I'd be happy to join the google doc though.
I’ve dropped you a msg, just about to jump off myself, so I’ll reply when I get back =)…
is there a public link?
Just a reminder that our little study group is scheduled to meet tomorrow (Wed) at 1115 UTC
=)…
@U0JUM502E how to connect?
@UMA62JW4W the call is on now
@holyjak I changed the way the style stuff works so that things would be more unified around an attribute being able to declare a style.
I’ve pushed new snapshots of RAD that include the changes. I also published a partially-updated book
In the clojure (not cljs) repl and a .cljc for me it does not work even for functions in the ns. Not sure if it needs anything special to work.
I would need to debug clojure.repl/source-fn
to find out why.
(defattr longitude :address/longitude :float
{ao/identities #{:address/id}
ao/schema :production})
Need help here, what is the wrong with the above, it gives me this error -
Caused by: clojure.lang.ExceptionInfo: No mapping from attribute type to Datomic: :float {}
at com.fulcrologic.rad.database_adapters.datomic_cloud$attribute_schema$fn__37918.invoke(datomic_cloud.clj:343)
I have not finished general type support. decimal, int, and long are supported…but not float/double
remember that the type names are meant to be db independent, so do not expect them to match a particular db
Also, realize that I have limited time, so I’ll add what type support I need as I need it. I don’t have time to build out this library for others, which means it will be a while before it is well-rounded.
thanks @U0CKQ19AQ, can you point me to what it takes to add a new data type (all the different places I will have to touch). I would like to send a PR for a float.
@UMA62JW4W for Datomic?
datomic.clj in the plugin, and add it as a type in attributes.cljc in RAD itself. Then if you want rendering to work for it, you’ll have to augment the controls in semantic UI plugin (if you’re using that)…see semantic-ui-controls
ns and just add to that map and add support based on existing code.
NOTE: float
is a very special type in Datomic (32-bit float), and Number in js is really always a double
…the conversion between the two is possibly going to cause you headaches.
I’ll loosen attributes.cljc to not need editing…the intention is that you just use whatever you want as a type
so, really all you have to do is make Datomic honor it, and make the proper UI controls for it
Datomic has a type map from the simple keywords…and since float
is already what it is called in Datomic, schema generation will probably already work.
actually, line 24 of datomic.clj
might be the only thing you have to touch in the db adapter
the resolver generation, save-form, and schema generation should all work from there.
So, your work is to add entries for :float and :double near :decimal here: https://github.com/fulcrologic/fulcro-rad-semantic-ui/blob/develop/src/main/com/fulcrologic/rad/rendering/semantic_ui/semantic_ui_controls.cljc#L44
thanks, appreciate the quick change. @U0CKQ19AQwhat does the :decimal data type map to in datomic ?
it’s what I mostly use, and I also have that math.cljc ns in RAD that gives you isomorphic bigdecimal in clj and cljs
so then bigdec should work for me too, so in attribute I should use :decimal
? I was actually trying :bigdec
but that was giving me an error.
granted if you’re handling relatively “normal” sized numbers that all have the same basic magnitude, then it’ll be fine once you round…unless of course it is an involved calculation
and even funnier in clj it says -
(+ 1 .1)
Syntax error compiling at (*cider-repl jordan_river_advisors/NewSite:localhost:35969(clj)*:51:7).
Unable to resolve symbol: .1 in this context
`thanks @U0CKQ19AQ, the :decimal thing resolved it, had been struggling with this yesterday.
@UMA62JW4W little background https://medium.com/@vaibhav0109/choosing-data-type-for-monetary-calculation-in-java-float-double-or-bigdecimal-ac6f52e57740
I am not able to define either :float
or :double
or :bigdec
as datatype. :int
works.
What are recommendations of using Fulcro with cljs.spec or guardrails? Can and should we use one? Where are the most useful use-cases for them?
Just a reminder that our little study group is scheduled to meet tomorrow (Wed) at 1115 UTC
=)…