Fork me on GitHub
#clojurescript
<
2017-01-26
>
grounded_sage07:01:04

Is anyone interested in working on a Styletron wrapper? Think with the latest news regarding cljs this would be a awesome to have.

caleb.macdonaldblack07:01:56

Hi I'm pretty new to clojure and I'm a little stuck atm. I'm following along with http://www.luminusweb.net/docs/clojurescript.md and I can't get figwheel to work.

caleb.macdonaldblack07:01:37

After creating the project I changed the text in core.cljs by adding an exclamation mark at the end of "welcome to <app>"

caleb.macdonaldblack07:01:34

My browser then appears to attempt to update but instead I get a warning and it doesn't update.

dominicm08:01:21

Wrong place for on-jsload

dominicm08:01:35

You want it in with your cljsbuild in your project.clj

caleb.macdonaldblack08:01:31

Also this is a fresh project. The only change I made was to the string i modified in core.cljs. Did I do something wrong when setting up the project?

ejelome08:01:32

^ try replacing :on-jsload "core/mount-components" with :figwheel true

ejelome08:01:57

then re-run figwheel

dominicm08:01:33

@ejelome the goal of the key is to specify how to mount on reload.

dominicm08:01:46

@caleb.macdonaldblack yes, although I do not use it as a string: :on-jsload too.core/mount I'm not sure if it makes a difference though, but it may. I think text should be preferred images btw, easier to read and pull subsets for tests.

caleb.macdonaldblack08:01:46

hmm. There isn't a mount function in my <app>.core namespace

caleb.macdonaldblack08:01:53

(ns deletable4.core)

(defn init! []
  (let [content (js/document.getElementById "app")]
    (while (.hasChildNodes content)
      (.removeChild content (.-lastChild content)))
    (.appendChild content (js/document.createTextNode "Welcome to deletable4"))))

dominicm09:01:05

@caleb.macdonaldblack change the line to on-js-load deletable4.core/init! it will work for you.

linuss09:01:44

Hey guys, I have a question on Datomic/DataScript/Om.Next. Would this be the right place to ask it?

dominicm09:01:22

@linuss You might get best results in #om or #om-next (not sure which is preferred)

linuss09:01:31

Thanks! 🙂

nothingdhsp09:01:31

Hi all I am so sorry for very dump question but I spent some hours with some instruction but still can not connect fireplace to figwheel (looking aroung with Piggieback as weel) Can anyone point me any example project which I can use I use vim and fireplace on Mac

dominicm09:01:32

@nothingdhsp I use fireplace & figwheel

akiroz09:01:42

^^ this I want to know too, it seemed way too complicated when I first set up my env so I gave up and have been using figwheel from another terminal

dominicm09:01:48

Important thing is to make sure you're using a recent figwheel.

dominicm09:01:12

Only the most recent figwheels support fireplace.

dominicm09:01:16

0.5.8+ iirc.

nothingdhsp09:01:46

oh I see. Do you have any project sample

dominicm09:01:46

https://github.com/markwoodhall/vim-figwheel this is rather helpful as a shortcut too.

dominicm09:01:15

@nothingdhsp In the past I've used chestnut (and bumped up the figwheel versions in that template).

nothingdhsp09:01:46

oh thank you for the vim-figwheel information

nothingdhsp09:01:53

I found the template project on that website as weel

caleb.macdonaldblack09:01:01

@dominicm @ejelome I installed a fresh luminous project with cljs and reframe. I had to add :nrepl-middleware [cemerick.piggieback/wrap-cljs-repl] to repl-options in project.clj. Now everything is working. Thanks for helping me out though 🙂

dominicm09:01:52

@akiroz @nothingdhsp you may be interested in #vim-fireplace btw

nothingdhsp10:01:04

@dominicm : have you ever got this error vim-figwheel requires the vim-fireplace plugin but it is not currently loaded or installed.

nothingdhsp10:01:21

I am very sure I have fireplace , which I always use for my clojure ( not script) development

dominicm10:01:26

@nothingdhsp No, but I imagine you don't have vim-fireplace / a recent fireplace.

dominicm10:01:29

Try updating.

ejelome10:01:46

It seems react team is doing a react re-write/implementation: https://github.com/acdlite/react-fiber-architecture/blob/master/README.md

Pablo Fernandez11:01:45

How do I make ClojureScript generate require("./shell/goog/bootstrap/nodejs.js"); instead of require(path.join(path.resolve("."),"shell","goog","bootstrap","nodejs.js"));?

ejelome11:01:45

oh, it's from the react team, nvm

ejelome11:01:15

afaik, (js/require "path")

ejelome11:01:10

yes, though not sure if it's the right answer

Pablo Fernandez11:01:37

Not really. I'm not manually requiring these files. The ClojureScript compiler it's generating those lines on its own.

ejelome11:01:35

ahhh, so it's the compiler, welp, no idea then, but it's the Closure compiler that does those stuff as far as I'm aware of

Pablo Fernandez11:01:56

No, I don't think it's Closure and I also don't think there's a way to do what I want:

Pablo Fernandez11:01:50

Can anybody think of a workaround?

dominicm11:01:23

@pupeno why do you want to?

Pablo Fernandez11:01:23

@dominicm because the full-path require doesn't work in an asar-packaged electron application.

Pablo Fernandez11:01:08

@dnolen I run into this issue: http://dev.clojure.org/jira/browse/CLJS-1444 and it's affecting me, so, I'd like to work on a solution. Is there any solution that would be acceptable?

bojel11:01:13

can someone please explain that clojure.spec behaviour?

bronsa11:01:35

s/form returns the symbol cljs.core/string?

bronsa11:01:49

cljs.core/string? evaluates to the string? function

bronsa11:01:01

you're comparing a function with its representation

bojel11:01:38

oh, ok I see:

(= 'cljs.core/string? (s/form :a/b))
=> true
thanks

dnolen13:01:28

@pupeno if you’d like to work on a patch go for it - but note the ticket has a lot of context - for non-dev, using a higher optimization setting works fine

Pablo Fernandez13:01:09

Yeah, I found out :simple works.

Pablo Fernandez13:01:42

I’m in the middle of something right now… I’ll be back in a couple of hours.

deas14:01:27

Two short questions 🙂

deas14:01:00

1.) What's the best replacement for lodash isEqual?

deas14:01:59

Looks like goog.object.equals is what I want. 🙂