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
Speed up your typing by some exercises in the multi-platform(Windows/Ubuntu).

Introduction This project purpose is speed up your typing by some exercises in the multi-platform(Windows/Ubuntu). Build Environment Software Environm

lyfer233 1 Mar 24, 2022
a wordle-solver written in python

Wordle Solver Overview This is yet another wordle solver. It is built with the word list of the official wordle website, but it should also work with

Shoubhit Dash 10 Sep 24, 2022
Developed a website to analyze and generate report of students based on the curriculum that represents student’s academic performance.

Developed a website to analyze and generate report of students based on the curriculum that represents student’s academic performance. We have developed the system such that, it will automatically pa

VIJETA CHAVHAN 3 Nov 08, 2022
These are the scripts used for the project of ‘Assembly of a pan-genome for global cattle reveals missing sequence and novel structural variation, providing new insights into their diversity and evolution history’

script-SV-genotyping These are the scripts used for the project of ‘Assembly of a pan-genome for global cattle reveals missing sequence and novel stru

2 Aug 26, 2022
Aevsploit İçin Destekde Bulun Papara: 1427113016

Aevsploit İçin Destekde Bulun Papara: 1427113016 Toolu Geliştirmek İçin Fikirlerinizi Bekliyorum Telegram

9 Jun 07, 2022
The earliest beta version of pytgcalls on Linux x86_64 and ARM64! Use in production at your own risk!

Public beta test. Use in production at your own risk! tgcalls - a python binding for tgcalls (c++ lib by Telegram); pytgcalls - library connecting pyt

Il'ya 21 Jan 13, 2022
Deis v1, the CoreOS and Docker PaaS: Your PaaS. Your Rules.

This repository (deis/deis) is no longer developed or maintained. The Deis v1 PaaS based on CoreOS Container Linux and Fleet has been replaced by Deis

Deis 6.1k Jan 04, 2023
Web app for keeping track of buildings in danger of collapsing in the event of an earthquake

Bulina Roșie 🇷🇴 Un cutremur în București nu este o situație ipotetică. Este o certitudine că acest lucru se va întâmpla. În acest context, la mai bi

Code for Romania 27 Nov 29, 2022
Chess bot can play automatically as white or black on lichess.com, chess.com and any website using drag and drop to move pieces

Chessbot "Why create another chessbot ?" The explanation is simple : I did not find a free bot I liked online : all the bots I saw on internet are par

Dhimas Bagus Prayoga 2 Nov 11, 2021
Ontario-Covid-Screening - An automated Covid-19 School Screening Tool for Ontario

Ontario-Covid19-Screening An automated Covid-19 School Screening Tool for Ontari

Rayan K 0 Feb 20, 2022
Learn Python Regular Expressions step by step from beginner to advanced levels

Python re(gex)? Learn Python Regular Expressions step by step from beginner to advanced levels with hundreds of examples and exercises The book also i

Sundeep Agarwal 1.3k Dec 28, 2022
Python library to natively send files to Trash (or Recycle bin) on all platforms.

Send2Trash -- Send files to trash on all platforms Send2Trash is a small package that sends files to the Trash (or Recycle Bin) natively and on all pl

Andrew Senetar 224 Jan 04, 2023
Run unpatched binaries on Nix/NixOS

Run unpatched binaries on Nix/NixOS

Thiago Kenji Okada 160 Jan 08, 2023
Versión preliminar análisis general de Covid-19 en Colombia

Covid_Colombia_v09 Versión: Python 3.8.8 1/ La base de datos del Ministerio de Salud (Minsalud Colombia) está en https://www.datos.gov.co/Salud-y-Prot

Julián Gómez 1 Jan 30, 2022
My Analysis of the VC4 Assembly Code from the RPI4

My Analysis of the VC4 Assembly Code from the RPI4

Nicholas Starke 31 Jul 13, 2022
This repo contains scripts that add functionality to xbar.

xbar-custom-plugins This repo contains scripts that add functionality to xbar. Usage You have to add scripts to xbar plugin folder. If you don't find

osman uygar 1 Jan 10, 2022
Python’s bokeh, holoviews, matplotlib, plotly, seaborn package-based visualizations about COVID statistics eventually hosted as a web app on Heroku

COVID-Watch-NYC-Python-Visualization-App Python’s bokeh, holoviews, matplotlib, plotly, seaborn package-based visualizations about COVID statistics ev

Aarif Munwar Jahan 1 Jan 04, 2022
Bad Apple printed out on the console with Python!

bad-apple Bad Apple printed out on the console with Python! Preface A word of disclaimer, while the final code is somewhat original, this project is a

CalvinLoke 186 Dec 01, 2022
A Sophisticated And Beautiful Doxing Tool

Garuda V1.1 A Sophisticated And Beautiful Doxing Tool Works on Android[Termux] | Linux | Windows Don't Forget to give it a star ❗ How to use ❓ First o

The Cryptonian 67 Jan 10, 2022
Cirq is a Python library for writing, manipulating, and optimizing quantum circuits and running them against quantum computers and simulators

Cirq is a Python library for writing, manipulating, and optimizing quantum circuits and running them against quantum computers and simulators. Install

quantumlib 3.6k Jan 07, 2023