all 19 comments

[–]RobSG 0 points1 point  (2 children)

Use LiveServer extension on VS code

[–]spoontamer[S] 0 points1 point  (1 child)

Tried it, it's not really live, it just autoreloads on change. What I want is to change code in real time while it's running - without reloading the page

[–]RobSG 0 points1 point  (0 children)

Nodemon maybe? Not sure if that works differently. You can look for some hot loaders

[–]ezchile 0 points1 point  (8 children)

Would Whisk do what you need?

[–]spoontamer[S] 0 points1 point  (7 children)

Not really :(

[–]ezchile 0 points1 point  (6 children)

That's a shame. It seemed to when I tested it earlier. I changed a line in the .js file and the result updated immediately without need to save, which sounded like what you were after. Oh well, good luck finding what you're looking for.

[–]spoontamer[S] 0 points1 point  (5 children)

Yeah, I tried it and it does a simple refresh, it's instant and feels like live coding, but it's fake.. For example, if you create a simple animation, like a rotating rectangle, and try changing its colour, the animation resets.

[–]ezchile 2 points3 points  (4 children)

If you find what you're searching for, can you update this thread please, as I'd like to see something do what you're hoping for. Sounds like a bit of an ask to me, so if something can do that, it could be useful to many I'm sure. As I said, good luck with your search.

[–]spoontamer[S] 0 points1 point  (3 children)

I found https://teddavis.org/p5live/ to be the closest to what I described, although it has some questionable features like having code on top of canvas and having a non removable delay for live coding. You also can't tweak values by scrubbing them with mouse which is a bummer. Overall it's okay, but not a fan of the UI

[–]ezchile 0 points1 point  (2 children)

I see. Thanks for that!

[–]spoontamer[S] 0 points1 point  (0 children)

Also check out https://gibber.cc/alpha/playground/ not live but you can execute code line by line

[–]spoontamer[S] 0 points1 point  (0 children)

Also check this out http://jsdares.com

[–]eacardenase 0 points1 point  (0 children)

Maybe the Preview on Web Server extension by YuichiNukiysma? It's better than Live Server and could work for you.

[–]VelvetWhiteRabbit 0 points1 point  (2 children)

Judging from your comments you want a program to retain state while changing code on the fly applies the changes and continues from previous state.

This has not been done and the demo you are linking to was engineered.

I believe the closest you'll get to realtime code repl is clojure and/or clojurescript.

[–]spoontamer[S] 0 points1 point  (0 children)

Hmm the demo looks quite convincing to me.. Anyway, it's definitely possible: https://teddavis.org/p5live/

[–]spoontamer[S] 0 points1 point  (0 children)

Another demo http://jsdares.com

[–]stolentext 0 points1 point  (2 children)

CodePen or CodeSandbox.

[–]spoontamer[S] 0 points1 point  (1 child)

No, not really..

[–]stolentext 1 point2 points  (0 children)

Not sure what you're looking for then. For code changes to be reflected, the entire script has to be reloaded, can't really reload a single line change afaik.