Share your repls and programming experiences

← Back to all posts
py4 Programing Language
TurtleAndrew (202)

I've spent the last 4-7 hours creating the py4 language. Note that it is an early version and may produce bugs that shouldn't happen. To program in the language, write in the "program.py4" file (you will have to fork the project). Don't worry about it being slow due to being made in python because it compiles the code to python, writes it to a file, then runs the python file. The commands are similar to c#. Indentations arn't required or used in compiling (it uses "{" and "}" instead of indentation). You use new to create an instance (if your getting errors within python when using a new then remove the new, they are still buggy.) You use f after a float (the number part) and structs are supported. The void type and null type are different, the void type means nothing and the null type means the type needs to be defined like the screen in the example. The null type is used for types that you can't write out. You use "//" for comments. Import packages using "using" followed by the package name, you can rename the import by add as "name here". The packages (imported with using) when converted to python are as following, visualization: pygame, math: math, vectors: PyVectors (github), random: random, time: time, system: the system python file. Please enjoy and ask any questions you have!