still feeling like someone's
[Music]
by Jay
[Music]
[Applause]
tom is unfair cuz I know you're out
there somewhere patients waiting unaware
feeling like your grip might slip
[Music]
chasing speed
I'll be right there all of a sudden
a few your believe me straight to do
[Music]
[Applause]
[Music]
[Applause]
[Music]
[Applause]
[Music]
[Applause]
[Music]
[Applause]
[Music]
[Applause]
[Music]
[Applause]
[Music]
[Applause]
[Music]
[Applause]
[Music]
[Applause]
all right hello world this is cs50 live
my name is Colton Ogden in case
anybody's brand-new to the stream cs50
is Harvard's intro to computer science
top by David Malin this is our stream
where we do all kinds of fun stuff we
build things from scratch we talk about
things like Kali Linux which NIC Wong
from yesterday stream happen to help us
out with and a bunch of other things
talk about libraries talk about web talk
about games all kinds of stuff but today
is actually very experimental today
we're gonna do something completely
different we're going to kind of evolve
from the last week's text adventure game
that we did which was basically the gist
of that was the chat wrote all of the
text adventure lines in a text adventure
including branching paths and whatnot
and sort of I didn't really have too
much of a say in the process I was the I
guess sort of the person in charge of
writing down everything compiling it
really compiling it but running it and
making sure that everything went
according to plan
and off of that idea what I thought
would be really fun and really
interesting is to actually take a step
further than that let us write a Python
script from scratch maybe multiple
Python scripts where the only thing that
basically the only lines that go into
the script are what the people in the
chat actually end up writing and this is
largely like I said an experiment and so
I'm not entirely sure what the best way
of doing this necessarily will be and
maybe we'll do several versions of this
it will iterate on it and build it up
and make it better and better over time
the actual flow of this but today is
gonna be just kind of trial and error
we'll see how this works out I have an
idea
as to what I want to do how I want to
actually structure this but we will
we'll see if that ends up theoretically
being or actions that tangibly
as good as I am thinking it will be in
my head but thanks to everybody who's in
the chat we got a ton of people that are
already in here and some people were
asking if we're gonna be using a chat
bot for this we will not be using a chat
bot for this it's I think theoretically
possible but there are some issues
especially with Python being a
indentation focused language people
would have to write the people would
need to be able to write backspace and
whatnot to like D indent or shift tab or
whatnot and those would be considered
ASCII escape characters probably in the
in the chat BOTS and so that would get a
little messy but I think in theory it's
possible so we might explore that at
some point in the future no promise is
there well we'll probably do a more
manual sort of curated approach in the
short term but thanks to everybody's
tuned in as Leibovich night liquid 13
roam orc a meet haven't seen a meet for
a while greetings from India some rot JP
guy came in and asked me how scared am i
from on a scale from zero to nine about
how weird the code might get today and
I'm actually not scared because we're
gonna be curating everything but I think
of this work completely automated it
would be a little bit a little bit
intimidating so here's the idea that I
have the idea I have is that I will
basically right in I'll have a marker
I'll say and this is just a test but
I'll basically write in Pikachu like
this whoops can't type for some reason
there we go a little bit of a delay so
when I write Pikachu that's like the
ready set go and then what I want people
to do is to write in what we're gonna do
is we're gonna kind of structure so
here's my idea here's my idea so I'm
gonna switch to my computer before we
actually get started out before I start
writing any code this is my project I
was gonna create a new file here we'll
call this test one pi and python
extensions recommended that's okay what
we're gonna do is kind of reserve slots
this is my first iteration that I have
because I realize if we don't do this we
run the risk of just absolute chaos like
whose code goes in front of whose code
like it won't make any sense and so it
makes more sense to do
kind of step by step and actually go
line by line and we can even talk about
this use this as an educational
experience for some people Oh whiz ABC
first time joining a twitch livestream
ever while you chose an interesting one
to be a part of so I hope you enjoy your
time but the goal is gonna be I'm gonna
say Pikachu and then what I want
everyone in the chat who wants to
contribute to the code what I want them
to do and this is being a little bit
sluggish right now but I want people to
write in that I think this is a emoji
that everyone has access to the mister
Destructoid I want three of those this
is this is basically inspired by some
route 61 92 he wrote that up above so
whoever wants to write code as soon as I
write Pikachu I want three mister
Destructoid's than what I'm gonna do is
I'm gonna say okay so line 1 is going to
be reserved for will say so the truká
niece went first right so the true
Candy's gets the first line and then
we'll sort of write out the list of
exactly everybody's doing a great job in
the chat so we'll do that we're gonna
structure the lines based on who writes
there there are three chats so there are
three mister Destructoid emojis in the
chat first that way I can visibly see
very easily who wants to contribute
first of all because cold calling on
people didn't seem to work too well for
the text adventure so I'll call on
whoever wrote the three robots and will
write their lines their usernames out in
comments and that way we can see line by
line who's contributed to the program
right and if we get to the end of the of
the mr. destructors or whatever we can
call Pikachu again and get more input so
that was just a test because there's
explaining it so we're not that's not
gonna be the official set of user names
yet but whoever just contributed whoever
just wrote you're mister Destructoid's
in get ready for they for the next
Pikachu because what I'm gonna do is I'm
going to look for my Pikachu emoji in
the chat and I'm gonna go after that and
start pulling the name so anything
before the Pikachu I'm just basically
going to ignore Andre the ground rules
is as soon as I call Pikachu if you want
to contribute to the Python script I
need three mister Destructoid emojis
from you because I'm visually going to
use that as an indicator to see you know
who wants to contribute to the code I'm
not
not cold calling on people today just so
that I don't put anybody on the spot and
people maybe people are busy they don't
have time to come up with something only
people who are who want to contribute
all right
so hello guys Colton and Colton's hair
that's funny
I'm gonna go ahead I'm gonna call
Pikachu and as soon as I call Pikachu
I'm gonna put the list of names together
and then I wants the list of names or
put together we're going to one by one
line by line go through it and build up
a Python program so here we go ready 1 2
3
Pikachu all right JP guys first nice so
I'm gonna start putting together the
list so the JP guy whoops V ruthless V a
bishal Samrat 61 92 and murg mussalam i
apologize if i misspelled your name
so hussar just trying to make sure I
catch them all I'll do this just for a
minute or two we're not gonna have to oh
did I miss disco damaged I did whoops
that's my bed after disco damaged so
'has or injure hey why not 16 scared to
sign up for a line and I don't even know
what the program is we haven't decided
what the program is that's the beautiful
thing MRT and c/n mr. tank Thorne I'm
not sure at the time pronouncing the
name so we're really all in on Pokemon
just using it as an indicator for today
I guess
buta dog if you have a small problem and
it's not related to the stream just hit
me up off to the side but if it's
related to the stream feel free to feel
free to write it there in the chat bat
McKnight there we go
you're doing code lines chookies so you
will you will be telling me what you
want written down in the form of a code
line so you're gonna have to write the
code line out and mr. mr. tank thorne
wrote it again so we will we'll get as
many people as we can before we start
taking duplicates Luigi's in the chat
shin wang xuan is in the chat that's
already one two three four five six
seven eight that's like 1110 arts 10
literally tunnel it's written on the
left side of the text editor timelines
okay so if we want to start with 10
lines that's great okay shove a fish a
little cool shove H official oh one
that's 11 when there will be a stream
about problem solving checking code that
time I'll post my problem fine let's try
it now test run devil Abbey ship it this
is a beautiful program so far just a set
of comments I'm coding project 1 for
cs50 web while watching this awesome
bunny on run don't think they already
just didn't know okay no bugs
you know I that's true there are no bugs
in this oh there we go andres Andres
gonna take part nice cap 10333 and
pretty soon wool will actually maybe get
started on a on a script of some kind
now what we could do is we could just
jump into this completely fresh not have
any goal and just let people write
whatever they want which is totally
justifiable and totally chaotic or we
could decide on a goal we could say okay
let's all together code Mario or
something like that something along the
lines of speller would be pretty big but
we can say something like Mario and then
all work together on doing that but we
could try both of them experiment see
which one's entertaining right the whole
goal of this is to be educational
entertaining can we have a chat bot
today this is bunny on run I'm not sure
if you're referring to a bot that I'm
not sure what you're referring to with
the bot if you mean like if you're
asking the chat to code a chat bot with
you
I vote chaos says Ashley okay who votes
chaos who votes a goal project Euler
project Euler would be interesting
actually chaos people want chaos
everyone loves chaos alright
Oh somebody said go so how's our said
goal my goal is chaos well what we'll do
is we'll say we'll do chaos first and
then maybe a goal later and if this goes
well and if people enjoy this we can
maybe do this more frequently this kind
of stream and maybe expand on it add
more features and whatnot but I think we
have a pretty sizable list of people if
we run out of people who've contributed
lines will call Pikachu again and
whoever wants to contribute can
contribute but let's go ahead and we're
gonna preserve these comments because
these comments are gonna help us
identify sort of who's contributing to
the script and we can see you know who's
built what as we've gone on so JP guy
you set in the stage for this chaotic
script that we're running here so you go
first tell me what you it is like you
get blamed yes a 2d dominating hello
good to see you
so JP guy let's get the first Python
line and if you aren't familiar with
Python this might be more difficult if
you've volunteered to contribute okay so
we have a function a function signature
declaration check okay I like it so this
is a beginning of a function for people
who aren't familiar with Python so this
is interesting so V ruthless V and if
you by the way if you want to get out of
a block of an indentation block let me
know and then a T dominate yes I'll put
you down here at the bottom the rules a
T dominate are that I'm gonna call
Pikachu basically which means put the
Pikachu emoji in the chat and anybody
who wants to can
- this script needs to put three of
those robot Destructoid emojis you
should have access to it as a general
twitch user but V ruthless V let's get
your line as line number two and again
if you want to come out of the oven
ested block let's say we're in a
function you want to come out of the
function just specify oh one print what
oh we have the first troll today so we
haven't called the script the function
to be fair so while one print what
beautiful and I'm just gonna indent
these all nicely like that so there we
have our first beautiful function so
that's V dominate sorry V ruthless V and
now a bishal a bishal is gonna be the
next person to contribute so a bishal
let me know what you want to do to this
python script this beautiful python
script that we have so far actually want
to keep it on on this break okay so so
they have a break interesting now do you
want the break right here where do you
want the break AB Michelle can you be
more specific for me
they show up official says I see where
it's going it's kind of devolving into a
an infinite cesspool of inside the wild
okay
so the issue with that is gonna be we're
gonna do something like this because
that it's not possible so that semicolon
there I'm guessing that's where you're
what you're going for so we'll do that
so we'll say whoops today did I oh here
we go
so we there might be we might need to
specify a rule which is that you can't
have one liner loops and if statements
because that causes issues like this
where V ruthless V sort of put us into
an infinite loop and then we had to use
the same line with a bishal to correct
it I mean we can experiment with it and
see it and see you know where things
need to go but you know whatever it
works it solves the problem it's just
gonna get a little bloated I like the
idea of having one line per person not
like one line that's like conglomerated
that's multiple people are sharing but
you know good save on alba shawls on
abba shawls part so some route 61 92 if
I could get a a line of code from you
and actually why don't we say that as a
rule maybe so that we can keep people on
the same line keep people on individual
lines so we'll say this will say that
this is V ruthless and there we go this
air will do this bring this up here so
technically this is not one line from V
ruthless but where will retro actively
make it work so there we go
so some route 61 92 let's get your your
next line oh yeah I meet if you want to
contribute I'll put your name at the
bottom of the script here so meet
Microsoft India alright so some route 61
92 let's get a ok where would you like
do you want bit so here's the thing do
you want it here in the st. by the way
this indentation is killing me there we
go
sorry this indentation got messed up for
some reason let's bring that back there
we go
and we go and then some right ok so some
rot wanted the what was it oh okay print
chat is lovely now did you want it there
summer onto the tell me where you want
the because if you don't specify an
indentation like you want to come back
out of the indentation this is different
from putting it for example back here
why is this invitation being so terrible
there we go well at least I got the
console to print what once should have
thought about something funnier than
what lol choker kid says hello not
looking to participate but I usually
watch these videos on YouTube and wanted
to come here to say they're awesome
thank you so much if you feel inclined
to participate definitely definitely
consider doing it oh sorry I'll be tech
18 let me go ahead I'll add you be tech
18 okay so you want it you wanted the
chat is lovely line right there perfect
okay cool so murg mussalam let's get the
next line from you Lucas nothing says
add me okay cool can do that we have an
endless endless supply of people this
makes our chat easier to to prolong
certainly and if I if I missed anybody I
apologize just let me know actually if
you want to get added and I haven't
added you yet this is the this is the
way to indicate it exactly as true
Kinney said it's lagging a little bit
come on
there we go
if you want the if you want to
participate and I haven't added you yet
just write this in the chat the three
robots I can visually see that very
easily compared to reading all of the
all the stuff on the chat okay
Kade row boss and I believe we're still
waiting on so merge asalam did you want
to contribute to things add myself to
the list okay sure I'll add myself I'll
have myself right here down away at the
bottom
merge muscle um we need a line from you
and we'll time this out so we'll say if
nobody contributes a line within like a
minute then Oh true yeah that line will
never be well I asked I asked some rot
if you wanted as a lot he or she wanted
their line there so you know I they said
they wanted it there but yeah I think
technically speaking this is the only
way it'll actually be visible so we
probably want that we probably want it
there should add Colton's hair and call
them for us there are kind of people in
the chat that help explain the rules
true
I do appreciate anybody who's willing to
do that for me
I think we're still waiting on so murg
mussalam so what I think we might end up
doing is if the person who put their
line in doesn't end up actually writing
it I'll sort of take their name out and
put it back towards the bottom so we'll
do that well we'll just bring this back
down here so murg mussalam
can contribute a little bit later some
folks are gonna come in and out which is
natural so it's it's I think that's okay
disco damage though Europe you're next
on the line so give me your next give me
what you want the line to be and if you
want here's what what I think the so
disco damn is just writing a combo
statement on one line which is basically
saying if mario is great about
print the princesses save Delta print
sorry the princess is in another castle
the problem is that that makes it hard
for us to that give it that makes us
susceptible to infinite loops that we
can't break out of and can cause
compound issues that are hard to solve
so what we're gonna do is we're gonna
only allow for if you have an if
statement just the if statement so we
you can't have like an if-then a block
then in else then a block because python
could let you chain a bunch of stuff on
a one line so just one condition one
block one condition one block or a loop
header only that only that fear for your
bit of code okay perfect so another
thing what we're gonna need people to do
is specify their indentation because you
know I could put that line here or I
could put it here and those would have
two different effects so do you want
your if statement here or do you want it
back a lot back an indentation so for
the folks that are contributing from now
on if you're gonna give me a line say
either same indentation nested
indentation or back indentation so go in
stay at the current level or go back for
indentation just go damage says go back
for indentation so we're gonna say if
Mario is I gotta go back and read it now
greater than Bowser now some folks in
the chat already already told us that
this is gonna be a problem because there
is nothing defined as Mario or Bowser so
that's just gonna break the code we can
um we can add something we can add a
body to that if statement if so has or
wants to contribute so so hazor feel
free to contribute let's run this and
actually maybe test it so we can see
exactly what the problem is
but next line is so has or so so house
or if you're in the chat then let us
know true candy says can you compare
strings yes you absolutely could compare
strings 100%
that would be different a different set
of behavior than what disco damaged
ended up proposing cs50 equals 69 69
okay so cs50 equals 696 nine so that's a
legal statement though right that's
that's completely legal it's a it's just
assigning an integer value to a variable
called cs50 and it's a legal variable
name the only problem is gonna be this
bit of code here so what we can do is we
can actually run this code and I'm gonna
do that right now I'm gonna bring up in
my terminal and let's make sure I'm in
the right place so it's gonna dev
streams this is called chat codes Python
and then I'll just run test one dot PI
and you can see that here in the in the
terminal it's telling us python is
telling us hey the name Mario is not
defined like that's not a variable that
exists anywhere so we're gonna kind of
need to get away from that issue heart
approach I'll add you to the list of
contributors here so let's go ahead and
say that right here now let's add a new
rule people can propose an amendment so
here's what let's NSFW so we'll say if
people if you're contributing I want you
to write amendment like this and then
blah blah blah blah right so if you want
to correct somebody as line say
amendment actually here say amendment
line 7 and then blah blah blah blah so
this is a good good opportunity for
somebody who wants to fix our code
I propose import OS have fun chat G of
honey huh we are already in the global
scope yes as to what Merlyn said we are
already in the global scope any anything
any code that we write here is global
any variables we assign and so on and so
forth true key nice wants to contribute
again oh actually no did we didn't write
true Kinney's in here for this patch did
we we didn't oh wow
the true Kenny's true key nice was the
first person to propose code with the
original
macht batch but that didn't end up that
didn't end up going anywhere and then v0
elko so go ahead and write that so v-0
Elko
so who's the next person hey Y dot 16 so
sorry my network was bad okay that's
okay totally understand if you want to
propose a change Y dot let's go ahead
and let's go ahead and take your input
let's see what you can do if it's a
proposed an amendment or just keep this
awful sort of script and not to say it's
awful it's a beautiful script but it's
broken we need to fix it somehow so
hopefully somebody can propose an
amendment to how we can fix this script
can i play cairo 5 absolutely I'll add
you to the list so Cairo 5 we're taking
individual requests yeah do you know
those twitch plays dreams I absolutely
do this is actually sort of inspired by
that though less automated if this were
automated it would get pretty pretty
insane but I think it'd be interesting
to try it at some point
burn it says number do yeah three times
if you want to code a line
trucha nice I appreciate you know I
should have a bot that actually says
that true Keynes has been on top of
helping out I feel like it would be nice
to have a cool little bot that reminds
people how to how to do that because
that's that's pretty nice so hey why dot
16 if you're okay I proposed while one
should have less than or equal to okay
so that's fair so while one is less than
or equal to what
and ideally follow the the of sofas ours
has proposed from Lane six browser is to
line seven for Mario in range well one
is less than two this is Merlin yeah I
like that
[Music]
alright so Y dot said while one is less
than or equal to right as already said
less than or equal to and we're gonna
need less than or equal to something
right that needs to less than or equal
to
it's an operator that expects two
operands one on the left and one on the
right or reverse if you're looking at me
on stream Merlin proposed to so we can
use two if hey why dot is okay with
doing that
so we'll say amendment actually what
we'll do is amendments will go above
amendment less than or equal to hey Y
dot two or what was the name sixteen
probably what wat 1 is less than ten
okay one is less than ten so that's
effectively the same logic right it's
the same it's gonna do the same exact
thing a an infinite loop because one is
always less than ten and one is always a
truthy value while one basically just
means well true that we can effectively
think of it that way so Y dot proposed
an amendment here above this line so
awesome now let's go ahead and get
mister mister tank thorn if we can get
mister tank thorn to give us the next
line in the code be it an amendment or a
new line just specify where exactly we
want your code and and how we're gonna
use it break though we did use break
yeah break helped us get out of the
infinite loop thank goodness for a
bishal who proposed that for us Andre
you're gonna have to wait your turn I'm
afraid but definitely you can propose
stuff actually this is fine so if you're
proposing things in the chat that's
totally fine
I just won't consider it if your name is
not the current person just because then
it'll get chaotic and whoever can type
fastest sort of wins but you can use
that as maybe a way to get inspiration
so it's easy just don't run the check
codes Python function exactly you can
propose suggestions for people or write
stuff and people that are whose turn it
is can maybe fall on those suggestions
but we won't consider any lines unless
it's that person's turn so we want we
want fairness in this particular example
ganache has a proposal for line 8 we get
advantage on a nine with advantage I was
gonna call that fun lol you know we
could we could try that it would get
very difficult to it would be very
difficult to keep track of for me
because I would have to sort of like
constantly roll back up the chat and and
do stuff and it would get and obviously
people will stuff would be out of order
and they be writing over each other and
sort of writing on the same line
so that's kind of why we're doing more
they take a turn approach to the script
and proposing amendments so we'll see
but mr. tank Thorin is up currently well
we'll take just a few seconds and if mr.
tank thorn doesn't respond will call on
Babic for the next line so Babic is the
indeed the next person loner King tends
got into men pit line Oh Mario is equal
to heart emojis I like that
mr. tank thorn is not available okay
that's fine we probably have like maybe
1520 people in the queue so mr. tank
thorn we're going to take your name so
here's what we're gonna do instead of
rolling back names to the end of the
list where it's gonna delete names and
if you want to get added just use the
three robots again this is an experiment
where this is the first time we've done
this so this might be a little bit
sloppy until you'd build up a really
good system and demo pathos just to
write three robots in the chat since you
already wrote as much I will add you to
the end here that just makes it very
easy for me to visibly see who wants to
who wants to contribute so I don't have
to read every line and reread it and
just double-check that I missed anybody
I can very easily see the green big
robot on the screen so Babic Knight
Babic it's your turn let me know what
you want to add to the script if you
want an amendment if you want a an
individual line make sure to specify
your indentation too and remember we
can't do compound lines we're doing if
you're if you want an if statement or a
while statement or a for statement just
make sure that you only do the four or
the while or whatever don't
like a chained list of stuff just cuz
then it's really hard it's really easy
to fall into a heart to amend mistake
someone notify me in the chat when my
turn comes absolutely as Lutie i will
happily add you to the end of the queue
loner kington actually asked before so
let me go ahead and do that loner
kington and amendment line 9 if mario ah
there we go
Babic fixed the script so we're gonna
say amendment with havoc night
and so what Babic did is these are two
variables right now because they don't
have quotes around them any word that's
not a Python keyword is considered a
variable but we haven't assigned
anything to those names but what batiks
done is Babic has said okay instead of
that let's just say if mario is less
than cs50 right and so what that's done
is now we've taken what these are called
string literals so these are just pieces
of data strings and you can compare
strings against strings it'll basically
go letter by letter seeing which one is
less than the letter in the other word
so it'll compare the m to the sea the
sea is gonna be less than the m so cs50
is gonna evaluate to being less than
mario if they both started with the sea
it would go to the second letter of the
words and then therefore perform the
same kind of arithmetic so cannot and I
wanted to get added to the script so
let's go ahead and do that cannot so
excellently done by Babic night let's go
ahead and run our script and see what
happens and nothing happens and this is
good this means our script ran
successfully there were no bugs we
didn't get a trace back like we did
earlier because it said Mario is not
defined now our script just runs all it
does is if Mario is less than cs50 which
it's not then cs50 is gonna there's
gonna be a variable in this scope called
cs50 which gets assigned the numerical
value of 6969
so
nice amendment on batiks part we have a
working working script so next person
that we want to get onto the script ship
official oh one
let's get a let's get a suggestion from
you let's see what you got what are you
gonna add to this script let's make it
let's make it awesome I'm very curious
where we're gonna get from here print
different strings now where do you want
this sub so remember we're gonna we're
gonna assume that our cursor is always
sort of where our current line is so our
cursors here do you want it at present
indentation or do you want it back an
indentation those are two different
options those will have two different
results print different strings okay so
we want it I'm gonna assume that we want
it here in the current scope but this is
sort of where you need to be specific
because those have two different
behaviors right so shove official said
print different strings and I'm gonna go
back over here now I wouldn't
necessarily say that that logic is sound
well actually yeah it actually is sound
it is sound logic they are different
strings because because if they if one
is less than the other one they have to
be different strings so I correct that
statement it isn't necessarily the logic
doesn't necessarily test for different
strings as much as a test for one string
being of a different quality than
another string it's kind of like a it's
kind of like an over generalised
statement but it makes sense people
voted chaos cult and respected democracy
no this is this is uh I like this so far
I want this to be chaotic but we I want
people to also be specific about where
where things get put cool sort of
official thanks for the contribution if
we run this script we see that it
actually doesn't
different strings interesting why is
that is Mario actually not less than
cs50 oh no Mario is sorry Mario is
greater than cs50 so this is this isn't
gonna run right all right we said that
before but I had a brain fart it should
be not equals there this well if you
want to change that you need to propose
an amendment show so we're gonna have to
have somebody else decide on that
because you're you did this line so if
somebody wants to correct that they're
more than welcome to do so but it's
devil Abby's turn to propose a a change
to the script so devil Lobby what do you
propose that we change about our Python
script shup official saying haha yeah
it's you know we can we got to respect
everybody's contributions you know we
can't do we can't override all a you
know everything sort of haphazardly
captain 3:3 few things for the follow
anybody else's fault today apologies if
I missed it
much appreciated we had a ton of
followers yesterday as well that I
didn't specify ah there we go
devil of B is unsub side so amendment if
mario is not equal to cs50 so something
like that which is great so I'm going to
add devil Abi's name here to the
amendment list for this line and let's
save it and run it and we do indeed see
the different strings thing let's let's
do it you're missing a quote but let's
roll with it you know I'm also sort of
here to account for people's typos I
feel like that would be even I feel like
could be even worse to go full chaotic
and then take typos into consideration I
don't know if people want to want me to
be pedantic about like typos like that
it'd be interesting it could be
frustrating for some people to watch but
that's that's I mean that would
technically be programming so
have we reached the fifth amendment yet
no this is so far we're at three
amendments so bunny on run your turn
let's see what we got
Malik Bilal 1997 hello world good
evening sources I don't know where it's
going this is the beauty of this though
we don't know where it's going and
that's okay I think that's that's why
this is fun for the love of all that is
holy someone import anti-gravity it says
Andre hey Andre when it's your turn you
have every every right every prerogative
to import anti-gravity oh geez okay well
this is cool okay so bunny on run where
do you want that in the scripts you want
that very fancy I like the list
comprehension that also that the problem
is that we're using Python 3 so we're
gonna actually need to put a parentheses
around that but that should still work
it'll just print out the list as a list
if you want to do I think yeah I think
you would need the the print to actually
be in the list comprehension in the in a
specific place outside the if ok so this
is cool I like I like what buddy on runs
done a little bit more of an advanced
feature of Python of the list
comprehension but basically bunny on run
has said print a be for a in cs50 whoops
cs50 is and then Colton is and then
there's a space there and a space there
and then for be in great and then
amazing so very very flattering so if we
run this we will see that we get a sort
of a combination of the cs50 is great
and cs50 is amazing
they're cs50 Colton is great and amazing
we get cs50 is great amazing and
coldness great many ways in which thank
you very much for the kind words and
cs50 is very flattered as well I am sure
but this is the output of that so pretty
cool I'm a big fan of that you could
probably find a way to if you were to
map print to that you could probably end
up instead of printing the list itself
you could actually print the strings
themselves in a list but I would have to
is that would that be possible I think
you could do that you can do map with a
lambda on X for every X in that list
comprehension instead of printing the
list outright I think that would work so
that'd be cool but yeah very nice
contribution by Bunny on run thank you
very much anybody unfamiliar again this
is called a list comprehension and this
is actually a nested list comprehension
so to list comprehensions in one which
allows you to sort of do a two
dimensional loop over data pretty cool
andrey it's your turn what are we gonna
do andrey you're gonna import
anti-gravity i want to see it I think
the chat wants to see it but if you'd
rather do something fancy instead
definitely let me know and make sure to
specify where you want to import
anti-gravity to know we have to be
organized
this is entre all right Andre let's see
what let's see what you want to do oh
okay perfect light why wants to
contribute I apologize if I missed
anybody I don't think I did who wanted
to contribute to the chat so down at the
very bottom we're gonna say l1 ght
underscore Y so you will be after Knaus
if name is equal to main oh boy here we
go okay so Andre Andre wants us to get
more organized with our code so we're
gonna say if name is equal to a quotes
underscore underscore main underscore
underscore just like that boom so for
folks unfamiliar this is the way that
Python modules Python scripts sort of
check to see if they're being run as
main script at the command line or what
not so this is this basically is going
to get started and then whatever is
inside of here will get run if this
script is being run at the command line
so anything in here if this were being
used as a library file nothing inside of
here would get run so effectively all of
this stuff is kind of like the same as
if we put it in here for all intents and
purposes but you know we have it there
we have it there now as a formality our
script now looks more legitimate or what
have you
so captain 33:3 let's go ahead and get a
line from you very excited to see where
we go from here new line no indentation
input key is input def press f to pay
respect key okay interesting okay the
one thing is that this is going to break
but that's okay because there's nothing
inside the the if statement but will say
input key is equal to input def press f
to pay respect key I don't think this
will work
I think this I think this will just
break right because you can't have a def
on the same line as after an input
without a semicolon or but we're not
doing nested lines so I'm not sure yeah
we can't work captain we're not doing
nested lines so if you have multiple
things you want to do you can do this
for example so input key is equal to
input but to save us the the ability for
people to mess with stuff and to cause
hard to debug stuff it's going to we're
gonna just do single lines so you want
to do undo input keys input you can
revise your your line if you would like
chef says this is gross yeah but that's
kind of the point
that's uh okay just input okay great so
input key
gets input so that what that's gonna do
is if we run this script now well first
of all it's gonna break because there's
an indent we're not
there's no indentation block here with
any information so Andre said if name is
equal to main and then Python expects
there to be some stuff here if there's
nothing here it freaks out because the
next thing that it sees is this line
that's at the same level of indentation
as that if statement and that's an error
in Python there needs to be an indented
something here even if it's just pass
like that right so we're gonna fix that
at some point if anybody wants to be the
person to fix that but ATT dominate you
are the next in line so let's get a
let's get some input from ATT dominate
amend line 19 pass and that's not even
an amendment honestly that's just
that'll just be your line so we'll go
ahead and we'll add that here actually I
realize for consistency this needs to be
like that and I put bunny on runs name
up above here just because it's a very
long name but for the shorter or a long
line of code but for the shorter lines
of code we'll just we'll just put it off
to the side so people can see at a
glance who contributed we've got a lot
of contributors so far today
so now if we run this code this should
work so this is great notice that it
didn't end the script right we see the
bunny on runs list comprehension printed
out to the screen but the the console is
sort of still polling because well we're
still we're checking for input that's
that input yeah that's that whatever we
called it key is equal to input input
key is equal to input so I can type
something press Enter that'll assign it
to input key but now we've ended the
script so the script is all over so
sharp official wants to do another
contribution that's why it will take
more contributions as people want so
we'll add that I apologize if I'm not
completely spelling that correctly but
that's great so the script works we're
in a working State the next person to
contribute is going to be a meet
microsoft india so a meet let's get a
let's get some code from you Bastien
gaming thank you very much for the
follow hope to see you contributing to
our awesome Python script char easy
hello good to see you anybody who wants
to contribute again three robots we need
three robots Noma wants to contribute
perfect I should have a bot a twitch bot
that says that just on a every few like
every minute just will like say if you
want to contribute right three robots to
the screen I think that would actually
be pretty pretty easy to write Bastion
gaming go ahead and add you thank you
for the contribution hacker vector hello
good to see you so I'll meet Microsoft
India waiting on you for the next line
of code ed you scorpion one alright
let's get you in there edge you scorpion
one sort of laying the train tracks down
as we as we move along
what are we contributing to I don't know
everybody is writing the script one line
at a time and we will get where we get
if you want to contribute right robot
three times thanks to the true key nice
for very graciously reminding folks how
to write how to get involved how to get
added to the list I believe it is called
an exquisite corpse hacker Becker I got
you
hacker Becker let's get you in there
share easy thanks very much for the
follow so I mean Microsoft still waiting
on you if we don't get a line of code
from you within the next few seconds
we'll go ahead and we'll bump you off
the list but you can you can get re
added if you write three robots later on
but we just want to keep this moving a
little bit and I apologize for anybody
who has a slower internet speed and may
not be able to keep super well up to
speed with what we're doing I know that
some folks are watching from parts that
don't have the greatest internet I know
that some folks I've mentioned as much
in the chat before so my apologies if so
but I'm not seeing anything from a meet
so what we'll do is we'll take a meet
off the list but you can come back later
I mean if you're if you're
understand if you're not understanding
if you're if you're listening and you
want to come back and add a line later
on definitely toss in some robots into
the chat I'll be tech 18 you're up next
let's get a line from you let's see what
you want to how you want to influence
this amazing script that we have going
on here hooray finally my turn you know
I think we are going a little slow but
it's um I think we're going faster than
we would be going if we were kind of
doing uh if we were doing this an
automated system my line is print
machine learning is great okay I'll be
tech do you want that just right here
happy to do that print actually let me
just go ahead and print machine learning
is great this is gonna be a beautiful
Python script when we're done with this
it's just gonna be all over the place
touching all realms of computer science
home so Gayle fall I got you and lest
anybody think that it's a sip maybe a
silly rule for about the robots it just
makes it really easy for me to see at a
glance
I'll have the chat you know a nice big
window but it makes it really easy for
me to see when people want to contribute
and so if I add a glance see those three
robots I know Oh instantly okay that
person wants to contribute I don't have
to read through the script all of the
chat and say who hasn't contributed yet
who should I add so it just makes it
easy it's really nice to see so a BTech
18 thanks for the contribution
Lucas nothing Europe next what okay
great awesome my line XD is going to be
equal to input of what are you doing
alright that's beautiful let's go ahead
oops and add your name here like that
okay so let's go ahead and see what we
got so we're gonna get an input which is
just you know I can write anything so
I'll just write blah blah blah
learning is great what are you doing
live coding on Twitch cool and that's
the end of our script so we have we have
something going on right it's it's
coming along it's it's it's it's moving
we've got input from the user we've got
output we even have a main function like
a main sort of predicate here
interestingly which we're not using if
name is equal to main then pass right so
it's alright but it's coming along it's
coming along hedge row boss you're up
next
so kid row boss let's get a line of code
from you what do we want to what do we
want to contribute Andre wants to
contribute again so happy to do so Andre
petal in and then head row boss wants
another wants another contribution later
on I can absolutely do that so Kendrell
boss says amend line 19 to say wait
amend line 19 kappa call the function
kappa am I reading that correctly like
you want to so amanda line 19 do you
want to say this just like that
yeah the if predicate is just right in
the middle of the script it's not at the
end it's not at the top it's just right
in the middle Oh Kendra boss wants that
inside the okay got it
okay cool so kappa we're have a cap of
function that's our main function so
we're going to we're going to actually
write a name end here like amend and
then that's going to be ked robust
beautiful so very very nicely done
catch robust very nicely done now some
folks might be curious so the fact that
we don't have a kappa function and we
don't have a capital function that needs
to be written by somebody so somebody
needs to take it upon themselves to
actually make that a reality
so we'll say transmuter is gonna be
added to the list and then at Aker foo
if i'm pronouncing that correctly
apologize if i'm not our list is growing
so this is this is
this is becoming very exciting so the
next person is me I'm the next person
Wow I can't believe it I'm the next
person this is this is a lot of pressure
how do I make this script better than it
already is it's a it's a tall order but
we'll say my contribution is gonna be
just because you know hedgerow boss
kindly added the cap up function call to
the script but there is no cap of
function so I'm gonna actually define
the CAPA signature and it's up to the
chat to decide how the CAPA function
actually runs what it does but I'm the
person who sort of I guess laid the
first stone for it so you know you all
have me to thank for that
Ilia vr5 let me go ahead and add you to
the list
illy
your five fantastic so that's my line
Mirjam assalaam we're back to you and
actually murg mussalam was we added more
muscle um to the end of the list because
they didn't can they didn't add anything
to the chat so bert muscle um if you're
in the chat I'm gonna give you just a
minute but if you're in the chat feel
free to contribute now but if not we
might remove this name because murmur
salaam was somebody who wasn't
responding previously and then : / Oz
I'm gonna add Jim and the choke go kid
21 gonna add you there at the bottom as
well so we'll give just a few seconds to
murmur salaam and then we will go to
heart approach so hard a proj
you're next if murmur salaam is not
still present in the chat and then shout
out to david says welcome back everyone
david has this beautiful script he can
look upon that the chat has kindly
written throughout the course of today's
stream including this beautiful this
beautiful list comprehension that bunny
on run contributed so you can do a lot
in one line in Python it's pretty
impressive but you'll see that we have
this amazing main declaration here on
line 17 right in the middle of the
script not not at the end not the top
just right in the middle and you know we
have global stuff at up above that
global stuff below that it's a it's a
it's a festivity it's it's a real good
time
so moving muscle um I don't think is
present so we're gonna go next to heart
approach so hard approach it's your turn
or all of everyone is waiting on you so
intently for this amazing new line that
you're gonna contribute clown festivity
Merlin says Oh David does David want to
contribute a line to the script that
would be I think people would love to
see that we have I'll just kind of go
through the script if David wants to so
David can either I don't know if David's
gonna actually David may not be tuned in
for too long depending on if he's busy
at the moment but if you're if you're
present David and you want to contribute
you can propose a new line or an
amendment to an existing line but you
can only do one line and it can't be
compound
those are the rules of the stream so
we'll let that well let that offer hang
if David's present or not and then in
the meantime heart approach if you're
present the next line is all you and
again if we don't get input from heart
approach after a minute or so we will
we'll say go on to the next person and
then maybe heart approach can come back
in the future folks are gonna come in
and out that's natural that's normal
completely expected what do we have
David to the list well let David have a
come in at any time whenever David wants
to contribute because I know David's
probably got stuff that he has to do but
it's PI game installed PI game is not
installed no ma
but this foundation that we're laying
for this stream could very easily be
extended to making a game we could do
this in love for example where I sort of
help the stream create a game in love
one line at a time absolutely possible
but that's going to I think take a bit
more practice with this experience with
this and then we can maybe go over some
ground rules and some very basics of the
framework so that everybody kind of
knows how they can contribute Zelan mode
thank you very much for the follow and
then share easy put in one robot so I'm
expecting three robots share easy but I
will I will assume that you mean that
you want to get added to the list so I'm
gonna add you to the list just right
there now harder prize did not
contribute anything in that span of time
so we're gonna remove the name again if
your name gets removed you're not gone
forever you can at any time put three
robots into the chat and we'll put you
at the end of the list again for the
next for the next line that you want to
add now chuka nice it is your turn I
know trucha nice has been very active in
the chat so I'm confident trucha nice is
going there we go
tricky knees before I can even finish my
sentence so true Keaney said first line
of code okay so we're gonna go up here
time sleep 5 boot
five boot time and we're gonna go ahead
and because they wanted to add a comment
to it we're gonna put their name above
that so we'll go ahead and say up at the
very top time dot sleep five now it's
gonna cause a problem and we'll see why
if we just run this way actually
expected end of file while parsing line
54 did we have a new block oh yeah
because we didn't define the function
yet so we're gonna need to define the
function check if it works amend so
vocal wants ok volcko is the next person
and they are already on top of it
so volcko wants to amend deaf kappa
return Oh God and in a recursive
function oh man this is beautiful
okay so we'll see what happens when we
do that so return kappa so everyone has
volcko to thank for this amazing
contribution so thankfully oh actually
we are calling it so this is gonna be
horrible so rip stack is correct so but
we can't even get there because like I
said we had a problem with true Kinesis
line and that is that time is not
defined so someone's gonna need to fix
that someone's gonna need to fix the
fact that time is not defined and then
person who I think is most appropriate
to to do that is Cairo 5 so Cairo 5 this
all hangs on you how are we gonna fix
this script that we have in front of us
kay function Luigi has a cape function
link in the chat would have to take a
look at that
I don't remember offhand what a cape
function is fabric coder I added you to
the list you are set to go
so Cairo 5 how are we gonna fix this
problem you can either add new code or
we can fix the existing issue so we can
see the extravagant catastrophe that's
about to unfold when we run this
infinitely recursive main function this
kappa function and it's appropriately
named
honestly because it's the ultimate kappa
it's the ultimate sort of troll move
right game killer 48 consider it done
and a reminder to anybody who wants to
get added do add three robots to the
chat so I can see at a glance because I
may miss I was able to read game killers
chat but if the chat starts getting
stopped it off
I might miss somebody's requesting it
added and I would hate to do that I
would hate to miss somebody's desire to
get added to this amazing stream we have
going on so far so again Kairo oh five
waiting on you for the next line oh dear
that is that is a line if I have ever
seen one it actually got flagged for
aggression if you can believe that which
is kind of hilarious so oh boy I don't
even know if I'm able to type that but
Kyra where do you want that place do you
want that just placed here right at the
end of the script or do you want that
placed in a specific location I'm pretty
sure that that is going to just destroy
the yeah that's just going to destroy
the script it's just like a crazy
computation it's gonna x squared 4x and
the range Y for y in the range Z for Z
in the range of 1 to the power of a
hundred times 1 to the power of 100 and
that is is going to brick my computer
but we'll see what it looks like end of
the script ok excellent so rip LOL eyes
got the ribs in the chat all right so
print string of boy x squared for X in
the range of Y for Y in the range of Z
for Z in the range of int of 1 to the
power of a hundred man
time's the nth value of 1 to the power
of a hundred okay I think that that's I
think that that will work it's pretty
honestly I need to shrink this down just
like keep track of where we are okay so
that's gonna be Cairo Oh fives
contribution if somebody wants to amend
commenting out that line of code to save
us the struggle that might be that might
be justifiable at some point but no this
is great this is that's an amazing list
comprehension and just an illustration
of how crazy you can get with less
comprehensions and how deceptively
computationally intensive they can be if
you're not careful with them I've heard
of defensive coding but never aggressive
coding yeah this is aggressive they're
very aggressive coding but is it a
mistake because e to the 100 can't be an
int value I think it can technically be
an N value in Python right because it's
because pythons int objects basically
have infinite range not I mean like
you're right obviously not literally
infinite range but I mean off the top of
my head I don't remember but I know that
they have absurdly high numerical range
so I think they can definitely store a
hundred a hundred digits but I am not a
hundred percent sure you're gonna have
to we'll have to test it out actually
but Cairo 5 thank you very much for your
contribution but if we run it we're
still not gonna get there because again
time is not defined so somebody needs to
define time so that true Kinesis line at
the very top can actually work so the
next person in charge of continuing this
amazing script is demo pathos who says
hello everyone just in time so demo
pathos it is all on you what
contribution time is subjective time is
subjective demo pathos
let's get you involved and chuka nice
thank you so much for being on top of
actually calling people when it's their
turn to write code that's super helpful
really appreciate that
should we wash hi can I contribute
absolutely
Colton streamer dude is taking user
input for cut okay so following is my
line of code so I'm gonna need to read
this so also volcko has a request to add
volcko and who require who wanted to
contribute Sri wash who asked yes
so just cuz I happen to catch it sweet
she wash so let me read this line okay
so demo path o set insert above line 1
oh boy so print ok print input is going
to be equal to oh boy parsing this okay
so this is gonna be import random dot
choice okay so I know the random choice
library and this dunder method for
import I'm guessing just calls the
import function that we normally use so
we're gonna import the random module
we're gonna call the choice method on it
between the prints and input okay so
those are two functions print and input
I can't read it that's a comment or a oh
I see we have a chance okay so what he's
doing is he's he's randomly flipping
between in between prints and inputs is
that one does the other oh this is chaos
but I love it here we go import and
potentially actually not one or the
other potentially it could be one that
one could be both which is really cool
and crazy and potentially gonna break
the crap out of our Python script but
we'll see what we can do with it so
we'll take import of random choice on
print and input I love that not needing
to import anything because we've done
him we've done sort of a an inline
import using the underscore underscore
import method so now print and input are
gonna potentially be shuffled in theory
they could be the same they could be
print and input they could be both they
can be both print they can both be input
they could be flipped or they could be
normal so this is all this it does is
chaotically change how our script
operates so we may need a amendment to
the script at some point in order to not
completely destroy everything but
excellent line on behalf of demo pathos
in terms of an educational line I think
something that'll maybe inspire people
to get creative but if we run it we
still don't have time to find so we
can't see all these amazing features
that we're adding to the script because
time doesn't exist time the module has
not been imported so somebody needs to
do that Dersim ro3 I got you because I
know that you want to be added so I'm
gonna go ahead and do that
curse Morrow three and did I miss
anybody else evoke oh I added you and
shoe wash cool Oh Luigi okay great let's
get Luigi in there
Luigi marelli TW please someone to find
time who's next who's the next person
whose shoulders loaner Kington loaner
Kington if you're around if you're still
here loner kington please for the love
of the stream everybody's begging you
import time on line one yes import line
it's happened so thanks everybody
thank loner Kington for their amazing
contribution to the script they've saved
everybody and in reality what they've
done is they've actually screwed us all
terribly by letting us run all this
bizarre
raise the infinite stack overflowing
code sack overflowing and heap
overflowing code but do list
comprehensions allocate on the heap I'm
assuming they do maybe not they might
not get on the stack I'm not harm
percent sure somebody who knows offhand
maybe maybe chime in with whether that
contributes to or whether the Alec gets
on the stack or the heap but here we go
this is gonna be absolutely a mom
already know but it's not gonna be
pretty
so we're gonna run this so we're just
gonna we're just gonna sit for a second
and enjoy we got different strings okay
did that actually run everything okay so
we've got two different strings oh I
think different strings different
strings is now a is now an input maybe
it might be it might be an input so okay
so blah blah blah okay yeah
print is now input so every time it
prints out a line of code it's waiting
for me to type something Kappa is not
defined because Kappa exists below oh I
screwed up I put Kappa below the main
declaration so does somebody want to
suggest how we fix that we can't call
Kappa if it's not in the right place as
ly it's your turn what do you propose
that we do not our fault true whose
fault was that anyway I don't know it's
not like there's any way we could
potentially look at the at the history
of our of our code and see who might
have written that that line there I mean
who knows who wrote that line of code it
could have been anybody I clearly think
that you know I haven't done a great job
of keeping track of who wrote the of who
wrote the line you know but somebody
somebody clearly put this this Kappa
function declaration here yeah and
what's the Ben David it was probably
David I mean nobody there's no way to
know there's no there's no line here
right I have no idea no it was me I
screwed up
I wrote Kappa below the if statement so
Python goes top-down so it's gonna go
through the script and it's gonna come
down here and it's going to look for you
know it's gonna say okay if name is
equal domain called a Kappa function but
the Kappa function hasn't been written
until below that so it doesn't know that
it exists so we need to actually move
that up somehow we could do that or we
can move main down as this has come down
to me after Kappa is fixed ooh
as Lee we might have to wear a might
have to bumpy to the bottom though are
you sure you don't want to contribute
something now sure easy is leaving and
wants to leave the code probably tell
people what to do in this case I'm a
Jeff is now following line 26 deaf kappa
okay there we go
oh we're gonna deaf kappa inside of main
okay we can do that so let's go ahead
and say as leety deaf kappa cool awesome
nicely done as lee if pineapple pizza is
greater than other pizzas cs50 is equal
to a thousand pineapple pizza will be
greater than other no LMNOP yep
pineapple pizza will be grad to do the
alphabet over in my head again p does
come after o so pineapple pizza is
greater than other pizzas so in that
case it will work for your benefit JP so
we have the kappa declaration is now
here we are now in an interesting
situation where we can actually get
around our Stack Overflow issue by
having a declaration that is different
than they Stack Overflow declaration
that somebody else wrote earlier which
was volcko so
nice top on Ashley's part cannot it's
your turn oh and also true kinis sure
he's leaving wants to leave the code
probably tell people what to do in this
case char easy if you're around
we'll take if you're gonna leave we'll
take your I don't want to extend this to
too many people because this could get
chaotic as people are trying to leave
and maybe people say that to get their
code put above other people's if this if
their name is far enough down I guess
but yeah sure easy if you're still
around I'll take a proposal from you and
then we'll we'll take you out of the
list down here where your name currently
is I just tuned in how does this work
we're writing a script only based on
what people have contributed in the chat
so if you want and chuka nice has been
awesome this whole time and has been
saying if you want to contribute write
robot three times so exactly that so
right the that what does that called
discord bot or whatever that thing is
three times share easy sis not exit
bye-bye
where do you want that share easy do you
want it at the top you want at the
bottom do you want to a specific line
where would you like that located
also this has been an amazing stream so
far we've got a ton of mr. Destructoid
that's it that's it
I'm such a new middle anyway I can't we
can't do anywhere sure easy you got to
tell me exactly where you want it I I
need that in a specific location I am
merely a vessel by which the chat is
writing code today I need a line number
sir easy I need a line number where do
you want it just give me a little all
the line numbers are right here
38 beautiful thank you very much so
right here we're gonna get sure easy to
write sis not exit bye-bye
beautiful thank you very much char easy
if you end up if you end up leaving
thank you very much for the excuse me
for the contribution I appreciate it
I'm curious if we'll actually end up
getting there because I I'm not sure I
guess we stand a hired well actually
well some we have to fix our infinite it
depends on how we address the kappa
function that we've now overridden
inside of if name is equal to main but
we'll worry about that as we get to it
cannot cannot it is you it is all you
grim Walsman sup
[Music]
nizzle got uo3 robots let's go ahead and
let's get a let's get nizzle added to
the chat if VAR time is equal to 5 so
cannot conacher's the next script
contributor so favorite foods is equal
to pineapple pizza we might need to
start having line numbers honestly so
cannot what line do you want that
located on if you could if you could do
me a solid favor and as li ends le mo
i'm going to add you to the bottom here
so as li and Zell in mo and if you want
to just get riad 'add to the end of the
list assuming that you have when you're
adding a line you can just add three
robots to the end of your code like
somebody else has done and I'll just
take that to mean use my line and then
add a add my name again to the list what
we can absolutely do that the time
twitch installed Jen - that sounds
reasonably painful loaner kington okay
got you so again to repeat it if you uh
if you add if you give me a line of code
and you want your name add it again to
the list just add those three robots to
the end of the line and if you're new
and you haven't added a single line of
code and you want to get added to the
list
just the three mr. Destructo and emojis
that's the way that I am sort of
visually seeing that you are a
contributor who wants to add something
to the list
oh did I screw that up loner oh I'm
sorry so sorry loner King tin as in tin
the metal
coltan you could add a comment a command
and contribute to the night bot so it
answers right that times three if you
want to contribute Oh interesting
I would love to figure out how to do
that actually that'd be super great and
then that would give trucha nice more
time to actually write code because I'm
sure true kinis wants to write more code
B's they're doing such an excellent job
of just being a helping moderate the
chat what did they say line three
transmuter cannot said line okay line
three
so let me sorry it's getting a little
bit chaotic which is great favorite
foods favorite foods is gonna be equal
to it's a single item just pineapple
pizza Dan coffee with cs50 would be very
pleased I'm gonna go ahead and add your
comment your name to that line right
here so I hope this so far this script
is everything that everybody has ever
dreamed of when it comes to a
collaborative chaotic programming
experiment light why it is your turn now
we are all looking forward to this
amazing beautiful line of code that
you're gonna add to us add to this def
deja vu if import OS top 4 greater than
0 return deja vu crow NOx we're not
doing compound statements but yes that
would forkball my computer so probably I
probably would not do that just because
I want this to work
but in theory that would probably that
would probably work we can do we can do
infinite like Stack Overflow type stuff
but I'm probably gonna try not to fork
bomb just because that might shut down
my computer or screw it up in some way
that would be chaotic like too chaotic a
little too like chaos is good but to
chaos too much gas might be bad
I do SG GTS o4 and just joined what are
we doing here if you want to add some
code just add three robots which you've
already done and we're just writing a
chaotic line of chaotic Python script
nobody knows where we're going with it
so we're just having fun
and so far we've gotten a pretty good
amount we've almost gotten down to 50
lines roughly including comments so it's
a good time light why have you
contributed oh if input key is equal to
mr. Destructo eight times three and
where do you want that line of code
light why can you give me a line number
you want that on presumably after input
key is assigned which is on line 35
forty fifth line okay got you
perfect so we'll say if input key is
equal to mr. mr. Destructoid times three
now the thing is this isn't actually
being rendered in twitch chat so people
like I would in order for this to
actually work I would have to type the
literal string mr. Destructo a the space
three times in order for that condition
to evaluate true in my CLI so this isn't
integrated into twitch if anybody's
curious in the hell of we know no one
knows it's complete chaos yes that is
the fun it is a lot of fun so thanks to
light Y for this line of code so we're
gonna go ahead and just write that there
let's go ahead and indent all of these
just cuz they're a little bit close so
we we have that there we're back to
shove official oh one is your turn to
add to the script and again it helps a
lot to see it helps a lot when you give
me a line number if your if your code
depending on how sort of out of the blue
your
is so give me a line number maybe start
giving me the line number in the form of
you know like number line number and
then blob up and then that and then the
code and then possibly three
Destructoid's something like that so you
wouldn't literally write line number but
that would be a number oh geez now cap
please add mic oh ho oh man I don't have
access to the twitch I don't have a
shovel on this computer to copy that
string over so will I be something that
I can type myself feasibly I think also
because I have no idea what that b64
decode is so yeah if you put it in a
yeah I don't know I'm disinclined to
maybe do something like that I think
that would that could maybe be a bit too
crazy I'm a Jeff I like the idea but
it's interesting also meow cat now cat
you haven't even been added to the list
I don't think so if you want to get
added to the list I can add you but
you're gonna I'm gonna need three robots
from you so I can verify that you want
to get called on and then also back on
to show official it is your turn have
you added code inside Kappa okay cool
so inside Kappa inside of arm I'm
assuming you mean this Kappa so we'll
say four for item in favorite foods and
then this this line let's indent all of
these a little bit
so this one is shove official oh one
just like that's got a couple of
contributions from shop here that I see
which is nice so we have that going so
we have a function inside of which is a
for loop so for every item in favorite
foods something is gonna happen people
like what is that to the to the base64
decode thing who knows could be anything
I'm gonna go ahead and add we got some
new contra contributors to the chat
closet Slayer and guram ro3 ger samara
we've had put the code in a paste bin
that's true meow cat wants to contribute
and then trucha nice there we go
trucha nice has been a while since we've
had you I know you've been very
graciously helping keep everyone on
track which has been fantastic Noma it
is your turn so Noma if you would like
to add a line of code to this I love
seeing all those robots I love how many
people are interested in this so shove
let's get you involved again Walsh nyan
I got you as well shove official oh one
and then again I apologize if I if I
misspell this I will try not to Walsh
nine I got you did I miss anybody var
add coke right above shove official vara
Kolk and super apologize if I miss your
if I even still miss your name so
definitely let me know if I missed it
and I will try to add you where your
slot is but noma looking at you so line
for pizzas okay so pizzas is gonna be
equal to pineapple pizza pineapple pizza
pepperoni pizza and margarita pizza
fancy this is a bit of a long line so
I'm actually going to put your name
above it just for your readability
so we'll do that that's no miss
contribution so we have another a new
list of pizzas favorite foods and then
pizzas so this is great
pip install pandas Arduino monkey I I
guess we could do something like that
well we'll keep it vanilla and let's say
let's make for the next stream we will
for the next stream we'll get into
installing libraries well it will evolve
it to the next step I'll say that twitch
can install we can install libraries and
we'll do it in a virtual environment so
we don't install things globally but
this will be very it'll be very
interesting ok fantastic thanks so much
- Noma Bastion gaming it's all you all
on you right now Bastion
let's pops errors yeah let's let's
actually run it - to gala fools point
let's run the code right now ok so
here's the problem
we're usually constantly in a state of
errors but on line 36 which is our
capital function the well rather the
issue is that we have this block here
then the four-item in favorite foods
it's expecting something inside that
indented block that's the way for loops
to work in Python and because there's
nothing in there in that indented block
it fails because it gets out of the
indented block and goes to the cap a
function call we don't we don't want
that we need to fill in that for loop in
order to get the in order to get that
error to resolve so if anybody wants to
find a way to fix this bug here in on
line 34 definitely let me know but
Bastion gaming it's all on you over the
system exit if ok system exit if X D is
equal to input key equals X D :
interesting so something like this is a
little bit tricky because Python in
three point I think I have 3.7 installed
I don't think you can do nested
assignment like that in an if statement
but that's a three point eight feature
that they're coming out with so if I'm
not mistaken that should just break but
we'll try it out will say if
xD is equal to and then input key is
equal to XD which would mean we need to
indent this that should break because
this bit here is a basically an
assignment within an expression that's
in an if statement and that's a feature
that Python does not have that languages
like C and Java do have in C++ but I
could be I could be misremembering that
could be in a different context but it
looks like it's not oh actually it looks
like it's working okay so maybe I'm just
maybe it has to be only within this if
statement that it causes problems oh no
actually sorry it's because this is
after it's after the if it's after this
block which is breaking so that's that's
what um that's that's a that's why we
haven't detected the bug yet but we will
see it when we get to it all right
so Bastion gaming contributed that so
we're gonna go ahead and add that line
right here excellent let's go ahead now
the next person is edgy scorpion one
edge of scorpion one your turn what is
the next line of code that you want to
add to the script and now folks in the
chatter are kindly putting in
suggestions if your name is not
currently the active name we will not
consider it for the current line but
you're welcome to to suggest things in
the chat as much as you want and then
maybe other folks will start will adopt
the line that you've proposed it just
won't be added at that exact moment in
time that you suggested we're doing
things in order just to give everybody
some fairness and to kind of have a
little bit of a little bit of system to
our chaos right making a little bit
systematic but we'll see how well see
how things go
can we import packages yes we can import
packages we are allowing that so we did
import time at the very top which solved
the issue of time sleep which is here
and now we're currently blocked at this
which is for item in favorite foods
indent and then you know do something
but there's nothing to find there so
it's just breaking the script so and
then meow cat thank you very much for
the host much appreciate it
so edge of scorpion 1 did we get a ok
inside of main deaf kappa print item
okay
instead of main deaf kappa ah here we go
print item now to you too you probably
could have been a little more specific
because I could have interpreted that as
print item here right because all you
said was inside of deaf kappa you didn't
say inside of the for loop in deaf kappa
and so these are the kinds of things you
need to be really careful about when
you're expressing programming right
because the difference between these
these two lines is very big right this
is an error and this completely fixes
the problem with this with this block of
code so I'm gonna assume that you meant
this block of code but very easily could
have been the other one and that would
have broken the code so I'm gonna go
ahead and put your name here as a
contributor just like that awesome do a
space there just for readability and now
let's rerun the code let's see if things
are working I'm gonna run it oh and so
indeed Bastion gaming's line of code
does have some invalid syntax now would
anybody like with the next person that
is the next person that is up which is
hacker Becker would you like to propose
an amendment to line 46 would you like
to prepare you don't have to propose an
amendment we can keep the script broken
but in order for us to continue this
script we're gonna need to fix it
so yeah code line numbers help a lot and
also just being more specific about
where you want to put things line number
one import this alright I can dig it
import this so what this should do is
give us the zen of python
sort of spiel so we'll see how that
we'll see how that turns out when we do
that just like this and it didn't work
so I think it's because we have us
because it's parsing it it's not running
it and so we're still having a problem
but you know we'll figure it out when we
get there so Galle full as true Kenny's
kindly said you are next Adam we are
making whatever the chat wants to make
this script is completely it's like our
text adventure it's just kind of all
over the place it's pure chaos if you
want to get added to the list of people
to contribute code you can type in 3mr
Destructoid's like hacker becker just
did and that will that'll get us into
they don't get your name added to the
list of people to to contribute so edgy
scorpions things solve the problems
please where it's all in the chat chats
gonna have to solve the problems X Polar
dreams I got you added X Polar dreams it
could add code spaghetti two favorite
foods hey that's that's there we go
Gael full once one add it as well so a
gale full of got you amend line 28
changing a be to a + b line 28 is a be
oh boy
okay a beat oh actually oh actually that
will I think that will fix it Wow nice
solid well done guilt full that's cool
and now we can't see it because our
script is still broken we need to fix
the bug hello Thais no we're gonna see
you so what we need to do is so Galle
fall I'm gonna write that you amended
that will say amendment Gael full and
Andre it is Andres turn Andre it is all
on you can we fix this mess of a crazy
program
that's been a ton of fun honestly can we
get it to run all the way through that
is the question can we get it to brick
my computer because it at all it is as
soon as we get to line 57 it is going to
destroy my computer can we get to line
57 that is the question
now there is an empty loop an empty if
statement on line 54 that we need to fix
and there is a is that is that actually
still the problem no there is an
amendment that still needs to be made to
line 48 so we'll see if we can we'll see
if we can get this to work
foodie or food he I'm gonna add you
pudding got it alright footie your added
def Ackermann function a b haha i don't
remember offhand what that is I've heard
it I've heard the name heard the word I
forgotten it Andre the world is keenly
waiting for your amazing contribution
what do we have oh can I see the for
loop absolutely
well actually which for loop so there
the for loop is fixed what we the two
bugs that we have okay so there's this
for loop here there's the list
comprehension that Bunny on run created
which is here there's the there's the
crazily complex list comprehension that
Cairo wrote that's going to destroy my
laptop when we get to there oh the
Ackerman oh the computer file did a did
a video on the Ackermann function i
watch that yeah yeah no it's super
fascinating yeah we'll stop taking names
don't know how long the stream will go
yeah probably pretty soon so far it's
it's having a good time but I'm a Jeff
removed my name got to go I can do that
can you remove other people's lines you
can amend them so proposed a way to
amend them I don't want to be able to
remove outright because I feel like
that's kind of unfair to people but
amending certainly I think we can
probably change lines enough to
our way out of problems we should
probably start fixing coats it runs by
the end of the stream yep probably
should hopefully somebody has the
ability to do so how many years have I
been coding
I've been coding for about fourteen
thirteen years a good amount of time
sgts and who said to remove their name I
forgot I'm a Jeff and SG TTS I can
remove both of you absolutely I actually
don't have a sgts right here and I'm a
Jeff Dunn
I appreciate the folks that are telling
me that they're leaving to remove their
names that speeds up the stream a lot
makes it more optimal so thank you very
much it's a very courteous thing to do
Andre what did you write Andre amend
line 57 if false in front of it 5700 man
I love it if false Wow look at that so
what we've done what a what a killer
move from Andre how brutal - by the way
saving my laptop such a such a hero a
knight in shining armor Andre Petelin
much appreciated so you're saying I need
14 years to come anything close to you
absolutely not I have not spent those 14
years optimally in terms of how I've
been how it could have been coding I
have a ton of interests spread across
all sorts of domains not related to
programming and I spend my time amongst
all of them so don't you absolutely do
not need 14 years to become proficient
at coding I'm not even great at coding
you could get very good in a very short
period of time if you just dedicate
yourself to it just be focused and make
projects and and choose what you want to
do in and really hone in and be smart
about how you learn you could you could
be better than me in a couple years
absolutely Harvard the Harvard students
here are all better Coda's than I am and
they've been coding for like two years
so no absolutely that is absolutely not
true this is Python 3 so you can't
reassign false or true at least
within the pie within Pythons president
without going into the guts of CI
imagine yeah that might be true bad man
says you're pretty good those games are
impressive much appreciate it Adam I did
put a lot of time and energy into those
games I wanted those games to look nice
for that course to actually look
professional because I see so many
courses where the games just looked like
somebody threw it together with like
really crap art and I was like no we
wouldn't this look really nice so very
much appreciate the compliment Andre had
did that amendment there CAD robust and
then 48 if XT is equal to pong okay if
XT is equal to hog love it
so we'll say amendment two and that will
be Kendra Moss excellently done let's
see if this runs if false on line 58 did
I screw something up here oh because
there's still there's still a problem on
line 55 of this indented block here it
doesn't have any code inside of it so we
need to we need to fix that yeah exactly
line 56 says Merlin and hedgerow boss
contributed that did I I wrote that up
there I did yep so transmuter
transmitter is all on you now we need to
we need to fix this script or improve it
make it beautiful how do you propose
that we take this script to the next
level how are we gonna do this
indentation error it is not an
indentation error and as much as it is
an indentation error because we haven't
written any code in here it's more of
it's more a bug of the fact that it's an
empty if statement and Python doesn't
like empty up statements
so did I remove hacker Becker from the
list
I did not thank you for the reminder
removed much appreciated
and let me be just a second here
how do we do this sorry one second
should I figure one thing out really
fast give me just a second Papapa Papapa
what I need to do is get oh I have a
users in chat thing I didn't even know
about that that's cool okay that's
really cool
there we go trucha nice I've made you a
mod just cuz you've been super awesome
so that you should see that reflected
hopefully okay so back to transmuter so
again tricking ease thank you so much
for helping stay on top of everything
with this chat it's been awesome we can
fasten this up a lot more : you should
run it we just did run it Oh a road or a
foot here uh where is it
now at first mod actually know first mod
was Brenda and David because both of
them are both David's obviously the
teacher instructor of cs50 and then
Brenda is works with us from New Zealand
and has been with working with us for a
long time and has had a presence in the
chat as well let me see back Rebecca
blah blah blah sorry so the next person
was transmuter transmuter was where do
they write it where do they write it
sorry I got lost there's so much chat
which is great I love it oh there we go
for online 50 print I do not get that
reference but I'm assuming that it's a
meme so online 55 print subaru subaru I
love Amelia every we've ever its kind of
an offensive term so just for the record
I don't necessarily approve of the use
of that term
but I think that that's I think that's
what you want me to do right so if we if
we do this oh boy
so there's the Zen of Python and it
looks like it it did some some logic it
looks like oh that was that that was the
the time the five-second timeout so
awesome so we'll do this so again for
folks who are confused the print
statements have been flipped into into
input statements so now anything that
was an output is now expecting me to
type something which is a little bit
crazy pineapple pizza we're getting
printed out and pineapple pizza was
being printed out by what what was that
being printed out that was oh that was
uh that's capital running so kapwa is
printing every item in favorite foods
which is pineapple pizza which is right
right up here cool and then this is the
list of so this is the amazing list that
that no bunny run created that
somebody's decided let's actually create
the strings with the plus operator not a
comma B it's just kind of nicer so
that's pretty cool pineapple peds
expecting input so there is another
input so inputs are still inputs so that
top line that are at the top of our code
here that says print input is equal to
import random dot choice on print input
both print and input or input now so we
have that going for us
let's do that what are you doing nothing
and then the code ends up executing so
we didn't get to see the amelia line the
subaru line which is a meme but it works
it goes all the way to the end of the
script there are no bugs everything is
fantastic so congratulations to
everybody who's made this possible let
me go ahead and just add transmitters
name to the line that they add it to the
script which is right here so transmuter
you are forever in our memory as a the
person who helped us fix our fix the
script finally it's awesome awesome
contribution Oh anime reference
it guy fell in love with a nod best girl
very hard code but I can't figure it out
maybe you can to find prime factors of a
number I think for very large data
finding the prime factors of a number is
probably the whole eyes not the whole
backbone behind like suit like
cryptography like public key
cryptography like if we figure out how
to reverse prime factors of an of a
really large number we essentially break
modern encryption so probably why you
can't figure it out unless I'm thinking
of something different
alright those readings are off we have a
lot of twitch temp that I got for that I
felt back on behind Okwe fou not ending
the stream just yet footy we got time
left we got time we've only been
streaming for an hour and 49 minutes we
can and we've got clearly a lot of
interest left so we have we can keep
going with this and what I'm realizing
as we're writing this script without a
goal is it's basically a lot of memes
and just like constant comedy and
printing so it would be interesting if
like we set a goal from the very
beginning of the chat and we decided
that we were all going to we were all
going to together try and make something
happen we're all gonna print the Mario
pyramid we're all gonna write a spell
checker in Python maybe we're all gonna
write a basic pong clone in love like a
game so it's interesting but you know
this is a good way to I think spearhead
the workflow for this because this part
of the thing is we do need to get a
workflow established with this and like
figure out what all the like corner
cases are like what we should be worried
about with this system like does it work
well is it is it efficient are there
hiccups are there setbacks should we
optimize it in some way project Euler
tree Kinesis suggesting is this is a is
a very good possible thing that we could
adopt to get some direction into our
stream I I really do like Wiebe is
defined as non-japanese male who watches
anime I see I got it but yeah I would
like to I personally would find the game
making a game with the chat very cool
because very visual and we can see there
are so many interesting bugs that we
could run into and so many interesting
graphical things that we could do that
it would be crazy very crazy but anyway
Cairo 5 you will have to be added to the
chat to the list if you want to
contribute I don't want to take requests
out of order just because if I do that
it's kind of unfair it's kind of like Oh
whoever types the fast
gets priority we want to make it fair
for every person who wants to contribute
but it's a curfews time a curfew is time
to shine a curfew if you're still in the
chat if you can hear me if you can see
me we are waiting on you for the next
contribution to the stream somebody just
said something I wanted to comment on
which was how about this every time we
have a script with no bugs we save that
and start a new one well I mean if that
were the case we could just write a
simple print statement and that would be
the end of the script right like that I
don't think that necessarily works that
heuristic doesn't hold true for single
line valid scripts in Python because you
can write infinitely many valid single
lines and pythons so I don't I wouldn't
I don't think that's necessary the way
to look at it but we might we might want
to think about moving on to another
script at some point now that we have
the workflow established we could
absolutely do that if we want to if if
you want to take a vote actually if
people want a new stream people are
sorry not a new stream if people want a
new script let me look through the
emojis let me see what what emojis are
like this is important this is a very
important detail if people want a new a
brand this does everybody have the
unlocked once no I don't think so global
let's say global ones if people want new
ok I'm gonna write this out this is
perfect actually
RIT pepperonis I love that ok so
which one best signifies staying on to
the current on the current there's so
many good emojis I don't know if I want
creeper or rip pepperoni the controller
with the halo is good because that's
kind of like we're dying and going up to
heaven okay
yeah and a works good too that's
actually easier to see it's just not as
funny okay if people want to continue
vote yay if people want to we'll just do
vote yay vote nay if people want to
continue with this script vote yeah if
you want a new script vote nay yeas
continue nay is actually yeah day is new
script nay is new script yes continue I
need to I want to see the images so vote
yay like actually use the emoji nizzle
and Ilya Vere calves was fun for a while
I vote name for the next trip I can see
that totally see that and I will only
consider one nay per person not not 5
nays hoodie but I I appreciate it
doesn't make it easier for me to see so
I do appreciate that so we have 1 2 3 4
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
20 red versus like 7 green ok so we are
going to do a new script it's a new
script very exciting this is cool I
really liked the Chaos now a lot of
people in the chat are mentioning I
would like to make it goal based you
know that'd be cool so let's make it
cool based and the meow cat also wants
their name put at the end so we're gonna
use the existing list of names right
because it's kind of unfair for the
people that already put their name in
that have been waiting so this is a
beautiful script everybody be proud of
the work that you did this is fantastic
had a lot of fun tremendous we're gonna
create a new script and
I like the idea of starting simple and
maybe doing
I'll take suggestions but I like the
idea of keeping within the realm of cs50
for our first one and sticking with just
the mario pyramid and so for folks who
are unfamiliar with the mario pyramid
we'll do the basic we'll do the easy one
first which is print basically hashes
for however many lines we have print or
however many columns we just have one
hour or however many rows we decide we
want our pyramid to be we want to print
out basically one hash than two hashes
than three hashes and four hashes than
five hashes up to n hashes where n is
the number of rows this is the mario
pset the first part of the mario pset
there's another part which is where you
sort of do the reverse where you do this
if I can it's hard to type it out but
you would you would type this this would
be the reverse version of that this is
the version that's the more comfortable
Python Mario cs50 pset Python version C
n Python reverse Mario pyramid why don't
we start with regular Mario pyramid and
then we'll do a reverse Python pyramid
to reverse top down when is the intro
crypto stream we ready did the intro
crypto stream male cat you can look at
on youtube.com slash cs50 and we'll see
how that goes oh actually a good point M
Kloppenburg isn't that against academic
policy boy you might be right actually
we might not want to do that why don't
we just to be saved do a similar problem
why don't we do
I have an idea this is one of the first
examples I learned when I was learning
how to program was you you define a cube
right you decide how big is my cube
gonna be and you basically in this case
it looks more like a rectangle just
because there's line spacing between the
hashes but given a size for your cube
you decide or you write the code to
actually render the cube to the CLI so
you take input from the user the user
inputs one you input one hash if it's -
you're gonna input you basically do it
and that will look like a - hashes and
two hashes it'll be a full cube if it's
three it'll end up being one two three
with it'll end up looking basically one
will look like this two will look like
this three will look like this so in
actual semblance of something with a
body for will look like this and so on
and so forth up to five six seven eight
nine ten so this is it's a nice easy way
in a graphical way for us to make
something interesting so why don't we go
with this as our first first exit for
our first goal oriented chat codes
Python example I'm call this print cube
pie and then maybe we'll choose some
other interesting ones for the near
future do a Christmas tree oh Christmas
tree me pretty cool actually like the
two pyramids together basically
back-to-back they'll be fascinating
Skaar brains loner king tin wants to be
added to the list I'm going to bring our
prior list oh shoot there we go
copy that write that bring that back up
here thank goodness for redo right so
this is our list of people that are
currently in the queue so a corfu you're
the first person up our goal is going to
be to print a cube so we
want to take input from the user so we
want to take input from the user
and then we want to draw a cube based on
the number they enter right just to the
CLI and then cube should be hollow at
size greater than 2 so this is the
beginning of our beginning of our script
here so this is this is gonna be
interesting I'm curious how this turns
out and a curfew if a curfew is not
around we may end up you may end up
skipping over a curfew so moon 9 wants
to contribute and so does meow cats meow
cats already at the end of the list and
let me see did anybody else want to get
added to it a loner kington right let's
do that
loner King long type that Oh every time
I have to leave soon so skip if I come
up we'll do Andre wants to get at it Oh
is Meowth get twice in the list oh I
think wait his meow KITT meow cat twice
Oh meow cat is twice yep so we're gonna
have to take you out of the bottom yeah
okay you're already up here you're
coming up soon and then Andre Andre is
already in the list as well cool alright
Oh loaner kington is also twice in the
chat oh my bad everybody so eager they
want to get their name added multiple
times we need I need out like a current
set that's active and then Bastion game
Bastion gaming's back in the end and in
there
Bastion gaming which is underscore yeah
we want to make sure that everybody has
equal chance to contribute at least one
time so let's
yeah let's be civil let's let's keep it
let's keep everybody in the in the list
only once at any given moment in time
alright so first line a curfew doesn't
look like they are responding
unfortunately so Ilia vr5 it's all you
let's go Ilya veer um I want to add the
names in the Python list at the top and
check for duplicates that might not be
necessary honestly because then we have
to run that every single time which is
yeah there was which was somebody there
was somebody yeah and sets are also
unordered that's that's a fair very fair
point
there was somebody before but we asked
them to contribute and they they haven't
said anything and we also asked them in
the last script as well so we just
removed their name and so Ilya veer if
if somebody takes too long to respond we
remove their name and then they have the
chance to add the three robots after the
fact all right let's go Ilya vr5 Ilya
veer what is gonna be the beginning no
no worries at all we're actually we have
a goal this time we are creating a
script with an explicit goal it's 11:30
at my place and I'm feeling sleepy are
you continuing the stream if you mean on
a different day on a different day we
probably will people seem to like this
people seem to be interested in this and
I'm sure we can only get crazier with it
but we are probably gonna keep doing
this for another maybe hour or so
depending on how interested folks remain
but well most certainly in the future
we'll continue doing it again so Ilya of
your five all on you what's the first
step our goal is to make cubes we want
cubes in our excuse me thank you for
water
okay wants to import turtle so basically
what we want to do is we want if
somebody enters I'll do sample all the
sample input will be five and then the
output would be something like 1 2 3 4 5
it doesn't help that they're hashes in
this case because it kind of blends in
with everything else but but see that'll
that will essentially be what it looks
like the user enters 5 right here and
then it prints out this 5 by 5 cube
that's hollow on the inside can I
correct you if you are right take
basically take the input BR size said
the inner size which would be size minus
2 then print
yeah I mean there are multiple ways we
can honestly do it footie that's one way
you can do it multiple different ways
rector 0 I would like to join well the
cube B color ish we don't have a CLI
colorization thing set up but we can
probably install one that ain't not a
cube that's a square or I'm sorry sorry
game killer 48 you're you're 100%
correct not a cube a square yeah
absolutely right
rector 0 I've added you to the bottom of
the list and I see Larrick well what's
this we are live coding all together
Eric we are taking people's input and
people are alia ok gotcha
sorry Ilya it's gonna be difficult if
you don't know English if Andre does
Andre if you do know the language that
Elliot does speak and you can help them
out Q would be really difficult to try
that and say yeah cute would be pretty
damn difficult than the CLI
but yeah Python doesn't have I Oh stream
like C++ does so this is it's even
easier it's actually quite a bit easier
than that I would say we'll give Andre a
second if Andre is present and can help
Ilya else we might have to come back to
yeah
we closed multiple lines and triple
quotes I've seen it use like a comment
but it's not really a comment oh yeah a
lot uh I know of that and for some
reason didn't think to do that when I
when I did the comments up above they're
fluent in Slovene Croatian and Serbian
wow you're an Eastern European polyglot
Andre is that common do do Eastern
Europeans tend to learn multiple
languages of their neighbors or is that
particular to you and your upbringing
okay
sorry Ilya that nobody knows how to
speak I'm guessing you're speaking you
speak Russian I'm not sure but I
apologize if it's any I apologize if you
wanted to contribute and we're having
difficulty doing so would love to get
your input but I understand it's tough
creation through in Bosnian same
language I see that would make it easier
call on puros it is your turn what is
the first line of our amazing cube
drawing script going to be
part of Yugoslavia as a kid that makes
sense : profs so again to reiterate we
want to draw our goal of our program
which should be to get some input from
the user as a number and then turn that
number into a cube draw a cube to the
screen we'll see how we'll see how
successful we can get one line at a time
using only the chat columns dan doesn't
pop up on Twitch okay that's fine
so we'll assume coulomb dipped out choko
kid it is all you what is the first line
of the script going to be
sighs prompt equals oh wow I like that I
like the sort of the implicit use of a
constant here with the capitalization
so sighs prompt is going to be equal to
what size should the rectangle be and
then is that a comment that says height
greater than width height greater than
width so I will say this is meant to be
a cube so we're not drawing rectangles
this is only for Q or squares and this
simplifies things so we don't have to
specify a width and a height just to
just a single size and the width and the
height will won't be the same
Grizz Maher says I don't want to go but
I have some plans next morning so bye
and please remove my name awesome well
hope to have you next time grow smart
thanks for the contributions it's been a
good time Oh Harvard is greater than I
read that as a W and that is a ok age is
greater than Y Harvard's greater than
Yale yep mm-hmm
gotcha very clever choco kid very funny
the memes excellent
this is choco is all choco kid so let's
go ahead and write that there so fabric
odor all you what is the next line for
this amazing script how are we gonna
potentially use this size prompt or
ignore it altogether Oh skip fabric over
say he was leaving awesome thanks
Kenny's for keeping on top of that game
killer 48 game killer 48 can we amend
lines
absolutely absolutely can you amend
lines 100% and in fact you will probably
need to and Luigi's gone - got it
awesome thank you very much yellow seems
more like a rich kid school probably
involved in that big admission scandal I
decline on speaking on behalf of the
former point but that I do believe they
were there were students involved in the
admission scandal at Yale
prince is equal to input game killer
seems to be gone okay no problem volcko
it's your turn
volcko what do you want to contribute Oh
ger smart didn't you say you were
leaving Oh was that somebody else's said
they were leaving late who just said
they were leaving oh you did say you
were leaving ger smart if you want to
contribute what's your line this is your
time let's get a line from you
oh thanks for your contributions okay
sorry
ger Samar I apologize that we didn't get
you involved
so please please give us a line if
you're still here if you're still in the
chat I feel really horrible I feel like
what I just said sounded like a complete
ass I thought I I thought he had
contributed I didn't her he or she I
didn't realize that they hadn't
contributed and I said thank you for the
contributions
girls Mar if you're still here I would
love to get a line for me before you
leave
but if you've already left then move
Eric oh nice on line one two game killer
Oh game killer that's okay we can bring
you back we can bring you back TMI by
the way game killer but we appreciate
the candidness I'll say curse Mar said
print this is amazing online wanna print
this is whoops got exactly like it's
given in the chat this is amazing and
this is courtesy of Gerstenmaier again
grrrrrr tomorrow I'm sorry so sorry that
we didn't get you earlier and that I
thought you contributed but you're in
there I'm gonna remove your name from
the list now I guess your name was in
there twice but thank you very much for
the contribution and for your patience
and for being present here at the end
when we needed you most
for the awesome beginning of our script
which now if we run it this is amazing
kudos to go smart for that contribution
much appreciate it
so after that game killer 48 game cure
let's get you involved so game killer so
we're gonna get game killer in here next
because we just removed them off the
list but they actually did something
else tux man 29 wants a wants a piece of
the pie here absolutely wide space equal
why oh okay I see white suede on line
what line do you want that on just here
do want that on line 18 game killer do
you want that on line 2 I'm here just to
write what people want me to write
much appreciated girl Samar again sorry
for sort of sounding like I was trying
to shrug you off that wasn't my
intention I thought that you had
contributed and that you were leaving
and trolling me a little bit so but you
were not you were very kind and I
misread what you said and misunderstood
what you did it should be white space
equals x size - - oh okay I like that I
like that line 18 okay so contribution
from game killer 48 is white space
equals the literal empty string x sighs
- - now sighs - - sighs isn't a variable
shell gaming where it's David I'm here
to see David I'm so sorry shall you have
to settle for me today
David unfortunately isn't here but we'll
get David in in the next two in the near
future
Jai Calif cs50 I appreciate it I
appreciate it seems food is great love
cs50 - why can't we draw Kappa just for
the sake of the stream because it's the
CLI and the CLI doesn't really have
Kappa emoji support we could we could
figure out a way to do it in a in a
different engine or library maybe but
not today probably David came to say
hello like an hour ago
that's true they did movie says wait
you're an actual instructor whoa yeah I
am an actual instructor chuka nice
kindly mentioned I run the cs50 gamedev
course on EDX and here at the extension
school at Harvard University so it's a
good time it's a and Adams one of the
current enrollees in the course who is a
regular here on Twitch so Adam what
actually what pieces are you on Adam II
you mentioned Mario at some point I
don't know if you've mentioned recently
since then what where you've left off on
but so we have white space is equal to
empty string and then we have times
sighs - - no this is a nice thing about
Python Python lets you multiply strings
by numbers and what this does is just
adds that same string together back to
back however many times you use that
number so in this case the goal is to
make the white space be whatever the
value is
sighs - - sighs - - because we want to
take out the left and right edges of the
the middle of the of the square right
now sighs isn't a variable so we're
going to need to maybe fix that now the
next person to contribute is it was
actually Volk volca was the person that
wrote that right am i I'm gonna go crazy
we'll go where is the Fulco come on
Volkov are you the one who wrote that
oh man volcko had a really crazy line up
earlier where is it am i tripping where
is the line that I that I missed wait
who wrote the white space is equal to
thing do I wait did I miss the name
shoot oh that was game killer damn my
bad game I was wondering I was really
tripping out okay game killer 48 so
volcko wants to write something a little
bit more intricate which is print there
we go cool appreciate it
which is print okay
print a - times size plus a new line
plus pipe plus white space plus whoops
plus white space plus new line a pipe
new line x times size + - x size okay
interesting
so basically what we've done is we've
gotten
this is effectively a shot at doing the
whole thing in one line
pack it up Jesus Phyllis I'm guessing as
a as a reference to that line but this
is cool now the only problem is that we
still are referencing this a lot the
size variable that doesn't exist so I
don't know if somebody wants to amend a
line or add this or make it work but
thanks volcko for that contribution
that's an excellent line might have just
ended the ended the exercise there but
QBs 2d here they have here
I'm sorry Ilya I apologize hopefully by
spending more time here your English
will improve and maybe we can get you
involved a little bit more again killer
wants to be added to the end of the list
again which we absolutely can do game
killer for you
so okay cool so should wash we've done
that shoe wash needs to be added or
needs to contribute the next line of the
chat Oh does uh does twitch not have
Cyrillic tech support I'm seeing it as
Anglophile or less that's normal
oh there we go yep I was gonna say
because it has Chinese and Japanese
support I would have been confused if it
didn't if it didn't work for Cyrillic
how come you don't take donations Colton
we haven't actually promoted our channel
to the level where we can take donations
yet we cross stream across Facebook
YouTube and twitch right now and if we
were to go and start taking donations on
Twitch we would have to have exclusive
streaming support with them so for now
we're not really doing that but maybe in
the future we'll look into that
Amen line 17 size prompt is going to be
equal to so sure wash we do not we do
not do compound lines yeah taking
donations I don't know about unethical
because the university kind of a lot of
how the university operates is off of
donations usually in the form of like
charitable donations like Steve Ballmer
donated I think I don't know how much
money a tremendous amount of money to
one of our schools here on campus so
it's not that donations are unethical
but for us to take cs50 to take
donations might be a legal issue
yeah with Harvard so it could be a
problem
unethical though I would not say
unethical
first part haha size is equal to input
what size with the rectangle beam okay
cool and where do you want that just add
just right here line 17 okay
so we'll just go ahead and do this well
we can't we can't just replace this so
what we're gonna need to do is basically
add a line here and we'll say sure wash
gets this line which is
if there is text on line 17 and 18 how I
am asking if you can insert a new line
at 18 and movie existing 18 to line 19 I
am Not sure
oh yeah you can insert lines absolutely
Merlin so all we needed to do was say
size equals wait where did where did
sure wash have it she washe had it size
is equal to input there we go
what size should the rectangle be and
nobody wants to use the size prompt to
the choke okayed create a T Paul this
effort he or she put all this effort
into making this awesome prompt super
well engineered decision at the very top
and we're just gonna end up hard coding
our input string here that's rough that
is rough that's okay because now I think
we can actually run the code and if I
say what's this called again print cube
and let's say I want to size 500
unsupported operand types for string in
int and that's on oh right yeah anybody
know why that is anybody want to propose
an amendment to fix it
nizzle how about you do you do you
happen to know the answer
closets layer thank you very much for
being part of the chat much appreciated
can we see the whole script real quick
yep this is pretty much it so there's
this is amazing at the very top and then
we have these three these four lines
here which is getting a size prompt and
then getting a size using an input and
then calculating white space based on
the size and then printing basically
dashes times size in a new line pipes
pipe and then the white space and then
another pipe in the new line times size
and then another set of dashes times the
size so line 22 for I in range of size
okay
well put it here for I in the range of
size and this is courtesy of nizzle as
litchi you are now up what do you have
to contribute to this amazing script
vocals line has no it makes no sense and
has no use vocals line is an attempt at
solving the whole entire program in one
line size isn't an int can it be cast in
it can be casted long strange trip rain
on Tuesday says you need to typecast the
size input could be very possible as
they saying amend line 20 to say int on
input I here we go and then if we run it
we are still seeing that we expect an
indented block and that's because we've
just nizzle has just declared this for
loop that doesn't have anything inside
of it so that's causing an issue so good
contribution from Ashley so that was an
amendment and that was here so amendment
as Li tea and then Zelan mo it is now
your turn to contribute to this amazing
script we're really close let's see if
we can maybe get to the end here sure
wash wants to be added to the end
now we're probably getting close to the
end I'm gonna say probably after we
finished this script all the way we'll
we'll call it a day for this Jam or
getting some what well we're at the two
and a half hour mark roughly I don't
want to get us started on another script
and have it take too long just because
there's limited time that we have today
to do this but I love this idea and I
think there's a lot we could do with
this and we could branch it out and make
a lot of cool things happen but we might
have to talk about that and we might
have to see what makes sense is Elmo's
not chat closets layer has to be removed
got it
boom loner King tin how about you do you
have the next answer do you have the
solution to our predicament but yeah I
thinking we'll end it after this this
script is finished and I would really
love to make a game this way I think
that'd be super fun like taking this
into the realm of graphics because
there's so much crazy this that we could
get off of just letting people run wild
with rendering algorithms and textures
and things like that and just graphical
effects generally speaking not even
using textures so would love to see it
but we'll figure it out we got to get
the Chogokin I exactly commented on that
cold you should make this in the sandbox
so we can see the code which makes it
easier for us to scroll the issue with
the sandbox Polar dreams is it doesn't
update in real time for you so that
would not happen my string I know Joe
good kid I pointed it out I was like
choke a kid did this awesome thing for
everybody he teed up he or she teed up
this amazing prompt right and then
everyone just kind of ignored it
everyone was just kind of like you know
screw it I we don't need your prompt
we'll just we'll inline it rip sighs
prompt exactly
loner kington asked about killing lions
17 we will not I I do not support
deleting lines we will not delete lines
but we will take your other input if you
have other input you are the next person
yet we're not removing lions loner we
want everybody's lines to be preserved
it's kind of unfair foodie comment out
we could comment lines out that's fine
cuz it preserves them
I'm not sure what Ilya was writing in
the chat because it was Russian
what if somebody someone's lying
deliberately breaks the code there's
always ways to get around it like you
can always amend the line or like like
Andrei did if false like you can get rid
of a like nefarious bit of code there's
always a way to fix it without deleting
the line we don't want to delete the
line though because we want to see what
everybody's contributed because if
people's contributions get erase then
it's gonna feel like crap for them
because they you know they added to this
thing and then they just got it like
their memories gone like they were like
they were never a part of the stream
that's the last thing that I want
adversarial programming it's gonna be I
kind of get to that point but loner
kington if you have another suggestion I
don't see what the problem with my line
would be I have Python running on my
machine and this should already be
sufficient to solve the cube
I don't remember what line yours was
game killer but I'm sure I mean the line
that I have from you right now is this
whitespace one which is great
somebody built upon that vocal built
upon that with this line of code line 21
kill the string and use the variable
size prompt line 21 kill the string and
use the variable size prompt what
learner kington you're gonna have to be
more specific I'm not entirely sure what
you mean
oh I see okay nice there we go that's
beautiful
so awesome amendments on behalf of
loaner Kington nicely done so Chaco your
prompt is now in use excellently done
meow cat here we go how are we gonna
solve the how are we gonna do this how
are we gonna solve it thing is trying
saying to amend the input yeah
meow cat has been chiming in the entire
stream and now finally gets a chance to
contribute a line of code what is it
gonna be loner kington we will add you
chances are loner kington you will not
be featured again on this stream because
we're probably going to end it soon
because we're probably close to being
finished but I can keep this list
although frankly we'll probably start
the list fresh again on the next code
stream cannot just need to fix the
incomplete loop now yep that is true and
that will actually get the code to work
that'll get it finished
that's nice Bella speaks Russian so I
was able to chime in with Ilya that's
cool comment line 25 ooh
Bastion gaming but it's too bad Bastion
gaming isn't actually going yet so we
have to we need meow cat meow cat it's
on you
to Merlin's point the the print
statement from volcko probably is going
to have a couple of subtle bugs but we
will we're not doing system calls male
cat I appreciate it though I not going
to system call the last thing I need is
for my system to get destroyed if you're
running this in a virtual machine maybe
but even still just cuz I have no idea
what that's gonna do I'll try and decode
it how about that we'll say why don't we
do that why don't we do this let's go
ahead and bites from hex 636 C six five
six one seven two system clear so what
is that what does that do OS system
clear Python Oh
[Music]
I like that i rescind my i rescind what
i just said and on line 29 where is it
line 29 on line 29 now cat we are going
to say import of OS dot system bite stop
from hex of the string 6 3 6 c 6 5 6 1 7
2 . decode utf-8 cool so now everybody's
happy
i hate i would hate to make you sad meow
cat i just want to make sure that what
I'm doing doesn't destroy my computer
because that would be terrible but thank
you meow cat for that contribution
pretty cool nice little way of getting
it a OS dot system clear call running
using the dunder import method
trucha nice it is you it is all you what
are we what are we gonna get from trucha
nice you've so kindly been update yes to
go nope
all right here we go
cool let's do this he wants to write a
doc string so written by Colton Ogden of
cs50 live I would capitalize it as cs50
live but since you wrote it like that
will stay with that and twitch chat
program asks for user input size and
writes out a hollow swallow a hollow
square version
1.0 4:11 2019 chat codes Python part 1
question mark beautiful dock string I'm
a big fan
put it on one line colt and make it look
good oh man really you serious killing
me hot garbage so thank you very much
true Keeney's for that i got to also
credit you for it so let's go up to the
very top meow cat wants to be added
again to the end of the list now again
we will probably not have time to get to
any of these people below like maybe the
halfway mark here but vard Kolk if
you're still around if you're still
present in the chat I want a line of
code from you we are so close to
finishing this we just have one problem
you've been summoned by the truká nice
to fulfill your destiny and getting
these what hopefully will be squares to
print to the screen which will probably
end up being rectangles and we'll figure
out why later but for now we need you we
need you
mathias says don't finish yet we're
almost done we are almost done with the
I know this dream is a lot of fun but it
does this work nope sorry for my ketchup
in another crappy internet connection
went down oof that's okay
would you like to contribute now in
place of verad Kolk whoo oh very coke is
here nope we gotta let very cold do its
thing if we take too long I will just
fix the for-loop myself and we can see
the we can see Volks Volk O's we're at
square now the problem is meow cat clear
is clearing the screen after the
rectangle so keep that in mind when we
actually write the we actually write the
script
Barrett Koch if I is equal to zero I is
equal to size one print hash else print
hash 4j in white space print Britain so
we can't do compound we're not doing
compound lines vertical it's gonna need
to be one line one if you're doing any
ifs or whatnot or else's they need to be
on separate lines those are considered
separate lines so we can not we cannot
accept that input currently
so do you have a shorter line that is
not a compound line that we can use in
this script for I in size at line 37 all
right cool so for I in size and this is
contributed by
virág Kolk now come on poor us why not
change the format a bit and allow not
only single lines but perhaps small code
blocks that would be I think a bit too
it give people too much power and we
want an individual person with a lot of
technical prowess could have a lot of
power compared to everybody else in the
stream giving people the ability to only
write one line at a time not only makes
this more interesting and more flexible
but balances the playing field for
everybody who's not maybe as savvy so
that's the main reason so for I in size
4 at coal proposed so now we have two
unending four loops here one on line
3109 39 so we're probably gonna need a
way to get around that so come on porous
it is on you now go on porous if you
could provide us with the next the next
align we are we're calling you because
you were called earlier but you were
missing you've come back so will allow
you to to make a suggestion but what is
different in line 39 and 30
I don't know if there is a difference
range will be a always a numeric value
and four is a general iterator which I
think might oh it is a more general
construct you can use it to loop over
collections versus just numbers but I
think in the case of iterating over a
number actually I don't even know if
it'll let you iterate over a number I
think it has to be range so if I say for
I in six print I will it work yeah it's
not an iterable so actually it doesn't
work it's actually a it's actually
invalid so this needs to be range of
size okay Colin Porter says we can move
on okay quote we will move on so show up
it is your turn
shove official if you are still in the
chat it is on you o remove okay export
dreams it is on you X Polar dreams what
you got for me how are we gonna fix this
code
I'll go learn Python and solo learn on
zero percent but I watched jamming aha
printed with okay go learn sighs oh the
printed yeah that's the prompt but
that's not a that's not something that
you see when you're actually coding a
module that's something you see at the
terminal
we get puller dreams just a few seconds
screw up just so we see the whole whole
corpus of code okay that's fine we will
skip Gale full what you got what you got
Gale full
well I'm glad that you're still here if
you're not even if you're not paying
attention I will take you off the list
footie footie in the chat what do we
want what do we want to do the chicken
knees the same for the love of God
please give code at line 31 dented in
the for loop okay print hash + empty
string times size minus 2 + hash okay
cool
we got something so if you run it whoops
we're still getting a parsing error
because we have a indentation here now
on line 41 so somebody needs to somebody
needs to fix that so this was hoodies
contribution so thanks to footy does God
exist
I'm sure gonna say my man Cairo oh five
got the three robots - three robot
emojis in there what do we want Cairo
how are we gonna fix this code what are
we what are we doing what are we looking
at
as they saying this in case more people
drop out
Kyra oh five is that your is that your
code just stay robots
all right cool Kairo oh five pass on
line 41 oh man there we go thanks - oops
Kairo five for that we should be able to
now run our code this is amazing what
size of the rectangle be let's say five
and thanks to the troll move of meow cat
we can't actually see our square because
it gets cleared off the screen
immediately so Andre do you have a fix
for this I have to imagine you might
have a potential fix for this
of course it's troll but we knew it was
troll we knew meow cat was trolling that
was that was that was the intent from
the start I applaud your patience colton
thanks
senior mail mix that's a fantastic name
by the way what do you thing I want to
cry I don't want to repeat myself though
so does about Andre come on Andre what
do we got what do we got Andre I believe
we're so close all the cool kids go use
go are Julian whatever the news chants
library is anyways what he likes and I
think it's exciting honey Oh Andre oh
man ok line 33 couldn't couldn't have
settled for a couldn't have settled for
just you know amend the male cats import
couldn't done that I couldn't have done
that now instead Onge I decided that we
needed to prolong the stream as much as
possible so we are going to def draw
square on line 33 and are we by chance
going to oh this action needs to be
right here
are we indenting this here then too or
is it gonna be a separate function who
knows who knows would you do something
like this another language like C or
Java sure why not
Andre
I'll let you remove my line for the sake
of finishing the task though we can't do
that with this this is written by the
chat I am NOT doing anything
oh did you say indent Oh indent okay got
it cool let's go ahead and do that boom
boom
so now draw square the draw square
function that volcko wrote earlier the
line is now within the draw square
function so we're not actually calling
that anywhere
cool good edition hacker Becker you're
up next
what do we got what do we got
any suggestions for studying Python from
zero a lot of YouTube videos that are
great you can take courses on udemy you
can get there's lots of great Python
books ton since Python is used by like
everybody there's tons of just free
online resources you can just google
like python tutorial in google or
something google it and Google just use
Google to find like Python tutorials and
articles and blogs and videos and
whatnot and you'll just find an
overwhelming amount of material beyond
what your your ever capable of actually
learning learn the basics and then if
you're interested in getting into data
science
you can look up specifically how to do
data science in Python hacker Becker was
they were they present were they not
present Oh true can ii said that they
were not present okay no chat list mu9
Moonen I see you I see that you're
active I want you to give me the next
thing to do munna tell me what we're
doing yep it is your turn mu9 feel like
people are praying to you to comment out
line 39 you know the thing is that's
actually not gonna do anything you know
why because Andre just encapsulated this
block of code into a function and we're
not calling the function so it's
actually not gonna do anything why not
make it a function please don't comment
it what does line 39 do line 39 clears
the screen so that we can't see anything
can you run the program sure so i run
the program i say 5 it just goes it
clears the screen nothing happens people
are just like comment on line 39 call
the function on line 40 someone oh there
you go there's an idea there's an idea
can I can I import Oeste remove print
cube dot pi so you can just give up and
go home let's not yeah listen
Oh s let's not Oh s remove anything on
my laptop I think we can I think that we
can make that a hard rule no for bombing
no OS not remove and we'll expand that
list as we find more ways that people
decide to destroy my computer people who
just want to comment it up so badly this
is hilarious I love it comment comment
comment who's trying to iterate an int
varied Kolk which is online 42 long
strange trip joker kids got a coma
outline 39 kirby thing it's amazing just
something simple no need for commenting
it out just a draw call to draw square
please please be quicker this is like a
thriller movie i am TV 9.1 kind of is
yeah clear is just for the effects yeah
just for the effects the effects of not
having the square display on the screen
beautiful effect awesome effect Nobel
Peace Prize winning so rule CS wants to
get a foot in the door here hopefully we
make it that far I probably won't yeah
movie might have to move on to somebody
if you if you don't have a line it's
been a few minutes I want to be fair to
you coming out varied Colts loop since I
think we already did a loop earlier okay
so we can comment out one line so will
comment that line now
and then this needs to be D indented
which weekend we're gonna assume that
that's what we'll do okay cool
size five and we're still in the
situation where we don't have the
ability to see our square because of you
know cuts line right here so I don't
know if anybody wants to suggest any
ideas but also mu9 will say amendment
nine Bastion gaming this is all on you
can you help us fix the code so that we
see our square slash rectangle Bastion
gaming line 38 def clear ah def clear oh
I love it so this goes here and this is
Bastion gaming shout out to Bastion
gaming for the amazing for the amazing
the the clutch sort of a function
ization of that line the
functionalisation now we are printing
out the nizzles loop here which as you
can see doesn't quite satisfy what we're
looking for because it does just the
hollow part of the logic for the entire
bit of the entire size of the cube it's
printing out the right size it's 5 but
our top and bottom lines are not filled
in so it's incorrect currently however
rector is 0 if you're in the chat if
you're in the chat rector's 0
can you maybe think of a way that we can
we can solve this problem do the middle
lines have the correct number of spaces
I think they do yeah
sighs - - yeah we need print on top and
bottom of the for loop
sir rector zero is rector zero present
and accounted for are they in the chat
yeah
Merlin we're all over the place with and
with the terminology at this point but
that's okay that's okay
rector zero isn't list but not
responding skip for now yeah well skip
rector tux man tux man twenty nine let's
see what you got
I like how volcko basically solved it in
one line yeah Volga's is nice dog space
I'm a fan although I think volcko stuck
which we will see if we actually call it
but we're gonna have to leave it up to
the chat to figure out how to do that so
tux man 29 if you're in the chat let's
uh let's get a line from you or an
amendment or something whatever floats
your boat
just after we defined sighs okay size is
equal to hash character size mod 10
squared what in the world are you trying
to do
game killer and sure washing on the list
okay okay so just after we define size
size this is courtesy of tux man
everybody tux man 29 he says size is
equal to a hash of the character of size
mod 10 squared what in the world is that
doing I don't even know to be quite
honest with you it's a little bit of
math it's doing something
ah just so we understand actually we
won't we won't we go in the terminal and
we can figure out what it means but
we're not gonna do that
Bastien gaming once in at the end
perfect
so tuck spent 29 thanks for the
contribution loner kington what do you
got for me what do we got loner kington
I think you should try to code from
Volkov okay it's a good intuition ash
return the hash value for the given
object right but why are we signing that
to size I'm not entirely sure what
that's gonna do that's gonna maybe be
chaos we'll see what that does somebody
might need to amend that line later if
it's really bad binary warrior 76 hello
binary warrior and loner kington by the
way we are waiting for a line from you
so please do come up with something help
us figure out what we're missing here
someone called clear at the end of the
file now Kat the ultimate trol today
wants everything but the stream to end
what are we doing today we are what
we're about to end pretty soon but we
are writing a script one line at a time
and the lines are provided by the chat
so every single line people will
basically write three robots and that
tells me that they want to contribute to
the script I add them to a list we go
through the list one at a time that
person gives me a line of Python code
and where they want to add it or if they
want to amend the line and hilarity
ensues right now we are trying to print
a cube aka a square aka a rectangle but
literally a square and it's loner King
tins turn line 38 ad args as the size
and white and white space okay lion 38
size and white space okay cool done so
that is a an amendment
from loner kington now we'll take I'll
take you home now cat
what do you would what are we doing meow
cat I'm gonna assume that it's probably
something to do with clear at the end of
line Mew nine months ago and purrs of
all 1312 firs of all 1312
I am skip me I'm bad at Python okay sure
ma'am out cats been skipped as Lee it's
all you what are we doing loader Kington
draw call square at line 44 okay line 44
so before the clear call
the last line okay hey as the you said
line 44 I'm gonna just gonna let you
know 46 okay short 46 this is as Li t
saying draw square now is that your
final answer
okay as Lee's final answer let's run the
code
oof
draw square is missing two required
positional arguments size and whitespace
because we're just calling draw square
without arguments
so footy do you want to recommend it's
too late Astley you've already you've
already said final answer footie how do
we solve this
I believe a MEDLINE 48 draw square to
size and size - - interesting let's run
that see how that works
oh wow that is uh that is something that
is um that's a square of some variety
without still without a top and a bottom
why is that
so footy kindly contributed that barod
Kolk are you still present and accounted
for do you know how to fix this
but he wants another what he wants to
come in again at the end all right so
I'm messed up with sighs yep that's
correct
that was a tux man tux men did that
so if only there was a way to change
that as he wants it again got it
and why wouldn't you I like big sky why
would you because people are trolls tux
man is a troll and so is so as male cat
but we love them we love them for being
jewels
that's what makes this entertaining em
Cloppenburg and Andre all right so
varied coke at line 27 at s is equal to
size okay s is equal to size this is a
contribution from rod Kolk cool and I'm
actually going to bring these over here
just let everything's a little bit more
condensed
okay cool so that was broad Kolk rule CS
sir rule what is your what is your line
of code for us and actually let's go cap
door and NaCl Eric if he has the
patience do this hair like that every
day you can stand some troll Jesus
Christ Murad Kolk I wonder if Colton
predicted this was gonna happen I
predicted nothing I have no idea
pretty cool hair by the way thank you
very much appreciate that I assumed that
this was going to devolve at some level
we were gonna get some trolling but it's
hard to predict exactly what's gonna
happen
all we can do is kind of work with the
flow
sir rule CS line 24 def tux natural okay
def tux man troll okay this is so rule
CS
fashion gaming what do you got see it
volcko thanks for the contributions
sorry line 27 you wanted to you want to
define you want this to be the troll
because this okay I'll do whatever you
want me to do but I don't know if that's
exactly what you're what you're looking
for are we are we looking to indent what
are we looking to indent are we looking
to indent anything with that sir rule
I'm not being evil I'm actually trying
to help so so rule can you clarify what
exactly do you want me to do oh I missed
her rose earlier thing actually meow cat
and eh-eh eh-eh
hey ro no indent okay
no indents interesting can I have the
line change again please all right so
what line do you want us to have this
what line would you like this located at
binary warrior 76
so I don't think we're going to like
move other people's lines to different
locations of the script because they'd
be very easy to just like take and drag
somebody's line into like a dump like a
dumpster function that's not that's not
what we're gonna do we can't do that
we're gonna need to get a little bit
[Music]
more creative than that Sebastian if you
have another idea but we can't take this
line and move it up here we can't move
line positions somebody can spit you can
specify a line for your new for your new
line and that's it line 28 indent please
wait what oh okay so you're saying okay
so sir rule you're saying take your code
put it on line 28 which was wasn't it
would have been above which line right
now above which line sir rule batching
moja and synonymous oh one
so tell me above which line you want me
to put it's the rule and I'll put it
there above line 29 there we go just
like way above line 29 above this one
above this one right here
the whitespace
of line 28 okay that's like that 28
there we go and then indent cool done
all right so now if we run it we get a
sort of five five five the middle a five
by five now we're getting into a problem
where we're getting into a type error
which says can only concatenate string
not into string and the reason for that
is probably because draw square expects
whitespace as a string and we're passing
in size minus two so just food for
thought if anybody wants to fix that
Bastion gaming it is your turn Bastion
gaming tux man twenty nine it was a good
troll you didn't you did well and so
rule good job for fixing the problem
replace size - - with whitespace okay we
can do that replaced with whitespace
we'll print this out and we have we have
two rectangles printing we have the one
up here with the hashes and then we have
the one that was specified by who's that
what was the user that did that the
original specification volcko who wrote
that and the reason for that is because
we have nizzles loop that's still
running the the hash here the hash
square now there's a problem there's a
bug the bug is that our rectangle if you
count the height it's larger than the
width and it's supposed to be the same
in this case the rectangle is one two
three four five wide but it's one two
three four five six seven tall so can we
maybe find a way to fix that Bastien
gaming mu9 do you have any ideas footie
you're coming up in a little bit so
there's that there's a chance is the bug
arisen to feature Colton it's definitely
a bug Andrej I'm gonna I'm gonna say bug
on that one Bastian gaming wants to go
again cool
we're actually making our way through
this list more than I thought we would
here's my single line we're not doing
that moon eye we're not doing compound
lines we're doing we need to do
individual lines
Arthur dev trad we can put you in the
list I'm no guarantee that we'll get to
you because we're probably and we're
probably close
Arthur Dev tread can we go back to the
bugs line
yep the bugs line is right here on line
39 and for the folks that want to get
crazy with this maybe in the future
we'll explore a sandbox environment
where we can execute sort of like crazy
arbitrary Python code but if it breaks
it then the virtual machine is gonna
shut down and then no fun for everybody
we have no stream so it's something
where we have to kind of be careful with
it that's why I'm curating it make the
second instance of size in - sighs - -
ah I think you might be on to something
I think you might be on to something
such directing will be let's say five a
unsorted operand type for string and int
[Music]
you know why you know why it is you know
why it is somebody kid there is a there
is a way to fix it there is a way to fix
it I almost did it just out of habit but
I'm gonna let somebody has to do it
somebody else has to do it I can't do it
myself so we're gonna say amend mint
went to moon nine the next amendment
goes to pers of all thirteen twelve
principle 13 12 would you got for us
mmm Berg with the spoiler alert but
first of all 1312 we were getting input
from you on this day this fine time call
clear on the last line of draw square
here like clear the is clear just a
regular function or do you need a on
yeah that's not an actual function so
you're gonna have to be more specific
gonna have to be more specific that's
not a function oh do we oh we do have it
but it's defined below so I think that's
gonna cause a problem but we'll try and
run it
well I mean we're still in the
predicament where we don't have a
working we still have a working
why are you hinting it yeah I probably
shouldn't hint it I probably shouldn't I
probably shouldn't do that
first of all 1312 thanks for the troll
loner kington loner kington where what
are we doing with the code on your end
today the global scope gets evaluated
first one knows about clear okay cool
oh that's true because these are
function definitions what are the
chances of getting to my name hmm pretty
slim binary but depends on how long
people drag this out but I need to go at
some point soon so I might just fix the
code and push it to github if we take
too much longer but if you want to get
this finished now all the pressures on
loader Kington footy as Liam kloppenburg
and Andre I think amongst those five
people we can probably get this to work
yacht for line 40 add parentheses around
size - - okay done
and oh what a shame it's clear to the
screen so thank you very much for fixing
the bug which it look like you did
loader Kington so footy it is now your
turn
mu9 just in case comment out a comment
out align 46 ooh brutal expected an
indented block uh-oh that is problematic
but that's okay
so hoody we'll go ahead and put you so
as ly it's your turn now
so as Li T uh comment outline 44 okay
let's comment that out okay so we have
the square drawn at the right size here
it is very beautiful we did it with
pipes and dashes and that's not
technically to spec but you know it
works and then we have an error where
clear is not defined because we just
commented out the clear definition so
now that doesn't exist if we want to end
on a note where we have no errors if M
kloppenburg maybe wants to suggest how
we might go about doing something like
that I'm going to I love this like
ghost-like graveyard of lines of code
which is kind of interesting but I yeah
M Kloppenberg if you want to propose how
we might go about getting rid of that
error at the end just to that for line
41 okay cool
comment it out what size should the
rectangle be 5 and it works so excellent
job chat I'm a little bit torn whether I
want to support commenting out lines of
code because it feels a little bit
disrespectful but also easy to get
around problems it's more challenging to
get around problems more creatively so
as another rule in the future maybe will
maybe will not allow commenting out just
like we don't allow moving of lines it's
all a work in progress its iteration it
was fun but this was amazing and I'm
actually gonna publish everything to get
hub now so that everybody can cloned it
and see all their names and all their
glory here pretty soon yeah you can wrap
things and functions return them use if
statements all sorts of fun things I'm
gonna create a new repo we'll call this
chat codes Python 1 chat codes Python
scripts one line at a time on twit
and then we'll make this public rate
repo go ahead and copy this link and
then let's go ahead and get it from the
right place yep get a DA up getting it
get Ad dot git commit this short commit
git remote add origin blah blah blah git
push upstream origin master and then in
just a second
you should indeed see I'll put it in the
chat because they people can see it
github.com
slash koltunov Skippy slash chat codes
Python 1 so beautifully done everybody
this was amazing a lot of involvement
today from everybody lots of new people
lots of regulars I enjoyed it the next
logical extension would be to crank up
the difficulty of the exercises it would
be to make games live this way so maybe
we can decide on making some sort of
game either from scratch arbitrarily or
as a goal
trucha nice no no explicit duties I
think you just whatever you were doing
today was amazing
you have the ability now to time people
out and ban people if they're being
disruptive or overly trollee or whatnot
don't be too pedantic but if someone is
clearly being disruptive I would say
don't don't hesitate to time them out if
they're being disruptive banning I would
discourage banning outright analysts
they're being very vulgar being
discriminatory constantly disruptive you
know those sorts of things that are just
like non tolerable aside from that you
know what you're doing today so shadows
of the true kinase for being awesome
helping coordinate everything this is
amazing it worked out very organically
I enjoyed the stream a lot and I really
am looking forward to doing another
version of the stream probably next week
we can do another one maybe do a game
version we could do another language
there are so many ideas that we could
use to branch off of this
and the cool thing about this idea is
that people can jump in and contribute
at anytime and it's not necessarily
something that you have to be tuned into
the entire time constantly to get full
value out of and if we start multiple
scripts multiple files within the same
stream so that we have a fresh start
that gives people more I think of an
incentive to come in and keep
contributing rather than you know
falling rather than sort of not knowing
where to come in stream schedule is
looking empty we are scheduling today
we'll have Wednesdays and Thursdays and
potentially a Friday stream hooked up
for next week our streaming schedule has
been lighter than usual lately because
there's a lot of work that needs to be
done outside of streaming but there
should be at least two streams next week
which we will be pumping very shortly so
oh shoot Bella I did not see if you
posted the three robots I really
apologize if he didn't if I miss that so
next time 100 percent let me know if you
want to be added I didn't see a three
robots for me but I clearly must have
missed it
I'm so sorry Bella you'd you should have
found me spam if I miss it spam the crap
out of me spam the three robots say hey
I didn't get I didn't get mentioned and
I will 100% include you next time so
sorry about that totally didn't even see
it this applies not only to Bella but
anybody if I missed anybody today
there's a there's a lot of people and a
lot of interaction so if I miss anybody
and you know you've already put the
three robots in the thing just do it
again and just remind me and just say
hey I didn't get mentioned you know let
me let me get included next Jamie right
at which spot for this uh-huh that would
be fascinating I'm not sure how I'm not
sure how effective that would be but
that would be interesting there's so
many ideas so many things we could do I
need Doug's gnome coding repo conceived
open to the public honestly have no idea
about it you might have to reach out to
him or or get some in from either email
em or whatnot but I literally no I clue
no clue what that even is
but cool so thanks so much to everybody
who did participate thanks to the folks
who were in here and paying attention
weren't even a so participating and so
sorry again to the folks who we didn't
get around to including today we will
definitely work on that next time this
is cs50 live chat coding Python live I
did very little I did one line in the
first script that I was assigned to
because the chat wanted me to and next
dream is not Monday so Monday and
Tuesday's right now we have another
event being held in this conference room
where we have this stream setup so
Mondays and Tuesdays for a while are not
gonna have streams they're gonna be on
Wednesdays Thursdays or Fridays and it's
gonna vary depending on the week so next
stream will be on Wednesday with Nick so
that will be the neural networks we're
actually building the CNN there's a
convolutional neural network from
scratch and on Thursday most likely
we'll be doing another continuation of
this idea which I really enjoyed and
maybe we can get David in for a Friday
twitch review code review stream not a
hundred percent sure where it's you know
it kind of varies depending on the
workload of the week but we'll work on
it so thanks again everybody and let me
know if you have more ideas if you're
watching this on youtube follow us on
will subscribe to us follow us on
twitter at twitter.com/dspacestv follow
us on facebook facebook.com slash cs50
and let us know if you have any ideas or
thoughts and thanks so much for watching
did i hear about the elixir language i
have heard about it don't know anything
about it
but i do believe it's a functional
framework anyway it was a great stream
today thanks so much everybody this was
a bunch of crazy fun Python chaotic
coding and goal-oriented coding and
we'll do it again soon so have a great
Wester great rest of your week and an
amazing weekend and I will see all of
you next Wednesday with Nick so Tata