Fork me on GitHub
#conjure
<
2021-04-13
>
harryvederci16:04:59

Long shot: has anyone here had success connecting Conjure to a https://love2d.org/ fennel game? I've done it with emacs as in https://gitlab.com/alexjgriffith/min-love2d-fennel repo, but I kinda.. don't want to use emacs 😛 Edit: experimental but working repo is https://git.sr.ht/~harryvederci/love2d-fennel-fp-boilerplate. Contains a lot of unneccessary stuff though.

Olical16:04:33

This will be key: https://github.com/Olical/conjure/wiki/Quick-start:-Fennel-(stdio) swapping to the stdio fennel client

Olical16:04:56

I think I almost had something working (or it is working?) on a laptop :thinking_face: but I need to go dig it out, not sure why I haven't pushed it, maybe it never worked

Olical16:04:05

But you should be able to launch love2d through that I think?

Olical16:04:16

Yeah, looks like it doesn't work properly but it's not far off? Might help! I just pushed what was in the directory, not sure how long ago I was fiddling with this https://github.com/Olical/conjure-loves-fennel

Olical16:04:40

The problem is getting a Fennel REPL up and running, I just remember it not liking a bunch of cases

Olical16:04:57

If you can get a Fennel stdio REPL running inside a love process then it should just work?

Olical16:04:16

Although the better approach might be to launch love2d from a regular fennel / lua REPL, if that's possible?

Olical16:04:28

Hope that helps!

harryvederci16:04:26

Thanks @U38J3881W! Yeah that's the thing. I can get fennel running, but then I'm not sure how to hook that up with love2d. Big brain stuff! Will look into that repo you just shared, thanks!

Olical16:04:51

I feel like the commit before the latest one may have worked better? But honestly just needs some experimentation, I remember it working to some extent but it just needs some Fennel REPL love or just come at it from the other end: Running love from a fennel REPL (if this is doable, that's ideal imo)

harryvederci17:04:17

> Running love from a fennel REPL (if this is doable, that's ideal imo Yeah that's what I'm hoping for as well! This stuff is not like anything I'm used to, so expect nothing, but if I do get something to work I'll definitely share!

Olical17:04:32

Would love to see it!

🇺🇸 3
👍 2
Olical17:04:59

I think a fennel lib which opens up a REPL on stdin from ANY lua process would also be amazing

harryvederci17:04:08

> If you can get a Fennel stdio REPL running inside a love process then it should just work? I've got that working https://git.sr.ht/~harryvederci/love2d-fennel-fp-boilerplate, but Conjure isn't aware of the fact that it's running then.

Olical17:04:00

Ah okay. Well if it's running on stdio, you can use the stdio client and then configure the client to run the command you need to start it

Olical17:04:09

Because Conjure starts the process under neovim for you

Olical17:04:22

Check :h conjure-client-fennel-stdio for how to configure that

harryvederci17:04:12

I have no clue what I did, but I've got something working :P

harryvederci17:04:31

Will clean up a bit and share

harryvederci17:04:05

I haven't checked out your repo properly yet, so I may just be doing the same thing

harryvederci17:04:00

@U38J3881W I've pushed to the https://git.sr.ht/~harryvederci/love2d-fennel-fp-boilerplate. Workflow: run nvim start.fnl , then follow the instructions at the bottom of that file on live code evaluation.

harryvederci17:04:10

If you see "love ." stopped appear in the Conjure output, that's probably due to a segmentation error, I think that's just because of my messed up code. Restarting it a bunch of times will load it successfully at some point.

harryvederci22:04:25

I've tried to also make this work with your conjure-loves-fennel repo, with no success just yet. I may have some time again later this week, but also feel free to check out my https://git.sr.ht/~harryvederci/love2d-fennel-fp-boilerplate to see if you can figure out what I'm apparently doing correctly there. (I have no idea what I'm doing :P)