From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id UMqzHT1bJWeHdwEAe85BDQ:P1 (envelope-from ) for ; Fri, 01 Nov 2024 22:50:37 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id UMqzHT1bJWeHdwEAe85BDQ (envelope-from ) for ; Fri, 01 Nov 2024 23:50:37 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lendvai.name header.s=protonmail2 header.b=AeNnz0EJ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=lendvai.name (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1730501437; a=rsa-sha256; cv=none; b=C8qLtCrhw06BB4zQIDzSW+5Phv5Wv8rz9oqcSQ2OuYwbDDqNHyexCgnrhxlP9xKMdRciku HEgBVALdpmOU3rmmY04Ztp9uyRXQ0B7+QrcgsOPI1vYnnU//Cb7kzvXU2oFWuzDDnY+81s eoZdw9oavLidyGD8lbU8hfut7nXxtgyedH0MrfpoWKtArdwwiUC3+qmGj9EfDN3C7+8w4a GMv6plQ8oqZpr2kulG/oTZIdYNsjRunYjvmWeJqH+OOWxph7POaNlsCXacsAZLtUdA001g bHXbNI4utKnTltx/8NhOA2L4FHJXJmS7/YkvYkDTBHs99TU14QCcAKr0YPELOA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lendvai.name header.s=protonmail2 header.b=AeNnz0EJ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=lendvai.name (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1730501437; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=BVa6GotHJF2Ctb9MzdVs8aCtxeRLTyIHG0MXgvyjjx8=; b=PguXHPKLN5YjyF6f++BB9OZiz2ki3wFnhxc3Tf5z50LhpBORp52ki09pM4QzsbRHEtOhrt wWEmU6by1/78lwfsMLe9OEeWlOfewd5iWus4azloj2AdxgSlacR8fRDgm5AyGZla1323Jn UH4agqNAxb5yBc7TigZpSVjmeyGJHF7gpiAQDpsBDxFf0kPisDbz6WFDoWNjWYtlko54M6 pcHXZWy5weHZByCaG1ZcA9f6jlEdwWCV1+ygX/po130NzwmPzT/csFlOKsFOhjpaoQjHkS +NSGFHFCkDaQLb33kQZN8HuTCPQPoAf2TZtXZ7Z7Q714mgwLTBABJkfD3i+ErQ== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 094B84834 for ; Fri, 01 Nov 2024 23:50:37 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t70Sx-0006Fi-2c; Fri, 01 Nov 2024 18:50:03 -0400 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 1t70Sv-0006FS-Qv for guix-devel@gnu.org; Fri, 01 Nov 2024 18:50:02 -0400 Received: from mail-4323.proton.ch ([185.70.43.23]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t70Ss-0003WT-MR for guix-devel@gnu.org; Fri, 01 Nov 2024 18:50:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lendvai.name; s=protonmail2; t=1730501395; x=1730760595; bh=BVa6GotHJF2Ctb9MzdVs8aCtxeRLTyIHG0MXgvyjjx8=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=AeNnz0EJFxZzd4le4uEvR2JYGwWT1aEKBObbsbFGpcye3Z+7btcKxq/5eyyrwgm3s 255Dsdx0W5y+ipPFuf1/0QdgTKC1Kns4wD0ZvfXsBEXYNNgshU6Sjjy3z2elsoedMp WUPsRHv2lz6CjkU4OZxb7C+PJeyGX4sK3GxCwuyoDaAVbpzDZX61aOMMel9x+24mm6 jmJVwXhIhtHCIzjqt8a8APNATSTFl8rVsRC77LEHMd3v3jnDMtEeOSqAhDytUPAUJc W7tGujXytLormVKjE3d9SGlGusVoFW7rxaYSJotOv5qZaWHzLVBzBZtllDc7rkWQeP K1oNpUGte19FA== Date: Fri, 01 Nov 2024 22:49:49 +0000 To: Evan Cooney From: Attila Lendvai Cc: guix-devel@gnu.org Subject: Re: Including code in a non-Guile language into Guix Message-ID: In-Reply-To: References: Feedback-ID: 28384833:user:proton X-Pm-Message-ID: f753d32b207383df34e2982901003753ff07e453 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.70.43.23; envelope-from=attila@lendvai.name; helo=mail-4323.proton.ch 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, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: 1.65 X-Spam-Score: 1.65 X-Migadu-Queue-Id: 094B84834 X-Migadu-Scanner: mx12.migadu.com X-TUID: aLvaFTyOMOgn > I know that Guix is mainly written in Guile, but has much thought > gone into optimizing these commands by rewriting some of the code in > a more performance-oriented language like C? this is a slow-dying, but completely unjustified stereotype of C and "highl= evel" languages like lisp. the truth is that for any non-trivial problem/domain it's easier to write f= aster lisp code than C. the reason is that even if a FOR loop runs twice as fast in C (it's not), i= f the programmer can spend more time thinking/experimenting with the domain= , and come up with a better optimization *in the domain*, then he may gain = *orders of magnitude*, not a mere doubling that "more performance-oriented = languages" provide. and if the task is about the most efficient use of the hardware at hand (th= ink of simulations), then i have way more tools to profile my lisp code, an= d it's way easier to extend the lisp compiler under me with some custom-mad= e primitives to peephole optimize my hotspots. or run the same code with an= d without custom made instrumentation to gain more insights about the bottl= enecks. or compile my hotspots at runtime, if e.g. i have a task that rarel= y changes, but must be repeated endlessly (think of a firewall). or if the = domain is such, then straight out write a custom compiler for a DSL that is= specific to the task at hand, and seamlessly integrates into the the rest = of my lisp codebase. when coding in C you're wasting a lot of your attention on manually transla= ting the domain to a verbose mess of C code that can't really encode much o= f the domain abstractions. writing C code is much more of a manual, lossy t= ranslation from domain-to-C than writing a lisp solution to the same proble= m, which is much more about converging lisp and your domain from both direc= tions. and on top of this all, what a timesink debugging C code can be! PS: note though that the above is written from experience with more capable= lisps like SBCL + Slime. --=20 =E2=80=A2 attila lendvai =E2=80=A2 PGP: 963F 5D5F 45C7 DFCD 0A39 -- =E2=80=9CGovernment is the great fiction through which everybody endeavors = to live at the expense of everybody else.=E2=80=9D =09=E2=80=94 Fr=C3=A9d=C3=A9ric Bastiat (1801=E2=80=931850), 'The State' (1= 848)