Fork me on GitHub
#conjure
<
2023-07-12
>
grav12:07:33

Wonder if it's possible to get Conjure working with uLisp and an ESP32?

grav13:07:15

https://clojurians.slack.com/archives/CK143P6D7/p1689164433494519 Or maybe a simpler question - can Conjure somehow send data to a tty?

grav13:07:50

In my case, I have a ESP32 connected to Arduino, and I can use the Serial monitor to send data to it. But that's not a great repl experience. Would be cool if I could integrate Neovim with it

Olical13:07:03

Maybe modifying the scheme stdio client would do the trick. I don't know anything about this env, sorry. I've heard of uLisp but that's all. It requires a whole TTY to run? If so, I have no idea how you talk to another TTY but I'm sure a client could be written that did.

Olical13:07:23

Is it one of the things that runs on specific hardware?

Olical13:07:29

So you're talking to it remotely?

grav13:07:07

Yes, exactly. uLisp can run on quite a few devices, amongs those, Arduino devices. ESP32 is a microcontroller that is Arduino compatible, so it is pretty simple to get going: • upload the ulisp program via the Arduino IDE • reboot the ESP32 • connect with the serial montor • now you have a repl 🙂

grav13:07:22

But I'm still very much a newbie at it.

Olical13:07:43

If you can start a process on your local machine that gives you a repl on the remote machine, then conjure can talk through that

grav13:07:42

Ah, yes, I could potentially create a kind of proxy repl ...

grav13:07:58

But I'll see if I can understand the scheme client first 👍

Olical13:07:38

It's essentially starting a sub process and sending text to it on eval. It then reads the output and looks for a repl prompt which indicates that the previous eval is done. It's VERY rudimentary, I have plans to rewrite the stdio support+ create some abstraction layers that'll make this sort of thing so much nicer and easier. It'll just take time.

Olical13:07:25

And I spent my recent time off developing the successor to Aniseed that'll make these larger refactors a lot easier. I'd love to provide more of a toolkit people can use to easily cobble together their own clients.

❤️ 2
grav13:07:22

Wasn't immediately able to get the scheme client modified for uLisp. But uLisp turned out to be pretty limited in terms of what APIs it implemented.

grav13:07:06

Now I'm looking at https://www.nodemcu.com/index_en.html, which implements Lua! I kind-of understand the protocol needed to send code to the device with NodeMCU, so now I'm thinking of creating a server which will receive fennel code, compile to Lua and send to the device 🎉 Let's see if I have enough summer holiday to get it going 😉

grav13:07:06

Now I'm looking at https://www.nodemcu.com/index_en.html, which implements Lua! I kind-of understand the protocol needed to send code to the device with NodeMCU, so now I'm thinking of creating a server which will receive fennel code, compile to Lua and send to the device 🎉 Let's see if I have enough summer holiday to get it going 😉