Package: rsxpy
R# - RSXAn interpreted statically typed multi paradigm general purpose programming language designed for cross platform applications.RSX LogoRSX IconRequirementsPython 3.10 or higherGetting StartedHow to installWindows (Compiles RSX source files and places them in C:\RSX, also installs the RSX python library).\install.batLinux (Compiles RSX source files and installs the RSX python library)./install.shDifference between rsxpy and rsxrsx only works on Windowsrsxpy requires python but rsx doesn'tHow to [run/build] a RSX program[rsxpy/rsx] main.rsx [run/build]How to [run/build] a RSX bytecode[rsxpy/rsx] main.rsxc [run/build]How to make a RSX library with pythonUsing RSX Toolsfromrsxpy.toolsimport*create_library("library")@create_function("VOID",{"message":"STRING"})deflog(environment):print(environment["args"]["message"],flush=True)library=pack_library()Using RSXLibfromrsxpyimportrsxlibrsxlib.begin()deflog(message:str)->None:print(environment["args"]["message"],flush=True)rsxlib.end()How to make a RSX library with RSX header fileslibrary.rsxhinclude"rsxio":*;voidlog(stringmessage){std::rout(message+std::endl());}main.rsxinclude"library.rsxh";intmain(string[]args){library::log("Hello, World!");}How to add an include folder[rsxpy/rsx] main.rsx run -Imy-include-folderCommand line arguments-I[dir]-rmI[dir]-timeit=[true/false]-gettok=[true/false]-getast=[true/false]-bytecode=[true/false]-noconsole=[true/false]-console=[true/false]runbuildExamplesHello, World!include"rsxio":*;// using namespace std;intmain(string[]args){std::rout("Hello, World!"+std::endl());return0;}Builderinclude"rsxbuild","rsxsys","rsxio":*;intmain(string[]args){std::rout("file name > ");std::build_program(std::rin(),{std::getdir()+"/include/"},true,std::getdir()+"/icon.ico");return0;}Web Serverinclude"rsxsocket","rsxio":*;intmain(string[]args){autoserver=std::socket(std::AF_INET,std::SOCK_STREAM);std::bind(server,"localhost",5656);std::listen(server);stringindex="HTTP/1.1 200 OK\n\n<p>Hello, World!</p>";while(true){autoconnection=std::accept(server);stringresponse=std::recv(connection,1024);std::rout(response+std::endl());std::send(connection,index);std::close(connection);}return0;}Raylibinclude"rsxraylib":*;intmain(string[]args){InitWindow(1200,600,"R#");// SetTargetFPS(60);while(!WindowShouldClose()){BeginDrawing();ClearBackground(RAYWHITE);DrawFPS(10,10);EndDrawing();}CloseWindow();return0;}3D Projection Using Raylibinclude"rsxio","rsxraylib":*;float[]project_vertices(float[]vertices,float[]position,floatfocal_length){float[(int)(vertices.length()/3*2)]projected_vertices;intindex=0;for(inti=0;i<vertices.length();i+=3){if((focal_length+(vertices[i+2]+position[2]))==0||(focal_length*(vertices[i]+position[0]))==0||(focal_length*(vertices[i+1]+position[1]))==0)continue;floatx_projected=(focal_length*(vertices[i]+position[0]))/(focal_length+(vertices[i+2]+position[2]));floaty_projected=(focal_length*(vertices[i+1]+position[1]))/(focal_length+(vertices[i+2]+position[2]));projected_vertices[index++]=x_projected;projected_vertices[index++]=y_projected;}returnprojected_vertices;}float[]scale_vertices(float[]vertices,floatscale){float[vertices.length()]new;for(inti=0;i<vertices.length();i++){new[i]=vertices[i]*scale;}returnnew;}intmain(){constintwidth=1200,height=600;InitWindow(width,height,"RSX");SetTargetFPS(60);float[]vertices=scale_vertices({-0.5f,-0.5f,0.0f,-0.5f,0.5f,0.0f,0.5f,0.5f,0.0f,0.5f,-0.5f,0.0f,-0.5f,-0.5f,-0.5f,-0.5f,0.5f,-0.5f,0.5f,0.5f,-0.5f,0.5f,-0.5f,-0.5f,},100);int[]indices={0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7};int[]offset={width/2,height/2};float[]position={0.0f,0.0f,0.0f};floatspeed=0.0f;floatfocal_length=100.0f;while(!WindowShouldClose()){BeginDrawing();ClearBackground(BLACK);DrawText((string)GetFPS()+" FPS",10,10,20,RAYWHITE);float[]projected_vertices=project_vertices(vertices,position,focal_length);if(IsKeyDown(KEY_W))position[2]-=speed;if(IsKeyDown(KEY_S))position[2]+=speed;if(IsKeyDown(KEY_A))position[0]+=speed;if(IsKeyDown(KEY_D))position[0]-=speed;if(IsKeyDown(KEY_SPACE))position[1]+=speed;if(IsKeyDown(KEY_LEFT_SHIFT))position[1]-=speed;if(IsKeyDown(KEY_LEFT_CONTROL))speed=3.0f;elsespeed=2.0f;for(inti=0;i<projected_vertices.length();i+=2)DrawCircle(projected_vertices[i]+offset[0],projected_vertices[i+1]+offset[1],5,RAYWHITE);for(inti=0;i<indices.length();i+=2){if(projected_vertices.length()>=indices[i]*2){DrawLine(projected_vertices[indices[i]*2]+offset[0],projected_vertices[indices[i]*2+1]+offset[1],projected_vertices[indices[i+1]*2]+offset[0],projected_vertices[indices[i+1]*2+1]+offset[1],RAYWHITE);}}EndDrawing();}CloseWindow();return0;}The RSX Package Manager: RaidA package manager for RSXRaid LogoHow to installRaid comes with RSX no need to install anythingDifference between raidpy and raidraid only works on Windowsraidpy requires python but raid doesn'tHow to create a new Raid project[raidpy/raid] new console my_console_projectHow to [run/build] a Raid project[raidpy/raid] [run/build] my_console_projectLibrariesrsxbuildrsxthreadrsxiorsxfrsxguirsxmathrsxmixerrsxrandrsxraylibrsxstrrsxstdrsxsysrsxtermrsxtimersxosrsxsocketrsxsdl2