IdarV / short-code

Write code in the smallest amount of bytes possible

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

short-code

This is a project where i try to list anagrams from a word list with the least amount of characters in different languages. This is called code golfing. Feel free to improve a language or add a new one, and send a pull request :)

In Linux, OSX and Windows(GitBash) you can count the file size with wc -c [filename]

Results:

  1. Ruby: 61
  2. Perl: 87
  3. Scala: 100
  4. Kotlin: 104
  5. Haskell 118
  6. Python: 122
  7. PHP: 133
  8. Javascript: 135
  9. R: 152
  10. Elixir: 239
  11. Go: 276
  12. Java: 333

Rules:

  • New languages should follow the same folder and naming conventions
  • All languages should have a readable example (how it would look as a readable, normal program)
  • New languages should have a information file containing language version and how to run the script
  • Passing the filename as an argument is allowed
  • The output have to comma seperate the words (see Example of expected output below)

Example of expected output:

canters, scanter, nectars
case
decimal, claimed, medical
alerted, treadle, related
calendar
chill
dealing, aligned
allergy, gallery
gravy
general, enlarge, gleaner
created, reacted
mitered, merited
topical, capitol
dormant
hardest, trashed, threads
instead, detains, sainted, stained
rerun
earnest, eastern, nearest
retards, darters, starred
blaze
landscape
gymnastic
exhibit
iron

About

Write code in the smallest amount of bytes possible


Languages

Language:JavaScript 20.3%Language:Java 18.5%Language:Go 12.1%Language:Elixir 7.6%Language:PHP 6.3%Language:Perl 6.2%Language:R 5.7%Language:Python 5.1%Language:Haskell 5.0%Language:Scala 4.6%Language:Ruby 4.5%Language:Kotlin 4.2%