Re: define use in expression context

2025-07-16 Thread Maxime Devos
On 16/07/2025 8:29, Linus Björnstam wrote: Change that (begin ...) to a (let () ...) and guile will do what you want. It won't: Is there any way to achieve this functionality _without modifying the scripts_? (emphasis added)

Re: define use in expression context

2025-07-13 Thread Maxime Devos
;do' by 'new-do' in some way (it is convenient to import the old 'do' under a different name). Or take the old definition of 'do', copy it, and insert a surrounding 'let' in the right lace. Same applies to many other situations. (Also, that 'begin' serves no purpose there.) Best regards, Maxime Devos

Re: define use in expression context

2025-07-05 Thread Maxime Devos
Do you have an example? Instead of redefining 'define', it may be possible to redefine the surrounding syntax thing.

Re: Is it possible to make GOOPS instances applicable/callable?

2025-05-26 Thread Maxime Devos
On 26/05/2025 11:54, Mikael Djurfeldt wrote: Hi Maxime and Panicz, Maxime: I guess you meant rather than , which is not applicable. No, I meant . That I was wrong about it, does not undo what was meant. It's possible to mean an untrue statement. Best regards, Maxime Devos

Re: Is it possible to make GOOPS instances applicable/callable?

2025-05-23 Thread Maxime Devos via General Guile related discussions
GOOPS methods are instances of , and methods are applicable, so yes. For , this is done with (undocumented) applicable structs (see: GOOPs implementation). But, no high-level GOOPs support is available for repeating the same for other classes.

Re: Hashing a procedure object reliably

2025-04-13 Thread Maxime Devos
Spacing appears to have been messed up, so here's the same thing with extra newlines On 13/04/2025 18:55, Maxime Devos via General Guile related discussions wrote: On 11/04/2025 15:49, Olivier Dion wrote: My goal here is that I have GOOPS object. The object is used to produce a pure r

Re: Hashing a procedure object reliably

2025-04-13 Thread Maxime Devos via General Guile related discussions
On 13/04/2025 19:47, to...@tuxteam.de wrote: On Sun, Apr 13, 2025 at 07:03:56PM +0200, Maxime Devos wrote: [...] Typical hashing of the non-cryptographic kind aren't designed to virtually eliminate hash collisions [...] Nit: given a "reasonable" hash, the collision probab

Re: Hashing a procedure object reliably

2025-04-13 Thread Maxime Devos via General Guile related discussions
ash table, so you could make a bucket list (so you would need to also save the unhashed _keys_ instead of only their hash - hashes then aren't to identify things on their own, but rather to speed things up a lot). Best regards, Maxime Devos

Re: Finnish notation

2025-03-13 Thread Maxime Devos
On 2/03/2025 16:18, Tomas Volf wrote: Every list can be considered a pair, right? Except the empty list (empty lists if you also count #nil), assuming this is like Scheme - the empty list isn't a pair. Haven't been read the context.

Re: Need help understanding how scm_init_guile works (with FUSE)

2025-03-09 Thread Maxime Devos
it isn't done from signal handlers. Best regards, Maxime Devos

Re: Couple of questions regarding handling exceptions

2025-02-08 Thread Maxime Devos
, since &system-error might be added later. Best regards, Maxime Devos

Re: Couple of questions regarding handling exceptions

2025-02-05 Thread Maxime Devos via General Guile related discussions
cost of that. (**) thinking about it, I'd expect delimited continuations to do similar things already - I mean, delimited continuations seem to work nicely for Guile-Fibers. Maybe you could just capture a continuation in the exception handler, and afterwards inspect the continuation? Maybe even _today_? (***) (***) If it's sufficiently efficient, perhaps Guile could automatically record the stack in the condition (with some option to enable/disable this, for GC reasons). Best regards, Maxime Devos

RE: SXML and optional attributes

2024-12-22 Thread Maxime Devos via General Guile related discussions
Unquote-splicing (,@) is your friend: `(foo ,@(if p? '(a (b) c) '()) d) When p? -> (foo a (b) c d). When (not p?) -> (foo d). Now do this for SXML …

RE: Where is the list of Guile maintainers?

2024-12-20 Thread Maxime Devos via General Guile related discussions
nk there are some others as well. I guess I’ll wait for some other replies. Best regards, Maxime Devos

Where is the list of Guile maintainers?

2024-12-20 Thread Maxime Devos via General Guile related discussions
leaving”, but not an actual _list_ of _current_ maintainers. Where can I find such a list (or, from recollection, who are the maintainers)? (Some discussion on where to put such a list would perhaps be good as well, but right now it’s a list I need.) Best regards, Maxime Devos

RE: Control the order of expansion of syntax-case macros

2024-12-20 Thread Maxime Devos via General Guile related discussions
could just be thunks. (If you do this, and also use the hello-world form in the same module as where it is defined (not just mentioned somewhere in another macro, but rather when the non-define-syntax forms are expanded, then need the transformer of the hello-world form to run), then make sure to add some eval-when where appropriate.) Best regards, Maxime Devos

RE: Running Compiled Guile Objects

2024-12-14 Thread Maxime Devos via General Guile related discussions
relocation information. As far as I can tell, libgccjit does not seem to support relocations and doesn’t say anything about whether the results are position-independent or not (so not suitable fo AOT), though presumably there are ways around that given the existence of gccemacs. Best regards, Maxime Devos

RE: Running Compiled Guile Objects

2024-12-14 Thread Maxime Devos via General Guile related discussions
t loads (obj/)mod/b.go. Since this mechanism is used for Guile’s own libraries as well ((system …), (srfi …), (ice-9 …), …), I would expect this to still work in 3.0.10. If you have proof of the contrary you should make a bug report about it. >On Sun, Dec 15, 2024, 01:50 Maxime Devos wrot

RE: Running Compiled Guile Objects

2024-12-14 Thread Maxime Devos via General Guile related discussions
s in form of module imports, I’m not too sure about how loading the initial file (as .scm) works) and it doesn’t need to be a cache. Yet, simultaneously you say there is no way (without caches), _and_ you actually are using that way (“-C obj”). Best regards, Maxime Devos

RE: Running Compiled Guile Objects

2024-12-14 Thread Maxime Devos via General Guile related discussions
the most convenient invocation. Of those two options, (3) has the least re-compilation. By these criteria, (3) is the best. Best regards, Maxime Devos

RE: Running Compiled Guile Objects

2024-12-14 Thread Maxime Devos via General Guile related discussions
-load-path (e.g. if you don’t have the permissions to add things to the directories of the default path, or if adding to those directories is the wrong thing to do (both of these are the case in Guix, for example)). (All case-dependent) Best regards, Maxime Devos

RE: Running Compiled Guile Objects

2024-12-14 Thread Maxime Devos via General Guile related discussions
r) cache directory are problematic.).) Best regards, Maxime Devos

RE: sorted?

2024-12-12 Thread Maxime Devos via General Guile related discussions
>Did you see my previous mail, where I said pretty much the same as what Tomas >is writing (except about sorted? instead of sort)? Nevermind this, my e-mail program had some issues.

RE: sorted?

2024-12-12 Thread Maxime Devos via General Guile related discussions
Van: to...@tuxteam.de Verzonden: maandag 9 december 2024 15:11 Aan: Stefan Schmiedl CC: guile-user@gnu.org Onderwerp: Re: sorted? On Mon, Dec 09, 2024 at 01:54:47PM +, Stefan Schmiedl wrote: > -- Original Message -- > > From to...@tuxteam.de > To guile-user@gnu.org > Date 09.12.2024 12

RE: sorted?

2024-12-12 Thread Maxime Devos via General Guile related discussions
>On Mon, Dec 09, 2024 at 11:37:33AM +, Ricardo G. Herdt wrote: >> Hi Jeremy, >> >> Am 09.12.2024 11:21 schrieb Jeremy Korwin-Zmijowski: >> > The reference says : >> > >> >Scheme Procedure: *sorted?* items less >> >C Function: *scm_sorted_p* (items, less) >> > >> >Return |#t|

RE: sorted?

2024-12-12 Thread Maxime Devos via General Guile related discussions
y notation for swapping the arguments (in logic those would be called terms I think) (a < b = b > a). >From ‘<’, you have ‘=’, by the equivalence mentioned above. Just because it’s not passed explicitly, doesn’t mean you don’t have it – you can derive ‘=’ from the axioms and some logic. Did you see my previous mail, where I said pretty much the same as what Tomas is writing (except about sorted? instead of sort)? Best regards, Maxime Devos

RE: sorted?

2024-12-12 Thread Maxime Devos via General Guile related discussions
#f By the second description, sure. But by the first description, it is fine! My guess is that it’s intentional, so that you can save one keystroke to write (sorted? '(1 1) <) instead of (sorted? '(1 2) <=). Although, the description could use a bit of expansion to make clear what happens in the case that two elements are equal, and put emphasis on it really being ‘less’, not ‘less-than-or-equal-to’. Best regards, Maxime Devos

RE: Keywords in GOOPS methods

2024-11-23 Thread Maxime Devos via General Guile related discussions
doesn’t. A variant with untyped keyword arguments: (define-method (f (a ) (b )) (pk 'positional)) (define-method (f (#:key foo)) (pk 'optional-keyword foo)) (f #:foo 'bar) Who should win? Both are a quite specific match. Best regards, Maxime Devos

RE: Keywords in GOOPS methods

2024-11-23 Thread Maxime Devos via General Guile related discussions
>Any opinions on what is best: Having a define-method* or having the >functionality in define-method itself? You can’t unify define-method with define-method* without making some arbitrary choices in some special cases (the same applies to define-method* too actually, and also to define-method

RE: Embedding stuff in ELF section of compiled module

2024-11-10 Thread Maxime Devos via General Guile related discussions
ile for this. That said, are you sure it’s a separate section you want? Perhaps an entry in the (ELF) symbol table would do as well (and these are already populated, though I don’t recall to what extent). Best regards, Maxime Devos

RE: Dynamically add bindings to the module currently being compiled

2024-11-09 Thread Maxime Devos via General Guile related discussions
tom extra compilation passes, though. Best regards, Maxime Devos

RE: Unwind-protect

2024-10-28 Thread Maxime Devos via General Guile related discussions
syscall is a kernel<->userspace abort-to-prompt, yet typically you don’t want dynamic-wind to consider those as non-local control flow. Best regards, Maxime Devos

RE: Unwind-protect

2024-10-28 Thread Maxime Devos via General Guile related discussions
>Unwind-protect and dynamic-wind are not the same thing. See >http://www.nhplace.com/kent/PFAQ/unwind-protect-vs-continuations-original.html > > - Tommi Err, that web page is simply incorrect on this matter, unless Lisp and Scheme are assigning different meanings to the same words. (If they

RE: Find an element in a functional set (guile-pfds)

2024-07-07 Thread Maxime Devos via General Guile related discussions
let/ec escape (bbtree-fold [...] [... when a match is found, use (escape stuff-to-return)] [...]) 'no-match) Best regards, Maxime Devos.

RE: How to have an optional dependency?

2024-06-24 Thread Maxime Devos via General Guile related discussions
more. Best regards, Maxime Devos

RE: define-typed: checking values on proc entry and exit

2024-06-19 Thread Maxime Devos via General Guile related discussions
ature as an another method of the generic). Best regards, Maxime Devos.

RE: Custom foreign types

2024-06-19 Thread Maxime Devos via General Guile related discussions
, though I don’t know what this cleaner way is. You may want to look at the implementation for clarity (and if you find the answer, an addition to the manual would be appreciated). Best regards, Maxime Devos. (*) I think what it means is that as type you set (list this-field-type that-field-type

RE: using guile like a awk filter in a C program.

2024-06-10 Thread Maxime Devos via General Guile related discussions
single record and then returns the Scheme representation (or an end-of-file marker). It can then be made available to Scheme with scm_c_define (I’m not sure about the name of the function, but surely there is a C function to define a Scheme ‘variable’ (in this case, constant)) etc. Best regards, Maxime Devos

RE: equality of syntax objects

2024-05-22 Thread Maxime Devos
(identifier? obj2) ;(syntax? obj2) > (free-identifier=? obj1 obj2))) So, instead of checking identifiers with free-identifier=?, instead try ‘syntax->datum’ to extract the name (with lexical information removed) + ‘eq?’ (to compare two symbols). Best regards, Maxime Devos

RE: cond clause does not allow definitions

2024-05-22 Thread Maxime Devos
e]) y) which would silently do the wrong thing (unless you enable warnings for shadowing, but you can do neat things with shadowing – you can write pure code in a somewhat imperative style (*)). Best regards, Maxime Devos (*) See, e.g., https://git.gnunet.org/gnunet-scheme.git/tree/gnu/gnunet/c

RE: with-syntax return error in Guile, not in Kawa or Racket

2024-05-09 Thread Maxime Devos
und: See eval-when. It’s mentioned somewhere in the documentation of macros, perhaps close to eval-when. Best regards, Maxime DEvos

RE: adding #' syntax and my cloned macro no more works like original....

2024-05-09 Thread Maxime Devos
The code you posted is too long – if you want me to have a look at it, minimize it first. Best regards, Maxime Devos

RE: with-syntax return error in Guile, not in Kawa or Racket

2024-05-06 Thread Maxime Devos
pretty much the same as their quote/quasiquote/... counterparts. Hygiene is usually pretty simple – just don’t do sexp things (say, quasiquote), do syntax things (quasisyntax) instead, then typically things will go well. Best regards, Maxime Devos.

RE: Advice on ST-Object data-structure setup

2024-04-17 Thread Maxime Devos
lltalk, ;; and replace ‘define’ by what would be the equivalent in Smalltalk (define (st-vector-ref v n) ;; st-vector-like-actual-vector: field getter ;; vector-ref: standard Scheme procedure (vector-ref (st-vector-like-actual-vector v) n)) and the like. Best regards, Maxime Devos.

RE: Advice on ST-Object data-structure setup

2024-04-17 Thread Maxime Devos
LICENSE says ‘Copyright (c) 2016’, but some files date from 2024. It’s a bit inconsistent … Do you mean that changes >2016 are public domain, or not covered by BSD license, or the inconsistency is an oversight?

RE: Question about handling SIGINT properly in Guile

2024-04-14 Thread Maxime Devos
does a scm_async_tick, so that shouldn’t matter?) • Better put a (call-with-blocked-asyncs ...) or whatever is the exact name around all the I/O unless you’re sure that the port I/O procedures can deal fine with the re-entrancy. I don’t expect any of these to solve the problem (except perhaps 3) but it’s something you could investigate. Best regards, Maxime Devos.

RE: Question about handling SIGINT properly in Guile

2024-04-14 Thread Maxime Devos
Sent from Mail for Windows From: Vijay Marupudi Sent: Saturday, 13 April 2024 22:24 To: Olivier Dion; guile-user@gnu.org Subject: Re: Question about handling SIGINT properly in Guile > So there is two things with signals. First, when a process get a signal > queued, the OS only deliver the si

RE: using a module : rename a single definition

2024-03-19 Thread Maxime Devos
Yes, with ‘library’ or ‘define-library’ forms. (see https://www.gnu.org/software/guile/manual/html_node/R6RS-Libraries.html) (library (insert name here) (export [insert exports here]) (import (guile) ; standard imports (rename (ice-9 popen) (open-pipe pipe-open))) [insert definitio

RE: Understanding `symbol??` macro from okmij.org

2024-03-13 Thread Maxime Devos
this (set x to abracadabra, t to kt, f to kf). I think the first two cases are superfluous, but perhaps there is a performance advantage. (I’m wondering if this still works in the case (symbol? ...), because ... is special in syntax-rules) Best regards, Maxime Devos.

Re: Advice for importing things in a Guile module

2023-12-25 Thread Maxime Devos
y, it wouldn't expect much trouble. Best regards, Maxime Devos. OpenPGP_0x49E3EE22191725EE.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature

Re: Screaming-Fist: a JIT framework for Guile

2023-12-04 Thread Maxime Devos
ter that the programmer has to choose what, in their situation, are the appropriate semantics. If/when someone desired shorter names, there could be a (jit-define-alias * */wrap-around) or something like that for that? Best regards, Maxime Devos OpenPGP_0x49E3EE22191725EE.asc Description: Ope

Re: How to globally replace core binding?

2023-11-27 Thread Maxime Devos
x27;auto' should be the default, but merely adding the _option_ to copy-on-write would be uncontroversial, I think. Best regards, MAxime Devos. OpenPGP_0x49E3EE22191725EE.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature

Re: How to globally replace core binding?

2023-11-27 Thread Maxime Devos
hing; for short-term ‘trying things out’, doing set! is much more practical.) Best regards, Maxime Devos. OpenPGP_0x49E3EE22191725EE.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature

Re: Generating "independent" random numbers

2023-10-11 Thread Maxime Devos
Op 11-10-2023 om 01:04 schreef Keith Wright: Maxime Devos writes: Op 04-10-2023 om 18:14 schreef Keith Wright: From: Zelphir Kaltstahl my goal is normal distributed floats (leaving aside the finite nature of the computer and floats). The following is either provably correct up to

Re: Generating "independent" random numbers

2023-10-10 Thread Maxime Devos
approximate (though methods definitely exists -- it's the theory of the approximation method that is difficult, not the implementation; transcribing some implementation from Fortran to Scheme is tedious but straightward). Best regards, Maxime Devos OpenPGP_0x49E3EE22191725EE.asc Descri

Re: overloading an existing operator in Guile

2023-10-03 Thread Maxime Devos
iguously mean ‘appending’ (*) instead of ‘addition’, and as an additional benefit, some other languages (^) use '++' to mean appending as well. (*) string-append, append, vector-append, ... (^) for example, Coq and Haskell Best regards, Maxime Devos. OpenPGP_0x49E3EE22191725EE.asc D

Re: Generating "independent" random numbers

2023-10-03 Thread Maxime Devos
loats is likely not what you are interested in. (I probably didn't have to go in so much detail but whatever ...) Best regards, Maxime Devos. OpenPGP_0x49E3EE22191725EE.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature

Re: Ideas for making Guile easier to approach

2023-09-28 Thread Maxime Devos
Op 27-09-2023 om 21:29 schreef Christine Lemmer-Webber: Wisp I'd like to actually see Guile integrate Wisp as a core language and think about what it would be like to support it as a recommended alternate way of writing programs. I think with the new block-level highlighting that Arne ha

Re: Guile outside of Emacs + Geiser

2023-09-28 Thread Maxime Devos
s a good tool for me (no Emacs+Geiser isn't it, but the why appears to be off-topic for this thread). Best regards, Maxime Devos OpenPGP_0x49E3EE22191725EE.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature

Re: guile or scheme used to implement make or meson

2023-09-12 Thread Maxime Devos
guile/python-on-guile/ Best regards, Maxime Devos OpenPGP_0x49E3EE22191725EE.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature

Re: readlink system calls

2023-08-24 Thread Maxime Devos
Op 22-08-2023 om 21:03 schreef Olivier Dion: On Tue, 22 Aug 2023, Christopher Baines wrote: When looking at strace for various Guile things, I'm seeing a lot of readlink system calls for directories in the load path, e.g. Is this not more a side effect of using Guix (the GNU store) than Gui

Re: [ANN] Guile-PNG 0.7.1 released

2023-08-21 Thread Maxime Devos
Op 20-08-2023 om 15:03 schreef Artyom V. Poptsov: Hello Guilers, I'm pleased to announce Guile-PNG 0.7.1, Portable Network Graphics (PNG)[1] library for GNU Guile, implemented in pure scheme: https://github.com/artyom-poptsov/guile-png/releases/tag/v0.7.1 This release fixes some bugs, expa

Re: error Wrong type to apply: #

2023-08-09 Thread Maxime Devos
> [...] For reloadable modules, references to ‘top-level’ variables need to be done via a 'module-ref' equivalent instead of a direct (lexical) reference, but I think the compiler or expander could handle that without too much trouble (it does so already I think). OpenPGP_0x49E3EE22191725EE.

Re: error Wrong type to apply: #

2023-08-09 Thread Maxime Devos
Op 09-08-2023 om 01:00 schreef Jean Abou Samra: Le mardi 08 août 2023 à 21:38 +0200, Maxime Devos a écrit : As such, this not working on the top-level seems a bug to me -- after all, a module definition is conceptually just a big let: (if applicable) (let ()       (define

Re: error Wrong type to apply: #

2023-08-08 Thread Maxime Devos
Op 03-08-2023 om 11:58 schreef Jean Abou Samra: overload.scm must be before some definitions of scheme-infix.scm even if it is not used here, it is strange, i do not understand all but it compiles now A minimal reproducer for your problem is (define (foo)   (bar 'quux)) (define-syntax-rule

What's to be considered on-topic for Guile mailing lists? (Re: The message chain with an happy ending)

2023-07-05 Thread Maxime Devos
happened yet -- it's still named guile-devel (i.e., __development__) -- it needs a name change, or some documentation in the manual. Best regards, Maxime Devos OpenPGP_0x49E3EE22191725EE.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature

Re: The message chain with an happy ending

2023-07-05 Thread Maxime Devos
(In future responses, let's trim the CC:) OpenPGP_0x49E3EE22191725EE.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature

Re: Problems compiling Guile for Solaris 11.4 SPARC

2023-05-29 Thread Maxime Devos
s ("Pre-boot error; key: ", port); scm_write (key, port); scm_puts (", args: ", port); scm_write (args, port); . I don't know if scm_backtrace is functional in pre-boot, though. Best regards, Maxime Devos. OpenPGP_0x49E3EE22191725EE.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature

Re: Unable to import (ice-9 psyntax)

2023-02-16 Thread Maxime Devos
On 16-02-2023 12:18, Maxime Devos wrote: On 16-02-2023 00:48, Damien Mattei wrote: -rw-r--r--   1 root  wheel  516629 12 jan 08:12 psyntax-pp.go > [...]    * is /usr/local/lib/guile/3.0/ccache/ice-9/psyntax.go newer than      /usr/local/share/guile/3.0/ice-9/psyntax.scm go

Re: Unable to import (ice-9 psyntax)

2023-02-16 Thread Maxime Devos
On 15-02-2023 03:14, Robby Zambito wrote: Hello, For some reason I am having trouble importing the (ice-9 psyntax) module. [...] This is an undocumented module; you aren't supposed to import it directly. In fact, looking at the first few lines of ice-9/psyntax.scm, ice-9/psyntax.scm is pa

Re: Unable to import (ice-9 psyntax)

2023-02-16 Thread Maxime Devos
On 16-02-2023 00:48, Damien Mattei wrote: -rw-r--r--   1 root  wheel  516629 12 jan 08:12 psyntax-pp.go > [...]    * is /usr/local/lib/guile/3.0/ccache/ice-9/psyntax.go newer than      /usr/local/share/guile/3.0/ice-9/psyntax.scm going by mtime? -rw-r--r--   1 root  wheel  18822

Re: Unable to import (ice-9 psyntax)

2023-02-15 Thread Maxime Devos
On 15-02-2023 07:43, Damien Mattei wrote: same problem: (base) mattei@MacBook-Pro-Touch-Bar library-FunctProg % guile GNU Guile 3.0.8.99-f3ea8 Copyright (C) 1995-2022 Free Software Foundation, Inc. Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This program is free softw

Re: Does declaration order matter in guile?

2023-02-13 Thread Maxime Devos
On 12-02-2023 19:46, wolf wrote: Also, I could not help to notice that when I use R6RS records it does work regardless of the order: (use-modules (rnrs records syntactic)) (define (x y) (display (q-foo y)) (newline)) (define-record-type q (fields foo))

Re: Does declaration order matter in guile?

2023-02-13 Thread Maxime Devos
On 13-02-2023 09:05, Sascha Ziemann wrote: You also can not ask Scheme about macros, because macros are not first-class-citizens. > > > This might be interesting: > https://matt.might.net/articles/metacircular-evaluation-and-first-class-run-time-macros/ You actually can ask (Guile)Scheme ab

Re: How to initialize GNU guile in a C++ command line tool?

2023-02-09 Thread Maxime Devos
On 09-02-2023 11:43, Basile Starynkevitch wrote: /usr/bin/ld: /tmp/cc51HoPM.o: in function `do_evaluate_guile(char const*)': /home/basile/misc-basile/clever-framac.cc:501: undefined reference to `scm_init_eval' collect2: error: ld returned 1 exit status scm_init_eval is an internal thing:

Re: fibers,questions about thread id and mutation of vectors

2023-01-13 Thread Maxime Devos
for (i=start; i<=stop; i++) { /* i is private by default */ scm_init_guile(); scm_call_1( func , scm_from_int(i) ); IIUC, you are calling scm_init_guile once per index, whereas calling it once per thread would suffice. For better performance, I propose doing it once per thread.

Re: Exception with multiple irritants

2023-01-08 Thread Maxime Devos
On 25-11-2022 01:03, Zelphir Kaltstahl wrote: ice-9/boot-9.scm:1685:16: In procedure raise-exception: ERROR:   1. &contract-violated   2. &message: "contract violated"   3. &origin: bla   4. &irritants: (> foo 10)   5. &irritants: (> 10 10) I don't understand this -- (> 10 10) is always

Re: fibers,questions about thread id and mutation of vectors

2023-01-06 Thread Maxime Devos
no it returns something based on address: scheme@(guile-user)> (current-thread) $1 = # the good thing it is that it is different for each address, the bad is that i do not know how to extract it from the result and anyway i need a number : 0,1,2,3... ordered and being a partition to make schedu

Re: fibers,questions about thread id and mutation of vectors

2023-01-06 Thread Maxime Devos
On 06-01-2023 11:20, Damien Mattei wrote: Hi, is fibers having a way to know the thread number the code is running? i, mean the equivalent of omp_get_thread_num(); in openMP. There's (current-thread), but that's just Guile; it's not Fibers-specific. It's also not a number. I don't know if

Re: guile-fibers timerfd_create bug (was: Re: [ANN] Guile-Parallel 1.0.0 released)

2023-01-03 Thread Maxime Devos
On 03-01-2023 23:38, Damien Mattei wrote: no i did not test fibers  ,just look at it, but perhaps it is necessary for parallel ? [...] IIUC, it's a bug report for Guile Parallel then? i saw the configure file (of parallel) claim about fibers? i will download fibers and test on Mac again

guile-fibers timerfd_create bug (was: Re: [ANN] Guile-Parallel 1.0.0 released)

2023-01-03 Thread Maxime Devos
On 03-01-2023 11:57, Damien Mattei wrote: on Mac os i have (only) one error: In procedure dlsym: Error resolving "timerfd_create": "dlsym(RTLD_DEFAULT, timerfd_create): symbol not found" Is this a bug report for Guile-Fibers? If so, could you provide basic information like which commit you

Re: [ANN] Guile-Parallel 1.0.0 released

2023-01-02 Thread Maxime Devos
On 02-01-2023 17:13, Greg Troxel wrote: O Olivier Dion via General Guile related discussions writes: I haven't use fibers a lot, but I think that if you ever need to handle asynchronous I/O, for now you should stick with fibers. Also, fibers was written by peoples that have a way better und

Re: wayland client in Guile without libwayland-client

2022-11-18 Thread Maxime Devos
On 18-11-2022 17:54, Matt Wette wrote: cm-buf is a bytevector of control messages (`man cmsg`).  To deal with control messages I have generated these procedures:   (cmsg-list->bytevector cmsg-list) => bytevector   (bytevector->cmsg-list bytevector) => cmsg-list I have previously written an

Re: Does the eval-when example work?

2022-10-20 Thread Maxime Devos
On 19-10-2022 22:32, Vivien Kraus wrote: Dear guile users, The manual, section 6.8.8, presents the eval-when form with an example: > [...] If so, this is not exactly what I am looking for. I am looking for a way to run the (date) form during the compilation phase, and save the date to the

Re: defining macros within eval

2022-10-19 Thread Maxime Devos
On 19-10-2022 10:42, Paul Jarc wrote: Maxime Devos wrote: For an example in the wild, see e.g. <https://git.gnunet.org/gnunet-scheme.git/tree/gnu/gnunet/message/protocols.scm>. Thanks (to Jean as well) for all the suggestions. Can you point me to an example of where include/sexp i

Re: defining macros within eval

2022-10-16 Thread Maxime Devos
On 16-10-2022 16:07, Jean Abou Samra wrote: Is there some way to make this work?  In my real code, the expression is read from a file, where it might be a macro definition or anything else, and it's evaluated in a different module from the current one. You cannot byte-compile code in advan

Re: defining macros within eval

2022-10-16 Thread Maxime Devos
On 16-10-2022 11:39, Paul Jarc wrote: Hi. I'm updating some old code to work with newer versions of Guile. This example used to work with 1.8, but gives an error with 2.2 and later: (begin (eval '(define-syntax-rule (rule x) x) (current-module)) (display (rule "ok\n"))) ERROR: Wrong ty

Re: defining macros within eval

2022-10-16 Thread Maxime Devos
On 16-10-2022 11:39, Paul Jarc wrote: Hi. I'm updating some old code to work with newer versions of Guile. This example used to work with 1.8, but gives an error with 2.2 and later: (begin (eval '(define-syntax-rule (rule x) x) (current-module)) (display (rule "ok\n"))) ERROR: Wrong type

Re: fibers doc: fix typo

2022-10-16 Thread Maxime Devos
> [...] Applied the two patches. Now in master. Greetings, Maxime. OpenPGP_0x49E3EE22191725EE.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature

Re: http-request bearer token syntax for Twitter v2 api

2022-10-13 Thread Maxime Devos
On 12-10-2022 12:30, Mortimer Cladwell wrote: Hi, Has anyone successfully submitted a bearer token to Twitter v2 api using http-request? What syntax did you use? Without success I have tried many permutations/splellings/capitalizations of: Note that Guile sometimes sends uncapitalised headers

Re: map-par slower than map

2022-10-12 Thread Maxime Devos
demonstrate the 'map-par slower than map') and to change it to standard-ish Scheme instead of your Scheme+ variant. On Wed, Oct 12, 2022 at 8:45 PM Maxime Devos <mailto:maximede...@telenet.be>> wrote: [rest of copied previous message, without any comments] This is top

Re: map-par slower than map

2022-10-12 Thread Maxime Devos
On 12-10-2022 19:19, Damien Mattei wrote: Hello, all is in the title, i test on a approximately 3 element list , i got 9s with map and 3min 30s with par-map on exactly the same piece of code!? > [...] > translated from Scheme+ to Scheme: (define unified-minterms-set-1 (map function-unify-m

Re: Looking for graph library

2022-10-08 Thread Maxime Devos
On 08-10-2022 12:29, Dmitry Polyakov wrote: Hello! Can you recommend any library for working with graphs (I did not find it in srfi and mailing list). Almost what I need to have in graphviz bindings, but there are no predicate functions and the like. SRFI-234 is for linearizing a direct acy

python-on-guile fails to compile

2022-09-30 Thread Maxime Devos
I noticed python-on-guile fails to compile in Guix, so I tried updating it, but it still fails (somehow 'type' is #false?): Type is defined on line https://gitlab.com/python-on-guile/python-on-guile/-/blob/master/modules/oop/pf-objects.scm#L1530 as #f but set to something later in https://git

Re: Error in error?

2022-09-22 Thread Maxime Devos
On 22-09-2022 01:17, sidhu1f wrote: You are both correct. My motivation was to use the assert macro from guile-libs (www.nongnu.org/guile-lib/doc/ref/debugging.assert/). Do you know that Guile already has an 'assert 'macro (see: (guile)rnrs base)? It is less capable though (no ?r-exp), so

Re: Loop macros (was: Re: macro definition for continue and break)

2022-09-13 Thread Maxime Devos
On 13-09-2022 16:25, Damien Mattei wrote: do you have any examples of use? that illustrate the features ,just with the code it is not easy. "git grep -F let^" inside the repo. More specifically, parse-expandable from (gnu gnunet config parser), though there are other uses too. OpenPGP_0x4

Loop macros (was: Re: macro definition for continue and break)

2022-09-12 Thread Maxime Devos
On 12-09-2022 21:19, Linus Björnstam wrote: If you want a bit more advanced looping you could have a look at my goof-loop: https://git.sr.ht/~bjoli/goof-loop It currently does not support a break or continue clause, but adding one should not really be a problem. A good thing is that it does

[ANN] Scheme-GNUnet 0.3 released

2022-09-06 Thread Maxime Devos
Version 0.3 of Scheme-GNUnet has been released. The main change since the 0.2 release, is some CADET support. There are also various small fixes and improvements. If you have any questions, please reply to guile-user@gnu.org. * What is Scheme-GNUnet? Scheme-GNUnet is a WIP (Guile) Scheme port

Re: expression and definition context in Scheme

2022-08-31 Thread Maxime Devos
On 31-08-2022 09:01, Damien Mattei wrote: I always try to keep compatibility with RnRS and in fact except cond none of when, unless, cond, case, while, and do are in standart RnRS schem 'when', 'unless' and 'do' are actually RnRS, see (rnrs control). 'case' is also RnRS, see (rnrs base). How

Re: The λ-cube

2022-08-30 Thread Maxime Devos
On 30-08-2022 03:03, Jean Abou Samra wrote: Retrying, it got all mangled up by automatic wrapping … It's mangled over here, perhaps you could sent it as an attachment? Greetings, Maxime OpenPGP_0x49E3EE22191725EE.asc Description: OpenPGP public key OpenPGP_signature Description: OpenP

  1   2   >