Fork me on GitHub
#fulcro
<
2020-05-03
>
AJ Snow00:05:13

i don't understand anything

tony.kay02:05:36

The template is meant to be a starter for a production project, with tests, workspace cards, build targets, release configs, etc.

tony.kay02:05:49

so yeah, the video series is better for beginners I think

folcon03:05:07

@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?

AJ Snow03:05:59

a study group for fulcro? I am in the best time zone, central.

folcon03:05:05

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?

folcon03:05:30

But if you’re keen you’re welcome to join our hangout =)…

folcon03:05:05

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 =)…

AJ Snow03:05:34

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.

folcon03:05:17

Cool =)…

folcon03:05:55

I’ve dropped you a msg, just about to jump off myself, so I’ll reply when I get back =)…

Jakub Holý (HolyJak)06:05:07

1115 utc is great, count me in!

4
JAtkins00:05:49

If yall don't mind more members, I'd like to join.

Adrian Smith13:05:10

is there a public link?

folcon13:05:34

Not a public one, as we’re being really informal about it

folcon13:05:55

But we’re pretty welcoming =)…

folcon13:05:34

I’ll drop a message as a reminder tomorrow, but yea, time is 1115 utc on Wed

folcon19:05:06

Just a reminder that our little study group is scheduled to meet tomorrow (Wed) at 1115 UTC =)…

murtaza5219:05:25

I would like to join too, is there a link for the hangouts meeting ?

folcon09:05:15

Normally we’ve just done a hangouts meeting =)…

Jakub Holý (HolyJak)09:05:07

Can you add me to it, please? http://jakubholy.net@gmail

4
folcon11:05:49

I’ll be online in 10 mins if anyone’s around =)…

folcon01:05:19

Just a reminder, it’s been a week so Wed, around UTC 1115 =)… we’ll meetup again!

Jakub Holý (HolyJak)08:05:53

Hi! I am afraid I won't be able to make it today, a busy day 😞

4
folcon11:05:13

Not sure if anyone’s around today? =)…

folcon11:05:43

Having a bit of a late start, but would be good to do so if people are available =)…

Jakub Holý (HolyJak)15:05:10

Sorry, I was offline today. Next Wednesday!

4
tony.kay03:05:22

@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.

👀 4
tony.kay03:05:44

I’ve pushed new snapshots of RAD that include the changes. I also published a partially-updated book

AJ Snow04:05:28

does source nor source-fn not work on defsc functions?

Jakub Holý (HolyJak)06:05:41

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.

Jakub Holý (HolyJak)06:05:54

I would need to debug clojure.repl/source-fn to find out why.

murtaza5221:05:11

(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)
	

tony.kay01:05:21

I have not finished general type support. decimal, int, and long are supported…but not float/double

tony.kay01:05:46

remember that the type names are meant to be db independent, so do not expect them to match a particular db

tony.kay02:05:05

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.

murtaza5204:05:23

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.

tony.kay04:05:40

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.

tony.kay04:05:08

I’ll loosen attributes.cljc to not need editing…the intention is that you just use whatever you want as a type

tony.kay04:05:17

and the plugins either know what to do with it, or they don’t

tony.kay04:05:02

Ah…actually looks like I already did that

tony.kay04:05:15

so, really all you have to do is make Datomic honor it, and make the proper UI controls for it

tony.kay04:05:13

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.

tony.kay04:05:22

Resolver generation is probably similar

tony.kay04:05:08

actually, line 24 of datomic.clj might be the only thing you have to touch in the db adapter

tony.kay04:05:20

I just didn’t list them all

tony.kay04:05:44

the resolver generation, save-form, and schema generation should all work from there.

tony.kay04:05:40

I when ahead and added those on 0.0.3-alpha-SNAPSHOT for datomic

tony.kay04:05:49

so, just adding UI controls in semantic UI should be all you need to do

tony.kay04:05:04

see the other existing controls for hints as to how to implement it

murtaza5204:05:49

thanks, appreciate the quick change. @U0CKQ19AQwhat does the :decimal data type map to in datomic ?

tony.kay04:05:29

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

tony.kay04:05:49

I mostly handle money, so I don’t want weirdness of float/double

tony.kay04:05:19

don’t need the speed, prefer the predictable behavior

murtaza5204:05:00

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.

tony.kay04:05:14

Yeah, :decimal

murtaza5204:05:21

why is bigdec preferrable over float/diuble, or why are they weired ?

tony.kay04:05:22

attribute is not a datomic thing, so I don’t use datomic names

tony.kay04:05:36

open a REPL. Add .1 .1 .1

murtaza5204:05:37

so let me use :decimal then

tony.kay04:05:38

what do you get?

tony.kay04:05:58

on js I get:

cljs.user=> (+ .1 .1 .1)
0.30000000000000004

murtaza5204:05:45

that is funny

tony.kay04:05:51

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

tony.kay04:05:05

but when you’re dealing with money it can cause off by a penny errors

tony.kay04:05:11

which annoy the crap out of accountants 🙂

murtaza5204:05:57

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
`

tony.kay04:05:07

BUT, bigdec is 10x slower or more

tony.kay04:05:08

yeah, reader is a bit less tolerant

tony.kay04:05:24

user=> (+ 0.1 0.1 0.1) 0.30000000000000004

murtaza5205:05:46

thanks @U0CKQ19AQ, the :decimal thing resolved it, had been struggling with this yesterday.

murtaza5221:05:56

I am not able to define either :float or :double or :bigdecas datatype. :int works.

mruzekw22:05:00

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?

folcon19:05:06

Just a reminder that our little study group is scheduled to meet tomorrow (Wed) at 1115 UTC =)…