CBLang is a programming language aiming to fix most of my problems with Python

Related tags

Miscellaneous cbLang
Overview

CBLang

A bad programming language made in Python.

CBLang is a programming language aiming to fix most of my problems with Python (this means that you likely don't need it), while still keeping it similar and as effective.

CBLang can be either interpreted, transpiled to python, or compiled into an exe using PyInstaller.

CBLang can run without any dependencies (including PyInstaller - you just won't be able to compile your programs, but they will run and transpile fine).

CBLang is only tested on Windows, but I'm sure it wouldn't be hard at all to get working on Linux.

Be warned that everything is basically held together by hopes and dreams, so you are going to get a load of super random errors.

So, how does it work?

class Main()
{
    function Main()
    {
        //Here is a comment!
        print("Hello World");
    }
}

^This is a basic Hello World program.

To run this, you will need the CBLang interpreter that you can either obtain by running .\build.bat or downloading it from the releases section.



More advanced behaviour:

//main.cb

//Include python libraries
from native include sys;

//Include other cbLang code
include OtherFile;

class Main()
{
    function Main()
    {
        TryQuit(false);

        instance = OtherClass();
        print(instance.Add(1, 2));

        TryQuit(true);
        print(instance.Add(2, 3));
        //^This line will never be reached
    }
    function Quit(shouldQuit : bool)
    {
        if (shouldQuit == true)
        {
            print("Quitting");
            sys.exit();
        }
        else
        {
            print("Did not quit");
        }
    }
}

//OtherFile.cb
class OtherClass
{
    //Constructor
    function Start()
    {
        print("Created a new instance of OtherClass!");
    }

    function Add(a, b) is int
    {
        return a + b;
    }
}

^This is a basic example of importing external code, along with demonstrating other concepts in the programming language.

You might also like...
Short, introductory guide for the Python programming language
Short, introductory guide for the Python programming language

100 Page Python Intro This book is a short, introductory guide for the Python programming language.

sawa (ꦱꦮ) is an open source programming language, an interpreter to be precise, where you can write python code using javanese character.
sawa (ꦱꦮ) is an open source programming language, an interpreter to be precise, where you can write python code using javanese character.

ꦱꦮ sawa (ꦱꦮ) is an open source programming language, an interpreter to be precise, where you can write python code using javanese character. sawa iku

A topology optimization framework written in Taichi programming language, which is embedded in Python.
A topology optimization framework written in Taichi programming language, which is embedded in Python.

Taichi TopOpt (Under Active Development) Intro A topology optimization framework written in Taichi programming language, which is embedded in Python.

Built with Python programming language and QT library and Guess the number in three easy, medium and hard rolls
Built with Python programming language and QT library and Guess the number in three easy, medium and hard rolls

guess-the-numbers Built with Python programming language and QT library and Guess the number in three easy, medium and hard rolls Number guessing game

Built with Python programming language and QT library and Guess the number in three easy, medium and hard rolls
Built with Python programming language and QT library and Guess the number in three easy, medium and hard rolls

password-generator Built with Python programming language and QT library and Guess the number in three easy, medium and hard rolls Password generator

Nook is a simple, concatenative programming language written in Python.

Nook Nook is a simple, concatenative programming language written in Python. Status Nook is currently WIP. It lacks a lot of basic feature, and will n

a simple functional programming language compiler written in python

Functional Programming Language A compiler for my small functional language. Written in python with SLY lexer/parser generator library. Requirements p

Eros is an expiremental programming language built using simple Python code.

Eros is an expiremental programming language built using simple Python code. Featuring an easy syntax and unique features like type slicing, the language remains an expirement that grows in down time.

A basic interpreted programming language written in python

shin A basic interpreted programming language written in python. extension You can use our own extension ".shin". Example: main.shin How to start Clon

Comments
  • The Interpreter doesn't pass arguments to the python version of the file.

    The Interpreter doesn't pass arguments to the python version of the file.

    A command like:

    cbLang test.cb test
    

    should return something like "test" to the sys.argv thing right? Well. NO! It does not. And that's a major bug. Meaning any application using them will not work.

    NOTE

    The compiled / transpiled version will pass in the arguments already.

    opened by ANDREI12333 2
  • Curly brackets syntax

    Curly brackets syntax

    Hey! I love the idea of having Python with more C-like syntax. For now, though, cbLang only supports curly brackets on another line as you'd do in C/C++/C# and doesn't support having them on the same line as you would in Java or JS. I've been trying to modify the bracket parsing code, but I haven't managed to yet. I was wondering whether it'd be even feasible to change that, or if that'd be too complicated and I should just not try.

    Thanks a lot!

    opened by UlysseBerra 0
Releases(0.1.2)
Owner
Chadderbox
Indie Game Developer youtube.com/chadderbox
Chadderbox
A redesign of our previous Python World Cup, aiming to simulate the 2022 World Cup all the way from the qualifiers

A redesign of our previous Python World Cup, aiming to simulate the 2022 World Cup all the way from the qualifiers. This new version is designed to be more compact and more efficient and will reflect the improvements in our programming ability.

Sam Counsell 1 Jan 7, 2022
YunoHost is an operating system aiming to simplify as much as possible the administration of a server.

YunoHost is an operating system aiming to simplify as much as possible the administration of a server. This repository corresponds to the core code, written mostly in Python and Bash.

YunoHost 1.5k Jan 9, 2023
This is a library which aiming to save all my code about cpp. It will help me to code conveniently.

This is a library which aiming to save all my code about cpp. It will help me to code conveniently.

Paul Leo 21 Dec 6, 2021
A collection of existing KGQA datasets in the form of the huggingface datasets library, aiming to provide an easy-to-use access to them.

KGQA Datasets Brief Introduction This repository is a collection of existing KGQA datasets in the form of the huggingface datasets library, aiming to

Semantic Systems research group 21 Jan 6, 2023
Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like.

Advent Of Code 2021 - Python English Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels th

Coral Izquierdo Muñiz 2 Jan 9, 2022
Tool to audit and fix Python project requirements.

Requirement Auditor Utility to revise and updated python requirement files.

Luis Carlos Berrocal 1 Nov 7, 2021
Fix Eitaa Messenger's Font Problem on Linux

Fix Eitaa Messenger's Font Problem on Linux

null 6 Oct 15, 2022
From "fixed RAnDom CRashes" to "[FIX] Fixed random crashes."

Clean Commit From fixed RAnDom CRashes to [FIX] Fixed random crashes. Clean commit helps you by auto-formating your commits to make your repos better

Mathias 3 Dec 26, 2021
Rick Astley Language is a rick roll oriented, dynamic, strong, esoteric programming language.

Rick Roll Language / Rick Astley Language A rick roll oriented, dynamic, strong, esoteric programming language. Prolegomenon The reasons that I made t

Rick Roll Programming Language 658 Jan 9, 2023
PyGo custom language, New but similar language programming

New but similar language programming. Now we are capable to program in a very similar language to Python but at the same time get the efficiency of Go.

Fernando Perez 4 Nov 19, 2022