A simple, yet advanced High level Computing Language
HCL is an Interpreted, Object Oriented language written in Java. It is also dynamically typed and has a very modern syntax inspired from Java and Python. This interpreter is inspired from jLox of Crafting Interpreters.
- Java JDK (latest version is more preferable)
To Install the interpreter, head over to the releases page and
download the latest release of HCL interpreter. The zip/tarball file will be named as hcl-<latest_version>
.
Unzip the release and store it in your desired directory.
Then Add the /bin
directory to your PATH environment variable.
- Copy the
\bin
location of HCL installed folder to clipboard - The first step depends which version of Windows you're using:
- If you're using Windows 8 or 10, press the Windows key, then search for and select "System (Control Panel)".
- If you're using Windows 7, right click the "Computer" icon on the desktop and click "Properties".
- Click "Advanced system settings".
- Click "Environment Variables".
- Under "System Variables", find the
PATH
variable, select it, and click "Edit". If there is noPATH
variable, click "New". - Add the copied directory location to the beginning of the variable value followed by
;
(a semicolon). For example, if the value wasC:\Windows\System32
, change it toC:\Users\Me\HCL\bin;C:\Windows\System32
. - Click "OK".
- Restart your terminal.
- Verify that the path is set by opening a new command window and run
hcl -v
.
- Copy the
\bin
location of HCL installed folder to clipboard - Open the
.bash_profile
file in your home directory (for example,/Users/your-user-name/.bash_profile
) in a text editor. - Add
export PATH="<copied-hcl-bin-path>:$PATH"
to the last line of the file, where is the copied directory location of HCL. - Save the
.bash_profile
file. - Restart your terminal.
- Verify that the path is set by opening a new terminal and run
hcl -v
.
- Copy the
\bin
location of HCL installed folder to clipboard - Open the
.bashrc
file in your home directory (for example,/home/your-user-name/.bashrc
) in a text editor. - Add
export PATH="<copied-hcl-bin-path>:$PATH"
to the last line of the file, where is the copied directory location of HCL. - Save the
.bashrc
file. - Restart your terminal.
- Verify that the path is set by opening a new terminal and run
hcl -v
.
To run your first program, fire up you favourite text editor and copy the following lines to hello.hcl
file:
# A Simple Hello, World! program
println "Hello, world!";
println "HCL is interesting!";
Then open a new terminal in the same directory as the file and run:
$ hcl hello.hcl
For windows users: just run the same command.
You'll see the following output on your terminal:
Hello, world!
HCL is interesting!
If you've any questions regarding this project, please check our documentation or file an issue.
Contributions are welcome, To contribute please refer to details here.
Copyright © 2023 M.V.Harish Kumar.
This project is BSD-2 licensed.
This project is still In its baby steps. Many features need to be added. Thus the stability of the syntax is not guaranteed. However, most features is planned to be retained. Contributers can give their contribution to this project to make this project stable.