Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-11-03

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:17 Ven_ joined #perl6
00:20 AlexDaniel joined #perl6
00:32 aborazmeh joined #perl6
00:32 aborazmeh joined #perl6
00:58 perlawhirl joined #perl6
00:58 eliasr joined #perl6
01:03 dalek roast: 799f8f6 | TimToady++ | S32-exceptions/misc.t:
01:03 dalek roast: routine suggestions now leave off &
01:03 dalek roast: review: https://github.com/perl6/roast/commit/799f8f6d4b
01:04 yeahnoob joined #perl6
01:10 dalek nqp: 3fc7722 | TimToady++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
01:10 dalek nqp: tab damage
01:10 dalek nqp: review: https://github.com/perl6/nqp/commit/3fc77227e2
01:10 dalek nqp: 4888aa6 | TimToady++ | / (27 files):
01:10 dalek nqp: Merge branch 'master' of https://github.com/perl6/nqp
01:10 dalek nqp: review: https://github.com/perl6/nqp/commit/4888aa6625
01:10 dalek nqp: c199c14 | TimToady++ | / (48 files):
01:10 dalek nqp: Merge branch 'master' of https://github.com/perl6/nqp
01:10 dalek nqp: review: https://github.com/perl6/nqp/commit/c199c1440d
01:10 dalek nqp: 64f13fc | TimToady++ | / (8 files):
01:10 dalek nqp: Merge branch 'master' of https://github.com/perl6/nqp
01:10 dalek nqp: review: https://github.com/perl6/nqp/commit/64f13fc76d
01:10 dalek nqp: 237fd82 | TimToady++ | src/ (2 files):
01:10 dalek nqp: Merge branch 'master' of https://github.com/perl6/nqp
01:10 dalek nqp: review: https://github.com/perl6/nqp/commit/237fd82f13
01:10 dalek nqp: 9cc4494 | TimToady++ | / (15 files):
01:10 dalek nqp: Merge branch 'master' of https://github.com/perl6/nqp
01:10 dalek nqp: review: https://github.com/perl6/nqp/commit/9cc4494a9e
01:10 dalek nqp: 972432c | TimToady++ | src/QRegex/P6Regex/Actions.nqp:
01:10 dalek nqp: Catch missing + or - between cclass elems
01:10 dalek nqp: review: https://github.com/perl6/nqp/commit/972432c8c3
01:11 TimToady wow
01:11 dalek rakudo/nom: c0fa4af | TimToady++ | tools/build/NQP_REVISION:
01:11 dalek rakudo/nom: bump NQP to get missing + or - between cclass elems
01:11 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c0fa4af76c
01:13 finanalyst joined #perl6
01:21 Ven_ joined #perl6
01:25 TimToady those merges are all just from doing periodic ". config.status"
01:26 TimToady maybe there's a way to tune that out somehow?
01:32 dalek doc: de9e7f3 | (Stéphane Payrard)++ | doc/Language/faq.pod:
01:32 dalek doc: tyop
01:32 dalek doc: review: https://github.com/perl6/doc/commit/de9e7f3601
01:37 psch TimToady: that usually happen when you're not on origin HEAD, then commit and pull after
01:37 psch TimToady: that's assuming less git-familiarity than you might have, though
01:37 psch TimToady: rebasing usually purges merge commits
01:38 psch the funny bit is that git log only shows one merge commit
01:38 mrf urgh Its far to early.
01:38 psch so, yeah, something is weird in there
01:39 * psch shrugs
01:40 psch probably not really something i know enough about - neither it being early nor why there's so much merge commit spam
01:43 Actualeyes joined #perl6
01:44 mrf Its 1.45 in the UK. Thats early enough I think :D
01:48 tokuhiro_ joined #perl6
01:53 mrf m: say "hello" ~~ /l ** 0..2/
01:53 camelia rakudo-moar 273e89: OUTPUT«「」␤»
01:54 mrf m: say "hello" ~~ /l ** 1..2/
01:54 camelia rakudo-moar 273e89: OUTPUT«「ll」␤»
01:54 mrf ^ is that a bug? I would expect the 0**2 to match 2 l's as well
02:05 TimToady first match takes priority over longest, and it matches '' at the beginning
02:06 mrf TimToady: How come the 1..2 doesn't only match 1 l in the second example?
02:08 timotimo mrf: if you want that, you'd need frugal instead of greedy matching
02:08 yoleaux 2 Nov 2015 16:42Z <nine> timotimo: found another issue with the for range optimization. Now there's only one left (last/next support) till we have a clean spec test again :)
02:09 dayangkun joined #perl6
02:09 mrf timotimo: Yeah I am just confused why 0..2 appears as non greedy but 1..2 is greedy
02:09 timotimo it's not greedy vs non-greedy
02:09 timotimo it's what TimToady said. early match trumps all
02:09 timotimo so when it can match 0 times at the beginning, it's satisfied
02:10 timotimo m: say "lhello" ~~ / l ** 1..2 /
02:10 camelia rakudo-moar 273e89: OUTPUT«「l」␤»
02:10 timotimo er
02:10 timotimo m: say "lhello" ~~ / l ** 0..2 /
02:10 camelia rakudo-moar 273e89: OUTPUT«「l」␤»
02:10 timotimo you can see it greedily matches as many ls as it can. just turns out the most ls it could match at the beginning of "hello" is 0
02:11 mrf ...Right! so if it matches without having to step further along the string then it stops becuase its all ready matched
02:11 timotimo that's right
02:12 mrf Thats likely to have a rather large impact on my patch allowing ^x syntax
02:12 mrf becuase 0..* will always match surely
02:18 mrf on the plus side it means that the two failing tests in my patch are just erroneous tests. Which means its good to go
02:18 TimToady it's relatively useless for scanning, sure, but most parsing doesn't scan, but anchors each match at the end of the previous
02:19 mrf TimToady: Yeah. I can see its use. Just a lack of understanding on my part
02:19 sprocket joined #perl6
02:28 mrf TimToady: Don't worry about that earlier gist. I have pushed a PR for NQP to support using 1^ and ^2 for the ** quantifier
02:28 xpen joined #perl6
02:29 awwaiid Hello. Are any of the caller semantics for EVAL documented/standardized? I want to use things like use caller(...).line and have it use the 'context' passed in, but so far no dice
02:29 kaare_ joined #perl6
02:29 awwaiid as in  EVAL('callframe().file ~ ":" ~ callframe().line')  vs   EVAL('callframe().file ~ ":" ~ callframe().line', context => CALLER::)
02:34 mrf timotimo: You might be interested in that PR tbh
02:34 awwaiid I'm prrreetttyyyy sure the answer is "caller as a param for EVAL kinda works and is a rakudo-only feature"
02:38 BenGoldberg joined #perl6
02:45 atweiden joined #perl6
02:51 sprocket i’m writing a NativeCall binding to a struct whose structure differs on various platforms (ie. OS X vs Linux)
02:51 sprocket how can i write the definition so that the correct struct is used on different architectures?
02:51 sprocket at the moment i’ve got: if ($*KERNEL eq 'darwin') { … } else { …. }
02:52 sprocket but when i attempt to run, it complains that it “Could not locate compile-time value for symbol”
02:55 finanalyst joined #perl6
03:00 softmoth joined #perl6
03:03 BenGoldberg m: my uint8 $x = 1; $x +<= 7; say $x;
03:03 camelia rakudo-moar 273e89: OUTPUT«-128␤»
03:04 BenGoldberg m: my uint8 $x = 1; $x += 255; $x += 0; say $x;
03:04 camelia rakudo-moar 273e89: OUTPUT«0␤»
03:05 uruwi joined #perl6
03:11 dalek ecosystem: 23b1db8 | (Fayland Lam)++ | META.list:
03:11 dalek ecosystem: Add Cache::LRU to ecosystem
03:11 dalek ecosystem:
03:11 dalek ecosystem: See https://github.com/fayland/perl6-Cache-LRU
03:11 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/23b1db8246
03:13 raiph joined #perl6
03:16 psch mrf: fwiw, 1^ looks really weird to me
03:17 psch m: say 1^
03:17 camelia rakudo-moar 273e89: OUTPUT«5===SORRY!5=== Error while compiling /tmp/D2Luq2j7sD␤Missing required term after infix␤at /tmp/D2Luq2j7sD:1␤------> 3say 1^7⏏5<EOL>␤    expecting any of:␤        prefix␤        term␤»
03:17 psch mrf: i assume it's short for 1 ^.. *
03:17 mrf psch: yes.
03:18 psch well, it's not like i can parse every syntax in perl6 without having to think about it... :)
03:19 mrf I am not married to it. Was just easier to implement than catching another special case
03:19 psch i don't really object, it's probably a useful enough shorthand
03:20 psch considering /a{M,}/ is gone
03:20 mrf It certainly seemed useful enough as a 'more than' quantifier
03:20 psch so having /a ** M^/ as non-whatever-or-infix:<..>-for is neat
03:21 psch to rephrase, having /a ** M^/ as shorthand for /a ** M..*/ seems useful enough, considering perl5 allowed leaving either end out
03:21 timotimo except M^ would be M+1..*
03:21 timotimo with parens
03:22 timotimo i am late for bed
03:22 psch huh
03:22 psch yeah, that
03:22 psch also i apparently misremembered leaving M out in {M,N}
03:22 psch perl5 doesn't allow that
03:23 timotimo "perl5 doesn't do it" isn't a good reason to not do something, however, by now i'm afraid it might be a tiny bit more confusing to put ^ in there when it implies a +1 (or -1)
03:27 adu joined #perl6
03:28 Hotkeys Also while @foo[^10] easily reads as "the first 10 elements of foo", @foo[10^] doesn't seem as intuitive
03:28 Hotkeys I'm sure one could get used to it though
03:29 Hotkeys (thanks zero based arrays)
03:29 mrf Hotkeys: I am not sure that the patch I have added would support that but it does sound like it would be something that could be added.
03:30 Hotkeys if @foo[10^..*] is possible then I don't see why the shorthand for it wouldn't work
03:30 Hotkeys then again I'm no parsing expert
03:31 mrf I would certainly argue that it should exist if it doesn't already
03:31 raiph m: say 10^..*
03:31 camelia rakudo-moar 273e89: OUTPUT«10^..Inf␤»
03:31 raiph m: say list 10^..*
03:31 camelia rakudo-moar 273e89: OUTPUT«(11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 …»
03:33 mrf but in a regex it seems to make send to want /<token> ** 10^/ for more than 10. with + being synonymous with 0^ I suppose
03:33 Hotkeys it seems indexing with infinite ranges on infinite sequences gets unhappy
03:34 Hotkeys m: my @foo = 1..*; say @foo[10^..*];
03:34 Hotkeys m: my @foo = 1..20; say @foo[10^..*];
03:34 camelia rakudo-moar 273e89: OUTPUT«(timeout)»
03:34 camelia rakudo-moar 273e89: OUTPUT«(12 13 14 15 16 17 18 19 20)␤»
03:35 Ven_ joined #perl6
03:35 Hotkeys but it would still be reasonable for 10^ to work the same in that case
03:35 mrf m: my @foo = 1..20; say @foo[^10]; say @foo[10]; say @foo]
03:35 camelia rakudo-moar 273e89: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ywWJqbmNgW␤Unexpected closing bracket␤at /tmp/ywWJqbmNgW:1␤------> 0; say @foo[^10]; say @foo[10]; say @foo7⏏5]␤»
03:35 mrf m: my @foo = 1..20; say @foo[^10]; say @foo[10]; say @foo[10^..*]
03:35 camelia rakudo-moar 273e89: OUTPUT«(1 2 3 4 5 6 7 8 9 10)␤11␤(12 13 14 15 16 17 18 19 20)␤»
03:37 mrf m: my @foo = 1..20; say @foo[^10]; say @foo[10]; say @foo[10^]
03:37 camelia rakudo-moar 273e89: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ERfC_OKXTl␤Missing required term after infix␤at /tmp/ERfC_OKXTl:1␤------> 3ay @foo[^10]; say @foo[10]; say @foo[10^7⏏5]␤    expecting any of:␤        prefix␤        term␤»
03:38 mrf Hotkeys: it would look neatly symetrical
03:49 * PerlJam just spent about a minute staring at some P5 code wondering why it wasn't compiling ...
03:50 PerlJam Turns out I had used the P6 ternary op rather than the P5 one
03:50 mrf :D
03:50 sprocket joined #perl6
03:52 Hotkeys lol
03:54 atweiden m: class HOH is Hash {*}; my %h := HOH.new('a', 1); my %toml; %toml<a> = %h; say %toml<a>.WHAT; say %toml.perl;
03:54 camelia rakudo-moar 273e89: OUTPUT«(HOH)␤{:a(${:a(1)})}␤»
03:54 atweiden is there any way to customize Hash assignment so that the HOH<a> replaces the original %toml<a>?
04:04 mrf can anyone tell me how camelia outputs ␤ rathern than \n. Would really like if my tests could output a more readable form
04:07 Oatmeal joined #perl6
04:08 PerlJam .u  ␤
04:08 yoleaux U+2424 SYMBOL FOR NEWLINE [So] (␤)
04:09 PerlJam mrf: by outputting the appropriate unicoe char
04:09 awwaiid mrf: https://github.com/perl6/evalbot/blob/master/evalbot.pl#L289 and L291
04:09 PerlJam er, unicode
04:09 psch timotimo: i'm not saying that "perl5 doesn't allow it" is a good reason to not allow it.  it just makes my attempt at drawing parellels fall apart.  so that's more to be understood as "my argument isn't particularly stable under scrutiny", not "we shouldn't do that"
04:12 skids atweiden: I'm not sure what exactly you want to happen in the above.
04:13 atweiden skids: essentially i'm trying to label this as type HOH https://github.com/atweiden/config-toml/blob/master/lib/Config/TOML/Parser/Actions.pm#L838
04:13 atweiden it's pretty hacky
04:13 mrf awwaiid: cheers. I was hoping there would be some magic. Regex is simple enough though
04:14 mrf PerlJam: Yeah. Was hoping there was a method like .perl that would do it
04:15 awwaiid mrf: you could like: sub justsayin($x) { $x ~~ s/\n/␤/; say $x } . Could monkey-patch that sucker onto String
04:16 BenGoldberg m: operator postfix<^> { $n ^.. * }; m: my @foo = 1..20; say @foo[^10]; say @foo[10]; say @foo[10^];
04:16 camelia rakudo-moar 273e89: OUTPUT«5===SORRY!5=== Error while compiling /tmp/pwcuCT1a9Z␤Unexpected block in infix position (missing statement control word before the expression?)␤at /tmp/pwcuCT1a9Z:1␤------> 3operator postfix<^>7⏏5 { $n ^.. * }; m: my @foo = 1..20; say @␤ …»
04:16 BenGoldberg m: operator postfix<^> { $n ^.. * }; my @foo = 1..20; say @foo[^10]; say @foo[10]; say @foo[10^];
04:16 camelia rakudo-moar 273e89: OUTPUT«5===SORRY!5=== Error while compiling /tmp/s5wImMF2M5␤Unexpected block in infix position (missing statement control word before the expression?)␤at /tmp/s5wImMF2M5:1␤------> 3operator postfix<^>7⏏5 { $n ^.. * }; my @foo = 1..20; say @foo␤ …»
04:16 mrf awwaiid: Yeah. I have a is_match and not_match test methods so it should be easy enough to just add it there for now. There is so much new p6 syntax I just wanted to check I wasn't missing something before I did
04:16 BenGoldberg m: sub postfix<^> { $n ^.. * }; my @foo = 1..20; say @foo[^10]; say @foo[10]; say @foo[10^];
04:16 camelia rakudo-moar 273e89: OUTPUT«5===SORRY!5=== Error while compiling /tmp/yAKqKcqW6k␤Missing block␤at /tmp/yAKqKcqW6k:1␤------> 3sub postfix7⏏5<^> { $n ^.. * }; my @foo = 1..20; say @␤    expecting any of:␤        new name to be defined␤»
04:16 mrf awwaiid: thanks though
04:16 awwaiid mrf: cool, have fun :)
04:17 awwaiid mrf: interestingly I've been thinking that I might like an irssi pluging that un-does ␤, printing output nicely :)
04:17 mrf awwaiid: I will admit I am bored of writing tests for grammars
04:18 mrf awwaiid: really. I quite like the concise-ness. to each their own I suppose
04:18 awwaiid mrf: maybe you should reverse it and write some grammars for tests. Then write a generator that uses the grammar to generate compliant output.
04:19 mrf awwaiid: :D
04:19 awwaiid ok. I should clearly go to bed
04:20 mrf I should as well. Just waiting for the game to finish then I will go back to bed
04:22 BenGoldberg debug-cat: this is a test/
04:22 camelia debug-cat: OUTPUT«this is a test/»
04:23 BenGoldberg debug-cat: ooh, look, it thinks it's an echo-bot.
04:23 camelia debug-cat: OUTPUT«ooh, look, it thinks it's an echo-bot.»
04:27 BenGoldberg evalbotcontrol version
04:27 camelia This is evalbot revision 3235487
04:33 adu what's the difference between () and []?
04:34 Actualeyes joined #perl6
04:34 adu m: ().Array
04:34 camelia rakudo-moar 273e89: ( no output )
04:34 adu m: say ().Array
04:34 camelia rakudo-moar 273e89: OUTPUT«[]␤»
04:35 adu m: say [].Seq
04:35 camelia rakudo-moar 273e89: OUTPUT«()␤»
04:36 Ven_ joined #perl6
04:45 Hotkeys m: say ().WHAT
04:45 camelia rakudo-moar 273e89: OUTPUT«(List)␤»
04:45 Hotkeys m: say [].WHAT
04:45 camelia rakudo-moar 273e89: OUTPUT«(Array)␤»
04:45 Hotkeys adu: ^
04:46 adu Hotkeys: thanks
04:46 adu m: say [1, 2] Z, [3, 4]
04:46 camelia rakudo-moar 273e89: OUTPUT«((1 3) (2 4))␤»
04:46 adu m: say [1, 2] >>,<< [3, 4]
04:46 camelia rakudo-moar 273e89: OUTPUT«[(1 3) (2 4)]␤»
04:47 adu it looks like one of those preserves type and the other doesn't, are there any other differences between Z and hyper?
04:49 moritz adu: hyper is eager (even to the point where it's allowed to parallelize), Z is lazy
04:50 adu interesting
04:51 Hotkeys also note that Z alone does Z,
04:52 Hotkeys m: say <1 2> Z <3 4>
04:52 camelia rakudo-moar 273e89: OUTPUT«((1 3) (2 4))␤»
04:52 adu I didn't know if >><< defaults to ,
04:52 adu basically, I only know about grammars, so I'm trying to learn about the rest of Perl6
04:52 Hotkeys I don't believe it does
04:52 Hotkeys m: say <1 2> >><< <3 4>
04:52 camelia rakudo-moar 273e89: OUTPUT«5===SORRY!5=== Error while compiling /tmp/dEdagzv9iO␤Missing << or >>␤at /tmp/dEdagzv9iO:1␤------> 3say <1 2> >><7⏏5< <3 4>␤    expecting any of:␤        infix␤        infix stopper␤»
04:53 adu you know, to smooth out my knowledge
04:53 Hotkeys smooth knowledge is the best knowledge
04:53 adu I know a little bit about classes, but only enough to get the parsers to run
04:54 TimToady 10^ is not gonna fly either inside or outside of regex
04:54 TimToady way too ambiguous
04:54 adu TimToady!
04:54 TimToady and it's just not all that useful
04:55 adu what's next, FFI?
04:58 TimToady hmm, camelia ain't recompilin'
05:04 tokuhiro_ joined #perl6
05:05 psch probably broken jvm build
05:06 psch setinputlinesep{,s} is missing on jvm
05:06 adu how do I make a type alias?
05:06 psch someone recently brought up that camelia should build indepent for both backends, 'cause she apparently doesn't
05:07 adu like can I do type GString = OpaquePointer?
05:07 psch m: use NativeCall; constant GString = Pointer; my GString $x;
05:07 camelia rakudo-moar 273e89: ( no output )
05:08 adu psch: ah ok
05:08 psch hm, Pointer and OpaquePointer are probably different things.  the concept still applies
05:08 adu constant works
05:09 psch m: use NativeCall; constant GString = Pointer; my GString $x; $x.VAR.of.say
05:09 camelia rakudo-moar 273e89: OUTPUT«(Pointer)␤»
05:09 psch adu: note, it still contains a Pointer, not a GString
05:09 psch (where "it" is the container)
05:09 dalek roast: dc98136 | TimToady++ | S05-metasyntax/charset.t:
05:09 dalek roast: test that cclass elems require + or - between
05:09 dalek roast: review: https://github.com/perl6/roast/commit/dc98136c8a
05:14 adu psch: what am I doing wrong: http://pastie.org/10525745
05:17 adu I got "(Mu)" but I was expecting "!dlroW ,olleH"
05:18 adu o wait, I needed "returns Str" never mind
05:19 adu wow
05:19 adu that was super easy
05:19 * adu <3 NativeCall
05:20 adu you know what would be so great, like some kind of Advent Calendar, or something
05:20 TimToady we could, like, do it leading up to Christmas and all
05:20 lucs joined #perl6
05:20 adu I think people would like it
05:20 psch yeah, maybe host it on wordpress
05:20 psch cause that's easy
05:21 psch adu: it exists, https://perl6advent.wordpress.com/
05:21 adu I know
05:21 adu I was being facesious, or sardonic
05:21 adu I'm not sure which
05:21 psch well, that went over my head :)
05:22 psch that second paragraph from last years 24th is still pretty amazing, TimToady++
05:23 adu "facetious" sorry my sppeling is bad
05:23 psch well, actually the whole post is great, but i'm a sucker for silly puns
05:25 adu psch: have you ever heard of Spoonerisms?
05:26 psch adu: yes, i have.  i speak them occassionally, sometimes accidentally
05:26 adu http://c2.com/cgi/wiki?WorstPunEver
05:27 adu but yes, TimToady++
05:27 adu just because
05:29 psch now i'm getting a tad sad i can't share one of my favorite word plays
05:29 psch well, and expect people to understand it
05:30 psch "Das Leben gleicht in manchem Sinne einer Brille - man macht viel durch."
05:30 adu I wonder if there's going to be a post about exception handling this year.
05:30 psch adu: you can draft one :)
05:31 psch (the great thing about that quote is lost in translation... :P )
05:31 adu well I've been wondering Python has 4 sections to it's handlers, (1) try (2) catch (3) else (4) finally, and 1, 2 and 4 are obvious in Perl6, but I'm not sure how one would do (3)
05:33 adu actually, maybe 4 isn't obvious
05:33 psch m: sub f { fail }; with f() -> $res { say "did it" } else { say "nyet" }
05:33 camelia rakudo-moar 273e89: OUTPUT«nyet␤»
05:34 psch m: sub f { 1 }; with f() -> $res { say "did it" } else { say "nyet" }
05:34 camelia rakudo-moar 273e89: OUTPUT«did it␤»
05:36 psch that's what i can make up for (3)
05:36 psch (4) is just a LEAVE in the block that has the CATCH, i think
05:36 adu so else is run if no exception is thrown, finally is run regardless
05:36 psch almost, with is if for definedness
05:36 TimToady there's also KEEP and UNDO
05:36 psch oh, right.  UNDO is the better finally
05:36 psch well no
05:36 psch KEEP and UNDO seperate the possible cases for finally
05:36 psch so we have more granularity
05:36 psch m: if 0 { .say }; with 0 { .say }
05:36 camelia rakudo-moar 273e89: OUTPUT«0␤»
05:37 psch m: if 0 { say "if'd" }; with 0 { say "with'd" } # actually...
05:37 camelia rakudo-moar 273e89: OUTPUT«with'd␤»
05:37 psch m: if fail() { say "if'd" }; with fail() { say "with'd" }
05:37 camelia rakudo-moar 273e89: ( no output )
05:37 TimToady fail is a variant of return
05:38 Ven_ joined #perl6
05:38 psch oh, so i'm spreading intuited half-knowledge again...
05:38 psch i wanted to stop that, actually :/
05:38 adu psch: lol
05:38 TimToady just start spreading the ohter half instead
05:39 TimToady *other
05:39 lucs joined #perl6
05:40 adu I was thinking you could like set $cought = True in the CATCH block, which could be used to implement Python's else block
05:41 vendethiel joined #perl6
05:41 psch afair there's a bit missing still with exception handling
05:42 psch m: $!.pending
05:42 camelia rakudo-moar 273e89: ( no output )
05:42 adu it sounds like KEEP is similar to (try ... else), and KEEP and UNDO are like finally?
05:42 psch i think that doesn't actually hold the pending exceptions, if there were any
05:42 TimToady KEEP is like else, LEAVE is like finally
05:42 adu ah ok
05:42 TimToady iiuc
05:43 psch isn't UNDO like else?
05:43 psch i'm guessing python does it as "try this, if it dies do the else"
05:43 * psch goes back to S04
05:44 psch hmm
05:44 TimToady maybe else is more like the default {} inside CATCH
05:44 psch is a block exit through a CATCH that handles an exception unsuccessful..?
05:45 psch yeah, i think else is CATCH { default {} }
05:45 psch (to answer my own question: "probably not" }
05:45 adu psch: no, "catch" is run if an exception is thrown AND it matches the symbol given (if any), and "else" is run if an exception is NOT thrown
05:45 psch adu: ah, okay, then TimToady was right
05:46 adu and actually, UNDO reminds me of Go's defer
05:47 adu Perl6 is like every language I love rolled into one :)
05:47 psch and the missing bits you can just slang in :)
05:47 adu or maybe it's more like LEAVE
05:48 psch (depending on how comfortable you are with extending the grammar...)
05:48 adu psch: I've been thinking of writing a new slang
05:48 * adu <3 grammars
05:48 psch adu: did you look at the ones FROGGS++ implemented yet?
05:49 adu nope
05:49 psch https://github.com/FROGGS/p6-Slang-Piersing
05:49 adu psch: this is one of the grammars I wrote: https://github.com/andydude/p6-c-parser/blob/master/lib/C/Parser/Grammar.pm6
05:51 psch adu: oh, alright.  i guess that means the missing bit is knowing which pegs to hang your tokens on
05:51 adu I think the missing bit for me is learning how all the $* vars work
05:52 psch because (currently at least) a slang depends on knowing which tokens already exist, and how to replace the parts you want to change
05:53 llfourn and figuring out the basics of QAST :)
05:53 psch although i can't imagine not having to know what part of the language one wants to replace...
05:54 psch well, for finding pegs we at least have the --target=parse
05:54 psch llfourn: yeah, that's definitely useful, although i'm not sure it's always neccessary
05:55 adu like I would want to make a dramatically different slang, like put "use css; " at the top and the rest of the file would be css
05:55 llfourn psch: thanks I didn't even know aboout --target=parse
05:56 psch adu: https://github.com/tony-o/perl6-slang-sql/ is sort of a step in that direction
05:57 psch adu: it's of course different in that it exposes a keyword to parse the rest of the statment as a sublanguage
05:57 llfourn adu: I think a slang is a superset of whatever the main language is where as use css would be just replacing the MAIN language
05:58 * psch doesn't actually know how "use css;" could be useful, but maybe css is just not the best example
05:58 adu psch: that's pretty cool
05:58 adu perhaps
05:59 adu I mean, if you're making a web server, you probably want it at the statement level anyways
05:59 llfourn mmmm for CSS you would just want a grammar I think
05:59 psch i'd probably want a simplified subset, because all the newfangled magic css does nowadays seems a little silly to me :)
06:00 psch it's probably all the writing-a-compiler-in-java i do in my free time ;)
06:00 adu CSS is mostly dictionaryies anyways, except the occational gradient and/or url link
06:00 psch ...well, *helping* to write a compiler, don't want over-emphasize my contribution :P
06:00 psch +to
06:00 adu :)
06:03 llfourn I made a slang a while ago but I don't think it works anymore: https://github.com/LLFourn/perl6-slang-dotty
06:04 adu psch: there was some talk a few months ago of integrating NativeCall, Inline::C, and C::Parser into some kind of hybrid thing
06:06 psch adu: yeah, i remember
06:06 psch adu: as in, i remember the idea using C::Parser to autogen most of the NativeCall declarations
06:06 psch if not all of it
06:06 adu psch: something like that
06:08 adu llfourn: that's pretty involved
06:08 adu llfourn: where is Dotty?
06:08 llfourn adu: Dotty is a method call op?
06:08 llfourn . .? etc
06:09 adu Dotty::Slang::Grammar
06:09 adu Dotty::Slang::Actions
06:09 adu where are these defined?
06:10 llfourn https://github.com/LLFourn/perl6-slang-dotty/blob/master/lib/Slang/Dotty.pm
06:10 llfourn I build them dynamically
06:10 llfourn inside EVALs -- quite ugly :\
06:10 llfourn notice .^add_method etc
06:11 * adu *mind blown*
06:12 llfourn I think it's less complicated than it looks... I wonder if I could write it better now :)
06:12 retupmoca joined #perl6
06:13 llfourn ..maybe using parameterized roles
06:14 adhoc left #perl6
06:15 * llfourn goes afk for a while
06:15 tokuhiro_ joined #perl6
06:42 mrf TimToady: Will look at removing support for 10^ from my patch when I get in to work.
06:48 Ven_ joined #perl6
06:49 ShimmerFairy joined #perl6
07:10 telex joined #perl6
07:17 dalek Inline-Perl5: ffeb71a | (Stefan Seifert)++ | t/ (2 files):
07:17 dalek Inline-Perl5: Fix tests on platforms where objectids can be negative
07:17 dalek Inline-Perl5:
07:17 dalek Inline-Perl5: Fixes GH #46
07:17 dalek Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/ffeb71abf4
07:21 nine llfourn: https://github.com/niner/Inline-Perl5/issues/46#issuecomment-149920242 is a different issue
07:28 firstdayonthejob joined #perl6
07:33 llfourn nine: ok shall I make a new issue? :)
07:34 [Sno] joined #perl6
07:34 * llfourn checks if Inline::Perl5 still doesn't work
07:35 nine llfourn: yes, if it still doesn't work, please open a new issue. Output of perl6 -Ilib t/use.t may help diagnosing
07:35 rindolf joined #perl6
07:35 llfourn nine: sure thing
07:39 camelia joined #perl6
07:47 nine Does perl6-gdb-m work on OS X?
07:48 llfourn nine: like in general or on the test?
07:48 nine in general
07:48 llfourn nine: I find it's hit or miss
07:48 nine If it works in general, I'd of course be interested in its output on the test :)
07:49 llfourn I'll have a go :)
07:49 xpen joined #perl6
07:51 llfourn nine: nah debug aint working at all
07:51 [Tux] m:$*OUT.nl = "";
07:51 [Tux] m: $*OUT.nl = Str;
07:51 camelia rakudo-moar 273e89: OUTPUT«Cannot unbox a type object␤  in block <unit> at /tmp/S17UPVihvy:1␤␤»
07:52 [Tux] so half of RT#123978 has been addressed
07:52 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=123978
07:52 llfourn nine: would a core dump be useful?
07:53 nine llfourn: I doubt as I don't have OS X and Linux's tools probably won't be able to do anything with it.
07:54 RabidGravy joined #perl6
07:55 [Tux] test             50000    37.191    37.078
07:55 [Tux] test-t           50000    39.284    39.171
07:56 RabidGravy I think that's getting better
07:57 lizmat good *, #perl6!
07:57 nine Good morning lizmat! Thanks for the weekly :)
07:57 lizmat yesterday was better, I think
07:57 lizmat you're welcome!
07:59 finanalyst joined #perl6
07:59 [Tux] is the «$*OUT.nl = ""» fix a result of jnthn++'s grapheme work?
08:00 lizmat not grapheme, but IO work on MoarVM
08:01 lizmat m: &&::{}[];;   # this used to fail, but doesn't anymore
08:01 camelia rakudo-moar 273e89: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ePpNWTE8KT␤Undeclared routine:␤    & used at line 1␤␤»
08:01 lizmat ah, it does?
08:01 abraxxa joined #perl6
08:01 lizmat star-m &&::{}[];;
08:01 lizmat star-m: &&::{}[];;
08:01 camelia star-m 2015.09: OUTPUT«5===SORRY!5=== Error while compiling /tmp/PAXzNrMLiL␤Undeclared routine:␤    & used at line 1␤␤»
08:02 lizmat well, it doesn't fail for me locally anymore
08:02 lizmat test #19 in t/spec/integration/weird-errors.t
08:05 _mg_ joined #perl6
08:06 RabidGravy ew
08:14 abraxxa since upgrading to 2015.10 I can't run any DBIish test any more, they all fail with Could not find file 'DBDish::Oracle' for module DBDish::Oracle
08:15 abraxxa when run with perl6 -Ilib t/45-oracle-common.t
08:15 moritz abraxxa: sounds like a 'require' gone wrong
08:15 moritz abraxxa: did you merge from upstream DBIish?
08:15 moritz it's fixed there, I believe
08:15 abraxxa just checked its repo if there are any commits that i'd need to merge but it doesn't seem so
08:16 abraxxa this one? https://github.com/perl6/DBIish/commit/08d218e36db5aa54e766e5299318e7cf98841fee
08:16 abraxxa ok, merging
08:16 moritz yes, that one
08:16 tokuhiro_ joined #perl6
08:17 lizmat hmmm... looks like 76391ca91b37e14b323d broke sub a ($a is rw) {$a}; a 42
08:17 darutoko joined #perl6
08:17 lizmat test #5 in t/spec/S06-traits/misc
08:18 lizmat peschwa seems to have done that
08:18 RabidGravy naughty peschwa
08:18 moritz but that's supposed to fail, now?
08:18 moritz s/now/no/
08:18 lizmat yes, and it doesn't anymore
08:18 moritz ah
08:18 lizmat m: sub a ($a is rw) {$a}; a 42
08:18 camelia rakudo-moar 273e89: OUTPUT«Parameter '$a' expected a writable container, but got Int value␤  in sub a at /tmp/2qiClYJJ6U:1␤  in block <unit> at /tmp/2qiClYJJ6U:1␤␤»
08:19 lizmat huh?
08:19 lizmat m: use Test; sub a ($a is rw) {$a}; throws-like { a 42 }, X::Parameter::RW
08:19 camelia rakudo-moar 273e89: OUTPUT«    1..2␤    not ok 1 - code dies␤    ␤# Failed test 'code dies'␤# at /tmp/sIxNEMjt9i line 1␤    ok 2 - # SKIP Code did not die, can not check exception␤    # Looks like you failed 1 test of 2␤not ok 1 - did we throws-like X::Parameter::RW?…»
08:21 lizmat m: sub a ($a is rw) {$a}; { a 42 }
08:21 camelia rakudo-moar 273e89: ( no output )
08:21 ely-se joined #perl6
08:21 lizmat m: sub a ($a is rw) {say $a}; { a 42 }
08:21 camelia rakudo-moar 273e89: OUTPUT«Parameter '$a' expected a writable container, but got Int value␤  in sub a at /tmp/o7eih1KFDY:1␤  in block <unit> at /tmp/o7eih1KFDY:1␤␤»
08:21 lizmat so it apparently only doesn't fail if it's inside a block and nothing's done to it
08:21 moritz m: sub a ($a is rw) {say $a}; if 0 { a 42 }
08:21 camelia rakudo-moar 273e89: ( no output )
08:22 moritz m: use Test; sub a ($a is rw) {$a}; throws-like { sink a 42 }, X::Parameter::RW;
08:22 camelia rakudo-moar 273e89: OUTPUT«    1..2␤    not ok 1 - code dies␤    ␤# Failed test 'code dies'␤# at /tmp/1M3SzdJJlu line 1␤    ok 2 - # SKIP Code did not die, can not check exception␤    # Looks like you failed 1 test of 2␤not ok 1 - did we throws-like X::Parameter::RW?…»
08:23 RabidGravy okay, that's weird https://travis-ci.org/sergot/http-useragent/builds/88943847  whichs seems to suggest that Encode is broken but it tests fine here
08:24 RabidGravy is there anything gone in the last day that could have broken it?
08:35 dakkar joined #perl6
08:36 pdcawley joined #perl6
08:36 lizmat RabidGravy: doesn't ring a bell
08:37 RabidGravy yeah, odd. when my computer settles down I'll build a new rakudo and check again
08:46 lizmat .tell jnthn any idea what "get_boxed_ref could not unbox for the representation '20'" could mean ?
08:46 yoleaux lizmat: I'll pass your message to jnthn.
08:52 g4 joined #perl6
08:58 lizmat .tell jnthn nvm, needed some nqp::decont() sprinkling
08:58 yoleaux lizmat: I'll pass your message to jnthn.
08:58 espadrine joined #perl6
08:58 softmoth joined #perl6
09:10 Alina-malina joined #perl6
09:12 zakharyas joined #perl6
09:13 ][Sno][ joined #perl6
09:14 abaugher joined #perl6
09:18 kjs_ joined #perl6
09:21 dalek rakudo/nom: 6e490dc | lizmat++ | src/core/Range.pm:
09:21 dalek rakudo/nom: Move all of Range.pm into the GLR-era
09:21 dalek rakudo/nom:
09:21 dalek rakudo/nom: This results in moderate speedups of ~25% and some bug fixes related
09:21 dalek rakudo/nom: to ranges where the max is smaller than the min.
09:21 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6e490dcbed
09:22 RabidGravy erk, travis for http::useragent all good again now.  something a little weird going on there.
09:27 azawawi joined #perl6
09:27 azawawi hi
09:28 RabidGravy marning
09:30 Psyche^_ joined #perl6
09:30 RabidGravy azawawi, so what cool and excellent things are you going to make today?
09:31 lizmat afk for a few hours&
09:32 azawawi im looking at the github stars (i.e. interest) in my modules lol
09:33 RabidGravy :)
09:33 azawawi funny thing farabi (my old Perl 5 in-browser) experiment has the highest starred github repo
09:34 azawawi RabidGravy: Net::Curl has the same interest as farabi6... lol
09:35 azawawi RabidGravy: the funny thing is that selenium p6 module has the lowest even though i worked on it the most along with Electron
09:36 azawawi RabidGravy: so the least effort has the highest interest lol
09:37 RabidGravy even some of the P5 modules I have (e.g. Term::Readkey) which are depended on all over the place have very few stars
09:40 * RabidGravy stars some of azawawi's modules ;-)
09:40 andreoss joined #perl6
09:41 RabidGravy I wonder, idly, if there is an API for starring things on github and whether that could be integrated into modules.perl6.org
09:44 azawawi RabidGravy: thanks... it is not about starring... it is about working on stuff that really matters to the Perl 6 community :)
09:44 azawawi RabidGravy: but the stars are cool also lol
09:46 RabidGravy azawawi, absolutely
09:46 RabidGravy :)
09:50 RabidGravy unfortunately my TODO list is getting longer and longer - at some point the dam will burst and I will release a massive bunch of modules as I'm blocking on a few very small things
09:51 Ven_ joined #perl6
09:53 RabidGravy I've got about six in flight with various deadlocks and blockers
09:55 jnthn morning, #perl6
09:55 yoleaux 08:46Z <lizmat> jnthn: any idea what "get_boxed_ref could not unbox for the representation '20'" could mean ?
09:55 yoleaux 08:58Z <lizmat> jnthn: nvm, needed some nqp::decont() sprinkling
09:55 mrf morning jnthn
09:57 azawawi RabidGravy: I want to use Perl 6 in my workplace. Hence I am writing more support libraries.
09:58 jnthn azawawi++
09:58 RabidGravy I want to re-do https://github.com/jonathanstowe/Emitria as a Perl 6 application
09:59 RabidGravy ;-)
09:59 RabidGravy right shower
10:00 azawawi http://irclog.perlgeek.de/perl6/2007-05-14#i_16193  # first hello in Perl 6 as far as IRC  log gives me... it is a long time :)
10:01 jnthn awwaiid: The context arg to EVAL is decidedly "internal"; note that EVAL being uppercase is to indicate it's a special form, and the compiler is free to optimize away things if it doesn't see a literal call to EVAL in a given lexical scope.
10:02 jnthn .tell sprocket Define both structs, and then write constant TheStruct = $*KERNEL eq 'darwin' ?? TheOSXStruct !! TheLinuxStruct;
10:02 yoleaux jnthn: I'll pass your message to sprocket.
10:02 kjs_ joined #perl6
10:05 JimmyZ jnthn: do we have plans to expose fd to support some system call like https://github.com/MoarVM/MoarVM/issues/281 ?
10:07 jnthn Yeah, there's an RT that wants it too
10:07 JimmyZ that would be nice :P
10:08 JimmyZ not sure about handle though ..
10:08 JimmyZ file handle etc..
10:09 mrf m: say "ll" ~~ /l ** 3..4/
10:09 camelia rakudo-moar 273e89: OUTPUT«Nil␤»
10:10 mrf nqp-m: say("ll" ~~ /l ** 3..4/)
10:10 camelia nqp-moarvm: OUTPUT«Substring length (-5) cannot be negative␤   at gen/moar/stage2/QRegex.nqp:1778  (/home/camelia/rakudo-inst-1/share/nqp/lib/QRegex.moarvm:Str:18)␤ from gen/moar/stage2/NQPCORE.setting:696  (/home/camelia/rakudo-inst-1/share/nqp/lib/NQPCORE.setting.moarvm:join:1…»
10:11 mrf given that Rakudo/moar seems to hide that error from nqp I assume that is an expected error
10:12 jnthn Rakudo's Match.Str has just been more smartly implemented than NQP's I guess :)
10:13 jnthn Oh, or actually it returns Nil on a failed match
10:13 jnthn And NQP doesn't have Nil
10:15 mrf jnthn: question out of the blue. Do you think that ** 10^ should throw a specific warning in NQP? context: I am adding support for 1^..^10 style range quantifier in nqp
10:16 mrf jnthn: or do you think the 'Malformed range' error it currently throws is fine.
10:16 jnthn Malformed range seems fine to me
10:16 jnthn I've not really seen people try/expect 10^ to work in a ^10 way so far.
10:17 jnthn And every error we add bulks the compiler up a little more, so they should at least pull a little weight :)
10:17 Ven_ m: sub postfix:<^>($n){^$n}; 3.succ^
10:17 camelia rakudo-moar 273e89: ( no output )
10:17 Ven_ m: sub postfix:<^>($n){^$n}; say 3.succ^
10:17 camelia rakudo-moar 273e89: OUTPUT«^4␤»
10:17 mrf jnthn: yeah. It was something I was discussing very early this morning but TimToady has said no to it. So just wondering if we want to explict it
10:17 jnthn I don't think so, unless we see lots of people tripping over it, but so far they haven't.
10:18 mrf thats fine. It would have only really been a shortcut for 10^..* in any case which is not exactly a lot of chars. The only argument in its favour was the symetry with ^10 when getting things from arrays
10:22 espadrine joined #perl6
10:23 anaeem1 joined #perl6
10:29 RabidGravy JimmyZ: RT #126541
10:29 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=126541
10:29 RabidGravy please feel free to chime in if you can think of more use-cases
10:36 JimmyZ oh, new RT!
10:37 mrf https://github.com/perl6/nqp/pull/249
10:37 mrf Hopefully that meets approval now. :S
10:38 mrf ^ If there is someone this change should be documented then if someone can point that out then I will add them
10:45 dalek rakudo/nom: 45e56b8 | jnthn++ | src/core/Rakudo/Internals.pm:
10:45 dalek rakudo/nom: Hopefully unbust the JVM build.
10:45 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/45e56b8ed7
10:46 RabidGravy right off to the seaside to get some fresh air, play nicely now kids ;-)
10:46 RabidGravy see y'all later
10:47 softmoth joined #perl6
10:47 mrf RabidGravy: \o
10:48 jnthn RabidGravy: Enjoy :)
10:48 jnthn mrf: It looks good to me. Will you add some spectests also?
10:49 mrf jnthn: I added some tests to t/qregex/rx_quantifier. Was there somewhere else needed?
10:51 jnthn mrf: Yeah, those cover the regex engine, but we should have some in roast too, so it's actually tested as part of the Perl 6 langauge definition
10:51 dalek nqp: a3ab8d8 | (Mike Francis)++ | src/QRegex/P6Regex/ (2 files):
10:51 dalek nqp: Allow ^10 style ranges as a quantifier
10:51 dalek nqp: review: https://github.com/perl6/nqp/commit/a3ab8d8fb0
10:51 dalek nqp: 795fc8d | (Mike Francis)++ | src/QRegex/P6Regex/Grammar.nqp:
10:51 dalek nqp: Support ^* Inf ranges in quantifiers
10:51 jnthn Merged the PR
10:51 jnthn mrf++
10:51 dalek joined #perl6
10:51 mrf jnthn: point me to where they need to be added and I will happily add them :D
10:52 * mrf has now got a commit in 3 p6 repos :D
10:53 jnthn mrf: https://github.com/perl6/roast/blob/master/S05-metasyntax/repeat.t
10:53 mrf ok. Will add some tests in there.
10:55 pink_mist joined #perl6
10:56 jnthn Thanks
10:57 mrf np
11:09 Actualeyes joined #perl6
11:09 azawawi .tell RabidGravy to get the github stars on a certain github repo, get https://api.github.com/repos/rakudo/rakudo which returns a JSON response and use "stargazers_count" key :)
11:09 yoleaux azawawi: I'll pass your message to RabidGravy.
11:10 azawawi i think this will be useful on http://modules.perl6.org/ , number of stars and watchers a project has...
11:10 azawawi s/project/module/
11:12 * azawawi forks https://github.com/perl6/modules.perl6.org/ :)
11:13 moritz azawawi: don't you have push access already?
11:13 azawawi moritz: true lol
11:14 azawawi moritz: i always forget it :)
11:14 azawawi moritz: i will work on my fork and then commit it once it is working... safer that way
11:15 azawawi one thing i dont understand, most LICENSE files in our repo have "Copyright (c) 2000-2006, The Perl Foundation."
11:15 azawawi is that correct?
11:17 moritz azawawi: the copyright of the license is by TPF, the copyright of the module typically not
11:18 azawawi I find MIT license to be simpler though
11:18 azawawi but that's me  :)
11:18 tadzik +1 :)
11:18 yoleaux 1 Nov 2015 23:58Z <RabidGravy> tadzik: it would be a great boon to me if you could take a look at https://github.com/tadzik/JSON-Unmarshal/pull/9 :)
11:18 dalek nqp: c7104bc | jnthn++ | t/moar/03-line-seps.t:
11:18 dalek nqp: Actually test the important \n/\r\n case.
11:18 dalek nqp: review: https://github.com/perl6/nqp/commit/c7104bc03e
11:19 tadzik yoleaux: tell RabidGravy I just did, thanks a lot :)
11:19 tadzik .tell RabidGravy I just did, thanks a lot :)
11:19 yoleaux tadzik: I'll pass your message to RabidGravy.
11:19 tadzik thanks, yolo
11:21 dalek rakudo/nom: d48f6ed | jnthn++ | src/core/Rakudo/Internals.pm:
11:21 dalek rakudo/nom: Correct thinko in setting multiple separators.
11:21 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d48f6ed1a6
11:21 azawawi tadzik: :)
11:22 azawawi tadzik: i submitted a PR for rakudobrew build-zef... Can you check it out?
11:22 tadzik azawawi: it should be merged as of few minutes ago
11:22 azawawi tadzik: cool
11:23 azawawi hopefully it wont break anything :)
11:23 tadzik it didn't look like it was about to :P
11:24 azawawi cool
11:27 azawawi tadzik: re .bat for win32 panda, Nov 24, 2014 till now... the power of the followup :)
11:27 azawawi tadzik: thx :)
11:28 virtualsue joined #perl6
11:28 tadzik :)
11:29 tadzik I know a bit about open bugs hanging there forever :P
11:36 dalek roast: 80d5590 | lizmat++ | S03-operators/range-basic.t:
11:36 dalek roast: Some more Range tests
11:36 dalek roast: review: https://github.com/perl6/roast/commit/80d5590685
11:36 dalek rakudo/nom: 9979bf2 | jnthn++ | src/core/ (6 files):
11:36 dalek rakudo/nom: Move towards naving nl-in and nl-out.
11:36 dalek rakudo/nom:
11:36 dalek rakudo/nom: Now, nl-in is for input line separator, and supports being provided
11:36 dalek rakudo/nom: with an array of strings. The output line separator is nl-out. Plain
11:36 dalek rakudo/nom: nl is deprecated, but still has the effect of setting both for now.
11:36 dalek rakudo/nom: Note that Proc and IO::Socket::INET both need further updates.
11:36 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9979bf22da
11:38 dalek roast: f985b22 | jnthn++ | S (3 files):
11:38 dalek roast: Track nl => nl-in/nl-out change.
11:38 dalek roast: review: https://github.com/perl6/roast/commit/f985b22449
11:38 mr-foobar joined #perl6
11:47 woolfy left #perl6
11:49 aborazmeh joined #perl6
11:49 aborazmeh joined #perl6
11:53 xpen joined #perl6
11:54 chenryn joined #perl6
11:58 virtualsue left #perl6
11:59 Ven_ jnthn: is there no point to leaving :nl to be both an alias to :nl-in and :nl-out?
12:01 jnthn Ven_: I don't think so, 'cus it opens the "what if you pass that *and* nl-in" can of worms
12:01 dalek rakudo/nom: eabc734 | lizmat++ | src/core/Range.pm:
12:01 dalek rakudo/nom: Make Array methods throw an Awesome error message
12:01 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/eabc734984
12:01 Ven_ jnthn: yeah, sure, but that already exists for, say, open, with :r/:w and :rw
12:01 Ven_ (I'd know, it took me 3 PRs to get it working correctly :P)
12:02 jnthn I'm not sure one existing awkward case justifies adding another ;)
12:04 Ven_ it might justify removing the original awkward case ;)
12:07 andreoss m: «(1 2 3)».WHAT.say
12:07 camelia rakudo-moar 273e89: OUTPUT«(List)␤»
12:09 andreoss m: «(1,2,3)».WHAT.say
12:09 camelia rakudo-moar 273e89: OUTPUT«(Str)␤»
12:11 sufrostico joined #perl6
12:12 eliasr joined #perl6
12:12 jnthn m: «(1 2 3)».perl.say
12:12 camelia rakudo-moar 273e89: OUTPUT«("(1", IntStr.new(2, "2"), "3)")␤»
12:12 lolisa joined #perl6
12:12 jnthn It splits on whitespace, and there ain't any in the second one.
12:13 pdcawley m: quasi { $bibble }.perl.say
12:13 camelia rakudo-moar 273e89: OUTPUT«5===SORRY!5=== Error while compiling /tmp/NZE8SMuuvL␤Variable '$bibble' is not declared␤at /tmp/NZE8SMuuvL:1␤------> 3quasi { 7⏏5$bibble }.perl.say␤»
12:13 pdcawley m: quasi { $bibble }.WHAT.say
12:13 camelia rakudo-moar 273e89: OUTPUT«5===SORRY!5=== Error while compiling /tmp/4kb2wCJeTN␤Variable '$bibble' is not declared␤at /tmp/4kb2wCJeTN:1␤------> 3quasi { 7⏏5$bibble }.WHAT.say␤»
12:14 pdcawley m: my $bibble = 1; quasi { $bibble }.perl.say
12:14 camelia rakudo-moar 273e89: OUTPUT«AST.new␤»
12:14 pdcawley Hmm... is that going to make a scope injecting macro a bit tricky to write?
12:16 lizmat masak might know, but he's probably having dinner about now
12:18 tokuhiro_ joined #perl6
12:18 pdcawley lizmat: I'm just surprised that the quasi thinks it knows the scope in which it's going to be evaluated.
12:19 pdcawley m: quasi { 1 }
12:19 camelia rakudo-moar 273e89: ( no output )
12:19 pdcawley m: quasi { 1 }.perl.say
12:19 camelia rakudo-moar 273e89: OUTPUT«AST.new␤»
12:19 pdcawley m: quasi { 1 }.eval.say
12:19 camelia rakudo-moar 273e89: OUTPUT«Method 'eval' not found for invocant of class 'AST'␤  in block <unit> at /tmp/cqcCUem9S2:1␤␤»
12:19 lizmat pdcawley: /me fully Perl 6 macro noob
12:19 * pdcawley grins
12:19 lizmat pdcawley: it's EVAL nowadays
12:19 pdcawley m: quasi { 1 }.EVAL.say
12:19 camelia rakudo-moar 273e89: OUTPUT«Method 'EVAL' not found for invocant of class 'AST'␤  in block <unit> at /tmp/MUMHc92jXD:1␤␤»
12:20 lizmat ok, but not for AST's apparently :-)
12:20 pdcawley So, how do I evaluate an AST in an environment.
12:20 masak I'm here :)
12:20 jnthn Note that most macro exploration is actually being done by masak outside of the Rakudo repo, and that macro/quasi etc. are deferred to 6.future
12:20 jnthn Ah, there's masak :)
12:20 pdcawley I _think_ quasi { $bibble } failing to compile is a bug, if the AST doesn't have an environment attached.
12:20 masak short answer: quasis are not a get-out-of-jail-free card with regards to scoping.
12:20 pdcawley jnthn: fair enough.
12:21 pdcawley masak: they bloody well should be.
12:21 masak if you want unhygiene, you'll want to refer to things (or declare them) as COMPILING::
12:21 pdcawley Since the AST they generate doesn't know its scope.
12:21 masak pdcawley: well, you're wrong about that.
12:21 pdcawley masak: Then why doesn't $anAST.EVAL do anything?
12:21 dalek roast: daaa141 | lizmat++ | S02-types/range.t:
12:21 dalek roast: Add some Immutable and some int-bounds tests
12:21 dalek roast: review: https://github.com/perl6/roast/commit/daaa1413bd
12:22 masak pdcawley: I'm sorry, I don't understand your question. could you rephrase?
12:22 masak you're aware that macros are not fully featured in Rakudo, right?
12:22 pdcawley masak: Am now :)
12:26 masak Qtrees should be able to do .EVAL, but I'm not sure .EVAL is a good name for that.
12:26 masak in 007 I've taken to calling it .melt, following some kind of "ASTs are solid, runtime values are liquid" analogy
12:30 andreoss if i have a grammar and an action class what should i do to make it work with EVAL ... :lang<Mygrammar>?
12:31 andreoss i've tried to figure it out from rubish example, but it seems broken and also in nqp
12:31 arnsholt From memory, you need to nqp::compreg a compiler object that implements the HLL::Compiler interface
12:32 esh joined #perl6
12:35 pierrot joined #perl6
12:35 softmoth joined #perl6
12:35 jojotus joined #perl6
12:36 awwaiid thanks jnthn. I'm using EVAL to build a REPL, you see.
12:37 dalek doc: aa3c53f | lizmat++ | doc/Type/Range.pod:
12:37 dalek doc: Add some badly needed Range documentation
12:37 dalek doc: review: https://github.com/perl6/doc/commit/aa3c53f53e
12:38 kid51 joined #perl6
12:38 llfourn andreoss: EVAL is a multi so you can export something with :lang<MyLang>
12:38 andreoss` joined #perl6
12:39 llfourn andreoss: are you introducing your language by messing with %*LANG?
12:41 andreoss` not really, i have a simple grammar that parses lisp code and building simple ast (nested arrays), i wonder how much effort would it take to turn it into a Slang
12:41 Ven_ joined #perl6
12:42 lizmat .oO( Lisp In A Block: Wow! )
12:42 llfourn andreoss: I haven't done a fully contains language in perl6 before but I guess exporting a multi EVAL is best place to start to call your language from p6
12:42 jnthn .oO( It's my Lisp in a block, girl... )
12:45 jnthn andreoss`: I'd take a look at one of the existing slangs; getting it wired up to EVAL probably isn't enough for that.
12:45 * jnthn has an NQP that is totally happy with rn as a single grapheme and is spectesting Rakudo at the moment
12:46 jnthn Couple of fails :/
12:47 pink_mist (\r\n as a single grapheme)++
12:48 jnthn Ah, first failing one is a test that does a silly workaround for Windows anyway
12:49 aborazmeh joined #perl6
12:49 aborazmeh joined #perl6
12:49 llfourn andreoss: if you create a slang by modifying %*LANG you won't get EVAL to work either from my experience. When EVALing p6 will use %?LANG to determine which language to use -- but modifying %*LANG doesn't do %?LANG.
12:51 llfourn I haven't seen a slang module that provides some way of using the slang in eval other than EVAL 'use MySlang; ...'
12:52 masak andreoss`: did you see https://github.com/masak/ipso ?
12:55 xpen joined #perl6
12:56 andreoss` masak: no, but seems like what i was trying to do
12:56 masak :)
12:57 Ven_ macro m { state $x++; quasi { $x } }; for ^3 { say m; }
12:57 Ven_ m: macro m { state $x++; quasi { $x } }; for ^3 { say m; }; for ^3 { say m; }
12:57 camelia rakudo-moar 273e89: OUTPUT«2␤2␤2␤2␤2␤2␤»
12:57 Odud joined #perl6
12:57 Ven_ masak: ^ wat? why is my $x not captured?
12:58 masak Ven_: should be, AFAICS.
12:58 Ven_ so, "bug"?
12:58 masak yeah
12:58 masak feel free to submit
12:58 * Ven_ nods
12:58 Ven_ I wouldn't want to take that away from you ;-)
12:59 Odud Trting to install Inline::Perl5 using panda on Windows 10 and getting 'cl' is not recognized as an internal or external command error reported by nmake - any ideas/solutions
12:59 * masak submits rakudobug
12:59 dalek nqp: c7bfa55 | jnthn++ | src/QRegex/P6Regex/Actions.nqp:
12:59 dalek nqp: Smarter fix for \v under NFG.
12:59 dalek nqp: review: https://github.com/perl6/nqp/commit/c7bfa5546d
12:59 dalek nqp: db2fdbb | jnthn++ | t/qregex/01-qregex.t:
12:59 dalek nqp: Harden test against \r\n -> 1 grapheme.
12:59 dalek nqp: review: https://github.com/perl6/nqp/commit/db2fdbbf87
13:00 jnthn Odud: It can't find the compiler, it seems. Try running "vcvars64" (or maybe "vcvars32") to see if it sets up your environment enough for things to work.
13:01 jnthn (I'm assuming you actually do have a C compiler to hand, given you have nmake)
13:01 andreoss` left #perl6
13:02 Odud Hi jnthm I have installed the community edition of Visual Studio so assumed the compiler is there, thanks for your suggestions also I will go and check the path looks ok
13:03 llfourn m: my $check = "a"; my $sub = sub ($ where $check) { }; $check = "b"; $sub("a") # any way to freeze the value of $check
13:03 camelia rakudo-moar 273e89: OUTPUT«Constraint type check failed for parameter '<anon>'␤  in sub  at /tmp/MMlDsvqOLo:1␤  in block <unit> at /tmp/MMlDsvqOLo:1␤␤»
13:04 stmuk Odud: there is a link from the start menu called something like "developer prompt" for VS you could try that too
13:04 masak Ven_: huh -- no, wait
13:04 masak Ven_: it's `state`, so it's *shared* between both macro calls, no?
13:04 masak Ven_: that's what `state` does.
13:04 Ven_ I increment it.
13:04 jnthn masak: I strongly advise against using "state" in macros, fwiw. :)
13:05 Ven_ sub f { $++ }; say f, f, f; # shared but different
13:05 Ven_ m: sub f { $++ }; say f, f, f; # shared but different
13:05 camelia rakudo-moar 273e89: OUTPUT«012␤»
13:05 masak jnthn: yes, but what *should* it do? :)
13:05 arnsholt masak: I guess the question is what the quasi {$x} is supposed to do
13:05 jnthn masak: The state vars will persist across compilations, and conflict across concurrent compilations...
13:05 masak Ven_: yes, but with the macro they all evaluate late.
13:05 arnsholt Should it freeze $x at the time of evaluation, or not
13:05 masak Ven_: and the increments happen early.
13:05 moritz $*W.sorry('"state" in macros is a really bad idea')
13:05 masak Ven_: so I no longer see the bug.
13:06 arnsholt Yeah, what moritz said =D
13:06 Ven_ masak: then I feel even stronger against this kind of scope mixups ;)
13:06 Ven_ recipe for disaster
13:06 masak we've been down the road of trying to restrict things we don't see the use of before...
13:06 arnsholt Thinking some more towards what this would be in something like CL, I'm inclined to say it's not a bug
13:06 masak right
13:07 masak I think I can reason my way to that being correct
13:07 masak Rakudo++ # correct :)
13:07 Ven_ arnsholt: CL doesn't allow you to do crazy stuff like (let ((x 2)) `(x))
13:07 masak ENOTABUG
13:07 Ven_ perl6/007's macros allow this
13:07 masak the waves have gone high in #6macros about this today
13:09 Ven_ that they have. it's something that's going to trip up a lot of people ;)
13:09 masak it shouldn't be about what will trip up people, it should be about what you can use to build useful things
13:10 arnsholt Ven_: Sure it lets you let() over a defmacro(). But trying to write down the CL code, it doesn't actually make sense to do so for what you wrote, I think
13:10 masak imagine if someone came to regexes as they were being built and said "backtracking? that's going to trip up a lot of people! don't do that." :)
13:10 _mg_ joined #perl6
13:11 masak I will take arguments against Perl 6 scoping a lot more seriously when I feel that the arguments are starting from a general sympathy with Perl and Perl 6 thinking.
13:11 masak not with what's expected coming from a Lisp direction.
13:11 arnsholt Oh, I agree
13:11 masak and yes, I am reading all the required books. slowly.
13:11 masak I am paying attention. I am taking notes.
13:12 arnsholt I just find that all my thinking about macros ends up being in terms of Common Lisp
13:12 nine Backtracking? What doya wanna next? Recursion?
13:12 masak my main conclusion is that Perl 6 is not exactly Lisp :)
13:12 arnsholt Common Lisp being the only language with macros with I know
13:12 masak and trying to bolt Lisp macros onto Perl 6 would not end happily
13:12 arnsholt Yeah, I think something like Dylan is a better point of comparison
13:12 masak Dylan is on my list of things to look at, yes.
13:13 arnsholt (Assuming Dylan is the one with macros, which I think it is)
13:13 masak it is.
13:14 arnsholt Interestingly, I hacked up some CL code similar to what Ven_ wrote. Got an interesting result
13:15 arnsholt CL-USER(1): (load "test.lisp")
13:15 arnsholt ; Loading /home/arne/test/test.lisp
13:15 arnsholt 1
13:15 arnsholt 2
13:15 arnsholt 3
13:15 arnsholt 4
13:15 arnsholt T
13:15 arnsholt https://gist.github.com/arnsholt/4d285d91f7ad8bb892b4
13:15 arnsholt Whoops, a bit of a mispaste there
13:16 arnsholt Although, I guess the weird result might be due to magic happening in the loop() macro
13:17 stmuk if I type "panda" it takes 5 secs to return the help args
13:18 masak m: my $c = 0; macro m() { my $n = $c++; quasi { say $n } }; for ^3 { m() }; for ^3 { m() }
13:18 camelia rakudo-moar 273e89: OUTPUT«0␤0␤0␤1␤1␤1␤»
13:18 masak works as advertised.
13:19 masak so if you want to *share* state across macro calls, you use `state`.
13:19 masak if you don't want that, you use `my` and the kind of copying used above.
13:19 masak easy :)
13:20 darutoko- joined #perl6
13:20 masak er, but that `= 0` in the beginning is probably bogus. ignore that.
13:20 masak it will be run *late*, not *early*.
13:20 * masak likes this distinction more and more
13:21 masak m: BEGIN my $c = 0; macro m() { my $n = $c++; quasi { say $n } }; for ^3 { m() }; for ^3 { m() }
13:21 camelia rakudo-moar 273e89: OUTPUT«0␤0␤0␤1␤1␤1␤»
13:21 masak there. :)
13:21 stmuk does the --verbose flag on t/harness still work?
13:21 stmuk for roast
13:21 samigarus joined #perl6
13:21 arnsholt I guess it's the comple-time vs. run-time distinction all over again
13:22 oahong joined #perl6
13:22 masak arnsholt: yes, but -- macros are runtime inside of compile time
13:22 sufrosti1o joined #perl6
13:22 tony-o joined #perl6
13:22 arnsholt Yeah. And you need to keep track of the distinction between run-time for the *macro* code, and run-time of the code generated by the macro code
13:23 masak aye
13:23 f3ew joined #perl6
13:23 masak and the things that pass into the macro "freeze" and are no longer values, they're trees
13:24 Alina-malina joined #perl6
13:25 arnsholt Yup
13:25 masak and the quasi is a run-time value representing a compile-time AST that you put back into the program so it can run later
13:25 arnsholt Whee, fun! =)
13:27 dalek doc: c16e4d8 | smls++ | doc/Type/List.pod:
13:27 dalek doc: expand &reduce documentation
13:27 dalek doc: review: https://github.com/perl6/doc/commit/c16e4d886b
13:27 dalek nqp: 1358834 | jnthn++ | src/vm/moar/QAST/QASTRegexCompilerMAST.nqp:
13:27 dalek nqp: Remove special case not needed post-NFG.
13:27 dalek nqp:
13:27 dalek nqp: This will regress a couple of tests until we bump to an NFG-supporting
13:27 dalek nqp: MoarVM.
13:27 dalek nqp: review: https://github.com/perl6/nqp/commit/1358834992
13:27 dalek nqp: 1a0ead0 | jnthn++ | / (12 files):
13:27 dalek nqp: Bump Moar for \r\n as 1 grapheme; rebootstrap.
13:27 dalek nqp: review: https://github.com/perl6/nqp/commit/1a0ead0045
13:27 dalek nqp: 568f06a | jnthn++ | src/QRegex/P6Regex/Actions.nqp:
13:27 dalek nqp: Make \r\n in a regex mean the grapheme.
13:27 dalek nqp: review: https://github.com/perl6/nqp/commit/568f06a45f
13:30 jnthn lunch &
13:30 mrf jnthn++ # You have just saved me writing a whole new grammar with that change
13:32 mattn_jp_ joined #perl6
13:32 dalek rakudo/nom: d02fede | lizmat++ | src/core/ (2 files):
13:32 dalek rakudo/nom: Handle Array methods on List/Range similarly
13:32 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d02fede868
13:32 cygx joined #perl6
13:33 dalek roast: ae478c6 | lizmat++ | S02-types/ (2 files):
13:33 dalek roast: Handle testing Array methods on List/Range similarly
13:33 dalek roast: review: https://github.com/perl6/roast/commit/ae478c6516
13:35 cygx jnthn: I figured out that NativeCall was to blame for my inability to export a multi trait_mod:<is> - cf #126547
13:35 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=126547
13:35 cygx going things with NativeCall also makes the bytecode sizes of precompiled modules blow up
13:35 cygx *doing
13:40 abraxxa I want to store native typed values in a  hash for passing to a NativeCall function but fail
13:40 cygx jnthn: including NativeCall to add a Pointer parameter declaration added 1.7m to the bytecode size...
13:40 abraxxa my long $valuep = $v; %!in_bind_for{$k} = $valuep; fails with Native call expected argument that references a native integer, but got P6opaque
13:41 abraxxa the issue I'm facing is that Perl6 seems to garbage collect a variable I'm passing by reference to a C function
13:41 lizmat abraxxa: if you could golf that, that would be much appreciated
13:42 lizmat there's an nqp::op to force a gc, I forget what it was, maybe nqp::force_gc ?
13:42 abraxxa lizmat: ???
13:42 lizmat m: use nqp; nqp::force_gc   # indeed, that's it
13:42 camelia rakudo-moar 273e89: ( no output )
13:43 abraxxa golf? Dieselgate?
13:43 lizmat https://en.wikipedia.org/wiki/Code_golf
13:43 llfourn abraxxa: reproduce it in a very compact way :)
13:43 abraxxa llfourn: i see, thanks
13:44 abraxxa don't think that's easily possible as this involves Oracle OCI
13:44 lizmat perhaps the use of nqp::force_gc might help you to reproduce the problem better ?
13:44 abraxxa if I do %!in_bind_for{$k} := $valuep; the NativeCall error goes away but the problem persists
13:45 abraxxa I still don't get the difference between = and :=
13:45 raiph joined #perl6
13:45 lizmat m: my $a := 42; $a = 666
13:45 camelia rakudo-moar 273e89: OUTPUT«Cannot assign to an immutable value␤  in block <unit> at /tmp/CraQ1CHvD4:1␤␤»
13:45 lizmat m: my $a = 42; $a = 666
13:45 camelia rakudo-moar 273e89: ( no output )
13:46 llfourn m: my $a = 1; my $b := $a; $b = 42; say $a;
13:46 camelia rakudo-moar 273e89: OUTPUT«42␤»
13:46 lizmat m: my $a = 42; my $b := $a; dd :$a,:$b; $b = 666; dd :$a,:$b
13:46 camelia rakudo-moar 273e89: OUTPUT«Int a = 42␤Int b = 42␤Int a = 666␤Int b = 666␤»
13:46 lizmat := binds (aliases), = just assigns
13:46 lizmat m: my $a = 42; my $b = $a; dd :$a,:$b; $b = 666; dd :$a,:$b
13:46 camelia rakudo-moar 273e89: OUTPUT«Int a = 42␤Int b = 42␤Int a = 42␤Int b = 666␤»
13:47 abraxxa why does passing %!in_bind_for{$k} to the NativeCall function throw this error?
13:47 abraxxa m: my %hash; my $k = "foo"; %hash{$k} = 3; say %hash{$k}.WHAT;
13:47 camelia rakudo-moar 273e89: OUTPUT«(Int)␤»
13:48 abraxxa m: my $v = 3; my long $valuep = $v; my %hash; my $k = "foo"; %hash{$k} = $valuep; say %hash{$k}.WHAT;
13:48 camelia rakudo-moar 273e89: OUTPUT«5===SORRY!5===␤Type 'long' is not declared␤at /tmp/XIpaN4h4X0:1␤------> 3my $v = 3; my long7⏏5 $valuep = $v; my %hash; my $k = "foo"; ␤Malformed my␤at /tmp/XIpaN4h4X0:1␤------> 3my $v = 3; my7⏏5 long $valuep = $v; my %hash; my $k…»
13:48 abraxxa m: use NativeCall; my $v = 3; my long $valuep = $v; my %hash; my $k = "foo"; %hash{$k} = $valuep; say %hash{$k}.WHAT;
13:48 camelia rakudo-moar 273e89: OUTPUT«(Int)␤»
13:49 abraxxa why is it Int and not long?
13:49 lizmat I think that's because Perl 6 hashes can only have P6 objects, not natives
13:50 lizmat m: my %h; my int $a = 42; %h<a> = $a; dd %h<a>
13:50 camelia rakudo-moar 273e89: OUTPUT«Int $var = 42␤»
13:50 lizmat so the native got upgraded to a HLL Int
13:51 abraxxa what do you propose to do to pass native typed vars to the NativeCall function and prevent gc to happen before the C library access the memory region by pointer?
13:52 lizmat well, the question is really I think: why do you want to use a hash ?
13:52 abraxxa my idea was to have a hash of in and out binds in the StatementHandle object so they don't get gc-ed
13:53 abraxxa and as the placeholders are keyed a hash is better suited than an array
13:54 abraxxa i won't need to access the in binds later but need it for the out binds (data returned by a query)
13:54 aborazmeh joined #perl6
13:54 aborazmeh joined #perl6
13:54 lizmat I think you will get a better impedance match if you would define constants for indexes, and then use a native array
13:55 lizmat brb
14:02 [Coke] java build failed.
14:03 [Coke] make
14:03 [Coke] ./perl6-j --target=jar --output=lib/Test.pm.jar -Ilib lib/Test.pm
14:03 [Coke] java.lang.NullPointerException
14:03 [Coke] in  (gen/jvm/CORE.setting)
14:03 [Coke] in  (gen/jvm/ModuleLoader.nqp:380)
14:03 [Coke] ...
14:03 [Coke] that's with a fresh build of nqp as well.
14:05 domm joined #perl6
14:12 ZoffixW joined #perl6
14:12 Ven_ arnsholt: part of it is because you're just dealing with a self-evaluating, non quoted value in your gist. Also, you're emulating "state", which wasn't the point of my ((let)) example
14:12 Ven_ masak: using "my $foo; macro xx { $foo }" makes me think there's yet another time mixup
14:12 ZoffixW How would I convert a hex string to base10 int?
14:12 ZoffixW m: say "ff".base(10)
14:12 camelia rakudo-moar 273e89: OUTPUT«Method 'base' not found for invocant of class 'Str'␤  in block <unit> at /tmp/GBkYRd3P8L:1␤␤»
14:12 masak Ven_: not really.
14:12 Ven_ oh, you said it later
14:12 dalek modules.perl6.org: 9a665e2 | azawawi++ | web/build- (6 files):
14:12 dalek modules.perl6.org: chmod -x build-*.png
14:12 dalek modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/9a665e2c60
14:12 ShimmerFairy m: say :16<FF>
14:12 Ven_ yes, because the macro is run at parse time, and $foo doesn't have the value then
14:12 camelia rakudo-moar 273e89: OUTPUT«255␤»
14:12 masak Ven_: it's difference between static structure and runtime frames.
14:12 Ven_ how so? $foo's assignment is run later than the macro is, ain't it?
14:12 ZoffixW And actually, what I'm doing is trying to unpack hex string, say, "ffbbcc" into R G B ints, but I'm having a real trouble with Perl types getting in the way
14:12 masak Ven_: variables very much have values at parse time. in the static lexpads.
14:12 masak Ven_: that's how constants work.
14:13 masak Ven_: that's how BEGIN-time works.
14:13 Ven_ constants, yes, variables?
14:13 Ven_ m: my $a = 5; BEGIN say $a;
14:13 camelia rakudo-moar 273e89: OUTPUT«(Any)␤»
14:13 ZoffixW ShimmerFairy, but how do I do that with variables?
14:13 Ven_ which is what I'd expect.
14:13 ZoffixW m: my $str = "ffbbcc"; my ( $r, $g, $b ) = map ( :16<$_> ), $str ~~ /(..)(..)(..)/; say [ $r, $g, $b ].perl
14:13 camelia rakudo-moar 273e89: OUTPUT«5===SORRY!5=== Error while compiling /tmp/lNBPz9adLs␤Malformed radix number␤at /tmp/lNBPz9adLs:1␤------> 3"ffbbcc"; my ( $r, $g, $b ) = map ( :16<7⏏5$_> ), $str ~~ /(..)(..)(..)/; say [ $r,␤    expecting any of:␤        number in radix …»
14:13 ShimmerFairy m: my $a = "2A"; say :16($a)
14:13 camelia rakudo-moar 273e89: OUTPUT«42␤»
14:13 ShimmerFairy ^^^ that's how :)
14:14 ZoffixW ShimmerFairy++ thanks
14:14 masak Ven_: me too.
14:14 perl6sum joined #perl6
14:14 masak Ven_: I did fix that late assignment later, using a BEGIN.
14:15 Ven_ masak: which is exactly what I pointed at around 15:12 (well, definitely not *your* $localtime)
14:15 sprocket joined #perl6
14:15 * Ven_ isn't really sure where masak++ is right now :)
14:17 perl6sum how to get autocompletion in perl 6 in interactive session
14:17 perl6sum I am running rakudo star latest on windows 10
14:17 perl6sum i get prompt when I type perl6 in cmd prompt
14:18 stmuk perl6sum: http://doc.perl6.org/language/faq#How_can_I_get_command_line_history_in_the_perl_6_prompt_%28REPL%29%3F
14:19 stmuk actually I don't think it works for autocompletion just yet, although there was an experimental attempt a few months back
14:19 skids joined #perl6
14:19 stmuk just history
14:19 perl6sum stmuk I want autocompletion
14:19 ZoffixW Is there a nice way to get a list of matches of a regexp using a single statement? I'm having trouble with types:
14:20 ZoffixW m: my $str = "ffbbcc"; my ( $r, $g, $b ) = map ( :16($_) ), $str.match(/(..)(..)(..)/).list; say [ $r, $g, $b ].perl
14:20 camelia rakudo-moar 273e89: OUTPUT«Cannot call UNBASE(Int, Any); none of these signatures match:␤    (Int:D $base, Any:D $num)␤    (Int:D $base, Str:D $str)␤  in block <unit> at /tmp/DhQdHcjwKs:1␤␤»
14:20 ZoffixW Why am I getting "Any" there?
14:21 moritz ZoffixW: map { :16($_) }
14:21 moritz ZoffixW: otherwise the :16($_) is evaluated before it's passed to map
14:22 ZoffixW moritz++ thanks
14:22 masak Ven_: I'm in UTC+08:00
14:22 masak 'night, #perl6
14:23 ZoffixW Night
14:23 JimmyZ masak is in china? :)
14:23 jnthn cygx: I guess NativeCall is probably doing something that's bad for pre-comp.
14:26 Ven_ pdcawley: I'd also agree quasi{} shouldn't do that, but we've established that the current quasi{} isn't a quasi
14:26 espadrine joined #perl6
14:26 jnthn m: my $str = "ffbbcc"; my ( $r, $g, $b ) = map { :16($_) }, $str.comb(/../); .say for $r, $g, $b
14:26 camelia rakudo-moar 273e89: OUTPUT«255␤187␤204␤»
14:27 lizmat wonder if $str.comb(2) would be a lot faster there
14:27 lizmat commute to Amsterdam.pm meeting&
14:30 ZoffixW Thanks. I'll read up on .comb
14:31 espadrine_ joined #perl6
14:32 dalek rakudo/nom: d598af3 | jnthn++ | src/core/Str.pm:
14:32 dalek rakudo/nom: Prepare Str.lines for \r\n as 1 grapheme.
14:32 dalek rakudo/nom:
14:32 dalek rakudo/nom: Leave it able to support JVM too.
14:32 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d598af3f0b
14:37 dalek modules.perl6.org: 426a267 | azawawi++ | Build.PL:
14:37 dalek modules.perl6.org: IO::Socket::SSL 1.94+ is needed for Mojo::UserAgent
14:37 dalek modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/426a2672fc
14:38 ZoffixW 0.o we have a Mojo::UserAgent now
14:39 ZoffixW Oh. I thought it was a P6 module :P
14:40 isBEKaml joined #perl6
14:42 dalek rakudo/nom: 3e6bc1e | (Steve Mynott)++ | src/core/Kernel.pm:
14:42 dalek rakudo/nom: fix S02-magicals/KERNEL.t on DragonFly BSD by upper casing signal names
14:42 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3e6bc1ea8f
14:42 dalek rakudo/nom: a94389e | jnthn++ | src/core/Kernel.pm:
14:42 dalek rakudo/nom: Merge pull request #571 from stmuk/nom
14:42 dalek rakudo/nom:
14:42 dalek rakudo/nom: fix S02-magicals/KERNEL.t on DragonFly BSD by upper casing signal names
14:42 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a94389e5fb
14:42 azawawi joined #perl6
14:42 azawawi ZoffixW: hi
14:42 ZoffixW azawawi, hey
14:43 azawawi ZoffixW: im trying to edit module.perl6.org repo to add watchers_count and stargazers_count
14:43 azawawi ZoffixW: e.g. https://api.github.com/repos/rakudo/rakudo
14:44 azawawi ZoffixW: if we have those two columns, we can sort by them. What do you think?
14:44 azawawi ZoffixW: i.e. to find the most popular or used modules
14:46 dalek roast: fa4431a | jnthn++ | S16-filehandles/io_in_while_loops.t:
14:46 dalek roast: Update test to cope with Windows line ending too.
14:46 dalek roast: review: https://github.com/perl6/roast/commit/fa4431ae9e
14:48 dalek roast: 125cf07 | jnthn++ | / (17 files):
14:48 dalek roast: Fix Windows line ending workarounds.
14:48 dalek roast:
14:48 dalek roast: The completion of the NFG work making \r\n a single grapheme, per the
14:48 dalek roast: Unicode spec, means that the approaches these tests took to work on
14:48 dalek roast: Windows became bogus. Note that we'll probably have to take a pass
14:48 dalek roast: through these all again in the near future, when \n in a string will
14:48 dalek roast: become \r\n on Windows by default (hopefully clearing up a lot of
14:48 dalek roast: this cruft).
14:48 dalek roast: review: https://github.com/perl6/roast/commit/125cf077af
14:50 dalek roast: 2d5a420 | (Steve Mynott)++ | S06-traits/misc.t:
14:50 dalek roast: correct typo
14:50 dalek roast: review: https://github.com/perl6/roast/commit/2d5a4200ac
14:52 dalek rakudo/nom: 75b2451 | jnthn++ | tools/build/NQP_REVISION:
14:52 dalek rakudo/nom: Bump NQP_REVISION for \r\n as 1 grapheme.
14:52 dalek rakudo/nom:
14:52 dalek rakudo/nom: This may have some ecosystem fallout for code that has been written
14:52 dalek rakudo/nom: assuming that "\r\n".chars will be 2. Thankfully, since .chomp is
14:52 dalek rakudo/nom: used in most such cases, this should be relatively little.
14:52 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/75b2451e38
14:54 dalek roast: 302de05 | jnthn++ | S15-nfg/grapheme-break.t:
14:54 dalek roast: Unfudge test for \r\n as a single grapheme.
14:54 dalek roast: review: https://github.com/perl6/roast/commit/302de05d8f
14:55 azawawi ZoffixW: open_issues_count is useful also
14:55 ZoffixW azawawi, OK.
14:55 ZoffixW azawawi, that info should be in this hashref: https://github.com/perl6/modules.perl6.org/blob/master/web/lib/P6Project/Hosts/Github.pm#L117
14:55 ZoffixW So, $repo->{stargazers_count} etc
14:55 ZoffixW azawawi, and yeah, I think it would be good to have more info.
14:55 ZoffixW My only concern is we're making that table wider and wider.
14:55 ZoffixW Or rather, not wider, but tighter :P 'cause all of the extra info has to fit it on one row.
14:55 azawawi ZoffixW: hmmm, top 10 lists?
14:55 azawawi ZoffixW: e.g. https://metacpan.org/favorite/leaderboard
14:55 ZoffixW Woohoo Mojolicious is #1 :) Before even Perl :D
14:55 azawawi ZoffixW: Mojolicious is the new Perl 5 :)
14:55 ZoffixW azawawi, yeah, I think having something like this—a separate page—might be more useful.
14:55 isBEKaml hoelzro: ping
14:55 azawawi ZoffixW: true since why do you want to sort them repos with no stargazers...
14:55 azawawi ZoffixW: /sort them/sort/
14:55 isBEKaml hoelzro: have you had enough success with vim-perl syntax highlighting for perl6?
14:55 isBEKaml hoelzro: I ask since I see this weirdness on vim right now: https://github.com/rakudo/rakudo/blob/3e6bc1ea8f15a7cd7e745a6cb09dbb3e2009c1de/src/core/Kernel.pm#L13
14:55 isBEKaml hoelzro: It seems to treat the '|' as scope delimiters for s// :-)
14:55 isBEKaml hoelzro: that said, this should really go through: https://github.com/vim-perl/vim-perl/issues/194
14:55 azawawi ZoffixW: also badges column is redundant in the sense why do i need to see success badges, show me failed audits
14:55 PerlJam ZoffixW: as long as your making changes ... why does travis say "build passing"  or "build failing" etc?   The word "build" seems superfluous.   Maybe remove that to gain a tiny bit more horizontal space.
14:55 PerlJam s/your/you're/
14:55 isBEKaml .tell hoelzro sorry, I left too many messages for you in the backlog. Please check messages around this timestamp :-)
14:55 yoleaux isBEKaml: I'll pass your message to hoelzro.
14:55 jnthn That's RT #125927 ticked off :)
14:55 isBEKaml jnthn: I was just looking at that ticket :-)
14:55 freeze joined #perl6
14:55 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=125927
14:55 nine jnthn: congratulations!
14:56 hoelzro isBEKaml: I can look at this more in depth later, but first - are you using the latest version of syntax/perl6.vim from vim-perl?
14:56 yoleaux 14:54Z <isBEKaml> hoelzro: sorry, I left too many messages for you in the backlog. Please check messages around this timestamp :-)
14:56 isBEKaml hoelzro: yes
14:56 hoelzro I just tried it with the latest and it works for me =/
14:56 ZoffixW PerlJam, I think it was azawawi who was making changes :) But that's a good point. I'll open an Issue
14:56 hoelzro could you send me a screenshot?
14:56 xpen joined #perl6
14:56 hoelzro I have to get going to work, but I can have a quick look when I get there
14:57 PerlJam zostay: sorry :)
14:57 PerlJam er, ZoffixW even
14:57 * hoelzro wonders if one of the channel bots should detect https://github.com/rakudo/rakudo/blob/master/src/core/Kernel.pm#L13 and rewrite it as https://github.com/rakudo/rakudo/blob/3e6bc1ea8f15a7cd7e745a6cb09dbb3e2009c1de/src/core/Kernel.pm#L13
14:58 isBEKaml hoelzro: send you an email or upload somewhere?
14:58 ZoffixW azawawi, yeah, some of the badges might not be needed any more. I opened an issue for the topic: https://github.com/perl6/modules.perl6.org/issues/19
14:59 [Coke] jnthn++
14:59 azawawi ZoffixW: i verified the hash and yes the information is already there... thanks :)
15:00 ZoffixW \o/
15:00 isBEKaml hoelzro: d'oh - never mind.
15:01 isBEKaml hoelzro: I did :se ft=perl6 and it all looks fine now. The .pm confusion strikes again! :-|
15:01 khw joined #perl6
15:04 isBEKaml hmm, my vim didn't read those editor markers for perl6...
15:09 * azawawi is waiting for build-project-list.pl to finish
15:09 moritz that thing could use some caching, IMHO
15:10 AlexDaniel joined #perl6
15:10 azawawi moritz: yup it is way too slow
15:10 azawawi 178/432...
15:11 ZoffixW azawawi, if you're just doing testing, it accepts a --limit option
15:11 ZoffixW to build just --limit X dists instead of all of them
15:12 * azawawi wants to write a proper README.md after finishing :)
15:12 dalek perl6-roast-data: 4d0ec70 | coke++ | / (9 files):
15:12 dalek perl6-roast-data: today (automated commit)
15:12 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/4d0ec705e7
15:12 [Coke] 37232 failing tests in rakudo-jvm today. :|
15:12 * [Coke] starts a slow bisect.
15:13 jnthn :(
15:13 jnthn [Coke]++
15:15 cygx joined #perl6
15:15 mrsolo joined #perl6
15:16 colomon [Coke]: wouldn’t it be more time efficient if you started a fast bisect?  ;)
15:17 stmuk renice -20 :)
15:19 [Coke] colomon: :P
15:19 ketadmin joined #perl6
15:19 tokuhiro_ joined #perl6
15:28 [Coke] oneof the intermediate builds fails with:
15:28 [Coke] Stage jast       : Error while compiling op setinputlineseps (source text: "nqp::setinputlineseps(handle, endings)"), no registered operation handler
15:28 RabidGravy joined #perl6
15:28 RabidGravy wahay!
15:28 yoleaux 11:09Z <azawawi> RabidGravy: to get the github stars on a certain github repo, get https://api.github.com/repos/rakudo/rakudo which returns a JSON response and use "stargazers_count" key :)
15:28 yoleaux 11:19Z <tadzik> RabidGravy: I just did, thanks a lot :)
15:28 sprocket joined #perl6
15:28 pyrimidine joined #perl6
15:28 RabidGravy azawawi++ # most excellent
15:29 pyrimidine jnthn++ # fix for RT #122971
15:29 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=122971
15:31 pmurias joined #perl6
15:32 RabidGravy tadzik++ # lets me do this
15:32 dalek ecosystem: 02d2303 | RabidGravy++ | META.list:
15:32 dalek ecosystem: Fix branch on Perl6::Maven
15:32 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/02d23037e8
15:32 dalek ecosystem: 251b4d1 | RabidGravy++ | /:
15:32 dalek ecosystem: Merge branch 'master' of github.com:perl6/ecosystem
15:32 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/251b4d1b6f
15:32 dalek ecosystem: 0a4e339 | RabidGravy++ | META.list:
15:32 dalek ecosystem: Merge branch 'master' of github.com:perl6/ecosystem
15:32 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/0a4e3399ad
15:32 dalek ecosystem: ef1f0f1 | RabidGravy++ | META.list:
15:32 dalek ecosystem: Add the JSON::Class
15:32 dalek ecosystem:
15:32 dalek ecosystem: https://github.com/jonathanstowe/JSON-Class
15:32 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/ef1f0f18e1
15:33 mayuresh joined #perl6
15:33 AlexDaniel joined #perl6
15:33 RabidGravy why didn't I take my own advice and rebase ;-)
15:33 joe___ joined #perl6
15:33 mayuresh is [coke] around?
15:33 [Coke] Hio
15:33 RabidGravy there
15:34 mayuresh [coke] did your problem about that processing hanging get resolved?
15:34 mayuresh i meant, process hanging. :)
15:34 [Coke] which process?
15:35 mayuresh weren't you the one running some tests under mac os x?
15:35 mayuresh umnn, maybe it's just me being a jackass. ;-)
15:35 sprocket how would i be able to define different things for different architectures?
15:35 yoleaux 10:02Z <jnthn> sprocket: Define both structs, and then write constant TheStruct = $*KERNEL eq 'darwin' ?? TheOSXStruct !! TheLinuxStruct;
15:35 sprocket yoleaux: thanks :)
15:36 cognominal joined #perl6
15:36 [Coke] I do lots of stuff. That's not enough of a callback for me to remember the specific issue, sorry.
15:36 mayuresh [coke], are you the same person running mac os x, after having worked under windows for years!
15:36 ilmari m: $*KERNEL.version
15:37 camelia rakudo-moar 273e89: ( no output )
15:37 ilmari m: say $*KERNEL.version
15:37 camelia rakudo-moar 273e89: OUTPUT«v3.16.6.2.default␤»
15:37 [Coke] no, I'm not a windows person.
15:37 mayuresh ah, so i am indeed being a jackass. ;)
15:38 mayuresh i just can't remember who it was that got stuck with the process hanging issue under mac os x and couldn't find tools to inspect the problem.
15:38 mayuresh i think i might have some tips for that person.
15:38 mayuresh actually conversed with a bunch of mac os x developers
15:38 mayuresh just to get that piece of information.
15:38 mayuresh and now it's all useless. :(
15:39 mayuresh just because i can't remember who it was i intended to help.
15:39 mayuresh gah.
15:40 mayuresh this is utterly disgusting on my part.
15:40 mayuresh i should simply leave now.
15:40 [Coke] oh. Yes, I was trying to use that tool. I'm not a windows person, though.
15:40 [Coke] but that was days ago. I have no idea how to reproduce the failing I was seeing.
15:41 hoelzro isBEKaml: which editor markers?
15:41 [Coke] please write that information down in a gist somewhere so I can use it in 3 weeks when I need it again. :)
15:41 [Coke] *the failure
15:42 isBEKaml hoelzro: those # vim: ft=perl6...
15:42 hoelzro isBEKaml: do you have modeline set to true?
15:44 softmoth joined #perl6
15:45 nine [Coke]: mayuresh already left
15:45 pullphinger joined #perl6
15:46 ilmari huh, the percentage bar at the top of https://github.com/perl6/nqp claims 66.8% parrot, but when you click it it finds nothing
15:46 [Coke] well, I hope they review next time. whoops.
15:46 isBEKaml hoelzro: ah, that's it. I have now set it in my .vimrc -- that's what happens when you move between machines not knowing which setting it was that worked on the other machine :-)
15:46 moritz ilmari: probably due to the .pir bootstrapping files
15:47 hoelzro isBEKaml: there's also a contrib/ file called perl11.vim that tries to detect which type the file is
15:47 isBEKaml hoelzro: but that would surely fail with a file like Kernel.pm?
15:47 * hoelzro looks
15:47 ilmari moritz: I was more boggling at the actual search disagreeing with it
15:48 hoelzro isBEKaml: it should work
15:48 hoelzro unless it changes =)
15:48 ilmari https://github.com/perl6/nqp/search?l=parrot
15:48 hoelzro it uses the heuristics set out in S02 to detect a Perl 6 file
15:48 hoelzro ie. if the first non-comment line has a class/role/etc declaration
15:48 hoelzro or if 'use v6' is found
15:49 hoelzro s/non-comment/non-comment, non-empty/
15:51 isBEKaml hoelzro: grr, I did the install the old way of doing 'make install' after extracting the tarball. perl11.vim is in ftdetect which is not part of the install
15:52 hoelzro you should be able to just drop it in under ftdetect/; I don't think it's meant to be installed by default
15:53 isBEKaml hoelzro: yeah, it works. but no matter, I got my modeline back =)
15:54 hoelzro \o/
15:54 azawawi ZoffixW: nearly there :)
15:54 azawawi ZoffixW: generating image :)
15:55 isBEKaml thanks, hoelzro!
15:55 hoelzro happy to help!
15:58 dalek rakudo/nom: 2c43078 | jnthn++ | src/core/core_prologue.pm:
15:58 dalek rakudo/nom: Introduce a $?NL which represents the platform \n.
15:58 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2c43078e6c
15:58 dalek rakudo/nom: 0396397 | jnthn++ | / (3 files):
15:58 dalek rakudo/nom: Add newline pragmatic module to control $?NL.
15:58 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/03963974ce
15:59 flaviusb joined #perl6
16:02 liztormato joined #perl6
16:04 liztormato jnthn: why a separate file for that new pragma?  Why not use the new approach for pragmas?
16:04 jnthn liztormato: What new approach?
16:04 jnthn liztormato: The %*PRAGMAS thing is there as a stopgap until we can write all pragmas in a "first class" way, not an ideal.
16:05 liztormato In World.nqp:  do_pragma
16:05 jnthn Then we have to bulk up the compiler with it
16:06 jnthn There's no reason to do that; this one is trivially implementable as a normal pragmatic module.
16:06 liztormato Well having it as an external means all sorts of repo overhead
16:06 jnthn That's fine; I don't expect this to be commonly used :)
16:06 jnthn And I hope we can get that overhead down some.
16:07 jnthn The bigger issue with this is that now \r\n has a surprising meaning on Windows...
16:08 isBEKaml m: $*DISTRO.^methods.say # are these <anon>s meant to be there?
16:08 camelia rakudo-moar 273e89: OUTPUT«(BUILD cur-sep Str gist <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon>)␤»
16:09 jnthn Well, .^methods isn't meant to hide things
16:10 dalek rakudo/nom: e98b114 | (Stefan Seifert)++ | src/Perl6/Actions.nqp:
16:10 dalek rakudo/nom: Fix optimized for range loop messing up lexicals
16:10 dalek rakudo/nom:
16:10 dalek rakudo/nom: The optimized code is created from the original op tree, not what p6for
16:10 dalek rakudo/nom: generates. So creating the closure for $block in p6for is not enough.
16:10 dalek rakudo/nom: Add the block_closure to the original op tree instead, so we get it in
16:10 dalek rakudo/nom: the optimized code, too.
16:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e98b11463d
16:10 dalek rakudo/nom: f59b910 | timotimo++ | src/Perl6/Optimizer.nqp:
16:10 dalek rakudo/nom: Bring back optimization of for $range loops
16:10 dalek rakudo/nom:
16:10 dalek rakudo/nom: Only optimize for Range to while when looping in sink context.
16:10 dalek rakudo/nom: Only optimize unlabled for loops. Otherwise we miss the control exception
16:10 dalek rakudo/nom: handlers.
16:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f59b9107d6
16:10 isBEKaml jnthn: so what would you recommend I use instead?
16:10 nine .tell timotimo it is done!
16:10 yoleaux nine: I'll pass your message to timotimo.
16:10 mr_ron joined #perl6
16:10 iv how does one have anonymous methods?
16:10 nine Bring forth those benchmarks!
16:10 * PerlJam wonders if there's a :named to go along with :local and :global for  .^methods
16:10 jnthn isBEKaml: What do you want to do?
16:11 isBEKaml jnthn: nothing! :P
16:11 timotimo nine: hooray! nine++
16:11 yoleaux 16:10Z <nine> timotimo: it is done!
16:11 isBEKaml jnthn: well, I'm mostly curious after being away from perl6 :-)
16:11 mr_ron m: say Nil.Str # http://docs.perl6.org/type/Nil#method_Str
16:11 camelia rakudo-moar 273e89: OUTPUT«Use of Nil in string context  in block <unit> at /tmp/Q_n_kNl3GR:1␤␤»
16:11 jnthn isBEKaml: You may find .^method_table of interest
16:11 jnthn nine++
16:12 tokuhiro_ joined #perl6
16:12 timotimo nine: there's a commit there that's allegedly mine, but i don't remember making it :P
16:12 sprocket so the design docs call for $*GID / $*UID / $*EGID / $*EUID to be defined, but attempting to use them is giving me an error
16:12 sprocket is that something that’s coming eventually and just hasn’t been implemented yet?
16:12 nine timotimo: it's your WIP commit with two fixes added
16:12 timotimo sprocket: probably
16:12 llfourn sprocket: Not Yet Implemented :)
16:13 sprocket :)  ok, i can work around that, thanks!
16:13 isBEKaml jnthn: huh, wow.
16:13 llfourn m: for ^10 { my $answer = 42; try { let $answer = 84; die "resetting $answer" if Bool.pick } ; print $answer }
16:13 camelia rakudo-moar 273e89: OUTPUT«42424242424242424242»
16:13 timotimo nine: also with commit message changes attached, i see ;)
16:13 llfourn Am I very unlucky?
16:14 mr_ron Did I misunderstand the docs or am I missing something else?
16:14 jnthn m: say Bool.pick
16:14 camelia rakudo-moar 273e89: OUTPUT«True␤»
16:14 jnthn m: say Bool.pick
16:14 camelia rakudo-moar 273e89: OUTPUT«False␤»
16:14 timotimo m: say Nil.Str.perl
16:14 camelia rakudo-moar 273e89: OUTPUT«Use of Nil in string context  in block <unit> at /tmp/h6Oa4wgA79:1␤""␤»
16:15 timotimo mr_ron: it's exactly as documented. except, it also throws a warning :)
16:15 llfourn m: for ^10 { my $answer = 42; try { let $answer = 84; my $b = Bool.pick; say $b; die "resetting $answer" if $b } ; print $answer }
16:15 camelia rakudo-moar 273e89: OUTPUT«True␤42True␤42True␤42False␤42False␤42False␤42True␤42True␤42True␤42True␤42»
16:15 llfourn eh
16:15 timotimo :\
16:16 mr_ron Should I file an RT? I didn't see one for this.
16:16 llfourn m: for ^10 { my $answer = 42; try { let $answer = 84; my $b = Bool.pick; say $b; if $b { die "resetting $answer" } } ; print $answer }
16:16 camelia rakudo-moar 273e89: OUTPUT«True␤42True␤42True␤42True␤42True␤42True␤42True␤42False␤42True␤42False␤42»
16:17 timotimo perhaps the try { } around it makes the exception nonfatal and nonfailure-y enough to prevent let from resetting?
16:18 llfourn m: my $answer = 42; try { let $answer = 84; die} ; say $answer;
16:18 camelia rakudo-moar 273e89: OUTPUT«42␤»
16:18 llfourn timotimo: maybe...
16:19 llfourn m: my $answer = 42; try { let $answer = 84; } ; say $answer;
16:19 camelia rakudo-moar 273e89: OUTPUT«84␤»
16:19 jnthn .tell TimToady Turns out making \n magical mostly trips up over every \r\n usage out there. Should we special-case \r\n to mean The Right Thing also?
16:19 yoleaux jnthn: I'll pass your message to TimToady.
16:20 llfourn timotimo: but let *does* reset it
16:20 timotimo huh.
16:20 dalek rakudo/magical-n: 95f66bb | jnthn++ | src/ (5 files):
16:20 dalek rakudo/magical-n: Work-in-progress on making \n platform magical.
16:20 dalek rakudo/magical-n: review: https://github.com/rakudo/rakudo/commit/95f66bb66d
16:20 llfourn m: for ^10 { my $answer = 42; try { let $answer = 84; my $b = Bool.pick; say $b; if $b { die "resetting $answer" } } ; print $answer }
16:20 camelia rakudo-moar 273e89: OUTPUT«False␤42False␤42True␤42False␤42False␤42False␤42False␤42False␤42True␤42False␤42»
16:20 llfourn 42 means it was reset
16:21 mr_ron timotimo: sorry I misunderstood your answer, I think I understand now
16:21 Skarsnik joined #perl6
16:22 timotimo isn't a change made by let supposed to survive leaving the block, though?
16:22 PerlJam m: for ^10 { my $a = 42; try { let $a = 84; fail if Bool.pick; 1 } ; say $a; }
16:22 camelia rakudo-moar 273e89: OUTPUT«84␤42␤84␤84␤42␤42␤84␤42␤42␤42␤»
16:22 llfourn timotimo: yes, so it's dieing every time
16:22 PerlJam llfourn: looks like a bug to me.
16:22 timotimo um, should "fail" in there really work?
16:22 timotimo fail is a sort of return, after all
16:22 timotimo m: for ^10 { say "test"; return }
16:22 camelia rakudo-moar 273e89: OUTPUT«test␤»
16:22 PerlJam m: for ^10 { my $a = 42; try { let $a = 84; die if Bool.pick; 1 } ; say $a; }
16:22 camelia rakudo-moar 273e89: OUTPUT«42␤84␤42␤42␤84␤42␤42␤84␤84␤42␤»
16:23 timotimo oh!
16:23 Skarsnik Hi there, where I can find the source code of the eval bot? x)
16:23 timotimo Skarsnik: probably perl6/evalbot or perl6/camelia
16:23 timotimo the else-block of that postfix-if returns a "interpreted as failure" value
16:23 timotimo PerlJam: good catch!
16:23 llfourn timotimo: eh the block has to return true?
16:23 sufrostico joined #perl6
16:24 llfourn m: for ^10 { my $answer = 42; try { let $answer = 84; my $b = Bool.pick; say $b; if $b { die "resetting $answer" }; 1 } ; print $answer }
16:24 camelia rakudo-moar 273e89: OUTPUT«False␤84False␤84False␤84True␤42True␤42True␤42False␤84False␤84False␤84False␤84»
16:24 timotimo llfourn: has to return a defined value, iirc
16:25 pmurias joined #perl6
16:25 timotimo m: for ^10 { my $a = 42; try { let $a = 84; Bool.pick ?? 1 !! Any } ; say $a; }
16:25 camelia rakudo-moar 273e89: OUTPUT«84␤42␤84␤42␤84␤42␤84␤84␤42␤42␤»
16:25 llfourn Ah well that explains it. Thanks guys.
16:26 Skarsnik Also. I was wondering is there a way to have something similar to how package work in java. Like I define stuff in a MyModule package/namespace and I have access to then in a MyModule::OtherStuff. But not in a code that just do use MyModule.
16:27 [Coke] I didn't see an answer to the Nil.Str question - no, working as intended.
16:28 [Coke] m: my $a = Nil.Str; say "alive"; say ":{$a}:"
16:28 camelia rakudo-moar 273e89: OUTPUT«Use of Nil in string context  in block <unit> at /tmp/c1Ijzh3fs4:1␤alive␤::␤»
16:28 garu Skarsnik: you mean like use lib?
16:28 [Coke] ^^ it's warning you, but it's still returning the empty string.
16:29 timotimo [Coke]: i answered, but i'm not sure it "arrived"
16:29 Skarsnik garu, use lib?
16:31 [Coke] timotimo++
16:32 dalek roast: 0a388d1 | jnthn++ | S16-io/handles-between-threads.t:
16:32 dalek roast: Test for file handle use between threads.
16:32 dalek roast: review: https://github.com/perl6/roast/commit/0a388d1f90
16:32 RabidGravy joined #perl6
16:33 PerlJam llfourn: maybe that should be part of a best practices or a FAQ or something ... if you're going to use "let" make *sure* you handle both success/failure in the block.
16:33 llfourn PerlJam: I'm just writing a quick doc for let now. Will be sure to mention it :)
16:33 PerlJam llfourn: your example was non-intuitive precisely because you were only concerned with the failure side and didn't specify success adequately
16:34 RabidGravy don't say "best practices"
16:34 llfourn PerlJam: I thought failure meant exception thrown not block return value
16:34 [Coke] are we not doing jenkins on the jvm builds?
16:35 mrf Anyone know how I force update of nqp in rakudobrew. (along with anything that would have to be updated as a result)
16:36 PerlJam llfourn: S04:1772
16:36 synbot6 Link: http://design.perl6.org/S04.html#line_1772
16:36 llfourn PerlJam: cheers.
16:43 jdv79 is someone starting a p6bp?
16:43 RabidGravy if they do I leave
16:44 jdv79 haha
16:44 PerlJam RabidGravy best practice:  don't start a Perl 6 Best Practices
16:45 RabidGravy the people who have the loudest voices and the most dubious opinions form the "best practice"
16:46 RabidGravy PerlJam++ # precisely
16:47 TimToady m: say &[Z+].name
16:47 yoleaux 16:19Z <jnthn> TimToady: Turns out making \n magical mostly trips up over every \r\n usage out there. Should we special-case \r\n to mean The Right Thing also?
16:47 camelia rakudo-moar 273e89: OUTPUT«␤»
16:47 stmuk "there is more than one way to do but only my way is Right"
16:47 RabidGravy stmuk++
16:48 TimToady m: say &[Z+].name
16:48 camelia rakudo-moar 273e89: OUTPUT«␤»
16:48 PerlJam RabidGravy: are you sure you're not reacting to the evangelization of PBP?
16:48 jdv79 im imterested in what a p6 tidier will do
16:48 TimToady camelia is about 24 hours out-of-date now
16:48 stmuk I think most p5 progammers agree with about 2/3 of PBP but not which 2/3
16:48 PerlJam RabidGravy: I mean, Damian wasn't really loud and his opinions weren't dubious, it was just when people decided to take his word as gospel that things went sideways
16:49 RabidGravy partly that and partly to the newspeak of "best practices" wherever it is found
16:49 RabidGravy yes, blindly taking things as gospel
16:49 RabidGravy see also "Modern Perl"
16:49 timotimo did 2015.10 already have GLR in it?
16:50 nine timotimo: yes
16:50 timotimo OK
16:50 timotimo nine: i'm going to compare the benchmark results to 2015.09
16:50 jdv79 well, modern perl seemed a bit better thought out and based in reality
16:50 jdv79 imo
16:50 RabidGravy PerlJam, totally agree fwiw
16:51 pmurias some of the opinions in PBP were dubious, like the inside out objects
16:52 dalek Heuristic branch merge: pushed 89 commits to rakudo/curli by niner
16:52 nine note to self: first push the merge, then push the new commit
16:52 PerlJam pmurias: How were inside out objects dubious exactly?
16:52 RabidGravy I'm only going to say this once but "Modern Perl" (in my mind) reduces Perl to a scripting language for a small set of cabal mandated frameworks
16:52 jdv79 its definitely not a best practice
16:53 _mg_ joined #perl6
16:53 jdv79 io objs that is
16:54 tony-o m: "\r\n".ord.say;
16:54 camelia rakudo-moar 273e89: OUTPUT«13␤»
16:54 stmuk inside objects were in fashion for about 6 months in 2005
16:55 grondilu is everything still inline for Xmas?
16:59 tony-o i think christmas is still going to happen this year grondilu
16:59 jdv79 amd how is a fad a best practice in any sense?
16:59 RabidGravy well we've worked out where we're going to buy a christmas tree this year
16:59 TimToady tony-o: that's still yesterday's camelia
16:59 TimToady .seen moritz
16:59 yoleaux I saw moritz 15:46Z in #perl6: <moritz> ilmari: probably due to the .pir bootstrapping files
16:59 sprocket hey all - i’ve done a first cut at a POSIX module containing some of the functions I needed for another project (ie. setuid, setgid, etc) and have pushed it out to github.  how would i go about getting that added to the p6 module ecosystem?
16:59 mr_ron left #perl6
16:59 xenu pbp spawned perl critic, which is pretty useful tool, but can be horribly misused. unfortunately usually that's the case
16:59 ugexe im getting strange behavior reguarding \r\n. the ord for it is changing depending on what is in the string
16:59 ugexe https://gist.github.com/ugexe/09cfce18f3ece8b6e83b
16:59 ugexe sometimes \r\n is converted as '13', sometimes '4294967309'
17:00 ugexe if i remove a line of text from that example, sometimes the 4294967309 changes to a '13'
17:00 RabidGravy sprocket, fork, clone the https://github.com/perl6/ecosystem add your META.info to the META.list (i.e the raw entry), make PR
17:00 TimToady ord should always report 13, and not the synthetic
17:00 jdv79 whats a pjpeg?
17:00 TimToady (and the synthetic should probably be reported as negative, not huge positive)
17:01 stmuk hahaha "make sandwich"
17:02 RabidGravy sprocket, if you're on a roll and making several modules someone may add you to the ecosystem project
17:02 RabidGravy I don't have that force
17:02 sprocket RabidGravy: thanks!
17:03 [Coke] onder if the synthetic is underflowing?
17:03 TimToady .tell jnthn either we accept \r\n as the same, or we blow up and say "you gotta say 'use newline :lf' for \r\n to work"
17:03 yoleaux TimToady: I'll pass your message to jnthn.
17:04 TimToady looks like a 32-bit number, so maybe 32 vs 64-bit problem?
17:07 tony-o dunno, check this out
17:07 tony-o tonyo@imac ~$ perl6 -e '.ord.say for "\r\n".comb;'
17:07 tony-o 13
17:07 timotimo nine: http://t.h8.lv/p6bench/2015-11-02-rakudo_moar_pre_post_glr.html
17:08 jnthn If synthetics are somehow leaking, that's a bug
17:08 yoleaux 17:03Z <TimToady> jnthn: either we accept \r\n as the same, or we blow up and say "you gotta say 'use newline :lf' for \r\n to work"
17:08 jnthn TimToady: I think we'll go with "make it work as it did"
17:08 jnthn TimToady: Least surprise, for msot definitions
17:09 jnthn Note that if you .ord a synthetic you get the ord of the base char.
17:10 dalek doc: 89362d6 | (Lloyd Fournier)++ | doc/Language/ (2 files):
17:10 dalek doc: let example (duplicated)
17:10 dalek doc: review: https://github.com/perl6/doc/commit/89362d6fc9
17:10 tony-o wonder how that works with trans
17:10 llfourn PerlJam: ^^ for your reviewing pleasure :)
17:11 tony-o ah, doesn't transform at all with trans
17:11 nine timotimo: the results for for loops look awesome! But why would while have become so much slower?
17:11 sufrostico joined #perl6
17:11 timotimo good questoin
17:11 timotimo ... question
17:11 timotimo i'm currently working on #job, so can't delve too deep
17:11 timotimo perhaps you can figure out something about [+] 1 .. SCALE, though?
17:12 timotimo that's become 14x slower
17:12 telex joined #perl6
17:13 nine Well, I'm off to a Calexico concert now.
17:13 timotimo oh
17:13 timotimo enjoy! :)
17:14 nine Thanks :)
17:16 raiph joined #perl6
17:16 PerlJam llfourn: if Bool.pick returns True, the die is executed and $answer will be 42.   Your text has it backward.
17:16 llfourn PerlJam: ah thanks
17:17 PerlJam llfourn: I find the sentence "Like the temp prefix, but only restores the value if the block exits unsuccessfully" tedious to parse
17:17 PerlJam well ... and understadn
17:17 llfourn PerlJam: Agreed
17:18 sprocket RabidGravy: the ecosystem META.list has the urls as “https://raw.githubusercontent.com/….” - but i’m not able to view my META.info with the url yet
17:18 sprocket RabidGravy: will that appear eventually?
17:18 PerlJam llfourn: sorry I've only got criticism, my brain is occupied elsewhere enough that I don't have suggestions for better wording.
17:19 ugexe how do i construct a string with a \r\n that matches a regex with \r\n but not \n?
17:19 RabidGravy sprocket, go to the file in github, there's a "raw" button to the top right, click that copy the URI
17:19 sprocket RabidGravy: ah! thank you
17:19 TimToady a Str cannot contain \r\n except as a synthetic
17:20 RabidGravy top middle right, that is
17:20 llfourn PerlJam: nw looks good now thanks. It's never the last commit!
17:20 TimToady a Buf.new(13,10) is a CRLF
17:20 RabidGravy if it isn't we ain't having no web clients ;0)
17:21 ugexe right, but in this case i want to write a test for a http header. its not very convienient to store the test data as a Buf instead of as a human readable string
17:21 dalek doc: 9fc68ca | (Lloyd Fournier)++ | doc/Language/ (2 files):
17:21 dalek doc: fix let example and clean up first sentence
17:21 dalek doc: review: https://github.com/perl6/doc/commit/9fc68ca1d4
17:23 ilmari huh, doesn't Buf have a .join method?
17:23 ilmari otherwise you could have done ('Foo: bar','Baz: zot').map(*.encode('ascii')).join(Buf.new(13, 10))
17:24 dalek ecosystem: 926458a | cspencer++ | META.list:
17:24 dalek ecosystem: Added Perl 6 POSIX module to ecosystem.
17:24 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/926458a276
17:24 dalek ecosystem: 1ffbc3d | (Zoffix Znet)++ | META.list:
17:24 dalek ecosystem: Merge pull request #86 from cspencer/master
17:24 dalek ecosystem:
17:24 dalek ecosystem: Added Perl 6 POSIX module to ecosystem: https://github.com/cspencer/perl6-posix
17:24 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/1ffbc3d73e
17:24 TimToady we probably need better ways to write Buf/Uni literals
17:25 RabidGravy sprocket++ # I'll look later, but damn good stuff ;-)
17:26 jnthn \r\n in a regex won't match a \n
17:27 RabidGravy which would be quite weird
17:27 ugexe "\x[d]\x[a]\x[d]\x[a]".encode will encode to 13, 10, 13, 10
17:27 jnthn \n in a regex is logical
17:28 sprocket RabidGravy: appreciate it, thanks for all your help!
17:28 ugexe yea, but i want to write a string with a \r\n that doesnt match a \n token in a regex
17:29 jnthn \n in a regex has always matched \r\n
17:29 jnthn You need to write something like \xA in the regex if you really mean "exactly this char"
17:29 TimToady but that won't work either if the Str is NFG
17:30 jnthn How so?
17:30 TimToady not unless you ignore the \n "mark"
17:30 TimToady er, wait, \xa is linefeed
17:31 ugexe yea i already use \x0D \x0A
17:31 TimToady so you're matching only the "combiner"
17:31 TimToady is \xd\xa in a pattern somehow smart enough to match a single grapheme?
17:31 jnthn ugexe: Can you give me a golfed example of what you're doing and geting unexpected results with? I'm not quite following what you want to do.
17:31 jnthn TimToady: Yes
17:31 ollej joined #perl6
17:32 TimToady okay
17:33 ugexe ill try, but its for Grammar::HTTP which is probably the poster child for something that would choke on such a change
17:33 Alina-malina joined #perl6
17:34 ugexe but it seems to boil down to me writing the headers as a string for tests, and those \r\n get turned into \n
17:36 jnthn say so qq{\r\n} ~~ /\r\n/ # True
17:36 jnthn say so qq{\n} ~~ /\r\n/ # False
17:37 jnthn This is without the Windows magical \n in place yet
17:39 garu Skarsnik: nevermind, I thought you meant something else. That said, I'm not entirely sure what you do mean :)
17:41 raiph Have folk discussed the idea of `has $foo` being the mid ground between 100% private `has $!foo` and 100% public `has $.foo`?
17:42 TimToady the middle ground is a bog
17:42 jnthn raiph: What would that mean, exactly?
17:42 Skarsnik garu, I written a module (Gumbo) it's a binding to a c lib. It export a single function but define internally lot of cstruct/ccall. I want to write a Gumbo::Parser class in a Gumbo/Parser.pm6 file and have access to all these internal cstruct. But I don't want then exposed to an user of the module
17:42 mr_ron joined #perl6
17:43 tony-o Skarsnik: just don't export the struct classes..
17:44 mr_ron m: grammar G { token TOP { a+ } }; my Nil $x = G.parse("zz")
17:44 camelia rakudo-moar 273e89: OUTPUT«Type check failed in assignment to $x; expected Nil but got Any␤  in block <unit> at /tmp/r2t2se6KEB:1␤␤»
17:44 ambs joined #perl6
17:44 raiph m: class c { has $foo }; c.new(:foo) # would initialize the private foo attribute # jnthn
17:44 camelia rakudo-moar 273e89: ( no output )
17:45 PerlJam raiph: and how to we retrieve the private $foo value?
17:45 tony-o you'd have to write your own getter/setters for it..
17:45 raiph PerlJam: same as currently
17:46 JimmyZ m: has $foo;
17:46 camelia rakudo-moar 273e89: OUTPUT«5===SORRY!5=== Error while compiling /tmp/9XkvUyLB19␤You cannot declare attribute '$foo' here; maybe you'd like a class or a role?␤at /tmp/9XkvUyLB19:1␤------> 3has $foo7⏏5;␤    expecting any of:␤        constraint␤»
17:47 mr_ron m: grammar G { token TOP { a+ } }; my Nil $x = G.parse("zz") # http://docs.perl6.org/type/Grammar#method_parse "Returns a Match object on success, and Nil on failure."
17:47 camelia rakudo-moar 273e89: OUTPUT«Type check failed in assignment to $x; expected Nil but got Any␤  in block <unit> at /tmp/M2IcZbVvcg:1␤␤»
17:47 jnthn raiph: Ah, initializable publicly but then not public. No, we've not considered that, and I don't think it's likely.
17:47 ^elyse^ joined #perl6
17:47 mr_ron What am I missing again ?
17:49 raiph jnthn: thanks
17:50 go|dfish joined #perl6
17:56 mr_ron m: grammar G { token TOP { a+ | <bs> }; token bs { b+ } }; say G.parse("zz").WHAT; say G.parse("aa")<bs>.WHAT
17:56 camelia rakudo-moar 273e89: OUTPUT«(Any)␤Nil␤»
17:58 garu Skarsnik: what tony-o said... looks as if you'd have to do something if you wanted to expose the cstruct, not the other way around
18:04 diana_olhovik joined #perl6
18:04 firstdayonthejob joined #perl6
18:05 mr_ron Is G.parse() returning the wrong thing?  It looks to me like it is.
18:06 tony-o m: grammar G { rule TOP { a+ } }; G.parse('zz').perl.say;
18:06 camelia rakudo-moar 273e89: OUTPUT«Any␤»
18:06 tony-o m: grammar G { rule TOP { a+ } }; G.parse('zz').WHAT.say;
18:06 camelia rakudo-moar 273e89: OUTPUT«(Any)␤»
18:06 tony-o m: say Nil ~~ Any;
18:06 camelia rakudo-moar 273e89: OUTPUT«True␤»
18:06 tony-o m: say Any ~~ Nil;
18:06 camelia rakudo-moar 273e89: OUTPUT«False␤»
18:06 tony-o m: my Nil $a = Any.new;
18:06 camelia rakudo-moar 273e89: OUTPUT«Type check failed in assignment to $a; expected Nil but got Any␤  in block <unit> at /tmp/eTOiFilv7h:1␤␤»
18:07 diana_olhovik joined #perl6
18:07 mr_ron m: grammar G { token TOP { a+ } }; my Nil $x = G.parse("zz")
18:07 camelia rakudo-moar 273e89: OUTPUT«Type check failed in assignment to $x; expected Nil but got Any␤  in block <unit> at /tmp/HMNfyPJjvI:1␤␤»
18:07 tony-o mr_ron: appears either the doc is wrong or .parse is returning the wrong type
18:07 sufrostico joined #perl6
18:09 mr_ron The definition of Nil is the 'Absence of a value' suggesting to me the doc makes sense anyway
18:10 Skarsnik :m my @t = 1..5; @t.tail(1);
18:10 Skarsnik m: my @t = 1..5; @t.tail(1);
18:10 camelia rakudo-moar 273e89: ( no output )
18:10 tony-o mr_ron: agreed
18:11 Skarsnik I get Method 'tail' not found for invocant of class 'Array' ~~
18:13 tony-o update rakudo
18:13 spider-mario joined #perl6
18:14 Skarsnik it's a recent addition?
18:15 gfldex Date:   Tue Oct 27 23:02:09 2015 +0100
18:15 gfldex Introduce .head($n)/.tail($n)
18:15 gfldex Skarsnik: ^^^
18:17 tokuhiro_ joined #perl6
18:19 ChoHag joined #perl6
18:21 ugexe this \r\n problem seems it may be related to submatches and matching on \r\n
18:21 ugexe my $request =  q{GET /http.html HTTP/1.1} ~ "\r\n"; my $u = $request ~~ /\r\n/; say $u.Str ~~ /^\n/;
18:25 ugexe the actual token is `token status-line { <HTTP-version> <.SP> <status-code> <.SP> <reason-phrase> <.CRLF> }`. By passing in a string that ends with "\r\n" the <CRLF> is left to match against ord 13, and not \x0d \x0a, so it fails
18:30 mrsolo joined #perl6
18:30 _mg_ joined #perl6
18:36 raiph joined #perl6
18:43 dalek rakudo/lines-vm-chomp: afef47d | jnthn++ | src/core/IO/Handle.pm:
18:43 dalek rakudo/lines-vm-chomp: Use nqp::readlinechompfh for .get and .lines.
18:43 dalek rakudo/lines-vm-chomp:
18:43 dalek rakudo/lines-vm-chomp: Needs the JVM backend to support this op before we can merge it, but
18:43 dalek rakudo/lines-vm-chomp: pushing it so nobody duplicates the work, and so we can see how much
18:43 dalek rakudo/lines-vm-chomp: it helps performance.
18:43 dalek rakudo/lines-vm-chomp: review: https://github.com/rakudo/rakudo/commit/afef47dd5b
18:44 jnthn ugexe: A string "\r\n" will match /^\n/
18:44 jnthn ugexe: But if we're really getting the ord 13 in there, yeah, something's not right
18:45 jnthn ugexe: But still not seeing how that happens. Alas, time to make dinner now.
18:46 mr_ron left #perl6
18:47 jnthn &
18:49 _mg_ joined #perl6
18:52 Actualeyes left #perl6
18:52 kmel joined #perl6
18:59 xpen joined #perl6
19:01 raiph joined #perl6
19:03 kmel_ joined #perl6
19:09 flussence looks like panda needs \r\n-fixing... explodes in the projects.json HTTP request stuff.
19:11 dalek doc: 7a6dc7d | (Steve Mynott)++ | doc/Language/faq.pod:
19:11 dalek doc: minor typos and tweaking
19:11 dalek doc: review: https://github.com/perl6/doc/commit/7a6dc7dfa3
19:14 yqt joined #perl6
19:23 vendethiel joined #perl6
19:25 zakharyas joined #perl6
19:29 kmel joined #perl6
19:29 kmel hello everybody
19:30 vendethiel ahoy!
19:30 PerlJam kmel: greetings!
19:31 raiph joined #perl6
19:31 kmel if i defined a sub with optional arguments, how can i check if the user passed arguments or not?
19:31 kmel hi vendethiel PerlJam
19:32 vendethiel kmel: as in, did not pass Nil explicitly?
19:33 kmel vendethiel, the user just called a sub without any arguments
19:33 vendethiel m: sub foo($a?) { say $a.defined }; foo; foo(3); # kmel
19:33 camelia rakudo-moar 273e89: OUTPUT«False␤True␤»
19:33 PerlJam m: sub foo($a?) { say $a.defined }; foo(Any);  foo(Nil);  # note this too
19:33 camelia rakudo-moar 273e89: OUTPUT«False␤False␤»
19:34 kmel aha .defined will do the job
19:34 vendethiel PerlJam: yeah, hence my prior question
19:34 kmel thanks
19:35 kmel vendethiel PerlJam thanks
19:35 PerlJam vendethiel: right, kmel's response led me to believe this was a foreign concept
19:35 flussence if I do «$file.print: @stuff», rakudo writes @stuff as-is, but if I do «$socket.print: @stuff», the elements get joined with spaces between. Is that meant to happen?
19:36 PerlJam flussence: I hope not.
19:42 _mg_ joined #perl6
19:44 * grondilu is not sure what flussence means by "as-is"
19:45 flussence if @stuff is ^10, the output would be exactly 10 chars long
19:46 grondilu ok, a concatenated output then
19:58 PerlJam flussence: I'd probably change IO::Socket.print into multi methods just like IO::Handle does.
20:02 PerlJam Though that would mean that passing Cool things to print would call the listy version which would stringify and call the stringy version whereas now, it only calls the stringy version.
20:03 geraud joined #perl6
20:08 zakharyas joined #perl6
20:09 perigrin joined #perl6
20:16 kjs_ joined #perl6
20:20 cognominal I got something in a Buf, how to see it as a repr(CStruct). How do I make it independant of the indianness? I would like to avoid unpack.
20:20 cognominal for info, that's  a  .git/index
20:28 cygx joined #perl6
20:28 bartolin r: use nqp; say nqp::backendconfig<osname>
20:28 camelia rakudo-jvm 273e89: OUTPUT«(Any)␤»
20:28 camelia ..rakudo-moar 273e89: OUTPUT«linux␤»
20:28 cygx cognominal: for the first part of the question, cf:
20:28 cygx class Foo is repr<CStruct> { has int8 $.a; has int8 $.b; }; my $buf := Buf[int8].new(42,2,37); say nativecast Foo, CArray[int8].new($buf.list); # => Foo.new(a => 42, b => 2)
20:29 _mg_ joined #perl6
20:29 cygx it's not efficient as copying to the CArray happens element (ie byte) by element
20:29 cygx it would be better if you could get at a CPointer to the data
20:29 bartolin r: use nqp; say nqp::atkey(nqp::backendconfig(), "osname")  # that prevents JVM build atm
20:30 retupmoca cygx: you can't nativecast directly from a blob?
20:30 camelia rakudo-moar 273e89: OUTPUT«linux␤»
20:30 camelia ..rakudo-jvm 273e89: OUTPUT«java.lang.NullPointerException␤  in block <unit> at /tmp/tmpfile:1␤␤»
20:30 retupmoca cygx: I know you can nativecast from a Blob -> CArray (nativecast CArray[uint8], $stuff;)
20:30 cygx retupmoca: my bad, you actually can
20:30 retupmoca err, from a blob to a carray at least
20:31 cygx no idea why I thought you could not...
20:31 cygx ie nativecast Foo, $buf in the example works as expected
20:32 cygx cognominal: ^
20:32 retupmoca ah, ok. Good, that's much faster :)
20:32 xfix joined #perl6
20:32 cygx now, does anyone know how 'int' gets its nativesize from?
20:33 cygx I've been ack-ing through the source, but no dice yet
20:33 retupmoca pretty sure int is always 64bit on a 64bit build
20:33 retupmoca and 32bit on a 32bit build
20:33 cognominal thx, cygx.
20:34 cygx retupmoca: NativeCall thinks int should map to long, which is 32-bit on windows
20:36 retupmoca cygx: that may have changed then - when I was first writing Compress::Zlib, 'int' didn't work on windows because it was 64bit
20:36 retupmoca I had to end up using 'long'
20:36 retupmoca star: use NativeCall; my long $x = 32; say $x;
20:36 camelia star-m 2015.09: OUTPUT«32␤»
20:37 cygx well %type_map in NativeCall.pm says int translates to long, but nativesizeof int is 8 (whereas a proper long is size 4 here)
20:38 zengargoyle how often is doc.perl6.org built from repo sources?
20:39 cygx why on earth someone who's interested in supporting both *nix and windows would use long as a default type for int is beyond me anyway
20:40 zengargoyle m: say <a a b b b c c>.repeated
20:40 camelia rakudo-moar 273e89: OUTPUT«(a b b c)␤»
20:40 zengargoyle m: say <a b b c c b a>.repeated
20:40 camelia rakudo-moar 273e89: OUTPUT«(b c b a)␤»
20:40 [Coke] java bisect is done. the skipped commits here all complained about an NQP op- I was testing for the NPE in the current build.
20:40 [Coke] https://gist.github.com/coke/bf0196891ef9dc9b8ada
20:40 zengargoyle m: say <a A B b c b C>.repeated(:as(&lc))
20:40 camelia rakudo-moar 273e89: OUTPUT«(A b b C)␤»
20:42 AlexDaniel m: grammar Test { token TOP { ^ <custom=x> $ }; token x { .* } }; say Test.parse(‘foo’);
20:42 camelia rakudo-moar 273e89: OUTPUT«「foo」␤ x => 「foo」␤ custom => 「foo」␤»
20:42 [Coke] ah. so 45e56b8ed7f403e2c45b3bbedab41a4a41afb710 looks like what probably changed one error to another.
20:42 AlexDaniel Is it a bug?
20:42 cygx for now, I'll just do a `constant int = int32` to make my tests pass ;)
20:43 retupmoca cygx: assuming a 64bit build, 'int' is always 64 bits within the perl6 world. I'm not sure what NativeCall does with it, but you probably want to use 'long' or 'longlong' instead of 'int' for NativeCall
20:43 zengargoyle Type/List doc has the first two of those wrong.  and a couple Perl5 POD =over/=back lists that don't render correctly.  have to look up Perl 6 POD version of lists...
20:43 [Coke] I'm guessing that nqp::setinputlineseps(handle, endings);
20:43 [Coke] is a problem on the jvm, since we're now giving it a list.
20:43 [Coke] testing...
20:43 AlexDaniel I was expecting to see “custom” without “x”…
20:43 retupmoca cygx: basically, if you use 'int' for NativeCall code, it's probably wrong
20:43 bartolin [Coke]: http://irclog.perlgeek.de/perl6/2015-11-03#i_11477695
20:43 PerlJam m: grammar Test { token TOP { ^ <custom=.x> $ }; token x { .* } }; say Test.parse(‘foo’);
20:43 camelia rakudo-moar 273e89: OUTPUT«「foo」␤ custom => 「foo」␤»
20:44 cygx retupmoca: sure - but it nevertheless should be consistent
20:44 ][Sno][ joined #perl6
20:44 PerlJam AlexDaniel: ^^^
20:44 cygx currently, it is not
20:44 AlexDaniel oh right!
20:44 AlexDaniel PerlJam: I forgot about that dot!
20:44 AlexDaniel thanks
20:44 * [Coke] sighs, he missed that bartolin found anything.
20:44 lizmat joined #perl6
20:45 [Coke] r: say $*VM.config<osname>
20:45 camelia rakudo-jvm 273e89: OUTPUT«(Any)␤»
20:45 camelia ..rakudo-moar 273e89: OUTPUT«linux␤»
20:45 * lizmat waves from the Amsterdam.pm meeting
20:46 lizmat jnthn: something came up here wrt to using multiple line endings
20:46 ilmari r: say $*KERNEL.name
20:46 bartolin [Coke]: looks like it reads the values from nqp/bin/jvmconfig.properties -- and there is no osname :/
20:46 camelia rakudo-{moar,jvm} 273e89: OUTPUT«linux␤»
20:47 lizmat suppose we have 4 different line endings. and we're chomping. how would you find out *which* line ending was used ?
20:47 lizmat to mark the end of a line
20:47 [Coke] bartolin: that line is never invoked on the jvm.
20:47 [Coke] it's warpped in an #if moar block ?
20:47 [Coke] *wrapped
20:47 lizmat jnthn: so perhaps, we need something like nqp::chomped
20:47 [Coke] j: nqp::p6box_s(nqp::atkey(nqp::jvmgetproperties(), 'os.name'));
20:48 camelia rakudo-jvm 273e89: OUTPUT«===SORRY!===␤java.lang.NullPointerException␤»
20:48 [Coke] -there- we go.
20:48 lizmat which would give you the line ending of the last line that was read with nqp::linechomp (or whatever it is / will be called)
20:50 cygx retupmoca: to clarify, there are basically 3 types of 'int' - p6-land int (normally 64-bit), C-land int (normally 32-bit) and NativeCall-parameter-land int, which is a long, ie corresponding to p6-land int on linux and C-land int on win32
20:50 bartolin [Coke]: src/core/core_prologue.pm line 24
20:50 bartolin [Coke]: at least that looked like the source of the problem to me
20:50 cygx I've got a failing testcase which I suspect indicates that somewhere, we assume P6-land and NativeCall-parameter-land agree
20:51 [Coke] bartolin: ah, I was looking in src/core/IO/Spec.pm
20:56 PerlJam lizmat: it's too bad chomp itself can't tell you what it chomped.
20:56 lizmat PerlJam: we want to prevent chomping in Perl 6 land
20:57 lizmat and it should become available, *especially* if we support muiltiple simultaneous line endings
20:57 espadrine_ joined #perl6
20:57 [Coke] j: use nqp; say nqp::p6box_s(nqp::atkey(nqp::jvmgetproperties(), 'os.name'));
20:58 camelia rakudo-jvm 273e89: OUTPUT«Linux␤»
20:58 [Coke] ok, the NPE we got on that before was for something else. :)
20:58 [Coke] fixing...
20:59 lizmat m: $*DISTRO.name
20:59 camelia rakudo-moar 273e89: ( no output )
20:59 bartolin [Coke]++
20:59 lizmat m: say $*DISTRO.name
20:59 camelia rakudo-moar 273e89: OUTPUT«opensuse␤»
20:59 lizmat [Coke]: isn't that what you're looking for ?
21:00 xpen joined #perl6
21:00 [Coke] lizmat: Yes, but if you look in backscroll, that gave me an NPE earlier.
21:01 [Coke] so it sent me down an alley for a few minutes. I'm fine now.
21:01 lizmat j: say $*DISTRO.name
21:01 camelia rakudo-jvm 273e89: OUTPUT«opensuse␤»
21:01 lizmat ok
21:01 [Coke] We now have 2 places where we are keying off jvm vs. moar to get the os name. we should probably not do that.
21:01 bartolin another option seems to be to add 'osname=$Config{osname}' to 'nqp/tools/build/gen-jvm-properties.pl'
21:03 moritz but we want the OS name of the host system, not where it was compiled
21:03 moritz and java code is supposed to be portable, no?
21:03 bartolin oh!
21:03 [Coke] I'm testing a patch using the same logic in IO/Spec
21:09 [Coke] bartolin++ for tracking that down. no doubt faster than doing a bisect over 30 versions with 2 very different forms of breakage. :)
21:09 dalek doc: c1140e7 | lizmat++ | doc/Type/List.pod:
21:09 dalek doc: Fix problems found by zengargoyle++
21:09 dalek doc: review: https://github.com/perl6/doc/commit/c1140e78ec
21:10 [Coke] still more NPEs..
21:10 bartolin :-/
21:11 [Coke] and of course the stack trace starts out with no line number or sub name.
21:11 [Coke] in  (gen/jvm/CORE.setting)
21:11 [Coke] in  (gen/jvm/ModuleLoader.nqp:380)
21:11 [Coke] in load_setting (gen/jvm/ModuleLoader.nqp:370)
21:12 [Coke] it's only 34287 lines...
21:13 AlexDaniel So if I want to have a constructor, do I really have to do this? “method new(&callback, *@dependencies) {” or is there something simpler?
21:15 moritz AlexDaniel: you get a constructor by default
21:15 AlexDaniel moritz: I know, but what if I want to do stuff? :)
21:15 moritz AlexDaniel: you can do stuff with the default constructor
21:15 AlexDaniel moritz: hmmm
21:16 moritz AlexDaniel: you seem to want a custom constructor, but to not write a custom constructor. That confuses me.
21:17 AlexDaniel moritz: nah, that's just my non-perl6 thinking, I guess
21:17 AlexDaniel moritz: thanks! I'll try that
21:17 AlexDaniel I mean, I'll try to see if I really need one
21:18 bpmedley joined #perl6
21:19 AlexDaniel m: my regex foo { ‘test’ }
21:19 camelia rakudo-moar 273e89: OUTPUT«5===SORRY!5===␤Unrecognized regex metacharacter ‘ (must be quoted to match literally)␤at /tmp/CZeBhJ1YlJ:1␤------> 3my regex foo {7⏏5 ‘test’ }␤Regex not terminated.␤at /tmp/CZeBhJ1YlJ:1␤------> 3my regex foo { ‘7⏏5test’…»
21:19 AlexDaniel ‘’ do not work in regexes?
21:20 moritz m: my $x = ‘foo’
21:20 camelia rakudo-moar 273e89: ( no output )
21:20 moritz seems not
21:20 AlexDaniel bug or not?
21:20 AlexDaniel inconsistency for sure
21:20 moritz dunno; I haven't seen fancy quotes in S05
21:21 zengargoyle lizmat++ thanks for fixing, i was off reading up on POD6 :)
21:21 [Coke] They were added to the language much later by timtoady directly. I wouldn't mind if they also existed in rules.
21:22 [Coke] bartolin: any idea how to find that exception?
21:22 * AlexDaniel submits rakudobug then
21:23 [Coke] r: say $*VM.config<osname>; say $*VM.config<os.name>;
21:23 bartolin [Coke]: I'm looking, but without a good idea .
21:23 camelia rakudo-jvm 273e89: OUTPUT«(Any)␤(Any)␤»
21:23 camelia ..rakudo-moar 273e89: OUTPUT«linux␤(Any)␤»
21:23 [Coke] r: say Any eq 'MSWin32'
21:24 camelia rakudo-{moar,jvm} 273e89: OUTPUT«Use of uninitialized value of type Any in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block <unit> at /tmp/tmpfile:1␤False␤»
21:25 dalek rakudo/nom: 6cb35b4 | coke++ | src/core/core_prologue.pm:
21:25 dalek rakudo/nom: Fix one potential NPE on the jvm.
21:25 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6cb35b40b4
21:26 dalek doc: 3ebb144 | (Christopher Bottoms)++ | doc/Language/faq.pod:
21:26 dalek doc: Minor edits
21:26 dalek doc:
21:26 dalek doc: Couple of grammar edits, plus replacing space with nonbreaking space in "Perl 6".
21:26 dalek doc: review: https://github.com/perl6/doc/commit/3ebb14432b
21:26 dalek doc: 909ac44 | RabidGravy++ | doc/Language/faq.pod:
21:26 dalek doc: Merge pull request #183 from molecules/patch-1
21:26 dalek doc:
21:26 dalek doc: Minor edits
21:26 dalek doc: review: https://github.com/perl6/doc/commit/909ac44969
21:32 TEttinger joined #perl6
21:33 AlexDaniel moritz: I want to write something like “has $.foo = initfoo();”, but I can't do that (where initfoo is a method). What would be the right way to get it to work?
21:34 AlexDaniel or should I probably have one .init() method and call that manually? Not sure if I want that
21:35 lizmat AlexDaniel: do you know about BUILD
21:35 lizmat ?
21:35 AlexDaniel lizmat: well, I've seen that, but it's a bit hard to type
21:36 lizmat B U I L D  :-)
21:36 AlexDaniel lizmat: what about (:&!callback, :@!dependencies) ? Or should I just omit that?
21:37 AlexDaniel yes, indeed
21:37 AlexDaniel lizmat: right!
21:37 AlexDaniel lizmat: thanks
21:48 MadcapJake joined #perl6
21:50 MadcapJake joined #perl6
21:50 leont joined #perl6
21:50 MadcapJake Why am I getting "Can't use unknown trait 'is native' in a sub declaration"?
21:51 [Coke] m: sub foo is native { * };
21:51 camelia rakudo-moar 273e89: OUTPUT«5===SORRY!5=== Error while compiling /tmp/t5gKqcM7U9␤Can't use unknown trait 'is native' in a sub declaration.␤at /tmp/t5gKqcM7U9:1␤    expecting any of:␤        rw raw hidden-from-backtrace hidden-from-USAGE␤        cached pure default DEPRE…»
21:51 [Coke] m: use Nativecall; sub foo is native { * };
21:51 camelia rakudo-moar 273e89: OUTPUT«===SORRY!===␤Could not find Nativecall in any of:␤  file#/home/camelia/.perl6/2015.10-134-g273e895/lib␤  inst#/home/camelia/.perl6/2015.10-134-g273e895␤  file#/home/camelia/rakudo-inst-1/share/perl6/lib␤  file#/home/camelia/rakudo-inst-1/share/pe…»
21:52 ilmari m: use NativeCall; sub getuid()  returns uint32   is native(Str) {}; say getuid();
21:52 camelia rakudo-moar 273e89: OUTPUT«1012␤»
21:54 ugexe m: class Foo { has $.bar; method new(*%_) { my $self = self.bless(|%_); $self.init(); $self; }; method init { $!bar = 1; }; }; my $x = Foo.new( :bar(3) ); say $x.perl; # not ideal, but sorta works
21:54 camelia rakudo-moar 273e89: OUTPUT«Foo.new(bar => 1)␤»
21:54 MadcapJake oh i need to declare `use NativeCall` thanks!
21:54 AlexDaniel is anybody using HTTP::Client ?
21:54 cygx there's a weird bug for you: I pass a block to use so I can execute it in the corresponding EXPORT; if the block contains calls with named parameters, their value gets passed as positionals
21:55 cygx the workaround: use a sub() {} instead
21:55 AlexDaniel it does not work for me and travis says 「build | unknown」
21:55 cygx (or rather a sub () {} - whitespace matters)
21:56 ilmari m: class Foo { has $.bar; submethod BUILD { $!bar = 1 } }; say Foo.new(:bar(3))
21:56 camelia rakudo-moar 273e89: OUTPUT«Foo.new(bar => 1)␤»
21:56 ugexe but then you have to declare all your variables inside the BUILD signature
21:57 ilmari only the ones that you want to initialise from a method call
21:57 ugexe yes, thats what he wanted to avoid
21:57 MadcapJake is there an environment variable that perl6 uses to find native libraries?
21:58 ilmari ugexe: it's a lot less than your example of overriding new
21:58 ugexe not if you have multiple variables
21:58 ugexe with long variable names at that
21:58 ilmari ugexe: how is your method init { $!bar = 1; } different from submethod BUILD { $!bar = 1;  }?
21:59 RabidGravy AlexDaniel, the build unknown just means that travis is turned on for it, but hasn't actually run yet
21:59 ilmari other than the fact tht you have to override new and call it manually, that is
21:59 ugexe because you can pass mine any number of parameters without having to declare a huge BUILD signature
21:59 AlexDaniel RabidGravy: interesting. Looking at the log, I see that on my machine all tests were successful
21:59 AlexDaniel so it should work
22:00 ilmari m: class Foo { has $.bar; method new(*%_) { my $self = self.bless(|%_); $self.init(); $self; }; method init { $!bar = 1; }; }; say Foo.new(:bar(3),:baz(42) );
22:00 camelia rakudo-moar 273e89: OUTPUT«Foo.new(bar => 1)␤»
22:01 ilmari ugexe: you still have to declare the attributes for them to be stored anywhere, no?
22:01 ugexe yes
22:01 ugexe has $.whatever; instead of has $.whatever; submethod BUILD($!whatever)
22:01 RabidGravy MadcapJake, look at LibraryMake that has an example
22:01 ilmari ugexe: eh, you don't need a signature on BUILD
22:02 ilmari m: class Foo { has $.bar; has $.baz submethod BUILD { $!bar = 1 } }; say Foo.new(bar=>3, baz=>7)
22:02 camelia rakudo-moar 273e89: OUTPUT«5===SORRY!5=== Error while compiling /tmp/rpDKau3RCf␤Two terms in a row␤at /tmp/rpDKau3RCf:1␤------> 3class Foo { has $.bar; has $.baz7⏏5 submethod BUILD { $!bar = 1 } }; say Fo␤    expecting any of:␤        infix␤        infix stoppe…»
22:02 ilmari m: class Foo { has $.bar; has $.baz; submethod BUILD { $!bar = 1 } }; say Foo.new(bar=>3, baz=>7)
22:02 AlexDaniel RabidGravy: “Unsupported protocol, 'https'.” uh!
22:02 camelia rakudo-moar 273e89: OUTPUT«Foo.new(bar => 1, baz => Any)␤»
22:02 RabidGravy boo
22:03 ugexe aha i did not know that
22:03 AlexDaniel “if ($request.protocol ne 'http') { die …”
22:03 AlexDaniel I wonder if it will work without this check
22:04 RabidGravy AlexDaniel, if it doesn't use OpenSSL unlikely
22:04 AlexDaniel okay :(
22:04 AlexDaniel I'll just create an issue on github then
22:05 RabidGravy HTTP::UserAgent *does* support https
22:05 AlexDaniel RabidGravy: OH!
22:05 AlexDaniel RabidGravy: I did not notice it. Thanks!
22:05 AlexDaniel though I wonder if I should create an issue anyway?
22:06 RabidGravy do it
22:06 AlexDaniel ok, thanks
22:07 ilmari ugexe: oh, that appears to inhibit the default bindig to attributes
22:10 Peter_R joined #perl6
22:18 Skarsnik I was wondering, should LWP::Simple support cookies? I mean for me it like the equivalent of writing 'wget mywebsite'
22:18 tokuhiro_ joined #perl6
22:19 tadzik HTTP::UA does, I think
22:20 ilmari well, wget supports cookies, and even has --load-cookies, --save-cookies
22:20 ilmari by default it won't load or save, but it'll use them if it does multiple requests in a session
22:20 AlexDaniel Skarsnik: does it support https? :)
22:21 Skarsnik Yes, but if I just want to get some html from a webpage once. I don't necessary need to create a ua object
22:21 AlexDaniel try require IO::Socket::SSL; # seems so
22:22 Skarsnik ilmari, I think wget does. I have an exemple where requesting a page without cookies just fail (or does weird thing) and wget work on it
22:23 ilmari Skarsnik: yes, it sets a cookie and redirects, wget will send that cookie on the second request, if it applies
22:23 ilmari s/, it/, if it/
22:25 vendethiel mmh, do we have a module for terminal color codes around?
22:25 Skarsnik could be cool if lwp:simple act a similar way like "give me my html" I don't care for details
22:25 Skarsnik * and it leave the dev out of details
22:25 vendethiel yay \o/. I implemented a little script to sync all my repos, push the correct branch, and then ping on some remote at $work. wanted to give it nice output
22:26 sprocket how do i declare a typed array in p6?
22:26 sprocket ie) an array of Str
22:26 Skarsnik my Str @array
22:26 sprocket oh, that’s straightforward then :)
22:26 sprocket thanks!
22:34 RabidGravy Skarsnik, "use HTTP::UserAgent :simple;  say get('some-url')"
22:35 Skarsnik hm
22:37 Skarsnik I think it will not work, since by default cookie are not activated
22:38 RabidGravy if it doesn't send an isuue with the headers of the request, as it should
22:45 jdv79 the header parsing code is buggy if thats what you mean
22:48 Skarsnik hm interesting it work fine now. I had a really weird behavior from H:UA 2 months ago (like it took 0 sec or 50 sec to get this page)
22:49 adu joined #perl6
22:52 RabidGravy Skarsnik, quite a lot of fixes gone in the last few months
23:00 xpen joined #perl6
23:01 Skarsnik Unrelated, is there some tricks to speed up the creation of new object?
23:01 caymanboy joined #perl6
23:02 * caymanboy is looking forward to Perl6 1.0 next month
23:04 jdv79 yes, H:UA had a bunch of bugs more than it still has:)
23:05 ugexe jnthn: my problem was defining token CRLF { [<.CR> <.LF>] }, so the match on <.CR> would fail. token CRLF { \x0d \x0a } fixed it. grammar::tracer++
23:06 ugexe that behavior is still slightly confusing though
23:07 AlexDaniel caymanboy: oh hi again :)
23:27 japhb .ask pmurias Do you need help getting perl6-bench working for nqp-js?  If you PM me configure/build instructions, I can do the necessary patch to build and benchmark it along with the other backends.  (timotimo knows how too, but I don't want to speak for his time.)
23:27 yoleaux japhb: I'll pass your message to pmurias.
23:39 RabidGravy right bed time
23:44 zengargoyle does anybody have a recommendation for/against any of various the github CLI tools?  anything to make it easy to keep a cloned fork up to date and submit pull requests and such without going through the web gui?
23:53 Hotkeys there's always git
23:53 kid51 joined #perl6
23:57 dalek ecosystem: b3c8a7b | retupmoca++ | META.list:
23:57 dalek ecosystem: Add Crust::Middleware::Syslog
23:57 dalek ecosystem:
23:57 dalek ecosystem: https://github.com/retupmoca/P6-Crust-Middleware-Syslog
23:57 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/b3c8a7b51a

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

Perl 6 | Reference Documentation | Rakudo