Re: Thanks all!

2021-10-24 Thread Dr. Arne Babenhauserheide

paul  writes:

> I have just made a release of my app [1] which integrates a Guile
> runtime -- since i received invaluable pointers from this mailing 
> list, i thought folks might be curious as to what i was building.
…
> 1. Spotiqueue on Github, https://github.com/toothbrush/Spotiqueue

Very cool! Congratulations!

> Scratches my itch, no other guarantees granted

Great definition of purpose! (thumbs up!)

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de


signature.asc
Description: PGP signature


Re: Is it possible to expand syntax inside match?

2021-10-24 Thread Maxime Devos
Михаил Бахтерев schreef op zo 24-10-2021 om 11:49 [+0500]:
> Greetings!
> 
> I wondering, if is it possible to implement something like
> this?
> 
> (define-syntax R (syntax-rules () ((_ r v l) #(red r v l
> (define-syntax B (syntax-rules () ((_ r v l) #(black r v l
> 
> (define red-black-set-balance 
>   (match-lambda
>     ((or (B (R (R a x b) y c) z d)
>  (B (R a x (R b y c)) z d)
>  (B a x (R (R b y c) z d))
>  (B a x (R b y (R c z d (R (B a x b) y (B c z d)))
>     (node node)))

Not exactly what you were looking for, but maybe use quasisyntax /
unsyntax #` #, something like (untested):

;; define, not define-syntax!
(define R (syntax-rules () ((_ r v l) #(red r v l
(define B (syntax-rules () ((_ r v l) #(black r v l

(define-syntax red-black-set-balance-m
  (lambda (s)
#`(match-lambda
((or #,(B (R (R a x b) y c) z d)
 #,(B (R a x (R b y c)) z d)
 ...))
(node node

(define red-black-set-balance red-black-set-balance-m)


Greetings,
Maxime




SRFI 106 "basic socket interface" in Guile

2021-10-24 Thread Tim Lee
I noticed that Guile does not implement SRFI 106 (basic socket interface)
(https://srfi.schemers.org/srfi-106/srfi-106.html). Is there a
fundamental reason for the omission? I'm just wondering whether or not
Guile has all the socket primitives needed to implement SRFI 106.



Re: SRFI 106 "basic socket interface" in Guile

2021-10-24 Thread Nala Ginrut
To my experience on implementing the server-core of Artanis with pure
Guile. I think srfi 106 could be mostly covered by the current Guile.
However, I'm not sure about some options as constants.

 Best regards.


On Mon, Oct 25, 2021, 13:57 Tim Lee  wrote:

> I noticed that Guile does not implement SRFI 106 (basic socket interface)
> (https://srfi.schemers.org/srfi-106/srfi-106.html). Is there a
> fundamental reason for the omission? I'm just wondering whether or not
> Guile has all the socket primitives needed to implement SRFI 106.
>
>


Re: SRFI 106 "basic socket interface" in Guile

2021-10-24 Thread Maxime Devos
Tim Lee schreef op ma 25-10-2021 om 02:59 [+]:
> I noticed that Guile does not implement SRFI 106 (basic socket
> interface)
> (https://srfi.schemers.org/srfi-106/srfi-106.html). Is there a
> fundamental reason for the omission? I'm just wondering whether or
> not
> Guile has all the socket primitives needed to implement SRFI 106.
> 

I don't think Guile has an equivalent of *msg-peek*, *msg-oob*
and *msg-waitall*.  I don't know why SRFI 106 asks for socket-
{input/output}-port to return fresh ports, if non-fresh ports
were allowed, the socket itself could be returned.  Except for
these issues, everything seems to be implementable in pure GUile.

Greetings,
Maxime