chlorine-clover

About Chlorine for Atom and Clover for VS Code: https://atom.io/packages/chlorine and https://marketplace.visualstudio.com/items?itemName=mauricioszabo.clover
mauricio.szabo 2019-10-30T01:26:33.130800Z

Yep, in-ns is something "special" for ClojureScript. This, for example, doesn't work: (do (in-ns 'foo.bar))

2019-10-30T01:37:54.136200Z

iiuc, in-ns (if it exists for an implementation?) is typically faked by the repl and not available in one's cljs files. does that sound right? i was looking at shadow-cljs' repl implementation the other day and today i took a brief look at what i thought was lumo's. are you finding the same behavior you reported in shadow-cljs?

mauricio.szabo 2019-10-30T01:38:59.136700Z

Yes, exactly the same. Indeed, I've tested the code on shadow-cljs first

2019-10-30T01:43:44.138Z

i suppose them being consistent might be somewhat of a positive thing...

mauricio.szabo 2019-10-30T01:53:16.139400Z

Yes it is πŸ™‚. But they are inconsistent on other issues: On shadow:

cljs.user=> (ns foo.bar (:require [clojure.string :as str]))
foo.bar=> str/upper-case
#object[clojure$string$upper_case]
foo.bar=> (ns foo.bar)
foo.bar=> str/upper-case
#object[clojure$string$upper_case]
On lumo:
cljs.user=> (ns foo.bar (:require [clojure.string :as str]))
foo.bar=> str/upper-case
#object[Function]
foo.bar=>  (ns foo.bar)
foo.bar=> str/upper-case
          ⬆
WARNING: No such namespace: str, could not locate str.cljs, str.cljc, or JavaScript source providing "str" at line 1 
          ⬆
WARNING: Use of undeclared Var str/upper-case at line 1 
str is not defined

kiemdoder 2019-10-30T08:21:36.139800Z

Hi all

kiemdoder 2019-10-30T08:22:06.140500Z

does chlorine still support connecting to cljs REPL from shadow-cljs?

mauricio.szabo 2019-10-30T12:42:57.141200Z

Yes, but you first need to conect to connect to a Clojure REPL, then use the command "Connect embedded ClojureScript"

mauricio.szabo 2019-10-30T12:43:46.142300Z

The reason is that neither Figwheel nor Shadow-CLJS supports a "ClojureScript Socket REPL" like Lumo or Plank. The Socket they expose is a Clojure REPL

kiemdoder 2019-10-30T13:08:10.142900Z

is it the commands that one gets from Ctrl+Shift+P ?

mauricio.szabo 2019-10-30T13:08:37.143200Z

Yes, exactly πŸ™‚

mauricio.szabo 2019-10-30T13:08:59.143600Z

To be precise, the command is Chlorine: Connect Embedded

kiemdoder 2019-10-30T13:11:47.144800Z

I can see a

Chlorine: Connect Clojurescript socket REPL
but not connect embedded

mauricio.szabo 2019-10-30T13:12:06.145100Z

You first connect to a Clojure Socket REPL

mauricio.szabo 2019-10-30T13:12:14.145500Z

Then the command should appear on the command pallete

kiemdoder 2019-10-30T13:12:19.145700Z

ah

kiemdoder 2019-10-30T13:13:58.146400Z

I have Chlorine REPL window now but I can't type into it

mauricio.szabo 2019-10-30T13:15:08.147600Z

You type on the editor and use the commands "Evaluate Block", "Evaluate Top Block", and "Evaluate Selection" to run commands. Chlorine does not have a "REPL-Like interface"

mauricio.szabo 2019-10-30T13:15:55.148500Z

Also, if you did connect a ClojureScript REPL, the package will only use the ClojureScript environment to evaluate .cljs files. You can override it on the package's configuration

kiemdoder 2019-10-30T13:18:13.149100Z

I see now that the REPL window prints results of blocks I evaluate in the source

kiemdoder 2019-10-30T13:20:38.150400Z

thank you for your help and also thanks a lot for your efforts with chlorine

kiemdoder 2019-10-30T13:20:51.150900Z

I really like how quick and simple it is to use

mauricio.szabo 2019-10-30T13:21:10.151200Z

You're welcome! I hope you like it πŸ™‚.

kiemdoder 2019-10-30T13:23:24.152400Z

I have not used Atom for a while but after listening to the Clojurescript podcast where you appeared I decided to have a look and I am glad I did πŸ™‚

😁 1
avi 2019-10-30T14:39:34.155Z

πŸ‘‹ hi all, occasional/beginner user here, was just using Chlorine 0.2.2 in Atom 1.41.0 and I thought I’d share a real quick experience report: 1. Overall, it’s feeling very very useful right now. 2. When an object of a class that has a very long name is output to the console, it pushes the tree of the object out of the console so I can’t really see the tree to browse the object.

mauricio.szabo 2019-10-30T15:07:21.156900Z

Yes, this is a problem. I tried some approaches to solve it, but currently there's no easy solution. What I did want is to move that "arrow" to before the tag, but it's not really that easy to do without breaking the other renderers and/or complicating the code a lot.

mauricio.szabo 2019-10-30T15:07:37.157300Z

What I did try to do is to add some CSS to solve this issue, but still didn't found anything satisfactory

mauricio.szabo 2019-10-30T15:12:11.158800Z

I'm even thinking if it would not be a good idea to just add another arrow to the tagged literal, so instead of something like this:

#some-big-literal/some-big-code  v [1 2]
                                     1
                                     2

mauricio.szabo 2019-10-30T15:13:00.159200Z

I could render like:

v #some-big-literal/some-big-code  [1 2]
  v [1 2]
      1
      2

mauricio.szabo 2019-10-30T15:13:51.160300Z

The problem being that you have to click on two arrows so you can see the sub-elements of the collection

mauricio.szabo 2019-10-30T15:27:13.161200Z

(that may not even be a problem, maybe I'll try to hide this behavior in a feature-flag and collect feedbacks)

avi 2019-10-30T16:55:50.161400Z

I think that’d be fine

avi 2019-10-30T16:55:59.161600Z

Thanks!

2019-10-30T17:00:19.162900Z

@mauricio.szabo i replicated what you showed for lumo -- may be it's actually recreating a namespace when doing (ns foo.bar). probably you know already, but fwiw:

cljs.user=> (ns foo.bar (:require [clojure.string :as str]))
nil
foo.bar=> str/upper-case
#object[Function]
foo.bar=> (in-ns 'cljs.user)
cljs.user=> (in-ns 'foo.bar)
foo.bar=> str/upper-case
#object[Function]

πŸ‘ 1