This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-10-12
Channels
- # admin-announcements (11)
- # alda (1)
- # boot (186)
- # cider (17)
- # clojure (96)
- # clojure-indonesia (1)
- # clojure-japan (1)
- # clojure-russia (2)
- # clojurescript (132)
- # core-async (1)
- # datomic (16)
- # devcards (9)
- # editors (2)
- # emacs (4)
- # funcool (2)
- # hoplon (125)
- # ldnclj (30)
- # leiningen (13)
- # off-topic (6)
- # onyx (2)
- # reagent (5)
- # spacemacs (21)
- # yada (3)
Hi. Elements with :style (e.g. :style "postion: relative; ") are not affected by :toggle cell
*position
@roberto i think the latest (possibly not yet in clojars) version of boot-reload has a figwheel style HUD in the browser
I’ve just started playing with hoplon. I like it much more than the other options in the cljs space, but I was missing figwheel. It felt like a step backward in that regards. But I am still going to stick with hoplon for now. I’m having lots of fun with it so far.
i've had an extra large drink of the hoplon kool-aid. I hadn't used figwheel before no nothing really to miss. I find that most of the things that i'm trying to track down in my hoplon development have to do with cells and it's super easy to just log the value of a cell to the console to watch what's happening
@andrewboltachev: weird - i am able to produce in chrome, but not reliably
yes, looks like race condition
@andrewboltachev: it looks like jquery toggle appends "display:none;" to the element's style attr... this version works more reliably for me
(defmethod do! :safe-toggle
[elem _ v]
(let [$ (js/jQuery elem)]
(if v
(.attr $ "style" (.data $ "saved-style"))
(do (.data $ "saved-style" (.attr $ "style"))
(.attr $ "style" "display:none;")))))
Ok, good. But I solved with nested div's
ah, easy fix
btw, do you guys like TypedClojure?
as type systems go it looks like a good one, but i'm not a fan in general
i.e., don't you think it would be possible to eliminate bugs?
for me seemed more like multiplying my program to 2
just in general, in my experience, type systems are more trouble than they're worth
different kinds of isolation and virtualization are more productive i think... like instead of avoiding bugs by using type system, run your generative test suite in a very realistic environment
thanks, that makes sense
btw, is there a way for a cell to track value of input etc?
you can make a history cell by adding a watch to a cell
unless having (input :change #(reset! ...)))
I mean for a cell to be always value of input
oh, yeah
(let [input-val (cell "")] (input :change #(reset! input-val @%) :value input-val))
the todo example on http://hoplon.io does this
thanks!
but, what @% is?
deref 1st arg?
% is a jQuery event object, that we have extended IDeref to
so that it returns the value of the element the event was fired on
'cause I'm doing... (.val (js/$ "#input"))
always have to have id
yeah, that's how we used to do it
the event deref way is preferred these days, because you dn't need to have IDs in your code
btw, what :value input-val would do?
isn't it redundant?
for the most part... but i wire it up because it makes it impossible for the input and cell values to diverge
for instance, if an event we're not handling happens on the object and changes the input value
so would :change be fired?
hm, that's true
i was thinking about the situation where someone gets the element we made and does (.attr (js/jQuery our-input-elem) "value" "foo")
or even (set! (.-value our-input-elem) "foo")
in those cases :change would not be fired, but also the cell value wouldn't change, and the wiring wouldn't matter
so, i suppose it's more of a style thing than a defensive programming thing
Is there a way to get better castra error messages back when doing an rpc call? I’m seeing a lot of {:message Server error., :data {:castra.core/exception true}}
which isn’t that helpful
the "server error" you see there is what is sent when an unknown (non-castra) exception is thrown
it's wrapped in a castra exception with the message "server error", because the exception that comes over the wire to the client should have a message that you can show to the user
where group-
et al are from https://github.com/adzerk-oss/cljs-console
ok it seems the stack trace is empty for uncaught language errors
alandipert: but wouldn't :value be changed (.attr (js/jQuery our-input-elem) "value" "foo") from value-cell to that "foo"?
and, in general, may be have two-way cell?
(let [value-cell (cell "")] (input :bind-to-value value-cell))
this would besides all set value to ""
and then watch for changes
@andrewboltachev: no, there aren't 2-way cells in general... cells are unidirectional
but the unidirection can be sidestepped by linking cells with watches instead of formulas
Yes, I know. But I think we might have them
or isn't that good idea?
for that use case, what way is better?
i am not sure about .attr
... because that call happens thruogh jQuery, it might trigger the :change
automatically
and all this behaviour might change with jQuery version changes 😄
true, fortunately jquery in general is extremely stable
might anyone be interested in hoplon contracting? we might need help with the new adzerk UI, which is all hoplon. remote/international totally cool
alandipert: sounds quite interesting
going to ask my boss if we can take this ('cause we're busy on projects)
i think we'd prefer to contract with individuals and not agencies, but we're open to either
@alandipert: I'm available if we can do <= 30 hrs/wk
@raywillig: awesome! and probably. i'll let you know when the idea moves ahead
I have 0 hoplon experience. I’m still learning. But if there is some small task that a beginner can tackle, I would be game too.
@roberto: cool i'll let you know when i have more info 😄
@micha: I can try the method @kirked suggested. I'll put it after the hard-link call in copy-with-lastmod. Anyplace else?
@micha I put the call (System/runFinalization) after all the (copy-with-lastmod ...) calls. No Dice. Same behavior. Also the runFinalization method is also just a suggestion.
@micha: What's interesting with or w/o the runFinalization method call inserted and changes to the source file are compiled as on unix.
@micha: It's only after the page is loaded in the browser (hence all the dep files in question) does the issue occur. So you load then make a change. boom can't delete.
you could try this guy instead https://github.com/tailrecursion/boot-jetty
This is the barebones address-book example. The lein new hoplon template didn't put any http in the build.boot.
Took all finalization, etc out. Still works. The issue was the default http server used seems to be holding on to the file handles.
java.io.FileNotFoundException: C:\Users\me\.boot\cache\tmp\somedir\dev\clj\address-book\5ek\-w8szar\index.html.js ( The requested operation cannot be performed on a file with a user-mapped section open) ... http://clojure.java.io/fn io.clj: 345 ... http://clojure.java.io/copy io.clj: 396 ... clojure.core/partial/fn core.clj: 2493 boot.file/copy-with-lastmod file.clj: 175 boot.file/sync! file.clj: 221 ... clojure.core/apply core.clj: 634 boot.core/sync! core.clj: 498 ... clojure.core/apply core.clj: 632 tailrecursion.boot-jetty/eval735/fn/fn/fn/fn boot_jetty.clj: 29 tailrecursion.boot-jetty/eval735/fn/fn/fn boot_jetty.clj: 28