DEV Community

Ben Halpern
Ben Halpern

Posted on

Bringing live REPL functionality to dev.to posts

I have been working on adding Klipse live REPL functionality to posts. It's not quite done for everybody to use, but here is the first post with that functionality. 😊

Here is a JavaScript REPL, for example.

    [1,2,3].map((x) => (x * 10) + 1 )
Enter fullscreen mode Exit fullscreen mode

I am still ironing out the details, so the functionality only works from my account for now, but this should be rolled out soon for all. It's a nice tool for certain posts that could make use of the interactivity for demonstration and learning. The code required to execute this functionality will only be present on pages that make use of this feature.

Here is the same map function as above, but in Ruby:

    [1,2,3].map { |x| (x * 10) + 1 }
Enter fullscreen mode Exit fullscreen mode

Big thanks to Yehonathan Sharvit, the primary maintainer of Klipse for proposing this integration.

Feedback is super welcome ✌️

Top comments (3)

Collapse
 
zilti_500 profile image
Daniel Ziltener

I guess this didn't ever pan out? :/

Collapse
 
peteerbruno profile image
Sticky Fingers

Super useful feature for the page
Keep up the good work!

Collapse
 
tbd profile image
TBD

is it disabled ? as it doesn't work anymore :(