You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: LICENCE.md
+14-14
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
The source code is distributed under the GNU General Public License version 3, with the addition under section 7 of an exception described in the “Ritchie Runtime Library Exception, version 3.1” (Please see Ritchie RUNTIME LIBRARY EXCEPTION)
1
+
The source code is distributed under the GNU General Public License version 3, with the addition under section 7 of an exception described in the “Rix Runtime Library Exception, version 3.1” (Please see Rix RUNTIME LIBRARY EXCEPTION)
2
2
3
3
4
4
GNU GENERAL PUBLIC LICENSE
@@ -682,7 +682,7 @@ The Runtime is licensed under the MIT License. The "language" consists of the co
682
682
683
683
Copyright (c) 2015: Riolet Corporation and other contributors:
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
688
688
@@ -691,7 +691,7 @@ The above copyright notice and this permission notice shall be included in all c
691
691
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Copy file name to clipboardexpand all lines: README.md
+28-23
Original file line number
Diff line number
Diff line change
@@ -1,63 +1,67 @@
1
-
Ritchie Language
1
+
Rix Language
2
2
================
3
3
4
-
Ritchie is an expressive and efficient language for the C ecosystem. Ritchie uses C libraries natively and generates easy to understand C code. It is named after the great computer scientist Dennis Ritchie, if not for whom we would all be programming in Visual Basic.
4
+
Rix is an expressive and efficient language for the C ecosystem. Rix uses C libraries natively and generates easy to understand C code.
5
5
6
-
There are five core principles behind Ritchie:
6
+
There are five core principles behind Rix:
7
7
8
8
1. Ease of programming, inspired by Python
9
9
2. Fast, like C code
10
10
3. Type safety, like Scala
11
11
4. Ability to go lower level and write C code
12
12
5. No reserved keywords, everything is redefinable
13
13
14
-
We ran the [prime counting benchmark](https://bjpelc.wordpress.com/2015/01/10/yet-another-language-speed-test-counting-primes-c-c-java-javascript-php-python-and-ruby-2/) for Ritchie, C and Python. Here's what we got:
14
+
We ran the [prime counting benchmark](https://bjpelc.wordpress.com/2015/01/10/yet-another-language-speed-test-counting-primes-c-c-java-javascript-php-python-and-ruby-2/) for Rix, C and Python. Here's what we got:
15
15
16
-
|| Ritchie| C | Python |
16
+
|Measure| Rix| C | Python |
17
17
|--------------------|---------|-----|--------|
18
18
| Runtime (ms) | 457 | 424 | 7836 |
19
-
| Characters of code |423| 542 | 474 |
19
+
| Characters of code |413| 542 | 474 |
20
20
21
-
The best way to introduce yourself to this language is to take a look at some of the examples and try running them. Ritchie is still in early development; many features have not yet been fully implemented or described. A list of major [development tasks remaining](https://github.com/riolet/ritchie/wiki/State-of-the-Compiler) can be found in the wiki.
21
+
The best way to introduce yourself to this language is to take a look at some of the examples and try running them. Rix is still in early development; many features have not yet been fully implemented or described. A list of major [development tasks remaining](https://github.com/riolet/rix/wiki/State-of-the-Compiler) can be found in the wiki.
22
22
23
23
Features
24
24
========
25
25
26
-
*Ritchie uses category inferencing, so the boilerplate Java statement:
26
+
*Rix uses type inferencing, so the boilerplate Java statement:
27
27
28
28
```
29
29
Point point = new Point (x,y)
30
30
```
31
31
32
-
becomes a short Ritchie statement:
32
+
becomes a short Rix statement:
33
33
34
34
```
35
35
#point = Point (x, y)
36
36
```
37
-
Identifiers have their category inferred if they are marked as new with "#". Their types cannot be changed once set. In the above example, `point` gets category `Point`.
38
37
38
+
New identifiers have are marked as new with "#", and Rix will infer their type for you. Their types cannot be changed once set. In the above example, `point` gets category `Point`.
39
39
40
-
* Ritchie tries to follow English linguistic constructs, so, most of Ritchie language expressions take the form:
40
+
* Rix provides exception-safe resource management using Resource Acquisition Is Initialization (RAII), so you don't have to worry about memory leaks and unclosed file handles.
41
+
42
+
43
+
* Rix tries to follow English linguistic constructs wherever possible and practical, so, most of Rix language expressions take the form:
41
44
42
45
Subject Verb Object
43
46
44
47
The following phrase:
45
48
46
49
```
47
50
hello = "Hello"
51
+
helloWorld.add(hello)
48
52
```
49
-
parses as:
53
+
parse as:
50
54
51
55
52
56
| Subject | Verb | Object |
53
57
|---------|------|---------|
54
58
| hello | = | "Hello" |
59
+
| myset | add | hello |
55
60
56
61
57
-
* Ritchie has no keywords. All operators in Ritchie can be overloaded.
58
-
62
+
Subjects and objects are collectively known as nouns, and are analogous to object (instances of a class) in object-oriented programming.
59
63
60
-
* We call verbs the constructs called functions, methods or subroutines in other languages. For example:
64
+
Methods and function are called *verbs*in ritchie. For example:
There's no assignment operator in Ritchie, but `=` is defined as an assignment verb for `Identifier`.
84
+
There's no assignment operator in Rix, but `=` is defined as an assignment verb for `Identifier`.
81
85
82
86
* A special category of verb is a control flow verb.
83
87
84
-
`if`, `while` and `for` in Ritchie are all such verbs. They are not keywords, as you can redefine them, although this is probably not a good idea.
88
+
`if`, `while` and `for` in Rix are all such verbs. They are not keywords, as you can redefine them, although this is probably not a good idea.
89
+
* Rix has no keywords. All operators in Rix can be overloaded.
85
90
86
-
* Ritchie is whitespace sensitive
87
91
92
+
* Rix is whitespace sensitive
88
93
89
94
90
95
Get started
91
96
===========
92
-
1. Build the ritchie compiler `make clean;make`
93
-
2. Write your ritchie program in your favourite text editor (let's call it program.rit)
94
-
3. Set RITCHIE_HOME`export RITCHIE_HOME=/path/to/ritchie`
95
-
4. Run `${RITCHIE_HOME}/ritchie.sh program.rit` and ritchie will build, execute and run the program
97
+
1. Build the rix compiler `make clean;make`
98
+
2. Write your rix program in your favourite text editor (let's call it program.rit)
99
+
3. Set RIX_HOME`export RIX_HOME=/path/to/rix`
100
+
4. Run `${RIX_HOME}/rix.sh program.rit` and rix will build, execute and run the program
96
101
97
102
Team
98
103
====
99
-
Ritchie Language is being developed by a group of efficiency obsessed programmers for demanding programmers who want both the conciseness of Python and the efficiency of C.
104
+
Rix Language is being developed by a group of efficiency obsessed programmers for demanding programmers who want both the conciseness of Python and the efficiency of C.
0 commit comments