Re: [R-SIG-Mac] Tcl/Tk issues in arm64 build of R 4.1.0

2021-09-18 Thread John Fox

Thank you Brian and Simon for fixing these problems.

Best,
 John


On 2021-09-18 2:20 a.m., Prof Brian Ripley wrote:

On 09/09/2021 19:03, John Fox wrote:

Dear Simon, Philippe, and list members,

I've encountered some Tcl/Tk-related issues with the Apple silicon 
arm64 build of R 4.1.0 for macOS. These issues affect the Rcmdr 
package, although they don't prevent it from working:


(1) Some fonts that are available for the Intel build appear to be 
missing from the arm64 build. Compare the screen shots of the Rcmdr 
main window at 
 
(Intel build) and 
 
(arm64 build). This problem is purely aesthetic.


(2) The Tcl/Tk Tktable package is apparently absent from the arm64 
build but still present in the Intel build. The Rcmdr detects its 
absence and suppresses some features (i.e., those requiring the Rcmdr 
data editor). I understand that the Tktable package is problematic and 
it may have been removed intentionally.


The Tcl/Tk Tablelist package would be a reasonable substitute, and 
were it available, I could use it to restore the missing features in 
the Rcmdr. I'm aware that Philippe Grosjean planned to incorporate 
Tablelist in his tcltk2 package, but as far as I know, that plan 
hasn't yet materialized. If I knew how to supply a Tcl/Tk package in 
an R package, I could put Tablelist directly in the Rcmdr.


Any help would be greatly appreciated.

John


To close this circle, Simon has provided

https://mac.r-project.org/libs-arm64/tcltk-8.6.11-xft-darwin20.4-arm64.pkg

If you install that, it updates Tk and adds Tktable, solving both 
problems.  (As the Tcl/Tk installation is shared between R versions, 
this will fix 4.1.0 as well as 4.1.1.  It will be incorporated in future 
releases.)







___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] Tcl/Tk issues in arm64 build of R 4.1.0

2021-09-18 Thread Prof Brian Ripley

On 09/09/2021 19:03, John Fox wrote:

Dear Simon, Philippe, and list members,

I've encountered some Tcl/Tk-related issues with the Apple silicon arm64 
build of R 4.1.0 for macOS. These issues affect the Rcmdr package, 
although they don't prevent it from working:


(1) Some fonts that are available for the Intel build appear to be 
missing from the arm64 build. Compare the screen shots of the Rcmdr main 
window at 
 
(Intel build) and 
 
(arm64 build). This problem is purely aesthetic.


(2) The Tcl/Tk Tktable package is apparently absent from the arm64 build 
but still present in the Intel build. The Rcmdr detects its absence and 
suppresses some features (i.e., those requiring the Rcmdr data editor). 
I understand that the Tktable package is problematic and it may have 
been removed intentionally.


The Tcl/Tk Tablelist package would be a reasonable substitute, and were 
it available, I could use it to restore the missing features in the 
Rcmdr. I'm aware that Philippe Grosjean planned to incorporate Tablelist 
in his tcltk2 package, but as far as I know, that plan hasn't yet 
materialized. If I knew how to supply a Tcl/Tk package in an R package, 
I could put Tablelist directly in the Rcmdr.


Any help would be greatly appreciated.

John


To close this circle, Simon has provided

https://mac.r-project.org/libs-arm64/tcltk-8.6.11-xft-darwin20.4-arm64.pkg

If you install that, it updates Tk and adds Tktable, solving both 
problems.  (As the Tcl/Tk installation is shared between R versions, 
this will fix 4.1.0 as well as 4.1.1.  It will be incorporated in future 
releases.)





--
Brian D. Ripley,  rip...@stats.ox.ac.uk
Emeritus Professor of Applied Statistics, University of Oxford

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] Tcl/Tk issues in arm64 build of R 4.1.0

2021-09-10 Thread John Fox

Dear Brian,

Thanks for this. When the Tktable package is available in the arm64 
macOS binary, I'll test it.


Best,
 John

On 2021-09-10 1:54 a.m., Prof Brian Ripley wrote:

On 09/09/2021 19:59, Prof Brian Ripley wrote:

On 09/09/2021 19:03, John Fox wrote:

Dear Simon, Philippe, and list members,


...

(2) The Tcl/Tk Tktable package is apparently absent from the arm64 
build but still present in the Intel build. The Rcmdr detects its 
absence and suppresses some features (i.e., those requiring the Rcmdr 
data editor). I understand that the Tktable package is problematic 
and it may have been removed intentionally.


https://sourceforge.net/projects/tktable/files/tktable/2.10/Tktable2.10.tar.gz 
(apparently the latest version from 2008)
does not compile against recent Tcl/Tk (8.6.11 seems to be used): it 
uses 'panic' which should be 'Tcl_Panic'.    (The Intel build appears 
to be much older, 8.6.6.)


I have a patched version: AFAICS it installs entirely into 
/opt/R/arm64/lib I could tar it up and make it available.


I could also send the patch to Simon for future use, but note that 
https://mac.r-project.org/libs-arm64/ contains an aqua build of Tcl/Tk 
(not the X11 build in the CRAN build of R 4.1.[01]) and which does not 
support Tcl/Tk.


I have put the patch and the tarball at 
https://www.stats.ox.ac.uk/pub/bdr/Tktable/ .


There is a README.txt with installation instructions. But as I have only 
one M1 Mac, they are minimally tested.




___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] Tcl/Tk issues in arm64 build of R 4.1.0

2021-09-09 Thread Prof Brian Ripley

On 09/09/2021 19:59, Prof Brian Ripley wrote:

On 09/09/2021 19:03, John Fox wrote:

Dear Simon, Philippe, and list members,


...

(2) The Tcl/Tk Tktable package is apparently absent from the arm64 
build but still present in the Intel build. The Rcmdr detects its 
absence and suppresses some features (i.e., those requiring the Rcmdr 
data editor). I understand that the Tktable package is problematic and 
it may have been removed intentionally.


https://sourceforge.net/projects/tktable/files/tktable/2.10/Tktable2.10.tar.gz 
(apparently the latest version from 2008)
does not compile against recent Tcl/Tk (8.6.11 seems to be used): it 
uses 'panic' which should be 'Tcl_Panic'.    (The Intel build appears to 
be much older, 8.6.6.)


I have a patched version: AFAICS it installs entirely into 
/opt/R/arm64/lib I could tar it up and make it available.


I could also send the patch to Simon for future use, but note that 
https://mac.r-project.org/libs-arm64/ contains an aqua build of Tcl/Tk 
(not the X11 build in the CRAN build of R 4.1.[01]) and which does not 
support Tcl/Tk.


I have put the patch and the tarball at 
https://www.stats.ox.ac.uk/pub/bdr/Tktable/ .


There is a README.txt with installation instructions. But as I have only 
one M1 Mac, they are minimally tested.


--
Brian D. Ripley,  rip...@stats.ox.ac.uk
Emeritus Professor of Applied Statistics, University of Oxford

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] Tcl/Tk issues in arm64 build of R 4.1.0

2021-09-09 Thread Philippe GROSJEAN
Dear John,

The tcltk2 package on CRAN includes tablelist version 5.5. The latest 
development version on https://github.com/SciViews/tcltk2 includes tablelist 
version 6.9. The last version of tcltk2 was not pushed to CRAN yet because many 
Tcl/Tk packages were updated to higher versions and not everything is 
completely tested today (I just recently got a Mac M1 machine for testing on 
this system).

In the meantime, since I know you really want version 6.9 of tablelist, you can 
do remotes::install_github(“SciViews/tcltk2@25df401”), or inspect the code in 
tcltk2 to see how to include a pure-Tcl package and place it in Rcmdr (it 
weights roughly 1Mb).

Best,

Philippe

..<°}))><
 ) ) ) ) )
( ( ( ( (Prof. Philippe Grosjean
 ) ) ) ) )
( ( ( ( (Numerical Ecology
 ) ) ) ) )   Mons University, Belgium
( ( ( ( (
..

On 9 Sep 2021, at 23:44, John Fox mailto:j...@mcmaster.ca>> 
wrote:


Dear Brian,

Thank you for the additional explanation.

If I understand correctly, the X11 version of Tcl/Tk will continue to be 
distributed with the R CRAN Intel and arm64 builds because it is compatible 
with R.app. If so, the simplest solution is probably to distribute the patched 
TkTable package with these builds, for backwards compatibility (perhaps not 
just for the Rcmdr package).

Your instructions for including tktablelist with the Rcmdr package seem clear, 
and I'll give that a try in case TkTable continues to be unavailable in the 
arm64 build.

Best,
John

On 2021-09-09 4:57 p.m., Prof Brian Ripley wrote:
On 09/09/2021 21:34, John Fox wrote:
Dear Brian,

Thank you for responding so quickly. Please see below:
On 2021-09-09 2:59 p.m., Prof Brian Ripley wrote:
On 09/09/2021 19:03, John Fox wrote:
Dear Simon, Philippe, and list members,

I've encountered some Tcl/Tk-related issues with the Apple silicon arm64 build 
of R 4.1.0 for macOS. These issues affect the Rcmdr package, although they 
don't prevent it from working:

(1) Some fonts that are available for the Intel build appear to be missing from 
the arm64 build. Compare the screen shots of the Rcmdr main window at 
 
(Intel build) and 
 
(arm64 build). This problem is purely aesthetic.

It would be helpful to know what those fonts are.  This is likely to be a 
fontconfig issue and needs to be debugged by name.

I query the Tk default and fixed-width fonts via

 tclvalue(.Tcl("font actual TkDefaultFont -family")
 tclvalue(.Tcl("font actual TkFixedFont -family"))

and use those -- in the past, that produced pleasing font choices on all 
platforms. In the macOS Intel build, the resulting font families are "Verdana" 
and "Andale Mono"; in the arm64 build, "helvetica" and "courier". Perhaps the 
Intel and arm64 builds were just configured differently.
Yes, I think fontconfig was, and that may help Simon dig into this.

(2) The Tcl/Tk Tktable package is apparently absent from the arm64 build but 
still present in the Intel build. The Rcmdr detects its absence and suppresses 
some features (i.e., those requiring the Rcmdr data editor). I understand that 
the Tktable package is problematic and it may have been removed intentionally.

https://sourceforge.net/projects/tktable/files/tktable/2.10/Tktable2.10.tar.gz 
(apparently the latest version from 2008)
does not compile against recent Tcl/Tk (8.6.11 seems to be used): it uses 
'panic' which should be 'Tcl_Panic'.(The Intel build appears to be much 
older, 8.6.6.)

I have a patched version: AFAICS it installs entirely into /opt/R/arm64/lib I 
could tar it up and make it available.

I could also send the patch to Simon for future use, but note that 
https://mac.r-project.org/libs-arm64/ contains an aqua build of Tcl/Tk (not the 
X11 build in the CRAN build of R 4.1.[01]) and which does not support Tcl/Tk.

I'm sorry, but I don't quite understand that -- perhaps there's a typo here? Do 
you mean to say that an aqua build of Tcl/Tk will replace the X11 build after R 
4.1.1, and that Tktable will be incompatible with it?
There was, so let me expand.
There are two Tk implementations on macOS,
- using aqua, which is included in https://mac.r-project.org/libs-arm64/
- using X11, included in the CRAN distributions of R 4.1.[01] on amd64, and 
always used for Intel. So I do not have access to the details of that build.
As I recall, TkTable does not install for the aqua implementation, but does 
(when patched) for the X11 implementation.  My recollection is that XQuartz 
became available for amd64 not long before R 4.0.0 and Simon switched to X11 
Tk, although pre-releases had aqua Tk.
If so, first, I think that an aqua Tcl/Tk would be preferable to the current 
X11 version. If I understand correctly, for example, aqua would put Tk menus 
where Mac 

Re: [R-SIG-Mac] Tcl/Tk issues in arm64 build of R 4.1.0

2021-09-09 Thread John Fox

Dear Philippe,

Thanks for getting back to me.
On 2021-09-09 10:42 p.m., Philippe GROSJEAN wrote:

Dear John,

The tcltk2 package on CRAN includes tablelist version 5.5. The latest 
development version on https://github.com/SciViews/tcltk2 
 includes tablelist version 6.9. The 
last version of tcltk2 was not pushed to CRAN yet because many Tcl/Tk 
packages were updated to higher versions and not everything is 
completely tested today (I just recently got a Mac M1 machine for 
testing on this system).


In the meantime, since I know you really want version 6.9 of tablelist, 
you can do remotes::install_github(“SciViews/tcltk2@25df401”), or 
inspect the code in tcltk2 to see how to include a pure-Tcl package and 
place it in Rcmdr (it weights roughly 1Mb).


I coincidentally found your development version of tcltk2 on GitHub and 
installed it earlier this evening.


I may do as you suggest, and temporarily incorporate tablelist directly 
in the Rcmdr package, or just wait until the newest version of tcltk2 is 
sent to CRAN. In the long run, I think that it's more maintainable not 
to duplicate in the Rcmdr resources that are provided by tcltk2.


Best,
 John



Best,

Philippe
..<°}))><
  ) ) ) ) )
( ( ( ( (    Prof. Philippe Grosjean
  ) ) ) ) )
( ( ( ( (    Numerical Ecology
  ) ) ) ) )   Mons University, Belgium
( ( ( ( (
..

On 9 Sep 2021, at 23:44, John Fox > wrote:



Dear Brian,

Thank you for the additional explanation.

If I understand correctly, the X11 version of Tcl/Tk will continue to 
be distributed with the R CRAN Intel and arm64 builds because it is 
compatible with R.app. If so, the simplest solution is probably to 
distribute the patched TkTable package with these builds, for 
backwards compatibility (perhaps not just for the Rcmdr package).


Your instructions for including tktablelist with the Rcmdr package 
seem clear, and I'll give that a try in case TkTable continues to be 
unavailable in the arm64 build.


Best,
John

On 2021-09-09 4:57 p.m., Prof Brian Ripley wrote:

On 09/09/2021 21:34, John Fox wrote:

Dear Brian,

Thank you for responding so quickly. Please see below:
On 2021-09-09 2:59 p.m., Prof Brian Ripley wrote:

On 09/09/2021 19:03, John Fox wrote:

Dear Simon, Philippe, and list members,

I've encountered some Tcl/Tk-related issues with the Apple silicon 
arm64 build of R 4.1.0 for macOS. These issues affect the Rcmdr 
package, although they don't prevent it from working:


(1) Some fonts that are available for the Intel build appear to be 
missing from the arm64 build. Compare the screen shots of the 
Rcmdr main window at 
> 
(Intel build) and 
> 
(arm64 build). This problem is purely aesthetic.


It would be helpful to know what those fonts are.  This is likely 
to be a fontconfig issue and needs to be debugged by name.


I query the Tk default and fixed-width fonts via

 tclvalue(.Tcl("font actual TkDefaultFont -family")
 tclvalue(.Tcl("font actual TkFixedFont -family"))

and use those -- in the past, that produced pleasing font choices on 
all platforms. In the macOS Intel build, the resulting font families 
are "Verdana" and "Andale Mono"; in the arm64 build, "helvetica" and 
"courier". Perhaps the Intel and arm64 builds were just configured 
differently.

Yes, I think fontconfig was, and that may help Simon dig into this.


(2) The Tcl/Tk Tktable package is apparently absent from the arm64 
build but still present in the Intel build. The Rcmdr detects its 
absence and suppresses some features (i.e., those requiring the 
Rcmdr data editor). I understand that the Tktable package is 
problematic and it may have been removed intentionally.


https://sourceforge.net/projects/tktable/files/tktable/2.10/Tktable2.10.tar.gz 
 
(apparently the latest version from 2008)
does not compile against recent Tcl/Tk (8.6.11 seems to be used): 
it uses 'panic' which should be 'Tcl_Panic'.    (The Intel build 
appears to be much older, 8.6.6.)


I have a patched version: AFAICS it installs entirely into 
/opt/R/arm64/lib I could tar it up and make it available.


I could also send the patch to Simon for future use, but note that 
https://mac.r-project.org/libs-arm64/ 
 contains an aqua build of 
Tcl/Tk (not the X11 build in the CRAN build of R 4.1.[01]) and 
which does not support Tcl/Tk.


I'm sorry, but I don't quite understand that -- perhaps there's a 
typo here? Do you mean to say that 

Re: [R-SIG-Mac] Tcl/Tk issues in arm64 build of R 4.1.0

2021-09-09 Thread John Fox



Dear Brian,

Thank you for the additional explanation.

If I understand correctly, the X11 version of Tcl/Tk will continue to be 
distributed with the R CRAN Intel and arm64 builds because it is 
compatible with R.app. If so, the simplest solution is probably to 
distribute the patched TkTable package with these builds, for backwards 
compatibility (perhaps not just for the Rcmdr package).


Your instructions for including tktablelist with the Rcmdr package seem 
clear, and I'll give that a try in case TkTable continues to be 
unavailable in the arm64 build.


Best,
 John

On 2021-09-09 4:57 p.m., Prof Brian Ripley wrote:

On 09/09/2021 21:34, John Fox wrote:

Dear Brian,

Thank you for responding so quickly. Please see below:
On 2021-09-09 2:59 p.m., Prof Brian Ripley wrote:

On 09/09/2021 19:03, John Fox wrote:

Dear Simon, Philippe, and list members,

I've encountered some Tcl/Tk-related issues with the Apple silicon 
arm64 build of R 4.1.0 for macOS. These issues affect the Rcmdr 
package, although they don't prevent it from working:


(1) Some fonts that are available for the Intel build appear to be 
missing from the arm64 build. Compare the screen shots of the Rcmdr 
main window at 
 
(Intel build) and 
 
(arm64 build). This problem is purely aesthetic.


It would be helpful to know what those fonts are.  This is likely to 
be a fontconfig issue and needs to be debugged by name.


I query the Tk default and fixed-width fonts via

 tclvalue(.Tcl("font actual TkDefaultFont -family")
 tclvalue(.Tcl("font actual TkFixedFont -family"))

and use those -- in the past, that produced pleasing font choices on 
all platforms. In the macOS Intel build, the resulting font families 
are "Verdana" and "Andale Mono"; in the arm64 build, "helvetica" and 
"courier". Perhaps the Intel and arm64 builds were just configured 
differently.


Yes, I think fontconfig was, and that may help Simon dig into this.



(2) The Tcl/Tk Tktable package is apparently absent from the arm64 
build but still present in the Intel build. The Rcmdr detects its 
absence and suppresses some features (i.e., those requiring the 
Rcmdr data editor). I understand that the Tktable package is 
problematic and it may have been removed intentionally.


https://sourceforge.net/projects/tktable/files/tktable/2.10/Tktable2.10.tar.gz 
(apparently the latest version from 2008)
does not compile against recent Tcl/Tk (8.6.11 seems to be used): it 
uses 'panic' which should be 'Tcl_Panic'.    (The Intel build appears 
to be much older, 8.6.6.)


I have a patched version: AFAICS it installs entirely into 
/opt/R/arm64/lib I could tar it up and make it available.


I could also send the patch to Simon for future use, but note that 
https://mac.r-project.org/libs-arm64/ contains an aqua build of 
Tcl/Tk (not the X11 build in the CRAN build of R 4.1.[01]) and which 
does not support Tcl/Tk.


I'm sorry, but I don't quite understand that -- perhaps there's a typo 
here? Do you mean to say that an aqua build of Tcl/Tk will replace the 
X11 build after R 4.1.1, and that Tktable will be incompatible with it?


There was, so let me expand.

There are two Tk implementations on macOS,

- using aqua, which is included in https://mac.r-project.org/libs-arm64/
- using X11, included in the CRAN distributions of R 4.1.[01] on amd64, 
and always used for Intel. So I do not have access to the details of 
that build.


As I recall, TkTable does not install for the aqua implementation, but 
does (when patched) for the X11 implementation.  My recollection is that 
XQuartz became available for amd64 not long before R 4.0.0 and Simon 
switched to X11 Tk, although pre-releases had aqua Tk.


If so, first, I think that an aqua Tcl/Tk would be preferable to the 
current X11 version. If I understand correctly, for example, aqua 
would put Tk menus where Mac users expect them.


aqua Tk does not work correctly with R.app, and is not supported by 
package tkrplot (which lots of other packages depend on).  Personally I 
usually use aqua Tk in my own builds, but then I only use R.app if 
needed to debug something.


Second, given the problems that Tktable seems to be producing, 
wouldn't it be better to make Tablelist available as a substitute? I'm 
happy to rewrite the Rcmdr data editor using Tablelist (actually, it's 
mostly done), and, as I said, if I knew how to incorporate the Tcl/Tk 
Tablelist package in the Rcmdr package (if it's undesirable simply to 
make it available generally), I'd do it.


That's your choice.  The sources are at 
https://www.nemethi.de/tablelist/tablelist6.15.tar.gz and contain a 
README.txt with a 'How to Install It?'.  At least on a Unix-alike you 
just need to unpack that into somewhere on the Tcl path.  So to 
distribute with an R package, have the  tablelist6.15 dir in inst/ and 
arrange to 

Re: [R-SIG-Mac] Tcl/Tk issues in arm64 build of R 4.1.0

2021-09-09 Thread Prof Brian Ripley

On 09/09/2021 21:34, John Fox wrote:

Dear Brian,

Thank you for responding so quickly. Please see below:
On 2021-09-09 2:59 p.m., Prof Brian Ripley wrote:

On 09/09/2021 19:03, John Fox wrote:

Dear Simon, Philippe, and list members,

I've encountered some Tcl/Tk-related issues with the Apple silicon 
arm64 build of R 4.1.0 for macOS. These issues affect the Rcmdr 
package, although they don't prevent it from working:


(1) Some fonts that are available for the Intel build appear to be 
missing from the arm64 build. Compare the screen shots of the Rcmdr 
main window at 
 
(Intel build) and 
 
(arm64 build). This problem is purely aesthetic.


It would be helpful to know what those fonts are.  This is likely to 
be a fontconfig issue and needs to be debugged by name.


I query the Tk default and fixed-width fonts via

 tclvalue(.Tcl("font actual TkDefaultFont -family")
 tclvalue(.Tcl("font actual TkFixedFont -family"))

and use those -- in the past, that produced pleasing font choices on all 
platforms. In the macOS Intel build, the resulting font families are 
"Verdana" and "Andale Mono"; in the arm64 build, "helvetica" and 
"courier". Perhaps the Intel and arm64 builds were just configured 
differently.


Yes, I think fontconfig was, and that may help Simon dig into this.



(2) The Tcl/Tk Tktable package is apparently absent from the arm64 
build but still present in the Intel build. The Rcmdr detects its 
absence and suppresses some features (i.e., those requiring the Rcmdr 
data editor). I understand that the Tktable package is problematic 
and it may have been removed intentionally.


https://sourceforge.net/projects/tktable/files/tktable/2.10/Tktable2.10.tar.gz 
(apparently the latest version from 2008)
does not compile against recent Tcl/Tk (8.6.11 seems to be used): it 
uses 'panic' which should be 'Tcl_Panic'.    (The Intel build appears 
to be much older, 8.6.6.)


I have a patched version: AFAICS it installs entirely into 
/opt/R/arm64/lib I could tar it up and make it available.


I could also send the patch to Simon for future use, but note that 
https://mac.r-project.org/libs-arm64/ contains an aqua build of Tcl/Tk 
(not the X11 build in the CRAN build of R 4.1.[01]) and which does not 
support Tcl/Tk.


I'm sorry, but I don't quite understand that -- perhaps there's a typo 
here? Do you mean to say that an aqua build of Tcl/Tk will replace the 
X11 build after R 4.1.1, and that Tktable will be incompatible with it?


There was, so let me expand.

There are two Tk implementations on macOS,

- using aqua, which is included in https://mac.r-project.org/libs-arm64/
- using X11, included in the CRAN distributions of R 4.1.[01] on amd64, 
and always used for Intel. So I do not have access to the details of 
that build.


As I recall, TkTable does not install for the aqua implementation, but 
does (when patched) for the X11 implementation.  My recollection is that 
XQuartz became available for amd64 not long before R 4.0.0 and Simon 
switched to X11 Tk, although pre-releases had aqua Tk.


If so, first, I think that an aqua Tcl/Tk would be preferable to the 
current X11 version. If I understand correctly, for example, aqua would 
put Tk menus where Mac users expect them.


aqua Tk does not work correctly with R.app, and is not supported by 
package tkrplot (which lots of other packages depend on).  Personally I 
usually use aqua Tk in my own builds, but then I only use R.app if 
needed to debug something.


Second, given the problems that Tktable seems to be producing, wouldn't 
it be better to make Tablelist available as a substitute? I'm happy to 
rewrite the Rcmdr data editor using Tablelist (actually, it's mostly 
done), and, as I said, if I knew how to incorporate the Tcl/Tk Tablelist 
package in the Rcmdr package (if it's undesirable simply to make it 
available generally), I'd do it.


That's your choice.  The sources are at 
https://www.nemethi.de/tablelist/tablelist6.15.tar.gz and contain a 
README.txt with a 'How to Install It?'.  At least on a Unix-alike you 
just need to unpack that into somewhere on the Tcl path.  So to 
distribute with an R package, have the  tablelist6.15 dir in inst/ and 
arrange to add the installed location to the Tcl search path with 
tcltk::addTclPath() .  (I don't see why Windows would be different.)



--
Brian D. Ripley,  rip...@stats.ox.ac.uk
Emeritus Professor of Applied Statistics, University of Oxford

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] Tcl/Tk issues in arm64 build of R 4.1.0

2021-09-09 Thread John Fox

Dear Brian,

Thank you for responding so quickly. Please see below:
On 2021-09-09 2:59 p.m., Prof Brian Ripley wrote:

On 09/09/2021 19:03, John Fox wrote:

Dear Simon, Philippe, and list members,

I've encountered some Tcl/Tk-related issues with the Apple silicon 
arm64 build of R 4.1.0 for macOS. These issues affect the Rcmdr 
package, although they don't prevent it from working:


(1) Some fonts that are available for the Intel build appear to be 
missing from the arm64 build. Compare the screen shots of the Rcmdr 
main window at 
 
(Intel build) and 
 
(arm64 build). This problem is purely aesthetic.


It would be helpful to know what those fonts are.  This is likely to be 
a fontconfig issue and needs to be debugged by name.


I query the Tk default and fixed-width fonts via

tclvalue(.Tcl("font actual TkDefaultFont -family")
tclvalue(.Tcl("font actual TkFixedFont -family"))

and use those -- in the past, that produced pleasing font choices on all 
platforms. In the macOS Intel build, the resulting font families are 
"Verdana" and "Andale Mono"; in the arm64 build, "helvetica" and 
"courier". Perhaps the Intel and arm64 builds were just configured 
differently.




(2) The Tcl/Tk Tktable package is apparently absent from the arm64 
build but still present in the Intel build. The Rcmdr detects its 
absence and suppresses some features (i.e., those requiring the Rcmdr 
data editor). I understand that the Tktable package is problematic and 
it may have been removed intentionally.


https://sourceforge.net/projects/tktable/files/tktable/2.10/Tktable2.10.tar.gz 
(apparently the latest version from 2008)
does not compile against recent Tcl/Tk (8.6.11 seems to be used): it 
uses 'panic' which should be 'Tcl_Panic'.    (The Intel build appears to 
be much older, 8.6.6.)


I have a patched version: AFAICS it installs entirely into 
/opt/R/arm64/lib I could tar it up and make it available.


I could also send the patch to Simon for future use, but note that 
https://mac.r-project.org/libs-arm64/ contains an aqua build of Tcl/Tk 
(not the X11 build in the CRAN build of R 4.1.[01]) and which does not 
support Tcl/Tk.


I'm sorry, but I don't quite understand that -- perhaps there's a typo 
here? Do you mean to say that an aqua build of Tcl/Tk will replace the 
X11 build after R 4.1.1, and that Tktable will be incompatible with it?


If so, first, I think that an aqua Tcl/Tk would be preferable to the 
current X11 version. If I understand correctly, for example, aqua would 
put Tk menus where Mac users expect them.


Second, given the problems that Tktable seems to be producing, wouldn't 
it be better to make Tablelist available as a substitute? I'm happy to 
rewrite the Rcmdr data editor using Tablelist (actually, it's mostly 
done), and, as I said, if I knew how to incorporate the Tcl/Tk Tablelist 
package in the Rcmdr package (if it's undesirable simply to make it 
available generally), I'd do it.


Best,
 John








___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] Tcl/Tk issues in arm64 build of R 4.1.0

2021-09-09 Thread Prof Brian Ripley

On 09/09/2021 19:03, John Fox wrote:

Dear Simon, Philippe, and list members,

I've encountered some Tcl/Tk-related issues with the Apple silicon arm64 
build of R 4.1.0 for macOS. These issues affect the Rcmdr package, 
although they don't prevent it from working:


(1) Some fonts that are available for the Intel build appear to be 
missing from the arm64 build. Compare the screen shots of the Rcmdr main 
window at 
 
(Intel build) and 
 
(arm64 build). This problem is purely aesthetic.


It would be helpful to know what those fonts are.  This is likely to be 
a fontconfig issue and needs to be debugged by name.


(2) The Tcl/Tk Tktable package is apparently absent from the arm64 build 
but still present in the Intel build. The Rcmdr detects its absence and 
suppresses some features (i.e., those requiring the Rcmdr data editor). 
I understand that the Tktable package is problematic and it may have 
been removed intentionally.


https://sourceforge.net/projects/tktable/files/tktable/2.10/Tktable2.10.tar.gz 
(apparently the latest version from 2008)
does not compile against recent Tcl/Tk (8.6.11 seems to be used): it 
uses 'panic' which should be 'Tcl_Panic'.(The Intel build appears to 
be much older, 8.6.6.)


I have a patched version: AFAICS it installs entirely into 
/opt/R/arm64/lib I could tar it up and make it available.


I could also send the patch to Simon for future use, but note that 
https://mac.r-project.org/libs-arm64/ contains an aqua build of Tcl/Tk 
(not the X11 build in the CRAN build of R 4.1.[01]) and which does not 
support Tcl/Tk.





--
Brian D. Ripley,  rip...@stats.ox.ac.uk
Emeritus Professor of Applied Statistics, University of Oxford

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


[R-SIG-Mac] Tcl/Tk issues in arm64 build of R 4.1.0

2021-09-09 Thread John Fox

Dear Simon, Philippe, and list members,

I've encountered some Tcl/Tk-related issues with the Apple silicon arm64 
build of R 4.1.0 for macOS. These issues affect the Rcmdr package, 
although they don't prevent it from working:


(1) Some fonts that are available for the Intel build appear to be 
missing from the arm64 build. Compare the screen shots of the Rcmdr main 
window at 
 
(Intel build) and 
 
(arm64 build). This problem is purely aesthetic.


(2) The Tcl/Tk Tktable package is apparently absent from the arm64 build 
but still present in the Intel build. The Rcmdr detects its absence and 
suppresses some features (i.e., those requiring the Rcmdr data editor). 
I understand that the Tktable package is problematic and it may have 
been removed intentionally.


The Tcl/Tk Tablelist package would be a reasonable substitute, and were 
it available, I could use it to restore the missing features in the 
Rcmdr. I'm aware that Philippe Grosjean planned to incorporate Tablelist 
in his tcltk2 package, but as far as I know, that plan hasn't yet 
materialized. If I knew how to supply a Tcl/Tk package in an R package, 
I could put Tablelist directly in the Rcmdr.


Any help would be greatly appreciated.

John

--
John Fox, Professor Emeritus
McMaster University
Hamilton, Ontario, Canada
web: https://socialsciences.mcmaster.ca/jfox/

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac