[QUOTE=Eleventeen;19546016][code]class HelloWorldApp {
public static void main(String[] args) {
System.out.println("Hello World!"); // Display the string.
}
}[/code][/QUOTE]
Hmm, there's a joke there somewhere...
[code]print("Hello World")[/code]
Run Console.Base
Print(Hello World)
End Console.Base 'Hello World
Run Game.Base 'Starts the game engine
Game.rules = FPS.fl 'gets the FPS code
Game.NPCS = Bots.fl 'gets the NPC code
Game.Weapons = Weapons.fl 'gets the weapon code
Game.Map = Map1.MDL + Map1.CFG 'gets the map
Game.Controls = Controls-FPS.fl 'gets the controls
game.run 'runs the game
one of those dll looks like this in my fake language
New Fake Libary = Bots
New.Bot = Bot1
Bot1.health = 20
Bot1.AI = Bot1AI.cfg
Bot1.weapon = Pistol(weapons.fl)
New.Bot = Bot2
Bot2.health = 500
Bot2.AI = Bot2AI.cfg
Bot2.weapon = Minigun(weapons.fl)
end
Why would you be using dll's?
[QUOTE=Wipmuck;19586995]Why are you using dll's?[/QUOTE]
Because he's an idiot
[QUOTE=turby;19587252]Because he's an idiot[/QUOTE]
Calm down guys, this thread is called "Fake Programming Language" for a reason. He can use whatever the fuck he wants. Did you see my post above? It's even less realistic.
Thats not what a .dll is though, read:[URL]http://en.wikipedia.org/wiki/Dynamic-link_library[/URL]
[code]C:\
C:\DOS\RUM
RUN\DOS\RUN
[/code]
lol commands not code
Okay, you guys don't like me using DLL's incorrectly, so they will be FL, or Fake Libraries.
It's funny to see how some of you actually manage to make it look real.. atleast for me since I don't know shit about coding.
[code]hai
can has stdio?
Visible "hai world!"
kthxbye
[/code]
Actually a real language, being developed by me.
omg.obj
[code]
obj OMG
wire OMG sexywire
wirefunc OMG sexywire 'passon stdout 'o hai OMG''
end wire
end obj
[/code]
flee.ocp
[code]
//Object to send to, message to send, wire to send across
engineer 'OMG' creator
//creates the OMG object
OMG 'init wirefunc' sexywire
//Prints o hai OMG on the screen :smug:
[/code]
[QUOTE=neos300;19822191]Actually a real language, being developed by me.
omg.obj
[code]
obj OMG
wire OMG sexywire
wirefunc OMG sexywire 'passon stdout 'o hai OMG''
end wire
end obj
[/code]
flee.ocp
[code]
//Object to send to, message to send, wire to send across
engineer 'OMG' creator
//creates the OMG object
OMG 'init wirefunc' sexywire
//Prints o hai OMG on the screen :smug:
[/code][/QUOTE]
I'd rather stick to something like php or c#.
[QUOTE=raccoon12;16839957]I wish I could make stuff like this :([/QUOTE]
who the fuck is stopping you man i had the same thought too but i went out and get a huge C++ book and learned it
[QUOTE=neos300;19822191]Actually a real language, being developed by me.
omg.obj
[code]
obj OMG
wire OMG sexywire
wirefunc OMG sexywire 'passon stdout 'o hai OMG''
end wire
end obj
[/code][/QUOTE]
You realise .obj is already a significant file extension which relates to programming?
[QUOTE=turby;19830753]You realise .obj is already a significant file extension which relates to programming?[/QUOTE]
To bad. Ill fix it later. Right now there is absoultely no point in making obj's, until I make it so you can load DLL's.
here's an attempt at something.
One of the things I would really like to have in compiled languages that I do have in PHP: typeless functions and variable declaration. SO usefull
[php]//this is a comment
/* This a block comment
* This language is based in C/C++/PHP syntax,
* but is meant to have commonly used functions
* like keyboard events provided by default libraries
*/
package Example:HelloWorldAndCalc
/* Multiple files can belong to one package. The use keyword can "import"
* packages making all of their (public) classes/methods available.
* The from <package> use <part> statement imports the specified parts of that
* package. For example:
* from Example use HelloWorldAndCalc is valid and would
* "import" the classes/methods declared in this file
*/
init{ //initialization, idea taken from a previous example in this thread
required: //throws a UnsatisfiedRequirements error if any of the packages is unavailable
use io; //rich input/output which provides, among others, keyboard events
optional: //throws a UnsatisfiedOptionals warning if any of the packages is unavailable
from math use trig, log; //importing several parts of a package
define: //program definitions
main is primary; //our main() function is now known as primary()
functions, classes, methods are public; //all functions methods and classes are, by default, public
classes are private; //actually, we want classes to be private
print on io:console.stdout; //by default, all print statements output to stdout
priority: catcher; //the catcher() function has priority over all others and will be run first
}
function getCosine(angle) { //function declararion is similar to PHP's, var and return types are implicit
try{
return math:trig->cos(angle);
}
catch(UnsatisfiedOptionals) {
io:console.stderr->print "Unsatisfied dependency!\n"; //although the standard is set to stdout, we can output to other places
}
}
primary() { //our main()
while(!io:keyboard->keyDown("Esc")) { //keyboard events is a part of io, and are automatically available. keyboard->keyDown is non-blocking
print "Hello World\n";
print "Input a number, please: ";
number = get(); //no variable delcaration, memory is allocated dynamically and type is implicit. get blocks (which is good in this case)
print getCosine(number)."\n";
print "And another one: ";
print math:log->base2(get()); //imported packages methods can also be called directly
}
print "Terminating\n";
return 0;
}
catcher() { /* this is ran BEFORE primary(). If we didn't catch this, the program would crash with an UnsatisfiedRequirements error as soon as
* it tried to access a required dependency.*/
catch(UnsatisfiedRequirements) { //catch doesn't need a try
die("Unsatisfied dependencies\n"); //die outputs to stderr by default
}
}[/php]
[B]Edit:[/B] Just noticed someone else had a similar idea on page 3. Sorry, isn't meant to be a rip off.
Someone needs to make a language that's just plain english.
Like you could write "Computer, say "hello world" when I start you up every time until told otherwise" or some shit.
That would be awesome.
901
308
901
309
508
209
902
000
not fake :/
[QUOTE=~ZOMG;19960376]Someone needs to make a language that's just plain english.
Like you could write "Computer, say "hello world" when I start you up every time until told otherwise" or some shit.
That would be awesome.[/QUOTE]
That'd be a bitch. You'd shoot yourself from the syntax errors.
snip'd
[QUOTE=grlira;19955474]here's an attempt at something.
One of the things I would really like to have in compiled languages that I do have in PHP: typeless functions and variable declaration. SO usefull
[php]
[...]
while(!io:keyboard->keyDown("Esc")) { //keyboard events is a part of io, and are automatically available. keyboard->keyDown is non-blocking
print "Hello World\n";
print "Input a number, please: ";
number = get(); //no variable delcaration, memory is allocated dynamically and type is implicit. get blocks (which is good in this case)
print getCosine(number)."\n";
print "And another one: ";
print math:log->base2(get()); //imported packages methods can also be called directly
[...]
[/php]
[/QUOTE]
That actually looks pretty good :smile:. My only complaint would be that get() doesn't seem to be consistent with, say, keyboard->keyDown(). It kinda just comes out of nowhere, you know what I mean?
[QUOTE=nullsquared;19969191]That actually looks pretty good :smile:. My only complaint would be that get() doesn't seem to be consistent with, say, keyboard->keyDown(). It kinda just comes out of nowhere, you know what I mean?[/QUOTE]
Thanks :) And yes, agreed, here's a different option:
[PHP]number = io:keyboard->get("Return")[/PHP]
io:keyboard->get() takes one argument, and registers all keyboard inputs in a buffer until the key passed as an arg is pressed, at which time all the input is placed on the var.
So in this case, it'd wait for a user to press some keys and then hit return. Didn't think of any kind of type check, but a function like
[PHP]io:keyboard->getInt()[/PHP] that returns a UnvalidInputType error could easily be done.
That, or the programmer just uses a isInt(number)
Sorry but a raw binary's bytes' ASCII values in hexadecimal notation does not qualify as a programming language.
(Gee, I hope that description was accurate)
What do you mean they don't qualify? Machine code is very well a programming language, Just not easy for humans to interpret and/or understand.
edit: fixed a retarded typo
Sorry, you need to Log In to post a reply to this thread.