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
Pattern Matching for Python 3.7+ in a simple, yet powerful, extensible manner.

Awesome Pattern Matching (apm) for Python pip install awesome-pattern-matching Simple Powerful Extensible Composable Functional Python 3.7+, PyPy3.7+

Julian Fleischer 97 Nov 03, 2022
Tutorial on Tempo, Beat and Downbeat estimation

Tempo, Beat and Downbeat Estimation By Matthew E. P. Davies, Sebastian Bรถck and Magdalena Fuentes Resources and Jupyter Book for the ISMIR 2021 tutori

49 Nov 06, 2022
Simple calculator made in python

calculator Uma alculadora simples feita em python CMD, PowerShell, Bash โœ”๏ธ Inรญcio ๐Ÿ’ป apt-get update apt-get upgrade -y apt-get install python git git

Spyware 8 Dec 28, 2021
๐Ÿค–๏ธ Plugin for Sentry which allows sending notification via DingTalk robot.

Sentry DingTalk Sentry ้›†ๆˆ้’‰้’‰ๆœบๅ™จไบบ้€š็Ÿฅ Requirments sentry = 21.5.1 ็‰นๆ€ง ๅ‘้€ๅผ‚ๅธธ้€š็Ÿฅๅˆฐ้’‰้’‰ ๆ”ฏๆŒ้’‰้’‰ๆœบๅ™จไบบwebhook่ฎพ็ฝฎๅ…ณ้”ฎๅญ— ้…็ฝฎ็Žฏๅขƒๅ˜้‡ DINGTALK_WEBHOOK: Optional(string) DINGTALK_CUST

1 Nov 04, 2021
AIO solution for SSIS students

ssis.bit AIO solution for SSIS students Hardware CircuitPython supports more than 200 different boards. Locally available is the TTGO T8 ESP32-S2 ST77

3 Jun 05, 2022
Set of tools to analyze Tinynuke samples

tinynuke-toolset You'll find in that repository a set of tools and scripts I developped to analyze Tinynuke samples. Dll extractor: script used to ext

Heat Miser 14 Aug 18, 2022
GDSC UIET KUK ๐Ÿ“ , welcomes you all to this amazing event where you will be introduced to the world of coding ๐Ÿ’ป .

GDSC UIET KUK ๐Ÿ“ , welcomes you all to this amazing event where you will be introduced to the world of coding ๐Ÿ’ป .

Google Developer Student Club UIET KUK 9 Mar 24, 2022
LINUX-AOS (Automatic Optimization System)

LINUX-AOS (Automatic Optimization System)

1 Jul 12, 2022
Donatus Prince 6 Feb 25, 2022
1. ๋„ค์ด๋ฒ„ ์นดํŽ˜ ๋Œ“๊ธ€์„ ๋นจ๋ฆฌ ๋‹ค๋Š” ๊ธฐ๋Šฅ

naver_autoprogram ๊ธฐ๋Šฅ ์„ค๋ช… ๋„ค์ด๋ฒ„ ์นดํŽ˜ ๋Œ“๊ธ€์„ ๋นจ๋ฆฌ ๋‹ค๋Š” ๊ธฐ๋Šฅ ๋„ค์ด๋ฒ„ ์นดํŽ˜ ์ž๋™ ์ถœ์„ ์ฒดํฌ ๊ธฐ๋Šฅ ๋™์ž‘ ๋ฐฉ์‹ ์นดํŽ˜ ๋Œ“๊ธ€ ๊ธฐ๋Šฅ ๊ธฐ๋ณธ ๋™์ž‘์€ ์ฃผ๊ธฐ์ ์ธ ์Šค์ผ€์ฅด ๋™์ž‘์œผ๋กœ ํ•ด๋‹น ์นดํŽ˜ ID ์™€ ํŠน์ • API ์ฃผ์†Œ๋กœ ๋Œ€์ƒ์ด ์ƒˆ๊ธ€์„ ์ž‘์„ฑํ–ˆ๋Š”์ง€ ์ฒดํฌ. ํ•ด๋‹น ๋Œ€์ƒ์ด ์ƒˆ๊ธ€ ๋“ฑ

1 Dec 22, 2021
OpenTable Reservation Maker For Python

OpenTable-Reservation-Maker The code that corresponds with this blog post on writing a script to make reservations for me on opentable Getting started

JonLuca De Caro 36 Nov 10, 2022
BlackIP-Rep is a tool designed to gather the reputation and information of Bulk IP's.

BlackIP-Rep is a tool designed to gather the reputation and information of Bulk IP's. Focused on increasing the workflow of Security Operations(SOC) team during investigation.

0LiVEr 6 Dec 12, 2022
A python API act as Control Center to control your Clevo Laptop via wmi on windows.

ClevoPyControlCenter A python API act as Control Center to control your Clevo Laptop via wmi on windows. Usage # pip3 install pymi from clevo_wmi impo

3 Sep 19, 2022
A compiler for ARM, X86, MSP430, xtensa and more implemented in pure Python

Introduction The PPCI (Pure Python Compiler Infrastructure) project is a compiler written entirely in the Python programming language. It contains fro

Windel Bouwman 277 Dec 26, 2022
Python script to autodetect a base set of swiftlint rules.

swiftlint-autodetect Python script to autodetect a base set of swiftlint rules. Installation brew install pipx

Jonathan Wight 24 Sep 20, 2022
World Happiness Report is a publication of the Sustainable Development Solutions Network

World-Happiness-Report We are going to visualise what are the factors and which

Shubh Almal 1 Jan 03, 2023
Konomi: Kind and Optimized Next brOadcast watching systeM Infrastructure

Konomi ๅ‚™่€ƒใƒปๆณจๆ„ไบ‹้ … ็พๅœจ ฮฑ ็‰ˆใงใ€ใพใ ๅฎŸ้จ“็š„ใชใƒ—ใƒญใƒ€ใ‚ฏใƒˆใงใ™ใ€‚้€šๅธธๅˆฉ็”จใซใฏ่€ใˆใชใ„ใงใ—ใ‚‡ใ†ใ—ใ€ใ‚ตใƒใƒผใƒˆใ‚‚ใงใใพใ›ใ‚“ใ€‚ ๅฎ‰ๅฎšใ—ใฆใ„ใ‚‹ใจใฏๅˆฐๅบ•่จ€ใ„ใŒใŸใ„ๅ“่ณชใงใ™ใŒใ€ใใ‚Œใงใ‚‚ๆง‹ใ‚ใชใ„ๆ–นใฎใฟๅฐŽๅ…ฅใ—ใฆใใ ใ•ใ„ใ€‚ ไฝฟใ„ๆ–นใชใฉใฎ่ชฌๆ˜Žใ‚‚็”จๆ„ใงใใฆใ„ใชใ„ใŸใ‚ใ€่‡ชๅŠ›ใงใƒˆใƒฉใƒ–ใƒซใซๅฏพๅ‡ฆใงใใ‚‹ใ‚จใƒณใ‚ธใƒ‹ใ‚ขใฎๆ–นไปฅๅค–ใซ

tsukumi 243 Dec 30, 2022
a really simple bot that send you memes from reddit to whatsapp

a really simple bot that send you memes from reddit to whatsapp want to use use it? install the dependencies with pip3 install -r requirements.txt the

pai 10 Nov 28, 2021
Fly DCS without a joystick

Intro Usage Delete all mouse view axis Install DCSEasyControlExports to your "Saved Games/DCS/" Path python DCSEasyControl/main.py Set DCS to F12 view

XuHao 36 Dec 27, 2022
Student Result Management System Project in tkinter created based on python, tkinter, and SQLITE3 Database

Student-Result-Management-System This Student Result Management System Project in tkinter created based on python, tkinter, and SQLITE3 Database. The

Ravi Chauhan 2 Aug 03, 2022