On Mon, 23 Oct 2017 07:15:56 -0700, coke wrote: > On Sun, 22 Oct 2017 12:25:07 -0700, b...@post.pl wrote: > > There is no strace on macOS, I used dtruss (dtrace): > > > > $ dtruss -p 1827 > > SYSCALL(args) = return > > fstat64(0x0, 0x7FFF5B18B2F0, 0x1) = 0 0 > > lseek(0x0, 0x0, 0x1) = 54132 0 > > write(0x1, "Nil\n\0", 0x4) = 4 0 > > thread_selfid(0x0, 0x7F8252ED2090, 0x4) = 24710 0 > > > > > > > > This behavior changed on > https://github.com/rakudo/rakudo/commit/80bbfcdd47bcb27c21352a53a5156a6ecdd41e65 > > commit 80bbfcdd47bcb27c21352a53a5156a6ecdd41e65 > Author: Jonathan Worthington <jn...@jnthn.net> > Date: Fri Jul 14 14:24:13 2017 +0200 > > Use same slow-path for getc and readchars. > > This will allow fixing the common problem they have near the end of > the file in one place, as well as giving less code to maintain. > > > IRC chat noted the behavior of > > perl6 -e '$*IN.eof.say' > > Is different on OS X and other platforms (True on mac, False > elsewhere)
More IRC discussion: https://irclog.perlgeek.de/perl6-dev/2017-10-23#i_15341428 Kinda boils down to this snippet saying "STDIN IS: seekable" on Macos, while NOT seekable everywhere else: #include <stdio.h> #include <sys/types.h> #include <unistd.h> int main(void) { int r = lseek(STDIN_FILENO, 0, SEEK_CUR); printf("STDIN IS: %s\n", (r && r != -1) ? "seekable" : "NOT seekable"); return 0; } And some C++ stackoverflow post claimed this was a bug in standard library on macos that was fixed in some version already.