REDCODE.

Off topicProgramming → REDCODE.

msg me ingame if you want to help!

plz comment!

I am always adding

Programmers look here!

@ramon156 @dico200 @PanFritz @HiddenSentinels @redstone_sheep @bela333 @abunchmoreplayers

Post code if you want

Basic syntax and commands:

The STR syntax

STR is the syntax to start a program/end it.

For example, how to make a file run:

str1

str0

Variables

its simple for variables. its like javascript, but i dont care really.

e.g.

str1
var a = a.this(++)
str0

Basic operation

=== means Fully equal

=> Greater than

=< Less than

++ = add 1

– minus 1

= is for setting variables

This:

this Is for targeting an object on that line.

Objects:

Used for targeting variables.

e.g:

str1
var 3 = 3.this(++)
str0

Classes:

Classes can be turned into objects.

To create a class:

str1
def.class(<name>,(Params)) {
InsertCodeHere
}
str0

How to fully add params:

str1
def.class(tst_class,(1)) {
tst_class.def_param_id(1)
1.class_convert(1.class_in(1,var))
var 1 = 1.this(++)
}
str0

The class_in method can also be class_out for outputting when calling a class.

How to run a class:

str1
def.class(tst_class,(1)) {
tst_class.def_param_id(1)
1.class_convert(1.class_in(1,var))
var 1 = 1.this(++)
}
tst_class.run(1,(5))
str0

class_out Method:

This is how you should use it:

str1
def.class(tst_class,(1)) {
tst_class.def_param_id(1)
1.class_convert(1.class_out(1,var))
var 1 = 1.this(++)
1.out(1.id_out(5))
1.pull_value_allow(true)
}
tst_class.run(1,(5))
###This\/###
def.id(5) {
5.id_io_allow(true)
ptr("Output:" + '1')
}
###or\/###
1.pull_value(class_convert(1,var))
ptr('1')
str0

the id_io_allow method allows IO in the id. you can use id_io_disallow to disallow IO

ptr Is the print command. This is the syntax: “String” + “1” is invalid. use comma “String”,“1” “string”,1 Is invalid. use + if your outputting a variable with a string. and use apostrophies is its a variable. heres a valid string + variable “String” + ‘1’

Ascii:

ascii Is the command that takes the ascii table and uses hex to output.

How to use:

str1
string a = a.ascii(8C) ###Œ###
ptr('a') 
str0

IF statments:

Well. you know what they are so heres how you use them.(else is optional.)

str1
if 1 === 3 then {
dosomething
}
Elseif 1 === 2 {
dosomething
}
Else {
}
str0

Loops!

Loops are simple. they wait for a certain arrangment to be met and they run

Hao to use!

str1
while 5 === 4 {
ptr("4 does not equal 5") ###Example###
}
str0

Arrays/Data Storage:

Arrays are simple. If you have worked with PHP you will know know what they are.

How to create an array:

str1
string a = a.array("Cake","Is","Awesome")
ptr('a')
str0

File IO:

The File IO section is very interesting.

Basic File IO:

str1
fileIO.desto("<full path>") ###Default is C:\### ###The desto method is the destination the File IO is going to.###
fileIO.create("<file name>",".<extension>") ###Its what it says it does. 2 paramaters. File name and the extension.###
fileIO.delete("<file name>.<extension>") ###Does what it says.###
fileIO.update("<file name>","<line>","InsertTextHere") ###Updates the file with what you put in.###
fileIO.remove("<file name>,<line>,"InsertTextHere") ###Removes an item.###
str0

Input Basics:

The basic input is easy to understand

Heres how it is done:

str1
input left_key{ ### here is the start of the input statment. ###
DoSomething
} ###And this is the end###
input right_key {
DoSomething
}
input up_key {
DoSomething
}
input down_key {
DoSomething
}
str0

Project peeps: nalaek2004

Post your own code ideas and commands! also syntax.

Note: this project is WIP.

next time comment something useful plz
Explain more about what you are trying to doo here, make a copy of laurens weyns thing or.. idk what redcode is suppose to be, a new language ? what WHAT
im not coping him.(i know who he is) im making a language but not an interperter. oh and post your own code ideas here. or commands? or syntax for those commands. ill give you credit,
So basicly, you are making an idea for a language, that wont have anything to run it? Oh and is it for a Ingame computer?
Then explain better
I will join this group or whatever thing you want me to do XD
well first off you should decide on your types I’m pretty sure. Like integer. Make an integer class and add stuff like .toString() I have no idea how you go about making a language I’m sure you can figure it out.
it will be a fun challenge
i am adding if you read.
also: > greater than < less than => greater than or equal to =< less than or equal to == fully equal
and it will be ramon
So imma give my 50 cents here, sorry if it sounds offensive. But i dont think you have a clue on what you are doing, ive talked to you ingame and you dont even know jack about what you want to do, and as of now you said there will be no interpeter so you are basicly making an utterly useless language. you said eventualy you would make an interpreter in python wich is already interpreted and it will be ineficient as fuck. Aswell as i think you have not even close enough skill to make a compiler as it takes alot of skill in ASM to make an efficient one that the cpu can run per instruction. Further more first thing you need to define is your syntax, if its case sensetive, how it interprets the language ({}, line per line(basic),how an end of a command is defined (;, carriage return,etc etc)). Aswell as you have no goal or r eason to make it. Instead of just posting something random here (I acctualy tried to make an interpreter for basic and reverse engineered one or two, writen in C for MCU’s and i can tell you its pretty hard) Rather than just a useless idea asking people for help, and asking for help with something of what’s goals you havent even defined yet, you doo something productive and try to make a lexer first then after you have the syntax and idea down you ask people for help.
Just a tip tho, you might wanna do 2 step interpretation to make it faster and “compile” or just shrink your statements so lets say the line PRINT (“fOO BAR”); <– takes a while to lex it and then parse it and execute it, you take the line PRINT(“FOO BAR”); And make a X byte system for example 10 bytes, 1 byte defines command EG dec value of 1=PRINT command. the rest of the bytes used as arguments. Now storing strings is another thing, so i suggest you make it do simple things like maths first before you move on to other more complicated things.

I am not making it able to go this:

str1 var 1 = 1.this(++) str0

I may be able to help, I know HTML to a certain extent, as we are talking abot syntaxes and HTML uses syntaxes.

@Isay200 :

=/= not equal to. duh

well as i said, msg me ingame
also what will your programming language do/do more efficiently that other programming languages don’t already do? because if your programming language doesn’t have anything better than whats already available who do you think will want to work with it?
Im just gonna say i had an idea and i went with it
the idea is very broad… your idea : Lets make a programming language called redcode. done
Can someone move this to Other -> Programming