gobackwards
play

GoBackwards Go, but worse. Much worse. Shaquan Nelson (sdn2115) - PowerPoint PPT Presentation

GoBackwards Go, but worse. Much worse. Shaquan Nelson (sdn2115) Julian Silerio (jjs2245) Peter Richards (pfr2109) What is GoBackwards? Go is an open source programming language that makes it easy to build simple, reliable, and


  1. GoBackwards Go, but worse. Much worse. Shaquan Nelson (sdn2115) Julian Silerio (jjs2245) Peter Richards (pfr2109)

  2. What is GoBackwards? “Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.” The Go Gopher

  3. What is GoBackwards? GoBackwards is dumber simpler! ??? The GoBackwards Gopher

  4. Language Comparison “Hello World” in Go “Hello World” in GoBackwards package main import "fmt" func main() { func main() { fmt.Println("hello world") println("hello world"); } }

  5. Language Comparison “Fibonacci Sequence” in Go “Fibonacci Sequence” in GoBackwards package main func fib(x int) { if (x < 2) return 1; import "fmt" return fib(x-1) + fib(x-2); // fib returns a function that returns } // successive Fibonacci numbers. func fib() func() int { func main() { a, b := 0, 1 var x int; return func() int { for(x=0; x<6; x = x+1) { a, b = b, a+b return a print(fib(x)); } } } return 0; func main() { } f := fib() fmt.Println(f(), f(), f(), f(), f()) }

  6. Language Tutorial ● ● Declarations Expressions ○ ○ Variables and Types Literals ■ ■ Integers var x int; String “Hello World!” ■ ■ Booleans var x bool; 42 Number ■ ■ Strings var x string; True | false Boolean ○ ○ Arrays Assignment ■ ■ var x[5] int; Declaration ■ x[3] = 3; var x int; x= 10; ○ ○ Functions Arithmetic Operators ■ Built in Main Function func ■ +, -, *. / print(30 / 15); main(){} ○ Built in Function Calls ■ Helper functions ■ Call Ascii ascii(“star.png”); func id( id type, id ■ Call Print print(34); type,...){ }

  7. Language Tutorial ● Declarations ○ Variables and Types ■ Integers var x int; ■ Booleans var x bool; ■ Strings var x string; ○ Arrays ■ var x[5] int; ■ x[3] = 3; ○ Functions ■ Built in Main Function func main(){} ■ Helper functions func id( id type, id type,...){ }

  8. Compiler pipeline

  9. Example program

  10. Testing Edge Case Automation: Testing: Test-Driven ./test.sh Development making sure the user ./exe.sh - filepath knew what was and was not allowed

  11. Conclusion ● Major goals Make a Language Similar to Go 1. 2. Remove Some capabilities of Go to Make A More C-like Language 3. Add picture-to-ASCII conversion capabilities to Go ● Success ? ○ Successful implementation of basic Go syntax with C syntactic sugar ○ ASCII function is dependent on external C library ○ Overall successful group project despite tough road with many roadbumps

Recommend


More recommend