This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-09-30
Channels
- # bangalore-clj (1)
- # beginners (9)
- # boot (51)
- # cider (20)
- # cljs-dev (419)
- # clojars (1)
- # clojure (338)
- # clojure-brasil (64)
- # clojure-dev (7)
- # clojure-greece (2)
- # clojure-italy (3)
- # clojure-russia (10)
- # clojure-spec (127)
- # clojure-uk (12)
- # clojurebridge (2)
- # clojurescript (132)
- # core-async (8)
- # cursive (37)
- # datomic (34)
- # dirac (5)
- # events (1)
- # funcool (3)
- # hoplon (39)
- # jobs (3)
- # leiningen (3)
- # off-topic (16)
- # om (44)
- # onyx (7)
- # pedestal (20)
- # protorepl (1)
- # random (1)
- # re-frame (64)
- # reagent (6)
- # specter (4)
- # test-check (9)
- # untangled (17)
- # vim (4)
will cursive be getting support for the new (don’t know the actual name for this) namespaced-keyword map syntax? eg #:foo{:bar :baz}
becomes {:foo/bar :baz}
@bfabry @jrheard I assume you guys are talking about in the REPL.. Do I need to enable this somewhere? I still get this output and I am on 1.4.0-eap2-2016.2 running clojure 1.9.0-alpha13
{:foo/bar 1}
=> #:foo{:bar 1}
i was talking about just in regular text editing, particularly in the context of code formatting
on my mac laptop i hit option-command-L periodically and it formats the code nicely for me, but on the non-EAP build that code formatting didn’t know what to do with #:foo {:bar :baz} maps
my cursive REPL is in a slightly borked state atm so i can’t test the output of the command you gave on my machine, sorry! 😞
@kenny that's the expected behaviour, and is coming from the clojure printer not cursive
I have tried doing
(binding [*print-namespace-maps* false] {:foo/bar 1})
=> #:foo{:bar 1}
@kenny Actually, I’ll need to check that - there will have been changes to the standard printer which I might need to sync to Cursive. It’s been ages since I touched that code, I can’t remember off the top of my head how it works.
@kenny I think the problem there is the binding has gone out of scope by the time the repl actually calls print on the value
voke.specs=> (binding [*print-namespace-maps* false] (prn {:foo/bar 1}))
{:foo/bar 1}
nil
@bfabry In this case you’re definitely right, because it’s Cursive on the client side actually doing the printing.
The problem with doing prn
like that is that the result comes back as an output string, and Cursive can’t format it etc.
It’s actually pretty hard for Cursive to emulate the printing vars since they’re on the REPL server, and Cursive is the client.
it defaults to true atm because printing the maps that way was specifically added to make them easier to read. holding off on any of my own judgement as to whether that works for now, it wouldn't make much sense for it to default false