is out already ?
afaik the increased IO performances will make it more usable
hum only available through insider program yet
to answer your question, i dabbled a little bit with it and clojure, it works, notably the cli is fine there. But it's an island within windows. Microsoft advises against going inside the linux file system with windows applications (although the opposite is fine i think)
That coupled with the lack of UI makes it somewhat problematic to run a proper editor
Although i was able to install a server and have a GUI emacs running
under WSL i mean
running emacs from the console worked almost fine, but some bug with the cursor display makes it almost unusable (that could be on my machine only)
all in all the feeling was "not quite there yet"
so we'll see how it goes with WSL 2
i was using xfc4 with x-ming, that works but eventually crashed
fonts are all blurry =)
@sogaiu I use Atom/Chlorine on Windows with Clojure CLI running on WSL (the old one) with a Socket REPL and that all works fine -- because Chlorine has code in its "load file" command to detect that crossing of filesystems and it automatically rewrites Windows paths (with a drive ID and \
) to WSL paths (with /mnt/<id>
and /
in them).
Now I run Clojure CLI via Powershell instead, so I can get REBL running (and I no longer have to worry about the cross-filesystem stuff).
^ @carkh
@seancorfield right, but then you have a windows program rummaging on the linux file system don't you ?
No, the Windows editor is referencing the files on Windows. WSL is referencing those Windows files as /mnt/c/path/to/file.clj
ok
But WSL 2 recommends focusing on files within Linux for better performance, whereas WSL 1 recommended keeping them on Windows instead.
I'm stuck on WSL 1 since my Windows laptop runs "Home", not "Pro", so I can't enable virtualization, and my desktop is a Mac that runs Windows Pro via Parallels Desktop but that setup can't run virtualization either!
do you know if they'll lift their recommendation to not let windows programs go on the linux file system ?
i mean, within the windows file system, where the linux file system is stored
Not quite sure what you're asking. They've done a lot of work to allow interop between Windows and Linux across the WSL boundary.
ohwell =)
I mean, that's kind of one of the big pluses about WSL: being able to launch Windows programs from inside Linux so you can process Linux files with Windows programs, and vice versa.
right, i can't find the source anymore but i did read you shouldn't go play within the windows file system where the linux stuff is stored... but well, i'll just keep not doing it and thhat's that
At least with WSL 2 being fully virtualized, clj
will run much, much faster on it. For me, stuck on WSL 1, I'll stick to the Powershell version of clj
.
yes that's a net positive
Ah, gotcha. Well, the WSL 2 file system is virtualized so I'm not sure how that will work at all (using .vhd
files instead of an overlaid file system).
but you know about your setup, it's all fine for a competent developer, intimate with the clojure ecosystem, but if you stop and think about it, it's a bit convoluted
Running clj
on Powershell?
yes
that's what needs to be done and no doubts it works
That's the recommended approach for Windows. That's why this channel exists and the porting work has been tested by folks here.
that's the new recommended approach =)
Seems like it needs a little bit of polish to get it over the finish line, partly due to the permissions stuff being fiddly.
anyways i need to do this matrix for alex
so how do you start a shadow-cljs
it just won't work with the current setup and deps.edn
anyways we'll make it work =)
I don't do any cljs development 🙂
there is also cider not jacking-in with deps.edn
i guess other tools too
I don't use CIDER either 🙂
but it's worth considering
it is (was?) the most used editor
I don't use nREPL either BTW.
to be honest i'm not entirely sure about all it does
i'm guessing eval interrupting, formatting of output and a general repl protocol
and all kind of services for completion and the like
do you have completion without it ?
must be some code metadata available through there too
Pretty sure it uses Compliment for completion (same author as CIDER) which is a standalone library that other tooling can use. So I use Compliment in dev for completion.
oh nice
But I can connect my editor setup to any Clojure process, running anywhere, with zero dependencies -- just by starting a Socket REPL via a JVM option.
well sure we can all do that, but the experience is not at its peak then (imo)
Chlorine makes it a good experience. That's why I use it.
i'll have to try it some day, last time i tried atom, there was no chlorine
might be hard to do without cider once you have it in the fingers
we were discussing running tests, and i switched to regular clojure for dev following our chat
and cider makes it so easy to run exactly what i want without having it in scope, work on the actual code, and the last failed test is just a keystroke away
so thank you for that
anyways getting a bit early here, thanks for the chat and goodnight
This chat just reminded me that I hadn't updated my Powershell install to the latest CLI version!
Windows cmd
running via Parallels on a Mac
@carkh @seancorfield thanks for the comments -- hopefully it won't be long before wsl 2 is generally available to try
And "natively" (Powershell via Parallels on the same Mac)
PS C:\Users\sean\clojure> clj -Sdescribe
{:version "1.10.1.458"
:config-files ["C:\Users\sean\.clojure\deps.edn" "deps.edn"]
:install-dir "\\Mac\Home\Documents\WindowsPowerShell\Modules\ClojureTools"
:config-dir "C:\Users\sean\.clojure"
:cache-dir "C:\Users\sean\.clojure\.cpcache"
:force False
...
Easiest way to get clj to a native feel in Windows currently: 1. Install it in Powershell per official instructions. 2. Create a .bat file in PATH with the following content:
@echo off
powershell -command clj %*
Some input for the "matrix": I would still prefer a fully native version though. Just a file you download that you can put anywhere you want and just run. That is why I suggested C language for implementation. It is the official native language of the win32 API and the executable could link only against dll files installed in Windows by default. But I guess Go and Rust could also do that and they probably have the same filesystem and networking APIs for all supported platforms so they are probably better choices.
This means the Go or Rust version could be used for all platforms instead of bash and powershell. Would mean better system integration and less code to maintain.
But I don't really know Go or Rust so I am just guessing.
@markus.gustavsson244 may be you know this already, but there is an unofficial clj / clojure tool that is written in go: https://github.com/frericksm/clj-windows
@sogaiu Thanks, I know about it but I would rather use an official tool when one exists.
But perhaps that one can be used as a base for an official one written in Go?
yes, official would be nice -- but i find it has been more helpful to have that for some use than not. no idea whether it can be used as a base. i presume that is up to cognitect folks.
@markus.gustavsson244 copied your input
i think you still pay the "3 competing escaping rules" tax with your batch file, i couldn't make it work for all cases
I did not try mingw or WSL. Just cmd.exe.
did you try some advanced command line though ?
Not really
it gets pretty hairy real fast with escaped quote
but that's a solution nobody talked about, just do what your batch file does, but with an exe, maybe via a temp ps1 file
I prefer to put "advanced" stuff, like actual clojure code for example, in a file instead of making huge commandlines. In other words, I like to avoid that type of problem on all platforms because shell scripting always breaks for me...
i'm with you there, but tool makers really do need those
Sure. But I guess a native executable would be able to handle that well.
yes i think so