Fork me on GitHub
#clojurescript
<
2017-02-04
>
samueldev00:02:16

Is it a recent version of the compiler that fails on ES5 duplicate keys?

samueldev00:02:49

I'm using 1.9.456

Pablo Fernandez02:02:35

When using cljsjs/react-with-addons, should I also skip including react-dom? react-dom seems to depend on react.

qqq03:02:56

how do I install dirac? Is it just google -> chome web app store -> dirac -> install ?

richiardiandrea03:02:05

@qqq you need to enable remote debugging as well, it is in the doc

qqq03:02:05

@richiardiandrea : I'm on step 3 now, where I need to use nrepl-middleware dirac.nrepl/middleware

qqq03:02:13

unfortunately, I'm using boot, and the doc appears to all be lein

richiardiandrea03:02:28

if you use boot, check powerlaces/boot-cljs-devtools

qqq03:02:05

let me look into this

richiardiandrea03:02:39

you can safely try 0.1.3-SNAPSHOT which has one task for enabling cljs-devtool and one for enabling dirac

qqq03:02:30

reading the docs

qqq03:02:40

so 1.9.293 is newer than 1.9.89 ? since 1.9.89 is really 1.9.089 ?

richiardiandrea03:02:49

yeah it is newer

qqq06:02:58

what is the meaning of #js in

#js {:onClick (fn [e] ... )}

Oliver George07:02:44

@qqq that creates a js object

Oliver George08:02:37

"Clojurescript Interop" is a good search term to find out more

qqq08:02:41

ah, #js is short hand for :: clojure map -> js object ?

qqq08:02:32

@olivergeorge : that looks relaly helpful; thanks!

Aron12:02:45

so, what editor/setup would you suggest for those situations when you need to use ssh to edit files?

rauh12:02:44

@ashnur I've used sshfs before

beppu12:02:20

@ashnur I like sshfs also, because it works at the OS level, and it allows all the unix tool chain to be used on remote files. That's more useful than a solution that's specific to a single editor.

Aron13:02:24

yeah, sshfs is a really good answer, too bad i am on win10

mccraigmccraig13:02:50

@ashnur: tramp on emacs can (i haven't tried myself) use putty or openssh

Pablo Fernandez18:02:18

When I modify the implementation of layout/pages here https://github.com/dashmantech/reagent-toolbox-playground/blob/wip/src/cljs/reagent_toolbox_playground/components/autocomplete.cljs, the file gets reloaded, but the page doesn't get updated by figwheel. It looks like the version of the method being executed is the previous one.

emccue19:02:42

Is there a way to configure figwheel to handle refreshing the page properly

emccue19:02:09

Like if I am on /about, if I refresh the server doesn't send the correct files

jrheard19:02:58

@emccue - i don’t think we have enough information to understand that question, unless i’m missing something

jrheard19:02:07

what do you mean by “the server doesn’t send the correct files”?

Pablo Fernandez19:02:33

@emccue what does the server send?

emccue19:02:28

It 404s instead of sending index.html

emccue19:02:38

Which I want it to send on every route

Pablo Fernandez19:02:08

emccue: are you doing dispatching on the client? as in, is that an single page application?

emccue19:02:23

Yes, and this is just a dev time issue

Pablo Fernandez19:02:35

How does it work on production?

emccue19:02:58

Server with wildcard sends index.html

Pablo Fernandez19:02:05

My solution generally is to run the server locally as well, as in, I don't use figwheel to server index.html.

Pablo Fernandez19:02:28

It is convenient but it generates a way of working too different too production.

Pablo Fernandez19:02:37

Are you using ring?

emccue19:02:00

I'm using the re-frame template

emccue19:02:13

For production it is being served on node

Pablo Fernandez19:02:18

Ah... I just created a re-frame app.

emccue19:02:41

I'm not the one writing the backend

emccue19:02:51

So c'est la vie

Pablo Fernandez19:02:48

You can create a ring handler, maybe using compojure, that will server your app no matter what URL gets hit. Then, in figwheel, you can set :ring-handler.

Pablo Fernandez19:02:56

I don't know if figwheel has a shortcut for this.

emccue19:02:22

I'm also not sure how to create a ring handler, but thanks it's a start

Pablo Fernandez19:02:15

emccue are you familiar with ruby or python?

Pablo Fernandez19:02:10

Ring is like wsgi in Python.

Pablo Fernandez19:02:50

Compojure will help you create a ring handler, that is, a web app that responds to http requests.

Pablo Fernandez19:02:04

But yeah... figwheel could support this out of the box, so, it's probably worth it exploring it more.

Pablo Fernandez19:02:03

Also, there's a #re-frame channel here.

Pablo Fernandez22:02:19

Is there a function that would output Clojure code formatted? I need to display some code in a web site.

darwin22:02:10

worked pretty well for me ^

weavejester22:02:31

cljfmt reformats existing code to make it adhere to Clojure styling, while zprint formats code from scratch