unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* (unknown)
@ 2013-12-30  2:58 Eduardo Acuña
  0 siblings, 0 replies; 11+ messages in thread
From: Eduardo Acuña @ 2013-12-30  2:58 UTC (permalink / raw)
  To: guile-user

[-- Attachment #1: Type: text/plain, Size: 1045 bytes --]

Hi, i have a question about the use of the function
scm_remember_upto_here_1.

The Guile manual says:

"It’s only in quite rare circumstances that a missing
scm_remember_upto_here_1 will
bite, but when it happens the consequences are serious. Fortunately the
rule is simple:
whenever calling a Guile library function or doing something that might,
ensure that the
SCM of a smob is referenced past all accesses to its insides. Do this by
adding an scm_
remember_upto_here_1 if there are no other references."

In the example code the clean_image function does call
scm_remember_upto_here_1 after accessing data in the smob, however the
function print_image does not, and access the name member of the image.

If i don't call a Guile library function, but i modify a value inside the
smob, do i have tu call this function?

In the case of the print_image function, a scm_display is called with a SCM
value inside the smob, that's why they didn't call scm_remember_upto_here_1
?

When is necessary to call this function?

[-- Attachment #2: Type: text/html, Size: 1170 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* (unknown)
@ 2023-08-01  9:53 Damien Mattei
  2023-08-01  9:59 ` Jean Abou Samra
  2023-08-01 10:57 ` message without subject Zelphir Kaltstahl
  0 siblings, 2 replies; 11+ messages in thread
From: Damien Mattei @ 2023-08-01  9:53 UTC (permalink / raw)
  To: guile-user

hello,

i have this error:

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
Throw to key `match-error' with args `("match" "no matching pattern" (1 0))'.

i thought it was a 'match' related error as i used it in a macro:

;;(display "before match") (newline)
       (match (list index1-or-keyword-eval-pos index2-or-keyword-eval-pos)

          ;;  {a <+ (make-vector 7 0)}
          ;; '#(0 0 0 0 0 0 0)
          ;; > {a[/ /] <- #(1 2 3)}
          ;; > a
          ;; '#(1 2 3 0 0 0 0)
          (((? (cut equal? <> /)) (? (cut equal? <> /)))
(container-copy! container-eval
                                          0
                                          expr-eval))

          ;;  {s <+ (string-append "abcdefgh")}
          ;; "abcdefgh"
          ;; > {s[3 /] <- "zob"}
          ;; > s
          ;; "abczobgh"
          ;; >
          ((i1 (? (cut equal? <> /))) (container-copy! container-eval
                          i1
                          expr-eval))

          (((? (cut equal? <> /)) i2) (container-copy! container-eval
                               0
                               expr-eval
                               0
                               i2))

          ((i1 i2)  (if (vector? container-eval)  ;; normal case
                 (function-array-n-dim-set! container-eval expr-eval
(reverse (list i1 i2)))
                 (array-set! container-eval index1-or-keyword-eval
index2-or-keyword-eval expr-eval)))) ;; end match

if really the given args are (0 1) i suppose the last case of match
should be evaluated?

why not?

quoting the whole part of the macro and i still have the issue
this seems to prove the problem is in other part of my code but match
is only used here???

so i do not understand

i search on the net and only find relating issues with guix ,which i do not use:

https://www.youtube.com/watch?v=sqYGI5Ow2wY

i probably missed something cross-developping between my code in guile
and racket as the 'match' are not compatible but i'm sticked with this
problem for hours... any idea??? if i use old code i suppose it will
work (i have older version)

Damien



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re:
  2023-08-01  9:53 (unknown) Damien Mattei
@ 2023-08-01  9:59 ` Jean Abou Samra
  2023-08-01 10:46   ` Re: Damien Mattei
  2023-08-01 10:57 ` message without subject Zelphir Kaltstahl
  1 sibling, 1 reply; 11+ messages in thread
From: Jean Abou Samra @ 2023-08-01  9:59 UTC (permalink / raw)
  To: Damien Mattei, guile-user

[-- Attachment #1: Type: text/plain, Size: 432 bytes --]


> quoting the whole part of the macro and i still have the issue
> this seems to prove the problem is in other part of my code but match
> is only used here???


It is probably used in somewhere in a predefined Guile function that you are
using.

So it's impossible to debug without more info.

You may want to use (debug-enable 'backtrace) to get somewhat more precise hints
to the location of the problem.

Jean


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re:
  2023-08-01  9:59 ` Jean Abou Samra
@ 2023-08-01 10:46   ` Damien Mattei
  2023-08-01 11:46     ` Re: Jean Abou Samra
  0 siblings, 1 reply; 11+ messages in thread
From: Damien Mattei @ 2023-08-01 10:46 UTC (permalink / raw)
  To: Jean Abou Samra; +Cc: guile-user

i'm perplex , i'm sure now it is related to 'match'  because of that:
scheme@(guile-user)> (use-modules (ice-9 match))
scheme@(guile-user)> (match '(1 0) ((2 0) 'nomatch))
ice-9/boot-9.scm:1685:16: In procedure raise-exception:
Throw to key `match-error' with args `("match" "no matching pattern" (1 0))'.

Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]> ,q
scheme@(guile-user)> (match (list 1 0) ((2 0) 'wrong) ((i1 i2) (cons i1 i2)))
$1 = (1 . 0)

works well here

but not here? :
(match (list index1-or-keyword-eval-pos index2-or-keyword-eval-pos)

.... code cut .......

((i1 i2)  (if (vector? container-eval)  ;; normal case
                 (function-array-n-dim-set! container-eval expr-eval
(reverse (list i1 i2)))
                 (array-set! container-eval index1-or-keyword-eval
index2-or-keyword-eval expr-eval)))) ;; end match


probably ,as you say , 'match' is used in other place but i 'grep-ed'
all the directory and can not find where, i'm only using match this 2
months  i even do not know it exists  before... i almost sure i never
use it in other place in the code,so i'm still not understand....

On Tue, Aug 1, 2023 at 11:59 AM Jean Abou Samra <jean@abou-samra.fr> wrote:
>
>
> quoting the whole part of the macro and i still have the issue
> this seems to prove the problem is in other part of my code but match
> is only used here???
>
>
>
> It is probably used in somewhere in a predefined Guile function that you are using.
>
> So it's impossible to debug without more info.
>
> You may want to use (debug-enable 'backtrace) to get somewhat more precise hints to the location of the problem.
>
> Jean
>



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: message without subject
  2023-08-01  9:53 (unknown) Damien Mattei
  2023-08-01  9:59 ` Jean Abou Samra
@ 2023-08-01 10:57 ` Zelphir Kaltstahl
  2023-08-01 13:46   ` match error Damien Mattei
  1 sibling, 1 reply; 11+ messages in thread
From: Zelphir Kaltstahl @ 2023-08-01 10:57 UTC (permalink / raw)
  To: Damien Mattei; +Cc: guile-user

On 8/1/23 11:53, Damien Mattei wrote:
> hello,
>
> i have this error:
>
> ice-9/boot-9.scm:1685:16: In procedure raise-exception:
> Throw to key `match-error' with args `("match" "no matching pattern" (1 0))'.
>
> i thought it was a 'match' related error as i used it in a macro:
>
> ;;(display "before match") (newline)
>         (match (list index1-or-keyword-eval-pos index2-or-keyword-eval-pos)
>
>            ;;  {a <+ (make-vector 7 0)}
>            ;; '#(0 0 0 0 0 0 0)
>            ;; > {a[/ /] <- #(1 2 3)}
>            ;; > a
>            ;; '#(1 2 3 0 0 0 0)
>            (((? (cut equal? <> /)) (? (cut equal? <> /)))
> (container-copy! container-eval
>                                            0
>                                            expr-eval))
>
>            ;;  {s <+ (string-append "abcdefgh")}
>            ;; "abcdefgh"
>            ;; > {s[3 /] <- "zob"}
>            ;; > s
>            ;; "abczobgh"
>            ;; >
>            ((i1 (? (cut equal? <> /))) (container-copy! container-eval
>                            i1
>                            expr-eval))
>
>            (((? (cut equal? <> /)) i2) (container-copy! container-eval
>                                 0
>                                 expr-eval
>                                 0
>                                 i2))
>
>            ((i1 i2)  (if (vector? container-eval)  ;; normal case
>                   (function-array-n-dim-set! container-eval expr-eval
> (reverse (list i1 i2)))
>                   (array-set! container-eval index1-or-keyword-eval
> index2-or-keyword-eval expr-eval)))) ;; end match
>
> if really the given args are (0 1) i suppose the last case of match
> should be evaluated?
>
> why not?
>
> quoting the whole part of the macro and i still have the issue
> this seems to prove the problem is in other part of my code but match
> is only used here???
>
> so i do not understand
>
> i search on the net and only find relating issues with guix ,which i do not use:
>
> https://www.youtube.com/watch?v=sqYGI5Ow2wY
>
> i probably missed something cross-developping between my code in guile
> and racket as the 'match' are not compatible but i'm sticked with this
> problem for hours... any idea??? if i use old code i suppose it will
> work (i have older version)
>
> Damien

Hello Damien (or responding ones)!

It would be good to have a proper subject in your message to the mailing list, 
so that one can see what your e-mail is about, without having to read 
everything. : ) Also good for later searching messages to the mailing list, when 
remembering there being some discussion and wanting to read up on it again.

Best regards,
Zelphir

-- 
repositories: https://notabug.org/ZelphirKaltstahl




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re:
  2023-08-01 10:46   ` Re: Damien Mattei
@ 2023-08-01 11:46     ` Jean Abou Samra
  2023-08-01 14:28       ` match error Damien Mattei
  0 siblings, 1 reply; 11+ messages in thread
From: Jean Abou Samra @ 2023-08-01 11:46 UTC (permalink / raw)
  To: Damien Mattei; +Cc: guile-user

[-- Attachment #1: Type: text/plain, Size: 611 bytes --]

Le mardi 01 août 2023 à 12:46 +0200, Damien Mattei a écrit :
> probably ,as you say , 'match' is used in other place but i 'grep-ed'
> all the directory and can not find where, i'm only using match this 2
> months  i even do not know it exists  before... i almost sure i never
> use it in other place in the code,so i'm still not understand....


I don't think we're on the same page. I'm saying that match is also
used a lot internally in Guile's own code, so you should get a backtrace
to find which one failed.

~/repos/guile $ rg "\(match" -g '*.scm' -g '!gc-benchmarks' | wc -l
1620



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: match error
  2023-08-01 10:57 ` message without subject Zelphir Kaltstahl
@ 2023-08-01 13:46   ` Damien Mattei
  0 siblings, 0 replies; 11+ messages in thread
From: Damien Mattei @ 2023-08-01 13:46 UTC (permalink / raw)
  To: Zelphir Kaltstahl; +Cc: guile-user

yes Zelphir, sorry ,why i forgot the subject? i do not know
, i'm using gmail and the feature for editing the subject is hidden :-(
now it is fixed
Damien

On Tue, Aug 1, 2023 at 12:57 PM Zelphir Kaltstahl
<zelphirkaltstahl@posteo.de> wrote:
>
> On 8/1/23 11:53, Damien Mattei wrote:
> > hello,
> >
> > i have this error:
> >
> > ice-9/boot-9.scm:1685:16: In procedure raise-exception:
> > Throw to key `match-error' with args `("match" "no matching pattern" (1 0))'.
> >
> > i thought it was a 'match' related error as i used it in a macro:
> >
> > ;;(display "before match") (newline)
> >         (match (list index1-or-keyword-eval-pos index2-or-keyword-eval-pos)
> >
> >            ;;  {a <+ (make-vector 7 0)}
> >            ;; '#(0 0 0 0 0 0 0)
> >            ;; > {a[/ /] <- #(1 2 3)}
> >            ;; > a
> >            ;; '#(1 2 3 0 0 0 0)
> >            (((? (cut equal? <> /)) (? (cut equal? <> /)))
> > (container-copy! container-eval
> >                                            0
> >                                            expr-eval))
> >
> >            ;;  {s <+ (string-append "abcdefgh")}
> >            ;; "abcdefgh"
> >            ;; > {s[3 /] <- "zob"}
> >            ;; > s
> >            ;; "abczobgh"
> >            ;; >
> >            ((i1 (? (cut equal? <> /))) (container-copy! container-eval
> >                            i1
> >                            expr-eval))
> >
> >            (((? (cut equal? <> /)) i2) (container-copy! container-eval
> >                                 0
> >                                 expr-eval
> >                                 0
> >                                 i2))
> >
> >            ((i1 i2)  (if (vector? container-eval)  ;; normal case
> >                   (function-array-n-dim-set! container-eval expr-eval
> > (reverse (list i1 i2)))
> >                   (array-set! container-eval index1-or-keyword-eval
> > index2-or-keyword-eval expr-eval)))) ;; end match
> >
> > if really the given args are (0 1) i suppose the last case of match
> > should be evaluated?
> >
> > why not?
> >
> > quoting the whole part of the macro and i still have the issue
> > this seems to prove the problem is in other part of my code but match
> > is only used here???
> >
> > so i do not understand
> >
> > i search on the net and only find relating issues with guix ,which i do not use:
> >
> > https://www.youtube.com/watch?v=sqYGI5Ow2wY
> >
> > i probably missed something cross-developping between my code in guile
> > and racket as the 'match' are not compatible but i'm sticked with this
> > problem for hours... any idea??? if i use old code i suppose it will
> > work (i have older version)
> >
> > Damien
>
> Hello Damien (or responding ones)!
>
> It would be good to have a proper subject in your message to the mailing list,
> so that one can see what your e-mail is about, without having to read
> everything. : ) Also good for later searching messages to the mailing list, when
> remembering there being some discussion and wanting to read up on it again.
>
> Best regards,
> Zelphir
>
> --
> repositories: https://notabug.org/ZelphirKaltstahl
>



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: match error
  2023-08-01 11:46     ` Re: Jean Abou Samra
@ 2023-08-01 14:28       ` Damien Mattei
  2023-08-01 17:32         ` Damien Mattei
  0 siblings, 1 reply; 11+ messages in thread
From: Damien Mattei @ 2023-08-01 14:28 UTC (permalink / raw)
  To: Jean Abou Samra; +Cc: guile-user

i will test that , for now i'm testing under Linux on another system
(previous one was Mac OS)
and the same code works :

GNU Guile 3.0.1
Copyright (C) 1995-2020 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guile-user)> (load "start-λογικι-guile+.scm")
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-auto-compile argument to disable.
;;; compiling /home/mattei/Dropbox/git/library-FunctProg/start-λογικι-guile+.scm
;;; compiling /usr/share/guile/site/3.0/Scheme+.scm
;;; compiling /usr/share/guile/site/3.0/growable-vector.scm
;;; compiled /home/mattei/.cache/guile/ccache/3.0-LE-8-4.2/usr/share/guile/site/3.0/growable-vector.scm.go
;;; assignment.scm:903:12: warning: macro `when' used before definition
;;; assignment.scm:935:2: warning: macro `when' used before definition
;;; assignment.scm:941:6: warning: macro `when' used before definition
;;; assignment.scm:947:6: warning: macro `when' used before definition
;;; compiled /home/mattei/.cache/guile/ccache/3.0-LE-8-4.2/usr/share/guile/site/3.0/Scheme+.scm.go
;;; guile/logiki+.scm:3661:28: warning: possibly unbound variable
`string->pointer'
;;; guile/logiki+.scm:3661:2: warning: possibly unbound variable `forfunct'
;;; guile/logiki+.scm:3641:26: warning: possibly unbound variable
`string->pointer'
;;; guile/logiki+.scm:3641:2: warning: possibly unbound variable `openmp'
;;; guile/logiki+.scm:3765:6: warning: possibly unbound variable `openmp'
;;; guile/logiki+.scm:3765:25: warning: possibly unbound variable
`string->pointer'
;;; guile/logiki+.scm:3869:6: warning: possibly unbound variable `openmp'
;;; guile/logiki+.scm:3869:25: warning: possibly unbound variable
`string->pointer'
;;; guile/logiki+.scm:3965:32: warning: possibly unbound variable
`parallel-vector-map'
;;; guile/logiki+.scm:4059:6: warning: possibly unbound variable `forfunct'
;;; guile/logiki+.scm:4059:27: warning: possibly unbound variable
`string->pointer'
;;; compiled /home/mattei/.cache/guile/ccache/3.0-LE-8-4.2/home/mattei/Dropbox/git/library-FunctProg/start-λογικι-guile+.scm.go
scheme@(guile-user)> (logic-test)

test 1
((¬a ∧ b ∧ d) ∨ (¬b ∧ ¬c) ∨ (c ∧ ¬d))
EXACT

test 2
((¬a ∧ b ∧ d) ∨ (¬b ∧ ¬c) ∨ (c ∧ ¬d))
EXACT

test 3
((A ∧ B) ∨ (A ∧ C) ∨ (B ∧ C))
EXACT

test 4
((B0 ∧ B1) ∨ (B0 ∧ C1) ∨ (B1 ∧ C1))
EXACT

test 5
(or (and B2 B3) (and B2 B4) (and B3 (not B12)))
EXACT

test 6
(or (and (not a) (not b) (not c) (not d)) (and (not a) (not b) (not c)
d) (and (not a) (not b) c (not d)) (and (not a) b (not c) d) (and (not
a) b c (not d)) (and (not a) b c d) (and a (not b) (not c) (not d))
(and a (not b) (not c) d) (and a (not b) c (not d)) (and c (not d))) =
((¬a ∨ ¬b ∨ c) ∧ (¬a ∨ ¬b ∨ ¬d) ∧ (¬a ∨ ¬c ∨ ¬d) ∧ (b ∨ ¬c ∨ ¬d) ∧ (¬b
∨ c ∨ d))
EXACT

test 7
(or (and (and A B) (not (and C (or (and A (not B)) (and (not A) B)))))
(and (not (and A B)) (and C (or (and A (not B)) (and (not A) B))))) =
(or (and A B C) (and A B (not C)) (and A (not B) C) (and (not A) B C))
EXACT

test 8
(or (and B₂ B₃) (and B₂ B₄) (and B₃ (not B₁₂)))
EXACT

#t

with the same code shared between system via Dropbox

later i removed a debug info and the compilation was sticked on:
(load "start-λογικι-guile+.scm")

so i did in a terminal :
 mattei@pc-mattei:~$ zd .cache/guile/ccache/
total 16
drwxr-xr-x 4 mattei mattei 4096 juin   8  2021 .
drwxr-xr-x 3 mattei mattei 4096 mars   4  2020 ..
drwxr-xr-x 4 mattei mattei 4096 juil. 23  2020 2.2-LE-8-3.A
drwxrwxr-x 4 mattei mattei 4096 nov.  19  2021 3.0-LE-8-4.2
(base) mattei@pc-mattei:~$ rm -rf  .cache/guile/ccache/*

and it compiles well

no problem on the PC linux till now,for info the call of the macro in
previous message is from this instruction:

{iepi[{x + 1} 0] ← vct-prime-implicants[x]}

it assign the RHS a two dimension array (vector of vector) iepi[{x +
1} 0] with the LHS (left hand s-expression) vct-prime-implicants[x]
which the value of a one dimension vector

i will test again on the MacOS laptop , i remembered i had cleaned the
cache too ,so it is very strange... if it still fail i will activate
your debug info i never used but problem does not seems to come only
from my code.


On Tue, Aug 1, 2023 at 1:46 PM Jean Abou Samra <jean@abou-samra.fr> wrote:
>
> Le mardi 01 août 2023 à 12:46 +0200, Damien Mattei a écrit :
> > probably ,as you say , 'match' is used in other place but i 'grep-ed'
> > all the directory and can not find where, i'm only using match this 2
> > months  i even do not know it exists  before... i almost sure i never
> > use it in other place in the code,so i'm still not understand....
>
>
> I don't think we're on the same page. I'm saying that match is also
> used a lot internally in Guile's own code, so you should get a backtrace
> to find which one failed.
>
> ~/repos/guile $ rg "\(match" -g '*.scm' -g '!gc-benchmarks' | wc -l
> 1620
>
>



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: match error
  2023-08-01 14:28       ` match error Damien Mattei
@ 2023-08-01 17:32         ` Damien Mattei
  2023-08-01 21:16           ` Jean Abou Samra
  0 siblings, 1 reply; 11+ messages in thread
From: Damien Mattei @ 2023-08-01 17:32 UTC (permalink / raw)
  To: Jean Abou Samra; +Cc: guile-user

 it works now on the mac os system too:

EXACT

$1 = #t
scheme@(guile-user)> ,q
(base) mattei@macbook-pro-touch-bar library-FunctProg % uname -a
Darwin macbook-pro-touch-bar.home 22.5.0 Darwin Kernel Version 22.5.0:
Thu Jun  8 22:22:19 PDT 2023;
root:xnu-8796.121.3~7/RELEASE_ARM64_T8103 arm64

it seems the cleaning of old .o files solved the problem


On Tue, Aug 1, 2023 at 4:28 PM Damien Mattei <damien.mattei@gmail.com> wrote:
>
> i will test that , for now i'm testing under Linux on another system
> (previous one was Mac OS)
> and the same code works :
>
> GNU Guile 3.0.1
> Copyright (C) 1995-2020 Free Software Foundation, Inc.
>
> Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
> This program is free software, and you are welcome to redistribute it
> under certain conditions; type `,show c' for details.
>
> Enter `,help' for help.
> scheme@(guile-user)> (load "start-λογικι-guile+.scm")
> ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
> ;;;       or pass the --no-auto-compile argument to disable.
> ;;; compiling /home/mattei/Dropbox/git/library-FunctProg/start-λογικι-guile+.scm
> ;;; compiling /usr/share/guile/site/3.0/Scheme+.scm
> ;;; compiling /usr/share/guile/site/3.0/growable-vector.scm
> ;;; compiled /home/mattei/.cache/guile/ccache/3.0-LE-8-4.2/usr/share/guile/site/3.0/growable-vector.scm.go
> ;;; assignment.scm:903:12: warning: macro `when' used before definition
> ;;; assignment.scm:935:2: warning: macro `when' used before definition
> ;;; assignment.scm:941:6: warning: macro `when' used before definition
> ;;; assignment.scm:947:6: warning: macro `when' used before definition
> ;;; compiled /home/mattei/.cache/guile/ccache/3.0-LE-8-4.2/usr/share/guile/site/3.0/Scheme+.scm.go
> ;;; guile/logiki+.scm:3661:28: warning: possibly unbound variable
> `string->pointer'
> ;;; guile/logiki+.scm:3661:2: warning: possibly unbound variable `forfunct'
> ;;; guile/logiki+.scm:3641:26: warning: possibly unbound variable
> `string->pointer'
> ;;; guile/logiki+.scm:3641:2: warning: possibly unbound variable `openmp'
> ;;; guile/logiki+.scm:3765:6: warning: possibly unbound variable `openmp'
> ;;; guile/logiki+.scm:3765:25: warning: possibly unbound variable
> `string->pointer'
> ;;; guile/logiki+.scm:3869:6: warning: possibly unbound variable `openmp'
> ;;; guile/logiki+.scm:3869:25: warning: possibly unbound variable
> `string->pointer'
> ;;; guile/logiki+.scm:3965:32: warning: possibly unbound variable
> `parallel-vector-map'
> ;;; guile/logiki+.scm:4059:6: warning: possibly unbound variable `forfunct'
> ;;; guile/logiki+.scm:4059:27: warning: possibly unbound variable
> `string->pointer'
> ;;; compiled /home/mattei/.cache/guile/ccache/3.0-LE-8-4.2/home/mattei/Dropbox/git/library-FunctProg/start-λογικι-guile+.scm.go
> scheme@(guile-user)> (logic-test)
>
> test 1
> ((¬a ∧ b ∧ d) ∨ (¬b ∧ ¬c) ∨ (c ∧ ¬d))
> EXACT
>
> test 2
> ((¬a ∧ b ∧ d) ∨ (¬b ∧ ¬c) ∨ (c ∧ ¬d))
> EXACT
>
> test 3
> ((A ∧ B) ∨ (A ∧ C) ∨ (B ∧ C))
> EXACT
>
> test 4
> ((B0 ∧ B1) ∨ (B0 ∧ C1) ∨ (B1 ∧ C1))
> EXACT
>
> test 5
> (or (and B2 B3) (and B2 B4) (and B3 (not B12)))
> EXACT
>
> test 6
> (or (and (not a) (not b) (not c) (not d)) (and (not a) (not b) (not c)
> d) (and (not a) (not b) c (not d)) (and (not a) b (not c) d) (and (not
> a) b c (not d)) (and (not a) b c d) (and a (not b) (not c) (not d))
> (and a (not b) (not c) d) (and a (not b) c (not d)) (and c (not d))) =
> ((¬a ∨ ¬b ∨ c) ∧ (¬a ∨ ¬b ∨ ¬d) ∧ (¬a ∨ ¬c ∨ ¬d) ∧ (b ∨ ¬c ∨ ¬d) ∧ (¬b
> ∨ c ∨ d))
> EXACT
>
> test 7
> (or (and (and A B) (not (and C (or (and A (not B)) (and (not A) B)))))
> (and (not (and A B)) (and C (or (and A (not B)) (and (not A) B))))) =
> (or (and A B C) (and A B (not C)) (and A (not B) C) (and (not A) B C))
> EXACT
>
> test 8
> (or (and B₂ B₃) (and B₂ B₄) (and B₃ (not B₁₂)))
> EXACT
>
> #t
>
> with the same code shared between system via Dropbox
>
> later i removed a debug info and the compilation was sticked on:
> (load "start-λογικι-guile+.scm")
>
> so i did in a terminal :
>  mattei@pc-mattei:~$ zd .cache/guile/ccache/
> total 16
> drwxr-xr-x 4 mattei mattei 4096 juin   8  2021 .
> drwxr-xr-x 3 mattei mattei 4096 mars   4  2020 ..
> drwxr-xr-x 4 mattei mattei 4096 juil. 23  2020 2.2-LE-8-3.A
> drwxrwxr-x 4 mattei mattei 4096 nov.  19  2021 3.0-LE-8-4.2
> (base) mattei@pc-mattei:~$ rm -rf  .cache/guile/ccache/*
>
> and it compiles well
>
> no problem on the PC linux till now,for info the call of the macro in
> previous message is from this instruction:
>
> {iepi[{x + 1} 0] ← vct-prime-implicants[x]}
>
> it assign the RHS a two dimension array (vector of vector) iepi[{x +
> 1} 0] with the LHS (left hand s-expression) vct-prime-implicants[x]
> which the value of a one dimension vector
>
> i will test again on the MacOS laptop , i remembered i had cleaned the
> cache too ,so it is very strange... if it still fail i will activate
> your debug info i never used but problem does not seems to come only
> from my code.
>
>
> On Tue, Aug 1, 2023 at 1:46 PM Jean Abou Samra <jean@abou-samra.fr> wrote:
> >
> > Le mardi 01 août 2023 à 12:46 +0200, Damien Mattei a écrit :
> > > probably ,as you say , 'match' is used in other place but i 'grep-ed'
> > > all the directory and can not find where, i'm only using match this 2
> > > months  i even do not know it exists  before... i almost sure i never
> > > use it in other place in the code,so i'm still not understand....
> >
> >
> > I don't think we're on the same page. I'm saying that match is also
> > used a lot internally in Guile's own code, so you should get a backtrace
> > to find which one failed.
> >
> > ~/repos/guile $ rg "\(match" -g '*.scm' -g '!gc-benchmarks' | wc -l
> > 1620
> >
> >



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: match error
  2023-08-01 17:32         ` Damien Mattei
@ 2023-08-01 21:16           ` Jean Abou Samra
  2023-08-02  6:52             ` Damien Mattei
  0 siblings, 1 reply; 11+ messages in thread
From: Jean Abou Samra @ 2023-08-01 21:16 UTC (permalink / raw)
  To: Damien Mattei; +Cc: guile-user

[-- Attachment #1: Type: text/plain, Size: 219 bytes --]

> it seems the cleaning of old .o files solved the problem


Might be related to cross-module inlining then (just a wild guess, but it can be
really treacherous; see Guile's NEWS file if you didn't know about it).

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: match error
  2023-08-01 21:16           ` Jean Abou Samra
@ 2023-08-02  6:52             ` Damien Mattei
  0 siblings, 0 replies; 11+ messages in thread
From: Damien Mattei @ 2023-08-02  6:52 UTC (permalink / raw)
  To: Jean Abou Samra; +Cc: guile-user

yes i read the section of NEWS:

https://git.savannah.gnu.org/cgit/guile.git/tree/NEWS?h=v3.0.9#n8

** Cross-module inlining

"Note however that as with macros, when a definition changes in module A,
a separately compiled module B that uses that definition doesn't
automatically get recompiled.  This is a limitation in Guile that we
would like to fix."

i have few modules only 2 : Scheme+ and the program that is written in
Scheme+ (different than in Racket because Guile have built-in support
for SRFI105 curly-infix and Racket no ,so each time i want to use
SRFI105 reader i need to put the code in a new module) i admit i could
use more module style in Guile too...

i recurently (happens 2 times a year only...) being forced to swap out
all .o files but it is not previsible when.

On Tue, Aug 1, 2023 at 11:17 PM Jean Abou Samra <jean@abou-samra.fr> wrote:
>
> it seems the cleaning of old .o files solved the problem
>
>
>
> Might be related to cross-module inlining then (just a wild guess, but it can be really treacherous; see Guile's NEWS file if you didn't know about it).



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-08-02  6:52 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-01  9:53 (unknown) Damien Mattei
2023-08-01  9:59 ` Jean Abou Samra
2023-08-01 10:46   ` Re: Damien Mattei
2023-08-01 11:46     ` Re: Jean Abou Samra
2023-08-01 14:28       ` match error Damien Mattei
2023-08-01 17:32         ` Damien Mattei
2023-08-01 21:16           ` Jean Abou Samra
2023-08-02  6:52             ` Damien Mattei
2023-08-01 10:57 ` message without subject Zelphir Kaltstahl
2023-08-01 13:46   ` match error Damien Mattei
  -- strict thread matches above, loose matches on Subject: below --
2013-12-30  2:58 (unknown) Eduardo Acuña

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).