TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

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

65 pointsby yi_xuanabout 2 years ago
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.

4 comments

limaabout 2 years ago
You might also want to take look at Starlark, which has a Go implementation: <a href="https:&#x2F;&#x2F;github.com&#x2F;google&#x2F;starlark-go">https:&#x2F;&#x2F;github.com&#x2F;google&#x2F;starlark-go</a>
评论 #35658573 未加载
manfreabout 2 years ago
It&#x27;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.
评论 #35652285 未加载
weppleabout 2 years ago
This is based on the interpreter-in-go book by thorsten ball, right? Might want to give a little credit there
评论 #35652507 未加载
samanatorabout 2 years ago
Another python implementation in golang:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;go-python&#x2F;gpython">https:&#x2F;&#x2F;github.com&#x2F;go-python&#x2F;gpython</a>