Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > sci.philosophy.tech > #142

Re: DD simulated by HHH and DD simulated by HHH1

From Kaz Kylheku <643-408-1753@kylheku.com>
Newsgroups comp.theory, comp.lang.c++, comp.lang.c, sci.philosophy.tech
Subject Re: DD simulated by HHH and DD simulated by HHH1
Date 2025-11-24 19:22 +0000
Organization A noiseless patient Spider
Message-ID <20251124111443.615@kylheku.com> (permalink)
References (25 earlier) <10g0ik5$21u1a$1@dont-email.me> <10g21b9$2j3uj$2@dont-email.me> <10g21jg$2jb19$1@dont-email.me> <20251124094728.243@kylheku.com> <10g26vs$2lph1$1@dont-email.me>

Cross-posted to 4 groups.

Show all headers | View raw


On 2025-11-24, olcott <polcott333@gmail.com> wrote:
> On 11/24/2025 11:55 AM, Kaz Kylheku wrote:
>> On 2025-11-24, olcott <polcott333@gmail.com> wrote:
>>> On 11/24/2025 10:32 AM, Kaz Kylheku wrote:
>>>> On 2025-11-24, olcott <polcott333@gmail.com> wrote:
>>>>> On 11/22/2025 11:24 PM, Kaz Kylheku wrote:
>>>>>> That's just the thing! If this were correctly implemented then in fact
>>>>>> DD /wold be/ calling HHH1, using the name HHH.
>>>>>>
>>>>>
>>>>> You are trying to get away with this lie
>>>>> about the semantics of C?
>>>>>
>>>>> int main()
>>>>> {
>>>>>      HHH(DD);
>>>>>      HHH1(DD);
>>>>>      return 0;
>>>>> }
>>>>>
>>>>> _main()
>>>>> [000022c4] 55             push ebp
>>>>> [000022c5] 8bec           mov ebp,esp
>>>>> [000022c7] 6834220000     push 00002234 ; push DD
>>>>> [000022cc] e833f3ffff     call 00001604 ; call HHH
>>>>> [000022d1] 83c404         add esp,+04
>>>>> [000022d4] 6834220000     push 00002234 ; push DD
>>>>> [000022d9] e856f2ffff     call 00001534 ; call HHH1
>>>>> [000022de] 83c404         add esp,+04
>>>>> [000022e1] 33c0           xor eax,eax
>>>>> [000022e3] 5d             pop ebp
>>>>> [000022e4] c3             ret
>>>>> Size in bytes:(0033) [000022e4]
>>>>
>>>> That's right; even if HHH and HHH1 are separately realized and given
>>>> different adddresses, not recognized as identical by the compiler and
>>>> not folded into one copy, in a correct implementation of your software,
>>>> HHH(DD) and HHH1(DD) would behave as indistinguishable, mutually
>>>> interchangeable operations.
>>>>
>>>> The problem is that you have logic which concludes that HHH1 != HHH (low
>>>> level pointer comparison), they are different functions.
>>>>
>>>
>>> Except when their input calls themself.
>> 
>> That makes no difference.
>> 
>
> typedef int (*ptr)();
> int HHH(ptr P);
> int HHH1(ptr P);

Please, don't post this repeated crap any more.

When I say "that makes no difference", I'm saying that it makes no
difference in the theory and therefore /must not/ make any difference
in your exploratory code.

You a must have the skill and know-how to write the key details of your
C code such that it is ensured that HHH1(P) and HHH(P) are 
interchangeable, equivalent expressions, such that substituting
one for the other.

Those details are not present in the code you are pasting here,
so it is absolutely pointless:

> int DD()
> {
>    int Halt_Status = HHH(DD);
>    if (Halt_Status)
>      HERE: goto HERE;
>    return Halt_Status;
> }
>
> int main()
> {
>    HHH(DD);
>    HHH1(DD);
> }
>
> HHH simulates DD that calls HHH(DD)
> that simulates DD that calls HHH(DD)...
>
> HHH1 simulates DD that calls HHH(DD) that
> returns to DD that returns to HHH1.

So you basically lack the capacity for the abstract thinking
required to do computer science at the first year level.

-- 
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca

Back to sci.philosophy.tech | PreviousPrevious in thread | Find similar | Unroll thread


Thread

Re: DD simulated by HHH and DD simulated by HHH1 olcott <polcott333@gmail.com> - 2025-11-24 12:08 -0600
  Re: DD simulated by HHH and DD simulated by HHH1 Kaz Kylheku <643-408-1753@kylheku.com> - 2025-11-24 19:22 +0000

csiph-web