A general purpose programming language built with Python 3.12 and LLVM.
- Statically Typed
- GenZ Interop Syntax
- JIT Compiled
- Download the latest
lime.exe
file from the Releases section. - Place somewhere you will remember on your PC
- An installer application is under development to handle this part for you
- Copy the path to the
lime.exe
file- For example:
- Save the
lime.exe
file toC:\Users\noahw\Desktop\Lime
- Copy the path
C:\Users\noahw\Desktop\Lime
NOTC:\Users\noahw\Desktop\Lime\lime.exe
- Save the
- For example:
- Add the copied path to your system
PATH
environment variables - Open a brand new terminal, and you should now be able to use the
lime
command - Create a new folder and create a new file named
main.lime
- Add the
main
function to yourmain.lime
file. This is required for all lime programs.
fn main() -> int {
printf("I dropped my limes :(");
return 0;
}
- Compile/Run your lime program with
lime main.lime
- Fork/Clone this repository to your machine.
- Initialize a new
Anaconda
orMiniconda
environment in the repository locationconda create --name limelang python=3.12
- Activate the environment
conda activate limelang
- Install the required dependencies
conda install llvmlite
pip install pyinstaller
- Build the executable
pyinstaller --onefile --name lime --icon=assets/lime_icon.ico main.py
- Add the
dist
folder to your system PATH environment variables..\..\limelang\dist
(your path will be similar)
- Follow the rest of the instructions shown above for using the pre-built exe
These are just crude and very specific benchmarks comparing vs LimeLang
Limelang proves to be ~31.87x speedup when compared to Python
- LimeLang (10.020018 ms)
- Python (319.3933 ms)
fn fib(n: int) -> int {
if n == 1 {
return 0;
}
if n == 2 {
return 1;
}
return fib(n - 1) + fib(n - 2);
}
fn main() -> int {
return fib(32);
}
All current features are subject to change as this language is still in the Alpha stages.
- Strings (
str
) - 32-bit Integers (
int
) - Floats (
float
) - Void (
void
) - Bool (
bool
)
+
Addition-
Subtraction*
Multiplication/
Division^
Power/Exponent%
Modulus
<
Less-Than<=
Less-Than Equal-To>
Greater-Than>=
Greater-Than Equal-To!=
Not-Equal==
Equal-To
=
Equals+=
Plus-Equals-=
Minus-Equals*=
Multiply-Equals/=
Divide-Equals
!
Not-
Negative
++
Increment--
Decrement
let
->lit
Mutable Variable Declarationfn
->bruh
Function Declarationreturn
->pause
Return Statementif
->sus
If Statementelse
->imposter
Else Statementtrue
->nocap
True Booleanfalse
->cap
False Booleanwhile
->wee
While Loopbreak
->yeet
Break Statementcontinue
->anothaone
Continue Statementfor
->dab
For Loopimport
->gib
Import Statement
=
->be
Equals;
->rn
Semi-Colon:
->:
Colon->
->->
Arrow(
->(
Left-Paren)
->)
Right-Paren{
->{
Left-Brace}
->}
Right-Brace
printf
C-Like format print to console functionprintf("Format ints: %i", 12);
fn add(a: int, b: int) -> int {
return a + b;
}
fn main() -> int {
return add(1, 2);
}
fn main() -> int {
let a: int = 14;
return a + 6;
}
fn main() -> int {
let a: int = 5;
if a == 5 {
return 14;
} else {
return 0;
}
}
fn main() -> int {
let a: int = 0;
while a < 10 {
printf("a = %i", a);
a++;
}
return a;
}
fn main() -> int {
for (let i = 0; i < 10; i++) {
printf("i = %i", i);
}
return 8;
}
fn test() -> void {
printf("called from test()");
}
fn main() -> int {
let a: int = 2;
let b: float = 2.22;
let c: str = "limes";
let d: bool = true;
test();
return 5;
}