»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
Juerd if-defined ... -> $var { ... } 00:00
b2gills That was an early name
Juerd Same semantics as 'with', but I'd have gone for a different name.
Right. A better one imho :)
Doesn't matter anymore
But it is how I'd explain the feature to someone who's new to Perl 6 00:01
"Just read it as if-defined"
b2gills I've actually thought recently it could have been 「if $a.expensive-method where .defined -> $v {...}
Juerd And suddenly it makes sense. It would to me, at least :)
That's very unclear about execution order
Because normally with 'where', the refinement is executed much later than the declaration itself. 00:02
But maybe I'm reading your example wrong. I'm reading it as if $a.?expensive-method -> $v { ... } 00:03
b2gills my $v = $a.expensive-method; if $v.defined {...}
Juerd Oh 00:04
Why's the expensiveness relevant?
I thought you picked an .expensive-method because you wanted to avoid that it ran unnecessarily
b2gills if $a.quick.defined { say $a.quick }
Juerd But you're running .expensive-method unconditionally... 00:05
b2gills exactly
Juerd Oh, you're just topicalizing it so it doesn't run twice?
I'd topicalize even the quick one.
Just because it's nicer code... 00:06
Juerd loves DRY...
b2gills I'm actually responsible for pointing out that pain point that resulted in with
Juerd II see
s/II/I/
Did Perl 6 ever deliver on if being a function? 00:08
b2gills m: sub if { say 'no' }; if(0)
camelia rakudo-moar 865bf3: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Calling if(Int) will never work with declared signature ()␤at <tmp>:1␤------> 3sub if { say 'no' }; 7⏏5if(0)␤»
b2gills m: sub if { say 'no' }; if()
camelia rakudo-moar 865bf3: OUTPUT«no␤»
Juerd Oh 00:09
b2gills 「if」 can be thought of as a macro, and a better macro design is planned 00:10
Juerd I think I might even go for a simple given ... -> $x { if $x.defined { ... } }
00:11 tardisx joined
Juerd I was just thinking that maybe if could take named arguments, and those could influence what if tested for, and that :D could do that. 00:11
It would look a bit like :D types
(Which I don't like much either, visually) 00:12
Hotkeys why not use docs.perl6.org/language/control#wit...2C_without 00:24
given ... -> $x { with $x { ... } }
Juerd:
b2gills Hotkeys: That's where the discussion started 00:29
Hotkeys oh
oops
I only caught the tail end
b2gills Hotkeys: I noticed you are on #p6dev which was rename to #perl6-dev 00:30
Hotkeys oh so I am
ty
I haven't really been paying much attention to this place for like a solid 2 months 00:31
b2gills now the only person that is in #p6dev, but not #perl6-dev is saaki
I've noticed your absence 00:32
00:37 rvchangue left 00:41 rvchangue joined 00:44 ifim joined
Juerd Hotkeys: Because I find 'with' and 'without' confusing because my mind does not interpret those as conditionals 00:47
Hotkeys: While I normally wouldn't avoid idiomatic code simply because it might confuse newbies, with Perl 6, almost everyone is a newbie. 00:48
So while I would just write "sub slurp { local (@ARGV, $/) = @_; <> }" in Perl 5, I'd hesitate to write 'with' in Perl 6... :) 00:49
Er, shift, not @_.
Hotkeys yeah I don't like the names either 00:52
00:52 ifim left 01:02 tardisx left 01:07 tardisx joined, tbrowder left 01:08 tardisx left 01:14 kid511 joined 01:15 molaf left 01:16 kid51 left 01:18 tardisx joined
sammers_ hello, is there a way to interpolate a single quoted string later? for example, my $forlater = 'this is a $template'; then use it later like this: say "$forlater"; and have it interpolate $var. I know that example doesn't work, but I am looking for a simple way to template a string with some varibles that I will pass later. 01:23
grondilu I suspect you would need an EVAL 01:24
sammers_ maybe even something like this: my $forlater = 'this <var> should be replated later'...
01:24 firstdayonthejob left 01:25 lushkava left
grondilu my $forlater = 'this is $var'; my $var = "foo"; say EVAL '"$forlater"'; 01:25
m: my $forlater = 'this is $var'; my $var = "foo"; say EVAL '"$forlater"';
camelia rakudo-moar 865bf3: OUTPUT«this is $var␤»
grondilu hum
sammers_ hmm
Juerd query jnthn
argh, missing a /
01:26 grassass joined
grondilu sammers_: are you sure you don't want to use a function? That'd be so easier. 01:27
m: my $forlater = 'this is $var'; my $var = "foo"; say EVAL '$forlater';
camelia rakudo-moar 865bf3: OUTPUT«this is $var␤»
sammers_ yeah, I can. I was just wondering if there was something built in to handle this type of situation.
grondilu m: my $forlater = 'this is $var'; my $var = "foo"; say $forlater.interpolate 01:28
b2gills m: my $for-later = 'this %s should be replaced later'; say 'thing'.fmt: $for-later
camelia rakudo-moar 865bf3: OUTPUT«Method 'interpolate' not found for invocant of class 'Str'␤ in block <unit> at <tmp> line 1␤␤»
rakudo-moar 865bf3: OUTPUT«this thing should be replaced later␤»
01:28 molaf joined
grondilu m: say ''.^methods 01:28
camelia rakudo-moar 865bf3: OUTPUT«(BUILD Int Num chomp chop pred succ simplematch match ords samecase samemark samespace word-by-word trim-leading trim-trailing trim encode NFC NFD NFKC NFKD wordcase trans indent codes chars uc lc tc fc tclc flip ord WHY WHICH Bool Str Stringy DUMP ACCEPTS…»
grondilu m: my $forlater = 'this is $var'; my $var = "foo"; say qq{}.new($forlater) 01:30
camelia rakudo-moar 865bf3: OUTPUT«Default constructor for 'Str' only takes named arguments␤ in block <unit> at <tmp> line 1␤␤»
01:31 firstdayonthejob joined 01:36 kid511 left
b2gills Rather than a string with a replacement, why not a code object? 01:36
m: my $forlater = -> :$var {"this is $var"}; my $var = "foo"; say $forlater( :$var )
camelia rakudo-moar 865bf3: OUTPUT«this is foo␤»
b2gills m: my $forlater = {"this is {CALLERS::<$var>}"}; my $var = "foo"; say $forlater()
camelia rakudo-moar 865bf3: OUTPUT«this is foo␤»
Hotkeys m: my $forlater = {"this is $var"}; my $var = "foo"; say $forlater() 01:38
camelia rakudo-moar 865bf3: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$var' is not declared. Did you mean '&VAR'?␤at <tmp>:1␤------> 3my $forlater = {"this is 7⏏5$var"}; my $var = "foo"; say $forlater()␤»
Hotkeys m: my &forlater = {"this is $var"}; my $var = "foo"; say forlater 01:39
camelia rakudo-moar 865bf3: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$var' is not declared. Did you mean '&VAR'?␤at <tmp>:1␤------> 3my &forlater = {"this is 7⏏5$var"}; my $var = "foo"; say forlater␤»
01:39 jack_rabbit joined
Hotkeys i c 01:39
repl fooled me into thinking this worked
but I am a fool
b2gills Yeah I regularly put braces around lines in the REPL so that variables don't show up when I don't expect them 01:40
sammers_ bg2gills, how would I pass multiple vars to "my $forlater = -> :$var {"this is $var"}; my $var = "foo"; say $forlater( :$var )" 01:42
sorry, b2gills 01:43
I guess I could just pass a hash 01:44
01:46 ilbot3 left 01:47 ilbot3 joined 01:50 tardisx left 01:51 tardisx joined 01:55 tardisx left, labster left 02:00 tardisx joined
b2gills m: #`(you may want to use positionals) my $forlater = -> $var, $othervar {"this is $var, $othervar"}; my $var = "foo"; say $forlater( $var, 'other' ) 02:00
camelia rakudo-moar 865bf3: OUTPUT«this is foo, other␤»
b2gills m: #`(you may want to use positionals) my $forlater = {"this is $^a, $^b"}; my $var = "foo"; say $forlater( $var, 'other' ) 02:01
camelia rakudo-moar 865bf3: OUTPUT«this is foo, other␤»
b2gills m: my $forlater = {"this is $^b, $^a"}; my $var = "foo"; say $forlater( $var, 'other' )
camelia rakudo-moar 865bf3: OUTPUT«this is other, foo␤»
02:01 jack_rabbit left
sammers_ b2gills, thanks for sharing these options, I am going to spend sometime working with passing a hash. I am trying to make this as generic as possible. 02:08
02:09 labster joined, jack_rabbit joined
b2gills m: my $forlater = {"this is %_<var>"}; my $var = "foo"; say $forlater( :$var, :other<other> ) 02:09
camelia rakudo-moar 865bf3: OUTPUT«this is foo␤»
02:21 zzzzzzzz1 joined 02:22 huggable left, huggable joined 02:29 noganex joined 02:32 noganex_ left, molaf left
timeless Juerd: yeah, junctions was weird 02:44
i eventually figured it out from knowing/understanding enough about perl
but i would have asked for an explanation
yada?? www.irccloud.com/pastebin/elOGnSqa/ 02:53
can i get p6 to provide a stack trace when it dies? 02:54
02:58 MasterDuke joined
llfourn timeless: --ll-exception gives a lower level stack trace 02:59
timeless also, is `perl6` the command documented in docs.perl6.org?
[Coke] like, command line args? 03:00
don't see it on the site, no 03:01
MasterDuke .tell lizmat Nice weekly, always an interesting read. As an FYI, myself, MasterDuke17, and Daniel Green are all one person 03:02
yoleaux MasterDuke: I'll pass your message to lizmat.
llfourn wonders what part of the cli args are part of roast
we have "S19-command-line-options" and "S19-command-line" as dirs in roast 03:04
llfourn wonders what the difference is
03:08 MasterDuke left 03:12 grassass left, HoloIRCUser1 joined 03:13 HoloIRCUser1 left 03:17 TakinOver left 03:25 tardisx left 03:34 tardisx joined 03:41 aries_liuxueyang left 03:43 aries_liuxueyang joined 03:59 atweiden joined
timeless m: my %x = << \" => quote, % => percent, & => amp, - => dash, . => dot, / => slash, < => lt, > => gt, ? => question, \\ => blackslash >>; 04:05
camelia ( no output )
timeless m: my %x = << \" => quote, % => percent, & => amp, - => dash, . => dot, / => slash, < => lt, > => gt, ? => question, \\ => blackslash >>; %x
camelia rakudo-moar 865bf3: OUTPUT«WARNINGS for <tmp>:␤Useless use of %x in sink context (line 1)␤»
timeless m: my %x = << \" => quote, % => percent, & => amp, - => dash, . => dot, / => slash, < => lt, > => gt, ? => question, \\ => blackslash >>; say %x
camelia rakudo-moar 865bf3: OUTPUT«{" => =>, & => =>, . => =>, < => =>, => => blackslash, ? => =>, amp, => -, dot, => /, lt, => >, question, => \, quote, => %}␤»
timeless um, that doesn't look right at all 04:06
04:07 tardisx left
timeless oh 04:08
04:09 grondilu left
gfldex m: my %x = << \" => quote, % => percent, & => amp, - => dash, . => dot, / => slash, < => lt, > => gt, ? => question, \\ => blackslash >>; dd %x 04:10
camelia rakudo-moar 865bf3: OUTPUT«Hash %x = {"\"" => "=>", "\&" => "=>", "." => "=>", "<" => "=>", "=>" => "blackslash", "?" => "=>", "amp," => "-", "dot," => "/", "lt," => ">", "question," => "\\", "quote," => "\%"}␤»
gfldex i would guess you confused camelia
timeless m: my %tm = << < lt > gt & amp % percent # hash - dash . dot ? question / slash \\ blackslash \" quote >>;
camelia rakudo-moar 865bf3: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in shell-quote words; couldn't find final '>>' ␤at <tmp>:1␤------> 3/ slash \\ blackslash \" quote >>;7⏏5<EOL>␤ expecting any of:␤ prefix␤ sh…»
04:11 tardisx joined
timeless m: my %x = ≪ a b c d ≫; say %x 04:11
camelia rakudo-moar 865bf3: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed initializer␤at <tmp>:1␤------> 3my %x =7⏏5 ≪ a b c d ≫; say %x␤ expecting any of:␤ prefix␤ term␤»
gfldex m: my %x = << \", quote, %, percent, &, amp, -, dash, ., dot, /, slash, <, lt, >, gt, ?, question, \\, blackslash >>; dd %x 04:12
camelia rakudo-moar 865bf3: OUTPUT«Hash %x = {"\"," => "quote,", "\%," => "percent,", "\&," => "amp,", "-," => "dash,", ".," => "dot,", "/," => "slash,", "<," => "lt,", ">," => "gt,", "?," => "question,", "\\," => "blackslash"}␤»
timeless m: my %x = « a b c d »; say %x 04:13
camelia rakudo-moar 865bf3: OUTPUT«{a => b, c => d}␤»
04:13 Cabanossi left
gfldex m: dd <<a => b>> 04:13
camelia rakudo-moar 865bf3: OUTPUT«("a", "=>", "b")␤»
gfldex m: dd \" => 'quote'
camelia rakudo-moar 865bf3: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in double quotes; couldn't find final '"' ␤at <tmp>:1␤------> 3dd \" => 'quote'7⏏5<EOL>␤ expecting any of:␤ argument list␤ double quotes␤ …»
gfldex m: dd '"' => 'quote'
camelia rakudo-moar 865bf3: OUTPUT«"\"" => "quote"␤»
timeless my %x = « < lt > gt & amp % percent # hash - dash . dot ? question / slash \\ blackslash \" quote»; say %x; 04:15
04:15 Cabanossi joined
timeless m: my %x = « < lt > gt & amp % percent # hash - dash . dot ? question / slash \\ blackslash \" quote »; say %x; 04:15
camelia rakudo-moar 865bf3: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in shell-quote words; couldn't find final '»' ␤at <tmp>:1␤------> 3 \\ blackslash \" quote »; say %x;7⏏5<EOL>␤ expecting any of:␤ prefix␤ s…»
timeless ?!@
my local perl6 says this www.irccloud.com/pastebin/ddpI8vch/ 04:16
the {} output is odd
because i can't roundtrip it
otoh, i can't figure out how to get camelia to accept it, so,..
my %x = « < lt > gt & amp % percent # hash - dash . dot ? question / slash \\ blackslash \" quote »; say %x; 04:17
m: my %x = « < lt > gt & amp % percent # hash - dash . dot ? question / slash \\ blackslash \" quote »; say %x;
camelia rakudo-moar 865bf3: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in shell-quote words; couldn't find final '»' ␤at <tmp>:1␤------> 3 slash \\ blackslash \" quote »; say %x;7⏏5<EOL>␤ expecting any of:␤ prefix␤ s…»
04:18 skids joined
gfldex m: my %x = << \" quote, % percent, & amp - dash . dot / slash < lt > gt ? question \\ blackslash >>; dd %x 04:18
camelia rakudo-moar 865bf3: OUTPUT«Hash %x = {"\"" => "quote,", "\%" => "percent,", "\&" => "amp", "-" => "dash", "." => "dot", "/" => "slash", "<" => "lt", ">" => "gt", "?" => "question", "\\" => "blackslash"}␤»
timeless so, shouldn't i be able to use your dd output? www.irccloud.com/pastebin/Zv9V9Iv7/ 04:22
m: my %x = {"\"" => "quote,", "\%" => "percent,", "\&" => "amp", "-" => "dash", "." => "dot", "/" => "slash", "<" => "lt", ">" => "gt", "?" => "question", "\\" => "blackslash"}
camelia rakudo-moar 865bf3: OUTPUT«Potential difficulties:␤ Useless use of hash composer on right side of hash assignment; did you mean := instead?␤ at <tmp>:1␤ ------> 3"?" => "question", "\\" => "blackslash"}7⏏5<EOL>␤»
gfldex the REPL may have a quoting bug. If you got the time golf it please. 04:23
timeless looks for a bot to explain `golf`
gfldex your OS and shell may provide clues too
timeless m: my %x = << \" quote, % percent, >>; dd %x 04:24
camelia rakudo-moar 865bf3: OUTPUT«Hash %x = {"\"" => "quote,", "\%" => "percent,"}␤»
timeless m: my %x = {"\"" => "quote,", "\%" => "percent,"}
camelia rakudo-moar 865bf3: OUTPUT«Potential difficulties:␤ Useless use of hash composer on right side of hash assignment; did you mean := instead?␤ at <tmp>:1␤ ------> 3= {"\"" => "quote,", "\%" => "percent,"}7⏏5<EOL>␤»
04:24 grassass joined 04:25 khw left, jevin joined
timeless grr, where did those `,`s come from? 04:25
m: my %x = {"\"" => "quote,"}; dd %x
camelia rakudo-moar 865bf3: OUTPUT«Potential difficulties:␤ Useless use of hash composer on right side of hash assignment; did you mean := instead?␤ at <tmp>:1␤ ------> 3my %x = {"\"" => "quote,"}7⏏5; dd %x␤Hash %x = {"\"" => "quote,"}␤»
timeless m: my %x = << \" quote >>; dd %x
camelia rakudo-moar 865bf3: OUTPUT«Hash %x = {"\"" => "quote"}␤»
timeless m: my %x = {"\"" => "quote"}
camelia rakudo-moar 865bf3: OUTPUT«Potential difficulties:␤ Useless use of hash composer on right side of hash assignment; did you mean := instead?␤ at <tmp>:1␤ ------> 3my %x = {"\"" => "quote"}7⏏5<EOL>␤»
timeless is thoroughly confused 04:27
gfldex m: my %x = "\"" => "quote";
camelia ( no output )
gfldex m: my %x = { "\"" => "quote" }(); dd %x; 04:28
camelia rakudo-moar 865bf3: OUTPUT«No such method 'CALL-ME' for invocant of type 'Hash'␤ in block <unit> at <tmp> line 1␤␤»
gfldex m: my %x = { "\"", "quote" }; dd %x; %x = "\"" => "quote"; dd %x; 04:29
camelia rakudo-moar 865bf3: OUTPUT«Odd number of elements found where hash initializer expected␤ in block <unit> at <tmp> line 1␤␤»
gfldex m: my %x = { "\"", "quote" }; dd %x;
camelia rakudo-moar 865bf3: OUTPUT«Odd number of elements found where hash initializer expected␤ in block <unit> at <tmp> line 1␤␤»
gfldex { a => b } creates an anon hash with a key of a => b and no value 04:30
timeless ok..
gfldex m: my %x = {}; my Hash $y; dd %x, $y;
camelia rakudo-moar 865bf3: OUTPUT«Potential difficulties:␤ Useless use of hash composer on right side of hash assignment; did you mean := instead?␤ at <tmp>:1␤ ------> 3my %x = {}7⏏5; my Hash $y; dd %x, $y;␤Hash %x = {}␤Hash $y = Hash␤»
gfldex m: my %x; my Hash $y; dd %x, $y; 04:31
camelia rakudo-moar 865bf3: OUTPUT«Hash %x = {}␤Hash $y = Hash␤»
gfldex m: my %x; my Hash $y .=new ; dd %x, $y;
camelia rakudo-moar 865bf3: OUTPUT«Hash %x = {}␤Hash $y = ${}␤»
gfldex assiging an empty hash to a %-sigiled container is useless indeed
04:32 jack_rabbit left
gfldex m: sub f(:$a){ dd $a }; f(|{a => False}); 04:32
camelia rakudo-moar 865bf3: OUTPUT«Bool $a = Bool::False␤»
gfldex you need anon hashs to turn them into a capture and feed them into subs (that got named args) 04:33
timeless ok, maybe? 04:35
gfldex and dd is not meant for round tripping. Use .perl for that.
trust me, it all makes sense :) 04:36
04:36 molaf joined
timeless m: my %x = « < lt > gt & amp % percent # hash - dash . dot ? question / slash \\ blackslash \" quote »; say %x.perl; 04:36
camelia rakudo-moar 865bf3: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in shell-quote words; couldn't find final '»' ␤at <tmp>:1␤------> 3h \\ blackslash \" quote »; say %x.perl;7⏏5<EOL>␤ expecting any of:␤ prefix␤ s…»
04:39 edehont joined
gfldex m: my %x = qw{ < lt > gt & amp % percent # hash - dash . dot ? question / slash \ backslash " quote }; say %x.perl; 04:40
camelia rakudo-moar 865bf3: OUTPUT«{"\"" => "quote", "#" => "hash", "\%" => "percent", "\&" => "amp", "-" => "dash", "." => "dot", "/" => "slash", "<" => "lt", ">" => "gt", "?" => "question", "\\" => "backslash"}␤»
gfldex timeless: ^^^
timeless m: my %x={"\"" => "quote", "#" => "hash", "\%" => "percent", "\&" => "amp", "-" => "dash", "." => "dot", "/" => "slash", "<" => "lt", ">" => "gt", "?" => "question", "\\" => "backslash"}; say %x.perl
camelia rakudo-moar 865bf3: OUTPUT«Potential difficulties:␤ Useless use of hash composer on right side of hash assignment; did you mean := instead?␤ at <tmp>:1␤ ------> 3 "?" => "question", "\\" => "backslash"}7⏏5; say %x.perl␤{"\"" => "quote", "#" => "hash", "\%" => …»
timeless ...
gfldex m: my %x={"\"" => "quote", "#" => "hash", "\%" => "percent", "\&" => "amp", "-" => "dash", "." => "dot", "/" => "slash", "<" => "lt", ">" => "gt", "?" => 04:41
camelia rakudo-moar 865bf3: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing required term after infix␤at <tmp>:1␤------> 3slash", "<" => "lt", ">" => "gt", "?" =>7⏏5<EOL>␤ expecting any of:␤ prefix␤ term␤»
gfldex m: my %x="\"" => "quote", "#" => "hash", "\%" => "percent", "\&" => "amp", "-" => "dash", "." => "dot", "/" => "slash", "<" => "lt", ">" => "gt", "?" => "question", "\\" => "backslash"; say %x.perl
camelia rakudo-moar 865bf3: OUTPUT«{"\"" => "quote", "#" => "hash", "\%" => "percent", "\&" => "amp", "-" => "dash", "." => "dot", "/" => "slash", "<" => "lt", ">" => "gt", "?" => "question", "\\" => "backslash"}␤»
04:42 xinming left
gfldex you tried to create an anon hash with a list of pairs inside 04:42
timeless ok, i guess i did that.. 04:44
04:44 jack_rabbit joined
timeless was that wrong? 04:44
gfldex you tell the compiler that you want to store a hash either with the %-sigil or with container typed as Hash. 04:45
after you got the container setup you can initialise it with a list of values (that got even elements) or with a list of Pair. 04:46
timeless ok..
gfldex stuffing an anon Hash inside makes no sense because that would be a list with 1 element. Besides Perl 6 wants to be able to warn in a few spots where you got a block (as in code) assigned to the wrong thing. 04:47
it can tell in some cases that you got an anon Hash with Pairs inside but for Hash initialisation that's not the default. 04:48
the grammar makes a difference between "normal" stuff and syntax inside function call arguments 04:49
timeless i'm trying to decide if i'm lost 04:50
let's try some principles
you told me there's a .perl attribute
i expect it to be useful and intuitive
04:50 labster left
gfldex the .perl method should roundtrip and if it didn't that's a bug. Unless you are talking to camelia or the REPL, then the bug can be with those. 04:51
timeless m: my %x = {"\"" => "quote", "#" => "hash", "\%" => "percent", "\&" => "amp", "-" => "dash", "." => "dot", "/" => "slash", "<" => "lt", ">" => "gt", "?" => "question", "\\" => "backslash"}; say %x.perl 04:52
camelia rakudo-moar 865bf3: OUTPUT«Potential difficulties:␤ Useless use of hash composer on right side of hash assignment; did you mean := instead?␤ at <tmp>:1␤ ------> 3 "?" => "question", "\\" => "backslash"}7⏏5; say %x.perl␤{"\"" => "quote", "#" => "hash", "\%" => …»
gfldex .say will truncate after 100 elements and try it's best to provide a human readable form. If you dump stuff on screen or a logfile that can be helpful to avoid out of screen or out of disk space problems.
timeless presumably that's what you mean by should roundtrip?
or did i do it wrong?
gfldex m: my %x = "\"" => "quote", "#" => "hash", "\%" => "percent", "\&" => "amp", "-" => "dash", "." => "dot", "/" => "slash", "<" => "lt", ">" => "gt", "?" => "question", "\\" => "backslash"; say %x.perl 04:53
camelia rakudo-moar 865bf3: OUTPUT«{"\"" => "quote", "#" => "hash", "\%" => "percent", "\&" => "amp", "-" => "dash", "." => "dot", "/" => "slash", "<" => "lt", ">" => "gt", "?" => "question", "\\" => "backslash"}␤»
timeless oh
i'm not supposed to use the {}s?
m: 5.perl
camelia ( no output )
gfldex the problem here is that .perl on the container gives you the content of the container. The type information is lost, so .perl will stick it into {};
timeless m: (5).perl
camelia ( no output ) 04:54
timeless m: say (5).perl
camelia rakudo-moar 865bf3: OUTPUT«5␤»
timeless but it doesn't stick 5 into a container
gfldex it does not need to because integers are easy to spot
there is a difference between a Hash and a List of Pair. In the latter case order will be maintained 04:55
timeless so... naively, i expect .perl output to be useful for assignment
.perl seems to be violating that
gfldex m: {b => 1, a => 1}.perl.say; (b => 1, a => 1).perl.say;
camelia rakudo-moar 865bf3: OUTPUT«{:a(1), :b(1)}␤(:b(1), :a(1))␤»
gfldex m: my $x = {b => 1, a => 1}; $x.perl.say; 04:56
camelia rakudo-moar 865bf3: OUTPUT«${:a(1), :b(1)}␤»
04:57 atweiden left
gfldex .perl maintains the difference between a scalar container with an anon Hash and a Hash container and it's content by using ${} or {} 04:57
doc.perl6.org/routine/perl 05:00
05:00 sortiz joined
sortiz \o #perl6 05:00
gfldex m: sub f(){}; &f.perl.say; 05:01
camelia rakudo-moar 865bf3: OUTPUT«sub f () { #`(Sub|69254984) ... }␤»
gfldex timeless: .perl will do it's best but don't bet on it. It's not a general serialisation solution.
05:15 grondilu joined 05:17 aries_liuxueyang left 05:18 aries_liuxueyang joined 05:25 tardisx left 05:28 tardisx joined 05:29 araujo left 05:33 skids left, tardisx left, AZ__ joined 05:34 tardisx joined
AZ__ hi 05:34
gfldex m: say "Ohai AZ__!" 05:35
camelia rakudo-moar 865bf3: OUTPUT«Ohai AZ__!␤»
05:43 domidumont joined 05:45 sno left 05:47 domidumont left 05:48 domidumont joined 05:54 xinming joined 05:55 FROGGS joined 06:12 girafe left, Zero_Dogg left 06:13 Zero_Dogg joined, Zero_Dogg left, Zero_Dogg joined 06:14 wamba joined 06:17 FROGGS left 06:22 huggable left, huggable joined 06:24 tardisx left 06:26 AZ__ left, espadrine joined 06:27 FROGGS joined 06:28 domidumont left 06:32 tardisx joined, FROGGS_ joined 06:34 FROGGS_ left 06:35 FROGGS left 06:40 firstdayonthejob left 06:43 darutoko joined 06:54 CIAvash joined 06:55 sno joined 06:57 edehont left 07:02 grassass left 07:04 _mg_ joined 07:09 cpage joined, Zoffix left 07:11 rindolf joined 07:12 Zoffix joined 07:13 FROGGS joined 07:17 TEttinger left 07:20 FROGGS_ joined, zakharyas joined 07:23 FROGGS left 07:24 domidumont joined 07:30 grassass joined
lizmat clickbaits p6weekly.wordpress.com/2016/06/13/...ng-to-tpc/ 07:33
yoleaux 03:02Z <MasterDuke> lizmat: Nice weekly, always an interesting read. As an FYI, myself, MasterDuke17, and Daniel Green are all one person
lizmat .tell MasterDuke Daniel Green it is :-) 07:34
yoleaux lizmat: I'll pass your message to MasterDuke.
07:36 AlexDaniel joined 07:39 bjz joined 07:40 FROGGS__ joined 07:43 FROGGS_ left, FROGGS joined 07:44 FROGGS__ left 07:49 grazzazz joined, grassass left 07:50 grazzazz left 07:51 grassass joined 07:54 bjz left 07:57 espadrine left, stevieb left 08:01 RabidGravy joined, fhorck left 08:04 tardisx left 08:06 zakharyas left 08:08 ocbtec joined, zakharyas joined 08:09 bjz joined 08:10 dakkar joined 08:12 _mg_ left 08:13 _mg_ joined 08:18 _mg_ left 08:23 iH2O joined, labster joined 08:27 Emeric joined 08:29 iH2O left
dalek k-simple: bb615f0 | azawawi++ | / (7 files):
Add LevelBar widget
08:51
k-simple: 77ec479 | azawawi++ | / (7 files):
Merge pull request #51 from azawawi/master

Add LevelBar widget
09:02 _mg_ joined 09:14 araujo joined 09:26 Ven joined, Ven left, Ven joined, wamba left 09:27 user9 left, melezhik joined, user9 joined
melezhik Hi! Does anybody give me an advise on Perl6 module to deal with ssh? 09:27
09:29 Amnez777 joined 09:30 wamba joined 09:32 azawawi joined
azawawi hi 09:32
github.com/niner/Inline-Perl5 and metacpan.org/pod/Net::SSH2 ? :) 09:33
melezhik: Maybe use github.com/niner/Inline-Perl5 and metacpan.org/pod/Net::SSH2 ?
melezhik thanx, :azawawi , so, no pure perl6 implementation yet? 09:34
azawawi melezhik: not that im aware of atm 09:35
melezhik ok, thanks anyway, will take it for a spin ... )))
09:35 cognominal joined, wamba left
azawawi melezhik: have fun :) 09:36
melezhik azawawi: I will do ))) !
azawawi The halls of #perl6 chat has been rather silent of late. Any particular reason? :) 09:39
azawawi throws a needle
09:39 Calibellus left
gfldex gets a magnet 09:40
nine Everyone just happily hacking on?
gfldex i hope that better docs lead to less questions
psch FSVO "happily" :)
azawawi nine: :)
09:40 wamba joined
moritz also, we now have separate channels for several other concerns 09:40
azawawi GTK::Simple is working perfectly on MacOS X el capitan btw :) 09:41
sortiz happily hacking
moritz like compiler development, toolchain, releases
moritz semi-happily hacking on non-p6 stuff
09:42 abraxxa1 joined, abraxxa left
azawawi moritz: Can we deprecate the usage of 'use GTK::Simple' in favor of loading specific modules to make loading faster? 09:42
jnthn azawawi: Why deprecate it? Folks can use it for convenience in development and if they want to optimize later just pull in what they need? 09:43
I'd certainly prefer to have one `use` statement in code examples I show :)
Not to mention that it'll likely be fast enough in the future for this not to be a concern :)
psch wonders what's behind GTK::Simple being only a bunch of 'require's 09:44
jnthn No idea, but I struggle to see that helping matters ;)
azawawi psch: because 'use'-s are slower
jnthn That sounds...odd. As in, hiding the real issue.
(Which is fine for now, but it'd be good to understand what's actually going on there.) 09:45
psch yeah, kind of confirms my suspicion of "loading would always be slow and we shouldn't fix that by telling people to load less modules"
azawawi jnthn: when i refactored the big GTK::Simple into separate module, performance suffered a lot
jnthn: something seems to be re-parsed
jnthn Re-parsed would be odd in that we should be loading pre-comp'd stuff 09:46
azawawi psch: true but if you need x and y widgets then load x and y widgets
jnthn There was once some issue whereby any module that used NativeCall ended up with a huge precomp output though
I dunno if that got investigated/resolved or not
azawawi jnthn: ::Raw maybe?
psch azawawi: eh, if you're *that* concerned about performance, write ASM vOv 09:47
azawawi tests that theory
jnthn azawawi: Well, how many of the modules use NativeCall?
psch ...well, that probably came of a bit more snarky than i wanted :/
azawawi psch: precompiling that list is a lot of time github.com/perl6/gtk-simple/blob/m...Simple.pm6
jnthn azawawi: Also, if you run wiht -Ilib, could check the file sizes of *.moarvm 09:48
psch azawawi: yeah, but as soon as it's precompiled it should be fast. and precomp usually happens at installation time
azawawi psch: 150+ wall seconds on a fresh .precomp
psch azawawi: stick with jnthn, he's more likely to help right now ;)
09:48 rurban_ joined
azawawi removes .precomp folders and runs GTK::Simple test suite again to check file sizes 09:50
09:51 abraxxa1 left
azawawi jnthn: first run 124 wall seconds. 42 MB '.precomp' folder size 09:52
09:52 kalkin- joined
kalkin- hi 09:52
when should i use panda and when do I need zef? What is the big difference between this to apps?
jnthn azawawi: 42 MB?!?! 09:53
azawawi: OK. "Something's going on."
psch that's what, around 6 times CORE?
azawawi jnthn: gist.github.com/azawawi/6d58ec6c87...202f35f986 09:54
jnthn psch: Something like, yeah 09:55
psch: And I'm rather sure GTK::Simple is less code ;)
psch kalkin-: fwiw, i generally use zef when panda doesn't seem to work 09:56
azawawi jnthn: ~31 GTK widgets so far
psch kalkin-: i'm aware that's not really a good metric or explanation, but the big difference is that they're not the same implementation and thus have different features
jnthn azawawi: Yeah. Could file an RT about that? I'm tied up with $dayjob stuff now, but certainly want to look into why that's so huge. 09:57
azawawi: I suspect whatever's making them so big is also what's to blame for the slowness. 09:58
azawawi jnthn: well all of them use GTK::Simple::Raw which is like ~1k lines 09:59
jnthn: i tried dividing ::Raw into ::Raw::XYZWidget but then i hit a bigger wall when i finished with the refactor :( 10:00
psch azawawi: CORE.setting is almost 39k lines and produces something in the area of a 7 mb .moarvm file
azawawi: so as jnthn++ says, there's probably something weird in how NC blows up the .moarvm files
kalkin- psch: i see, thanks 10:01
azawawi any link to that bug?
the NC bug that is
10:01 Ven left
jnthn azawawi: I don't know that I've seen a bug report, I just heard mentioned some time ago that things using NativeCall can end up with huge pre-comp files 10:02
And this discussion reminded me of it :)
azawawi jnthn: cool
right now more GTK widgets = worst performance because of maybe that NC bug 10:03
10:03 abraxxa joined
azawawi thus GTK::Simpler [shameful advertising :)] solves this problem github.com/azawawi/perl6-gtk-simpl...-world.pl6 10:05
github.com/azawawi/perl6-gtk-simpl...impler.pm6
the funny thing dividing ::Raw into smaller units (e.g. gtk_widget_ NC prefix => G:S:Raw::Widget) made matters worse 10:07
so basically more 'use NativeCall's = bigger problem because of modularization 10:08
10:10 cognominal left 10:11 cognominal joined 10:12 bjz_ joined 10:14 bjz left
nine A.pm consisting only of "use NativeCall;" -> 48K .precomp 10:14
A.pm consisting of use NativeCall; sub foo is native(Str) { * } -> 984K .precomp 10:15
jnthn o.O
That's none too cheap :)
What happens if you add a second is native sub?
nine 988K 10:16
jnthn OK. I suspect some kind of accidental repossession.
melezhik HI! Anybody knows how to set LIB PATH for perl6 ( aka PERL5LIB in pelrl5) ? Thanks
nine When there's an overhead of > 900K for every module using NativeCall, it's no wonder splitting Gtk::Simple quickly adds up :) 10:17
DrForr perl6 -Ipath/to/dir/
jnthn nine: Right :)
nine melezhik: there's also PERL6LIB
10:17 ggoebel116 left
nine melezhik: perl6 --help tells about it 10:17
melezhik thanks! 10:18
10:20 zakharyas left 10:21 ggoebel116 joined 10:22 huggable left, darutoko- joined, huggable joined 10:24 zakharyas joined
nine jnthn: it's NativeCall's EXPORT sub. When I remove HAS-decl related code, .precomp is down to 36K 10:24
10:25 darutoko left
nine jnthn: the nqp::bindkey(%*LANG, 'MAIN', $MAIN-grammar.HOW.mixin($MAIN-grammar, HAS-decl-grammar)); and nqp::bindkey(%*LANG, 'MAIN-actions', $MAIN-actions.HOW.mixin($MAIN-actions, HAS-decl-actions)); lines make all the difference. 10:26
jnthn ouch
nine Which is no wonder, isn't it? 10:27
jnthn No, that's no surprise.
It's going to end up with a derived copy of the grammar and its NFAs.
And similar for actions 10:28
Though at least no NFAs there
azawawi watches how GTK::Simple will be faster and starts to dance :)
nine A complete copy of Perl6's grammar and whatever NFAs actually are for every little module that make up Gtk::Simple. Can't be small :)
Zoffix AlexDaniel, ROFL. I knew you were gonna bring up the colors! And I actually had a dream tonight about you questioning my commits (some different one though)
AlexDaniel :)
Zoffix: which commits? 10:29
Zoffix AlexDaniel, this is the font colour github.com/perl6/doc/blob/master/h...e.css#L167 and line 150 is the background. Go wild :)
AlexDaniel, I don't remember any more. They might've been not real commits :)
azawawi nine: github.com/rakudo/rakudo/blob/nom/...l.pm6#L452 , right?
nine azawawi: yes 10:30
AlexDaniel Zoffix: actually, I've tried several different font colors but nothing works well on such background color :/ Dunno
nine It's for supporting the HAS syntax for CStructs
jnthn If it'd just been done as a trait (`is inlined`) or some such, we'd not have this problem. 10:31
10:32 ggoebel116 left
psch well, except we want Slangs in general, and they'll always have that problem, no? 10:32
jnthn psch: Well, at some point we can slog through the hard work of figuring out some smarter way to do this stuff, I guess. Like partial invalidation and stuff. But it's non-trivial. 10:33
AlexDaniel Zoffix: OK, this one works very well: files.progarm.org/2016-06-14-13332..._scrot.png
psch right, but deprecating the existing NC interface temporarily is a bad idea aiu
timeless hrm, there's no `perl6 -d`? :(
AlexDaniel XD
jnthn We could just pull HAS up into Rakudo's Grammar.nqp/Actions.nqp 10:34
10:34 _mg_ left
moritz ... and spell it CAN HAZ 10:34
azawawi timeless: github.com/jnthn/rakudo-debugger ? 10:35
Zoffix AlexDaniel, better than gray, sure.
AlexDaniel Zoffix: :D
timeless azawawi: interesting (and disappointing, since there's a grammar error on that page)
AlexDaniel Zoffix: there's something magical about this combination
timeless AlexDaniel: i had an error for you a while ago... 10:36
AlexDaniel timeless: yes, I've just woke up! :)
timeless: wanna add something?
jnthn timeless: Yes, clearly a grammar error in a readme means the software must be shit! :P 10:37
10:37 vibha joined
azawawi :) 10:37
jnthn timeless: Send me your github ID and I'll give you a commit bit so you can fix it. :P
10:37 _mg_ joined
azawawi cant wait for his new PC to be finished... AMD FX-8150 bye bye... welcome i7 6700 :) 10:38
AlexDaniel jnthn: actually, that's often the case
10:38 _mg_ left
Zoffix tries to figure out if AlexDaniel is being sarcastic 10:40
though I see "zoffix" as search term and a file name with scrot[um]? in it.... 10:41
AlexDaniel Zoffix: scrot is a gnu/linux thingy for taking screenshots
Zoffix Why are you ":D"ing? :)
And "XD"ing 10:42
jnthn lunch &
AlexDaniel Zoffix: you have a really interesting monitor if that screenshot looks alright to you :)
Zoffix AlexDaniel, I'm red-green colorblind, maybe that's why 10:43
Looks nice to me
timeless m: my %x = « < lt > gt & amp % percent # hash - dash . dot ? question / slash \\ blackslash \" quote »; say %x;
camelia rakudo-moar 865bf3: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in shell-quote words; couldn't find final '»' ␤at <tmp>:1␤------> 3 \\ blackslash \" quote »; say %x;7⏏5<EOL>␤ expecting any of:␤ prefix␤ s…»
10:43 _mg_ joined
timeless AlexDaniel: i'm not sure i get why camelia doesn't like this 10:43
AlexDaniel Zoffix: oh, alright, then my sarcasm didn't make any sense
psch m: say << # this is a comment >>
camelia rakudo-moar 865bf3: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in shell-quote words; couldn't find final '>>' ␤at <tmp>:1␤------> 3say << # this is a comment >>7⏏5<EOL>␤ expecting any of:␤ argument list␤ shell-…»
psch timeless: that ^^^ is why
timeless ah 10:44
hrm... sometimes i thought i didn't need the \ ...
psch m: say < # this isn't a comment > 10:45
camelia rakudo-moar 865bf3: OUTPUT«(# this isn't a comment)␤»
timeless jnthn: can i use it on linux? 10:46
10:47 _mg_ left
AlexDaniel Zoffix: I should actually be less stupid next time… 10:48
timeless psch: i don't get it <> is differently special from « » ? 10:49
psch m: say q:w/# no comment/; 10:50
camelia rakudo-moar 865bf3: OUTPUT«(# no comment)␤»
psch m: say q:ww/# yes comment/
camelia rakudo-moar 865bf3: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Couldn't find terminator / (corresponding / was at line 1)␤at <tmp>:1␤------> 3say q:ww/# yes comment/7⏏5<EOL>␤ expecting any of:␤ /␤»
10:50 jack_rabbit left
psch timeless: they're shorthands for those two quote adverbs 10:50
timeless: see doc.perl6.org/language/quoting 10:51
timeless so, why does perl6-debug-m `s` seem to be `run`? www.irccloud.com/pastebin/gNfBTfwp/
psch: so, is there a flavor that lets me have `<`, `>`, and `#` as values w/o quoting? :)
bonus points for `"` `/` and `\` :) 10:52
Zoffix AlexDaniel, you can try it out here. Upload your image. www.color-blindness.com/coblis-colo...simulator/ I think I got "Green-Weak/Deuteranomaly" 'cause I don't see much difference between the normal (I guess mine is just weaker)
psch m: say q:w!< > " / \ » # «!
camelia rakudo-moar 865bf3: OUTPUT«(< > " / \ » # «)␤»
timeless > bp add lib/Pod/Htmlify.pm6:1
Cannot add breakpoint to unknown file 'lib/Pod/Htmlify.pm6'
10:53 kalkin- left
literal so what's the Perl6-equivalent idiom of doing this in Perl5? "(?:" . join("|", map { quotemeta } @patterns) . ")" 10:55
timeless ~ instead of . 10:56
psch literal: /@patterns/
lizmat
.oO( there is no quotemeta )
timeless hrm 10:57
psch: so, i can't see the `<< >>` or `< >` article on doc.perl6 until i fix this 10:58
oh
q:w is that 10:59
psch timeless: the docs i linked are pretty extensive and well written :)
azawawi nine: after commenting those lines in NativeCall.pm6, first run 124 secs is now down to 95 seconds (~23% performance increase), second run 10 seconds... impressive :)
nine++
timeless m: my %x = q:w! < lt > gt & amp % percent # hash - dash . dot ? question / slash \\ blackslash \" quote !; say %x;
azawawi jnthn++
camelia rakudo-moar 865bf3: OUTPUT«{# => hash, % => percent, & => amp, - => dash, . => dot, / => slash, < => lt, > => gt, ? => question, \ => blackslash, \" => quote}␤»
azawawi nine: .precomp folder size is 4 MB :) 11:00
timeless m: my %x = q:w! < lt > gt & amp % percent # hash - dash . dot ? question / slash \\ blackslash " quote !; say %x;
camelia rakudo-moar 865bf3: OUTPUT«{" => quote, # => hash, % => percent, & => amp, - => dash, . => dot, / => slash, < => lt, > => gt, ? => question, \ => blackslash}␤»
timeless m: my %x = q:w! < lt > gt & amp % percent # hash - dash . dot ? question / slash \ blackslash " quote !; say %x; 11:01
camelia rakudo-moar 865bf3: OUTPUT«{" => quote, # => hash, % => percent, & => amp, - => dash, . => dot, / => slash, < => lt, > => gt, ? => question, \ => blackslash}␤»
11:06 kid51 joined
timeless jnthn: i don't suppose i can `wish` for `list` (show lines in file) or `bp (future file)` 11:09
11:12 labster left 11:13 azawawi left
jnthn timeless: Should be easier on Linux than Windows, given terminals on Linux support ANSI colors without needing extra work :) 11:14
timeless is on linux
well, gcc112 is linux
timeless is on windows but just uses putty
jnthn Setting a breakpoint on a file that isn't yet loaded? 11:15
timeless yes
also, it'd be nice if ^C brought me back to the debugger instead of killing the app 11:16
jnthn It's probably do-able...what's the use-case, ooc?
I think it was written before we had a way in Perl 6 to capture ^C :)
timeless i'm trying to debug htmlify.p6
i don't "know" it by heart
it has a submodule
moritz nobody does anymore
timeless i want to breakpoint the file when it starts loading
i want to be able to look at the lines it's about to debug 11:17
w/o a second terminal in `vi`
both future breakpoints and list are fairly standard in debuggers
jnthn Sure, but this was a debugger written in about 2 days ;-) 11:18
Agree they're both reasonable requests :)
Feel free to drop them in Issues 11:19
timeless also, given that this debugger thing exists, is there a plan to make `perl -d` map to it
ok
jnthn No plan for that at present, no 11:20
It's not clear that blessing any particular debugger as The One is a good plan.
(For the long run)
timeless i suppose i could make my shell map `perl6 -d` to `perl6-debugger-m` ... 11:23
any idea why the debugger just gets stuck? www.irccloud.com/pastebin/1kQNIi24/ 11:24
literal psch: hm I see. I wonder whether I could match that with some context, so I know can do something depending on which pattern matched
timeless 80: sub p2h($pod, $selection = 'nothing selected', :$pod-path = 'unknown') {
81: pod2html $pod,
11:28 darutoko- left
psch m: my @patterns = < abc def ghi >; "def" ~~ /(@patterns)/; say %(@patterns.antipairs){$0} 11:30
camelia rakudo-moar 865bf3: OUTPUT«1␤»
psch literal: ^^ somewhat like that maybe
literal I suppose 11:31
timeless jnthn: also, any way for me to get `up` / `down`? 11:36
timeless would like to see $file from a frame... www.irccloud.com/pastebin/D5MQGHdj/ 11:37
11:42 bjz joined 11:43 bjz_ left 11:45 darutoko joined 11:47 kid51 left, cognominal left
gregf_ oh, theres no quotemeta 11:48
11:49 cognominal joined
gregf_ m: my $str = "f-o&o"; $str ~~ s:g/$<c>=./{ my $val = $<c>; $val ~~ /^\"\%\&|\-|\.\/|\<|\>\?$/ ?? "\\$val" !! $val }/;say $str; 11:50
camelia rakudo-moar d92722: OUTPUT«f\-o&o␤»
literal is there a regex assertion to tell it to start matching from a certain position in a string?
psch literal: you mean "everything after this part of the regex is the capture group"? 11:51
gregf_ literal: positive lookbehind? 11:52
literal I mean more like ^ where ^ would mean e.g. char 50
rather than the beginning
psch [ . ** 50 ] <$rest-of-the-pattern> / ?
with / at the front too 11:53
gregf_ literal: you can just substr and then do the regex?
literal gregf_: I can, but I was guessing that would be more wasteful than something that tells it to just start matching at a certain position
psch no, regex are currently always more expensive than substr
literal alright 11:54
11:54 mr-foobar left
psch gregf_: your quotemeta-ish s/// doesn't handle all Perl 6 meta chars. also, we don't have it because we don't need it, because interpolation of variables in regex is explicitly either as Str or as regex pattern 11:55
gregf_ or call Inline::Perl5 ;) 11:58
AlexDaniel yeah, the question is why do you need quotemeta? 12:05
Juerd Quotemeta is useful because Perl is not the only case where \w is always safe and \ can escape everything else. 12:06
It's also pretty useful when you're *generating* a regex 12:07
That's why I resorted to writing _quotemeta in github.com/Juerd/p6-mqtt/blob/mast.../Client.pm
If there's a better way to generate regexes, than to build a string and interpolate that, I'd love to know. 12:08
sexy-coder-girl casually points out there's also String::Quotemeta in ecosystem 12:10
psch i do think it's interesting that Juerd++s quotemeta - in control to Perl 5 quotemeta - actually quotes meta characters :) 12:13
s/control/contrast/
12:15 sortiz left
psch m: use QAST:from<NQP>; my $x = QAST::Regex.new( :rxtype<altseq>, QAST::Regex.new(:rxtype<literal>, "foo"), QAST::Regex.new(:rxtype<literal>, "bar")); # humm 12:21
camelia ( no output )
psch that'd still need a CU around
and even if that works, it's definitely not quite a better way to generate a regex :)
sexy-coder-girl m: my $regex = rx{\w+}; say "foo bar ber" ~~ m:g/$regex/ 12:23
camelia rakudo-moar d92722: OUTPUT«(「foo」 「bar」 「ber」)␤»
psch although i suppose wrapping a few bits imported from QAST with convenience methods could make that somewhat feasible
12:23 cognominal left, tbrowder joined
gregf_ psch: so quotemeta is not needed because its handled in Perl6? 12:23
psch *and* it'd probably help a lot with understanding how regexen work under the hood in Perl 6 12:24
m: my $pat = '\w'; say '\w' ~~ /$pat/
camelia rakudo-moar d92722: OUTPUT«「\w」␤»
psch m: my $pat = '\w'; say 'a' ~~ /<$pat>/
camelia rakudo-moar d92722: OUTPUT«「a」␤»
melezhik Hi! If anybode knows what is perl6 way to require a file ? ( aka require "file" in perl5 )? sorry can't find in docs ...
gregf_ hmm, that would need quoting in Perl6
sexy-coder-girl melezhik: EVALFILE
psch gregf_: that's the two ways to use a variable in a pattern in Perl 6 Regex 12:25
sexy-coder-girl melezhik: or no
gregf_ m: my $str = "foo * - bar"; print $str ~~ /foo *.*bar/ && "yep" || "nope"; # that works. psch, that would need quoting in Perl5 iirc
camelia rakudo-moar d92722: OUTPUT«yep»
sexy-coder-girl melezhik: need
m: need Test; import Test; is-approx 4, 10 12:26
camelia rakudo-moar d92722: OUTPUT«not ok 1 - ␤␤# Failed test at <tmp> line 1␤# maximum absolute tolerance: 1e-05␤# actual absolute difference: 6␤»
gregf_ er, import? should that not be use? - ah, globals :|
sexy-coder-girl gregf_: no, it wouldn't need quoiting in P5. Only if $str were inside the regex 12:27
melezhik sexy-coder-girl: EVALFILE seems working for me, thanks!
sexy-coder-girl gregf_: use is compile time; need+import is run time (or so I believe)
Juerd Does anyone have a complete perl6-language archive?
sexy-coder-girl melezhik: alright then :)
Juerd There doesn't seem to be any good way to search it; google groups really sucks.
gregf_ sexy-coder-girl: yep, you're right 12:28
melezhik I also need a way to localy install my perl6 module so to play with it before uploading to perl6modules repo ... if any?
something like I usualy do with "make && make install"
sexy-coder-girl melezhik: zef install . or panda install . depending on the packaging manager you're using 12:29
melezhik ok, sounds good!
thanks
sexy-coder-girl May need --force flag if you're installing it multiple times
timeless is there a signal i can send to perl6 / perl6-debug-m to get a stack trace? 12:31
gregf_ sexy-coder-girl: thanks
timeless 85722 timeless 20 0 299520 297152 27264 R 100.0 0.1 51:02.95 moar
timeless wants to know what it's doing
12:31 _mg_ joined
gregf_ *does'nt remember ever doing a require in Perl5.. prolly PHP.. module::runtime::load* 12:32
timeless has done require in perl5 12:33
gregf_ it can be done, but its risky :| 12:34
melezhik I wonder if I can declare to install bin/* scripts via META.info; panda install . works fine; but I can't see if any binaries gets installed ... )) 12:37
Woodi WOW! how I could miss: if(1) printf("1"), printf("2\n"); all that years ??
12:38 vike left
Woodi vendethiel++ 12:38
gregf_ m: if(1) printf("1"), printf("2\n");
camelia rakudo-moar d92722: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3if(1)7⏏5 printf("1"), printf("2\n");␤ expecting any of:␤ infix␤ infix stopper␤ statement end␤ statement modifier␤ …»
gregf_ m: if(1) printf("1"); printf("2\n");
camelia rakudo-moar d92722: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3if(1)7⏏5 printf("1"); printf("2\n");␤ expecting any of:␤ infix␤ infix stopper␤ statement end␤ statement modifier␤ …»
Woodi gregf_: I mean in C :)
gregf_ oh
Woodi m: say do if 1 { say(42), say(111) } # FROGGS++ :) 12:40
camelia rakudo-moar d92722: OUTPUT«42␤111␤(True True)␤»
12:40 kaare_ joined, vike joined
sexy-coder-girl melezhik: they get automatically installed. I installed my P6 with rakudobrew and they are installed in ~/.rakudobrew/moar-nom/install/share/perl6/site/bin on my box 12:41
Woodi also: is there some switch/module/thing that can make all dispatch compile time ?
melezhik sexy-coder-girl: so, should I have to alter the PATH then?
12:42 cognominal joined
sexy-coder-girl melezhik: no. I'm saying they should be installed automatically somewhere in your perl6 dir. Did you install Rakudo Star? type which p6doc (or where p6doc) and that should be the dir where the binaries from your module were installed 12:43
perlpilot Woodi: You mean only dispatch by type and not by value?
melezhik panda --force --prefix=/tmp/foo install . works fine for me 12:44
but I can't see if binaries get installed if I go without prefix
> Did you install Rakudo Star? 12:45
hwo to check?
Woodi perlpilot: dispatch by "value" ? but I mean: at app deploy precompile it for faster execution, "freeze" becouse after deploy there are no new methods...
12:45 cdg joined
melezhik sexy-coder-girl: it is fine now, I see my binaries listed at ~/.rakudobrew/moar-nom/install/share/perl6/site/bin/ 12:46
sexy-coder-girl cool 12:47
m: multi foo ($x where * > 0) {"$x is big"}; multi foo ($x where * < 0){"$x is small"}; multi foo (0) {"tis zero!"}; say foo 5; say foo -3; say foo 0 12:49
camelia rakudo-moar d92722: OUTPUT«5 is big␤-3 is small␤tis zero!␤»
sexy-coder-girl Woodi: ^ dispatch happens when values are known
(in this case)
Woodi sexy-coder-girl: that's examples are by 'new type' for me :) 12:50
12:51 _mg_ left
psch Woodi: to "freeze" like that that you'd have to decide if there's any mixins, which you can't without running the program 12:52
Woodi: and while you're running it you already have (pre)compiled the program
12:52 darutoko left
psch Woodi: so that'd probably amount to some kind of code transformation 12:52
across the compilation border too, which is probably hard 12:53
fwiw, my first impulse was "isn't that a variation on the halting problem?", but i'm not so sure of that impulse
Woodi ok, I have no good explanation what I want but eg. what is difference in dispatch between C++ and Perl6 ? 12:54
psch C++ always knows at compile time which methods exist in a class' method table 12:56
perlpilot Woodi: C++ doesn't really do multi-dispatch. In Perl 6 all method calls are "virtual".
psch hm, actually maybe it doesn't, via "virtual"
perlpilot I guess I should have said "C++ doesn't do multi-dispatch, but there are ways that people fake it." 12:57
psch i don't think i know what "virtual method calls" are 12:58
Woodi psch: I think it's equivalent of virtual from C++. but can we "degrade" Perl6 to C level ? ;) just as "deplay app" proces...
psch Woodi: well, only if you can guarantee that you never change the method table at runtime
Woodi: which you can't really, i think
Woodi: that's only from a "is it possible", not "is it feasible or practicable" 12:59
Woodi psch: why ? when user gets app programmers are far far away...
psch Woodi: sorry, not "you" but the *compiler* has to guarantee it doesn't happen at runtime 13:00
Woodi MONKEY-DISABLE-MONKEY_EVAL ?
sexy-coder-girl m: class Foo {}; my $f = Foo.new; $f.^methods.say; $f = $f but role { method bar {}}; $f.^methods.say 13:01
camelia rakudo-moar d92722: OUTPUT«()␤(bar)␤»
sexy-coder-girl You can modify methods at runtime
perlpilot I'm sure we can create some compiler hints so that the programmer can say "There class methods will not change at runtime". I don't know that we can "enforce" this though so that the programmer can't break their promise.
psch would guess it's more trouble than it's worth 13:02
i don't think method resolution is our bottle neck
perlpilot yeah, way more trouble I would think
psch invocation overhead, maybe, but i don't think that could be helped by "pre-solving" resolution
13:03 stevieb9 left 13:04 azawawi joined
azawawi hi 13:04
Woodi in C++ virtual methods are slower then non-virtual. so, run-time dispatch is overhead...
hi azawawi
new rig in place ? :)
azawawi www.raidmax.com/chassis_ninja-ii.html :) 13:05
still going to install it after iftar (breaking fast) :)
Woodi azawawi: you will be installing/using windows ?
13:05 _mg_ joined
azawawi Woodi: yup. most probably win7 or 10 13:05
psch Woodi: i mean, if you can figure it out and it doesn't break things and does help for precomp MMD it'd probably get merged, so don't let me dissuade you from trying 13:06
Woodi ah. I was wondering about installing linux on Skylake
psch Woodi: i just don't think it has a worthy cost:benefit ratio
azawawi Woodi: if i remember correctly, win10 has better performance atm since they have a microcode update for skylake... but not 100% sure 13:07
[Coke] timeless: you know you can private message camelia, yes?
timeless [Coke]: yes
13:07 skids joined
Woodi azawawi: for win10 I need other pc to work as firewall ;) 13:08
and I'm so close to buy damn windoze license for gaming purpose :) 13:09
azawawi Woodi: cool 13:10
13:11 abraxxa left
azawawi Woodi: perl6 gaming rig? :) 13:11
13:11 melezhik left
timeless [Coke]: any way for me to know why perl6 is a taking a long time/what it's doing? 13:13
azawawi Woodi: i was going to buy an iMac... but they did not update the hardware in wwdc and mostly bad Apple dealer/very high pricing over here....
timeless 85722 timeless 20 0 324096 317952 28352 R 100.0 0.1 92:54.75 moar
(this is running perl6-debug-m ... htmlify.p6)
13:13 stevieb joined 13:14 AlexDaniel left
timeless it's only gotten to: 13:14
3/39: doc/Language/5to6-perlop.pod => language/5to6-perlop
azawawi time ./timeless # :)
timeless azawawi: it isn't going to finish
psch isn't htmlify always really slow?
timeless at this rate, it'd take weeks
psch: somewhat
and it's worse when you add things
but the debugger has made the previous things see *fast*
azawawi nine: ping 13:15
nine azawawi: pong
azawawi nine: any official fix for that 'use NC' bug? 13:16
nine azawawi: while finding the slowdown was easy, we'd need another way to support that HAS syntax and I don't know of any
psch well, lifting HAS to Perl6::Grammar would help 13:17
and jnthn did suggest it
nine Ah, yes, of course
azawawi it would be cool that 2016.06 ships with that fix 13:18
azawawi starts working on developer.gnome.org/gtk3/stable/Gt...-label-new 13:19
13:19 _mg_ left
azawawi developer.gnome.org/gtk3/stable/ch03.html 13:19
[Coke] timeless: htmlify is slow. running it through --profile or perl6-debug-m is just going to slow it down MORE. try running it with --sparse (to htmlify) to avoid doing work. also find the other options that don't highlight syntax...
FROGGS nine: ohh, what's wrong with HAS? 13:20
(or rather its implementation)
I dont know of the bug in question
psch FROGGS: just the normal %*LANG cloning for new ops 13:21
azawawi FROGGS: irclog.perlgeek.de/perl6/2016-06-14#i_12661602
FROGGS and that causes a major slowdown? or anything else?
nine FROGGS: MAJOR slowdown :) 13:22
psch well, GTK::Simple has a few dozend modules that use a NativeCall module
and each of those clones %*LANG...
FROGGS I see
I can move it to P6::G/A easily I guess...
azawawi FROGGS++
FROGGS k, will attempt to do that today on the train home 13:23
nine train++ ;)
FROGGS aye :o)
timeless can't figure out how to get the debugger to behave remotely usefully
is there a way to write something like `debugger.debughere` ?
azawawi .seen RabidGravy 13:24
yoleaux I saw RabidGravy 13 Jun 2016 14:19Z in #perl6: <RabidGravy> I can't remember the last time I actually used anything other than git diff
FROGGS timeless: I think there was a way to add a breakpoint to source code... 13:25
timeless: jnthn will know for sure
timeless there is
it seems unreliable at least the way i've tried using it
azawawi MacOS X -> macOS # now that's a lot of installation instruction replaces
timeless maybe it's more that `s` and `\n` behave irrationally 13:26
FROGGS I dunno
timeless azawawi: people will still be running Mac OS X for a while
FROGGS I'm a printf-debugger person :o)
timeless but a of of people have been writing macos instead of a while
so i think apple is taking advantage of that
plus, people have trouble counting past 10 13:27
RabidGravy boo!
timeless so everyone likes to reboot their numbering systems
azawawi timeless: so basically in installation instructions, Mac OS X / macOS :)
timeless pretty much
eventually macOS / Mac OS X
once X% have switched
say ~3 years? 13:28
FROGGS switched... to ubuntu? :P
timeless jnthn: so, `so` is unfortunate 13:29
i want `step-over` and `finish`
basically, the perl debugger likes substepping through complicated print for @foo; operations
but i want to step past that operation
and not leave the subroutine 13:30
jnthn timeless: Sorry, was tied up with work. :) So far as I remember (it's been a long time) there's not up/down, but pseudo-packages like CALLER::<$file> or so should work
timeless > s CALLER::<$file>
Nil
jnthn CALLERS::<$file> maybe
I think CALLER only looks one level down 13:31
timeless bt fwiw www.irccloud.com/pastebin/ighwKFw4/
13:31 Amnez777 left
timeless also nil 13:31
and, while it's pretty neat to watch the regex engine work, i want to finish that... 13:32
i'm in the regex engine, so i can't step out?! www.irccloud.com/pastebin/ImqVBCmy/
also, the way the debugger presents line numbers is odd... i *finally* figured out it was telling me the range of the lines it was showing 13:34
i'd rather it just prefix each line w/ its line number and have the thing that shows a range tell me the line i'm on...
FROGGS timeless: create tickets or pull requests 13:35
jnthn I'm afraid, given how limited my time is, it's mostly a case of "patches welcome" for the moment.
It's entirely possible to build/ship/use alternative UIs for the debugger.
FROGGS at least let us have tickets so we dont forget these things
jnthn Though I've no problem with somebody improving the current one in-place also. 13:36
But I really don't have time to do substantial work on it. :(
13:37 Amnez777 joined
timeless FROGGS: i'm somewhat concerned about filing 100 issues 13:37
FROGGS do them in batches :D
13:41 rurban_ left
FROGGS no really, please file them (via email, pretty simple) so we can improve 13:41
timeless email?
timeless just opened a couple on github.com/jnthn/rakudo-debugger/issues/
if that's the wrong place, i'm sorry, you've lost your time 13:42
FROGGS timeless: rakudo.org/tickets/
timeless i can allocate not more than an hour this week
jnthn timeless: No, that's the right place.
FROGGS ahh, alright
timeless i really really want to make progress on htmlify
but then i have to pack
jnthn FROGGS: The debugger UI is in that repo, only the driver is in the Rakudo repo...so on issues is fine.
FROGGS I see 13:43
[Coke] timeless: are you trying to do anything on htmlify other than "make it faster" ? 13:45
timeless yes
right now i want to fix symbol handling 13:46
which means understanding how this stuff works
[Coke] ah, ok
timeless is there a `locals` verb?
13:46 _mg_ joined
timeless i.e. show me my local variables 13:46
psch MY::.keys? 13:47
not sure that works in the debugger
timeless assume i'm here www.irccloud.com/pastebin/f4raH2U4/
MY::keys says nil, but i'm technically in call_with_capture
so it probably isn't wrong
i really want to be in line 5 (p2h) 13:48
no, MY::keys doesn't seem to be doing anything useful www.irccloud.com/pastebin/hc6FiUGE/
FROGGS MY::<dot>keys 13:50
timeless i think i'll have to switch to `comment+print+die` debugging
> p MY::<dot>keys
Two terms in a row
FROGGS no, a literal dot 13:51
<psch> MY::.keys?
timeless ($=pod !UNIT_MARKER $_ EXPORT ::?PACKAGE GLOBALish $?PACKAGE)
ok, that doesn't seem totally wrong, i guess, maybe?
psch that's the default vars in any scope
m: say MY::.keys
camelia rakudo-moar d92722: OUTPUT«($=pod !UNIT_MARKER EXPORT $_ $! ::?PACKAGE GLOBALish $¢ $=finish $/ $?PACKAGE)␤»
psch timeless: now you can stack CALLER:: infront to go up as many levels as you want
like, CALLER::CALLER::MY::.keys for two levels 13:52
m: say CALLER::
camelia rakudo-moar d92722: OUTPUT«PseudoStash.new(())␤»
timeless > p CALLER::MY::.keys
()
psch gr
m: say CALLER::MY::.keys
camelia rakudo-moar d92722: OUTPUT«()␤»
psch so you reach UNIT_OUTER already i guess
timeless > p CALLER::CALLER::MY::.keys
($vm_ctx $code $_ $! $*DISPATCHER RETURN $ctx $¢ $compiler $comp'd $/)
ok, so, that's something, i guess
$¢ ?
psch that's compiling a regex i think 13:53
timeless how do i look at it?
psch that variable is the current CURSOR while building a Match object
timeless > p CALLER::CALLER::$¢
Two terms in a row
psch need <> around the variable name
FROGGS m: $_ = 42; say MY::<$_>
camelia rakudo-moar d92722: OUTPUT«42␤»
FROGGS similar to this
timeless > p CALLER::CALLER::<$¢> 13:54
Nil
that's helpful
ok, interesting, and probably worth dumping into `help` 13:56
but, not workable
timeless gives up on the debugger and tries # + say + die
dalek c: f5bf984 | (Zoffix Znet)++ | / (2 files):
Improve the look of Not In Index search result message

Use Can Can color for text and Carmile. Closes #595
13:57
13:58 azawawi left
tbrowder hi, p6 people 13:59
timeless wonders where pod2html lives
sexy-coder-girl which pod2html 14:00
tbrowder yapc::na::2016 attendees: I have one of these stickers for you at the event, see: <tbrowder.net>
timeless sexy-coder-girl: the perl6 function, not the binary
short of using the debugger which hasn't helped me, can i ask perl6 to tell me what file defined a function?
moritz timeless: there's a Pod::To::HTML module (which you can find on modules.perl6.org/) 14:01
timeless moritz: i'm assuming that's what this is using
moritz and you can invoke it as perl6 --doc=HTML file
sexy-coder-girl timeless: &pod2html.file.say
FROGGS nine / azawawi: HAS is ported and works, I just need to convert a die and a warn to exceptions
timeless sexy-coder-girl: thx
stevieb sexy-coder-girl: that's a really cool feature
timeless [timeless@gcc2-power8 doc]$ perl6 -e 'use Pod::To::HTML; &pod2html.file.say' 14:02
site#sources/342151EED413708D1E987F0AFA636072F958391F (Pod::To::HTML)
that's an odd answer though
can i get it in the form of an absolute path to a real file? :)
it's actually moar-nom/install/share/perl6/site/sources/342151EED413708D1E987F0AFA636072F958391 14:03
but, i'd rather not have to grep to find the answer :)
FROGGS what about this? perl6 -e 'use Pod::To::HTML; &pod2html.file.IO.absolute.say'
dunno if this will work
timeless /home/timeless/hg/perl6/doc/site#sources/342151EED413708D1E987F0AFA636072F958391F (Pod::To::HTML)
psch probably have to go via CU::PrecompRepo first to turn the spec into a path
timeless that's almost a something 14:04
but i think it's totally wrong :)
FROGGS hehe
timeless sub pod2html($pod, :&url = -> $url { $url }, :$head = '', :$header = '', :$footer = '', :$default-title) is export returns Str { 14:06
is there a perl6toEnglish?
psch i think doc.perl6.org qualifies, even though it's incomplete :) 14:07
timeless $pod is a normal variable
:&url = -> $url { $url }
otoh...
sexy-coder-girl timeless: that's a `url' named param that takes a Callable and it's got a default value 14:08
psch that's just a named Callable with an identity function as default
timeless ok... 14:09
m: spurt.file.say 14:10
camelia rakudo-moar d92722: OUTPUT«spurt is disallowed in restricted setting␤ in sub restricted at src/RESTRICTED.setting line 1␤ in sub spurt at src/RESTRICTED.setting line 17␤ in block <unit> at <tmp> line 1␤␤»
sexy-coder-girl m: sub foo (:&say) { say "42"}; foo :say({ say "No! I will not say $^a" })
camelia rakudo-moar d92722: OUTPUT«No! I will not say 42␤»
sexy-coder-girl ehehehe
timeless: you're actually calling spurt in that instance. You missed the & sigil 14:11
timeless m: &spurt.file.say
camelia rakudo-moar d92722: OUTPUT«src/RESTRICTED.setting␤»
timeless ok... slightly less verbose-- i just wanted to confirm `internal function`
ok, i think what i want to futz with is actually $*DR.add-new(.. 14:13
sexy-coder-girl m: sub is-internal { say CORE::("&" ~ $^a) ?? "yup" !! "nope" }; sub foo{}; is-internal "foo"; is-internal "slurp"
camelia rakudo-moar d92722: OUTPUT«nope␤yup␤»
timeless sub find-references(:$pod!, :$url, :$origin) { 14:14
so, these are named variables, pod (! -- ?), url, origin? 14:15
psch timeless: Parameters
sexy-coder-girl timeless: yes, the ! means the var is required
psch doc.perl6.org/type/Signature#Positi..._vs._Named
timeless ok, if i want to change the value of one of these things 14:16
so that i can pass its modified value into a new callee w/ the same named argument name
sexy-coder-girl timeless: perl6.party/post/Perl-6-There-Are-T...t-1#iscopy
timeless been there, seen that, ok
is it `$url` or `:$url` ? 14:17
w/o the `:` it seems
sexy-coder-girl In which context?
timeless sub find-references(:$pod!, :$url is copy, :$origin) { 14:18
# munge $:url
register-reference(:$pod, :$origin, :$url);
oh brother
this won't work
if i have an actual url, ... sigh
14:20 cognominal left 14:22 huggable left, huggable joined 14:23 vibha left
timeless would people object to me pushing something like this? www.irccloud.com/pastebin/imJlU7F1/ 14:24
[Coke] can't see pastebin from here, sorry. 14:25
timeless um... www.irccloud.com/pastebin/eLqcXYGp/
14:25 FROGGS left
timeless [Coke]: basically refactor :url("/$kind/$filename") -- used 3 times in a row as $path="/$kind/$filename"; :url($path) 14:25
the second pastebin is {writing type document for nf{c,d}}*2 14:26
[Coke] sorry, I can't provide a yes/no off that... so I'd just submit a PR and see, if it's not too much work. 14:28
if it is, I'm sure someone else will come by. 14:29
14:29 Zero_Dogg left
timeless ok 14:30
so, fwiw, i /almost/ have tokens working
14:30 Zero_Dogg joined
timeless i now have a file named `and.html` 14:30
unfortunately, it has a link to:
<p><a href="slash-routine-slash-and">&#39;and&#39; is a infix operator</a> from <a
14:30 ptolemarch joined
[Coke] over eager deslashing? 14:31
timeless yeah
i'm hoping it's just one call that shouldn't be 14:32
actually :-( 14:33
`and` already was a page
eww
oh, right, my page would be `amp.html` 14:34
arnsholt timeless: A useful trick with named parameters is the :$foo notation, which expands to :foo($foo)
timeless arnsholt: that's actually what confused me
since that's all i saw
arnsholt Ah, right =) 14:35
timeless so, the useful trick is :foo($somethingelse) :)
arnsholt Depends, I guess =)
But it works both in signatures and in invocations
14:35 rurban joined
timeless should try removing most of the files from doc/ 14:36
(htmlify is slow, surely, processing less content would make it faster)
timotimo no need
there is an option for that
--sparse i believe
14:36 acrussell joined
timeless --sparse is too hard for me to follow 14:37
grr, i really want a signal handler that when triggered dumps the current call stack 14:38
Writing language document for Sets, Bags, and Mixes ...
^ great, but, it's been there for a while is it stuck, or?
14:39 girafe joined
[Coke] timeless: you're also exec'ing out to python to pygmentize stuff unless you passed in the right --arg. 14:39
timeless [Coke]: i /think/ i'm passing the right arg for that 14:40
[Coke] try: "make sparse"
timeless: ah, ok.
[Coke] wonders how long "make test" has been failing. :|
timeless hrm
[Coke] oh, maybe it's just my install. whew. 14:41
timeless sighs
so, um
the reason for the nfc thing
[timeless@gcc2-power8 Type]$ grep '=TITLE' NF*
NFC.pod:=TITLE class NFC
NFD.pod:=TITLE class NFD
NFKC.pod:=TITLE class NFC
NFKD.pod:=TITLE class NFD
[Coke] whew.
timeless lemme shelve my work and fix that 14:42
14:43 cognominal joined
dalek c: 2f21131 | (Josh Soref)++ | doc/Type/NFK (2 files):
fix titles for NFK*
14:43
Woodi yay :) Weatherapp: Part 2 just clicked how-to-write-tests button in my brain! Zoffix++ :) you want to know how ?
[Coke] could probably write a test that made sure that Type/foo.x had the right name in the title. 14:44
Woodi tests-are-good button was in masak++ blog :)
timeless [Coke]: i should have stopped all perl work for the week an hour ago
14:46 khw joined 14:47 edehont joined 14:48 zzzzzzzz1 is now known as zzzzzzzzz
Emeric how can I test if a value exist in a list ? 14:55
+ s
moritz m: if 'a' eq any( <a b c> ) { say "it's there, Emeric" } 14:56
camelia rakudo-moar d92722: OUTPUT«it's there, Emeric␤»
14:57 _mg_ left
Emeric thanks, moritz 14:57
sexy-coder-girl m: say so 'a' ∈ <a b c> 14:58
camelia rakudo-moar d92722: OUTPUT«True␤»
sexy-coder-girl Woodi: how?
moritz that's even nicer, sexy-coder-girl++
perlpilot sexy-coder-girl: I can't believe you've kept that nick this long. 14:59
14:59 FROGGS joined
sexy-coder-girl perlpilot: you remember it from 7 years ago? :) 14:59
Not sure how long "this long" is :) 15:00
perlpilot longer than about 5 minutes is too long IMHO :) 15:01
sexy-coder-girl Naah
perlpilot Has you gotten more ... "attention" with it? ;) 15:02
s/Has/Have/
15:02 acrussell left
sexy-coder-girl Well, I think the current conversation is a prime example of that :P 15:03
perlpilot :-P
15:13 _mg_ joined, rindolf left 15:14 _mg_ left, FROGGS left 15:17 _mg_ joined 15:25 edehont left 15:27 rurban_ joined, edehont joined 15:30 cognominal left 15:32 edehont left, acrussell joined
Woodi sexy-coder-girl: thank you for a question :) so, realy there is no such thing like "declarative" programming (as in: "Computer! Find me a landing spot!") - declarative and imperative are jast faces of one coin - given giveMeSum(2+1) _someone_ needed to actualy implement how to give the answer. so every API is "declarative" part and implementation is needed result. so, "testing" is just "how I use that 15:32
functions" - it is *using* of API! just ...
... like asking Computer (usually holographically displayed nice girl (in games at least)) - you can ask about non-existing (not implemented) functionality :)
...but I do not give any guqrantee about that theory. just works for me :) 15:33
15:34 acrussell left
Emeric m: say ("A B C 4536".split(/Zs/)).elems; #Why 1, and not 4 ? 15:34
camelia rakudo-moar d92722: OUTPUT«1␤»
perlpilot Emeric: what do you think /Zs/ does? 15:35
Emeric it separates by spaces ? 15:36
perlpilot Why do you think that? :)
Emeric is it wrong ? :-*
perlpilot m: "fooZsbarZsbaz".split(/Zs/).say
camelia rakudo-moar d92722: OUTPUT«(foo bar baz)␤»
perlpilot /Zs/ matches the literal string "Zs" 15:37
15:37 edehont joined
perlpilot m: "A B C 4536".split(/:Zs/).say; # I'm going to guess you just misread the docs for now 15:39
camelia rakudo-moar d92722: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unrecognized regex modifier :Zs␤at <tmp>:1␤------> 3"A B C 4536".split(/:7⏏5Zs/).say; # I'm going to guess you jus␤ expecting any of:␤ argument list␤ term␤»
Emeric oh yeah, I'm stupid
perlpilot m: "A B C 4536".split(/<:Zs>/).say; # I'm going to guess you just misread the docs for now
camelia rakudo-moar d92722: OUTPUT«(A B C 4536)␤»
15:39 mr-foobar joined
perlpilot blah, I couldn't even type it right 15:39
15:39 FROGGS joined
Emeric or i just can use : ("A B C 4536".split(' ')).elems 15:39
arnsholt perlpilot: Eh, a mere two attempts at getting the evalbot to do what you want counts as a success to me =) 15:40
timeless ok, i sorta have files picking reasonable names www.irccloud.com/pastebin/W2Aeq2j9/
but, i'm still missing `&` (amp) and `#` (hash)
Emeric thanks, perlpilot ! :)
FROGGS timeless: why dont you convert these to %26 etc? 15:41
timeless FROGGS: because google searches for % whatever aren't remotely helpful
and they make for crappy urls
FROGGS ohh, I was thinking this is about filesystem representation only 15:42
timeless i could split it, but that'd mean making the url handler much more complicated
it helps to think of things wholistically :)
15:43 raiph joined
FROGGS :o) 15:43
15:43 domidumont left
timeless Cannot use variable $english-name in declaration to initialize itself 15:46
at gen/moar/m-CORE.setting:21553 (/home/timeless/hg/perl6/rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:throw)
could rakudo possibly tell me the line number / column for that error?
my $english-name = english-for-tokens($name.subst(/<[/\\]>/,'_',:g);
print "$name -> $english-name\n";
spurt "html/$kind/$english-name.html", p2h($pod, $kind);
oh 15:47
15:47 mr-foobar left
FROGGS missing ) 15:47
timeless what that error actually meant was ... yeah
that
LTA
FROGGS aye
timeless perl5 was pretty good about "you seem to have a runon/it started here" 15:48
cute 15:49
the old code actually remapped `/` as `_` but no one told whomever was using that
which is why `/` doesn't work :)
localhost:3000/syntax/slash%20slash 15:50
Documentation for quote / /
that's like readable and stuff!
doc.perl6.org/syntax/_%20_
is where that is hiding today 15:51
which makes no sens
e
gregf_ perlpilot: is <:Zs> the same as /\s+/?
15:52 FROGGS left
arnsholt S05 says "\s now matches any Unicode whitespace character." so I think the two should be equivalent, yeah 15:53
gregf_ oh - unicode
arnsholt: ta
sexy-coder-girl Woodi: the obvious flaw in that reasoning is the "testing" part can be replaced with "using it in your code" :) 15:54
So it doesn't follow that testing is a "good idea"
Oh, the WeatherApp was "how to write tests" not why it's good. Never mind then :D 15:55
timeless [Coke]: "Language/operators.pod" doesn't seem to have `#`
am i blind, or looking in the wrong place?
gregf_ any perl regex i used could be easily translated to Java/php/python/ruby(PCRE). Perl6 seems to have changed quite a bit :| 15:56
s/be easily/easily be/ 15:57
timeless gregf_: as a warning, $1 -> $0 as of perl6
timeless wonders what the order of operations is for `#` (comment)
sexy-coder-girl gregf_: yeah, it was kind'f the idea. Make better regexes and not merely replicate the status quo
timeless sexy-coder-girl: i don't suppose i could get you to tell me where you'd expect to find `#` documented in the perl6 docs :) 15:58
gregf_ sexy-coder-girl: and why dont \A \z work? o_O
timeless is it part of `syntax` or `operators` or ....? 15:59
sexy-coder-girl gregf_: because they are ^ and $
gregf_: and if you want per-line, you use ^^ and $$
m: say so "foo\n" ~~ /'foo' $/
camelia rakudo-moar d92722: OUTPUT«False␤» 16:00
sexy-coder-girl ^ also different from Perl 5
m: say so "foo\n" ~~ /'foo' $$/
camelia rakudo-moar d92722: OUTPUT«True␤»
16:00 rurban left, FROGGS joined
sexy-coder-girl timeless: I wouldn't be surprised if it's not even documented. 16:01
FROGGS nine / azawawi: done, please tell me if moving HAS to Perl6::Grammar has not the desired effect
timeless sexy-coder-girl: it doesn't seem to be
i'm trying to figure out where to put it 16:02
sexy-coder-girl Do people even need to know what a comment is in a language these days? Ctrl+D in your editor DTRT
timeless comments in general are in syntax
sexy-coder-girl: my favorite editor is notepad.exe
timeless has no idea what ^D does in notepad
sexy-coder-girl timeless: it's here: docs.perl6.org/language/syntax#Comments
timeless: except it isn't, is it?
timeless right
16:02 Amnez777 left
timeless ^D=bell in notepad fwiw :) 16:03
stevieb timeless: ^D in notepad.exe starts the win10 upgrade ;)
timeless (i.e. annoy user for doing something stupid)
sexy-coder-girl stevieb++
timeless stevieb: i'm running w10
sexy-coder-girl: , so, i just add a =head3 of some sort?
sexy-coder-girl timeless: well, you should consider using a proper editor :) Notepad doesn't even use utf-8 by default 16:04
timeless sexy-coder-girl: um, i'm pretty sure it does
sexy-coder-girl timeless: =head3 for where?
FROGGS Notepad++.exe would be a good choice :o)
timeless 😃
sexy-coder-girl timeless: uses ANSI by default on Win7. I'm sure it's still just as dumb on Win10
timeless err, yeah, you're right
timeless isn't actually certain it's always ansi 16:05
it might be something else for CJK...
sexy-coder-girl timeless: =head3 for what?
timeless comment hash
sexy-coder-girl timeless: but it's already documented.
16:05 baest left
timeless sexy-coder-girl: but there's no article in doc.perl6.org for it 16:05
ther's a "comments" thing
raiph .tell TimToady FYI I added "Can a module alter the type system?" and "Is Perl 6 a universal unrestricted grammar?" to the slashdot article. Both questions were removed. Too controversial I guess...
yoleaux raiph: I'll pass your message to TimToady.
timeless but no "#" thinig
16:05 edehont left, baest joined 16:06 Amnez777 joined
sexy-coder-girl timeless: well, there needn't be a separate page for that. You can add it into search index with X<> pod thingie though. 16:06
timeless sexy-coder-girl: ok
timeless looks for an X<> example
sexy-coder-girl just do grep -R 'X<' and you'll find lots
16:07 acrussell joined
sexy-coder-girl It may be something like X<#|syntax comment> but I'm just guessing here. 16:07
FROGGS on windows?
timeless sexy-coder-girl: fwiw, the search system is pretty lame
if i do `Binding operator` as my search
the result is localhost:3000/language/operators
it should be localhost:3000/language/operators#infix_:=
sexy-coder-girl Well... Feel free to improve it :) 16:09
timeless adds it to the back of the queue
16:09 ssotka joined
El_Che tadzik: sent an updated PR for config::ini 16:09
16:10 dogbert17 joined, baest left
stmuk_ is there a darker beer emoji than :beer: :/ 16:11
sexy-coder-girl .u beer
yoleaux U+1F37A BEER MUG [So] (🍺)
U+1F37B CLINKING BEER MUGS [So] (🍻)
raiph is there a .command to undo a .tell? ;) 16:12
sexy-coder-girl Try ZWSing it with dark skin tones XD
16:12 krakan joined
raiph .tell TimToady Forget my last comment. (The questions are there.) 16:12
yoleaux raiph: I'll pass your message to TimToady.
timeless sexy-coder-girl: this doesn't seem to work particularly www.irccloud.com/pastebin/ICF9Sq4o/ 16:13
sexy-coder-girl timeless: meaning what... you rebuilt everything and it's not showing up in search results? 16:14
FROGGS raiph: maybe they are just searching for troll questions :o)
timeless yeah
timeless has a tiny "everything", but yeah
sexy-coder-girl Are you sure you the search index been rebuilt?
[Coke] timeless: # isn't an operator.
timeless [Coke]: ok...
timeless still needs to be able to search for it
[Coke] sure. 16:15
16:15 domidumont joined
timeless [Coke]: ok, how about `&` ? 16:15
oh 16:16
16:16 _mg_ left
timeless yeah 16:16
timeless sighs
ok, that's just me having broken something :/
sexy-coder-girl: yep, positive, make clean html-nohighlight 16:17
16:18 rindolf joined, azawawi joined
azawawi . 16:18
FROGGS: works perfectly
FROGGS++
FROGGS \o/
sexy-coder-girl .moon 16:19
yoleaux Waxing Gibbous (0.317)
azawawi FROGGS: 97 wall seconds first startup, 4MB .precomp folder
sexy-coder-girl timeless: try pressing CTRL+F5 in your browser
timeless sexy-coder-girl: i checked js/search.js directly :)
FROGGS WAT
masak hi #perl6 from a (motionless) train! o/ 16:20
FROGGS azawawi: do you have timing for the second call, and then both timings fro the current code?
timeless masak: as long as your train is upright
azawawi FROGGS: first time, GTK::Simple used to take 125 seconds :) 16:21
FROGGS hopes that 97s is not for the current code
azawawi github.com/perl6/gtk-simple/blob/m...Simple.pm6
FROGGS: 10 seconds second run
FROGGS uff, okay
masak timeless: not only is it upright, it's also above water level
timeless masak: also good, although not strictly necessary 16:22
masak agreed.
timeless (Eurostar )
masak ok, I'll amend that. the train is not sunk, which I like.
timeless being connected to rails otoh seems like a good quality
masak it's moving now.
I estimate it's about 5 m above water level.
sexy-coder-girl masak: are you about to start shooting lasers and measuring the speed of light for various observers? 16:23
FROGGS azawawi: still that wants to get faster :o)
masak oh, and it's on rails.
azawawi FROGGS: yup
timeless stay away from the rubies :)
masak .oO( eternal n00bie on rails )
azawawi FROGGS: that's on an intel i7-2600 ubuntu VM btw
FROGGS I'll clone that repo once I have proper internet 16:24
FROGGS is also sitting in a moving train 16:25
... and I think I need to get off 16:26
o/
16:26 FROGGS left
masak sexy-coder-girl: this is one of those boring subluminal trains. 0.00139% the speed of light. :( 16:27
16:29 azawawi left
timeless hates not having a good way to puzzle through htmlify.p6 16:31
so... somewhere in this mess something defines a `.url` property
process-pod-source i guess? 16:32
Two terms in a row across lines (missing semicolon or comma?)
LTA
could it possibly include at least a line number?? 16:33
m: say "1\2";
camelia rakudo-moar ac0dcd: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unrecognized backslash sequence (did you mean $1?)␤at <tmp>:1␤------> 3say "1\27⏏5";␤»
timeless m: say "1"␤my $t="2"; 16:34
camelia rakudo-moar ac0dcd: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row across lines (missing semicolon or comma?)␤at <tmp>:2␤------> 3say "1"7⏏5<EOL>␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ stateme…»
timeless no fair
why is camelia giving me better error reporting than perl6?
is there a flag i need to give to perl6 to get that? 16:35
parabolize were you using the REPL? 16:37
timeless no
parabolize because it doesn't need `;`
timeless i had a file where i accidentally omitted the `;`
and the error sucked
so i hoped camelia would show that
but.. camelia spoiled my example by having a good error 16:38
16:39 mr-foobar joined
masak makes an embarrassing mistake involving regexes and backtracking 16:40
jnthn masak: Happens to the best of us... :P
masak yes, clearly :P
masak .oO( clealr^H^Hrly ) 16:41
16:41 dakkar left 16:59 Fleurety left 17:00 Fleurety_ joined 17:06 MilkmanDan is now known as MilkmanDan[Han] 17:11 baest joined, pmurias joined
pmurias do we have a working module to allow displaying 2d graphics from Perl 6? 17:11
masak pmurias: using which kind of rendering? d3js? ASCII? GTK? 17:12
17:13 mst left
pmurias masak: I don't know what the options are ;) 17:13
tadzik we have SDL, Cairo
17:13 mst joined, mst left, mst joined
tadzik SVG probably counts too :) 17:13
erm, SVG
17:14 Fleurety_ is now known as Fleurety, rurban joined
pmurias which one should I use for SDL? SDL or SDL2::Raw? 17:15
masak say you get a type T in Perl 6. how can you ask "is T a role?" ? 17:18
(and get a True/False answer back)
pmurias masak: you could check the metaclass object 17:20
masak m: role R {}; class C {}; say so ~.HOW ~~ /Role/ for R, C 17:21
camelia rakudo-moar ac0dcd: OUTPUT«True␤False␤»
masak this is the best I have so far. not very nice.
pmurias m: role A {}; class B {}; role Role {}; say (A.HOW ~~ (role {}).HOW.WHAT) 17:22
camelia rakudo-moar ac0dcd: OUTPUT«False␤»
pmurias m: role A {}; class B {}; role Role {}; say (A.HOW ~~ Role.HOW.WHAT); say (B.HOW ~~ Role.HOW.WHAT) 17:24
camelia rakudo-moar ac0dcd: OUTPUT«True␤False␤»
masak ok, that one trumps mine.
timeless m: $a="/this/that/"; $a ~~ m!(/[^/]*/)(.*)!; print "$0 $1" 17:25
camelia rakudo-moar ac0dcd: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$a' is not declared␤at <tmp>:1␤------> 3<BOL>7⏏5$a="/this/that/"; $a ~~ m!(/[^/]*/)(.*)!␤»
masak m: role A {}; class B {}; say .HOW ~~ (role {}).HOW.WHAT for A, B
camelia rakudo-moar ac0dcd: OUTPUT«False␤False␤»
masak hrm
timeless m: my $a="/this/that/"; $a ~~ m!(/[^/]*/)(.*)!; say "$0 $1"
camelia rakudo-moar ac0dcd: OUTPUT«5===SORRY!5===␤Unrecognized regex metacharacter / (must be quoted to match literally)␤at <tmp>:1␤------> 3my $a="/this/that/"; $a ~~ m!(7⏏5/[^/]*/)(.*)!; say "$0 $1"␤Unrecognized regex metacharacter [ (must be quoted to match literally)…»
timeless m: my $a="/this/that/"; $a ~~ m!(\/[^/]*\/)(.*)!; say "$0 $1"
camelia rakudo-moar ac0dcd: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unrecognized regex metacharacter / (must be quoted to match literally)␤at <tmp>:1␤------> 3my $a="/this/that/"; $a ~~ m!(\/[^7⏏5/]*\/)(.*)!; say "$0 $1"␤ expecting any of:␤ infix stop…»
masak m: role A {}; class B {}; my role R {}; say .HOW ~~ R.HOW.WHAT for A, B 17:26
timeless m: my $a="/this/that/"; $a ~~ m!(\/[^\/]*\/)(.*)!; say "$0 $1"
camelia rakudo-moar ac0dcd: OUTPUT«True␤False␤»
rakudo-moar ac0dcd: OUTPUT«Use of Nil in string context in block <unit> at <tmp> line 1␤Use of Nil in string context in block <unit> at <tmp> line 1␤ ␤»
timeless m: my $a="/this/that/"; $a ~~ m!(\/[^\/]*\/)(.*)! && say "$0 $1"
camelia ( no output )
pmurias masak: why dosn't it work with an anonymous one?
timeless m: my $a="/this/that/"; $a ~~ m!(\/[^\/]*\/)(.*)! ?? say "$0 $1" !! say "bad-re"
camelia rakudo-moar ac0dcd: OUTPUT«bad-re␤»
timeless waves up a perl5-refugee white-flag-of-surrender 17:27
masak pmurias: I don't know. 17:28
pmurias: maybe something gets mixed into it?
17:29 rindolf left 17:30 rindolf joined
masak timeless: I think you mean <-[\/]>, not [^\/] 17:31
or even <-[/]>
timeless m: my $a="/this/that/"; $a ~~ m!(\/<-[/]>*\/)(.*)! ?? say "$0 $1" !! say "bad-re"
camelia rakudo-moar ac0dcd: OUTPUT«/this/ that/␤»
timeless yes
17:34 cdg left
pmurias masak: anonymous roles have a different metaclass 17:34
m: role A {}; my $a := role {}; say(A.HOW.WHAT);say($a.HOW.WHAT); 17:35
camelia rakudo-moar ac0dcd: OUTPUT«(ParametricRoleGroupHOW)␤(ParametricRoleHOW)␤»
jnthn m: my $a = role A {}; say $a.HOW.WHAT
camelia rakudo-moar ac0dcd: OUTPUT«(ParametricRoleHOW)␤»
jnthn Not really. A role as an expression always evaluates to the exact variant you declared.
It's just the symbol installed in the namespace that's the group 17:36
17:36 rurban left, spider-mario joined 17:37 setty1 joined
masak oh, right 17:38
sexy-coder-girl pmurias: you want SDL2::Raw. The SDL wasn't working last time I tried it. SDL2::Raw may be incomplete, but timotimo would want to know what you're missing 17:41
17:43 zakharyas left
timotimo yo. sdl what for? 17:45
lizmat .tell FROGGS could you explain what ac0dcdd fixes (e.g. in the ChangeLog) ? 17:46
yoleaux lizmat: I'll pass your message to FROGGS.
pmurias timotimo: draw some sprites, likely just fooling around ;)
timotimo ah, yes 17:48
sexy-coder-girl .join #perl6-dev 17:49
yoleaux sexy-coder-girl: Sorry, this command is admin-only.
17:50 sexy-coder-girl is now known as yoleaux2 17:51 yoleaux2 is now known as sexy-coder-girl
sexy-coder-girl
.oO( is yoleaux a French for YOLO? )
17:53
sjn sexy-coder-girl: yes :) 17:54
sexy-coder-girl lol
sjn it actually is :D
well, the bot name is 17:55
masak TIL about `from __future__ import barry_as_FLUFL` 17:56
17:57 sexy-coder-girl is now known as sexy-coder-guy 17:58 sexy-coder-guy is now known as sexy-coder-girl 18:01 sno left, b2gills left
DrForr from __future__ import marty; 18:02
18:04 jjido_ joined 18:05 baest_ joined
stmuk_ wonders if sexy-coder-girl eats poutine and drinks vodka 18:06
sexy-coder-girl I don't drink.
dj_goku_ mmm poutine
18:07 baest left
stevieb in Canada, it's poutine, hockey and beer/whisky, not in that particular order 18:10
masak hehe, there's even a test_flufl.py in the test suite :P
sexy-coder-girl The only people I've seen rave about poutine here are Americans who buy it because they can't get it in US.... 18:11
stevieb I've run into the same. My girlfriend is from TX, and she loves the stuff. When her daugher flies up from SF, we have to eat poutine at least 3-4 times (she'll be arriving in ~10 days, so I'll be ready) 18:12
perlpilot stevieb: is your GF a little on the hefty side? That stuff is just all kinds of calories. 18:16
stevieb LOL no, absolutely not at all
I have however warned her of the risk. Good thing we hike in the mountains every weekend for extended periods to burn it all off 18:17
18:17 TEttinger joined 18:18 vendethiel joined 18:19 acrussell left, CIAvash left
sexy-coder-girl m: say :३४foo 18:20
camelia rakudo-moar ac0dcd: OUTPUT«Unexpected named parameter 'foo' passed␤ in block <unit> at <tmp> line 1␤␤»
sexy-coder-girl m: say %(:३४foo)
camelia rakudo-moar ac0dcd: OUTPUT«{foo => 34}␤»
18:22 huggable left, huggable joined 18:33 cdg joined
[Coke] hike++ 18:37
18:38 labster joined 18:40 FROGGS[mobile] joined, Xliff joined
stevieb camp++, explore++ ;) 18:45
bear spray++
sexy-coder-girl (air-conditioned couch)++
stevieb LOL
18:49 alnewkirk left
literal is there a special method like BUILD that gets called during/after object creation but where I don't need to specify all the attributes in the method signature? 18:49
18:50 alnewkirk joined
lizmat literal: not sure what you mean ? 18:50
masak literal: .new ?
lizmat could you elaborate ?
moritz BUILDALL 18:51
doc.perl6.org/language/objects#Obje...nstruction
literal I guess I was just wondering which one is more analogous to Moose's BUILD 18:52
hoelzro if you don't have any private attrs, you don't need to specify them in BUILD's signature, do you? 18:53
m: class C { has $.public; submethod BUILD { say 'building' }; }; say C.new(:public(17)).public 18:54
camelia rakudo-moar ac0dcd: OUTPUT«building␤(Any)␤»
moritz specifying a custom BUILD disables autoamtic attribute initialization
hoelzro huh, maybe you do
ahhh
literal so if I just want to set some private attributes (derived from public ones), I should use BUILDALL? 18:55
mst < sexy-coder-girl> I don't drink. 18:57
mst rolls to disbelieve
jdv79 is there a way to disable precomp? 18:59
18:59 itaipu joined 19:00 dwarring joined
[Coke] wonders why it's hard to believe that someone doesn't drink. 19:01
sexy-coder-girl [Coke]: considering mst probably has me saying "I quit drinking" more than a 100 times, I don't blame his incredulity :) 19:02
Buut.. I actually did quit. Like mid-May I think
lizmat jdv79: "no precompilation"
[Coke] ah, he had intel.
jdv79 so the only way is to edit code? 19:03
what if i want to run a test suite liek that:( 19:04
sexy-coder-girl mst: actually, thanks to the Internet, I know the exact date when I quit. May 6th: irclog.perlgeek.de/perl6/2016-05-06#i_12441561
19:04 Sgeo left
sexy-coder-girl The "nuking the entire server while drunk" is unrelated to my reasons for quitting :P 19:04
jdv79 admittedly not a popular thing to do but would be nice to catch compilation warnings
19:05 ptolemarch left 19:06 sno joined
mst [Coke]: this will be the Nth time zoffix has publically quit drinking, at this point my rolling to disbelieve is basically a running joke 19:07
19:07 kurahaupo joined
mst over a month is unusually good progress though 19:07
19:07 kurahaupo left
jdv79 that does sound amusing 19:08
19:08 yqt joined
masak makes a mental note that zoffix == sexy-coder-girl 19:09
vendethiel *g* 19:10
19:14 kurahaupo joined 19:19 rurban_ left 19:23 araujo_ joined 19:24 araujo left 19:25 FROGGS joined 19:28 araujo_ left 19:32 domidumont left 19:40 jjido_ left
masak is there a better way to do this and an EVAL? github.com/masak/007/blob/fe2ebe5a...sses.t#L14 19:43
than an*
dogbert17 anyone wants to review an attempt to document Baggy.pick? If so, look here: gist.github.com/dogbert17/06d29616...d90b1d6874 19:44
moritz masak: ::($name):: ?
m: my $name = 'IO'; say ::($name)::.keys 19:45
camelia rakudo-moar ac0dcd: OUTPUT«()␤»
moritz m: my $name = 'IO'; say ::($name)
camelia rakudo-moar ac0dcd: OUTPUT«(IO)␤»
moritz m: my $name = 'IO'; say ::($name)::
camelia rakudo-moar ac0dcd: OUTPUT«(IO)␤»
moritz m: my $name = 'IO'; say ::($name)::.^name
camelia rakudo-moar ac0dcd: OUTPUT«IO␤»
masak whee
funny, I thought I tried that
19:45 jjido joined
masak you'll get a mention in the commit that fixes it ;) 19:45
moritz wait 19:46
I see that $name contains a double colon in your case
masak ...yes...?
moritz uhm, does ::() resolve them?
m: say ::('Proc::Async') 19:47
camelia rakudo-moar ac0dcd: OUTPUT«Proc::Async is disallowed in restricted setting␤ in sub restricted at src/RESTRICTED.setting line 1␤ in method gist at src/RESTRICTED.setting line 33␤ in block <unit> at <tmp> line 1␤␤»
moritz m: say ::('Proc::Async')::
camelia rakudo-moar ac0dcd: OUTPUT«Proc::Async is disallowed in restricted setting␤ in sub restricted at src/RESTRICTED.setting line 1␤ in method gist at src/RESTRICTED.setting line 33␤ in block <unit> at <tmp> line 1␤␤»
moritz m: say ::('Proc::Async')::.^name
camelia rakudo-moar ac0dcd: OUTPUT«Proc::Async␤»
moritz seems like "yes"
masak seems like "no" when I try here :/
moritz m: say ::('X::Method::NotFound')::.perl 19:48
camelia rakudo-moar ac0dcd: OUTPUT«X::Method::NotFound␤»
moritz m: say ::('X::Method::NotFound').WHO.^name
camelia rakudo-moar ac0dcd: OUTPUT«Stash␤»
moritz m: say ::('X::Method::NotFound').WHO.keys
camelia rakudo-moar ac0dcd: OUTPUT«()␤»
moritz m: say ::('X::Method')::.keys
camelia rakudo-moar ac0dcd: OUTPUT«()␤»
moritz m: say ::('X::Method').WHO.keys
camelia rakudo-moar ac0dcd: OUTPUT«(NotFound InvalidQualifier Private)␤»
masak ooh, ::($name).WHO worked ;) 19:49
moritz I notice I don't understand what trailing :: does
I thought it was the same as .WHO
m: say X::Method::.keys
camelia rakudo-moar ac0dcd: OUTPUT«(NotFound InvalidQualifier Private)␤»
moritz seems to only work with literals
masak moritz: github.com/masak/007/commit/c36ca6...7d6903d5c8 19:50
19:50 jjido left 19:51 ocbtec left
moritz m: say Stash ~~ Associative 19:52
camelia rakudo-moar ac0dcd: OUTPUT«True␤»
moritz masak: you could even use a % sigil here
masak ooh 19:55
19:57 kaare_ left, kaare_ joined 20:00 hankache joined
hankache good evening #perl6 20:00
masak good hevening, hankache 20:01
hankache good heaven-ing masak 20:02
masak good ䷀-ing 20:03
20:04 FROGGS left
hankache gives up 20:04
diakopter "ow my hank hurts; I have an hankache"?
20:04 Zero_Dogg left
hankache diakopter ;) 20:04
20:04 Zero_Dogg joined, Zero_Dogg left, Zero_Dogg joined
masak and here I thought it was a kache of hans 20:05
20:05 FROGGS[mobile] left 20:07 kaare_ left
dalek c: f134089 | (Jan-Olof Hendig)++ | doc/Type/Baggy.pod:
Added docs for Baggy.pick
20:07
hankache where is ma sake bottle
20:10 cpage_ left 20:19 edehont joined
moritz lol I blug: perlgeek.de/blog-en/automating-dep...sting.html though no Perl 6 content 20:20
20:21 labster left, jjido joined 20:24 girafe2 joined
hankache moritz++ 20:25
20:27 girafe left
moritz next up will be integration tests, and then maybe a bit configuration management 20:27
and then I have all the topics covered that I consider essential for the book. 20:28
20:29 wamba left
stevieb moritz: signed up. will the book be language specific? Doesn't look like it if you're writing Python posts on your Perl blog ;) 20:29
moritz and then I have to decide whether I'll include some bonus topics where I have to do some more research, like containers and autoamtic migrations
20:29 awwaiid left
moritz stevieb: no. It's specific to the toolchain I use (Debian packages, GoCD, ansible), though the principles should apply to other tools as well 20:30
20:30 awwaiid joined
moritz mostly it's about showing that you can get started without much magic 20:30
if I'm bored after I'm finished, I might consider creating variants based on other tools (like Jenkins or Concourse CI instead of GoCD, RPM or Docker instead of .deb) 20:31
masak .oO( the magic comes later? )
moritz masak: magic could be an emergent property :-) 20:32
though fully automatic schema migrations sure soud like magic to me right now
20:33 hankache left
moritz I guess I should implement them at $work, and only later write about them :-) 20:33
stevieb do you primarily code in Python at $work?
moritz stevieb: perl 5 and python 3
stevieb: though I only started with python about 1.5 or 2 years ago, and still feel like a newbie 20:34
masak moritz: python is said to be nice for newbies :P
stevieb me too, in regards to python. 1.5 years 20:35
20:35 rurban joined
stevieb problem with python is that it's not perl 20:35
moritz masak: they say that, yes
and I'm productive with it
masak stevieb: there are many things besides python which are not perl
moritz: yes, I know what you mean
moritz: my biggest problem when coding python is not that I feel like a python newbie, but that I feel like a perler using python :) 20:36
moritz but I have that feeling that I'm missing out on a lot of idioms
stevieb masak: I'm aware... I just love coding perl by far more than anything else
cool thing is that I use PyCharm (pro license so I get Coverage) for python, but with Camelcade plugin, I use the exact same IDE for perl as well 20:37
moritz also I can't help but notice some of the hypocrisis in python land, which makes me quite mad
stevieb ...with its new debugging capabilities, I have everything in one place (including vim)
arnsholt One of my Python epiphanies was that whenever I find myself writing map(...) (or wanting to grep), what I actually want is a list comprehension
stevieb [x for x in ...] :)
arnsholt I've actually written that, I think 20:38
moritz stevieb: worse, [x for x in list_ if x]
why is that "if x" at the end?
arnsholt Needed to reify an iterator into a list so that I could iterate several times
moritz aaarg
arnsholt Although I may have killed that code, on second thought
20:39 rindolf left
stevieb moritz: appears to be a way to eliminate false values 20:39
[x for x in (0, 1, 2) if x]
(1,2) 20:40
moritz stevieb: yes, but I hate the syntax
stevieb lol so do I
moritz stevieb: the "if" coming at the end, where it looks like it applies to the whole list comprehension
not to that one element
stevieb I agree with you
moritz another thing I really miss in python is compile-time checking of symbols 20:41
a la "use strict"
and, occasionally, block scoping
20:41 labster joined
moritz easy closures 20:42
stevieb: the "if" coming at the end, where it looks like it applies to the whole list comprehensionI like slices, and "with" statements
urks, sorry for duplicate 20:43
RabidGravy yeah that confused me when I first saw it
moritz I like slices, and "with" statement # that's what I actually wanted to say
stevieb moritz: you mean "with open ..." etc to scope, yes? 20:44
moritz stevieb: yes
20:44 AlexDaniel joined, setty1 left
moritz I also like sqlalchemy, which IMHO feels more solid than DBIx::Class 20:45
20:45 TEttinger left
stevieb we use peewee at $work for modelling 20:45
20:46 MilkmanDan[Han] left
mst moritz: if you can ever turn that into a list of suggestions, please do - I've got drunk with sqlalchemy devs and mostly they have the same opinions about stuff as the DBIx::Class team 20:46
stevieb it's been many years since I've touched DBIx::Class 20:47
moritz mst: I'll put that on my TODO list 20:48
(though with a disclaimer that it's been about 2 years since I've used DBix::class; some stuff might have been fixed by now
mst moritz: but 'feels more solid' isn't really something we can use to derive missing features/etc. from 20:49
moritz mst: one thing I immediately noticed was that error messages are much better in sqlalchemy if you for example misspell a class or column name in a result/model class defintion 20:50
mst ah, yeah, there's no DBI-level standard for that and nobody's written the necessary shitton of regexps to normalise all the textual error messages across databases 20:51
and it's not the sort of project that's easy to get people to work on
moritz mst: nah, even before it hits the database
mst huh?
how can it know you misspelled something before it talks to the database? 20:52
moritz mst: well, if I in class A I have a foreign key to B->x, and either B or x doesn't exist, that could (and should) be a load time error
and one that explicitly says what's wrong
mst it could, but there's lots of legitimate uses that would break 20:53
20:53 rodarmor joined
mst in fact, making that *not* a load time error is something I give advice on regularly 20:53
because in DBIx::Class it *is* checked in a lot of cases
but you often need to turn it off to do clever stuff
20:54 rurban_ joined, Zoffix left, dfcarpenterak joined
mst I'm still interested in the list, mind 20:54
but I do reserve the right to say "yes, but this would make several hard things impossible so we can't"
moritz well, the frustrating thing is that I tended to get *some* errors, but they didn't point to the root cause
mst: re list, noted. Will ponder it a bit. 20:55
mst one of the problems here is that, e.g., having a completely unresolvable relationship loadaed is sometimes a feature, because it allows loading only the result classes you need in a CLI script etc. 20:56
however that doesn't mean we can't improve the error messages without breaking things
autarch I'm a bit disappointed in the Unicode support her e- gist.github.com/autarch/89d9faf1eb...9bca996991 20:58
20:59 dsp-_ joined, trnh joined, trnh left, trnh joined
autarch oh wait, my bad, a missing semicolon - it totally works 20:59
good job, Zalgo!
I mean, Larry
dalek c: 346387f | util++ | doc/Language/5to6-perlfunc.pod:
Fix missing quote.
21:01
21:01 BooK joined 21:02 rjbs joined 21:03 skids left 21:05 diegok joined 21:08 jferrero_ left, jferrero joined, ilbelkyr left 21:09 siriu5b joined, siriu5b left, siriu5b joined 21:10 ilbelkyr joined 21:11 Emeric left
[Coke] *sigh* always use full digit years, peeps. 21:12
21:12 trnh left 21:13 MilkmanDan[Han] joined
[Coke] autarch: fails here, with the semicolon 21:14
autarch yeah, I fixed it
I didn't read the error carefully enough and thought it was choking on my attribute name
I'm trying to emphasize how bad an idea it is to use rw attributes 21:15
21:15 DANtheBEASTman joined
[Coke] I mean, *even with* the semicolon 21:15
oh, ok.
21:15 mst left
[Coke] carry on, then. :) 21:15
21:15 mst joined, mst left, mst joined 21:19 ptolemarch joined, mst left, mst joined 21:20 sivoais left 21:21 mst left, mst joined 21:29 edehont left 21:30 sortiz joined
sortiz \o #perl6 21:41
21:44 itaipu left 21:45 itaipu joined 21:49 itaipu left 21:52 khw left, rindolf joined 21:53 mst left, mst joined 21:54 mst left, mst joined 21:57 mst left 21:58 mst joined 21:59 mst left, mst joined 22:00 khw joined 22:01 rindolf left 22:02 firstdayonthejob joined, ptolemarch left, mst left, mst joined
timotimo pmurias: do you find SDL2::Raw usable at all? 22:02
22:03 mst left, mst joined 22:04 rindolf joined, ggoebel116 joined, stux|RC-only joined 22:06 cpage_ joined
pmurias timotimo: haven't looked at it much, was afk most of the evening 22:08
22:08 kid51 joined
timotimo ah, OK 22:08
pmurias timotimo: s/much/at all/ ;)
22:09 pmurias left
AlexDaniel .seen zefram 22:16
yoleaux I haven't seen zefram around.
22:16 rurban left
AlexDaniel anyway, it's a third time when somebody stumbled upon (;) 22:17
at least, a third time when it was documented :)
m: (;)
camelia rakudo-moar ac0dcd: OUTPUT«(signal XFSZ)Non-QAST node visited BOOTInt␤Weird node visited: BOOTInt␤Resultchild 0 can't returns! BOOTInt␤- QAST::Stmts :BY<comp_unit ua u> :context<sink> (;)␤ - QAST::Stmt :BY<comp_unit ua u u> :context<sink> :final (;)␤ - 0␤␤Non-QAST …» 22:18
diakopter ur a weird node 22:19
22:20 rurban joined, rurban left 22:21 ggoebel116 left 22:22 huggable left 22:25 rurban_ left, skids joined 22:27 jjido left 22:37 bjz left, trnh joined, jjido joined
jjido swtch.com/~rsc/regexp/regexp1.html <-- Rob Pike reference 22:38
sorry wrong channel :D
AlexDaniel timeless: #128402 22:39
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128402
AlexDaniel timeless: I am pretty sure that there are many other errors that print just the line number. I'm not sure why it happens 22:40
sortiz With HAS in core, on the JsonC case, moar code size go from 2.3M to 440K
22:41 Xliff_ joined
AlexDaniel timeless: ah right 22:44
22:44 Xliff left
AlexDaniel so basically any run-time error is not giving any meaningful position because there is simply no such information? 22:45
in this case it should probably give information up to semicolon precision, just the line number is not enough I think 22:46
well, it's good enough most of the time, but it is LTA
22:49 girafe3 joined 22:52 girafe2 left 22:55 trnh left, bjz joined 22:59 trnh joined, trnh left, trnh joined 23:08 jjido left 23:09 jjido joined 23:16 spider-mario left, firstdayonthejob left 23:17 bjz left 23:24 ggoebel116 joined 23:26 lambd0x joined 23:29 RabidGravy left
lambd0x Hi everyone I'm a begineer in Perl6 and last reading/searching about got interested in gettin to know the new Perl. I have some doubts about the module management system, if I just get to compile the compiler (Rokudo-dô Perl) Can I have access to them by any other means? Thanks 23:30
timotimo what do you mean by module management system, and what do you mean by "just compile rakudo"? 23:31
lambd0x Hi timotimo
timotimo by module management system, do you mean panda and/or zef? 23:32
23:32 jack_rabbit joined
lambd0x timotimo: By module man. system I mean how is organized the modules.. 23:32
hm, yes. But I saw they just come with rakudo star 23:33
23:33 stevieb9 joined
timotimo oh, you mean how the source files and precompiled files get placed and stored? 23:33
lambd0x yes
timotimo you can get panda and zef by cloning them from github and then running their "install" scripts (bootstrap.pl for panda, dunno what for zef) 23:34
are you concerned about the long names of the files?
lambd0x hm...
more or less. I use Funtoo/Gentoo but my tree does't have rakudo star 23:35
timotimo you can get everything in rakudo/star by installing Task::Star. the only difference is you'll get newer versions 23:36
lambd0x So I'll have to make updates of the repository manually.
timotimo thing is, rakudo star is a full distribution that has specific releases; usually but not always when a rakudo release has happened
it also ships with exactly tuned versions of the modules to ensure that everything works
so if you just build a rakudo-star ebuild for yourself, it's not necessarily the same thing :) 23:37
but it's not bad to just use rakudo and then install the modules by hand
lambd0x timotimo: I see.
Task::Star is what exactly? 23:38
23:38 jjido left
lambd0x An script to maintain everything up to date locally? 23:38
timotimo no, it's a module that does nothing by itself, it just has everything in its "depends" that is shipped with Rakudo Star 23:39
23:40 jjido joined
stevieb9 github.com/tadzik/Task-Star/ 23:40
lambd0x timotimo: That's nice 23:41
23:42 trnh left
lambd0x About the compiler, is it working with MoarVM by default for what I saw. How is things going since its start? 23:42
*it started :)
stevieb9: Thanks for the link 23:43
[Coke] moarvm's going just fine. 23:45
stevieb9 lambd0x: no problem. first time I've heard about it myself, and just had to look. currently installing ;)
23:48 AlexDaniel left 23:51 tardisx joined
lambd0x [Coke]: thanks for the info \o/ 23:51
timotimo yeah, going from parrot to moarvm has allowed us to do a lot decisions that will allow more and more strong optimizations later in development
actually, we've reached the stage where we are doing some of those optimizations 23:52
lambd0x That's nice, I was in doubt if I used JVM, parrot or moarVM. Fortunately at least won't have another direct relation with JVM :) 23:53
23:55 jjido left 23:56 jjido joined 23:57 ggoebel116 left
timotimo sadly, rakudo-jvm is currently not working very well 23:58
people are working to make it run again, but for the moment it's not really an option