Giter Site home page Giter Site logo

rc-quines's Introduction

Recurse Center Quine Game

This is a github-based game for people at the Recurse Center.

What are quines?

Quines are programs that -- if you run them -- output a string that is equal to their source code. It's a fun puzzle to figure out how to write a quine, so we won't give any hints in this README. Also, beware of spoilers when browsing this repo, which will contain lots of quines, or when googling quines.

The game

If you want to play this game, just submit a PR to this repo that contains a quine, in a language of your choice. CI will check whether the program you've submitted is actually a quine. If CI passes, you have won the game. (Yay!)

Also, you can ping us in a github comment @soenkehahn and we will merge the PR. This way, we hope that this repo will become a fun collection of interesting and creative quines.

How to submit a PR?

Fork this repo. Then, the workflow depends on whether you submit code for an interpreted language like Python or Ruby or a compiled language like C.

Interpreted languages

Create a PR that adds a new directory to this repo that contains one file called quine. That file has to be executable (chmod +x ./quine) and it'll be executed without specifying an interpreter, so it should probably include a shebang. A shebang is a line at the beginning of your script that tells your shell which interpreter to run. For example, to submit a python quine, add a shebang at the beginning like so:

#!/usr/bin/env python

More information about shebangs here.

Here's an example of such a PR (that is not a quine, to avoid spoilers.)

Compiled languages

Create a PR that adds a new directory to this repo that contains one file called quine.ext, where ext is the appropriate file extension for the language you're submitting. See the supported languages.

Checking results

After submitting a PR, you can monitor CI to see the quine-checker checking your PR. Here's a link: https://circleci.com/gh/soenkehahn/rc-quines

The quine-checker

The quine-checker is implemented here. You can install it to check your quines locally. But you don't have to use it, you can also just rely on CI.

Cheating encouraged

People sometimes argue about what is a valid quine and what is not. For example, reading from the file system is sometimes considered to be cheating.

We disagree and think it's a lot of fun to figure out how to cheat in creative ways. If you can fool the automated quine-checker on CI, we'll consider your program a quine and merge the PR. So, feel free to cheat.

We won't merge PRs that do 'extreme cheating' such as messing with other people's quines or with the quine-checker, because that would break the game for others. However, we still look forward to receiving PRs like that.

Supported languages

Currently the supported interpreted languages are:

  • bash
  • python
  • javascript (through node)
  • haskell (through ghc's runhaskell)
  • ruby
  • R (via Rscript)

and the supported compiled languages are:

  • C , must use .c extension (via gcc)
  • rust , must use .rs extension (via rustc)
  • go , must use .go extension (via go build)

We will add more languages quickly depending on interest. If your favourite language is not yet supported, feel free still to create a PR. We will try to add support for that language. Alternatively, we very much welcome PRs for the quine-checker itself adding support for more languages.

rc-quines's People

Contributors

soenkehahn avatar egeromin avatar

Watchers

James Cloos avatar Not Real 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.