Fork me on GitHub
#clojurescript
<
2018-05-27
>
mikethompson01:05:23

@jrbrodie77 (1) there's a channel called #re-frame (2) re-frame contains no macros, and doesn't use core.async.

ackerleytng09:05:35

I get this in emacs when i connect to my repl:

WARNING: CIDER's version (0.18.0-snapshot) does not match cider-nrepl's version (nil). Things will break!

ackerleytng09:05:39

how do i fix this?

ackerleytng09:05:32

i'm trying to get figwheel to work with cider, such that the repl i use in emacs is in the same state as the browser

ackerleytng09:05:48

:profiles
  {:dev
   {:dependencies [[binaryage/devtools "0.9.10"]
                   [figwheel-sidecar "0.5.16"]
                   [cider/piggieback "0.3.5"]
                   [org.clojure/tools.nrepl "0.2.13"]]
    :repl-options {:nrepl-middleware [cider.piggieback/wrap-cljs-repl]}
    :plugins      [[lein-figwheel "0.5.16"]]}
   :prod { }}

ackerleytng09:05:26

then cider-jack-in-clojurescript and it resolves correctly! When prompted for repl type, enter figwheel

clojer15:05:33

The shadow-cljs docs recommend using a standalone .jar and point to http://clojars.org but I don’t see any links to a .jar on http://clojars.org nor any instructions as to how to configure the use of it.

thheller19:05:03

sorry that part of the docs is a worded a bit confusingly. It refers to using https://clojars.org/thheller/shadow-cljs. so the typical [thheller/shadow-cljs "2.3.27"] is you are using lein. see https://shadow-cljs.github.io/docs/UsersGuide.html#_installation

johnj15:05:55

javascripters, what benefits do you see in clojurescript vs just using javascript and immutablejs ?

benzap17:05:20

You could argue that clojurescript is simpler, and followed more sensible decisions when the core libraries were developed. That could come off as a huge benefit.

benzap17:05:28

That's a hard question to answer without seeming opinionated. It's easier to just recommend you try out both, and decide on whichever you prefer. Do you want to use a language which treats immutability as a first-class feature? Or do you want to use a library that offers it as a tack-on third-party library, but also offers a much bigger community with far more resources?

johnj17:05:56

hard question indeed, and agree on using both for while

johnj17:05:26

@benzap an important point is that if you want to interop with the JS ecosystem, "immutability as a first-class feature" causes issues too, just as using immutablejs

orestis17:05:38

Any suggestions for a CLJS friendly wysiwyg editor?

benzap17:05:23

@lockdown- I agree, the interop can be difficult to manage, since you're forced into dealing with mutability again. Which.. based on your point is kind of ironic.

johnj17:05:38

@orestis that's a weird question

benzap17:05:39

The trick is to use libraries that wrap javascript libraries, similar to how clojure wraps java libraries

orestis17:05:30

Thanks, I’m not looking for an ide - I’m looking for a CLJS friendly rich text editor component to be used in a web page :)

johnj17:05:14

ah my bad 😉

johnj17:05:25

yes, wrappers are another story

orestis17:05:53

To clarify, I’m looking for suggestions for a CLJS friendly rich text editing component.

orestis17:05:36

I’ve seen a few contenders around the block, and I’m wondering if people might have experience integrating those in a CLJS app.

jrbrodie7722:05:14

@justinlee I suspected that, but if I take the reframe stuff out of my functions, they work just fine. A clarification: the problem is when go blocks contain functions right? (The <! Is in a child function, parent contains go?)

justinlee15:05:37

@jrbrodie77 if you make a function call in a go block and you want to wait for something inside that function, you have to declare another go block inside the function, which will return a channel that you can wait on in the outer go block. this is a pretty easy to do with collections. https://clojure.org/guides/core_async_go#_unsupported_constructs_and_other_limitations_in_go_blocks

justinlee15:05:03

i don’t know why re-frame would be messing with it. my guess is: re-frame expects a synchronous return wherever you’re doing this. i suspect that you’re supposed to fire off another event whenever you get a response