From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.help Subject: Re: Non file buffers and default-directory Date: Thu, 4 May 2023 19:49:41 +0200 Message-ID: References: <83fs8qzrab.fsf@gnu.org> <87cz3r28ye.fsf@ledu-giraud.fr> <83ildjvply.fsf@gnu.org> <87bkjb4zkf.fsf@dataswamp.org> <831qk5uag3.fsf@gnu.org> <87a5ytw1jo.fsf@dataswamp.org> <83sfckqlzg.fsf@gnu.org> <877ctsx0n7.fsf@dataswamp.org> <87ttwvvgul.fsf@dataswamp.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9TG08PvY0YHW4KfH" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39850"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 04 19:51:40 2023 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pud7D-000A8A-J7 for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 04 May 2023 19:51:39 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pud5U-00033X-M7; Thu, 04 May 2023 13:49:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pud5Q-0002wy-BO for help-gnu-emacs@gnu.org; Thu, 04 May 2023 13:49:49 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pud5M-0002Vf-O9 for help-gnu-emacs@gnu.org; Thu, 04 May 2023 13:49:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=From:In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:To:Date:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=tWTZglcgZYLH3vNdDB5nVPoPH0xybUELymI+3jJDxnE=; b=DTibQqXua0sEQ1xXOvAlzpAznF 4wctrJ+wdeSXpsQIa0Bhe1BXuwsigZs/USsNsEzfsLVfKoaZYKOp1hVX7yPc+a9EGvEbZo8tPYmgm Ye+tvSsJJKidosEL2KDeVpHPtBUUoLd6p39kLBo8OF6kXcQNP1lO5rpg12G2IManLDZFKfd4x4GlH sMs0nX6qNojoOjuxhLtKLD2JUlt3tUnF1pkr574XiAPmI8azKDU1F9Sv/ZpcY6AEQWVj2fQzcco4U fq6AOdwFGSzG1IxO1YV7rD/A+mzck4f0tX1v7XxHrW6pNuco62MA0vyxe8BIamtG5AUQ6O4v4DcD7 pVfsX+9Q==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.94.2) (envelope-from ) id 1pud5J-0004r5-C4 for help-gnu-emacs@gnu.org; Thu, 04 May 2023 19:49:41 +0200 Content-Disposition: inline In-Reply-To: <87ttwvvgul.fsf@dataswamp.org> Received-SPF: pass client-ip=5.199.139.25; envelope-from=tomas@tuxteam.de; helo=mail.tuxteam.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:143507 Archived-At: --9TG08PvY0YHW4KfH Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 02, 2023 at 12:15:14AM +0200, Emanuel Berg wrote: > tomas wrote: >=20 > >> maybe show us some simplest implementation "hello world" [...] > > > > (defun hello-world () > > (message "Hello, World")) > > > > Happy now? >=20 > No, since that should just execute sequentially and monopolize > the Emacs process if I am correct? [...] Your request is far too unspecific as to allow a meaningful answer. What do you mean by a "thread"? What do you expect "parallel" to do"? How do your programs look like? Do you want multiprocessing with explicit continuation passing or with pseudo- or real parallelism with locking around commonly shared resources? Or do rather message passing without any shared resources? "Threads" is not just some kind of magical dust you sprinkle over your program to make it execute in parallel, alas. For one extreme of the spectrum, making a program responsive while waiting for data to trickle in via several network sockets doesn't need any threads (arguably, threads can make it worse, as web server folks have proven). On the other extreme, you might want to distribute a big parallelizable work to your 40 CPU cores (I only have 2, alas). Most of the time,you'd be better of with many processes. Life takes place somewhere in between that (unless you are either working with big clusters, or with GPUs). My take is that threads are a bit overrated. But I may be wrong. Cheers --=20 t --9TG08PvY0YHW4KfH Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCZFPwKgAKCRAFyCz1etHa RgqzAJ9BZsIZU2LNIea3V0lun5vpGJ3ObgCfcL59Bq6pvpJcnqi8uyz5LPoSMj8= =wgGk -----END PGP SIGNATURE----- --9TG08PvY0YHW4KfH--