Coder Social home page Coder Social logo

gothon's Introduction

Build Status Go Report Card GoDoc

Gothon Gothon Logo

A Python interpreter written in Go written as part of the course Abstract Machines (german) at Vienna University of Technology.

🚨 ATTENTION: This codebase is not maintained. It only covers a small subset of all Python features. It should not be used in production. It exists for educational purposes.

Scope

Gothon is only an interpreter, not a compiler. It relies on CPython (the de facto standard Python runtime) to compile human readable source code into machine readable bytecode.

Gothon is intended to interpret bytecode (which is generated using CPython ahead of time) and actually run the program. It is limited in this aspect on purpose. The goal of the project (at least for now) is not to build a compiler, but a virtual machine that leverages the compiler built into CPython.

Current Status

Gothon is able to interpret the most basic instructions generated by CPython. This means arithmetic and function calls.

Future

It would be cool if Gothon would at some point be able to

  • resolve import statements.
  • understand classes.
  • deal with exception handling.
  • ...

like a production-grade runtime. Contributions to the project are welcome.

The Go Gopher was created by Renée French. The Python Logo is a registered trademark of the Python Software Foundation

gothon's People

Contributors

lorenzleutgeb avatar

Stargazers

小组会 avatar  avatar cmxjs avatar Christian Korneck avatar  avatar 0xfd avatar  avatar  avatar Breaker avatar ypcpy avatar itfanr avatar vulcangz avatar Peter Nirschl avatar Chen Kai avatar Mahmoud Rusty Abdelkader avatar  avatar  avatar  avatar irieda avatar Austin Ewens avatar west avatar Oleh Kuchuk avatar 修昊 avatar JM avatar Konstantinos avatar Siva avatar ma11o avatar Liel Ran avatar Gopal Sharma avatar AliBug avatar weimingtom avatar  avatar  avatar Doug Henderson avatar Ilya Dmitrichenko avatar Dreampuf avatar Felix  avatar roys avatar Kentaro Kawano avatar Keiji Matsuzaki avatar K.Takata avatar Ryota Yoshikawa avatar Matias Insaurralde avatar kaz399 avatar  avatar Masashi Fujita avatar Kyle Travis avatar MURAOKA Taro avatar neguse avatar orociic avatar Reza Rasouli avatar tkyf avatar kazuya kagawa avatar MOZGIII avatar Dusan Blagojevic avatar Eder Sosa avatar Zach Badgett avatar Miki Oracle avatar Yoshio Hara avatar Sean Johnson avatar Antoine GIRARD avatar OGURA Daiki avatar Hiroaki Nakamura avatar yasunori avatar SnowGushiGit avatar Koichi Shiraishi avatar Yuuki TSUBOUCHI avatar JINNOUCHI Yasushi avatar denzow avatar cocoatomo avatar Kiyoshi Nomo avatar Kenta Mori avatar yowatari avatar Yoshi Yamaguchi avatar Kenta SUZUKI avatar  avatar Nick Craig-Wood avatar Issac Trotts avatar Dario Castañé avatar Ezequiel Lovelle avatar Auke Willem Oosterhoff avatar SHIMIZU Taku avatar Xabier Larrakoetxea Gallego avatar Saúl Ibarra Corretgé avatar OKAMURA Naoki aka nyarla / kalaclista avatar  avatar Tengu Saruta avatar

Watchers

 avatar Sebastien Binet avatar Landon Jurgens avatar yusuf avatar  avatar  avatar

gothon's Issues

Error in Build!

$ sudo chmod +777 fetchbench.sh

$ ./fetchbench.sh

.
.
.
.
U benchmarksgame/bench/threadring/threadring.rust
U benchmarksgame/bench/threadring/threadring.rust-2.rust
U benchmarksgame/bench/threadring/threadring.sbcl
U benchmarksgame/bench/threadring/threadring.sbcl-2.sbcl
U benchmarksgame/bench/threadring/threadring.vw-2.vw
U benchmarksgame/bench/threadring/threadring.yarv
U benchmarksgame/bench/threadring/threadring.yarv-2.yarv
'benchmarksgame/bench/revcomp/revcomp.python3-4.python3' -> './test/revcomp.py'
'benchmarksgame/bench/fannkuchredux/fannkuchredux.python3-4.python3' -> './test/fannkuchredux.py'

$ make

go get -d
go test
?   	github.com/lorenzleutgeb/gothon	[no test files]
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/guest/go"
GORACE=""
GOROOT="/usr/lib/go-1.8"
GOTOOLDIR="/usr/lib/go-1.8/pkg/tool/linux_amd64"
GCCGO="/usr/bin/gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build586160022=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
go version go1.8 linux/amd64
go build -work -x -v -o 'gothon' \
	-ldflags "-X main.Version '1533f26' -X main.BuildTime '2017-04-16T18:16:19+04:30'"
WORK=/tmp/go-build469966212
github.com/lorenzleutgeb/gothon
mkdir -p $WORK/github.com/lorenzleutgeb/gothon/_obj/
mkdir -p $WORK/github.com/lorenzleutgeb/gothon/_obj/exe/
cd /home/guest/go/src/github.com/lorenzleutgeb/gothon
/usr/lib/go-1.8/pkg/tool/linux_amd64/compile -o $WORK/github.com/lorenzleutgeb/gothon.a -trimpath $WORK -p main -complete -buildid 58ef92c5d82b53a6922427c87fd97e7a1b3d6019 -D _/home/guest/go/src/github.com/lorenzleutgeb/gothon -I $WORK -pack ./args.go ./builtin.go ./code.go ./frame.go ./function.go ./gothon.go ./marshal.go ./module.go ./object.go ./reader.go ./stack.go ./sys.go ./types.go
cd .
/usr/lib/go-1.8/pkg/tool/linux_amd64/link -o $WORK/github.com/lorenzleutgeb/gothon/_obj/exe/a.out -L $WORK -extld=gcc -buildmode=exe -buildid=58ef92c5d82b53a6922427c87fd97e7a1b3d6019 -X main.Version 1533f26 -X main.BuildTime 2017-04-16T18:16:19+04:30 $WORK/github.com/lorenzleutgeb/gothon.a
# github.com/lorenzleutgeb/gothon
/usr/lib/go-1.8/pkg/tool/linux_amd64/link: -X flag requires argument of the form importpath.name=value
Makefile:9: recipe for target 'all' failed
make: *** [all] Error 2

how fix?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.