{"id":13473847,"url":"https://github.com/MinhasKamal/CreepyCodeCollection","last_synced_at":"2025-03-26T19:34:49.480Z","repository":{"id":37334111,"uuid":"66758410","full_name":"MinhasKamal/CreepyCodeCollection","owner":"MinhasKamal","description":"A Nonsense Collection of Disgusting Codes","archived":false,"fork":false,"pushed_at":"2024-05-02T10:12:21.000Z","size":99,"stargazers_count":2382,"open_issues_count":8,"forks_count":135,"subscribers_count":99,"default_branch":"master","last_synced_at":"2025-03-24T00:38:18.392Z","etag":null,"topics":["code-golf","creepy-codes","esoteric","esoteric-language","golf","golfing","mandelbrot","obfuscated","polyglot","programming","programming-language","quine","signature"],"latest_commit_sha":null,"homepage":"https://minhaskamal.github.io/CreepyCodeCollection/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MinhasKamal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-28T08:43:19.000Z","updated_at":"2025-03-22T09:00:56.000Z","dependencies_parsed_at":"2024-12-13T18:06:57.447Z","dependency_job_id":"5393d966-93eb-471b-a09e-f72fa3737bc9","html_url":"https://github.com/MinhasKamal/CreepyCodeCollection","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MinhasKamal%2FCreepyCodeCollection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MinhasKamal%2FCreepyCodeCollection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MinhasKamal%2FCreepyCodeCollection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MinhasKamal%2FCreepyCodeCollection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MinhasKamal","download_url":"https://codeload.github.com/MinhasKamal/CreepyCodeCollection/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245722960,"owners_count":20661856,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code-golf","creepy-codes","esoteric","esoteric-language","golf","golfing","mandelbrot","obfuscated","polyglot","programming","programming-language","quine","signature"],"created_at":"2024-07-31T16:01:07.449Z","updated_at":"2025-03-26T19:34:48.866Z","avatar_url":"https://github.com/MinhasKamal.png","language":"C","readme":"\u003ch1\u003e \u003cimg src=\"https://cloud.githubusercontent.com/assets/5456665/22564404/991be738-e9ae-11e6-9084-c1631f970b60.png\" width=\"20\" height=auto /\u003e CreepyCodeCollection\u003c/h1\u003e\n\n#### A Nonsense Collection of Disgusting Codes\n\n**Here we are talking about creepiest of the most creepy codes. Programs, behave so strange, that they will twist your brain. Snippets, so small, that you won’t believe their functionality. And codes, so cryptic, that even the top coders will think of going back to the college.**\n\n**Note**: Never try this type of code in a real life software project; readability and maintainability should be the main concern there.\n\n\n## Intro\nSee this cute little code ([↗](https://github.com/MinhasKamal/CreepyCodeCollection/blob/master/check_prime.pl))-\n\n``` PL\n(1x$a)!~/^1?$|^(11+?)\\1+$/\n```\n\nIn Perl, this regular expression checks if a number is prime.\n\nFollowing code will produce day of the week for a given date ([↗](https://github.com/MinhasKamal/CreepyCodeCollection/blob/master/day_of_week.c))-\n\n``` C\n((y-=m\u003c3)+y/4-y/100+y/400+\" bed=pen+mad.\"[m]+d)%7\n```\n\nConsider this Java code ([↗](https://github.com/MinhasKamal/CreepyCodeCollection/blob/master/confusion.java))-\n\n``` Java\nint i = (byte) + (char) - (int) + (long) - 1;\n```\n\nWhat will be the value of `i`? Will the code even compile? Weird! Huh?\n\nThe program is a Ruby [Quine](https://en.wikipedia.org/wiki/Quine_(computing)) called qlobe ([↗](https://github.com/MinhasKamal/CreepyCodeCollection/blob/master/qlobe.rb)). Isn't the the output amazing?\n\n  \u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://cloud.githubusercontent.com/assets/5456665/21362343/258441bc-c712-11e6-88bf-f8f02a028ad3.gif\" alt=\"Qlobe\" height=\"300\" width=auto/\u003e\n  \u003c/div\u003e\n\nThis is one of my favourites- The Animated 3d Doughnut ([↗](https://github.com/MinhasKamal/CreepyCodeCollection/blob/master/animated_3d_doughnut.c)). Taste how delicious it is!\n\n  \u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://cloud.githubusercontent.com/assets/5456665/21362492/c976724a-c712-11e6-9773-03e80f8ba598.gif\" alt=\"Animated 3d Doughnut\" height=\"300\" width=auto/\u003e\n  \u003c/div\u003e\n  \nPaste this in your browser's url- \n\n    data:text/html,\u003cbody%20style=margin:0\u003e\u003ccanvas%20id=q%20/\u003e\u003cscript\u003evar%20q=document.getElementById('q'),s=window.screen,w=q.width=s.width,h=q.height=s.height,p=Array(256).join(1).split(''),c=q.getContext('2d'),m=Math;setInterval(function(){c.fillStyle='rgba(0,0,0,0.05)';c.fillRect(0,0,w,h);c.fillStyle='rgba(0,255,0,1)';p=p.map(function(v,i){r=m.random();c.fillText(String.fromCharCode(m.floor(2720+r*33)),i*10,v);v+=10;%20return%20v\u003e768+r*1e4?0:v})},33)\u003c/script\u003e\n\nAnd see the magic yourself ([↗](https://github.com/MinhasKamal/CreepyCodeCollection/blob/master/matrix_effect.html))!\n\nMost of the programs here are hell hard to understand. The details-url provided with the codes contain useful description. Follow the [Creepy Rank](#creepy-rank) for getting a structured view of all the programs.\n\n## Creepy Rank\nSorted by difficulty level-\n\n### Level- 1: Genin\n\nCode | Intro\n--- | --- \n[pyjava.java](https://github.com/MinhasKamal/CreepyCodeCollection/blob/master/pyjava.java) | Java code written like python. Finds factorial of big numbers.\n[backward.java](https://github.com/MinhasKamal/CreepyCodeCollection/blob/master/backward.java) | Weird flipped code compiles- \"backward!\".\n[one_line_swap.c](https://github.com/MinhasKamal/CreepyCodeCollection/blob/master/one_line_swap.c) | Strange one-liners that swaps value of two variables.\n[without_main.c](https://github.com/MinhasKamal/CreepyCodeCollection/blob/master/without_main.c) | C code without main.\n[hello_world.java](https://github.com/MinhasKamal/CreepyCodeCollection/blob/master/hello_world.java) | Magically outputs \"hello world\" in the console.\n[obfuscated.java](https://github.com/MinhasKamal/CreepyCodeCollection/blob/master/obfuscated.java) | Prints \"Hi!\" in the console, looks like a big meaningless comment though.\n[strange.c](https://github.com/MinhasKamal/CreepyCodeCollection/blob/master/strange.c) | A strange code with more strange output.\n  \n### Level- 2: Chunin\n\nCode | Intro\n--- | --- \n[bitwise_arithmetic.c](https://github.com/MinhasKamal/CreepyCodeCollection/blob/master/bitwise_arithmetic.c) | Performs addition and multiplication using only bit operation.\n[prefix2postfix.c](https://github.com/MinhasKamal/CreepyCodeCollection/blob/master/prefix2postfix.c) | Converts prefix notation to postfix.\n[sapin.c](https://github.com/MinhasKamal/CreepyCodeCollection/blob/master/sapin.c) | Prints a dynamic christmas tree.\n[crazy_jvm.java](https://github.com/MinhasKamal/CreepyCodeCollection/blob/master/crazy_jvm.java) | Seems like the JVM has gone mad, printing random integers.\n[confusion.java](https://github.com/MinhasKamal/CreepyCodeCollection/blob/master/confusion.java) | It is surprising enough, that the code compiles \u0026 prints 1.\n[not_so_random.java](https://github.com/MinhasKamal/CreepyCodeCollection/blob/master/not_so_random.java) | Will (randomly!) print- 1 1 1 1 1 1 1 1 1 1.\n[bangladesh.c](https://github.com/MinhasKamal/CreepyCodeCollection/blob/master/bangladesh.c) | Prints the map of Bangladesh.\n[signature_prime.c](https://github.com/MinhasKamal/CreepyCodeCollection/blob/master/signature_prime.c) | Keeps printing prime number (theoretically) forever.\n[day_of_week.c](https://github.com/MinhasKamal/CreepyCodeCollection/blob/master/day_of_week.c) | Computes day of the week for given date.\n[polyglot_so404.py.pl.rb.c.bf](https://github.com/MinhasKamal/CreepyCodeCollection/blob/master/polyglot_so404.py.pl.rb.c.bf) | Prints 404 in python, perl, ruby, c and brainfu\\*k.\n[polyglot_quine.c.py.pl.rb](https://github.com/MinhasKamal/CreepyCodeCollection/blob/master/polyglot_quine.c.py.pl.rb) | A quine that runs in c, python, perl \u0026 ruby.\n\n### Level- 3: Jonin\n\nCode | Intro\n--- | --- \n[compound_eye.rb](https://github.com/MinhasKamal/CreepyCodeCollection/blob/master/compound_eye.rb) | Displays animated pattern.\n[best_short_program.c](https://github.com/MinhasKamal/CreepyCodeCollection/blob/master/best_short_program.c) | Reads a spelt number and writes a corresponding decimal number.\n[check_prime.pl](https://github.com/MinhasKamal/CreepyCodeCollection/blob/master/check_prime.pl) | Checks if a number is prime using regular expression!\n[quine_signature.c](https://github.com/MinhasKamal/CreepyCodeCollection/blob/master/quine_signature.c) | Shortest C code that prints itself.\n[clock_in1line.c](https://github.com/MinhasKamal/CreepyCodeCollection/blob/master/clock_in1line.c) | Prints current time in text-art.\n[japh.pl](https://github.com/MinhasKamal/CreepyCodeCollection/blob/master/japh.pl) | Prints \"just another perl hacker\".\n[matrix_effect.html](https://github.com/MinhasKamal/CreepyCodeCollection/blob/master/matrix_effect.html) | Displays a matrix-like screen.\n[pi_signature.c](https://github.com/MinhasKamal/CreepyCodeCollection/blob/master/pi_signature.c) | Calculates the first 15000 digits of PI.\n\n### Level- 4: Kage\n\nCode | Intro\n--- | --- \n[mandelbrot_imager.py](https://github.com/MinhasKamal/CreepyCodeCollection/blob/master/mandelbrot_imager.py) | Creates an image of Mandelbrot (may take 20m to run!).\n[shortest_tetris.html](https://github.com/MinhasKamal/CreepyCodeCollection/blob/master/shortest_tetris.html) | Very short and simplified variant of the classic tetris game.\n[qlobe.rb](https://github.com/MinhasKamal/CreepyCodeCollection/blob/master/qlobe.rb) | Prints the globe. And it can also be turned by puting command-line argument.\n[animated_3d_doughnut.c](https://github.com/MinhasKamal/CreepyCodeCollection/blob/master/animated_3d_doughnut.c) | Shows a 3d animated doughnut with ASCII art.\n[mandelbrot_flythrough.pl](https://github.com/MinhasKamal/CreepyCodeCollection/blob/master/mandelbrot_flythrough.pl) | Rotates, zooms in \u0026 out, and scrolls randomly to examine regions of the Mandelbrot.\n\n### Rogue \n\nCode | Intro\n--- | --- \n[octaglot.cob.pas.f77.c.ps.sh.pl.com](https://rosettacode.org/wiki/Polyglot) | A polyglot, prints \"hello polyglots\" in 8 languages.\n[esoteric_polyglot.mal.bf.ws.asdf.123.spoon.excon](https://github.com/kenrube/Esopoly) | A polyglot written in 7 esoteric languages.\n[palindrome_polyglot_quine.cs.java](https://github.com/KvanTTT/Freaky-Sources/blob/master/Patterns%20and%20Data/PalindromePolyglotQuine.cs.java) | The code is palindromic, compiles in C# and Java, prints itself.\n[quine_relay.rb](https://github.com/mame/quine-relay) | An uroboros program with 100 programming languages.\n\nAll the programs here have been tested (by me). [TutorialsPoint-CodingGround](https://www.tutorialspoint.com/codingground.htm) or [repl.it](https://repl.it/languages) has online code editors and compilers, which can be used to run these programs. Many programs here have been collected from q/a and discussion sites, like- [StackOverflow](//stackoverflow.com), [Quora](https://www.quora.com/), [Programming Puzzles \u0026 Code Golf](http://codegolf.stackexchange.com/), \u0026 [Hacker News](https://news.ycombinator.com/news).\n\nIf you liked this project, then you may also love [CuteVirusCollection](https://github.com/MinhasKamal/CuteVirusCollection).\n\n\n## Not Satisfied Yet!\n- [IOCCC](http://www.ioccc.org/years-spoiler.html), [IOCCC Winning Entries](http://www.pixelstech.net/article/1351185934-Do-you-really-understand-C-21st-International-Obfuscated-C-Code-Contest-winning-entries)\n- [PerlMonks](http://www.perlmonks.org)\n- [C Cignature Programs](http://www.iwriteiam.nl/SigProgC.html)\n- [CodeGolf-StackExchange: Tips](http://codegolf.stackexchange.com/questions/tagged/tips?sort=votes\u0026pageSize=15), [CodeGolf-StackExchange: Quine](http://codegolf.stackexchange.com/questions/69/golf-you-a-quine-for-great-good), [StackOverflow: Strangest Language Feature](http://stackoverflow.com/questions/1995113/strangest-language-feature)\n- [JS1K](http://js1k.com)\n- [Quora: Elegant Code](https://www.quora.com/What-is-the-most-elegant-line-of-code-youve-seen), [Quora: Shortest Effective Code](https://www.quora.com/What-is-the-shortest-and-most-effective-code-ever-written), [Quora: Coolest Thing in 10 Line](https://www.quora.com/Whats-the-coolest-thing-you-can-get-a-computer-to-do-in-10-lines-of-code)\n- [QuinePrograms](http://cs.lmu.edu/~ray/notes/quineprograms/)\n- [CodePoetry](http://code-poetry.com/)\n- [Anarchy Golf](http://golf.shinh.org/all.rb)\n- [JS Code Golfing](https://gist.github.com/xem/206db44adbdd09bac424)\n","funding_links":[],"categories":["C"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMinhasKamal%2FCreepyCodeCollection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMinhasKamal%2FCreepyCodeCollection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMinhasKamal%2FCreepyCodeCollection/lists"}