PATCHES - Countdown to September 5

2022-09-02 Thread Colin Campbell

Here is the current countdown report.

The next countdown will begin on September 5th.

A list of all merge requests can be found here:
https://gitlab.com/lilypond/lilypond/-/merge_requests?sort=label_priority


 Push:

No patches in Push at this time.


 Countdown:

!1593 Add 'outsidecomma and 'upbow breath mark types - Dan Eble
https://gitlab.com/lilypond/lilypond/-/merge_requests/1593

!1592 Remove general_pushpop_property (dead code) - Dan Eble
https://gitlab.com/lilypond/lilypond/-/merge_requests/1592


 Review:

!1597 Define from_scm, to_scm and is_scm on std::string - Jean Abou Samra
https://gitlab.com/lilypond/lilypond/-/merge_requests/1597

!1596 doc: reference fixes and formatting - Werner Lemberg
https://gitlab.com/lilypond/lilypond/-/merge_requests/1596

!1594 musicxml2ly: use \caesura command - Dan Eble
https://gitlab.com/lilypond/lilypond/-/merge_requests/1594

!1591 Enforce at most one instance of a translator type per context - 
Jean Abou Samra

https://gitlab.com/lilypond/lilypond/-/merge_requests/1591

!1590 Define and use ly_list - Jean Abou Samra
https://gitlab.com/lilypond/lilypond/-/merge_requests/1590

!1588 Add list of bar lines in an NR appendix (redux) - Jean Abou Samra
https://gitlab.com/lilypond/lilypond/-/merge_requests/1588

!1587 In MIDI, render lyric underties using Unicode undertie U+203F - 
Jean Abou Samra

https://gitlab.com/lilypond/lilypond/-/merge_requests/1587

!1544 Misc. minor output-distance cleanups - Jean Abou Samra
https://gitlab.com/lilypond/lilypond/-/merge_requests/1544


 New:

No patches in New at this time.


 Waiting:

!1578 New margins by default - Martín Rincón Botero
https://gitlab.com/lilypond/lilypond/-/merge_requests/1578


Cheers,

Colin




Re: A more automated LY_DEFINE?

2022-09-02 Thread Dan Eble
On Sep 2, 2022, at 04:42, Jean Abou Samra  wrote:
> 
> Does C++ provide tools for making this simpler? I'm thinking that something 
> like
> 
> LY_DEFINE (ly_grob_relative_coordinate, ..., (Grob *g, Grob *refp, Axis a), 
> ...)
> {
>   ...
>   return ret;
> }
> 
> would be equivalent to
> 
> LY_DEFINE (ly_grob_relative_coordinate, ..., (SCM g_scm, SCM refp_scm, SCM 
> axis_scm), ...)
> {
>   auto *const g = LY_ASSERT_SMOB (Grob, g_scm, 1);
>   auto *const refp = LY_ASSERT_SMOB (Grob, refp_scm, 2);
>   LY_ASSERT_TYPE (is_scm, axis_scm, 3);
>   Axis a = from_scm (axis_scm);
>   ...
>   return to_scm (ret);
> }

This has been on my wish list for a while, which is why it is currently 
possible to pass overloaded functions to macros such as LY_DEFINE, and 
hand-code the function as a SCM function wrapping another function.  I suspect 
that David had similar thoughts when he created from_scm() and to_scm().


> I might be willing to spend time on it in the future, although not very soon.
> 
> If it is not feasible, being told it before I try could save me time. I'm
> not yet very familiar with C++ templating techniques.

It's hard to give any assurance about complicated problems one doesn't do every 
day.  I can confidently predict that the experience will involve an instance of 
trying something obvious that doesn't work and learning that it requires a more 
recent version of C++.

I don't want to discourage you, but this is a good thing to attempt when you're 
prepared for a steep learning curve and possible failure.
— 
Dan




Re: A more automated LY_DEFINE?

2022-09-02 Thread Jean Abou Samra




Le 02/09/2022 à 13:17, Dan Eble a écrit :

On Sep 2, 2022, at 04:42, Jean Abou Samra  wrote:

Does C++ provide tools for making this simpler? I'm thinking that something like

LY_DEFINE (ly_grob_relative_coordinate, ..., (Grob *g, Grob *refp, Axis a), ...)
{
   ...
   return ret;
}

would be equivalent to

LY_DEFINE (ly_grob_relative_coordinate, ..., (SCM g_scm, SCM refp_scm, SCM 
axis_scm), ...)
{
   auto *const g = LY_ASSERT_SMOB (Grob, g_scm, 1);
   auto *const refp = LY_ASSERT_SMOB (Grob, refp_scm, 2);
   LY_ASSERT_TYPE (is_scm, axis_scm, 3);
   Axis a = from_scm (axis_scm);
   ...
   return to_scm (ret);
}

This has been on my wish list for a while, which is why it is currently 
possible to pass overloaded functions to macros such as LY_DEFINE, and 
hand-code the function as a SCM function wrapping another function.  I suspect 
that David had similar thoughts when he created from_scm() and to_scm().


I might be willing to spend time on it in the future, although not very soon.

If it is not feasible, being told it before I try could save me time. I'm
not yet very familiar with C++ templating techniques.

It's hard to give any assurance about complicated problems one doesn't do every 
day.  I can confidently predict that the experience will involve an instance of 
trying something obvious that doesn't work and learning that it requires a more 
recent version of C++.

I don't want to discourage you, but this is a good thing to attempt when you're 
prepared for a steep learning curve and possible failure.




OK, thank you, I have been warned. I'll only attempt it if one day I
feel particularly bold.

Cheers,
Jean




A more automated LY_DEFINE?

2022-09-02 Thread Jean Abou Samra

Hi,

Right now, the most common pattern for a LY_DEFINE is somewhat repetitive:

LY_DEFINE (ly_name, "ly:name",
   req, opt, var, (SCM arg1, SCM arg2, ...),
   R"(doc...)")
{
  LY_ASSERT_TYPE (is_scm (arg1), 1);
  Cpp_type arg1_cpp = from_scm (arg1);
  auto *const smob = LY_ASSERT_SMOB (Smob_type, arg2, 2);
  // process the arguments ...
  return to_scm (result);
}


We have this really all over the code base.

Does C++ provide tools for making this simpler? I'm thinking that 
something like


LY_DEFINE (ly_grob_relative_coordinate, ..., (Grob *g, Grob *refp, Axis 
a), ...)

{
  ...
  return ret;
}

would be equivalent to

LY_DEFINE (ly_grob_relative_coordinate, ..., (SCM g_scm, SCM refp_scm, 
SCM axis_scm), ...)

{
  auto *const g = LY_ASSERT_SMOB (Grob, g_scm, 1);
  auto *const refp = LY_ASSERT_SMOB (Grob, refp_scm, 2);
  LY_ASSERT_TYPE (is_scm, axis_scm, 3);
  Axis a = from_scm (axis_scm);
  ...
  return to_scm (ret);
}


If this is feasible, I might be willing to spend time on it in the future,
although not very soon.

If it is not feasible, being told it before I try could save me time. I'm
not yet very familiar with C++ templating techniques.

Thanks,
Jean