My programming language named JoLang. (Mainly created for fun)

Related tags

MiscellaneousJoLang
Overview

JoLang

status: not ready

So this is my programming language which I decided to name 'JoLang' (inspired by Jonathan and GoLang).

Features I implemented so far:

  • shell (REPL)
  • Comments
  • macros
  • operators
  • variables
  • functions (only at AST level )
  • function calls (only at AST level)
  • if statements (only at AST level)
  • loops (while and for) (only at AST level)

Currently, I am working on the parser and AST and between task to task, i add features to the shell. I haven't implemented an interpreter yet, but the shell.

Docs:

comments:

You can write a comment with the $ prefix. a comment ends at the end of the line. example:

$ some comment
$ another comment

macros:

%macro any_identifier replace_with

What does a macro do? every time that the preprocessor sees an instance of any_identifier, it immediately replaces it with replace_with. Note that any_identifier must be an identifier. For example: %macro 0 1 would not work, but %macro zero 1, would.

Example:

%macro hello "hello"

hello + "world"

the parser would not see the macro at all, but just "hello" + "world".

operators:

for example: ~v, !v (negate v), +v, -v, v1+v2, v1 % v2. The precedence of the operators is the same as in Python (Except !,+, -, ~ which have the highest precedence after ()).

variables:

variables are set like that:

variable = any_expression

note that assignment is considered an expression and not an assignment, so it's possible to do stuff like (a = 2) and also (a = b = c = 2) and even inplace operators (a += b -= c = 2) which will assign 2 to c and then subtract-assign c (2) from b, and then add-assign it back to a.

functions:

you can define a function by the following syntax:

func thing(arg1, arg2){
 $ statements
}

Note that there are no keyword-arguments.

function calls:

You can "call" any expression, ()(), 4(), (3 + 4)(3) "hello"(), etc.

But an error would be raised if a special __call__-like method was not defined.

if statements

You can define an if statements by this syntax: if(expression){body}. you can also add elif(expr){body} and else{body} blocks.

example:

if(a = thing()){
    do_with(a) $ a is the result of thing()
}
elif(a = another_thing()){
}
else {
}

loops

There are two types of loops, a for loop and a while loop. the while loop is written like while(cond){body} and the for loop is written like for(expr;expr;expr){body} where expr can be nothing (like (;;)). in case the for loop is defined as (;;) it would be equivalent to while(true).

examples:

while:

while(name = getname()){
    do_with(name)
}

for:

for(i=0;i<10;i += 1){ $ there is no i++ in jolang (yet)
    do_with(i)
}
Owner
Jonathan
Jonathan, just a typical Python programmer.
Jonathan
Example platform plugin that fixes fentry calls in Binja

Example Binja Platform Plugin This is an example Binja platform plugin which fixes up linux kernel module calls to __fentry__. __fentry__ is the linux

_yrp 2 Oct 07, 2021
tagls is a language server based on gtags.

tagls tagls is a language server based on gtags. Why I wrote it? Almost all modern editors have great support to LSP, but language servers based on se

daquexian 31 Dec 01, 2022
The learning agent learns firstly approaching to the football and then kicking the football to the target position

Football Court This project utilized Pytorch and Tensorflow so that the learning agent learns firstly approaching to the football and then kicking the

1 Nov 19, 2021
Team Curie is a group of people working together to achieve a common aim

Team Curie is a group of people working together to achieve a common aim. We are enthusiasts!.... We are setting the pace!.... We offer encouragement and motivation....And we believe TeamWork makes t

4 Aug 07, 2021
Painel de consulta

⚙ FullP 1.1 Instalação 💻 git clone https://github.com/gav1x/FullP.git cd FullP pip3 install -r requirements.txt python3 main.py Um pequeno

gav1x 26 Oct 11, 2022
Project based on pure python with OOP

Object oriented programming review Object oriented programming (OOP) is among the most used programming paradigms (if not the most common) in the indu

Facundo Abrahan Cerimeli 1 May 09, 2022
This module is for finding the execution time of a whole python program

exetime 3.8 This module is for finding the execution time of a whole program How to install $ pip install exetime Contents: General Information Instru

Saikat Das 4 Oct 18, 2021
A webapp that timestamps key moments in a football clip

A look into what we're building Demo.mp4 Prerequisites Python 3 Node v16+ Steps to run Create a virtual environment. Activate the virtual environment.

Pranav 1 Dec 10, 2021
The fetch of the delegator list and the input of the epoch nonce need to be done independently

raffle The fetch of the delegator list and the input of the epoch nonce need to be done independently. Get the list of delegators at the epoch change.

1 Dec 15, 2021
Credit Card Fraud Detection

Credit Card Fraud Detection For this project, I used the datasets from the kaggle competition called IEEE-CIS Fraud Detection. The competition aims to

RayWu 4 Jun 21, 2022
Running a complete single-node all-in-one cluster instance of TIBCO ActiveMatrix™ BusinessWorks 6.8.0.

TIBCO ActiveMatrix™ BusinessWorks 6.8 Docker Image Image for running a complete single-node all-in-one cluster instance of TIBCO ActiveMatrix™ Busines

Federico Alpi 1 Dec 10, 2021
Persistent/Immutable/Functional data structures for Python

Pyrsistent Pyrsistent is a number of persistent collections (by some referred to as functional data structures). Persistent in the sense that they are

Tobias Gustafsson 1.8k Dec 31, 2022
Automatically unpin old messages so you can always pin more!

PinRotate Automatically unpin old messages so you can always pin more! Installation You will need to install poetry to run this bot locally for develo

3 Sep 18, 2022
This is a backport of the BaseExceptionGroup and ExceptionGroup classes from Python 3.11.

This is a backport of the BaseExceptionGroup and ExceptionGroup classes from Python 3.11. It contains the following: The exceptiongroup.BaseExceptionG

Alex Grönholm 19 Dec 15, 2022
Polypheny Connector for Python

Polypheny Connector for Python This enables Python programs to access Polypheny databases, using an API that is compliant with the Python Database API

Polypheny 3 Jan 03, 2022
Defichain maxi - Scripts to optimize performance on defichain rewards

defichain_maxi This script is made to optimize your defichain vault rewards by m

kuegi 75 Dec 31, 2022
Wrapper around anjlab's Android In-app Billing Version 3 to be used in Kivy apps

IABwrapper Wrapper around anjlab's Android In-app Billing Version 3 to be used in Kivy apps Install pip install iabwrapper Important ( Add these into

Shashi Ranjan 8 May 23, 2022
Simple Python tool to check if there is an Office 365 instance linked to a domain.

o365chk.py Simple Python script to check if there is an Office365 instance linked to a particular domain.

Steven Harris 37 Jan 02, 2023
Laurence Billingham 1 Feb 16, 2022
samples of neat code

NEAT-samples Some samples of code and config files for use with the NEAT-Python package These samples are largely copy and pasted, so if you

Harrison 50 Sep 28, 2022