#ot2-the-original-pubsta
652 messages · Page 103 of 1
ayo wssup
#include <unistd.h>
int main(void) {
int child_pid = fork();
if(child_pid == 0) {
/* Code that runs in the child process */
} else {
/* Code that runs in the parent process */
}
return 0;
}
so building off this example.
if we wanted to, say, run the ls command in the subprocess, we would do:
subprocess.run("ls")
execl("/usr/bin/ls", "/usr/bin/ls", ".", "-a");
do we need to put the path?
yes, the first argument is the path to the binary.
everything after that are the command line arguments you read in argv.
but its possible to write ls -a too right
no you need to separate it across strings.
hmm
so can you give an example for
start chrome
if you want to write the command on its own you can just throw it as a string into /bin/bash or whatever your shell is haha
Oh, so the first argument tells the location of the thing to run, while the 2nd arg and onward is the actual command to execute along with any arguments?
yup
MY BRAIN IS EXPANDING.
.
whispers
hello?
this is what i get when printing sys.argv.
as for starting chrome.
it depends what platform you are on.
uhm are you just skipping what i asked or are you not reading a word of what i am saying
just windows
if you are on Windows none of this will apply to you unfortunately.
why did you not say it in the beginning
i assumed you were on Linux haha sorry
fork, exec*, and pipe, are POSIX functions.
if you have something like WSL you should be able to use them though..
just leaves because of a trauma people gave...
trauma?
Hmm, is there no windows equivalent?
Windows does have their own interfaces for creating processes.
and i got traumatized because i am trying to fix it for days
hold on
this exists
i am not sure how to use it though hehe.
i need to use smth like subprocess.run in c++
i think someone mentioned that Boost has interfaces for it.
is this what i am searching for
is it c++
they have a C++ example yes.
the real question is if it's malbolge
asking for a friend
can you try to make an basic example with start chrome,i did not understand a word of the creating processes thing
asking for a friend
...sure.
i have no clue how to use C++ sorry haha
i am a C guy.
BOOL CreateProcessA(
[in, optional] LPCSTR lpApplicationName,
[in, out, optional] LPSTR lpCommandLine,
[in, optional] LPSECURITY_ATTRIBUTES lpProcessAttributes,
[in, optional] LPSECURITY_ATTRIBUTES lpThreadAttributes,
[in] BOOL bInheritHandles,
[in] DWORD dwCreationFlags,
[in, optional] LPVOID lpEnvironment,
[in, optional] LPCSTR lpCurrentDirectory,
[in] LPSTARTUPINFOA lpStartupInfo,
[out] LPPROCESS_INFORMATION lpProcessInformation
);
why not "\n"
anyway you can maybe help a little
it is like c a bit
apparently std::endl will flush the stdout?
oh?
apparently....? that is just what i have heard haha
But I don't want to flush it until the end of execution?
uhm pls
C++ moment
fun use of fork and pipe for any passerbys looking at this conversation:
size_t extract_error_cb(void (*callback)(), size_t length, char *buffer) {
int pipes[2] = {0};
pid_t process_id = -1;
memset(buffer, 0, length);
pipe(pipes);
process_id = fork();
if(process_id == 0) {
dup2(pipes[1], STDERR_FILENO);
callback();
exit(0);
}
return read(pipes[0], buffer, length);
}
extracting error messages spat out by a function on the stderr.
hey
you going to help out or nah
i cannot
this
why
all i know is that it is some function call.
you should join a C++ server and see what they say.
all i know is that it is a function call, and this is probably the path to the program to execute.
So, what about the other exec* funcs?
Like execv and what not
execv accepts command line arguments in the form of an array of strings.
so:
char *arguments[] = {"/usr/bin/ls", ".", "-a", NULL};
execv("/usr/bin/ls", arguments);
ah, so it's all just variations on execl?
execvp.. i have no clue. it looks identical to execv except for the change in argument names..
pretty much, yeah haha.
Oh, well.
The more you know™️
lmao
I'm rather happy I've learned fork() and exec*()
You still haven't talked about pipe(), but I know how piping works
Just not the implementation
ooo boy pipes
#include <unistd.h>
int main(void) {
int pipes[2] = {0};
pipe(pipes);
return 0;
}
basically, pipe creates two new pipes. one is a 'read' pipe, and one is a 'write' pipe.
which is which? i always forget let me see the manual page.
pipes[0] is the read end, pipes[1] is the write end.
using this, you can communicate between a child process and a parent process for as long as the child process exists.
so if i wanted to send some stuff to a parent process:
Ohhh this is such cool shit
#include <stdio.h>
#include <unistd.h>
int main(void) {
int pipes[2] = {0};
pipe(pipes);
if(fork() == 0) {
write(pipes[1], "foobar", 7);
} else {
char buffer[256] = {0};
read(pipes[0], buffer, 256);
printf("%s\n", buffer);
}
return 0;
}
and boom
you want seven bytes on that write() call
But this is snazzy af
and so this is how Bash works. =D
thank you smoke pipe
mild aneurysm, don't mind me
you can never be forgiven

os.fork()```
Fork a child process. Return `0` in the child and the child’s process id in the parent. If an error occurs [`OSError`](https://docs.python.org/3/library/exceptions.html#OSError "OSError") is raised.
Note that some platforms including FreeBSD <= 6.3 and Cygwin have known issues when using `fork()` from a thread.
Raises an [auditing event](https://docs.python.org/3/library/sys.html#auditing) `os.fork` with no arguments.
Changed in version 3.8: Calling `fork()` in a subinterpreter is no longer supported ([`RuntimeError`](https://docs.python.org/3/library/exceptions.html#RuntimeError "RuntimeError") is raised).
Warning
See [`ssl`](https://docs.python.org/3/library/ssl.html#module-ssl "ssl: TLS/SSL wrapper for socket objects") for applications that use the SSL module with fork()...
thanks fork
!d os.pipe
os.pipe()```
Create a pipe. Return a pair of file descriptors `(r, w)` usable for reading and writing, respectively. The new file descriptor is [non-inheritable](https://docs.python.org/3/library/os.html#fd-inheritance).
[Availability](https://docs.python.org/3/library/intro.html#availability): Unix, Windows.
Changed in version 3.4: The new file descriptors are now non-inheritable.
thanks pipe
🦀
and then fucking exec()
os.execv(path, args)``````py
os.execve(path, args, env)``````py
os.execvp(file, args)```
These functions all execute a new program, replacing the current process; they do not return. On Unix, the new executable is loaded into the current process, and will have the same process id as the caller. Errors will be reported as [`OSError`](https://docs.python.org/3/library/exceptions.html#OSError "OSError") exceptions.
The current process is replaced immediately. Open file objects and descriptors are not flushed, so if there may be data buffered on these open files, you should flush them using `sys.stdout.flush()` or [`os.fsync()`](https://docs.python.org/3/library/os.html#os.fsync "os.fsync") before calling an [`exec*`](https://docs.python.org/3/library/os.html#os.execl "os.execl") function.
oh okay good
exec(object[, globals[, locals]])```
This function supports dynamic execution of Python code. *object* must be either a string or a code object. If it is a string, the string is parsed as a suite of Python statements which is then executed (unless a syntax error occurs). [1](https://docs.python.org/3/library/functions.html#id2) If it is a code object, it is simply executed. In all cases, the code that’s executed is expected to be valid as file input (see the section [File input](https://docs.python.org/3/reference/toplevel_components.html#file-input) in the Reference Manual). Be aware that the [`nonlocal`](https://docs.python.org/3/reference/simple_stmts.html#nonlocal), [`yield`](https://docs.python.org/3/reference/simple_stmts.html#yield), and [`return`](https://docs.python.org/3/reference/simple_stmts.html#return) statements may not be used outside of function definitions even within the context of code passed to the [`exec()`](https://docs.python.org/3/library/functions.html#exec "exec") function. The return value is `None`.
ah, you little shit
You're not the right one
maybe we should make it replace the process image. :^)
maybe we should annihilate it entirely
I did 
mf got a square in stocking for christmas
jazz
Winter Coffee Shop Bookstore Ambience with Relaxing Smooth Jazz Music and Crackling Fireplace
i want #python-discussion ambience.
That sounds like 5 people asking questions to you at the same time
we should transcribe messages from #python-discussion, convert them into audio with text to speech

then put it on YouTube as ASMR coffee shop ambiance.
1 hour of Python Gen
1 hour of suffering
That would be fun ngl
But that means you'd need an hours worth of suffering
a small price to pay for lolz
Reality is often pricy
you do not know what i will do for internet clout.
for the silver award cheddar cheese.
no, that's swiss cheese
cheddar cheese is the tiny sliced ones
you mean the stuff made out of plastic?
yeah those
whispers : ..... hey 8 ball
no nononono
hi
that's american
so i wanted to ask wath the most basic fork command was
are you implying there is a difference between american cheese and whatever place cheese
cheddar
americano is that one you posted earlier
cheddar get sliced into thin slivers

mayhaps
We don't need that rudeness here.
if you are that dirty minded?
its a him not they or them
f... they or them
just him/she
what is prono-
i did not know your pronouns.
<@&831776746206265384> Could you come down please?
i mean this is the correct one,in the world we only have him/her
sigh.
and i am a him
i am going to regret this in the next hour.
why? is there a problem young man?
Dev is a girl.
I am a woman.
alright. no. the English language has quite a few pronouns. 'they' has always been singular and plural.
they meant to be fore a few people not just one
No need to.
the lgbtqstryquiey18272817x29923+ claimed the word them/they
oh for fucks sake
We're not here for that.
++2022 x290127
they are claiming the whole alphabet for themselves
lol
that is not how language works.
abcdefghijklmnopqrstuvwxyz LGTBQCSX_2022++
I just ask that you don't say anything that may start an argument. @rare moat
alrighty
THE MODEL OF THAT PEOPLE:) SHINING AND STUFF:)
Walk away if you have to.
WALK? calls the police for using illegal words
Can we please calm down here? they/them can be used as gender neutral singular pronouns, and has been used as such for a very long time.
NOOOO MY COFFEE SHOP AMBIANCE STOPPED
No Not MR INCREDIBLE:)
there is only him/her in this great world:)
lol
Dawn you know what to do
i am calm already
call BEGULA
did you guys read the terms and service and the license of agreement?
from DISCORD
uhh hello my names jeff
dawn you making a story bout long time ago or nah?
!mute 916414250027716618 3h Please take a break. Other pronouns do exist, and in this server, we accept that.

:incoming_envelope: :ok_hand: applied mute to @jovial island until <t:1641433402:f> (2 hours and 59 minutes).
Anyway, about cheese.
Please don't.
good people
if I had to guess, fix
you do not need to have a word with them
does he like ducks
cough cough the leather one @daring jay
the What.
is this one made out of plastic
depends if the large block it was shaved from was made out of plastic
generally, no
american cheese is the plastic-y one
I have no idea what you mean.
people unironically think that the sliced and packaged cheese is made of plastic.
For the holiday season, I saw a video about Kraft Cheese slices and decided to try it for myself. I grew up eating this stuff & am just now realizing that I've been eating plastic this whole time!! #EducateYourself
**Check out my brother's (SAUCITO) music: https://www.youtube.com/watch?v=BMv1tnddPu4
Are you referring to a fix ducky?
Really? He's posted it like one billion times!

oil is easier to get than cows
I am going to cause a spill in the gulf of mexico
wait if i ate plastic would i be eating oil
processed oil, yeah
in large enough doses
I've seen people accidentally bite plastic off the wrapping and live
this is why you don't heat food in plastic containers, kids
Melt
this sounds like a job for the legendary show 'Can you microwave it?'
if any of you remember that you get veteran points
You can microwave it, it'll just be all stringy and loose by the time it's done
Yeah, I was contestant-
My dumbass microwaved a popcorn bag with the plastic wrapping still on
353 episodes of microwaving random shit in a microwave.
how did that go
The plastic was stuck to the dish for 2 weeks
microwaving my bic lighter
*nearly died*
uuo
microwaving fire is a vibe I cannot explain
i wonder how much property damage this can cause.
ever microwaved grapes?
you can make plasma apparently.
really?
The grape in a microwave trick, does it really work?
I heard you can do that with other stuff as well
yeah go try it
Yeah hold on, lemme go get my grapes and recreate a small portion of the sun in my microwave
make plasma in a horribly sealed container that can definitely survive such conditions.
what could go wrong
the person on the internet did it
it must be sage
safe
fr that was the funniest shit
why did people do that
impressionable americans
the american dream
the american dream is spending 1300 on 2 phones because you broke the first one getting your 3.5 audio jack back
can you imagine telling that to your insurance provider
'so how did your phone break?'
"and why did your phone break?"
"drilled."
"d-drilled? what maniac drills a phone?"
"me. I'm that maniac"
'yeah so i took a 3 inch drill bit and shoved it through my iphone 6 because 4chan told me to.'
/b/ never lies
honestly it just seems like natural selection to me.
it is just a matter of time until someone does something actually ill- OH WAIT.
it's how the new iPhone charges
natural selection of the gullibles
similar to microwave
nah mate, you bend your iphone and the kinetic energy charges the battery
snap that shit like a twix bar
the glow sticks?
yeah
so, there's a solution in the stick
and when you break it, a chemical releases from an inner tube that reacts with the solution and floreses
Pretty sure that's how it goes
because I remember the least useful things
forgot how to do my taxes,
but I know there's a place in texas called Texarkana
it's... a portmanteau of texas and arkansas
who thought that was a good idea
texans
right i guess it really does not need any further clarification does it.
texans thought it was a good idea
nah
Unless I dunno, maybe it was a compromise
maybe the town was half texas and half arkansas and they settled on Texarkana, Texas
Instead of Texas, Texas
or... Arkansas, Texas
alaska
alaska, texas
Ya don't say
but yeah, later goo
It was disabled for a reason
Idk if it still is, but it used to be the most active topical channel in this discord, and with that came a lot of spammers. Along with reaction spamming, there were times where inappropriate emojis were used, and so they were subsequently disabled.
i7 and 16 gb plus RTX3060...that is an upgrade for my current i7. I suggest it
sad, ok
Is the notebook burn when running a game ? and how long is the battery last ? I will use for coding and making a game
Lol probably 30 min and really hot played with an ROG ...not mine ...best to play plugged and notebook on desk...Good gaming laptops can be bulky and heavy too...
Battery will last longer if not playing a game of course lol. And battery life deteriorates with time
ASUS tend to have good after sales service. Dont overlook that too
Ohh i see thankyou
watch reviews
i hate it when bot reviewer review my bot when replit hav error
@jovial island can v talk here?
anyone can help me extracting exe file?
umm alt+ e
doesnt work
yes?
Better? The i7 with 3060 probably is your best bet
If your looking for work and no games then still get the i7 one even though the cpu is slightly slower. 16gb ram is much better than 8
i have a question
dup
ouch.thank you so much. i had no chance to comprehend that without your help
@jovial island here
yo
lmao
hey yo
jarvis is like python on steroids
Hmm
If jarvis existed in the real world it would definitely not be written in python
lol
my condolences
I'll never understand what merit people see in those distros
if you can consider LFS a distro instead of a masochistic hobby project, I guess
how much are those
cause their realistic value would be 700-800€ brand new
???????
you need global thisnumber
otherwise it is a local variable
and as such, you are reading a local variable before you assign to it
how are you guys with flutter?
scared
ik it's growing. But I'd rather stick with react native
use it regularly
It gives satisfaction, and a new neofetch logo, which is enough for me
wat
Wat
so epic
you could just custom set the logo
you could set it to a picture of your face if you wanted
Ik that, but it doesn't give the same feeling
Listen I just like to waste my time distro hopping, it's just fun
i putted my phone on charge but forgetted to turn the switch on for 5 hours
ooof 🤣 i am not kidding
hobbies
like
why are u gambl-- i mean playing genshin

@hazy laurel should i gamble my wishes now or should i wait till feb?
that's $20 too much
I carry around a Windows 11 ISO with me just cause, I'd not charge anyone just to borrow a stinky USB
you can download it for free?
Yes, but you'll need a license to activate it
most modern computers that shipped with Windows will store the license on the motherboard
if you're reinstalling, you'll probably already have a license that'll get activated automatically
thanks my dude
no thanks
@pure sentinel I love Devon Rexes. A friend has one.
Best cat!
Also, well spotted
Just scam
nah that sounds like getting paid to do a job whats wrong with that?
being paid for ownership of capital is where ppl should go "wtf this is bad?"
might be - its the most used language for AI research
hi
the phrase Available in any color, as long as its white or black. is missing an apostrophe, right?
yes
ok good
"its" in this case represents "it is"
yeah
and since it's a contraction, you need an apostrophe to compensate for the missing letters
i found this on a product page
like big product
$300
and this was in big letters oof
just wanted to make sure i wasn't insane
here's hoping 🤞
if I would happen to want to learn OCaml, how would I go about doing so?
ocaml tutorials?
tyty
https://dev.realworldocaml.org/ is on par with the Rust book
I didn't even realise how many the chapters are
They're not a lot, but it says something about how simple the language is
How many more variants do you think we’re going to go through before it becomes endemic like the flu?
nice
yes
Thanks
ur not based
Ayy
:(
this is the discord message that will get me cancelled in 10 years when I'm wildly popular
this one comment will cost me my entire career
yes.
this message will disappear if you pay me $10,000
this message will disappear if you pay me $9,999
hsp is making bank with his mod privilege
Lol ask for Etherium or bitcoin
pay me your life
no
or become my wife
smooth
with great power comes great responsibility
what about we have a deal
I want that pizza power lol
take keqing for shogun 🛐
:(
just waste your monthly salary on gambl-- i mean gacha
just create a new account and hack spiral abyss
Is that Chinese, Korean or Japanese?
Korean
You are Korean?
Yes
Ahhh, so me in an alternate universe with blue PFP is Korean xD.
Yes thats right
Am I smart in the alternate universe?
yes, how did you know?
Oh wow.
I know that because I am stoopid in real life
And have heard that people are like totally opposite in their alternate universe form.
arent those japanese?
those characters doesnt look very korean
!charinfo チャラ98
You are not allowed to use that command here. Please use the #bot-commands channel instead.
@jovial island according to !charinfo
those characters are katakana which is japanese 🥴
because I'm stupid and have fear of how good programmer I can become
Japanese
interesting. after reverse translating your name for three times returns "Character 98", which is "b"
chinese characters are more complicated
japanese characters are rounder
korean characters are like legos
I'm disappointed that tenor has no rush e GIF.
Amazing fact ahp
hi is anyone here good with c++
yes! 🙂
is there anyway to iterate through datatypes in c++ by changing a character in the name your calling
for example if you have a bunch of arrays called line1, line2, line3, etc
is there a way to just use a for loop to change the last char
you can do that with macros, though usage of macros is generally discouraged.
kinda unrealistic but would make my life a lot easier
ohh
so i should use it?
shouldnt*
🤷
"discouraged" doesn't mean "never", so much as that it's error prone and not usually a good idea.
arcade is very cool omg
it'd most likely be better to create a data structure that is an array of pointers to your original arrays, and then iterate over that data structure
so im currently making a dots and boxes game with sfml
ok
that didnt work
here
so basically theres a bunch of dots and you have to connect the lines (it goes player by player turn by turn)
whoever makes a box gets a point
so i made all of the possible lines
int line1[3][2] = {{0,1}, {2,3}, {0,0}};
the first two are the coordinates of the two points that make the line
and the last one is (0,z) where z just keep tracks of whether the line is drawn or not (0 or 1)
i need to keep track of 40 lines
so what would be the best way to iterate through them
I'd pick an entirely different representation for that. I'd only represent line segments of length 1, instead of arbitrary length, and I'd make a single array that represents whether any particular pair of adjacent points has a line drawn between them
im confused
how would that look
are you saying youd just have an array of 1 and 0s and then instead of having the coordinates in the array
if i wanted to check which points are used by putting the points directly in the conditional?
int lines[40] = [0,0,0,0,0,etc]
and then
that approach would be something like: ```c
bool connected_to_right_neighbor[5][4] = {};
bool connected_to_below_neighbor[4][5] = {};
if (mouseClick1 = (point1) and mouseClick2 = (point2)) { drawline(point1,point2); set corresponding line that was made to 1;
smth like that?
o
is that a multidimentional bool?
thats a thing?
sure - you can make arrays of anything; why not bool?
ohh true
if you really want to do it with N 2-dimensional arrays like you're doing, I'd just use a 3 dimensional array instead.
int lines[][3][2] = {
{{0,1}, {2,3}, {0,0}},
...,
};
then instead of line1 you'd use lines[0], etc
and that's able to be looped over with just a regular for loop at that point.
yep.
why didnt i think of that
i will try that
thank you for the help!
okay but first what you had up there seemed a lot cleaner
how does that work
why are you using 5,4 and 4,5
I don't have to, I could use 5,5 for both - but only 4 points on each line have a right neighbor (the 5th of the 5 points on the line has nothing to the right of it)
likewise, only 4 points on each column have a below neighbor
between those two arrays, they tell you whether each of the possible 40 line segments have been drawn
you could make it an array of int instead of bool and store which player drew that line segment, too - 0 means no one, 1 means player 1, 2 means player 2, or whatever
ohhhhh
wait shouldnt the second array also be 5,4
or am i understanding this wrong
@wicked hollow
no - the first one is 5 rows, each of which has 4 columns on which there is a right neighbor to which you can connect.
the second one is 4 rows, each of which has 5 columns on which there is a below neighbor to which you can connect
@jovial island
oh okay
so how would i keep track of when someones made a ox
box
is a box a single cell, meaning they've got a line from (row, col) to (row, col + 1) and to (row + 1, col) and one from (row, col + 1) to (row + 1, col + 1), and one from (row + 1, col) to (row + 1, col + 1)?
in other words, in your 5x5 map, are there exactly 16 boxes?
then you could go with int box_claimed_by_player[4][4], and put a 0 in a cell if no one has claimed that box yet, and a 1 if player 1 has claimed it, and a 2 if player 2 has claimed it
and each time a player puts down a line segment of length 1, it could complete up to 2 boxes (a horizontal line could complete the box above or below it, a vertical line could complete the box left or right of it), so you check each of those two boxes to see if they're done now, and if so you record that the player claimed that box
so besides recording if they are done or not, would i see if they are done or not by looking at the [5][4] and [4][5] array
or is there a better solution
that's how I'd do it - each time a line was put down, figure out the one-or-two boxes it could have completed, and then check the [5][4] array and the [4][5] array to see if each of those 1 or 2 boxes are done now.
need to update this otn to f1re's current discord name lol
hey wait, your name is the same as f1re's name
oh okayy
dpet 3d
probably shouldn't be named dpet. i don't have any better names tho
making animations should be quite fun
Looks lol ..a strange
What????????
so hard to take something seriously when it says "create an advanced code"
my teacher is certified insane
I would like one (1) advanced code please and thank you
Who hired this person
i did
Oh my advanced code in BASIC for irony
hah
which school is hosting this clown shit lmao
ok but what if the due date is 1st october and not 10th january
that's actually something that I would put together as a cheap joke
lol yeah not asking you to dox yourself
yeah then it's doable :P
my teacher is weird and puts day before month
learned that the hard way
Isn't that a standard thing in most of the world except the US?
yes
damn americans
Lol
It was assigned on Friday
what about your classmates
just hit them with the classic```py
def predict_groot_speech():
return "I am Groot."
LMAO
They arent doing it
Then we are groot
Maybe you could ask in #data-science-and-ml. They might know of some quick and easy toys you could make that technically satisfy the requirements.
It was literally assigned yesterday
ok
That doesn't make sense though. The software that the rubric is asking for is something that governments and corporations alike would kill to have.
Not to mention that creating a program to predict the actions of a real person seems comically unethical
perhaps she works for the government
Depends on how you interpret it.
I just gave the instructions
I dont know what to tel you
create a giant list of common phrases, then just have a thing that chooses a random phrase, throw some random tensorflow stuff in there that does something completely irrelevant, and stretch some useless piece of code over the remaining hundreds of lines of code
/j
adding some random tensorflow stuff would mean it technically has ai
wtf is tensorflow
For example, imagine a computer vision thing where it watches you wave around a pingpong ball on a stick. It's mathy, but curve prediction is a thing. Not something I'd recommend to a beginner at any rate.
I started python 3 months ago
Ai lib for python
There's something very off going on here.
me doing if else statements
You got the assignment Friday, and were asked to deliver by Monday 1000 lines of code?
yeo
professional developers might write 1000 good lines of code per month
dont know what to tell you
This Juliana person is not doing their job right
not per weekend. and not after 3mo of learning
how do you know her name????
Are you in HS ?
the screenshot
Wait, so like 9th grade? aka 14yo ish ?
yea
this is beginners intro to python in 9th grade
Yeah, that's BS. Take this to your parents kick them in the ass and tell them to go to the school and protest.
with you, or the school?>
they expect me to get straight As no matter what
with me
Why doesn't she have you solving something easier? P vs NP, for example.
they said I must not have paid attention during the previous classes
ol
but I can show them the homework
because as someone that has a 15yo in school, who I expect to get straight a's in school, I would be pissed if a teacher gave that assignment
it was literally simple stuff like if else
lmfao
yeah at least then you get a million dollars
How gona a freshman make an ai
She was like "I shared a doc with you all with the instructions for the final project. Open it now and you can have the last 5 minutes to get started"
Implement using an existing framework?
Ur teacher is crazy lmao
fax
She might have made a mistake or something
Now how u gonna do
and what did she respond with?
"But Miss, it's not April."
Copy other people code?
She just wrote the instructions again in the email
no one else is doing it
they are accepting the F in the class
it is worth 35% of final grade
I do but before doing that I read the comments and understand what the code does
?
Just write some bullshit and maybe she’ll pass you for submitting anything at all
the rubric was 100 or 0
write some random statement generator, hide it somewhere in a mess of tensorflow stuff, and hope for the best
I know
you fulfill all the requirements perfectly or you fail
just a big list of things people would say
maybe make it in some weird way so she doesn't see
thats probably what Im going to do
No, it's pass fail. 100/0 means that either you pass and get 100 or fail and get 0.
Well it’s ultimately her decision what score to give you, so she might just be lazy and pass you for submitting anything
Also the requirements are really vague
except for the fact that it must respond to questions and statements like the person would in real life
Claim that such a program is impossible due to the existence of free will lmfao
I can dm you some random code in tensorflow that I just copy/paste from stackoverflow and change things around until it doesn't have errors
maybe
actually
thats what Im doing
just gotta pass the Turing test I see ez claps
print("Function is not possible because of free will")
Also don’t a teacher’s bosses look into things if they end up failing all or almost all of their class? AND the students are saying they were giving an inappropriate assignment
I'll come back around to narrowing the field of play. The assignment is meant to create something that acts like a person. Acts like them doing what? What about playing a game? What move is a given person most likely to make given the state of the game? Statistics. Then just choose the most likely move or near to.
Are your parents like computer illiterate?
Hard code
Make a program that simulates your future decisions. Whenever you ask it any question, have it say "I can't talk now, I'm working on an impossible assignment."
we are pretty much supposed to create a replica of a person in python is what she told me in the email
Hard code the anwser
Like the teacher is a moron for assigning this to an intro class where 1/2 the kids can't even write tic tac toe. But wtf is up with your parents not having your back here.
lmfao
Yeah
I couldnt believe she signed off like that
They probably don’t know what they’re looking at
welcome to clowntown USA 🤡🤡🤡
yeo
Best idea: Simulate yourself, and have it answer every question with "I'm too busy learning AI to talk right now." 😄
lol
That's my only guess, but really, it still doesn't sound right.
Brilliant
I worked with dialogflow before
Ok, so, given the parameters of your assignment here is what you should do:
I will just walk into the room and tell her that I made a tangble hologram while coding
You want your program to be able to take input, and deliver answers. No problem you can do that.
Why not just hard code the anwsers and hope for the best
It has to respond to questions
I'll convince her I am a hologram
tf kind of assignment is that
Maybe you could just do a lot of if/else statements
You want it to "learn" Ok, no problem have it remember answers to questions. and use them.
ok how about this
Don't worry about what machine learning is.
put ur phone in a box
Yeah, I mean if your kid says "hey my teacher gave me a wildly inappropriate assignment and I don't think it's reasonable within the scope of the course", to hell with if you understand the assignment yourself. Listen to your damn kid.
worry about what a machine learning is.
I will submit google
I will open a new tab on my pc and hand it in
Animal guesser.
and ask ur teacher to talk to the boz
actualy
ez A+
I'll hand in an echo dot
lol
Lol will u pass it
yes
lmao
ooh, easy peasy: Simulate Kanye West. Whenever someone says anything to the bot, he responds with "I'ma let you finish, but " and then says some random nonsense
ahhahahahhaha
lol
1000 if statements.
if input() == "do you like fish":
print (answers['do you like fish'])
also works
if question is unknown say " I don't know, what is the answer', and them store the answer for when they ask again.
you only need about 500 if statements for 1000 lines in that case
and if that is not sufficient take it to the dean, headmaster, principle, local super hero, or whatever god king is lying around.
but better safe than sorry
well there's a python chatt bot module
I made an ai bot for a project once ago and it's requirements was reply a info for each message passed through dialogflow so I did this
Receive request from dialogflow with a webhook and pass it to a Google search Api then push the first results return back to it
!pypi ChatterBot
Fundamentally, if you do this project correctly: it's under 100 lines, if you do it badly it's over 1000 lines.
You could probably just include that package, and then just write some random nonsense for the remaining lines
Well and this passed the test
What's your dad's phone number, let me give him a call and tell him he's an idiot.
🙂
Sure that would go over well.
Don't
Some people have no business teaching coding.
Does the phrase "markov chain" ring any bells? 3 months of learning Python might be enough to create a markov chain generator that generates random text based on things someone has said in the past.
Ah hal ...sorry teacher I cant do that
for 12-14 yo kids that have never done any programming before? prob not.
over a single weekend with no help from the teacher?
Well I learned python myself and I hate when people handle me impossible assignment. P.s I have thought of some impossible idea before
I mean, I'm thirteen, and I technically have created an AI before
But that assignment is just ridiculous
I have only made a discord bot and some simple Api
I've written too many discord bots
And I know how to setup gitea and nginx to reverse proxy
I figured out how to get SSL working on Apache, but it took a lot of pain and 45 minutes
you don't need to know much more than dictionaries and loops for it
it'd be tough, but doable, I think.
probably easier than using an ML library
certainly easier, in fact
yeah that was my suggestion.
You could maybe just use fuzzywuzzy and get the closest result of the input with a set string and respond with the answer to that string and it would be good enough
I have learn classes function variables and a little bit of asyncio just to make my bot and it's also why I started to learn python myself
but still 2 days to write 1000 lines of code in your freetime for kids that prob haven't written more than 30 lines in a row before?
yeah. it feels like a tonedeaf joke on the teacher's part to me.
in class Monday: "so what did we learn about refusing bad assignments?"
Lmao
@wicked hollow have you used sfml before
if one really wants to build a simple chatbot using no Machine Learning/DL then they can still use quite many tricks
a simple one would be to leverage something like ELIZA https://web.njit.edu/~ronkowit/eliza.html
otherwise its still quite possible to use DL for a medium-level chatbot - the problem is that you won't understand any of it atm; but would still get the job done 🤷♂️
Universities offered themselves to be a place of learning where most resources are, in terms of many fields like medicine etc unis aren’t exam. But for programming it is
like Aboo said, YouTube can be a great place to learn, but how people learn varies from person to person.
^
You can be self taught by yt yes, but unis are necessary too
Also, are you speaking from any experience?
some people actively excel in a school environment where there is a knowledgable instructor there to guide you.
does everyone? no. i do not, but i am not everyone.
Whilst degree is a certificate of what you learnt. Many top companies are now understand that what universities offer is obsolete. In terms of computer science, You can learn most of the stuff from YouTube. And if you are talking about learning from a person lol Universities is the worst there’s bloody 300 students in a classroom with one lecturer give a lecture for 2-3 hours
If you expect to get a job by programming, you probably need a degree which you won't get from. Yt
Thats a personal preference
Whether unis are a scam are not, going to one is still pretty damn useful for Comp Sci jobs
I have a few friends that learn very well in a structured school environment
i am the last person who will be defending the school system trust me haha.
Youtube isn't my go-to for programming tutorials either
On programming, most universities now offer a online based video where you can pace yourself and learn. And many students prefer that and so if you look at that from majority point of view universities are essentially scam for computer science, you are basically paying in the UK £27k for a certificate and most of the knowledge can be learnt online and even far better knowledge
yeah.
Yes
I don't know of any company where it's not easier to land an entry level software dev job with a CS degree than without one.
I think it also depends on where you live, where I live it's very hard to get a job without a degree,there is always a minimum education
For example, Lucas tutorials
what experience are you speaking from?
well i mean, getting a degree and actually learning something are not necessarily going to happen at the same time.
Like I said above, it really depends on what environment you'll personally learn better in
and on the flip side, there are definitely companies where it's not possible to get an entry level SWE job without a CS degree.
The fact that my brother does Computer Science and Maths at a top university here and I can see his modules. The maths modules are actually good so my point stands that anything with maths, medicine and research universities are really good. But for programming it’s basically a scam considering his modules
and like I said, I have a few friends that'll learn better in a school environment, as opposed to self-learning
Whether the content is good or not, it's still pretty useful to go to university for (comp sci) job purposes
And like I said in universities there’s 300 students with one lecturer give lecture for 3 hours
And theres nothing inherently wrong with that
I understand it if it’s a small class
implying you cannot talk to the teacher after class.
And I’d prefer that too if ‘twas small class say 20-30 people
I learn better in self learning, but when the self-learning relates to online classes, then i instantly procrastinate and fail...
I mean, thats your preference
Like hell you can’t tell me you will focus for more than 1 hour the lecturer keeps on talking this is why most Unis provides a online platform where you can view the lecture lol
And pace yourself
You might gain more knowledge from yt than uni, but you will most likely not get a comp Sci job when they ask if you have a degree and you say you studied all of Corey schafers tutorials
those teachers also have office hours, and TAs who are available to answer questions. Plus labs and recitations.
I have a friend that learned absolutely nothing with a few months of being self-taught, I on the other hand self-learned the majority of my current programming knowledge, it falls down to how you absorb information
this is true
Universities are essentially scam and most companies are now starting to realise. Heck people are getting top class programming jobs by learning algorithms etc and completing online modules like on EdX
other people might have better focus, you can't really speak for everyone
I am self-studying Japanese, but that's different from code.
University's are not a scam dude
I can actually, study shows that most people can keep a continuous focus for 30-50 minutes
i think we are just starting to repeat ourselves. @languid osprey
This is why in a small class you tend to have a little break after 50 minutes
But hell, university is expensive here
conversation seems to be going in a circle, yes
I mean, the student loans suck but scam? No
IKR
unis may be expensive, yes, but you can't deny that a degree is useful
Okay lets say they are a scam for thr sake of discussion, what makes you think recruiters are realizing that
Universities are hella expensive and considering the knowledge they put out it’s a scam. They should offer something greater
Like a degree?
cs50 is a college course, and its good
Someone with a degree will have less experience than someone with no degree but actually completing projects and been coding
The knowledge? your reading fake news obviously.
who said you can't do projects while getting a degree
And what fake news Am I reading
Prob not
IKR
Its not like college doesn't give you experience
uni is a pipeline, take advantage, or don't 
I mean depends are you able to balance the work pressure from uni and do a project at the same time?
regardless of whether you could learn the material without going to uni, the fact of the matter is that having the degree will open doors that you will not be able to open without it.
Not saying you can’t
yes
We have people that are in college in this server
I'm 13 :|
I'm 21
People aren't going to stop going to college, whether its a "scam" or not
I'm 36. We've got people of all ages.
IKR
indeed
It will open doors and open new networks, but what I’m essentially saying for programming it’s essentially pointless, the stuff they teach is what you can find on YouTube and other sites like edX
its not "pointless", because you get a degree
Ok you can get a degree that is non CS and self learn CS like I did and do IT projects for the Uni even as a volunteer for a research project I eventually got absorbed by the Uni IT dept that way lol. Later with job experience the Degree matters less
Uh, youtube is not the best for programming, you still need a degree.
And you pay how much for that degree?
when you get absorbed by a university.
I'm approximately one third jolly geek
Depends on where you live
what I'm saying is that it's not, because it opens doors and exposes you to new networks, and to opportunities like internships
People are going into debt by paying for the degree lol
Sure, but thats not invalidating my point
So? you can get out of debt
what the fuck? i thought you were like 20.
And that is my point universities are scam well in terms of programming
My point is that a degree is useful, whether its going to put you in debt or not
your total life earnings will be greatly affected by your earnings in the first few years of your career
Like heck people get a degree from law and move to programming
Sure, why not
So what was the point of the law degree you just wasted your money
But they DID get a degree
with this logic, just don't go to college
i also know plenty of experienced people with industry knowledge and experience that have been hindered from climbing up the ladder bc they never finished their degrees
well, you were previously under the assumption that you were going into law, but you eventually changed your mind.
in the US, a CS degree will cost you somewhere between $60k and $120k on average, depending on the college. Entry level software developers command salaries of around $100k per year. Most people I know who graduated with CS degrees paid off their loans within 3 years.
Well if your point is your ganna pay a lot for just a degree which is basically a paper
I have a Chem degree and im in IT
Then lol
It's NOT just a paper
I see this mindset a lot on reddit
the paper is meaningless, you can burn it if you want
its the degree part thats important
Yes.
you can't deny that a degree is useful :P
Well so my point is you don’t need a degree for programming actually, if someone can get a degree from law and move to programming that easily
You can think of a degree as your way to land a job
Its useful as a baseline
Then why need a degree in cs?
None of us are saying you "need" it, we're just saying it can be very useful
cannot get a degree if you do not get one. 
do you think a law degree is easy lol
Also, you can't say that all college programming courses are bad





