Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connections
Warning: mysqli::query(): Couldn't fetch mysqli in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\index.php on line 66
Article <v12175$d305$2@raubtier-asyl.eternal-september.org>
Deutsch   English   Français   Italiano  
<v12175$d305$2@raubtier-asyl.eternal-september.org>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!raubtier-asyl.eternal-september.org!.POSTED!not-for-mail
From: Bonita Montero <Bonita.Montero@gmail.com>
Newsgroups: comp.lang.c++,comp.lang.c
Subject: Re: Threads across programming languages
Date: Fri, 3 May 2024 08:45:58 +0200
Organization: A noiseless patient Spider
Lines: 79
Message-ID: <v12175$d305$2@raubtier-asyl.eternal-september.org>
References: <GIL-20240429161553@ram.dialup.fu-berlin.de>
 <v0ogum$1rc5n$1@dont-email.me> <v0ovvl$1ur12$4@dont-email.me>
 <v0p06i$1uq6q$5@dont-email.me>
 <v0shti$2vrco$2@raubtier-asyl.eternal-september.org>
 <v0spsh$31ds4$3@dont-email.me>
 <v0stic$325kv$3@raubtier-asyl.eternal-september.org>
 <v0svtn$32o8h$1@dont-email.me>
 <v0t091$32qj6$1@raubtier-asyl.eternal-september.org>
 <v0u90h$3c1r5$4@dont-email.me>
 <v0v28q$3ku1r$1@raubtier-asyl.eternal-september.org>
 <v1176k$4at1$3@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 03 May 2024 08:45:57 +0200 (CEST)
Injection-Info: raubtier-asyl.eternal-september.org; posting-host="c030ccadbcaefe746bb34fa5f5a5f34a";
	logging-data="429061"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19+miOz8Pqh4MOue3VLB2ySLzNkQoGXSxw="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:vT5zFYNSG1px9apXyTax5hAspiQ=
In-Reply-To: <v1176k$4at1$3@dont-email.me>
Content-Language: de-DE
Bytes: 3215

Am 03.05.2024 um 01:21 schrieb Lawrence D'Oliveiro:

> Fun fact: the Linux kernel (the world’s most successful software project),
> originally entirely C-based, is now incorporating Rust-based development.
> It never accepted C++.

There are for sure a magnitude more C++ developers than C developers
because C has a magnitude more productivity.

> I/O performance certainly is possible with Python, and it has the high-
> performance production-quality frameworks to prove it.

I thought about high performance code with >= 1e5 IOs/s.
That's not possible with Python.

> Try it with something that has actual lexically-bound local variables in
> it:
> 
>      def factory(count : int) :
> 
>          def counter() :
>              nonlocal count
>              count += 1
>              return count
>          #end counter
> 
>      #begin
>          return counter
>      #end factory
> 
>      f1 = factory(3)
>      f2 = factory(30)
>      print(f1())
>      print(f2())
>      print(f1())
>      print(f2())
> 
> output:
> 
>      4
>      31
>      5
>      32

That should be similar:

#include <iostream>
#include <functional>

using namespace std;

function<int ()> factory()
{
	return []
		{
			static int count = 0;
			return ++count;
		};
}

int main()
{
	auto
		f1 = factory(),
		f2 = factory();
	cout << f1() << endl;
	cout << f2() << endl;
	cout << f1() << endl;
	cout << f2() << endl;
}


>> With io_uring you can easily handle millions of I/Os with a single
>> thread, but not with Python.

> Debunked above.

That's not possible with Python because Python is slow.