Sunday, September 15, 2019

Digest for comp.lang.c++@googlegroups.com - 13 updates in 6 topics

Wisdom90 <d@d.d>: Sep 15 06:43AM -0700

Hello,
 
 
Today i will talk about Rust and about race conditions detection and
deadlock detection..
 
I think Rust uses static detection , but the shortcoming of static
detection is that there is there are also many false reports.
 
Other than that:
 
Safe Rust guarantees an absence of data races, which are defined as:
 
- two or more threads concurrently accessing a location of memory
- one of them is a write
- one of them is unsynchronized
 
A data race has Undefined Behavior, and is therefore impossible to
perform in Safe Rust. Data races are mostly prevented through Rust's
ownership system: it's impossible to alias a mutable reference, so it's
impossible to perform a data race. Interior mutability makes this more
complicated, which is largely why we have the Send and Sync traits (see
below).
 
However Rust does not prevent general race conditions.
 
Read more here:
 
https://doc.rust-lang.org/nomicon/races.html
 
 
Also with Rust there is no deadlock detection.
 
 
Thank you,
Amine Moulay Ramdane.
Melzzzzz <Melzzzzz@zzzzz.com>: Sep 15 03:09PM

> Hello,
 
> Thank you,
> Amine Moulay Ramdane.
 
Changing nick again? PLonk.
 
--
press any key to continue or any other to quit...
U ničemu ja ne uživam kao u svom statusu INVALIDA -- Zli Zec
Na divljem zapadu i nije bilo tako puno nasilja, upravo zato jer su svi
bili naoruzani. -- Mladen Gogala
aminer68@gmail.com: Sep 15 07:22AM -0700

Hello,
 
 
Read more about Rust:
 
 
You will notice by reading the following that by taking
a mutable referenced to a variable, you will notice that
you can not after that read or write to the variable, and
i think that this will lesser parallelism in scenarios that
you have more parallelism, so it is like the Read-Write Lock pattern,
so i think to higher parallelism in those scenarios you have to go
to unsafe Rust and this is not good.

Read the following to notice it:
 
https://manishearth.github.io/blog/2015/05/17/the-problem-with-shared-mutability/
 
 
Also with Rust there is no deadlock detection.
 
 
Thank you,
Amine Moulay Ramdane.
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Sep 15 03:25PM +0100


> Also with Rust there is no deadlock detection.
 
> Thank you,
> Amine Moulay Ramdane.
 
Fuck. Off. You. Egregious. Spamming. Cunt.
 
/Flibble
 
--
"Snakes didn't evolve, instead talking snakes with legs changed into
snakes." - Rick C. Hodgin
 
"You won't burn in hell. But be nice anyway." – Ricky Gervais
 
"I see Atheists are fighting and killing each other again, over who
doesn't believe in any God the most. Oh, no..wait.. that never happens." –
Ricky Gervais
 
"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."
aminer68@gmail.com: Sep 15 07:12AM -0700

Hello,
 
 
Yet about Rust..
 
 
You will notice by reading the following that by taking
a mutable referenced to a variable, you will notice that
you can not after that read or write to the variable, and
i think that this will lesser parallelism in scenarios that
you have more parallelism, so it is like the Reade-Write Lock pattern,
so i think to higher parallelism in those scenarios you have to go
to unsafe Rust and this is not good.

Read the following to noticed it:
 
https://manishearth.github.io/blog/2015/05/17/the-problem-with-shared-mutability/
 
 
 
Thank you,
Amine Moulay Ramdane.
porparek@gmail.com: Sep 15 02:51AM -0700

Hi,
 
I've defined the following concept.
But the compiler does not report constraint error with non-integral "Car" type.
Is my concept correct ?
If not, could you please write what should I do to make it correct.
I'm using gcc 7.4.0.
 
Thank you
 
template < typename T >
concept bool Integral = requires ( T t ) {
{ std::is_integral<T>::value } -> bool;
};
 
template < Integral T >
void fun ( T t )
{
}
 
struct Car {};
 
int main ()
{
Car c;
fun ( c );
return 0;
}
Juha Nieminen <nospam@thanks.invalid>: Sep 15 10:39AM

> I'm using gcc 7.4.0.
 
The latest version of gcc is 9.2.
 
Start with that.
"Öö Tiib" <ootiib@hot.ee>: Sep 15 04:04AM -0700

On Sunday, 15 September 2019 13:39:41 UTC+3, Juha Nieminen wrote:
> > I'm using gcc 7.4.0.
 
> The latest version of gcc is 9.2.
 
> Start with that.
 
The g++ 9.2 also compiles OP's example without constraint errors.
Demo: http://coliru.stacked-crooked.com/a/5e968a4ed8bd8c08
"Öö Tiib" <ootiib@hot.ee>: Sep 15 04:22AM -0700

> concept bool Integral = requires ( T t ) {
> { std::is_integral<T>::value } -> bool;
> };
 
I guess you wanted to write here:
 
template < typename T >
concept Integral = std::is_integral<T>::value;
Bo Persson <bo@bo-persson.se>: Sep 15 01:30PM +0200

On 2019-09-15 at 13:22, Öö Tiib wrote:
 
> I guess you wanted to write here:
 
> template < typename T >
> concept Integral = std::is_integral<T>::value;
 
Right.
 
The problem with the first concept attempt is that
is_integral<Car>::value is still a bool, only with value false.
 
 
Bo Persson
Jeff Barnett <jbb@notatt.com>: Sep 14 06:12PM -0600

peteolcott wrote on 9/14/2019 4:42 PM:
 
>> /Flibble
 
> Resorting to ad hominem as you did is evidence that I am correct
> because people resort to ad hominem when then run out of reasoning.
 
Me thinks that a conjecture about you being off your meds is justified
by the complete, total non sequitur of your response. Try lithium and,
as suggested elsewhere, get your hand out of your pants when responding.
The response you criticized was not ad hominem, it was a concern for
your well being since you seem more and more nuts. Just say thank you.
--
Jeff Barnett
Juha Nieminen <nospam@thanks.invalid>: Sep 15 08:09AM


>> Learn some number theory, will you?
 
> APPARENTLY I AM RIGHT AND YOU ARE WRONG!!!
 
> https://www.encyclopediaofmath.org/index.php/Interval_and_segment
 
You are right and I'm wrong, even though that website does not
say what you are saying?
 
It doesn't matter how many arguments you present or how much you
shout, it will not make "the smallest real number larger than 3"
to start to exist.
 
In fact, even if you limit yourself to rational numbers, it still
doesn't exist. There is no "smallest rational number larger than 3".
 
Infinitesimals, no matter how you define them, do not help here.
Such a number still doesn't exist, even if you include infinitesimals
into your number system.
 
Removing one number from an interval of real (or even rational) numbers
doesn't make that number exist. You can remove an infinite amount of
numbers from that interval, and it still doesn't make such a number
to exist.
Bonita Montero <Bonita.Montero@gmail.com>: Sep 15 03:00AM +0200

Now I had something like this:
 
#include <memory>
 
using namespace std;
 
template<typename Alloc = allocator<char>>
struct S
{
struct A
{
};
 
using a_alloc = typename allocator_traits<Alloc>::template
rebind_alloc<A>;
};
 
So why is this "template" in:
using a_alloc = typename allocator_traits<Alloc>::template rebind_alloc<A>;
necessary?
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: