Live data from Hacker News

Show HN: I made an in-browser code editor with code replay and REPL

logicboard.com

1–10 of 29 posts

Show HN: I made an in-browser code editor with code replay and REPL

#1
I made a Logicboard.com — A collaborative code editor with code-replay feature.

Code-replay lets you run the coding session like a movie, I wrote a blog post on how I implemented this: https://logicboard.com/blog/code-replay

You can try out the demo here: https://logicboard.com/demo/:replay

And play around with the code editor here: https://logicboard.com/demo/

Logicboard also has an REPL shell, just type "start()" and hit enter in the output area.

Show HN: I made an in-browser code editor with code replay and REPL
logicboard.com

Re: Show HN: I made an in-browser code editor with code replay and REPL

#2
I'm curious if anyone would like to use the code-execution as a service. It's basically a websocket based API where you send a blob of code and get execution result as response.

In case of REPL, you send STDIN to websocket and get STDOUT as response. All code execution happens in separate Docker containers.

Re: Show HN: I made an in-browser code editor with code replay and REPL

#3
post #2

I'm curious if anyone would like to use the code-execution as a service. It's basically a websocket based API where you send a blob of code and get execution result as response. In case of REPL, you send STDIN to websocket and get STDOUT as response. All code execution happens in separate Docker containers.

Docker containers probably aren’t enough isolation. But throw some firecrackervm in the pot and you’ve got a stew going.

Re: Show HN: I made an in-browser code editor with code replay and REPL

#4
post #2

I'm curious if anyone would like to use the code-execution as a service. It's basically a websocket based API where you send a blob of code and get execution result as response. In case of REPL, you send STDIN to websocket and get STDOUT as response. All code execution happens in separate Docker containers.

> In case of REPL, you send STDIN to websocket and get STDOUT as response.

I wonder if repl.it ever did this, or if they've always used WebAssembly? (They definitely use wasm now.)

Re: Show HN: I made an in-browser code editor with code replay and REPL

#5
post #2

I'm curious if anyone would like to use the code-execution as a service. It's basically a websocket based API where you send a blob of code and get execution result as response. In case of REPL, you send STDIN to websocket and get STDOUT as response. All code execution happens in separate Docker containers.

Docker containers probably aren’t enough isolation. But throw some firecrackervm in the pot and you’ve got a stew going.

Repl.it uses Docker containers too, only recently started work on moving to better isolation mechanisms like VMs

Re: Show HN: I made an in-browser code editor with code replay and REPL

#6

Earlier quoted context omitted.

Docker containers probably aren’t enough isolation. But throw some firecrackervm in the pot and you’ve got a stew going.

Repl.it uses Docker containers too, only recently started work on moving to better isolation mechanisms like VMs

I'm using https://github.com/live-codes/livecodes to just move it all completely into the client with a replit-like alternative thing we're working on

Re: Show HN: I made an in-browser code editor with code replay and REPL

#7
post #2

I'm curious if anyone would like to use the code-execution as a service. It's basically a websocket based API where you send a blob of code and get execution result as response. In case of REPL, you send STDIN to websocket and get STDOUT as response. All code execution happens in separate Docker containers.

This would be interesting to me. There are a few options now, like Judge0, but the language versions are pretty out of date. Self-hosting is not a good time investment at the moment.

Email me at hn at vikas.sh if you have a service. I'd need an SLA for sure, and multi-file support would be nice to have.

Re: Show HN: I made an in-browser code editor with code replay and REPL

#8
post #7
post #2

I'm curious if anyone would like to use the code-execution as a service. It's basically a websocket based API where you send a blob of code and get execution result as response. In case of REPL, you send STDIN to websocket and get STDOUT as response. All code execution happens in separate Docker containers.

This would be interesting to me. There are a few options now, like Judge0, but the language versions are pretty out of date. Self-hosting is not a good time investment at the moment. Email me at hn at vikas.sh if you have a service. I'd need an SLA for sure, and multi-file support would be nice to have.

We serve production code execution use cases (mainly Python) with Jamsocket: https://jamsocket.com/

We've been running it for over a year and would be willing to talk about an SLA. Each instance gets its own gvisor-sandboxed runtime and we do some network isolation on top of that. (We also have some crypto miner mitigation, because if you provide free compute to strangers they will manage to find you.)

Re: Show HN: I made an in-browser code editor with code replay and REPL

#9
This allows outbound network access, allows program execution (within the container) and more.

You might want to restrict some of these things before Amazon shuts your account down for abuse requests.

You're basically handing everyone on the internet an EC2 instance to do literally anything with -- it'll be minutes to hours before this gets abused.

`uname` output from the container for example: Linux a976bf3f5ff7 4.14.193-113.317.amzn1.x86_64 #1 SMP Thu Sep 3 19:08:08 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Post reply on HN