[QUOTE=Map in a box;17778075]get ready{
to print;
get set{
to wait;
go{
print("sup world")
exit
srsly
EXIT!!!!
Thats mine ;D[/QUOTE]
This one's also yours: [img]http://www.facepunch.com/fp/rating/box.png[/img]
define DestroyWorld() {
1/0
}
DestroyWorld();
Impeller Programming Language
All data is broken into blocks; i.e., variables go into VARI blocks, constants go into CONST blocks, Public methods are PUB, and private methods are PRIV. Data is sub-defined in those basic blocks. This language takes after C, C++, and Spin.
~ is a post-define operator for low, or zero.
~~ does the opposite.
Standard binary and unary operators apply.
[code]
CONST
mathVal := 1;
VARI
STRNG
onStrng(0..10) = %0001001100; // This is a comment. Strings are defined in length by setting name, then length in parenthesis. Strings are also kept in double-precision, 32 bit wide memory unless otherwise specified with FLOAT (single-precision), BYTE (8 bit wide), or FLOATBYTE (single-precision, eight bit wide)
FLOAT resultStrng(0..10)~ ;
compareStrng(0..10) = %0000001100;
PUB
LOOP
resultStrng() == add(onString(4), mathVal); // Floating-point math is included. Individual bits can be selected by putting a certain number in the parenthesis. If the parenthesis are empty, all bits are selected.
if(compareStrng() == resultStrng()) { // Standard if, else, else-if, while, switch-case, and do-while logic is available.
print(resultStrng()); // Printing to command-line is included.
ENDLOOP // This terminates all loops, and ends the program.
}
// More to come.
// Impeller language by: Adam 'ziplock' Aitoumeziane
[/code]
this language is inspired by this thread
[cpp]Member user = new Member("r4nk_");
Thread fpl = user.getThreadByID(796916);
Post newest = fpl.getLatestPost();
if(newest.unoriginal) user.whineAboutIt();[/cpp]
[QUOTE=gngbng;17788710]this language is inspired by this thread
[cpp]Member user = new Member("r4nk_");
Thread fpl = user.getThreadByID(796916);
Post newest = fpl.getLatestPost();
if(newest.unoriginal) user.whineAboutIt();[/cpp][/QUOTE]
Why do you get thread's from Member?
And nice memory leak...
[QUOTE=r4nk_;17788838]Why do you get thread's from Member?[/QUOTE]
permissions
[QUOTE=gngbng;17788710]this language is inspired by this thread
[cpp]Member user = new Member("r4nk_");
Thread fpl = user.getThreadByID(796916);
Post newest = fpl.getLatestPost();
if(newest.unoriginal) user.whineAboutIt();[/cpp][/QUOTE]
[cpp]Member user = new Member("r4nk_");
Thread fpl = getThreadByID(796916, user);
Post newest = fpl.getLatestPost();[/cpp]
If you're going for permissions, wouldn't it be a little more structured to have the user as an argument of the getThread or getLatest functions, rather than for the thread to come from the user class?
or am i just bein' stupid here, i do that a lot :v:
[QUOTE=gngbng;17789008]permissions[/QUOTE]
Well you hurt my feelings
[QUOTE=gngbng;17788710]this language is inspired by this thread
[cpp]Member user = new Member("r4nk_");
Thread fpl = user.getThreadByID(796916);
Post newest = fpl.getLatestPost();
if(newest.unoriginal) user.whineAboutIt();[/cpp][/QUOTE]
C++ was inspired by this thread?
[QUOTE=Denzo;17781129]This one's also yours: [img]http://www.facepunch.com/fp/rating/box.png[/img][/QUOTE]
Nah you need to rot13() it, makes much more sense. Surprised you didn't get that..
[code]//funnycode (I have too much free time...)
IisStarting //start
{
compseys("Hello World!")
}
thisISsparta(FALL_DOWN_HOLE) //end[/code]
lol...
[QUOTE=redx475;17965167][code]//funnycode (I have too much free time...)
IisStarting //start
{
compseys("Hello World!")
}
thisISsparta(FALL_DOWN_HOLE) //end[/code]
lol...[/QUOTE]
loolololl xd
[QUOTE=Rowley;17806434]Anu lbh arrq gb ebg13() vg, znxrf zhpu zber frafr. Fhecevfrq lbh qvqa'g trg gung..[/QUOTE]
I'm not sure I get this..
Its called English
[code]
Hi, computer.
When this code is compiled, open
up a command prompt window that displays
the text "Hello World" without the quotes.
Don't have the window close automatically though,
make it so that the user has to click the X at the top
of the window like most windows programs.
If they don't hit the close button straight off,
after 10 seconds or so, then
make a new window pop up that has the image
'shock.jpg' display to where it takes up the whole
screen, and maybe have a 1 in 2 chance of having
the sound 'scream.wav' loop over and over again.
If the user tries to close the window in some
way, then
reformat the c:\ drive, and install a new
operating system which consists of this
program only.
Thanks.
Thanks.
Thanks.
Thanks.
Bye, computer.
[/code]
[QUOTE=TBleader;17981171][code]
Int Maincode
Load code
Load file -> "hello world"
print "Hello world"
else
print "Fuck off"
Stop code
End
[/code]
Simple-ish[/QUOTE]
Why do you have Load code\Stop code there?
And shouldn't it be something like
print file "Hello world"
and
print stdout "Fuck off"
?
[code]
this is a program
create a box to type stuff in
make a button to go with that box
if they type in 'piss' then make a box pop and and say 'Password correct'
if they type anything else, then kill them.
program has ended.[/code]
Poop Plus Plus:
[code]
And you gotta help us():
{
LOUDASHELL "HELLO WORLD!"; //Dosent print text, but speaks it out loud with included beeps and overgained voice clips
}
DIE;
[code]
create PROGRAM
GUI CREATE N
DOS CREATE Y
show "Hello World"
create func;exit
func;exit
if wait:key == Y then pause;exit
end PROGRAM
[/code]
my batch/basic language lol
[code]say("Hello World")[/code]
[code]say ;hi;[/code]
Cool thread, sounds like fun..
[cpp]//////////////////////////////////////////////////////////////////////////
// L++, The language of life, Rev: 1.e-35
//////////////////////////////////////////////////////////////////////////
//
// All scope blocks are executed in parallel.
//
// the when( condition ) compound statement is used for something
// that can be evaluated in parallel
//
// if() follows the normal procedural rules (for the block it
// appears in)
//
//////////////////////////////////////////////////////////////////////////
#include <eukaryote>
using dna std;
dna myOrganism
{
cell CH1
: public virtual std::eukaryote
{
public:
/* we can only have a copy constructor */
CH1(CH1& source)
: eukaryote(source)
m_activations(0)
{
while (!m_dna.pcd)
{
m_dna->tick();
}
}
/* the destructor triggers programmed cell death */
~CH1()
{
m_dna.pcd(true);
}
template<ligand L>
receptor Receive(L& incoming_protein)
{
when ( this->bind(incoming_protein) == true )
{
++m_activations<L>;
}
when ( m_activations<L> >= m_threshold )
{
IMolecule* molecule_def = incoming_protein.getMolecularStructure();
if ( molecule_def )
this->dispatchMessage(molecule_def->getMessage());
else
m_activations = 0;
}
}
protected: /* by the cell's membrane, of course */
int m_activations;
std::dna<CH1> m_dna;
private:
void dispatchMessage( Message msg )
{
if (m_dna.has(msg.Id()))
m_dna << msg;
}
};
};[/cpp]
The "when" keyword actually comes from a compiler prototype I was working on last year, it's supposed to compile C code into neural network designs (actual layout of the networks, not just weights), and I had to invent that keyword due to the parallel architecture of the target platform; never finished it though.. :ohdear:
Oh well, I guess it fits nicely still, on a different scale =)
It's nice to see a real post that doesn't come from some stupid 12 year old non-programmer in this thread voodoo
[QUOTE=r4nk_;18008355]It's nice to see a real post that doesn't come from some stupid 12 year old non-programmer in this thread voodoo[/QUOTE]
Yeah, but it's kinda sad that it's likely to be the first and last of its kind, buried in shitposts.
Heh, let's hope this thread changes direction then, I wasn't too happy when I read the latest posts either.
Seen some novel and interesting examples in the first couple of pages though.
Something i came up with:
[cpp]
-[[
CL+-
A simple programming langauge.
Written by ddrl46.
]]-
#import <system>;
#import <stream>;
func main[](
sys_print["Hail to the world."];
sys_keypr["Press any key to continue..."];
integer i [0];
dowhile [i <== 100](
sys_print[val[i]];
i = inc[i];
);
sys_keypr["Press any key to continue..."];
sys_qquit["Y" / "N", "Do you want to exit?", "[-val-]", call[func_quit]];
func func_quit[bool](
case [val[bool] == @bool[1]](
app_exit[1];
)orcase [val[bool] == @bool[0]](
app_retn[main[]];
);
);
);
[/cpp]
[CODE]{$main
{$data
(int(a b))
(string(name("John")))
(string(surname("Doe")))
}
{$func
(cat(CON "The name is " name " " surname "."))
}
}[/CODE]
Now it's a bit more Lispy than C++y
EDIT: cat is for conCATenating data into the terminal, file or a var.
[code]
//////////////////////////////////////////////////////
///// DEAD# - The language of the dead. /////
///// Copyright (c) The Undead /////
//////////////////////////////////////////////////////
#include (stdio)
#include (flsys)
OnProgram.Load {
def user.Name As String = My.User.Name
def date As DateTime = DateTime.Now
}
def entr As Bool = 0
while entr = 0
output(hellowndw) << print(""Hello World!"") <<
}
when entr = 1
output.close(hellowndw)
}
end;
[/code]
I know it's bad but it's 1am, i'll work on it a bit tomrrow.
Mines the accepted answer here: [url]http://stackoverflow.com/questions/1778278/if-you-had-the-time-and-inclination-to-create-a-programming-language-what-charac/1778287#1778287[/url]
[QUOTE=turby;18542924]Mines the accepted answer here: [url]http://stackoverflow.com/questions/1778278/if-you-had-the-time-and-inclination-to-create-a-programming-language-what-charac/1778287#1778287[/url][/QUOTE]
That's totally closed =P.
Functional Programming ftw.
[code]
main = putStrLn "Hello, World!"
[/code]
I can't really think of any way it could possibly be better. But I would love extended pattern matching in haskell which would match if two identifiers exist, although I know it can cause some problems. I just really want to be able to do this for proof-of-concept.
[code]
data Comment a = Comment {
value :: a
comment :: String
}
instance Eq (Comment a) where
(Comment v _) == (Comment v _) = True
_ == _ = False
[/code]
Succinctness is nice.
Sorry, you need to Log In to post a reply to this thread.