Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-12-20

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:00 masak m: say so "foo" ~~ /f(oo)/; say ~$0
00:00 camelia rakudo-moar 091ee7: OUTPUT«True␤oo␤»
00:00 masak m: constant $R = /f(oo)/; say so "foo" ~~ $R; say ~$0
00:00 camelia rakudo-moar 091ee7: OUTPUT«True␤Use of Nil in string context  in block <unit> at /tmp/ogMqZLMmG5:1␤␤»
00:00 masak the last line not working is a regression (that I just discovered in a test in a branch in 007)
00:00 masak is that intentional? feels to me that oughta work just fine.
00:04 lucasb m: my \rx = /f(oo)/; say so "foo" ~~ rx; say ~$0
00:04 camelia rakudo-moar 091ee7: OUTPUT«True␤Use of Nil in string context  in block <unit> at /tmp/8s4GUxwB3u:1␤␤»
00:04 lucasb star: my \rx = /f(oo)/; say so "foo" ~~ rx; say ~$0
00:04 camelia star-m 2015.09: OUTPUT«True␤oo␤»
00:04 lucasb (just showing...)
00:04 lucasb masak++  # finding regressions
00:05 Begi By the way, I've a little question :
00:05 Begi m: my @list = <a b c d e>; say @list.roll; say @list.roll(1); #Why is it different ?
00:05 camelia rakudo-moar 091ee7: OUTPUT«d␤(c)␤»
00:05 masak well, with this one I kinda half-expect jnthn to pop up (tomorrow) and say "that's a feature!" or "masak, you submitted an RT thing that said it should be like that!" :P
00:06 Begi Why and what's the difference ?
00:06 masak Begi: because the default gives you just one item, but supplying an explicit 1 gives you a list (of 1 thing).
00:06 masak Begi: basically, the rule is, if you supply a number (including 1), you get a list.
00:06 masak Begi: this is deemed consistent when people write something like .roll($n) and then do list indexing
00:07 Begi Oh ok, I understand
00:07 vendethiel ..even if , in Perl6's case, it wouldn't change much ;-)
00:07 Begi Thanks
00:07 masak vendethiel: ...right
00:07 vendethiel .roll(1) could return a single elem and you would barely notice...
00:08 masak vendethiel: there is one place where you do notice
00:08 masak vendethiel: numerical comparison :(
00:08 vendethiel well, several. Also ~~ Positional etc
00:08 masak which people did a lot with the results of .roll
00:08 * masak submits rakudobug on the `~~ $R` thing
00:09 lucasb vendethiel: I saw you used the "String" type in your post... in 'class Article { has String $.title; ... }'
00:09 vendethiel well, I did ask people to review it... :) thanks
00:09 vendethiel once again something I'd fixed locally in my test script, but forgot to update later in the article
00:11 masak 'night (again), #perl6
00:15 awwaiid gnight again masak!
00:16 lucasb ok, then let's go back to .head and .tail... if .pick and .roll can make this distinction about empty vs not-empty argument lists, then can .head and .tail make the same distinction? .head() gets 1 element, .head(1) get a 1-elem list
00:17 lucasb this would be "consitent" (for some definition of) with .pick and .roll :D
00:20 pochi it has my vote
00:37 lucs m: say "meep?"
00:37 camelia rakudo-moar 091ee7: OUTPUT«meep?␤»
00:45 awwaiid m: say 42
00:45 camelia rakudo-moar 091ee7: OUTPUT«42␤»
00:51 AlexDaniel m: say ∞-∞-∞-∞-∞-∞
00:51 camelia rakudo-moar 091ee7: OUTPUT«NaN␤»
00:52 AlexDaniel I wish there were no white thngies around camelia here: https://perl6advent.files.wordpress.com/2015/12/camelia-flow.png?w=600&amp;h=490
00:52 AlexDaniel but otherwise this image is just awesome
00:55 skarn joined #perl6
01:03 grondilu it'd be nice if someone could make an animated gif of that, with Camelia flying from the bottom left to the top-right
01:04 psch hah
01:04 psch that graph is terribly cute
01:04 psch also, hi #perl6
01:05 psch .tell Ven i held of on mentioning it, but checking again shows it's still there: there's a dubious #-sigil for the private attribute 'name' in your advent post
01:05 yoleaux psch: I'll pass your message to Ven.
01:06 vike joined #perl6
01:07 psch fwiw, the latest blog post touches on my absence (which i'm not sure is over yet)
01:08 psch as in, as was the case before, i did become too wrapped up in rakudo and the "having fun while figuring all this out" turned into frustration
01:09 psch i am grateful this community recognizes the necessity of keeping it optimized for fun, which also means "you're free to step back whenever", even if that might come with (at that moment) badly received recommendations to do so
01:09 psch (the recommendation-case is a throwback to the previous time this happened to me :P )
01:11 psch ...i do recognize the irony in me feeling a need to mention i am taking a break >_>
01:13 zengargoyle joined #perl6
01:18 jack_rabbit joined #perl6
01:19 lucs How is this even possible?: in a regex I find that 「<?{ ($0 ~~ /'-'/) }>」 is True, but 「<?{ ($0 ~~ /'-'/) && ($0 ~~ /./) }>」 gives 「Use of Nil in string context」
01:21 TimToady you're probably clobbering $/ somehow there
01:22 TimToady the first ~~ sets $/ to Nil if it doesn't match, and the second one uses the Nil to look up $0
01:23 TimToady but that assumes the first one didn't match
01:23 lucs Hmm... Yet, it turns out that the first one does actually match.
01:24 TimToady maybe something about the micro-scoping of ~~ as a topicalizer?
01:25 lucs I'll try to golf it down.
01:26 lichtkind sorry for that question but it seems something is gone, i remember there was a mechanism  whichby roles could demand presence of some attr or method
01:33 dalek doc: 90a9437 | (Zoffix Znet)++ | htmlify.p6:
01:33 dalek doc: Replace unspace
01:33 dalek doc:
01:33 dalek doc: Seems there's an issue with some of unspace-less constructs still. Should fix breakage mentioned here: https://github.com/perl6/doc/pull/251#issuecomment-166050291
01:33 dalek doc: review: https://github.com/perl6/doc/commit/90a9437064
01:41 psch m: role R { method f { ... } }; class C does R { };
01:41 camelia rakudo-moar 091ee7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/O2Z0PyiGuS␤Method 'f' must be implemented by C because it is required by a role␤at /tmp/O2Z0PyiGuS:1␤»
01:41 psch lichtkind: that ^^^ is the method case
01:41 psch lichtkind: i'm not sure about the attribute case, i *think* the role mixes it in if it has it, so the class doesn't need to care
01:42 psch lichtkind: which, in turn, means that a class C that does a role R with an Attribute $!attr can't have its own Attribute $!attr
01:42 lichtkind ah yes because interface
01:42 lichtkind thanks
01:42 psch m: role R { has $!attr }; class C does R { has $!attr };
01:42 camelia rakudo-moar 091ee7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/DDKOT9YPFa␤Attribute '$!attr' already exists in the class 'C', but a role also wishes to compose it␤at /tmp/DDKOT9YPFa:1␤»
01:43 psch i like (and, on a different level, dislike) how that error mentions composition
01:43 lichtkind m: role R { has $.f;  }; class C does R { };
01:43 camelia rakudo-moar 091ee7: ( no output )
01:43 lichtkind m: role R { has $f;  }; class C does R { };
01:43 camelia rakudo-moar 091ee7: ( no output )
01:44 lichtkind m: role R { has $!f;  }; class C does R { };
01:44 camelia rakudo-moar 091ee7: ( no output )
01:44 psch i guess the fact that neither of those hunches is strong enough to result it useful criticism means the balance has been hit well
01:44 psch m: role R { has $.f;  }; class C does R { }; my C $a .= new; $a.f = "foo"; say $a.f
01:44 camelia rakudo-moar 091ee7: OUTPUT«Cannot modify an immutable Any␤  in block <unit> at /tmp/7ulmHDn3Ky:1␤␤»
01:44 psch right, not rw
01:45 psch m: role R { has $.f;  }; class C does R { }; my C $a .= new(:f("foo")); say $a.f
01:45 camelia rakudo-moar 091ee7: OUTPUT«foo␤»
01:47 psch hm, is spectest a bit faulty at the moment or could adding an argless candidate for .head and .tail actually result in about 20 failures and about 6 TODO passed?
01:47 psch i guess i'll rerun them without the changes...
01:48 lichtkind thanks but i wanted to that R requests an attribute
01:48 psch lichtkind: i don't know how that makes sense, considering R can *provide* that attribute
01:49 psch lichtkind: it's kind of like building a window that demands that you install a window-handle seperately
01:49 lichtkind sure but it can use one from class
01:49 psch (sorry for that dumb analogy...)
01:49 psch lichtkind: what's the use-case?
01:51 lichtkind i see one but its nothing i ever used and im too sleepy not to sit
01:51 lichtkind good night
01:51 psch g'night lichtkind
01:53 lichtkind :)
01:58 vike joined #perl6
01:59 BenGoldberg joined #perl6
02:01 TimToady skids: I'm trying to understand why SlurpySentry is so fancy?  Couldn't .from-slurpy just translate directly?
02:03 lucs m: say so("a" ~~ / (.) <?{ $0 ~~ /'a'/ && say("\$0 is now ", $0.WHAT) }> /)
02:03 camelia rakudo-moar 091ee7: OUTPUT«$0 is now Nil␤True␤»
02:04 skids TimToady: let me review that patch, there was a reason at the time, maybe not now.
02:05 lucs TimToady: So would that ^^ be a bug or a don't-do-that?
02:06 * psch wonders where that funny c is on the keyboard...
02:06 lucs (FWIW, I won't do it anymore, but, just saying :-) )
02:06 psch m: say so("a" ~~ / (.) <?{ $0 ~~ /'a'/ && say("\$/ is now ", $0.WHAT) }> /)
02:06 camelia rakudo-moar 091ee7: OUTPUT«$/ is now Nil␤True␤»
02:06 psch huh
02:06 psch that seems wrong to me, at least
02:06 psch well, no
02:07 psch accessing $/ there is a "works sometimes" workaround for accessing the CURSOR special name
02:07 psch m: say so("a" ~~ / (.) <?{ $0 ~~ /'a'/ && say("\$¢ is now ", $0.WHAT) }> /)
02:07 camelia rakudo-moar 091ee7: OUTPUT«$¢ is now Nil␤True␤»
02:07 psch m: say so("a" ~~ / (.) <?{ $0 ~~ /'a'/ && say("\$¢ is now ", $¢.WHAT) }> /)
02:07 camelia rakudo-moar 091ee7: OUTPUT«$¢ is now Nil␤True␤»
02:07 lucs My current workaround is just to assignt the $0 to a var and work with that var instead.
02:08 psch m: say so("a" ~~ / (.) <?{ $0 ~~ /'a'/ && say("\$/ is now ", $/.WHAT) }> /)
02:08 camelia rakudo-moar 091ee7: OUTPUT«$/ is now (Match)␤True␤»
02:08 psch ah, there we go
02:08 skids TimToady: it was to handle the case where someone did fail(Parcel.new()) or something like that and expected the payload not to be a concatinated string of the Parcel, but the original Parcel.
02:08 psch i mucked up :)
02:08 psch m: say so("a" ~~ / (.) <?{ $0 ~~ /'a'/ && say("\$/[0] is now ", $/[0].WHAT) }> /)
02:08 camelia rakudo-moar 091ee7: OUTPUT«$/[0] is now Nil␤True␤»
02:08 psch lucs: the hunch is that the switch from Perl6::Grammar to NQP::P6Regex messes something up with accessing the different interpretations of $/
02:09 psch as in, the code block inside the regex doesn't build the same lookup for $0 as it would outside of a regex
02:09 lucs psch: Hey, I'm just sitting here in luserland, I'll be happy to let you guys figure it out :)
02:09 psch that might easily be wrong though, but the fact that $/ is Match seems to hint at it...
02:10 psch lucs: fair enough.  my regex slang fu is probably not good enough to get anything out of that.  did you RT it yet, and if not, can you?
02:11 psch 'cause even if $/ isn't supposed to work there (which ISTR it isn't), at least $¢ should
02:11 asdfgh joined #perl6
02:11 lucs I guess I could. Is my initial example sufficient?
02:11 psch lucs: i think my evals should go in there as well, as should the commentary up to your questions just now
02:12 psch all of this is complicated by re-matching inside a regex of course
02:13 psch which might be similar to the issue of $/ as parameter to an actions method
02:13 lucs psch++ Thanks for agreeing to report it
02:14 dalek ecosystem: 6f997e2 | thundergnat++ | META.list:
02:14 dalek ecosystem: Add Lingua::EN::Numbers::Cardinal to ecosystem
02:14 dalek ecosystem:
02:14 dalek ecosystem: See: https://github.com/thundergnat/Lingua-EN-Numbers-Cardinal
02:14 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/6f997e2f34
02:15 psch hmm
02:16 psch m: say so("a" ~~ / (.) <{ $0 ~~ /'a'/ && say("\$0 is now ", $0.WHAT) }> /)
02:16 camelia rakudo-moar 091ee7: OUTPUT«$0 is now Nil␤False␤»
02:16 psch m: say so("a" ~~ / (.) { $0 ~~ /'a'/ && say("\$0 is now ", $0.WHAT) } /)
02:16 camelia rakudo-moar 091ee7: OUTPUT«$0 is now Nil␤True␤»
02:16 psch m: say so("a" ~~ / (.) { $0 ~~ /'a'/ && say("\$/ is now ", $/.WHAT) } /)
02:16 camelia rakudo-moar 091ee7: OUTPUT«$/ is now (Match)␤True␤»
02:17 uruwi Why is assigning to .substr-rw slow for some reason?
02:18 uruwi m: my $b = "abacadabra"; $b.substr-rw(1, 4) = "lulz"; say now - INIT now;
02:18 camelia rakudo-moar 091ee7: OUTPUT«0.0029565␤»
02:18 geekosaur it returns a Proxy
02:18 geekosaur which means it can't take the fast path but has to run the Proxy's STORE method, IIRC
02:18 TEttinger joined #perl6
02:18 uruwi m: my $b = "abacadabra"; $b = $b.substr(0, 1) ~ "lulz" ~ $b.substr(5); say now - INIT now;
02:18 camelia rakudo-moar 091ee7: OUTPUT«0.002799␤»
02:18 skids ISTR .substr-rw was a bit of a "first make it work" solution to the problem using proxies, last time I looked.
02:19 uruwi m: my $b = "abacadabra"; for ^10000 {$b.substr-rw(1, 4) = "lulz"}; say now - INIT now;
02:19 camelia rakudo-moar 091ee7: OUTPUT«0.1587779␤»
02:19 uruwi m: my $b = "abacadabra"; for ^10000 {$b = $b.substr(0, 1) ~ "lulz" ~ $b.substr(5)}; say now - INIT now;
02:19 camelia rakudo-moar 091ee7: OUTPUT«0.0983858␤»
02:20 geekosaur my recollection was that it was to get the slow Proxy out of the more common cases of substr(), since even building a Proxy that wasn't used was expensive?
02:20 uruwi m: my $b = "abacadabra"; $b = $b.substr(0, 1) ~ "lulz" ~ $b.substr(5); say $b;
02:20 camelia rakudo-moar 091ee7: OUTPUT«alulzdabra␤»
02:20 uruwi How much memory does a Proxy even consume...
02:21 uruwi I can't even build a set of 1800 strings with .substr-rw without exhausting most of my memory
02:23 geekosaur rakudobug that, it seems wrong. I would expect the Proxy to go away fairly quickly but this makes me think it's held forever... (if in fact that's the problem)
02:23 geekosaur (basically it should only exist for as long as you could assign to it, so as soon as you leave the "$foo.substr-rw(...) = " it should go out of scope and be collected)
02:24 Ben_Goldberg joined #perl6
02:25 FROGGS_ joined #perl6
02:26 geekosaur but I'm wondering if it is somehow attached to the target string and sticks around forever, probably holding other stuff in scope that should have been collected
02:27 Ben_Goldberg joined #perl6
02:28 psch https://rt.perl.org/Ticket/Display.html?id=126971
02:28 psch lucs: ^^^ feels free to expand, if you noticed something i missed
02:35 lucs psch: That pretty much describes it (but near the end, does $¢ mean $0?)
02:35 psch re substr-rw: geekosaur's hunch seems pretty on the spot, from a glance.  the STORE part of the Proxy returned by substr-rw references a variable from the original substr-rw call, which might be kept around
02:36 psch lucs: no, $ ~ "\c[funny c]" is the shorthand for the current and unfinished cursor
02:36 lucs Ah, I see.
02:36 lucs "funny c" :) (funny money?)
02:36 * psch never got used to cents
02:36 psch in my mind it's mostly still pfennige :)
02:36 geekosaur it makes no cents...
02:36 TimToady if you have a compose key, it's probably just compose-c-/
02:37 psch TimToady: unfortunately i don't, currently
02:37 lucs We got rid of pennies not long ago in Canada (they round cash transactions to the closest nickel).
02:39 Hotkeys ^^^ best thing since sliced bread
02:41 psch TimToady: in any case, what's your call on having arg-less .head and .tail calls return an item instead of a Seq?
02:42 psch spectest seems equivalent between with and without that
02:42 psch (which probably means lack of tests...)
02:47 TimToady I think I'm okay with argless doing that
02:47 TimToady after all, I was the one who decided to do pick/roll that way, iirc
02:47 psch alright, i'll cargo cult from there for the exact impl, thanks
02:47 Juerd What do 'wanted' and 'unwanted' mean?
02:48 ilbot3 joined #perl6
02:48 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
02:48 Juerd TimToady: Thanks
02:54 Sqirrel joined #perl6
02:55 uruwi joined #perl6
02:56 grondilu m: say "Az I orvat fybj be fbzrguvat?".trans: "a".."z" Z=> ["a".."z"].rotate(13); say now - INIT now
02:56 camelia rakudo-moar 091ee7: OUTPUT«Am I being slow or something?␤0.259135␤»
02:57 psch m: say "Az I orvat fybj be fbzrguvat?".trans: "a".."z" => ["a".."z"].rotate(13); say now - INIT now
02:57 camelia rakudo-moar 091ee7: OUTPUT«Am I being slow or something?␤0.19404659␤»
02:57 psch those .06 seconds are 26 Pairs instead of one Pair
02:57 Juerd Apart from the slowness, I really like how this implementation of rot13 actually has "rotate(13)" literally in its source, and that it didn't need to define "rotate" first.
02:57 Ben_Goldberg m: my $start = now; say "Az I orvat fybj be fbzrguvat?".trans: "a".."z" => ["a".."z"].rotate(13); say now $start;
02:57 camelia rakudo-moar 091ee7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Lz2D1TxXWX␤Two terms in a row␤at /tmp/Lz2D1TxXWX:1␤------> 3".."z" => ["a".."z"].rotate(13); say now7⏏5 $start;␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤  …»
02:57 psch but yes, .trans, in general, is slow
02:57 Ben_Goldberg m: my $start = now; say "Az I orvat fybj be fbzrguvat?".trans: "a".."z" => ["a".."z"].rotate(13); say now - $start;
02:57 camelia rakudo-moar 091ee7: OUTPUT«Am I being slow or something?␤0.1899672␤»
02:58 Ben_Goldberg In perl5, the =~ tr/// operator is very fast.
03:00 geekosaur it's also simpler and stupider
03:01 psch m: $_ = "bookkeeper"; tr:s/a..z/a..z/; .say
03:01 camelia rakudo-moar 091ee7: OUTPUT«[DISLOCATED MESSAGE] Useless use of "StrDistance" in sink context␤[DISLOCATED MESSAGE] Useless use of StrDistance symbol in sink context␤bokeper␤»
03:01 psch hm
03:01 psch those sink warnings are LTA
03:02 psch although i recognize they might be hard to distinguish from legit sink warnings
03:02 psch m: $_ = "foo"; s/o/u/; .say
03:02 camelia rakudo-moar 091ee7: OUTPUT«fuo␤»
03:02 psch ah, maybe not
03:02 geekosaur looks like those came from the doubled letters that vanished in the output, maybe?
03:02 psch i guess tr/// should get the s/// treatment there
03:02 xpen joined #perl6
03:02 psch geekosaur: no, they came from the tr/// statement in sink contest
03:03 psch geekosaur: although that doesn't explain *two* of them...
03:03 psch s/statement/expression as a statement/
03:03 geekosaur yes, it was the "two of them" that made me think something trickier was going on
03:03 psch anyway, case in point was: "give me squash behavior in perl5 tr/// and something something archimedes"
03:04 geekosaur oh, squash, right
03:04 psch yeah, adverb shorthands are a bit unfortunate for tr///
03:04 psch but i personally hope tr/// can get deprecated eventually
03:04 psch as in, maybe around 6.3 or something
03:05 psch 'cause it's histerical raisins - the operator
03:05 Juerd m: my %tr = "a".."z" Z=> ["a".."z"].rotate(13); say "Am I being slow or something?".comb.map({ %tr{$_} // $_ }).join; say now - INIT now
03:05 camelia rakudo-moar 091ee7: OUTPUT«Az I orvat fybj be fbzrguvat?␤0.0086742␤»
03:05 Juerd Roll your own :)
03:06 psch hrm
03:06 psch Juerd++ for that pointer
03:07 psch i mean, on the one obviously simple things in CORE are more optimized
03:07 psch but on the other hand, using simple things to emulate complicated behavior shouldn't be faster than using a CORE function to achieve the same behavior
03:07 psch mostly from a code-as-documentation perspective
03:07 psch ...maybe that's wrong
03:08 psch as in, the obvious solution that relies on obvious features (instead of the CORE solution that relies on obscure features) should always be faster
03:08 psch ...i'm not sure i'm fit for thinking (or talking) about this kind of thing :P
03:10 Juerd Any opinion is useful in some way.
03:10 Juerd s/Any/Every/
03:14 Juerd I wish there was a "foo".Regex, or some other easy way to turn a string into a regex
03:15 psch m: my $str = "foo"; my $rx = rx/<$str>/; say "foo" ~~ $rx
03:15 camelia rakudo-moar 091ee7: OUTPUT«True␤»
03:15 Juerd Simply interpolating a string as a regex is annoying because in the stringification of the regex the actual regex is gone.
03:15 psch ah
03:15 Juerd m: my $str = "foo"; my $rx = rx/<$str>/; say $rx;
03:15 camelia rakudo-moar 091ee7: OUTPUT«rx/<$str>/␤»
03:16 Juerd Especially for Test::like it drives me insane
03:16 uruwi m: my $str = "foo"; my $rx = /$str/; say $rx;
03:16 camelia rakudo-moar 091ee7: OUTPUT«/$str/␤»
03:16 psch m: my $str = "foo"; my $rx = rx/{ "$str" }/; say $rx # my next thought, but...
03:16 camelia rakudo-moar 091ee7: OUTPUT«rx/{ "$str" }/␤»
03:16 psch the stringification doesn't carry outward from the xFA that's being build
03:16 psch which might have something to do with turing machines and their abilities
03:16 psch not sure, my theoretical foundation is limited
03:17 Juerd Maybe I'm crazy and creating regexes from strings isn't as common as I think.
03:17 psch i think the rare part is wanting to see the string in the regex
03:17 geekosaur I have done that but not very often, and even when I do it it feels like I'm doing something "backwards"
03:18 Juerd I don't know, especially when the regex is generated, being able to see it gets important :)
03:18 Juerd When the regex was a literal regex, I don't feel so strongly for being able to see its code because then I already have it right there in my source :)
03:19 psch i think it might be possible to get Regex.gist to do that, but i'd have to dig (quite a lot) to figure out (1) if i'm right and (2) how to do it
03:19 Juerd It's just ugly when to debug your generated regexes, you have to hack print-debug statements into the generator function, because the thing that the function returns isn't useful for inspection.
03:19 psch i mean, one hang up is with a regex that uses CALLER:: or CALLERS::
03:20 psch 'cause those aren't the same from Regex.gist and wherever the Regex is used
03:21 psch so it's probably a bucket load of hacks to make that work "really well".  as for "good enough", i don't know if that's enough
03:21 psch similarly for .perl as for .gist, 'cause the impl is identical
03:21 psch although the former carries the "has to EVAL to the same" burden, which might add or remove torture on the implementor
03:22 Juerd In the specific case I was trying now, it's silly though
03:22 Juerd Because I was falling back to a perl5ish .join('|')
03:24 ShimmerFairy I have a feeling some of this might be solved with a really nice, gdb-like P6 debugger :)
03:24 noganex_ joined #perl6
03:28 Juerd ShimmerFairy: I've never liked debuggers and repls
03:28 Juerd I'm more a print-debugger, and I like oneliners.
03:30 uruwi ^
03:30 psch m: my $a; { my $b = "foo"; $a = rx/<$b>/; }; my $c = EVAL $a.perl; say "foo" ~~ $c
03:30 camelia rakudo-moar 091ee7: OUTPUT«5===SORRY!5=== Error while compiling /home/camelia/EVAL_0␤Variable '$b' is not declared␤at /home/camelia/EVAL_0:1␤------> 3rx/<7⏏5$b>/␤»
03:30 psch ^^^ hints at the problem
03:30 pyrimidine joined #perl6
03:31 ShimmerFairy Juerd: I like print debugging as well, but gdb has saved me a lot of grief on occasion, even though the most I use of it is 'bt', 'frame', and 'print [some C++ expr]'    :)
03:31 psch and i'm not sure we can solve that sensibly, but that's mostly 'cause i don't know NQP::P6Regex enough to tell if it *could* copy $b
03:31 psch ...or if we'd want that
03:31 Juerd psch: I'm not sure it should
03:32 Juerd And if we had a way to turn a string into a regex (please, no EVAL), it wouldn't be needed in most cases
03:32 psch Juerd: but then you can't expect .perl to give you the string instead of the to-be-interpolated variable
03:32 lockdown joined #perl6
03:32 Juerd psch: That's not the Y I asked for to match my X though :)
03:32 psch Juerd: the point of the camelia eval was to show that the .perl of the Regex doesn't know the string, it only knows the variable to interpolate
03:33 Juerd Yes, it's a closure.
03:33 psch i won't dig nor complain if it's solved with "i might have XY'd myself there", in any case :)
03:34 Juerd :)
03:35 Juerd m: my @matches = <oo a>; "foo bar baz".comb(/@matches | o/).say
03:35 camelia rakudo-moar 091ee7: OUTPUT«(o o a a)␤»
03:35 Juerd I don't understand why it matches o and o instead of oo.
03:35 Juerd m: my @matches = <oo a>; "foo bar baz".comb(/oo | a | o/).say
03:35 camelia rakudo-moar 091ee7: OUTPUT«(oo a a)␤»
03:35 Juerd That's what I thought it would do.
03:36 psch that might be related to https://rt.perl.org/Ticket/Display.html?id=126713
03:36 psch as in, array interpolation doesn't quite match | semantics
03:36 psch ...in a regex, that is
03:37 Juerd It might but I find the code in that ticket hard to read :)
03:38 psch vOv
03:38 psch i try to code well :P
03:38 psch ehh, legible, maybe
03:38 Juerd 「」 makes the readability much worse, and that's not the code's fault
03:39 Juerd psch: In bug reports I try to read significance in every character. So given ^(@a)*?$  I wonder why it's anchored, and why there's a ? after the *
03:39 psch the ? after * allows backtracking
03:39 Juerd Yes, but I'm trying to figure out why that was needed for the bug to trigger
03:40 Juerd And if it wasn't, then it's not golfed enough yet :)
03:40 psch m: say "abcd" ~~ /(@a)*/
03:40 camelia rakudo-moar 091ee7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/LWDfHEtOOW␤Variable '@a' is not declared␤at /tmp/LWDfHEtOOW:1␤------> 3say "abcd" ~~ /(7⏏5@a)*/␤»
03:40 psch grml
03:40 psch m: my @a = < a b bc cd >; say "abcd" ~~ /(@a)*/
03:40 camelia rakudo-moar 091ee7: OUTPUT«「abc」␤ 0 => 「a」␤ 0 => 「bc」␤»
03:40 psch right, the report could've been more golfed i guess
03:41 davercc joined #perl6
03:41 Juerd And it might have been clearer if the two attempts were not in a single m:
03:41 psch i'm not confident enough to predict the right behavior i'd say.  quoting the synopsis alludes to that
03:41 psch yes, that's definitely true
03:41 Juerd 'cause it took me, well, a few minutes, to realise that I should have been looking at that Nil in the output, not the rest.
03:42 * psch adds that to the ticket
03:42 Juerd Then again, it's almost 5am here and I should probably just go to bed.
03:42 Juerd But yes, I do think that this RT ticket and what I encountered with .comb are the same thing.
03:42 timotimo psch: i didn't read anything around that line in the backlog, but about interpolating strings as regex inside regex: it can't ever be integrated into the NFA, because the NFA only does the declarative prefix of a piece of regex. interpolating a string as a regex is decidedly not declarative
03:43 psch timotimo: is that about the ticket i opened for lucs?
03:43 timotimo no clue
03:43 timotimo i'm about to head for bed and i just saw that one single line
03:43 psch ah, no, then it probably isn't, it's more recent and about "make .gist know what the string is and not the variable"
03:43 timotimo 041248      psch │ the stringification doesn't carry outward from the xFA that's being build
03:43 timotimo 041258      psch │ which might have something to do with turing machines and their abilities
03:44 timotimo maybe i misunderstood
03:44 psch nah, it fits my limited understanding
03:44 ShimmerFairy m: say /^ a+ bc? $/
03:44 camelia rakudo-moar 091ee7: OUTPUT«/^ a+ bc? $/␤»
03:45 timotimo ShimmerFairy: did you notice? someone gave your "perl6 on cpan?" blog post a bit of extra publicity!
03:45 ShimmerFairy no, I didn't
03:46 Actualeyes joined #perl6
03:46 Juerd Ho-ly, crap, bitcard is annoying.
03:47 ShimmerFairy I don't like it much either, for the record (I tried changing my username a while back, but the bug tracker insists on still using my old one in various places :/)
03:47 Juerd And then RT, which wants me to use an email address that is both registered to my bitcard account AND never seen by RT before
03:47 Juerd Screw this, I'm too annoyed to even consider continuing right now.
03:47 Juerd I will simply not reply to existing tickets then
03:48 ShimmerFairy (as I've said before, rakudo should really be using its own bugtracker)
03:49 timotimo ShimmerFairy: some spam blog snatched it from the rakudo deathstar and reposted it, someone posted it under /r/perl thinking it was new %)
03:49 ShimmerFairy pft :P
03:50 uruwi joined #perl6
03:50 Juerd ShimmerFairy: It says the username 'juerd' is already taken. But I don't have it, and I don't know any other juerd in the Perl community
03:50 Juerd There only are 10 Juerds worldwide, anyway
03:51 Juerd I've had a bitcard account since 2007, according to my email, but apparently the username 'juerd' belongs to a different account, that is not mine.
03:51 ShimmerFairy Juerd: huh, that's weird. My "own bugtracker" comment is mainly motivated by the weirdness of having P5 and P6 in one bugtracker (Parrot used to be lumped in as well, fwiw), and personally rt just feels... weird sometimes. I'm not sure what it is exactly.
03:52 Juerd But the requirement to use an email address that is both registered to bitcard AND never seen by RT before is just arcane.mad.
03:52 Juerd s/arcane\.//
03:52 * timotimo goes to bed
03:52 uruwi Sigh, I'll have to write my AoC19 part 2 solution in Python then.
03:53 Juerd ShimmerFairy: I love RT but this bitcard link seems out of place
03:53 Juerd I'm off to bed as well
03:53 raiph joined #perl6
03:53 Juerd Good localtime!
03:53 ShimmerFairy Juerd: yeah, I do appreciate RT's "don't have to sign up to report" aspect, that's something I think is perplexingly absent from most bug trackers.
03:54 ShimmerFairy Juerd: I suppose it just... feels different. I think the weirdest part is where I sometimes have to "log out" of being a Public viewer to log in as myself(???), if I was unlucky enough to get auto-signed-out since the last visit
03:59 psch oh, yes, that's definitely weird
03:59 psch fwiw, on my end bitcard seems to have a longer session than RT itself, which is even stranger
04:00 psch as in, i can click "log out as anon" and "log in with bitcard" afterwards, without having to reauth with bitcard
04:00 psch it's not terribly inconvenient, but it *is* weird
04:00 BenGoldberg joined #perl6
04:01 ShimmerFairy There's also that UTF-8 issue I see on the rt home page, something I never would've allowed, certainly not for so long :P
04:03 TEttinger joined #perl6
04:04 BenGoldberg joined #perl6
04:04 TG__ joined #perl6
04:05 kaare_ joined #perl6
04:08 AlexDaniel m: ∞
04:08 camelia rakudo-moar 091ee7: ( no output )
04:08 AlexDaniel m: 42
04:08 camelia rakudo-moar 091ee7: OUTPUT«WARNINGS for /tmp/oQgrWrXlf5:␤Useless use of constant integer 42 in sink context (line 1)␤»
04:08 AlexDaniel m: Inf
04:08 camelia rakudo-moar 091ee7: ( no output )
04:09 AlexDaniel m: NaN
04:09 camelia rakudo-moar 091ee7: ( no output )
04:09 AlexDaniel m: 25.5
04:09 camelia rakudo-moar 091ee7: OUTPUT«WARNINGS for /tmp/j6MuINCuvm:␤Useless use of constant value 25.5 in sink context (line 1)␤»
04:09 AlexDaniel m: “test”
04:09 camelia rakudo-moar 091ee7: OUTPUT«WARNINGS for /tmp/jM2e31sBqO:␤Useless use of constant string "test" in sink context (line 1)␤»
04:09 AlexDaniel m: Int
04:09 camelia rakudo-moar 091ee7: OUTPUT«WARNINGS for /tmp/zBYT2dTqPT:␤Useless use of constant value Int in sink context (line 1)␤»
04:09 AlexDaniel TimToady: what's so special about ∞ and NaN?
04:10 AlexDaniel m: <a b c>
04:10 camelia rakudo-moar 091ee7: OUTPUT«WARNINGS for /tmp/joilEfwcP0:␤Useless use of constant value a b c in sink context (lines 1, 1, 1, 1, 1, 1)␤»
04:10 AlexDaniel what
04:10 AlexDaniel m: ^100
04:10 camelia rakudo-moar 091ee7: OUTPUT«WARNINGS for /tmp/PK5FM8F89F:␤Useless use of "^" in expression "^100" in sink context (line 1)␤»
04:10 AlexDaniel m: 1...100
04:10 camelia rakudo-moar 091ee7: ( no output )
04:10 AlexDaniel m: 1..100
04:10 camelia rakudo-moar 091ee7: OUTPUT«WARNINGS for /tmp/oU_50TcbSb:␤Useless use of ".." in expression "1..100" in sink context (line 1)␤»
04:10 AlexDaniel m: «a b c d e f»
04:10 camelia rakudo-moar 091ee7: OUTPUT«WARNINGS for /tmp/PzhFVqK_aN:␤Useless use of constant value a b c d e f in sink context (lines 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)␤»
04:11 grondilu joined #perl6
04:12 AlexDaniel m: ⅑
04:12 camelia rakudo-moar 091ee7: OUTPUT«WARNINGS for /tmp/dQ1L91Lfsy:␤Useless use of constant value ⅑ in sink context (line 1)␤»
04:14 psch m: sub term:<foo> { "foo" }; foo
04:14 camelia rakudo-moar 091ee7: ( no output )
04:15 psch probably similar, but likely not identical
04:15 psch as in, Inf (and the symbol) get caught on a term level
04:16 psch as per src/Perl6/Grammar.pm:1673: "      token term:sym<∞>                  { <sym> }  "
04:16 psch actually, Inf is different
04:16 psch if it's not parsed by NQP::Grammar somewhere it should fall into numish
04:17 psch m: 5;
04:17 camelia rakudo-moar 091ee7: OUTPUT«WARNINGS for /tmp/WZaKETOE9X:␤Useless use of constant integer 5 in sink context (line 1)␤»
04:17 psch ...and those *should* warn there :/
04:18 AlexDaniel m: / a /
04:18 camelia rakudo-moar 091ee7: OUTPUT«getlexrelcaller needs a context␤  in block <unit> at /tmp/GscGOrP8Ca:1␤␤»
04:18 AlexDaniel getlexrecaller, yeah…
04:19 psch +l :)
04:33 AlexDaniel m: .{}
04:33 camelia rakudo-moar 091ee7: ( no output )
04:34 AlexDaniel m: .<>; .[]
04:34 camelia rakudo-moar 091ee7: ( no output )
04:34 AlexDaniel m: .[].<>.{}.«»
04:34 camelia rakudo-moar 091ee7: ( no output )
04:35 AlexDaniel m: :D # noo
04:35 camelia rakudo-moar 091ee7: OUTPUT«WARNINGS for /tmp/CtVVkmXGSB:␤Useless use of ":D" in sink context (line 1)␤»
04:35 AlexDaniel m: say :D
04:35 camelia rakudo-moar 091ee7: OUTPUT«Unexpected named parameter 'D' passed␤  in block <unit> at /tmp/Bl9bgCVjmI:1␤␤»
04:35 AlexDaniel smiley program does not work anymore :(
04:40 uruwi Wow, apparently python3 is 10k times faster than perl6.
04:40 cognominal joined #perl6
04:41 AlexDaniel uruwi: doing what?
04:41 uruwi Building sets from the results of performing a list of substitutions on a given string
04:42 uruwi The Perl 6 version struggled with an initial set of 61 strings
04:42 uruwi Python 3 can do 30k in only 5 - 6 s
04:43 AlexDaniel uruwi: is that on 32-bit or 64-bit system?
04:43 uruwi 64-bit.
04:44 vendethiel joined #perl6
04:45 AlexDaniel uruwi: that's not very good. Perhaps you can submit your test case to https://github.com/japhb/perl6-bench ?
04:46 psch uruwi: can you show the codes?
04:47 psch -s
05:08 psch hm
05:09 psch S17-supply/throttle.t lock without my < .tail and .head > patch occasionally and with it even more
05:09 psch which means i can't reliably compare spectest results between those two, 'cause with the patch the 3 runs i've tried didn't complete
05:10 psch and because touching the async stuff is way too far outside my comfort zone this means i'm not gonna push the patch
05:10 psch g'night, #perl6.
05:16 awwaiid go camelia
05:16 AndyDee joined #perl6
05:23 awwaiid m: say "hello\nbrave\nworld"
05:23 camelia rakudo-moar 091ee7: OUTPUT«hello␤brave␤world␤»
05:23 awwaiid sweet. my irssi plugin that actually puts that on separate lines works
05:26 AlexDaniel m: say ‘hi’ for ^1000
05:26 camelia rakudo-moar 091ee7: OUTPUT«hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤h…»
05:31 awwaiid Thanks for the test AlexDaniel!
05:32 awwaiid worked "great"
05:32 AlexDaniel :)
05:44 vike joined #perl6
05:44 xpen joined #perl6
06:03 dalek doc: 3469f52 | (Brock Wilcox)++ | htmlify.p6:
06:03 dalek doc: Maybe less space?
06:03 dalek doc: review: https://github.com/perl6/doc/commit/3469f52663
06:06 inokenty joined #perl6
06:16 TEttinger m: say ‘\n’ for ^10
06:16 camelia rakudo-moar 091ee7: OUTPUT«\n␤\n␤\n␤\n␤\n␤\n␤\n␤\n␤\n␤\n␤»
06:16 TEttinger hm?
06:16 awwaiid haha
06:17 TEttinger m: say "\r\n" for ^10
06:17 camelia rakudo-moar 091ee7: OUTPUT«
06:17 TEttinger m: say "␤" for ^10
06:17 camelia rakudo-moar 091ee7: OUTPUT«␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤»
06:17 TEttinger did my message show up on two lines, awwaiid?
06:18 TEttinger I'm...␤curious, awwaiid
06:18 awwaiid nope! 10 lines -- my script can't distinguish ␤ from ... er... ␤
06:18 TEttinger haha
06:18 TEttinger there's 20 ␤ there
06:18 awwaiid er, 20 lines
06:18 awwaiid I miscounted
06:18 TEttinger ha ok
06:18 TEttinger cool
06:19 TEttinger this might be fun
06:19 TEttinger I used to have a loud guitar riff that played whenever someone said my name on IRC.  https://dl.dropboxusercontent.com/u/11914692/guitarsolo.wav
06:20 TEttinger I have since disabled it since it seemed to cause problems with lockup while playing?
06:20 awwaiid looks like it already limits it to a certain number of chars that adds up to maybe 3 screenfuls at most. I think the majority case of general m: commands will work great, and the many-newline-outliers will be tolerable
06:20 TEttinger cool
06:20 TEttinger what about the ascii vertical tab char?
06:21 TEttinger m: say "\c[VERTICAL TAB]"
06:21 camelia rakudo-moar 091ee7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FLh4dIpt42␤Unrecognized character name VERTICAL TAB␤at /tmp/FLh4dIpt42:1␤------> 3say "\c[VERTICAL TAB7⏏5]"␤»
06:21 awwaiid that's a pretty long riff if you get mentioned often :)
06:21 TEttinger yep
06:23 awwaiid TEttinger: https://gist.github.com/awwaiid/a8ab39f89ba36c8325e7
06:24 TEttinger m: say "\u000b"
06:24 camelia rakudo-moar 091ee7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/gyMhdh5W6R␤Unrecognized backslash sequence: '\u'␤at /tmp/gyMhdh5W6R:1␤------> 3say "\7⏏5u000b"␤    expecting any of:␤        argument list␤        double quotes␤        term␤»
06:24 TEttinger m: say "\000b"
06:24 camelia rakudo-moar 091ee7: OUTPUT«␀00b␤»
06:24 awwaiid what is ␀
06:24 TEttinger backslash 0
06:25 TEttinger I am not sure how to escape character 11 in unicode
06:27 TEttinger u: 11
06:28 AlexDaniel .u 11
06:28 yoleaux U+FE0A VARIATION SELECTOR-11 [Mn] (◌︊)
06:28 yoleaux U+1D1A5 MUSICAL SYMBOL ORNAMENT STROKE-11 [So] (𝆥)
06:28 yoleaux U+1D20A GREEK VOCAL NOTATION SYMBOL-11 [So] (𝈊)
06:29 TEttinger m: say "\c[LINE TABULATION]"
06:29 camelia rakudo-moar 091ee7: OUTPUT«␤»
06:29 TEttinger m: say "\c[LINE TABULATION]" for ^10
06:29 camelia rakudo-moar 091ee7: OUTPUT«␤␤␤␤␤␤␤␤␤␤»
06:29 TEttinger that displays as 10 lines for me, and gets cut off actually
06:31 juiko joined #perl6
06:40 pierre-vigier joined #perl6
06:44 uruwi m: say 1 «Z« (2, 3, 5, 7)
06:44 camelia rakudo-moar 091ee7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ktzlM7fQtV␤Missing infix inside hyper␤at /tmp/ktzlM7fQtV:1␤------> 3say 1 «Z«7⏏5 (2, 3, 5, 7)␤    expecting any of:␤        infix␤        infix stopper␤»
06:44 uruwi m: say 1 «Z+« (2, 3, 5, 7)
06:44 camelia rakudo-moar 091ee7: OUTPUT«((3) (4) (6) (8))␤»
06:44 uruwi m: say 1 «Z,« (2, 3, 5, 7)
06:44 camelia rakudo-moar 091ee7: OUTPUT«(((1 2)) ((1 3)) ((1 5)) ((1 7)))␤»
06:45 uruwi m: say (1 «Z,« (2, 3, 5, 7)).map(*[0])
06:45 camelia rakudo-moar 091ee7: OUTPUT«((1 2) (1 3) (1 5) (1 7))␤»
06:45 uruwi m: say [X*] (1 «Z,« (2, 3, 5, 7)).map(*[0])
06:45 camelia rakudo-moar 091ee7: OUTPUT«(1 7 5 35 3 21 15 105 2 14 10 70 6 42 30 210)␤»
06:46 uruwi m: say [X*] (1 «Z,« (2, 2)).map(*[0])
06:46 camelia rakudo-moar 091ee7: OUTPUT«(1 2 2 4)␤»
06:46 uruwi m: say Set.new(|([X*] (1 «Z,« (2, 2)).map(*[0])))
06:46 camelia rakudo-moar 091ee7: OUTPUT«set(4, 1, 2)␤»
06:46 uruwi m: say Set.new(|([X*] (1 «Z,« (2, 2)).map(*[0]))).list
06:46 camelia rakudo-moar 091ee7: OUTPUT«(4 => True 1 => True 2 => True)␤»
06:46 uruwi m: say Set.new(|([X*] (1 «Z,« (2, 2)).map(*[0]))).keys
06:46 camelia rakudo-moar 091ee7: OUTPUT«(4 1 2)␤»
06:50 uruwi m: ([X*] (1 «Z,« (2, 2)).map(*[0])).unique
06:50 camelia rakudo-moar 091ee7: ( no output )
06:50 uruwi m: say ([X*] (1 «Z,« (2, 2)).map(*[0])).unique
06:50 camelia rakudo-moar 091ee7: OUTPUT«(1 2 4)␤»
06:50 uruwi m: my @pfactors = (2, 2, 3); say ([X*] (1 «Z,« @pfactors).map(*[0])).unique
06:50 camelia rakudo-moar 091ee7: OUTPUT«(1 3 2 6 4 12)␤»
07:03 _nadim joined #perl6
07:04 CIAvash joined #perl6
07:39 cbk joined #perl6
08:09 dalek rakudo/nom: 625d1c5 | TimToady++ | / (8 files):
08:09 dalek rakudo/nom: discourage casual use of EVAL
08:09 dalek rakudo/nom:
08:09 dalek rakudo/nom: It is now by default illegal in a normal program to use the EVAL function.
08:09 dalek rakudo/nom: This may be overridden in any of several ways:
08:09 dalek rakudo/nom:     use MONKEY-SEE-NO-EVAL;
08:09 dalek rakudo/nom:     use MONKEY;  # shortcut that turns on all MONKEY pragmas
08:09 dalek rakudo/nom:     use Test;
08:10 dalek rakudo/nom:     setenv RAKUDO_MONKEY_BUSINESS=1
08:10 dalek rakudo/nom:
08:10 dalek rakudo/nom: The MONKEY pragmas always take precedence, so regardless of use of Test or
08:10 dalek rakudo/nom: environment variables, a lexical scope may turn the capability on and off.
08:10 dalek rakudo/nom: So something like an IRC bot or REPL may default to allowing EVAL, but it's
08:10 dalek rakudo/nom: still controllable either way within the actual code.
08:10 dalek rakudo/nom:
08:10 dalek rakudo/nom: Several other MONKEY names have been reserved for similar safety, in addition
08:10 dalek rakudo/nom: to the original MONKEY-TYPING.  'use MONKEY-GUTS' is now a synonym for 'use nqp.'
08:10 dalek rakudo/nom: We might restrict things like .^set_value with 'use MONKEY-BRAINS'.
08:10 dalek rakudo/nom:
08:10 dalek rakudo/nom: Regular expressions record their monkey state at compile time and use that
08:10 dalek rakudo/nom: info to decide whether to allow interpolations later at run time.
08:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/625d1c5116
08:10 dalek roast: cb1a066 | TimToady++ | S (5 files):
08:10 dalek roast: test under new EVAL and interpolation rules
08:10 dalek roast: review: https://github.com/perl6/roast/commit/cb1a066075
08:10 Woodi geekosaur: looks Proxy substr is expecting is OO pattern Proxy :)  current Perl6 Proxy is just Perl5 'tie' or C 'volatile'...
08:11 darutoko joined #perl6
08:11 Woodi TimToady: you put all that ideas there ! ;)
08:12 TimToady I've been working on it all day; you wouldn't believe how many wrong ways there are to do it... :)
08:13 TimToady but I'm pretty happy with the result
08:13 Woodi :)
08:14 TimToady we'll have to decide how strict we want camelia and the repl to be
08:14 TimToady but I figure that's up to the community
08:15 Woodi TimToady: but what functional/Lisp programmers say now ? :)
08:19 Woodi TimToady: .^set_value remembers me BattlEye from "Arma" games and SELinux - you can have some-thing that have a list of allowed calls. but that's probably 6.x :)
08:20 sammers joined #perl6
08:22 AlexDaniel I don't really like the fact that you can't ask camelia to “run” stuff. But allowing that in a safe way is probably a bit more complicated than just turning it on :)
08:34 TimToady m: say EVAL 42
08:34 camelia rakudo-moar 625d1c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FjCoV5LpqQ␤EVAL is a very dangerous function!!! (use MONKEY-SEE-NO-EVAL to override,␤but only if you're VERY sure your data contains no injection attacks)␤at /tmp/FjCoV5LpqQ:1␤------> 3say EVAL 427⏏…»
08:34 TimToady m: use MONKEY; say EVAL 42
08:34 camelia rakudo-moar 625d1c: OUTPUT«42␤»
08:38 adhoc joined #perl6
08:44 uruwi But now how am I going to serialize/deserialize functions?
08:56 Woodi uruwi: my $fptr; { MONKEY-ENABLE; $fptr = EVAL ... }; ?
08:57 * Woodi things that data should be send for disributed computing...
09:02 uruwi m: my $fptr = &f; {MONKEY-ENABLE; $fptr = EVAL("{$_ + 1}");} say $fptr(3);
09:02 camelia rakudo-moar 625d1c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/pxYfCrC6mc␤EVAL is a very dangerous function!!! (use MONKEY-SEE-NO-EVAL to override,␤but only if you're VERY sure your data contains no injection attacks)␤at /tmp/pxYfCrC6mc:1␤------> 3{MONKEY-ENABLE; …»
09:02 uruwi m: my $fptr = &f; { use MONKEY-ENABLE; $fptr = EVAL("{$_ + 1}");} say $fptr(3);
09:02 camelia rakudo-moar 625d1c: OUTPUT«===SORRY!===␤Could not find MONKEY-ENABLE in:␤    /home/camelia/.perl6/2015.11-691-g625d1c5␤    /home/camelia/rakudo-m-inst-1/share/perl6/site␤    /home/camelia/rakudo-m-inst-1/share/perl6/vendor␤    /home/camelia/rakudo-m-inst-1/share/perl6␤  …»
09:02 uruwi m: my $fptr = &f; { use MONKEY-SEE-NO-EVAL; $fptr = EVAL("{$_ + 1}");} say $fptr(3);
09:02 camelia rakudo-moar 625d1c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/JJUWWxYp7b␤Strange text after block (missing semicolon or comma?)␤at /tmp/JJUWWxYp7b:1␤------> 3-SEE-NO-EVAL; $fptr = EVAL("{$_ + 1}");}7⏏5 say $fptr(3);␤    expecting any of:␤        infix␤  …»
09:02 uruwi m: my $fptr = &f; { use MONKEY; $fptr = EVAL("{$_ + 1}");} say $fptr(3);
09:02 camelia rakudo-moar 625d1c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/j0LrcC7gGc␤Strange text after block (missing semicolon or comma?)␤at /tmp/j0LrcC7gGc:1␤------> 3{ use MONKEY; $fptr = EVAL("{$_ + 1}");}7⏏5 say $fptr(3);␤    expecting any of:␤        infix␤  …»
09:02 uruwi m: my $fptr = &f; { use MONKEY-SEE-NO-EVAL; $fptr = EVAL("{$_ + 1}");}; say $fptr(3);
09:02 camelia rakudo-moar 625d1c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ql1QnTsuvZ␤Undeclared routine:␤    f used at line 1␤␤»
09:03 uruwi m: my $fptr; { use MONKEY-SEE-NO-EVAL; $fptr = EVAL("{$_ + 1}");}; say $fptr(3);
09:03 camelia rakudo-moar 625d1c: OUTPUT«Use of uninitialized value of type Any in numeric context  in block  at /tmp/7UYXJf08uO:1␤Cannot find method 'CALL-ME'␤  in block <unit> at /tmp/7UYXJf08uO:1␤␤»
09:03 uruwi m: my $fptr; { use MONKEY-SEE-NO-EVAL; $fptr = EVAL("{$_}");}; say $fptr(3);
09:03 camelia rakudo-moar 625d1c: 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  at /tmp/nQ1z3EKLf8:1␤Cannot find method 'Any'␤  in block <unit> at /tmp/nQ1z3EKLf8:1␤␤»
09:03 TimToady {} interpolates in ""
09:03 uruwi m: my $fptr; { use MONKEY-SEE-NO-EVAL; $fptr = EVAL('{$_ + 1}');}; say $fptr(3);
09:03 camelia rakudo-moar 625d1c: OUTPUT«Use of uninitialized value of type Any in numeric context  in block  at EVAL_0:1␤Cannot find method 'CALL-ME'␤  in block <unit> at /tmp/yPQNvSYKAB:1␤␤»
09:04 uruwi m: my $fptr; { use MONKEY-SEE-NO-EVAL; $fptr = EVAL('{$^a + 1}');}; say $fptr(3);
09:04 camelia rakudo-moar 625d1c: OUTPUT«Too few positionals passed; expected 1 argument but got 0␤  in block <unit> at EVAL_0:1␤  in block <unit> at /tmp/ynSGlQ425f:1␤␤»
09:04 uruwi m: my $fptr; { use MONKEY-SEE-NO-EVAL; $fptr = EVAL('-> $a {$a + 1}');}; say $fptr(3);
09:04 camelia rakudo-moar 625d1c: OUTPUT«4␤»
09:05 uruwi In reality, I'd probably dynamically load classes for this.
09:11 [Tux] Failed running /pro/3gl/CPAN/rakudobrew/moar-nom/install/bin/perl6 bootstrap.pl at /pro/3gl/CPAN/rakudobrew/bin/rakudobrew line 57.
09:11 [Tux] main::run("/pro/3gl/CPAN/rakudobrew/moar-nom/install/bin/perl6 bootstrap.pl") called at /pro/3gl/CPAN/rakudobrew/bin/rakudobrew line 502
09:11 [Tux] main::build_panda(undef) called at /pro/3gl/CPAN/rakudobrew/bin/rakudobrew line 120
09:14 firstdayonthejob joined #perl6
09:17 vividsnow joined #perl6
09:19 rurban joined #perl6
09:21 rurban_ joined #perl6
09:21 ShimmerFairy Why are slangs being a pain for me? I just tried writing a pretty simple one, and I get "Cannot find method 'package_at_key': no method cache and no .^find_method"    :(
09:22 spider-mario joined #perl6
09:23 ShimmerFairy oh, that's what it was. I needed to include NQPHLL to use the QAST::Op (I think?). ~That's so obvious~
09:25 pierre-vigier joined #perl6
09:33 labster TimToady: I think you broke panda
09:34 labster ==> Bootstrapping Panda
09:34 labster EVAL is a very dangerous function!!! (use MONKEY-SEE-NO-EVAL to override,
09:34 labster but only if you're VERY sure your data contains no injection attacks) at gen/moar/m-CORE.setting:19605
09:38 labster right.  Might as well write the PR myself.
09:41 confuseAcat left #perl6
09:45 labster and sent.
09:45 uruwi I've decided to use a web frontend for said game.
09:45 uruwi That way I can customize key input to a greater extent.
10:03 gnustavo joined #perl6
10:14 lolisa joined #perl6
10:22 * [Tux] added «use MONKEY-SEE-NO-EVAL;» to Panda/Bundler.pm, so I can continue
10:22 RabidGravy joined #perl6
10:23 [Tux] Inline::Perl5 suffers the same
10:25 [Tux] run_alt is still gone \o/
10:25 [Tux] EOL fails still here :(
10:27 adhoc joined #perl6
10:42 masak good antenoon, #perl6
10:43 Begi joined #perl6
10:43 [Tux] test             50000    40.611    40.498
10:43 [Tux] test-t           50000    48.987    48.874
10:43 [Tux] csv-parser       50000   215.049   214.936
10:45 rindolf joined #perl6
10:47 _nadim Good Morning all
10:49 Begi ' morning nadim !
10:51 Begi m: my @array = <a b c d e>; my $y = @array.roll(2); my @x = @array.roll(2);
10:51 camelia rakudo-moar 625d1c: ( no output )
10:51 Begi What's the best choice ? $ or @ ?
10:52 nine TimToady: do we really need MONKEY-SEE-NO-EVAL for EVAL :lang<Perl5>? EVAL doesn't always mean that data is interpolated and in the case of Perl 5 or Python code, it's even less common.
10:56 _nadim I have a hash of parameter_name => value that i want to pass to a constructor but I get default constructor only takes named arguments. I thought a %hash.kv would do the trick but not.
10:56 RabidGravy |%hash
10:56 _nadim I did try that too. I'll try again
10:57 _nadim nahh, placed it in the wrong place, work fine :)
10:59 _nadim another related question, I have an object that is initialized and I receive a hash of overrides, can I override the attributes directly without having to loop through them? and can I do that temporarily in the call only?
10:59 CIAvash joined #perl6
11:02 pierre-v_ joined #perl6
11:03 keix joined #perl6
11:03 vividsnow joined #perl6
11:16 RabidGravy joined #perl6
11:19 weihan joined #perl6
11:23 maziar joined #perl6
11:24 weihan joined #perl6
11:24 maziar joined #perl6
11:28 maziar left #perl6
11:30 _nadim Can only use 'temp' on a container. is it possible to 'temp' an attribute in some way?
11:32 RabidGravy I'm not sure it makes sense conceptually really
11:33 _nadim then let me give an example. the class has a member that is decreased in a method which calls itself recursively, it should be restored when the call ends, at each level
11:34 _nadim I did it manually right now and I can make a class that does that when if leaves the scope but that sound like 'temp'
11:34 espadrine joined #perl6
11:34 hankache joined #perl6
11:34 RabidGravy you could probably make a trait that does it somehow
11:37 hankache joined #perl6
11:38 hankache_ joined #perl6
11:38 _nadim probably :) but my manually doing it didn't work either, very surprisingly, Can't modify immutable Int. It's jsut a variable and a normal assignment not :=
11:45 ellybelly joined #perl6
11:45 RabidGravy y'see to me it doesn't really sound like an attribute at all but either an argument to the method or a stack of some kind
11:48 _nadim m: class C { has $.l = 5 ; method dec { return if $.l == 2 ; $.l -= 1 ; say $.l ; $.dec() ; }} ; my $c = C.new.dec() ;
11:48 camelia rakudo-moar 625d1c: OUTPUT«Cannot assign to an immutable value␤  in method dec at /tmp/D4O6YTSsIJ:1␤  in block <unit> at /tmp/D4O6YTSsIJ:1␤␤»
11:50 RabidGravy is rw on the attribute
11:52 RabidGravy anyone in the house with commit on panda
11:52 RabidGravy it's afflicted by "EVAL is a very dangerous function!!! (use MONKEY-SEE-NO-EVAL to override)"
11:52 _nadim RabidGravy: I copletely missed that attributes were read-only unless stated otherwise! except for arguments to subs of course
11:53 xpen joined #perl6
11:53 RabidGravy it's only the public accessor that is readonly BTW,  if you refer to it as $!l it is rw
11:55 vendethiel joined #perl6
11:57 kid51 joined #perl6
11:58 lucasb joined #perl6
12:08 RabidGravy oh dear, people are reporting "bugs" against modules when running against 2015.09
12:09 RabidGravy is there a way of mandating a minimum version of Perl 6?
12:10 ShimmerFairy RabidGravy: for modules, there's http://design.perl6.org/S22.html#perl
12:10 vendethiel not yet
12:12 ShimmerFairy btw, for personal preference I'd like that field to be called "perl6" rather than "perl" --- it feels weird to refer to a version of Perl 6 in an unqualified manner like that :)
12:12 RabidGravy ShimmerFairy, yeah but I don't think anything actually checks that currently (as although it is marked as required in S22 things without it install fine)
12:13 vendethiel ShimmerFairy: well, because perl and perl6 cohabit?
12:13 ShimmerFairy RabidGravy: I feel like the default for that should be "latest possible" (i.e. it's your fault for not caring about specifying the right version)
12:13 espadrine joined #perl6
12:13 jnthn ShimmerFairy: -1; since language versions will be 6.c, 6.d, etc. then it'd just be duplication
12:13 yoleaux 19 Dec 2015 22:53Z <lizmat> jnthn: commit c040a076e64c3420f322 is causing the slowdown
12:13 ShimmerFairy vendethiel: they're separate languages though, and especially considering P5 projects won't use META6.json files :)
12:14 jnthn ShimmerFairy: Then it's even less ambiguous :P
12:14 xinming joined #perl6
12:14 ShimmerFairy jnthn: Well, it could be a synonym, not necessarily a change. I just don't like using plain "Perl" in referring to p6, so I'd like to be able to choose to type "perl6" : ... over "perl" : ... if I want
12:15 zengargoylew joined #perl6
12:16 jnthn RabidGravy: I merged the panda PR by the way
12:17 RabidGravy jnthn++ # nice one
12:19 jnthn .tell lizmat Hm, it's probably the NQP version bump, then, rather than the patch itself...
12:19 yoleaux jnthn: I'll pass your message to lizmat.
12:19 nige1 joined #perl6
12:19 jnthn .tell lizmat Thanks for hunting it down to that one.
12:19 yoleaux jnthn: I'll pass your message to lizmat.
12:20 nige1 Alex - removed furry white border from Camelia in lasted advent post
12:20 nige1 latest
12:32 RabidGravy getting some "useless use" warnings from panda if someone is in the code at some point
12:33 RabidGravy my fork appears to be b0rked at the moment
12:35 grondilu Camelia following with the flow:  http://imgur.com/F8viJ9z
12:41 RabidGravy :)
12:43 nige1 haha - grondilu - that's cool
12:43 nige1 - should we put that in?
12:47 nige1 ok - updated
12:48 dalek Inline-Perl5: ccbb048 | (Stefan Seifert)++ | lib/Inline/Perl5.pm6:
12:48 dalek Inline-Perl5: Turn on new pragma to be able to use EVAL
12:48 dalek Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/ccbb048009
12:48 nine .tell TimToady Do we really need MONKEY-SEE-NO-EVAL for EVAL :lang<Perl5>? EVAL doesn't always mean that data is interpolated and in the case of Perl 5 or Python code, it's probably even less common.
12:48 yoleaux nine: I'll pass your message to TimToady.
12:49 nine .tell TimToady I still get a "Useless use of $p5 in sink context" for "class Bar does Inline::Perl5::Perl5Parent['Foo', $p5] { }"
12:49 yoleaux nine: I'll pass your message to TimToady.
12:49 jdv79 https://gist.github.com/anonymous/f293827d745cebcfa3b1
12:49 jdv79 2 things - we really need to fix version.  also, why does that take so long to load up?
12:50 nine jdv79: does it take so long on the second start, too?
12:50 jdv79 yes.
12:50 jdv79 i think i'm at y'day sometime in terms of rakudo and panda
12:54 xpen joined #perl6
12:55 nine .tell TimToady my $a = "foo"; $a .= say if True; # Useless use of $a in sink context (line 1)
12:55 yoleaux nine: I'll pass your message to TimToady.
13:02 timotimo o/
13:02 timotimo i find it irritating that the message for EVAL has "!!!" in it
13:03 _nadim in: class C { has $.a; has many more ; method set_attrs(%new_values) }  how do I set the attributes from the
13:03 _nadim %new_values without handling them individualy?
13:04 _nadim EG: override the class attributes, preferably emporarilly
13:06 nine jdv79: I cannot even install JSON::Infer: Cannot unbox a type object in Panda::Installer::install
13:08 timotimo _nadim: you can map over the hashes keys, then call self."$key"() = $value for each key
13:08 cdg joined #perl6
13:15 [Tux] did here-docs changed recently regarding NL sequences?
13:16 [Tux] my $foo = qq :to "XX";
13:16 [Tux] a,b\r
13:16 [Tux] XX
13:16 Skarsnik joined #perl6
13:17 [Tux] sorry, no that still passes. next is slurp
13:17 jdv79 nin: second time worked for me
13:17 timotimo https://github.com/rakudo/rakudo/commit/680da780fb42b3a8d33bc28c87cf794ecb1aa5d2 - this commit message explains what's with the new newline handling
13:18 jnthn [Tux]: Not sure that heredocs did, but yes, we now do line ending translation at I/O boundaries for files and processes, instead of having that logical \n thing try (and not quite succeed) at dealing with newline issues
13:18 jnthn What we do now should be much closer to what Perl 5 does, fwiw.
13:18 jdv79 oh yeah, nine, install of json infer breaks btw:)
13:18 nine jdv79: it worked on the second attempt
13:19 nine jdv79: I do have an experimental patch that brings down time perl6 -e 'use JSON::Infer;' from 1.9 seconds to 0.6 seconds on my machine
13:19 [Tux] how do I call slurp *preventing* changing \r\n to \n ?
13:19 timotimo wow. how's that?
13:20 [Tux] http://doc.perl6.org/routine/slurp doesn't tell me
13:20 jnthn [Tux]: By slurping with :bin, and then doing .decode on the buffer
13:20 nine timotimo: by using the .deps file that accompanies every precomp file. It contains the ids of all recursive dependencies, so we actually know exactly which files to load and don't have to search all over again.
13:21 jdv79 insanity.  what is the cause?
13:21 timotimo ah, nice!
13:21 nine jnthn: using .deps will be very nice for startup performance.
13:21 jnthn nine: \o/
13:23 Psyche^ joined #perl6
13:27 [Tux] $fh = open  $tf20, :r or die "$tf20: $!";
13:27 [Tux] where $tf has \r\n line endings THAT I WANT TO PRESERVE
13:28 [Tux] as in, I think open should have the attribute, not :bin + encode on slurp
13:29 Skarsnik there is not a line attribute on open?
13:31 [Tux] there is :chomp, which I already force to false
13:31 * [Tux] tries nl => Str
13:32 * jnthn decides that this is just somebody else's problem now, because no matter what he does with the Windows newline handling stuff, somebody whines.
13:32 jnthn Loudly and unappreciatively.
13:32 jnthn ^
13:32 jnthn & even
13:33 [Tux] sorry jnthn this is nothing personal
13:33 pmurias joined #perl6
13:33 timotimo yeah, it's definitely a very annoying problem
13:33 timotimo i don't think i've ever though about how other languages i've used handle that stuff
13:33 [Tux] but the words towel and ring crossed my mind
13:36 timotimo i ... what?
13:38 * [Tux] throws the named towel in the ring for now. I miss all logic
13:39 dalek rakudo/load_precompiled_deps: 3f5552c | (Stefan Seifert)++ | src/ (3 files):
13:39 dalek rakudo/load_precompiled_deps: Load dependencies of a precomp file directly instead of searching
13:39 dalek rakudo/load_precompiled_deps:
13:39 dalek rakudo/load_precompiled_deps: Since for every precompiled file we already record the ids of all recursive
13:39 dalek rakudo/load_precompiled_deps: dependencies, we can use that information for loading those dependencies,
13:39 dalek rakudo/load_precompiled_deps: instead of searching all over again.
13:39 dalek rakudo/load_precompiled_deps:
13:39 dalek rakudo/load_precompiled_deps: This is also an important step to get rid of RepositoryRegistry.load_module
13:39 dalek rakudo/load_precompiled_deps:
13:39 dalek rakudo/load_precompiled_deps: Many thanks to jnthn++ for pointing out this possibility!
13:39 dalek rakudo/load_precompiled_deps: review: https://github.com/rakudo/rakudo/commit/3f5552c9df
13:39 nine jnthn: could I interest you in reviewing this patch ^^^? At this stage I dare not commit such a change directly to nom.
13:39 vendethiel jnthn: I think that's why it's one case where "embrace what everybody else's doing and point to their reasoning" works best :P
13:42 cygx joined #perl6
13:42 [Tux] There is no way to change an already opened filehandle from :bin to :!bin (and back)?
13:43 cygx [Tux]: :bin is a noop currently
13:43 cygx you can pass enc => 'utf8' and get the same result
13:43 [Tux] (tears)
13:43 cygx jnthn: I think your newline handling is on the right track
13:44 cygx what I would add is https://github.com/MoarVM/MoarVM/blob/master/src/strings/iter.h#L200 respecting :nl-out and a way to disable it completely
13:44 timotimo [Tux]: we don't have something good specced yet for what a :bin handle does when you use string-y methods on it, like .get
13:45 cygx timotimo: it's specced and documented, just not implemented
13:45 [Tux] I'll leave it for a few days
13:45 [Tux] till the dust settles
13:45 [Tux] what I want and expect is a way to read THE SAME as what I write to a file
13:45 [Tux] be that \r\r\r\r\r\n or \n
13:46 cygx (if the specced behaviour is actually reasonable is another question entirely ;))
13:46 [Tux] so a forced :do-no-translate-nl would be fine with me
13:47 [Tux] but it should be a method/property that can be changed on an already opened filehandle
13:47 Skarsnik :don't-be-smart
13:47 [Tux] fine with me :)
13:47 [Tux] this feels like Oracle's NULL behaviour on inserting an empty string in a varchar field
13:49 timotimo huh? i know about mysql inserting "" into a NOT NULL when you insert a NULL
13:49 timotimo but the other way around? that's really not right
13:51 [Tux] if you insert an "" (empty string) into a varchar2 (Oracle) and read it back, it is NULL
13:52 [Tux] indeed, not right, but that is how it is since Oracle 5 IIRC
13:52 timotimo ;_;
13:52 masak jnthn: what's your take on https://rt.perl.org/Public/Bug/Display.html?id=126969 ?
13:53 [Tux] http://tux.nl/Talks/DBDc/null.html
13:53 timotimo no. i refuse to think any more about this at all.
13:53 timotimo thanks for the offer
13:55 cygx imo we should add nqp::setoutputlinesep, nqp::settransinputlinesep, nqp::setransoutputlinesep
13:57 cygx IO::Handle might also want to be split into IO::BinaryHandle and IO::TextHandle, but I haven't thought that one through yet
14:03 nine Creating QAST manually is so tedious. I wish there were some program that just took a neat textual representation and turned it into a QAST...
14:03 brrt joined #perl6
14:03 masak nine: sort of like `quasi { ... }`, no?
14:05 nine masak: except that I need it in Perl6/Actions.nqp :)
14:07 brrt good *
14:07 timotimo i personally find it super annoying to match against QAST trees (in the optimizer)
14:07 Skarsnik I like Qt way for file and string. you work with a qttextstream and you can set some flag on how it will act with special stuff (encoding, number encoding, newline...). It avoid having lot of stuff on the IO handle for it or on string class x)
14:07 timotimo but i haven't spent a lot of time on the static optimizer in the recent months
14:07 brrt build a tiler timotimo ^^
14:07 diakopter brrt: hi!
14:07 brrt hi diakopter
14:08 timotimo hehehe.
14:08 nine timotimo: yes, for an optimizer you really want some regex like language for matching trees.
14:08 timotimo yeah, with captures and such
14:08 brrt the moment i have more brane left, i'm going to write something for that
14:09 nine I punted on that one when I wrote my first optimizer, and came to regret it :)
14:11 ShimmerFairy nine: QAST just needs to be more lisp-like, and it'll be a snap to use! :P
14:12 brrt this is true. lisp is awesome for anything related to program manipulation
14:12 brrt except the cons-car-cdr business
14:15 mst but with head-tail you can't have p3rl.org/Acme::CarCdr
14:15 mst bah
14:16 diakopter XD
14:16 mst p3rl.org/Acme::List::CarCdr # first link is 404 complaint, do not click, tigers will be released
14:18 vendethiel- joined #perl6
14:18 brrt :-D nice
14:19 tadzik timotimo: possibly XPath/JsonPath-like thingy?
14:19 tadzik I'm trying to imagine how that'd look
14:21 brrt ok, let me ask a very simple question; what's this going to cost
14:21 dalek tablets: f02a2cf | (Herbert Breunung)++ | docs/appendix-b-grouped.txt:
14:21 dalek tablets: fixing set op table + testing new format
14:21 dalek tablets: review: https://github.com/perl6/tablets/commit/f02a2cf151
14:21 brrt algorithmically
14:21 tadzik if ( $method =~ m/::c([ad]{1,704})r$/ ) {
14:21 tadzik is there a significance to the number 704 in Perl 5 internals or so? :)
14:21 lichtkind joined #perl6
14:22 timotimo tadzik: it also has to generate code that's as fast as what we're hand-coding at the moment. or faster.
14:23 brrt oh, another question; how much memory can we burn
14:23 tadzik timotimo: yeah, I'm thinking just about the matching part
14:23 nine timotimo: can't the optimizer optimize that for us? ;)
14:23 tadzik as in, not neceserilly the replacing part
14:23 timotimo nine: unlikely :(
14:23 timotimo it'd have to be the NQP optimizer, which hasn't seen terribly much work yet
14:23 timotimo or the dynamic optimizer in moar
14:24 nine tadzik: even the performance of the matching code is important
14:24 tadzik true
14:25 brrt hmmm
14:25 brrt thing is, you can create a constant-time bottom-up matcher, but it'll cost you in terms of memory
14:25 cygx tadzik, or anyone else with commit access to panda: https://github.com/tadzik/panda/pull/264 needs some love
14:25 brrt that's basically the first part of the tiler
14:25 tadzik oh, oh
14:26 tadzik cygx: I'll look at it right away
14:26 tadzik sorry it layed for so long
14:26 tadzik (lied?)
14:26 tadzik (waited.)
14:26 cygx ;)
14:27 cygx tadzik: it's 'lay', btw
14:27 timotimo jnthn: https://gist.github.com/timo/2acc89d989d271d580ff - these are the commits in nqp and moar that the commit lizmat identified as "the bad one" pull in; want me to pull out all the jit related stuff i did to see if it makes a/the difference?
14:27 tadzik cygx: so "layed" was alright?
14:27 cygx no, to lie, lay, lain
14:27 cygx simple past is just 'lay'
14:27 timotimo jnthn: or do you think it's actually about multi dispatch cache not being hit? perhaps it's not aware of unsigneds or bit sizes and somehow gets confused? perhaps by an unset field?
14:29 brrt +1 for splicing out the jit commits and seeing what that does
14:29 brrt but.... it all looked good enough to me
14:30 timotimo thank you :)
14:30 timotimo first i want to have a look at our generated bytecode to see if perhaps conversions between signed/unsigned or truncation ops are splattered all over the code
14:30 timotimo don't have a good reason to believe that, but why not take a look.
14:31 pmurias jnthn: re sorry about whinning about the \r\n conversion, it's different from the way Perl 5 handles things (Perl5 doesn't do any conversion on linux) so once I noticed that nqp-js failed that test I thought it might be a bug
14:31 tadzik oh wow, my rakudo stopped building :)
14:31 tadzik Could not find symbol '&bool'
14:32 timotimo tadzik: may need to nuke the install folder
14:32 RabidGravy yeah
14:32 nine install/share/perl6
14:32 tadzik I wonder if I should have rakudobrew do that every tiem
14:32 dalek Heuristic branch merge: pushed 27 commits to nqp by pmurias
14:32 tadzik it's not like it has to redownload things
14:33 nine tadzik: then you'd lose installed modules
14:33 tadzik hm, yes
14:33 tadzik nothing that can't be worked around though
14:35 nine I just hope it's not necessary. The &bool thing should be a one time inconvenience caused by wrong versioning used in the past
14:38 tadzik well, we had a similar thing with precomp when one had to nuke panda
14:38 tadzik so either we put some marker in rakudo that says "you have to nuke your stuff" that raukdobrew can read, or we expect users to visit #perl6 every time a single occurence like that happens
14:39 tadzik or educate them to nuke the installdir when something goes wrong, but in that case, why not teach rakudobrew to do that in the first place
14:39 nine But then we didn't have automatic invalidation of precomp files. The &bool thing is really just because I used git describe for generating the version of the CORE dist and changed that to using $*PERL.version instead. Unfortunatly the latter compares to less than the git describe thingy
14:40 nine After the release we will have to add code handling such backwards compat issues instead of having the users pay the price.
14:40 timotimo i really want a "just use the damn moar i give you, damnit" option to configure
14:40 nine But that's exactly the reason why so many incompatible changes went in in the last couple of weeks :)
14:41 pdurbin joined #perl6
14:43 tadzik cygx: hmm, does the bug still happen to you?
14:43 tadzik cygx: I tried bootstraping now, twice, and no directory shows up
14:46 Begi2 joined #perl6
14:46 flussence g'morning, here's a christmas present for other lazy gentoo people - https://gitlab.com/flussence/perl6-overlay
14:46 tadzik ayy nice :)
14:46 konobi howdy pmurias
14:47 timotimo neat, flussence
14:48 flussence it's not perfect, but I figure if I throw it out 5 days early maybe I can convince the distro to adopt them by the time 2015.12 rolls around :)
14:53 pmurias konobi: hi
14:54 Skarsnik Nice flussence :)
14:56 timotimo turns out i'm at least indirectly responsible for the recent gigantic slowdown
15:01 lucasb yes, it seems that '(HANDLED) Failed to open file' isn't getting created anymore
15:01 tadzik I was hoping it's not something that panda does :)
15:02 lucasb tadzik: I think it was because something panda is doing :)
15:02 lucasb panda is still calling mkpath with an IO object
15:03 lucasb but cygx IO::Path commit was merged into rakudo, so maybe this fixed it
15:03 tadzik I would still expect that to yield something more sensemaking than a directory tree with a mangled backtrace :_)
15:05 * mst tweets at packagers suggesting a fresh rakudobrew package beats an old rakudo one
15:05 mst I shall be banging this drum for some time, I think
15:07 dalek nqp: 102b4c2 | (Pawel Murias)++ | t/nqp/59-nqpop.t:
15:07 dalek nqp: Test nqp::bitand_i, nqp::bitor_i, nqp::bitxor_i.
15:07 dalek nqp: review: https://github.com/perl6/nqp/commit/102b4c2c60
15:10 kittenlips joined #perl6
15:12 pmurias mst: will you cpanify rakudobrew?
15:12 pdurbin left #perl6
15:13 mst pmurias: shouldn't be hard, can totally give it a go
15:13 kittenlips Trying to understand concepts as I'm learning Perl6 syntax, question why :D and :U not traits like is defined and is undef?
15:14 moritz kittenlips: we like to think of them as more fundamental than traits
15:14 moritz kittenlips: like, (nearly) first class types, so that one day, maybe you can say "coerce to Int:D" or so
15:14 kittenlips mortiz: what does "more fundamental" mean specifically?
15:15 * flussence starts trying to write an ebuild for panda, realises how silly that is, and stops
15:16 moritz kittenlips: you can pass around the type as an object
15:16 moritz m: say (4, Int, 42).grep(Int:D)
15:16 camelia rakudo-moar 625d1c: OUTPUT«(4 42)␤»
15:16 moritz kittenlips: that wouldn't be possible if defined/undefined were only traits applied to a variable/parameter
15:16 loren joined #perl6
15:16 kittenlips Ah ok thank you
15:17 loren Evening, #Perl 6
15:17 kittenlips Hello
15:17 pmurias mst: 'cpanm rakudobrew' seems much more convenient for a perler than doing githuby things
15:18 loren m: my $str = "x=5\ny=6\nz=7"; $str ~~ s:c/(<.ident>) \= (\N+) $$/"$0 => $1"/ for 1..3; say $str;
15:18 camelia rakudo-moar 625d1c: OUTPUT«"x => 5"␤"y => 6"␤"z => 7"␤»
15:18 loren m: $_="xyu";s/x/y/;my $str = "x=5\ny=6\nz=7"; $str ~~ s:c/(<.ident>) \= (\N+) $$/"$0 => $1"/ for 1..3; say $str;
15:18 camelia rakudo-moar 625d1c: OUTPUT«x=5␤"y => 6"␤"z => 7"␤»
15:18 cdg_ joined #perl6
15:19 loren below code not replace success
15:19 xinming joined #perl6
15:19 mst pmurias: it'd be App::Rakudobrew but yes
15:20 loren I just use $_ do some redundant steps.
15:20 patrickz joined #perl6
15:21 zakharyas joined #perl6
15:24 nige1 joined #perl6
15:24 sno joined #perl6
15:26 mst pmurias: poke me again tomorrow and I'll try and have a look
15:28 dalek nqp: e76a1ac | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
15:28 dalek nqp: [js] Implement nqp::bitneg_i.
15:28 dalek nqp: review: https://github.com/perl6/nqp/commit/e76a1ac648
15:28 dalek nqp: 3e96236 | (Pawel Murias)++ | t/nqp/59-nqpop.t:
15:28 dalek nqp: Test nqp::bitneg_i.
15:28 dalek nqp: review: https://github.com/perl6/nqp/commit/3e96236ed8
15:31 loren Anyone found that code problem message to me.
15:33 dalek joined #perl6
15:33 pmurias mst: I could attempt to do that myself tommorow, today I'm busy satisfying my checklist completion instinct by going through the list of MoarVM ops and writing tests and/or implementing them in nqp-js ;)
15:33 * loren goto sleep() until tomorrow 6:30.
15:35 mst pmurias: yeah, well, I'm happy doing it, I just don't think I'll fit it in today and don't want to forget
15:36 dalek nqp: 566f8ce | timotimo++ | tools/build/MOAR_REVISION:
15:36 dalek nqp: bump moar for restoring performance
15:36 dalek nqp: review: https://github.com/perl6/nqp/commit/566f8cea08
15:36 dalek rakudo/nom: f1bbd4c | timotimo++ | tools/build/NQP_REVISION:
15:36 dalek rakudo/nom: bump nqp to restore moar's jit performance
15:36 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f1bbd4c5c7
15:36 patrickz .tell mst That strange function rakudobrew injects into the shell is there to allow rakudobrew to modify an environment variable in the current shell (needed for the "shell" subcommand). It's a direct rip off of plenv. If you don't use that feature you don't need that function.
15:36 yoleaux patrickz: I'll pass your message to mst.
15:36 mst patrickz: I'm right here
15:36 yoleaux 15:36Z <patrickz> mst: That strange function rakudobrew injects into the shell is there to allow rakudobrew to modify an environment variable in the current shell (needed for the "shell" subcommand). It's a direct rip off of plenv. If you don't use that feature you don't need that function.
15:36 patrickz :-)
15:37 mst patrickz: also, thanks
15:37 mst the tricky bit is going to be rakudobrew thinking it should use ../ for its home
15:37 mst if it's installed into a local::lib that ends up being really quite ugly
15:38 flussence timotimo++
15:38 timotimo sorry about the performance regression i caused :(
15:41 RabidGravy joined #perl6
15:45 lichtkind yay my p6 talk was accepted at gpw
15:48 tadzik hmm, when does the CFP end?
15:48 tadzik I don't see a date on the website
15:48 cdg joined #perl6
15:50 moritz tadzik: for GPW?
15:50 moritz we haven't quite decided yet. Possibly Feburary
15:52 khw joined #perl6
15:53 Juerd It's funny. I've been keeping a list of Perl 6 idioms that I happen to see. The list is just one item so far.
15:53 bartolin_ r: say 6.0221409e+23  # are both answers fine or is the way moar does it preferred?
15:53 camelia rakudo-jvm 6c0f93: OUTPUT«6.0221409E23␤»
15:53 camelia ..rakudo-moar f1bbd4: OUTPUT«6.0221409e+23␤»
15:53 Juerd I guess every other trick now just has a builtin that does exactly what you want.
15:54 vendethiel- Juerd: what i sit?
15:54 vendethiel- is it*
15:54 Juerd Sorting stuff efficiently, picking random elements, shuffling arrays, interpolating expressions, etc... All part of the language now.
15:54 vendethiel- well, I guess it depends what you define as "idioms". All my CLI perl 6 programs are pretty much only subsets and multi candidates.
15:55 Juerd Idioms, as in those composed expressions that people keep using and are recognisable patterns by themselves
15:55 Juerd Like "foo @{[ bar($baz) ]} bar" in Perl 5
15:55 Juerd Or do { local (@ARGV, $/) = $fn; <> }
15:55 Juerd Or the schwartzian transform
15:56 lucasb Juerd: will you tell the single idiom in your list?
15:56 Juerd The only one I've got for Perl 6 so far is... now - INIT now
15:56 lucasb ahhh :)
15:56 masak Juerd: I recently used a sub parameter as an attribute initializer in a lexically defined class. does that count as an idiom? :)
15:57 Juerd masak: If I understand the word 'idiom' correctly, it has to be broadly recognised and almost part of the language
15:57 profan isnt it more that perl6 has incorporated more as "language" features, so less is repeated as idioms
15:57 gfldex masak: that counts as madness
15:57 Juerd profan: Yes, exactly.
15:58 tadzik moritz: oh, alrighty then :)
15:58 masak Juerd: how about: choosing the name of a lexically defined variable so that `parameter => $variable` can be written as just `:$parameter` ?
15:58 Juerd profan: Especially that everything is an object makes adding features something that doesn't really clutter the language.
15:58 Juerd masak: I don't know. Isn't that just *actually* part of the language? :)
15:59 dalek nqp: 7d49f99 | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
15:59 dalek nqp: [js] Implement nqp::pow_i.
15:59 dalek nqp: review: https://github.com/perl6/nqp/commit/7d49f995b1
15:59 dalek nqp: 7dd0d47 | (Pawel Murias)++ | t/nqp/59-nqpop.t:
15:59 dalek nqp: Test nqp::pow_i.
15:59 dalek nqp: review: https://github.com/perl6/nqp/commit/7dd0d47b83
15:59 dalek nqp: b1b9e57 | (Pawel Murias)++ | src/vm/js/ (2 files):
15:59 dalek nqp: Implement nqp::gcd_i, nqp::lcm_i.
15:59 dalek nqp: review: https://github.com/perl6/nqp/commit/b1b9e57024
15:59 dalek nqp: 3a3b5a1 | (Pawel Murias)++ | t/nqp/59-nqpop.t:
15:59 dalek nqp: Test nqp::gcd_i, nqp::lcm_i.
15:59 dalek nqp: review: https://github.com/perl6/nqp/commit/3a3b5a1941
15:59 Juerd masak: I'll add it anyway, because 2 > 1
15:59 jnthn masak: There are various things that counts as, but "thread safe" is almost certainly not one of them :P
15:59 masak Juerd: the syntactic sugar is. the habit that exploits it is part of the community, IMO.
15:59 Juerd masak: Ah, right.
15:59 profan probably more of this will crop up as the language reaches more people
16:00 masak jnthn: "thread safe"? what are we talking about...? :)
16:00 profan while perl6 has more in the language itself, it's probably also an issue of scale to see these things show up
16:00 jnthn masak: I assume you mean sub foo($bar) { my class A { has $.a = $bar }; ... }
16:00 jnthn ?
16:00 jnthn masak: And then remember that classes are not closures.
16:01 masak jnthn: ah, yes. :)
16:01 Juerd profan: While this is true, there will also probably be fewer idiomatic expressions. Almost every Perl 5 that I've found has a real language feature as its Perl 6 counterpart. The rest didn't seem useful.
16:01 vendethiel- masak: I know I abuse the syntactic sugar from perl 6 :(
16:01 masak jnthn: is there a thread safety hazard? two different threads would create two different instances, no?
16:01 * cygx is back for a bit
16:02 Juerd Although I'm not sure about $|++. Does Perl 6 autobuffer, and if so, what would be the $| equivalent?
16:02 Juerd (Note that while $| is part of Perl 5, $|++ written with ++ instead of = 1 is an idiom (a silly one imho))
16:02 jnthn masak: If you ran the sub on two threads at once, then they would each capture the class body in turn, but it's not cloned, and so you have a race.
16:03 cygx tadzik: history of the bug: lizmat added some Cool methods to IO::Path, so mkpath calling .split on $pandadir tried to open the file instead of splitting the path
16:03 jnthn masak: This is probably not actually a problem for the code you're writing but... :)
16:03 cygx tadzik: this used to throw until I made it fail, and lizmat's implementation handled that failure by using &&
16:03 moritz m: sub f($x) { class A { method x { $x } }; say f(42).x; say f(23).x
16:03 camelia rakudo-moar f1bbd4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/svl1dN_Q7D␤Missing block (taken by some undeclared routine?)␤at /tmp/svl1dN_Q7D:1␤------> 3hod x { $x } }; say f(42).x; say f(23).x7⏏5<EOL>␤    expecting any of:␤        postfix␤        statem…»
16:03 profan Juerd: true
16:03 moritz m: sub f($x) { class A { method x { $x } }}; say f(42).x; say f(23).x
16:03 camelia rakudo-moar f1bbd4: OUTPUT«42␤23␤»
16:04 moritz m: sub f($x) { class A { method x { $x } }.new }; say f(42).x; say f(23).x
16:04 camelia rakudo-moar f1bbd4: OUTPUT«42␤23␤»
16:04 cygx tadzik: passing $pandadir without calling .Str or .path to mkpath is still wrong, but I don't know what triggers it
16:04 profan oh god i need to fix my terminal, the utf-8 stuff in here kills my irssi now and then
16:04 jnthn pmurias: The problem with not doing the same input translation on Linux is that it almost makes certain the code will break depending which platform it's deployed on, and that will most often manifest in test failures on Windows.
16:04 cygx tadzik: you'd have to ping cognominal to check...
16:04 moritz m: sub f($x) { class A { method x { $x } }.new }; my $a = f(42); say f(23).x; say $a.x;
16:04 camelia rakudo-moar f1bbd4: OUTPUT«23␤23␤»
16:05 moritz ah, that's the non-closure behavior alluded to earlier
16:05 jnthn moritz: Yes, that one shows it more clearly :)
16:05 lucasb cygx: I think it's passing an "/current/path#inst/some/path".IO to mkpath
16:05 lucasb but that now fails correctly... and the 'try' silences it
16:05 moritz jnthn: p5 has a "Variable $x will not stay shared" warning; do we want the same?
16:06 jnthn moritz: Possibly, though in this case it's more "Variable $x will be over-shared", no?
16:06 jnthn Also masak won't like the warning ;)
16:06 pmurias jnthn: the current setup is the "try to make \r\n affect as little as possible" choice
16:06 tadzik cygx: hmm, alright, thanks for the details
16:07 moritz jnthn: agreed
16:07 jnthn pmurias: Yes, I think it's the right default for most cases
16:07 pmurias jnthn: I think the right solution is to just tell people who whine to implement the flag to open themself
16:08 jnthn pmurias: And I simply don't have time to this of 6.c to add an on/off knob for that. If somebody wants to, I don't mind.
16:08 RabidGravy joined #perl6
16:08 jnthn cygx: Maybe :bin could turn off auto-crlf translation stuff because that's somewhat associated with "text mode"
16:08 jnthn cygx: Could also default the encoding to utf-8-c8 or so
16:09 * jnthn is laregly just getting really quite exhausted from all the xmas preparation hacking, which mixes badly with a general dislike of working on I/O things anyway...sorry for being snappy. :(
16:09 jnthn [Tux]: ^^
16:10 cygx jnthn: I sympathize
16:11 cygx jnthn: another potential issue is interaction of text-based and binary IO
16:11 cygx is there caching involved in text-based access?
16:11 jnthn Depends how you define "caching"
16:11 jnthn "It's complicated"
16:12 BenGoldberg joined #perl6
16:12 jnthn The main complication being the NFG stuff
16:12 jnthn Well, even NFC would make the problem, so shouldn't blame NFG even.
16:13 jnthn Basically, you can't spit out a grapheme (or even normalized codepoint) in many cases until you've seen what comes after it.
16:13 jnthn So there's often a codepoint worth of stuff sat in the normalizer's buffer
16:13 cygx s/caching/buffering/
16:13 jnthn Any control char counts as an "NFG terminator"
16:14 jnthn Which flushes said buffer.
16:14 jnthn With the exception of \r (thanks, Annex 29 :))
16:14 Ven joined #perl6
16:15 cygx the question is, can I call .read after a call to .getc or .get and expect not to lose bytes?
16:17 jnthn Good question :) Can we theoretically make that work? Sure. Does it work now? Maybe not, because I think the bytes position is currently about decoding only
16:18 dalek roast: bfc719f | jnthn++ | S14-roles/composition.t:
16:18 dalek roast: Some tests for multi composition conflicts.
16:18 dalek roast:
16:18 dalek roast: Fudged and failing for now.
16:18 dalek roast: review: https://github.com/perl6/roast/commit/bfc719f2ed
16:18 jnthn Will fix ^^ in the next day or so...but need to prep for flight and stuff now
16:19 jnthn Once they're done RT #124393 (one of the last 3 xmas RTs) will be finished.
16:24 Ven jnthn++ # outstanding work :)
16:24 yoleaux 01:05Z <psch> Ven: i held of on mentioning it, but checking again shows it's still there: there's a dubious #-sigil for the private attribute 'name' in your advent post
16:25 Ven psch: thanks! why'd you hold back?
16:26 DrForr Hrm. I find myself wanting Array.butlast...
16:29 Ven m: my @a = ^17; say @a[1..*-1]
16:29 camelia rakudo-moar f1bbd4: OUTPUT«(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16)␤»
16:29 Ven DrForr: like that?
16:29 DrForr Yeah, that's what I'm going to do, but it'd be nice to have a formal name for it :)
16:29 timotimo Ven: don't you actually mean 1..^*-1?
16:30 Ven timotimo: that'd be the whole array
16:31 DrForr I want all but the last element. Basically I want to do a join(',') on the data but still have each element (with the trailing comma) as its own item.
16:31 timotimo Ven: uh...wha?
16:32 Ven m: say (1, 2, 3)[1..^*-1]
16:32 camelia rakudo-moar f1bbd4: OUTPUT«(2)␤»
16:32 Ven m: say (1, 2, 3)[0..^*-1]
16:32 camelia rakudo-moar f1bbd4: OUTPUT«(1 2)␤»
16:32 Ven m: say (1, 2, 3)[0..*-1]
16:32 camelia rakudo-moar f1bbd4: OUTPUT«(1 2 3)␤»
16:32 Ven ah, it's the opposite indeed
16:34 nine Huh? Method 'WHO' not found for invocant of class 'GLOBAL'
16:35 lucs Off by -1
16:35 dj_goku joined #perl6
16:36 nine Oh, WHO is no method at all. I think I need nqp::who there
16:36 timotimo yeah, *-1 is already "the last element", because the function is called with the number of elements, not the index of the last element
16:36 Ven yeah, I just swapped ^ meaning inclusive vs exclusive
16:37 Ven m: my @a = ^17; say @a[1..^*-1]
16:37 camelia rakudo-moar f1bbd4: OUTPUT«(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)␤»
16:37 timotimo probably easier to just write *-2, though :P
16:40 CIAvash joined #perl6
16:40 lucasb if .head/.tail allowed Whatever, the "init" of a list would be .head(*-1)
16:41 lucasb .head(*) and .tail(*) would mean the whole list
16:41 lucasb and .tail(*-1) would mean all but the first
16:43 timotimo accepting *-1 is the same as accepting any callable, really
16:43 timotimo accepting * is a matter of accepting literally "Whatever" as the argument
16:43 lucasb unfortunately, "tail" is a little misnamed, since "tail" commonly means "all but the first" in Haskell and maybe other FP languages
16:43 diakopter timotimo: I guess my theory on perf regression was right?
16:43 timotimo diakopter: sorry, i don't recall what your theory was :|
16:44 timotimo was your theory "timo is a big stupid doo-doo head"? :)
16:44 diakopter http://irclog.perlgeek.de/perl6/2015-12-19#i_11746098
16:45 diakopter or was it partially right except for "massively greater portions jitted", and "quadratic" explosion of find best candidate instead
16:45 dalek roast: 3cba7b3 | usev6++ | S32-exceptions/misc.t:
16:45 dalek roast: Fudge test for failure assignment for JVM
16:45 dalek roast: review: https://github.com/perl6/roast/commit/3cba7b3260
16:45 dalek roast: d4539a5 | usev6++ | S32-exceptions/misc.t:
16:45 dalek roast: Be a bit more liberal about warning output
16:45 dalek roast:
16:45 dalek roast: rakudo.jvm reports '6.0221409E23' here so matching for lower case 'e' only
16:45 dalek roast: made the test fail
16:45 dalek roast: review: https://github.com/perl6/roast/commit/d4539a57ff
16:46 timotimo diakopter: no, sorry, you're absolutely in the wrong
16:46 timotimo find_best_dispatchee is about multi candidates
16:46 eMBee joined #perl6
16:46 RabidGravy joined #perl6
16:46 timotimo and time spent jitting/speshing is still far below gcing
16:47 * DrForr write sub butlast() for the time being...
16:47 diakopter "in the wrong" generally means "at fault, to blame", maybe you mean "incorrect"
16:48 timotimo oops!
16:48 timotimo yes, incorrect
16:48 timotimo "auf dem holzweg"
16:48 timotimo barking up the wrong tree
16:48 timotimo something like that
16:49 diakopter so your commit message for bd56e2e is also misleading?
16:50 diakopter I'm having trouble seeing how my original theory was really that far off
16:50 timotimo the slow down is caused by multi candidate selection going the slow path
16:50 hankache joined #perl6
16:51 timotimo that part of the code doesn't know about spesh candidates
16:51 vendethiel joined #perl6
16:52 diakopter the core part of my theory was the additional jitted ops
16:52 diakopter I guess you didn't look at it
16:52 timotimo i must misunderstand
16:53 mohae joined #perl6
16:58 diakopter well you said my theory was absolutely wrong
16:59 timotimo can you re-state the theory and cut out the "quadratic explosion" part and the "massively greater portions jitted" part?
16:59 diakopter so I was surmising that you didn't look at the irclog to read it, because then you would've seen it was about additional jitted ops
16:59 timotimo you said "it's taking far longer to jit now", which is not what i'm seeing
17:00 diakopter of course not, you don't need to restate the evidence which was already obvious. No one ever disputed those facts since you diagnosed it
17:00 timotimo sorry that i'm being so difficult
17:01 bpmedley_ joined #perl6
17:01 diakopter I was trying to help by suggesting a source of the slowdown was additional jitted ops, I was simply lightheartedly commenting that I was, at the core, correct.
17:01 timotimo oh
17:01 timotimo well, that's true
17:02 diakopter but to be called absolutely in the wrong is just plain wrong
17:02 timotimo the mechanism by which the additional jitted ops cause this problem isn't understood yet, though
17:02 diakopter alright, I'm sorry my comment wasn't helpful; I'm glad you found the immediate commits to blame; I hope someone finds the ultimate mechanism someday
17:02 mst diakopter: also, all generalisations are false
17:03 timotimo :(
17:04 diakopter what was wrong with that [entirely genuine!!!] comment???!
17:05 xinming joined #perl6
17:07 timotimo was that adressed at mst or at my frowny face?
17:08 [Tux] jnthn, no worries
17:08 timotimo just a bit unhappy about how i handled that whole discussion
17:08 lucasb xmas is comming... let's be happy :)
17:08 timotimo [Tux]: you can try your measurements again with lastest rakudo master; it has the regression-causing commits cut out
17:08 [Tux] starting …
17:08 timotimo thanks
17:09 timotimo i'll be AFK for a bit
17:09 Ven timotimo++ # working on the JIT stuff
17:09 timotimo diakopter: also, i'm in a not so good mood right now because i have had a headache all day that's not intent on leaving and also i've caused a pretty major regression and i still don't know how
17:10 lichtkind jnthn++ for his yapc asia talk
17:10 lichtkind are thread implemented in rakudo now?
17:11 rolv joined #perl6
17:11 timotimo yeah
17:11 lichtkind thanks
17:12 timotimo we've had threads and such for a long-ish time now, but only a few months ago it really became stable when jnthn fixed a bunch of data races and such
17:12 * timotimo AFK nao
17:17 [Tux] test             50000    25.122    25.004
17:17 [Tux] test-t           50000    14.756    14.639
17:17 [Tux] csv-parser       50000    61.926    61.808
17:18 [Tux] run_alt is back though :(
17:19 lichtkind jnthn++
17:19 dalek nqp: 2bf1af1 | (Pawel Murias)++ | t/nqp/59-nqpop.t:
17:19 dalek nqp: Test != and floating point numbers.
17:19 dalek nqp: review: https://github.com/perl6/nqp/commit/2bf1af15b2
17:19 dalek nqp: 6e59241 | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
17:19 dalek nqp: [js] Implement nqp::sqrt_n.
17:19 dalek nqp: review: https://github.com/perl6/nqp/commit/6e5924133f
17:19 dalek nqp: 2724a79 | (Pawel Murias)++ | t/nqp/59-nqpop.t:
17:19 dalek nqp: Test nqp::sqrt_n.
17:19 dalek nqp: review: https://github.com/perl6/nqp/commit/2724a79f5a
17:31 nige1 joined #perl6
17:33 CQ joined #perl6
17:34 dalek doc: c10c2a1 | (Sylvain Colinet)++ | doc/Language/nativecall.pod:
17:34 dalek doc: Document how to specify the ABI/API version of a lib in NativeCall
17:34 dalek doc: review: https://github.com/perl6/doc/commit/c10c2a129a
17:34 dalek doc: 7882ee7 | (Sylvain Colinet)++ | / (13 files):
17:34 dalek doc: Merge branch 'master' of https://github.com/perl6/doc
17:34 dalek doc: review: https://github.com/perl6/doc/commit/7882ee7500
17:36 jnthn airport &
17:42 Ven joined #perl6
17:50 dalek nqp: 26c213b | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
17:50 dalek nqp: [js] Implement a bunch of math functions.
17:50 dalek nqp: review: https://github.com/perl6/nqp/commit/26c213b233
17:50 dalek nqp: 9772f2a | (Pawel Murias)++ | t/nqp/83- (2 files):
17:50 dalek nqp: Add test for nqp::exp_n.
17:50 dalek nqp: review: https://github.com/perl6/nqp/commit/9772f2a592
17:54 awesomess3 joined #perl6
17:54 Skarsnik hm htmlify on doc use EVAL, should I just add use MONKEY-SEE-NO-EVAL or I let someone do some deep change to avoid it?
17:56 Skarsnik my $pod  = EVAL(slurp($file.path) ~ "\n\$=pod")[0];
17:56 Skarsnik that look weird x)
17:57 stmuk panda seems v slow
17:58 * stmuk does the nuke dance
17:58 TimToady perhaps it should be using EVALFILE instead
17:58 yoleaux 12:48Z <nine> TimToady: Do we really need MONKEY-SEE-NO-EVAL for EVAL :lang<Perl5>? EVAL doesn't always mean that data is interpolated and in the case of Perl 5 or Python code, it's probably even less common.
17:58 yoleaux 12:49Z <nine> TimToady: I still get a "Useless use of $p5 in sink context" for "class Bar does Inline::Perl5::Perl5Parent['Foo', $p5] { }"
17:58 yoleaux 12:55Z <nine> TimToady: my $a = "foo"; $a .= say if True; # Useless use of $a in sink context (line 1)
18:00 Skarsnik http://doc.perl6.org/routine/EVAL 404 hm
18:00 pmurias what should -12.5 % 5 be in nqp?
18:02 skids joined #perl6
18:02 pierre-vigier joined #perl6
18:05 TimToady we could perhaps detect when EVAL is on a literal without interpolation, and not carp in that case
18:11 vendethiel joined #perl6
18:12 pmurias MONKEY-SEE-NO-EVAL is an offical part of Perl6?
18:12 TimToady yes, I think that will help a lot, when we're merely using EVAL to switch to a different language
18:12 TimToady yes
18:13 * TimToady plays his high trump card one last time :)
18:13 * TimToady hopes he'll be fired soon :)
18:13 nine TimToady: well, what will you do when Perl 6 is done? :)
18:14 TimToady I don't expect it to be done till after I don't have to worry about it anymore :)
18:15 [Tux] :)
18:15 nine Aah...the correct answer would of course have been "I go to Disney land!"
18:15 TimToady Da!
18:16 RabidGravy anyway, I have used sub-signatures for the first time in actual code today
18:17 ilmari pmurias: same sign as the dividend seems to be the most common
18:17 ilmari from eyeballing https://en.wikipedia.org/wiki/Modulo_operation
18:18 ilmari which is conveniently what C, Java and JavaScript all do
18:20 darutoko- joined #perl6
18:23 pmurias nqp-m: say(-12.5 % 5)
18:23 camelia nqp-moarvm: OUTPUT«2.5␤»
18:23 pmurias ilmari: ^^
18:26 pmurias ilmari: javascript returns -2.5 here
18:28 TEttinger ilmari: java and C# have some interesting results for modulo differences.
18:29 TEttinger I've had to resort to the ugh method, which is not called ugh and is instead called Math.IEEERemainder
18:29 TEttinger "How many E's are there in I Triple E Remainder?"
18:30 Skarsnik should be called I2E x
18:30 pmurias I'm planning on using the mod_n from the jvm backend: a - Math.floor(a / b) * b
18:30 Skarsnik like localization is l10n and internationalisation is i18n x)
18:32 stmuk one simple benchmark is now 3 times slower on OS X
18:34 Skarsnik that not good x)
18:35 nanis joined #perl6
18:37 dalek nqp: fe8fb75 | (Pawel Murias)++ | src/vm/js/ (2 files):
18:37 dalek nqp: [js] Change mod_n to be more like the jvm and moarvm backends.
18:37 dalek nqp: review: https://github.com/perl6/nqp/commit/fe8fb75c84
18:37 dalek nqp: 2739200 | (Pawel Murias)++ | t/nqp/59-nqpop.t:
18:37 dalek nqp: Test nqp::mod_n.
18:37 dalek nqp: review: https://github.com/perl6/nqp/commit/2739200fda
18:37 pmurias stmuk: I just hope you weren't benchmarking mod_n on nqp-js ;)
18:38 nanis Sorry, I can't stick around, but just an FYI: On Windows, with fresh build from fresh git clone, t\spec\S17-supply\throttle.t .................................. 5/47 hangs, however, memory footprint of moar.exe keeps growing at about 12 MB/minute. This is on Windows 10 using MS VS2013 tools.
18:38 yoleaux 19 Dec 2015 23:18Z <diakopter> nanis: I don't see an answer to your question: anyway, here it is: perl Configure.pl --gen-moar=master
18:38 nanis yoleaux: Ah, I hadn't noticed --gen-moar took values. Thank you.
18:39 stmuk pmurias: no :) it's just a pi approximatoin thing
18:39 Skarsnik stmuk, you can add test for NC on t/04-nc/17libnames.t for Os X ? x)
18:40 pmurias ./nqp-j -e 'say(nqp::pow_i(2,4))' fails with:
18:40 nanis Also, I noticed CTRL-C during tests ends up causing weird things like test output appearing on the console a few minutes later as well as being unable to delete moar.dll (is that due to no cleanup after death of moar.exe?)
18:40 pmurias java.lang.NoSuchMethodError: org.perl6.nqp.runtime.Ops.pow_i(JJ)J
18:41 nanis I am sorry I can't focus more on this at this time, but I'll check the logs later.
18:41 TEttinger pmurias: I know J means long primitive from debugging a java-related segfault in another channel yesterday
18:41 Woodi nanis: if you are not going for development then Rakudo Star distros can be used
18:46 dalek rakudo/load_precompiled_deps: 0186ba5 | (Stefan Seifert)++ | src/ (2 files):
18:46 dalek rakudo/load_precompiled_deps: Replace load_module in require by calls to $*REPO.need and $*REPO.load
18:46 dalek rakudo/load_precompiled_deps:
18:46 dalek rakudo/load_precompiled_deps: With this we can finally get rid of CompUnit::RepositoryRegistry::load_module
18:46 dalek rakudo/load_precompiled_deps: review: https://github.com/rakudo/rakudo/commit/0186ba5816
18:47 jdv79 is auth used for anything right now?
18:48 Skarsnik Probably not
18:48 nine jdv79: yes, it's a filter for loading modules
18:48 nine use Foo:auth<me>; should be fully functional
18:49 jdv79 so if i want to publish a package on differnet auths i have to author that many version of it?
18:49 jdv79 seems kinda lamme and a pita
18:49 Skarsnik I even think version is kinda useless in modules files and should only used the value from the meta file, because seriously who want to keep the version the same in so much file? x)
18:49 jdv79 for instance i want to put this on cpan:  https://github.com/jonathanstowe/JSON-Infer/blob/master/lib/JSON/Infer.pm#L84
18:49 nine jdv79: why author many versions?
18:50 jdv79 sorry RabidGravy - its just the first example i found
18:50 jdv79 because its hardcoded
18:50 nine hardcoded where?
18:50 jdv79 is that auth value not used?
18:50 jdv79 the one in th link ^^
18:51 nine jdv79: makes more sense to put the auth information into the META6.json. Also why would you even want to use different auths there?
18:52 jdv79 i didn't look if that value is used.  just asked first.  i should read.
18:52 jdv79 i agree that META6 is a better place but then again you need to gen different copies there too
18:52 nine jdv79: auth is for when different authors use the same name for a module and you need to differentiate. It makes no sense for a single author to use multiple auths
18:53 jdv79 what?  i could publish stuff to cpan and github.  i think it makes sense.
18:53 jdv79 not a whole lot but it does
18:53 nine jdv79: if you are identified as github:jonathanstowe then that's you. It doesn't have anything at all to do with where the dist package is downloaded from.
18:54 stmuk I'm still seeing slowness with MoarVM version 2015.11-113-gbd56e2e
18:54 nine Foo:from<Perl6>:ver<0.1>:auth<github:jonathanstowe>:api<1> can be hosted anywhere. People can depend on this package being exactly the same, regardless of where it's hosted.
18:55 jdv79 that's not the spec says.  the auth indicates the content storage where the dist is from.
18:55 Skarsnik There is an API? nice
18:56 jdv79 the api thing is new
18:56 nine jdv79: please back up that claim with actual quotes
18:56 virtualsue joined #perl6
18:56 jdv79 http://design.perl6.org/S22.html#auth
18:57 nine That directly contradicts S11
18:57 jdv79 uh oh
18:57 nine But it also says so: "Please note that this is not an authority"
18:58 jdv79 yes but its still not cool if i install something from cpan and then try to load :auth<cpan> and it fails cause its github or something else
18:58 jdv79 seems like some rethinking may be in order on this area
18:59 Skarsnik could that be injected at installion by like panda?
18:59 nine If the dist has a different auth, it _is_ a completely separate dist. Otherwise it wouldn't make sense to use a different auth.
18:59 nine Sounds like S22 needs some clarification
19:00 skids Hrm you use "MONKEY-SEE-NO-EVAL" to turn *on* EVAL?  That kinda seems backwards.
19:00 RabidGravy jdv79, the cpan: github: whatever is just a convention, it's just a sort of qualification
19:00 nine Quick poll: should I merge load_precompiled_deps? It gives a massive speedup when loading a long tail of precompiled dependencies and gets rid of an API that we do not want to support.
19:01 Skarsnik nine, try install Task::Star with it?
19:01 Skarsnik to see if that break nothing x
19:01 nine Skarsnik: on it
19:01 jdv79 ok, so current thinking that auth does not correspond to a storage location?
19:01 nine For me :auth<cpan:nine> has always meant, "the version by whoever is behind the CPAN account 'nine'"
19:02 jdv79 its just ns prefix
19:02 RabidGravy yeah
19:02 nine Using that to signify a storage location doesn't make sense at all to me. People will want to have their local CPAN mirrors for example.
19:02 nine Skarsnik: is Task::Star known to install on a plain nom?
19:03 Skarsnik No idea
19:03 nine Skarsnik: I've got a failure on installing Grammar::Debugger but seem to remember some discussion on that in the past few days
19:03 RabidGravy if you wanted to use the value for something else then it gives a clue as to how more meaning could be derived as it were
19:03 Skarsnik let me check
19:03 nine I like how much faster panda starts with my branch :)
19:04 Skarsnik I will probably like your change. I have some code that use a lot bunch of module
19:04 nine Oh, Grammar::Debugger installed on the second attempt. Just like JSON::Infer did a couple of hours ago on nom
19:05 nine Template::Mojo fails due to EVAL
19:05 nine Skarsnik: then please test your code with my branch :) Should be a good test
19:05 jdv79 so auth cannot be used to indicate where one wishes to install a dist from
19:05 RabidGravy I was just going to look at JSON::Infer as I think it uses EVAL in a test
19:06 RabidGravy jdv79, no, thar's for support/source (or source-uri)
19:06 nine jdv79: not in the world that I see. It wouldn't make sense to me. Once panda has CPAN support it will make sense for it to have some option to specify a source.
19:07 Skarsnik nice, could version/auth be injected by the thing responsible for the installion? As a module author I really don't want to ensure I keep the 10 files on my module with the good version, when (if I tag a version) panda/whatever could use the version on the Meta file x)
19:07 nine jdv79: dists are immutable. So it really should not matter where you get it from.
19:07 RabidGravy I think source-type has been discussed
19:07 nige1 joined #perl6
19:07 nine Skarsnik: the dist carries the information, and I think it will be entirely possible to add this information to classes during module loading
19:08 RabidGravy Skarsnik, I only put it on the thing that has the name of the dist
19:08 jdv79 RabidGravy: not really. a dist on cpan could have a github support.source
19:09 Skarsnik like dbiish as a lot of file, even if you exclude drivers stuff
19:09 jdv79 they re only the same thing in teh current panda model
19:09 jdv79 S22 hints at the auth being used to indicate the collection to fetch from
19:09 jdv79 i guess that's out for now
19:10 labster joined #perl6
19:10 jdv79 i'm also out for now.  dinner  &
19:10 jdv79 thanks guys
19:11 firstdayonthejob joined #perl6
19:23 ChoHag Can you use ^ twigils in regaular (signature-less) methods/subs?
19:25 vendethiel mh?
19:25 vendethiel should
19:25 RabidGravy joined #perl6
19:27 ilmari ChoHag: that's the point of them
19:27 ilmari m: sub foo { $^a + $^b }; say foo 5, 3;
19:27 camelia rakudo-moar f1bbd4: OUTPUT«8␤»
19:28 ilmari m: dd sub { $^a + $^b }.signature
19:28 camelia rakudo-moar f1bbd4: OUTPUT«Signature $var = :($a, $b)␤»
19:29 ilmari ChoHag: pedantically, no, you can't, since they imply a signature
19:31 dwarring joined #perl6
19:32 ChoHag Oh.
19:32 ChoHag I've only used them in anonymous blocks before.
19:32 ChoHag I guess I should have realised that they're practically the same thing.
19:35 ilmari m: { $^a }.^mro.say; sub { }.^mro.say
19:35 camelia rakudo-moar f1bbd4: OUTPUT«((Block) (Code) (Any) (Mu))␤((Sub) (Routine) (Block) (Code) (Any) (Mu))␤»
19:37 ilmari m: *.^mro.say
19:37 camelia rakudo-moar f1bbd4: ( no output )
19:37 ilmari m: {*}.^mro.say
19:37 camelia rakudo-moar f1bbd4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/SPMPMJNJcK␤{*} may only appear in proto␤at /tmp/SPMPMJNJcK:1␤------> 3{*}7⏏5.^mro.say␤    expecting any of:␤        horizontal whitespace␤        term␤»
19:37 ilmari m: ( * + 3 ).^mro.say
19:37 camelia rakudo-moar f1bbd4: ( no output )
19:37 ilmari huh
19:37 n0tjack joined #perl6
19:38 ChoHag From http://doc.perl6.org/language/modules: "Module distributions in Perl 6 [contain] a lib directory for modules"
19:38 lucasb joined #perl6
19:39 ChoHag A little unclear. Is a module a Module? Does a Module (then) contain modules?
19:40 lucasb it's a module *distribution* :)
19:43 RabidGravy joined #perl6
19:44 yqt joined #perl6
19:49 ChoHag What does N<> mean in pod?
19:49 Skarsnik No idea
19:49 Skarsnik pod6 doc is... lacking
19:54 RabidGravy is the MONKEY-SEE-NO-EVAL supposed to *always* apply? as https://github.com/jonathanstowe/JSON-Infer/blob/master/t/050-infer.t#L28 this one isn't triggering it
19:57 lucasb m: use Test; lives-ok { EVAL '42' }
19:57 camelia rakudo-moar f1bbd4: OUTPUT«ok 1 - ␤»
19:58 Skarsnik blame Test?
19:59 RabidGravy ooh possibly
19:59 lucasb nothing shows that Test.pm is exempt from it. idk why it didn't trigger the warning
20:00 Skarsnik m: say EVAL '42';
20:00 camelia rakudo-moar f1bbd4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/egRSR811aL␤EVAL is a very dangerous function!!! (use MONKEY-SEE-NO-EVAL to override,␤but only if you're VERY sure your data contains no injection attacks)␤at /tmp/egRSR811aL:1␤------> 3say EVAL '42'7…»
20:00 ChoHag Also, ilmari in particular: Placeholder variables cannot be used in a method
20:00 Skarsnik m: say { EVAL '42' };
20:00 camelia rakudo-moar f1bbd4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/vxtR46xTyx␤EVAL is a very dangerous function!!! (use MONKEY-SEE-NO-EVAL to override,␤but only if you're VERY sure your data contains no injection attacks)␤at /tmp/vxtR46xTyx:1␤------> 3say { EVAL '42' …»
20:00 Skarsnik m: use Test; say { EVAL '42' };
20:00 camelia rakudo-moar f1bbd4: OUTPUT«-> ;; $_? is raw { #`(Block|87212464) ... }␤»
20:01 Skarsnik m: use NativeCall; say { EVAL '42' };
20:01 camelia rakudo-moar f1bbd4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/KIRcxAm_6n␤EVAL is a very dangerous function!!! (use MONKEY-SEE-NO-EVAL to override,␤but only if you're VERY sure your data contains no injection attacks)␤at /tmp/KIRcxAm_6n:1␤------> 3use NativeCall; …»
20:01 cygx joined #perl6
20:01 lucasb is the name MONKEY-SEE-NO-EVAL a final decision? can it be bikesheded a little?
20:01 RabidGravy m: use MONKEY-GUTS; EVAL "say 42"
20:01 camelia rakudo-moar f1bbd4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/PwI3OpXIwJ␤EVAL is a very dangerous function!!! (use MONKEY-SEE-NO-EVAL to override,␤but only if you're VERY sure your data contains no injection attacks)␤at /tmp/PwI3OpXIwJ:1␤------> 3use MONKEY-GUTS;…»
20:01 lucasb as a non native speaker, it reads a little strange
20:02 rurban joined #perl6
20:02 cygx lucasb: it's a pun on "monkey see no evil"
20:02 dalek doc: 54b29f1 | (Steve Mynott)++ | bin/p6doc (2 files):
20:02 cygx cf http://emojipedia.org/see-no-evil-monkey/
20:02 dalek doc: use MONKEY-SEE-NO-EVAL until we have a better serialisation
20:02 dalek doc: review: https://github.com/perl6/doc/commit/54b29f1b6b
20:03 lucasb cygx: ah... I didn't know that. thanks for the info
20:04 Skarsnik stmuk, you forget htmlify.p6 x)
20:04 stmuk maybe it should be "use 🙈 "
20:05 rindolf joined #perl6
20:06 dalek doc: b21bc8f | (Steve Mynott)++ | htmlify.p6:
20:06 dalek doc: MONKEY-SEE-NO-EVAL Skarsnik++
20:06 dalek doc: review: https://github.com/perl6/doc/commit/b21bc8f658
20:07 bartolin_ lucasb: 'use Test;' allows use of EVAL explicitely -- see commit message for https://github.com/rakudo/rakudo/commit/625d1c51
20:08 bartolin_ lucasb: especially: https://github.com/rakudo/rakudo/blob/nom/lib/Test.pm6#L1
20:08 cygx .tell jnthn What problem is utf8-c8 supposed to solve? It doesn't round-trip due to normalization, limiting its use cases...
20:08 yoleaux cygx: I'll pass your message to jnthn.
20:09 lucasb bartolin_: thanks! it was right at the beginning of the commit message and I didn't see :D
20:09 AlexDaniel joined #perl6
20:09 lucasb so... Test.pm *is* exempt from EVAL usage errors
20:09 stmuk m: use Test; EVAL "say 42"
20:09 camelia rakudo-moar f1bbd4: OUTPUT«42␤»
20:10 stmuk I don't really like the Test pragma changing behaviour like that .. an EVAL could sneak pass unit tests into production
20:11 AlexDaniel m: say ∞.perl
20:11 camelia rakudo-moar f1bbd4: OUTPUT«Inf␤»
20:12 AlexDaniel m: say 9e99.perl
20:12 camelia rakudo-moar f1bbd4: OUTPUT«9e+99␤»
20:12 AlexDaniel r: say 9e99.perl
20:12 camelia rakudo-jvm 6c0f93: OUTPUT«9.0E99␤»
20:12 camelia ..rakudo-moar f1bbd4: OUTPUT«9e+99␤»
20:12 AlexDaniel r: say 9e-99.perl
20:12 Skarsnik does that mean a module set use MONKEY-NO-EVAL it get propagated to everything using it?
20:12 camelia rakudo-moar f1bbd4: OUTPUT«9e-99␤»
20:12 camelia ..rakudo-jvm 6c0f93: OUTPUT«9.0E-99␤»
20:12 AlexDaniel it's interesting that the output is so different :)
20:13 AlexDaniel r: say 9.0E-99; say 9e-99
20:13 camelia rakudo-jvm 6c0f93: OUTPUT«9.0E-99␤9.0E-99␤»
20:13 camelia ..rakudo-moar f1bbd4: OUTPUT«9e-99␤9e-99␤»
20:13 AlexDaniel both are correct, obviously :)
20:13 RabidGravy I suppose the thing is that Test itself uses EVAL itself in places so it sort of makes some sense
20:16 RabidGravy also
20:16 RabidGravy m:  use Test; no MONKEY-SEE-NO-EVAL; EVAL "say 42"
20:16 camelia rakudo-moar f1bbd4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/wIQSdGJFoJ␤EVAL is a very dangerous function!!! (use MONKEY-SEE-NO-EVAL to override,␤but only if you're VERY sure your data contains no injection attacks)␤at /tmp/wIQSdGJFoJ:1␤------> 3st; no MONKEY-SE…»
20:18 Skarsnik du how test make the m-s-n-e get propagated? x)
20:19 stmuk m: use MONKEY-GUTS; EVAL "say 42"
20:19 camelia rakudo-moar f1bbd4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/sLMQqdkSTG␤EVAL is a very dangerous function!!! (use MONKEY-SEE-NO-EVAL to override,␤but only if you're VERY sure your data contains no injection attacks)␤at /tmp/sLMQqdkSTG:1␤------> 3use MONKEY-GUTS;…»
20:19 RabidGravy it's rather strange
20:22 rurban joined #perl6
20:22 lucasb sorry to say, but this change: s/use nqp/use MONKEY-GUTS/, it changed something that was very clear to something that someone will have know what it means
20:22 lichtkind m: 1..10 ==> .say
20:22 camelia rakudo-moar f1bbd4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/iuxMGl9ylh␤Sorry, do not know how to handle this case of a feed operator yet.␤at /tmp/iuxMGl9ylh:1␤------> 1..10 ==> .say7⏏5<EOL>␤»
20:23 Skarsnik lucasb, I think it's just an alias?
20:23 RabidGravy I think use nqp still works
20:23 lucasb yes, it's just an alias
20:23 stmuk m: unit class Test; EVAL say 42
20:23 camelia rakudo-moar f1bbd4: OUTPUT«42␤»
20:23 Skarsnik lol
20:23 RabidGravy er
20:25 lucasb I was talking about the specific line change in Test.pm... but, ok, it's just a little thing :)
20:26 RabidGravy m: class B { class Test { EVAL "say 42"; }} # slightly more strange
20:26 camelia rakudo-moar f1bbd4: OUTPUT«42␤»
20:27 RabidGravy which could happen in regular code without realising
20:27 lichtkind can i combine .hyper with ==> ?
20:29 rurban joined #perl6
20:29 lichtkind o/ rurban
20:31 RabidGravy I looks like it checks whether the local name Test is in scope
20:32 RabidGravy don't know where it does that
20:32 stmuk https://github.com/rakudo/rakudo/commit/625d1c51#diff-deae5f68054ef8116f04d6cb78bc4395R358
20:34 RabidGravy yikes
20:37 RabidGravy so even a constant or
20:37 RabidGravy m: enum Foo <Test>;  EVAL "say 42"
20:37 camelia rakudo-moar f1bbd4: OUTPUT«42␤»
20:38 RabidGravy so really easy to switch it off by accident
20:38 stmuk yes
20:39 Skarsnik fill a bug? x)
20:41 lizmat computer: messages
20:41 yoleaux 12:19Z <jnthn> lizmat: Hm, it's probably the NQP version bump, then, rather than the patch itself...
20:41 yoleaux 12:19Z <jnthn> lizmat: Thanks for hunting it down to that one.
20:41 xfix joined #perl6
20:41 lizmat :-)
20:41 lizmat m: sub a() { return 1,2,:3c }; dd a   # this is wrong
20:41 camelia rakudo-moar f1bbd4: OUTPUT«List $var = $(1, 2, 3)␤»
20:42 lizmat m: sub a() { 1,2,:3c }; dd a   # without the return, it's right
20:42 camelia rakudo-moar f1bbd4: OUTPUT«List $var = $(1, 2, :c(3))␤»
20:43 stmuk m: qqx{perl6 -e 'say 42'}
20:43 camelia rakudo-moar f1bbd4: OUTPUT«qx, qqx is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting:1␤  in sub QX at src/RESTRICTED.setting:11␤  in block <unit> at /tmp/M8tesjOkTg:1␤␤»
20:43 stmuk surely EVAL should be disabled by RESTRICTED too?
20:44 stmuk I suppose the bot wouldn't then work
20:44 lizmat stmuk: afaik, the bot just takes your line, puts it in a file, then executes it
20:45 lizmat so not allowing EVAL in there would be ok
20:45 hankache joined #perl6
20:46 stmuk ah evalbot despite its name doesn't use EVAL
20:47 ChoHag S26.pod must have been fun to write...
20:47 virtualsue joined #perl6
20:51 stmuk *** glibc detected *** /home/travis/.rakudobrew/moar-nom/install/bin/moar: corrupted double-linked list: 0x000000003add16b0 ***
20:52 * _sri wonders why perl6 needs two subreddits
20:52 Skarsnik lol?
20:52 _sri you've got r/perl6 and are also claiming r/perl
20:53 _sri the latter increasing the perl6/perl5 confusion
20:54 Skarsnik I have no idea how subreddits are handled (I don't care about reddit at the first place) maybe r/perl was used for perl6 before perl6 was created?
20:54 lizmat "The Perl Programming Language, including both Perl 5 and Perl 6."   ???
20:54 _sri lizmat: yea :)
20:54 lizmat seems r/perl is both for Perl 5 and Perl 6 ?
20:55 _sri it's quite confusing
20:55 hankache the more the merrier ;)
20:55 hankache good evening #perl6
20:55 lizmat hankache o/
20:56 hankache hiya lizmat
20:57 ChoHag Maybe Perl 6 isn't claiming r/perl, but r/perl is claiming Perl 6?
20:57 lucasb I bootstraped panda earlier and I think I saw 3 occurrences of the "$obj .= method if $cond" useless use. But I think nine already told TimToady about it...
20:57 stmuk the reddit description for r/perl clearly mentions both langs
20:58 koo8 joined #perl6
20:58 hankache well r/perl6 would be my natural choice
20:59 hankache less trolls
21:01 El_Che lizmat: don't get into the confusing perl5 and 6 name scheme :)
21:02 Skarsnik r_perl5 r-perl6
21:05 RabidGravy I stop any confusion and avoid trolls by not reading reddit
21:10 _sri when is the first o'reilly perl6 book coming out?
21:10 Skarsnik I don't know if someone is planning of writing one
21:10 lizmat _sri: not this year  :-)
21:11 _sri odd, with other 1.0 language releases recently they've had it match pretty well
21:11 lizmat well, what can I say: O'Reilly hasn't been really in touch with communities lately
21:11 jdv79 they do confs now
21:12 lizmat last OSCON, communities where put away in Diagonally, away from the muggles
21:12 _sri they have done a lot for elixir
21:12 DrForr They tried somewhat with OSCON...
21:12 lizmat at OSCON Europe, I was told they were going to address this
21:12 DrForr Well, at least this year iwth proposals, what actually happens remains to be seen.
21:13 stmuk I think o'reilly are fairly out of touch with programming langs .. I don't think they even did a gobook
21:14 _sri they have a go book actually
21:14 RabidGravy I think a couple of people have been approached by various publishers about a Perl 6 book
21:14 stmuk well I was unable to find one using their site search,  do you have a link?
21:14 _sri http://shop.oreilly.com/product/0636920046516.do
21:15 RabidGravy but all the ones I know have thus far declined
21:16 stmuk _sri: that's not even out yet and go is 6 years old
21:16 _sri stmuk: they've been much faster with elixir though http://shop.oreilly.com/product/0636920030584.do
21:16 _sri that was out even before 1.0
21:17 RabidGravy is it? strewf I thought it was like last year or something
21:17 geraud joined #perl6
21:17 _sri go 1.0 was 2012
21:18 _sri oh my
21:18 _sri you can still buy perl6 and parrot essentials on amazon
21:19 Skarsnik It's probably better to not have a book on a language at release date. It probably avoid people believing it's 'production ready'
21:19 flussence yeah well, PHP 6 had plenty of books
21:19 _sri i bet a lot of folks will buy that by accident
21:20 lucasb I think I would prefer to see a book written by the whole community, in colaboration. Would that be feasible?
21:20 flussence don't see why not :)
21:20 Skarsnik I think it's a bad idea
21:20 lucasb if it turns out to be high quality, some publisher will eventually approach to print it on paper
21:21 stmuk https://github.com/perl6/book
21:21 * _sri vaguely remembers donating a cover for a community perl6 book a few years back
21:21 lucasb stmuk: ^^ yes, I really liked that book. unfortunately, people stopped writing it
21:21 zengargoyle joined #perl6
21:22 lucasb maybe the "Using Perl 6" book can be rebooted
21:22 stmuk yes I hope so
21:26 CQ joined #perl6
21:26 masak ok, I found another precompilation-related bug.
21:26 masak golfing.
21:27 RabidGravy also https://en.wikibooks.org/wiki/Perl_6_Programming
21:28 RabidGravy which looks like it needs some love
21:30 hankache joined #perl6
21:36 nine lizmat: Should I merge load_precompiled_deps? It gives a massive speedup when loading a long tail of precompiled dependencies and gets rid of an API that we do not want to support.
21:37 jnthn nine: What are you reasons not to merge it?
21:37 yoleaux 20:08Z <cygx> jnthn: What problem is utf8-c8 supposed to solve? It doesn't round-trip due to normalization, limiting its use cases...
21:37 hankache_ joined #perl6
21:37 nine jnthn: we are rather close to the release and it's a 315 lines patch
21:38 jnthn cygx: It wants to handle normalization eventually; in the meantime, handling stuff that doesn't decode at utf-8 is useful.
21:38 jnthn nine: Mostly removing, or adding, lines? :)
21:38 jnthn *as
21:38 nine 4 files changed, 114 insertions(+), 95 deletions(-)
21:38 jnthn Hm, almost break even :)
21:39 jnthn The API thing is important though
21:39 masak m: class A::B {}; class C { has A::B $.ab = A::B.new }; say "alive"
21:39 camelia rakudo-moar f1bbd4: OUTPUT«alive␤»
21:39 masak m: class A::B {}; class C { has A::B $.ab .= new }
21:39 camelia rakudo-moar f1bbd4: OUTPUT«===SORRY!===␤Could not locate compile-time value for symbol A::B␤»
21:39 * masak submits rakudobug
21:39 lizmat nine jnthn if it is an API we don't want to support, it needs to go
21:39 lizmat so, +1 on merge
21:39 lizmat asap, I might add  :-)
21:40 jnthn Yeah, my feeling too.
21:40 jnthn masak: So...not precomp? :)
21:40 dalek rakudo/nom: 3f5552c | (Stefan Seifert)++ | src/ (3 files):
21:40 dalek rakudo/nom: Load dependencies of a precomp file directly instead of searching
21:40 dalek rakudo/nom:
21:40 dalek rakudo/nom: Since for every precompiled file we already record the ids of all recursive
21:40 dalek rakudo/nom: dependencies, we can use that information for loading those dependencies,
21:40 dalek rakudo/nom: instead of searching all over again.
21:40 dalek rakudo/nom:
21:40 dalek rakudo/nom: This is also an important step to get rid of RepositoryRegistry.load_module
21:40 dalek rakudo/nom:
21:40 dalek rakudo/nom: Many thanks to jnthn++ for pointing out this possibility!
21:40 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3f5552c9df
21:40 dalek rakudo/nom: 0186ba5 | (Stefan Seifert)++ | src/ (2 files):
21:40 dalek rakudo/nom: Replace load_module in require by calls to $*REPO.need and $*REPO.load
21:40 dalek rakudo/nom:
21:40 dalek rakudo/nom: With this we can finally get rid of CompUnit::RepositoryRegistry::load_module
21:40 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0186ba5816
21:40 dalek rakudo/nom: 514ba8b | (Stefan Seifert)++ | src/ (4 files):
21:40 dalek rakudo/nom: Merge branch 'load_precompiled_deps' into nom
21:40 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/514ba8bb29
21:40 masak jnthn: not precomp :)
21:40 jnthn phew!
21:41 masak indeed
21:41 jnthn precomp bugs are up there with GC bugs in terms of "really darn tricky to debug"
21:41 nine like run_alt :/
21:41 jnthn Yeah :/
21:42 Skarsnik I think you should focus on having everything on Task::Star at least install now x)
21:45 RabidGravy nine, you know you mentioned JSON::Infer failed to install earlier, it seems a) panda fails to install dependencies sometimes, b) it fails one test on travis which never fails here
21:45 diakopter I still have to disable jit to build nqp on latest msvc
21:45 jdv79 RabidGravy: that error happens with other dists
21:45 jdv79 don't remember though
21:46 lizmat m: sub a() { return 1,2,:3c }; dd a   # bisected this brokennes to 625d1c5116c3314dd
21:46 konobi what is JSON::Infer?
21:46 camelia rakudo-moar f1bbd4: OUTPUT«List $var = $(1, 2, 3)␤»
21:46 nine RabidGravy: yes, that error is hard to debug since on the second attempt it usually works. But the travis test might give a hint. Or not. It can only help to fix it.
21:47 skids m: my $f = Channel.new; start { for 0..3 { sleep 1; $f.send(42) } }; await supply { whenever $f -> $s { $s.say } }.head(1).Promise
21:47 RabidGravy konobi, it takes some json and builds a class to represent it which has from-json/to-json methods
21:47 camelia rakudo-moar f1bbd4: OUTPUT«(timeout)42␤42␤42␤42␤»
21:48 jnthn skids: Need to close the channel?
21:48 jnthn Oh, but .head(1)
21:48 skids No should just end because head.
21:48 jnthn Oh wait
21:48 jnthn Not it shoudln't
21:48 jdv79 we're going to need to firm up the Version issues soon
21:48 jnthn You never emit anything.
21:48 konobi RabidGravy: ah
21:49 skids Ah.
21:49 jnthn So there's never a value to head.
21:49 RabidGravy nine, it can't find some libraries which are "used" in the test files
21:49 lizmat .tell TimToady commit 625d1c5116c3314dd broke sub a() { return 1,2,:3c }; dd a   # List $var = $(1, 2, 3)
21:49 yoleaux lizmat: I'll pass your message to TimToady.
21:49 jdv79 esp since pause currently requires the version value to start with a v.
21:49 nine jnthn: what do you think about moving resolve_repossession_conflicts from CompUnit::RepositoryRegistry to Stash? It's totally out of place in the former and only actively does something with the latter
21:50 skids jnthn++
21:50 lizmat jdv79: PAUSE does that ??  I didn't think PAUSE did anything like that on upload ?
21:50 jnthn skids: Dunno what you golfed that from, but you may find it easier to write $f.Supply.do(&say).head(1).Promise
21:51 jdv79 its old but its unclear what to do even today.  S22 says v.
21:51 jdv79 i asked in here the other day and nobody seemed to be able to agree on much of anything
21:51 jdv79 i think i'll have to say something like "cpan has p6 support but its broke so don't use it yet"  in my advent:(
21:52 lizmat :-(
21:53 castelo joined #perl6
21:53 jdv79 it actually does /^v\d+/ so its broke in any case but still
21:53 Skarsnik lol what
21:53 jdv79 i wish someone would clear it up
21:53 jdv79 its from years ago...
21:54 jdv79 who starts a verion off with an alpha anyway but still its legal
21:54 TimToady lizmat: I see where it went wrong, thanks
21:54 yoleaux 21:49Z <lizmat> TimToady: commit 625d1c5116c3314dd broke sub a() { return 1,2,:3c }; dd a   # List $var = $(1, 2, 3)
21:56 jdv79 m: Version.new($_).say for v1.1, "v1.1" # is this really what we want?
21:56 camelia rakudo-moar 514ba8: OUTPUT«v1.1␤vv.1.1␤»
21:57 jnthn nine: I guess I'm just a tad wary in so far as I can imagines non-Stash conflicts that may want resolving
21:58 nine jnthn: can I make it a private method and still call it from NQP? Then it wouldn't bother me as much, as it's undiscoverable by the casual user
21:59 Skarsnik m: say v1.2.3.Str;
21:59 camelia rakudo-moar 514ba8: OUTPUT«v1.2.3.Str␤»
21:59 Skarsnik m: say (v1.2.3).Str;
21:59 camelia rakudo-moar 514ba8: OUTPUT«1.2.3␤»
21:59 jnthn nine: Yeah, you'll just have to grab it through the MOP
21:59 jnthn nine: .HOW.find_private_method or so
21:59 Skarsnik that's confusing x)
22:00 nine jnthn: ok then I will do that unless I suddenly have a really good idea on where to put the method :)
22:00 jdv79 we need a ruling soon or its gonna be a nuissance
22:00 jnthn nine: +1
22:01 nine But first: sleep. Good night!
22:01 Skarsnik jdv79, fill a bug?
22:01 jdv79 nite
22:01 jdv79 where?  p6 specs?
22:01 jnthn rest well, nine o/
22:01 jdv79 i can fix pause but i'm not sure what we want
22:02 flussence «Elapsed (wall clock) time (h:mm:ss or m:ss): 0:44.44» -- I don't remember `panda install Linenoise` taking *this* long in the past...
22:02 flussence oh well, don't care if it's slow, it works and that's an improvement over last time I tried
22:02 Skarsnik ahaha yes
22:04 lizmat nine: after the past patches, my precomp errors in spectest are gone !
22:04 lizmat so the only issue on OS X is t/spec/S32-array/adverbs.t , test 21
22:05 flussence ...aaaaand now I get a gazillion undef warnings each time I open a repl *sigh*
22:05 Skarsnik blame the sink thingy x)
22:05 flussence from "sub guess_library_name" line 179..189
22:06 RabidGravy blame it on the boogie
22:06 Skarsnik Oh, blame me then x)
22:08 Skarsnik Why does it warn actually? I think libnoise was compiled and put in perl6 install
22:08 flussence I could maybe understand it doing that at repl startup, but it's doing it on each repl line...
22:08 Skarsnik hm
22:08 Skarsnik that really weird
22:09 Skarsnik guess_lib_name should be called only the first time a C routine is called
22:10 dalek rakudo/nom: 72b5e77 | TimToady++ | src/Perl6/Actions.nqp:
22:10 dalek rakudo/nom: relax EVAL to allow literal strings
22:10 dalek rakudo/nom:
22:10 dalek rakudo/nom: Sometimes you want EVAL to just switch languages, such as to Perl 5.  For
22:10 dalek rakudo/nom: a literal string there can be no injection attack.
22:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/72b5e77fb8
22:10 dalek rakudo/nom: 2047786 | TimToady++ | src/Perl6/Actions.nqp:
22:10 Skarsnik or REPL is doing something weird
22:10 dalek rakudo/nom: return failed to return raw args
22:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2047786324
22:11 Skarsnik TimToady, did you see the discution about having the Test symbol defined in your code, automaticly consider Test.pm is used and cut the EVAL error?
22:12 stmuk m: constant Test=1; eval 42
22:12 camelia rakudo-moar 514ba8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/bsDvqWH940␤Undeclared routine:␤    eval used at line 1. Did you mean 'EVAL', 'val'?␤␤»
22:13 TimToady we could have a special symbol exported by Test, would be a slightly safer approach
22:13 stmuk m: constant Test=1; EVAL 42
22:13 camelia rakudo-moar 514ba8: ( no output )
22:13 stmuk ahh
22:13 flussence oh, while people are fiddling around in S22, can I get some clarification on where it's valid to put :auth/:ver/etc after a module name? (personally, I'd like the ability to put multiple versions of a module in "provides")
22:13 stmuk m: constant Test=1; EVAL "say 42"
22:13 camelia rakudo-moar 514ba8: OUTPUT«42␤»
22:14 TimToady or probe for Test and one or more of its exports
22:14 xfix joined #perl6
22:15 TimToady but it was a complete bloodbath if I didn't make an exception for testing one way or another :)
22:16 Skarsnik flussence, where is linoise stuff?
22:16 lizmat nine: on Moar, make test works ok; on JVM, all tests in make test that do "use Test" fail, because they can't find Test
22:16 TimToady I actually had a special export symbol for a while as one of my experiments, but pulled it back out for some reason
22:17 dalek nqp: 50a3cc0 | (Pawel Murias)++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java:
22:17 dalek nqp: Fix pow_i on the JVM backend.
22:17 dalek nqp: review: https://github.com/perl6/nqp/commit/50a3cc0ac7
22:18 pmurias joined #perl6
22:18 flussence Skarsnik: on my system? All I see that *might* be libnoise is «~/code/rakudo/install/share/perl6/site/resources/7B814DD107CC3AAF25E4DDE37E2CA226EF34CB51.so»
22:18 TimToady also, I noticed that adding a symbol to Test.pm6 didn't automatically reprecompile without the nuclear options, which was disturbing
22:18 flussence there's also a <hex>.dll and <hex>.dylib inside resources/, but I'm pretty sure I'm not running those OSes...
22:18 ilmari pmurias: don't you need to fix the cast on the Math.pow() too?
22:18 Skarsnik I mean the code x)
22:19 lucasb Skarsnik: it's on a hoelzro's github repo
22:19 flussence er... I just did `panda install Linenoise`, so wherever that says it is
22:19 dalek nqp: 5563da9 | (Pawel Murias)++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java:
22:19 dalek nqp: Fix nqp::pow_i some more.
22:19 dalek nqp: review: https://github.com/perl6/nqp/commit/5563da93d0
22:20 pmurias ilmari: yes
22:20 ilmari pmurias: :)
22:21 awwaiid What did IO::String become?
22:22 awwaiid oh wait, lib
22:22 BenGoldberg joined #perl6
22:23 dalek rakudo/nom: a624c37 | TimToady++ | lib/Test.pm6:
22:23 dalek rakudo/nom: export token to default MONKEY-SEE-NO-EVAL to true
22:23 dalek rakudo/nom:
22:23 dalek rakudo/nom: This is less likely to collide with a user name than "Test" is.
22:23 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a624c371e8
22:23 mohae joined #perl6
22:25 Skarsnik return in given still exit the routine?
22:25 gfldex lolibloggedalittle: https://gfldex.wordpress.com/2015/12/20/i-can-write-them-nearly-as-fast-as-you-can-read-them-now/
22:26 lizmat gfldex++
22:27 masak gfldex++
22:27 masak gfldex: s/basicly/basically/
22:27 dalek ecosystem: 576a299 | skids++ | META.list:
22:27 dalek ecosystem: Add Proc::Screen to ecosystem
22:27 dalek ecosystem:
22:27 dalek ecosystem: Also includes Test::Screen for testing terminal based applications where GNU screen is available
22:27 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/576a299902
22:29 hahainternet m: say ("a", "aa" ... *)[4]
22:29 camelia rakudo-moar 514ba8: OUTPUT«ad␤»
22:29 hahainternet not quite what i expected there
22:29 hahainternet easily specified explicitly i know
22:30 hahainternet just, a little nasty compared to how it reads
22:30 pmurias what do we use nqp::scdisclaim for?
22:32 lucasb hahainternet: did you want ('a' x *)(4) ?
22:32 jnthn pmurias: I'm not sure we do any more
22:33 Skarsnik I think I broke sub is native(Str) but I am not sure how x)
22:33 jnthn pmurias: I think it was going to be used for caching precomp database stuff
22:33 hahainternet lucasb: does that work?
22:34 lucasb hahainternet: idk if that's what you wanted, but it returns "aaaa"
22:34 jnthn m: say ('a' x *)(4)
22:34 camelia rakudo-moar a624c3: OUTPUT«aaaa␤»
22:34 hahainternet oh, not on my perl6
22:34 * hahainternet builds afresh
22:34 hahainternet oh wait, ( vs [
22:34 jnthn Yeah, it's not building a sequence of them
22:34 hahainternet yeah, it was the infinite sequence part i was playing with really
22:34 jnthn m: say ('a', * ~ 'a' ... *)[4]
22:34 camelia rakudo-moar a624c3: OUTPUT«aaaaa␤»
22:35 hahainternet oh you can do that without the { } block syntax
22:35 hahainternet good to know
22:35 jnthn m: say ('', * ~ 'a' ... *)[4] # or this, depending what you want
22:35 camelia rakudo-moar a624c3: OUTPUT«aaaa␤»
22:36 hahainternet either was perfect, i would argue that simple character sequences should be supported without being explicit just as is done for geometric sequences for example, but it's not exactly important before christmas
22:36 jdv79 i'm gonna submit a fix to pause then
22:37 lucasb .oO( will it resume afterwards? :)
22:45 lucasb I have one scalar (or a list), how to make a lazy infinite list of it? I think it's called "repeateadly" or "cycle" in other languages
22:45 lucasb ?
22:45 jnthn xx *
22:46 lucasb duh! I knew it was simple
22:46 lucasb thanks, jnthn
22:46 jnthn Note if you want the list flattend into it you probably have to use |
22:46 jnthn m: say ((1, 2) xx *)[^10]
22:46 camelia rakudo-moar a624c3: OUTPUT«((1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2))␤»
22:46 jnthn m: say (|(1, 2) xx *)[^10]
22:46 camelia rakudo-moar a624c3: OUTPUT«(1 2 1 2 1 2 1 2 1 2)␤»
22:47 lucasb ^^ yeah, I really like that (|<...> xx *) flattens there
22:47 lucasb anyway, here are 2 more ways to write "aaaa":
22:47 lucasb m: say (^Inf).map('a' x *)[4]
22:47 camelia rakudo-moar a624c3: OUTPUT«aaaa␤»
22:48 lucasb m: say (('a' xx *) Zx ^Inf)[4]
22:48 camelia rakudo-moar a624c3: OUTPUT«aaaa␤»
22:48 gfldex m: say 'a' xx * Z=> 1,2,3; # you may not need the fallening, depending on context
22:48 camelia rakudo-moar a624c3: OUTPUT«(a => 1 a => 2 a => 3)␤»
22:49 jnthn Well, there's good news and bad news. Good is that I fixed the failing tests I committed yesterday for multis in roles and collisions. Bad is that I discovered another case I didn't yet handled...
22:49 jnthn *handle
22:50 jnthn Maybe tomorrow on the plane... :)
22:50 dalek rakudo/nom: 3c31b8b | jnthn++ | src/Perl6/Metamodel/ (3 files):
22:50 dalek rakudo/nom: Treat multis with identical sigs as collisions.
22:50 dalek rakudo/nom:
22:50 dalek rakudo/nom: This means a class can resolve such a collision by implementing a
22:50 dalek rakudo/nom: multi with the signature matching the colliding ones.
22:50 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3c31b8bbca
22:51 masak nice.
22:51 loren joined #perl6
22:52 jnthn Hm, suddenly the hotel internets won't resolve github.com?!
22:52 dalek roast: 4bf7660 | jnthn++ | S14-roles/composition.t:
22:52 dalek roast: Unfudge multi/role/conflict tests.
22:52 dalek roast: review: https://github.com/perl6/roast/commit/4bf7660fcd
22:52 jnthn phew
22:53 * jnthn hopes he won't be on another propellor plane tomorrow :/
22:53 hahainternet a quick syntax question, if i have say 'a'..'z' Z 1..10 how would i say, call map on that to operate on each element of the returned list?
22:53 Skarsnik we can have multi in role now? x)
22:54 hahainternet if i wrap it in () it doesn't seem very happy about it
22:54 hahainternet or maybe i'm just doing something wrong, it is 11pm and i should sleep
22:54 hahainternet yep, it was syntax errors on my part
22:55 jnthn Skarsnik: You always could, but now we pay attention to their signatures
22:55 jnthn Skarsnik: So a multi foo(Int $x) { ... } in a role means you must write a multi foo(Int $x) { ... } in a class composing it.
22:56 jnthn Before you just got an ambiguous dispatch 'cus we didn't pay attention to ... in multis in the role composer.
22:57 Skarsnik m: Role A { multi method foo() {say 'hello'}; multi method foo(Int) { ... }}; class B does A {method foo(Int) {say 42}}}; my $a = A.new; $a.foo();
22:57 loren m: my $str = "x=5\ny=6\nz=7"; $str ~~ s:c/(<.ident>) \= (\N+) $$/"$0 => $1"/ for 1..3; say $str;
22:57 camelia rakudo-moar a624c3: OUTPUT«5===SORRY!5===␤Invalid typename 'A'␤at /tmp/6tnFL61me3:1␤------> 3method foo(Int) { ... }}; class B does A7⏏5 {method foo(Int) {say 42}}}; my $a = A.␤Other potential difficulties:␤    Useless declaration of a has-scoped multi-method in …»
22:57 camelia rakudo-moar a624c3: OUTPUT«"x => 5"␤"y => 6"␤"z => 7"␤»
22:57 loren m: $_="xyu";s/x/y/;my $str = "x=5\ny=6\nz=7"; $str ~~ s:c/(<.ident>) \= (\N+) $$/"$0 => $1"/ for 1..3; say $str;
22:57 camelia rakudo-moar a624c3: OUTPUT«x=5␤"y => 6"␤"z => 7"␤»
22:58 jnthn role, not Role
22:58 Skarsnik m: Role A { multi method foo() {say 'hello'}; multi method foo(Int) { ... }}; class B does A {method foo(Int) {say 42} }; my $b = B.new; $b.foo();
22:58 camelia rakudo-moar a624c3: OUTPUT«5===SORRY!5===␤Invalid typename 'A'␤at /tmp/MONRX5Y6Xy:1␤------> 3method foo(Int) { ... }}; class B does A7⏏5 {method foo(Int) {say 42} }; my $b = B.␤Other potential difficulties:␤    Useless declaration of a has-scoped multi-method in …»
22:58 Skarsnik ><
22:58 Skarsnik m: role A { multi method foo() {say 'hello'}; multi method foo(Int) { ... }}; class B does A {method foo(Int) {say 42} }; my $b = B.new; $b.foo();
22:58 camelia rakudo-moar a624c3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/bZ2cTfnCWi␤Multi method 'foo' with signature :(B $: Int $, *%_) must be implemented by B because it is required by a role␤at /tmp/bZ2cTfnCWi:1␤»
22:58 loren Anyone know this problem... -_-
22:58 jnthn Has to be a multi in the class too
22:58 Skarsnik m: role A { multi method foo() {say 'hello'}; multi method foo(Int) { ... }}; class B does A {multi method foo(Int) {say 42} }; my $b = B.new; $b.foo();
22:58 camelia rakudo-moar a624c3: OUTPUT«hello␤»
23:00 Skarsnik m: role A { method foo() {...};}; class B does A {multi method foo(Int) {say 42}; multi method foo() { say 'hello'} }; my $b = B.new; $b.foo();
23:00 camelia rakudo-moar a624c3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tJkJ__hash␤Method 'foo' must be implemented by B because it is required by a role␤at /tmp/tJkJ__hash:1␤»
23:00 Skarsnik that still does not wor
23:00 Skarsnik *work
23:00 jnthn That needs an explicit proto method writing
23:01 Skarsnik That something I don't get. I think proto was just to limit multi signature
23:01 jnthn No, the proto is actually what is always called (optimization aside)
23:01 loren Please help have a look at the code above, and i have to go to work ..
23:02 jnthn We generate it for you, though too late for it to help with role composition
23:02 jnthn May be able to loosen that in the future.
23:02 Skarsnik That look more like a bad workaround for me x)
23:02 jnthn Well, tough luck.
23:02 jnthn Or patches welcome.
23:02 Skarsnik But I guess it's because multi is part of the signature?
23:02 jnthn No
23:03 jnthn It's 'cus multis don't go in the method table
23:03 jnthn They're always installed under a proto
23:04 jnthn And since roles can bring in inherited classes, which may also bring a proto that we should clone rathre than clobber, it's not as simple as saying "just generate protos before composing roles"
23:04 lucasb m: $_ = 'xyz'; s/x/y/; $_ = 'abc'; s:c/(.)/<$0>/; .say
23:04 camelia rakudo-moar a624c3: OUTPUT«a<b>c␤»
23:04 dalek rakudo/nom: e8d924c | TimToady++ | src/Perl6/Actions.nqp:
23:04 dalek rakudo/nom: change from Test to &MONKEY-SEE-NO-EVAL()
23:04 dalek rakudo/nom:
23:04 dalek rakudo/nom: Now the default depends on a special sub defined and exported by Test.
23:04 dalek rakudo/nom: This sub must return true, so it's possible to shadow it in an inner scope
23:04 dalek rakudo/nom: with a sub that returns false instead.  (Though generally if you're gonna
23:04 dalek rakudo/nom: do that, you should just use/no MONKEY-SEE-NO-EVAL instead.)
23:04 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e8d924c968
23:04 n0tjack joined #perl6
23:04 lucasb ^^ so, this should be "a<b>c" or "<a>bc" ?
23:05 lucasb s:c/// is to "continue", right?
23:05 Skarsnik I never say it has a simple solution ^^ It just it look weird from someone that does not know the internal
23:05 loren lucasb, yeah, i think so..
23:05 jnthn Yeah. Well, there *is* a solution already, and it's the kind of thing we can loosen up later if we figure out a good solution.
23:06 jnthn I've got a kinda bad feeling about the solutions I've considered so far, though.
23:07 jnthn Anyway, a post-Christmas issue.
23:07 jnthn The requirements from roles composed by roles I really should fix though.
23:07 lucasb loren: intuitively, I would say the position should have been reseted between the regex operators, but idk to be honest... maybe someone can explain more.
23:09 geekosaur that seems buggy, yes. I am not clear on how :c / :p are supposed to work, it says they default to 0 and are not attached to the string being matched (like p5 did) but don't say what it should be attached to (which I guess is the operation, so should have reset to 0)
23:09 TimToady thing is, the current position is not attached to the search string, but :c looks at the last match instead
23:09 geekosaur ah
23:09 geekosaur that seems like it's going to trip people
23:10 TimToady it's sort of naughty to modify an immutable string just to keep one-thread's search position; what if multiple threads are searching the same string?
23:10 loren lucasb, em, thanks, I have to go to work .
23:10 TimToady so if you want to be explicit, remember the .to of the previous match somewhere, and feed it to :c($pos)
23:10 Pessimist joined #perl6
23:10 loren bye , everyone
23:11 geekosaur I would expect it to be attached to the current evaluation context (that is, the statement, or block if it's in the test of a while or etc.) tbh
23:12 loren I will check chat log when i come back form work..
23:13 lucasb geekosaur, TimToady: I don't fully understand all the details, so... IOW, the code is working as expected? :)
23:13 TimToady yes
23:13 lucasb ah, ok. thanks TimToady++ and geekosaur++
23:14 geekosaur yes. it's just that "as expected" is not "as naïvely expected"
23:14 TimToady m: sub MONKEY-SEE-NO-EVAL() { 1 }; say EVAL 42
23:14 camelia rakudo-moar e8d924: OUTPUT«42␤»
23:14 TimToady m: use Test; say EVAL 42
23:14 camelia rakudo-moar e8d924: OUTPUT«5===SORRY!5=== Error while compiling /home/camelia/rakudo-m-inst-2/share/perl6/sources/5A873B6C22E600D8BE41B8846C251CD7D914CFE3␤EVAL is a very dangerous function!!! (use MONKEY-SEE-NO-EVAL to override,␤but only if you're VERY sure your data contain…»
23:14 n0tjack joined #perl6
23:14 TimToady I think we need to nuke the precomp Test for camelia
23:15 dalek rakudo/nom: af5b39a | lizmat++ | src/core/Regex.pm:
23:15 dalek rakudo/nom: Fix for #126972
23:15 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/af5b39ac74
23:17 rurban_ joined #perl6
23:21 RabidGravy TimToady++ # that'll be harder to do by mistake :)
23:22 TimToady camelia will be broken for a few minutes; can't rebuild on moar while jvm is recompiling, or it runs out of memory...
23:23 jnthn 'night, #perl6
23:23 TimToady safe travels
23:23 jnthn Thanks!
23:31 TimToady m: use Test; say EVAL 42
23:31 camelia rakudo-moar af5b39: OUTPUT«42␤»
23:31 TimToady that's better
23:31 stmuk m: constant Test=1; EVAL "say 42"
23:31 camelia rakudo-moar af5b39: OUTPUT«42␤»
23:31 lizmat m: EVAL 42
23:31 camelia rakudo-moar af5b39: OUTPUT«5===SORRY!5=== Error while compiling /tmp/lrgcj1ygNM␤EVAL is a very dangerous function!!! (use MONKEY-SEE-NO-EVAL to override,␤but only if you're VERY sure your data contains no injection attacks)␤at /tmp/lrgcj1ygNM:1␤------> 3EVAL 427⏏5<E…»
23:32 TimToady m: EVAL "say 42"
23:32 camelia rakudo-moar af5b39: OUTPUT«42␤»
23:32 TimToady literal string is now okay
23:32 lizmat m: EVAL "42"
23:32 camelia rakudo-moar af5b39: ( no output )
23:32 TimToady m: EVAL "say 42", :lang<Perl5>
23:32 camelia rakudo-moar af5b39: OUTPUT«Could not find Inline::Perl5 in:␤    /home/camelia/.perl6/2015.11-701-gaf5b39a␤    /home/camelia/rakudo-m-inst-1/share/perl6/site␤    /home/camelia/rakudo-m-inst-1/share/perl6/vendor␤    /home/camelia/rakudo-m-inst-1/share/perl6␤    CompUnit::Rep…»
23:32 lizmat I guess an int coerced to a Str isn't
23:32 lizmat well, that's strange anyway  :-)
23:32 TimToady no, but why would you do that unless you were testing?
23:32 stmuk m: constant Test=1; EVAL "42"
23:32 camelia rakudo-moar af5b39: ( no output )
23:32 TimToady so it's a convenient proxy for a dangerous expression
23:33 TimToady m: constant Test = 1; EVAL 42
23:33 camelia rakudo-moar af5b39: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ror6olrzqS␤EVAL is a very dangerous function!!! (use MONKEY-SEE-NO-EVAL to override,␤but only if you're VERY sure your data contains no injection attacks)␤at /tmp/ror6olrzqS:1␤------> 3constant Test = …»
23:33 TimToady that's what you were looking for, I think
23:33 stmuk TimToady++
23:33 TimToady m: sub MONKEY-SEE-NO-EVAL() { 1 }; EVAL 42
23:33 camelia rakudo-moar af5b39: ( no output )
23:34 TimToady m: sub MONKEY-SEE-NO-EVAL() { 0 }; EVAL 42
23:34 camelia rakudo-moar af5b39: OUTPUT«5===SORRY!5=== Error while compiling /tmp/JlN9XIwLvM␤EVAL is a very dangerous function!!! (use MONKEY-SEE-NO-EVAL to override,␤but only if you're VERY sure your data contains no injection attacks)␤at /tmp/JlN9XIwLvM:1␤------> 3sub MONKEY-SEE-N…»
23:34 TimToady that's what it's using now
23:34 TimToady but the pragma still overrides regardless
23:35 TimToady m: no MONKEY-SEE-NO-EVAL; sub MONKEY-SEE-NO-EVAL() { 1 }; EVAL 42
23:35 camelia rakudo-moar af5b39: OUTPUT«5===SORRY!5=== Error while compiling /tmp/BhC7ofXF0p␤EVAL is a very dangerous function!!! (use MONKEY-SEE-NO-EVAL to override,␤but only if you're VERY sure your data contains no injection attacks)␤at /tmp/BhC7ofXF0p:1␤------> 3 sub MONKEY-SEE-…»
23:35 TimToady the stub routine only sets the default if no pragma is in evidence
23:36 TimToady so Test can set a general default but individual scopes can still choose their own settings
23:37 TimToady m: use MONKEY; BEGIN say %*PRAGMAS.keys
23:37 camelia rakudo-moar af5b39: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7CUfUPRIqu␤An exception occurred while evaluating a BEGIN␤at /tmp/7CUfUPRIqu:1␤Exception details:␤  5===SORRY!5=== Error while compiling ␤  Cannot find method 'keys': no method cache and no .^find…»
23:37 TimToady m: use MONKEY; BEGIN say %*PRAGMAS
23:37 camelia rakudo-moar af5b39: OUTPUT«MONKEY-BRAINS => 1, MONKEY-BUSINESS => 1, MONKEY-GUTS => 1, MONKEY-SEE-NO-EVAL => 1, MONKEY-SHINE => 1, MONKEY-TRAP => 1, MONKEY-TYPING => 1␤»
23:38 AlexDaniel m: /a/
23:38 camelia rakudo-moar af5b39: ( no output )
23:38 TimToady (it's a BOOTHash, is what's going on there with .keys)
23:38 raiph joined #perl6
23:38 TimToady m: use MONKEY; BEGIN say %*PRAGMAS; no MONKEY; say %*PRAGMAS
23:38 camelia rakudo-moar af5b39: OUTPUT«MONKEY-BRAINS => 1, MONKEY-BUSINESS => 1, MONKEY-GUTS => 1, MONKEY-SEE-NO-EVAL => 1, MONKEY-SHINE => 1, MONKEY-TRAP => 1, MONKEY-TYPING => 1␤Dynamic variable %*PRAGMAS not found␤  in block <unit> at /tmp/yYXpbkPa3I:1␤␤Actually thrown at:␤  in blo…»
23:39 TimToady m: use MONKEY; BEGIN say %*PRAGMAS; no MONKEY; BEGIN say %*PRAGMAS
23:39 camelia rakudo-moar af5b39: OUTPUT«MONKEY-BRAINS => 1, MONKEY-BUSINESS => 1, MONKEY-GUTS => 1, MONKEY-SEE-NO-EVAL => 1, MONKEY-SHINE => 1, MONKEY-TRAP => 1, MONKEY-TYPING => 1␤MONKEY-BRAINS => 0, MONKEY-BUSINESS => 0, MONKEY-GUTS => 0, MONKEY-SEE-NO-EVAL => 0, MONKEY-SHINE => 0, MONKEY-TR…»
23:39 awwaiid I love this naming scheme
23:40 diakopter speaking of monoculture
23:40 Begi joined #perl6
23:40 raiph p6doc has: Routines: All Sub Method Term Operator ........ so would it make sense to add Rule (for rules, tokens and regexes like <ident>)
23:40 geekosaur (and I'm going to wonder which rule is being relaxed when a bot in another channel starts its comment with "Monkey balls!"
23:40 geekosaur )
23:41 TimToady I wonder if we should put in warnings if users try to access implementation details that may change, such as %*LANG, or %*PRAGMAS
23:41 TimToady or $*ACTIONS, for that matter
23:42 lizmat TimToady: are they tested in roast ?
23:42 TimToady that won't stop people from presuming
23:43 gfldex I'M WARNED BY CAPITALS
23:45 TimToady there are tests for %?LANG, presumably non-working
23:45 TimToady m: say %?LANG
23:45 camelia rakudo-moar af5b39: OUTPUT«5===SORRY!5=== Error while compiling /tmp/VtWxNvlO86␤Variable '%?LANG' is not declared␤at /tmp/VtWxNvlO86:1␤------> 3say 7⏏5%?LANG␤»
23:45 jdv79 is there any possibility that pod6 could be rendered without requiring runtime deps of the surrounding code?
23:46 TimToady we could perhaps have an annotation that the pod itself has no dependencies, but an import could change the parsing somewhat, expecially if you said 'use COBOL' or some such
23:47 TEttinger joined #perl6
23:47 flussence it's semi-trivial to sed out the bits that aren't pod, but then you lose #| and #= annotations...
23:47 TimToady in general pod is designed to be able to strip it out on a line-by-line basis
23:47 jdv79 its kind of a heavy burden to have to install everything just to output docs
23:47 jdv79 that's why i ask
23:47 TimToady it's a reasonable question
23:48 TimToady I think 95% of docs would have no trouble ignoring the deps
23:48 jdv79 cool
23:48 TimToady unless it's 97.329%
23:48 jdv79 "most" is fine with me
23:49 TimToady in fact, we should probably assume that's the default, and specially mark any pod that does require the deps
23:51 * TimToady assumes he should take a nap
23:51 TimToady zzz &
23:51 awwaiid I like
23:55 jdv79 TimToady: that seems nicer, yes...

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

Perl 6 | Reference Documentation | Rakudo