cor-lang
Version:
The Language of the Web
162 lines (130 loc) • 6.39 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="docs/assets/style.css">
<link rel="stylesheet" type="text/css" href="docs/assets/highlightjs/cor_light.css">
<link rel="shortcut icon" href="docs/assets/favicon.ico" />
<title>The Cor Language</title>
</head>
<body>
<nav class="navbar" role="navigation">
<div class="nav content">
<ul class="left">
<li class="inline"><a href="index.html">Cor</a></li>
<li class="inline"><a href="docs/get_started.html">Get started</a></li>
<li class="inline"><a href="docs/documentation.html">Documentation</a></li>
<li class="inline"><a href="docs/playground/index.html">Playground</a></li>
<li class="inline"><a href="test/index.html">Run tests</a></li>
</ul>
<ul class="right">
<li class="inline"><a class="icon-github" href="https://github.com/yosbelms/cor" target="_blank"></a></li>
</ul>
</div>
</nav>
<div class="body">
<div class="master">
<h1 class="content">Cor</h1>
<p class="lead content">
<b>Cor</b> is an opensource language that compiles to regular JavaScript. It is designed to make easy to write simple, fast and maintainable software for the Web.</p>
</div>
<div class="rule"></div>
<p class="content">Cor is a new language that compiles line-to-line into the equivalent JavaScript. The resulting code runs at equal speed to handwritten JS. You can use any existing JavaScript library in Cor and vice-versa.</p>
<div class="content">
<div class="rule"></div>
<div class="grid">
<div class="col">
<h3>Clean syntax</h3>
<p><b>Cor</b> enables you to write <b>large applications</b> by providing a <b>clean syntax</b>, classes and a modular architecture to keep organized code, enforcing the writing of <b>readable source code</b> based on conventions.</p>
</div>
<div class="col clear">
<pre><code class="hljs cor">use './Todo'
use 'backbone' bb
use 'storage' Storage
class TodoList : bb.Collection {
localStorage = &Storage('todos-backbone')
model = Todo
func getModel() me.model
}
</code></pre>
</div>
</div>
<div class="rule"></div>
<div class="grid">
<div class="col">
<pre><code class="hljs cor">func init() {
ch = chan()
go {
timeout(100)
ch <- 'some msg'
}
go { console.log(<- ch) }
}
</code></pre>
</div>
<div class="col clear">
<h3>Asynchronous Nature</h3>
<p><b>Cor</b> allows you to spawn <b>coroutines</b> and synchronize it by passing messages through <b>channels</b>. It is designed to deal with asynchronicity and parallel I/Os by writing sequential code.</p>
</div>
</div>
<div class="rule"></div>
<div class="grid">
<div class="col clear">
<h3>Hot reaload</h3>
<p><b>Cor</b> provides a smooth front-end development by furnishing a builtin <b>loader</b> which resolves dependences and compiles source code <b>on the fly</b>, with just reloading the Web page. You will only need to use CLI tools to deliver a production-ready version of the app.</p>
</div>
<div class="col">
<pre><code class="hljs cor"><html>
<script
type="text/javascript"
src="node_modules/cor-lang/dist/cor.js">
</script>
<script data-entry="my_app.cor"></script>
</html>
</code></pre>
</div>
</div>
<div class="rule"></div>
<div class="grid">
<div class="col">
<img src="docs/assets/cor_debug_light.jpg" />
</div>
<div class="col">
<h3>Easy to debug</h3>
<p><b>Cor</b> supports <b>source-maps</b>, allowing you the easy debugging in major browsers. However a line of <b>Cor</b> source is compiled to the <b>exact line number</b> in JavaScript for accurated <b>debugging</b> when developing in platforms that doesn't supports source-maps such as servers.</p>
</div>
</div>
<div class="full-rule"></div>
<div class="center">
<a class="button" href="docs/get_started.html">Get started</a>
</div>
<!--div>
<h2></h2>
<p></p>
</div-->
<div class="full-rule"></div>
<div id="footer" class="footer-links">
<ul>
<li><a href="https://github.com/yosbelms/cor">GitHub Repository</a></li>
<li>·</li>
<li><a href="https://github.com/yosbelms/cor/issues">Issues</a></li>
</ul>
</div>
</div>
<div class="footer">
<p>Designed, written, and built with love by <a href="https://github.com/yosbelms" target="_blank">Yosbel Marín</a>. Code licensed under <a href="https://github.com/yosbelms/cor/blob/master/LICENSE" target="_blank">BSD</a>, documentation under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p>
</div>
<script type="text/javascript" src="docs/assets/highlightjs/highlight.js"></script>
<script type="text/javascript"> hljs.initHighlightingOnLoad(); </script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-73271106-1', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>