Fork me on GitHub
#clojurescript2015-06-04
>
ricardo09:06:26

@mikethompson: Re googleability, that's a good point. Can one write plugins for slack? Their page on integrations doesn't make it clear, there's a reference about having to get in touch if one wants to integrate.

ricardo09:06:15

Welp, just saw @logbot. I was catching up and hadn't reached that far down.

ul09:06:13

@ricardo: essentially, logbot will export logs as static html splitted by days and channels and exposed to google

ricardo09:06:31

Sounds good @ul. For what it's worth, the URL on @logbot's description 404s right now, in case it's not a known issue.

ul09:06:22

yes, i'm working on export feature and basic template right now. i was eager to start logging asap to capture more messages before any other feature is ready

mfikes11:06:03

This is a cool demo of Sean Grove including live source code in his Figwheel web UI: https://www.youtube.com/watch?v=Q5vh1Xj-xM4

placeboza13:06:10

nice @mfikes - great for tuts

mfikes13:06:42

What astounds me is that you think you have a good feel for what is possible in a given language, and then Sean comes along with something like this and pushes on that boundary. Things like that make you stop and take pause simple_smile

erichmond14:06:45

SWEET BABY JESUS. I HAVE WANTED THAT FEATURE FOREVER

shaun-mahood14:06:19

Wow that is pretty awesome.

martinklepsch14:06:20

when calling closurelib instance methods do I have to import/require the namespace where the instance method is defined?

martinklepsch14:06:11

was misled by my own human error :satisfied:

dnolen14:06:17

@martinklepsch: Closure namespaces have to be required (or imported) just like ClojureScript ones.

martinklepsch14:06:48

@dnolen: If I do (.getQueryData (uri/parse js/location)) with goog.uri :as uri and then call .get on it it works fine without explicitly importing goog.Uri.QueryData — is that safe to expect?

dnolen14:06:58

only if goog.uri also provides goog.Uri with a QueryData def.

joelkuiper15:06:00

Really cool stuff from Sean Grove, I’m sure that trick will come in handy some time!

dnolen15:06:54

aw yeah ClojureScript, Om, Clojure, Datomic https://precursorapp.com

mj_langford15:06:49

wow that is responsive

erichmond15:06:22

DOCCS architecture

ul15:06:51

@erichmond: what does DOCCS mean?

erichmond15:06:29

haha, my horrible attempt at acronym-izing the Datomic Om Clojure ClojureScript stack

erichmond15:06:46

Yeah, I'll shut up, I've written nothing of consequence this entire morning. I blame it on my lack of sleep. heh.

guy_do_or_die15:06:18

is there any known practical use of Hoplon? http://hoplon.io it's impressed me, but i guess i can get something wrong as a beginner. it seems not so popular.

guy_do_or_die15:06:56

@erichmond: DHCCS sounds even worse though )

micha16:06:34

guy_do_or_die: we use it simple_smile

jellea16:06:50

guy_do_or_die: hey! simple_smile

guy_do_or_die16:06:00

@jellea: oh, hello. glad to see you here. will you answer me after the third e-mail in a row by the way? )

ul16:06:23

@guy_do_or_die: i'm also completed a small project with Hoplon

jellea16:06:52

guy_do_or_die: oh my mailbox flooded lately, will check!

guy_do_or_die16:06:08

@micha @ul cool. is there public code? would love to look at it if possible. thanks in advance.

micha16:06:16

guy_do_or_die: we're in the process of releasing new versions that work with boot 2.0.0

guy_do_or_die16:06:06

oh, now i see how come that you use it )

guy_do_or_die16:06:15

sure i have this resource in mind

micha16:06:15

guy_do_or_die: here is an application you can see https://github.com/exicon/homepage

ul16:06:42

@guy_do_or_die: https://bitbucket.org/ul/runes24 , not sure if it is idiomatic Hoplon, but nevertheless

micha16:06:41

ul: aloha! simple_smile

ul16:06:11

you can play with it live using login “guest” and pass “Speak, friend, and enter.”

ul16:06:26

@micha: hey! nice to see you here 😉

ul16:06:49

ui is in russian, but ignore and just click everywhere and drag runes around

guy_do_or_die16:06:09

@ui i'm Russian actually ;

micha16:06:52

my grandfather was russian, but that doesn't help me speak the language, unfortunately

mfikes16:06:21

Datomic Om Clojure ClojureScript?

mfikes16:06:07

Heh. Sorry Slack latency.

hlship16:06:14

So I'm really liking the concepts in re-frame, but I'm having just a bit of trouble getting off the starting line ...

jhsu16:06:27

@hlship: what kind of issues? i'm still a beginner but tried out re-frame also

hlship16:06:19

I think I found it. Gotten f*cked by the "(get atom key) returns nil" Clojure wierdness. I left out an @.

hlship16:06:24

FYI:

(register-sub :current-page
              (fn [db _]
                (reaction (:current-page @db))))     ; correct

hlship16:06:52

vs.

(register-sub :current-page
              (fn [db _]
                (reaction (:current-page db))))    ; incorrect, always nil

jhsu16:06:22

ah yep, can't forget that deref =P

jhsu17:06:59

@hlship: any good reference apps for reagent/re-frame you've been looking at?

hlship17:06:54

Just started yesterday. Not much to show yet. Alas, I'm working on something proprietary so I can't share.

hlship17:06:26

There's a simple example, and a impl of To Do. Also, there's re-com (components for re-frame)'s demo: http://re-demo.s3-website-ap-southeast-2.amazonaws.com/#/time

meow17:06:24

I'm playing around with re-frame and re-com. I haven't gotten very far with it, but the code is out there, such as it is: https://github.com/pkobrien/reactionary

meow17:06:55

As much as I like re-frame I also feel like there is avoidable boilerplate code, especially when it comes to maintaining the state (aka, app-db). I like avoiding boilerplate code. I'm still exploring options in this area.

hlship17:06:25

I'm having an issue with re-frame vs. figwheel. Because of figwheel, I'd expect that when I change a component function, I see the change immediately. But that's not the case.

hlship17:06:15

Currently, I'm storing my page component function inside the app-db:

(defn home-page
  []
  (fn []
    [nav-border
     {:title "Welcome to the MIX Merchant Portal"}
     [:div
      [:div [:a {:href "#/about"} "show about"]]
      [:div [:a {:href "#/credits"} "show credits"]]]]))

(secretary/defroute "/" []
                    (dispatch  [:set-current-page home-page]))

(defn mount-root []
  (reagent/render [current-page-view] (.getElementById js/document "app")))
Where current-page-view is:
(defn current-page-view
  []
  (let [current-page (subscribe [:current-page])]
    (fn []
      (if-let [page @current-page]
        [page]
        [nav-border {:title "Loading ..."} nil]))))
I believe the issue is that current-page-view component is not "dirty" because :current-page of app-db is unchanged ... the prior version of the home-page function before the figwheel reload. Short of turning current-page-view into a case statement (or maybe utilizing a defmethod) I'm not sure how to convince the stack to re-render when home-page changes.

jhsu17:06:37

@hlship: when you use the component are you using it with [home-page] or (home-page)? should use the []

ul17:06:09

@hlship: call mount-root in figwheels on-jsload

ul17:06:49

it is a good practice to force rerender after code hotswap

noisesmith17:06:25

hlship: I had a similar issue locally (we were using secretary to dispatch and load the page into reagent, the solution was to use :on-jsload to directly invoke secretary)

hlship17:06:11

@ul I believe that's already happening (inside my dev.clj), and even a REPL invocation of (mount-root) doesn't pick up the change.

clojuregeek17:06:12

following along with O’Reilly’s Clojurescript tutorial and using mies template .. is “compile_cljsc” old? its not in my scripts directory

hlship17:06:40

@noisesmith: I'll look at the secretary api.

dnolen17:06:19

@clojuregeek: sorry yeah I don’t actually have time to keep up with all my various OSS projects. compile_cljsc is really not necessary anymore, AOTed ClojureScript JAR is available

dnolen17:06:35

@clojuregeek: have you looked at the Quick Start?

noisesmith17:06:06

hlship: are you using secretary already?

clojuregeek17:06:33

@dnolen: in the past I have looked at it. I just got the videos so I was wanting to follow along.. so meis is not best to use?

hlship17:06:51

yes, it was part of the template from "lein new reagent". Just looking for a function that says "redispatch the current URL".

noisesmith17:06:48

hlship: what I did was (secretary/dispatch! (get-myurl)) where get-my-url is custom to my project (since this is a SPA and we dispatch only on fragment, and the main part of the URI never changes)

ul17:06:50

@hlship: ah, i see, i believe that problem is with storing component fn in db

ul17:06:14

i propose you to store key only and write current-page component as multimethod

ul17:06:39

or dispatch it in another way

dnolen17:06:51

@clojuregeek: mies just out of date now. But you should be able to proceed without compile_cljsc. compile_cljsc was just an optimization thing so the project would compile faster.

dnolen17:06:06

@clojuregeek: do you have a link to the ClojureScript video you’re talking about?

dnolen17:06:55

@clojuregeek: yeah ok I’m not familiar with those at all. Let me know how it goes, you should be able to work around the changes to mies.

hlship17:06:01

@noisesmith: This is what I've come up with, replacing some of the template code, and it seems to work:

;; Should not be defined until all routes are defined.
(defonce history
         (doto (History.)
           (events/listen
             EventType/NAVIGATE
             (fn [event]
               (secretary/dispatch! (.-token event))))
           (.setEnabled true)))


;; (re-)initialize app
;; This is called on after each JavaScript reload (via Figswheel).
;; see fan.merchant-portal.dev
(defn mount-root []
  (reagent/render [current-page-view] (.getElementById js/document "app"))
  ;; This is only really needed on a reload of the page, it forces a new dispatch
  ;; based on the URI. This may become a problem if we start doing any other kind
  ;; of initialization on page transition, but will do for now.
  (secretary/dispatch! (.getToken history)))

noisesmith17:06:37

oh yeah, using history, that's smart

noisesmith17:06:41

I complected things by looking up the thing my secretary router uses manually, I should probably switch to using history itself too

hlship17:06:22

But see my note, I'm thinking that a multimethod approach may work better ... if that'll work well with reagent.

noisesmith18:06:34

hlship: in my app it's a strong rule that all state specific to a page must be invoked by secretary - because bookmarking breaks otherwise

noisesmith18:06:53

hlship: so invoking secretary is actually the way to force things to stay sane

noisesmith18:06:21

if bookmarking isn't a priority, you do need to look out for other future gotchas, of course

hlship18:06:58

What I'm concerned about is this likely scenario. A defroute changes the page AND does some other initialization of the app-db, say setting a property to a default value, maybe something like a search filter. As a developer you work with the page for a bit, and change that property. You then change some code and the browser refreshes ... but the defroute resets that value back to default on you. Not the end of the world, but frustrating.

noisesmith18:06:36

hlship: yeah, this fits into what I was saying about bookmarkability - anything which would be a pain in the ass to recreate state wise should be reproducible from the uri

hlship18:06:43

Maybe it'll all work out, as there will be one route/URI for initalizing the page, but as I manipulate the property, that will be a different URI.

noisesmith18:06:53

or that's my idealistic vision at the early stage of this app at least simple_smile

borkdude18:06:15

@noisesmith: I've done it like that too. More or less rest api-ish urls on the client

noisesmith18:06:06

borkdude: right, except everything is in the fragment (after the #) so no page-loads are implied by "navigation"

borkdude18:06:38

@noisesmith: right, I use # too, but mostly because I haven't yet explored what you can do with pushstate. I don't use server side rendering either.

borkdude18:06:57

yet... maybe someday I will have to

noisesmith18:06:30

my first instinct would be to treat server side rendering like a form of cache / optimization

micha18:06:39

pushState is a travesty of a hack of a kluge

noisesmith18:06:57

eg. it shouldn't force anything else to change behavior, even if it has to get a little messy in its own logic

borkdude18:06:57

also I need to support IE9

micha18:06:05

chipf0rk: it defeats the HTTP model: the path refers to a document, not to arguments passed to a cgi script or whatever

micha18:06:19

so pushState complecting the two breaks many things

micha18:06:23

like caching for instance

micha18:06:33

what should caching proxies do with those URIs?

micha18:06:58

but also it makes the whole application way more complicated

chipf0rk18:06:02

but it works great if you have the server rendering the same thing (what people call isomorphic), right

chipf0rk18:06:06

no caching issues there

micha18:06:17

caching proxies for instance

micha18:06:25

which are a core internet thing really

micha18:06:51

imagine you don't own the cache

micha18:06:57

or you want to separate concerns

micha18:06:06

i.e. separate caching from your application logic

micha18:06:34

in general it ends up entangling otherwise orthogonal concerns in many places

micha18:06:48

also deployment goes from super simple to complex

micha18:06:03

i deploy hoplon frontends as static html/js in a cdn

micha18:06:12

if i used pushState i couldn't do that

noisesmith18:06:25

I think pushState is powerful enough for bad designs to do stupid things. So many ways to make reload, or bookmarking, or the back button break.

micha18:06:42

i have never seen pushState not be retarded

micha18:06:17

if you show me an application using it, i'm pretty confident that i could remove swathes of code by switching it to use uri fragments instead

micha18:06:31

especially around deployment

chipf0rk18:06:39

I see what you're saying, makes sense

chipf0rk18:06:10

never really thought about it. mostly just went with hashbang for compat

micha18:06:06

i treat hoplon frontends like JARs

micha18:06:34

the url of the single page app (like http://foo.com/index.html or whatever), that's like the maven coordinates of a JAR

micha18:06:46

the browser downloads that and runs it

micha18:06:00

the uri fragment is like command line options to the JAR

micha18:06:20

it wouldn't make sense to deploy a JAR to maven for every permutation of comand line arguments

micha18:06:34

or to hack the maven resolver to do it synthetically

micha18:06:47

this is basically what pushState does, as i see it

noisesmith18:06:40

right, it breaks some very reasonable expectations about what in the url bar represents a document from the server, and what represents reloadable js state

chipf0rk18:06:33

a big problem arises though if you just use hashbang for everything. i'm unsure about what combination works best here, for a SPA

chipf0rk19:06:19

in my idealistic opinion, what the hashbang describes should only be like a component's localState in React. that implies a lot of isomorphic capability that I myself haven't been building into my applications, but that's how it should be, right?

borkdude19:06:19

@chipf0rk: what problem arises?

chipf0rk19:06:45

you're not describing anything at all with your path, because it's empty. you put the entire rendering, fetching data etc. on the shoulders of the browser and js, right?

chipf0rk19:06:25

you're always initially just sending a request that says "hey, give me a description of the entire application" (the js code) and the server hands to you a bare skeleton that the browser has to fetch the data for and fill up all by itself. i'm not sure if anything else is possible with hashbangs because they're not part of the request at all, technically

borkdude19:06:06

"you're not describing anything at all with your path, because it's empty." can you explain that? I don't get it

chipf0rk19:06:47

the path that you're requesting from the server is just / here

chipf0rk19:06:07

that also makes it completely uncacheable and uncrawlable

borkdude19:06:22

true, that's why you would have to use pushstate I guess

chipf0rk19:06:24

i think google had some technique that it required you using to make it crawl your spas anyways

chipf0rk19:06:39

i'm not sure what it was and iirc it felt icky

borkdude19:06:57

but currently the SPAs I have been creating don't have to be crawlable luckily

chipf0rk19:06:38

well sure, but you just got lucky then :)

borkdude19:06:08

I have been thinking about a public site as a hobby project though and I'm divided between multipage or SPA.

chipf0rk19:06:41

@micha: what do you do specifically to prevent this? i haven't looked into hoplon so I didn't really understand your description

micha19:06:04

chipf0rk: i never do serverside rendering of html for a SPA, except for the ajax crawling stuff, which is sent in the query string

micha19:06:23

chipf0rk: my frontend is static html and js

micha19:06:49

the backend is just an RPC thing communicating with the frontend via JSON (cljsjs, transit, whatever)

micha19:06:04

so i put the frontend on a CDN and that's it

micha19:06:35

i don't see much use for serverside rendering for a SPA

micha19:06:53

by definition it's a single page, right? simple_smile

chipf0rk19:06:56

well it's a technique, it's not an all-encompassing paradigm. i think being able to pre-render most things on the server is great

micha19:06:06

chipf0rk: search engines render js now, and for years now they've supported crawling single page apps

micha19:06:33

my pre-rendering happens at compile time

micha19:06:40

with hoplon apps anyway

micha19:06:58

serverside rendering can only complicate this for me

micha19:06:51

i have a ring middleware i use on the server that can render the escaped_fragment ajax crawling stuff in phantomjs or htmlunit

micha19:06:03

it's pretty simple really

micha19:06:25

the middleware will work with any app, it's completely orthogonal

borkdude19:06:43

interesting, didn't know about the #!

chipf0rk19:06:44

sounds good, but now you've only fixed crawling, right

chipf0rk19:06:02

any actual user still has to fetch only /

micha19:06:21

yeah it makes no sense to want to support luddites who turn off JS in your single page app

micha19:06:32

that's the whole point of SPAs

micha19:06:44

to let the client have an application that runs locally

micha19:06:24

instead of the multi-page app which is essentially a dumb terminal approach

micha19:06:36

talking to a mainframe that sends the display and reads input

chipf0rk19:06:52

it's not about people that disabled JS, i don't know of anyone who actually does that

chipf0rk19:06:55

it's about load times

chipf0rk19:06:05

js + multiple requests to fetch data is just slow

chipf0rk19:06:29

initial load time and rendering is a big part of ux

micha19:06:36

depends what you're doing

chipf0rk19:06:47

yes but there's enough cases where it is indeed slow

micha19:06:51

applications are not that critical

micha19:06:58

brochures are

micha19:06:18

so if you want a CMS for example, you can use any number of things, like wordpress or whatever

micha19:06:32

those will do tons of things to make the first page load fast

micha19:06:44

but complex applications aren't so concerned with load time

micha19:06:47

gmail for example

micha19:06:50

your bank

borkdude19:06:05

or crawling for that matter simple_smile

micha19:06:16

borkdude: you can cache that content

micha19:06:37

crawling won't be fetching things that can't be cached

micha19:06:45

because the crawler won't be logging in

micha19:06:02

so your phantomjs layer could have a cache you warm up

chipf0rk19:06:11

you're saying that SPA == complex application. it's by now a technique for many websites that i wouldn't really consider "applications"

micha19:06:11

it can read your sitemap even simple_smile

micha19:06:27

chipf0rk: most of those can be done in wordpress just fine

micha19:06:30

and move on with life

micha19:06:43

there are tons of guys who specialize in that kind of thing

micha19:06:05

or jekyll of any of the static site generators

micha19:06:21

the work i do always inevitable ends up being divided into three logical parts: brochure, client, and admin

micha19:06:32

usually three completely separate things, even

chipf0rk19:06:33

that's a false dichotomy, you don't have to have either a) a web project that works great as static content without the benefits of SPAs and b) one that only works as a sort of glorified REST client

chipf0rk19:06:55

why not enjoy both?

chipf0rk19:06:14

btw this should have gone in #C03RZGPG3 a long time ago - I'm sorry :)

micha19:06:17

i dunno, the sacrifices you need to make to support serverside rendering like php does it completely destroys the elegance of the SPA

micha19:06:34

and there are way better ways to accomplish it, i think

micha19:06:43

if i need a brochure site for a real business i can just hire someone to knock out a jekyll site

cfleming20:06:14

@borkdude: Hey! Long time simple_smile

rauh20:06:06

so will om.next be... (a) more powerful (b) much simpler (c) both?

dnolen21:06:15

@rauh: hopefully both

rauh21:06:51

Ok, if you're ever in doubt which way to go: choose (b) please simple_smile

borkdude21:06:37

@rauh do you mean simple or easy? 😜

rauh21:06:46

@borkdude: Not sure, whatever fulfills "I read through it and understand it. I read code that uses it and understand it"

borkdude21:06:37

@rauh: familiarity/easiness vs simplicity, different things, watch the video simple_smile

borkdude21:06:00

@rauh: but I know what you mean. I tried Reagent after Om and found it easier to use and also read the code.

rauh21:06:55

@borkdude: yeah that was kind of my point (reg reagent) but I really want to switch to OM the more I think about it.

borkdude21:06:51

@rauh: yeah, I'm curious about Om.next. Will def. check it out

borkdude21:06:14

it's the same thing with leiningen vs boot maybe: leiningen is easier to set up and things work out of the box, but the more I think about boot, the more it makes sense to me simple_smile

borkdude21:06:36

sorry, totally off topic

rauh21:06:53

I dont think boot vs lein is offtopic here. But I had a terrible first experience with boot+cljs a few months ago so I wont give it another look for a year or so.

mystery21:06:34

I recently tried boot+cljs and it was not fun. I picked some template someone suggested to me that was for "developing cljs apps" and it was just a mess. Couldn't get macros to compile, I needed to restart boot whenever I changed. Spent forever reading boot source code trying to figure stuff out. Finally gave up and went back to figwheel.

borkdude21:06:28

I had some problems too setting it up, but when I returned to leiningen and found myself doing a lein clean while in the other window lein cljsbuild was running... I was enlightened.

dnolen21:06:58

@rauh: well Om is not going to become more like Reagent that’s for sure simple_smile

borkdude21:06:19

@dnolen: that wouldn't make sense, we already have Reagent

dnolen21:06:52

Om Next is as much about disseminating the ideas as it about the actual deliverable, same as early Om releases

rauh21:06:10

@dnolen: Yeah but /maybe/ you could provide some sugar namespace that makes it a /tiny/ bit more like it? 😉

dnolen21:06:20

@rauh: not going to do that

borkdude21:06:29

@rauh: have you tried sablono with Om?

borkdude21:06:11

@rauh: that makes it a lot nicer I think, but that's just taste

borkdude21:06:07

@rauh: did you also look at Rum?

borkdude21:06:25

haven't tried it myself, but it looks good

shaun-mahood21:06:12

@dnolen: My general assumption about Om Next from things you've said so far is that it's an extension of the Facebook React/Flux/Relay/GraphQL ideas - is that somewhat accurate?

rauh21:06:22

@borkdude: yeah I took a look but didn't consider it for some reason. My next goal is def. to do some major OM instead of reagent.

borkdude21:06:05

my major pain with om was that I had to think which level of the app-state I would give to the child components and restructure things all the time to make it fit - I guess that problem has been solved by ref-cursors

borkdude21:06:47

maybe I was just doing it wrong™

mystery21:06:00

I dunno, I feel like Om suffers from what a lot of Clojure libs suffer from, a lack of documentation? Or maybe it's there and it's well hidden? I think David does a better job than most library maintainers with cljs and om, but with both I still found a lot of resources that help me get started at the very bare minimum, but left me high and dry once I wanted to do something more involved? So I switched to reagent just because it's so basic I don't really even need to read anything to get it...

mystery21:06:27

I think it's more illustrative of how young our language and communities are, but, still.

dnolen21:06:40

@borkdude: yeah that problem is addressed simply by having the notion of a Store. So if DataScript makes more sense to you just use that.

dnolen21:06:05

@mystery: Om doesn’t tell you how to build apps if that’s what you mean.

dnolen21:06:16

Om isn’t a silver bullet by any means - brains have to be applied some where.

markstang21:06:30

I don’t know I use it...

borkdude21:06:56

@mystery: at least @dnolen aptly replies either in IRC or here - he always helped me when I was stuck, kudos for that.

dnolen21:06:15

Om Next provides more guidance for structure, but there are plenty of hard problems there are no good answers for

mystery21:06:44

Oh, no, I'm by no means disparaging Om. It's just got more going on.

jarofghosts21:06:06

it seemed like reagent had better docs for getting up and running

markstang21:06:20

I ended up skipping passing cursors around, just used ref-cursors for notifications when the data changes and it is time to redraw the component.

jarofghosts21:06:24

like tiny introduction to what it does, and a code example

dnolen21:06:31

@mystery: I wasn’t assuming you were. Just saying that Om just doesn’t care that much about how you go about building your app.

jarofghosts21:06:36

but i can see where Om might be more robust

dnolen21:06:49

I’ve used enough things to know the dangers of assuming you know what people want to build.

borkdude21:06:12

@dnolen: where can I read more about using a 'Store' instead of the app-state?

mystery21:06:18

Yeah, jar, I'm also speaking as a beginner in both + react.

dnolen21:06:22

@borkdude: nothing beyond the source

dnolen21:06:02

@mystery: right Om isn’t not necessarily a beginner friendly thing, but it’s kind of non-goal.

dnolen21:06:07

I made it for myself simple_smile

jarofghosts21:06:30

i came to all of it from basically no CLJS background, so i favored that which got me something quick. which is not to say that is the best, just throwing out my experience

borkdude21:06:13

I didn't use much clojurescript before I used Om or Reagent. I got sold on cljs by those libraries.

dnolen21:06:34

@jarofghosts: right, so I don’t know what to do about that. I wrote this after doing this stuff for 10 years. Sadly mass telepathy isn’t a thing yet 😄

jarofghosts21:06:35

i was working on a front-end for a clojure project and it just seemed natural to use cljs

jarofghosts21:06:57

@dnolen: yeah, definitely; i am not even attempting to say that it is a fault of any kind

borkdude21:06:13

in fact I have more experience now with cljs than native javascript, which is almost zero simple_smile

jarofghosts21:06:27

i am just trying to reason about what might make someone choose one over the other for X amount of time

jarofghosts21:06:55

i chose reagent because it was easiest to learn alongside literally everything else

jarofghosts21:06:14

which is not to say that i will continue to use it forever

jarofghosts21:06:32

or that i think it is inherently "better" or etc etc

jarofghosts21:06:53

honestly Om is what sparked my interest in CLJS

jarofghosts21:06:12

i just never had an opportunity to actually do anything in it

dnolen21:06:00

Reagent seems rocking to me. I hope that the Om Next ideas flow through all the other badass ClojureScript React bindings.

mystery21:06:05

Staying close to react was one of Om's goals, right?

dnolen21:06:14

If you’re using ClojureScript you’re already winning simple_smile

dnolen21:06:39

@mystery: yep, that’s not going to change either. In fact in the next version components are literally just React components with default methods. No reify indirection.

mystery21:06:03

Hm, I bet if I read the React docs, understanding Om would be a lot easier.

mystery21:06:08

Do the Om docs point people towards the React docs? That might help some people out (my dumb face didn't realize I should do that for a while despite having seen @dnolen talk about how Om was meant to be close to React in real life).

borkdude21:06:30

read about the lifecycle methods

shaun-mahood21:06:36

@dnolen: Have you looked at what has been going on with re-frame at all in Reagent? It's pretty awesome too but is missing the Relay-ish story that I'm hoping Om Next brings.

mystery21:06:12

😛 Yeah I think it was the lifecycle stuff that was the most intimidating so if I missed that page it might explain a lot

dnolen21:06:16

@shaun-mahood: I haven’t looked at re-frame, looks like app organization stuff which is out of scope.

shaun-mahood22:06:24

@dnolen: Yeah it's definitely app organization stuff. From what I can tell it's sort of at the same level that Flux works (but my understanding of Flux is only from reading and watching about it so could be very wrong).

mystery22:06:45

Oh wow this reframe stuff's cool

dnolen22:06:01

@shaun-mahood: yes don’t want to get in the way of stuff like this. I’ve heard people happily adopt re-frame approach with Om.

mfikes22:06:19

Fwiw wrt Om docs, @ericnormand has a course coming out soon on it :)

shaun-mahood22:06:14

Reframe is a really nice way to get started with Reagent, especially when you don't know much.

mystery22:06:30

That'll be cool.

shaun-mahood22:06:19

Between all the awesome stuff happening in the cljs compiler, figwheel, cursive, garden and the react bindings it's an amazing time to be learning all this stuff. It feels like every week someone is taking away another one of my long term gripes with software development.

razum2um22:06:55

@dnolen: strange, but new 0.0-3308 compiles ~2 times longer than 0.0-3264 and likes to recompile deep dependencies. is it known?

dnolen22:06:28

razum2um: there’s an outstanding ticket to improve that, you can also disable that behavior (which is of course less correct) with :recompile-dependents false

razum2um22:06:54

@dnolen: thanks for the flag

mikethompson22:06:16

@hlship to get going with re-frame ① look in the examples folder of the repo, particularly todomvc ② then perhaps use https://github.com/Day8/re-frame-template

hlship22:06:29

@mikethompson: I'm starting to get going; dealing with re-frame, re-com, forms right now. A little awkward because of assymmetry: how you get data out (a subscribe and/or action) is not much like how you put it back in (a dispatch event)

mikethompson22:06:49

@hlship: yep there is a "water cycle of data" flowing in a loop (think http://thumbnails-visually.netdna-ssl.com/water-cycle_521f29b8b6271_w1500.png) and that cycle has two distinct parts.

mikethompson22:06:52

And the two parts of the data flow have different "nature". Just as the two flows of the water cycle have different nature, despite being about water.

razum2um22:06:43

can I do something like (with-out-str (pprint data)) with cljs.pprint/pprint ?

shaun-mahood22:06:29

@mikethompson: Have you done any experiments with adding namespaces to re-frame? I'm finding that a lot of my dispatch methods are named things like <section>-<page>-<action>, which is really reminding me of the way I've gotten around in things like css and other non-namespaced languages

mikethompson22:06:12

Using namespaced keywords is fine

dnolen22:06:43

razum2um: if that’s something that works in Clojure should probably work in ClojureScript

razum2um22:06:09

@dnolen: but with-out-str is not implemented in cljs

dnolen22:06:34

@razum2um: it is implemented.

shaun-mahood22:06:36

@mikethompson: Well that solves it then, thanks.

razum2um23:06:56

@dnolen: sorry found under macroses

micha23:06:10

mikethompson: i like that diagram, nice!