Comments (5)
Yeah, a lot of confusion here.
First, you would need to run the net repl server on a client in a new fiber, for example with (ev/spawn β¦). And yes, since jaylib is blocking there is some latency but in practice this should actually work alright - at 60fps, requests will have 16ms latency. Still, not ideal but not a deal breaker.
second, telnet is not anything you want here, the netrepl protocol requires a real client. βjanet-netrepl -cβ is the command you would use to connect.
from spork.
What OS and janet version are you using? If the static library is built I don't see why the .so would not be built.
Also worth making sure you have an up to date jpm with sudo jpm install jpm
from spork.
Also the output of jpm show-paths
should have modpath as /usr/local/lib/janet
, according to your stacktrace. If it doesn't, it may be that rawterm.so was installed somewhere else and jpm/janet is configured incorrectly
from spork.
After updating jpm and installing sprok again this issue is gone. Thanks for your support.
from spork.
Sorry for reopening!
Maybe I have misunderstood what netrepl is supposed to do or supposed to be used for. I want to develop a game interactivly and have some code:
(use jaylib)
(import spork/netrepl)
(defn draw []
(let [[x y] (get-mouse-position)]
(draw-circle-gradient (math/floor x) (math/floor y) 31.4 :lime :red)
(draw-poly [500 200] 5 40 0 :magenta)
(draw-line-bezier
[(- x 100) y]
[(+ x 100) (+ y 50)]
4 :pink)
(draw-line-ex
[x (- y 10)]
[x (+ y 10)]
4 :sky-blue)
(draw-line-strip
[[x 0] [x 100] [50 y] [10 180]]
:ray-white)))
(netrepl/server-single)
(init-window 1024 768 "Test Game")
(set-target-fps 60)
(hide-cursor)
(while (not (window-should-close))
(begin-drawing)
(clear-background [0 0 0])
(draw)
(end-drawing))
(close-window)
So jaylib is setup, there is a window and a proper drawing loop . I also started a netrepl which should wait on incoming connections. Now I would telnet localhost port 9365 and update the draw function (again and again), and see my changes. So the plan. Maybe it would need some locking before updating the drawing, but in theory the plan should work. But netrepl seems not to evaluate anything. Also I tried the netrepl/client but the effect is the same.
from spork.
Related Issues (20)
- Typos in code & doc for word `probability` HOT 7
- assoc? Adding a few more functional operators
- what about `void exampleFunction();` ?
- http/request sends malformed "Host" header HOT 2
- timeit loop? HOT 13
- Add tooling for `janet_def` to cjanet HOT 2
- Missing prime number generator HOT 20
- Prime factorization? HOT 14
- Janet 1.30 - Spork not building on Windows 11 Pro Build 22621 HOT 3
- spork/json crashes janet on cycles
- Add chance to set the HTTP status in httpf HOT 2
- in argparse, a cfunction cannot be used for :map HOT 7
- `json/encode` and representing objects with `null` values HOT 4
- janet-netrepl -l VALUE and near-immediate client disconnection
- No error feedback when coerce-to-env fails for netrepl's server function HOT 1
- Extra call to string in receiver function returned by make-recv?
- getline: Ctrl-k does not delete from the cursor to the end of the line
- Do `exec-slurp` and `exec-slurp-all` benefit from tighter resource control? HOT 4
- spork/mdz eats whitespace HOT 4
- Curious code in `math.janet` HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spork.