This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-11-19
Channels
- # aleph (5)
- # announcements (1)
- # babashka (5)
- # beginners (123)
- # biff (9)
- # calva (8)
- # cider (1)
- # clj-on-windows (8)
- # clojure (20)
- # clojure-europe (7)
- # clojure-hungary (3)
- # clojure-norway (1)
- # clojure-sweden (32)
- # clojurescript (2)
- # core-async (2)
- # emacs (6)
- # events (3)
- # fulcro (30)
- # graphql (4)
- # gratitude (3)
- # helix (10)
- # honeysql (7)
- # introduce-yourself (11)
- # kaocha (1)
- # malli (16)
- # matcher-combinators (1)
- # off-topic (7)
- # portal (1)
- # re-frame (12)
- # reagent (3)
- # ring (7)
- # scittle (3)
- # shadow-cljs (1)
- # sql (1)
- # tools-deps (8)
@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
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?
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.alphaI think it would be preferable if you didn’t use the “clj” prefix but rather something related to the lib (like “argq”)