My new coding language.
LoganSpong (117)

First off, I am 10 years old. Do not expect much.

Also, I KNOW this is not a coding language. I get it.

This also took me around a month to make. Hope you enjoy!

Ok, this is my first post and I put a lot of hard work into this. Inspyre is a object oriented coding language built off of Python 3. I built this coding language because I believe that Python could be more object-oriented, and I wanted to mix JS and Python together. Anyways, to make your OWN Inspyre project, (and maybe the first), go-to main.py and start coding!

How to use Inspyre

1. Variables

To use variables is the same as in Python. Don't know how?
Like in many other coding languages, you can assign a variable like this:

a = 32
or
b = 'Hello Python!'

Anyways,

2. Math

Inspyre has a lot of integrated math functions. There are the standard ones, like add, sub, mul, div etc. But there are also mod and expon functions as well.

3. Random

Inspyre has A LOT of random functions.
I can’t explain them all, but here is a list:

  • rand()
  • randbetween()
  • randuni()<-- My personal favorite.
  • randhex()
  • randbin()
  • randoct()
  • genletter()

4. Logic

There are multiple assert functions in Inspyre like:

  • GT Greater than
  • SGT Strictly Greater than
  • LT Less than
  • SLT Strictly Less than
  • EQ Equal to

There are also quite a lot of logic gates:

  • AND
  • OR
  • NOT
  • NAND
  • NOR
  • XOR

5. The “console” class:

There are multiple functions for this as well, and color is also integrated.

  • w() Log something to the console(print)
  • wait()
  • line_break()
  • tab()
  • clear()
  • aspos()
  • double_aspos()
  • revrs()
  • unitrans()
  • ask()

5a. Color:

Whenever you want to change the text color, use this:
console.color.Fore.<color>(<text>)
Highlighting:
console.color.Back.<color>(<text>)
Style:
console.color.Style.<style>(<text>)

Example:
Color “hello world” red:
console.color.Fore.red(‘hello world’)

The color functions were made using colorama.

6. JSON:

Dumping to a file:
jsonpy.dump(<filename>, <text>)

Loading a file:
jsonpy.load(<filename>)

7.Stream (Work In Progress):

Stream will make a updateable stream that can be used to:

  • Post Information
  • Update users
  • Log Things
  • and Make Notifications.

Commands:
stream.create(<title>, <visible>)
Creates a stream with the title <title>.
If visible is “True”, it will print the stream.
Else, return None.

stream.update(<text>)
Update the stream with <text>.

stream.revomepost(<remove>)
Remove all posts with the key word <remove>.

If you like this post check out some of my other ones;
My try at an OS: (spoiler: I failed.) https://repl.it/talk/share/PythonOS/38320

Google text to speech tutorial:
https://repl.it/talk/learn/A-quick-guide-to-the-gTTS-Library/38045

Ball collecter game:
https://repl.it/talk/share/Ball-Collecter/38128

That’s all for now! If you would like to see a Part 2, where I cover more advanced things, comment! I might do so.

Bye! Stay Safe!

You are viewing a single comment. View All
Viper2211 (37)

This is really cool! Keep it up!