gen-lang / gen Goto Github PK
View Code? Open in Web Editor NEWAn 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
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
I've never built a web-based playground.
Could you guys help me create one?
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?
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.
This code does not work:
map = {[1, 2, 3]: "something"}
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
import("library file")
or just a keyword:
import "library file"
That's all :)))
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).
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.
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?
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.
This if statement does not work:
if arr@i == arr@j then # do_something
So, to solve this, just assign them to new variables for now:
a = arr@i
b = arr@j
if a == b then # do_something
Update
See the comment below, which is way better.
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.
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)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.