irb(main):005:0> require prime
NameError: undefined local variable or method 'prime' for main:Object
Did you mean? private
from (irb):5
from /usr/bin/irb:11:in '<main>'
In this challenge, I have a field of avocadoes which I'd like to juice as quickly and completely as possible. Can you write a program or function to help me work out how to juice all the avocadoes perfectly?
As input, you'll get the avocadoes as an mxm square grid, where m is an integer between ...
Lost in Space: Help me get back to civilisation
code-golf
Your spaceship's radio receives a transmission from an unknown location:
To anyone who picks up this transmission, I need help!
My hyperdrive malfunctioned during a routine jump to
the PPCG Planet. I survived the drop from hyperspace,...
@Downgoat You are using alert colors for elements, that's a design no-go. Take a look at GitHub. There's a concept of a primary color. Something that doesn't need a color doesn't get one, like the counters.
@DJMcMayhem you seem smart. What exactly must a language be able to do in order to be TC. khanacademy.org/computer-programming/melang/5474968288952320 is my current version of a lang for a contest and i need to know what i have to add to make it TC
In computability theory, a system of data-manipulation rules (such as a computer's instruction set, a programming language, or a cellular automaton) is said to be Turing complete or computationally universal if it can be used to simulate any single-taped Turing machine. The concept is named after English mathematician Alan Turing. A classic example is lambda calculus.
A closely related concept is that of Turing equivalence – two computers P and Q are called equivalent if P can simulate Q and Q can simulate P. The Church–Turing thesis conjectures that any function whose values can be computed by...
IIRC, the tape was represented using a large pile of monsters. A monster with one health is the first cell, a monster with two health is the second cell... You read the tape by killing every monster and having the dead guy execute its death action, and you write to the tape by creating a new guy and having everyone give him one health.
@ChristopherPeart I'm not really the right person to ask, but an easy way to prove a language is TC is by using it to interpret something TC (like brainfuck or a Minsky machine)
@ChristopherPeart If you can modify a theoretically infinite amount of memory, and run a chunk of code a variable number of times (0 through Infinity) than it's probably TC
I have troubles explaining the concept of past / future to my son. He certainly has some idea of time by now, but can't express it correctly. He has picked up the word "tomorrow" and uses it for both future and past. A typical conversation goes like this:
Kid: tomorrow I had carrots for lunch...
> The brainfuck language uses a simple machine model consisting of the program and instruction pointer, as well as an array of at least 30,000 byte cells initialized to zero;
> It has been argued that Malbolge is a bounded-storage machine with interactive input; that is, that it is Turing-complete. The difficulty in showing this, however, is in showing that 59049 memory words are enough to implement the FSA that simulates a universal Turing machine, as practical Malbolge programs consume lots of memory. But thanks to Hisashi Iizawa, who wrote a 99 bottles of beer program in just 21945 instructions of Malbolge code, there are now arguments favoring the BSM hypothesis.
> In the classic distribution, the array has 30,000 cells, and the pointer begins at the leftmost cell. Even more cells are needed to store things like the millionth Fibonacci number, and the easiest way to make the language Turing-complete is to make the array unlimited on the right.
well, no, my Ruby implementation is a lego NXT drawing chalk marks on the street in front of my house. If it runs out of roads, it will wait until more are built.
Determining whether a Language is Turing Complete is very important when designing a language. It is a also a pretty difficult task for a lot of esoteric programming languages to begin with, but lets kick it up a notch. Lets make some programming languages that are so hard to prove Turing Compl...
So anyway, Idea: language where the interpreter is a polyglot in a bunch of different languages, so the same source file implements a bunch of different TC langs, but due to how things are they are considered the same lang