Giter Site home page Giter Site logo

gen-lang / gen Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 2.0 274 KB

An easy-to-learn, dynamic, interpreted, procedural, free-walking (funny) programming language.

Home Page: https://gen-lang.github.io/Gen/

License: GNU General Public License v3.0

Python 98.36% Makefile 0.67% Vim Script 0.96%
programming-language programming python python3 interpreter gen gen-lang language toy

gen's People

Contributors

bichanna avatar galaxianmonster avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

bichanna

gen's Issues

Is it time to release 0.2.0?

I think map and array are quite stable now, and I implemented importing. So, I think it's time to release the 0.2.0 version.

What do you think?

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 = imported@bubble_sort([12, 43, 23, 44])
println(arr)

I'm still experimenting with the latter.

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

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 :)))

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).

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.

Need for an official website

I think we need an official website, but as you know, I don't have much time these days.
If you can, could you create a simple website for Gen lang?

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.

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.

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.