»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! Set by masak on 28 November 2015. |
|||
masak | m: say so "foo" ~~ /f(oo)/; say ~$0 | 00:00 | |
camelia | rakudo-moar 091ee7: OUTPUT«Trueoo» | ||
masak | m: constant $R = /f(oo)/; say so "foo" ~~ $R; say ~$0 | ||
camelia | rakudo-moar 091ee7: OUTPUT«TrueUse of Nil in string context in block <unit> at /tmp/ogMqZLMmG5:1» | ||
masak | the last line not working is a regression (that I just discovered in a test in a branch in 007) | ||
is that intentional? feels to me that oughta work just fine. | |||
00:01
firstdayonthejob left
|
|||
lucasb | m: my \rx = /f(oo)/; say so "foo" ~~ rx; say ~$0 | 00:04 | |
camelia | rakudo-moar 091ee7: OUTPUT«TrueUse of Nil in string context in block <unit> at /tmp/8s4GUxwB3u:1» | ||
lucasb | star: my \rx = /f(oo)/; say so "foo" ~~ rx; say ~$0 | ||
camelia | star-m 2015.09: OUTPUT«Trueoo» | ||
lucasb | (just showing...) | ||
masak++ # finding regressions | |||
Begi | By the way, I've a little question : | 00:05 | |
m: my @list = <a b c d e>; say @list.roll; say @list.roll(1); #Why is it different ? | |||
camelia | rakudo-moar 091ee7: OUTPUT«d(c)» | ||
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 | ||
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). | ||
Begi: basically, the rule is, if you supply a number (including 1), you get a list. | |||
Begi: this is deemed consistent when people write something like .roll($n) and then do list indexing | |||
Begi | Oh ok, I understand | 00:07 | |
vendethiel | ..even if , in Perl6's case, it wouldn't change much ;-) | ||
Begi | Thanks | ||
masak | vendethiel: ...right | ||
vendethiel | .roll(1) could return a single elem and you would barely notice... | ||
masak | vendethiel: there is one place where you do notice | 00:08 | |
vendethiel: numerical comparison :( | |||
vendethiel | well, several. Also ~~ Positional etc | ||
masak | which people did a lot with the results of .roll | ||
masak submits rakudobug on the `~~ $R` thing | |||
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 | ||
once again something I'd fixed locally in my test script, but forgot to update later in the article | |||
masak | 'night (again), #perl6 | 00:11 | |
awwaiid | gnight again masak! | 00:15 | |
00:15
vike left
|
|||
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:16 | |
this would be "consitent" (for some definition of) with .pick and .roll :D | 00:17 | ||
pochi | it has my vote | 00:20 | |
00:27
lucasb left
00:29
Begi left
00:34
rindolf left
00:35
AndyDee left
|
|||
lucs | m: say "meep?" | 00:37 | |
camelia | rakudo-moar 091ee7: OUTPUT«meep?» | ||
00:45
_nadim left
|
|||
awwaiid | m: say 42 | 00:45 | |
camelia | rakudo-moar 091ee7: OUTPUT«42» | ||
AlexDaniel | m: say ∞-∞-∞-∞-∞-∞ | 00:51 | |
camelia | rakudo-moar 091ee7: OUTPUT«NaN» | ||
00:51
vendethiel left
|
|||
AlexDaniel | I wish there were no white thngies around camelia here: perl6advent.files.wordpress.com/20...&h=490 | 00:52 | |
but otherwise this image is just awesome | |||
00:55
rurban_ left,
skarn joined
|
|||
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:03 | |
psch | hah | 01:04 | |
that graph is terribly cute | |||
also, hi #perl6 | |||
.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
|
|||
psch | fwiw, the latest blog post touches on my absence (which i'm not sure is over yet) | 01:07 | |
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:08 | ||
01:09
sjn_phone left
|
|||
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 | |
(the recommendation-case is a throwback to the previous time this happened to me :P ) | |||
...i do recognize the irony in me feeling a need to mention i am taking a break >_> | 01:11 | ||
01:11
zengargo1le left
01:13
zengargoyle joined
01:18
jack_rabbit joined
|
|||
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:19 | |
TimToady | you're probably clobbering $/ somehow there | 01:21 | |
the first ~~ sets $/ to Nil if it doesn't match, and the second one uses the Nil to look up $0 | 01:22 | ||
but that assumes the first one didn't match | 01:23 | ||
lucs | Hmm... Yet, it turns out that the first one does actually match. | ||
TimToady | maybe something about the micro-scoping of ~~ as a topicalizer? | 01:24 | |
lucs | I'll try to golf it down. | 01:25 | |
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:26 | |
dalek | c: 90a9437 | (Zoffix Znet)++ | htmlify.p6: Replace unspace Seems there's an issue with some of unspace-less constructs still. Should fix breakage mentioned here: github.com/perl6/doc/pull/251#issu...-166050291 |
01:33 | |
psch | m: role R { method f { ... } }; class C does R { }; | 01:41 | |
camelia | rakudo-moar 091ee7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/O2Z0PyiGuSMethod 'f' must be implemented by C because it is required by a roleat /tmp/O2Z0PyiGuS:1» | ||
psch | lichtkind: that ^^^ is the method case | ||
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 | |||
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 | ||
thanks | |||
psch | m: role R { has $!attr }; class C does R { has $!attr }; | ||
camelia | rakudo-moar 091ee7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/DDKOT9YPFaAttribute '$!attr' already exists in the class 'C', but a role also wishes to compose itat /tmp/DDKOT9YPFa:1» | ||
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 { }; | ||
camelia | ( no output ) | ||
lichtkind | m: role R { has $f; }; class C does R { }; | ||
camelia | ( no output ) | ||
lichtkind | m: role R { has $!f; }; class C does R { }; | 01:44 | |
camelia | ( no output ) | ||
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 | ||
m: role R { has $.f; }; class C does R { }; my C $a .= new; $a.f = "foo"; say $a.f | |||
camelia | rakudo-moar 091ee7: OUTPUT«Cannot modify an immutable Any in block <unit> at /tmp/7ulmHDn3Ky:1» | ||
01:44
vike left
|
|||
psch | right, not rw | 01:44 | |
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» | ||
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 | |
i guess i'll rerun them without the changes... | |||
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 | ||
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 | ||
psch | (sorry for that dumb analogy...) | ||
lichtkind: what's the use-case? | |||
lichtkind | i see one but its nothing i ever used and im too sleepy not to sit | 01:51 | |
good night | |||
psch | g'night lichtkind | ||
lichtkind | :) | 01:53 | |
01:54
lichtkind left
01:58
vike joined
01:59
BenGoldberg joined
|
|||
TimToady | skids: I'm trying to understand why SlurpySentry is so fancy? Couldn't .from-slurpy just translate directly? | 02:01 | |
lucs | m: say so("a" ~~ / (.) <?{ $0 ~~ /'a'/ && say("\$0 is now ", $0.WHAT) }> /) | 02:03 | |
camelia | rakudo-moar 091ee7: OUTPUT«$0 is now NilTrue» | ||
skids | TimToady: let me review that patch, there was a reason at the time, maybe not now. | 02:04 | |
lucs | TimToady: So would that ^^ be a bug or a don't-do-that? | 02:05 | |
psch wonders where that funny c is on the keyboard... | 02:06 | ||
lucs | (FWIW, I won't do it anymore, but, just saying :-) ) | ||
psch | m: say so("a" ~~ / (.) <?{ $0 ~~ /'a'/ && say("\$/ is now ", $0.WHAT) }> /) | ||
camelia | rakudo-moar 091ee7: OUTPUT«$/ is now NilTrue» | ||
psch | huh | ||
that seems wrong to me, at least | |||
well, no | |||
accessing $/ there is a "works sometimes" workaround for accessing the CURSOR special name | 02:07 | ||
m: say so("a" ~~ / (.) <?{ $0 ~~ /'a'/ && say("\$¢ is now ", $0.WHAT) }> /) | |||
camelia | rakudo-moar 091ee7: OUTPUT«$¢ is now NilTrue» | ||
psch | m: say so("a" ~~ / (.) <?{ $0 ~~ /'a'/ && say("\$¢ is now ", $¢.WHAT) }> /) | ||
camelia | rakudo-moar 091ee7: OUTPUT«$¢ is now NilTrue» | ||
lucs | My current workaround is just to assignt the $0 to a var and work with that var instead. | ||
psch | m: say so("a" ~~ / (.) <?{ $0 ~~ /'a'/ && say("\$/ is now ", $/.WHAT) }> /) | 02:08 | |
camelia | rakudo-moar 091ee7: OUTPUT«$/ is now (Match)True» | ||
psch | ah, there we go | ||
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. | ||
psch | i mucked up :) | ||
m: say so("a" ~~ / (.) <?{ $0 ~~ /'a'/ && say("\$/[0] is now ", $/[0].WHAT) }> /) | |||
camelia | rakudo-moar 091ee7: OUTPUT«$/[0] is now NilTrue» | ||
psch | lucs: the hunch is that the switch from Perl6::Grammar to NQP::P6Regex messes something up with accessing the different interpretations of $/ | ||
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 :) | ||
psch | that might easily be wrong though, but the fact that $/ is Match seems to hint at it... | ||
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:10 | ||
'cause even if $/ isn't supposed to work there (which ISTR it isn't), at least $¢ should | 02:11 | ||
02:11
asdfgh joined
|
|||
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 | ||
all of this is complicated by re-matching inside a regex of course | 02:12 | ||
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
kid51 left
|
|||
dalek | osystem: 6f997e2 | thundergnat++ | META.list: Add Lingua::EN::Numbers::Cardinal to ecosystem See: github.com/thundergnat/Lingua-EN-N...s-Cardinal |
02:14 | |
psch | hmm | 02:15 | |
m: say so("a" ~~ / (.) <{ $0 ~~ /'a'/ && say("\$0 is now ", $0.WHAT) }> /) | 02:16 | ||
camelia | rakudo-moar 091ee7: OUTPUT«$0 is now NilFalse» | ||
psch | m: say so("a" ~~ / (.) { $0 ~~ /'a'/ && say("\$0 is now ", $0.WHAT) } /) | ||
camelia | rakudo-moar 091ee7: OUTPUT«$0 is now NilTrue» | ||
psch | m: say so("a" ~~ / (.) { $0 ~~ /'a'/ && say("\$/ is now ", $/.WHAT) } /) | ||
camelia | rakudo-moar 091ee7: OUTPUT«$/ is now (Match)True» | ||
uruwi | Why is assigning to .substr-rw slow for some reason? | 02:17 | |
m: my $b = "abacadabra"; $b.substr-rw(1, 4) = "lulz"; say now - INIT now; | 02:18 | ||
camelia | rakudo-moar 091ee7: OUTPUT«0.0029565» | ||
geekosaur | it returns a Proxy | ||
which means it can't take the fast path but has to run the Proxy's STORE method, IIRC | |||
02:18
TEttinger joined
|
|||
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» | ||
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; | ||
camelia | rakudo-moar 091ee7: OUTPUT«0.1587779» | ||
uruwi | m: my $b = "abacadabra"; for ^10000 {$b = $b.substr(0, 1) ~ "lulz" ~ $b.substr(5)}; say now - INIT now; | ||
camelia | rakudo-moar 091ee7: OUTPUT«0.0983858» | ||
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; | ||
camelia | rakudo-moar 091ee7: OUTPUT«alulzdabra» | ||
uruwi | How much memory does a Proxy even consume... | ||
I can't even build a set of 1800 strings with .substr-rw without exhausting most of my memory | 02:21 | ||
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 | |
(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
02:25
Ben_Goldberg left,
FROGGS_ joined
|
|||
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:26 | |
02:26
BenGoldberg left
02:27
Ben_Goldberg joined,
Sqirrel left
|
|||
psch | rt.perl.org/Ticket/Display.html?id=126971 | 02:28 | |
lucs: ^^^ feels free to expand, if you noticed something i missed | |||
02:28
asdfgh left
02:29
FROGGS left
02:33
ghost_ left
|
|||
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 | ||
lucs: no, $ ~ "\c[funny c]" is the shorthand for the current and unfinished cursor | 02:36 | ||
lucs | Ah, I see. | ||
"funny c" :) (funny money?) | |||
psch never got used to cents | |||
in my mind it's mostly still pfennige :) | |||
geekosaur | it makes no cents... | ||
TimToady | if you have a compose key, it's probably just compose-c-/ | ||
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). | ||
Hotkeys | ^^^ best thing since sliced bread | 02:39 | |
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:41 | |
spectest seems equivalent between with and without that | 02:42 | ||
(which probably means lack of tests...) | |||
TimToady | I think I'm okay with argless doing that | 02:43 | |
after all, I was the one who decided to do pick/roll that way, iirc | |||
psch | alright, i'll cargo cult from there for the exact impl, thanks | 02:44 | |
Juerd | What do 'wanted' and 'unwanted' mean? | ||
02:45
ilbot3 left
|
|||
TimToady | something wants the value, so it's not in sink context | 02:46 | |
m: 42 | |||
camelia | rakudo-moar 091ee7: OUTPUT«WARNINGS for /tmp/DvcjEXHsOl:Useless use of constant integer 42 in sink context (line 1)» | ||
TimToady | m: $x = 42 | ||
camelia | rakudo-moar 091ee7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/cgQbhY0LFiVariable '$x' is not declaredat /tmp/cgQbhY0LFi:1------> 3<BOL>7⏏5$x = 42» | ||
TimToady | m: my $x = 42 | ||
camelia | ( no output ) | ||
TimToady | here the assignment wants the 42, so it doesn't complain | ||
02:47
yqt left
02:48
uruwi left,
ilbot3 joined
|
|||
Juerd | TimToady: Thanks | 02:48 | |
02:54
Sqirrel joined
02:55
uruwi joined
|
|||
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» | ||
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» | ||
psch | those .06 seconds are 26 Pairs instead of one Pair | ||
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. | ||
Ben_Goldberg | m: my $start = now; say "Az I orvat fybj be fbzrguvat?".trans: "a".."z" => ["a".."z"].rotate(13); say now $start; | ||
camelia | rakudo-moar 091ee7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Lz2D1TxXWXTwo terms in a rowat /tmp/Lz2D1TxXWX:1------> 3".."z" => ["a".."z"].rotate(13); say now7⏏5 $start; expecting any of: infix infix stopper postfix …» | ||
psch | but yes, .trans, in general, is slow | ||
Ben_Goldberg | m: my $start = now; say "Az I orvat fybj be fbzrguvat?".trans: "a".."z" => ["a".."z"].rotate(13); say now - $start; | ||
camelia | rakudo-moar 091ee7: OUTPUT«Am I being slow or something?0.1899672» | ||
Ben_Goldberg | In perl5, the =~ tr/// operator is very fast. | 02:58 | |
geekosaur | it's also simpler and stupider | 03:00 | |
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 contextbokeper» | ||
psch | hm | ||
those sink warnings are LTA | |||
although i recognize they might be hard to distinguish from legit sink warnings | 03:02 | ||
m: $_ = "foo"; s/o/u/; .say | |||
camelia | rakudo-moar 091ee7: OUTPUT«fuo» | ||
psch | ah, maybe not | ||
geekosaur | looks like those came from the doubled letters that vanished in the output, maybe? | ||
psch | i guess tr/// should get the s/// treatment there | ||
03:02
xpen joined
|
|||
psch | geekosaur: no, they came from the tr/// statement in sink contest | 03:02 | |
geekosaur: although that doesn't explain *two* of them... | 03:03 | ||
s/statement/expression as a statement/ | |||
geekosaur | yes, it was the "two of them" that made me think something trickier was going on | ||
psch | anyway, case in point was: "give me squash behavior in perl5 tr/// and something something archimedes" | ||
geekosaur | oh, squash, right | 03:04 | |
psch | yeah, adverb shorthands are a bit unfortunate for tr/// | ||
but i personally hope tr/// can get deprecated eventually | |||
as in, maybe around 6.3 or something | |||
'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 | ||
camelia | rakudo-moar 091ee7: OUTPUT«Az I orvat fybj be fbzrguvat?0.0086742» | ||
Juerd | Roll your own :) | ||
psch | hrm | 03:06 | |
Juerd++ for that pointer | |||
i mean, on the one obviously simple things in CORE are more optimized | 03:07 | ||
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 | |||
mostly from a code-as-documentation perspective | |||
...maybe that's wrong | |||
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 | ||
...i'm not sure i'm fit for thinking (or talking) about this kind of thing :P | |||
Juerd | Any opinion is useful in some way. | 03:10 | |
s/Any/Every/ | |||
I wish there was a "foo".Regex, or some other easy way to turn a string into a regex | 03:14 | ||
psch | m: my $str = "foo"; my $rx = rx/<$str>/; say "foo" ~~ $rx | 03:15 | |
camelia | rakudo-moar 091ee7: OUTPUT«True» | ||
Juerd | Simply interpolating a string as a regex is annoying because in the stringification of the regex the actual regex is gone. | ||
m: my $str = "foo"; my $rx = rx/<$str>/; say $rx; | |||
psch | ah | ||
camelia | rakudo-moar 091ee7: OUTPUT«rx/<$str>/» | ||
Juerd | Especially for Test::like it drives me insane | 03:16 | |
uruwi | m: my $str = "foo"; my $rx = /$str/; say $rx; | ||
camelia | rakudo-moar 091ee7: OUTPUT«/$str/» | ||
psch | m: my $str = "foo"; my $rx = rx/{ "$str" }/; say $rx # my next thought, but... | ||
camelia | rakudo-moar 091ee7: OUTPUT«rx/{ "$str" }/» | ||
psch | the stringification doesn't carry outward from the xFA that's being build | ||
which might have something to do with turing machines and their abilities | |||
not sure, my theoretical foundation is limited | |||
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 | ||
geekosaur | I have done that but not very often, and even when I do it it feels like I'm doing something "backwards" | ||
Juerd | I don't know, especially when the regex is generated, being able to see it gets important :) | 03:18 | |
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 :) | |||
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. | ||
psch | i mean, one hang up is with a regex that uses CALLER:: or CALLERS:: | ||
'cause those aren't the same from Regex.gist and wherever the Regex is used | 03:20 | ||
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 | ||
similarly for .perl as for .gist, 'cause the impl is identical | |||
although the former carries the "has to EVAL to the same" burden, which might add or remove torture on the implementor | |||
Juerd | In the specific case I was trying now, it's silly though | 03:22 | |
Because I was falling back to a perl5ish .join('|') | |||
ShimmerFairy | I have a feeling some of this might be solved with a really nice, gdb-like P6 debugger :) | 03:24 | |
03:24
noganex_ joined
03:28
noganex left
|
|||
Juerd | ShimmerFairy: I've never liked debuggers and repls | 03:28 | |
I'm more a print-debugger, and I like oneliners. | |||
uruwi | ^ | 03:30 | |
psch | m: my $a; { my $b = "foo"; $a = rx/<$b>/; }; my $c = EVAL $a.perl; say "foo" ~~ $c | ||
camelia | rakudo-moar 091ee7: OUTPUT«5===SORRY!5=== Error while compiling /home/camelia/EVAL_0Variable '$b' is not declaredat /home/camelia/EVAL_0:1------> 3rx/<7⏏5$b>/» | ||
psch | ^^^ hints at the problem | ||
03:30
pyrimidine joined
|
|||
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 | ||
...or if we'd want that | |||
Juerd | psch: I'm not sure it should | ||
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
|
|||
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 | ||
Juerd | Yes, it's a closure. | 03:33 | |
03:33
lockdown left
|
|||
psch | i won't dig nor complain if it's solved with "i might have XY'd myself there", in any case :) | 03:33 | |
Juerd | :) | 03:34 | |
m: my @matches = <oo a>; "foo bar baz".comb(/@matches | o/).say | 03:35 | ||
camelia | rakudo-moar 091ee7: OUTPUT«(o o a a)» | ||
Juerd | I don't understand why it matches o and o instead of oo. | ||
m: my @matches = <oo a>; "foo bar baz".comb(/oo | a | o/).say | |||
camelia | rakudo-moar 091ee7: OUTPUT«(oo a a)» | ||
Juerd | That's what I thought it would do. | ||
psch | that might be related to rt.perl.org/Ticket/Display.html?id=126713 | 03:36 | |
as in, array interpolation doesn't quite match | semantics | |||
...in a regex, that is | |||
Juerd | It might but I find the code in that ticket hard to read :) | 03:37 | |
03:37
uruwi left
|
|||
psch | vOv | 03:38 | |
i try to code well :P | |||
ehh, legible, maybe | |||
Juerd | 「」 makes the readability much worse, and that's not the code's fault | ||
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
TEttinger left
|
|||
Juerd | Yes, but I'm trying to figure out why that was needed for the bug to trigger | 03:39 | |
And if it wasn't, then it's not golfed enough yet :) | 03:40 | ||
psch | m: say "abcd" ~~ /(@a)*/ | ||
camelia | rakudo-moar 091ee7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/LWDfHEtOOWVariable '@a' is not declaredat /tmp/LWDfHEtOOW:1------> 3say "abcd" ~~ /(7⏏5@a)*/» | ||
psch | grml | ||
m: my @a = < a b bc cd >; say "abcd" ~~ /(@a)*/ | |||
camelia | rakudo-moar 091ee7: OUTPUT«「abc」 0 => 「a」 0 => 「bc」» | ||
psch | right, the report could've been more golfed i guess | ||
03:41
davercc joined
|
|||
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 | ||
yes, that's definitely true | |||
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. | ||
psch adds that to the ticket | 03:42 | ||
Juerd | Then again, it's almost 5am here and I should probably just go to bed. | ||
But yes, I do think that this RT ticket and what I encountered with .comb are the same thing. | |||
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 | ||
psch | timotimo: is that about the ticket i opened for lucs? | 03:43 | |
timotimo | no clue | ||
i'm about to head for bed and i just saw that one single line | |||
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" | ||
timotimo | 041248 psch │ the stringification doesn't carry outward from the xFA that's being build | ||
041258 psch │ which might have something to do with turing machines and their abilities | |||
maybe i misunderstood | 03:44 | ||
psch | nah, it fits my limited understanding | ||
ShimmerFairy | m: say /^ a+ bc? $/ | ||
camelia | rakudo-moar 091ee7: OUTPUT«/^ a+ bc? $/» | ||
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
|
|||
Juerd | Ho-ly, crap, bitcard is annoying. | 03:46 | |
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 | ||
Screw this, I'm too annoyed to even consider continuing right now. | |||
I will simply not reply to existing tickets then | |||
ShimmerFairy | (as I've said before, rakudo should really be using its own bugtracker) | 03:48 | |
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
|
|||
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 | |
There only are 10 Juerds worldwide, anyway | |||
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. | ||
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 | |
s/arcane\.// | |||
timotimo goes to bed | |||
uruwi | Sigh, I'll have to write my AoC19 part 2 solution in Python then. | ||
Juerd | ShimmerFairy: I love RT but this bitcard link seems out of place | 03:53 | |
I'm off to bed as well | |||
03:53
raiph joined
|
|||
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. | ||
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:54 | ||
03:58
rurban left
03:59
Ben_Goldberg left
|
|||
psch | oh, yes, that's definitely weird | 03:59 | |
fwiw, on my end bitcard seems to have a longer session than RT itself, which is even stranger | |||
as in, i can click "log out as anon" and "log in with bitcard" afterwards, without having to reauth with bitcard | 04:00 | ||
it's not terribly inconvenient, but it *is* weird | |||
04:00
BenGoldberg joined
|
|||
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:01 | |
04:02
BenGoldberg left
04:03
TEttinger joined
04:04
BenGoldberg joined,
TG__ joined
04:05
TG__ left,
kaare_ joined
|
|||
AlexDaniel | m: ∞ | 04:08 | |
camelia | ( no output ) | ||
AlexDaniel | m: 42 | ||
camelia | rakudo-moar 091ee7: OUTPUT«WARNINGS for /tmp/oQgrWrXlf5:Useless use of constant integer 42 in sink context (line 1)» | ||
AlexDaniel | m: Inf | ||
camelia | ( no output ) | ||
AlexDaniel | m: NaN | 04:09 | |
camelia | ( no output ) | ||
AlexDaniel | m: 25.5 | ||
camelia | rakudo-moar 091ee7: OUTPUT«WARNINGS for /tmp/j6MuINCuvm:Useless use of constant value 25.5 in sink context (line 1)» | ||
AlexDaniel | m: “test” | ||
camelia | rakudo-moar 091ee7: OUTPUT«WARNINGS for /tmp/jM2e31sBqO:Useless use of constant string "test" in sink context (line 1)» | ||
04:09
grondilu left
|
|||
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)» | ||
AlexDaniel | TimToady: what's so special about ∞ and NaN? | ||
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)» | ||
AlexDaniel | what | ||
m: ^100 | |||
camelia | rakudo-moar 091ee7: OUTPUT«WARNINGS for /tmp/PK5FM8F89F:Useless use of "^" in expression "^100" in sink context (line 1)» | ||
AlexDaniel | m: 1...100 | ||
camelia | ( no output ) | ||
AlexDaniel | m: 1..100 | ||
camelia | rakudo-moar 091ee7: OUTPUT«WARNINGS for /tmp/oU_50TcbSb:Useless use of ".." in expression "1..100" in sink context (line 1)» | ||
AlexDaniel | m: «a b c d e f» | ||
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
|
|||
AlexDaniel | m: ⅑ | 04:12 | |
camelia | rakudo-moar 091ee7: OUTPUT«WARNINGS for /tmp/dQ1L91Lfsy:Useless use of constant value ⅑ in sink context (line 1)» | ||
psch | m: sub term:<foo> { "foo" }; foo | 04:14 | |
camelia | ( no output ) | ||
psch | probably similar, but likely not identical | 04:15 | |
as in, Inf (and the symbol) get caught on a term level | |||
as per src/Perl6/Grammar.pm:1673: " token term:sym<∞> { <sym> } " | 04:16 | ||
actually, Inf is different | |||
if it's not parsed by NQP::Grammar somewhere it should fall into numish | |||
m: 5; | 04:17 | ||
camelia | rakudo-moar 091ee7: OUTPUT«WARNINGS for /tmp/WZaKETOE9X:Useless use of constant integer 5 in sink context (line 1)» | ||
psch | ...and those *should* warn there :/ | ||
AlexDaniel | m: / a / | 04:18 | |
camelia | rakudo-moar 091ee7: OUTPUT«getlexrelcaller needs a context in block <unit> at /tmp/GscGOrP8Ca:1» | ||
AlexDaniel | getlexrecaller, yeah… | ||
psch | +l :) | 04:19 | |
04:27
pyrimidine left
04:33
baest_ is now known as baest
|
|||
AlexDaniel | m: .{} | 04:33 | |
camelia | ( no output ) | ||
AlexDaniel | m: .<>; .[] | 04:34 | |
camelia | ( no output ) | ||
AlexDaniel | m: .[].<>.{}.«» | ||
camelia | ( no output ) | ||
AlexDaniel | m: :D # noo | 04:35 | |
camelia | rakudo-moar 091ee7: OUTPUT«WARNINGS for /tmp/CtVVkmXGSB:Useless use of ":D" in sink context (line 1)» | ||
AlexDaniel | m: say :D | ||
camelia | rakudo-moar 091ee7: OUTPUT«Unexpected named parameter 'D' passed in block <unit> at /tmp/Bl9bgCVjmI:1» | ||
AlexDaniel | smiley program does not work anymore :( | 04:36 | |
uruwi | Wow, apparently python3 is 10k times faster than perl6. | 04:40 | |
04:40
cognominal joined
|
|||
AlexDaniel | uruwi: doing what? | 04:41 | |
uruwi | Building sets from the results of performing a list of substitutions on a given string | ||
The Perl 6 version struggled with an initial set of 61 strings | 04:42 | ||
Python 3 can do 30k in only 5 - 6 s | |||
AlexDaniel | uruwi: is that on 32-bit or 64-bit system? | 04:43 | |
uruwi | 64-bit. | ||
04:44
vendethiel joined
04:45
xpen left
|
|||
AlexDaniel | uruwi: that's not very good. Perhaps you can submit your test case to github.com/japhb/perl6-bench ? | 04:45 | |
psch | uruwi: can you show the codes? | 04:46 | |
-s | 04:47 | ||
05:06
vendethiel left
|
|||
psch | hm | 05:08 | |
S17-supply/throttle.t lock without my < .tail and .head > patch occasionally and with it even more | 05:09 | ||
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 | |||
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 | ||
g'night, #perl6. | |||
awwaiid | go camelia | 05:16 | |
05:16
AndyDee joined
|
|||
awwaiid | m: say "hello\nbrave\nworld" | 05:23 | |
camelia | rakudo-moar 091ee7: OUTPUT«hellobraveworld» | ||
awwaiid | sweet. my irssi plugin that actually puts that on separate lines works | ||
AlexDaniel | m: say ‘hi’ for ^1000 | 05:26 | |
camelia | rakudo-moar 091ee7: OUTPUT«hihihihihihihihihihihihihihihihihihihihihihihihihihihihihihihihihihihihihihihihihihihihihihihihihihihih…» | ||
awwaiid | Thanks for the test AlexDaniel! | 05:31 | |
worked "great" | 05:32 | ||
AlexDaniel | :) | ||
05:34
BenGoldberg left
05:37
vike left
05:39
skids left
05:44
vike joined,
xpen joined
05:52
khw left
05:55
ellybelly left
|
|||
dalek | c: 3469f52 | (Brock Wilcox)++ | htmlify.p6: Maybe less space? |
06:03 | |
06:06
inokenty joined
|
|||
TEttinger | m: say ‘\n’ for ^10 | 06:16 | |
camelia | rakudo-moar 091ee7: OUTPUT«\n\n\n\n\n\n\n\n\n\n» | ||
TEttinger | hm? | ||
awwaiid | haha | ||
TEttinger | m: say "\r\n" for ^10 | 06:17 | |
camelia | rakudo-moar 091ee7: OUTPUT« | ||
TEttinger | m: say "" for ^10 | ||
camelia | rakudo-moar 091ee7: OUTPUT«» | ||
TEttinger | did my message show up on two lines, awwaiid? | ||
I'm...curious, awwaiid | 06:18 | ||
awwaiid | nope! 10 lines -- my script can't distinguish  from ... er...  | ||
TEttinger | haha | ||
there's 20  there | |||
awwaiid | er, 20 lines | ||
I miscounted | |||
TEttinger | ha ok | ||
cool | |||
this might be fun | 06:19 | ||
I used to have a loud guitar riff that played whenever someone said my name on IRC. dl.dropboxusercontent.com/u/119146...arsolo.wav | |||
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 | ||
TEttinger | cool | ||
what about the ascii vertical tab char? | |||
m: say "\c[VERTICAL TAB]" | 06:21 | ||
camelia | rakudo-moar 091ee7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FLh4dIpt42Unrecognized character name VERTICAL TABat /tmp/FLh4dIpt42:1------> 3say "\c[VERTICAL TAB7⏏5]"» | ||
awwaiid | that's a pretty long riff if you get mentioned often :) | ||
TEttinger | yep | ||
awwaiid | TEttinger: gist.github.com/awwaiid/a8ab39f89ba36c8325e7 | 06:23 | |
TEttinger | m: say "\u000b" | 06:24 | |
camelia | rakudo-moar 091ee7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/gyMhdh5W6RUnrecognized backslash sequence: '\u'at /tmp/gyMhdh5W6R:1------> 3say "\7⏏5u000b" expecting any of: argument list double quotes term» | ||
TEttinger | m: say "\000b" | ||
camelia | rakudo-moar 091ee7: OUTPUT«␀00b» | ||
awwaiid | what is ␀ | ||
TEttinger | backslash 0 | ||
I am not sure how to escape character 11 in unicode | 06:25 | ||
u: 11 | 06:27 | ||
AlexDaniel | .u 11 | 06:28 | |
yoleaux | U+FE0A VARIATION SELECTOR-11 [Mn] (◌︊) | ||
U+1D1A5 MUSICAL SYMBOL ORNAMENT STROKE-11 [So] (𝆥) | |||
U+1D20A GREEK VOCAL NOTATION SYMBOL-11 [So] (𝈊) | |||
TEttinger | m: say "\c[LINE TABULATION]" | 06:29 | |
camelia | rakudo-moar 091ee7: OUTPUT«» | ||
TEttinger | m: say "\c[LINE TABULATION]" for ^10 | ||
camelia | rakudo-moar 091ee7: OUTPUT«» | ||
TEttinger | that displays as 10 lines for me, and gets cut off actually | ||
06:30
adhoc left
06:31
juiko joined
06:40
pierre-vigier joined
|
|||
uruwi | m: say 1 «Z« (2, 3, 5, 7) | 06:44 | |
camelia | rakudo-moar 091ee7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ktzlM7fQtVMissing infix inside hyperat /tmp/ktzlM7fQtV:1------> 3say 1 «Z«7⏏5 (2, 3, 5, 7) expecting any of: infix infix stopper» | ||
uruwi | m: say 1 «Z+« (2, 3, 5, 7) | ||
camelia | rakudo-moar 091ee7: OUTPUT«((3) (4) (6) (8))» | ||
uruwi | m: say 1 «Z,« (2, 3, 5, 7) | ||
camelia | rakudo-moar 091ee7: OUTPUT«(((1 2)) ((1 3)) ((1 5)) ((1 7)))» | ||
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))» | ||
uruwi | m: say [X*] (1 «Z,« (2, 3, 5, 7)).map(*[0]) | ||
camelia | rakudo-moar 091ee7: OUTPUT«(1 7 5 35 3 21 15 105 2 14 10 70 6 42 30 210)» | ||
uruwi | m: say [X*] (1 «Z,« (2, 2)).map(*[0]) | 06:46 | |
camelia | rakudo-moar 091ee7: OUTPUT«(1 2 2 4)» | ||
uruwi | m: say Set.new(|([X*] (1 «Z,« (2, 2)).map(*[0]))) | ||
camelia | rakudo-moar 091ee7: OUTPUT«set(4, 1, 2)» | ||
uruwi | m: say Set.new(|([X*] (1 «Z,« (2, 2)).map(*[0]))).list | ||
camelia | rakudo-moar 091ee7: OUTPUT«(4 => True 1 => True 2 => True)» | ||
uruwi | m: say Set.new(|([X*] (1 «Z,« (2, 2)).map(*[0]))).keys | ||
camelia | rakudo-moar 091ee7: OUTPUT«(4 1 2)» | ||
uruwi | m: ([X*] (1 «Z,« (2, 2)).map(*[0])).unique | 06:50 | |
camelia | ( no output ) | ||
uruwi | m: say ([X*] (1 «Z,« (2, 2)).map(*[0])).unique | ||
camelia | rakudo-moar 091ee7: OUTPUT«(1 2 4)» | ||
uruwi | m: my @pfactors = (2, 2, 3); say ([X*] (1 «Z,« @pfactors).map(*[0])).unique | ||
camelia | rakudo-moar 091ee7: OUTPUT«(1 3 2 6 4 12)» | ||
07:03
_nadim joined
07:04
CIAvash joined
07:09
FROGGS_ left
07:16
juiko left
07:19
Sqirrel left
07:22
raiph left
07:39
cbk joined
07:40
mohae left
08:01
jack_rabbit left
08:06
psy_ left
08:07
cognominal left,
sammers left
|
|||
dalek | kudo/nom: 625d1c5 | TimToady++ | / (8 files): discourage casual use of EVAL It is now by default illegal in a normal program to use the EVAL function. This may be overridden in any of several ways: use MONKEY-SEE-NO-EVAL; use MONKEY; # shortcut that turns on all MONKEY pragmas use Test; setenv RAKUDO_MONKEY_BUSINESS=1 The MONKEY pragmas always take precedence, so regardless of use of Test or environment variables, a lexical scope may turn the capability on and off. So something like an IRC bot or REPL may default to allowing EVAL, but it's still controllable either way within the actual code. Several other MONKEY names have been reserved for similar safety, in addition to the original MONKEY-TYPING. 'use MONKEY-GUTS' is now a synonym for 'use nqp.' We might restrict things like .^set_value with 'use MONKEY-BRAINS'. Regular expressions record their monkey state at compile time and use that info to decide whether to allow interpolations later at run time. |
08:09 | |
ast: cb1a066 | TimToady++ | S (5 files): test under new EVAL and interpolation rules |
|||
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
|
|||
Woodi | TimToady: you put all that ideas there ! ;) | 08:11 | |
TimToady | I've been working on it all day; you wouldn't believe how many wrong ways there are to do it... :) | 08:12 | |
but I'm pretty happy with the result | 08:13 | ||
Woodi | :) | ||
TimToady | we'll have to decide how strict we want camelia and the repl to be | 08:14 | |
but I figure that's up to the community | |||
Woodi | TimToady: but what functional/Lisp programmers say now ? :) | 08:15 | |
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:19 | ||
08:20
sammers joined
|
|||
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:22 | |
TimToady | m: say EVAL 42 | 08:34 | |
camelia | rakudo-moar 625d1c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FjCoV5LpqQEVAL 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⏏…» | ||
TimToady | m: use MONKEY; say EVAL 42 | ||
camelia | rakudo-moar 625d1c: OUTPUT«42» | ||
08:37
pierre-vigier left
08:38
adhoc joined
|
|||
uruwi | But now how am I going to serialize/deserialize functions? | 08:44 | |
Woodi | uruwi: my $fptr; { MONKEY-ENABLE; $fptr = EVAL ... }; ? | 08:56 | |
Woodi things that data should be send for disributed computing... | 08:57 | ||
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/pxYfCrC6mcEVAL 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; …» | ||
uruwi | m: my $fptr = &f; { use MONKEY-ENABLE; $fptr = EVAL("{$_ + 1}");} say $fptr(3); | ||
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 …» | ||
uruwi | m: my $fptr = &f; { use MONKEY-SEE-NO-EVAL; $fptr = EVAL("{$_ + 1}");} say $fptr(3); | ||
camelia | rakudo-moar 625d1c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/JJUWWxYp7bStrange 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 …» | ||
uruwi | m: my $fptr = &f; { use MONKEY; $fptr = EVAL("{$_ + 1}");} say $fptr(3); | ||
camelia | rakudo-moar 625d1c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/j0LrcC7gGcStrange 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 …» | ||
uruwi | m: my $fptr = &f; { use MONKEY-SEE-NO-EVAL; $fptr = EVAL("{$_ + 1}");}; say $fptr(3); | 09:03 | |
camelia | rakudo-moar 625d1c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ql1QnTsuvZUndeclared routine: f used at line 1» | ||
09:03
AlexDaniel left
|
|||
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:1Cannot find method 'CALL-ME' in block <unit> at /tmp/7UYXJf08uO:1» | ||
uruwi | m: my $fptr; { use MONKEY-SEE-NO-EVAL; $fptr = EVAL("{$_}");}; say $fptr(3); | ||
camelia | rakudo-moar 625d1c: OUTPUT«Use of uninitialized value $_ of type Any in string contextAny of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in block at /tmp/nQ1z3EKLf8:1Cannot find method 'Any' in block <unit> at /tmp/nQ1z3EKLf8:1» | ||
TimToady | {} interpolates in "" | ||
uruwi | m: my $fptr; { use MONKEY-SEE-NO-EVAL; $fptr = EVAL('{$_ + 1}');}; say $fptr(3); | ||
camelia | rakudo-moar 625d1c: OUTPUT«Use of uninitialized value of type Any in numeric context in block at EVAL_0:1Cannot 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); | ||
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» | ||
uruwi | m: my $fptr; { use MONKEY-SEE-NO-EVAL; $fptr = EVAL('-> $a {$a + 1}');}; say $fptr(3); | ||
camelia | rakudo-moar 625d1c: OUTPUT«4» | ||
uruwi | In reality, I'd probably dynamically load classes for this. | 09:05 | |
[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 | |
main::run("/pro/3gl/CPAN/rakudobrew/moar-nom/install/bin/perl6 bootstrap.pl") called at /pro/3gl/CPAN/rakudobrew/bin/rakudobrew line 502 | |||
main::build_panda(undef) called at /pro/3gl/CPAN/rakudobrew/bin/rakudobrew line 120 | |||
09:14
firstdayonthejob joined
09:17
vividsnow joined
09:19
rurban joined
09:21
rurban_ joined
|
|||
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:21 | |
09:22
spider-mario joined
|
|||
ShimmerFairy | oh, that's what it was. I needed to include NQPHLL to use the QAST::Op (I think?). ~That's so obvious~ | 09:23 | |
09:25
pierre-vigier joined
|
|||
labster | TimToady: I think you broke panda | 09:33 | |
09:33
adhoc left
|
|||
labster | ==> Bootstrapping Panda | 09:34 | |
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 gen/moar/m-CORE.setting:19605 | |||
right. Might as well write the PR myself. | 09:38 | ||
09:41
confuseAcat left
|
|||
labster | and sent. | 09:45 | |
uruwi | I've decided to use a web frontend for said game. | ||
That way I can customize key input to a greater extent. | |||
10:03
gnustavo joined
10:04
gnustavo left
10:14
lolisa joined
10:15
labster left
|
|||
[Tux] added «use MONKEY-SEE-NO-EVAL;» to Panda/Bundler.pm, so I can continue | 10:22 | ||
10:22
RabidGravy joined
|
|||
[Tux] | Inline::Perl5 suffers the same | 10:23 | |
run_alt is still gone \o/ | 10:25 | ||
EOL fails still here :( | |||
10:27
adhoc joined
10:38
lolisa left
|
|||
masak | good antenoon, #perl6 | 10:42 | |
10:43
Begi joined
|
|||
[Tux] | test 50000 40.611 40.498 | 10:43 | |
test-t 50000 48.987 48.874 | |||
csv-parser 50000 215.049 214.936 | |||
10:45
rindolf joined
|
|||
_nadim | Good Morning all | 10:47 | |
Begi | ' morning nadim ! | 10:49 | |
10:50
CIAvash left
|
|||
Begi | m: my @array = <a b c d e>; my $y = @array.roll(2); my @x = @array.roll(2); | 10:51 | |
camelia | ( no output ) | ||
Begi | What's the best choice ? $ or @ ? | ||
10:52
xpen left
|
|||
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:52 | |
_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 | ||
_nadim | I did try that too. I'll try again | ||
nahh, placed it in the wrong place, work fine :) | 10:57 | ||
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 | ||
10:59
CIAvash joined
11:02
pierre-v_ joined
11:03
keix joined,
vividsnow left,
RabidGravy left,
vividsnow joined
11:05
pierre-vigier left
11:16
RabidGravy joined
11:19
weihan joined
11:23
maziar joined,
weihan left,
maziar left
11:24
weihan joined,
maziar joined
11:28
maziar left
|
|||
_nadim | Can only use 'temp' on a container. is it possible to 'temp' an attribute in some way? | 11:30 | |
RabidGravy | I'm not sure it makes sense conceptually really | 11:32 | |
_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:33 | |
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 | ||
11:34
espadrine joined,
hankache joined
|
|||
RabidGravy | you could probably make a trait that does it somehow | 11:34 | |
11:36
hankache left
11:37
hankache joined
11:38
hankache_ joined,
hankache_ left
|
|||
_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:38 | |
11:42
hankache left
11:45
ellybelly joined
|
|||
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:45 | |
11:46
espadrine left
|
|||
_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» | ||
RabidGravy | is rw on the attribute | 11:50 | |
11:51
firstdayonthejob left
|
|||
RabidGravy | anyone in the house with commit on panda | 11:52 | |
it's afflicted by "EVAL is a very dangerous function!!! (use MONKEY-SEE-NO-EVAL to override)" | |||
_nadim | RabidGravy: I copletely missed that attributes were read-only unless stated otherwise! except for arguments to subs of course | ||
11:53
CIAvash left,
xpen joined
|
|||
RabidGravy | it's only the public accessor that is readonly BTW, if you refer to it as $!l it is rw | 11:53 | |
11:55
vendethiel joined
11:57
kid51 joined,
xpen left
11:58
lucasb joined,
rurban left
12:03
rurban_ left
12:07
xinming left
|
|||
RabidGravy | oh dear, people are reporting "bugs" against modules when running against 2015.09 | 12:08 | |
is there a way of mandating a minimum version of Perl 6? | 12:09 | ||
ShimmerFairy | RabidGravy: for modules, there's design.perl6.org/S22.html#perl | 12:10 | |
vendethiel | not yet | ||
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) | ||
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
|
|||
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 | ||
ShimmerFairy | vendethiel: they're separate languages though, and especially considering P5 projects won't use META6.json files :) | ||
jnthn | ShimmerFairy: Then it's even less ambiguous :P | 12:14 | |
12:14
xinming joined,
zengargoylew left
|
|||
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 | |
12:16
zengargoylew joined
|
|||
jnthn | RabidGravy: I merged the panda PR by the way | 12:16 | |
RabidGravy | jnthn++ # nice one | 12:17 | |
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
|
|||
jnthn | .tell lizmat Thanks for hunting it down to that one. | 12:19 | |
yoleaux | jnthn: I'll pass your message to lizmat. | ||
12:20
sno left
|
|||
nige1 | Alex - removed furry white border from Camelia in lasted advent post | 12:20 | |
latest | |||
12:20
snarkyboojum left
|
|||
RabidGravy | getting some "useless use" warnings from panda if someone is in the code at some point | 12:32 | |
my fork appears to be b0rked at the moment | 12:33 | ||
grondilu | Camelia following with the flow: imgur.com/F8viJ9z | 12:35 | |
RabidGravy | :) | 12:41 | |
nige1 | haha - grondilu - that's cool | 12:43 | |
- should we put that in? | |||
ok - updated | 12:47 | ||
dalek | line-Perl5: ccbb048 | (Stefan Seifert)++ | lib/Inline/Perl5.pm6: Turn on new pragma to be able to use EVAL |
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. | ||
yoleaux | nine: I'll pass your message to TimToady. | ||
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. | ||
jdv79 | gist.github.com/anonymous/f293827d745cebcfa3b1 | ||
2 things - we really need to fix version. also, why does that take so long to load up? | |||
nine | jdv79: does it take so long on the second start, too? | 12:50 | |
jdv79 | yes. | ||
i think i'm at y'day sometime in terms of rakudo and panda | |||
12:54
xpen joined
|
|||
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:00
xpen left
|
|||
timotimo | o/ | 13:02 | |
i find it irritating that the message for EVAL has "!!!" in it | |||
_nadim | in: class C { has $.a; has many more ; method set_attrs(%new_values) } how do I set the attributes from the | 13:03 | |
%new_values without handling them individualy? | |||
EG: override the class attributes, preferably emporarilly | 13:04 | ||
nine | jdv79: I cannot even install JSON::Infer: Cannot unbox a type object in Panda::Installer::install | 13:06 | |
timotimo | _nadim: you can map over the hashes keys, then call self."$key"() = $value for each key | 13:08 | |
13:08
cdg joined
|
|||
[Tux] | did here-docs changed recently regarding NL sequences? | 13:15 | |
my $foo = qq :to "XX"; | 13:16 | ||
a,b\r | |||
XX | |||
13:16
Skarsnik joined
|
|||
[Tux] | sorry, no that still passes. next is slurp | 13:17 | |
jdv79 | nin: second time worked for me | ||
timotimo | github.com/rakudo/rakudo/commit/68...4ecb1aa5d2 - this commit message explains what's with the new newline handling | ||
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 | |
What we do now should be much closer to what Perl 5 does, fwiw. | |||
jdv79 | oh yeah, nine, install of json infer breaks btw:) | ||
nine | jdv79: it worked on the second attempt | ||
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 ? | ||
timotimo | wow. how's that? | ||
[Tux] | doc.perl6.org/routine/slurp doesn't tell me | 13:20 | |
jnthn | [Tux]: By slurping with :bin, and then doing .decode on the buffer | ||
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. | ||
jdv79 | insanity. what is the cause? | 13:21 | |
timotimo | ah, nice! | ||
13:21
nige1 left
|
|||
nine | jnthn: using .deps will be very nice for startup performance. | 13:21 | |
jnthn | nine: \o/ | ||
13:23
Psyche^_ left,
Psyche^ joined,
weihan left
|
|||
[Tux] | $fh = open $tf20, :r or die "$tf20: $!"; | 13:27 | |
where $tf has \r\n line endings THAT I WANT TO PRESERVE | |||
as in, I think open should have the attribute, not :bin + encode on slurp | 13:28 | ||
Skarsnik | there is not a line attribute on open? | 13:29 | |
[Tux] | there is :chomp, which I already force to false | 13:31 | |
[Tux] tries nl => Str | |||
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 | ||
Loudly and unappreciatively. | |||
^ | |||
& even | |||
[Tux] | sorry jnthn this is nothing personal | 13:33 | |
13:33
pmurias joined
|
|||
timotimo | yeah, it's definitely a very annoying problem | 13:33 | |
i don't think i've ever though about how other languages i've used handle that stuff | |||
[Tux] | but the words towel and ring crossed my mind | ||
timotimo | i ... what? | 13:36 | |
[Tux] throws the named towel in the ring for now. I miss all logic | 13:38 | ||
dalek | kudo/load_precompiled_deps: 3f5552c | (Stefan Seifert)++ | src/ (3 files): Load dependencies of a precomp file directly instead of searching Since for every precompiled file we already record the ids of all recursive dependencies, we can use that information for loading those dependencies, instead of searching all over again. This is also an important step to get rid of RepositoryRegistry.load_module Many thanks to jnthn++ for pointing out this possibility! |
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. | ||
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
|
|||
[Tux] | There is no way to change an already opened filehandle from :bin to :!bin (and back)? | 13:42 | |
cygx | [Tux]: :bin is a noop currently | 13:43 | |
you can pass enc => 'utf8' and get the same result | |||
[Tux] | (tears) | ||
cygx | jnthn: I think your newline handling is on the right track | ||
what I would add is github.com/MoarVM/MoarVM/blob/mast...ter.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 | ||
cygx | timotimo: it's specced and documented, just not implemented | 13:45 | |
[Tux] | I'll leave it for a few days | ||
till the dust settles | |||
what I want and expect is a way to read THE SAME as what I write to a file | |||
be that \r\r\r\r\r\n or \n | 13:46 | ||
cygx | (if the specced behaviour is actually reasonable is another question entirely ;)) | ||
[Tux] | so a forced :do-no-translate-nl would be fine with me | ||
but it should be a method/property that can be changed on an already opened filehandle | 13:47 | ||
Skarsnik | :don't-be-smart | ||
[Tux] | fine with me :) | ||
this feels like Oracle's NULL behaviour on inserting an empty string in a varchar field | |||
timotimo | huh? i know about mysql inserting "" into a NOT NULL when you insert a NULL | 13:49 | |
but the other way around? that's really not right | |||
[Tux] | if you insert an "" (empty string) into a varchar2 (Oracle) and read it back, it is NULL | 13:51 | |
indeed, not right, but that is how it is since Oracle 5 IIRC | 13:52 | ||
timotimo | ;_; | ||
masak | jnthn: what's your take on rt.perl.org/Public/Bug/Display.html?id=126969 ? | 13:53 | |
[Tux] | tux.nl/Talks/DBDc/null.html | ||
timotimo | no. i refuse to think any more about this at all. | ||
thanks for the offer | |||
cygx | imo we should add nqp::setoutputlinesep, nqp::settransinputlinesep, nqp::setransoutputlinesep | 13:55 | |
IO::Handle might also want to be split into IO::BinaryHandle and IO::TextHandle, but I haven't thought that one through yet | 13:57 | ||
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 | |
14:03
brrt joined
|
|||
masak | nine: sort of like `quasi { ... }`, no? | 14:03 | |
nine | masak: except that I need it in Perl6/Actions.nqp :) | 14:05 | |
brrt | good * | 14:07 | |
timotimo | i personally find it super annoying to match against QAST trees (in the optimizer) | ||
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) | ||
timotimo | but i haven't spent a lot of time on the static optimizer in the recent months | ||
brrt | build a tiler timotimo ^^ | ||
diakopter | brrt: hi! | ||
brrt | hi diakopter | ||
timotimo | hehehe. | 14:08 | |
nine | timotimo: yes, for an optimizer you really want some regex like language for matching trees. | ||
timotimo | yeah, with captures and such | ||
brrt | the moment i have more brane left, i'm going to write something for that | ||
nine | I punted on that one when I wrote my first optimizer, and came to regret it :) | 14:09 | |
ShimmerFairy | nine: QAST just needs to be more lisp-like, and it'll be a snap to use! :P | 14:11 | |
brrt | this is true. lisp is awesome for anything related to program manipulation | 14:12 | |
except the cons-car-cdr business | |||
mst | but with head-tail you can't have p3rl.org/Acme::CarCdr | 14:15 | |
bah | |||
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
|
|||
brrt | :-D nice | 14:19 | |
tadzik | timotimo: possibly XPath/JsonPath-like thingy? | ||
I'm trying to imagine how that'd look | |||
14:20
vendethiel left
|
|||
brrt | ok, let me ask a very simple question; what's this going to cost | 14:21 | |
dalek | blets: f02a2cf | (Herbert Breunung)++ | docs/appendix-b-grouped.txt: fixing set op table + testing new format |
||
brrt | algorithmically | ||
tadzik | if ( $method =~ m/::c([ad]{1,704})r$/ ) { | ||
is there a significance to the number 704 in Perl 5 internals or so? :) | |||
14:21
lichtkind joined
|
|||
timotimo | tadzik: it also has to generate code that's as fast as what we're hand-coding at the moment. or faster. | 14:22 | |
brrt | oh, another question; how much memory can we burn | 14:23 | |
tadzik | timotimo: yeah, I'm thinking just about the matching part | ||
nine | timotimo: can't the optimizer optimize that for us? ;) | ||
tadzik | as in, not neceserilly the replacing part | ||
timotimo | nine: unlikely :( | ||
it'd have to be the NQP optimizer, which hasn't seen terribly much work yet | |||
or the dynamic optimizer in moar | |||
nine | tadzik: even the performance of the matching code is important | 14:24 | |
tadzik | true | ||
brrt | hmmm | 14:25 | |
thing is, you can create a constant-time bottom-up matcher, but it'll cost you in terms of memory | |||
cygx | tadzik, or anyone else with commit access to panda: github.com/tadzik/panda/pull/264 needs some love | ||
brrt | that's basically the first part of the tiler | ||
tadzik | oh, oh | ||
cygx: I'll look at it right away | 14:26 | ||
sorry it layed for so long | |||
(lied?) | |||
(waited.) | |||
cygx | ;) | ||
tadzik: it's 'lay', btw | 14:27 | ||
timotimo | jnthn: 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? | ||
tadzik | cygx: so "layed" was alright? | ||
cygx | no, to lie, lay, lain | ||
simple past is just 'lay' | |||
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? | ||
brrt | +1 for splicing out the jit commits and seeing what that does | 14:29 | |
but.... it all looked good enough to me | 14:30 | ||
timotimo | thank you :) | ||
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 | |||
don't have a good reason to believe that, but why not take a look. | |||
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 :) | ||
Could not find symbol '&bool' | |||
timotimo | tadzik: may need to nuke the install folder | 14:32 | |
RabidGravy | yeah | ||
nine | install/share/perl6 | ||
tadzik | I wonder if I should have rakudobrew do that every tiem | ||
dalek | Heuristic branch merge: pushed 27 commits to nqp by pmurias | ||
tadzik | it's not like it has to redownload things | ||
nine | tadzik: then you'd lose installed modules | 14:33 | |
tadzik | hm, yes | ||
nothing that can't be worked around though | |||
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:35 | |
tadzik | well, we had a similar thing with precomp when one had to nuke panda | 14:38 | |
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 | |||
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 | ||
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 | ||
nine | But that's exactly the reason why so many incompatible changes went in in the last couple of weeks :) | ||
14:41
pdurbin joined
|
|||
tadzik | cygx: hmm, does the bug still happen to you? | 14:43 | |
cygx: I tried bootstraping now, twice, and no directory shows up | |||
14:46
Begi2 joined
|
|||
flussence | g'morning, here's a christmas present for other lazy gentoo people - gitlab.com/flussence/perl6-overlay | 14:46 | |
tadzik | ayy nice :) | ||
konobi | howdy pmurias | ||
timotimo | neat, flussence | 14:47 | |
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:48 | |
14:49
Begi left
|
|||
pmurias | konobi: hi | 14:53 | |
Skarsnik | Nice flussence :) | 14:54 | |
timotimo | turns out i'm at least indirectly responsible for the recent gigantic slowdown | 14:56 | |
14:57
brrt left
|
|||
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 :) | ||
lucasb | tadzik: I think it was because something panda is doing :) | 15:02 | |
panda is still calling mkpath with an IO object | |||
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:04 | |
mst tweets at packagers suggesting a fresh rakudobrew package beats an old rakudo one | 15:05 | ||
I shall be banging this drum for some time, I think | |||
dalek | p: 102b4c2 | (Pawel Murias)++ | t/nqp/59-nqpop.t: Test nqp::bitand_i, nqp::bitor_i, nqp::bitxor_i. |
15:07 | |
15:10
kittenlips joined
|
|||
pmurias | mst: will you cpanify rakudobrew? | 15:12 | |
15:12
pdurbin left
|
|||
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? | ||
moritz | kittenlips: we like to think of them as more fundamental than traits | 15:14 | |
kittenlips: like, (nearly) first class types, so that one day, maybe you can say "coerce to Int:D" or so | |||
kittenlips | mortiz: what does "more fundamental" mean specifically? | ||
flussence starts trying to write an ebuild for panda, realises how silly that is, and stops | 15:15 | ||
moritz | kittenlips: you can pass around the type as an object | 15:16 | |
m: say (4, Int, 42).grep(Int:D) | |||
camelia | rakudo-moar 625d1c: OUTPUT«(4 42)» | ||
moritz | kittenlips: that wouldn't be possible if defined/undefined were only traits applied to a variable/parameter | ||
15:16
loren joined
|
|||
kittenlips | Ah ok thank you | 15:16 | |
loren | Evening, #Perl 6 | 15:17 | |
kittenlips | Hello | ||
pmurias | mst: 'cpanm rakudobrew' seems much more convenient for a perler than doing githuby things | ||
15:17
cdg left
15:18
xinming left
|
|||
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"» | ||
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; | ||
camelia | rakudo-moar 625d1c: OUTPUT«x=5"y => 6""z => 7"» | ||
15:18
cdg_ joined
|
|||
loren | below code not replace success | 15:19 | |
15:19
xinming joined
|
|||
mst | pmurias: it'd be App::Rakudobrew but yes | 15:19 | |
loren | I just use $_ do some redundant steps. | 15:20 | |
15:20
patrickz joined
15:21
zakharyas joined
15:22
kittenlips left
15:23
cdg_ left
15:24
nige1 joined,
sno joined
|
|||
mst | pmurias: poke me again tomorrow and I'll try and have a look | 15:26 | |
15:27
RabidGravy left
|
|||
dalek | p: e76a1ac | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp: [js] Implement nqp::bitneg_i. |
15:28 | |
p: 3e96236 | (Pawel Murias)++ | t/nqp/59-nqpop.t: Test nqp::bitneg_i. |
|||
loren | Anyone found that code problem message to me. | 15:31 | |
15:32
dalek left
15:33
dalek joined,
ChanServ sets mode: +v dalek
|
|||
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. | |||
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:35 | |
dalek | p: 566f8ce | timotimo++ | tools/build/MOAR_REVISION: bump moar for restoring performance |
15:36 | |
kudo/nom: f1bbd4c | timotimo++ | tools/build/NQP_REVISION: bump nqp to restore moar's jit performance |
|||
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. | ||
yoleaux | patrickz: I'll pass your message to mst. | ||
mst | patrickz: I'm right here | ||
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. | ||
patrickz | :-) | 15:37 | |
mst | patrickz: also, thanks | ||
the tricky bit is going to be rakudobrew thinking it should use ../ for its home | |||
if it's installed into a local::lib that ends up being really quite ugly | |||
flussence | timotimo++ | 15:38 | |
timotimo | sorry about the performance regression i caused :( | ||
15:41
RabidGravy joined
|
|||
lichtkind | yay my p6 talk was accepted at gpw | 15:45 | |
tadzik | hmm, when does the CFP end? | 15:48 | |
I don't see a date on the website | |||
15:48
cdg joined
|
|||
moritz | tadzik: for GPW? | 15:50 | |
we haven't quite decided yet. Possibly Feburary | |||
15:52
khw joined
15:53
cdg left
|
|||
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? | ||
camelia | rakudo-jvm 6c0f93: OUTPUT«6.0221409E23» | ||
..rakudo-moar f1bbd4: OUTPUT«6.0221409e+23» | |||
Juerd | I guess every other trick now just has a builtin that does exactly what you want. | ||
vendethiel- | Juerd: what i sit? | 15:54 | |
is it* | |||
Juerd | Sorting stuff efficiently, picking random elements, shuffling arrays, interpolating expressions, etc... All part of the language now. | ||
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. | ||
Juerd | Idioms, as in those composed expressions that people keep using and are recognisable patterns by themselves | 15:55 | |
Like "foo @{[ bar($baz) ]} bar" in Perl 5 | |||
Or do { local (@ARGV, $/) = $fn; <> } | |||
Or the schwartzian transform | |||
15:56
RabidGravy left
|
|||
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 | ||
lucasb | ahhh :) | ||
masak | Juerd: I recently used a sub parameter as an attribute initializer in a lexically defined class. does that count as an idiom? :) | ||
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 | ||
gfldex | masak: that counts as madness | ||
Juerd | profan: Yes, exactly. | ||
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` ? | ||
Juerd | profan: Especially that everything is an object makes adding features something that doesn't really clutter the language. | ||
masak: I don't know. Isn't that just *actually* part of the language? :) | |||
dalek | p: 7d49f99 | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp: [js] Implement nqp::pow_i. |
15:59 | |
p: 7dd0d47 | (Pawel Murias)++ | t/nqp/59-nqpop.t: Test nqp::pow_i. |
|||
p: b1b9e57 | (Pawel Murias)++ | src/vm/js/ (2 files): Implement nqp::gcd_i, nqp::lcm_i. |
|||
p: 3a3b5a1 | (Pawel Murias)++ | t/nqp/59-nqpop.t: Test nqp::gcd_i, nqp::lcm_i. |
|||
Juerd | masak: I'll add it anyway, because 2 > 1 | ||
jnthn | masak: There are various things that counts as, but "thread safe" is almost certainly not one of them :P | ||
masak | Juerd: the syntactic sugar is. the habit that exploits it is part of the community, IMO. | ||
Juerd | masak: Ah, right. | ||
profan | probably more of this will crop up as the language reaches more people | ||
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 | ||
jnthn | masak: I assume you mean sub foo($bar) { my class A { has $.a = $bar }; ... } | ||
? | |||
masak: And then remember that classes are not closures. | |||
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. | ||
vendethiel- | masak: I know I abuse the syntactic sugar from perl 6 :( | ||
masak | jnthn: is there a thread safety hazard? two different threads would create two different instances, no? | ||
cygx is back for a bit | |||
Juerd | Although I'm not sure about $|++. Does Perl 6 autobuffer, and if so, what would be the $| equivalent? | 16:02 | |
(Note that while $| is part of Perl 5, $|++ written with ++ instead of = 1 is an idiom (a silly one imho)) | |||
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. | ||
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... :) | ||
cygx | tadzik: this used to throw until I made it fail, and lizmat's implementation handled that failure by using && | ||
moritz | m: sub f($x) { class A { method x { $x } }; say f(42).x; say f(23).x | ||
camelia | rakudo-moar f1bbd4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/svl1dN_Q7DMissing 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…» | ||
profan | Juerd: true | ||
moritz | m: sub f($x) { class A { method x { $x } }}; say f(42).x; say f(23).x | ||
camelia | rakudo-moar f1bbd4: OUTPUT«4223» | ||
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«4223» | ||
cygx | tadzik: passing $pandadir without calling .Str or .path to mkpath is still wrong, but I don't know what triggers it | ||
profan | oh god i need to fix my terminal, the utf-8 stuff in here kills my irssi now and then | ||
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. | ||
cygx | tadzik: you'd have to ping cognominal to check... | ||
moritz | m: sub f($x) { class A { method x { $x } }.new }; my $a = f(42); say f(23).x; say $a.x; | ||
camelia | rakudo-moar f1bbd4: OUTPUT«2323» | ||
moritz | ah, that's the non-closure behavior alluded to earlier | 16:05 | |
jnthn | moritz: Yes, that one shows it more clearly :) | ||
lucasb | cygx: I think it's passing an "/current/path#inst/some/path".IO to mkpath | ||
but that now fails correctly... and the 'try' silences it | |||
moritz | jnthn: p5 has a "Variable $x will not stay shared" warning; do we want the same? | ||
jnthn | moritz: Possibly, though in this case it's more "Variable $x will be over-shared", no? | 16:06 | |
Also masak won't like the warning ;) | |||
pmurias | jnthn: the current setup is the "try to make \r\n affect as little as possible" choice | ||
tadzik | cygx: hmm, alright, thanks for the details | ||
moritz | jnthn: agreed | 16:07 | |
jnthn | pmurias: Yes, I think it's the right default for most cases | ||
pmurias | jnthn: I think the right solution is to just tell people who whine to implement the flag to open themself | ||
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 | |
16:08
RabidGravy joined
|
|||
jnthn | cygx: Maybe :bin could turn off auto-crlf translation stuff because that's somewhat associated with "text mode" | 16:08 | |
cygx: Could also default the encoding to utf-8-c8 or so | |||
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 | ||
[Tux]: ^^ | |||
cygx | jnthn: I sympathize | 16:10 | |
jnthn: another potential issue is interaction of text-based and binary IO | 16:11 | ||
is there caching involved in text-based access? | |||
jnthn | Depends how you define "caching" | ||
"It's complicated" | |||
16:12
BenGoldberg joined
|
|||
jnthn | The main complication being the NFG stuff | 16:12 | |
Well, even NFC would make the problem, so shouldn't blame NFG even. | |||
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 | ||
So there's often a codepoint worth of stuff sat in the normalizer's buffer | |||
cygx | s/caching/buffering/ | ||
jnthn | Any control char counts as an "NFG terminator" | ||
Which flushes said buffer. | 16:14 | ||
With the exception of \r (thanks, Annex 29 :)) | |||
16:14
Ven joined
|
|||
cygx | the question is, can I call .read after a call to .getc or .get and expect not to lose bytes? | 16:15 | |
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:17 | |
16:17
loren left
|
|||
dalek | ast: bfc719f | jnthn++ | S14-roles/composition.t: Some tests for multi composition conflicts. Fudged and failing for now. |
16:18 | |
jnthn | Will fix ^^ in the next day or so...but need to prep for flight and stuff now | ||
Once they're done RT #124393 (one of the last 3 xmas RTs) will be finished. | 16:19 | ||
16:20
dj_goku left
16:21
nige1 left
|
|||
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 | ||
Ven | psch: thanks! why'd you hold back? | 16:25 | |
DrForr | Hrm. I find myself wanting Array.butlast... | 16:26 | |
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)» | ||
Ven | DrForr: like that? | ||
DrForr | Yeah, that's what I'm going to do, but it'd be nice to have a formal name for it :) | ||
timotimo | Ven: don't you actually mean 1..^*-1? | ||
Ven | timotimo: that'd be the whole array | 16:30 | |
16:30
pierre-v_ left
|
|||
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? | ||
Ven | m: say (1, 2, 3)[1..^*-1] | 16:32 | |
camelia | rakudo-moar f1bbd4: OUTPUT«(2)» | ||
Ven | m: say (1, 2, 3)[0..^*-1] | ||
camelia | rakudo-moar f1bbd4: OUTPUT«(1 2)» | ||
Ven | m: say (1, 2, 3)[0..*-1] | ||
camelia | rakudo-moar f1bbd4: OUTPUT«(1 2 3)» | ||
Ven | ah, it's the opposite indeed | ||
16:33
RabidGravy left
|
|||
nine | Huh? Method 'WHO' not found for invocant of class 'GLOBAL' | 16:34 | |
lucs | Off by -1 | 16:35 | |
16:35
dj_goku joined
|
|||
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 | ||
Ven | yeah, I just swapped ^ meaning inclusive vs exclusive | ||
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
Begi2 is now known as Begi
|
|||
timotimo | probably easier to just write *-2, though :P | 16:37 | |
16:40
CIAvash joined
|
|||
lucasb | if .head/.tail allowed Whatever, the "init" of a list would be .head(*-1) | 16:40 | |
.head(*) and .tail(*) would mean the whole list | 16:41 | ||
and .tail(*-1) would mean all but the first | |||
timotimo | accepting *-1 is the same as accepting any callable, really | 16:43 | |
accepting * is a matter of accepting literally "Whatever" as the argument | |||
lucasb | unfortunately, "tail" is a little misnamed, since "tail" commonly means "all but the first" in Haskell and maybe other FP languages | ||
diakopter | timotimo: I guess my theory on perf regression was right? | ||
timotimo | diakopter: sorry, i don't recall what your theory was :| | ||
was your theory "timo is a big stupid doo-doo head"? :) | 16:44 | ||
diakopter | irclog.perlgeek.de/perl6/2015-12-19#i_11746098 | ||
or was it partially right except for "massively greater portions jitted", and "quadratic" explosion of find best candidate instead | 16:45 | ||
dalek | ast: 3cba7b3 | usev6++ | S32-exceptions/misc.t: Fudge test for failure assignment for JVM |
||
ast: d4539a5 | usev6++ | S32-exceptions/misc.t: Be a bit more liberal about warning output rakudo.jvm reports '6.0221409E23' here so matching for lower case 'e' only made the test fail |
|||
timotimo | diakopter: no, sorry, you're absolutely in the wrong | 16:46 | |
find_best_dispatchee is about multi candidates | |||
16:46
eMBee joined,
RabidGravy joined
|
|||
timotimo | and time spent jitting/speshing is still far below gcing | 16:46 | |
DrForr write sub butlast() for the time being... | 16:47 | ||
diakopter | "in the wrong" generally means "at fault, to blame", maybe you mean "incorrect" | ||
timotimo | oops! | 16:48 | |
yes, incorrect | |||
"auf dem holzweg" | |||
barking up the wrong tree | |||
something like that | |||
diakopter | so your commit message for bd56e2e is also misleading? | 16:49 | |
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
|
|||
timotimo | that part of the code doesn't know about spesh candidates | 16:51 | |
16:51
vendethiel- left,
vendethiel joined
|
|||
diakopter | the core part of my theory was the additional jitted ops | 16:52 | |
I guess you didn't look at it | |||
timotimo | i must misunderstand | ||
16:53
mohae joined
|
|||
diakopter | well you said my theory was absolutely wrong | 16:58 | |
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 | ||
timotimo | you said "it's taking far longer to jit now", which is not what i'm seeing | ||
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
|
|||
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 | |
17:01
zakharyas left
|
|||
timotimo | oh | 17:01 | |
well, that's true | |||
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 | ||
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 | ||
mst | diakopter: also, all generalisations are false | ||
timotimo | :( | 17:03 | |
diakopter | what was wrong with that [entirely genuine!!!] comment???! | 17:04 | |
17:05
xinming left,
xinming joined
|
|||
timotimo | was that adressed at mst or at my frowny face? | 17:07 | |
[Tux] | jnthn, no worries | 17:08 | |
timotimo | just a bit unhappy about how i handled that whole discussion | ||
lucasb | xmas is comming... let's be happy :) | ||
timotimo | [Tux]: you can try your measurements again with lastest rakudo master; it has the regression-causing commits cut out | ||
[Tux] | starting … | ||
timotimo | thanks | ||
i'll be AFK for a bit | 17:09 | ||
Ven | timotimo++ # working on the JIT stuff | ||
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 | ||
lichtkind | jnthn++ for his yapc asia talk | 17:10 | |
are thread implemented in rakudo now? | |||
17:11
rolv joined
|
|||
timotimo | yeah | 17:11 | |
lichtkind | thanks | ||
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 | |||
[Tux] | test 50000 25.122 25.004 | 17:17 | |
test-t 50000 14.756 14.639 | |||
csv-parser 50000 61.926 61.808 | |||
run_alt is back though :( | 17:18 | ||
lichtkind | jnthn++ | 17:19 | |
dalek | p: 2bf1af1 | (Pawel Murias)++ | t/nqp/59-nqpop.t: Test != and floating point numbers. |
||
p: 6e59241 | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp: [js] Implement nqp::sqrt_n. |
|||
p: 2724a79 | (Pawel Murias)++ | t/nqp/59-nqpop.t: Test nqp::sqrt_n. |
|||
17:21
hankache left
17:31
nige1 joined
17:33
CQ joined
|
|||
dalek | c: c10c2a1 | (Sylvain Colinet)++ | doc/Language/nativecall.pod: Document how to specify the ABI/API version of a lib in NativeCall |
17:34 | |
c: 7882ee7 | (Sylvain Colinet)++ | / (13 files): Merge branch 'master' of github.com/perl6/doc |
|||
17:36
lucasb left
|
|||
jnthn | airport & | 17:36 | |
17:39
Ven left
17:42
Ven joined
17:49
vendethiel left
|
|||
dalek | p: 26c213b | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp: [js] Implement a bunch of math functions. |
17:50 | |
p: 9772f2a | (Pawel Murias)++ | t/nqp/83- (2 files): Add test for nqp::exp_n. |
|||
17:54
awesomess3 joined
|
|||
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:54 | |
my $pod = EVAL(slurp($file.path) ~ "\n\$=pod")[0]; | 17:56 | ||
that look weird x) | |||
stmuk | panda seems v slow | 17:57 | |
stmuk does the nuke dance | 17:58 | ||
TimToady | perhaps it should be using EVALFILE instead | ||
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. | ||
12:49Z <nine> TimToady: I still get a "Useless use of $p5 in sink context" for "class Bar does Inline::Perl5::Perl5Parent['Foo', $p5] { }" | |||
12:55Z <nine> TimToady: my $a = "foo"; $a .= say if True; # Useless use of $a in sink context (line 1) | |||
Skarsnik | doc.perl6.org/routine/EVAL 404 hm | 18:00 | |
pmurias | what should -12.5 % 5 be in nqp? | ||
18:02
skids joined,
pierre-vigier joined
18:03
patrickz left
|
|||
TimToady | we could perhaps detect when EVAL is on a literal without interpolation, and not carp in that case | 18:05 | |
18:10
Ven left
18:11
vendethiel joined
|
|||
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 | ||
yes | |||
TimToady plays his high trump card one last time :) | 18:13 | ||
TimToady hopes he'll be fired soon :) | |||
nine | TimToady: well, what will you do when Perl 6 is done? :) | ||
TimToady | I don't expect it to be done till after I don't have to worry about it anymore :) | 18:14 | |
[Tux] | :) | 18:15 | |
nine | Aah...the correct answer would of course have been "I go to Disney land!" | ||
TimToady | Da! | ||
RabidGravy | anyway, I have used sub-signatures for the first time in actual code today | 18:16 | |
ilmari | pmurias: same sign as the dividend seems to be the most common | 18:17 | |
from eyeballing en.wikipedia.org/wiki/Modulo_operation | |||
which is conveniently what C, Java and JavaScript all do | 18:18 | ||
18:20
darutoko- joined
18:23
darutoko left
|
|||
pmurias | nqp-m: say(-12.5 % 5) | 18:23 | |
camelia | nqp-moarvm: OUTPUT«2.5» | ||
pmurias | ilmari: ^^ | ||
18:24
nige1 left
|
|||
pmurias | ilmari: javascript returns -2.5 here | 18:26 | |
TEttinger | ilmari: java and C# have some interesting results for modulo differences. | 18:28 | |
I've had to resort to the ugh method, which is not called ugh and is instead called Math.IEEERemainder | 18:29 | ||
"How many E's are there in I Triple E Remainder?" | |||
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 | ||
Skarsnik | like localization is l10n and internationalisation is i18n x) | ||
stmuk | one simple benchmark is now 3 times slower on OS X | 18:32 | |
Skarsnik | that not good x) | 18:34 | |
18:35
nanis joined,
Begi left
|
|||
dalek | p: fe8fb75 | (Pawel Murias)++ | src/vm/js/ (2 files): [js] Change mod_n to be more like the jvm and moarvm backends. |
18:37 | |
p: 2739200 | (Pawel Murias)++ | t/nqp/59-nqpop.t: Test nqp::mod_n. |
|||
pmurias | stmuk: I just hope you weren't benchmarking mod_n on nqp-js ;) | ||
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 | ||
nanis | yoleaux: Ah, I hadn't noticed --gen-moar took values. Thank you. | ||
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) | ||
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?) | ||
pmurias | java.lang.NoSuchMethodError: org.perl6.nqp.runtime.Ops.pow_i(JJ)J | ||
nanis | I am sorry I can't focus more on this at this time, but I'll check the logs later. | 18:41 | |
18:41
nanis left
|
|||
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 | ||
dalek | kudo/load_precompiled_deps: 0186ba5 | (Stefan Seifert)++ | src/ (2 files): Replace load_module in require by calls to $*REPO.need and $*REPO.load With this we can finally get rid of CompUnit::RepositoryRegistry::load_module |
18:46 | |
jdv79 | is auth used for anything right now? | 18:47 | |
Skarsnik | Probably not | 18:48 | |
18:48
cygx left
|
|||
nine | jdv79: yes, it's a filter for loading modules | 18:48 | |
use Foo:auth<me>; should be fully functional | |||
jdv79 | so if i want to publish a package on differnet auths i have to author that many version of it? | 18:49 | |
seems kinda lamme and a pita | |||
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) | ||
jdv79 | for instance i want to put this on cpan: github.com/jonathanstowe/JSON-Infe...fer.pm#L84 | ||
nine | jdv79: why author many versions? | ||
jdv79 | sorry RabidGravy - its just the first example i found | 18:50 | |
because its hardcoded | |||
nine | hardcoded where? | ||
jdv79 | is that auth value not used? | ||
the one in th link ^^ | |||
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:51 | |
18:51
pmurias left
|
|||
jdv79 | i didn't look if that value is used. just asked first. i should read. | 18:52 | |
i agree that META6 is a better place but then again you need to gen different copies there too | |||
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 | ||
jdv79 | what? i could publish stuff to cpan and github. i think it makes sense. | 18:53 | |
not a whole lot but it does | |||
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. | ||
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. | ||
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 | ||
jdv79 | the api thing is new | 18:56 | |
nine | jdv79: please back up that claim with actual quotes | ||
18:56
virtualsue joined
|
|||
jdv79 | design.perl6.org/S22.html#auth | 18:56 | |
nine | That directly contradicts S11 | 18:57 | |
jdv79 | uh oh | ||
nine | But it also says so: "Please note that this is not an authority" | ||
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 | |
seems like some rethinking may be in order on this area | |||
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. | ||
Sounds like S22 needs some clarification | |||
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 | ||
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. | ||
Skarsnik | nine, try install Task::Star with it? | 19:01 | |
to see if that break nothing x | |||
nine | Skarsnik: on it | ||
jdv79 | ok, so current thinking that auth does not correspond to a storage location? | ||
nine | For me :auth<cpan:nine> has always meant, "the version by whoever is behind the CPAN account 'nine'" | ||
jdv79 | its just ns prefix | 19:02 | |
RabidGravy | yeah | ||
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. | ||
Skarsnik: is Task::Star known to install on a plain nom? | |||
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 | ||
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 | ||
Skarsnik | let me check | ||
nine | I like how much faster panda starts with my branch :) | ||
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 | ||
Template::Mojo fails due to EVAL | 19:05 | ||
19:05
awesomess3 left
|
|||
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 | ||
RabidGravy | I was just going to look at JSON::Infer as I think it uses EVAL in a test | ||
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. | ||
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. | ||
RabidGravy | I think source-type has been discussed | ||
19:07
nige1 joined
|
|||
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:07 | |
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 | ||
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 | ||
S22 hints at the auth being used to indicate the collection to fetch from | |||
i guess that's out for now | |||
19:10
labster joined
|
|||
jdv79 | i'm also out for now. dinner ^H & | 19:10 | |
thanks guys | |||
19:11
firstdayonthejob joined
19:13
RabidGravy left
19:18
espadrine left
|
|||
ChoHag | Can you use ^ twigils in regaular (signature-less) methods/subs? | 19:23 | |
vendethiel | mh? | 19:25 | |
should | |||
19:25
RabidGravy joined
|
|||
ilmari | ChoHag: that's the point of them | 19:27 | |
m: sub foo { $^a + $^b }; say foo 5, 3; | |||
camelia | rakudo-moar f1bbd4: OUTPUT«8» | ||
ilmari | m: dd sub { $^a + $^b }.signature | 19:28 | |
camelia | rakudo-moar f1bbd4: OUTPUT«Signature $var = :($a, $b)» | ||
ilmari | ChoHag: pedantically, no, you can't, since they imply a signature | 19:29 | |
19:29
RabidGravy left
19:31
dwarring joined
|
|||
ChoHag | Oh. | 19:32 | |
I've only used them in anonymous blocks before. | |||
I guess I should have realised that they're practically the same thing. | |||
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))» | ||
ilmari | m: *.^mro.say | 19:37 | |
camelia | ( no output ) | ||
ilmari | m: {*}.^mro.say | ||
camelia | rakudo-moar f1bbd4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/SPMPMJNJcK{*} may only appear in protoat /tmp/SPMPMJNJcK:1------> 3{*}7⏏5.^mro.say expecting any of: horizontal whitespace term» | ||
ilmari | m: ( * + 3 ).^mro.say | ||
camelia | ( no output ) | ||
ilmari | huh | ||
19:37
n0tjack joined
|
|||
ChoHag | From doc.perl6.org/language/modules: "Module distributions in Perl 6 [contain] a lib directory for modules" | 19:38 | |
19:38
lucasb joined
|
|||
ChoHag | A little unclear. Is a module a Module? Does a Module (then) contain modules? | 19:39 | |
lucasb | it's a module *distribution* :) | 19:40 | |
19:43
RabidGravy joined
19:44
yqt joined
19:49
Actualeyes left
|
|||
ChoHag | What does N<> mean in pod? | 19:49 | |
Skarsnik | No idea | ||
pod6 doc is... lacking | |||
19:50
zengargoyle left
19:54
BenGoldberg left
|
|||
RabidGravy | is the MONKEY-SEE-NO-EVAL supposed to *always* apply? as github.com/jonathanstowe/JSON-Infe...nfer.t#L28 this one isn't triggering it | 19:54 | |
19:55
rindolf left
|
|||
lucasb | m: use Test; lives-ok { EVAL '42' } | 19:57 | |
camelia | rakudo-moar f1bbd4: OUTPUT«ok 1 - » | ||
Skarsnik | blame Test? | 19:58 | |
RabidGravy | ooh possibly | 19:59 | |
lucasb | nothing shows that Test.pm is exempt from it. idk why it didn't trigger the warning | ||
Skarsnik | m: say EVAL '42'; | 20:00 | |
camelia | rakudo-moar f1bbd4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/egRSR811aLEVAL 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…» | ||
ChoHag | Also, ilmari in particular: Placeholder variables cannot be used in a method | ||
Skarsnik | m: say { EVAL '42' }; | ||
camelia | rakudo-moar f1bbd4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/vxtR46xTyxEVAL 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' …» | ||
Skarsnik | m: use Test; say { EVAL '42' }; | ||
camelia | rakudo-moar f1bbd4: OUTPUT«-> ;; $_? is raw { #`(Block|87212464) ... }» | ||
Skarsnik | m: use NativeCall; say { EVAL '42' }; | 20:01 | |
camelia | rakudo-moar f1bbd4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/KIRcxAm_6nEVAL 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
|
|||
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" | ||
camelia | rakudo-moar f1bbd4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/PwI3OpXIwJEVAL 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;…» | ||
lucasb | as a non native speaker, it reads a little strange | ||
20:02
rurban joined
|
|||
cygx | lucasb: it's a pun on "monkey see no evil" | 20:02 | |
cf emojipedia.org/see-no-evil-monkey/ | |||
dalek | c: 54b29f1 | (Steve Mynott)++ | bin/p6doc (2 files): use MONKEY-SEE-NO-EVAL until we have a better serialisation |
||
lucasb | cygx: ah... I didn't know that. thanks for the info | 20:03 | |
20:04
darutoko- left
|
|||
Skarsnik | stmuk, you forget htmlify.p6 x) | 20:04 | |
stmuk | maybe it should be "use 🙈 " | ||
20:05
rindolf joined
|
|||
dalek | c: b21bc8f | (Steve Mynott)++ | htmlify.p6: MONKEY-SEE-NO-EVAL Skarsnik++ |
20:06 | |
bartolin_ | lucasb: 'use Test;' allows use of EVAL explicitely -- see commit message for github.com/rakudo/rakudo/commit/625d1c51 | 20:07 | |
lucasb: especially: github.com/rakudo/rakudo/blob/nom/...est.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... | ||
yoleaux | cygx: I'll pass your message to jnthn. | ||
lucasb | bartolin_: thanks! it was right at the beginning of the commit message and I didn't see :D | 20:09 | |
20:09
AlexDaniel joined
|
|||
lucasb | so... Test.pm *is* exempt from EVAL usage errors | 20:09 | |
stmuk | m: use Test; EVAL "say 42" | ||
camelia | rakudo-moar f1bbd4: OUTPUT«42» | ||
20:10
nige1 left
|
|||
stmuk | I don't really like the Test pragma changing behaviour like that .. an EVAL could sneak pass unit tests into production | 20:10 | |
AlexDaniel | m: say ∞.perl | 20:11 | |
camelia | rakudo-moar f1bbd4: OUTPUT«Inf» | ||
AlexDaniel | m: say 9e99.perl | 20:12 | |
camelia | rakudo-moar f1bbd4: OUTPUT«9e+99» | ||
AlexDaniel | r: say 9e99.perl | ||
camelia | rakudo-jvm 6c0f93: OUTPUT«9.0E99» | ||
..rakudo-moar f1bbd4: OUTPUT«9e+99» | |||
AlexDaniel | r: say 9e-99.perl | ||
Skarsnik | does that mean a module set use MONKEY-NO-EVAL it get propagated to everything using it? | ||
camelia | rakudo-moar f1bbd4: OUTPUT«9e-99» | ||
..rakudo-jvm 6c0f93: OUTPUT«9.0E-99» | |||
AlexDaniel | it's interesting that the output is so different :) | ||
r: say 9.0E-99; say 9e-99 | 20:13 | ||
camelia | rakudo-jvm 6c0f93: OUTPUT«9.0E-999.0E-99» | ||
..rakudo-moar f1bbd4: OUTPUT«9e-999e-99» | |||
AlexDaniel | both are correct, obviously :) | ||
RabidGravy | I suppose the thing is that Test itself uses EVAL itself in places so it sort of makes some sense | ||
also | 20:16 | ||
m: use Test; no MONKEY-SEE-NO-EVAL; EVAL "say 42" | |||
camelia | rakudo-moar f1bbd4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/wIQSdGJFoJEVAL 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…» | ||
Skarsnik | du how test make the m-s-n-e get propagated? x) | 20:18 | |
stmuk | m: use MONKEY-GUTS; EVAL "say 42" | 20:19 | |
camelia | rakudo-moar f1bbd4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/sLMQqdkSTGEVAL 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;…» | ||
RabidGravy | it's rather strange | ||
20:21
rurban left
20:22
rurban joined
|
|||
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 | ||
camelia | rakudo-moar f1bbd4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/iuxMGl9ylhSorry, do not know how to handle this case of a feed operator yet.at /tmp/iuxMGl9ylh:1------> 031..10 ==> .say7⏏5<EOL>» | ||
20:23
rurban left
|
|||
Skarsnik | lucasb, I think it's just an alias? | 20:23 | |
RabidGravy | I think use nqp still works | ||
lucasb | yes, it's just an alias | ||
stmuk | m: unit class Test; EVAL say 42 | ||
camelia | rakudo-moar f1bbd4: OUTPUT«42» | ||
Skarsnik | lol | ||
RabidGravy | er | ||
lucasb | I was talking about the specific line change in Test.pm... but, ok, it's just a little thing :) | 20:25 | |
RabidGravy | m: class B { class Test { EVAL "say 42"; }} # slightly more strange | 20:26 | |
camelia | rakudo-moar f1bbd4: OUTPUT«42» | ||
RabidGravy | which could happen in regular code without realising | 20:27 | |
lichtkind | can i combine .hyper with ==> ? | ||
20:29
rurban joined
|
|||
lichtkind | o/ rurban | 20:29 | |
RabidGravy | I looks like it checks whether the local name Test is in scope | 20:31 | |
don't know where it does that | 20:32 | ||
stmuk | github.com/rakudo/rakudo/commit/62...bc4395R358 | ||
RabidGravy | yikes | 20:34 | |
so even a constant or | 20:37 | ||
m: enum Foo <Test>; EVAL "say 42" | |||
camelia | rakudo-moar f1bbd4: OUTPUT«42» | ||
RabidGravy | so really easy to switch it off by accident | 20:38 | |
stmuk | yes | ||
Skarsnik | fill a bug? x) | 20:39 | |
lizmat | computer: messages | 20:41 | |
yoleaux | 12:19Z <jnthn> lizmat: Hm, it's probably the NQP version bump, then, rather than the patch itself... | ||
12:19Z <jnthn> lizmat: Thanks for hunting it down to that one. | |||
20:41
xfix joined,
virtualsue left
|
|||
lizmat | :-) | 20:41 | |
m: sub a() { return 1,2,:3c }; dd a # this is wrong | |||
camelia | rakudo-moar f1bbd4: OUTPUT«List $var = $(1, 2, 3)» | ||
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))» | ||
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» | ||
stmuk | surely EVAL should be disabled by RESTRICTED too? | ||
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 | ||
so not allowing EVAL in there would be ok | 20:45 | ||
20:45
hankache joined
|
|||
stmuk | ah evalbot despite its name doesn't use EVAL | 20:46 | |
ChoHag | S26.pod must have been fun to write... | 20:47 | |
20:47
virtualsue joined
|
|||
stmuk | *** glibc detected *** /home/travis/.rakudobrew/moar-nom/install/bin/moar: corrupted double-linked list: 0x000000003add16b0 *** | 20:51 | |
_sri wonders why perl6 needs two subreddits | 20:52 | ||
Skarsnik | lol? | ||
_sri | you've got r/perl6 and are also claiming r/perl | ||
the latter increasing the perl6/perl5 confusion | 20:53 | ||
20:53
vividsnow left
|
|||
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." ??? | ||
_sri | lizmat: yea :) | ||
lizmat | seems r/perl is both for Perl 5 and Perl 6 ? | ||
_sri | it's quite confusing | 20:55 | |
hankache | the more the merrier ;) | ||
good evening #perl6 | |||
lizmat | hankache o/ | ||
hankache | hiya lizmat | 20:56 | |
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... | ||
stmuk | the reddit description for r/perl clearly mentions both langs | ||
20:58
koo8 joined
|
|||
hankache | well r/perl6 would be my natural choice | 20:58 | |
less trolls | 20:59 | ||
El_Che | lizmat: don't get into the confusing perl5 and 6 name scheme :) | 21:01 | |
Skarsnik | r_perl5 r-perl6 | 21:02 | |
RabidGravy | I stop any confusion and avoid trolls by not reading reddit | 21:05 | |
_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 | ||
lizmat | _sri: not this year :-) | ||
_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 | ||
jdv79 | they do confs now | ||
lizmat | last OSCON, communities where put away in Diagonally, away from the muggles | 21:12 | |
_sri | they have done a lot for elixir | ||
DrForr | They tried somewhat with OSCON... | ||
lizmat | at OSCON Europe, I was told they were going to address this | ||
DrForr | Well, at least this year iwth proposals, what actually happens remains to be seen. | ||
21:12
CQ left
|
|||
stmuk | I think o'reilly are fairly out of touch with programming langs .. I don't think they even did a gobook | 21:13 | |
_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 | ||
stmuk | well I was unable to find one using their site search, do you have a link? | ||
_sri | shop.oreilly.com/product/0636920046516.do | ||
RabidGravy | but all the ones I know have thus far declined | 21:15 | |
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 shop.oreilly.com/product/0636920030584.do | ||
that was out even before 1.0 | |||
RabidGravy | is it? strewf I thought it was like last year or something | 21:17 | |
21:17
geraud joined
|
|||
_sri | go 1.0 was 2012 | 21:17 | |
oh my | 21:18 | ||
you can still buy perl6 and parrot essentials on amazon | |||
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 | ||
_sri | i bet a lot of folks will buy that by accident | ||
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 :) | ||
Skarsnik | I think it's a bad idea | ||
lucasb | if it turns out to be high quality, some publisher will eventually approach to print it on paper | ||
stmuk | github.com/perl6/book | 21:21 | |
_sri vaguely remembers donating a cover for a community perl6 book a few years back | |||
lucasb | stmuk: ^^ yes, I really liked that book. unfortunately, people stopped writing it | ||
21:21
zengargoyle joined
|
|||
lucasb | maybe the "Using Perl 6" book can be rebooted | 21:22 | |
stmuk | yes I hope so | ||
21:24
dwarring left
21:26
CQ joined
|
|||
masak | ok, I found another precompilation-related bug. | 21:26 | |
golfing. | |||
RabidGravy | also en.wikibooks.org/wiki/Perl_6_Programming | 21:27 | |
which looks like it needs some love | 21:28 | ||
21:29
hankache left,
pierre-vigier left
21:30
hankache joined
21:34
rindolf left
|
|||
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:36 | |
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
|
|||
nine | jnthn: we are rather close to the release and it's a 315 lines patch | 21:37 | |
jnthn | cygx: It wants to handle normalization eventually; in the meantime, handling stuff that doesn't decode at utf-8 is useful. | 21:38 | |
nine: Mostly removing, or adding, lines? :) | |||
*as | |||
nine | 4 files changed, 114 insertions(+), 95 deletions(-) | ||
jnthn | Hm, almost break even :) | ||
The API thing is important though | 21:39 | ||
masak | m: class A::B {}; class C { has A::B $.ab = A::B.new }; say "alive" | ||
camelia | rakudo-moar f1bbd4: OUTPUT«alive» | ||
masak | m: class A::B {}; class C { has A::B $.ab .= new } | ||
camelia | rakudo-moar f1bbd4: OUTPUT«===SORRY!===Could not locate compile-time value for symbol A::B» | ||
masak submits rakudobug | |||
lizmat | nine jnthn if it is an API we don't want to support, it needs to go | ||
so, +1 on merge | |||
asap, I might add :-) | |||
jnthn | Yeah, my feeling too. | 21:40 | |
masak: So...not precomp? :) | |||
dalek | kudo/nom: 3f5552c | (Stefan Seifert)++ | src/ (3 files): Load dependencies of a precomp file directly instead of searching Since for every precompiled file we already record the ids of all recursive dependencies, we can use that information for loading those dependencies, instead of searching all over again. This is also an important step to get rid of RepositoryRegistry.load_module Many thanks to jnthn++ for pointing out this possibility! |
||
21:40
hankache left
|
|||
kudo/nom: 0186ba5 | (Stefan Seifert)++ | src/ (2 files): Replace load_module in require by calls to $*REPO.need and $*REPO.load With this we can finally get rid of CompUnit::RepositoryRegistry::load_module |
|||
kudo/nom: 514ba8b | (Stefan Seifert)++ | src/ (4 files): Merge branch 'load_precompiled_deps' into nom |
|||
masak | jnthn: not precomp :) | ||
jnthn | phew! | ||
masak | indeed | 21:41 | |
jnthn | precomp bugs are up there with GC bugs in terms of "really darn tricky to debug" | ||
nine | like run_alt :/ | ||
jnthn | Yeah :/ | ||
21:41
TEttinger left
|
|||
Skarsnik | I think you should focus on having everything on Task::Star at least install now x) | 21:42 | |
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 | ||
jdv79 | RabidGravy: that error happens with other dists | ||
don't remember though | |||
lizmat | m: sub a() { return 1,2,:3c }; dd a # bisected this brokennes to 625d1c5116c3314dd | 21:46 | |
konobi | what is JSON::Infer? | ||
camelia | rakudo-moar f1bbd4: OUTPUT«List $var = $(1, 2, 3)» | ||
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
CIAvash left
|
|||
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 | ||
camelia | rakudo-moar f1bbd4: OUTPUT«(timeout)42424242» | ||
jnthn | skids: Need to close the channel? | 21:48 | |
Oh, but .head(1) | |||
skids | No should just end because head. | ||
jnthn | Oh wait | ||
Not it shoudln't | |||
jdv79 | we're going to need to firm up the Version issues soon | ||
jnthn | You never emit anything. | ||
konobi | RabidGravy: ah | 21:49 | |
skids | Ah. | ||
jnthn | So there's never a value to head. | ||
RabidGravy | nine, it can't find some libraries which are "used" in the test files | ||
lizmat | .tell TimToady commit 625d1c5116c3314dd broke sub a() { return 1,2,:3c }; dd a # List $var = $(1, 2, 3) | ||
yoleaux | lizmat: I'll pass your message to TimToady. | ||
jdv79 | esp since pause currently requires the version value to start with a v. | ||
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
hankache_ left
|
|||
skids | jnthn++ | 21:50 | |
lizmat | jdv79: PAUSE does that ?? I didn't think PAUSE did anything like that on upload ? | ||
jnthn | skids: Dunno what you golfed that from, but you may find it easier to write $f.Supply.do(&say).head(1).Promise | ||
jdv79 | its old but its unclear what to do even today. S22 says v. | 21:51 | |
i asked in here the other day and nobody seemed to be able to agree on much of anything | |||
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:( | |||
lizmat | :-( | 21:52 | |
21:53
castelo joined
|
|||
jdv79 | it actually does /^v\d+/ so its broke in any case but still | 21:53 | |
Skarsnik | lol what | ||
jdv79 | i wish someone would clear it up | ||
its from years ago... | |||
who starts a verion off with an alpha anyway but still its legal | 21:54 | ||
TimToady | lizmat: I see where it went wrong, thanks | ||
yoleaux | 21:49Z <lizmat> TimToady: commit 625d1c5116c3314dd broke sub a() { return 1,2,:3c }; dd a # List $var = $(1, 2, 3) | ||
jdv79 | m: Version.new($_).say for v1.1, "v1.1" # is this really what we want? | 21:56 | |
camelia | rakudo-moar 514ba8: OUTPUT«v1.1vv.1.1» | ||
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:57 | |
21:57
kaare_ left
|
|||
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:58 | |
21:58
castelo left
|
|||
Skarsnik | m: say v1.2.3.Str; | 21:59 | |
camelia | rakudo-moar 514ba8: OUTPUT«v1.2.3.Str» | ||
Skarsnik | m: say (v1.2.3).Str; | ||
camelia | rakudo-moar 514ba8: OUTPUT«1.2.3» | ||
jnthn | nine: Yeah, you'll just have to grab it through the MOP | ||
nine: .HOW.find_private_method or so | |||
Skarsnik | that's confusing x) | ||
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 | ||
jnthn | nine: +1 | ||
nine | But first: sleep. Good night! | 22:01 | |
Skarsnik | jdv79, fill a bug? | ||
jdv79 | nite | ||
where? p6 specs? | |||
jnthn | rest well, nine o/ | ||
jdv79 | i can fix pause but i'm not sure what we want | ||
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 | |
oh well, don't care if it's slow, it works and that's an improvement over last time I tried | |||
Skarsnik | ahaha yes | ||
lizmat | nine: after the past patches, my precomp errors in spectest are gone ! | 22:04 | |
so the only issue on OS X is t/spec/S32-array/adverbs.t , test 21 | |||
flussence | ...aaaaand now I get a gazillion undef warnings each time I open a repl *sigh* | 22:05 | |
Skarsnik | blame the sink thingy x) | ||
flussence | from "sub guess_library_name" line 179..189 | ||
RabidGravy | blame it on the boogie | 22:06 | |
Skarsnik | Oh, blame me then x) | ||
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... | ||
Skarsnik | hm | ||
that really weird | |||
guess_lib_name should be called only the first time a C routine is called | 22:09 | ||
dalek | kudo/nom: 72b5e77 | TimToady++ | src/Perl6/Actions.nqp: relax EVAL to allow literal strings Sometimes you want EVAL to just switch languages, such as to Perl 5. For a literal string there can be no injection attack. |
22:10 | |
Skarsnik | or REPL is doing something weird | ||
kudo/nom: 2047786 | TimToady++ | src/Perl6/Actions.nqp: return failed to return raw args |
|||
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:11 | |
stmuk | m: constant Test=1; eval 42 | 22:12 | |
camelia | rakudo-moar 514ba8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/bsDvqWH940Undeclared routine: eval used at line 1. Did you mean 'EVAL', 'val'?» | ||
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 | ||
camelia | ( no output ) | ||
stmuk | ahh | ||
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") | ||
stmuk | m: constant Test=1; EVAL "say 42" | ||
camelia | rakudo-moar 514ba8: OUTPUT«42» | ||
22:14
xfix left
|
|||
TimToady | or probe for Test and one or more of its exports | 22:14 | |
22:14
xfix joined
|
|||
TimToady | but it was a complete bloodbath if I didn't make an exception for testing one way or another :) | 22:15 | |
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 | ||
TimToady | I actually had a special export symbol for a while as one of my experiments, but pulled it back out for some reason | ||
dalek | p: 50a3cc0 | (Pawel Murias)++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java: Fix pow_i on the JVM backend. |
22:17 | |
22:18
pmurias joined
|
|||
flussence | Skarsnik: on my system? All I see that *might* be libnoise is «~/code/rakudo/install/share/perl6/site/resources/7B814DD107CC3AAF25E4DDE37E2CA226EF34CB51.so» | 22:18 | |
22:18
mohae left
|
|||
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... | ||
ilmari | pmurias: don't you need to fix the cast on the Math.pow() too? | ||
Skarsnik | I mean the code x) | ||
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 | ||
dalek | p: 5563da9 | (Pawel Murias)++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java: Fix nqp::pow_i some more. |
||
pmurias | ilmari: yes | 22:20 | |
ilmari | pmurias: :) | ||
awwaiid | What did IO::String become? | 22:21 | |
oh wait, lib | 22:22 | ||
22:22
BenGoldberg joined
|
|||
dalek | kudo/nom: a624c37 | TimToady++ | lib/Test.pm6: export token to default MONKEY-SEE-NO-EVAL to true This is less likely to collide with a user name than "Test" is. |
22:23 | |
22:23
mohae joined
|
|||
Skarsnik | return in given still exit the routine? | 22:25 | |
gfldex | lolibloggedalittle: gfldex.wordpress.com/2015/12/20/i-...-them-now/ | ||
lizmat | gfldex++ | 22:26 | |
masak | gfldex++ | 22:27 | |
gfldex: s/basicly/basically/ | |||
dalek | osystem: 576a299 | skids++ | META.list: Add Proc::Screen to ecosystem Also includes Test::Screen for testing terminal based applications where GNU screen is available |
||
hahainternet | m: say ("a", "aa" ... *)[4] | 22:29 | |
camelia | rakudo-moar 514ba8: OUTPUT«ad» | ||
hahainternet | not quite what i expected there | ||
easily specified explicitly i know | |||
just, a little nasty compared to how it reads | 22:30 | ||
pmurias | what do we use nqp::scdisclaim for? | ||
lucasb | hahainternet: did you want ('a' x *)(4) ? | 22:32 | |
jnthn | pmurias: I'm not sure we do any more | ||
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 | ||
hahainternet | lucasb: does that work? | ||
lucasb | hahainternet: idk if that's what you wanted, but it returns "aaaa" | 22:34 | |
jnthn | m: say ('a' x *)(4) | ||
camelia | rakudo-moar a624c3: OUTPUT«aaaa» | ||
hahainternet | oh, not on my perl6 | ||
hahainternet builds afresh | |||
oh wait, ( vs [ | |||
jnthn | Yeah, it's not building a sequence of them | ||
hahainternet | yeah, it was the infinite sequence part i was playing with really | ||
jnthn | m: say ('a', * ~ 'a' ... *)[4] | ||
camelia | rakudo-moar a624c3: OUTPUT«aaaaa» | ||
hahainternet | oh you can do that without the { } block syntax | 22:35 | |
good to know | |||
jnthn | m: say ('', * ~ 'a' ... *)[4] # or this, depending what you want | ||
camelia | rakudo-moar a624c3: OUTPUT«aaaa» | ||
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 | ||
lucasb | .oO( will it resume afterwards? :) |
22:37 | |
22:38
BenGoldberg left
|
|||
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 | |
? | |||
jnthn | xx * | ||
lucasb | duh! I knew it was simple | 22:46 | |
thanks, jnthn | |||
jnthn | Note if you want the list flattend into it you probably have to use | | ||
m: say ((1, 2) xx *)[^10] | |||
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))» | ||
jnthn | m: say (|(1, 2) xx *)[^10] | ||
camelia | rakudo-moar a624c3: OUTPUT«(1 2 1 2 1 2 1 2 1 2)» | ||
lucasb | ^^ yeah, I really like that (|<...> xx *) flattens there | 22:47 | |
anyway, here are 2 more ways to write "aaaa": | |||
m: say (^Inf).map('a' x *)[4] | |||
camelia | rakudo-moar a624c3: OUTPUT«aaaa» | ||
lucasb | m: say (('a' xx *) Zx ^Inf)[4] | 22:48 | |
camelia | rakudo-moar a624c3: OUTPUT«aaaa» | ||
gfldex | m: say 'a' xx * Z=> 1,2,3; # you may not need the fallening, depending on context | ||
camelia | rakudo-moar a624c3: OUTPUT«(a => 1 a => 2 a => 3)» | ||
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 | |
*handle | |||
Maybe tomorrow on the plane... :) | 22:50 | ||
dalek | kudo/nom: 3c31b8b | jnthn++ | src/Perl6/Metamodel/ (3 files): Treat multis with identical sigs as collisions. This means a class can resolve such a collision by implementing a multi with the signature matching the colliding ones. |
||
masak | nice. | 22:51 | |
22:51
loren joined
|
|||
jnthn | Hm, suddenly the hotel internets won't resolve github.com?! | 22:52 | |
dalek | ast: 4bf7660 | jnthn++ | S14-roles/composition.t: Unfudge multi/role/conflict tests. |
||
jnthn | phew | ||
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? | ||
Skarsnik | we can have multi in role now? x) | ||
hahainternet | if i wrap it in () it doesn't seem very happy about it | 22:54 | |
or maybe i'm just doing something wrong, it is 11pm and i should sleep | |||
yep, it was syntax errors on my part | |||
jnthn | Skarsnik: You always could, but now we pay attention to their signatures | 22:55 | |
Skarsnik: So a multi foo(Int $x) { ... } in a role means you must write a multi foo(Int $x) { ... } in a class composing it. | |||
Before you just got an ambiguous dispatch 'cus we didn't pay attention to ... in multis in the role composer. | 22:56 | ||
22:56
n0tjack left
|
|||
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; | ||
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 …» | ||
rakudo-moar a624c3: OUTPUT«"x => 5""y => 6""z => 7"» | |||
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; | ||
camelia | rakudo-moar a624c3: OUTPUT«x=5"y => 6""z => 7"» | ||
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(); | ||
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 …» | ||
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(); | |||
camelia | rakudo-moar a624c3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/bZ2cTfnCWiMulti method 'foo' with signature :(B $: Int $, *%_) must be implemented by B because it is required by a roleat /tmp/bZ2cTfnCWi:1» | ||
loren | Anyone know this problem... -_- | ||
jnthn | Has to be a multi in the class too | ||
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(); | ||
camelia | rakudo-moar a624c3: OUTPUT«hello» | ||
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__hashMethod 'foo' must be implemented by B because it is required by a roleat /tmp/tJkJ__hash:1» | ||
Skarsnik | that still does not wor | ||
*work | |||
jnthn | That needs an explicit proto method writing | ||
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) | ||
loren | Please help have a look at the code above, and i have to go to work .. | ||
jnthn | We generate it for you, though too late for it to help with role composition | 23:02 | |
May be able to loosen that in the future. | |||
Skarsnik | That look more like a bad workaround for me x) | ||
jnthn | Well, tough luck. | ||
Or patches welcome. | |||
Skarsnik | But I guess it's because multi is part of the signature? | ||
jnthn | No | ||
It's 'cus multis don't go in the method table | 23:03 | ||
They're always installed under a proto | |||
23:04
virtualsue left
|
|||
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 | ||
camelia | rakudo-moar a624c3: OUTPUT«a<b>c» | ||
dalek | kudo/nom: e8d924c | TimToady++ | src/Perl6/Actions.nqp: change from Test to &MONKEY-SEE-NO-EVAL() Now the default depends on a special sub defined and exported by Test. This sub must return true, so it's possible to shadow it in an inner scope with a sub that returns false instead. (Though generally if you're gonna do that, you should just use/no MONKEY-SEE-NO-EVAL instead.) |
||
23:04
n0tjack joined
|
|||
lucasb | ^^ so, this should be "a<b>c" or "<a>bc" ? | 23:04 | |
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 | ||
loren | lucasb, yeah, i think so.. | ||
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
spider-mario left
|
|||
jnthn | I've got a kinda bad feeling about the solutions I've considered so far, though. | 23:06 | |
Anyway, a post-Christmas issue. | 23:07 | ||
The requirements from roles composed by roles I really should fix though. | |||
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:08
n0tjack left
|
|||
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 | ||
geekosaur | ah | ||
that seems like it's going to trip people | |||
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 . | ||
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
|
|||
loren | bye , everyone | 23:10 | |
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:11 | |
loren | I will check chat log when i come back form work.. | 23:12 | |
23:12
loren left
|
|||
lucasb | geekosaur, TimToady: I don't fully understand all the details, so... IOW, the code is working as expected? :) | 23:13 | |
TimToady | yes | ||
lucasb | ah, ok. thanks TimToady++ and geekosaur++ | ||
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 | ||
camelia | rakudo-moar e8d924: OUTPUT«42» | ||
TimToady | m: use Test; say EVAL 42 | ||
camelia | rakudo-moar e8d924: OUTPUT«5===SORRY!5=== Error while compiling /home/camelia/rakudo-m-inst-2/share/perl6/sources/5A873B6C22E600D8BE41B8846C251CD7D914CFE3EVAL 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
|
|||
TimToady | I think we need to nuke the precomp Test for camelia | 23:14 | |
dalek | kudo/nom: af5b39a | lizmat++ | src/core/Regex.pm: Fix for #126972 |
23:15 | |
23:17
rurban_ joined
23:19
n0tjack left
|
|||
RabidGravy | TimToady++ # that'll be harder to do by mistake :) | 23:21 | |
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:22 | |
23:22
pmurias left
|
|||
jnthn | 'night, #perl6 | 23:23 | |
TimToady | safe travels | ||
jnthn | Thanks! | ||
23:24
cygx left
23:26
RabidGravy left
23:31
molaf left
|
|||
TimToady | m: use Test; say EVAL 42 | 23:31 | |
camelia | rakudo-moar af5b39: OUTPUT«42» | ||
TimToady | that's better | ||
stmuk | m: constant Test=1; EVAL "say 42" | ||
camelia | rakudo-moar af5b39: OUTPUT«42» | ||
lizmat | m: EVAL 42 | ||
camelia | rakudo-moar af5b39: OUTPUT«5===SORRY!5=== Error while compiling /tmp/lrgcj1ygNMEVAL 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…» | ||
TimToady | m: EVAL "say 42" | 23:32 | |
camelia | rakudo-moar af5b39: OUTPUT«42» | ||
TimToady | literal string is now okay | ||
lizmat | m: EVAL "42" | ||
camelia | ( no output ) | ||
TimToady | m: EVAL "say 42", :lang<Perl5> | ||
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…» | ||
lizmat | I guess an int coerced to a Str isn't | ||
well, that's strange anyway :-) | |||
TimToady | no, but why would you do that unless you were testing? | ||
stmuk | m: constant Test=1; EVAL "42" | ||
camelia | ( no output ) | ||
TimToady | so it's a convenient proxy for a dangerous expression | ||
m: constant Test = 1; EVAL 42 | 23:33 | ||
camelia | rakudo-moar af5b39: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ror6olrzqSEVAL 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 = …» | ||
TimToady | that's what you were looking for, I think | ||
stmuk | TimToady++ | ||
TimToady | m: sub MONKEY-SEE-NO-EVAL() { 1 }; EVAL 42 | ||
camelia | ( no output ) | ||
TimToady | m: sub MONKEY-SEE-NO-EVAL() { 0 }; EVAL 42 | 23:34 | |
camelia | rakudo-moar af5b39: OUTPUT«5===SORRY!5=== Error while compiling /tmp/JlN9XIwLvMEVAL 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…» | ||
TimToady | that's what it's using now | ||
but the pragma still overrides regardless | |||
23:34
xfix left
|
|||
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/BhC7ofXF0pEVAL 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-…» | ||
TimToady | the stub routine only sets the default if no pragma is in evidence | ||
so Test can set a general default but individual scopes can still choose their own settings | 23:36 | ||
m: use MONKEY; BEGIN say %*PRAGMAS.keys | 23:37 | ||
camelia | rakudo-moar af5b39: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7CUfUPRIquAn exception occurred while evaluating a BEGINat /tmp/7CUfUPRIqu:1Exception details: 5===SORRY!5=== Error while compiling  Cannot find method 'keys': no method cache and no .^find…» | ||
TimToady | m: use MONKEY; BEGIN say %*PRAGMAS | ||
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» | ||
AlexDaniel | m: /a/ | 23:38 | |
camelia | ( no output ) | ||
TimToady | (it's a BOOTHash, is what's going on there with .keys) | ||
23:38
raiph joined
|
|||
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 => 1Dynamic variable %*PRAGMAS not found in block <unit> at /tmp/yYXpbkPa3I:1Actually thrown at: in blo…» | ||
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 => 1MONKEY-BRAINS => 0, MONKEY-BUSINESS => 0, MONKEY-GUTS => 0, MONKEY-SEE-NO-EVAL => 0, MONKEY-SHINE => 0, MONKEY-TR…» | ||
awwaiid | I love this naming scheme | ||
diakopter | speaking of monoculture | 23:40 | |
23:40
Begi joined
|
|||
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!" | ||
) | |||
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 | |
or $*ACTIONS, for that matter | |||
lizmat | TimToady: are they tested in roast ? | 23:42 | |
TimToady | that won't stop people from presuming | ||
gfldex | I'M WARNED BY CAPITALS | 23:43 | |
23:44
lucasb left
|
|||
TimToady | there are tests for %?LANG, presumably non-working | 23:45 | |
m: say %?LANG | |||
camelia | rakudo-moar af5b39: OUTPUT«5===SORRY!5=== Error while compiling /tmp/VtWxNvlO86Variable '%?LANG' is not declaredat /tmp/VtWxNvlO86:1------> 3say 7⏏5%?LANG» | ||
jdv79 | is there any possibility that pod6 could be rendered without requiring runtime deps of the surrounding code? | ||
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:46 | |
23:47
TEttinger joined
|
|||
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 | ||
jdv79 | its kind of a heavy burden to have to install everything just to output docs | ||
that's why i ask | |||
TimToady | it's a reasonable question | ||
I think 95% of docs would have no trouble ignoring the deps | 23:48 | ||
jdv79 | cool | ||
TimToady | unless it's 97.329% | ||
jdv79 | "most" is fine with me | ||
TimToady | in fact, we should probably assume that's the default, and specially mark any pod that does require the deps | 23:49 | |
TimToady assumes he should take a nap | 23:51 | ||
zzz & | |||
awwaiid | I like | ||
23:53
firstdayonthejob left
|
|||
jdv79 | TimToady: that seems nicer, yes... | 23:55 | |
23:56
Begi left
|