Donal K. Fellows wrote:
Benjamin Goldberg wrote:
The set of bytecodes which Parrot will be using has been decided,
and while it’s not fixed in stone, it’s quite unlikely to get a
whole other language’s bytecodes added to it.OK, let’s go for a more concrete question. What sequence of bytecodes
would let me open a socket and talk to a remote host? The Parrot I/O
operation opcodes don’t mention anything about sockets and nor can I
tell how I would invoke a piece of helper C or C++ to do the job on my
behalf.
Just as there are “stdio”, “unix”, and “win32” ParrotIO layers, one
would define a “socket” layer (and maybe an “xti” layer, for the really
adventurous). Obviously, this needs a bit more C code to be added.
Once that layer is added, you could read from and write to sockets just
like you would from files.
···
–
my $n = 2; print +(split //, ‘e,4c3H r ktulrnsJ2tPaeh’
…“\n1oa! er”)[map $n = ($n * 24 + 30) % 31, (42) x 26]