GithubHelp home page GithubHelp logo

lua-toys's Introduction

lua-toys

A small collection of GPL3-licensed toy programs created to help me learn Lua. All of the toys are presented as shell scripts that can be run from the command line, so no need to explicitly invoke Lua.

gol

An implementation of Conway's Game of Life. Accepts pattern files depicting a starting state with _ representing a dead cell and # representing a live cell (see the example files in gol_patterns/) and generates a given number of generations.

gol accepts two switches: -p tells gol to print the results to the terminal, whereas -i tells it to generate an animated GIF, <INPUT_FILE>.gif. Note that -i is dependent upon ImageMagick and gifsicle being installed.

Example usage (print the first 30 generations of tumbler.gol to the terminal):

gol -p gol_patterns/tumbler.gol 30

quine

A Quine. Prints its own source code.

Example usage:

quine

rekt

A rektangle generator, in respose to this post on r/dailyprogrammer. Accepts a string, a width and a height, and generates a rektangle of those dimensions.

Example usage:

rekt REKT 4 3

Output:

R E K T K E R E K T K E R 

E     K     E     K     E 

K     E     K     E     K 

T K E R E K T K E R E K T 

K     E     K     E     K 

E     K     E     K     E 

R E K T K E R E K T K E R 

E     K     E     K     E 

K     E     K     E     K 

T K E R E K T K E R E K T 

lua-toys's People

Contributors

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