This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-04-25
Channels
- # admin-announcements (5)
- # arachne (1)
- # beginners (29)
- # boot (36)
- # cider (110)
- # clara (1)
- # cljs-dev (3)
- # cljs-edn (14)
- # cljsrn (24)
- # clojure (63)
- # clojure-belgium (3)
- # clojure-dusseldorf (5)
- # clojure-greece (9)
- # clojure-russia (142)
- # clojure-sg (15)
- # clojure-uk (20)
- # clojurebridge (4)
- # clojurescript (58)
- # data-science (1)
- # datomic (37)
- # editors (2)
- # editors-rus (7)
- # emacs (1)
- # garden (31)
- # hoplon (3)
- # jobs-discuss (8)
- # keechma (86)
- # leiningen (1)
- # liberator (2)
- # mount (23)
- # off-topic (2)
- # om (18)
- # onyx (42)
- # planck (1)
- # quil (6)
- # re-frame (8)
- # reagent (3)
- # ring-swagger (1)
- # specter (4)
- # untangled (1)
I'm using cljsbuild for a min version. For that I'm using optimizations :advanced and there's a part if needs to talk to a global js/YT object from youtube. It renamed "YT.Player" to "YT.oe" or something and this returns as undefined.
@tom ah yeah, that is goog closure’s doing. it requires an externs file to know what not to rename
check out: https://github.com/clojure/clojurescript/wiki/Dependencies#using-externs
that page mentions cljsjs further down, it’s a curated list of js libraries that can be pulled in with their externs already provided
So I cannot include that as an extern to an actual file in my project since it just magically super dynamically appears
Or maybe I'm just not understanding how externs work https://github.com/clojure/clojurescript/wiki/Dependencies#using-externs
@tom: Extern can still be packaged as part of Cljsjs. Google-maps and google-platformjs are packaged this way also: https://github.com/cljsjs/packages/tree/master/google-maps
ClojureScript 1.8.51 released https://groups.google.com/d/msg/clojurescript/fR1PVRXtzCI/8ydOrUjzAAAJ
Failed to resolve version for fighwheel:lein-template:jar:RELEASE: Could not find metadata fighwheel:lein-template/maven-metadata.xml in local (/Users/jumar/.m2/repository)
(I’m just trying to follow the https://github.com/omcljs/om/wiki/Basic-Tutorial)
I'm occasionally looking for a fiddle/playground like thing to test out some functions or similar. Anyone know of such thing?
would still be nice to have something persistent fiddle-like for sharing
@martinklepsch: there is cljsfiddle, have you tried that? If you expand on the use case I can see to insert it in http://clojurescript.io
@richiardiandrea: I think cljsfiddle doesn't come with require
. Use case basically is being able to toy with /discuss/share code without needing a full blown env. Doesn't even have to be ClojureScript necessarily.
I like it! http://clojurescript.io is mature enough for this and really would require a websocket only for sharing what is happening
which code is evaluated and stuff
the ast is always available client side and diffs can be sent back and forth
@richiardiandrea: it actually seems to work already(?)
@martinklepsch: yes, but you cannot share sessions at the moment
ah, I see.
wondering if there's a way to integrate w/ all the existing fiddle things like jsfiddle, like you can use coffee-, typescript and others there
potentially you can, our focus has always been ClojureScript but at the end of the day the all transpile to JS
right. that last line was meant to mean integrate ClojureScript with these services.
cannot decide for others but it would be very cool indeed
I'll add a vote for ClojureScript integration and ask what can be done by us.
https://github.com/jsfiddle/jsfiddle-issues/issues/756 — trello board isn't actually editable
(defn navigation-menu []
{:content [{:text "Home"
:icon "fa-home"
:href "/"
:external false
:navigation-points [:dashboard]}
{:text "Forms Extra"
:icon "fa-edit"
:content [{:text "Potato"
:external false
:href "/test/ijsdfojisfosidjfosdjif"
:navigation-points [:potato]}
{:text "Some Other Link"
:external false
:href "/test/1223"
:navigation-points [:potato :other-link]}]}
{:text "Landing"
:href "/landing"
:navigation-points [:landing]}]})
Given the Map function above, I need to write a function to pull out all the nested navigation-points into a single vector.
For example, if a node has a :content array, I need to collect all the navigation-points from the :content children.Looks like a clojure.walk
usecase
If you want ClojureScript on JSFiddle, cast your votes: https://trello.com/c/xBuj9uBa/25-transpiler-language-clojurescript
We need 4 votes to get to the top of the list, we can do this! 😄
@martinklepsch: i think JSBin has CLJS integration
Not sure about save/sharing, but it should work
@anmonteiro: it doesn't have require
unfortunately
@richiardiandrea: is there some magic needed to make require work as in http://clojurescript.io?
no, it works
but depends on the namespace
the core should be provided
but I am using replumb: http://lambdax.io/blog/posts/2015-12-21-cljs-replumb-require.html
@dimiter: is this kind of what you want? Implementation seems a little odd…
(defn collect-nav-points [m]
(let [nav-points (transient [])]
(clojure.walk/postwalk
(fn [form]
(when (and (vector? form)
(= (first form) :navigation-points))
(doseq [point (second form)] (conj! nav-points point)))
form) m)
(distinct (persistent! nav-points))))
@dimiter: I just found there is clojure.walk/postwalk-demo, you might want to try it out
hey yall, anybody have recommendations for a clojurescript error logging service - something like yeller or airbrake?
Thanks. I think I understand the functionality of postwalk now. Definitely the perfect use-case for it.
@martinklepsch: For any bootstrap environment to support a require
REPL special, it needs to (a) implement it—`require` is not a core function. The implementer can choose to delegate to cljs.js/require
, or for higher fidelity and greater support for the various spec options, the implementor can choose to implement require
by evaluating an ns
form (b) The cljs.js/*load-fn*
must be implemented so that requested code can be loaded at require time. Additionally if you want to support import
of Closure, you typically need to (c) build an index in the implementation so that you can return the correct JavaScript source for any given Closure “namespace”, and (d) you typically need to obtain the Closure source to actually load—I bet that cat can be skinned in different ways, but one way is to have an auxiliary namespace at build time to cause all of the desired Closure things to be extracted out.
(Planck, Replete, Replumb, script/test-self-parity
, Titrate, they all do the above things… I suspect most of the other non-Replumb-based bootstrapped environments don’t do all of the 4 things above.)
Anyone have suggestions on CSS modules for Cljs? I’m assuming there’s got to be some way to make this work nicely with Garden?
@nonrecursive: I know a few people using sentry, works well enough
@martinklepsch: I hadn’t heard of that, thanks!