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
An audnexus client, providing rich author and audiobook data to Plex via it's legacy plugin agent system.

Audnexus.bundle An audnex.us client, providing rich author and audiobook data to Plex via it's legacy plugin agent system. 📝 Table of Contents About

David Dembeck 248 Jan 02, 2023
Shai-Hulud - A qtile configuration for the (spice) masses

Shai-Hulud - A qtile configuration for the (spice) masses Installation Notes These dotfiles are set up to use GNU stow for installation. To install, f

16 Dec 30, 2022
An interactive course to git

OperatorEquals' Sandbox Git Course! Preface This Git course is an ongoing project containing use cases that I've met (and still meet) while working in

John Torakis 62 Sep 19, 2022
Use `forge` and `cast` commands in Python scripts

foundrycli.py ( 🔥 , 🐍 ) foundrycli.py is a Python library I've made for personal use; now open source. It lets you access forge and cast CLIs from P

Zero Ekkusu 17 Jul 17, 2022
mypy plugin for PynamoDB

pynamodb-mypy A plugin for mypy which gives it deeper understanding of PynamoDB (beyond what's possible through type stubs). Usage Add it to the plugi

1 Oct 21, 2022
If Google News had a Python library

pygooglenews If Google News had a Python library Created by Artem from newscatcherapi.com but you do not need anything from us or from anyone else to

Artem Bugara 1.1k Jan 08, 2023
🚀 emojimash 🚀 is a programming language with ALL THE EMOJI

🚀 emojimash 🚀 is a programming language with ALL THE EMOJI

Python Whiz 256 1 Oct 26, 2021
Python pyside2 kütüphanesi ile oluşturduğum drone için yer kontrol istasyonu yazılımı.

Ground Control Station (Yer Kontrol İstasyonu) Teknofest yarışmasında yerlilik kısmında Yer Kontrol İstasyonu yazılımı seçeneği bulunuyordu. Bu yüzden

Emirhan Bülbül 4 May 14, 2022
A package selector for building your confy nest

Hornero A package selector for building your comfy nest About Hornero helps you to install your favourite packages on your fresh installed Linux distr

Santiago Soler 1 Nov 22, 2021
Check a discord message and give it a percentage of scamminess

scamChecker Check a discord message and give it a percentage of scamminess Run the bot, and run the command !scamCheck and it will return a percentage

3 Sep 22, 2022
A general purpose low level programming language written in Python.

A general purpose low level programming language written in Python. Basal is an easy mid level programming language compiling to C. It has an easy syntax, similar to Python, Rust etc.

Snm Logic 6 Mar 30, 2022
A data driven app for bicycle hiring in London(UK)

bicycle_hiring_app_deployed A data driven app for bicycle hiring in London(UK). It predicts expected number of bicycle hire in London. It asks users t

Rajarshi Roy Raju 1 Dec 10, 2021
Open Source Management System for Botanic Garden Collections.

BotGard 3.0 Open Source Management System for Botanic Garden Collections built and maintained by netzkolchose.de in cooperation with the Botanical Gar

netzkolchose.de 1 Dec 15, 2021
API for SpeechAnalytics integration with FreePBX/Asterisk

freepbx_speechanalytics_api API for SpeechAnalytics integration with FreePBX/Asterisk Скопировать файл settings.py.sample в settings.py и отредактиров

Iqtek, LLC 3 Nov 03, 2022
A python script to get your activity

activities A python script to get your activity Not complete Requirements Python (=3.7) Pip (for python = 3.7) Git Pip packages psutil asyncio aioht

StarNumber 3 Nov 07, 2021
An open-source systems and controls toolbox for Python3

harold A control systems package for Python=3.6. Introduction This package is written with the ambition of providing a full-fledged control systems s

Ilhan Polat 157 Dec 05, 2022
An advanced pencil sketch generator

Pencilate An advanced pencil sketch generator About : An advanced pencil sketch maker made in just 12 lines of code. Yes you read it right, JUST 12 LI

MAINAK CHAUDHURI 23 Dec 17, 2022
UniPD exam dates finder

UniPD exam dates finder Find dates for exams at UniPD Usage ./finder.py courses.csv It's suggested to save output to a file: ./finder.py courses.csv

Davide Peressoni 1 Jan 25, 2022
SkyPort console user terminal written in python

SkyPort terminal implemented as a console script written in Python Description Sky Port is an universal bus between user software and compute resource

Sky Workflows 1 Oct 23, 2022
Semester long, web application project for CSCI 4370/6370 (Database Management)

Database_Project Prototype ideas for website: Computer Science library (Sells books, products, etc.) Code editor Graph visualizer / creator (can save

Jordan Harman 4 Feb 17, 2022