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

Related tags

MiscellaneouscbLang
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
Discovering local read-level DNA methylation patterns and DNA methylation heterogeneity in intermediately methylated regions

Discovering local read-level DNA methylation patterns and DNA methylation heterogeneity in intermediately methylated regions

1 Jan 11, 2022
A way to write regex with objects instead of strings.

Py Idiomatic Regex (AKA iregex) Documentation Available Here An easier way to write regex in Python using OOP instead of strings. Makes the code much

Ryan Peach 18 Nov 15, 2021
Extrator de dados do jupiterweb

Extrator de dados do jupiterweb O programa é composto de dois arquivos: Um constando apenas de classes complementares que representam as unidades e as

Bruno Aricó 2 Nov 28, 2022
JSEngine is a simple wrapper of Javascript engines.

JSEngine This is a simple wrapper of Javascript engines, it wraps the Javascript interpreter for Python use. There are two ways to call interpreters,

11 Dec 18, 2022
Automatically skip sponsor segments in YouTube videos playing on Apple TV.

iSponsorBlockTV Skip sponsor segments in YouTube videos playing on an Apple TV. This project is written in asycronous python and should be pretty quic

David 64 Dec 17, 2022
Sorter makes file organisation and management easier.

Sorter Sorter makes file organisation easier. It simply helps you organise several files that contain similar characteristics into a single folder. Yo

Aswa Paul 34 Aug 14, 2022
Project of the MSEC_LDD . group

HackathonJuntionXHN Project of team MSEC_LQĐ What did we do? Building application to generate whitelist regex for Web application firewall How to setu

Nguyễn Mạnh Cường 0 Dec 19, 2021
Shell Trality API for local development.

Trality Simulator Intro This package is a work in progress. It allows local development of Trality bots in an IDE such as VS Code. The package provide

CrypTrality 1 Nov 17, 2021
JurjenLang, an interpreted programming language

JurjenLang An interpreted programming language Getting started Follow these three steps on your computer to get started git clone https://github.com/J

JVerbruggen 5 May 03, 2022
python scripts and other files to generate induction encoder PCBs in Kicad

induction_encoder python scripts and other files to generate induction encoder PCBs in Kicad Targeting the Renesas IPS2200 encoder chips.

Taylor Alexander 8 Feb 16, 2022
System Design Assignments as part of Arpit's System Design Masterclass

System Design Assignments The repository contains a set of problem statements around Software Architecture and System Design as conducted by Arpit's S

Relog 1.1k Jan 09, 2023
libvcs - abstraction layer for vcs, powers vcspull.

libvcs - abstraction layer for vcs, powers vcspull. Setup $ pip install libvcs Open up python: $ python # or for nice autocomplete and syntax highlig

python utilities for version control 46 Dec 14, 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
World's best free and open source ERP.

World's best free and open source ERP.

Frappe 12.5k Jan 07, 2023
Convert Roman numerals to modern numerals and vice-versa

Roman Numeral Conversion Utilities This is a utility module for converting from and to Roman numerals. It supports numbers upto 3,999,999, using the v

Fictive Kin 1 Dec 17, 2021
Starscape is a Blender add-on for adding stars to the background of a scene.

Starscape Starscape is a Blender add-on for adding stars to the background of a scene. Features The add-on provides the following features: Procedural

Marco Rossini 5 Jun 24, 2022
ViberExport - Export messages from Viber messenger using viber.db file

📲 ViberExport Export messages from Viber messenger using viber.db file ⚡ Usage:

7 Nov 23, 2022
This is a Blender 2.9 script for importing mixamo Models to Godot-3

Mixamo-To-Godot This is a Blender 2.9 script for importing mixamo Models to Godot-3 The script does the following things Imports the mixamo models fro

8 Sep 02, 2022
A simple package for interacting with the 9kw.eu anti-captcha service.

Welcome to captcha9kw’s documentation! captcha9kw is a smallish Python package for making use of the 9kw.eu services, including solving of interactive

2 Feb 26, 2022
This Python library searches through a static directory and appends artist, title, track number, album title, duration, and genre to a .json object

This Python library searches through a static directory (needs to match your environment) and appends artist, title, track number, album title, duration, and genre to a .json object. This .json objec

Edan Ybarra 1 Jun 20, 2022