I've archived this repo due to inactivity and to spend more time on other projects and school stuff.
Jacob is a (kind-of) programming language that is built with JavaScript and allows you to perform basic operations and execute scripts.
Currently, Jacob is still under development and I don't know when it will be done. Currently, the version may not work as expected, and there could be errors and bugs. Please report them through the issues tab if you found any.
You can install the Jacob stable version through NPM:
npm install -g jacob.js
Or install it through the development github branch (not stable):
npm install -g "https://github.com/itsrn/jacob.js.git#development"
To run a Jacob script file, use the jacob command followed by the path to the script file:
jacob path/to/script.jacob
In Jacob, there are two types of things:
- Functions, which looks like this:
#function[arguments]
- And variables, which looks like this:
$variable()
(no arguments)
Instead of using a function for something that only returns a value and doesn't do anything (like getting the current hour number) we use variables.
The log statement is used to display messages on the console:
#log[Hello World!]
Which by running the jacob code will give us the output:
Hello World!
The arguments for this function are the following:
- First argument:
- The string that will be logged to the console.
- Second argument:
- "uppercase" or "lowercase". Sends the message to the console as that option.
- Third argument:
- One of the following colors: "blue", "red", "yellow". Sends the message as that color.
The time statements are used to get the current time parameters:
$hour()
: Gets the current hour.$minutes()
: Gets the current minutes (without 0 at the start).$seconds()
: Gets the current seconds.
The examples are available in the examples folder.
Contributions are welcome! If you find any issues or want to add new features, please submit a pull request.
This project is licensed under the MIT License.