The 4U is created by @LAPCoder. It's a programming language. Thanks @Yagi-404 for his (big) help.
_____ _____ _____ _____ ___ _ _ _ _ _____ _ _ _____
____ _ _ | . \ | . \ / _ \ / ___\ / ^ \ | \_/ | | \_/ | |_ _| | \| | / ___\
/ _ | | | | | | ___/ | _ / | |_| | | |_]¨; / _ \ | \_/ | | \_/ | _| |_ | \ \ | | |_]¨;
/ / | | | | | | |_| |_| \_\ \_____/ \_____/ |_| |_| |_| |_| |_| |_| |_____| |_|\__| \_____/
/ /__| |_| | | | _ ___ _ _ _____ _ _ ___ _____ _____
/___ __ \____/ / | | / ^ \ | \| | / ___\ | | | | / ^ \ / ___\ | ---'
|__| \______/ | |___ / _ \ | \ \ | | |_]¨; | \_/ | / _ \ | |_]¨; | ̅_̅_]
|_____| |_| |_| |_|\__| \_____/ \_____/ |_| |_| \_____/ |__͞_͞_͞_]
This is not only a programming language. It will be a code editor, a programming language, a doc, an IDE, an ODE, an extension for VS Code… The VS Code extension is here.
v0.0.1 is the latest version. v1.0.0 is in development (go in in-dev branch).
The main goal is to be useful, powerful, accessible, and easy to use.
Goal:
Simpler than Python, more complete than C++, more object-oriented than Java, more interpreted than Python, more compiled than C, more cross-platform than HTML, here is the 4U!
Unfortunately, we are far from the goal. So it is (and still) in (perpetual) development.
For understanding:
Simpler than Python
The goal of language is to be accessible to everyone.
More complete than C++
The 4U will have many functionalities (applications, games, websites, 2D, 3D, sound, image…).
More object than Java, more interpreted than Python
It will be compiled and interpreted:
- For a quick overview (when designing software), it can be interpreted.
- For a slower rendering (but faster to execute), it can be compiled in machine language (as currently).
More cross-platform than HTML
The 4U will be cross-platform.
You must have gcc
, bison
or yacc
, flex
or lex
and glib
.
Warning! For all commands, do not enter the
$
, the#
or theC:\>
!
On Windows, type this command:
cd <directory name>
<directory name>
is the directory where you installed folder "4u vX.X.X" (X.X.X is your version number).
The path is like C:\Users\user\Documents\src\'4U 0.0.0'
On Linux, type this command:
cd <directory name>
<directory name>
is the directory where you installed folder "4u vX.X.X" (X.X.X is your version number).
The path is like /home/user/Documents/src/'4U 0.0.0'
or ~/Documents/src/'4U 0.0.0'
.
Type this command (if you use flex
):
flex -o lexique_4u.c lexique_4u.lex
Type this command (if you use bison
):
bison -d syntax_4u.y
Type this command (if you use gcc
) to compile the compiler:
gcc lexique_4u.c syntax_4u.tab.c generation_code.c `pkg-config --cflags --libs glib-2.0` -o 4u
Type this command (if you use gcc
) to compile the compiler:
gcc lexique_4u.c syntax_4u.tab.c generation_code_c.c generation_code_js.c `pkg-config --cflags --libs glib-2.0` -o 4u
Type this command (if you use gcc
) in a terminal to transform the 4U code in C:
./4u program.4u
<program.4u>
is the name of your program.
Type this command to compile the C program:
gcc program.c
<program.c>
is the name of your program (compiled).
Type this command to run the compiled program:
./a.exe
Type this command to run the compiled program:
./a.out
It's OK! Your code was executed! If you want to re-execute your code (and it's not changed), you can just do this command (step 7). Else, you can execute (if you want):
cd
AT THE TIME, THE COMMAND DOESN'T WORK. WE HIGHLY RECOMMEND NOT INSTALLING NOW. IT'S COMING SOON, BUT AT THE TIME IT'S IN BETA.
You can go here for more informations.
To compile command, here is a simple way to do it on Windows. Go to the 4U command file and type:
C:\> mkdir bin
C:\> gcc *.c -o bin/4U
It will create an executable. If you want to use it all days, we really recommend add the bin/
folder into the PATH.
Whatever, if you want a normal installation of the 4U command (without compiling), we'll put an executable file in our website soon. You need to put it in a folder that you added to PATH.
Sorry, at the moment commands are not tested for Linux. But you can try compiling them with gcc
.
We use this tutorial. Thanks to @totodunet.
See LICENSE.md
for more information.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.