r/ProgrammerHumor • • Oct 26 '21

GitHub Copilot, the technology that will replace programmers. Also GitHub Copilot...

27k Upvotes

713 comments sorted by

View all comments

Show parent comment

-11

u/Careless-Childhood66 Oct 26 '21

lol no. This must be the most misinformed post ever made

-1

u/arvyy Oct 26 '21

call me when you get your hands on a computer with literally infinite memory, I'll wait

4

u/lasiusflex Oct 26 '21

you can always download more

-5

u/Careless-Childhood66 Oct 26 '21

A finite automata is not capable to process recursion, my computer can process recursion, hence it's not a finite automata.

Learn the difference between automatas, stack machines, turing machines etc pp.

What's your point with infinite memory? Have you ever heard of while(true) or f(n) = f(n)? You know the stuff no finite automata can do but your computer can...

2

u/arvyy Oct 26 '21

Finite automata has finite number of states, just like your computer with finite memory has finite number of that memory possible states. You transition from one state to another using input of time; time only flows forward and just like automata also flows forward.

What's your point with infinite memory?

The point is this

A machine with finite memory has a finite number of configurations, and thus any deterministic program on it must eventually either halt or repeat a previous configuration

 

Have you ever heard of while(true) or f(n) = f(n)? You know the stuff no finite automata can do but your computer can...

so you have a computer, which has while(true) encoded in its memory somewhere. With our input of time, that computer arrives to same memory state, ie repeats. Therefore we can tell it's non-halting.

A finite automata is not capable to process recursion

the recursion is already processed by means of hardcoding it all into states and transitions. And we can get away with this hardcoding, because we only have finite memory to deal with

-1

u/Careless-Childhood66 Oct 26 '21

What the actual fuck? You are mixing up so many different concepts, I don't even know where to start, so I will just say that: you cannot hardcode every possible state, because you d have to hardcode every possible state transition. If you just say state s holds a random number, and a subsequent state t holds another random number, to hardcode this relation you have max number to the power of max number states. When you increase your memory to hold more states, you increase the max number,maybe lookup goedel numbers.

Youd never be able to model that algorithm using a finite machine, becuase your state transition sequence ought to be deterministic, which my above algorithm is not, yet you'd be able to easily model above algorithm with a turing machine, which is the underlying model for any computer today, hence again, a computer is not effectively a finite machine.

Here, pls reread what a finite automaton is:

https://en.m.wikipedia.org/wiki/Deterministic_finite_automaton

Now reread what a turing machine is:

https://en.m.wikipedia.org/wiki/Turing_machine

What is this sub??

5

u/arvyy Oct 26 '21

you increase your memory to hold more states

states aren't part of memory they model

yet you'd be able to easily model above algorithm with a turing machine

alright, so you solve the non deterministic problem with a non determinsitc "turing machine", which has an equivalent determinstic "turing machine". I just take that deterministic machine, and encoded all states for each possible combination of that machines cells' values / position of the head with deterministic transition that follows it. Why is it possible? Because it wasn't actually a turing machine, that's the whole point, it lacks the "infinite tape" part. Turing machine has infinite memory, and real world computers don't

1

u/WikiSummarizerBot Oct 26 '21

Deterministic finite automaton

In the theory of computation, a branch of theoretical computer science, a deterministic finite automaton (DFA)—also known as deterministic finite acceptor (DFA), deterministic finite-state machine (DFSM), or deterministic finite-state automaton (DFSA)—is a finite-state machine that accepts or rejects a given string of symbols, by running through a state sequence uniquely determined by the string. Deterministic refers to the uniqueness of the computation run. In search of the simplest models to capture finite-state machines, Warren McCulloch and Walter Pitts were among the first researchers to introduce a concept similar to finite automata in 1943.

Turing machine

A Turing machine is a mathematical model of computation that defines an abstract machine that manipulates symbols on a strip of tape according to a table of rules. Despite the model's simplicity, given any computer algorithm, a Turing machine capable of simulating that algorithm's logic can be constructed. The machine operates on an infinite memory tape divided into discrete "cells". The machine positions its "head" over a cell and "reads" or "scans" the symbol there.

[ F.A.Q | Opt Out | Opt Out Of Subreddit | GitHub ] Downvote to remove | v1.5

0

u/Western_Top6639 Oct 26 '21

he/she/they/them just got schooled

1

u/HannasAnarion Oct 26 '21

eventually either halt or repeat a previous configuration

Yeah, so what? Whether a program has repeated a configuration doesn't tell you whether it will halt or not. The derivation of the undecidability of the halting problem does not rely on an infinite state machine.

2

u/arvyy Oct 26 '21

That quote is from wikipedia you can control+f for more context https://en.wikipedia.org/wiki/Halting_problem

the undecidability of the halting problem does not rely on an infinite state machine

the halting problem is expressed through Turing machines (or equivalent), which do have infinite memory

1

u/HannasAnarion Oct 26 '21

And the halting problem in reality is understood within the scope of systems with gigabytes of memory, that can be arranged into new configurations until the heat death of the universe happens billions of times over.

2

u/arvyy Oct 26 '21

in reality is understood

sure, but we started with "theoratically decidable" ¯_(ツ)_/¯ yes, it's all just a thought experiment, no one says it has any practical merit

1

u/HannasAnarion Oct 27 '21

It is still not theoretically debatable, because the proof of the undecidability of the halting problem lies in the paradox established by the supposed existence of a halting detector.

If there were such a thing as a program that could predict the halting behavior of another program, you could use it to write a 2nd order function that starts looping if the detector says that it will halt, and will halt if the detector says that it will start looping. Running this program on itself then creates a paradox: when it will halt, it loops, and when it will loop, it halts. This is a paradox. Thus, a general solution to predicting computing behavior is impossible. No infinities necessary.

2

u/arvyy Oct 27 '21

If there were such a thing as a program that could predict the halting behavior of another program

but we're not predicting a halting behavior of a program (directly) -- we're predicting halting behavior of a runtime environment inside which that program is "running". The runtime is in a sandbox, it cannot use halting detector that lies outside of it. I'm not certain about right phrasing, but the way to go I think would be to show that trying to construct

2nd order function that starts looping if the detector says that it will halt

would involve trying to emulate whole runtime environment -- which would encode your input function (since that's what halt detector operates on) -- inside that same runtime environment itself; which isn't possible when we've defined it to be of finite size. And then since you can't construct that higher order function, you can't construct the paradox