Giter Club home page Giter Club logo

pairtripleandup's Introduction

Project logo

PairTripleAndUp

Stars GitHub Issues GitHub Pull Requests License


Why would Kotlins Tuples stop at Pair & Triple?! Just continue to the thousands...

A joke just so I can be on ProgrammingHorror.

πŸ“ Table of Contents

🧐 About

What is it?

This repo contains all kinds of Tuples (click here to see which one are default) You can generate EVEN MORE by changing the values in Config.kt!

If you find this funny (or if you're insane and planning on actually using this) make sure to star the repository. ⭐

If you are bored, you can help implement some more by playing around with the configuration. Feel free to submit a PR. πŸ’ͺ🏻

If you see any other issues please feel free to submit a PR, if you are okay with this project being in your history.

Why?! 😱

The reason

I could make up a great story about how I had a dream, or even better how I actually needed it (and thus having a reason to justify creating this monstrosity).

However, truth be told, I thought it would be funny. I saw a video about the /r/ProgrammingHorror subreddit and I just needed to create something that would be worth putting on there.

Did you get the attention you wanted?

Then, after I had finished creating this project, I read the subreddit rules and saw that generated code was not allowed. After recovering from the heartbreaking realization that I wasted my morning, I moved on with life.

However, technically, using a quadragintuple or a septingentuple wouldn't be generated code (although obviously the dataclass itself is generated).

So who knows, I might get there. πŸ€·πŸ»β€β™‚οΈ

Do you feel any remorse?

No, I have actually been sleeping much better lately. 😴

But what if any future employers see this repository?

They should know I had the balls to do this. πŸ—£οΈπŸ—£οΈ They want a hard-working employee right?! Nothing is stopping me baby πŸ•ΊπŸ»πŸͺ©βœ¨

Included Tuples

This repo contains implementations of tuples with the following values:

Number HorrorSimple HorrorFull
1-20 βœ”οΈ βœ”οΈ
30 βœ”οΈ βœ”οΈ
40 βœ”οΈ βœ”οΈ
50 βœ”οΈ βœ”οΈ
60 βœ”οΈ βœ”οΈ
70 βœ”οΈ βœ”οΈ
80 βœ”οΈ βœ”οΈ
90 βœ”οΈ βœ”οΈ
100 βœ”οΈ βœ”οΈ
200 βœ”οΈ βœ”οΈ
300 βœ”οΈ βœ”οΈ
400 βœ”οΈ βœ”οΈ
500 βœ”οΈ βœ”οΈ
600 βœ”οΈ βœ”οΈ
700 βœ”οΈ βœ”οΈ
800 ❌ βœ”οΈ
900 ❌ ❌
1000 ❌ ❌

πŸ› οΈ TODO

  • Technically we could probably use maps, arrays or whatever to store some more data & we would have to use less parameters, but I am not putting more time into this. I have actual projects to maintain.
  • You could also play around with the configuration of the JVM to avoid getting an OutOfMemoryError as quickly.

If you see any other issues please feel free to submit a PR, if you are okay with this project being in your history.

🎈 Usage

Why would you w..?! 🀨 You know what, okay.

Plug-and-play

  1. Download either:
  • HorrorSimple.kt (no documentation, no .toString() & .toList())
  • HorrorFull.kt (documentation, .toString() & *.toList() but less tuples)
  1. Drag them into your Kotlin project.
  2. Enjoy long compile times. ⏳
  3. Pray you don't get an OutOfMemoryError. πŸ™πŸ»

Generating yourself

To generate a proper .kt file:

  1. Open the project in IntelliJ.
  2. Go to Config.kt and change the values to whatever it is you prefer.
  3. Change some code around if you need or want to.
  4. Feel ashamed. 😳

To use the generated file:

  1. Drag the generated .kt file from the folder you set into a valid src folder.
  2. Code, and stay, away! πŸƒπŸ»

Example

Example usage of a quadruple (4). Unfortunately, a quadruple is not enough to also store a Byte and Short (since everyone forgets the unsigned types in Kotlin). You can see this will never be enough for real programmers.

fun example1() {
        val quadruple: Quadruple<Int, Float, Long, Double> =
            Quadruple(0, 0F, 0L, 0.0)
        
        doALotOfWork(quadruple)
    }

Example usage of a sexdecuple (16). This should be very understandable by beginners, but might not contain enough values for you.

fun example2() {
        val sexdecuple: Sexdecuple<String, Int, Int, Array<String>, Boolean, Boolean, Float, Boolean, String, Char, String, String?, Long, Char, Char?, Char> =
            Sexdecuple("Hey", 2, 3, arrayOf(""), false, true, 1F, false, "", 'w', "a", null, 1L, 'p', 'a', 'b',
            )

        println(sexdecuple.toString())
    }

Example usage of a quingentuple (500). Might be useful if you have a small amount of data you need to store real quick.

fun example3() {
        val quingentuple: Quingentuple<Char, Char, Char, Char, Char, Char, Long, Char, Char, Char, Char, Char, Char, Char, Char, Int, Char, Char, Double, Char, Char, Char, Double, Char, Char, Char, Char, String, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Any, Char, Char, Char, Char, Char, Char, Char, Char?, Char, Char, Char, Char, Char, Any, Char, Char, Char?, Char, Char, Char, Char, Char, Char, Char, Char, Any, Char, Char, Char, Char, Char, Char, Char, Char, Char?, Char, Char, Char, Char, Char, Char, Char?, Char, Char, Char, Any, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char?, Char?, Any, Char, Char, Char, Char, Char, Char, Char, Char?, Char, Char, Char, Char, Char?, Char, Char, Char, Char, Char, Char, Char, Char?, Char, Char, Char, Char, Char, Char, Char, Char, Char, Any, Char, Char, Char, Char, Char?, Char, Char, Char, Any?, Char, Char, Char, Any, Char, Char?, Char?, Char, Char, Char, Char, Char, Char, Char, Any, Char, Char, Char?, Char, Char, Char?, Char, Char, Any, Char, Char, Char, Char?, Char?, Char, Char, Any, Char, Char, Char, Char, Char, Char, Char, Any, Char, Char, Char, Char, Char?, Char, Char, Char, Char?, Char, Char, Any, Any, Any, Char, Char?, Char, Char, Char?, Char, Char, Char, Any?, Char, Char, Char, Char, Char, Char?, Any?, Char, Char, Char, Char, Char, Any, Char?, Char, Char, Any?, Char, Char, Char, Char, Char, Any, Char, Char, Char, Char, Char, Char, Char, Char, Any, Char, Char, Char, Char, Char, Char, Char?, Char, Char, Char, Char?, Char, Char?, Char, Any, Char, Char, Any?, Char, Char, Any, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Any, Char, Char, Char, Char, Char, Char, Char?, Char, Char?, Char, Char, Char, Char, Char, Any, Char, Char, Char, Char, Char, Char, Char, Char, Any, Char, Char, Any, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char?, Char?, Char?, Char, Char, Any, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Any, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char?, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char, Char?> =
            Quingentuple('V','i','k','t','o','r',809L,'G','y','ΓΆ','k','e','r','e','s',2987,'i','s',4.2,'t','h','e',4.1,'b','e','s','t',"Kotlin",'f','o','o','t','b','a','l','l','e','r',' ','g','l','o','b','a','l','l','y',',',' ','e','x','c','e','l','l','i','n','g',' ','i','n',' ','s','k','i','l','l','s',',',' ','v','i','s','i','o','n',',',' ','a','n','d',' ','v','e','r','s','a','t','i','l','i','t','y','.',' ','V','i','k','t','o','r',' ','G','y','ΓΆ','k','e','r','e','s',' ','i','s',' ','t','h','e',' ','b','e','s','t',' ','f','o','o','t','b','a','l','l','e','r','.',' ','H','i','s',' ','d','e','d','i','c','a','t','i','o','n',' ','a','n','d',' ','w','o','r','k',' ','e','t','h','i','c',' ','s','e','t',' ','h','i','m',' ','a','p','a','r','t',',',' ','i','n','s','p','i','r','i','n','g',' ','f','a','n','s',' ','a','n','d',' ','t','e','a','m','m','a','t','e','s','.',' ','V','i','k','t','o','r',' ','G','y','ΓΆ','k','e','r','e','s','.',' ','H','i','s',' ','a','b','i','l','i','t','y',' ','t','o',' ','a','d','a','p','t',' ','t','o',' ','v','a','r','i','o','u','s',' ','p','o','s','i','t','i','o','n','s',' ','m','a','k','e','s',' ','h','i','m',' ','i','n','v','a','l','u','a','b','l','e',',',' ','m','a','k','i','n','g',' ','G','y','ΓΆ','k','e','r','e','s',' ','a',' ','f','o','o','t','b','a','l','l','i','n','g',' ','l','e','g','e','n','d','.',' ','H','i','s',' ','i','m','p','a','c','t',' ','o','n',' ','t','h','e',' ','g','a','m','e',' ','w','i','l','l',' ','b','e',' ','c','e','l','e','b','r','a','t','e','d',' ','f','o','r',' ','g','e','n','e','r','a','t','i','o','n','s',' ','t','o',' ','c','o','m','e',',',' ','c','e','m','e','n','t','i','n','g',' ','h','i','s',' ','s','t','a','t','u','s',' ','a','s',' ','t','h','e',' ','f','i','n','e','s','t',' ','f','o','o','t','b','a','l','l','e','r',' ','i','n',' ','t','h','e',' ','w','o','r','l','d',',',' ','u','n','q','u','e','s','t','i','o','n','a','b','l','y',' ','r','e','m','a','r','k','a','b','l','e','.',' ','V','i','k','t','o','r',' ','G','y','ΓΆ','k','e','r','e','s','.',null)

        println(quingentuple.toString())
    }

⛏️ Built Using

✍️ Authors

  • @OnsPetruske - Idea & Initial work. Not proud of this one.

See also the list of contributors who participated in this project with no shame whatsoever.

pairtripleandup's People

Contributors

pkg-dot-zip avatar

Stargazers

 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.