Giter VIP home page Giter VIP logo

insult-go's Introduction

Insult Generator (Wasm)

I was so tickled by the InsultAPI developed by ncitron that I thought I'd give it a Go (pun intended) and implement with Web Assembly and WASM. It's a relatively simple application because it randomly selects an insult from a list and returns it to the browser, and if you've selected to randomize, it will generate by selecting two adjectives and a noun randomly.

img/insult.png

Unlike it's previous art, the goal isn't to provide an API, but a simple interface for generating insults (and copy pasting them wherever they are needed!)

Check out the interface here!

Usage

You can easily interact with the online version. If you want to develop, you'll need GoLang version 1.13 or higher, and to install emscripten.

Docker

The provided Dockerfile will also install emscripten and compile, but there are some issues with the mime type not being understood (hopefully this will be resolved with some time!)

$ docker build -t vanessa/insult-go .

It will also install emscripten, add the source code to the repository, and compile to wasm. You can then run the container and expose port 80 to see the compiled interface:

$ docker run -it --rm -p 80:80 vanessa/insult-go

Again, when I tested this the first time it worked okay, and for some reason, it didn't the second time. If anyone hits the bug and can contribute a solution, please open a pull request!

insult-go's People

Contributors

vsoch avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  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.