Fork me on GitHub
#clojurescript
<
2019-06-28
>
roti13:06:39

can figwheel be configured to reload clojure code? according to the documentation this should be possible, but I couldn't figure out how

darwin13:06:23

AFAIK, Figwheel supports reloading macros in clojure files which your affected cljs code depends on, not clojure in general, better ask in #figwheel

roti14:06:04

thanks, I will

kuzmin_m15:06:45

Hi! Why clojurescript var doesn’t implement alter-var-root?

roman01la15:06:01

ClojureScript doesn't have vars, only in repl

dnolen16:06:29

@kuzmin_m as has been said no vars - so there's nothing to implement

dnolen16:06:40

in general you should avoid var oriented programming

dnolen16:06:10

some things are possible via macros - but I would consider this a relatively advanced technique

kuzmin_m16:06:17

> in general you should avoid var oriented programming Can you explain why I shouldn’t?

johnj16:06:07

vars are mutable

kuzmin_m16:06:10

Atoms are mutable too

Mudge19:06:26

Hello, what do people use for animation with reagent?

Mudge19:06:36

Anybody tried using spring-react with reagent?

dnolen20:06:59

in Clojure it works because there are vars and a lot of design around them

dnolen20:06:40

in ClojureScript it really requires a an expert understanding of runtime vs. macro time and compiler details

dnolen20:06:11

@kuzmin_m i mean in ClojureScript

dnolen20:06:25

sorry out of order due to Slack problems

kuzmin_m20:06:51

@dnolen so why clojurescript doesn’t implement vars like clojure? Is it performance or closure compiler issues?

dnolen20:06:22

ClojureScript doesn't have a runtime, Clojure does

dnolen20:06:51

also by eliminating vars you eliminate dynamism which would thwart advanced optimization

dnolen20:06:11

Rich Hickey did this design work back in 2011 btw

dnolen20:06:25

and it's more or less set in stone for the above reasons

dnolen20:06:08

if you have questions about this - Rich Hickey's announce talk in 2011 might cover this

kuzmin_m20:06:30

Great. Thanks.

dnolen20:06:52

Rich Hickey's original notes are in the repository itself

dnolen20:06:06

most of these kinds of questions were answered then

fadrian23:06:51

Generic clojure question here. I have an array of maps. Each map has an attribute :id. I want to replace the array element having the :id "foo" with another map. Is there a simple way to do this in clojure/clojurescript?