|
From: | Juergen Sauermann |
Subject: | Re: [Bug-apl] AP100 problem |
Date: | Tue, 14 Feb 2017 21:20:34 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
Hi Frederick, I did as proposed and it seems to work on my machine: eaddress@hidden:~$ Sound/foobar.apl 1 ls Sound/* Sound/foobar.apl Sound/playsnd 0 ls Sound/p* Sound/playsnd 0 ls Sound/pl* Sound/playsnd 0 ls Sound/pla* Sound/playsnd 0 The following in interesting. Your script complains about: sh: -c: line 0: unexpected EOF while looking for matching ``' sh: -c: line 1: syntax error: unexpected end of file 1 But there is no backquote ( ` ) anywhere in your script or in the AP100 code. And the script (which ?) seems to have only 2 lines. To nail this down a little, please try the following: - enable dynamic logging (via ./configure). You may have that already, if not do a make develop sudo make install in the top-level GNU APL directory. Then enable logging facility 35 in APL: ]LOG 35 This will tell us how the externam programs are called by AP100. Fr example: ]LOG 35 Log facility 'Shared Variable operations ' is now ON 100 ⎕SVO 'OS' ⋄ 0 ⍴ ⎕DL 1 Using TCP socket towards APserver... connected to APserver, socket is 7 apl100 got MAKE_OFFER 1 OS ← ⎕ ← 'ls Sound/pla*' ls Sound/pla* apl100 got ASSIGN_VALUE AP100(6465) got command ls Sound/pla* ls: cannot access Sound/pla*: No such file or directory AP100(6465) finished command with exit code 512 In the above example the file did not exist, but we can see in the third last like which command was given to AP100. Please try ]log 35 both in your script and by entering the lines in the script interactively (to see if the problem is caused by scripting or something else). I haven't changed the AP stuff in the last years, but there were some changes recently that affected many files at the same time. It would be good if you could figure when (in terms of SVN versions or calendar dates) things started to fail. Thanks, Jürgen Sauermann On 02/14/2017 02:29 AM, Frederick Pitts
wrote:
Gentle people, I am having trouble using the AP100 processor. Code that worked reliably two to three years ago, no longer works. The problem can be replicated (I hope) as follows: 1) Create a folder named 'Sound'. 2) Touch a file in 'Sound' named 'playsnd' 3) Copy the attached 'foobar.apl' into the folder containing 'Sound' and run ./foobar.apl after making sure it has execute permission. The content of foobar.apl is: #!/usr/local/bin/apl --script 100 ⎕SVO 'OS' ⋄ 0 ⍴ ⎕DL 1 OS ← ⎕ ← 'ls Sound/*' OS OS ← ⎕ ← 'ls Sound/p*' OS OS ← ⎕ ← 'ls Sound/pl*' OS OS ← ⎕ ← 'ls Sound/pla*' OS )OFF The output for the above, contained in attached 'foobar.apl.out', is: 1 ls Sound/* Sound/playsnd 0 ls Sound/p* Sound/playsnd 0 ls Sound/pl* Sound/playsnd 0 ls Sound/pla* sh: -c: line 0: unexpected EOF while looking for matching ``' sh: -c: line 1: syntax error: unexpected end of file 1 Why is the last invocation of the AP100 processor failing? The error messages reported by 'sh' indicate shell in-line substitution and end-of-file processing problems. BTW, I'm running on Fedora 25 where 'sh' is actually a symbolic link to 'bash'. And the actual application involves using the AP100 processor to invoke sound apps from an APL game. Regards, Fred |
[Prev in Thread] | Current Thread | [Next in Thread] |