Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-09-24

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:01 rngoodn joined #perl6
00:06 tony-o joined #perl6
00:16 Cabanossi joined #perl6
00:42 gdonald joined #perl6
00:46 Cabanossi joined #perl6
00:58 geekosaur joined #perl6
01:07 cdg joined #perl6
01:12 rngoodn joined #perl6
01:24 R0b0t1_ joined #perl6
01:38 rngoodn joined #perl6
01:40 wander4096 joined #perl6
01:54 ilbot3 joined #perl6
01:54 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
01:57 Ben_Goldberg joined #perl6
02:07 mryan50 joined #perl6
02:26 sprocket joined #perl6
02:27 sprocket hello #perl6!
02:28 teatime heyo.  catch any fraggles lately?
02:28 sprocket i have a question about NativeCall and am wondering if someone might offer some insight…
02:29 sprocket i’m trying to use a shared lib but am getting the “Cannot locate native library” error
02:30 sprocket teatime - sadly no, no fraggles :)
02:31 mryan50 joined #perl6
02:35 sprocket oh, answered my own question; didn’t have the path in $LD_LIBRARY_PATH:.
02:35 sprocket left #perl6
02:41 wander4096 m: 'my $x; # 5' ~~ m:s/^ [\s* (.*? ';') ['#' <-[\n]>* ]? ]* $/
02:41 camelia rakudo-moar 0b15f6: ( no output )
02:41 wander4096 m: say 'my $x; # 5' ~~ m:s/^ [\s* (.*? ';') ['#' <-[\n]>* ]? ]* $/
02:41 camelia rakudo-moar 0b15f6: OUTPUT: «「my $x; # 5」␤ 0 => 「my $x;」␤»
02:41 wander4096 m: say 'my $x; # 5' ~~ m:s/^ [\s* (.*? ';')['#' <-[\n]>* ]? ]* $/
02:41 camelia rakudo-moar 0b15f6: OUTPUT: «False␤»
02:41 wander4096 the difference is that i delete the space between ) and [
02:42 wander4096 how can that cause different meaning?
02:43 TimToady joined #perl6
02:46 wander4096 many times i got confused in such annoying situation, should i always add space between separator?
02:46 wander4096 between => around
02:49 raschipi Are you sure the whitespace doesn't match there?
02:49 geekosaur probably safest. I'm not sure that's supposed to happen in that context, but some regex constructs *do* allow postcircumfixes (indexing)
02:50 wander4096 raschipi: you are right
02:50 Sgeo_ joined #perl6
02:52 wander4096 maybe i should read https://docs.perl6.org/language/traps#Whitespace
02:53 wander4096 crazy >_<
02:56 wander4096 geekosaur: yes, so when write `<statements>` it finds the rule or token `statements` but `< statements >` doesnt
02:56 noganex joined #perl6
03:01 Cabanossi joined #perl6
03:02 schmause joined #perl6
03:30 Cabanossi joined #perl6
03:49 rngoodn joined #perl6
04:03 aborazmeh joined #perl6
04:03 aborazmeh joined #perl6
04:34 geekosaur joined #perl6
04:35 rngoodn joined #perl6
04:36 geekosaur joined #perl6
04:37 geekosaur joined #perl6
04:46 geekosaur joined #perl6
04:57 Lasse_ joined #perl6
05:00 foobear joined #perl6
05:16 HoboWithAShotgun joined #perl6
05:17 skids joined #perl6
05:20 rngoodn joined #perl6
05:34 Khisanth joined #perl6
05:42 jeromelanteri joined #perl6
05:46 nadim joined #perl6
06:00 Cabanossi joined #perl6
06:07 wamba joined #perl6
06:18 setty1 joined #perl6
06:21 aborazmeh joined #perl6
06:21 aborazmeh joined #perl6
06:50 astj joined #perl6
07:00 aborazmeh joined #perl6
07:00 aborazmeh joined #perl6
07:13 |oLa| joined #perl6
07:16 andrzejku_ joined #perl6
07:18 domidumont joined #perl6
07:19 andrzejku_ joined #perl6
07:26 HoboWithAShotgun Good sunday morning you wonderful people.
07:26 HoboWithAShotgun And if you are german: Go vote!
07:28 HoboWithAShotgun Also, how do I get/create a supply that emit keyboard events to me?
07:29 andrzejku_ AfD!
07:30 Cabanossi joined #perl6
07:31 rindolf joined #perl6
07:32 bartolin joined #perl6
07:35 Zoffix HoboWithAShotgun: providing you switched your terminal to non-buffering, I imagine $*IN.encoding: "latin1"; and then $*IN.getc stuck in a Supply will do the trick
07:36 Zoffix There's a .Supply method on IO::Handle that takes a :size too, but `size` might be removed, I think.
07:37 piojo joined #perl6
07:39 Zoffix https://docs.perl6.org/type/IO::Handle#routine_getc
07:48 darutoko joined #perl6
07:50 japhb .tell HoboWithAShotgun See https://github.com/ab5tract/Terminal-Print/blob/master/lib/Terminal/Print/RawInput.pm6 (or https://github.com/ab5tract/Terminal-Print/blob/master/lib/Terminal/Print/DecodedInput.pm6 if you want it decoded)
07:50 yoleaux japhb: I'll pass your message to HoboWithAShotgun.
07:52 japhb .tell Zoffix Pretty please point people with the terminal input question to https://github.com/ab5tract/Terminal-Print/tree/master/lib/Terminal/Print (Terminal::Print::RawInput and Terminal::Print::DecodedInput)
07:52 yoleaux japhb: I'll pass your message to Zoffix.
07:52 * japhb heads to bed
08:00 Cabanossi joined #perl6
08:01 HoboWithAShotgun very nice, japhb++
08:01 yoleaux 07:50Z <japhb> HoboWithAShotgun: See https://github.com/ab5tract/Terminal-Print/blob/master/lib/Terminal/Print/RawInput.pm6 (or https://github.com/ab5tract/Terminal-Print/blob/master/lib/Terminal/Print/DecodedInput.pm6 if you want it decoded)
08:01 Zoffix .
08:01 yoleaux 07:52Z <japhb> Zoffix: Pretty please point people with the terminal input question to https://github.com/ab5tract/Terminal-Print/tree/master/lib/Terminal/Print (Terminal::Print::RawInput and Terminal::Print::DecodedInput)
08:02 HoboWithAShotgun in his code, this line "start react { ... }", that start method is which one, the one from Thread? i can't tell from https://docs.perl6.org/routine/start
08:02 Zoffix That module's missing documentation.
08:03 Zoffix HoboWithAShotgun: from Promise
08:03 HoboWithAShotgun ah yes, because foo something is the same as something.foo
08:03 Zoffix HoboWithAShotgun: second half of this section discusses it: https://docs.perl6.org/language/concurrency#Promises
08:04 Zoffix HoboWithAShotgun: no, it's not the same. There just exist subroutines with the same name as methods in many cases. In this case, IIRC `start` is a statement prefix.
08:06 leont joined #perl6
08:06 Zoffix .tell japhb a terminal input should be listed here: https://docs.perl6.org/type/IO::Handle#routine_getc However, what you linked to doesn't appear to have any documentation (at least one that talks about disabling buffering), so linking to it would just add more confusion.
08:06 yoleaux Zoffix: I'll pass your message to japhb.
08:07 Zoffix .tall japhb *terminal input module I meant
08:07 Zoffix .tell japhb *terminal input module I meant
08:07 yoleaux Zoffix: I'll pass your message to japhb.
08:07 Zoffix .oO( wonder if japhb is tall... )
08:07 * HoboWithAShotgun moans
08:09 Zoffix `react {}` doesn't return until stuff inside of it is done. `start react {}` pops it into a separate thread, so code after it is executed right away, instead of waiting until react is done
08:10 HoboWithAShotgun so start react {} creates starts the react block in a new thread
08:10 HoboWithAShotgun s/creates//
08:10 Zoffix Yeah
08:10 HoboWithAShotgun i see
08:10 Zoffix m: react whenever Supply.interval(⅓) { .say; done if $++ > 3 }; sleep ½; say "meow"
08:10 camelia rakudo-moar 0b15f6: OUTPUT: «0␤1␤2␤3␤4␤meow␤»
08:10 Zoffix m: my $p = start react whenever Supply.interval(⅓) { .say; done if $++ > 3 }; sleep ½; say "meow"; await $p
08:10 camelia rakudo-moar 0b15f6: OUTPUT: «0␤1␤meow␤2␤3␤4␤»
08:11 domidumont joined #perl6
08:13 espadrine joined #perl6
08:14 Zoffix m: start react whenever Supply.interval(⅓) { .say; done if $++ > 3 }; sleep ½; say "meow"; sleep 2
08:14 camelia rakudo-moar 0b15f6: OUTPUT: «0␤1␤meow␤2␤3␤4␤»
08:14 HoboWithAShotgun there's so much to keep in your head at once. i read about that magic state variables and forgot outright
08:15 Zoffix HoboWithAShotgun: kinda. In other languages you'd just be learning a separate parallelism/async library instead of start/react blocks. Same amount of learning and less polish.
08:15 Zoffix HoboWithAShotgun: there's a book project set to prove that point and only teach what's needed, progressively :) https://rakudo.party/post/The-Rakudo-Book-Project
08:16 Zoffix Check back in a year and a bit ^_^
08:17 HoboWithAShotgun I would prefer a new Camel over a Lhama
08:19 * Zoffix has no idea what that means...
08:19 HoboWithAShotgun oh come on
08:19 HoboWithAShotgun sec
08:20 HoboWithAShotgun http://shop.oreilly.com/product/9780596004927.do over shop.oreilly.com/product/0636920018452.do
08:21 * Zoffix still has no idea what that means...
08:21 Zoffix I'm guessing one is more beginner oriented.
08:21 ufobat joined #perl6
08:22 HoboWithAShotgun How can you do Perl stuff and not know about these books?
08:22 teatime the camel book is the best technical book I have ever read.
08:22 HoboWithAShotgun That's like reading Sci-Fi and not knowing about Heinlein :)
08:25 Zoffix HoboWithAShotgun: I do Rakudo stuff :) Some core devs never coded Perl
08:25 Zoffix HoboWithAShotgun: also "Modern Perl" > *
08:26 Zoffix As in http://modernperlbooks.com/
08:30 Cabanossi joined #perl6
08:42 eliasr joined #perl6
09:07 ChoHag joined #perl6
09:08 stmuk camel=definitive larry reference for perl 5, llama=definitive learning perl 5
09:10 stmuk typically a perl 5 programmer would buy the camel give up on it, read the llama start to understand and then return to the camel able to follow it :)
09:16 TEttinger where's the alpaca book
09:16 TEttinger guanaco book
09:17 stmuk https://en.wikipedia.org/wiki/Intermediate_Perl <=- alpaca
09:21 stmuk never heard of guanaco is that the cookbook?
09:28 wamba joined #perl6
09:32 HoboWithAShotgun m: package Site { sub login { return "cookie"; } }; say Site::login()
09:32 camelia rakudo-moar 0b15f6: OUTPUT: «Could not find symbol '&login'␤  in block <unit> at <tmp> line 1␤␤»
09:33 HoboWithAShotgun what am i missing here?
09:46 geekosaur 'our'
09:47 geekosaur m: package Site { our sub login { return "cookie"; } }; say Site::login()
09:47 camelia rakudo-moar 0b15f6: OUTPUT: «cookie␤»
09:53 kaare__ joined #perl6
10:00 Cabanossi joined #perl6
10:08 Geth ¦ doc: e53c6f1159 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/enumeration.pod6
10:08 Geth ¦ doc: add missing right curly brace
10:08 Geth ¦ doc: review: https://github.com/perl6/doc/commit/e53c6f1159
10:08 [ptc] joined #perl6
10:10 Geth ¦ doc: b5be80cb3a | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/enumeration.pod6
10:10 Geth ¦ doc: add missing right curly brace at the correct place
10:10 Geth ¦ doc: review: https://github.com/perl6/doc/commit/b5be80cb3a
10:27 piojo joined #perl6
10:40 geekosaur joined #perl6
10:43 domidumont joined #perl6
11:03 margeas joined #perl6
11:03 Aaronepower joined #perl6
11:05 Lac123 joined #perl6
11:10 nadim joined #perl6
11:15 ChoHag joined #perl6
11:15 Cabanossi joined #perl6
11:21 mr-foobar joined #perl6
11:22 chakli joined #perl6
11:25 chakli hi, i was installing JSON::Fast using zef install JSON::Fast
11:25 jferrero joined #perl6
11:25 chakli but i get an error
11:25 chakli ===> Testing [OK] for JSON::Fast:ver<0.9.3> ===> Installing: JSON::Class:ver<0.0.9>:auth<github:jonathanstowe> ===> Install [FAIL] for JSON::Class:ver<0.0.9>:auth<github:jonathanstowe>: ===SORRY!=== Could not find JSON::Fast at line 4 in:
11:26 chakli i found this https://irclog.perlgeek.de/perl6-toolchain/2017-07-22, but not sure if it is the same issue.
11:28 Zoffix chakli: sounds like you need to update your zef
11:28 chakli i just installed it using rakudo brew, brand new
11:29 Zoffix chakli: is it the first time you installed rakudo on this system?
11:29 Zoffix zef keeps cache
11:30 Zoffix zef --force install https://github.com/ugexe/zef/archive/master.zip
11:30 chakli yes, its the first time i installed on this system
11:32 Zoffix chakli: what's the full error?
11:33 HoboWithAShotgun geekosaur: tyvm good sir
11:33 timotimo "zef install JSON::Fast" shouldn't be installing JSON::Class
11:33 yoleaux 03:55Z <MasterDuke> timotimo: instead of https://github.com/rakudo/rakudo/pull/1171, could nqp::join return the input string if there was only one?
11:34 Zoffix timotimo: it does, if Test::META isn't installed
11:34 timotimo oh
11:34 timotimo right, that's new in the test-depends
11:35 Zoffix Yeah, I can't install it either: "Could not find JSON::Fast:ver<0.4+> at line 62 in:"
11:35 Zoffix On HEAD
11:35 timotimo oh
11:35 timotimo JSON::Class depends on JSON::Fast, doesit?
11:35 timotimo and JSON::Fast depends on JSON::Class
11:35 timotimo yeah, that's not so cool.
11:36 chakli full error text ---> https://pastebin.com/uSrRBVZe
11:36 Zoffix hah, yeah indeed they both depend on each other :P
11:36 Zoffix timotimo: move Test::META tests to xt :)
11:37 Zoffix chakli: try zef --/test install JSON::Fast
11:37 timotimo i already have moved it
11:37 timotimo but it's in the test-depends, and zef installs those by default
11:37 Zoffix chakli: basically JSON::Class and JSON::Fast ended up depending on each other by accident, through test dependencies
11:37 timotimo i'm going to remove the dependency from the meta file for now
11:37 chakli lol :D
11:39 timotimo i just pushed a fixed version
11:39 timotimo please try again
11:39 chakli ===> Install [FAIL] for Test::META:ver<0.0.13>:auth<github:jonathanstowe>: ===SORRY!=== Could not find JSON::Fast at line 4 in:
11:39 Zoffix chakli: zef install https://github.com/timo/json_fast/archive/master.zip
11:40 chakli now it installed :)
11:40 Zoffix timotimo: not 100% sure, but might need a version bump too?
11:40 Zoffix 'cause I think zef keeps version somewhere and installs from those commits
11:41 timotimo that would probably be a good idea anyway
11:41 timotimo done
11:43 ufobat joined #perl6
11:44 timotimo now to check why travis didn't figure out that it was a bad idea to depend on Test::META
11:44 timotimo :\
11:45 timotimo it uses zef install --force --/test Test::META first
11:45 Zoffix heh
11:45 piojo joined #perl6
11:46 timotimo "avoid circular tests" is the commit message that puts in that line
11:47 wander4096 joined #perl6
11:57 geekosaur joined #perl6
12:00 HoboWithAShotgun I'd like to add a method to Str, so i can write $s.chimp instead of $s.flip.chomp.flip
12:00 HoboWithAShotgun is that doable?
12:01 lizmat would you like to add this to *all* Str objects, or a specific number of Str objects in your program?
12:02 HoboWithAShotgun all
12:02 HoboWithAShotgun otherwise i'd use a role
12:02 lizmat use MONKEY; augment class Str { method chimp() { ... } }
12:02 mr-foobar joined #perl6
12:03 HoboWithAShotgun cool. tx
12:06 BenGoldberg joined #perl6
12:08 El_Che joined #perl6
12:13 wander4096 HoboWithAShotgun: `.trim-leading`, it's different from .flip.chomp.flip, but maybe what you want
12:14 timotimo why not just .substr(1)?
12:15 timotimo m: .flip.chomp.flip.perl.say andthen .substr(1).perl.say given "hello you"
12:15 camelia rakudo-moar ebd644: OUTPUT: «"hello you"␤"rue"␤»
12:15 timotimo oh, heh.
12:15 timotimo m: (.flip.chomp.flip.perl.say; .substr(1).perl.say) given "hello you"
12:15 camelia rakudo-moar ebd644: OUTPUT: «"hello you"␤"ello you"␤»
12:15 timotimo oh, chomp only removes newlines, right
12:21 HoboWithAShotgun i am consuming a supply like so: whenever Perlmonks.message -> %message, now I want to call unique on that using %message<text> as the equality comparison
12:21 HoboWithAShotgun i am not sure how to express that
12:22 moytrage joined #perl6
12:23 HoboWithAShotgun i am also hungry :) back in a minute
12:24 astj joined #perl6
12:27 mr-foobar joined #perl6
12:28 piojo joined #perl6
12:30 Cabanossi joined #perl6
12:31 Geth ¦ doc: 7f4839590f | (Steve Mynott)++ | doc/Language/faq.pod6
12:31 Geth ¦ doc: Explicit answer to "is Perl 6 released".  I was told on twitter it
12:31 Geth ¦ doc:
12:31 Geth ¦ doc: wasn't by someone citing the FAQ as evidence.
12:31 Geth ¦ doc: review: https://github.com/perl6/doc/commit/7f4839590f
12:33 El_Che_ joined #perl6
12:38 chakli I installed Bailador on rakudobrew and when i just do "bailador --name=test new" i get an error  "--name=Project-Name is a required parameter"
12:39 Geth ¦ doc: 4f4b366c0a | (Steve Mynott)++ | doc/Language/faq.pod6
12:39 Geth ¦ doc: Tweak column length, released answer and update 6.d answer.
12:39 Geth ¦ doc: review: https://github.com/perl6/doc/commit/4f4b366c0a
12:39 chakli but if i call Bailadorw/o the wrapper it works "perl6 rakudobrew/moar-nom/install/share/perl6/site/resources/F3147CDB5FA175F21CCAC05B6B29A24EF5EAED7B --name=test new"
12:39 ufobat i need to leave, but if you create a ticket for it i'll take care of it :)
12:40 Aaronepower joined #perl6
12:40 chakli ok
12:44 Zoffix All the more reason not to use rakudobrew :)
12:47 HoboWithAShotgun joined #perl6
12:47 HoboWithAShotgun meh, pc went on hibernate. what did i miss?
12:47 Zoffix HoboWithAShotgun: https://irclog.perlgeek.de/perl6/2017-09-24#i_15209509
12:47 teatime but, in short, nothing.
12:48 chakli @Zoffix what else would you suggest for a quick setup?
12:49 * HoboWithAShotgun suggests nesquick as there can never be enough chocolate
12:49 Zoffix HoboWithAShotgun: Supply has .unique method. Just use .unique(:as{.<text>}) and I think that'll work
12:49 Zoffix chakli: just built from sauce directly
12:49 Zoffix huggable: sauce
12:49 huggable Zoffix, Install untested latest development version of Rakudo from source: https://github.com/zoffixznet/r#table-of-contents
12:50 teatime Zoffix: that's not what you wanted, is it?
12:50 teatime thought the whole problem w/ rakudobrew is it installs the latest untested version by default
12:50 stmuk hmm better advice would be to build the last release surely?
12:50 Zoffix That builds latest dev version. Stick `git checkout 2017.08` after `git pull` in that bash alias (I'm yet to update it to make it automatically figure out latest release tag)
12:51 Zoffix teatime: no, the whole problem with rakudobrew it uses wrappers that mess with stuff
12:51 teatime I see.
12:52 MasterDuke or the binary packages
12:52 Zoffix chakli: oh yeah, we have those
12:52 Zoffix huggable: debs
12:52 huggable Zoffix, CentOS, Debian, Fedora and Ubuntu Rakudo packages: https://github.com/nxadm/rakudo-pkg/releases
12:52 MasterDuke huggable: debs
12:52 huggable MasterDuke, CentOS, Debian, Fedora and Ubuntu Rakudo packages: https://github.com/nxadm/rakudo-pkg/releases
12:52 Zoffix .oO( too many options )
12:52 moritz docker!
12:52 stmuk Zoffix: something like https://github.com/tadzik/rakudobrew/pull/117 might help with the "last release"
12:53 El_Che moritz: actually, the binary pkgs were built with Docker in mind (and they are built with Docker as well) :)
12:53 stmuk (likely to go into my likely to be forked rakudobrew)
12:54 Zoffix stmuk: why change $cmd_sep on windows? `&&` does a truthy check while `&` just chains the comands, don't it?
12:55 stmuk I thought '&&' didn't work on windows at all (but could be wrong)
12:55 stmuk at least on cmd.exe I don't use powershell
12:56 Zoffix C:\Users\zoffi>perl6 -e "exit 1" && echo bar
12:56 Zoffix C:\Users\zoffi>perl6 -e "exit 0" && echo bar
12:56 Zoffix bar
12:56 Zoffix That's Win10 cmd.exe
12:56 stmuk ok
12:56 Zoffix and yeah, `&` just chains them
12:56 Zoffix and ignores exit codew
12:57 stmuk OK submit a PR
12:58 Zoffix A PR to PR? :D
12:58 stmuk :)
12:58 stmuk maybe I should remove the extra rakudobrew shims and leave the user to set PATH
13:00 timotimo HoboWithAShotgun: you just .unique(:as(*<text>)) on the Perlmonks.message
13:00 mr-fooba_ joined #perl6
13:02 timotimo oh, someone already told you
13:02 timotimo cool
13:03 mr-foobar joined #perl6
13:05 geekosaur joined #perl6
13:06 wander4096 https://gist.github.com/W4anD0eR96/b9e30faa85fc0dc8dd5e3bce8cacd95e
13:06 astj joined #perl6
13:07 wander4096 `say $/.made` in `method TOP` doesn't run
13:07 timotimo i think it has to be :actions instead of :{ction
13:07 timotimo yes, indeed
13:08 wander4096 oops
13:11 unclechu hey guys, when i use `run` can i close pipe (not just redirect it to `$*SPEC.devnull`) in declaration of `run` command? i wan't smth like `run 'someapp', :in(:close), :out(:close)`
13:13 MasterDuke unclechu: i think :!in, :!out might do what you want
13:15 unclechu MasterDuke: i just tested it, it doesn't closes pipes
13:15 timotimo i'm afraid you'll probably have to let it give you the pipe and close it manually
13:15 unclechu what exclamation mark means here?
13:15 timotimo m: say (:foo); say (:!foo)
13:15 camelia rakudo-moar ebd644: OUTPUT: «foo => True␤foo => False␤»
13:16 MasterDuke ah, my bad. i guess doing that just doesn't make those available to your program
13:17 astj_ joined #perl6
13:22 margeas joined #perl6
13:34 wander4096 any example to distinguish `/ '(' ~ ')' <expression> /` from `/'(' <expression> ')'/`?
13:35 wander4096 i have seen https://docs.perl6.org/language/regexes#index-entry-tilde_regex-~_regex-Tilde_for_nesting_structures
13:35 wander4096 but don't get a good understanding
13:35 wander4096 or they are same
13:37 Aaronepower joined #perl6
13:41 timotimo not the same. the ~ one will call the FAILGOAL method of your grammar (or the default one you inherit) if the final thing isn't found immediately after what you matched inside
13:42 timotimo m: say "(hello world lol)" ~~ / '(' ~ ')' [ \w+ \s \w+ ] /
13:42 camelia rakudo-moar ebd644: OUTPUT: «Nil␤»
13:42 timotimo oh, did i misremember?
13:42 timotimo m: grammar TwoWordsBetweenParens { regex TOP { / '(' ~ ')' [ \w+ \s \w+ ] / } }; say TwoWordsBetweenParens.parse("(hello world lol)");
13:42 camelia rakudo-moar ebd644: OUTPUT: «5===SORRY!5===␤Unrecognized regex metacharacter / (must be quoted to match literally)␤at <tmp>:1␤------> 3mmar TwoWordsBetweenParens { regex TOP {7⏏5 / '(' ~ ')' [ \w+ \s \w+ ] / } }; say T␤Unrecognized regex metacharacter   (must be qu…»
13:43 timotimo m: grammar TwoWordsBetweenParens { regex TOP { '(' ~ ')' [ \w+ \s \w+ ] } }; say TwoWordsBetweenParens.parse("(hello world lol)");
13:43 camelia rakudo-moar ebd644: OUTPUT: «Nil␤»
13:43 timotimo i seem to be mistaken
13:43 kaare__ joined #perl6
13:46 astj joined #perl6
13:49 wander4096 emmmm...
13:49 wander4096 so if matched, they are the same?
13:50 moritz m: grammar TwoWordsBetweenParens { regex TOP { '(' ~ ')' [ \w+ \s \w+ ] } }; say TwoWordsBetweenParens.subparse(("(hello world lol)")
13:50 camelia rakudo-moar ebd644: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in argument list; couldn't find final ')'␤at <tmp>:1␤------> 3eenParens.subparse(("(hello world lol)")7⏏5<EOL>␤»
13:50 moritz m: grammar TwoWordsBetweenParens { regex TOP { '(' ~ ')' [ \w+ \s \w+ ] } }; say TwoWordsBetweenParens.subparse("(hello world lol)")
13:50 camelia rakudo-moar ebd644: OUTPUT: «#<failed match>␤»
13:50 moritz m: grammar TwoWordsBetweenParens { regex TOP { '(' ~ ')' [ \w+ \s \w+ ] } }; say TwoWordsBetweenParens.subparse("(hello world)")
13:50 camelia rakudo-moar ebd644: OUTPUT: «「(hello world)」␤»
13:50 moritz you need a FAILGOAL method if you want to extract a proper error message
13:51 timotimo i thought there's a default failgoal that throws an exception for you
13:52 moritz there used to be. Now it just fails.
13:52 timotimo i see!
13:55 wander4096 got it
14:02 astj_ joined #perl6
14:03 llfourn joined #perl6
14:10 ShalokShalom_ joined #perl6
14:12 Sound joined #perl6
14:12 itaipu joined #perl6
14:20 astj joined #perl6
14:23 unclechu hey guys, is there anything that help me declare short aliases for autogenerated arguments by `MAIN` subroutine declaration? i mean i can declare `--foo` but how i should declare `-f` alias for `--foo`?
14:24 moritz unclechu: try sub MAIN(:f(:$force)) { }
14:26 unclechu moritz: thanks, it works as i expected. it's time to improve documentation :)
14:27 moritz unclechu: sure. What's your github username?
14:28 unclechu moritz: @unclechu but is this importatnt? i'm just going to make pr here https://github.com/perl6/doc
14:29 moritz unclechu: I sent yuo an invitation so that you can push directly, if you prefer
14:30 Sgeo joined #perl6
14:33 unclechu okay, thanks
14:34 audiatorix joined #perl6
14:35 audiatorix How does NativeCall go about getting the signatures of functions in a library?
14:35 timotimo you give it to it :)
14:36 audiatorix oh... OH
14:36 audiatorix oh my goodness
14:36 audiatorix But wait, what about functions of the same name and different arity?
14:37 audiatorix A compiled binary has no information on arity unless there's some outside information along with it
14:37 timotimo same name and different arity is not something that is possible
14:37 timotimo C++ does it by not having the same name
14:37 nadim joined #perl6
14:37 audiatorix Oh, that's not possible in C, right
14:38 audiatorix thanks a ton
14:38 timotimo fwiw, NativeCall also supports name mangling for C++ classes
14:40 wander4096 https://gist.github.com/W4anD0eR96/3690249b44c4484cef8437a2cc51aaa0
14:41 wander4096 can i parse it right without adding rules/tokens?
14:43 moritz rule expression {
14:43 moritz | <expression>+ % '+' { make [+] $<expression>.made }
14:43 moritz this is left recursion, and a very bad idea
14:44 moritz if you don't care about precendence, just have it be
14:44 moritz rule expression { <number>+ % <operator> }
14:44 moritz and token operator { <[+-]> }
14:44 moritz also regarding { make [+] $<expression>.made }
14:45 moritz since <expression> is quantified, $<expression> is an array
14:45 moritz m: say [].made
14:45 camelia rakudo-moar ebd644: OUTPUT: «No such method 'made' for invocant of type 'Array'. Did you mean any of these?␤    map␤    max␤    name␤    race␤␤  in block <unit> at <tmp> line 1␤␤»
14:46 moritz in 3 to 4 months I'll have a book published on that stuff...
14:46 moritz basically when you do recursion, you need to make sure that at least one character is consumed on the recursion path
14:49 dogbert11 moritz: do you know the codebase in htmlify.p6?
14:50 Geth ¦ doc: 788ca954d2 | (Viacheslav Lotsmanov)++ (committed using GitHub Web editor) | doc/Language/functions.pod6
14:50 Geth ¦ doc: MAIN sub: added example of argument short alias
14:50 Geth ¦ doc: review: https://github.com/perl6/doc/commit/788ca954d2
14:51 moritz dogbert11: I used to
14:51 moritz but now git blame says only 5% of the lines are my own anymore, so all bets are off
14:52 audiatorix Where is the source for NativeCall?
14:52 dogbert11 ok, I'm looking at https://docs.perl6.org/type.html, as you can see there's no description for backtrace event though one is available in the pod file
14:53 dogbert11 I'm 99 percent certain the reason is that htmlify gets confused by this header https://docs.perl6.org/programs/01-debugging#The_Backtrace_class
14:53 moritz audiatorix: rakudo repo, lib/NativeCall*
14:53 audiatorix thanks
14:54 dogbert11 triggering this code https://github.com/perl6/doc/blob/master/htmlify.p6#L583
14:55 dogbert11 should that code be run when going through the 'programs' directory?
14:55 moritz dogbert11: on https://docs.perl6.org/build-log/ you can check if that note was called
14:56 Geth ¦ doc: b0737a5ded | (Steve Mynott)++ | doc/Language/faq.pod6
14:56 moritz Backtrace does not have an =SUBTITLE
14:56 Geth ¦ doc: Warn about vendor versions less than 2015.12 since the code fragment to
14:56 Geth ¦ doc:
14:56 Geth ¦ doc: do this was deleted.
14:56 Geth ¦ doc: review: https://github.com/perl6/doc/commit/b0737a5ded
14:56 moritz from https://docs.perl6.org/build-log/build-2017-09-24T13:00+00:00.log
14:56 dogbert11 it is called, I have already checked :)
14:57 dogbert11 in the Backtrace.pod file in the type dir there is a SUBTITLE but not in  Debugging.pod
14:57 moritz dogbert11: no idea; until now I didn't even know that docs/Programs/ existed
14:58 moritz but back then[tm] the idea was that everything under doc/ gets processes
14:59 dogbert11 which might lead to problems if it encounters a heading in a debugging pod containing 'class' and 'Backtrace'
15:00 moritz there's class Backtrace::Frame
15:00 dogbert11 or the following https://docs.perl6.org/language/typesystem#Role_Parameters
15:00 dogbert11 yes, and that looks ok on the type page, i.e. the SUBTITLE/description is shown
15:00 rngoodn joined #perl6
15:02 nadim_ joined #perl6
15:02 dogbert11 if I changed the title from say 'The Backtrace class' to e.g. 'Backtraces' or some such the problem would be worked around
15:03 dogbert11 probably not the ideal solution though :)
15:03 piojo Speaking of docs, is there any magic we can do to help google searches for "perl6 argument unpacking" go to the docs for "destructuring"?
15:04 moritz piojo: SEO is a thing
15:04 piojo moritz: yeah, but I'm also asking about the philosophy of the docs and the terms
15:04 piojo since "unpacking" means something else,
15:05 piojo but it's such an intuitive term that it was used in the perl6 design docs
15:05 piojo (S06)
15:05 moritz I think it's OK to mention that term in the docs
15:05 piojo If it were up to me, I'd let "unpacking" mean both things, and I'd rewrite the "destructuring" section so both terms were used prominently, and as synonyms
15:05 piojo (with perhaps a note that says "for the 'unpack' function, see here")
15:06 moritz do it, see if somebody protests :-)
15:06 moritz forgiveness > permission is one of our mottos
15:06 piojo moritz: okay, I will. Thanks
15:06 skids joined #perl6
15:06 piojo haha
15:06 piojo When I first learned the basics of perl6, I had trouble with these terms since I couldn't remember "destructuring"
15:06 piojo though it is a kind of cool word
15:07 piojo Non-native speakers might also not like it as much
15:07 dogbert11 moritz: I'll do it and mention it to [Coke] when he turns up, perhaps he knows where to place a proper fix
15:09 piojo s/non-native/nonsfluent/
15:09 piojo s/nonsfluent/non-fluent/
15:10 xinming joined #perl6
15:10 Geth ¦ doc: 982982d1b0 | (Steve Mynott)++ | doc/Language/faq.pod6
15:10 Geth ¦ doc: fix doubled more
15:10 Geth ¦ doc: review: https://github.com/perl6/doc/commit/982982d1b0
15:12 setty1 joined #perl6
15:16 Geth ¦ doc: a3d65f2c65 | (Jan-Olof Hendig)++ | doc/Programs/01-debugging.pod6
15:16 Geth ¦ doc: Change headline so that it does not contain the word class and a type
15:16 Geth ¦ doc:
15:16 Geth ¦ doc: This is a workaround for a problem in which htmlify.p6 can be tripped
15:16 Geth ¦ doc: up when it encounters what looks like a type heading in a file which
15:16 Geth ¦ doc: is not present in the type directory. This will lead to subtitles,
15:16 Geth ¦ doc: i.e. descriptions, going missing on https://docs.perl6.org/type.html.
15:16 Geth ¦ doc: See https://irclog.perlgeek.de/perl6/2017-09-24#i_15210015
15:16 Geth ¦ doc: review: https://github.com/perl6/doc/commit/a3d65f2c65
15:21 dogbert11 The 'Parameters' type suffers from the same problem and the "role" 'auto-punning' shows up on the type page since it is believed to be a type when it really isn't
15:29 dogbert11 also, the following TITLE, "class X<utf8|utf, class>", from doc/Type/utf8.pod6, doesn't sit well with htmlify.p6, which can be seen on the very first line of https://docs.perl6.org/type.html
15:33 astj joined #perl6
15:34 astj_ joined #perl6
15:36 domidumont joined #perl6
15:41 sprocket joined #perl6
15:42 Geth ¦ doc: f1321d84f8 | (Steve Mynott)++ | doc/Language/faq.pod6
15:42 Geth ¦ doc: point all users not just beginners at star, more info about source build
15:42 Geth ¦ doc: review: https://github.com/perl6/doc/commit/f1321d84f8
15:42 sprocket hi #perl6 - just wanted to say that i LOVE the NativeCall library - it just saved me so much time and frustration compared to when i was faced with writing binding in C :)
15:42 sprocket so thank you, NativeCall wizards!
15:44 HoboWithAShotgun joined #perl6
15:45 Geth ¦ doc: 8952df26d3 | (Steve Mynott)++ | doc/Language/faq.pod6
15:45 Geth ¦ doc: mention existance of p6doc
15:45 Geth ¦ doc: review: https://github.com/perl6/doc/commit/8952df26d3
15:46 Zoffix \o/
15:53 khw joined #perl6
15:55 rumble joined #perl6
15:56 Geth ¦ doc: 9ba98366d3 | (Steve Mynott)++ | doc/Language/faq.pod6
15:56 Geth ¦ doc: define CPAN and perldoc for non-perl 5 users
15:56 Geth ¦ doc: review: https://github.com/perl6/doc/commit/9ba98366d3
16:00 Cabanossi joined #perl6
16:00 Aaronepower joined #perl6
16:00 Geth ¦ doc: 90389e3485 | (Steve Mynott)++ | doc/Language/faq.pod6
16:00 Geth ¦ doc: link cheat sheet
16:00 Geth ¦ doc: review: https://github.com/perl6/doc/commit/90389e3485
16:11 Geth ¦ doc: e8097195f7 | (Jan-Olof Hendig)++ | doc/Type/utf8.pod6
16:11 Geth ¦ doc: Fix broken TITLE in utf8.pod6
16:11 Geth ¦ doc: review: https://github.com/perl6/doc/commit/e8097195f7
16:30 Cabanossi joined #perl6
16:36 unclechu hey guys, how i can spawn a process and make it live after my app died?
16:36 unclechu in background
16:42 HoboWithAShotgun joined #perl6
16:51 rngoodn joined #perl6
16:52 * Zoffix doesn't know
16:52 timotimo hm, you'll want to read up on "daemonize", right?
16:52 teatime yeah... that is a good question...
16:52 timotimo there's some kind of trick called "double fork" or something?
16:53 timotimo but really you'll probably want to rely on some tool ... daemonize? daemon-tools?
16:54 Zoffix Well, this worked :P perl6 -e 'shell qw/perl6 -e '\''loop { sleep 1; say $++}'\'' &/; say "exiting"; '
16:55 Zoffix buggable: eco daemon
16:55 buggable Zoffix, Found 2 results: Monitor::Monit, UNIX::Daemonize. See https://modules.perl6.org/s/daemon
16:55 Zoffix buggable: eco daemonize
16:55 buggable Zoffix, UNIX::Daemonize 'configurable daemonizing tool written in Perl 6': https://github.com/hipek8/p6-UNIX-Daemonize
16:55 unclechu timotimo: not that kind of daemonize, i'm just writing simple utility, i don't want to overcomplicate it
16:55 unclechu i want to just run some gui application and die
16:58 Zoffix shell q/some-gui-application &/;
16:58 * HoboWithAShotgun greets the assembled genuises by ommiting the mother of all belches
16:59 unclechu Zoffix: okay, not the best way i could imagine but at least it works
17:00 imcsk8 joined #perl6
17:00 teatime unclechu: if you exit your shell, though, will not your gui app die from SIGHUP?
17:00 unclechu answer would be: "perl6 can't do it, but you can delegate it to shell"
17:01 Zoffix unclechu: the above module suggests perl6 can do :) You'd just use a module that wraps the gnarly bits for you :)
17:01 unclechu teatime: no, but i think it depends on application
17:02 AlexDaniel joined #perl6
17:04 Zoffix m: use NativeCall; sub fork returns int32 is native {}; fork() and exit; loop { say $++; sleep 1 }
17:04 camelia rakudo-moar ebd644: OUTPUT: «0␤»
17:04 Zoffix This also works.
17:05 * Zoffix has no idea what the double-fork trick is about.
17:06 teatime one optional means of disassociating oneself from a controlling terminal, I think
17:07 teatime man, I used to think I knew how the unix process model worked.  either I never did, or I forgot a lot.
17:08 Zoffix Ah
17:10 ugexe teatime: there is a libuv flag when spawning processes for making it detached
17:12 teatime is perl6 using libuv?
17:12 teatime I guess I should say, is rakudo
17:12 moritz yes
17:13 MasterDuke rakudo on MoarVM and JS is
17:15 unclechu hey guys, i'm confused about how i should declare explicit imports from external modules? how should i import only specific subroutine?
17:15 Cabanossi joined #perl6
17:16 astj joined #perl6
17:21 moritz a module can tag exports (sub foo is export(:bar, :baz) { }); then the use can import only certain tags (use MyModule :baz;)
17:22 unclechu moritz: so, there is no way to explicitly import exported subroutine if it isn't tagged by developer?
17:22 MasterDuke tbrowder++ has a blog post about exporting/importing http://blogs.perl.org/users/tom_browdef/2016/10/avoiding-namespace-pollution-with-modules-in-perl-6.html
17:23 timotimo .o( how hard could it be to implement )
17:24 unclechu Zoffix: i just tried UNIX::Daemonize, it isn't really detaching process, it's just forking my app and then keeps this fork alive while child application is alive, and this fork eats about 60MiB of my RAM, not cool, i see only raising shell for that is appropriate for me
17:41 Zoffix Too bad.
17:45 Zoffix What's the difference between `need` and `use`?
17:47 Zoffix the docs mention `use` is like `need + import` but `need` on its own seems to import symbols, so why is import also needed?
17:47 BenGoldberg joined #perl6
17:48 Zoffix unclechu: there's a way to do it at runtime but the compile time is still on the drawing board, it looks like: https://rt.perl.org/Ticket/Display.html?id=128090#ticket-history
17:49 Zoffix m: require Test <&ok>; ok 42; # runtime being this
17:49 camelia rakudo-moar ebd644: OUTPUT: «ok 1 - ␤»
17:50 Zoffix Oh, wait, `need` doesn't import anything. I may have been using `-MFoo` in my test
17:51 espadrine joined #perl6
17:52 Zoffix m: need Test; my &ok = &Test::EXPORT::DEFAULT::ok; ok 42
17:52 camelia rakudo-moar ebd644: OUTPUT: «ok 1 - ␤»
17:52 unclechu Zoffix: `need` works kinda `import qualified` in haskell, am i right?
17:52 Zoffix I guess that's another way.
17:52 Ben_Goldberg joined #perl6
17:53 Zoffix unclechu: I don't know Haskell. But the "qualified" stuff just passes positional args to sub EXPORT and named args are treated as tags, so it's all dependant on the author of the module. The ticket I linked to proposes reserving :ONLY tag and if it's specified to only import those symbols
18:00 Zoffix :ONLY<&foo $meow> should be easy enough to implement. Just need to add handling here, I think: https://github.com/rakudo/rakudo/blob/ebd6440c27ea07e2bfde4809fa4e97dac1491e69/src/Perl6/World.nqp#L845-L897
18:01 Zoffix Though maybe instead of :ONLY do :SYMBOLS and exclude :MANDATORY from the list if it's provided but include any other tags that are given
18:01 Zoffix :SYM even
18:02 * Zoffix is too lazy to do this
18:02 Zoffix I mean… buzy… :)
18:02 Zoffix Need to do 6.d prep
18:03 Zoffix m: say Date.new('2017-12-25') - Date.today
18:03 camelia rakudo-moar ebd644: OUTPUT: «92␤»
18:04 Zoffix .in 91d what's happening with the :SYM<> import, bruh? https://irclog.perlgeek.de/perl6/2017-09-24#i_15210457
18:04 yoleaux Zoffix: I'll remind you on 24 Dec 2017 18:04Z
18:12 Zoffix q/and exclude :MANDATORY from the list if it's provided/ <-- I meant don't implictly include it. If the user provided it on the tags list, then do include it.
18:12 astj joined #perl6
18:14 ufobat joined #perl6
18:32 unclechu Zoffix: i realized i could do explicit import this way: `require UNIX::Daemonize <&daemonize>;`
18:37 Rawriful joined #perl6
18:40 yht joined #perl6
18:58 Zoffix Yeah, that'll work. Though it's runtime, not compile time
19:02 skids joined #perl6
19:02 japhb .
19:02 yoleaux 08:06Z <Zoffix> japhb: a terminal input should be listed here: https://docs.perl6.org/type/IO::Handle#routine_getc However, what you linked to doesn't appear to have any documentation (at least one that talks about disabling buffering), so linking to it would just add more confusion.
19:02 yoleaux 08:07Z <Zoffix> japhb: *terminal input module I meant
19:05 japhb Zoffix: I don't understand your complaint about documentation.  People ask how to get individual keystrokes from the user.  That code is how.  If they want to know the details, they read the code.  If they just want it to work, they load the module and call the function.
19:06 * Zoffix rolls eyes
19:06 japhb If you're saying we should document the details of how to do that on different operating systems, that's a reasonable point -- but are we doing OS-specific docs on doc.perl6.org?
19:06 Zoffix A module without documentation is not a module. It's just a bundle of code.
19:07 Zoffix I wasn't complaing about it. I was responding to your "Pretty please point people with the terminal input question to".
19:07 |oLa| joined #perl6
19:09 japhb Zoffix: That module is better than all the people that say something like "I'm not sure.  Something to do with termios?  And input buffering?"  Nobody should be told to look at termios docs.  They should just be given working code as a better-than-nothing-until-docs-are-written answer.
19:09 japhb If we always waited until things were perfect before pointing people at the working-but-not-perfect thing, we'd be doing people a disservice.
19:11 japhb Also, that code has proper variable names, it has explanatory comments, it has a .WHY ... and it's less than 50 lines.  I'm not sure it's as bad as you're making it out to be.
19:13 astj joined #perl6
19:14 Zoffix japhb: but you only say that because you used that code and know what it's about. It's 300 lines of code. I know the language well and I still don't know what you want me to look at there.
19:14 epony joined #perl6
19:15 Zoffix How hard is it to write proper documentation?
19:20 eliv joined #perl6
19:22 Zoffix It's not code meant for users. There's no support offered for it. So I'm not gonna suggest people use it.
19:22 * Zoffix &
19:24 epony Zoffix Even if code is the end produce that users consume, documentation is integral part of it, otherwise it's nothing.
19:24 Morfent going back to undocumented code i wrote years ago and having no clue what's going on is fun
19:25 epony Sometimes it's only documentation that helps diagnose and fix the original intent.
19:25 epony Without documentation it's nothing, just scribbles with no maintenance and no reason to look at.
19:26 epony :-) Literate documentation
19:26 epony (reproducible)
19:30 epony I'd go even further as to apply standards as the succession to documentation and the essence to reproduce back the documentation and software.  But don't try apply this strictness everywhere, it does not apply to projects at design stage (unless they really are ambitious and intend to complete historically significant objectives).
19:39 Geth ¦ doc/master: 4 commits pushed by (Will "Coke" Coleda)++
19:39 Geth ¦ doc/master: 55b6340d02 | fix typo
19:39 Geth ¦ doc/master: f1eb6d5a00 | whitespace
19:39 Geth ¦ doc/master: 43f0cda9b6 | learn new code
19:39 Geth ¦ doc/master: 0cb741ba6c | fix code typo; pass xt/examples-compilation.t
19:39 Geth ¦ doc/master: review: https://github.com/perl6/doc/compare/e8097195f7...0cb741ba6c
19:41 [Coke] japhb: one annoyance, all the subs are foo_bar instead of foo-bar
19:42 Morfent idk i wouldn't try to treat documentation like code
19:42 Morfent different writing styles and all
19:42 japhb Zoffix: Do you consider examples to be documentation?  Do you consider a sensible API and a .signature that makes sense to be documentation?  Do you consider proper comments to be documentation?  Do you consider proper variable and constant naming to be documentation?  Do you consider .WHY to be documentation?
19:42 Morfent some general guidelines are fine though
19:43 japhb Zoffix: Because if none of those count, then ... it will be a long time before you recommend anything I write, because I do all of those things *before* writing Pod.
19:44 japhb [Coke]: All of mine are kebab-case.  What are you referring to?
19:45 geekosaur joined #perl6
19:45 mryan50 joined #perl6
19:46 rngoodn joined #perl6
19:47 japhb I only have a limited amount of keyboard time that my RSI will allow.  I spend some of it conversing in these channels (but most regulars will note, not that much and not that often).  Of the remaining time, I can either write good code, or good docs.  But I basically can't do both.  I write in Perl 6 in large part because I can write a lot more functionality in less code, so I can be efficient at that.
19:48 japhb But I put a lot of thought into the code that I do write.  And it is insulting to be told that the limited effort I have to give to the Perl 6 community is worthless because my RSI won't let me write long Pod docs.
19:49 [Coke] japhb: in NCurses.
19:49 astj joined #perl6
19:49 Zoffix japhb: no. I consider documentation something a user can read for a few minutes and know how to accomplish their task. Usually the SYNOPSIS would even contain copy-pasteable common-case, so those few minutes would be few seconds. There's no sensible API--there's only a collection of routines. In fact, the existing documenation suggests I should not be using the undocumented routines, but only those that are
19:49 japhb [Coke]: Ah, thank you, now your comment makes sense.  :-)
19:49 Zoffix documented
19:50 japhb Zoffix: OK, I understand your view, I think.
19:52 [Coke] also, having never really had to learn curses before, I don't want to have to learn how to use it now for this project either.
19:54 TEttinger joined #perl6
19:56 thou joined #perl6
19:59 epony no docs - no users, wrists wasted with no use
20:02 thou Hi, I'm trying to fix a bug in YAMLish, and I've shrunk it to a small test case:  https://gist.github.com/softmoth/5a3e34b041cfe7ba045503c7d86f617b  The bug can be seen by trying to parse a file with just "foo: no good\n". The problem is that "no" is a token and it's not backtracking in token element() to enable the inline-plain routine to match.
20:03 Xliff thou: You should be able to fix that by using quotes.
20:03 thou In my little test case I can change all the methods to "regex" and it still fails unless I change TOP to regex.
20:03 Xliff Ala: 'yes' | 'no'
20:04 Xliff If I understand this correctly.
20:04 thou Xliff, I don't think that's the issue; it matches fine if it's just "foo: no\n"
20:05 Morfent i was wondering what to do for a first project, but i got it
20:05 Morfent a utility to strip all comments out of a project
20:07 Morfent idk i'm short on ideas atm
20:07 thou Xliff: I just checked, quotes don't change behavior here, unfortunately. I'm not sure how to force it to backtrack into the plain() routine after inline() fails. In my gist, it's only the middle string that fails to parse ("no bar").
20:08 Geth ¦ doc: tbrowder++ created pull request #1579: PR for new program p6doc info is ready
20:08 Geth ¦ doc: review: https://github.com/perl6/doc/pull/1579
20:08 Xliff OK. I misunderstood.
20:09 unclechu Zoffix: i realized that i can spawn process that will be alive after my app is done by starting this process using Proc::Async instead of just Proc
20:09 unclechu so, it is possible in perl6
20:12 Xliff thou: I just added "foo: no good\n" to the loop in your gist and I can match it just fine. What version of perl6 are you using?
20:12 tbrowder .tell Morfent  check existing module Pod::Strip which is supposed to do the same thing
20:12 yoleaux tbrowder: I'll pass your message to Morfent.
20:13 Morfent oh
20:13 yoleaux 20:12Z <tbrowder> Morfent: check existing module Pod::Strip which is supposed to do the same thing
20:13 timotimo maybe it's supposed to strip regular comments, too?
20:14 astj joined #perl6
20:14 thou Xliff: Yes, my stripped down test is only the bit after the colon
20:15 thou Xliff: "foo: no good" fails with YAMLish itself. "no good" fails with the little grammar I made.
20:15 telex joined #perl6
20:16 thou "foo: so good" succeeds w/ YAMLish, likewise "so good" succeeds with my example.
20:17 thou Xliff: I've filed a bug report, hopefully YAMLish devs are more clever than I at sorting it out.
20:17 thou https://github.com/Leont/yamlish/issues/17
20:18 tbrowder Morfent: sorry, asleep again, thinking pod comments, not Perl 6 comments...
20:19 tbrowder but still, there may well be perl comments inside pod comments...
20:20 Zoffix unclechu: that's weird, given Proc uses Proc::Async under the hood
20:22 ChoHag joined #perl6
20:22 Zoffix Ah. If you wait long enough for Proc to start up, it works too: start run «perl6 -e "loop \{ sleep 1; say \$++ }"»; sleep 1
20:22 Zoffix (sleep for this purpose is no good; use Proc::Async :) )
20:23 unclechu yep, sleep is too dirty for that
20:26 char_var[buffer] joined #perl6
20:29 unclechu Zoffix: i have now this helper https://pastebin.com/cSAtfaKM
20:35 Geth ¦ doc: b140908fa9 | (Tom Browder)++ | doc/Programs/02-reading-docs.pod6
20:35 Geth ¦ doc: PR for new program p6doc info is ready
20:35 Geth ¦ doc: review: https://github.com/perl6/doc/commit/b140908fa9
20:35 Geth ¦ doc: 2c866a2f96 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Programs/02-reading-docs.pod6
20:35 Geth ¦ doc: Merge pull request #1579 from tbrowder/p6pod
20:35 Geth ¦ doc:
20:35 Geth ¦ doc: PR for new program p6doc info is ready
20:35 Geth ¦ doc: review: https://github.com/perl6/doc/commit/2c866a2f96
20:36 Morfent is .pm or .pm6 the typical convention for how you name perl module files?
20:37 timotimo i use .pm6
20:38 unclechu i use `.pl6`
20:40 Geth ¦ doc: ee22b967b3 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Programs/02-reading-docs.pod6
20:40 Geth ¦ doc: correct typo
20:40 Geth ¦ doc: review: https://github.com/perl6/doc/commit/ee22b967b3
20:43 leont joined #perl6
20:43 raiph joined #perl6
20:48 astj joined #perl6
20:59 jdv79 what if i just want the first line out of a supply?  is there a better way than .lines.tap,(get one line),tap.close?
21:00 Cabanossi joined #perl6
21:01 timotimo isn't there a .head method?
21:01 Aaronepower joined #perl6
21:01 timotimo yup, there is. it should do what you want
21:02 timotimo jdv79: ^
21:03 jdv79 thanks
21:07 tbrowder .tell stmuk please check the docs (Programs | Reading the docs  | p6doc - the Perl 6 pod reader) and see if the blurb needs changes
21:07 yoleaux tbrowder: I'll pass your message to stmuk.
21:08 tbrowder p6doc isn't indexed...will fix
21:10 leont joined #perl6
21:13 kyan joined #perl6
21:13 Geth ¦ doc: e1a42aba75 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Programs/02-reading-docs.pod6
21:13 Geth ¦ doc: need an indexing header
21:13 Geth ¦ doc: review: https://github.com/perl6/doc/commit/e1a42aba75
21:17 astj joined #perl6
21:22 Rawriful joined #perl6
21:29 Rawriful joined #perl6
21:29 travis-ci joined #perl6
21:29 travis-ci Doc build failed. Tom Browder 'need an indexing header'
21:29 travis-ci https://travis-ci.org/perl6/doc/builds/279302339 https://github.com/perl6/doc/compare/ee22b967b332...e1a42aba75bd
21:29 travis-ci left #perl6
21:29 buggable [travis build above] ☠ Did not recognize some failures. Check results manually.
21:29 thou Morfent: For fun I checked http://ecosystem-api.p6c.org/projects.json, and for files listed in "provides" there are 2,543 ".pm6" and 788 ".pm". There are no ".pl6".
21:41 kurahaupo joined #perl6
21:41 Morfent ah
21:41 Morfent i'll go with .pm6 then
21:41 Morfent thanks
21:42 rngoodn Is it possible to get one of the stuffed Camelia's somewhere or did you have to be at a conference or something like that to get one?
21:42 j_b_s joined #perl6
21:43 astj joined #perl6
22:03 astj joined #perl6
22:04 ChoHag joined #perl6
22:06 geekosaur joined #perl6
22:07 lizmat rngoodn: we usually only sell them at Perl / open source events
22:09 rngoodn lizmat: Ok, thanks.
22:09 lizmat next events: Amsterdam.pm meeting on 3 Oct, 7 Nov, NR.PM (in Cologne) on 19 Oct, 16 Nov
22:09 lizmat London Perl Workshop
22:10 lizmat emergency social in Bruxelles on 6 Oct
22:10 lizmat rngoodn: so where would you need one ?
22:10 jdv79 where is say implmented?
22:10 jdv79 method say in Mu is say(self)
22:11 lizmat src/core/io_operators I believe
22:11 jdv79 oh
22:11 itaipu joined #perl6
22:11 lizmat or do you mean .say ?
22:12 lizmat that would IO::Handle
22:12 jdv79 so there's no IO::Socket.Async.say() then
22:12 jdv79 even though its inherited from Mu and that prints to stdout
22:12 jdv79 seems very weird
22:12 rngoodn lizmat: I live in Albuquerque, NM and am just a CS student learning the language as a hobby. Thought it would be cool to own one if they were available for purchase online somewhere.
22:13 lizmat well, maybe we should make them available for purchase online  :-)
22:14 lizmat lemme discuss that with woolfy
22:14 lizmat please ping me again in about 18 hours or so
22:15 lizmat time for me to hit the sack now  :-)
22:15 lizmat afk&
22:15 rngoodn lizmat: Will do. Thanks!
22:23 astj joined #perl6
22:25 geekosaur joined #perl6
22:28 jameslenz joined #perl6
22:43 astj joined #perl6
22:46 skids joined #perl6
23:01 mryan50 joined #perl6
23:04 mcmillhj joined #perl6
23:11 profan joined #perl6
23:12 astj joined #perl6
23:18 epony joined #perl6
23:22 kurahaupo_ joined #perl6
23:27 astj joined #perl6
23:31 kurahaupo_ joined #perl6
23:35 kyan Why's Grammar::Tracer sometimes give output with lots of extra spacers at the beginning?
23:35 kyan E.g., one parse in my test suite has as its first line: "|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  TOP"
23:36 kyan I wonder if it's because there are a couple of tests that deliberately throw exceptions previously in the program — maybe the indentation level isn't reset correctly after an exception is thrown?
23:36 AlexDaniel kyan: do you have some code to reproduce the issue? I'd like to play with it
23:37 kyan AlexDaniel: I don't have a minimal test case, but I can put one together in a few
23:41 kyan Hm, well, my hypothesis about exceptions isn't the cause
23:41 timo joined #perl6
23:49 kurahaupo joined #perl6
23:50 kyan I've gotten it down to a specific pair of tests that are triggering it, now to pair down the grammar to the minimum...
23:51 astj joined #perl6
23:55 kurahaupo_ joined #perl6
23:55 kyan AlexDaniel: I haven't really been able to pare down the grammar that much, but: https://gist.github.com/ethus3h/26a84e752cf55562abc10a87d186c465
23:55 kurahaupo_ joined #perl6
23:56 kyan It does seem like some exceptions are causing it to act up, after all
23:56 kurahaupo__ joined #perl6
23:59 timotimo kyan: i know where to point you

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo