Ask HN: Writing a Shell in Go, Advice 4 points by hello_computer 1y ago ↗ HN I like Go, and I'm thinking about writing a shell in it, but I'm not sure how well Go's runtime will play with fork and exec (probably not well). Any advice?
[–] evnix 1y ago ↗ I think it does it very well.Had some recent experience trying to write a shell and have it exposed over the web using websockets.There are some parts where you wish it behaved like C but it does the job and is more than sufficient for a shell.
[–] h4ck_th3_pl4n3t 1y ago ↗ Take a look at yaegi, it already can be used and embedded as a REPL and shell. [1][1] https://github.com/traefik/yaegi
2 comments
[ 2.1 ms ] story [ 17.0 ms ] threadHad some recent experience trying to write a shell and have it exposed over the web using websockets.
There are some parts where you wish it behaved like C but it does the job and is more than sufficient for a shell.
[1] https://github.com/traefik/yaegi