@traffic:
[code]
function output(phrase)
print(phrase)
end
[/code]
Thats php
[code]
function eghref($link, $text) {
echo "<a href="$link">$text</a>";
}
[/code]
:)
[code]
//Here we will create a program that will hack steams database and give us all of their accounts and passwords.
dim $username as string
dim $password as string
dim $database as string
dim $dbpassword as string
dim $dbtable as string
dim $dblocation as string
{
$connect ==['$database']
$connect==['$dbtable']
$connect==['dblocation']
$connect_string==['$dbpassword']
}
Force_Connect('$database')
RetrieveData('$dbtable')
ShowData(retrieveData)
}
[/code]
This is a new language called "Ritch" - Fictionally based off of PHP's language.
Okay, it's not that good :P
[QUOTE=iPope;18578756]If you actually read the thread then their is alot of good posts buried under the waves of "makez me gamez plz".[/QUOTE]
Yeah stuff like..
[QUOTE=VoiDeD;16843478]This is pretty cool idea for a thread.
[code]
using System;
using System.Windows.Forms;
using System.Net.Sockets;
// macrossss
#define SomeFunc(arg) \
Console.WriteLine(arg)
// global scope functionsssss
public void DieInAFire()
{
Application.Exit();
}
class Program
{
public static void Main()
{
SomeFunc("Wheee.");
Socket sock = new Socket(blah, blah, blah);
// ...
// use sock
// ...
sock.Dipose();
delete sock; // non-GC'd manual deletion
DieInAFire();
}
}
[/code]
I wish. :sigh:[/QUOTE]
Because it makes me sad every time I see this theoretical language is still theoretical. :(
yeah. Here is my programming language
[code]
open.consolebox=true
{
print "Hello world!"
system >> "pause"
}
close.consolebox=true
endparse;
[/code]
I also made a pong app in this language for no reason. :D
[QUOTE=scripternoob;19242699]yeah. Here is my programming language
[code]
open.consolebox=true
{
print "Hello world!"
system >> "pause"
}
close.consolebox=true
endparse;
[/code]
I also made a pong app in this language for no reason. :D[/QUOTE]
thats totally inconsistent
[code]Start dat shit
Say dis shit: Hello my mofoin world
End dat shit[/code]
my perfect programming language
whats wrong with mine?
[QUOTE=scripternoob;19242947]whats wrong with mine?[/QUOTE]
How come print has nothing between the command and it's parameter, but system has a bloody <<
[QUOTE=scripternoob;19242699]yeah. Here is my programming language
[code]
open.consolebox=true
{
print "Hello world!"
system >> "pause"
}
close.consolebox=true
endparse;
[/code]
I also made a pong app in this language for no reason. :D[/QUOTE]
Inefficient design. How would this consolebox know when open.consolebox (backwords?) is set to true? Check every .x/second? Same for close.consolebox.
[QUOTE=turby;19243732]How come print has nothing between the command and it's parameter, but system has a bloody <<[/QUOTE]
Ii dont know. lol never realised it before. Ok well then I would fix that. Thanks for tellin me :D
Time to hop onto the language bandwagon :D
[code]
[Comments are in brackets, and can be multiline or what have you]
object Person has parent Animal and
constructor uses name, age:
my name is now name;
[Semi-colons are optional as they are treated as newlines by the parser]
my age is now age
my lifespan is now 10
my x is now 0
my y is now 0
end
[Methods are public, functions are private to the object]
method think uses none:
walk "north"
end
method walk uses direction:
if direction is 'north' then
move with 0, 1
else if direction is 'south' then
move with 0, -1
else
direction is now 'north'
[
z is function scope only,
so we don't say if it is a variable or property
]
z is now 32
[
unlike variables, a method or function is
just called with the parameters
]
walk with direction
end
end
function move uses x, y:
my x += x
my y += y
end
function die uses none:
my lifespan is now nil
end
[Same thing here, properties are public, variables private]
property name
property age
variable lifespan
variable x
variable y
end
[These are all globals]
x = list with 10 to 0 by 2 [We end up with a list with values 10, 8, 6, 4, 2, 0]
tell x at 3 [outputs 4]
J is now Person with 'Jay', 45
K is now Person with 'Kay', 47
J will think when K will walk [Threading?]
K walk with 'south'
tell K name [Should print 'Kay']
[/code]
Not sure if I should actually implement it or not :ohdear:
[code]
//Using the IO lib
using io;
//Class Declaration
class helloClass
public:
helloClass
string getString()
private:
string str = "Hello World";
end
//Class Member Function
string function helloClass:getString()
return str;
end
//Main Function
int function Main(int argc, char .argv[])
helloClass myHClass;
io:output( myHClass.str );
return 0;
end
[/code]
[QUOTE=Chandler;19389248]Time to hop onto the language bandwagon :D
[code]
[Comments are in brackets, and can be multiline or what have you]
object Person has parent Animal and
constructor uses name, age:
my name is now name;
[Semi-colons are optional as they are treated as newlines by the parser]
my age is now age
my lifespan is now 10
my x is now 0
my y is now 0
end
[Methods are public, functions are private to the object]
method think uses none:
walk "north"
end
method walk uses direction:
if direction is 'north' then
move with 0, 1
else if direction is 'south' then
move with 0, -1
else
direction is now 'north'
[
z is function scope only,
so we don't say if it is a variable or property
]
z is now 32
[
unlike variables, a method or function is
just called with the parameters
]
walk with direction
end
end
function move uses x, y:
my x += x
my y += y
end
function die uses none:
my lifespan is now nil
end
[Same thing here, properties are public, variables private]
property name
property age
variable lifespan
variable x
variable y
end
[These are all globals]
x = list with 10 to 0 by 2 [We end up with a list with values 10, 8, 6, 4, 2, 0]
tell x at 3 [outputs 4]
J is now Person with 'Jay', 45
K is now Person with 'Kay', 47
J will think when K will walk [Threading?]
K walk with 'south'
tell K name [Should print 'Kay']
[/code]
Not sure if I should actually implement it or not :ohdear:[/QUOTE]
Hey, a good one in a long time!
But why are some string with "" and some with ''?
I think I would prefer "is" instead of "is now". Or even better "=". You are using it for x and you also have "+=", so why not "="?
By private property/functions, do you mean they are only visible to that class or also to those, who inherit from it?
Why is there no other class after the "has parent Animal and"?
I find the ": [code here] end" kinda strange. I'd say go either the python-way or have a "begin", that fits the "end".
[QUOTE=Anthoni_c;19389963][code]
//Using the IO lib
using io;
//Class Declaration
class helloClass
public:
helloClass
string getString()
private:
string str = "Hello World";
end
//Class Member Function
string function helloClass:getString()
return str;
end
//Main Function
int function Main(int argc, char .argv[])
helloClass myHClass;
io:output( myHClass.str );
return 0;
end
[/code][/QUOTE]
Hey, look! It's C with the addition of a built-in string-type for some reason!
Also, you'll get an error compiling this.
[QUOTE=ZeekyHBomb;19398612]Hey, a good one in a long time!
But why are some string with "" and some with ''?
I think I would prefer "is" instead of "is now". Or even better "=". You are using it for x and you also have "+=", so why not "="?
By private property/functions, do you mean they are only visible to that class or also to those, who inherit from it?
Why is there no other class after the "has parent Animal and"?
I find the ": [code here] end" kinda strange. I'd say go either the python-way or have a "begin", that fits the "end".
[/QUOTE]
Well it is still in early development (I'm actually going to develop this as the language for my engine :3:).
The reason I'm using "is now", over "is", is because "is" is a compare keyword. (i.e. if x is 7). the += is there because "my x add and assign x" is tedious. the removal of as many symbols as possible is an attempt to make something that I could sit an english major or non programmer down in front of and say "make me something", and it would be possible.
The use of some strings with " " and some with ' ' is because of python mostly. It also allows me to do something like 'And then blankthemuffin said, "C Supremacy"', and I don't have to worry about escaping strings a la \", because they look tacky, in my opinion.
the : [code here] end was tough to decide on. The : is from python of course, and effectively acts as a close parens. originally the function declarations were like so
[code]method think : none : [code here] end[/code]
but it made more sense to switch it to uses (thanks to turby's recommendation)
One of the things I'm trying to do with this is take some of the best parts of each language. OOP and proper encapsulation (name an OOP language), and easy to read style(lua/python), and the ability to write an entire program one line, hence the ability to use a semicolon. (lisp, haskell, io, perl :v:)
I might be a dick, and write the VM in C++ but the compiler in python :v:
[QUOTE=Chandler;19398836]I might be a dick, and write the VM in C++ but the compiler in python :v:[/QUOTE]
Why not?
The T-Code VM I wrote is in C++, but the compiler for TASK (my language which I'm compiling to T-Code) is in C#, because it's my favorite language.
@ZeekyHBomb:
Err that's not C at all. heh.
[code]
ProgrammerReq.:
{ So I need an app that says "hello world" when I activate it }
End.
[/code]
Oh, right. It's C++, since you have classes.
And you declare a constructor although you seem to be able to code how to initialize the members right in the member-variable declaration.
Then, apart from the syntax, it looks like C++ to me.
[QUOTE=turby;19398902]Why not?
The T-Code VM I wrote is in C++, but the compiler for TASK (my language which I'm compiling to T-Code) is in C#, because it's my favorite language.[/QUOTE]
neat!
Ehh, not really.
I unintentionally wrote an 8 bit VM, and the compiler is more of a 'will get around to some day' thing.
I'll probably rewrite the VM as a stack machine rather than a register machine, cuz stacks are l33t
[QUOTE=ZeekyHBomb;19399426]Oh, right. It's C++, since you have classes.
And you declare a constructor although you seem to be able to code how to initialize the members right in the member-variable declaration.
Then, apart from the syntax, it looks like C++ to me.[/QUOTE]
You don't have function or end key words in C++. In C++ you use brackets to begin and end blocks.
[code]
find f in range(10,)
print f
[/code]
start
say "testshityo"
end
[QUOTE=Anthoni_c;19400915]You don't have function or end key words in C++. In C++ you use brackets to begin and end blocks.[/QUOTE]
That's pretty much just an alternative syntax.
Here's my programming language:
HELLO SIR, (OR MADAME, I DON'T WANT TO BE SEXIST). IF YOU'RE NOT TOO BUSY, WOULD YOU MIND POSSIBLY MAYBE OUTPUTTING SOME TEXT TO THE USER PLEASE? I WOULD REALLY APPRECIATE IT. HONESTLY, I WOULD. EVERY TIME. PLEASE. IF YOU FIND THE TIME, THE TEXT I WOULD LIKE YOU TO PRESENT TO THE KIND USER IS AS FOLLOWS: Hello World! IF YOU ARE ABLE TO KINDLY DO THAT FOR ME, YOU MAY RESUME TO WHATEVER YOU WERE DOING. THANK YOU, AND HAVE A NICE DAY!
Anyone wanna get started on the compiler? :P
[QUOTE=dag10;19409984]Here's my programming language:
HELLO SIR, (OR MADAME, I DON'T WANT TO BE SEXIST). IF YOU'RE NOT TOO BUSY, WOULD YOU MIND POSSIBLY MAYBE OUTPUTTING SOME TEXT TO THE USER PLEASE? I WOULD REALLY APPRECIATE IT. HONESTLY, I WOULD. EVERY TIME. PLEASE. IF YOU FIND THE TIME, THE TEXT I WOULD LIKE YOU TO PRESENT TO THE KIND USER IS AS FOLLOWS: Hello World! IF YOU ARE ABLE TO KINDLY DO THAT FOR ME, YOU MAY RESUME TO WHATEVER YOU WERE DOING. THANK YOU, AND HAVE A NICE DAY!
Anyone wanna get started on the compiler? :P[/QUOTE]
[code]
main = do
let cs = "HELLO SIR, (OR MADAME, I DON'T WANT TO BE SEXIST). IF YOU'RE NOT TOO BUSY, WOULD YOU MIND POSSIBLY MAYBE OUTPUTTING SOME TEXT TO THE USER PLEASE? I WOULD REALLY APPRECIATE IT. HONESTLY, I WOULD. EVERY TIME. PLEASE. IF YOU FIND THE TIME, THE TEXT I WOULD LIKE YOU TO PRESENT TO THE KIND USER IS AS FOLLOWS: Hello World! IF YOU ARE ABLE TO KINDLY DO THAT FOR ME, YOU MAY RESUME TO WHATEVER YOU WERE DOING. THANK YOU, AND HAVE A NICE DAY!"
args <- getArgs
input <- readFile $ args !! 1
case input == cs of
True -> writeFile "tmp.hs" "main = putStrLn "Hello, World!\n"
System.system "ghc --make -O2 tmp.hs"
False -> putStrLn "Syntax error"
System.exitWith $ exitFailure 1
[/code]
Done :D
EDIT: Or we could do this without the do-syntax!
[code]
main = let cs = "HELLO SIR, (OR MADAME, I DON'T WANT TO BE SEXIST). IF YOU'RE NOT TOO BUSY, WOULD YOU MIND POSSIBLY MAYBE OUTPUTTING SOME TEXT TO THE USER PLEASE? I WOULD REALLY APPRECIATE IT. HONESTLY, I WOULD. EVERY TIME. PLEASE. IF YOU FIND THE TIME, THE TEXT I WOULD LIKE YOU TO PRESENT TO THE KIND USER IS AS FOLLOWS: Hello World! IF YOU ARE ABLE TO KINDLY DO THAT FOR ME, YOU MAY RESUME TO WHATEVER YOU WERE DOING. THANK YOU, AND HAVE A NICE DAY!" in getArgs >>= \args -> readFile (args !! 1) >>= \input -> if input == cs then writeFile "tmp.hs" "main = putStrLn Hello, World!" >>= \_ -> System.system "ghc --make -O2 tmp.hs" else putStrLn "Syntax error" >>= \_ -> System.exitWith $ exitFailure 1
[/code]
[code]
string msg = "Hello World";
Default
{
state_entry()
{
say(msg);
}
}
[/code][code]
default
{
touch_start(integer num_detected)
{
llRequestAvatarInfo(llDetectedKey(0),REQUEST_GENDER);
}
dataserver(string data)
{
if(data == "male")
{
llSay(0,"Hello Sir");
}
else if(data == "female")
{
llSay(0,"Hello Maddam");
}
}
}
[/code]Somthing like that, you can tell I program LSL on Second Life can't you...
LSL is a horrible language.
[code]class HelloWorldApp {
public static void main(String[] args) {
System.out.println("Hello World!"); // Display the string.
}
}[/code]
Java/
Sorry, you need to Log In to post a reply to this thread.