Git Product home page Git Product logo

wasm-game-of-life's Introduction

Have you ever written C++ for your frontend?

This is a simple challange I took on myself.

  • Make a frontend webapp using ONLY C++.

I chose to imlement Conways game of life, a simple cellular automata with very cool emergent properties. For example, Conways Game of Life is Turing complete. Therefore, you can apparently simulate Conways Game of Life inside Conways Game of Life.

But why would you do this to yourself?

Becasue I love pain

But actually, a few reasons come to mind:

  1. Wasm is a cool new technology I wanted to learn about, and what is a better way to learn other then doing an actual project.
  2. Summer vacation is long and I wanted to keep my skills sharp (yes, I could have gone back to my project from last summer but I didn't want to).

And in the spirit of emergent properties, I wanted to use C at first as this was the last language I learned, but the compiler I used Cheerp had no C documentation. Hence

  1. I wanted to learn a bit of C++

How to run?

Compile using Cheerp wasm compiler

/opt/cheerp/bin/clang++ index.cpp -o dom.js -O3

Then use some server (I used vscode extension live server) to run index.html.

wasm-game-of-life's People

Contributors

afik-benshi avatar

Watchers

 avatar

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.