Fork me on GitHub
#vim
<
2016-10-10
>
dominicm09:10:40

@markwoodhall I don't understand the question too well. I've not used devcards though. Could you share what you have/what you do? I might know a few things to help.

markwoodhall09:10:24

Sure, so at the moment, I have a :Figwheel function that will eval (do (use 'figwheel-sidecar.repl-api) (start-figwheel!)). As far as I understand this will start the first cljsbuild where :optimizations is :none or nil. If I’m working on something with devcards, I’d also like to start the devcards build too so I have :FigwheelStartBuild devcards that will eval (do (require '[figwheel-sidecar.repl-api]) (figwheel-sidecar.repl-api/start-autobuild “devcards”)).

dominicm09:10:59

And what are you trying to achieve exactly? To me - that looks pretty good. You've automated what would normally be manual.

dominicm09:10:54

I hadn't. That's great.

dominicm09:10:01

Exactly something I've been thinking about.

markwoodhall09:10:26

@dominicm well, that was the goal, to save that manual step. I was just interested if that was a common way of doing it really, or if there was an alternative, better way.

dominicm09:10:29

I'm pretty sure he's implemented my autocompletion there.. 😛

dominicm09:10:22

@markwoodhall The only other thing I could really think of is if there was some way to enumerate possible builds which would be candidates for dev and auto-run those? Alternatively - :Figwheel could take optional parameters of builds to start

markwoodhall09:10:56

Yeah, that might be better actually. I guess it’s also worth double checking that there is no option to configure the builds to start in project.clj.

dominicm09:10:24

It appears the author, @ingvij, is here in slack!

dominicm09:10:52

I'm going to make some improvements/changes to the watchable at some point too I think. It'll be more specific to nrepl bencode protocol, but will handle network failures better. Treating a network socket as a file seems to be a slightly optimistic abstraction in terms of errors.

dominicm09:10:51

Yes, now I remember. There's an edge case in my asyncwatchable branch (which isn't a blocker to merge, because it's minor and the rest of the improvements are so significant). If you kill the repl and then launch a new one on the same port, then the read should fail. Due to asyncwatchable, it just sits there forever. It doesn't crash and completions just stop iirc. When you kill neovim, it will sit there forever because it's waiting for the thread to die.

dominicm09:10:06

My plan is to update the watcher to use proper polling instead of a loop of reading over the port.

dominicm09:10:25

Might change some compatibility though.

dominicm09:10:44

@ingvij I'm happy to support acid in clj-async-omni. That would hugely reduce maintenance burden for you I hope. 🙂

dominicm09:10:40

Looking at your tweaks, there might actually be a bug in your implementation. It's totally possible with async runners with nrepl for responses to come out of order. To avoid this, all messages should have a unique message id to which you subscribe so you can await the response. It looks (at first glance) that your system uses a filtering queing mechanism of some kind - but the filtering is done on op, it should probably be done on message id instead.

dominicm09:10:23

Not sure if deoplete will get confused if you return ["xyz", "xBC"] as a completion for "xB" because of incorrect ordering.

dominicm10:10:54

I've learned a lot about nrepl clients since I wrote async-clj-omni. I should totally do something with that.

dominicm15:10:23

That's it https://github.com/clojure-vim/async-clj-omni has it's latest major release!

dominicm15:10:25

The whole thing uses crazy async voodoo to maintain only one connection to the nrepl. It's not perfect, there is an edge case in there to do with connections dying beneath it. I'll fix those upstream someday (tm). I've been using this as my daily driver for 2 months without any hiccups.

dominicm15:10:09

@juhoteperi I'm going to delete the asyncwatchable branch at some point, so if you update and find nothing is working. Master now has the new nrepl client in.

juhoteperi16:10:01

@dominicm gitmodules file seems to contain two nrepl clients

dominicm16:10:55

Strange that git works that way

juhoteperi16:10:20

You should probably remove the entry from gitmodules manually

juhoteperi16:10:30

Git rm should take care of that, but it might not work in all cases

juhoteperi16:10:25

Though maybe it doesn't cause problems

juhoteperi16:10:47

Updated to master and seems to be working after submodule init & update

hkupty18:10:44

Hey all, sorry for taking long to answer.. It's been a while since I don't log in here.

dominicm18:10:56

@juhoteperi I thought I did remove it manually :face_with_rolling_eyes:

hkupty18:10:43

It'd be great if async-clj-omni supported acid

dominicm18:10:54

Derp. I think I removed it and then added it again.

dominicm18:10:06

@ingvij I'd absolutely love to get that in. No idea how stable your API is.

hkupty18:10:11

Not very much to be honest.. I assume it'd be ok after 0.1 is reached

hkupty18:10:34

I still have to take care of some issues. I'll fix that bug you mentioned earlier and then I imagine it'd be stable enough

hkupty18:10:44

Sorry for copying your code that way, btw.. I just needed something to prove the concept of acid.nvim and completion was pretty simple to implement

hkupty18:10:44

It'd be great if you could help me with acid, since I'm just scratching the surface of how nrepl works

markwoodhall19:10:38

@dominicm just switched over to async-clj-omni, working nicely! 🤓

hkupty20:10:36

Which is the official nrepl-python-client version as of now?

juhoteperi20:10:55

What is acid? Fireplace replacement?

juhoteperi20:10:11

Seems to be alternative to async-clj-omni currently as both provide depoplete source

hkupty20:10:42

acid is a plugin I'm writting to provide asynchronous support for clojure development

hkupty20:10:53

It is intended to be an alternative to vim-fireplace

juhoteperi20:10:02

Okay, interesting

hkupty20:10:42

async-clj-omni is very much specialized, so probably I'll drop support to deoplete as soon as acid is more stable and leave code completion to async-clj-omni

hkupty20:10:23

currently, acid and async-clj-omni provide somewhat the same support for completion, but acid still requires you to (require '[]) manually the namespaces you want completion