|
I wrote this. You'll need a decent grasp of x86 assembly to comprehend the horror...code:
|
# ¿ Mar 25, 2008 19:15 |
|
|
# ¿ May 2, 2024 20:47 |
|
rjmccall posted:Note that you do need either memory cells to be unbounded or an unbounded number of cells. Models with bounded memory are never Turing-equivalent. You need the cells themselves to be unbounded, since there's no way to refer to an unbounded number of cells with a value of bounded range. For what it's worth, even C isn't Turing complete unless you let "char" be an unbounded value (i.e. any natural or integer, rather than -128 to 127 or some such). This is because the size of any pointer must be a multiple of the size of a single char, and if pointers are of finite dimension, then you can only reach a bounded number of memory addresses. Functional languages, like SML, OCaml, Haskell, and Lisp/Scheme, are generally Turing-complete without any extra weirdness. Their implementations usually aren't, of course.
|
# ¿ Apr 13, 2009 03:11 |
|
Avenging Dentist posted:The first part of this does not imply the second part. The sizeof operator result "is an integer" according to the spec, so it can't be infinity. Or is that not what you meant?
|
# ¿ Apr 13, 2009 04:25 |
|
Avenging Dentist posted:"Integer" in the ISO standard is understood to refer to the integral types in the language, which make no explicit mandate that the values be finite. It's being pedantic, but so are you. (It would be stupid, for instance, for sizeof to return an integer larger than can be represented by the available integral types, so just "is an element of Z" isn't what the standard is referring to. Besides that, the grammar rules for integer constants clearly allow constants of infinite length.) Infinite and unbounded (arbitrarily large) aren't the same thing. And yes, of course I'm being pedantic. That latter bit was my point - it's fine by the spec for char to be unbounded, and in fact is required for the language to be "actually" Turing-complete.
|
# ¿ Apr 13, 2009 04:57 |
|
λf. (λx. f (x x)) (λx. f (x x))
|
# ¿ Apr 27, 2009 20:47 |
|
|
# ¿ May 2, 2024 20:47 |
|
Vanadium posted:no this is not "who knows what the value of i is going to be afterwards", this is literally undefined behaviour oh poo poo guys demons just flew out of my nose what do i do
|
# ¿ May 10, 2009 20:38 |