///////////////////////////////////////////////////////////////////////////////////// ---------------- Loghi a programming language ----------- \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ [I reshared it because I added imports and graphics] Hi, this is a little programming language I made, it's a compiled one this time so way faster than a interpreted one... To go faster you should go on Turbo mode or on Turbowarp (around 100 000 op/s): https://turbowarp.org/833667626/fullscreen?turbo The demo you have is basicly the Collatz Conjecture and it return the number of steps you need to reach 1 from any number. /!\ no built-in for loops, but can be made using 'while' /!\ you don't need to put the right amout of arguments in a function, it will not raise any error but you can have some unexpected values /!\ if you don't return the program will continu running straight getting out of the function (can be use as a jump feature) feature: - basic arithmetics: '+', '-', '*', '/', '%', '//', 'and', 'or', 'not', '==', '!=', '>', '<', '>=', '<=', '&' - data types: numbers (int and floats), strings (starts with ["] and end also with a ["]), bools (True and False statements) - you can use lists by entering: init[size] name; and then access and set item like this: name[position] (= value); - variables: name = value (or access using the name) - functions: func name(args) {... return value;} => return is needed or you'll get some funny bugs - call functions: name(args) - if statements: if [cond] {...}(else {...}) => no 'elif' or 'else if' in the same if statement - while statement: while [cond] {...} - increment: [name]++; - imports: import [module name]; - use certain built-in function: using{[name], ...}; - single lines comments start with: '!', multi-lines comments start with '/*' and end with '*/' built-in functions (they are only accessible after importing certain modules (mainly the "basics" module)): - print(*) - input(*) - len(*) - raise(*) => raise an error - random() => return a random value between [0, 1] - time() => return the 'days from 2000' Scratch block (multily by 86400 to get it in seconds) - num(*) => transform a string into a number - str(*) => transform a number into a string - floor(*) - ceil(*) - abs(*) - exp(*) - ln(*) - sin(*) - cos(*) - tan(*) - asin(*) - acos(*) - atan(*) built-in module: - math - graphic (allow to make things using the pen) - time - random - sys (allow to get some control over some things) - basics (allow to use basic functions like print, input...) - memory (allow to deal with memory) - modules (basicly import all the other modules, to go faster) # Credits: # for the text engine else I did all by myself, that was fun...