Saturday, May 8, 2021

Digest for comp.lang.c++@googlegroups.com - 14 updates in 7 topics

olcott <NoOne@NoWhere.com>: May 08 05:45PM -0500

On 5/8/2021 5:06 PM, Kaz Kylheku wrote:
 
>> It does prove that H_Hat was forced to stop.
 
> Your own traces shows that H_Hat resumes. Here is one of them,
> abridged:
 
In the following I show every single detail of exactly how the
non-halting behavior pattern of infinite recursion or infinitely nested
simulation has been matched by Halts((u32)H_Hat, (u32)H_Hat).
 
The the only possible way that non-halting has been decided incorrectly
is an error in the criteria shown below.
 
 
When an execution trace matches the following criteria we know that the
non-halting behavior of infinite recursion or infinitely nested
simulation has been matched:
 
If the execution trace of function Y() shows:
(1) function X() is called twice in sequence from the same machine
address of Y()
(2) with the same parameters to X()
(3) with no conditional branch or indexed jump instructions in Y()
(4) with no function call returns from X()
then the function call from Y() to X() is infinitely recursive.
 
void H_Hat(u32 P)
{
u32 Input_Halts = Halts(P, P);
if (Input_Halts)
HERE: goto HERE;
}
 
int main()
{
u32 Input_Would_Halt = Halts((u32)H_Hat, (u32)H_Hat);
Output("Input_Would_Halt = ", Input_Would_Halt);
}
 
_H_Hat()
[00000b1f](01) 55 push ebp
[00000b20](02) 8bec mov ebp,esp
[00000b22](01) 51 push ecx
[00000b23](03) 8b4508 mov eax,[ebp+08]
[00000b26](01) 50 push eax
[00000b27](03) 8b4d08 mov ecx,[ebp+08]
[00000b2a](01) 51 push ecx
[00000b2b](05) e82ffeffff call 0000095f
[00000b30](03) 83c408 add esp,+08
[00000b33](03) 8945fc mov [ebp-04],eax
[00000b36](04) 837dfc00 cmp dword [ebp-04],+00
[00000b3a](02) 7402 jz 00000b3e
[00000b3c](02) ebfe jmp 00000b3c
[00000b3e](02) 8be5 mov esp,ebp
[00000b40](01) 5d pop ebp
[00000b41](01) c3 ret
Size in bytes:(0035) [00000b41]
 
_main()
[00000b4f](01) 55 push ebp
[00000b50](02) 8bec mov ebp,esp
[00000b52](01) 51 push ecx
[00000b53](05) 681f0b0000 push 00000b1f
[00000b58](05) 681f0b0000 push 00000b1f
[00000b5d](05) e8fdfdffff call 0000095f
[00000b62](03) 83c408 add esp,+08
[00000b65](03) 8945fc mov [ebp-04],eax
[00000b68](03) 8b45fc mov eax,[ebp-04]
[00000b6b](01) 50 push eax
[00000b6c](05) 682b030000 push 0000032b
[00000b71](05) e8e9f7ffff call 0000035f
[00000b76](03) 83c408 add esp,+08
[00000b79](02) 33c0 xor eax,eax
[00000b7b](02) 8be5 mov esp,ebp
[00000b7d](01) 5d pop ebp
[00000b7e](01) c3 ret
Size in bytes:(0048) [00000b7e]
 
Columns
(1) Machine address of instruction
(2) Machine address of top of stack
(3) Value of top of stack after instruction executed
(4) Number of bytes of machine code
(5) Machine language bytes
(6) Assembly language text
 
...[00000b4f][00101542][00000000](01) 55 push ebp
...[00000b50][00101542][00000000](02) 8bec mov ebp,esp
...[00000b52][0010153e][00000000](01) 51 push ecx
...[00000b53][0010153a][00000b1f](05) 681f0b0000 push 00000b1f
...[00000b58][00101536][00000b1f](05) 681f0b0000 push 00000b1f
...[00000b5d][00101532][00000b62](05) e8fdfdffff call 0000095f
 
Begin Local Halt Decider Simulation at Machine Address:b1f
...[00000b1f][002115e2][002115e6](01) 55 push ebp
...[00000b20][002115e2][002115e6](02) 8bec mov ebp,esp
...[00000b22][002115de][002015b2](01) 51 push ecx
...[00000b23][002115de][002015b2](03) 8b4508 mov eax,[ebp+08]
...[00000b26][002115da][00000b1f](01) 50 push eax
...[00000b27][002115da][00000b1f](03) 8b4d08 mov ecx,[ebp+08]
...[00000b2a][002115d6][00000b1f](01) 51 push ecx
...[00000b2b][002115d2][00000b30](05) e82ffeffff call 0000095f
The above eight instructions repeat
 
...[00000b1f][0025c00a][0025c00e](01) 55 push ebp
...[00000b20][0025c00a][0025c00e](02) 8bec mov ebp,esp
...[00000b22][0025c006][0024bfda](01) 51 push ecx
...[00000b23][0025c006][0024bfda](03) 8b4508 mov eax,[ebp+08]
...[00000b26][0025c002][00000b1f](01) 50 push eax
...[00000b27][0025c002][00000b1f](03) 8b4d08 mov ecx,[ebp+08]
...[00000b2a][0025bffe][00000b1f](01) 51 push ecx
...[00000b2b][0025bffa][00000b30](05) e82ffeffff call 0000095f
Local Halt Decider: Infinite Recursion Detected Simulation Stopped
Infinite recursion / Infinitely nested simulation criteria has been met
 
(1) function X() is called twice in sequence from the same machine
address of Y()
...[00000b2b][002115d2][00000b30](05) e82ffeffff call 0000095f
 
(2) with the same parameters to X()
The pair of push instructions preceding call 0000095f push the value of
0xb1f (The address of H_Hat) onto the stack as input to Halts().
 
(3) with no conditional branch or indexed jump instructions in Y()
No instructions between 0xb1f and 0xb2b of H_Hat() fit this category.
 
(4) with no function call returns from X()
Halts() is a simulator that never returns to its input.
 
...[00000b62][0010153e][00000000](03) 83c408 add esp,+08
...[00000b65][0010153e][00000000](03) 8945fc mov
[ebp-04],eax
...[00000b68][0010153e][00000000](03) 8b45fc mov
eax,[ebp-04]
...[00000b6b][0010153a][00000000](01) 50 push eax
...[00000b6c][00101536][0000032b](05) 682b030000 push 0000032b
...[00000b71][00101532][00000b76](05) e8e9f7ffff call 0000035f
Input_Would_Halt = 0
...[00000b76][0010153e][00000000](03) 83c408 add esp,+08
...[00000b79][0010153e][00000000](02) 33c0 xor eax,eax
...[00000b7b][00101542][00000000](02) 8be5 mov esp,ebp
...[00000b7d][00101546][00100000](01) 5d pop ebp
...[00000b7e][0010154a][00000080](01) c3 ret
Number_of_User_Instructions(33)
Number of Instructions Executed(26560)
 
I also updated this file with these clarifications:
http://www.liarparadox.org/Halting_problem_undecidability_and_infinite_recursion.pdf
 
 
 
--
Copyright 2021 Pete Olcott
 
"Great spirits have always encountered violent opposition from mediocre
minds." Einstein
Frederick Gotham <no_such_address@no_such_domain91725425.com>: May 08 08:23PM

Hi guys, I've been meditating for about 8 years now, averaging about 30
hours per month (typically 1 hour per day).
 
I don't typically get headaches, it hasn't ever been a real problem for
me.
 
This past week or so I've made a lot of progress in dealing with a
bereavement and continuing on with my life. With this progress has come
irritability, agitation, tiredness, sleepless nights, and headaches. I'm
also craving alcohol and cigarettes which I haven't had in years. The
headaches are almost daily now.
 
Of course there can always be a medical reason for a headache, but I'm
satisfied to assert that what I'm experiencing right now is a part of
the process of emotional restoration (some years after an emotional
upheaval). I don't particularly like sleepless nights and headaches,
however I'm willing to tolerate this right now. But of course everyone
has their limit.
 
As I'm working from home and spending 8 hours a day doing technical work,
my headaches really aren't helping. The frame of mind I'm in later in
the day also probably isn't pleasant to others around me after I've been
tolerating a headache all day.
 
Today I've taken two over-the-counter non-drousy medications: 2 pills of
paracetamol and 2 pills of ibuprofen. Lately I've had to do this approx.
1 out of every 3 days otherwise I start being really short-tempered and
nastily impatient with people later in the day. I'm hoping this fizzles
out sooner rather than later.
# /audio_out_demon 2
 
Networking Thread: Demon configured to send and receive full Ethernet
frames.
Networking Thread: Retrieving network address information from operating
system...
Networking Thread: Retrieving configuration of Linux kernel IP Tables...
Networking Thread: Now re-configuring Linux kernel IP Tables not to send
"TCP RST" from port 3000 in reply to "TCP SYN"...
Networking Thread: Retrieving configuration of Linux kernel IP Tables...
Networking Thread: Linux kernel IP Tables is now configured not to send
"TCP RST" from port 3000 in reply to "TCP SYN".
Networking Thread: Opening listening socket...
Networking Thread: Listening on TCP port 3000
(MAC=00:50:F9:67:B1:AB,IP=172.16.231.41)
Audio Thread: Started secondary thread for receiving audio from the
main thread.
Networking Thread: Awaiting Packets. . .
Networking Thread: - - - Got FIN from MAC=6C:2B:59:ED:55:80,
IP=172.16.231.60, Port=35322
audio_out_demon: acknowledger.cpp:141: void
TCP_swap_source_and_destination(FrameInfo&, const FrameAnalysis&):
Assertion `nullptr != fa.p_ip' failed.
Aborted
 
================
Do you guys think I should just do away with the pills and just have a
headaches for a few days? I do understand the headaches and sleepless
night are a necessary part of emotional restoration, but would I just be
torturing myself to endure it without the occasional ibuprofen?
 
-====================
 
I'm in my 30's now and I've had a few different reputations in my life,
on three continents.
 
I've been to both extremes -- I've been viewed as weak and vulnerable
and an easy target, and I've also been viewed as a psycho you don't want
to walk within 10 feet of.
 
 
[09:26] Thomas P. K. Healy
abc
Edited?

In the "setup_worksation.sh" file for the ProGen4 dev branch, the key
server is set as 10.160.98.89. I am able to ping this address at the
command line:
 
PING 10.160.98.89 (10.160.98.89) 56(84) bytes of data.
64 bytes from 10.160.98.89: icmp_seq=1 ttl=60 time=150 ms
64 bytes from 10.160.98.89: icmp_seq=2 ttl=60 time=157 ms
 
When I run "setup_workstation.sh pg4 amb_cv22_evk armR
cv22_illustra_ptz", I can see:
 
connect 10.160.98.89:9022
new ssl
ssl connect
client authenticate server ...
client authenticate server done
login
receive challenge from server ...
receive challenge from server done.
 
However, further down it says this:
Trying to connect to Ambarella key server...
Trying to connect to Ambarella key server...
Trying to connect to Ambarella key server...
Failed to start Ambarella dev daemon. SDK build will not be successful
 
This means that I can't get a local build. Anyone know what's wrong?
 
Connor rang at 18:43 on Monday (bank holiday)

================================

0000000000002218 T DisplayVersion
0000000000002150 T GetVersionId
00000000000019d8 T TCP_Stateless::Introduce_Packet(unsigned int,
RawSock::FrameInfo&)
0000000000001f00 T TCP_Stateless::Query_Ignore_Packet(unsigned int,
unsigned long, unsigned long, unsigned long, RawSock::FrameInfo&)
0000000000001a50 T TCP_Stateless::Prepare_options_for_a_reply()
0000000000001bd8 T TCP_Stateless::Swap_source_and_destination()
0000000000001ef0 T TCP_Stateless::Set_IP_and_TCP_checksums_correctly()
00000000000019f0 T
TCP_Stateless::Set_ACK_flag_and_unset_PSH_flag_in_Ether()
0000000000001fc0 T
TCP_Stateless::Process_Incoming_Network_Packet_Layers_2_and_3(bool&,
unsigned char*&, unsigned short&)
0000000000001e00 T
TCP_Stateless::Remove_payload_and_increment_ACK_by_payload_len_in_bytes()
 
0000000000002218 T DisplayVersion
0000000000002150 T GetVersionId
00000000000019d8 T
_ZN13TCP_Stateless16Introduce_PacketEjRN7RawSock9FrameInfoE
0000000000001f00 T
_ZN13TCP_Stateless19Query_Ignore_PacketEjmmmRN7RawSock9FrameInfoE
0000000000001a50 T _ZN13TCP_Stateless27Prepare_options_for_a_replyEv
0000000000001bd8 T _ZN13TCP_Stateless27Swap_source_and_destinationEv
0000000000001ef0 T
_ZN13TCP_Stateless34Set_IP_and_TCP_checksums_correctlyEv
00000000000019f0 T
_ZN13TCP_Stateless40Set_ACK_flag_and_unset_PSH_flag_in_EtherEv
0000000000001fc0 T
_ZN13TCP_Stateless46Process_Incoming_Network_Packet_Layers_2_and_3ERbRPhR
t
0000000000001e00 T
_ZN13TCP_Stateless56Remove_payload_and_increment_ACK_by_payload_len_in_by
tesEv
 
DisplayVersion
GetVersionId
_ZN13TCP_Stateless16Introduce_PacketEjRN7RawSock9FrameInfoE
_ZN13TCP_Stateless19Query_Ignore_PacketEjmmmRN7RawSock9FrameInfoE
_ZN13TCP_Stateless27Prepare_options_for_a_replyEv
_ZN13TCP_Stateless27Swap_source_and_destinationEv
_ZN13TCP_Stateless34Set_IP_and_TCP_checksums_correctlyEv
_ZN13TCP_Stateless40Set_ACK_flag_and_unset_PSH_flag_in_EtherEv
_ZN13TCP_Stateless46Process_Incoming_Network_Packet_Layers_2_and_3ERbRPhR
t
_ZN13TCP_Stateless56Remove_payload_and_increment_ACK_by_payload_len_in_by
tesEv
 
===========================
 
I can't speak for the other five recipients of your email, David, but
personally speaking no apology is necessary. We are a team of skilled
professionals employed to develop saleable products, and we are assigned
specific individual tasks by our superiors. Your interest in the current
task, or any other member of the Illustra team's interest in the current
task (myself included), isn't of concern. We get paid to do this stuff --
interested or not.
 
Do I understand correctly that you're no longer willing to collaborate
with your team members on the topic of Audio Out? If so, I would direct
you toward your superiors rather than discussing this boggle with
colleagues, as I do not have the authority to assign or de-assign your
work tasks.
 
Speaking soley for myself, I will continue on the task I was assigned
and I will collaborate and cooperate with my fellow team members and
superiors.
 
1 298 364 210
kqezhkzz
 
struct timeval tv = { 0 };
tv.tv_sec = 1u;
setsockopt(g_sock_listening, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof tv);
 
if ( -1 == recv(g_sock_tcp, buf, sizeof buf, 0) ) /* This recv call
might time out */
{
if ( EAGAIN == errno || EWOULDBLOCK == errno )
{
static char const timeout_response[] = "HTTP/1.0 408 Request
Timeout\r\n";
send(g_sock_tcp, timeout_response, sizeof timeout_response -
1u, 0);
close(g_sock_tcp);
}
}
 
 
----------------------------------------------------------------------
 
* FCGX_Free --
*
* Free the memory and, if close is true,
* IPC FD associated with the request (multi-thread safe).
*
*----------------------------------------------------------------------
*/
DLLAPI void FCGX_Free(FCGX_Request * request, int close);
 
"HTTP/1.0 408 Request Timeout\r\n"
"Content-Type: text/html\r\n\r\n"
"<HTML><HEAD><TITLE>408 Request Timeout, The server timed out waiting
for the request.</TITLE></HEAD>\n"
"<BODY><H1>408 Request Timeout</H1>\n"
"The server timed out waiting for the request.</BODY></HTML>\n"
 
ifeq ($(ILLUSTRA_WHETHER_TO_BUILD_TCPSTATELESS),yes)
 
else
 
endif
 
 
I'm writing a program that links with a handful of shared libraries.
Some of the shared libraries write the occassional infrequent message to
stdout.
 
I want to suppress the messages outputted from these shared libraries,
namely from statements such as the following:
 
cout << "whatever" << some_number << endl;
printf("whatever%i\n", some_number);
 
However I want my own program to still be able to use "cout" to print to
stdout. (I don't have any use for "printf" or any related C-style IO
functions in my pgrogram).
 
So the first thing I've done is allocated static duration memory for an
'ostream' object. My object is called "g_exclusive_cout":
 
std::aligned_union<0, std::ostream>::type g_exclusive_cout;
 
My program is for Linux and so I've started by coding a Linux-specific
solution, however I'm curious as to whether there's a C++11 ANSI/ISO
portable solution.
 
Next I call the following function when the program starts:
 
void Suppress_Cout_From_Shared_Libraries(void)
{
fflush(stdout);
 
static __gnu_cxx::stdio_filebuf<char>
filebuf(dup(fileno(stdout)), std::ios::out);
 
freopen("/dev/null", "w", stdout);
 
::new(&g_exclusive_cout) std::ostream(&filebuf);
}
 
 
And then lastly I have a macro for exclusive cout, "excout":
 
#define excout ( \
*static_cast<std::ostream*>( \
static_cast<void*>(&g_exclusive_cout) \
) \
)
 
And so then in my own program, I always use "excout" instead of "cout",
for example:
 
int main(void)
{
Suppress_Cout_From_Shared_Libraries();
 
excout << "Hello World!" << endl;
}
 
This solution works for me. Of course I've used POSIX-specific functions
and GNU compiler extensions to pull it off. I wonder if there's an
ANSI/ISO C++11 way of doing it? By the way, since multithreading was
introduced into C++11, there is a gaurantee that calls to "cout <<
whatever" are thread-safe. I wonder if my own code with "excout" is
thread-safe, or whether I'll have to wrap methods called on "excout"
within a mutex?
Frederick Gotham <no_such_address@no_such_domain91725425.com>: May 08 08:34PM

Frederick Gotham <no_such_address@no_such_domain91725425.com> wrote in
 
> Hi guys, I've been meditating for about 8 <snip>


I'm trying to use a very old newsreader under Wine on Linux, it's called
"Xnews", and it just posted a load of garbage copy-pasted from another
window.

Please see my other thread in comp.lang.c++ entitled "Second Try -
Suppress stdout from shared libraries".
red floyd <no.spam.here@its.invalid>: May 07 05:59PM -0700

On 5/7/2021 9:40 AM, Öö Tiib wrote:
> // get here when a and b are equal
> // but majority of novices read opposite
> }
 
But then again, strcmp/strncmp has the exact same bear trap.
"Öö Tiib" <ootiib@hot.ee>: May 08 03:27AM -0700

On Friday, 7 May 2021 at 22:33:14 UTC+3, Paavo Helde wrote:
> You mean, you do not remember the arguments, because you are not using
> that function. I'm using it all the time and have no problem with
> arguments, they are pretty logical.
 
No. In all performance-demanding processing I have since constexpr used
other thing somewhat resembling current string_view. It is powerful as it
can be used to represent better string literals and does compile time
processing. Unfortunately C++17 broke some of it but not all.
Where performance does not matter there are std::strings but efficiency
of comparing those doesn't matter just that operator== is better to read.
 
> BTW, std::sort also has 4 overloads and up to 4 arguments plus up to 3
> template arguments. Just saying...
 
For all purposes there are 2. That was actually not surprise to me that
sabotaged C++17 added execution policies (that clearly should be compile
time settings) as dynamic function parameters. Perhaps to ensure that
std:sort can't be made efficiently concurrent.
 
> So what's the reason for its existence? There are certain reasons why
> something is included in the C++ standard, and avoiding creation of
> totally unneeded temporaries might well be one of them.
 
Stop reading my sentences as these are conveying bool values. The
std::string is useful and its compare is useful. The a==b compiles
to same binary as !a.compare(b) right now so I suggest former but
wont consider latter as defect. The reasons were all told ad nauseum
during the long lasting shitstorm about std::string and every framework
having its own string class.
For me the compare is merely in brighter gray when we talk about
efficiency and in darker gray when we talk about readability and
robustness. So I consider it mild and unimportant performance
improvement.

> > }
> There are bad news for those novices as they now have to cope with even
> more ternary result values, with this brand new spaceship operator in C++20.
 
That hurts indeed and are bad news to me. It is already tricky to find people
who are willing and capable to write C++. My recruiters search literally
globally. The damage after C++17 did just make it worse. My current rhetoric
to novices is that C++ has been made perverse specially as test. Person who
can't handle such mild complications isn't fit to be engineer. But there is
quite easy rapid development language hidden inside of that mess.
"Öö Tiib" <ootiib@hot.ee>: May 08 03:42AM -0700

On Saturday, 8 May 2021 at 03:59:43 UTC+3, red floyd wrote:
> > // but majority of novices read opposite
> > }
 
> But then again, strcmp/strncmp has the exact same bear trap.
 
I have always thought that C++ loaned the design of worst bear traps
from C because a) these work and b) Bjarne had other things to do
than to be inventive there. Just add some places with unexpected
undefined behavior, some others with unexpected defined behavior
plus some surprising silent type insecurity like
false -> 0 -> nullptr -> (char*)nullptr make sure that every feature
contains at least one and that the version you least likely want is
most brief to type and people start to pay attention.
Juha Nieminen <nospam@thanks.invalid>: May 08 08:27PM

> // get here when a and b are equal
> // but majority of novices read opposite
> }
 
Good programming practices, and common sense in programming, would dictate
to avoid deliberate obfuscation and "fancy syntactic tricks" (when much
more readable and understandable 100% equivalent alternatives exist).
 
Many a programmer, especially those who never grew out of their beginner
programmer fascination phase, may engage in fancy syntactical "tricks"
just because they like them, find them fancy and cool, but a good programmer
is distinguished by being able to write clear readable code that's still
reasonably simple and reasonably efficient.
 
Anyway, rather obviously there are benefits to the trinary comparison
result in many situations. Consider, for example, that std::lower_bound
does not tell you whether the searched element exists in the range or not,
it only tells you where the element should be inserted to keep the range
sorted. While there exists a std::binary_search, that only tells you whether
it exists or not, but not where to insert the element if you wanted.
Thus, if you wanted to check (using a binary search) whether the element
exists and insert it only if it didn't exist, std::binary_search would tell
you the point of insertion, but you still need to make an additional equality
check to see if it already exists. Meaning that the last element compared
in the search would have to be compared twice. If the comparison is
relatively expensive (eg. the elements are large strings), this is a waste
of time which the trinary comparison operator solves: It directly tells you
if that last element that was compared was larger or equal to the searched
element, so you just need to check the integer value to know.
 
(Unfortunately std::lower_bound doesn't give you this value, so you would
need to perform the binary search yourself. But the trinary comparison
result will help you in this case to avoid the double comparison of the
same element at the end of the search.)
Frederick Gotham <no_such_address@no_such_domain91725425.com>: May 08 08:25PM

I'm writing a program that links with a handful of shared libraries.
Some of the shared libraries write the occassional infrequent message to
stdout.
 
I want to suppress the messages outputted from these shared libraries,
namely from statements such as the following:
 
cout << "whatever" << some_number << endl;
printf("whatever%i\n", some_number);
 
However I want my own program to still be able to use "cout" to print to
stdout. (I don't have any use for "printf" or any related C-style IO
functions in my pgrogram).
 
So the first thing I've done is allocated static duration memory for an
'ostream' object. My object is called "g_exclusive_cout":
 
std::aligned_union<0, std::ostream>::type g_exclusive_cout;
 
My program is for Linux and so I've started by coding a Linux-specific
solution, however I'm curious as to whether there's a C++11 ANSI/ISO
portable solution.
 
Next I call the following function when the program starts:
 
void Suppress_Cout_From_Shared_Libraries(void)
{
fflush(stdout);
 
static __gnu_cxx::stdio_filebuf<char>
filebuf(dup(fileno(stdout)), std::ios::out);
 
freopen("/dev/null", "w", stdout);
 
::new(&g_exclusive_cout) std::ostream(&filebuf);
}
 
 
And then lastly I have a macro for exclusive cout, "excout":
 
#define excout ( \
*static_cast<std::ostream*>( \
static_cast<void*>(&g_exclusive_cout) \
) \
)
 
And so then in my own program, I always use "excout" instead of "cout",
for example:
 
int main(void)
{
Suppress_Cout_From_Shared_Libraries();
 
excout << "Hello World!" << endl;
}
 
This solution works for me. Of course I've used POSIX-specific functions
and GNU compiler extensions to pull it off. I wonder if there's an
ANSI/ISO C++11 way of doing it? By the way, since multithreading was
introduced into C++11, there is a gaurantee that calls to "cout <<
whatever" are thread-safe. I wonder if my own code with "excout" is
thread-safe, or whether I'll have to wrap methods called on "excout"
within a mutex?
Frederick Gotham <no_such_address@no_such_domain91725425.com>: May 08 08:05PM

First try from Eternal September and Xnews.
Branimir Maksimovic <branimir.maksimovic@gmail.com>: May 08 08:07PM


> First try from Eternal September and Xnews.
Works
 
--
current job title: senior software engineer
skills: x86 aasembler,c++,c,rust,go,nim,haskell...
 
press any key to continue or any other to quit...
olcott <NoOne@NoWhere.com>: May 08 11:18AM -0500

On 5/7/2021 9:12 PM, Ben Bacarisse wrote:
 
> Presumably that fact that H_Hat(H_Hat) halts does not entail that
> H_Hat(H_Hat) is a halting computation, so you can answer "no" if the
> mood takes you.
 
On 11/27/2020 9:02 PM, Ben Bacarisse wrote:
> A computation that would not halt if its simulation were not
> halted is indeed a non-halting computation. But a computation that
> would not halt and one that is halted are different computations.
 
It is true that every computation that would never halt unless its
simulation was stopped is a non-halting computation.
 
As is shown by the following example computations meeting this criteria
remain non-halting even after they are forced to halt by their halt
deciding simulator thus contradicting Ben's second sentence.
 
_Infinite_Loop()
[00000aaf](01) 55 push ebp
[00000ab0](02) 8bec mov ebp,esp
[00000ab2](02) ebfe jmp 00000ab2
[00000ab4](01) 5d pop ebp
[00000ab5](01) c3 ret
Size in bytes:(0007) [00000ab5]
 
// (a) The instruction is a JMP instruction.
// (b) It is jumping upward or to its own address.
// (c) There are no conditional branch instructions inbetween.
// (d) There are no other JMP instructions inbetween (André G. Isaak)
 
When we apply the above criteria to the above code a program can
definitively decide that it would not halt. When the above code is
simulated its execution trace indicates that it would not halt because
its behavior matches the above criteria.
 
This remains true even after _Infinite_Loop() is forced to halt because
the halt deciding simulator stopped simulating it. Thus Ben's first
sentence is correct and his second sentence is incorrect because it
contradicts his first sentence.
 
THIS IS A TRUISM:
It is true that every computation that would never halt unless its
simulation was stopped is a non-halting computation.
 
The fact that an {infinite loop, infinite recursion, infinitely nested
simulation) was forced to halt when its halt deciding simulator decided
that its behavior matched a pattern of non-halting behavior and stopped
simulating it is the exceptional case where:
 
On 5/7/2021 9:12 PM, Ben Bacarisse wrote:
 
--
Copyright 2021 Pete Olcott
 
"Great spirits have always encountered violent opposition from mediocre
minds." Einstein
red floyd <no.spam.here@its.invalid>: May 07 06:02PM -0700

On 5/7/2021 3:07 PM, Boris Dorestand wrote:
> [question on ATL and VC redacted]
 
You need to ask in a Windows programming group.
 
MS Specific libraries and tools are off topic here,
we (in theory) discuss the actual language as defined
by ISO/IEC 14882:<insert-year-here>
Paavo Helde <myfirstname@osa.pri.ee>: May 08 09:48AM +0300

08.05.2021 01:07 Boris Dorestand kirjutas:
> MainDlg.cpp(33): error C2664: 'int WTL::CListViewCtrlT<ATL::CWindow>::InsertColumn(int,LPCTSTR,int,int,int,int,int)': cannot convert argument 2 from 'const wchar_t [7]' to 'LPCTSTR'
> MainDlg.cpp(33): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast``
> [...]
 
(Only answering here because I do not participate in any Windows
specific groups/forums).
 
You normally cannot really call cl.exe with a single .cpp and with no
other arguments. In correct usage it has dozens of command line
arguments, and you do not call cl.exe directly, but rather an IDE like
Visual Studio does that, based on a project file which defines those
dozens of arguments.
 
From the error messages it looks like at least /D_UNICODE and/or
/DUNICODE are missing, but fixing this won't probably help you much. You
should rather follow the build instructions provided by the original
program. If there is a .vcxproj or a .sln file, most probably you are
expected to open that in Visual Studio and build it there.
Boris Dorestand <bdorestand@example.com>: May 08 07:46AM -0300

>> [...]
 
> (Only answering here because I do not participate in any Windows
> specific groups/forums).
 
Thank you. I don't know any NNTP-based programming Microsoft group. If
anyone does know, please recommend me. I do have access to gmane.io's
NNTP server, that is, a mail list would probably work too.
 
> arguments, and you do not call cl.exe directly, but rather an IDE like
> Visual Studio does that, based on a project file which defines those
> dozens of arguments.
 
Thank you. That pointed me in the right direction. I managed to
compile it using msbuild.exe. The program nuget.exe downloaded the
libraries to the current directory and, inspecting BulkCopy.vcxproj, I
could see the place for them were ..\packages\:
 
--8<---------------cut here---------------start------------->8---
<ImportGroup Label="ExtensionTargets">
<Import Project="..\packages\wtl.10.0.9163\build\native\wtl.targets" Condition="Exists('..\packages\wtl.10.0.9163\build\native\wtl.targets')" />
<Import Project="..\packages\Microsoft.Windows.ImplementationLibrary.1.0.191107.2\build\native\Microsoft.Windows.ImplementationLibrary.targets" Condition="Exists('..\packages\Microsoft.Windows.ImplementationLibrary.1.0.191107.2\build\native\Microsoft.Windows.ImplementationLibrary.targets')" />
</ImportGroup>
--8<---------------cut here---------------end--------------->8---
 
> much. You should rather follow the build instructions provided by the
> original program. If there is a .vcxproj or a .sln file, most probably
> you are expected to open that in Visual Studio and build it there.
 
You're right. It did use /D _UNICODE and /D UNICODE.
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com.

No comments: