This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-12-09
Channels
- # adventofcode (201)
- # bangalore-clj (5)
- # beginners (90)
- # cider (1)
- # cljs-dev (3)
- # cljsrn (28)
- # clojure (128)
- # clojure-argentina (1)
- # clojure-brasil (15)
- # clojure-dev (9)
- # clojure-greece (18)
- # clojure-italy (11)
- # clojure-madison (1)
- # clojure-poland (19)
- # clojure-russia (28)
- # clojure-spec (33)
- # clojure-uk (26)
- # clojurescript (20)
- # core-async (2)
- # cursive (1)
- # datomic (2)
- # emacs (4)
- # figwheel (3)
- # fulcro (15)
- # graphql (7)
- # hoplon (1)
- # lein-figwheel (2)
- # lumo (2)
- # numerical-computing (3)
- # off-topic (9)
- # re-frame (13)
- # ring (1)
- # shadow-cljs (1)
- # unrepl (1)
- # vim (17)
I'm trying to make a Grafana datasource plugin using CLJS, and am rather out of my depth with JS interop ...
As far as I can tell, that class will only be present in that relative location at runtime. So that's problem #1 ... problem #2 is how do I sacrifice the right chickens to make it appear as if I did "inherit" from that class?
you probably want proxy :)
I'll give that a go ... just wondering what will happen given the JS class I'm deriving from is dynamically loaded by Grafana at runtime …
@noisesmith am I missing something, or is proxy
not implemented in CLJS either?
@hagmonk you probably want reify
What makes the difference ? I am sorry if it’s a newbie question or it’s obvious. But I really wondering, why…
@scknkkrer Generally for those kinds of differences, ClojureScript is made to follow Clojure unless there is a really good reason not to. It would be odd for list?
to have different semantics.
@scknkkrer It looks like it has been this way for 5 years and revising that would be a breaking change.
@scknkkrer what is the type of that cons?
interesting, it is a cons....
wow, it's marked as a IList
@mfikes thanks. But it’s bothering me a lot. Maybe one day, If I work hard enough, I can save the library from this tricky parts.
But as mentioned, you probably want to use seq?
in almost all of these situations
Infact, in my 7 years of Clojure, I don't think I've used list?
in a way that wasn't a bug.
@tbaldridge I solve my problem well. Thank you. But I was feeling really disturbed because it looks like so basic-level and I am trying to figure out the whole big picture. But they explain it well at #clojure.