On Mon, Jan 30, 2023 at 6:53 PM Maxime Devos wrote:
> 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 commen
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
> -(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))
On Mon, Jan 30, 2023 at 11:56 AM Aleix Conchillo Flaqué <
aconchi...@gmail.com> wrote:
> Hi!
>
> On Sun, Jan 29, 2023 at 4:50 PM Blake Shaw wrote:
>
>>
>> And there's more, its a pattern; I dont know if you troll everyone like
>> this or if I represent something you feel opposed to, but I do know
Hi!
On Sun, Jan 29, 2023 at 4:50 PM Blake Shaw wrote:
>
> And there's more, its a pattern; I dont know if you troll everyone like
> this or if I represent something you feel opposed to, but I do know that it
> was enough for me to become allergic to Guile/Guix community until I
> started hanging
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
> + `(,@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 a
pattern
>>matching example, it's a change.
>>Aside from inlining 'lst', what's t
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
)
> > > + ('nine 9)))
> > > +
> > > +(english-base-ten->number 'six)
> > > +@result{} 6
> >
> > This is a suboptimal example; this would be better done with
> > 'case'.
> > I propose replacing it with another ex
al example; this would be better done with 'case'.
> I propose replacing it with another example, or adding a note that
> one
> would normally use 'case' for this.
The point of this example is not to proficiently program in scheme
It is to introduce possibly naive people to pattern matching
effectively
The aim is to be didactic, there's no implication that this is
idiomatic scheme
I'd pay attention at the curse of knowledge that may be at play, here
n addition of a pattern
matching example, it's a change.
Aside from inlining 'lst', what's this change for?
+A pattern matcher can match an object against several patterns and
+extract the elements that make it up.
+
+@example
+(let ((m '((a . b) (c . d) (e . f))
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
Hello all,
This commit introduces a set of (long overdue) examples to the
documentation on pattern matching discussed in the Guix Days
presentation which can be found here:
https://xana.lepiller.eu/guix-days-2022/guix-days-2022-documentation.mp4
As discussed in the Guix Days presentation, and
thing
is the incompatibility.
If anyone use pattern-matching for parsing parent of a record-type, then
it'll break.
There are probably two workarounds to keep your current code if you use
pattern-matching for parsing parent.
1. Copy and maintain the old record code:
(rnrs records procedural)
Hi folks!
I found the r6rs record pattern matching has different results compared to
Guile-2.
Here is the example code:
-code--
,use (rnrs)
,use (ice-9 match)
(define-record-type aaa (fields a))
(define-record-type bbb
Hi, I found a small error in the docs for the pattern matching module:
https://www.gnu.org/software/guile/manual/html_node/Pattern-Matching.html
There should be no "exp" in these argument lists:
Scheme Syntax: match-lambda exp clause1 clause2 …
Scheme Syntax: match-lambda* exp claus
prolog with these elements if you like and
> 99% of the code would be scheme. But I did not code a full version in
> scheme just to see how it compares, I'll chew on that,
OK, you know what you’re doing very well so you may well be taking the
right approach. :-)
> I'll
17 matches
Mail list logo