This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
@micha I've got a loop-tpl question. When I use an anonymous cell= inside a loop-tpl, the value of the cell never seems to change. Would having the cell='s in a map fix that? Here's the code: (loop-tpl :bindings [buddy rpc/buddies] (li :toggle (cell= (not (or (str/blank? buddy) (= rpc/user buddy)))) (span :class "buddy" (text "~{buddy}")) (input :type "checkbox" :value (cell= (contains? rpc/active-chat buddy)) :click #(rpc/toggle-chat! buddy)))))) The thing is, when a buddy logs off I want to clear the checkbox. The code runs fine the first time, but after checking the box a second time and doing a second logoff, the display remains checked even while the active-chat set has been updated.
Oh, yes. this is the cell I'm talking about: :value (cell= (contains? rpc/active-chat buddy))
@micha: What caused the bug? 😮
@micha I've been reading up on lenses and it strikes me that it is all really very simple, only the explanations are scary. So I've written up my own: https://github.com/laforge49/dewdrop#readme
Now why mention this here? I wanted to give you a sample of my writing. I think hoplon should be as simple as I've made lenses. 😄
@laforge49: did you see the javelin lens implementation? https://github.com/hoplon/javelin#lenses
maybe "lens" isn't precisely the correct terminology, the javelin one is more general than the lenses i've seen elsewhere
Quick question … are there some editor / tabs / code layout conventions for the demos? I use Cursive and would like to set up a code style template that matches your preferences
@micha the reference to lenses in the javlin docs got me to studying lenses. But having gone so far as implementing my own lenses, I still can not figure out javlin's. Sigh. Something for another day.
so for example, a lens that is equivalent to your lens is the one in the first javelin lens example
a function that given the desired new value for the lens, does something to make that heppn
and what's great about it is that it doesn't invent new protocols or new functions to do it
the value in the lens cell isn't necessarily what you tried to set it to with reset or swap
yeah, you don't want to complect the representation of a thing with the semantics of changing it
a crucial thing with the javelin lenses is that the code that calls swap! or reset! doesn't need to know anything about the underlying structure of the data that backs up the lens
like when you call swap! or reset! on an atom you're only expressing a desire to change something
so I read the javelin doc and spent 3 days working on lenses, but gave up on javelin
being a newbie puts me in a better position as a tech writer. Though I'd rather be working on my own stuff
My wife and I have a mild case of the flu, having gotten flu shots 2 weeks ago. go figure
i guess she's in god's hands then, chicken soup is the only thing my people know for when you're sick
15 years in India and they know how to ruin everything. No pork fat in chinese food nor in tai food either!
Not that I wanted to eat pork in india though. Discussions of what indian pigs eat is not a fit topic.
But as the chinese ambassador said when taken to a chinese resturant in Delhi, best indian food I've ever eaten!
In india you often get served kimchee as a free side dish in Chinese restaurants. But it is not fermented. It is just cabage with a sweet barbeque souse. Retch!
I've been to too many restaurants in India where the cook obviously had never tasted the food described on the menu.