
https://try-racket.defn.io I was playing around with sandboxes yesterday and made this.


Each sandbox (tied to a visitor session) runs a restricted (max 60s duration per eval, max 128mb, no network or file access) #lang racket
7.5. The application itself runs in a further-restricted Docker container.

Nice!

Is there an API?

~> curl -H'Accept: application/json' -d'e=(* 1 2)' '<https://try-racket.defn.io/eval>'
{"result":"2","duration":375.739990234375,"output":""}
There is now!
Although this creates a new sandbox on every API request (assuming the session cookies aren’t retained and passed along with each API request), so hopefully folks won’t abuse it until I can add some IP rate limiting or at least make it expunge old sandboxes under memory pressure.

@brentgordon146 has joined the channel

@popa.bogdanp Feature request: Special handling of pict structs (like http://pasterack.org\|pasterack.org).

If you returned a key that enabled using the same sandbox again that would be great for creating a slack/irc bot

@samth the _sid
cookie that currently gets returned is effectively that. Subsequent requests with a Cookie: _sid=...
value will reuse the same sandbox until it expires.
@soegaard2 I’ll give that a try.

@soegaard2 done!

You are fast!

Hopefully I did it right. I’d never used pict before

Yup. My standard-fish looks fine.

script i made to take a safebooru url download the pic and save the tags associated with as an extended attribute only woks on macos and linux
