https://codeshare.io/mQ8xm
https://codeshare.io/CfxKq
new one some fag deleted it
>>52428735
>/g/
html isn't programming.
>>52429608
Says you, scrub :^)
>>52429674
>thinks HTML documents are programs
>calls people scrub
>>52429866
>thinks HTML documents aren't programs
>calls me people
:^)
import std.stdio;
char[] DEEEEEE = ['D', 'E'];
int main() {
writef("%c", DEEEEEE[0]);
int i = 0;
while(i < 100000000000) {
writef("%c", DEEEEEE[1]);
i++; //solved the halting problem
}
writef("%s\n", "Z NUTS");
wakeMeUp();
return 0;
}
/* I like dicks */
void wakeMeUp()
{
writeln("CAN'T WAKE UP");
}
we're done
that'll be $10,000
>>52430004
Needs GPL
>>52430179
Needs WTFPL* there you go, fixxed
My glorious game isn't going to write itself dudes.
Come write some rooms for this epic adventure, in Python.
>>52428735
>not using an editor with a built-in sandbox
This is going much better then imagined.
DID SOMEONE SAVE IT BEFORE IT GOT REKT?!
That was going very well to the point I was actually learning things.
Can the anon that made those dictionaries for directions, abbreviations, and then calling the functions post that here if you still have it?
>>52430637
Until someone blanked the whole bloody thing.
>>52430686
That was me. It's pretty simple, really, in Python a function is an object, so it can be moved around, stored, referenced, etc just like anything else. To call it, just use the () syntax.
>>52430700
>>52430686
Here's an example:def foo():
return "bar"
a = foo # a is the function foo
b = foo() # b is the value foo returns when called
c = a() # c is the same as b
some_functions = [sum, max, foo]
some_functions[0](1,2,3) # returns 6, because it calls sum
some_functions[1](1,2,3) # returns 3, because it calls max
some_functions[2]() # returns "bar", because it calls foo
We could have had a magical adventure full of minature horses singing Coolio, black maids feeding you sweet tea, and golden rooms full of burgers but noooooooo.
>>52430731
The rock serving a carafe of pizza would be fine too
>>52430726
Excellent, thank you man.
>>52430741
I agree. Anything would be find. It was just amazing it was coherent and still funny for a while there.
/webdev/ coming in and shitting it up more.
>>52430726
We can use this to accomplish some really interesting things.def map(function, values):
return [function(v) for v in values] # This is called a "list comprehension" It's a shorter way of writing:
# output = []
# for v in values:
# output.append(v)
# return output
def plus_one(n):
return n + 1
map(plus_one, [1, 2, 3]) # returns [2, 3, 4]
def print_a_lot_of_stars(how_many_stars):
print "*"*how_many_stars # you can multiply a string by an integer to get that string repeated that many times
map(print_a_lot_of_stars, [1, 2, 3]) # returns None, but prints
# *
# **
# ***
>>52430817
literally all me
>>52430826
Crap, in the comment explaination of list comprehensions, that append line should readoutput.append(function(v))
I can't proofread to save my life.
someone post that ascii girl here pls