A lexical use-modules?

2022-03-26 Thread Maxime Devos
Hi, [ CC'ing guix-devel@ because this functionality could be useful in Guix package definitions ] Currently, use-modules cannot be meaningfully used inside procedures, unless '(current-module)' is always the module in which the procedure is defined. I wondered if some kind of 'lexical use-module

Re: A lexical use-modules?

2022-03-27 Thread Maxime Devos
Stefan Israelsson Tampe schreef op zo 27-03-2022 om 11:53 [+0200]: Hmm actually you only have lexical macros that reference module variables. That is not lexical variables which have more optimisation associated with it at least used to. But is better speedwise than the hash lookups I suggested. An

Re: A lexical use-modules?

2022-03-27 Thread Maxime Devos
[Re-added guile-devel# to CC] Stefan Israelsson Tampe schreef op zo 27-03-2022 om 16:37 [+0200]: > I mean that modul-ref is a hash-table lookup, and that's more > expensive as you say. I suggested that lexical variables should be > let bound > because you can deduce more things with them e.g. in >

Re: A lexical use-modules?

2022-03-29 Thread Maxime Devos
Maxime Devos schreef op za 26-03-2022 om 20:21 [+0100]: > (define-syntax use-module/lexical >   ;; todo: integrate into (use-modules ...)? >   (lambda (s) >     (syntax-case s () >   ((_ foo) >    (let* ((module-name (syntax->datum #'foo)) >  

Re: "INTERNAL ERROR IN FORMAT-ERROR!"

2022-04-19 Thread Maxime Devos
Jean Abou Samra schreef op di 19-04-2022 om 18:52 [+0200]: > The simple file > > (format #f "~f" 'invalid) > > gives me > > FORMAT: error with call: (format #f "~f<===" ===>invalid ) > argument is not a number or a number string > FORMAT: INTERNAL ERROR IN FORMAT-ERROR! > desti

Re: Translating Guile documentation

2022-04-24 Thread Maxime Devos
Denys Nykula schreef op zo 24-04-2022 om 01:24 [+0300]: > Then I need to edit the SXML and Texinfo files, run make and upload the > result on my web server. My question is what are the recommendations for > those who try that and whether any guile i18n working group exists. Guix uses po4a and http

Re: Are source locations broken?

2022-05-01 Thread Maxime Devos
Olivier Dion schreef op zo 01-05-2022 om 13:04 [-0400]: > On Fri, 25 Mar 2022, Maxime Devos wrote: > > Maxime Devos schreef op vr 25-03-2022 om 21:22 [+0100]: > > Here's a minimal reproducer: > > > > $ cat trtr.scm: > > > foo > > > > $ gui

Re: suspendable soft ports

2022-05-12 Thread Maxime Devos
Stefan Israelsson Tampe schreef op do 12-05-2022 om 15:25 [+0200]: > I did a take to make the soft-ports suspendable and here is an idea, > > http://itampe.com/suspendable-soft-ports.html > > Let me know if you are interested, I could refactor out these files > to a project of their own, but real

Re: [PATCH] socket: Add IPPROTO_IPV6 and IPV6_V6ONLY.

2022-05-13 Thread Maxime Devos
Christopher Baines schreef op vr 13-05-2022 om 12:51 [+0100]: >  #ifdef IPPROTO_IP >    scm_c_define ("IPPROTO_IP", scm_from_int (IPPROTO_IP)); >  #endif > +#ifdef IPPROTO_IPV6 > +  scm_c_define ("IPPROTO_IPV6", scm_from_int (IPPROTO_IPV6)); > +#endif >  #ifdef IPPROTO_TCP >    scm_c_define ("IPPRO

Re: reader musings

2022-06-08 Thread Maxime Devos
Stefan Israelsson Tampe schreef op wo 08-06-2022 om 01:07 [+0200]: > https://gitlab.com/tampe/guile-persist/-/tree/master/ice-9 > https://gitlab.com/tampe/guile-persist/-/tree/master/src/write > > I'm wondering if I should make a C library for other projects to take > advantage of this work. Coul

Re: [PATCH] web: authorization header scheme should be capitalized

2022-06-23 Thread Maxime Devos
Aleix Conchillo Flaqué schreef op do 23-06-2022 om 13:27 [-0700]: > + (put-string port (string-titlecase (symbol->string scheme))) I'd add a little explanation in a comment (e.g.: ;; While according to RFC 7617 Schemes are case-insensitive: ;; ;; ‘Note that both scheme and parameter

Re: [PATCH] web: authorization header scheme should be capitalized

2022-06-23 Thread Maxime Devos
Aleix Conchillo Flaqué schreef op do 23-06-2022 om 13:42 [-0700]: > > [...] > I think you are right. The spec says clearly that it should be case > insensitive. > > So, disregard this patch. TBC, did you encounter problems in the wild that made you write the patch? Also, there's still a potenti

Re: [PATCH] web: authorization header scheme should be capitalized

2022-06-23 Thread Maxime Devos
Aleix Conchillo Flaqué schreef op do 23-06-2022 om 14:13 [-0700]: > https://community.spotify.com/t5/Spotify-for-Developers/API-Authorization-header-doesn-t-follow-HTTP-spec/m-p/5397381#M4917 > > Also, there's still a potential patch to be had, e.g. you could add > > a test checking that Guile prop

Re: [PATCH] web: authorization header scheme should be capitalized

2022-06-24 Thread Maxime Devos
Aleix Conchillo Flaqué schreef op do 23-06-2022 om 18:46 [-0700]: > Ah, got it. Yes, that would make sense. > > I was thinking about it again. I know that Guile complies with the > standard but since, I would say, capitalized schemes is what most > libraries use, would it make sense to switch to t

Re: [PATCH] web: send capitalized authorization header scheme

2022-06-24 Thread Maxime Devos
Aleix Conchillo Flaqué schreef op vr 24-06-2022 om 09:05 [-0700]: > * module/web/http.scm (write-credentials): capitalize authorization > header scheme. The standard allows the scheme to be case-insensitive, > however most libraries out there expect the scheme to be capitalized, > which is what it

Re: [PATCH] web: send capitalized authorization header scheme

2022-06-24 Thread Maxime Devos
Aleix Conchillo Flaqué schreef op vr 24-06-2022 om 09:34 [-0700]: > * module/web/http.scm (write-credentials): capitalize authorization > header scheme. The standard allows the scheme to be case-insensitive, > however most libraries out there expect the scheme to be capitalized, > which is what it

Re: mmap for guile

2022-06-26 Thread Maxime Devos
Some old mmap things that might be useful: * https://lists.nongnu.org/archive/html/guile-devel/2013-04/msg00235.html * https://lists.gnu.org/archive/html/bug-guile/2017-11/msg00033.html * https://lists.gnu.org/archive/html/guile-user/2006-11/msg00013.html +SCM_DEFINE (scm_mmap_search, "mmap/searc

Re: mmap for guile

2022-06-26 Thread Maxime Devos
Matt Wette schreef op zo 26-06-2022 om 08:37 [-0700]: > scheme@(guile-user)> ,d mmap/search > - Scheme Procedure: mmap/search addr len [prot [flags [fd [offset >   See the unix man page for mmap.  Returns a bytevector.  Note that >   the region allocated will be searched by the garbage

Re: mmap for guile

2022-07-19 Thread Maxime Devos
Ludovic Courtès schreef op ma 04-07-2022 om 12:09 [+0200]: > > Also, what if you mmap a region, use bytevector->pointer and pass > > it to > > some C thing, which saves the pointer somewhere where boehm-gc can > > find > > it and boehm-gc considers it to be live, is there something that > > prevent

Re: mmap for guile

2022-07-19 Thread Maxime Devos
Ludovic Courtès schreef op ma 04-07-2022 om 12:09 [+0200]: > But we could provide special semantics: the bytevector would become > zero-length (possible, but weird, as Maxime points out), or it would > be turned into a /dev/zero mapping (weird as well). > > Thoughts? The former is weird and can c

Re: mmap for guile

2022-07-19 Thread Maxime Devos
Ludovic Courtès schreef op ma 04-07-2022 om 12:09 [+0200]: > I don’t think the optimizer makes any such assumption, except for > literal bytevectors. It _does_ assume that bytevector lengths don't change: ,use (rnrs bytevectors) ,compile (bytevector-u8-ref some-variable 999) ;;; : warning: possi

Re: [PATCH] web: default to INADDR_ANY instead of INADDR_LOOPBACK

2022-07-22 Thread Maxime Devos
On 22-07-2022 02:44, Aleix Conchillo Flaqué wrote: ping. easy one but might be more controversial. On Wed, Feb 2, 2022 at 4:26 PM Aleix Conchillo Flaqué wrote: Using INADDR_ANY instead of INADDR_LOOPBACK makes it convenient when starting the web server inside containers I don't see

Re: [PATCH] load-foreign-library: perform substring match on library files

2022-07-23 Thread Maxime Devos
On 23-07-2022 13:09, soe...@soeren-tempel.net wrote: From: Sören Tempel This patch is a fix for bug #49232 [1]. To summarize this bug, the current load-foreign-library implementation does not load versioned sonames (e.g. libfoo.so.5) which are common on Linux. This is an issue for us at Alpine

Re: [PATCH] download: Do not wrap TLS port on GnuTLS >= 3.7.7.

2022-08-01 Thread Maxime Devos
Some objections on error handling (I don't know much about the wrapping) On 01-08-2022 11:07, Ludovic Courtès wrote: [...] Hello! I'll land a similar change in Guile's (web client) module afterwards if there are no objections. Ludo'. diff --git a/guix/build/download.scm b/guix/build/download.

Re: string is read-only

2022-08-03 Thread Maxime Devos
On 03-08-2022 11:12, Damien Mattei wrote: scheme@(guile-user)> (define str2 "hello") scheme@(guile-user)> (string-set! str2 4 #\a) ice-9/boot-9.scm:1669:16: In procedure raise-exception: string is read-only: "hello" It's not -- the existence of read-only strings is implied by substring/read-o

Re: Fwd: string is read-only

2022-08-03 Thread Maxime Devos
On 03-08-2022 11:51, Damien Mattei wrote: ok and i suppose it is the standard, i have been confused by other schemes or racket where my code worked: It happens to work in Guile too, when you use the interpreter instead of the compiler: scheme@(guile-user)> (eval `(let ((a ,(string-copy "fo

Re: string is read-only

2022-08-03 Thread Maxime Devos
On 03-08-2022 12:55, Damien Mattei wrote: but no restrictions with lists in Guile: scheme@(guile-user)> (define lst '(1 2 3)) scheme@(guile-user)> (set-car! lst 7) scheme@(guile-user)> lst (7 2 3) Non-empty lists are pairs and the second part of the pair is another list -- in Guile, this is e

Re: [PATCH] download: Do not wrap TLS port on GnuTLS >= 3.7.7.

2022-08-04 Thread Maxime Devos
On 02-08-2022 09:59, Ludovic Courtès wrote: + (if (module-defined? (resolve-interface '(gnutls)) + 'set-session-record-port-close!) ;GnuTLS >= 3.7.7 resolve-module (and presumably also sets #:ensure #t by default, which sometimes causes 'module not found' messages

Re: [PATCH] download: Do not wrap TLS port on GnuTLS >= 3.7.7.

2022-08-05 Thread Maxime Devos
On 05-08-2022 10:31, Ludovic Courtès wrote: I understand what you’re saying (I’m quite familiar with Guile’s module system :-) and I do agree that #:ensure #t can lead to bad surprises), but I don’t think this is correct: --8<---cut here---start->8--- scheme@

Re: (ice-9 base64)?

2022-08-16 Thread Maxime Devos
On 16-08-2022 18:10, Aleix Conchillo Flaqué wrote: Hi, In many projects I've been copying Göran Weinholt's base64 implementation and I've also seen it in other projects, would it make sense to include it in Guile's standard library? [...] If we do this, we should contact the various other p

Re: (ice-9 base64)?

2022-08-18 Thread Maxime Devos
Then, if I understood correctly, IMO I would say Guile should not really care about Guix's bundling/unbundling. That is, adding (ice-9 base64) (or however we want to call it... maybe (encoding base64) following Golang and Guile's (web ) module) should be totally independent of Guix. So, if

Re: (ice-9 base64)?

2022-08-19 Thread Maxime Devos
On 19-08-2022 02:20, Aleix Conchillo Flaqué wrote: So, what do you think would be the way to proceed in order to include a base64 implementation in Guile itself? For example: 1. Add (ice-9 base64) (or (encoding base64)) to Guile and let new projects and existing projects to update with condi

Re: “Too many root sets” when calling compile frequently

2022-08-19 Thread Maxime Devos
On 19-08-2022 00:18, Jean Abou Samra wrote: Hi, Calling the Guile compiler often causes this BDWGC error: “Too many root sets”. scheme@(guile-user)> (define-syntax-rule (repeat n expr expr* ...) (do ((i 0 (1+ i))) ((eqv? i n)) expr expr* ...)) scheme@(guile-user)> (use-modules (system base c

Re: “Too many root sets” when calling compile frequently

2022-08-20 Thread Maxime Devos
On 20-08-2022 13:08, Jean Abou Samra wrote: Thanks for your reply. I didn’t dig into the history yet, but I might do it later. For now, I have a question. What is the actual purpose of the GC_add_roots call? Is it just to give eternal protection to the objects pointed to by pointers in the me

Re: [PATCH] load-foreign-library: perform substring match on library files

2022-08-20 Thread Maxime Devos
On 24-07-2022 14:16, Sören Tempel wrote: Hi, Thanks for your feedback, comments below. Maxime Devos wrote: Long term, I think it would be ideal for Guile to decide upon a major version (and maybe even location, depending on the choices of the distro) at _compile_ time instead of runtime

Re: [PATCH] load-foreign-library: perform substring match on library files

2022-08-20 Thread Maxime Devos
On 20-08-2022 15:52, Sören Tempel wrote: Hi, How do we proceed with this? I would especially be interested in the "patching" that you do in Guix. Maybe that would also be a suitable workaround for us on the Alpine side until this is sorted out properly. Greetings, Sören Eventually, an actua

Re: avoid character encoding/escaping in sxml->xml or htmlprag's sxml->html

2022-08-20 Thread Maxime Devos
The GuileScript looks nice, for interested readers, see On 20-08-2022 21:59, Aleix Conchillo Flaqué wrote: However, I'm not able to find a way to avoid character encoding/escaping and the generated code inside will always have "<", etc.

Re: avoid character encoding/escaping in sxml->xml or htmlprag's sxml->html

On 21-08-2022 02:05, Aleix Conchillo Flaqué wrote: According to the spec, embedding inline content in the tag should conform to the language defined by the "type" attribute (defaults to javascript). So, I would expect you could put any string that conforms to JS.

Re: expression and definition context in Scheme

On 27-08-2022 18:48, Damien Mattei wrote: My ideas is as it is so easy to cheat the compiler I don't think it's cheating or abusive. from seeing the expressio context why does the compiler restrict this? expression and defintion context, i'm not sure they are in scheme standarts, are they rea

Re: expression and definition context in Scheme

On 27-08-2022 21:02, Damien Mattei wrote: I haven't read the RnRS closely, but I doubt that (some-procedure (define foo 0) (define bar 0)) ? i do not understand well the meaning Me neither, that's what I meant. You are proposing to unify expression context and definition context

Re: expression and definition context in Scheme

On 27-08-2022 21:02, Damien Mattei wrote: in fact just allow 'define that act locally ,see my comment below I do not know what semantics you want. Also, even if (begin ...) and (let () ...) where unified, it would be a shame to lose the ability to only have some definitions tempo

Re: expression and definition context in Scheme

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: [PATCH] Define SO_RCVTIMEO and SO_SNDTIMEO.

On 17-09-2022 10:05, Christopher Baines wrote: + if (ioptname == SO_RCVTIMEO || ioptname == SO_SNDTIMEO) +{ + SCM_ASSERT (scm_is_pair (value), value, SCM_ARG4, FUNC_NAME); How about using SCM_ASSERT_TYPE instead to improve the error message a little? + opt_time.tv_sec = scm

Re: [PATCH] Improve reporting of exception locations

On 20-09-2022 04:00, Andrew Whatson wrote: Most errors were reported as coming from boot-9.scm due to incorrect hard-coded stack-narrowing offsets. This patch fixes the offsets and adds an argument to specify additional frames to skip when calling raise-exception. Do you have some test cases

Re: [PATCH] Avoid 'frame-local-ref' errors when printing backtrace.

On 20-09-2022 09:23, Andrew Whatson wrote: => (lambda (binding) - (let ((val (frame-local-ref frame (binding-slot binding) - (binding-representation binding + (let* ((slot (binding-slot binding)) +

Re: [PATCH] Improve reporting of exception locations

On 21-09-2022 12:42, Maxime Devos wrote: There recent-ish was a bug report about exception handling (on IRC), it would be a unfortunate if whatever the fix for that turned out to be, causes the reporting to be wrong again -- a few test cases for this patch could prevent that. Correction

Re: [PATCH] Avoid 'frame-local-ref' errors when printing backtrace.

On 22-09-2022 15:53, Andrew Whatson wrote: - (let ((val (frame-local-ref frame (binding-slot binding) - (binding-representation binding + (let* ((slot (binding-slot binding)) +;; HACK: Avoid out-of-range fro

Re: [PATCH] Add tests for warning locations.

On 24-09-2022 15:46, Andrew Whatson wrote: diff --git a/test-suite/tests/tree-il/unbound-spaces.scm b/test-suite/tests/tree-il/unbound-spaces.scm new file mode 100644 index 0..9de3b9861 --- /dev/null +++ b/test-suite/tests/tree-il/unbound-spaces.scm @@ -0,0 +1 @@ + (foo) diff --git a/

Re: Recursive Macros generating Definitions

On 03-10-2022 13:32, Frank Terbeck wrote: When looking at this, I also saw the following, which might be related if ‘syntax-rules’ is implemented using ‘syntax-case’ It is, IIRC. (I didn't check if this is the case): (define-syntax-rule (foobar n) (define quux n)) ,exp (foobar

Re: Relaxing the copyright assignment policy

On 06-10-2022 22:18, Ludovic Courtès wrote: Hello Guilers! [...] New contributors are encouraged to assign copyright to the FSF by emailing them one of the forms at , especially if they intend to contribute significantly going f

Re: map-par slower than map

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: [DRAFT] Improve reporting of exception locations

On 12-10-2022 08:35, Andrew Whatson wrote: Hello guile-dev! I'm working on a revised patch to improve the reporting of exception locations, after last month's initial flawed attempt. The new patch takes the more radical approach of capturing the stack when an exception is created, AFAICT, i

Re: map-par slower than map

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: Packages depending on (guix build syscalls)

On 20-10-2022 22:05, Ludovic Courtès wrote: Hello Guix! Quite a few packages depend on (guix build syscalls), starting from ‘ant-bootstrap’ (since commit cded3a759356ff66b7df668bcdbdfa0daf96f4c5 in 2018) up to GNOME-related packages such as ‘mutter’ (commit d1c2fe248a7a326189fb7dcae64a59ece96251

Re: Guile VM interpreter in GraalVM Truffle framework

On 23-12-2022 18:06, Arvydas Silanskas wrote: Good day, I have aspirations to run scheme on graalvm's truffle framework. And on superficial research, it seems implementing a Guile VM bytecode interpreter could be easiest path. I just want to inquire, if someone already had similar ideas and i

Re: Guile VM interpreter in GraalVM Truffle framework

On 23-12-2022 21:51, Maxime Devos wrote: [... problems ...] ... you could of course choose to simply _not_ support ephemerons. 'Guile (minus the ephemerons) on top of GraalVM' still sounds interesting even if missing a tiny bit of functionality. Greetin

Re: define-module, #:export and export

On 04-01-2023 16:11, yarl baudig wrote: Hello guile. I don't know if that's a bug. Anyway, I am confused about this so I ask. I came across this problem playing with guix source code. I will share different "tests" each test is a directory with nothing but the files I share. each time the comm

Re: define-module, #:export and export

On 06-01-2023 14:31, yarl baudig wrote: That is also my understanding, confirmed by $ cat lib.scm (define-module (lib)   #:export (test)) (define-syntax test   (lambda (sintax)     (syntax-case sintax ()   ((test id)    (datum->syntax sintax (free-identifier=? #'id #'thing)

Re: [PATCH] Add 'bytevector-slice'.

This looks useful to me, especially once the optimiser recognises 'bytevector-slice'. (In Scheme-GNUnet, I defined a wrapper around bytevectors called 'bytevectors slices' to implement such a thing.) The only thing missing for me, is a procedure 'bytevector-slice/read-only' and 'bytevector-sl

Re: [PATCH] Add 'bytevector-slice'.

On 13-01-2023 12:32, Ludovic Courtès wrote: IIUC, if you use bytevector-slice iteratively, say: (let loop ((bv some-initial-value) (n large-number)) (if (> n 0) (loop (bytevector-slice bv 0 (bytevector-length bv)) (- n 1)) bv)) you will end up with a by

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

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: [PATCH] Add 'bytevector-slice'.

On 14-01-2023 00:48, Ludovic Courtès wrote: Ah yes, that’s right, I misunderstood the comment. In the example above, where we’re only dealing with slices, we could “skip” the parent (i.e., have each slice’s parent point to the “root” of the hierarchy), but I don’t think we can assume this to b

Re: patch for mmap and friends

On 14-01-2023 01:49, Matt Wette wrote: Please consider this patch for adding mmap(), munmap() and msync()  to libguile/filesys.c.  Included is update for posix.texi and test file mman.test. Once included, feature 'mman should be #t. Matt + if (SCM_UNBNDP (fd)) +c_fd = -1; + else

Re: patch for mmap and friends

On 14-01-2023 23:08, Matt Wette wrote: 2) had to copy/modify dynwind_acquire_port and release_port from ports.c Is it because of the 'static' qualifier? If so, you could use the 'SCM_INTERNAL [...] scm_i_[...]' pattern, e.g. see 'scm_i_is_mutable_bitvector' in libguile/bitvectors.h and li

Re: [PATCH v1 2/6] docs/match: rm unquote-splicing as it interferes with textinfo

On 26-01-2023 19:57, Blake Shaw wrote: don't know how to fix this rn, but... You can escape @ with @@. --- doc/ref/match.texi | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/doc/ref/match.texi b/doc/ref/match.texi index 105150886..c5017e1a5 100644 ---

Re: [PATCH v1 2/6] docs/match: rm unquote-splicing as it interferes with textinfo

On 28-01-2023 10:14, Blake Shaw wrote: Thanks! The new latest edit is still preferred but I'll keep that in mind for the future. I don't follow? The commit message was: [PATCH v1 2/6] docs/match: rm unquote-splicing as it interferes with textinfo don't know how to fix this rn, but... I.e.

Re: [PATCH v1 1/6] docs/match: add pattern matching examples

On 26-01-2023 19:57, Blake Shaw wrote: +A pattern matcher does precisely what the name implies: it matches +some arbitrary pattern, and returns some result accordingly. It doesn't need to return anything -- while functional style is common in Guile, imperative is still possible. It can retu

Re: [PATCH v1 1/6] docs/match: add pattern matching examples

On 26-01-2023 19:57, Blake Shaw wrote: @example -(match lst - (((heads tails ...) ...) - heads)) +(match '(((a b c) e f g) 1 2 3) + (((head ...) tails ...) + `(,@tails ,head))) +@result{} (1 2 3 ((a b c) e f g)) @end example Contrary to the commit message, this isn't an addition of

Re: [PATCH v1 1/6] docs/match: add pattern matching examples

On 29-01-2023 03:40, Blake Shaw wrote: Hi Maxime, Did you watch my talk from Guix days? I read the text in the talk, but mostly skipped the speech. There I detailed that the goal would be to move from what is painfully obvious, gradually building up in chunks and peices. That is what is h

Re: [PATCH v1 1/6] docs/match: add pattern matching examples

On 29-01-2023 04:04, Blake Shaw wrote: On 26-01-2023 19:57, Blake Shaw wrote: >   @example > -(match lst > -  (((heads tails ...) ...) > -   heads)) > +(match '(((a b c) e f g) 1 2 3) > +  (((head ...) tails ...) > +   `(,@tails ,head))) > +@result

Re: [PATCH v1 1/6] docs/match: add pattern matching examples + CoC

do know that it was enough for me to become allergic to Guile/Guix community until I started hanging out on Mastodon and discovered many guix have retreated there. Now let's get into the specifics of the current patch review where I'll show why I think your efforts aren't in earne

Re: [PATCH v1 1/6] docs/match: add pattern matching examples

On 30-01-2023 20:56, Aleix Conchillo Flaqué wrote: [...] Maxime found the time to review a quite big PR and added a bunch of useful comments. Reviewing that PR took a lot of effort and I just felt better after fixing all the comments made. I was even surprised he (I'm assuming this pronoun) did

Re: [PATCH v3] docs/match: pattern matcher example makeover

On 01-02-2023 14:09, Blake Shaw wrote: [...] - style: clean-up newlines -- It appears that while the PDF needs additional newlines to be presentable, these appear to have a negative effect on the presentation of the texinfo doc. I don't know how to fix this, but from looking at the PDF, it ap

Re: [PATCH] add language/wisp to Guile?

Why add Wisp? For Wisp: it is then available directly wherever Guile is available. This will make it much easier for people to follow tutorials. I'm not convinced of this argument, because package managers exist, but ... For Guile: - Wisp has proven to be good at enabling people to

Re: [PATCH] add language/wisp to Guile?

On 04-02-2023 16:46, Dr. Arne Babenhauserheide wrote: [...] So I’d like to ask: can we merge Wisp as supported language into Guile? From some conversations elsewhere, I got the impression that (use-modules (foo)) will search for foo.scm and not in foo.w. I think you'll need to tweak the

Re: [PATCH] add language/wisp to Guile?

On 04-02-2023 22:35, Dr. Arne Babenhauserheide wrote: Maxime Devos writes: This needs an addition to the extensions via guile -x .w — I wrote that in the documentation. I didn’t want to do that unconditionally, because detecting a wisp file as scheme import would cause errors. If done

Re: [RFC,PATCH] Do not GC_INIT the Boehm GC if already initialized

> [RFC,PATCH] Do not GC_INIT the Boehm GC if already initialized On 06-02-2023 19:34, Jose E. Marchesi wrote: Hello Guile hackers. We are in the process of integrating GNU poke[1] in GDB by mean of libpoke. Problem is, libpoke uses the Boehm GC, as guile does. We are working on switching to

[PATCH] Print backtraces for syntax errors too.

For complicated macros, especially macros that are used correctly but have a bug in their implementation somewhere and use 'syntax-case' or 'syntax-rules' multiple times, it can be very convenient to know _which_ syntax-case or syntax-rules raised the syntax-error. E.g., I'm currently debugging so

Re: [PATCH] add language/wisp to Guile?

> [...] That would be nice, but would require doing changes in a critical core part of Guile. It would change this addition from a risk-free added feature to a risky core change. I maintain that a new language shouldn't be merged until the Scheme-specific load path stuff is fixed/extended to w

Re: [PATCH] add language/wisp to Guile?

[...] Which begs an important question: How would you like to be attributed? I plan to also merge this back to the wisp repo and I’d like to attribute you there, too. You could add a ";; Copyright © 2023 Maxime Devos " line next to yours in the file that contains the read-one-w

Re: [PATCH] add language/wisp to Guile?

On 16-02-2023 09:03, Dr. Arne Babenhauserheide wrote: Maxime Devos writes: + ;; allow using "# foo" as #(foo). + (read-hash-extend #\# (λ (chr port) #\#)) That's a rather Wisp-specific extension, but it appears you are extending things globally. Ins

Re: [PATCH] add language/wisp to Guile?

On 16-02-2023 22:38, Dr. Arne Babenhauserheide wrote: Matt Wette writes: You may be interested in the load-lang patch I generated a few years ago to allow file-extension based loading, in addition to '#lang elisp" type hooks. https://github.com/mwette/guile-contrib/blob/main/patch/3.0.8/lo

Re: [PATCH] add language/wisp to Guile?

On 18-02-2023 04:50, Philip McGrath wrote: I haven't read the patch or this thread closely, I'll assume you have read it non-closely. but R6RS has an answer to any concerns about compatibility with `#lang`. At the beginning of Chapter 4, "Lexical and Datum Syntax" (

Re: [RFC,PATCH] Do not GC_INIT the Boehm GC if already initialized

On 20-02-2023 11:06, Ludovic Courtès wrote: [...] The “Multiple invocations” bit isn’t in libgc 8.0.4. Which version are you looking at? Commit 151b49a5302eea89ffd9efd9cdb82b75ac4f5d35 (include/gc/gc.h). Looking at the changelog, that part is there since at least 8.0.6: [...] * Refine GC_IN

Re: [PATCH] add language/wisp to Guile?

In Racket, in the initial configuration of the reader when reading a file, "`#!` is an alias for `#lang` followed by a space when `#!` is followed by alphanumeric ASCII, `+`, `-`, or `_`." (See .) [...] > (Guile does

Re: [PATCH] add language/wisp to Guile?

On 23-02-2023 09:51, Dr. Arne Babenhauserheide wrote: Thinking a bit more about it, it should be possible to special-case Guile's interpretation of "#!" such that "#!r6rs" doesn't require a closing "!#". (Technically backwards-incompatible, but I don't think people are writing #!r6rs ...!# in th

Re: [PATCH] add language/wisp to Guile?

On 23-02-2023 19:04, Maxime Devos wrote: Still doesn't really address the problem though, as Scheme scripts (or scripts in another language) may need to start with a shebang and "#!lang" or "#lang" is not a valid comment in all languages.  (E.g., I don't think it

Re: [PATCH] add language/wisp to Guile?

On 23-02-2023 19:04, Maxime Devos wrote: (*) Java actually allows "#!", but only in 'Shebang' files (see: https://openjdk.org/jeps/330#Shebang_files).  It remains invalid to put a '#!java' line in files with a class definition that is supposed to be found by Jav

Re: [PATCH] add language/wisp to Guile?

On 23-02-2023 19:04, Maxime Devos wrote: (*) Java actually allows "#!", but only in 'Shebang' files (see: https://openjdk.org/jeps/330#Shebang_files).  It remains invalid to put a '#!java' line in files with a class definition that is supposed to be found by Jav

Re: [PATCH] add language/wisp to Guile?

On 23-02-2023 12:36, Ludovic Courtès wrote: Hi! Sorry for the late reply. FWIW, I think it might be best to keep Wisp as a separate package: that allows it to evolve independently of Guile (and possibly more quickly :-)), and it might simplify maintenance in some way. To my understanding, W

Re: [PATCH] Print backtraces for syntax errors too.

On 23-02-2023 12:38, Ludovic Courtès wrote: Do you have a simple reproducer and a before/after comparison showing what Guile prints? Simpler reproducer: (define-syntax syntax-stuff-twice (lambda (s) (define (f x) (syntax-case x () (#:this #''this) (#:that #''that)))

Re: [PATCH] Print backtraces for syntax errors too.

On 23-02-2023 12:38, Ludovic Courtès wrote: Do you have a simple reproducer and a before/after comparison showing what Guile prints? (Please ignore my previous e-mail, the reproducer was incorrect. I'll try making another one.) OpenPGP_0x49E3EE22191725EE.asc Description: OpenPGP public ke

Re: [PATCH] Print backtraces for syntax errors too.

On 23-02-2023 12:38, Ludovic Courtès wrote: Hi, Maxime Devos skribis: For complicated macros, especially macros that are used correctly but have a bug in their implementation somewhere and use 'syntax-case' or 'syntax-rules' multiple times, it can be very convenient to

Re: [PATCH] Print backtraces for syntax errors too.

On 24-02-2023 16:48, Ludovic Courtès wrote: Maxime Devos skribis: ;; Before: ;; unknown file:#f:#f: syntax-stuff-twice: bad in subform # of # ;; After: ;; [the same thing] ;; ;; Looks like another patch is needed ... What backtrace are you trying to get? Getting a backtrace

Re: [PATCH] add language/wisp to Guile?

On 24-02-2023 16:45, Ludovic Courtès wrote: Adding #lang support in Guile would be nice. As discussed on IRC, it can be experimented with in a WIP branch. Have you seen my messages on how the "#lang" construct is problematic for some languages, and how alternatives like "[comment delimiter] -

Re: [PATCH] add language/wisp to Guile?

On 25-02-2023 00:48, Maxime Devos wrote: (**) For compatibility with Racket, it's not like we couldn't implement both "#lang" and "-*- stuff: language -*-". TBC, I mean ‘only support #lang' for values of 'lang' that Racket supports’, or altern

Re: [PATCH] add language/wisp to Guile?

On 25-02-2023 01:15, Matt Wette wrote: On 2/24/23 3:51 PM, Maxime Devos wrote: On 25-02-2023 00:48, Maxime Devos wrote: (**) For compatibility with Racket, it's not like we couldn't implement both "#lang" and "-*- stuff: language -*-". TBC, I mean ‘only supp

Re: [PATCH] add language/wisp to Guile?

Op 26-02-2023 om 08:45 schreef Philip McGrath: Hi, On Sat, Feb 18, 2023, at 10:58 AM, Maxime Devos wrote: On 18-02-2023 04:50, Philip McGrath wrote: I haven't read the patch or this thread closely, I'll assume you have read it non-closely. but R6RS has an answer to any conc

Re: Functional datatypes in Guile

Op 27-02-2023 om 14:17 schreef Jessica Tallon: Hello, I've been thinking how it'd be nice to have available in Guile a number of purely functional datatypes, these being hashmaps, vectors, and sets. I've been wondering what folks have been using for these with the idea that we could bring them

Re: Clojure support

Op 14-05-2023 om 00:10 schreef Rob Browning: Regarding hash-maps and hash-sets, I initially used pfds, but after having trouble with bugs, I switched to fash: https://codeberg.org/lokke/lokke/commits/branch/main/search?q=pfds Guix has included a fix tor the hamts bug: #:phases (mo

<    1   2   3   4   >