Re: define-module, #:export and export

2023-01-12 Thread yarl baudig
For completeness, this works as well:

lib.scm:
(define-module (lib)
  #:use-module ((main) #:select (thing))
  #:export (test))

(define-syntax test
  (lambda (sintax)
(syntax-case sintax ()
  ((test id)
   (free-identifier=? #'id #'thing)

main.scm:
(define-module (main)
  #:use-module (lib)
  #:export (thing))

(display (test thing))
(newline)
(define thing 5)







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

2023-01-12 Thread Ludovic Courtès
lloda  skribis:

>> On 11 Jan 2023, at 18:37, Thompson, David  wrote:
>> 
>> On Wed, Jan 11, 2023 at 12:34 PM Ludovic Courtès  wrote:
>>> 
>>> What could be convenient though is ‘bytevector-copy’ (no bang), which
>>> would combine ‘make-bytevector’ + ‘bytevector-copy!’.
>> 
>> 'bytevector-copy' already exists, or do you mean some different
>> implementation of it?
>> 
>> - Dave
>
> The current bytevector-copy takes a single argument.

Right, what I had in mind is one that would take an offset and size; I
hadn’t realized the name was already taken.

Thanks,
Ludo’.