This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-06-06
Channels
- # aleph (15)
- # beginners (40)
- # boot (14)
- # cider (90)
- # cljs-dev (132)
- # cljsrn (25)
- # clojars (7)
- # clojure (188)
- # clojure-chicago (4)
- # clojure-dusseldorf (1)
- # clojure-greece (9)
- # clojure-italy (43)
- # clojure-russia (16)
- # clojure-sg (7)
- # clojure-spec (39)
- # clojure-uk (81)
- # clojurescript (170)
- # component (5)
- # core-async (7)
- # cursive (49)
- # data-science (65)
- # datascript (3)
- # datomic (27)
- # graphql (3)
- # hoplon (4)
- # instaparse (56)
- # klipse (129)
- # leiningen (1)
- # lumo (28)
- # off-topic (4)
- # om (15)
- # onyx (54)
- # overtone (7)
- # pedestal (7)
- # re-frame (9)
- # reagent (72)
- # ring (33)
- # ring-swagger (2)
- # spacemacs (1)
- # untangled (19)
- # vim (2)
- # yada (12)
I want to add cljs-time to my klipse blog … is this supported? [https://github.com/andrewmcveigh/cljs-time]
You need to try
I have seen the blog post http://blog.klipse.tech/klipse/2016/10/16/klipse-is-fast.html
It’s not explained here
You need to have a klipse snippet with data-external-libs=
And the content of the snippet will something like : require '[cljs-time.core :as t]
data-external-libs is like the classpath
it tells klipse where to resolve the namespaces
it might be a better idea
I’d appreciate if you could improve the instructions for using external libs
it confuses a lot of people
Awesome:metal:
#error {:message “No such namespace: cljs-time.core, could not locate cljs_time/core.cljs, cljs_time/core.cljc, or Closure namespace \“cljs-time.core\“”, :data {:tag :cljs/analysis-error}}
sorry, I made a mistake in the data-external-libs
It has to be: data-external-libs=
Notice the src
at the end
what error do you see now?
#error {:message “No such namespace: cljs-time.core, could not locate cljs_time/core.cljs, cljs_time/core.cljc, or Closure namespace \“cljs-time.core\“”, :data {:tag :cljs/analysis-error}}
It shouldn’t make a difference
Let me try
What’s the topic of your presentation?
for example I make a macro called joke that can be called with a story and a punchline
I'm screenshoting that
The four sentences, out of context it's hilarious
It was last year's EuroClojure where you did a clojure jokes "unsession" or something, right?
Cool, I'll probably book my ticket and flight sometime this week, when are the unsessions?
Perfect, I was disappointed not to go to EuroClojure last year, hopefully I'll see your unsession this year.
@raymcdermott I think I found the issue
Could you try
(require 'goog.i18n.DateTimeSymbols
'[cljs-time.core :as t])
#error {:message “Could not eval my.klipse”, :data {:tag :cljs/analysis-error}, :cause #error {:message “Only :as alias, :refer (names) and :rename {from to} options supported in :require; offending spec: (quote goog.i18n.DateTimeSymbols) at line 1 “, :data {:file nil, :line 1, :column 1, :tag :cljs/analysis-error}}}
can you show me the page source?
#error {:message “Could not eval my.klipse”, :data {:tag :cljs/analysis-error}, :cause #error {:message “Only :refer-clojure, :require, :require-macros, :use, :use-macros, and :import libspecs supported. Got (require (quote goog.i18n.DateTimeSymbols) (quote [cljs-time.core :as t])) instead. at line 1 “, :data {:file nil, :line 1, :column 1, :tag :cljs/analysis-error}}}
That should work also
You cannot put (require)
inside a ns
You have to use :require
but without the quotes
Also it is better to put the require statement in a separate snippet
Then it is not re-evaluated when you modify your code
#error {:message “No such namespace: cljs-time.core, could not locate cljs_time/core.cljs, cljs_time/core.cljc, or Closure namespace \“cljs-time.core\“”, :data {:tag :cljs/analysis-error}}
also, you have a typo
It should be
<code class="clojure"
data-external-libs="https://raw.githubusercontent.com/andrewmcveigh/cljs-time/master/src/">
COOL!!!
When using macro, you have to do a special trick with the namespace
And be careful not to create more than 1 ns in your presentation
otherwise it’s going to be a big mess
And I have a surpris for you
While we were talking, I have added cljs-time to the analysis cache of Klipse
so can I put the ns/require in a snippet at the top and assume it’s going to be usable everywhere?
correct
Starting from Klipse version 7.1.1
you don’t need the data-external-libs
in order to use cljs-time
and it loads much faster
exactly
I mean “http://app.klipse.tech/plugin/js/klipse_plugin.js” is now 7.1.1?
You can check the browser console
to see what version you get
the snippet is not hidden at all!!
You need to create a css rule that hides element with class hidden
something like
.hidden {
visibility: hidden
}
It’s not part of klipse
is it form the gitbook?
that’s because gitbook has such a css rule
Probably, I need to make it clearer