Re: svn 1350 "fix dyadic ¨ with 1-element arguments"

2020-12-09 Thread Dr . Jürgen Sauermann

  
  
Hi Bill,
  
  thanks, fixed in SVN 1371.
  
  Best Regards,
  Jürgen
  

On 12/9/20 4:24 AM, Bill Heagy wrote:

Before
  this change: 
    ⍴⍴(1 2)+¨⊂ 3 4 5 
  1 
    ⍴⍴(,2)+¨⊂ 3 4 5 
  1 
  
  which is what I expected. 
  
  After the change: 
    ⍴⍴(1 2)+¨⊂ 3 4 5 
  1 
    ⍴⍴(,2)+¨⊂ 3 4 5 
  0 
  
  I don't know if the change for a 1-element vector compared to,
  say, a 2-element vector was intended.  (debian, various versions)
  
  


  




Quad FIO[56] fails writing apl chars

2020-12-09 Thread Hans-Peter Sorge

Hi,

⍝ This writes apl chars
  some_apl_chars ← '¨¯⍒⍋⌽⍉⊖≠∨∧\⌹@⍵∊⍴t↑↓⍳○p←~'
  fh←'w' ⎕FIO[3] ''
  some_apl_chars ⎕FIO[43] fh
60
  ⎕FIO[4] fh
0

⍝ This returns them:
  ⎕FIO[49] ''
 ¨¯⍒⍋⌽⍉⊖≠∨∧\⌹@⍵∊⍴t↑↓⍳○p←~


⍝ I did not notice so far that ⎕FIO[56] fails in writing APL characters:
⍝ Is this a bug or am I missing some Docu?
  (⊂ some_apl_chars) ⎕FIO[56] ''
25

  ⎕FIO[49] ''
 􀂨􀂯RK=I􀂖`('\9@u tt􀂑􀂓s􀃋p􀂐~


Best Regards
Hans-Peter


Offending token

2020-12-09 Thread Hans-Peter Sorge

Hi,

⍝ as expected:

  ∇FUN
[1] →←∇
  FUN
SYNTAX ERROR
FUN[1]  →←
    ^^


⍝ Just came up in a typo:

  ∇FUN
[2] [1]   →NEXTLINE:
[2] NEXTLINE:
[3] ∇
Line 1
Offending token: (tag > TC_MAX_PERM) 0x43030019 :
Statement: `→  `'NEXTLINE  `:
DEFN ERROR+
  ∇FUN
 ^

⍝ The changes get lost:
  ∇FUN[⎕]
    ∇
[0]   FUN
[1]   →←
    ∇
[2]

Best Regards
Hans-Peter




Re: svn 1350 "fix dyadic ¨ with 1-element arguments"

2020-12-09 Thread Bill Heagy

Looks good.  Thank you for all your work on this.

Bill

On 12/9/20 7:04 AM, Dr. Jürgen Sauermann wrote:

Hi Bill,

thanks, fixed in SVN 1371.

Best Regards,
Jürgen


On 12/9/20 4:24 AM, Bill Heagy wrote:

Before this change:
  ⍴⍴(1 2)+¨⊂ 3 4 5
1
  ⍴⍴(,2)+¨⊂ 3 4 5
1

which is what I expected.

After the change:
  ⍴⍴(1 2)+¨⊂ 3 4 5
1
  ⍴⍴(,2)+¨⊂ 3 4 5
0

I don't know if the change for a 1-element vector compared to, say, a 
2-element vector was intended.  (debian, various versions)








Build 1371: lots of warnings on Mac OS X

2020-12-09 Thread Louis Chretien via Bugs and suggestions for GNU APL
Building the latest SVN 1371 on Mac OS X, I get a ton of warnings, although the 
make seems to complete normally.

Here is a sample (not all warnings are here):

Making all in workspaces
make[3]: Nothing to be done for `all'.
g++ -DHAVE_CONFIG_H -I. -I..-Wall -I sql -g -O2 -MT apl-main.o -MD 
-MP -MF .deps/apl-main.Tpo -c -o apl-main.o `test -f 'main.cc' || echo 
'./'`main.cc
In file included from main.cc:42:
In file included from ./Workspace.hh:27:
In file included from ./PrimitiveOperator.hh:25:
In file included from ./StateIndicator.hh:25:
./DerivedFunction.hh:56:9: warning: 'DerivedFunction::destroy' hides overloaded 
virtual function [-Woverloaded-virtual]
   void destroy(const char * loc);
^
./Function.hh:229:17: note: hidden overloaded virtual function 
'Function::destroy' declared here: different number of parameters
  (0 vs 1)
   virtual void destroy() {}
^
1 warning generated.
mv -f .deps/apl-main.Tpo .deps/apl-main.Po
g++ -DHAVE_CONFIG_H -I. -I..-Wall -I sql -g -O2 -MT apl-Plot_xcb.o 
-MD -MP -MF .deps/apl-Plot_xcb.Tpo -c -o apl-Plot_xcb.o `test -f 'Plot_xcb.cc' 
|| echo './'`Plot_xcb.cc
mv -f .deps/apl-Plot_xcb.Tpo .deps/apl-Plot_xcb.Po
g++ -DHAVE_CONFIG_H -I. -I..-Wall -I sql -g -O2 -MT apl-Archive.o 
-MD -MP -MF .deps/apl-Archive.Tpo -c -o apl-Archive.o `test -f 'Archive.cc' || 
echo './'`Archive.cc
In file included from Archive.cc:29:
In file included from ./Archive.hh:31:
In file included from ./Workspace.hh:27:
In file included from ./PrimitiveOperator.hh:25:
In file included from ./StateIndicator.hh:25:
./DerivedFunction.hh:56:9: warning: 'DerivedFunction::destroy' hides overloaded 
virtual function [-Woverloaded-virtual]
   void destroy(const char * loc);
^
./Function.hh:229:17: note: hidden overloaded virtual function 
'Function::destroy' declared here: different number of parameters
  (0 vs 1)
   virtual void destroy() {}
^
Archive.cc:1992:25: warning: result of comparison of constant -1 with 
expression of type 'const TokenTag' is always true
  [-Wtautological-constant-out-of-range-compare]
   Assert(primitive_tag != -1);
  ~ ^  ~~
./Assert.hh:45:26: note: expanded from macro 'Assert'
#define Assert(x)  if (!(x))   do_Assert(#x, __FUNCTION__, __FILE__, __LINE__)
 ^
Archive.cc:2004:15: warning: result of comparison of constant -1 with 
expression of type 'const Macro::Macro_num' is always true
  [-Wtautological-constant-out-of-range-compare]
   if (macnum != -1)   // function is a macro
   ~~ ^  ~~
Archive.cc:2014:22: warning: result of comparison of constant -1 with 
expression of type 'const TokenTag' is always true
  [-Wtautological-constant-out-of-range-compare]
   if (primitive_tag != -1)   // function is an APL primitive
   ~ ^  ~~
4 warnings generated.
mv -f .deps/apl-Archive.Tpo .deps/apl-Archive.Po
g++ -DHAVE_CONFIG_H -I. -I..-Wall -I sql -g -O2 -MT apl-Assert.o 
-MD -MP -MF .deps/apl-Assert.Tpo -c -o apl-Assert.o `test -f 'Assert.cc' || 
echo './'`Assert.cc
In file included from Assert.cc:28:
In file included from ./Workspace.hh:27:
In file included from ./PrimitiveOperator.hh:25:
In file included from ./StateIndicator.hh:25:
./DerivedFunction.hh:56:9: warning: 'DerivedFunction::destroy' hides overloaded 
virtual function [-Woverloaded-virtual]
   void destroy(const char * loc);
^
./Function.hh:229:17: note: hidden overloaded virtual function 
'Function::destroy' declared here: different number of parameters
  (0 vs 1)
   virtual void destroy() {}
^
1 warning generated.
mv -f .deps/apl-Assert.Tpo .deps/apl-Assert.Po
g++ -DHAVE_CONFIG_H -I. -I..-Wall -I sql -g -O2 -MT apl-Avec.o -MD 
-MP -MF .deps/apl-Avec.Tpo -c -o apl-Avec.o `test -f 'Avec.cc' || echo 
'./'`Avec.cc
mv -f .deps/apl-Avec.Tpo .deps/apl-Avec.Po
g++ -DHAVE_CONFIG_H -I. -I..-Wall -I sql -g -O2 -MT apl-Backtrace.o 
-MD -MP -MF .deps/apl-Backtrace.Tpo -c -o apl-Backtrace.o `test -f 
'Backtrace.cc' || echo './'`Backtrace.cc
mv -f .deps/apl-Backtrace.Tpo .deps/apl-Backtrace.Po
g++ -DHAVE_CONFIG_H -I. -I..-Wall -I sql -g -O2 -MT 
apl-Bif_F12_COMMA.o -MD -MP -MF .deps/apl-Bif_F12_COMMA.Tpo -c -o 
apl-Bif_F12_COMMA.o `test -f 'Bif_F12_COMMA.cc' || echo './'`Bif_F12_COMMA.cc
In file included from Bif_F12_COMMA.cc:22:
In file included from ./Workspace.hh:27:
In file included from ./PrimitiveOperator.hh:25:
In file included from ./StateIndicator.hh:25:
./DerivedFunction.hh:56:9: warning: 'DerivedFunction::destroy' hides overloaded 
virtual function [-Woverloaded-virtual]
   void destroy(const char * loc);
^
./Function.hh:229:17: note: hidden overloaded virtual function 
'Function::destroy' declared here: different number of parameters
  (0 vs 1)
   virtual void destroy() {}
^
1 warning generated.
mv -f .deps/apl-Bif_F12_COMMA.Tpo .deps/apl-Bif_F12_COMMA

Re: Quad FIO[56] fails writing apl chars

2020-12-09 Thread Dr . Jürgen Sauermann

  
  
Hi Hans-Peter,
  
  thanks, fixed in SVN 1372.
  
  Best Regards,
  Jürgen
  

On 12/9/20 2:32 PM, Hans-Peter Sorge
  wrote:

Hi,
  
  
  ⍝ This writes apl chars
  
    some_apl_chars ← '¨¯⍒⍋⌽⍉⊖≠∨∧\⌹@⍵∊⍴t↑↓⍳○p←~'
  
    fh←'w' ⎕FIO[3] ''
  
    some_apl_chars ⎕FIO[43] fh
  
  60
  
    ⎕FIO[4] fh
  
  0
  
  
  ⍝ This returns them:
  
    ⎕FIO[49] ''
  
   ¨¯⍒⍋⌽⍉⊖≠∨∧\⌹@⍵∊⍴t↑↓⍳○p←~
  
  
  
  ⍝ I did not notice so far that ⎕FIO[56] fails in writing APL
  characters:
  
  ⍝ Is this a bug or am I missing some Docu?
  
    (⊂ some_apl_chars) ⎕FIO[56] ''
  
  25
  
  
    ⎕FIO[49] ''
  
   􀂨􀂯RK=I􀂖`('\9@u tt􀂑􀂓s􀃋p􀂐~
  
  
  
  Best Regards
  
  Hans-Peter
  


  




Re: Build 1371: lots of warnings on Mac OS X

2020-12-09 Thread Dr . Jürgen Sauermann

  
  
Hi Louis,
  
  thanks, I have fixed some of them, please let me know if there are
  more remaining.
  SVN 1373.
  
  Best Regards,
  Jürgen
  
  

On 12/9/20 8:58 PM, Louis Chretien via
  Bugs and suggestions for GNU APL wrote:


  
  Building the latest SVN 1371 on Mac OS X, I get a ton of warnings,
  although the make seems to complete normally.
  
  
  Here is a sample (not all warnings are here):
  
  
  
Making
all in workspaces
make[3]:
Nothing to be done for `all'.
g++
-DHAVE_CONFIG_H -I. -I..    -Wall -I sql         -g -O2 -MT
apl-main.o -MD -MP -MF .deps/apl-main.Tpo -c -o apl-main.o
`test -f 'main.cc' || echo './'`main.cc
In
file included from main.cc:42:
In
file included from ./Workspace.hh:27:
In
file included from ./PrimitiveOperator.hh:25:
In
file included from ./StateIndicator.hh:25:
./DerivedFunction.hh:56:9:
warning: 'DerivedFunction::destroy' hides overloaded virtual
function [-Woverloaded-virtual]
  
void destroy(const char * loc);
 
      ^
./Function.hh:229:17:
note: hidden overloaded virtual function 'Function::destroy'
declared here: different number of parameters
 
    (0 vs 1)
  
virtual void destroy() {}
 
              ^
1
warning generated.
mv
-f .deps/apl-main.Tpo .deps/apl-main.Po
g++
-DHAVE_CONFIG_H -I. -I..    -Wall -I sql         -g -O2 -MT
apl-Plot_xcb.o -MD -MP -MF .deps/apl-Plot_xcb.Tpo -c -o
apl-Plot_xcb.o `test -f 'Plot_xcb.cc' || echo
'./'`Plot_xcb.cc
mv
-f .deps/apl-Plot_xcb.Tpo .deps/apl-Plot_xcb.Po
g++
-DHAVE_CONFIG_H -I. -I..    -Wall -I sql         -g -O2 -MT
apl-Archive.o -MD -MP -MF .deps/apl-Archive.Tpo -c -o
apl-Archive.o `test -f 'Archive.cc' || echo './'`Archive.cc
In
file included from Archive.cc:29:
In
file included from ./Archive.hh:31:
In
file included from ./Workspace.hh:27:
In
file included from ./PrimitiveOperator.hh:25:
In
file included from ./StateIndicator.hh:25:
./DerivedFunction.hh:56:9:
warning: 'DerivedFunction::destroy' hides overloaded virtual
function [-Woverloaded-virtual]
  
void destroy(const char * loc);
 
      ^
./Function.hh:229:17:
note: hidden overloaded virtual function 'Function::destroy'
declared here: different number of parameters
 
    (0 vs 1)
  
virtual void destroy() {}
 
              ^
Archive.cc:1992:25: warning:
result of comparison of constant -1 with _expression_ of type
'const TokenTag' is always true
 
    [-Wtautological-constant-out-of-range-compare]
  
Assert(primitive_tag != -1);
 
        ~ ^  ~~
./Assert.hh:45:26:
note: expanded from macro 'Assert'
#define
Assert(x)  if (!(x))   do_Assert(#x, __FUNCTION__, __FILE__,
__LINE__)
  
                      ^
Archive.cc:2004:15: warning:
result of comparison of constant -1 with _expression_ of type
'const Macro::Macro_num' is always true
 
    [-Wtautological-constant-out-of-range-compare]
  
if (macnum != -1)   // function is a macro
  
    ~~ ^  ~~
Archive.cc:2014:22: warning:
result of comparison of constant -1 with _expression_ of type
'const TokenTag' is always true
 
    [-Wtautological-constant-out-of-range-compare]
  
if (primitive_tag != -1)   // function is an APL primitive
  
    ~ ^  ~~
4
warnings generated.
mv
-f .deps/apl-Archive.Tpo .deps/apl-Archive.Po
g++
-DHAVE_CONFIG_H -I. -I..    -Wall -I sql         -g -O2 -MT
apl-Assert.o -MD -MP -MF .deps/apl-Assert.Tpo -c -o
apl-Assert.o `test -f 'Assert.cc' || echo './'`Assert.cc
In
file included from Assert.cc:28:
In
file included from ./Workspace.hh:27:
In
file included from ./PrimitiveOperator.hh:25:
In
file included from ./StateIndicator.hh:25:
./DerivedFunction.hh:56:9:
warning: 'DerivedFunction::destroy' hides over