This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-02-06
Channels
- # beginners (49)
- # calva (12)
- # cider (5)
- # cljdoc (4)
- # clojure (51)
- # clojure-dev (1)
- # clojure-europe (16)
- # clojurescript (56)
- # conjure (2)
- # copenhagen-clojurians (1)
- # core-async (4)
- # data-science (4)
- # docker (1)
- # emacs (4)
- # gratitude (1)
- # malli (2)
- # meander (2)
- # missionary (7)
- # off-topic (23)
- # pedestal (3)
- # polylith (6)
- # shadow-cljs (28)
- # spacemacs (1)
- # sql (9)
- # transit (8)
Did somebody ever ssh tunnel into a windows host and make port forwarding work so they could connect to a nrepl server? (the -L
option for ssh)
debug1: Connection to port 7001 forwarding to 192.168.178.22 port 7001 requested.
debug2: fd 9 setting TCP_NODELAY
debug2: fd 9 setting O_NONBLOCK
debug3: fd 9 is O_NONBLOCK
debug1: channel 3: new [direct-tcpip]
debug3: send packet: type 90
debug3: receive packet: type 91
debug2: channel 3: open confirm rwindow 2097152 rmax 32768
debug3: receive packet: type 96
debug2: channel 3: rcvd eof
debug2: channel 3: output open -> drain
debug2: channel 3: obuf empty
debug2: chan_shutdown_write: channel 3: (i0 o1 sock 9 wfd 9 efd -1 [closed])
debug2: channel 3: output drain -> closed
debug3: receive packet: type 97
debug2: channel 3: rcvd close
debug2: chan_shutdown_read: channel 3: (i0 o3 sock 9 wfd 9 efd -1 [closed])
debug2: channel 3: input open -> closed
debug3: channel 3: will not send data after close
debug2: channel 3: send close
debug3: send packet: type 97
debug2: channel 3: is dead
debug2: channel 3: garbage collecting
debug1: channel 3: free: direct-tcpip: listening port 7001 for 192.168.178.22 port 7001, connect from 127.0.0.1 port 44710 to 127.0.0.1 port 7001, nchannels 4
debug3: channel 3: status: The following connections are open:
#2 client-session (t4 r0 i0/0 o0/0 e[write]/0 fd 6/7/8 sock -1 cc -1)
#3 direct-tcpip: listening port 7001 for 192.168.178.22 port 7001, connect from 127.0.0.1 port 44710 to 127.0.0.1 port 7001 (t4 r1 i3/0 o3/0 e[closed]/0 fd 9/9/-1 sock 9 cc -1)
On the windows host I have sshd_config:
AllowStreamLocalForwarding yes
AllowTcpForwarding local
that's all basically.
ssh already works just when it tries to forward the port or something there is something missing.I am doing this via WSL2. I run the ssh daemon in there and then open the ports in the Windows firewall
If I need Windows access, then I simply open cmd.exe or powershell in the WSL2 session
I blogged about it here https://blog.michielborkent.nl/remote-wsl2-clojure.html
Is it true that with WSL you will not be able to use Windows-related APIs (like Microsoft Active Accessibility and UI Automation)? I also attempted to connect to a nrepl that runs in powershell but was unsuccessful.
I just found out that if you forward port this way:
ssh -L7777:localhost:7777 ...
it doesnt work, but if you do it this way, it works:
ssh -L7777:127.0.0.1:7777 ...
I haven't seen this shared here yet, pretty incredible https://github.com/Kindelia/HVM
I understand pretty much nothing in the relevant domains, but this section mentions something curious: https://github.com/Kindelia/HVM#composition-optimal
> In general, if the composition of a function `f` has a constant-size normal form, then `f^(2^N)(x)` is linear-time (`O(N)`) on HVM, and exponential-time (`O(2^N)`) on GHC.
Assuming I read it correctly - why is a composition of 2^N
functions takes just O(N)
time on HVM?
The words "function f
has a constant-size normal form" are probably important. Is there an ELI5 possible here? Cursory googling suggests I have to know 15 other things in order to understand that.
Alright, the very first image at https://github.com/Kindelia/HVM/blob/master/HOW.md explains everything. XD
I think it has to do with f
having a constant size normal form, but we'll have to go through the reduction rules to see what turns out
Sorry, couldn't resist. :) Yeah, I'll write off this loss, for now. Despite that quote that's commonly attributed to Einstein, I don't think that all areas can be explained simply or to six year olds.
Maybe this part explains it https://github.com/Kindelia/HVM/blob/master/HOW.md#bonus-abusing-beta-optimality
Right, I was thinking of attempting to read that document in order, skipping parts that I can't understand right now. Thanks!
I've been eyeing it for the past few days since it popped up on HN, and I mostly feel like a protagonist in a Lovecraft story