bug-mes
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mescc is SLOW (it's running twice -- and other things might be too)


From: Timothy Sample
Subject: Re: Mescc is SLOW (it's running twice -- and other things might be too)
Date: Fri, 22 Dec 2023 21:03:13 -0600
User-agent: Gnus/5.13 (Gnus v5.13)

Hi Ekaitz,

Ekaitz Zarraga <ekaitz@elenq.tech> writes:

> Some people at #bootstrappable realized that the mescc was doing
> everything twice as it's warnings appeared twice in the terminal.

Oof.  That’s something I observed while working on it, but I thought it
was fixed!  Apologies.

> I think the root of this comes from:
> 9bd6dfab5c2b8458b0d6ef4d2d530eaf012b0bbc

I think it was introduced earlier.  I just checked, and even if I run
with ‘MES_BOOT’ set to “boot-0.scm” (disabling modules) [1], it gets run
twice.  It might have something to do with the changes to
‘primitive-load’, but I don’t have time to track it down now.  (It’s a
fix that breaks a workaround, so I’m not too concerned.)

> This is `scripts/mescc.scm.in` (shortened for brevity):
>
> ```
> #! @GUILE@ \
> --no-auto-compile -e main -L @guile_site_dir@ -C @guile_site_ccache_dir@ -s
> !#
> ...
>
> (cond-expand
>  (mes
>   (if (current-module) (use-modules (mescc))
>       (mes-use-module (mescc)))
>   (mescc:main (command-line)))
>  (guile
>   (use-modules (mescc))))
>
> (define (main args)
>   (mescc:main args))
> ```
>
> Will removing the `(mescc:main (command-line))` form the `cond-expand`
> fix this, or do we need to track if the module system is loaded or not
> and act accordingly?

Remove it.  It should not be there in either case.


-- Tim

[1] Getting MesCC to run without modules required the following patch.

>From e47dab1fdeeb376dd0bb75958fd290888de7ce15 Mon Sep 17 00:00:00 2001
From: Timothy Sample <samplet@ngyro.com>
Date: Fri, 22 Dec 2023 20:41:55 -0600
Subject: [PATCH] mescc: Fix running without modules.

This is a follow up to 8e731e414f18ce17d4147e316f15f08be34ca67c.

* mes/module/mescc/bytevectors.mes: Delete file.
* mes/module/mescc/as.mes: Do not import it.
---
 mes/module/mescc/as.mes          |  1 -
 mes/module/mescc/bytevectors.mes | 21 ---------------------
 2 files changed, 22 deletions(-)
 delete mode 100644 mes/module/mescc/bytevectors.mes

diff --git a/mes/module/mescc/as.mes b/mes/module/mescc/as.mes
index 02a56e7a3..3af91fd38 100644
--- a/mes/module/mescc/as.mes
+++ b/mes/module/mescc/as.mes
@@ -19,5 +19,4 @@
 ;;; along with GNU Mes.  If not, see <http://www.gnu.org/licenses/>.
 
 (mes-use-module (srfi srfi-1))
-(mes-use-module (mescc bytevectors))
 (include-from-path "mescc/as.scm")
diff --git a/mes/module/mescc/bytevectors.mes b/mes/module/mescc/bytevectors.mes
deleted file mode 100644
index ccd0d9a33..000000000
--- a/mes/module/mescc/bytevectors.mes
+++ /dev/null
@@ -1,21 +0,0 @@
-;;; -*-scheme-*-
-
-;;; GNU Mes --- Maxwell Equations of Software
-;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
-;;;
-;;; This file is part of GNU Mes.
-;;;
-;;; GNU Mes is free software; you can redistribute it and/or modify it
-;;; under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 3 of the License, or (at
-;;; your option) any later version.
-;;;
-;;; GNU Mes is distributed in the hope that it will be useful, but
-;;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with GNU Mes.  If not, see <http://www.gnu.org/licenses/>.
-
-(include-from-path "mescc/bytevectors.scm")
-- 
2.41.0


reply via email to

[Prev in Thread] Current Thread [Next in Thread]