Fork me on GitHub
#conjure
<
2020-04-07
>
Olical11:04:19

https://asciinema.org/a/iUDRjy7FbrWtMc5Aj4eMIm8qJ the HUD now does it's best to show you the top of long outputs. So if you eval something and get a nil back, that's like two lines of output, so that's fine, I can just show you the bottom of the log. If there's 30 lines of output, the last few lines aren't super useful, especially if it's a big data structure. So I show you the comment that tells you what you did (for confirmation that you evaled the thing you really wanted to eval_ and the first few lines. This only applies to the HUD, if you're in the log buffer it always sticks to the bottom. Different contexts, constraints and behaviours. Now I'm going to implement a few other bits like "go to definition" 😄 not far off needing to document everything! Can't wait to get this on the main repo's develop branch so you can beta test the living daylights out of it!

plt_borat 8
Olical11:04:31

I'm also inserting little separator comments between your actions and results. This means when I trim the log after it gets too long (just to stop it getting to 100s of thousands of lines long), I trim to known good points. JVM Conjure has an issue where it'll trim the log but cut a form or data structure in half, this causes highlighting among other things to break.

nate16:04:31

Oh man, this is amazing!

nate16:04:48

trimming whole results is wonderful

nate16:04:56

thank you!

Olical16:04:19

You're welcome! I hope I can get a beta version in your hands ASAP!

Olical11:04:59

Fennel Conjure trims to points it knows are safe. The marker is what allows me to scroll the HUD to the correct locations too!

Nir Rubinstein11:04:46

Let us know when!!!

Olical14:04:47

I can connect to babashka's nrepl with Conjure now 😄

babashka 4
Olical14:04:55

Finished the streaming (stateful) bencode parser.

borkdude14:04:55

😄 ❤️

Olical14:04:03

There's no ls-sessions op which isn't a huge deal and it seems to throw interesting errors until I eval the ns form but it works great otherwise.

Olical14:04:22

Couldn't interrupt a call but that may just not be implemented or to do with the fact that I can't list sessions.

Olical14:04:28

Super cool

Sergiusz Bleja20:04:11

Hello, I'm learning clojure, and it was a breeze to set up, and use with conjure, so thanks a lot for the plugin -- it is awesome, and the documentation is http://fantastic.lt is similar to the way I work in R (https://github.com/jalvesaq/Nvim-R) for many years, so even easier to get started.

Olical09:04:22

This is so great to read! Thank you very much!

Sergiusz Bleja20:04:39

I do have a question, I have a project set up with deps.edn and propel via another terminal, all working. But I have the function above that expects an input from the console but I can't for the life of me figure out how to input it. Is this related to my setup? It looks like you activate the actual repl in the asciicinema on the github homepage -- what is the shortcut to do that?

Olical09:04:56

I think maybe you mean the log buffer which is <localleader>ll, that's not a real REPL but a buffer you can edit and eval within, the results of the evals appear in the buffer, which is a bit like a REPL but more buffer like. That won't let you give stdin though, I don't think prepl accounted for this at all, another flaw with the design I guess 😞 I think the best answer I can offer for now is running your code with a with-redefs to redefine what read-line will return. It's not great but I don't think there's another way to do it right now. I'm moving my rewrite to nREPL which does support stdin, so I'll be sure to support requests for user input in there.

Sergiusz Bleja20:04:39

Ah, ok thanks for the reply, I will try a with-redefs but trouble is that it's a tic tac toe game so might have to think in between. So in the end, I think I'll use some other solution.

Sergiusz Bleja20:04:51

Sounds good about nREPL though.

Sergiusz Bleja20:04:15

Actually, I think I made the mistake of thinking that it would work from the REPL but really reading from stdin would be blocked on the REPL anyway I think, it is in python, so don't know why I expected it to work here.

Olical12:04:08

It was worth a try! But yeah, prepl doesn't support requesting stdin, nREPL does. Should work flawlessly in my rewrite 😄 keep an eye out for the beta, I hope to get it in people's hands soon!

👍 4
Olical12:04:19

(when it has all the features of the current Conjure)

Sergiusz Bleja13:04:20

Excellent, look forward to that.