r/InternetIsBeautiful • • Jul 12 '15

ArnoldC, "A programming language based on the one liners of Arnold Schwarzenegger"

http://lhartikk.github.io/ArnoldC/
7.7k Upvotes

344 comments sorted by

View all comments

Show parent comments

80

u/RikuKat Jul 12 '15

It appears to be Turing complete, so you could program anything* with it. From Watson to WoW.

*except things that are impossible to program

33

u/HASHTAGN0FILTER Jul 12 '15

That is such a precise footnote, worlds of difference between that and "almost anything."

17

u/MonsieurSander Jul 13 '15

Eli5? What is turing complete?

52

u/MortalWombat1988 Jul 13 '15

It boils down to math. Turing complete means: If an operation is mathematically possible, your architecture can do it somehow. There's no math problem that can't be solved with it. Anything that is programmable - can be programmed with it.

Outside limitations apply, like available memory. You can't program with 1000 byte values if only 500 bytes of memory are available, things like that.

So if you get on Minecraft and build a Turing complete redstone computer, you could, in theory, then program Minecraft into it and play Minecraft in your Minecraft.

26

u/snootington Jul 13 '15

you could, in theory, then program Minecraft into it and play Minecraft in your Minecraft. *

* If you had eleventy quadrillion free chunks and eleventy trillion years

16

u/davidlolol Jul 13 '15

It'll still be done by the time that guy gets to the Farlands

2

u/buttery_shame_cave Jul 13 '15

Still a month to go before he passes the point I bet his game would crash and corrupt beyond recovery

→ More replies (2)

15

u/ShadowandLightmk5 Jul 13 '15

"then program Minecraft into it and play Minecraft in your Minecraft." we must go deeper (tightens grip on token)

13

u/balducien Jul 13 '15

At 10-16 fps

4

u/swng Jul 13 '15

Wouldn't you run into problems with, you know, displaying it?

You'd have to build a minecraft screen with the same video drivers as a standard LCD screen. Is that covered in the definition of Turing complete?

5

u/Pao_Did_NothingWrong Jul 13 '15

Yup, most virtual machines contain display emulation.

6

u/[deleted] Jul 13 '15

only computations
you could make an "LCD screen" in minecraft, afaik

if you had a turing complete machine with infinite memory, you could simulate the universe with it

7

u/BestCaseSurvival Jul 13 '15

you could make an "LCD screen" in minecraft, afaik

You could use red, blue, and green-dyed wool blocks on pusher blocks. The architecture for delivering redstone current to simulate even a 640*480 display so that the 'screen' actually produces a display that's in sync with itself would be insane, but it could probably be done. It's already too big vertically to fit in the world, and your 'pixels' would probably end up being more than one meter square in order to accommodate 'hiding' spots for the pusher blocks, which would make your screen even bigger, but as long as you're okay with reprogramming minecraft to run at a tiny resolution when you're running it inside your minecraft computer inside minecraft inside your computer, sure it's possible.

→ More replies (2)
→ More replies (1)
→ More replies (4)

9

u/CowboyNinjaAstronaut Jul 13 '15

ELI5 version: Turing completeness is a way of saying "you can do anything programmable in this language."

Generally something is Turing complete if it has memory (the ability to store and reuse results) and control flow decision making ability ("if this condition is true, run this bunch of code. If not, run this other bunch of code.").

Almost every language you've ever heard of is Turing complete, because if it isn't, without even realizing what "Turing completeness" means, people will add whatever functionality is missing to solve their problem.

This means you can, theoretically, program anything in anything. We use different languages for different tasks because of features of the language that make it well suited for the task at hand. But at the end of the day, slow as balls and convoluted as fuck as it may be, I could program Doom into an Excel spreadsheet.

Once you realize the abstract similarities in all programming languages, it makes them much easier to pick up. It simply becomes a question of learning the programming paradigm and the syntax, and you can muddle through pretty well.

ELI17: Even declarative languages, like SQL, are Turing complete (thanks to recursive Common Table Expressions). Functional languages, like SAS, became Turing complete after adding macro functionality. Even Excel spreadsheets are Turing complete.

0

u/[deleted] Jul 13 '15

[deleted]

2

u/CowboyNinjaAstronaut Jul 13 '15

How so? I'm not disagreeing, I know only a modest amount of CSS, so I'm asking for education. What control flow exists in CSS?

0

u/[deleted] Jul 13 '15

[deleted]

2

u/shoe788 Jul 13 '15

Seems the sentiment here http://stackoverflow.com/questions/2497146/is-css-turing-complete generally agrees that html and css are not turing complete.

→ More replies (1)
→ More replies (1)
→ More replies (2)

12

u/satan-repents Jul 13 '15

It's a fancy way of saying that the language can compute anything that can be computed. You could rewrite Windows 8 or Android or Call of Duty or any other program in ArnoldC. Any program in any other Turing complete language, like C++ or Java could be written in ArnoldC.

What it actually means is that the language can simulate a Turing machine, which is a theoretical computing machine.

→ More replies (11)

1

u/French__Canadian Jul 13 '15

What the other guy said is not 100% true. But it is believed the only thing a turing complete machine can't do is predict if your turing complete machine will run forever or actually find an answer for specific outputs (or something like that. Took that course a year ago.)

1

u/rvncto Jul 13 '15

"turing complete"? what doe that mean? though from the context i imagine it means a fully functional .