Re: GNU APL crash

2024-02-25 Thread Dr . Jürgen Sauermann

Hi Paul,

thank you for reporting this issue. Fixed in *SVN 1757*.

Best Regards,
Jürgen


On 2/22/24 19:04, Paul Rockwell wrote:

Environment: SVN 1754, macOS 14.3.1, M1 Mac mini (Apple Silicon)

While attempting to run Blake McBride's APL Editor 
https://github.com/blakemcbride/APLEditor I encounter the following:


E∆Edit ''

At all prompts you can type 'end' to exit or backup to the
previous question.

You can often type 'help' to get help.

Enter your edit command?  add

[0] foobar a

[1]

Enter your edit command?  list

Enter the line numbers you wish to list, or [a,b,r]?  all

token:               'RETURN_EXEC' at
/Volumes/MyPassport/paulrockwell/Documents/Build/GNU_APL/src/Command.cc:617

token.get_Class():   'TC_RETURN' at
/Volumes/MyPassport/paulrockwell/Documents/Build/GNU_APL/src/Command.cc:617

token.get_tag():     '0x520A000D' at
/Volumes/MyPassport/paulrockwell/Documents/Build/GNU_APL/src/Command.cc:617

*** useless apl.lines (no CXXFLAGS=-rdynamic -gdwarf-2)




-- Stack trace at
/Volumes/MyPassport/paulrockwell/Documents/Build/GNU_APL/src/Command.cc:617



0x1001ad9a0 main

0x1000a9bc0 Workspace::immediate_execution(bool)

0x10011ec84   Command::process_line()

0x10011eec8   Command::process_line(UCS_string&,
std::__1::basic_ostream>*)

0x10012268c     Command::do_APL_expression(UCS_string&)

0x100137b40     Command::finish_context()





Process exited with status 0


It's not clear what statement in the set of functions is being 
executed at this point that throws the error.



I'm also finding that the main editor E∆Edit function won't execute 
properly after immediately copying it from another workspace.


It throws a SYNTAX ERROR on a very simple assignment statement in this 
case.



Opening the function with the standard editor and displaying it allows 
the function to run.


)clear

CLEAR WS

)copy EDITOR

SAVED 2024-02-20 20:11:19 (GMT-6)

)fns

E∆       E∆Add       E∆Ail       E∆CJ        E∆CS E∆Change    E∆Clear

E∆Copy     E∆Ctit      E∆DIV       E∆Delete    E∆EHN   E∆ER   E∆Ealn

E∆Edit     E∆EditLine  E∆Eoi       E∆Erase     E∆Find  E∆Get   E∆LJ

E∆LP       E∆LPH       E∆Lck       E∆List      E∆Move  E∆New     E∆O

E∆Omega     E∆PI        E∆Parse     E∆Pic       E∆Pim   E∆Pin   E∆Piv

E∆RND       E∆RS        E∆Replace   E∆Revert    E∆SS    E∆Save    
E∆Screen

E∆VI       E∆Vck

E∆Edit ''

SYNTAX ERROR+

E∆Edit[10] orig←Mat

      ^   ^

)reset

∇E∆Edit[⎕]

    ∇

[0] E∆Edit fun;Mat;qq;fn;bv;orig;Cms;Pad;Delim;⎕IO;⎕PW

[1] ⎕PW←200

[2] ⎕IO←1

[3] Delim←,'∵'

[4] Cms←''

[5] Pad←'  '

[6] →(0≠⍴,fun)/EN0

[7] Mat←0 0⍴''

[8] →EN5

[9] EN0:→(0=1↑⍴Mat←⎕CR fun)/ER1

[10] EN5:orig←Mat

[11] ' '

[12] 'At all prompts you can type ''end'' to exit or backup to the
previous question.'

[13] 'You can often type ''help'' to get help.'

[14] ' '

[15] qq←   'add       =  to add; insert; or write over a line,'

[16] qq←qq,'edit      =  to modify an existing line,'

[17] qq←qq,'delete    =  to delete a group of lines,'

[18] qq←qq,'move      =  to move lines from one place to another,'

[19] qq←qq,'copy      =  to copy lines from one place to another,'

[20] qq←qq,'find      =  to find a character string,'

[21] qq←qq,'replace   =  to search and replace a character string,'

[22] qq←qq,'screen    =  to search and list your function a screen
at a time,'

[23] qq←qq,'list      =  to scroll the contents of your function
on your screen,'

[24] qq←qq,'new       =  to erase the entire function,'

[25] qq←qq,'save      =  save function definition,'

[26] qq←qq,'original  =  revert back to original definition,'

[27] qq←qq,'get       =  get a different function to edit'

[28] qq←','E∆Parse qq

[29]

fn←'E∆Add,E∆Change,E∆Delete,E∆Move,E∆Copy,E∆Find,E∆Replace,E∆Screen,E∆List,E∆New,E∆Save,E∆Revert,E∆Get'

[30] fn←','E∆Parse fn

[31] EN1:→(2↑bv←qq E∆Pim'Enter your edit command')/END,EN1

[32] ⍎,(2↓bv)⌿fn

[33] →EN1

[34] END:→(∨/(⍴Mat)≠⍴orig)/EN4

[35] →(∧/∧/Mat=orig)/0

[36] EN4:→('yn'E∆Pic'Function has been modified; leave
anyway')/(3⍴EN4),0,EN1

[37] EN2:→(0∊⍴Mat)/EN3

[38] →('yn'E∆Pic'Do you wish to return to your original
text')/(3⍴EN2),0,EN3

[39] EN3: →0

[40] ER1:E∆ER'Function ',fun,' does not exist.'

    ∇

[41] ∇

E∆Edit ''

At all prompts you can type 'end' to exit or backup to the
previous question.

You can often type 'help' to get help.


- Paul Rockwell




GNU APL crash

2024-02-22 Thread Paul Rockwell
Environment: SVN 1754, macOS 14.3.1, M1 Mac mini (Apple Silicon)

While attempting to run Blake McBride's APL Editor 
https://github.com/blakemcbride/APLEditor I encounter the following:

  E∆Edit ''
 
At all prompts you can type 'end' to exit or backup to the previous question.
You can often type 'help' to get help.
 
Enter your edit command?  add
[0]   foobar a
[1]   
Enter your edit command?  list
Enter the line numbers you wish to list, or [a,b,r]?  all
token:   'RETURN_EXEC' at 
/Volumes/MyPassport/paulrockwell/Documents/Build/GNU_APL/src/Command.cc:617
token.get_Class():   'TC_RETURN' at 
/Volumes/MyPassport/paulrockwell/Documents/Build/GNU_APL/src/Command.cc:617
token.get_tag(): '0x520A000D' at 
/Volumes/MyPassport/paulrockwell/Documents/Build/GNU_APL/src/Command.cc:617
*** useless apl.lines (no CXXFLAGS=-rdynamic -gdwarf-2)


-- Stack trace at 
/Volumes/MyPassport/paulrockwell/Documents/Build/GNU_APL/src/Command.cc:617

0x1001ad9a0 main
0x1000a9bc0  Workspace::immediate_execution(bool)
0x10011ec84   Command::process_line()
0x10011eec8Command::process_line(UCS_string&, std::__1::basic_ostream>*)
0x10012268c Command::do_APL_expression(UCS_string&)
0x100137b40  Command::finish_context()


Process exited with status 0

It's not clear what statement in the set of functions is being executed at this 
point that throws the error.

I'm also finding that the main editor E∆Edit function won't execute properly 
after immediately copying it from another workspace.
It throws a SYNTAX ERROR on a very simple assignment statement in this case. 

Opening the function with the standard editor and displaying it allows the 
function to run.
 
  )clear
CLEAR WS
  )copy EDITOR
SAVED 2024-02-20 20:11:19 (GMT-6)
  )fns
E∆  E∆Add   E∆Ail   E∆CJE∆CSE∆ChangeE∆Clear
E∆Copy  E∆Ctit  E∆DIV   E∆DeleteE∆EHN   E∆ERE∆Ealn
E∆Edit  E∆EditLine  E∆Eoi   E∆Erase E∆Find  E∆Get   E∆LJ
E∆LPE∆LPH   E∆Lck   E∆List  E∆Move  E∆New   E∆O
E∆Omega E∆PIE∆Parse E∆Pic   E∆Pim   E∆Pin   E∆Piv
E∆RND   E∆RSE∆Replace   E∆RevertE∆SSE∆Save  E∆Screen
E∆VIE∆Vck
  E∆Edit ''
SYNTAX ERROR+
E∆Edit[10]  orig←Mat
^   ^
  )reset
  ∇E∆Edit[⎕]
∇
[0]   E∆Edit fun;Mat;qq;fn;bv;orig;Cms;Pad;Delim;⎕IO;⎕PW
 
[1]⎕PW←200
[2]⎕IO←1
[3]Delim←,'∵'
[4]Cms←''
[5]Pad←'  '
[6]→(0≠⍴,fun)/EN0
[7]Mat←0 0⍴''
[8]→EN5
[9]EN0:→(0=1↑⍴Mat←⎕CR fun)/ER1
[10]   EN5:orig←Mat
[11]   ' '
[12]   'At all prompts you can type ''end'' to exit or backup to the previous 
question.'
[13]   'You can often type ''help'' to get help.'
[14]   ' '
[15]   qq←   'add   =  to add; insert; or write over a line,'
[16]   qq←qq,'edit  =  to modify an existing line,'
[17]   qq←qq,'delete=  to delete a group of lines,'
[18]   qq←qq,'move  =  to move lines from one place to another,'
[19]   qq←qq,'copy  =  to copy lines from one place to another,'
[20]   qq←qq,'find  =  to find a character string,'
[21]   qq←qq,'replace   =  to search and replace a character string,'
[22]   qq←qq,'screen=  to search and list your function a screen at a time,'
[23]   qq←qq,'list  =  to scroll the contents of your function on your 
screen,'
[24]   qq←qq,'new   =  to erase the entire function,'
[25]   qq←qq,'save  =  save function definition,'
[26]   qq←qq,'original  =  revert back to original definition,'
[27]   qq←qq,'get   =  get a different function to edit'
[28]   qq←','E∆Parse qq
[29]   
fn←'E∆Add,E∆Change,E∆Delete,E∆Move,E∆Copy,E∆Find,E∆Replace,E∆Screen,E∆List,E∆New,E∆Save,E∆Revert,E∆Get'
[30]   fn←','E∆Parse fn
[31]   EN1:→(2↑bv←qq E∆Pim'Enter your edit command')/END,EN1
[32]   ⍎,(2↓bv)⌿fn
[33]   →EN1
[34]   END:→(∨/(⍴Mat)≠⍴orig)/EN4
[35]   →(∧/∧/Mat=orig)/0
[36]   EN4:→('yn'E∆Pic'Function has been modified; leave anyway')/(3⍴EN4),0,EN1
[37]   EN2:→(0∊⍴Mat)/EN3
[38]   →('yn'E∆Pic'Do you wish to return to your original text')/(3⍴EN2),0,EN3
[39]   EN3: →0
[40]   ER1:E∆ER'Function ',fun,' does not exist.'
∇
[41] ∇
  E∆Edit ''
 
At all prompts you can type 'end' to exit or backup to the previous question.
You can often type 'help' to get help.

- Paul Rockwell