You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Pocco81 b2eaa55767 feat: added dynamically generated circles 2 years ago
..
README.md feat: added dynamically generated circles 2 years ago

README.md

📄 Docs

Specs · Conventions · Cheat-sheets · Style-guide

Documentation for Koy, the human-friendly data serialization language

 

🎏 Koy Lang

Koy is designed to be a minimal, simple and intuitive data serialization language; easy for you, your dog and your average 5 year-old. It has a small set of symbols, not too many rules and only one singular statement. Its lack of complexity makes it the perfect language for your project! easy to implement, debug and modularize.

Go ahead and check out the Conventions to learn about the generalities of the language! if you end up liking it, consider checking out the Specs sheet and the Style Guide.

 

📚 Cheat sheet

Cheat sheet for symbols  
Symbols Function Example
// Single-line comment
// hello world!
/**/ Multi-line comment
/*
	This is a multi-line comment and
	you are watcing Disney channel!
*/
: Set a key, followed by its data type (optional) and then the value. To define a literal key put it between single quotes ('')
hello: "world!"

// specifying data type
temperature:int 12.23
${} Call a variable
// simple usage
name: "Michael Theodor Mouse"
hello: "Good evening ${name}"

// with arrays (using the `.` notation)
user: {
	name: "Michael",
	surnames: "Theodor Mouse"
}
hi: "Good morning ${user.name}"
"" Define a normal string
hello: "world"
""" """ Define a multi-line string
hello: """My name is
	Michael Theodor Mouse, but
	you can call me Peter.
"""
'' Define a literal value
weird_path: 'pc/\fds!fd/\&24324%!@'
[] Define an array
hosts: [ "omega", "alpha", "gama" ]
{} Define an object
user: {
	name: "Michael Theodor Mouse",
	age: 92
}
import Import other .koy files
// single import
import "./directory/settings.koy"

// multiple imports
import {
	"./directory/user0.koy",
	"./directory/user1.koy",
	"./directory/user2.koy"
}
<< Overwrite values from objects
user: {
	name: "Michael Theodor Mouse",
	age: 93
}

laptop: {
	name: "Lenovo Thinkpad",
	owner: ${user} << {
		name: "Dominic Toretto"
	}
}

Cheat sheet for rules  
Example .koy file using every feature  

&