Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork23
-
Disliking that async AMPHP server code needs a restart after every code change so I started to try puzzle togethernrepl server for Phel using amphp libraries (byte-stream) that could run in same event loop as thehttp-server. Then application could be developed interactively. In general, I think it could provide better text editor integrations for interactive development with existing tooling (Emacs Cider, VSCode Calva, Cursive, Neovim ...), if it can be made work. Wrapping my head around bytestreams currently. Notedsome useful pieces in ilt-phel for inspecting Phel runtime info. |
BetaWas this translation helpful?Give feedback.
All reactions
👍 1
Replies: 4 comments
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
Basic "http repl" example working so far, just to see that code can modify the server process runtime state before doing any more advanced plumbing beforehand. Based on AMPHPevent-source.php example, usingDatastar library for swapping streamed html partials to view. rend.mp4Source:https://codeberg.org/jasalt/phel-snake-online/src/branch/main/src/httprepl.phel |
BetaWas this translation helpful?Give feedback.
All reactions
❤️ 1
-
nREPL allows using various transits but default isbencode, so wrapped a encoding/decoding PHP library so that it can be installed as composer dependency and called with Phel functions / data structures:https://packagist.org/packages/jasalt/phel-bencode Streaming encoding/decoding is not implemented which seems to be the main way in mainstream nRepl server implementations but buffering line by line as done currently seems to work good enough for now while testing the overall implementation. |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
Early version with Talking bencoded nREPL commands over socket to nREPL process, raw messages being: d2:op8:describee = {:op "describe} d4:code7:(+ 1 1)2:op4:evale = {:op "eval" :code "(+ 1 1)"} |
BetaWas this translation helpful?Give feedback.
All reactions
-
I got the Calva/VSCode connection working! There's some nREPL client specific glitches still, but I think connection should work with other text editor clients also (Neovim, Cursive, ...). Working primarily with Emacs Cider client myself but this should allow for better collaboration across editors regarding REPL stuff. linux_desktop_recording-2025-03-30_13.48.35.mp4Mirrored the repo to this platform also for conveniencehttps://github.com/jasalt/phel-nrepl where issues can be posted with reference to Phel issue tracker. Continuing with tidying up the ops so completions would render properly etc. and looking how to make get REPL |
BetaWas this translation helpful?Give feedback.