This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-08-08
Channels
- # admin-announcements (2)
- # beginners (35)
- # boot (353)
- # capetown (1)
- # cider (1)
- # cljs-dev (41)
- # cljsjs (3)
- # cljsrn (3)
- # clojure (118)
- # clojure-austin (12)
- # clojure-russia (17)
- # clojure-spec (21)
- # clojure-taiwan (1)
- # clojure-uk (91)
- # clojurescript (80)
- # clojurex (1)
- # cloverage (3)
- # datomic (66)
- # devcards (2)
- # events (2)
- # garden (6)
- # hoplon (54)
- # jobs-rus (1)
- # keechma (1)
- # lein-figwheel (4)
- # leiningen (3)
- # luminus (3)
- # off-topic (7)
- # om (4)
- # onyx (53)
- # other-languages (17)
- # proton (7)
- # protorepl (4)
- # re-frame (123)
- # reagent (1)
- # ring (6)
- # rum (2)
- # spacemacs (1)
- # specter (21)
- # testing (1)
- # untangled (1)
- # yada (42)
@viebel that’s not a bug, expecting things that restore bindings to work in go blocks is not a reasonable expectation neither in Clojure or ClojureScript
I’ve posted here a few days ago but the messages are gone due to the free Slack limit.
I’d appreciate feedback on the patch for this one: http://dev.clojure.org/jira/browse/CLJS-1508 (add :rename
option to the NS form).
The approach used in the patch was to add the rename map for a form under the uses
and use-macros
entries in the env map. so instead of, say an entry like {intersection clojure.set}
it becomes {foo {intersection clojure.set}}
This is working quite nicely but one disadvantage I see a priori is tooling that might expect those maps to be strictly from symbol to symbol, when now in some cases it is from symbol to a map of symbol->symbol
I wonder if there’s a better way to implement that, or if it is OK to break some tooling downstream that works under such assumption
@anmonteiro: adding a new conditional check is usually a sign of things getting more complicated
ok I see you covered that, yeah my first reaction is this changing a lot of expectations
but it also makes it more complicated to understand what’s going on (in a place that’s already really complicated ;)
@anmonteiro: I’m also a bit confused why this path needed to be taken? :rename
should work just like :use
, symbol -> qualified symbol
@dnolen: I can agree that it does complicate things a bit. Are you saying that putting the renamed symbol in the key and the fully qualified (original) symbol in the value would work?
I think at the moment values are supposed to be the NS
or at least that was the impression I had
that’s why I took that approach
but I can definitely see why it might not be the best way to do things
I kinda hate the conditional check for map vs symbol
@anmonteiro: hrm but this expectation of symbol -> ns is really specific to a construct like :use
However, from where I see it, the renamed symbol needs to be in the :uses
/`:use-macros` key
@dnolen: so the idea would be to create a new :renames
entry in the env map?
yes might be a bit of work but I think allows us to not muck around with existing stuff
gotcha, let me play around with that
@dnolen: I’m foreseeing that resolve-var
would probably need to be tweaked in that case
cool, I think I have the big picture
I’ll report back when I have something
thanks for the feedback
@dnolen: regarding with-redefs and core.async - any chance to go for one of the solutions suggested here http://dev.clojure.org/jira/browse/CLJS-1634 ?
I haven’t had any time to look at the suggested solution and there are just too many other pressing things in the queue
I understand. Maybe you have a workaround/suggestion for my use case in Klipse.
In the latest version, I have redirected all the calls to print
to the bottom right text area.
I’ve done that by setting *print-fn*
before calling eval
using with-redefs
http://app.klipse.tech/?cljs_in=(print%20%22hello%20david%22)%0A(map%20inc%20%5B1%202%203%5D)
Is there a good way to redirect the calls to print
when using self-hosted eval-str
?
@dnolen: is there a better way than with-redefs
?
I would ask the question in #C03S1L9DN, people must have workarounds for similar cases
@viebel: I had a possible performant solution for async-aware binding in my head for quite some time, we can talk, if you have time
dumped the idea here (for anyone interested): https://github.com/binaryage/cljs-zones