Demo of using jaylib with netrepl
git clone https://github.com/sogaiu/jaylib-netrepl-demo
cd jaylib-netrepl-demo
jpm -l deps
Start program (this starts the netrepl server too):
jpm -l janet main.janet
A window should show up with a solid background color and an updating fps value in the top left should appear.
In an editor, open main.janet
and connect to the netrepl server
at 127.0.0.1:9365
[1].
Evaluate the (set bg-color ...)
form within the (comment ...)
form.
If everything went well, the background color should have changed.
It's also possible to make use of Janet's :redef
feature by starting the
program like this:
jpm -l janet -d main.janet
As before, a window should show up with a solid background color and an updating fps value in the top left should appear.
In an editor, open main.janet
and connect to the netrepl server
at 127.0.0.1:9365
[1].
Evaluate the (def fps-coor ...)
form within the (comment ...)
form.
If everything went well, the position of the fps counter should have changed.
[1] Connecting to the netrepl server is editor-specific. Some options include:
It's also possible to use
spork
's janet-netrepl
's
client mode (-c
) to connect to the netrepl server and communicate
that way.