Skip to content

sogaiu/jaylib-netrepl-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

jaylib-netrepl-demo

Demo of using jaylib with netrepl

Setup

git clone https://github.com/sogaiu/jaylib-netrepl-demo
cd jaylib-netrepl-demo
jpm -l deps

Test

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.

Using Janet's :redef Feature

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.

Footnotes

[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.

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages