morning
Morning
good morning.
morrrrning
How is everyone today?
it is Friday..... yeah.....
what else do I need to say....
friday ? what's that ?
ooh and @malcolmsparks and I are going to submit a talk to ClojureExchange!
it is the day after a Thursday.
i've lost track of days, i have a deadline and am being bitten by hofstatder's law
I’m starting to have the impression that not many people are using re-frame.
@mccraigmccraig: not good.. hopefully you have time soon again to keep track of days and enjoy them again!
@pupeno: perhaps not - it's dead simple though, so i don't mind
@mccraigmccraig: yes, it is simple, but for me, there a lot of holes that I can fill up with hacks, but I’d rather fill up with proper solutions, but since I’m new to reactive programming, re-frame, reagent, reactjs, clojurescript and clojure I’m having trouble judging the proper solution from the hacks. For example, I haven’t seen a single example, doc or anything about dealing with forms.
ha, yeah, that's a lot of stuff to get to grips with at the same time
if i had a lot of forms i would probably want to build a lib to help with validation etc... since i don't, i'm happy with just using raw :on-change / :on-click handlers
How are you getting the values from the inputs?
(-> e .-target .-value)
in :on-change iirc
Ah, ok. Yeah. I saw that, but for big forms I’m not a fan.
no, it wd b a pita for big forms
reagent-forms helps a bit, bit it has its own state.
@pupeno: @mccraigmccraig: I haven’t managed to get past the README for re-frame yet. Tried to do something in it during a Dojo but spent 30 mins trying to work out how to do anything then switched the learning enough reagent to do same thing…I’ll revisit at some point but as it’s ‘if and when I get time’ for me rather than the day job it could be a while.
I found re-frame to make a lot more sense than plain reagent.
xlevus: Oh, I really like it.
yeah, it's the tits. (re-frame)
It’s just that forms seem to have been largely ignored, so I guess I’ll have to build the library to build forms.
although, I do wish they bundled some syntatic-sugar macros for handlers/subs/views in the box.
yeah, i'm finding re-frame makes a lot of sense, the major pain point being evolving from a small app to a larger app
When you are doing reactive programming, forms become a little bit harder than normal HTML because you don’t have the submit process were all values are gathered in a map and sent to you.
The Chrome debugger works better than I expected on cljs code.
Nice, assoc-in can take an index for sequential collections.
(assoc [0 0 0] 3 1) -> [0 0 1]
?
(assoc-in [0 0 0] [2] 1)
[0 0 1]
ah
durr, 0-index. Brainfart.
Oddly enough, I made the mistake.
I don’t think I ever used a language with a 1-index.
Anyway, it’s assoc-in, the big brother of assoc.
ahh
@pupeno: wat ? can u set cljs breakpoints ?
@pupeno: you can assoc into a sequence as well as assoc-in (assoc [0 0 0] 2 1)
mccraigmccraig: yes, you can.
that is v cool
mccraigmccraig: it’s not perfect, but it allowed me to fix a bug already, so it qualifies as debugger in my book.
@pupeno: how do you set breakpoints ? i navigated to a .cljs source file and the ui says it has set a breakpoint, but it doesn't seem to work...
hmm - but it paused when i refreshed the page - so it does work
I… don’t know. It is very flaky.
I accidentally created a form library that’s re-frame friendly… https://github.com/carouselapps/ninjatools/blob/master/src/cljs/re_forms/core.cljs oh well.