[QUOTE]}
return 0;
cout << helloworld << endl;
string helloworld = "Hello, world!";
int main(int argc, char* argv[]) {
using namespace std;
#include <string>
#include <iostream>
[/QUOTE]
lol backwards compiling
[CODE]Recipe for one hello world
{
You will need:
one console window
iostream
Step 1:
open the console window and set its title to test.
Step 2:
Add one "hello world" to your mixing bowl
Step 3:
Cook your mixture and serve
Step 4:
Tidy away and clean all utensils.
}[/CODE]
Looks like Cheff, another esoteric programming language.
[CODE]print 'Hello World';[/CODE]
[QUOTE]Simplicity is key. [/QUOTE]
*cough cough*Python*cough cough*BASIC*cough cough*
[editline]02:36AM[/editline]
[QUOTE]I wish. :sigh: [/QUOTE]
Yeah me too
I was bored.
[code]
uses console;
uses math;
program CosFinder
Decimal Angle;
String Type;
CosFinder->Description = "Used to find the Cosine of the provided angle";
CosFinder->Author = "aarong11@gmail.com";
CosFinder->Version = "0.1a";
function Init
// This function is automatically invoked before Main.
// Use this function for setting up arguments and shit.
Requires:
// Will automatically throw RequiresNotSatisfied if not provided with an angle.
Args[0]->Angle;
Optional:
// Program will continue to run if Type is not defined
Args[1]->Type;
end function
function Main
try if (CosFinder->Type->ToLowerCase == "radians")
decimal Degrees = math->RadsToDegs(Angle);
decimal Value = math->Cosine(Degrees);
console->Print("Cosine of " + Angle + " is " + Value);
CosFinder->Exit();
else try
console->Print("Assuming input is degrees, please specify radians otherwise.");
decimal Value = math->Cosine(Angle);
console->Print("Cosine of " + Angle + " is " + Value);
CosFinder->Exit();
end function
function Exit
console->Print("Finished!");
end function
exception RequiresNotSatisfied()
console->Print("You must specify an angle to find the cosine of!");
CosFinder->Exit();
end exception
exception NotANumber(Angle)
console->Print("Please make sure you enter a number for the angle!");
CosFinder->Exit();
end exception
[/code]
[code]
birth
voice<("Hello World")
end life<(accident<(child rapist))
death
[/code]
[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]
No mutliline macros? Peh.
[QUOTE=AaRoNg11;16846836]I was bored.
[code]
uses console;
uses math;
program CosFinder
Decimal Angle;
String Type;
CosFinder->Description = "Used to find the Cosine of the provided angle";
CosFinder->Author = "aarong11@gmail.com";
CosFinder->Version = "0.1a";
function Init
// This function is automatically invoked before Main.
// Use this function for setting up arguments and shit.
Requires:
// Will automatically throw RequiresNotSatisfied if not provided with an angle.
Args[0]->Angle;
Optional:
// Program will continue to run if Type is not defined
Args[1]->Type;
end function
function Main
try if (CosFinder->Type->ToLowerCase == "radians")
decimal Degrees = math->RadsToDegs(Angle);
decimal Value = math->Cosine(Degrees);
console->Print("Cosine of " + Angle + " is " + Value);
CosFinder->Exit();
else try
console->Print("Assuming input is degrees, please specify radians otherwise.");
decimal Value = math->Cosine(Angle);
console->Print("Cosine of " + Angle + " is " + Value);
CosFinder->Exit();
end function
function Exit
console->Print("Finished!");
end function
exception RequiresNotSatisfied()
console->Print("You must specify an angle to find the cosine of!");
CosFinder->Exit();
end exception
exception NotANumber(Angle)
console->Print("Please make sure you enter a number for the angle!");
CosFinder->Exit();
end exception
[/code][/QUOTE]
I actually kind of like this.
[CODE]` simple calculator
out "first number:"
in x
out "\nsecond number:"
in y
out "\noperation:"
in op
out "\nresult:" + __exec("x" + op + "y")[/CODE]
Can anyone explain to me how this works?:
[CODE]out "\nresult:" + __exec("x" + op + "y")[/CODE]
[code]Super Fun non-complex language 1
Insert command: Get my stapler[/code]
In reference to the Stair2.0 robot.
[QUOTE=high6;16849212]No mutliline macros? Peh.[/QUOTE]
Did you miss the "\"?
[QUOTE=Eudoxia;16849670][CODE]` simple calculator
out "first number:"
in x
out "\nsecond number:"
in y
out "\noperation:"
in op
out "\nresult:" + __exec("x" + op + "y")[/CODE]
Can anyone explain to me how this works?:
[CODE]out "\nresult:" + __exec("x" + op + "y")[/CODE][/QUOTE]
It's basically code being resolved at runtime. So, if the user supplied 8 as the first number, 9 as the second number, and + as the operator, it would evaluate the expression 8 + 9 (x = 8, y = 9, op = +).
Pretty much python with a few of the annoying bits changed:
[code]lolsring = "helloworld"
input(lolint,"Numberzplz:")
for x in range(0,lolint):
print("lololol $lolsrting\n")[/code]
[QUOTE=cryticfarm;16840324]I made a calculator.
[code]
LETS START THIS MOFO
LOLGROUP1
GIVE ME ENTER TEXT THING THAT STORES(WHATEVER_WAS_IN_HERE_NAME = NAWMBER1)
GIVE ME PRINT IN ENTER TEXTBOX (NAWMBER1)
the thing that I just got "PUT FIRST NAWMBER HERE PLZ AND POOSH ENTER"
IF ENTERBAWTEN WAS POOSH THEN STORE
STORE PRINT IN ENTER TEXTBOX (NAWMBER1)
STORE WHATEVER IN NAWMBER1
GIVE ME ENTER TEXT THING THAT STORES(WHATEVER_WAS_IN_HERE_NAME = OPERATIONTHINGY)
GIVE ME PRINT IN ENTER TEXTBOX (NAWMBER1)
the thing that I just got "PUT OPERATIONTHINGY HERE PLZ AND POOSH ENTER"
IF ENTERBAWTEN WAS POOSH THEN STORE
STORE PRINT IN ENTER TEXTBOX (OPERATIONTHINGY)
STORE WHATEVER IN OPERATIONTHINGY
GIVE ME ENTER TEXT THING THAT STORES(WHATEVER_WAS_IN_HERE_NAME = NAWMBER2)
GIVE ME PRINT IN ENTER TEXTBOX (NAWMBER2)
the thing that I just got "PUT NAWMBER2 HERE PLZ AND POOSH ENTER"
IF ENTERBAWTEN WAS POOSH THEN STORE
STORE PRINT IN ENTER TEXTBOX (NAWMBER2)
STORE WHATEVER IN OPERATIONTHINGY
DOTHEMATH NAWMBER1(OPERATIONTHINGY)NAWMBER2 = ANSWER
GIVE ME PRINT_STORED_THING (ANSWER)
the thing that I just got "ANSWER"
SHOW PRINT STORED THING
SCREWOFF LOLGROUP1
SCREW OFF
[/code][/QUOTE]
For the love of god, create a language/IDE that uses this. It would be priceless.
[code]000100 IDENTIFICATION DIVISION.
000200 PROGRAM-ID. HELLOWORLD.
000300
000400*
000500 ENVIRONMENT DIVISION.
000600 CONFIGURATION SECTION.
000700 SOURCE-COMPUTER. RM-COBOL.
000800 OBJECT-COMPUTER. RM-COBOL.
000900
001000 DATA DIVISION.
001100 FILE SECTION.
001200
100000 PROCEDURE DIVISION.
100100
100200 MAIN-LOGIC SECTION.
100300 BEGIN.
100400 DISPLAY " " LINE 1 POSITION 1 ERASE EOS.
100500 DISPLAY "Hello world!" LINE 15 POSITION 10.
100600 STOP RUN.
100700 MAIN-LOGIC-EXIT.
100800 EXIT.[/code]
Oh wait, that's a real language.
[code]
start typing below
hello goodbye
end of typing
create crysis
done[/code]
I win!
A mashup of Lisp/Scheme's consistent syntax and approach to variables/defined symbols and the happiness of procedural languages that's the fact that every damned expression doesn't have to evaluate to something so I don't have to think about how to combine expressions in a way that means something (although I don't have an idea of how it'd work, for that matter.)
[code]
(define num1 1)
(define num2 (+ num1 1))
(define SUCCESS 0)
(define (toss-in-bin variable) )
;do something automagical
;this returns a number
(define (main paramIdon'tneed1 paramIdon'tneed2)
(display (not (+ num1 num2)) (newline))
(toss-in-bin (paramIdon'tneed1)) (toss-in-bin (paramIdon'tneed2))
(return SUCCESS))
[/code]
[code]@Initialize Array, Stdio;
HelloWorld = new Array;
Console = new Stdio;
HelloWorld::InsertValues("hello", "world", "what's", "going", "on", "in", "this", "thread");
HelloWorld::ReadOnly(true);
ForEach (Array = HelloWorld, Key = Position/integer, Value = Word/string) Do
Console::Print(Key + "\t" + Value);
End ForEach[/code]
[CODE]Initiate AI Auto Coder
Create.game = "Fuck Shit Up"
Terminate AI
[/code]
Reads your mind man, makes anything with a simple description.
[QUOTE=tarkio;16851839][code]000100 IDENTIFICATION DIVISION.
000200 PROGRAM-ID. HELLOWORLD.
000300
000400*
000500 ENVIRONMENT DIVISION.
000600 CONFIGURATION SECTION.
000700 SOURCE-COMPUTER. RM-COBOL.
000800 OBJECT-COMPUTER. RM-COBOL.
000900
001000 DATA DIVISION.
001100 FILE SECTION.
001200
100000 PROCEDURE DIVISION.
100100
100200 MAIN-LOGIC SECTION.
100300 BEGIN.
100400 DISPLAY " " LINE 1 POSITION 1 ERASE EOS.
100500 DISPLAY "Hello world!" LINE 15 POSITION 10.
100600 STOP RUN.
100700 MAIN-LOGIC-EXIT.
100800 EXIT.[/code]
Oh wait, that's a real language.[/QUOTE]
Good god, three terminating statements?
-snipnvmlol-
[code]
INSERT output
CREATE main
START main
LETTER<11> hello
SET hello --- Hello World ---
DRAW hello
IF g/frametime IS LESS THAN 60
LIMIT<g/seconds> 1 : 10 limiter
START limiter
DRAW --- Low FPS Alert ---
STOP limiter
END IF
STOP main
[/code]
I like it
[CODE]
// Here is a very simple programming language (fake) designed
// by Jmazouri. If it were real, it would most likely be used
// as an introductory to programming for small children ages
// 8-12, or others wishing to get into programming.
Begin function name(MyFunc)
Create(CMD)
out "NUMBAH PLOX"
in num1
out "NUMBAH 2 PLOX"
in num2
calc num1+num2 num3
out "HERE'S YOUR NUMBAH"&num3
Wait(forKey)
Remove(CMD)
End function
[/CODE]
This is fun :D
[code]
Define FileName="Main";
Uses Console;
Uses KeyBoard;
Var intergery = 5;
Var floaty# = 5.5;
Var stringy$ = "Hello world";
Var result# = 0;
If ( intergery + floaty# > 8 ) {
Print (""+stringy$);
result# = intergery + floaty#;
Print ("intergery + floaty = " + result );
Attach("Main2.sac")
Loop(4000){
If ( Keypressed( Any )==true ) then Break();
}
}
Exit();
[/code]
[code]
Define FileName="Main2";
Uses Console;
Print("Regards from Main2.sac");
[/code]
And here what it prints:
[code]
Hello world
10.5
Regards from Main2.sac
[/code]
[QUOTE=Benjy355;16851821]For the love of god, create a language/IDE that uses this. It would be priceless.[/QUOTE]
Well there's LOLCODE, and that's quite cool.
[QUOTE=Robber;16843695]Why __exec("x" + op + "y")?
Wouldn't __exec(x + op + y) make more sense?[/QUOTE]
In the end it doesn't really matter since you'd be executing a string of code within the same scope, so whether the interpreter sees x*y or 6*7 it'll work either way.
[code]
Squad A = (Troop "Hello, World!")
All Troops in Squad A move to Base Alpha
Status Report(Alpha)
[/code]
[code]
Status Report("Hello, World!")
[/code]
Prints "Hello, World!"
Adder:
[code]
Soldier Report('Number 1:')
Move Report to Base Alpha
Soldier Report('Number 2:')
Move Report to Base Bravo
Status Report("Adding now!")
Move Alpha and Bravo to Charlie
Status Report(Charlie)
[/code]
Outputs:
[code]
Number 1: 1
Number 2: 5
Adding!
6
[/code]
This was an actual language I was developing. It was called ARMY.
Full Calculator:
[code]
Soldier Report("Number One: ")
Move Report to Alpha
Soldier Report("Number Two: ")
Move Report Bravo
Soldier Report("Op: ")
Sir, is Report "+" or "-" or "/" or "*"?
Yes.
Move Report to Charlie
No.
Status Report("Error: Invalid Op")
Retreat
Sir, is Charlie "+"?
Yes.
Move Alpha and Bravo to Delta
No.
Ignore
Sir, is Charlie "-"?
Yes.
Move Alpha and Bravo to Delta
Withdraw Bravo from Delta
No.
Ignore
Sir, is Charlie "*"?
Yes.
For I when I <= Bravo:
Move Alpha to Delta
No.
Ignore
Sir, is Charlie "/"?
Yes.
Withdraw all but 1/Bravo from Alpha
Move Alpha to Delta
No.
Ignore
Status Report(Delta)
[/code]
Fix'd the calculator using eval()
[CODE]/*
* This program is an example of the ARTIC programming language
*
* This example creates a calculator.
*
* ARTIC is a fake language I came up with. It is an interpreted, imperative, dynamic typed, and [meaby in the future]
* object-oriented language for applications.
*
* This language was influenced by languages like C, C++ and Lisp. The fully parenthesized syntax is from Lisp, the structure
*from C and C++, and other aspects come from a myriad of other languages.
*
* -Alex Rosslyn, Friday 21, August 2009.
*
*
*/
{$var
{$int
(num1)
(num2)
(result)
}
{$string
(ari)
(op)
}
}
{$main
(print("---Sample ARTIC Calculator---\n"))
(print("-----------------------------\n"))
(get.cin)
(get("Enter the first number: %%num1"))
(get("\nEnter the second number: %%num2"))
(get("\nEnter Arithmetic Operator (+,-,*,/): %%op"))
(eval((result):(num 1 + op + num2)))
(print("\nResult: %%result"))
(print("\n-----------------------------\n"))
(print(result))
}[/CODE]
[code]{Hello World>"''cout:BinkingOutOf::cout.toString(int computer) in local}[/code]
Sorry, you need to Log In to post a reply to this thread.