-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
108 lines (106 loc) · 5.95 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<!DOCTYPE html>
<html>
<title>QoLang</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link href="https://prismjs.com/plugins/line-numbers/prism-line-numbers.css" rel="stylesheet" />
<link href="https://prismjs.com/plugins/toolbar/prism-toolbar.css" rel="stylesheet" />
<link href="/style/prism-apprentice/prism-apprentice.css" rel="stylesheet" />
<link href="/style/index.css" rel="stylesheet" />
<link href="/style/apprentice.css" rel="stylesheet" />
<body class="">
<!-- Page Content -->
<div class="w3-container border-bottom mid head">
<h1><img src="/images/qolang.png" width="32"/> The Qo Programming Language</h1>
The Qo Programming Language is a simple language with simple syntax.
<pre><code class="language-qo line-numbers">
/*
Printing in QoLang.
*/
println("Hello, world!");
</code></pre>
<center>
<button class="tab active-tab" onclick="chTab(event,'About')" id="AboutTab">About</button>
<button class="tab" onclick="chTab(event,'Install')" id="InstallTab">Install</button>
<button class="tab" onclick="chTab(event,'Related')" id="RelatedTab">Related Projects</button>
<button class="tab" onclick="window.location.href = '/docs'">Documentation</button>
</center>
</div>
<div class="w3-container mid">
<div id="About" class="w3-panel section" style="display:block">
The Qo Programming Language (or shortly, QoLang) is a new interpreted language with a simple syntax. <br />
A simple example:
<pre>
<code class="language-qo">
include types;
myinteger = types.toInt(input("Enter an integer: "));
println(myinteger, "% 2 ==", myinteger % 2);
</code>
</pre>
Every statement in QoLang (including statements like <code class="language-qo">if</code>) end with <code class="language-qo">;</code>. <br />
QoLang is a pretty new language, with too few contributors, so it may have some bugs. If you notice something is wrong with QoLang, please <a href="https://github.com/QoLang/QoLang/issues/new">create an issue</a> in GitHub.
</div>
<div id="Install" class="w3-panel section" style="display:none">
<h3>GNU/Linux and Microsoft Windows</h3>
<p>
Use the <a href="https://github.com/QoLang/installer">installer</a>.
</p>
<h3>Alternative way for Microsoft Windows</h3>
<p>
Download the binary from here: <a href="https://github.com/QoLang/QoLang/releases/latest"><img src="/images/get_qolang.svg"></img></a>
<ol>
<li>Create a directory called <code>qolang</code> under <code>C:\</code>, then copy the executable file you just downloaded to that folder. <br/><b>Note:</b> Don't download both files and copy them to that folder. Download only the <code>qo.exe</code> file because <code>.exe</code> files are the executable files for Windows.</li>
<li>Create a directory called <code>libs</code> under <code>C:\qolang\</code>, then copy all files in <a href="https://github.com/QoLang/QoLang/tree/master/libs">libs</a> directory to that folder.<br/><b>Note:</b> Don't save it by right clicking at the page and clicking "Save as...", click the "Raw" button and save that page instead.</li>
<li>Run <code>cmd.exe</code> as Administrator, and run <code>setx PATH "%PATH%;C:\qolang"</code></li>
</ol>
To test it, create a file called <code>test.qo</code> and write the following code in it:
<pre>
<code class="language-qo">
println("Hello, world!");
</code>
</pre>
After saving the file, copy the path the file is in, eg. <code>C:\Users\user</code>. Press Windows Key + R and type <code>cmd</code>, type <code>cd </code> (with the space after cd) and click right mouse button the paste the clipboard content, and press Enter. Now you can run your file, to do it run <code>qo test.qo</code>.<br />
<b>Note:</b> This guide was not tested, and there may be mistakes. If you notice something that shouldn't be, please <a href="mailto:[email protected]">contact us</a>.
</p>
<h3>Other</h3>
<p>
QoLang currently doesn't have support for other operating systems, so you need a GNU/Linux virtual machine (or WSL on Windows) to run QoLang.
</p>
</div>
<div id="Related" class="w3-panel section" style="display:none">
<ul>
<li><a href="https://github.com/QoLang/QoLang">QoLang/QoLang</a> - QoLang itself</li>
<li><a href="https://github.com/QoLang/qo-prism">QoLang/qo-prism</a> - QoLang support for Prism.js</li>
<li><a href="https://github.com/QoLang/website">QoLang/website</a> - This website</li>
<li><a href="https://github.com/QoLang/installer">QoLang/installer</a> - Installer for QoLang</li>
<li><a href="https://github.com/Camroku/Camlog">Camroku/Camlog</a> - A blog software, written in QoLang with support of libraries written in Python</li>
</ul>
</div>
</div>
<script>
if (window.location.hash && document.getElementById(window.location.hash.substring(1) + "Tab")) {
document.getElementById(window.location.hash.substring(1) + "Tab").click();
}
function chTab(evt, tab) {
var i, x, tablinks;
x = document.getElementsByClassName("section");
for (i = 0; i < x.length; i++) {
x[i].style.display = "none";
}
tablinks = document.getElementsByClassName("tab");
for (i = 0; i < x.length; i++) {
tablinks[i].className = tablinks[i].className.replace("active-tab", "");
}
document.getElementById(tab).style.display = "block";
evt.currentTarget.className += " active-tab";
history.pushState({}, "", "#" + tab);
}
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.28.0/prism.min.js"></script>
<script src="https://prismjs.com/plugins/toolbar/prism-toolbar.js"></script>
<script src="https://prismjs.com/plugins/line-numbers/prism-line-numbers.js"></script>
<script src="https://prismjs.com/plugins/normalize-whitespace/prism-normalize-whitespace.js"></script>
<script src="https://prismjs.com/plugins/show-language/prism-show-language.js"></script>
<script src="/scripts/qo-prism/qo-prism.js"></script>
</body>
</html>