»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
manchicken Hopefully I will _finally_ be able to run CI on osx with this... 01:38
Looks like travis doesn't handle CWD the same way with OSX as it does in GNU/Linux. 01:39
Anybody know if there's a way to get Travis-CI to cache your rakudo build?
I keep having to wait for this thing to build Perl 6 before it'll even run my tests. 01:40
timotimo i know only for linux; there's packages for that 01:46
manchicken Well crap... 01:47
This thing won't test because the DYLIB loader can't find the .so that the test needs. It's built, you can see the successful linker call to make it, and it's making it in the right path, but for some reason it just won't freakin' work.
The funny thing is that it works fine on my Mac. 01:49
timotimo i didn't know you can use .so on osx 01:53
geekosaur it's nto the default but dyld does look for .so as a fallback, as of I think Lion 02:10
badically to make porting easier
manchicken I meant `dylib`. 02:11
geekosaur you do still run into fundamental incompatibilities in the way dynamic loading works, though; if some .so is not being found, first place to look is the RPATH entries in the thing loading it
(or ,dylib)
manchicken Yeah, I pulled the DYLIB path stuff in, but I don't think it's putting it where I expected. 02:12
geekosaur because unlike linux/ELF, it does not assume default locations
manchicken I'm trying a different approach.
geekosaur paths can be relative to RPATH entries (with @rpath tokens) but the default behavior is absolute paths
manchicken travis-ci.org/manchicken/perl6-Fcn.../320869746 02:13
titsuki_ manchicken: you can automatically decide that your library should use .so or .dylib by calling $*VM.platform-library-name. (e.g. github.com/titsuki/p6-Geo-Hash/blo...uild.pm#L7 ) 02:14
manchicken This would be a lot easier if it didn't build rakudobrew every bloody time.
titsuki_, I don't think that's my problem. I'm using `LibraryMake` which seems to do that fun for me.
I think it is something just as simple as the path is jacked.
I have a library I'm building that is only for the tests. 02:15
It's not in my META6, because it shouldn't be installed.
geekosaur you don;t have a path on that at all. that was what I meant by the thing about absolute paths 02:16
manchicken For this Fcntl implementation, I wrote a tiny C program which just appends the machine-specific values for all of the relevant constants to a Perl 6 template file, and then that's your module. To test that, I made a simple library which has a function that compares those values coming from Perl 6 over nativecall to make sure that they make it back OK.
titsuki_ manchicken: ok, I see... ( and you can use it in Makefile: github.com/titsuki/p6-Geo-Hash/blo...file.in#L7 )
geekosaur and... is $TRAVIS_BUILD_DIR == '.' ? 02:17
manchicken Dunno, about to investigate that.
Again, it takes like 10 minutes between runs. Super slow going.
Does anybody know how to cache the rakudobrew build? 02:18
geekosaur (more precisely/usefully is it `pwd`)
geekosaur ...or possibly $*CWD but that introduces other complexities 02:18
manchicken Sorry, machine went to sleep on me. 02:25
Does anybody know how to make travis hold on to its perl6 build?
manchicken It's been a long time since I had a neat little project to dig into that had any greenfield stuff to do. 02:36
I think I found the problem... 02:46
$ ls -ltr $TRAVIS_BUILD_DIR/resources/lib
ls: /Users/travis/build/manchicken/perl6-Fcntl/resources/lib: No such file or directory
The $TRAVIS_BUILD_DIR is `/Users/travis/build/manchicken/perl6-Fcntl`
So, that path should be there.
manchicken I don't think Travis likes me. 03:28
anopperl6 How to use seq into loop perl6 03:51
manchicken Progress! 04:07
I now have the library built for OSX.
p6: for <red yellow green>.Seq -> $x { $x.say } 04:09
camelia red
yellow
green
manchicken Oh... he left.
manchicken I _really_ need to find a way to speed up the travis builds. 04:34
variable one thing I really like about perl6: literal rationals 04:35
finally, a language gets it right
manchicken Getting annoyed with Travis and OSX... 04:46
manchicken Yeah, I'm at a loss here. I wonder if there's something funky about the virtualization going on with the `dlopen()` system call on Travis. 05:13
manchicken Well, Travis is definitely using an old version. 05:47
Kernel version 16.7.0... that's OSX Panther... 05:49
manchicken Oh, no, that was iOS 10.3.3, not OSX. 05:56
Guest49524 how to do `echo test | ./script.p6 a b c`? 11:03
timotimo hey Guest49524 11:04
if you want the script to run with perl6, you'll have to put #!/usr/bin/env perl6 as the very first line 11:05
and of course chmod +x the file
then it should work
Guest49524 timotimo: I have done those, but @*ARGS doesn't contain "test" from echo.
timotimo that is correct, you will have to read it from the stdin. for example slurp() will give you the entire data that was piped in 11:06
there's also lines() which you can loop over to get the data line-by-line
you can play with that with our evalbot, like so:
m: say lines()[3] 11:07
camelia »Ich lösche die Flamm.«
timotimo (we have some example data that always gets piped in; this is from macbeth i think?)
yes, it's the opening act of macbeth
m: .say for slurp.words
camelia »Wann
treffen
wir
drei
wieder
zusamm?«
»Um
die
siebente
Stund‘,
am
Brückendamm.«
»Am
Mittelpfeiler.«
»Ich
lösche
die
Flamm.«
»Ich
mit«
»Ich
komme
vom
Norden
her.«
»Und
ich
vom
S…
timotimo the tiny ␤ symbols replace what used to be a proper newline that the program outputted 11:08
Guest49524 `say @*ARGS.perl;` ...that will work for `echo test | ./script.p6 a b c` to get ["a","b","c"] 11:12
`say slurp.perl;` ...that will work for `echo test | script.p6` to get "test\n"
but can you get both "test\n" and ["a","b","c"] ? 11:13
from `echo test | ./script.p6 a b c`
timotimo sure, how do you want it to look, exactly? 11:14
Guest49524 IDK? I guess just store them into separate variables?
timotimo well, the arguments are already in a separate variable, so you can just "my $all-data = slurp()" 11:15
Guest49524 slurp() tries to access "a", "b", and "c", as files? 11:16
timotimo oh! 11:19
sorry, i should have tried it locally
of course, that's the argfiles trick
you'll actually need to refer to stdin in this case: $*IN.slurp
Guest49524 how do you check if $*IN is empty? without `echo test` being piped in it wants user input 11:26
Guest49524 IO::Handle<IO::Special.new(what => "<STDIN>")>(opened, at octet 0) 11:31
I think it's the "octet 0" part?
timotimo no, that just means the file pointer is at the very beginning
Zoffix Guest49524: no direct way, but you could check if it's a TTY: .t and .slurp.say with $*IN
Guest49524: no direct way, but you could check if it's a TTY: .t or .slurp.say with $*IN
timotimo "tty" should be searchable in the docs, IMO 11:32
Geth doc: 4c01cd8253 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/IO/Handle.pod6
Add `tty` as index marker for .t method
11:34
synopsebot Link: doc.perl6.org/type/IO::Handle
timotimo thank you! 11:35
Guest49524 my $args = @*ARGS.perl;my $pipe;.t or $pipe=.slurp with $*IN;$pipe.say;$args.say; 11:43
what about prompting after that?
and for some reason $args has to be before $pipe but that is fine I just do not know why 11:44
timotimo you mean asking the user to input something on the terminal?
Guest49524 yes
timotimo then you can ".t and $userinput = .slurp with $*IN" 11:45
the ".t or ..." means "execute the thing on the right if it ($*IN) is not an interactive terminal"
and ".t and ..." means the opposite, i.e. "only do the thing on the right if it is an interactive terminal" 11:46
timotimo you can use "prompt" instead of .slurp there, that will also let you pass a little piece of text to display to the user 11:46
Guest49524 that only works for `./script.p6 a b c` ...not for `echo test | ./script.p6` 11:50
timotimo yeah, you can't ask the user for input after you piped something in 11:50
Guest49524 not ever? 11:51
timotimo well, you *can*, but you'll have to do something like "open('/dev/tty', :rw)" and interact with that directly
Guest49524 what about subshelling?
timotimo probably :w, :r actually 11:52
not :rw
echo "input" | perl6 -e 'say slurp; my $tty = open("/dev/tty", :r, :w); $tty.get.say'
this outputs "input" and then you can type something in manually and it'll echo it
i'll be AFK for a bit now
Guest49524 thanks! 11:59
geekosaur what do you mean by subshelling? 12:12
also you seem a bit confused about how things work
you piped in, therefore you replaced the terminal as standard input with something else 12:13
Guest49524 shell "perl6 -e 'prompt \"query? \"'"; 12:24
but how to get the prompt?
araraloren_ shell return a Proc::Async 12:29
Guest49524 docs.perl6.org/routine/run.html 12:31
timotimo Guest49524: the prompt sub returns the text the user inputted 12:32
Guest49524 not from shell() though? 12:33
timotimo no, but you can get that with qx and qqx quoting constructs if you want
Guest49524 true 12:34
im just a noob giving perl6 another attempt
Geth doc: dd9e1ca5f8 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/pod.pod6
update per current capability

improve and extend information on the POD config formats
12:37
synopsebot Link: doc.perl6.org/language/pod
timotimo docs.perl6.org/language/ipc - did you read this? 12:38
Guest49524 maybe a while ago? 12:43
Guest49524 how long will it be until perl6 is finished? 12:50
araraloren_ :) not get it 12:52
Guest49524 lots of unimplemented features? 12:53
araraloren_ IDK
timotimo perl6 has had its release two years ago now
Guest49524 docs.perl6.org/language/pragmas 12:53
NYI & TBD
jnthn Those shouldn't really be in user-facing docs; they're just proposed things for future Perl 6 versions at this point. 12:54
That may happen or may never happen.
timotimo when perl6 is "finished" it is dead 12:55
araraloren_ such as `goto` ?
Guest49524 Real programmers can write assembly code in any language. 12:56
jnthn It's like asking "when will JavaScript/C#/Java be finished", and the answer is pretty much "when nobody cares to improve them any more" 12:57
Like Perl 6, they all exist in a current useful state, and all have ideas/plans for the future. 12:58
araraloren_ yeah, when C# 1.0 released, it not have too much feature
jnthn heh, really...I remembering writing that :-)
lunch, bbiab :) 12:59
araraloren_ 88
timotimo huh, 88? 13:00
araraloren_ bye bye
timotimo interesting
araraloren_ In china, `8`'s pronunciation is same as `bye` 13:01
timotimo oh, ok
araraloren_ so we use 88 short for bye bye
timotimo in germany, it's a rather hateful symbol of a rather evil group of people ...
Geth doc: 29f9b25dde | (Elizabeth Mattijsen)++ | doc/Language/pragmas.pod6
Move unlikely to be implemented MONKEY pragmas into seperate section
13:02
synopsebot Link: doc.perl6.org/language/pragmas
araraloren_ oh
timotimo no problem, it's obvious you didn't mean that
AlexDaniel lizmat++ 13:03
araraloren_ yeah, :)
lizmat m: use trace; say "foo"; no trace; say "bar" # use trace *is* implemented
camelia 2 (<tmp> line 1)
say "foo"
foo
bar
araraloren_ something about this: 88 means byebye, 666 means `cool awesome dope` 13:06
timotimo yeah, just not exactly defined in terms of semantics
Geth doc: 63fa2134f4 | (Elizabeth Mattijsen)++ | doc/Language/pragmas.pod6
Minimal description of "use/no trace"
13:09
Geth doc: b33d6ef42a | (Elizabeth Mattijsen)++ | doc/Language/pragmas.pod6
Minimal documentation of "no precompilation"
13:19
synopsebot Link: doc.perl6.org/language/pragmas
lizmat afk& 13:49
Geth doc: de8e7544de | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/pod.pod6
add another boolean format
14:01
synopsebot Link: doc.perl6.org/language/pod
pmurias jnthn: it seems we are using the statement migration stuff so that when we use things like foo("{1+2}") or a once in conjunction with a statement modifiers the stuff they put in the current block gets all nicely packed into the thunk 14:09
jnthn: I'll try to stop the putting of extra stuff into surrounding block part for those things 14:10
bioexpress p6: say 3; 16:10
camelia 3
Geth doc: 7922af5788 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/pod.pod6
add information

  + separate ints and floats
  + add a =head3 and title for reference
  + spell completely String and Boolean
17:25
synopsebot Link: doc.perl6.org/language/pod
yoleaux Zoffix: what's happening with the :SYM<> import, bruh? irclog.perlgeek.de/perl6/2017-09-24#i_15210457 18:04
Geth doc: f7d9a34816 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/pod.pod6
add comma, align text
18:32
synopsebot Link: doc.perl6.org/language/pod
RudolfLovesLarry Hey all! Where's camelia? 19:28
kevani christmas break ;) 19:29
RudolfLovesLarry kevani how are you my friend 19:31
AlexDaniel m: say 42 21:29
camelia 42
moritz \o Merry Christmas to everybody o~ 21:34
Geth doc: 241dc10c98 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Programs/00-running.pod6
chg POD6 to POD per discussion with AlexDaniel

to reflect rakudo changes with PR #1339
21:41
tbrowder Merry Christmas, Moritz and all p6 people! 21:57
russt1 playing with rakudo and I notice that -x -S command line args are gone from perl5. any work around for that? 22:03
moritz never used either in Perl 5 22:08
russt1: if they are useful, you could contribute a patch that implements them in rakudo 22:09
russt1 possibly, where would I do that? 22:10
russt1 I'm just learning about rakudo (in fact reading your book about perl 6 regexes I think :) 22:11
Zoffix FWIW they look pretty mental. Perhaps we should discuss whether we want them in the first place before making any patches?
russt1 I think if you are Lenz
moritz russt1: I am :-) How do you like it so far?
Zoffix And with `-x` perldoc perlrun says you'd indicate end with __END__ but we don't have an equivalent of it 22:12
russt1 I like it so far except I was trying to port my portable startup system for perl5 to perl6 and am missing those two args...
moritz what do you use it for? On Linux, I just use a shebang, and on Windows you can register a file extension 22:14
russt1 if [ $# -eq 0 ]; then exec perl -x -S $0; exit $? ; else exec perl -x -S $0 "$@"; exit $? ; fi
#!/bin/perl -w
the -x discards lines until it finds the #!perl pattern
moritz but why? 22:15
do you often run "bash myprog.p6"? 22:16
russt1 trying to remember why, wrote this code a long time ago when I had to run on numerous unix systems plus mks shell in DOS 22:19
geekosaur iirc we do have __END__ by abusing pod6 22:20
and the reason for -x and -S is basically to work around systems without shebang support
I *think* we can safely put that one to bed
russt1 the main feature is for the perl interpreter to skip the shell preamble
Zoffix Yeah, the =finish block, but the speculations say "Anything in a source file after a =finish is always treated as Pod.", and you can embed proper Perl 6 code in Pod, which makes it unsafe as a "discard everything after it" feature 22:21
(this isn't implemented properly yet ( RT#127213 ), but still)
AlexDaniel is there an equivalent of that in ruby or python or in anything else?
synopsebot RT#127213 [new]: rt.perl.org/Ticket/Display.html?id=127213 [POD] after =finish isn't picked up in $=pod
Zoffix Relevant speculation, which confusingly does list =finish as equivalent of __END__ design.perl6.org/S02.html#Double-u...core_forms 22:23
Oh wait, not confusingly. In Perl 5 you can stick pod after __END__ too
But you can't run stuff with it
Geth doc/master: 4 commits pushed by (Will "Coke" Coleda)++ 22:24
Zoffix m: =begin foo :bar(BEGIN say "just a Pod config variable")␤=end foo␤
camelia just a Pod config variable
Zoffix Related ticket RT#130477 and TimToady's comments on whether Pod should be executable: irclog.perlgeek.de/moarvm/2017-01-09#i_13886808 22:26
synopsebot RT#130477 [open]: rt.perl.org/Ticket/Display.html?id=130477 [BUG][POD] Pod config parses colopairs but simply stringifies whatever it matched
Zoffix & 22:27
russt1 re: why use shell logic to establish perl env, it was so I could have multiple path environments on the same machine. one can now use #!/bin/env for that. The -S was to get perl to look for the actual script in $PATH. 22:31
teatime russt1: if you want maximum portability, use /usr/bin/env 22:32
russt1 the prlskel prog I wrote then uses $0 to load a perl library in a path that I could control and that has a main, and would execute that. features in prlskel establish a debugging env. among other things. 22:34
what would be the modern way to do all that? 22:35
I guess I could write a wrapper for the perl6 wrapper that would create a tmp file with the pre-amble removed or something. 22:36
I looked at the perl6 wrapper and I gather that it loads a byte-code file which contains the actual interpreter. 22:37
moritz that's correct 22:39
russt1 mosdef not interested in using a poddoc hack for such a simple feature.. :) 22:41