The train has left the station-how to hang v18.2

APL-related discussions - a stream of APL consciousness.
Not sure where to start a discussion ? Here's the place to be
Forum rules
This forum is for discussing APL-related issues. If you think that the subject is off-topic, then the Chat forum is probably a better place for your thoughts !

The train has left the station-how to hang v18.2

Postby jmosk on Fri Mar 01, 2024 7:35 pm

A typo led to finding a way to cause v18.2 to hang. You can't use the Action function to interrupt the interpreter. It appears to be in an infinite loop.

This puts v18.2.48839 in an infinite loop

Code: Select all

     (⊣ ⍣ ≢  1)

+←--------------------------------------------------------------→
+ Jay Moskowitz
+←--------------------------------------------------------------→
+ http://www.linkedin.com/in/jay-moskowitz-5745b83
+
User avatar
jmosk
 
Posts: 69
Joined: Thu Jul 18, 2013 5:15 am

Re: The train has left the station-how to hang v18.2

Postby jmosk on Sat Mar 02, 2024 12:55 am

( ) is not needed to cause the infinite loop
+←--------------------------------------------------------------→
+ Jay Moskowitz
+←--------------------------------------------------------------→
+ http://www.linkedin.com/in/jay-moskowitz-5745b83
+
User avatar
jmosk
 
Posts: 69
Joined: Thu Jul 18, 2013 5:15 am

Re: The train has left the station-how to hang v18.2

Postby Morten|Dyalog on Sat Mar 02, 2024 2:18 pm

You don't mention the platform. I do seem to be able to interrupt v18.2:

- If connected using RIDE, by selecting Action|Strong Interrupt
- Under Windows the menu is unresponsove; you need to click on the taskbar icon and select Strong Interrupt
User avatar
Morten|Dyalog
 
Posts: 462
Joined: Tue Sep 09, 2008 3:52 pm

Re: The train has left the station-how to hang v18.2

Postby jmosk on Sat Mar 02, 2024 3:27 pm

I am running Windows 7.

I don't understand what you mean about clicking on the taskbar icon to select Strong Interrupt. Where is this icon under Windows 7?

Why does this sequence cause an infinite loop?
+←--------------------------------------------------------------→
+ Jay Moskowitz
+←--------------------------------------------------------------→
+ http://www.linkedin.com/in/jay-moskowitz-5745b83
+
User avatar
jmosk
 
Posts: 69
Joined: Thu Jul 18, 2013 5:15 am

Re: The train has left the station-how to hang v18.2

Postby Morten|Dyalog on Sat Mar 02, 2024 3:39 pm

I don't have a copy of Windows 7 to play with, but I believe it is the same as in more recent versions. Near the bottom right of your screen you will see a little pyramid, if you click on that it will pop up a set of icons corresponding to your running programs. If you click on the tiny Dyalog icon, you should get a little menu which includes "Strong interrupt".

> Why does this sequence cause an infinite loop?

When you provide a function right operand to the power operator, it will apply that function between the result of each application of the left operand and the previous result. It will continue until this function call returns 1. A typical right operand is the match function, which will loop until the function reaches a fixpoint. However, you have provided a constant left function, which means that the condition (not match) will never be met. Therefore, you get an infinite loop.
User avatar
Morten|Dyalog
 
Posts: 462
Joined: Tue Sep 09, 2008 3:52 pm

Re: The train has left the station-how to hang v18.2

Postby jmosk on Sat Mar 02, 2024 3:59 pm

Yes, the up-pointing triangle in the lower right of the normal Windows 7 desktop, is where you can select which icons and notifications appear on the taskbar. I changed the setting for Dyalog to "Show icon and notification". Now if I click on the Dyalog icon that now appears on the lower right side of the taskbar, I do get the option for weak or strong interrupt. And the Strong Interrupt will stop this infinite loop.
+←--------------------------------------------------------------→
+ Jay Moskowitz
+←--------------------------------------------------------------→
+ http://www.linkedin.com/in/jay-moskowitz-5745b83
+
User avatar
jmosk
 
Posts: 69
Joined: Thu Jul 18, 2013 5:15 am


Return to APL Chat

Who is online

Users browsing this forum: No registered users and 1 guest