Skip to content

generate Shakespearean insults with GoLang and Web Assembly. Because why not.

License

Notifications You must be signed in to change notification settings

vsoch/insult-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!

About

generate Shakespearean insults with GoLang and Web Assembly. Because why not.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published