An easy-to-learn, dynamic, interpreted, procedural programming language

Overview

Gen Programming Language

WARNING!! THIS LANGUAGE IS IN DEVELOPMENT. ANYTHING CAN CHANGE AT ANY MOMENT.

Gen is a dynamic, interpreted, procedural programming language.

See the documentation
日本語はこっちです。

Almost everything (for, if, and more) can be written in just one line. But it is pretty wordy, so it's also easy to learn.

TODO List

  • Built-in functions
  • Map (dictionary in Python)
  • Import other files
  • Reading files with extention .gen (meaning allowing multi-line statements)

Installation

git clone https://github.com/Gen-lang/Gen.git
cd PyGen/pygen

Then you can run Makefile:

make install

Then you can use gen:

gen some_file.gen

Hello World

println("Hello World")

Example

For examples, see examples directory.

# Fizzbuzz

for fizzbuzz = 0 through 51 then
	if fizzbuzz % 3 == 0 and fizzbuzz % 5 == 0 then
		println("fizzbuzz")
		continue
	elseif fizzbuzz % 3 == 0 then
		println("fizz")
		continue
	elseif fizzbuzz % 5 == 0 then
		println("buzz")
		continue
	end
end

Contributing

Contributions are welcome! Especially, I need an assist on Makefile to make Gen available to Windows users.

Reports

If you found a bug, please open a new issue and paste the error message and your code that caused the bug.

Credits

I learned a lot from this series and T# programming language.

Comments
  • Make another gen implementation(Optional)

    Make another gen implementation(Optional)

    I think it will be good to have another gen implementation in other languages since the pygen implementation can be slow and it is also memory inefficient. I do think it needs to have a VM(virtual machine, python, java and other more languages use this), JIT(just in time) compiler or other more like AOT compiler(ahead of time). I think a VM is enough for portability since JIT compilers can compile to the target architectures that they only can support. This is only optional since performance and memory usage sometimes don't matter. Please correct me if I'm wrong.

    enhancement 
    opened by GalaxianMonster 24
  • Suggestions for the import feature

    Suggestions for the import feature

    My suggestions for the import feature:

    • Make it a function like:
    import("library file")
    

    or just a keyword:

    import "library file"
    
    • Make import return a map of the library
    • "library file" should be the path to the file

    That's all :)))

    enhancement 
    opened by GalaxianMonster 10
  • Library readline not available for Windows

    Library readline not available for Windows

    So I tested pygen on Windows. I needed to install readline in order to make gen.exe work. When installing readline on Windows using:

    pip install readline
    

    It does not work. One of the errors:

    error: this module is not meant to work on Windows
    

    That's all.

    help wanted 
    opened by GalaxianMonster 8
  • Building for Windows (Needs some fix, See comments below)

    Building for Windows (Needs some fix, See comments below)

    The issue is there are no builds for Windows. You can do that with simply this:

    pip install pyinstaller
    pyinstaller ./main.py --onefile
    COPY ./dist/main.exe ./pygen.exe
    

    Python's CLI is the same as Python Linux build CLI. Pyinstaller needs to be in windows in order to build it to .EXE file. So it's up to you now on how to build it on windows while on Linux. You need to add it on PATH environment variable though if you want to access with only "pygen" and not the whole path to the application, which I don't know how.

    I'm not an expert on Windows so I might be wrong.

    (Nice programming language btw)

    enhancement 
    opened by GalaxianMonster 8
  • Iterate an array

    Iterate an array

    I just wanted to ask you guys if creating another loop just for arrays:

    iterate arr as i then
        println(i)
    end
    

    Or should I just create the in keyword?

    for i in arr then
        println(i)
    end
    
    enhancement 
    opened by bichanna 4
  • About the import function

    About the import function

    Currently, this is how to use the import function:

    import("examples/bubble_sort.gen")
    
    arr = bubble_sort([12, 43, 23, 44])
    println(arr)
    

    But would you prefer something like this?

    imported = import("examples/bubble_sort.gen")
    
    arr = (imported@"bubble_sort")([12, 43, 23, 44])
    # or if possible, I may make it like this:
    # arr = [email protected]_sort([12, 43, 23, 44])
    println(arr)
    

    I'm still experimenting with the latter.

    question 
    opened by bichanna 3
  • If statement does not work with complicated variable access

    If statement does not work with complicated variable access

    opened by bichanna 3
  • Gen extend standard library

    Gen extend standard library

    The gen standard library is a bit small since it only has limited features. I think it will be good for it to have file I/O. You should also store file I/O functions in a "file" global map.

    That's all.

    enhancement 
    opened by GalaxianMonster 2
  • Implementation in Crystal lang

    Implementation in Crystal lang

    I do think Gen written in Python is slow, so I think creating an implementation of Gen written in Crystal is nice because it is fast, and its syntax is similar to Ruby (which I don't know much tough).

    enhancement 
    opened by bichanna 1
Releases(0.3.0)
Owner
Gen Programming Language
An easy-to-learn, dynamic, interpreted, procedural programming language
Gen Programming Language
Pacman - A suite of tools for manipulating debian packages

Overview Repository is a suite of tools for manipulating debian packages. At a h

Pardis Pashakhanloo 1 Feb 24, 2022
Rufus port to linux, writed on Python3

Rufus-for-Linux Rufus port to linux, writed on Python3 Программа будет иметь тот же интерфейс что и оригинал, и тот же функционал. Программа создается

6 Jan 07, 2022
🌍💉 Global COVID-19 vaccination data at the regional level.

COVID-19 vaccination data at subnational level. To ensure its officiality, the source data is carefully verified.

sociepy 61 Sep 21, 2022
Integration between the awesome window manager and the firefox web browser.

Integration between the awesome window manager and the firefox web browser.

contribuewwt 3 Feb 02, 2022
Djangoblog - A blogging site where people can make their accout and write blogs and read other author's blogs

This a blogging site where people can make their accout and write blogs and read other author's blogs.

1 Jan 26, 2022
A very terrible python-based programming language that uses folders instead of text files

PYFolders by Lewis L. Foster PYFolders is a very terrible python-based programming language that uses folders instead of regular text files. In this r

Lewis L. Foster 5 Jan 08, 2022
🚀 emojimash 🚀 is a programming language with ALL THE EMOJI

🚀 emojimash 🚀 is a programming language with ALL THE EMOJI

Python Whiz 256 1 Oct 26, 2021
A library for pattern matching on symbolic expressions in Python.

MatchPy is a library for pattern matching on symbolic expressions in Python. Work in progress Installation MatchPy is available via PyPI, and

High-Performance and Automatic Computing 151 Dec 24, 2022
A small script I made that takes any standard Decklist of magic the gathering cards and pulls all card images from scryfall at once!

A small script I made that takes any standard Decklist of magic the gathering cards and pulls all card images from scryfall at once!

15 Aug 26, 2022
A fishing bot script written in Python!

A fishing bot script written in Python!

Anel Drocic 3 Nov 03, 2021
Intelligent Systems Project In Python

Intelligent Systems Project In Python

RLLAB 3 May 16, 2022
This repo holds custom callback plugin, so your Ansible could write everything in the PostgreSQL database.

English What is it? This is callback plugin that dumps most of the Ansible internal state to the external PostgreSQL database. What is this for? If yo

Sergey Pechenko 19 Oct 21, 2022
Dotfiles & list of programs

dotfiles & list of programs So I wanted to just backup my most used files. I have a bad habit, sometimes I get tired of a distro and do a wipe and sta

2 Sep 04, 2022
Git Hooks Tutorial.

Git Hooks Tutorial My public talk about this project at Sberloga: Git Hooks Is All You Need 1. Git Hooks 101 Init git repo: mkdir git_repo cd git_repo

Dani El-Ayyass 17 Oct 12, 2022
token vesting escrow with cliff and clawback

Yearn Vesting Escrow A modified version of Curve Vesting Escrow contracts with added functionality: An escrow can have a start_date in the past.

62 Dec 08, 2022
All solutions for the 2021 Advent of Code event.

Advent of Code 2021 Solutions All solutions for the 2021 Advent of Code event. Setup Create a file called .session. Go to adventofcode.com and copy th

Bruce Berrios 6 Dec 26, 2021
Web站点选优工具 - 优化GitHub的打开速度、高效Clone

QWebSiteOptimizer - Web站点速度选优工具 在访问GitHub等网站时,DNS解析到的IP地址可能并不是最快,过慢的节点会严重影响我们的访问情况,故制作出这样的工具来进一步优化网络质量。 由于该方案并非为VPN等方式进行的速度优化,以下几点需要您注意: 后续访问对应网站时仍可能需

QPT Family 15 May 01, 2022
Tools for analyzing Java JVM gc log files

gc_log This package consists of two separate utilities useful for : gc_log_visualizer.py regionsize.py GC Log Visualizer This was updated to run under

Brad Schoening 0 Jan 04, 2022
A minimal configuration for a dockerized kafka project.

Docker Kafka Quickstart A minimal configuration for a dockerized kafka project. Usage: Run this command to build kafka and zookeeper containers, and c

Nouamane Tazi 5 Jan 12, 2022
Python-geoarrow - Storing geometry data in Apache Arrow format

geoarrow Storing geometry data in Apache Arrow format Installation $ pip install

Joris Van den Bossche 11 Mar 03, 2022