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)
Axel Baudot 2021-01-15T07:46:56.000100Z

The filetype was Scheme, changing it to racket did the trick ! Many thanks 🙂

Olical 2021-01-15T09:34:35.000300Z

🎉

dharrigan 2021-01-15T13:57:11.000700Z

does anyone have a nice way of evalling all open buffers?

dharrigan 2021-01-15T13:57:44.001300Z

:bufdo ConjureEvalBuf :)

Olical 2021-01-15T15:14:16.001500Z

That'll do it!

Olical 2021-01-15T15:14:23.001800Z

Glad I added those commands 😅

Chase 2021-01-15T16:02:04.002400Z

Sometimes I want to disable the hud but let g:conjure#log#hud#enabled = false is giving me an error. What should I be inputting?

Olical 2021-01-15T16:02:45.002500Z

That'll be v:false in vimscript, sadly 😬

Olical 2021-01-15T16:03:07.002700Z

Or I think 0 might be okay too? I think v:false and v:true basically map to 0 and 1 anyway?

Chase 2021-01-15T16:04:36.002900Z

I tried 0 before but the HUD still pops up so let me try v:false

Chase 2021-01-15T16:05:55.003100Z

still getting the HUD. hmmm

Chase 2021-01-15T18:11:25.007400Z

I'm trying to run ConjureCljRunAlternateNsTests but it is saying no ns found. I used clj-new to create the project. So the source file is at src/chase_lambert/scratch.clj with a namespace of chase-lambert.scratch and the test is at test/chase_lambert/scratch_test.clj with the ns chase-lambert.scratch-test . The error says No namespace: chase-lambert.scratch-test found

Olical 2021-01-15T18:13:40.007600Z

Hmm it works this out from the actual (ns...) form of your current buffer

Olical 2021-01-15T18:13:41.007800Z

Is that core?

Olical 2021-01-15T18:13:48.008Z

Even if the file is scratch

Olical 2021-01-15T18:14:01.008300Z

Oh I see

Olical 2021-01-15T18:14:03.008500Z

Sorry

Olical 2021-01-15T18:14:23.008700Z

You need to eval the test buffer, it doesn't do that for you just in case there's side effects you don't want executed

Olical 2021-01-15T18:14:48.008900Z

Maybe I should make it attempt a require at least

Olical 2021-01-15T18:15:06.009100Z

Hmm, I feel like this was an issue that I fixed a while back :thinking_face:

Olical 2021-01-15T18:18:14.009300Z

Hmm the entire body of display-hud is wrapped in (when (config.get-in [:log :hud :enabled])

Olical 2021-01-15T18:20:27.009500Z

I just tried this myself and it works for me, so maybe it was another issue?

Chase 2021-01-15T18:20:55.009800Z

Hmm, not sure what order I did things in but when I went to the test file and evaluated the buffer, then I started getting all the expected behavior.

Chase 2021-01-15T18:21:18.010Z

So now the run alternate ns tests works from scratch.clj

Chase 2021-01-15T18:23:43.010200Z

Yeah, I tried v:false again and it worked so I probably did something wrong the first time. Sorry about that

Chase 2021-01-15T20:26:21.012700Z

I've been considering going through the SICP book sometime soon at my leisure but will stick with it's use of Scheme. I noticed Racket has an SICP dsl. Since Conjure can do Racket I am curious if you think that would work?

dave 2021-01-15T20:42:12.014400Z

^I tried that recently. It... didn't work. I think the issue is that Conjure starts a Racket REPL for you in a subprocess, but for the SICP library neil/sicp, which provides #lang sicp to work, you have to run racket -i -p neil/sicp -l xrepl. It wasn't clear to me whether it's possible to get Conjure to do that when it starts the Racket REPL for you.

markx 2021-01-18T01:53:42.050900Z

I’ve been using racket -i -l xrepl -I sicp as the startup command for https://github.com/Olical/vim-scheme. (so you don’t need the #lang in the file) However it doesn’t work with Conjure when I change g:conjure#client#racket#stdio#command The result of eval doesn’t appear in the repl. I assume it’s because the default racket command implicitly adds some arguments. So what arguments do I need to add for Conjure to work?

markx 2021-01-18T01:55:47.051400Z

@olical ☝️ 🙏

Olical 2021-01-18T08:47:33.051700Z

I think it's because it prints different prompt strings which I use to identify the boundary between results. I just need to make that configurable too I think think!

dave 2021-01-15T20:42:58.015200Z

And you really need #lang sicp, because otherwise all the code examples don't work because Racket itself doesn't have a bunch of functions like inc that the book assumes are in your Scheme environment.

Chase 2021-01-15T20:48:25.015600Z

Fair enough. Exact info I was looking for. Thank you