A question about ARBIN

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 !

A question about ARBIN

Postby ray on Sun Apr 14, 2019 11:31 am

I wish to use ⎕ARBIN to read from a "FIFO" (named pipe) on the Raspberry Pi.

Within the "Arbitrary Input" documentation, under "input" it states:
input
This is a simple numeric scalar that specifies the input device.

If it is positive or zero, it represents a file descriptor that must have been associated by the command that started Dyalog APL.
If it is negative, it represents the tie number of a file opened by ⎕NTIE or ⎕NCREATE.


Given a FIFO named "/home/pi/myfifo", how exactly would I associate it within the command line I use to start Dyalog APL?
Ray Cannon
Please excuse any smelling pisstakes.
User avatar
ray
 
Posts: 151
Joined: Wed Feb 24, 2010 12:24 am
Location: Blackwater, Camberley. UK

Re: A question about ARBIN

Postby AndyS|Dyalog on Tue Apr 16, 2019 8:08 am

Hi Ray

Try
      ntn←'/home/pi/myfifo' ⎕ntie 0
⍬ ntn ⎕arbin''
User avatar
AndyS|Dyalog
 
Posts: 207
Joined: Tue May 12, 2009 6:06 pm

Re: A question about ARBIN

Postby ray on Tue Apr 16, 2019 9:11 pm

Hi Andy,

Thanks for your reply.

I am already using ⎕NTIE as in
Code: Select all
tie←fifo ⎕NTIE 0
....
((10+0 128)tie)⎕ARBIN ⍬
and this is now working well.

But I was more interested in the
If it is positive or zero, it represents a file descriptor that must have been associated by the command that started Dyalog APL
aspect, having never use a FIFO before and wanted to experiment.

Thanks anyway.
Ray Cannon
Please excuse any smelling pisstakes.
User avatar
ray
 
Posts: 151
Joined: Wed Feb 24, 2010 12:24 am
Location: Blackwater, Camberley. UK


Return to APL Chat

Who is online

Users browsing this forum: No registered users and 1 guest