This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # bangalore-clj (2)
- # beginners (132)
- # boot (311)
- # cider (5)
- # cljs-dev (27)
- # cljsjs (2)
- # cljsrn (16)
- # clojure (76)
- # clojure-art (1)
- # clojure-france (8)
- # clojure-russia (35)
- # clojure-spain (3)
- # clojure-spec (2)
- # clojure-uk (11)
- # clojureindia (1)
- # clojurescript (98)
- # core-async (3)
- # css (9)
- # cursive (9)
- # datascript (7)
- # datomic (7)
- # emacs (30)
- # jobs (1)
- # lein-figwheel (7)
- # london-clojurians (1)
- # lumo (14)
- # off-topic (6)
- # om (1)
- # planck (3)
- # protorepl (1)
- # re-frame (27)
- # reagent (17)
- # spacemacs (10)
- # untangled (1)
- # yada (16)
@weavejester is this how it's supposed to be used: (cljfmt.core/reformat-form '(let [a 1 b 2] (+ a b)))
@pupeno typically you work off a string that’s formatted in some way already. cljfmt corrects any problems with the formatting.
I prototyped a virtual DOM for Three.js in cljs, not powerful enough but at least works https://www.youtube.com/watch?v=5NHYiW2Y-Jg
Can I extend-type for all seq data type, eg.
(extend-type ISeq SomeProtocol ...)
I tried, But not work.
`dev:cljs.user=> (doc ISeq) ------------------------- cljs.core/ISeq Protocol Protocol for collections to provide access to their items as sequences. `
I must be thinking of this wrong but isn't’ there a library for clojurescript that I could use something like (fake-routes ....)
Hi! I've encountered weird compiler behaviour with
:pseudo-names true. This code https://github.com/ul/carbon-snake/blob/master/src/carbon_snake/core.cljs#L130-L145 is transformed into that js https://gist.github.com/ul/fc23aee02cb5769f4c542be13ef32a16
Problem is that this var https://gist.github.com/ul/fc23aee02cb5769f4c542be13ef32a16#file-core-js-L68 always stays null because
$temp__6753__auto__$jscomp$57$$ is undefined.
In development mode and
:advanced compilation everything works perfectly. Code becomes broken when
:pseudo-names true is enabled.
(defprotocol Yo (yo [x])) (extend-protocol Yo IMeta (yo [x] "IMeta yo")) (yo ) ;=> Boom!
yes I know this is a protocol, but I'm wondering why it doesn't make sense to extend a protocol to another
I should use multimethods for thing like that and use prefer function to resolve dispatch ambiguity
@weavejester: ah, ok. In my case, I need to run some code and display it too, so, I just have the code.
@emccue are you still trying to achieve all the URLs working? I think I have the solution.
I created a library called Free Form to make forms with Reagent and Re-frame and to play with it and display it's capabilities, I created a project called Free Form Examples: https://github.com/pupeno/free-form-examples
It started out of a re-frame template but I normally modify them quite a bit (I like grouping subscriptions, events, functions, views etc by component not by type).
But, if you look at the Clojure side, instead of the single empty file, it has this: https://github.com/pupeno/free-form-examples/blob/master/src/clj/free_form_examples/core.clj
This is what creates the ring handler I mentioned yesterday: https://github.com/pupeno/free-form-examples/blob/master/src/clj/free_form_examples/core.clj#L12-L17
And this bit you can ignore because it's just to serve the app in production, when I deploy to Heroku: https://github.com/pupeno/free-form-examples/blob/master/src/clj/free_form_examples/core.clj#L19-L21
Then I tell figwheel to use that handler: https://github.com/pupeno/free-form-examples/blob/master/project.clj#L40
Feel free to check out the app and run it. It doesn't require any database or anything like that, so, it should be very straightforward and you can play with it and see whether it behaves the way you want.
@rauh I managed to fix the styling issues. I used System Properties instead of an atom.
what is a nice way to write this function in clojurescript? (R is ramda.js)
const touches = R.curry((node, link) => link.source == node || link.target == node )
@lambdacoder It is just a warning, you can still use it, and the next version of boot-reload will fix this.
boot-reload injects its init ns and detects changes correctly, but they arent pushed to the browser - the warning is
Okay, snapshot should now be deployed. If you can confirm it works, I'll do a release right away.
Perhaps a local cache issue, should be available in repo: http://repo.clojars.org/adzerk/boot-reload/0.5.1-SNAPSHOT/
well even after completely erasing ~/.m2 the jar is still not found, ill install manually
mvn won’t install the jar either: mvn install:install-file -Dfile=boot-reload-0.5.1-20170205.160151-1.jar -Dpomfile=boot-reload-0.5.1-20170205.160151-1.pom Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install-file (default-cli) on project standalone-pom: The artifact information is incomplete or not valid:
Odd. I removed the version from my ~/.m2 and it got successfully downloaded from Clojars.
and now it seems solved magically heh, rerunning my boot dev task downloaded it
I ran into this issue when using the reloaded workflow with tools.namespace and using cljc files: http://dev.clojure.org/jira/browse/TNS-45?focusedCommentId=44148. I’m looking for opinions on how to support the reloaded workflow, cljc files, and serving resources from the classpath for uberjars. I’m currently favoring serving from the filesystem during development to avoid classpath issues with tools.namespace, and using a different handler in production to serve resources from the classpath.
Yeah. For toy projects I appreciate having everything self contained in a single jar. Compiling cljs output to resources/public is also the default configuration in most cljs app templates I’ve seen.
there is a function that lets you control which directories are reloaded ..
set-refresh-dirs! or something like that
Yeah, I’ve had some success with that. I think an
exclude-refresh-dirs! is closer to what is needed since you know where the compiled output is going but often want other resources to be refreshed.
and add the directory your output goes to, this way it won't be on the classpath but still in the uberjar