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
Export transactions for an algorand wallet to a CSV file

algorand_txn_csv_exporter - (Algorand transaction CSV exporter) This script will export transactions for an algorand wallet to a CSV file. It is inten

TeneoPython01 5 Jun 19, 2022
Reconhecimento de voz, em português, com python

Speech_recognizer Reconhecimento de voz, em português, com python O ato de falar nada mais é que criar vibrações no ar. Por meio de um conversor analó

Marcus Vinícius Ribeiro Andrade 1 Dec 14, 2021
🌈Python cheatsheet for all standard libraries(Continuously Updated)

Python Standard Libraries Cheatsheet Depend on Python v3.9.8 All code snippets have been tested to ensure they work properly. Fork me on GitHub. 中文 En

nick 12 Dec 27, 2022
Prototype application for GCM bias-correction and downscaling

dodola Prototype application for GCM bias-correction and downscaling This is an unstable prototype. This is under heavy development. Features Nothing!

Climate Impact Lab 9 Dec 27, 2022
Quantity Takeoff with Python. Collecting groups of elements by filters

The free tool QuantityTakeoff allows you to group elements from Revit and IFC models (in BIMJSON-CSV format) with just a few filters and find the required volume values for the grouped elements.

OpenDataBIM 9 Jan 06, 2023
Retrying library for Python

Tenacity Tenacity is an Apache 2.0 licensed general-purpose retrying library, written in Python, to simplify the task of adding retry behavior to just

Julien Danjou 4.3k Jan 02, 2023
One Ansible Module for using LINE notify API to send notification. It can be required in the collection list.

Ansible Collection - hazel_shen.line_notify Documentation for the collection. ansible-galaxy collection install hazel_shen.line_notify --ignore-certs

Hazel Shen 4 Jul 19, 2021
Small C-like language compiler for the Uxn assembly language

Pyuxncle is a single-pass compiler for a small subset of C (albeit without the std library). This compiler targets Uxntal, the assembly language of the Uxn virtual computer. The output Uxntal is not

CPunch 13 Jun 28, 2022
Load, explore and analyse data from Scotland and rest of the world related to Covid19.

Streamlit Examples This is my first attempt with Streamlit. It is an open-source framework, free, Python-based and easy to use tool to build and deplo

Eyad Elyan 12 Mar 01, 2021
A simple spyware in python.

Spyware-Python- Dependencies: Python 3.x OpenCV PyAutoGUI PyMongo (for mongodb connection) Flask (Web Server) Ngrok (helps us push our fla

Abubakar 3 Sep 07, 2022
Viewer for NFO files

NFO Viewer NFO Viewer is a simple viewer for NFO files, which are "ASCII" art in the CP437 codepage. The advantages of using NFO Viewer instead of a t

Osmo Salomaa 114 Dec 29, 2022
Expose multicam options in the Blender VSE headers.

Multicam Expose multicam options in the Blender VSE headers. Install Download space_sequencer.py and swap it with the one that comes with the Blender

4 Feb 27, 2022
An easy FASTA object handler, reader, writer and translator for small to medium size projects without dependencies.

miniFASTA An easy FASTA object handler, reader, writer and translator for small to medium size projects without dependencies. Installation Using pip /

Jules Kreuer 3 Jun 30, 2022
A python script that automatically joins a zoom meeting based on your timetable.

Zoom Automation A python script that automatically joins a zoom meeting based on your timetable. What does it do? It performs the following processes:

Shourya Gupta 3 Jan 01, 2022
For Tok-k passages that have passed through the Bi-Encoder Retrival, ReRank is performed using CrossEncoder.

Cross-Encoder-with-Bi-Encoder For Tok-k passages that have passed through the Bi-Encoder Retrival, ReRank is performed using CrossEncoder. Data Data u

7 Feb 09, 2022
A lightweight solution for local Particle development.

neopo A lightweight solution for local Particle development. Features Builds Particle projects locally without any overhead. Compatible with Particle

Nathan Robinson 19 Jan 01, 2023
Cardano SundaeSwap ISO SPO vote ranking script

Cardano SundaeSwap ISO SPOs vote ranking This Python 3 script uses the database populated by cardano-db-sync from the Cardano blockchain to generate a

SM₳UG 1 Nov 17, 2021
An event-based script that is designed to improve your aim

Aim-Trainer Info: This is an event-based script that is designed to improve a user's aim. It was built using Python Turtle and the Random library. Ins

Ethan Francolla 4 Feb 17, 2022
Reactjs web app written entirely in python, using transcrypt compiler.

Reactjs web app written entirely in python, using transcrypt compiler.

Dan Shai 22 Nov 27, 2022
A Classroom Engagement Platform

Project Introduction This is project introduction Setup Setting up Postgres This is the most tricky part when setting up the application. You will nee

Santosh Kumar Patro 1 Nov 18, 2021