Re: GUB failing

2020-07-12 Thread Dan Eble
On Jul 12, 2020, at 11:09, Jonas Hahnfeld  wrote:
> 
> Dan, ok to do the following? (I'd push directly to release/unstable…)
...
> -  auto operator * () const->decltype (from_scm (dereference_scm ()))
> +  // (Explicit 'this' in trailing decltype needed because of bug in GCC, see
> +  // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57543)
> +  auto operator * () const->decltype (from_scm (this->dereference_scm ()))

LGTM
— 
Dan





Re: GUB failing

2020-07-12 Thread Jonas Hahnfeld
Am Sonntag, den 12.07.2020, 13:46 +0100 schrieb Phil Holmes:
> Getting this error:
> 
> /home/gub/NewGub/gub/target/linux-64/src/lilypond-git.sv.gnu.org--lilypond.git-release-unstable/lily/include/ly-scm-list.hh:166:69:
>  
> error: cannot call member function 'ly_scm_iterator_t allow_mutation>::private_scm& ly_scm_iterator_t allow_mutation>::dereference_scm() const [with T = const Book*; bool 
> allow_mutation = true; ly_scm_iterator_t::private_scm = 
> scm_unused_struct*]' without object
> make[1]: *** [out/book.o] Error 1

See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57543, which we can
also use as a workaround. (Note that there appear to be quite some bugs
with decltype in trailing return types with old compiler versions and
support for member functions was only voted very late in the process to
C++11, see https://stackoverflow.com/a/5159293/10606944).

Dan, ok to do the following? (I'd push directly to release/unstable...)
---
commit 533d40176adbf6ee03b207db16f460736eae367a (HEAD -> fix-decltype-gcc)
Author: Jonas Hahnfeld 
Date:   Sun Jul 12 17:05:28 2020 +0200

Fix trailing return type for old GCC

GCC 4.9.4 complains that it "cannot call member function
dereference_scm() without object" which appears to be a bug, see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57543. Work around
this issue by adding an explicit 'this' for the member call.

diff --git a/lily/include/ly-scm-list.hh b/lily/include/ly-scm-list.hh
index 5d6fb03ee8..959bc9bb67 100644
--- a/lily/include/ly-scm-list.hh
+++ b/lily/include/ly-scm-list.hh
@@ -163,7 +163,9 @@ public:
   // operator * takes no parameters.  TODO: It might be possible to provide a
   // uniform fallback value as a parameter of the list template.
   //
-  auto operator * () const->decltype (from_scm (dereference_scm ()))
+  // (Explicit 'this' in trailing decltype needed because of bug in GCC, see
+  // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57543)
+  auto operator * () const->decltype (from_scm (this->dereference_scm ()))
   {
 return from_scm (dereference_scm ());
   }


signature.asc
Description: This is a digitally signed message part


GUB failing

2020-07-12 Thread Phil Holmes

Getting this error:

/home/gub/NewGub/gub/target/linux-64/src/lilypond-git.sv.gnu.org--lilypond.git-release-unstable/lily/include/ly-scm-list.hh:166:69: 
error: cannot call member function 'ly_scm_iterator_tallow_mutation>::private_scm& ly_scm_iterator_tallow_mutation>::dereference_scm() const [with T = const Book*; bool 
allow_mutation = true; ly_scm_iterator_t::private_scm = 
scm_unused_struct*]' without object

make[1]: *** [out/book.o] Error 1


--
Phil Holmes





Re: NR pdf is larger with current git by 15%

2020-07-12 Thread Masamichi Hosoda
>> `selectdevice` does `setdevice` and then `.setdefaultscreen`.
>> If we use only `setdevice`, then `.setdefaultscreen` is not done.
> 
> Aha. So should we just call .setdefaultscreen ourselves? (calling
> "[...] setdevice (pdfwrite) finddevice setdevice" is duplicate) Looks
> like it was introduced long ago, so we can safely rely on it.

It seems that `.setdefaultscreen` is not described
at current Ghostscript documents.
Ghostscript sometimes removes old or undocumented features,
so it's better not to use them in my humble opinion.
e.g. https://ghostscript.com/pipermail/gs-devel/2020-May/010295.html

To avoid duplicate `setdevice`, we can do the following.

```
mark [...snip...] (pdfwrite) finddevice putdeviceprops pop (pdfwrite) 
selectdevice
```

I've created merge request !242.



Re: NR pdf is larger with current git by 15%

2020-07-12 Thread Jonas Hahnfeld
Am Sonntag, den 12.07.2020, 18:57 +0900 schrieb Masamichi Hosoda:
> >>> I've found the documented way to specify Ghostscript devices
> >>> without `-sDEVICE=pdfwrite`.  It is using the operator
> >>> `selectdevice`.
> > 
> > Thanks for investigating.  The main question remains why gs produces
> > suboptimal results without `selectdevice`.
> 
> `selectdevice` is defined in gs_init.ps as follows.
> 
> ```
> /selectdevice
> { finddevice setdevice .setdefaultscreen } bind def
> ```
> 
> `selectdevice` does `setdevice` and then `.setdefaultscreen`.
> If we use only `setdevice`, then `.setdefaultscreen` is not done.

Aha. So should we just call .setdefaultscreen ourselves? (calling
"[...] setdevice (pdfwrite) finddevice setdevice" is duplicate) Looks
like it was introduced long ago, so we can safely rely on it.

Jonas

> I've found that `.setdefaultscreen` is described here.
> https://www.ghostscript.com/doc/current/History3.htm#V3.61_Interpreter
> 
> 
> Here's a quote.
> 
> -
> Defines a .setdefaultscreen procedure that sets the default halftone screen,
> transfer function, and stroke adjustment for the current device.  Changes
> selectdevice and setpagedevice so that they call .setdefaultscreen;
> setpagedevice calls .setdefaultscreen before calling the Install procedure,
> so that Install can set different parameters if it wishes.  Note that
> setdevice does not do this.  (gs_init.ps, gs_setpd.ps)
> -
> 
> It seems to set some defaults for the current device.
> 
> This means that if we use only `setdevice`, those defaults are not set.
> In that case, many drawing operators need to be written,
> including the defaults that can be omitted if I understand correctly.
> 


signature.asc
Description: This is a digitally signed message part


Re: NR pdf is larger with current git by 15%

2020-07-12 Thread Masamichi Hosoda
>>> I've found the documented way to specify Ghostscript devices
>>> without `-sDEVICE=pdfwrite`.  It is using the operator
>>> `selectdevice`.
> 
> Thanks for investigating.  The main question remains why gs produces
> suboptimal results without `selectdevice`.

`selectdevice` is defined in gs_init.ps as follows.

```
/selectdevice
{ finddevice setdevice .setdefaultscreen } bind def
```

`selectdevice` does `setdevice` and then `.setdefaultscreen`.
If we use only `setdevice`, then `.setdefaultscreen` is not done.

I've found that `.setdefaultscreen` is described here.
https://www.ghostscript.com/doc/current/History3.htm#V3.61_Interpreter

Here's a quote.

-
Defines a .setdefaultscreen procedure that sets the default halftone screen,
transfer function, and stroke adjustment for the current device.  Changes
selectdevice and setpagedevice so that they call .setdefaultscreen;
setpagedevice calls .setdefaultscreen before calling the Install procedure,
so that Install can set different parameters if it wishes.  Note that
setdevice does not do this.  (gs_init.ps, gs_setpd.ps)
-

It seems to set some defaults for the current device.

This means that if we use only `setdevice`, those defaults are not set.
In that case, many drawing operators need to be written,
including the defaults that can be omitted if I understand correctly.



PATCHES - Countdown for July 12th

2020-07-12 Thread James Lowe

Hello,

Here is the current patch countdown list. The next countdown will be on 
July 14th.


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


 Push:

!231 Update authors.itexi - Jonas Hahnfeld
https://gitlab.com/lilypond/lilypond/-/merge_requests/231

!230 musicxml2ly: Bar check only before first note - Jonas Hahnfeld
https://gitlab.com/lilypond/lilypond/-/merge_requests/230


 Countdown:

!238 doc: Fix @funindex entries with both `foo` and `\foo` - Werner Lemberg
https://gitlab.com/lilypond/lilypond/-/merge_requests/238

!237 extract_texi_filenames: remove warning about non-existent 
directories - Han-Wen Nienhuys

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

!236 Build website from Gitlab CI. - Han-Wen Nienhuys
https://gitlab.com/lilypond/lilypond/-/merge_requests/236

!234 lilypond-book: Allow spaces in directory name - Werner Lemberg
https://gitlab.com/lilypond/lilypond/-/merge_requests/234

!233 Emmentaler-brace: do not write temporary afm files - Michael Käppler
https://gitlab.com/lilypond/lilypond/-/merge_requests/233


 Review:

!241 Add media{} macro - Han-Wen Nienhuys
https://gitlab.com/lilypond/lilypond/-/merge_requests/241

!240 Music_iterator: get_own_context and set_own_context - Dan Eble
https://gitlab.com/lilypond/lilypond/-/merge_requests/240


 New:

No patches in New at this time.


 Waiting:

!223 Clean up and annotate postprocess_html.py - Han-Wen Nienhuys
https://gitlab.com/lilypond/lilypond/-/merge_requests/223

!204 Move parallel processing to lilypond-book - Han-Wen Nienhuys
https://gitlab.com/lilypond/lilypond/-/merge_requests/204

!202 Fix xrefs in learning manual - Han-Wen Nienhuys
https://gitlab.com/lilypond/lilypond/-/merge_requests/202

!200 Add snippet translations - Han-Wen Nienhuys
https://gitlab.com/lilypond/lilypond/-/merge_requests/200





***

Regards,

James