Skip to content

Releases: megat69/ACPL

3.11 - The compiling, booleans, reassignment, and aliases update ! + 3.11.1 - Optimization and lib commands update

25 Jan 20:00
f230b71
Compare
Choose a tag to compare

Changelog :

3.11.1

  • New console commands
    • Added two new subcommands to lib command
    • lib list <available|installed>
      • Will, depending on whether you chose as parameter available or installed, show all the libs installed on your computer, or the ones available online.
    • lib update <lib>
      • As the name suggests, this command will update the lib of your choice.
      • With the recent 3.11 update, this command will come in handy.
  • COMPILER OPTIMIZATION
    • New setting : optimize-compiled-file, as a boolean.
      • Default : True
    • Decides whether or not the transpiled Python file should be optimized.
    • Optimiaztion takes longer to build the Python file, but the final code runs faster and is simpler to read.

3.11

  • Translation files are ready, just waiting for the translators.
    • Language 98% translated in French.
  • Files library
    • Can read files
    • Can write in files
  • Lib access to variables
    • You can now use libs as variables
    • var <name> = lib <lib_name> <lib_syntax>
    • Example : var file_content = lib files my_file.txt
  • Deletevar tweak
    • You can now delete multiple vars at once
    • Just separate the variables names by commas
    • Syntax : deletevar <var1>, [var2], etc...
  • Var actions aliases
    • You can now use the var actions inline, by specifying it after the equal sign
    • Syntax : var[:type] <name> = var_action <var_action_name> [var_action_parameters] <value>
    • Some var actions used this way might require a different syntax, see the documentation for more info.
  • Variable length
    • You can now use the variable 'length'
    • Syntax : {length[<var_name>]}
  • New ls/dir command
    • Will build a file tree of the specified folder
    • Syntax : dir [folder=./] **[extension=*]
    • Example : dir ./ py acpl will diplay all acpl and Pytho files in the current folder
  • Command aliases
    • Define aliases using the $alias instruction
    • Allows to use other names for functions
    • Example :
      • You want to call print bu using the C++ like std::cout function
      • You have to type $alias print std::cout.
  • Equations have been disabled for if and while statements.
    • Who cares ? They are not needed there.
    • Might return in 3.11.1 or in 3.12
  • Full boolean implementation
    • New bool type
    • Defined with new var type :bool
    • Value : either True or False.
    • New built-in variables : true and false, with the respective boolean values.
  • Var modifications, without re-assigment
    • You can now just type a variable's name to redifine it once it has been defined, instead of typing the old-fashion var[:type] <name> = <value> again !
    • Now, you just need to type that once, and then a single <name>[:type] = <value> will be understood !
      • If the parameter type is not given, the type will be the type of the last variable's value.
      • E.g., if you had a variable named test which was an integer, if you don't specify a new type, the variable will remain an integer.
  • Compiler/Transpiler
    • Command compile has been renamed to transpile, which corresponds more to what it actually does.
    • A NEW COMPILER HAS BEEN INTRODUCED !
    • Your code can now be compiled into an auto-executable file !
      • If your program does not use any library, then the compiler function is supported.
      • If not, it might work, but is untested, and not supported either.
    • Syntax : compile <ACPL file> [Exe file filename=ACPL file filename] [--end-message:<bool> = True] [--disable-icon:<bool> = False]
      • ACPL file is the file you want to compile. THIS FILE HAS TO BE PLACED AT THE ACPL ROOT FOLDER !
      • Exe file filename is the filename of the compiled exe file. If not specified, the default name will be the name of the original script.
      • [--end-message:<bool> = True] is a boolean that will define whether or not the file will have an end message (litterally : Press enter to continue.. at the end of the script). Default : True.
      • [--disable-icon:<bool> = False] is a boolean that will define if you want to disable the ACPL icon as the exe file icon. Default : False. ICONS CANNOT BE CREATED ON LINUX DEVICES !

Update now by launching your ACPL console !

3.10 - Automatic updates, types in lists, command line arguments, libs requirements, debugger, and settings ! + 3.10.1

22 Dec 21:42
dee07df
Compare
Choose a tag to compare

3.10

  • Automatic updates
    • If it upsets you to ALWAYS have to manually update your ACPL, then this release might be the last you'll download.
    • This update brings back the automatic updates, in a revamped way.
    • If a new release is available, it will ask you once you boot the console.
    • If you skip the update, you can still download it by using the console command 'update', or by running updater_main.py.
  • Types in lists
    • You can define the type of an element in the list when you create it.
    • Syntax : var:list my_list = list [int:1] [float:1.5] [bool:True] [str:Normal string] [Default is str]
  • Command line arguments for main.py
    • When invoking main.py from a command prompt, you can add the filename of an ACPL file at the end. It will automatically run it and override the one in the startup file.
  • Condtions inside each other
    • ELSE HAS BEEN REMOVED
    • By popular opinion, nested ifs have been preferred to the else statement.
    • You can now use multiple ifs inside each other.
  • New libs function
    • A new function is required for libs to get through the compiler : libs_to_import()
    • This function returns all the required libs by the final python file this way :
    • If the generated result does not require anything in order to work, just return a tuple containing to empty tuples, this way : return (tuple(), tuple())
    • If it only requires to import a full lib, (example : sys), the first tuple contains that lib : return (("sys",), tuple())
    • If you need more of those : return (("sys", "math", "tkinter"), tuple())
    • The other tuple contains all the functions from libs. If you want from json import load, then : return (tuple(), (("json", "load"),))
    • If you want from json import load, dump, then : return (tuple(), (("json", "load, dump"),))
    • And if you want from json import load and from math import * : return (tuple(), (("json", "load"), ("math", "*")))
  • ACPL debugger
    • New console command debug <file>
    • This command will start a debugger that will tell you what happens in the ACPL program.
    • The program will tell you what instruction is being expected, what variables are existing at the end of the line, and let you continue it step by step or stop it. This possibility is available at every single line.
  • Settings
    • The old rusty modify-ini command was very complicated, with many things to remember. As its creator, I didn't remember those myself !
    • This command has been changed to settings, and doesn't take any arguments.
    • This will pop up a dialog box that will let you customize your settings.
  • Bugfixes
    • Lists were buggy with functions. They still are, but less.

3.10.1

  • Bugfixes
    • Corrected a shell from a past dev experience with command ini-content
      • Using that command made the console crash
      • Now fully fixed, with revamped version of the command
    • Corrected a problem with the settings command
      • When entering wrong values in input fields, and clicking save, the inputs weren't reset
      • It was just a dev error, now fully fixed.

3.9 - Functions, redo, string manipulations, and LIBS !

11 Dec 17:52
3fad284
Compare
Choose a tag to compare

3.9

  • IDE
    • Added a memory system to the IDE
    • Every time you close the IDE, it will save the last cursor position, and it will set the cursor to the correct position once you open this file again.
  • Redo
    • New console command
    • Re-iterates the last action you did
  • String manipulations
  • 2 new var_actions : replace and split
    • replace
      • Replaces elements of the string.
      • Syntax : --replace:"<element_to_replace>""<replace_with>"["count"]
      • The first count element_to_replace will be searched through the string and replaced by the replace_with.
      • If count is undefined, all the element_to_replace will be replaced by replace_with.
      • Example 1 (Without count) : var:str--replace:"e""a" Test = Yeeeeeeeeeeeeeeeee will result in Yaaaaaaaaaaaaaaaaa
      • Example 2 (With count) : var:str--replace:"e""a""3" Test = Yeeeeeeeeeeeeeeeee will result in Yaaaeeeeeeeeeeeeee
    • split
      • Splits the string into a string
      • Syntax : --split:"<separator>"
      • Example 1 : var:str--split:" " Test = This is a test string. will result in ['This', 'is', 'a', 'test', 'string.']
      • Example 2 : var:str--split:"ng " Test = Testing string :D will result in ['Testi', 'stri', ':D']
  • FUNCTIONS
    • Major feature of the update
    • Functions allow to write some code once and reuse it as much as you want.
    • How to define a function (without parameters) ?
      • Type function <name>
      • Write the code of the function under it
      • End by endfunction or end function
    • How can I call a function (without parameters) ?
      • Type use_function <function_name>
    • How to define a function (with parameters) ?
      • Add the parameter names (separated by spaces) after the function <name>
      • You can then use them inside the function as normal variables. But if you modify them, they'll become global variables.
      • Example : function hello first_name last_name
    • How can I call a function (with parameters) ?
      • Add the values of the parameters after the use_function <function_name>, separated by spaces.
      • They can be hardcoded values, variables, or equations.
      • Example, following the function defined above : use_function hello TheAssassin71 {last_name}
  • Bugfix : When trying to set a specific element of a list, you just couldn't. Now fixed.
  • LIBS
    • Biggest feature of the update
    • You can download and install libs through the console commands.
    • Type lib install <lib> to install one.
    • If you want to uninstall any of them, type lib delete <lib>.
    • If you want to see a lib's documentation, type lib doc <lib>.
    • To use one, declare at the beginning of your program $use: <lib>.
    • Everyone can submit his lib on the Discord, and I'll publish it every time (except some obvious exceptions (not enough optimized, dangerous, or NSFW)) ! Tutorial here.
    • Every library has its own documentation.
    • See them in the source code, and find acpl_libs/doc_<lib>.md, where <lib> is the library you're looking for.
    • You can look for How to create a lib in the ACPL wiki

3.9.1

Bugfixes (thanks to PancakesLord) :

  • setup.py, if you entered a wrong country code, you couldn't launch the console or anything.
  • On Linux systems or systems with multiple Python versions installed, you couldn't launch any file from any file. This is now fixed, using a more responsive technique than the older one.
  • msvcrt lib was used, and kinda useless. It's been there for 7 months, without proper use, and it made the program crash on Linux systems. Now fixed.
    Bug discovered, not fixed yet :
  • If you create a variable, typed int, and you ask the user to input a value, if the user enters e, the variable will be equal to 2, and if he enters i, it will be equal to 5.
    I have no idea of why this bug exists, and it probably won't be fixed for now.

Anyway, quick changes, just wanted to let you know.

Pre3.10 - Auto-updates

12 Dec 14:50
3d80cb5
Compare
Choose a tag to compare
Pre-release

If it upsets you to ALWAYS have to manually update your ACPL, then this release is maybe the last you'll have to download !

It brings back automatic updates, in a revamped way, and I hope you'll like it !

BUGFIX :

  • The console always displayed the "console reloaded" message.

3.8.1 - Lists, setup, var operators, and dialog boxes !

02 Dec 14:40
81d4ac4
Compare
Choose a tag to compare

3.8

  • Lists
    Biggest feature of this update, lists allow to store multiple variables in a single one.
    If you use C, it's some sort of dynamically changing array.

How to declare a list :
Type like the following ;

var:list <name> = list [ELEMENT 0] [ELEMENT 1] [ELEMENT 2]

Every element of the list has to be between brackets when you initialize it.
Also, in the example, I created a list containing only 3 elements ; but a list can contain as many as you want.

How to add an element at the end of a list :
Type like the following :

var:list <name> = list.add <content>

The will be appended at the end of the list.

How to insert an element at a specific index of the list :
Type like the following :

var:list <name> = list.insert <index> <content>

Keep in mind indexes start at 0.

How to remove an element from a list :
Type like the following :

var:list <name> = list.remove <index>

Keep in mind indexes start at 0.

How to get a specific element from a list ?
Just use it as a normal variable, this way : {my_list[<index>]}

You can also use a variable in place of the index, but equations won't work.

How can I get the length of the list ?
Simply by typing {my_list[len]} or {my_list[length]}.

  • New setup

    • The new setup will install correctly the requirements, and will also ask you to set your settings.
    • Settings include :
      • Language
      • Color use
      • File opening at compiling
      • Comments left at compiling
  • Variables operators

    • Variables operators have been added.
    • Variable operators include :
      • +=
      • -=
      • *=
      • /=
      • //=
      • %=
    • Variable operators act as if you were using the operation before the = on the variable value.
    • Syntax example : var:int score += 5
  • Dialog boxes

    • Typing only run in the console will open a dialog box that will let you select a file to run.
    • The same goes on for the IDE, but this time, the dialog box opens anyway.

Overall, a pretty big update.

3.8.1

  • Disabled the update console command and automatic updates in general. This feature needs a rework.
  • Created the changelog console command. This command allows you to see the latest changelog.

Pre3.9 - Functions, redo, and string manipulations !

05 Dec 16:57
2d9ec72
Compare
Choose a tag to compare

Pre3.9

  • IDE
    • Added a memory system to the IDE
    • Every time you close the IDE, it will save the last cursor position, and it will set the cursor to the correct position once you open this file again.
  • Redo
    • New console command
    • Re-iterates the last action you did
  • String manipulations
  • 2 new var_actions : replace and split
    • replace
      • Replaces elements of the string.
      • Syntax : --replace:"<element_to_replace>""<replace_with>"["count"]
      • The first count element_to_replace will be searched through the string and replaced by the replace_with.
      • If count is undefined, all the element_to_replace will be replaced by replace_with.
      • Example 1 (Without count) : var:str--replace:"e""a" Test = Yeeeeeeeeeeeeeeeee will result in Yaaaaaaaaaaaaaaaaa
      • Example 2 (With count) : var:str--replace:"e""a""3" Test = Yeeeeeeeeeeeeeeeee will result in Yaaaeeeeeeeeeeeeee
    • split
      • Splits the string into a string
      • Syntax : --split:"<separator>"
      • Example 1 : var:str--split:" " Test = This is a test string. will result in ['This', 'is', 'a', 'test', 'string.']
      • Example 2 : var:str--split:"ng " Test = Testing string :D will result in ['Testi', 'stri', ':D']
  • FUNCTIONS
    • Biggest feature of the update
    • Functions allow to write some code once and reuse it as much as you want.
    • How to define a function (without parameters) ?
      • Type function <name>
      • Write the code of the function under it
      • End by endfunction or end function
    • How can I call a function (without parameters) ?
      • Type use_function <function_name>
    • How to define a function (with parameters) ?
      • Add the parameter names (separated by spaces) after the function <name>
      • You can then use them inside the function as normal variables. But if you modify them, they'll become global variables.
      • Example : function hello first_name last_name
    • How can I call a function (with parameters) ?
      • Add the values of the parameters after the use_function <function_name>, separated by spaces.
      • They can be hardcoded values, variables, or equations.
      • Example, following the function defined above : use_function hello TheAssassin71 {last_name}

Pre3.8 - Lists, new setup, variables operators, and dialog boxes !

29 Nov 14:42
39a13d5
Compare
Choose a tag to compare

CHANGES DOES NOT AFFECT COMPILER
DO NOT COMPILE UNTIL FULL RELEASE !

Pre3.8

  • Lists
    Biggest feature of this update, lists allow to store multiple variables in a single one.
    If you use C, it's some sort of dynamically changing array.

How to declare a list :
Type like the following ;

var:list <name> = list [ELEMENT 0] [ELEMENT 1] [ELEMENT 2]

Every element of the list has to be between brackets when you initialize it.
Also, in the example, I created a list containing only 3 elements ; but a list can contain as many as you want.

How to add an element at the end of a list :
Type like the following :

var:list <name> = list.add <content>

The will be appended at the end of the list.

How to insert an element at a specific index of the list :
Type like the following :

var:list <name> = list.insert <index> <content>

Keep in mind indexes start at 0.

How to remove an element from a list :
Type like the following :

var:list <name> = list.remove <index>

Keep in mind indexes start at 0.

How to get a specific element from a list ?
Just use it as a normal variable, this way : {my_list[<index>]}

You can also use a variable in place of the index, but equations won't work.

How can I get the length of the list ?
Simply by typing {my_list[len]} or {my_list[length]}.

  • New setup

    • The new setup will install correctly the requirements, and will also ask you to set your settings.
    • Settings include :
      • Language
      • Color use
      • File opening at compiling
      • Comments left at compiling
  • Variables operators

    • Variables operators have been added.
    • Variable operators include :
      • +=
      • -=
      • *=
      • /=
      • //=
      • %=
    • Variable operators act as if you were using the operation before the = on the variable value.
    • Syntax example : var:int score += 5
  • Dialog boxes

    • Typing only run in the console will open a dialog box that will let you select a file to run.
    • The same goes on for the IDE, but this time, the dialog box opens anyway.

Overall, a pretty big update.

3.7 - IDE

22 Nov 19:32
d05323d
Compare
Choose a tag to compare

3.7.0

This update features a brand new IDE, accessible from the ide console command.

  • IDE from ide console command :
    • Use the arrow keys to move in the text
    • Type text for the IDE to add the text
    • Auto-save functionality
    • Type ACPL_IDE_NEW <filename> to create a brand-new file, or just <filename> to open an existing one.
    • Press escape to access a few console commands :
      • quit / end : Closes the IDE
      • run : Runs the file IF THE CURRENT FILE IS AN ACPL OR A PYTHON FILE
      • compile : Compiles the file if the file is an ACPL file
      • open : Lets you open an existing file
      • new <filename> : Creates a new file and opens it.
  • Also compiler bugfixes

Showcase videos :
Showcase part 1
Showcase part 2

3.6 - Actions for variables

24 Oct 14:52
3cd44f1
Compare
Choose a tag to compare

3.6

  • var_actions : small functions added to variables
    • Syntax : var[:type][--var_action]
    • lowercase : Sets the variable string to lower case
    • uppercase : Sets the variable string to upper case
    • round:<number_after_dot:int> : Puts the float variable to a round number, with number_after_dot numbers after the dot.
    • ceil : Converts the float variable to the integer just above it.
  • MASSIVE BUGFIXES

Pre3.7 - IDE

09 Nov 21:31
3cd44f1
Compare
Choose a tag to compare
Pre3.7 - IDE Pre-release
Pre-release

This version adds a functional IDE.

Open it using the console command ide.

So here are the commands ([param] = optional parameter, <param> = required parameter) :

  • z[int] or w[int] : Makes you jump [int] lines upper. If [int] is not defined, you jump on the line right above the one currently selected.

  • s[int] : Makes you jump [int] lines down. If [int] is not defined, you jump on the line right underneath the one currently selected.

  • q[int] or a[int] : Makes your cursor move [int] characters to the left. If [int] is not defined, int = 1.

  • d[int] : Makes your cursor move [int] characters to the right. If [int] is not defined, int = 1.

  • rm[int] or del[int] : Removes the int characters to the left of the cursor. If [int] is not defined, int = 1.

  • Typing something or typing add <text> will add the corresponding text at the right of the cursor.

  • end or quit: CLOSES THE IDE

  • goto<line>[,character_amount] : Jumps to the line number line, and if defined, to the character_amountth character. If not defined, the cursor remains at the same place.

  • open-file : Makes you choose a file to open

  • new-file <filename/path> : Creates a new file and opens it in the IDE.

  • ACPL_IDE_RUN : if the selected file is an ACPL (.acpl) or Python (.py) file, the IDE will run the corresponding code. If not, it will throw an error.

  • ACPL_IDE_COMPILE : If the selected file is an ACPL (.acpl) file, the file will be compiled to Python with the same name as its ACPL name, in the same folder.

DO KEEP IN MIND THAT THIS WILL ALL CHANGE IN THE UPCOMING UPDATE !