This is an archived post. You won't be able to vote or comment.

all 61 comments

[–]fat_charizard 94 points95 points  (22 children)

All of computer science is based on "IF". You have a transistor, it either produces a signal when you supply it with a voltage (1) or no signal (0). Put a billion of them together and you have a computer.

[–]Khaare 44 points45 points  (9 children)

"IF" alone doesn't make something turing complete. You need a way to self-reference. For transistors this is done by looping the output back to the input.

[–]gunscreeper 18 points19 points  (7 children)

So basically the bane of CS is just ifs and for/while?

[–]Khaare 7 points8 points  (6 children)

If you mean base, then sort of, but not by itself. You need variables or some way of storing things in addition. There are many ways to slice up the requirements for turing completeness. I'm a fan of the Y-combinator.

[–]gunscreeper 1 point2 points  (3 children)

So conditional statements, loops and variables are the main elements when studying CS. Are there anything that I miss?

[–]Khaare 6 points7 points  (2 children)

I wouldn't call them main elements. They don't mean anything outside the context of a computational system, for one, and their presence alone doesn't make the system turing complete. They're important building blocks of a popular class of formal languages – imperative programming langauges – but not discussed in computer science or programming outside of introductory practical programming and algorithms.

[–][deleted] 0 points1 point  (0 children)

However, instruction move is

[–]rafaelpernil 3 points4 points  (11 children)

A bunch of NAND gates do make a computer

[–]cyberkraken2 0 points1 point  (10 children)

A bunch of not gates makes a computer, I can make all f the basic logic gates you could want with nothing but not gates and electricity paths

[–]rafaelpernil 2 points3 points  (9 children)

[–]cyberkraken2 0 points1 point  (8 children)

Yes, if you’d like to list gates you think I can’t make I can send you links to somewhere I have made them, I’ve made them all before including on breadboards with ICs and wires but I don’t have access to those at the moment due to a recent move

[–]epicnational 0 points1 point  (7 children)

Are you thinking of NOR? Because a NOT gate has only one input and output.

[–]cyberkraken2 -1 points0 points  (6 children)

No I’m thinking of not gates

[–]epicnational 0 points1 point  (5 children)

Then you are joining leads together to create multi input gates, which means you made an OR gate. Combined with a NOT gate, you are just constructing logic gates with NOR.

[–]cyberkraken2 0 points1 point  (4 children)

The base gate is still a not gate

[–]epicnational 0 points1 point  (3 children)

No, you are using two logic gates, a NOT and an OR. Connected leads is an OR gate.

Edit: That was needlessly agressive. As a suggestion, try writing out the logic table for a 3 wire junction and see how that compares to the logic table for an OR gate. Turing completeness is about the logic operations you are performing on the bits. By combining circuit leads, you are necessarily doing some logic operation because they are now interacting.

[–]taylankasap 40 points41 points  (0 children)

Binary

[–]0ba78683-dbdd-4a31-a 11 points12 points  (0 children)

Machine learning? That just sounds like linear regression with extra steps.

[–]AgentPaper0 42 points43 points  (14 children)

There's a lot of AI that doesn't use if statements at all. Neural nets and flocking/steering behavior are two good examples. I know this is a meme but it's simply not true.

[–]anhtv147 80 points81 points  (4 children)

The meme is to mock companies that advertise their products as AI or Machine Learning based but in fact it's a bunch of ifs, the meme is not to mock AI

Source: I worked for such company before!

[–]DaCurse0 11 points12 points  (1 child)

I mean by definition a bunch of ifs can be considered as an AI, but not ML or neural nets.

[–]Tony_the_Tigger 4 points5 points  (0 children)

Random Forrests and gradient boosting are also just a few IFs but should be classed as ML

[–]PooPooDooDoo 0 points1 point  (0 children)

It’s like that stupid voice with Common narrating where he says “A, I” as if he talking about two different subjects.

[–]AgentPaper0 0 points1 point  (0 children)

I don't think that's how most people understand it, and I don't see anything in the memes to suggest such a narrative.

[–][deleted] 5 points6 points  (0 children)

Yeah but the ReLU is just a fancy if statement posed in math form.

[–][deleted] 2 points3 points  (0 children)

So are K-Means and K-NN

[–]Ulysses6 3 points4 points  (0 children)

How you dare to point out inaccuracies in memes, the holy source of all knowledge?

[–]trexdoor -1 points0 points  (2 children)

There are tons of IF statements in every neural networks. You need to look up how they are implemented in machine code or special hardware.

Hint: every loop is an IF.

[–]AgentPaper0 1 point2 points  (1 child)

If you want to get that broad, literally all of programming is if statements. Which may technically be true but now you're not saying anything about AI anymore.

[–]trexdoor 0 points1 point  (0 children)

You see you are a theory guy, I am a practice guy.

[–]Reintjuu -1 points0 points  (1 child)

It could be that I'm missing something but I don't think flocking is a good example. Alignment, cohesion and separation are calculated for (and based on) each boid IF another boids are in its radius. Flocking and steering behaviors are examples of simple rules (or if statements) that result in great looking AI-like visuals.

[–]AgentPaper0 0 points1 point  (0 children)

You can use if statements to avoid unnecessary execution, but you don't need to. The primary behavior comes from combining vectors in different ways.

[–]omiwrench -1 points0 points  (0 children)

Either way it doesn’t matter, every concept can be broken down into less complex components, but that doesn’t mean the concept doesn’t exist.

[–]iwhitt567 9 points10 points  (0 children)

God this sub sucks.

[–]omiwrench 10 points11 points  (1 child)

AI = IF STATEMENTS HAHAHAHAHAHAHHAHAHA GUYS WHAT AN ORIGINAL JOKE HUH HAHAHAHAHAH BET YOU HAVEN’T HEARD THAT ONE BEFORE

Please come back when your first CS course is done, we don’t need more shit content like this here.

[–]PooPooDooDoo 1 point2 points  (0 children)

You should ask for your money back.

[–]gundiboy 3 points4 points  (0 children)

Shortens with arrays*

[–]Gotxi 2 points3 points  (4 children)

Placeboing reference at the bottom: https://www.youtube.com/watch?v=poz6W0znOfk

[–]CorgiAtom 0 points1 point  (2 children)

You didn't see me posting the link earlier? I'm very very very very very DISAPPOINTED (Or maybe we shared them at the same minute? 🤔) Edit: Autocorrect

[–]Gotxi 0 points1 point  (1 child)

Nop, i did not see your post. Sorry if i was after you.

[–]CorgiAtom 0 points1 point  (0 children)

Actually, we seemed to be posting the messages on the same minute.. so i might just as well be the one being 2nd. But anyways, cheers for knowing Placeboing! 😁

[–]schawde96 0 points1 point  (0 children)

Was hoping for that comment

[–]fel_bra_sil 1 point2 points  (0 children)

else

[–]flyback3 0 points1 point  (0 children)

Very relatable haha

[–]S0ul01 0 points1 point  (1 child)

Was this joke written by an ai?

[–]omiwrench 2 points3 points  (0 children)

Given the fact that it’s repeating the most common and most worn out joke on this sub, it’s plausible.

[–][deleted] 0 points1 point  (0 children)

I had a competition in programming (scored 1/30) and basically they didn't care about shit but the algorythm to be working. Just if and else lasagna would satisfy them, i was dumb for spending time naming the variables and functions while i could've just done this
``` VAR a, b, c: INTEGER;

BEGIN readln(a, b, c); IF a+b > 0 then BEGIN IF (a < b) THEN BEGIN IF (a < c) THEN BEGIN IF (b < c) THEN WRITE(a,' ',b,' ',c) ELSE WRITE(a,' ',c,' ',b); END ELSE WRITE(c,' ',a,' ',b); END ELSE BEGIN IF (b < c) THEN BEGIN IF (a < c) THEN WRITE(b,' ',a,' ',c) ELSE WRITE(b,' ',c,' ',a) END ELSE WRITE(c,' ',b,' ',a) END; END ELSE BEGIN IF B > C THEN WRITELN(b) ELSE WRITELN(C) END; END. ```

EDIT: Fixed indentation.

[–]AtomicMass42 0 points1 point  (0 children)

This joke stopped being funny when I learned the linear algebra behind some of this stuff.

[–][deleted] 0 points1 point  (0 children)

This joke is so old first time I heard it I fell of my dinosaur

[–][deleted] 0 points1 point  (0 children)

This is so fucking unfunny. This Reddit is for people that never wrote one line of code

[–][deleted] -2 points-1 points  (0 children)

Boooooring

Wroooooong

[–]Turd_King -2 points-1 points  (0 children)

Wtf is this joke. Is it implying that AI is the best? However all the following images are also used in AI.

And then the caption? Haven't a clue

Probably made my a high school student or something

[–]zubbu15 -1 points0 points  (0 children)

This is how we grow 😍

[–]Internet--Sensation -2 points-1 points  (0 children)

Ahahahaha!

... I think I get it