Andrew Healey writes programming projects and tutorials on topics like sandboxing JavaScript, compilers, WebAssembly, and unusual renderings like Doom in checkboxes.
HN commenters link his posts on sandboxing JavaScript, Doom rendered via checkboxes, and chess bitboards, and call them great write-ups.
Obviously general purpose programming language(s) excluded[0]. -- per 'minimal'
Does usable / minimal mean no ecosystem / integrated development environment? No ecosystem/IDE would seem to exclude command line shell & unix 'one program does one thing well'chaining/sourcing. 'Excel as a Turing-complete Functional Programming Environment' would be excluded too![8]. Do at least need the ability to abstract/store & forward to get away from 'endless tape streams'. (traditional grep vs. grep with 'state awareness')
Would seem to some what depend on the domain of discourse.
1) Esoteric Programming Languages:
"Let's Take Esoteric Programming Languages Seriously"[1][2].
Is a metaphor programming language an esoteric IDE?[3] (vs. apl/mumps)
2) Domain Specific Languages[4]:
Usable/minimal with a philosophical background : 'mov is turing complete'[5]
symbolic macro application of electrical engineering concepts of NAND[6]
APL works for some enginering backrounds.
One can assemble a checklist of doom[7]
-------------------------------------------------------------------
[0] : https://en.wikipedia.org/wiki/General-purpose_programming_language
[1] "Let's Take Esoteric Programming Languages Seriously" : https://news.ycombinator.com/edit?id=48334594
[2] "The Hacker Folk Art of Esoeric Coding" : https://news.ycombinator.com/item?id=45371188
[3] "Esolang, the esoteric progrmaming languages wiki": https://news.ycombinator.com/item?id=16894676
…
Great question!
Andrew Healey wrote a great blog post about sandboxing, particularly related to us: https://healeycodes.com/sandboxing-javascript-code
And we recently launched more secure semantics: https://blog.val.town/blog/restricted-library-mode
But in the general case, it's a hard, never-ending cat-and-mouse game, particularly with free and unauthenticated use. We will eventually probably need to restrict use severely unless you have somehow proved you're a real person (ie connect to your github account) or are a paying customer.
Yeah, that's what I was thinking: just throw the whole lot inside a Docker container and call it a day. Unless you're dealing with potentially malicious code that could break out of a container, that should isolate the rest of your machine sufficiently.
Alternatively, PyPy is actually fully sandboxable.
On Linux, you can also use `seccomp.` See, for instance, https://healeycodes.com/running-untrusted-python-code
I wrote about building the boids flocking simulation with Ebiten and deploying it with WebAssembly[0].
I found Ebiten very easy to build a simple project with. The project maintainer is helpful, kind, and highly responsive too.
There is a #ebiten channel in the Gophers slack that is quite active.
-
[0] https://healeycodes.com/boids-flocking-simulation/
Relevant:
https://discuss.python.org/t/extending-subinterpreters-with-sandboxing-capabilities/45355
https://stackoverflow.com/questions/3068139
https://wiki.python.org/moin/SandboxedPython
https://github.com/jailctf/pyjailbreaker
https://healeycodes.com/running-untrusted-python-code
https://lwn.net/Articles/574215/
Andrew Healey just took a pass at this and did a great write-up about it here:
https://healeycodes.com/doom-rendered-via-checkboxes
It looks decent but dithering would be nice so I created an issue for it here: https://github.com/bryanbraun/checkboxland/issues/20