ldnclj

Find us on #clojure-uk
thomas 2015-10-09T07:51:46.000042Z

morning

gjnoonan 2015-10-09T08:34:07.000043Z

Morning

pupeno 2015-10-09T08:40:08.000044Z

good morning.

xlevus 2015-10-09T08:54:36.000045Z

morrrrning

gjnoonan 2015-10-09T09:35:07.000046Z

How is everyone today?

thomas 2015-10-09T09:35:36.000047Z

it is Friday..... yeah.....

thomas 2015-10-09T09:35:47.000048Z

what else do I need to say....

mccraigmccraig 2015-10-09T09:36:03.000049Z

friday ? what's that ?

thomas 2015-10-09T09:36:09.000050Z

ooh and @malcolmsparks and I are going to submit a talk to ClojureExchange!

thomas 2015-10-09T09:36:21.000051Z

it is the day after a Thursday.

mccraigmccraig 2015-10-09T09:36:56.000052Z

i've lost track of days, i have a deadline and am being bitten by hofstatder's law

pupeno 2015-10-09T09:38:16.000053Z

I’m starting to have the impression that not many people are using re-frame.

thomas 2015-10-09T09:40:15.000054Z

@mccraigmccraig: not good.. hopefully you have time soon again to keep track of days and enjoy them again!

mccraigmccraig 2015-10-09T09:40:48.000055Z

@pupeno: perhaps not - it's dead simple though, so i don't mind

pupeno 2015-10-09T09:42:51.000056Z

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

mccraigmccraig 2015-10-09T09:48:47.000057Z

ha, yeah, that's a lot of stuff to get to grips with at the same time

mccraigmccraig 2015-10-09T09:51:28.000058Z

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

pupeno 2015-10-09T09:51:53.000059Z

How are you getting the values from the inputs?

mccraigmccraig 2015-10-09T09:53:17.000060Z

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

pupeno 2015-10-09T09:53:44.000061Z

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

mccraigmccraig 2015-10-09T09:54:03.000062Z

no, it wd b a pita for big forms

pupeno 2015-10-09T09:55:34.000063Z

reagent-forms helps a bit, bit it has its own state.

agile_geek 2015-10-09T09:59:39.000064Z

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

xlevus 2015-10-09T10:00:59.000065Z

I found re-frame to make a lot more sense than plain reagent.

pupeno 2015-10-09T10:02:27.000066Z

xlevus: Oh, I really like it.

xlevus 2015-10-09T10:02:37.000067Z

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

pupeno 2015-10-09T10:03:10.000069Z

It’s just that forms seem to have been largely ignored, so I guess I’ll have to build the library to build forms.

xlevus 2015-10-09T10:03:30.000070Z

although, I do wish they bundled some syntatic-sugar macros for handlers/subs/views in the box.

mccraigmccraig 2015-10-09T10:03:38.000071Z

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

pupeno 2015-10-09T10:04:04.000073Z

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.

pupeno 2015-10-09T10:27:31.000074Z

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

pupeno 2015-10-09T10:41:04.000075Z

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

xlevus 2015-10-09T10:43:55.000077Z

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

pupeno 2015-10-09T10:45:47.000078Z

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

pupeno 2015-10-09T10:45:54.000079Z

[0 0 1]

xlevus 2015-10-09T10:47:15.000080Z

ah

xlevus 2015-10-09T10:47:22.000081Z

durr, 0-index. Brainfart.

pupeno 2015-10-09T10:47:43.000083Z

Oddly enough, I made the mistake.

pupeno 2015-10-09T10:47:56.000084Z

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

pupeno 2015-10-09T10:48:19.000085Z

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

xlevus 2015-10-09T10:51:28.000086Z

ahh

mccraigmccraig 2015-10-09T11:10:45.000087Z

@pupeno: wat ? can u set cljs breakpoints ?

agile_geek 2015-10-09T11:13:44.000088Z

@pupeno: you can assoc into a sequence as well as assoc-in (assoc [0 0 0] 2 1)

pupeno 2015-10-09T11:14:42.000089Z

mccraigmccraig: yes, you can.

mccraigmccraig 2015-10-09T11:15:43.000090Z

that is v cool

pupeno 2015-10-09T11:17:24.000091Z

mccraigmccraig: it’s not perfect, but it allowed me to fix a bug already, so it qualifies as debugger in my book.

mccraigmccraig 2015-10-09T12:34:33.000093Z

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

mccraigmccraig 2015-10-09T12:45:11.000094Z

hmm - but it paused when i refreshed the page - so it does work

pupeno 2015-10-09T13:07:41.000095Z

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

pupeno 2015-10-09T21:51:32.000096Z

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.