This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-03-03
Channels
- # admin-announcements (2)
- # beginners (18)
- # boot (118)
- # cider (12)
- # cljs-dev (12)
- # cljsrn (24)
- # clojure (142)
- # clojure-art (4)
- # clojure-bangladesh (3)
- # clojure-ireland (1)
- # clojure-italy (7)
- # clojure-norway (4)
- # clojure-poland (207)
- # clojure-russia (101)
- # clojurescript (108)
- # clojurewerkz (2)
- # core-async (6)
- # css (8)
- # data-science (23)
- # datomic (31)
- # devcards (2)
- # emacs (8)
- # funcool (25)
- # hoplon (34)
- # immutant (78)
- # ldnclj (7)
- # lein-figwheel (4)
- # leiningen (6)
- # luminus (35)
- # off-topic (1)
- # om (119)
- # onyx (43)
- # parinfer (29)
- # proton (11)
- # re-frame (25)
- # remote-jobs (1)
- # slack-help (1)
- # spacemacs (3)
- # yada (10)
Hey everyone, good morning from us east coast.
Would anyone be interested in a version of a castra client that uses goog closure machinery instead of jquery?
sounds interesting, what's the advantage?
I’ve hacked together a version that I’ve been using successfully in pet project for a few weeks. It’s using goog Promise and goog ajax instead of the jquery
I really like the concept of castra, but I didn’t wasn’t using jquery. It was mostly just a challenge for myself to get it working with the goog closure that comes prepackaged with cljs
If anyone else wanted the ability to use castra without jquery, it might be useful.
I’m using it for my own stuff, but if anyone is interested, just wanted to share, I could put the (very hacky) code somewhere. It would take some work to get it so that you could switch between using jquery or google closure
seems like it could be useful to people, would you like to publish it under the hoplon group?
interested parties might be likelier to find it that way
ok, cool, sounds good, will do!
what is your github username? i can add you to the group and then you can create repositories
oh oops, I thought you meant the discourse hosting site, hehe, my bad
I went ahead and created a thread about it here:
oh cool, that works too
I'm very interested in goog closure library. I've been waiting for this for a long time. Thanks, @upgradingdave !
By the way, @alandipert and @micha, have you taken a look at my if-tpl
PR? I've been using it on a project and it's surviving the weird stuff I'm throwing at it, so I'm reasonably confident.
@levitanong: just looked at it now, looks good to me
i'll be working with micha later today, i'll bug him to take a look at it
:D thanks, man!
for switch-tpl
could that not be implemented in terms of if-tpl? as a macro atop it
e.g. (switch-tpl t :a foo :b bar)
== (if-tpl (cell= t :a) foo (if-tpl (cell= t :b) bar)
@alandipert: That’s true, but I am worried about the number of watches that would be active at that time. Given the number of switch-tpls that could exist at a time, and the number of clauses each one had, I figured it’d be prudent to implement it from scratch.
Do you think the performance won’t be an issue?
it's not until it is
i think in the vast majority of cases it will probably not be an issue
in any case it might be better to delay the effort until we identify a concret problem
I was actually modeling this after clojure.core’s cond
macro, which would short itself after a clause returned a non-nil. I quickly realized this couldn’t work so simply in hoplon because a value had to be watched—I would have to watch the results of every single one of the clauses, which would mean shorting is impossible. Now that you point out that it’s unlikely to be an issue, perhaps I should redirect my efforts towards implementing a cond-tpl
(this would be perfect used with if-tpl
), and then later making a switch-tpl
that would be a macro on top of cond-tpl
.
What do you think?
Anyway, it's 2:45 am here and I should turn in. :) let's discuss another time!
@alandipert: FYI, your advice helped a ton with getting my client and server to talk to each other. Everything seems to be working exactly how we want it to. Thanks!
great! no prob
does someone have an example of merging state in a custom element? what I am trying to do is merge some default state with class attribute state but I get No protocol method ICollection.-conj defined for type javelin.core/Cell