Skip to content
Permalink
Browse files

Created language

  • Loading branch information
jrtapsell committed Feb 19, 2018
0 parents commit 0a16a5d62b3e0e0b5079ca9383d06652ab721cdc
@@ -0,0 +1,105 @@

# Created by https://www.gitignore.io/api/gradle,kotlin,intellij+all

### Intellij+all ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff:
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/dictionaries

# Sensitive or high-churn files:
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.xml
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml

# Gradle:
.idea/**/gradle.xml
.idea/**/libraries

# CMake
cmake-build-debug/

# Mongo Explorer plugin:
.idea/**/mongoSettings.xml

## File-based project format:
*.iws

## Plugin-specific files:

# IntelliJ
/out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Ruby plugin and RubyMine
/.rakeTasks

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

### Intellij+all Patch ###
# Ignores the whole idea folder
# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360

.idea/

### Kotlin ###
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

### Gradle ###
.gradle
**/build/

# Ignore Gradle GUI config
gradle-app.setting

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

# Cache of project
.gradletasknamecache

# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
# gradle/wrapper/gradle-wrapper.properties


# End of https://www.gitignore.io/api/gradle,kotlin,intellij+all
@@ -0,0 +1,79 @@
# Built-ins

## Any

- Any.i()

Converts anything to an integer

> "1".i() + "3".i()
< 4
- Any.s()

Converts anything to a string

## IO

- P(x)

Prints out x followed by a newline

- P(x,y,z...)

Prints out (x,y,z) as a list

## Iterables
**(Iterable, Sequence and Array)**

- m(function)

Shortening of map

- f(predicate)

Shortening of filter

- c()

Counts all the items in the iterable

- j()

Joins the items to a string

- _s()
Converts to a sequence
- _i()
Converts to an iterable
_ _a()
Converts to an array
## Literals
- l(x,y,z...)
Creates a mutable list of (x,y,z...)
- a(x,y,z...)
Creates an array of (x,y,z...)
## String Utilities
- R()
Creates a regex
- r()
Replaces in strings
- c()
Counts like the one in iterables
@@ -0,0 +1,38 @@
# Jotlin

## Why call it Jotlin

The name comes _Kotlin_, the language we run on, and _Jot_, as in to write something quickly.

## What this language does

This language uses logic to try to shorten kotlin code.

## What this language doesn't

To avoid falling foul of the custom language for a challenge rule we avoid making builtins for specific challenges.

## Raw data

Based on data dumps the following are the most used methods

- listOf - 344 uses
- println - 131 uses
- map - 119 uses
- print - 104 uses
- main - 71 uses
- toInt - 55 uses
- while - 41 uses
- split - 33 uses
- map - 33 uses
- for - 29 uses
- Regex - 21 uses
- replace - 19 uses
- random - 17 uses
- intArrayOf - 17 uses
- for - 17 uses
- toString - 16 uses
- filter - 16 uses
- joinToString - 16 uses
- repeat - 15 uses

@@ -0,0 +1,37 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

group = "uk.co.jrtapsell"
version = "1.0-SNAPSHOT"

buildscript {
var kotlin_version: String by extra
kotlin_version = "1.2.0"

repositories {
mavenCentral()
}

dependencies {
classpath(kotlinModule("gradle-plugin", kotlin_version))
}

}

apply {
plugin("kotlin")
}

val kotlin_version: String by extra

repositories {
mavenCentral()
}

dependencies {
compile(kotlinModule("stdlib-jdk8", kotlin_version))
}

tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}

Binary file not shown.
@@ -0,0 +1,6 @@
#Mon Feb 05 10:34:25 GMT 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-bin.zip

0 comments on commit 0a16a5d

Please sign in to comment.
You can’t perform that action at this time.