cursive

Issues at: https://git.io/cursive-issues
saitouena 2020-11-12T08:04:02.214500Z

Is there any way to rename ns a.b to a.c.b ? I could rename a.b to a.c with M-x refactor-this + Rename but I couldn't do it for the above case. I think cursive currently cannot do it if it moves over directories. Is that correct?

cfleming 2020-11-12T08:04:37.214700Z

That’s correct right now, but this will be possible soon.

πŸ‘ 1
❀️ 1
saitouena 2020-11-12T08:06:01.214900Z

I appreciate it so much! πŸ‘ I'm looking forward to it. It would make it easier to refactor project structure.

cfleming 2020-11-12T08:06:52.215200Z

Yes, no doubt!

2020-11-12T16:33:34.218500Z

I've been trying to get nrepl working inside wsl2 for a while now and I'm not having much luck, has anyone else being trying this? Specifically running intellij in windows and trying to connect the remote repl to an nrepl instance via shadow-cljs running within wsl2. All of my ports appear to be open, but for some reason nrepl refuses connections. Does it not accept any external connections by default or something? I can definitely connect to it within wsl2 and I can connect to other running parts of shadow-cljs.

tanzoniteblack 2020-11-12T17:49:31.218600Z

what host are you using? localhost or the explicit IP address of the WSL2 instance?

tanzoniteblack 2020-11-12T17:50:10.218800Z

I have no idea if that's relevant or not, but random things like that do trip me up sometimes with wsl2 interop

tanzoniteblack 2020-11-12T17:50:58.219Z

I also use windows+wsl2 for development. But, I just run intellij from wsl2 directly, using x410 as an x server on the windows side

2020-11-12T17:52:47.219200Z

I've tried both, as well as using ssh to do port forwarding, it's surprisingly opaque.

2020-11-12T17:53:34.219400Z

Hmm, does that end up working well? I'm a little concerned about whether that's going to cause odd quirks like file system slowdowns or keyboard shortcut issues?

tanzoniteblack 2020-11-12T17:56:05.219600Z

https://nrepl.org/nrepl/usage/clients.html

clj -Sdeps '{:deps {nrepl {:mvn/version "0.8.3"}}}' -m nrepl.cmdline --connect --host host --port port
are you able to connect directly from powershell?

tanzoniteblack 2020-11-12T17:56:31.219800Z

and it works well for me. I use intellij professionally for kotlin / javascript / clojure & do all of it directly in wsl2

tanzoniteblack 2020-11-12T17:57:39.220Z

I haven't had any issues related to file system slowdowns as long as your code is also in the wsl2 disk. the file system speed issues only exist when accessing files from windows instead of the local partition

tanzoniteblack 2020-11-12T17:58:33.220200Z

no issues with keyboard shortcuts, but x410 does stick to the keyboard layout that you started it with. So if you switch between different windows keyboards (like I do with Russian & Chinese), they don't work directly in the intellij window.

tanzoniteblack 2020-11-12T17:59:03.220400Z

only other annoyance is x410 connections are done over tcp, and those connections don't survive shut downs or sleep. So you have to close intellij before you turn off your computer

tanzoniteblack 2020-11-12T17:59:31.220600Z

the windows team is supposed to be releasing a native version of handling gui apps from wsl2 this year. I'm hopeful those will fix those issues for me πŸ™‚

tanzoniteblack 2020-11-12T17:59:37.220800Z

but they're all pretty minor for my workflow

2020-11-12T18:07:38.221Z

Hmm, that's pretty lucky. I'm assuming hibernating would also be an issue, which would be a problem for me. Sometimes leaving my code overnight and being able to just dive back in the morning is really helpful πŸ˜ƒ...

2020-11-12T18:08:20.221200Z

I've been testing with:

lein repl :connect 127.0.0.1:8777
Which I assume is similar? It certainly works within the wsl bash shell...

2020-11-12T18:08:39.221400Z

Trying it from powershell isn't great however

tanzoniteblack 2020-11-12T18:09:06.221600Z

yeah, hibernating also has the same issues

tanzoniteblack 2020-11-12T18:09:24.221800Z

in order to debug if it's a "windows thing" or "cursive/java thing", you'll probably need to be able to test it from powershell

2020-11-12T18:10:58.222Z

The interesting thing is if I remove the entries in netsh portproxy then the response changes: with: netsh interface portproxy add v4tov4 listenport=8777 listenaddress=0.0.0.0 connectport=8777 connectaddress=172.18.255.20

lein repl :connect 0.0.0.0:8777
Connecting to nREPL at 0.0.0.0:8777
SocketException Connection reset
        java.net.SocketInputStream.read (:-1)
        java.net.SocketInputStream.read (:-1)
        java.io.BufferedInputStream.fill (:-1)
        java.io.BufferedInputStream.read (:-1)
        java.io.FilterInputStream.read (:-1)
        java.io.PushbackInputStream.read (:-1)
        bencode.core/read-byte (core.clj:87)
        bencode.core/read-byte (core.clj:-1)
        bencode.core/read-token (core.clj:239)
        bencode.core/read-token (core.clj:237)
        bencode.core/read-bencode (core.clj:257)
        bencode.core/read-bencode (core.clj:254)
Bye for now!
without:
lein repl :connect 0.0.0.0:8777
Connecting to nREPL at 0.0.0.0:8777
ConnectException Connection refused: connect
        java.net.DualStackPlainSocketImpl.connect0 (:-2)
        java.net.DualStackPlainSocketImpl.socketConnect (:-1)
        java.net.AbstractPlainSocketImpl.doConnect (:-1)
        java.net.AbstractPlainSocketImpl.connectToAddress (:-1)
        java.net.AbstractPlainSocketImpl.connect (:-1)
        java.net.PlainSocketImpl.connect (:-1)
        java.net.SocksSocketImpl.connect (:-1)
        java.net.Socket.connect (:-1)
        java.net.Socket.connect (:-1)
        java.net.Socket.<init> (:-1)
        java.net.Socket.<init> (:-1)
        nrepl.core/connect (core.clj:178)
Bye for now!
So it's connecting to something?

tanzoniteblack 2020-11-12T18:11:55.222400Z

try connecting to the actual IP address of the wsl2 virtual machine. you can get that by running ip addr in the wsl2 terminal & pulling the value for eth0

2020-11-12T18:13:54.222600Z

Nope, then you just get the connection refused, which makes sense as there's no open port on that IP address I think? Actually, I wonder if this is windows firewall being clever

2020-11-12T18:15:38.222800Z

Nope that's not it either

tanzoniteblack 2020-11-12T18:19:55.223Z

no more ideas. Sorry

2020-11-12T18:20:53.223200Z

Thanks for the help anyway πŸ˜ƒ

2020-11-12T19:09:19.223400Z

Finally figured it out I think? Well sort of, I can connect to it via ssh if I use an alternative port via:

ssh -L 8778:localhost:8777 folcon@172.18.255.20
So I guess that's one way of doing it >_<...