conjure

:neovim:+:clj: https://github.com/Olical/conjure - If you're enjoying Conjure and want to say thanks: https://github.com/users/Olical/sponsorship :smile: (alt https://conjure.fun/discord)
orestis 2020-08-28T06:51:08.042900Z

Wrt to mappings etc, I’m always accidentally refreshing all my namespaces (I’m not sure what I’m pressing) which means I’m losing access to my (still running) http server which means I have to kill my repl to release the port 😞

practicalli-john 2020-08-28T15:19:18.063600Z

If you loosing the reference to the app-server that is defined with def, using defonce instead should stop the namespace reload from changing the reference.

orestis 2020-08-28T16:53:33.065200Z

I’m using defonce indeed. Some ways of roasting though (tools.namespace.refresh...) will completely throw away the namespace and start over.

practicalli-john 2020-08-28T17:50:11.065400Z

Ah yes, that approach is more of a repl restart without restarting the repl.

orestis 2020-08-28T06:51:51.043800Z

I would much prefer if Conjure exposed this kind of functionality as a command so I could invoke it manually, and then perhaps make my own keybinding as needed.

orestis 2020-08-28T06:52:33.044400Z

I get providing keybindings for things like eval-thing-under-cursor, but most other things should be commands IMO.

orestis 2020-08-28T09:26:40.052600Z

Thanks for the long and detailed response. I’ll look into unmapping some stuff the way you describe it. I completely understand wanting to offer some defaults as well. Perhaps a middle ground would be a variable (e.g. vim-better-default allows you to disable the keybindings if you set a global variable to false)

walterl 2020-08-28T11:38:26.055200Z

@orestis How about let g:conjure#client#clojure#nrepl#mapping#refresh_changed = 'XRR' or something?

orestis 2020-08-28T11:42:37.055800Z

Yeah @clojurians-slack100 I’ll do something like that for now.

walterl 2020-08-28T13:03:13.061Z

@olical OT: Conjure has piqued my interest in Fennel. I'm looking for a Clojure-y replacement for Python (mostly for writing CLI apps). Fennel's syntax with Lua's ecosystem seems like a good alternative. Having not used Fennel before, how well would you say it serves as a Python replacement? (Sorry for the OT question, but couldn't think of a more applicable channel.)

Gargarismo 2020-09-03T04:08:08.015900Z

Although I don't think it fits the bill as Clojure-y, there is a lisp-y language that transpiles to python ast, and is fully interoperable with python itself. It's called hy (https://docs.hylang.org/en/stable/). It's a great language, but it's a little young, and I bumped up against what I felt were limitations pretty quick.

Gargarismo 2020-09-03T04:08:28.016100Z

Conjure doesn't touch it... yet.

walterl 2020-09-03T16:29:28.016300Z

I've had a look at Hy and really wanted to like it, but there were a few language decisions that I just couldn't get past. Can't remember what they were, though 😕

walterl 2020-09-03T16:29:39.016500Z

Maybe I should just try a project with it and see how it works in practice.

walterl 2020-09-03T16:30:01.016700Z

In fact, maybe I'll try both Fennel and Hy for a nice comparison 🙂

walterl 2020-09-03T16:30:12.016900Z

And babashka :babashka:

Olical 2020-09-03T16:32:49.017100Z

Babashka seems fantastic for tooling

Olical 2020-09-03T16:32:56.017300Z

We're using it a fair bit in anger I think

Olical 2020-09-03T16:33:01.017500Z

To replace JS and bash things

Olical 2020-09-03T16:33:09.017700Z

Conjure works with bb

walterl 2020-09-03T16:41:25.017900Z

bb's limited ecosystem is my biggest gripe there. Otherwise it's really great.

Olical 2020-08-28T13:08:36.061300Z

You may want to look at Janet too! https://janet-lang.org/ Same author as Fennel (I think?), super similar, but it's own VM

Olical 2020-08-28T13:08:43.061600Z

And full Conjure support

Olical 2020-08-28T13:09:10.061800Z

Fennel + Lua on the CLI is a good option too, but I haven't added support for working with non Aniseed (see: running inside neovim itself) Fennel yet

Olical 2020-08-28T13:09:31.062Z

So Fennel inside nvim is okay with Conjure. Outside nvim in other processes has no support until I work something out.

Olical 2020-08-28T13:12:28.062200Z

Making Fennel compiled/running outside of Neovim a first class client of Conjure is high up on my todo list

walterl 2020-08-28T13:18:20.062400Z

Janet is an option, but one of the big issues is ecosystem. It's what Clojure nailed with JVM-support. Babashka is also great, but using it with third-party Clojure libs is (as I understand it) clunky, if at all possible. So Fennel's ability to use the Lua ecosystem seems like a major plus. Just to clarify: I'm not really asking about Conjure support for Fennel, but rather Fennel as a language (and ecosystem) for general scripting, on its own.

Olical 2020-08-28T13:19:05.062600Z

Totally agree!

Olical 2020-08-28T13:19:23.062800Z

But yeah, if you can solve the problem with Lua but want lispy syntax and macros, Fennel is fantastic!

Olical 2020-08-28T13:19:40.063Z

First class "Fennel but not inside neovim" support will be landing eventually 🙂

🚀 1
walterl 2020-08-28T13:21:52.063300Z

Thanks for your feedback ❤️. If I get to use Fennel soon enough, maybe I can help with the Conjure support 🙂