GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - CrazyProger1/FastPy: FastPy is a statically typed programming language with pythonic syntax.

BranchesTags
Open more actions menu

Latest commit

 

History

125 Commits
125 Commits

Folders and files

NameName
Last commit message
Last commit date
config
config
 
 
cpp_code
cpp_code
 
 
docs
docs
 
 
examples
examples
 
 
fastpy
fastpy
 
 
fastpy_build
fastpy_build
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
config.py
config.py
 
 
main.fpy
main.fpy
 
 
main.py
main.py
 
 
requirements.txt
requirements.txt
 
 

Repository files navigation

FastPy

FastPy is a statically typed programming language with pythonic syntax.

About

FastPy is a new general purpose, multi-paradigm, high performance, statically typed programming language which have pytonic intuitive syntax.

Examples

  • "Hello, World" program:
# Just a comment :D

log('Hello, World!')  # print hello world
  • "Far Future" program:
interface Car:
    public:
        fun __init__(name: str, weight: int): ...
		
		
        @property
        fun brand() -> str: ...
			
		
        @property
        fun name() -> str: ...
			
			
        @property
        fun weight() -> int: ...
		

class Tesla(Car): # Car implementation
    private:
        __name: str
        __weight: int
    public:
        fun __init__(name: str, weight: int):
            __name = name
            __weight = weight
		
		
        @property
        fun brand() -> str:
            return 'Tesla'
			
		
        @property
        fun name() -> str:
            return __name
			
			
        @property
        fun weight() -> int:
            return __weight



fun car_factory(car_brand: str, name: str, weight: int) -> Car:
    match car_brand:
        case "Tesla":
            return Tesla(name, weight)
        default:
            return null


some_car: Car = car_factory("Tesla", "Model X", 2301) 
log(some_car.name) # Model X
log(some_car.weight) # 2301

*For more samples, see examples directory.

Features

  • Transpailable to C++. Therefore, compiled. Therefore, fast
  • Easy intuitive syntax, similar to Python
  • Statically typed
  • Easy expandable
  • Flexible, you can customize it for yourself or completely rewrite each component
  • Built-in logging system

Customizing

That language is built in such a way that allows to support customizing at every stage of transpiling or interpreting. For more info, see customizing doc file.

Highlighting

To enable syntax highlighting, see highlighting doc file.

Requirements

To transpile and compile your program, you need to install the requirements.

Windows

  1. First, you need to install Python 3.10
  2. Then install some libs:
pip install -r requirements.txt
  1. Next, you need to install MinGW (optional, only used for compilation)

Transpiling

Usage:

python main.py [-h] -s SOURCE [-t] [-o OUTPUT] [-c]

Examples:

  • Transpile file main.fpy to C++ and save to some_folder/src:
python main.py -s main.fpy -t -o some_folder
  • Transpile file main.fpy to C++ and save to some_folder/src and compile:
python main.py -s main.fpy -t -c -o some_folder

First run from IDE (script: file):

First run from IDE

TODO

The entire list of completed and scheduled tasks is available in the TODO file.

Contributors

Status

Project frozen until studying end :(

Licence

FastPy uses the MIT license. See the bundled LICENSE file for details.

About

FastPy is a statically typed programming language with pythonic syntax.

Topics

abstract-syntax-treecustom-programming-languagelexingparsingpythonic-code-styletranspiling

Resources

Readme
MIT license
Activity

Stars

10 stars

Watchers

3 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.