Fork me on GitHub
#cursive
<
2016-09-30
>
jrheard17:09:37

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}

bfabry17:09:43

@jrheard EAP releases already do

kenny19:09:57

@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}

jrheard19:09:17

i was talking about just in regular text editing, particularly in the context of code formatting

jrheard19:09:49

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

jrheard19:09:46

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! 😞

bfabry20:09:23

@kenny that's the expected behaviour, and is coming from the clojure printer not cursive

cfleming20:09:31

@kenny That output is Clojure itself… right

kenny20:09:14

I have tried doing

(binding [*print-namespace-maps* false] {:foo/bar 1})
=> #:foo{:bar 1}

kenny20:09:24

Any idea how to get normal map printing back?

cfleming20:09:24

@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.

kenny20:09:13

It has been annoying the hell out of me lately. Makes maps completely unreadable 😛

cfleming20:09:36

Yeah, I hear that - I actually don’t like the namespaced maps at all.

cfleming20:09:24

I’d have preferred just emphasising ::alias/kw forms.

cfleming20:09:45

Anyway, I’ll try to sort that out in an EAP soon.

bfabry20:09:54

@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

cfleming20:09:55

@bfabry In this case you’re definitely right, because it’s Cursive on the client side actually doing the printing.

kenny20:09:02

I though it was something like that

bfabry20:09:10

@cfleming it actually does it in a raw boot repl too

cfleming20:09:23

The problem with doing prn like that is that the result comes back as an output string, and Cursive can’t format it etc.

cfleming20:09:42

So for big maps it’ll be even uglier than in the namespaced form.

bfabry20:09:14

I'm not really sure how to bind that var for the whole repl process =/

cfleming20:09:42

It’s actually pretty hard for Cursive to emulate the printing vars since they’re on the REPL server, and Cursive is the client.

cfleming20:09:00

Locally binding them will never work, if you set! them I might be able to fix that.

cfleming20:09:16

Otherwise I can just add corresponding config in the REPL UI.

kenny20:09:15

Whose responsibility will it be to set *print-namespace-maps*?

kenny20:09:33

Seems like the default should be false for any repl

bfabry20:09:27

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

puzzler22:09:01

My plugin version shows Version: 1.2.6-2016.1. I can't figure out how to update the plugin (or is the one from May the last stable release?)

puzzler23:09:22

I manually uninstalled the plugin to try to get the newest plugin to show (1.2.7), but when I click to install the new plugin, it downloads something for a while and then nothing happens.