Hacker News new | ask | show | jobs
by kragen 912 days ago
i think it's (unintentionally) misleading to describe analog 'computers' as 'computers'. what distinguishes digital computers from other digital hardware is that they're turing-complete (if given access to enough memory), and there isn't any similar notion in the analog domain

the only reason they have the same name is that they were both originally built to replace people cranking out calculations on mechanical desk calculators, who were also called 'computers'

the flight control 'computer' has more in common with an analog synthesizer module than it does with a cray-1, the agc, an arduino, this laptop, or these chargers, which are by comparison almost indistinguishable

6 comments

What do you regard as the first digital, Turing-complete (if given enough memory) computer?

ENIAC, for example, was not a stored-program computer. Reprogramming required rewiring the machine.

On the other hand, by clever use of arithmetic calculations, https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.37.... says the Z3 could perform as a Universal Computer, even though, quoting its Wikipedia page, "because it lacked conditional branching, the Z3 only meets this definition by speculatively computing all possible outcomes of a calculation."

Which makes me think the old punched card mechanical tabulators could also be rigged up as a universal machine, were someone clever enough.

"Surprisingly Turing-Complete" or "Accidentally Turing Complete" is a thing, after all, and https://gwern.net/turing-complete includes a bunch of them.

let me preface this with the disclaimer that i am far from an expert on the topic

probably numerous eddies in natural turbulent fluid flows have been digital turing-complete computers, given what we know now about the complexity of turbulence and the potential simplicity of turing-complete behavior. but is there an objective, rather than subjective, way to define this? how complicated are our input-preparation and output-interpretation procedures allowed to be? if there is no limit, then any stone or grain of sand will appear to be turing-complete

a quibble: the eniac was eventually augmented to support stored-program operation but not, as i understand it, until after the ias machine (the johnniac) was already operational

another interesting question there is how much human intervention we permit; the ias machine and the eniac were constantly breaking down and requiring repairs, after all, and wouldn't have been capable of much computation without constant human attention. suppose we find that there is a particular traditional card game in which players can use arbitrarily large numbers. if the players decide to simulate minsky's two-counter machine, surely the players are turing-complete; is the game? are the previous games also turing-complete, the ones where they did not make that decision? does it matter if there happens to be a particular state of the cards which obligates them to simulate a two-counter machine?

if instead of attempting to measure the historical internal computational capability of systems that the humans could not perceive at the time, such as thunderstorms and the z3, we use the subjective standard of what people actually programmed to perform universal computation, then the ias machine or one of its contemporaries was the first turing-complete computer (if given enough memory); that's when universal computation first made its effects on human society felt

> is the game?

Sure. One of the "Surprisingly Turing-Complete" examples is that "Magic: the Gathering: not just TC, but above arithmetic in the hierarchy ".

See https://arxiv.org/abs/1904.09828 for the preprint "Magic: The Gathering is Turing Complete", https://arstechnica.com/science/2019/06/its-possible-to-buil... for an Ars Technica article, and https://hn.algolia.com/?q=magic+turing for the many HN submissions on that result.

Could you explain "above arithmetic in the hierarchy" in a few words, TIA, never heard of this
Nope. The source page links to https://en.wikipedia.org/wiki/Arithmetical_hierarchy . I can't figure it out.

An HN comment search, https://hn.algolia.com/?dateRange=all&page=0&prefix=false&qu... , finds a few more lay examples, with https://news.ycombinator.com/item?id=21210043 by dwohnitmok being the easiest for me to somewhat make sense of.

I think the idea is, suppose you have an oracle which tells you if a Turning machine will halt, in finite time. There will still halting problems for that oracle system, which requires an oracle from a higher level system. (That is how I interpret "an oracle that magically gives you the answer to the halting problem for a lower number of interleavings will have its own halting problem it cannot decide in higher numbers of interleavings").

This appears to discuss it a bit more. Not certain if it's more helpful than the comment (still going through it), but it does cover it more in detail.

https://risingentropy.com/the-arithmetic-hierarchy-and-compu...

mtg is more recent than things like the johnniac, but plausibly there's a traditional card game with the same criteria that predates electronic computation

but then we have to ask thorny ontological questions: does a card game count if it requires a particular configuration to be turing-complete, but nobody ever played it in that configuration? what if nobody ever played the game at all? what if nobody even knew the rules?

The MtG preprint suggest people have been looking for such games but failed to identify any. From "Previous Work", first page, column 2:

> Prior to this work, no undecidable real games were known to exist. Demaine and Hearn (2009) [10] note that almost every real-world game is trivially decidable, as they produce game trees with only computable paths. They further note that Rengo Kriegspiel {Rengo Kriegspiel is a combination of two variations on Go: Rengo, in which two players play on a team alternating turns, and Shadow Go, in which players are only able to see their own moves.} is “a game humans play that is not obviously decidable; we are not aware of any other such game.” It is conjectured by Auger and Teytaud (2012) [1] that Rengo Kriegspiel is in fact undecidable, and it is posed as an open problem to demonstrate any real game that is undecidable.

> The approach of embedding a Turing machine inside a game directly is generally not considered to be feasible for real-world games [10].

Regarding your ontological question, that we don't know if something is Turning complete doesn't mean it isn't.

People explored the Game of Life before it was proven to be Turing complete. The 1970 SciAm article says "Conway conjectures that no pattern can grow without limit." so Martin and Gardner didn't even know about gliders then. People don't say GoL wasn't Turning complete in 1970.

I pointed to a 1998 paper claiming the Z3 machine from the 1940s was Turing complete, that author clearly believes that a particular physical configuration is not required.

Nor did Turing construct a physical representation for his paper.

FWIW, the MtG preprint gives a concrete example of a 60-card initial deck. I would be surprised if neither the authors nor anyone else has ever tried it.

The ontological question is even more fully resolved because no one has ever created a real Turing machine. We always have the proviso "if given enough memory".

Similarly, the video game "Minesweeper" is NP-complete as the size increases, and with an infinite board - clearly not physically realizable - is Turing complete. https://en.wikipedia.org/wiki/Minesweeper_(video_game)#Compu...

i don't have much to add here but wanted to express my gratitude for having had the opportunity to read your wonderful comment

well, maybe one thing: if it doesn't matter whether anyone played the game or knew the rules, then magic: the gathering was turing-complete before the first magic deck was printed, before the first human was born, before the first star was formed, perhaps before the big bang

Colossus was before eniac, but was also programmed by plugging up. Baby was a stored program machine and had branching
In analog computers, software is hard to separate from the hardware. In ones I had any experience with (as a part of a university course), the programming part was wiring things on patch panels, not unlike how you do it with modular analog synths. You could make the same machine run a really wide variety of analog calculations by connecting opamps and passive components in various ways.

If we could optimize a set of programs down to the FPGA bitstream or even Verilog level, that would approach the kind of programs analog computers run.

I can't tell anything about Turing completeness though. It's a fully discrete concept, and analog computers operate in the continuous signal domain.

Most digital computers are Turing complete, but interestingly not all programming languages are Turing complete.

Turing completeness is a tar pit that makes your code hard to analyse and optimise. It's an interesting challenge to find languages that allow meaningful and useful computation that are not Turing complete. Regular expressions and SQL-style relational algebra (but not Perl-style regular expressions nor most real-world SQL dialects) are examples familiar to many programmers.

Programming languages like Agda and Idris that require that you prove that your programs terminate [0] are another interesting example, less familiar to people.

[0] It's slightly more sophisticated than this: you can also write event-loops that go on forever, but you have to prove that your program does some new IO after a finite amount of time. (Everything oversimplified here.)

yes, total functional programming is an interesting research area, and of course almost all of our subroutines are intended to verifiably terminate
I'm not even sure total programming needs to be functional. That's just the most common way to do it, I guess, because functional programming is a good vehicle for 'weird' theoretical computer science ideas.
If you just want to reference the entire data set of potential "first computers" (including ones that aren't referable in the javaScript app, due to missing toggles), you can access the source data here (warning, small CSV download):

https://www.gleech.org/files/computers.csv

I wonder why you can't make a turing complete analog computer using feedback loops.
a universal turing machine is a particular machine which can simulate all other turing machines. the gpac, by contrast, is a family of machines: all machines built out of such-and-such a set of parts

you can't simulate an 11-integrator general-purpose analog computer or other differential analyzer with a 10-integrator differential analyzer, and you can't simulate a differential analyzer with 0.1% error on a (more typical) differential analyzer with 1% error, unless it's 100× as large (assuming the error is gaussian)

the ongoing research in the area is of course very interesting but a lot of it relies on an abstraction of the actual differential-analyzer problem in which precision is infinite and error is zero

Sure, you cannot easily simulate another analog computer, but this is not the requirement. The requirement is turing completeness, which can be done.
It can? How?
as i understand it, with infinite precision; the real numbers within some range, say -15 volts to +15 volts, have a bijection to infinite strings of bits (some infinitesimally small fraction of which are all zeroes after a finite count). with things like the logistic map you can amplify arbitrarily small differences into totally different system trajectories; usually when we plot bifurcation diagrams from the logistic map we do it in discrete time, but that is not necessary if you have enough continuous state variables (three is obviously sufficient but i think you can do it with two)

given these hypothetical abilities, you can of course simulate a two-counter machine, but a bigger question is whether you can compute anything a turing machine cannot; after all, in a sense you are doing an infinite amount of computation in every finite interval of time, so maybe you could do things like compute whether a turing machine will halt in finite time. so far the results seem to support the contrary hypothesis, that extending computation into continuous time and continuously variable quantities in this way does not actually grant you any additional computational power!

this is all very interesting but obviously not a useful description of analog computation devices that are actually physically realizable by any technology we can now imagine

It would not be very interesting. You will lose all the interesting properties of analog computer and it would be a poorly performing turing machine. Still it would have those loops and branches necessary, since you can always build digital on top of analog with some additional harness.
They both do the same thing compute an output from given inputs. So they are properly distinguished from each other on how they do the computing. They both deserve the name 'computer'.
only in the same sense that a machinist's micrometer, an optical telescope, an analog television set, an acoustic guitar, a letterpress printing press, a car's manual transmission, a fountain pen, a nomogram, and a transistor also 'compute an output from given inputs'

do you want to call them all 'computers' now?

The arithmetic circuits alone, like adders, multipliers etc., regardless if they are mechanical or electronic, analog or digital, should not be called computers.

When the arithmetic circuits, i.e. the "central arithmetical part", as called by von Neumann, are coupled with a "central control part", as called by von Neumann, i.e. with a sequencer that is connected in a feedback loop with the arithmetic part, so that the computation results can modify the sequence of computations, then this device must be named as a "computer", regardless whether the computations are done with analog circuits or with digital circuits.

What defines a computer (according to the definition already given by von Neumann, which is the right definition in my opinion) is closing the feedback loop between the arithmetic part and the control part, which raises the order of the system in comparison with a simple finite state automaton, not how those parts are implemented.

The control part must be discrete, i.e. digital, but the arithmetic part can be completely analog. Closing the feedback loop, i.e. the conditional jumps executed by the control part, can be done with analog comparators that provide the predicates tested by the conditional jumps. The state of an analog arithmetic part uses capacitors, inductors or analog integrators, instead of digital registers.

Several decades ago, I had to debug an analog computer during its installation process, before functioning for the first time. That was in a metallurgic plant, and the analog computer provided outputs that controlled the torques of a group of multi-megawatt DC electric motors. The formulae used in the analog computations were very complex, with a large number of adders, multipliers, integrators, square root circuits and so on, which combined inputs from many sensors.

That analog computer (made with op amps) performed a sequence of computations much more complex than the algorithms that were executed on an Intel 8080, which controlled various on-off execution elements of the system, like relays and hydraulic valves and the induction motors that powered some pumps.

The main reason why such analog computers have become obsolete is the difficulty of ensuring that the accuracy of their computations will not change due to aging and due to temperature variations. Making analog computers that are insensitive to aging and temperature raises their cost much above modern digital microcontrollers.

as you are of course aware, analog 'computers' do not have the 'central control part' that you are arguing distinguishes 'computers' from 'arithmetic circuits alone'; the choice of which calculation to perform is determined by how the computer is built, or how its plugboard is wired. integrators in particular do have state that changes over time, so the output at a given time is not a function of the input at only that time, but of the entire past, and as is well known, such a system can have extremely complex behavior (sometimes called 'chaos', though in this context that term is likely to give rise to misunderstanding)

you can even include multiplexors in your analog 'computer', even with only adders and multipliers and constants; x · (1 + -1 · y) + z · y interpolates between x and z under the control of y, so that its output is conditionally either x or z (or some intermediate state). but once you start including feedback to push y out of that intermediate zone, you've built a flip-flop, and you're well on your way to building a digital control unit (one you could probably build more easily out of transistors rather than op-amps). and surely before long you can call it a digital computer, though one that is controlling precision linear analog circuitry

it is very commonly the case that analog computation is much, much faster than digital computation; even today, with microprocessors a hundred thousand times faster than an 8080 and fpgas that are faster still, if you're doing submillimeter computation you're going to have to do your front-end filtering, upconversion or downconversion, and probably even detection in the analog domain

Most "analog computers" have been simple, and even if they usually provided the solution of a system of ordinary differential equations, that does not require a control part, making them no more closer to a complete computer than a music box that performs a fixed sequence.

I agree that this kind of "analog computers" does not deserve the name of "computer", because they are equivalent only with the "registers + ALU" (RALU) simple automaton that is a component of a CPU.

Nevertheless, there is no reason why a digital control part cannot be coupled with an analog arithmetic part and there have existed such "analog computers", even if they have been rarely used, due to high cost and complexity.

It is not completely unlikely that such "analog computers", consisting of a digital control part and an analog arithmetic part, could be revived with the purpose of implementing low-resolution high-speed machine learning inference.

Even now, in circuits like analog-digital converters, there may be analog computing circuits, like switched-capacitor filters, which are reconfigurable by the digital controller of the ADC, based on various criteria, which may depend on the digital output of the converter or on the outputs of some analog comparators (which may detect e.g. the range of the input).

You're describing a "hybrid computer". These were introduced in the late 1950s, combining a digital processor with analog computing units. I don't understand why you and kragen want to redefine standard terms; this seems like a pointless linguistic exercise.
i agree completely; thank you for clarifying despite my perhaps confrontational tone

in some sense almost any circuit in which a digital computer controls an analog multiplexer chip or a so-called digital potentiometer could qualify. and cypress's psoc line has a bit of analog circuitry that can be thus digitally reconfigured

But wait computer is 'one who calculates' and means a person or team of people who perform mathematical calculations.
What's wrong with that? They are. We can always make the finer distinction of "Von Neumann architecture inspired digital electronic computer" if you wish to exclude the examples you've given. After all, anything which transforms a particular input to a particular output in a consistent fashion could be considered a computer which implements a particular function. I would say - don't confuse the word's meaning with the object's function and simply choose a context in which a word refers to a particular meaning, adapt to others contexts and translate, and simply deal with the fact that there is no firm division between computer and not-computer out in the word somewhere apart from people and their context-rich communications. If the context in which you're operating with an interlocutor is clear enough for you to jump to a correction of usage ... simply don't; beyond verifying your translation is correct, of course. As you're already doing this - likely without realising it - by taking care in doing so consciously you're likely to find your communications more efficient, congenial, and illuminating than they otherwise would be.
This is the double-edged sword of deciding to widen (or narrow) the meaning of a term which already has a conventional meaning.

By doing so, you get to make a point—perhaps via analogy, perhaps via precision, perhaps via pedantry—which is illuminating for you but now confusing for your reader. And to explain yourself, you must swim upstream and redefine a term while simultaneously making a different point altogether.

Much has been written about jargon, but a primary benefit of jargon is the chance to create a domain-specific meaning without the baggage of dictionary-correct associations. It’s also why geeks can be bores at dinner parties.

We live in a society (of letters.) Communication is not pairwise in a vacuum; all communication is in context of the cultural zeitgeist in which it occurs, and by intentionally choosing to use a non-zeitgeist-central definition of a term, you are wasting the time of anyone who talks to you.

By analogy to HCI: words are affordances. Affordances exist because of familiarity. Don’t make a doorknob that you push on, and expect people not to write in telling you to use a door-bar on that door instead.

You are not wrong, yet you are. All of these things are doing computation in a vague, creative sense — sure. But if we call everything that does this or its equivalent a computer we would have to find new words for the thing we mean to be a computer currently.

Unilaterally changing language is not forbidden, but if The Culture Wars™ has thought us anything, it is that people are allergic to talking about what they see as mandated changes to their language, even if it is reasonable and you can explain it.

Colour me stoked, but you could still just do it unilaterally and wait till somebody notices.

However my caveat with viewing everything as computation is that you fall into the same trap as people in the ~1850s did when they wanted to describe everything in the world using complex mechanical devices, because that was the bleeding edge back then. Not everything is an intricate system of pulleys and levers it turned out, even if theoretically you could mimic everything if that system was just complex enough.