Fork me on GitHub
#clj-on-windows
<
2022-11-19
>
Daniel Craig02:11:33

@borkdude and @chuck.cassel I was finally able to get time to try the msi installer; it was fantastic! I was able to take my students from scratch all the way up to lein uberjar in less than 45 minutes! Really really helpful

😎 3
borkdude07:11:10

But you don’t need the Clojure installer for lein so how does that work?

Daniel Craig04:11:38

I think there's an opportunity for me to learn here; I showed the students how to install Clojure and then showed them how to install lein, then I used lein new app to create a project and then I did lein uberjar to produce a jar. Did I do something redundant?

borkdude07:11:43

If you are going to use lein you don’t need to install anything else

borkdude22:11:27

But it certainly doesn't hurt to have the official clj / clojure available

chaos12:11:20

Hi all, I've mentioned some time ago about an idea I had to solve the cross platform cli arguments quoting issue. I've created a small dependencies-free prototype library called argq to demonstrate the idea. Do you think you could provide me with some critical feedback about how useful this can be or point out any potential fallacies in the design? At the very least it solves the cross platform quoting issue by taking control of argument quoting, i.e. it does not allow symbols in argq arguments that are special in some shells, these needs to be escaped using a two character code which hopefully is easy to reason and remember after some use. It uses tagged literals, which should be familiar to most Clojurians, to indicate special handling of an argument, e.g. a CLI argument of #clj/esc 100*P indicates that the argument value 100*P is escaped. The #clj/esc tag can be used to escape any argument in a cross platform way, while argq will take care to unespape the value before passing it to the program. I have tested this to work, on the Unix shell, on MS-Windows using the PowerShell module from the PS shell itself, the command prompt and the git bash shell. Here is an example from the case studies how the library can be used to escape embedded quotes in an edn string (`*Q` will be transformed to " before passed to clj):

[powershell -Command] clj -Sdeps "'#clj/esc {:deps {viebel/klipse-repl {:mvn/version *Q0.2.3*Q}}}'" -m klipse-repl.main
It provides inline tooling (such as #clj/publish and #clj/help) to assist users publishing cross platform commands invocations on the web without needing to familiarize themselves with the escape syntax, as well as inline debugging options (such as :v in #clj/esc:v 100*P ) to assist with transparency. The library only kicks in when there is an argument started with a known tag and leaves the rest of the arguments intact. It is extensible, thanks to the power of tagged literals, which can be used to power up arguments in any way imaginable, such as reading argument values from files or invoking sub-commands in arguments in a cross platform way. The readme file starts with some marketing material and tries to address users concerns as they come in. After explaining the syntax, the standard tagged literals and giving an example of an extension, it follows up with some case studies and how these can benefit from the library. I would be grateful if you could give it a try (there is a playground test command) and provide me with any feedback that would give me the chance to address any concerns (if at all possible) or suggest an example where the lib breaks or is likely to break. Thanks https://github.com/ikappaki/argq.alpha

Alex Miller (Clojure team)13:11:52

I think it would be preferable if you didn’t use the “clj” prefix but rather something related to the lib (like “argq”)

chaos13:11:10

Indeed, thanks will do that. I only used it as such in the prototype as an eye sweetener for marketing purposes :)