Fork me on GitHub
#clojurescript
<
2015-06-30
>
mfikes10:06:23

@dnolen: Woke up to see Replete is the #1 top trending Swift GitHub repo. Go bootstrapped ClojureScript and thanks community! https://github.com/trending?l=swift

ok11:06:13

Hi, I'm using Om and trying to fetch some data from the server. I have a component that needs this data has no access to it. I tried to use ref-cursors but failed because I can't observe a path in the app-state that is not yet there. Did anyone have a similar problem?

ok11:06:09

I tried to do an om/update! with an empty hashmap right before om/observe but that doesn't work because the update is still in the queue when I call om/observe

pyr11:06:55

Hi all, I'm getting warmed up with the ideas around @dnolen's talk at EuroClojure and was wondering if anyone had been giving any thoughts wrt the update path for entities. @dnolen referred to it as a topic not adressed yet, is there a particular place to follow developments around this ?

tcrayford11:06:08

pyr: the relay team talked about this recently!

tcrayford11:06:50

the notes on that are extensive simple_smile

pyr12:06:12

@tcrayford: alright, much clearer. the formalism around optimistic mutation is really interesting

pyr12:06:40

and indeed, you'd see how om components could end up having mutate! functionality to perform these

tcrayford12:06:29

thanks to @dnolen for linking it in the first place 😄

thomas13:06:33

in case anyone is interested: I have just managed to run cljs on Node.js on a Linux PowerPC box using the IBM Node.js DSK for PowerPC.

pyr15:06:08

so according to the material in the above presentation, in addition to query-params and queries a component could end up having mutations

tcrayford15:06:34

yeah, that's what it'd seem like would eventually happen

pyr15:06:33

this does sound awesome

pyr15:06:57

except for the fact that building the query endpoint for non-datomic backed apps will be a bit painful simple_smile

tcrayford15:06:44

@pyr: it depends, I don't see it as being too painful in a lot of places

tcrayford15:06:58

(yeller for example, could implement this pretty easily, and it's just using riak on the backend)

pyr15:06:55

@tcrayford: agreed, and anyhow, it does end up being simpler than wrapping every entity access behind a REST entity

pyr15:06:50

scoping & authorization will be slightly more challenging I would assume

tcrayford15:06:33

yeah, but a nicer thing is that that whole thing gets more centralized

tcrayford15:06:50

becomes a pre-query "can the user actually make this query" thing or a post query "hide fields they aren't allowed to see"

samueldev16:06:26

Does Om map 1:1 with React

samueldev16:06:34

In terms of its featureset

samueldev16:06:53

E.G. is it as simple as "componentDidMount" in React --> (componentDidMount) in Om

teslanick16:06:06

Mostly yes. Om doesn't have mixin support (I don't think)

hmadelaine16:06:21

@samueldev: In Om you have access to all lifecycle functions you have in React

txus16:06:53

I think I might have found a bug

txus16:06:13

I have a very hairy function with many nested functions which shadow some of the fn locals

txus16:06:33

and I got a few errors like this one: ERROR - Parse error. Duplicate parameter name "params__$1"

txus16:06:22

by renaming the inner locals the error went away

txus16:06:26

trying to work on a minimal reproducible case

txus16:06:42

(actually just too embarrassed to share that function, which I wrote)

txus16:06:22

using [org.clojure/clojurescript "0.0-3297"]

dialelo17:06:56

is anybody attending React Europe this week? would be happy to meet fellow clojurians

dnolen17:06:47

@txus most likely the result of a bad macro in a library your are using, not a ClojureScript bug.

dnolen17:06:03

We never generate duped function parameter names

zmaril19:06:46

I've got a dumb question about the clojurescript build api. The following throws a parse error and returns back incorrect javascript: (cljs.build.api/build '((ns test.test) (+ 1 1)) {:optimizations :advanced}). I have no idea why or what I am doing wrong. It looks like anytime a var is defined with ns or def a parse error gets thrown? Very puzzled and unsure how to debug this.

zmaril19:06:20

Huh. It looks like this works if it isn't nested two levels deep.

zmaril19:06:32

Nope, nvm it just prints out preamble stuff no matter what you give it.

zmaril20:06:56

Figured it out (I hope). It looks like there is a difference between passing in '((ns test.test) (+ 1 1)) and '[(ns test.test) (+ 1 1)].

zmaril20:06:28

I can only guess at the reason, since both lists and vectors extend have the compilable protocol extended for them.

zmaril20:06:51

Probably a seq? somewhere that is doing something weird.

Pablo Fernandez22:06:30

I’m buying some books from The Pragmatic Bookshelf and PACKT. Any books I should buy that could help with building one page mobile friendly web apps?

Pablo Fernandez22:06:33

Is it worth reading a book on ReactJS?

nullptr22:06:23

i suspect reactjs wouldn't fill more than a chapter or two -- flux would probably be the more useful book, but not sure any exist

Pablo Fernandez23:06:00

What’s flux?

nullptr23:06:48

it's an architecture for building applications with react -- basically, it tries to fill in the gaps on how to do the "not rendering" stuff in an application with react -- https://github.com/facebook/flux

Pablo Fernandez23:06:33

Are Reagent and Om built on top of flux?

dnolen23:06:01

ClojureScript community is fast :)