from Hacker News

Show HN: Gsubpy, an interpreter for subset of Python, written in Go

by yi_xuan on 4/21/23, 10:17 AM with 8 comments

Recently, I write an interpreter for subset of Python using Go. I haven't seen source code of CPython, all is just written according to my understanding of Python so there may be some unusual things. Hope you can play fun with it. Any suggestion is welcome, glad to get some feedback.
  • by lima on 4/21/23, 12:51 PM

    You might also want to take look at Starlark, which has a Go implementation: https://github.com/google/starlark-go
  • by manfre on 4/21/23, 11:18 AM

    It's such a small subset that it would more accurately be described as a scripting language with syntax similar to python for single file scripts.
  • by wepple on 4/21/23, 11:41 AM

    This is based on the interpreter-in-go book by thorsten ball, right? Might want to give a little credit there
  • by samanator on 4/21/23, 12:58 PM

    Another python implementation in golang:

    https://github.com/go-python/gpython