Fork me on GitHub
#re-frame
<
2017-02-01
>
hkjels09:02:26

When doing an advanced build, my namespace is said to be not defined I’m using the official re-frame template without any changes to the project.clj other than adding dependencies and using a checkout

hkjels09:02:52

What’s the usual suspect in such a case?

danielcompton10:02:08

Can you give the full error message?

danielcompton10:02:38

Does the app build from the template before you've started changing things?

hkjels10:02:40

I thought it compiled successfully, but when I scroll back in the history, I see : ERROR - Duplicate extern input

hkjels10:02:11

WARNING: uuid? already refers to: cljs.core/uuid? being replaced by: cognitect.transit/uuid? at line 342 /Users/Henrik/Projects/www/no/bdo/heartbeat/target/cljsbuild-compiler-1/cognitect/transit.cljs
feb 01, 2017 11:34:52 AM com.google.javascript.jscomp.LoggerErrorManager println
SEVERE: ERROR - Duplicate extern input: file:/Users/Henrik/.m2/repository/cljsjs/react-with-addons/15.4.0-0/react-with-addons-15.4.0-0.jar!/cljsjs/react/common/react.ext.js

feb 01, 2017 11:34:52 AM com.google.javascript.jscomp.LoggerErrorManager printSummary
WARNING: 1 error(s), 0 warning(s)
ERROR: JSC_DUPLICATE_EXTERN_INPUT. Duplicate extern input: file:/Users/Henrik/.m2/repository/cljsjs/react-with-addons/15.4.0-0/react-with-addons-15.4.0-0.jar!/cljsjs/react/common/react.ext.js at (unknown source) line (unknown line) : (unknown column)

hkjels10:02:15

That’s the entire error

hkjels10:02:59

Seems the problem was reanimated

hkjels10:02:29

Atm I’m not using it, so it’s OK for now

hkjels10:02:37

Thanks for the 🦆

akiroz12:02:07

is that a reference to rubber duck debugging? 😂

jiri.knesl15:02:47

I am newbie in re-frame. How is it with re-frame and JS components. Do I have to wrap them somehow?

heeton16:02:20

@jiri.knesl What JS components are you talking about?

jiri.knesl16:02:26

@heeton this is generic question. It can be datepicker http://www.material-ui.com/#/components/date-picker or anything else I find online

heeton16:02:35

So, react components? Or do you mean interacting with JS code in general

heeton16:02:49

And is your question about re-frame in particular, or clojurescript in general?

heeton16:02:02

If you mean React components specifically, you can look at how to mix those into your reagent components.

jiri.knesl16:02:15

with re-frame

manutter5117:02:08

I like the re-frame architecture so much, I’m tempted to try and use it on the JVM side. Am I nuts? Anybody using re-frame for significant server-side stuff on the JVM?

manutter5117:02:04

I’m just looking at all the cljc files and wondering if that mean’s it’s doable

lwhorton17:02:40

I suppose it would depend on the requirements of the system

lwhorton17:02:20

re-frame is loosely related to a CQRS/event-sourcing architecture, which makes some domains wonderfully clear … but it certainly has its costs

lwhorton17:02:08

One of my biggest struggles using re-frame to build interfaces is how to coordinate large chains of events … user clicks button - something should be fetched, if the fetch is successful notify another component so it too can go fetch something, or run another process … perhaps interpolated across 2/3/4 cross-cutting components

lwhorton17:02:42

In a UI I don’t find the issue very frequent, but it’s certainly a demand that comes up often in backend data processing domains

mokr17:02:26

I seem to remember using a library for live state inspection. Seen as an overlay in the browser where you could drill down into the state atom. Does it ring a bell for anyone?

mokr17:02:02

Found the answer to my own question: re-frisk (https://github.com/flexsurfer/re-frisk)

kauko18:02:31

@manutter51 I guess it depends on what you want to do server-side. One thing that came to my mind is that re-frame, and all libraries like it, are really all about having all your client's state in one place. What is the state on the server?

manutter5118:02:05

In theory, the db, as in mysql, for example

manutter5118:02:50

or maybe a session

manutter5118:02:44

The thing that appeals most to me, in the server context, is the idea of breaking response handling into events and event handlers

manutter5118:02:52

Eh, the more I think about it, the more I think it might be better to have a re-frame-like architecture built from the ground up for server-side stuff

manutter5118:02:57

assuming that’s even a good idea

kauko18:02:51

Do you know what CQRS is?

heeton18:02:13

How are others handling time in views? I don’t really want to be updating my DB with the time a few times each second, but I’m not sure how else to hook into the changing value.

heeton18:02:31

Javascript time functions change every milisecond, so that’s a bit extreme too.

manutter5118:02:11

@kauko I’ve got a “looked up the acronym” level understanding of CQRS, I like what I’ve seen of it so far

manutter5118:02:36

trying to remember the name of the talk I saw at Abstractions

kauko18:02:16

Yeah. The reason I brought it up is because it sounds like re-frame's architecture is inspiring you, and you're sort of coming up with the idea of CQRS on your own, you know?

manutter5118:02:32

Wouldn’t be the first time 😉

manutter5118:02:10

Bobby Calderwood’s talk on Commander, using Kafka and Clojure and CQRS

manutter5118:02:47

I’ve been doing too much front end stuff lately, forgetting what I used to know about server-side.

kauko18:02:43

I'm looking at re-frame code and trying to see how you'd apply it on the server-side.. REST-endpoints dispatch events (Commands) or expose data they're subscribed to (Queries).. then you'd have your event handlers for changing your state (database)?

kauko18:02:31

Maybe I just lack vision but I don't see the value. At least if you have a stateless api

manutter5118:02:10

Yeah something like that. Probably you’re not seeing any value because there isn’t any. I was just looking at sources for re-frame and reagent, and the clj/cljc files prompted me to wonder what if

manutter5118:02:39

Thanks for reminding me about CQRS though, I think that’s really what I’m looking for here.

nidu19:02:22

Hello. I suppose that's a nice place for re-com questions. Have anyone used simple buttons with hiccup labels (add icon e.g.)? Did you encounter issue when button stops respond to on-click?

nrako19:02:01

@nidu could you post a snippet of what the hiccup looks like?

nidu20:02:44

@nrako oh. When i started to make a simple standalone example i found that it works just fine. After all problem was in my code. Thanks for this and sorry for bothering!