WARNING!! THIS LANGUAGE IS NO LONGER MAINTAINED.
Gen is an easy-to-learn, dynamic, interpreted, procedural programming language. Gen's syntax is inspired by Ruby and Python.
Gen also has a simple REPL (but you need to write for loops, if statements, and functions in one line, which is possible but hard to write).
And in Gen, a semicolon is the same as a new line, so you can ultimately write everthing in one line.
- Basic Built-in functions
- File I/O Operation
- Official site
Note: Using
git clone
to clone the repository is discouraged. Please download the source code from the releases page
cd Gen/pygen
make install
Then you can use gen:
gen some_file.gen
println("Hello World")
For examples, see examples directory.
# Bubble sort
defunc bubble_sort(arr)
for i=0 through size(arr) then
for j=0 through size(arr)-i-1 then
jpls1 = j + 1
if (arr@j) > (arr@jpls1) then
temp = arr@j
arr@j = arr@jpls1
arr@jpls1 = temp
end
end
end
end
array = [3734, 3732, 3810, 1649, 4952, 7993, 1225, 2728, 2849, 2113, 9883, 3839, 2839, 5463, 2741, 5684, 6848, 2834, 1838, 2483, 8384, 7885, 4853, 5848, 3838]
bubble_sort(array)
println(array)
Contributions are welcome! Especially, I need help bug fixing.
If you found a bug, please open a new issue and paste the error message and your code that caused the bug.
I learned a lot from this series and T# programming language.