Fork me on GitHub



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

Pablo Fernandez09:10:16

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

Pablo Fernandez09:10:51

@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

Pablo Fernandez09:10:53

How are you getting the values from the inputs?


(-> e .-target .-value) in :on-change iirc

Pablo Fernandez09:10:44

Ah, ok. Yeah. I saw that, but for big forms I’m not a fan.


no, it wd b a pita for big forms

Pablo Fernandez09:10:34

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.

Pablo Fernandez10:10:27

xlevus: Oh, I really like it.


yeah, it's the tits. (re-frame)

Pablo Fernandez10:10:10

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

Pablo Fernandez10:10:04

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.

Pablo Fernandez10:10:31

The Chrome debugger works better than I expected on cljs code.

Pablo Fernandez10:10:04

Nice, assoc-in can take an index for sequential collections.


(assoc [0 0 0] 3 1) -> [0 0 1] ?

Pablo Fernandez10:10:47

(assoc-in [0 0 0] [2] 1)


durr, 0-index. Brainfart.

Pablo Fernandez10:10:43

Oddly enough, I made the mistake.

Pablo Fernandez10:10:56

I don’t think I ever used a language with a 1-index.

Pablo Fernandez10:10:19

Anyway, it’s assoc-in, the big brother of assoc.


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

Pablo Fernandez11:10:42

mccraigmccraig: yes, you can.

Pablo Fernandez11:10:24

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

Pablo Fernandez13:10:41

I… don’t know. It is very flaky.

Pablo Fernandez21:10:32

I accidentally created a form library that’s re-frame friendly… oh well.