Skip to content

A prototypical language with knack for extensibility and meta programming.

License

Notifications You must be signed in to change notification settings

ParaCodeLang/ParaCode

Repository files navigation

ParaCode

Prototypical language with knack for extensibility and meta programming

In ParaCode, all types are objects, and vice versa. Everything is an object, and that includes functions. Objects descend from a parent object and inherit functions and variables from the parent. For example, to create a type, we extend from a parent Object (in this case Type), and define any methods

The core library in ParaCode is written in itself, even allowing for methods to be attached with the Object.patch() method at runtime. Types in ParaCode are built of Objects and have overloadable functions for operations such as addition, subtraction, multiplication, division, modulus, and compare. Types including String, Int, Float, and Bool are all defined completely in ParaCode, including all operations that can be done on them. For instance, the call operator can be overloaded, with an example being that when a Number is called 5(10) it multiplies the values together, allowing for a math-like syntax in programming.

ParaCode also has many methods that have functional language characteristics for example Array mapping and lambdas, and new concept ideas such as Prototypical Inheritance.

I'm currently rewriting ParaCode in Rust for better speed and efficiency. I'm planning to keep ParaCode code and the standard library similar to how it is today, and even try maintaining version parity unless it becomes too much of a burden on me and the language itself.

vars - How to declare and use variables

functions - Writing and calling functions

strings - Strings operations and interpolation

operators - Available operators + Operator overloading

types - Custom types

proto - Extending types using prototypical inheritance

macros - Macros

arrays - Array operations

dictionary - Dictionary operations

iterators - Building custom iterator objects

random - Random number generation

modules - Modules

packages - Packages

console - Console input and output

files - File reading and writing

json - JSON reading and writing

Examples

embedding

numbers

strings

patching

operator overloading

tic tac toe

pythagorean theorem calculator

rule110

Be sure to check out our TicTacToe example! Start the REPL by running main.py and call tictactoe(); to try it out!

To update ParaCode, run the update.sh file. On most operating systems this can be done with

sh update.sh

Or, to install and update ParaCode, run everything from update.sh.

You can find the Changelog here.