Skip to content

Instantly share code, notes, and snippets.

@cyberglot
Last active January 17, 2018 16:00
Show Gist options
  • Save cyberglot/612a2422102986e1393211372a7ac4c7 to your computer and use it in GitHub Desktop.
Save cyberglot/612a2422102986e1393211372a7ac4c7 to your computer and use it in GitHub Desktop.

Supervisor

Junia Gonçalves

PhD Student at RUC, advised by Morten Rhiger.

Main interests

  • Functional Programming
  • Programming Languages
  • Parallel and Concurrent Programming
  • Blockchain and Cryptocurrencies

Project Ideias

"Let's build a programming language"

1. A drawing language/game

Turtle Graphics is a well-known system for drawing geometric shapes on a Cartesian plane. It is usually accompanied by a programming language to specify how the shapes should be drawn.

The programming language usually looks like this:

using Luxor, Colors
Drawing(600, 400, "assets/figures/turtles.png")
origin()
background("midnightblue")

🐢 = Turtle() # you can type the turtle emoji with \:turtle:
Pencolor(🐢, "cyan")
Penwidth(🐢, 1.5)
n = 5
for i in 1:400
    Forward(🐢, n)
    Turn(🐢, 89.5)
    HueShift(🐢)
    n += 0.75
end
fontsize(20)
Message(🐢, "finished")
finish()

[source]

How drawing in Turtle Graphics looks like (in its simpliest form):

[source]

There are many implementations of such a language, both for 2D and 3D coordinate systems, for example, a new implementation in Rust called Rurtle.

You can create a game based on Turtle Graphics with your own crazy rules. Apple has used the Turtle Graphics engine to create a game to teach the Swift programming language called Swift Playgrounds.

Main takeaways from this project

  • learn how to build a small programming language
  • experiment with generative programming
  • learn about graphic systems

2. A Zork-like game

Zork is a classic text-based interactive game where the user gives commands in an English-like language. You can play Zork online.

There are many possibilities here for creating a game in any natural language and in any style. For instance, you can create an escape room game in a Danish-like language.

Main takeaways from this project

  • learn how to build a "natural language" parser
  • learn the basics of machine learning applied to natural language processing
  • learn the basics on how to build an interpreter

3. A smart contract language for a blockchain

Blockchain and cryptocurriencies are on the rise, but sadly smart contracts are on its absolute infancy. Many companies are trying to come up with a good language for smart contracts that is safe and unable to express all kinds of programs. The simpliest language is Simplicity, which is heavily-based on regular expressions. You don't need to come up with the perfect smart contract language, but you should be able to create an extremely simple language to handle blockchain contracts (even if you want to do crazy things with it).

Among all project ideas, this one is probably the most demanding as you will need to learn some theory and lingo related to programming languages design.

Main takeaways from this project

  • learn about smart contracts and blockchain
  • learn how to specify a small programming language
  • learn how to build a small programming language

4. A programming language that compiles to webassembly

WebAssembly (wasm, WA) is web standard that defines a binary format and a corresponding assembly-like text format for executable code in Web pages. It is meant to enable executing code nearly as fast as running native machine code. It was envisioned to complement JavaScript to speed up performance-critical parts of web applications and later on to enable web development in other languages than JavaScript. It is developed at the World Wide Web Consortium (W3C) with engineers from Mozilla, Microsoft, Google and Apple. [source]

Webassembly is a promise to bring high-quality game engines to the browser and create faster webapps. It also brings the opportunity for escaping JavaScript and creating new languages for the web. Learn more about Webassembly.

In this project, you will be able to create either a general programming language or a domain-specific one targeted to solve a problem or demand. The project is somewhat demanding because you will need to learn about webassembly and how compiling to webassembly works.

Main takeaways from this project

Mixing ideas

You can also mix the ideas showcased here and come up with a new project. For instance, a turtle graphics language that compiles to webassembly (there is already a Rust-to-webassembly compiler, so you can work on a way to embed your language in Rust and compile it to webassembly) or a weird smart contract language/game that gives you coins when you manage to find rare items in escape rooms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment