Hi Stéfano,
Am 09.03.2018 um 16:48 schrieb Stefano Troncaro:
A few thoughts
I think macro definitions for all the define- functions can be avoided
like this:
\version "2.19.80" \include "oll-core/package.ily" #(define-macro
(with-options func-def-proc vars preds rulings . body)
A few thoughts
I think macro definitions for all the define- functions can be avoided like
this:
> \version "2.19.80"\include "oll-core/package.ily"
> #(define-macro (with-options func-def-proc vars preds rulings . body)
>`(,func-def-proc ,(append '(opts) vars) ,(append '(ly:context-mod?) pre
@Urs
I've thought about this some more. I don't know if you were interested
in wrapping the functions that use opts and props in a macro, but I
noticed a lot of redundancy so I gave it a try.
\version "2.19.80" \include "oll-core/package.ily" #(define-macro
(define-void-function-wit
Am 08.03.2018 um 23:46 schrieb Stefano Troncaro:
@Urs
With your last update, the following syntax popped to mind:
\version "2.19.80" %Functional copy of your example #(define rules
`(strict
(req payload
(target ,symbol?))
(opt accepted-withou
@Harm
I can't imagine how frustrating it must have been to try to upgrade from
1.8, ~5 years is so much time! Indeed, the changes from 1.8 to 2 must be
very deep...
Thank you for taking the time to explain that, I found it very interesting.
@Urs
I've thought about this some more. I don't know if
2018-03-08 23:46 GMT+01:00 Stefano Troncaro :
> @David, Harm
> I didn't know 1.8 was not maintained anymore. I imagine we're still using it
> because updating it would take a lot of work (and create instability) and
> dev time is better placed elsewhere, or something among those lines, am I
> righ
@Urs
With your last update, the following syntax popped to mind:
> \version "2.19.80"
> %Functional copy of your example#(define rules
>`(strict
> (req payload
>(target ,symbol?))
> (opt accepted-without-type
>(accepted-arg ,fraction?)
>(ind ,num
Thomas Morley writes:
> 2018-03-08 17:29 GMT+01:00 David Kastrup :
>> Stefano Troncaro writes:
>>
>>> @David
>>> Thank you. The define-syntax and syntax-rules thing looked easier to
>>> understand at first glance so I tried to use that. I'll experiment with
>>> macros then.
>>
>> If we want to g
2018-03-08 17:29 GMT+01:00 David Kastrup :
> Stefano Troncaro writes:
>
>> @David
>> Thank you. The define-syntax and syntax-rules thing looked easier to
>> understand at first glance so I tried to use that. I'll experiment with
>> macros then.
>
> If we want to get rid of those problems: Guile-1.
Stefano Troncaro writes:
> @David
> Thank you. The define-syntax and syntax-rules thing looked easier to
> understand at first glance so I tried to use that. I'll experiment with
> macros then.
If we want to get rid of those problems: Guile-1.8 is no longer
officially maintained. I think someon
Am 08.03.2018 um 16:52 schrieb Urs Liska:
@Urs
Great! I tested it a bit and it seems to be working as intended.
I have forgotten one thing that I've only halfway completed by now:
"accepted" properties without type checking. Currently, if the
"strict" flag is set, only keys present in the r
Am 08.03.2018 um 16:42 schrieb Stefano Troncaro:
@Urs
Great! I tested it a bit and it seems to be working as intended.
I have forgotten one thing that I've only halfway completed by now:
"accepted" properties without type checking. Currently, if the "strict"
flag is set, only keys present i
@Urs
Great! I tested it a bit and it seems to be working as intended.
I'm curious about the "complains about the wrong type for 'target'" part
though. I remembered that words when typed like that were symbols, so I did
this to check it out:
> \version "2.19.80"\include "oll-core/package.ily"#(use
Am 08.03.2018 um 10:35 schrieb Urs Liska:
Am 08.03.2018 um 08:44 schrieb Urs Liska:
Hi Stéfano,
Am 08.03.2018 um 07:26 schrieb Stefano Troncaro:
@Urs
I looked into your examples and \with blocks are very useful.
You said earlier that you were thinking about how to make it so that
the
Am 08.03.2018 um 08:44 schrieb Urs Liska:
Hi Stéfano,
Am 08.03.2018 um 07:26 schrieb Stefano Troncaro:
@Urs
I looked into your examples and \with blocks are very useful.
You said earlier that you were thinking about how to make it so that
the context-mod could have required arguments, def
Stefano Troncaro writes:
> First of all, I apologize for the delayed response, I wanted to write back
> earlier but I couldn't find the time to delve into your last suggestions.
> Thank you for the useful replies!
>
> @Harm
> I don't understand most of what the code you provided is doing, only th
Hi Stéfano,
Am 08.03.2018 um 07:26 schrieb Stefano Troncaro:
@Urs
I looked into your examples and \with blocks are very useful.
You said earlier that you were thinking about how to make it so that
the context-mod could have required arguments, default values for
missing ones, and even predic
First of all, I apologize for the delayed response, I wanted to write back
earlier but I couldn't find the time to delve into your last suggestions.
Thank you for the useful replies!
@Harm
I don't understand most of what the code you provided is doing, only that
it works. It's far too advanced for
2018-03-01 18:31 GMT+01:00 Stefano Troncaro :
> I didn't know about \default or the dot/comma separated number/symbol lists!
> I can see those being useful in some circumstances. I was thinking about
> cases where an undefined amount of things different than symbols or numbers
> are required, and t
Am 01.03.2018 um 18:31 schrieb Stefano Troncaro:
...
@Urs, I not familiar with \with blocks, I'll take a look at the
oll-core code and experiment a bit with it. Maybe I'll be able to help.
Look at
https://github.com/openlilylib/scholarly/blob/master/usage-examples/annotate.ly
to see an e
Am 01.03.2018 um 18:31 schrieb Stefano Troncaro:
...
@Urs, I not familiar with \with blocks, I'll take a look at the
oll-core code and experiment a bit with it. Maybe I'll be able to help.
Look at
https://github.com/openlilylib/scholarly/blob/master/usage-examples/annotate.ly
to see an e
I didn't know about \default or the dot/comma separated number/symbol
lists! I can see those being useful in some circumstances. I was thinking
about cases where an undefined amount of things different than symbols or
numbers are required, and the closest I can imagine is chaining functions
to crea
Stefano Troncaro writes:
> Thank you! I see that this is not an option then. Also, I now understand
> why I couldn't make the optional arguments work, since I always left them
> for last.
>
> Do you know if it is possible to have a flexible amount of optional
> arguments that appear before the la
Stefano Troncaro writes:
> Thank you! I see that this is not an option then. Also, I now understand
> why I couldn't make the optional arguments work, since I always left them
> for last.
You can use an explicit \default to substitute optional arguments in
final position.
--
David Kastrup
___
Am 1. März 2018 03:26:31 MEZ schrieb Stefano Troncaro
:
>Thank you! I see that this is not an option then. Also, I now
>understand
>why I couldn't make the optional arguments work, since I always left
>them
>for last.
>
>Do you know if it is possible to have a flexible amount of optional
>argume
Thank you! I see that this is not an option then. Also, I now understand
why I couldn't make the optional arguments work, since I always left them
for last.
Do you know if it is possible to have a flexible amount of optional
arguments that appear before the last mandatory one? Say, for example
(de
On 28.02.2018 23:54, Stefano Troncaro wrote:
I need a little help again. I'm struggling to understand how one would
make a music function like \tempo, that accepts a variable number of
arguments. I couldn't find its definition so I couldn't look for myself.
So far I know about making lambdas t
I think \tempo (and a few other commands such as \repeat\alternative, \set, and
\override) are hardcoded in the Lilypond compiler using methods not accessible
through Scheme, so you can't make that kind of functions yourself. You can make
functions with optional arguments, though. I think the sy
Hello everyone,
I need a little help again. I'm struggling to understand how one would make
a music function like \tempo, that accepts a variable number of arguments.
I couldn't find its definition so I couldn't look for myself.
So far I know about making lambdas that take additional arguments an
29 matches
Mail list logo