|
| 1 | +<div align = "center"> |
| 2 | + <h1>xpp</h1> |
| 3 | + <hr> |
| 4 | + <p>an interpreted, minimalistic programming language</p> |
| 5 | + <img alt="License" src="https://img.shields.io/github/license/iiPythonx/xpp?color=c3e7ff&style=flat-square"> |
| 6 | + <img alt="Downloads" src="https://img.shields.io/github/downloads/iiPythonx/xpp/total.svg?color=c3e7ff&style=flat-square"> |
| 7 | + <img alt="Last commit" src="https://img.shields.io/github/last-commit/iiPythonx/xpp?color=c3e7ff&style=flat-square"> |
| 8 | + <img alt="Repo size" src="https://img.shields.io/github/repo-size/iiPythonx/xpp?color=c3e7ff&style=flat-square"> |
| 9 | + <img alt="Stars" src="https://img.shields.io/github/stars/iiPythonx/xpp?color=c3e7ff&style=flat-square"> |
| 10 | + <hr> |
| 11 | +</div> |
| 12 | + |
| 13 | +<!-- ---- Introduction ---- --> |
| 14 | +<h2 align = "center" id = "introduction"> |
| 15 | + Introduction |
| 16 | +</h2> |
| 17 | + |
| 18 | +Welcome to the official documentation for x++! This documentation will get you started in the development of your first x++ project or will help you learn more about x++ in general with in-depth explanations and tutorials. |
| 19 | + |
| 20 | +<!-- ---- TOC ---- --> |
| 21 | +<h2 align = "center" id = "table-of-contents"> |
| 22 | + Table of Contents |
| 23 | +</h2> |
| 24 | + |
| 25 | +- **Home ▾** |
| 26 | + - [Introduction](#introduction) |
| 27 | + - [ToC](#table-of-contents) |
| 28 | + - [About](#about) |
| 29 | + - [Getting Started ▾](#getting-started) |
| 30 | + - [Step 1: Installation](#step-1-installation) |
| 31 | + - [Step 2: Set-Up](#step-2-set-up) |
| 32 | + - [Step 3: Execution](#step-3-execution) |
| 33 | + - [Frequently Asked Questions](#frequently-asked-questions) |
| 34 | + - [Credits and Links ▾](#credits--links) |
| 35 | + - [Contributors](#contributors) |
| 36 | + - [Resources](#resources) |
| 37 | +- [Tutorials](tutorials.md) |
| 38 | +- [Documents](documents.md) |
| 39 | +- [Python API](python-api.md) |
| 40 | +- [Standard Library](stdlib.md) |
| 41 | + |
| 42 | +<!-- ---- About ---- --> |
| 43 | +<h2 align = "center" id = "about"> |
| 44 | + About |
| 45 | +</h2> |
| 46 | + |
| 47 | +x++ (Pronounced "ex-plus-plus") is a high-level, interpreted language written in Python by [iiPython](https://github.com/iiPythonx) with low-level syntax, similar to that of [x86 Assembly](https://en.wikipedia.org/wiki/X86_assembly_language) (and additionally inspired by [Batch](https://en.wikipedia.org/wiki/Batch_file)). |
| 48 | + |
| 49 | +x++ contains features such as: |
| 50 | +- Automatic garbage collection |
| 51 | +- Scoped/file/global variables |
| 52 | +- Sectioning/function system |
| 53 | +- Mature python integration |
| 54 | +- Import/export/module system |
| 55 | +- Object-oriented programming through the use of files |
| 56 | +- ... much more! |
| 57 | + |
| 58 | +<!-- ---- Getting started ---- --> |
| 59 | +<h2 align = "center" id = "getting-started"> |
| 60 | + Getting Started |
| 61 | +</h2> |
| 62 | + |
| 63 | +### Step 1: Installation |
| 64 | + |
| 65 | +First and foremost, make sure you have [Python](https://python.org/downloads/) (Python 3.10 is required, however we recommend 3.11+) installed on your device. You can check if you have Python installed by opening up a terminal and typing: |
| 66 | + |
| 67 | +``` |
| 68 | +python3 -V |
| 69 | +``` |
| 70 | +(on NT* platforms, replace `python3` with `py`) |
| 71 | + |
| 72 | +It is highly recommended to have a text editor or Integrated Development Environment, such as [Visual Studio Code](https://code.visualstudio.com/), as its built-in development tools and add-ons will speed up and facilitate your development process. However, a simple text editor like notepad is sufficient. |
| 73 | + |
| 74 | +Next, visit our [github repository](https://github.com/iiPythonx/xpp/) and download a clone of the repository by clicking on the green `Code ▾` button and the `Download ZIP` option. Optionally, if you have [git](https://git-scm.com/) installed on your device, you can also clone the repository by opening up a terminal and typing: |
| 75 | + |
| 76 | +``` |
| 77 | +git clone https://github.com/iiPythonx/xpp |
| 78 | +``` |
| 79 | + |
| 80 | +To install xpp system-wide, run the following: |
| 81 | +``` |
| 82 | +pip install . |
| 83 | +``` |
| 84 | + |
| 85 | +You will now have the `xpp` command available for use. |
| 86 | + |
| 87 | +If you are choosing Visual Studio Code as your Integrated Development Environment, you can also install the [x++ extension](https://marketplace.visualstudio.com/items?itemName=iiPython.xpp) on the marketplace to get syntax highlighting on your x++ files. |
| 88 | + |
| 89 | +### Step 2: Set-Up |
| 90 | + |
| 91 | +Once you open up your x++ project, you should be able to find a file named `main.xpp`. By default, this is your main entry file and is where you will be writing your x++ code. Within the file, you should see an example program similar to: |
| 92 | + |
| 93 | +```xpp |
| 94 | +:: Main |
| 95 | +prt "Hello, world!" |
| 96 | +``` |
| 97 | + |
| 98 | +Any x++ files should always end in the `.xpp` extension. |
| 99 | + |
| 100 | +You can edit the main entry file by editing the configuration in `.xconfig`. It is a JSON-like file that contains all the configurations for your x++ project. Within it, you should see: |
| 101 | + |
| 102 | +```xconfig |
| 103 | +{ |
| 104 | + "main": "main.xpp" |
| 105 | +} |
| 106 | +``` |
| 107 | + |
| 108 | +> You can learn more about setting up your project in the [tutorials](tutorials.md). |
| 109 | +
|
| 110 | +### Step 3: Execution |
| 111 | + |
| 112 | +After you are done writing your x++ code, you can execute your x++ project immediately by opening up a terminal and typing: |
| 113 | + |
| 114 | +``` |
| 115 | +python main.py . |
| 116 | +``` |
| 117 | + |
| 118 | +Currently, you should see the terminal output: |
| 119 | + |
| 120 | +``` |
| 121 | +"Hello, world!" |
| 122 | +``` |
| 123 | +> You can also compile your xpp code into Python using [caffeine](caffeine.md). |
| 124 | +
|
| 125 | +<!-- ---- FAQ ---- --> |
| 126 | +<h2 align = "center"> |
| 127 | + Frequently Asked Questions |
| 128 | +</h2> |
| 129 | + |
| 130 | +### Q: Why is it called x++? |
| 131 | + |
| 132 | +The language originally started as the "X Programming Language" because the name sounded cool. As development went on, a second revision was published and the name was changed to `x2`. |
| 133 | +Starting on March 6th, 2023, x2 was deprecated in favor of x++ as the language was beginning to undergo major changes. |
| 134 | + |
| 135 | +### Q: Can I use x++ for data management, game design, or simply for fun? |
| 136 | + |
| 137 | +Most of the things you could think of making are able to be created within x++. However, you can also supercharge xpp with the power of Python; [see here](python-api.md). |
| 138 | + |
| 139 | +<!-- ---- Contrib + resources ---- --> |
| 140 | +<h2 align = "center"> |
| 141 | + Credits & Links |
| 142 | +</h2> |
| 143 | + |
| 144 | +### Contributors |
| 145 | + |
| 146 | +- [iiPython](https://github.com/iiPythonx) - Developer, Documentation |
| 147 | +- [DmmD Gaming](https://github.com/DmmDGM) - Original Documentation, Ideas, & Standard Library |
| 148 | + |
| 149 | +### Resources |
| 150 | + |
| 151 | +- [Github Repository](https://github.com/iiPythonx/xpp) |
| 152 | +- [Visual Studio Code x++ Extension](https://marketplace.visualstudio.com/items?itemName=iiPython.xplusplus) |
| 153 | + |
| 154 | +--- |
| 155 | + |
| 156 | +Last Updated: December 2nd, 2023 by iiPython |
| 157 | + |
| 158 | +[↑ Go To Top](#introduction) |
0 commit comments