lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]




On Jan 24, 2020, at 9:27 AM, connor horman <chorman64@gmail.com> wrote:

I have a question. Would a socket api fall under this discussion for a “Batteries” API. Having basic TCP and UDP (and maybe Bluetooth as well when hardware supports it) would be rather useful, especially in making lua its own standalone language.

I’m. It sure what you’re asking - is it
“Should the basic set of lua extra libraries include a networking api?”
Or
“If there is a networking API then should it be sockets?”

I would think that the answer to the first is a qualified yes.  If a host system supports networking then Lua should be able to use it.  The question is what to do if a system does not have a network stack/interface? Does socket() not exist or does it return a “no networking here” error code. 

To the second, I would have made it a maybe in the good old days ... some operating systems/network stacks just couldn’t support the model inherent in the sockets API.  Most of those systems, now, are either gone or have been coerced enough that they have a sockets(ish) interface so I would now say that sockets is a reasonable api model.

EXCEPT the latest trend of all the kewl kidz is to include the networking protocols directly in the application executable with some J-random API... I suppose sockets would still work here, but one never knows.

Frank




On Thu, Jan 23, 2020 at 15:56 Frank Kastenholz <fkastenholz@verizon.net> wrote:


>> On Jan 22, 2020, at 10:56 PM, Sean Conner <sean@conman.org> wrote:
>>
>> If info() is called on a symlink, does it return info about the link
>> itself, or the file the link points to?
>
> What's this "symlink" you speak of?
>
> Okay, I know what they are, but this is meant to be a minimum support.

One can write a standard (at least) two ways. The first is “everyone must do X”
The second is “if you do X you must do it this way...” which seems to me to be a reasonable approach in these sorts of cases


Frank