Wednesday, April 11, 2018

Digest for comp.lang.c++@googlegroups.com - 25 updates in 1 topic

Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Apr 11 04:45PM +0100

On 11/04/2018 16:23, Rick C. Hodgin wrote:
> multiple levels.
 
> I have good ideas for developers, Leigh.  I seek to give all honor and
> praise to Jesus Christ for giving me these ideas in the first place.
 
Again reminds me of TempleOS; i.e. it is batshit crazy.
 
/Flibble
 
--
"Suppose it's all true, and you walk up to the pearly gates, and are
confronted by God," Bryne asked on his show The Meaning of Life. "What
will Stephen Fry say to him, her, or it?"
"I'd say, bone cancer in children? What's that about?" Fry replied.
"How dare you? How dare you create a world to which there is such misery
that is not our fault. It's not right, it's utterly, utterly evil."
"Why should I respect a capricious, mean-minded, stupid God who creates
a world that is so full of injustice and pain. That's what I would say."
Bonita Montero <Bonita.Montero@gmail.com>: Apr 11 06:05PM +0200

> One of my goals for my C-like language is to allow whitespaces in
> names.  To this end, I allow a ctrl+spacebar to introduce a linked
> whitespace, which is a connector of related name components.
 
That's plainly idiotic and without any necessity.
Bonita Montero <Bonita.Montero@gmail.com>: Apr 11 06:19PM +0200


> Agreed that it's not a necessity. It is an extension, and a feature.
> Nobody has to use it. It will work just fine without spaces. It's
> just another tool in the toolbox.
 
A tool should give a benefit - this tool hasn't a benefit.
Bonita Montero <Bonita.Montero@gmail.com>: Apr 11 06:21PM +0200

> It's been incorporated into other database languages, such as
> Microsoft's TSQL (in TSQL you have to use [brackets for any]
> names with spaces).
 
That was because of a mistake of MS with MS Access. Access supports
identifiers with a space, and thereby SQL-Server inherits this stupid
"feature".
Ben Bacarisse <ben.usenet@bsb.me.uk>: Apr 11 05:38PM +0100

>> the association that the syntax describes.
 
> 'int*, without a space, is commonly used inside casts and in parameter
> lists where there is no associated name.
 
I don't like that one either. A "type name" the syntactic form that
goes in ()s to make a cast is a declaration without the name and I write
then exactly as if that is what they were.
 
> So it doesn't look wrong when you write 'int* x' rather than 'int *x'.
 
To you. I'm fine with it looking OK to other people, provided they
don't get confused about other forms.
 
> Which means it is more likely to trip you up when someone writes 'int*
> x,y' or adds ",y" onto "int* x".
 
Yes, that's one of my objections to putting the * in the wrong place.
 
> The '*' can naturally be associated with either the 'int' or the
> 'x'. This is the problem.
 
That is true in some people's minds. In mine, the * is associated with
the name. When the name is not there, I would not move the *.
 
--
Ben.
legalize+jeeves@mail.xmission.com (Richard): Apr 11 04:47PM

[Please do not mail me a copy of your followup]
 
bartc <bc@freeuk.com> spake the secret code
 
>'int*, without a space, is commonly used inside casts and in parameter
>lists where there is no associated name.
 
Meh. I write static_cast<int *>(p).
 
int* is commonly used in casts by people who write int* x;.
--
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
The Terminals Wiki <http://terminals-wiki.org>
The Computer Graphics Museum <http://computergraphicsmuseum.org>
Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>
"Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com>: Apr 11 09:47PM +0200

On 11.04.2018 18:41, Öö Tiib wrote:
 
>> https://groups.google.com/forum/#!forum/caliveprogramminglanguage
 
> Wow! Have you made more groups to discuss things with
> most pleasant person whom you know?
 
Shouldn't that be "_that_ you know"? And shouldn't it be "_the_ most
pleasant"?
 
- Alf (pitnick mode)
"Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid>: Apr 11 12:47PM -0700

On 4/11/2018 9:45 AM, Rick C. Hodgin wrote:
> languages.
 
> It is me giving to mankind the fruit of what the Lord first gave me.
> It's an offering to Him, and to each of you, the best I have to give.
 
Implement the damn thing!
"Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid>: Apr 11 12:48PM -0700

On 4/11/2018 2:07 AM, Chris M. Thomasson wrote:
 
>> I want to try out some programs in CAlive.
 
> Does it support C11 threading? So far, I can only find a single compiler
> that does this.
 
I can actually help you with this.
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Apr 11 01:00PM -0700

On Wednesday, April 11, 2018 at 3:47:38 PM UTC-4, Chris M. Thomasson wrote:
 
> > It is me giving to mankind the fruit of what the Lord first gave me.
> > It's an offering to Him, and to each of you, the best I have to give.
 
> Implement the .. thing!
 
CAlive does not affect you, Chris. Stop asking about it.
 
--
Rick C. Hodgin
"Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid>: Apr 11 01:04PM -0700

On 4/11/2018 1:00 PM, Rick C. Hodgin wrote:
>>> It's an offering to Him, and to each of you, the best I have to give.
 
>> Implement the .. thing!
 
> CAlive does not affect you, Chris. Stop asking about it.
 
I want another compiler that can handle C11 instead of the only one I
can find:
 
http://www.smorgasbordet.com/pellesc
 
If you can do that, I would use it right now.
red floyd <dont.bother@its.invalid>: Apr 11 01:06PM -0700

On 4/11/2018 9:38 AM, Ben Bacarisse wrote:
>> 'x'. This is the problem.
 
> That is true in some people's minds. In mine, the * is associated with
> the name. When the name is not there, I would not move the *.
 
Agreed. Back when I first read K&R, what finally got me to understand
C pointers was that the declaration "int *x" meant "*x is an int".
 
I always put the asterisk next to the name.
Melzzzzz <Melzzzzz@zzzzz.com>: Apr 11 08:14PM

> can find:
 
> http://www.smorgasbordet.com/pellesc
 
> If you can do that, I would use it right now.
What about icc,clang and gcc? I have all three and they handle C11?
 
--
press any key to continue or any other to quit...
"Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid>: Apr 11 01:21PM -0700

On 4/11/2018 1:14 PM, Melzzzzz wrote:
 
>> http://www.smorgasbordet.com/pellesc
 
>> If you can do that, I would use it right now.
> What about icc,clang and gcc? I have all three and they handle C11?
 
What version of GCC? Last time I tried it did not handle C11 threading.
Okay... How many of your compilers can do this:
______________________________________
#include <stdio.h>
#include <threads.h>
#include <stdatomic.h>
 
static atomic_int g_count = 0;
 
static int my_thread(void* arg)
{
printf("my_thread(%p)\n", arg);
atomic_fetch_add_explicit(&g_count, 1, memory_order_relaxed);
return 1234;
}
 
int main(void)
{
thrd_t t;
 
printf("ATOMIC_INT_LOCK_FREE = %d\n", ATOMIC_INT_LOCK_FREE);
 
thrd_create(&t, my_thread, NULL);
 
int ret = 0;
thrd_join(t, &ret);
 
printf("my_thread ret:%d, g_count:%d\n", ret, g_count);
 
return 0;
}
______________________________________
 
https://forum.pellesc.de/index.php?topic=7167.0
(read all)
 
If I missed one, then THANK YOU for the heads up!
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Apr 11 01:22PM -0700

On Wednesday, April 11, 2018 at 4:05:09 PM UTC-4, Chris M. Thomasson wrote:
> can find:
 
> http://www.smorgasbordet.com/pellesc
 
> If you can do that, I would use it right now.
 
I will not do anything to help you with regards to my compiler,
Chris. I will not discuss it with you. I will not answer your
questions about it. I will not take your advice or listen to
your explanations about things.
 
With regards to all of my projects, there is a wall up between
me and you and nothing of your influence will get past that wall.
 
--
Rick C. Hodgin
"Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid>: Apr 11 01:26PM -0700

On 4/11/2018 1:22 PM, Rick C. Hodgin wrote:
> your explanations about things.
 
> With regards to all of my projects, there is a wall up between
> me and you and nothing of your influence will get past that wall.
 
Sure.
Melzzzzz <Melzzzzz@zzzzz.com>: Apr 11 08:37PM

> Okay... How many of your compilers can do this:
> ______________________________________
> #include <threads.h>
Ah, glibc does not supports C11 threads currently ;)
 
--
press any key to continue or any other to quit...
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Apr 11 01:38PM -0700

On Wednesday, April 11, 2018 at 4:26:53 PM UTC-4, Chris M. Thomasson wrote:
 
> > With regards to all of my projects, there is a wall up between
> > me and you and nothing of your influence will get past that wall.
 
> Sure.
 
The only way that will change is if you are born again, and demonstrate
by half a handful of witnesses that you are truly born again. And even
then I'd be cautious for a long time.
 
--
Rick C. Hodgin
"Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid>: Apr 11 01:46PM -0700

On 4/11/2018 1:37 PM, Melzzzzz wrote:
>> ______________________________________
>> #include <threads.h>
> Ah, glibc does not supports C11 threads currently ;)
 
Keep searching for others that can fully support C11 threads, atomics
and membars. I would really appreciate it. Perhaps I am totally missing
something. Thank you. Btw, I got a kick out of your signature:
 
________________________
--
press any key to continue or any other to quit...
________________________
 
;^)
scott@slp53.sl.home (Scott Lurndal): Apr 11 08:48PM

>> ______________________________________
>> #include <threads.h>
>Ah, glibc does not supports C11 threads currently ;)
 
Ah, but change the 'thrd_' prefix to 'pthread_' and it
will work (at least on unix and linux systems).
 
#define thrd_ pthread_
 
...
"Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid>: Apr 11 01:49PM -0700

On 4/11/2018 1:48 PM, Scott Lurndal wrote:
 
> Ah, but change the 'thrd_' prefix to 'pthread_' and it
> will work (at least on unix and linux systems).
 
> #define thrd_ pthread_
 
Humm... Need to try this out! What about the atomics and membars?
scott@slp53.sl.home (Scott Lurndal): Apr 11 09:01PM

>> will work (at least on unix and linux systems).
 
>> #define thrd_ pthread_
 
>Humm... Need to try this out! What about the atomics and membars?
 
Haven't checked - those you may need to code up using the appropriate
inline assembly (e.g mfence et alia). The atomics are available via
__sync_fetch_and_add() and friends. But it should be feasible to build
functions with the C11 name and semantics between the __sync functions
and inline assembly.
 
You also need to include <pthread.h> instead of <thread.h>.
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Apr 11 10:10PM +0100

On 11/04/2018 21:38, Rick C. Hodgin wrote:
 
> The only way that will change is if you are born again, and demonstrate
> by half a handful of witnesses that you are truly born again. And even
> then I'd be cautious for a long time.
 
That's the barrier of entry for the nuthouse? Any actor could fool you
and your crazy "witnesses" and get in it seems. I suggest you watch the
film "One Flew Over The Cuckoo's Nest".
 
/Flibble
 
--
"Suppose it's all true, and you walk up to the pearly gates, and are
confronted by God," Bryne asked on his show The Meaning of Life. "What
will Stephen Fry say to him, her, or it?"
"I'd say, bone cancer in children? What's that about?" Fry replied.
"How dare you? How dare you create a world to which there is such misery
that is not our fault. It's not right, it's utterly, utterly evil."
"Why should I respect a capricious, mean-minded, stupid God who creates
a world that is so full of injustice and pain. That's what I would say."
"Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid>: Apr 11 02:14PM -0700

On 4/11/2018 2:01 PM, Scott Lurndal wrote:
> functions with the C11 name and semantics between the __sync functions
> and inline assembly.
 
> You also need to include <pthread.h> instead of <thread.h>.
 
You are right about that. Imvvho, it is nice to have a compiler that
just "does it", like Pelles C. Btw, a long time ago I had to code up
everything wrt atomics and membars wrt x86 in assembly:
 
http://webpages.charter.net/appcore/appcore/src/cpu/i686/ac_i686_gcc_asm.html
 
Argh, way back in 2005! How old am I now. ;^o
"Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid>: Apr 11 02:15PM -0700

On 4/11/2018 2:10 PM, Mr Flibble wrote:
 
> That's the barrier of entry for the nuthouse? Any actor could fool you
> and your crazy "witnesses" and get in it seems. I suggest you watch the
> film "One Flew Over The Cuckoo's Nest".
 
The sad part was that the main character was not crazy at all!
 
;^o
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: