buggable 🎺🎺🎺 It's time for the monthly Accidental /win Lottery 😍😍😍 We have 4 ballots submitted by 3 users! DRUM ROLL PLEASE!... 00:00
And the winning number is 28! Congratulations to jnthn! You win a roll of duck tape!
AlexDaniel XD
zengargoyle FML - "thanks @zengargoyle ! been looking for a replacement for something like FocusMe on win/mac, this is the closest iv'e found so far so will continue giving it a shot" 00:12
zengargoyle expects i will have to write a non-gui version. this person listened to my non-documented hack-arounds, isn't afraid of the Terminal and sudo and editing YAML files and still wants that thing i made on a whim in response to some random post on a Q&A site. 00:18
zengargoyle that i never actually used myself because knowing how it works negates the reason for it's existance. aaarrrrggghhh. 00:20
00:33 dubi0us left 00:53 dubi0us joined 00:55 astj joined 00:58 dubi0us left
ugexe m: class Foo { has %.hash handles <AT-KEY>; multi method AT-KEY($key where {$_ eq 'foo'}) { say "Got foo"; nextsame(); }; } 01:17
camelia ===SORRY!=== Error while compiling <tmp>
Package 'Foo' already has a method 'AT-KEY' (did you mean to declare a multi-method?)
at <tmp>:1
ugexe is there a way to make the handles play nice with the multi? 01:18
01:22 bjz joined 01:28 bjz left 01:32 dubi0us joined
geekosaur I don't think that does what you want 01:32
"handles" trait defines AT-KEY in Foo to do AT-KEY in %.hash 01:33
oh, I see, you want overrideable. I think you have to do that by hand
just as you would have to define your own accessors instead of somehow modifying the autogenerated ones with has $.whatever 01:34
01:37 dubi0us left 01:41 astj left, astj joined 01:44 bjz joined 01:45 ilbot3 left 01:48 dubi0us joined, ilbot3 joined, ChanServ sets mode: +v ilbot3 01:49 BenGoldberg joined 01:52 aindilis joined 01:56 bjz left 01:58 dubi0us left 01:59 dubi0us joined 02:03 dubi0us left 02:17 raschipi joined 02:18 dubi0us joined, noganex_ joined 02:21 noganex left 02:23 astj left 02:26 astj joined 02:28 dubi0us left, astj left, astj joined 02:29 ggoebel left 02:32 bjz joined, dubi0us joined 02:34 aborazmeh joined, aborazmeh left, aborazmeh joined 02:41 dubi0us left 02:50 dubi0us joined 02:58 dubi0us_ joined 02:59 dubi0us left 03:01 aborazmeh left 03:05 Cabanossi left 03:06 Cabanossi joined 03:07 dubi0us_ left 03:10 literal_ joined 03:21 dubi0us joined 03:22 bjz left 03:26 Actualeyes joined 03:31 dubi0us left 03:33 literal_ left 03:34 bwisti joined 03:40 bjz joined 03:42 araraloren_ left 03:49 araraloren joined 03:50 dubi0us joined 03:53 bjz left, astj left 03:54 dubi0us left 03:55 bjz joined, khw left 03:56 astj joined 03:59 dubi0us joined 04:01 astj left, Cabanossi left 04:03 Cabanossi joined 04:14 dubi0us left 04:17 dubi0us joined 04:19 wamba joined 04:23 mcmillhj joined 04:24 pilne left 04:25 aquila-chrysaeto joined 04:27 dubi0us left, dubi0us joined 04:29 mcmillhj left 04:32 dubi0us left 04:33 Cabanossi left 04:34 Cabanossi joined 04:38 bwisti left, dubi0us joined 04:41 astj joined 04:42 astj left, dubi0us left, astj joined 04:48 dubi0us joined 04:57 dubi0us left 05:06 aborazmeh joined, aborazmeh left, aborazmeh joined 05:11 llfourn joined 05:14 raschipi left 05:21 dubi0us joined 05:22 mcmillhj joined 05:25 dubi0us left 05:27 dubi0us joined, mcmillhj left 05:28 BenGoldberg left 05:31 skids left, dubi0us left 05:38 dubi0us joined 05:39 avalenn left 05:40 astj left 05:41 kaare_ joined 05:43 astj joined 05:47 dubi0us left 05:48 dubi0us joined 05:53 dubi0us left 05:58 dubi0us joined
Geth DBIish: d9378416c0 | (Alexey Melezhik)++ (committed using GitHub Web editor) | README.pod
An example how to pass dbname as file for qqlite

I took me some time to understand how can I do this.
DBIish: c46dfe5821 | (Alexey Melezhik)++ (committed using GitHub Web editor) | README.pod
Fix typo
DBIish: e658df8846 | (Salvador Ortiz)++ (committed using GitHub Web editor) | README.pod
Merge pull request #94 from melezhik/master

An example how to pass dbname as file for sqlite
06:02 dubi0us left 06:04 astj left 06:07 dubi0us joined 06:12 dubi0us left 06:16 wamba left 06:17 domidumont joined 06:18 Cabanossi left 06:19 dubi0us joined, Cabanossi joined, astj joined 06:22 astj left, astj_ joined 06:23 dubi0us left 06:24 domidumont left, domidumont joined 06:27 cpage__ left 06:28 dubi0us joined 06:32 dubi0us left 06:34 |oLa| joined 06:37 dubi0us joined, domidumont left 06:38 rindolf joined 06:40 espadrine joined, aindilis left 06:42 dubi0us left 06:47 dubi0us joined 06:51 abraxxa joined 06:54 darutoko joined 06:55 abraxxa left 06:57 dubi0us left 06:58 dubi0us joined 07:02 dubi0us left 07:07 dubi0us joined 07:12 dubi0us left 07:14 setty1 joined 07:19 dubi0us joined 07:23 dubi0us left 07:30 dubi0us joined 07:34 huf joined, dubi0us left 07:35 aborazmeh left 07:36 astj_ left 07:39 dubi0us joined 07:40 astj joined 07:43 dubi0us left 07:48 dubi0us joined 07:57 dubi0us_ joined, dubi0us left 07:59 astj left 08:00 kaare_ left, astj joined 08:01 astj left, astj joined, dubi0us_ left 08:02 Cabanossi left 08:04 Cabanossi joined 08:08 dubi0us joined 08:09 domidumont joined 08:12 dubi0us left 08:13 bjz left 08:15 kaare_ joined 08:16 kurahaupo left, kurahaupo joined 08:17 dubi0us joined 08:18 araujo left 08:21 dubi0us left 08:28 dubi0us joined 08:33 dubi0us left 08:34 bjz joined 08:35 FROGGS joined 08:37 kyan joined 08:38 dubi0us joined, kaare_ left 08:48 Cabanossi left 08:49 Cabanossi joined 08:52 dubi0us left 08:58 dubi0us joined 09:00 bjz left 09:02 mcmillhj joined, dubi0us left 09:03 kaare_ joined, bjz joined 09:07 mcmillhj left 09:10 dubi0us joined 09:15 dubi0us left 09:16 astj left, kaare__ joined 09:17 kaare_ left 09:18 dubi0us joined 09:19 pmurias joined 09:20 mcmillhj joined 09:22 kaare__ left, dubi0us left 09:23 astj joined 09:25 mcmillhj left 09:28 dubi0us joined, lichtkind_ joined 09:37 kurahaupo left, kurahaupo joined, sjoshi joined, dubi0us left 09:39 dubi0us joined 09:40 sjoshi left 09:44 dubi0us left 09:48 dubi0us joined, astj left 09:49 parv joined 09:52 dubi0us left, mniip left 09:56 domidumont left, mcmillhj joined 09:58 dubi0us joined, cpage__ joined 10:01 mcmillhj left 10:07 dubi0us left
Geth doc: f682cd6abb | (Jan-Olof Hendig)++ | doc/Language/io-guide.pod6
Indentation fixes
10:16 TEttinger left 10:18 dubi0us joined 10:22 dubi0us left 10:23 bjz_ joined 10:25 bjz left 10:27 dubi0us joined 10:31 dubi0us left 10:32 parv left 10:40 baar joined
baar hello all. One question about sigils: 10:40
in Python I can create class with methofs typical for some containers. But without to extend base container type 10:41
for example iterable but without setting. Or with indexable getter but without setting and other combinations
10:42 dubi0us joined
baar This mean that I can not say what is it: list, hash or something else. So if I can do the same in Perl, what sigil I should use for such instances? How to select sigil? 10:43
I mean Perl6 sure
10:44 mr-foobar joined 10:46 notbenh joined
jnthn You can put anything in a $ so that's always an option. 10:46
10:46 dubi0us left, mr-fooba_ left
jnthn @ means "I can index into it like @a[...]"; you don't have to subclass anything, just do the Positional role. The role for % is associative and means "I can index into it like %h{...}" 10:47
m: my %h is BagHash # an example of an Associative built-in that's not Hash 10:48
camelia ( no output )
jnthn m: say BagHash ~~ Hash
camelia False
jnthn docs.perl6.org/language/subscripts#Custom_types may be useful also 10:49
timotimo hmm, if BagHash isn't Hash, maybe it should be called something different. maybe HashyBag :D 10:50
llfourn m: say BagHash ~~ Map
camelia False
10:52 travis-ci joined
travis-ci Doc build passed. Jan-Olof Hendig 'Indentation fixes' 10:52
travis-ci.org/perl6/doc/builds/249069522 github.com/perl6/doc/compare/e2754...82cd6abb90
10:52 travis-ci left 10:56 bjz joined 10:57 dubi0us joined 10:58 bjz_ left 11:02 dubi0us left 11:05 khw joined 11:07 dubi0us joined 11:17 dubi0us left, dubi0us joined
lizmat m: say BagHash ~~ QuantHash # timotimo 11:18
camelia True
.oO(maybe it should be called QuantHashy)Oo
11:22 dubi0us left
timotimo :) 11:24
.oO( QuantyHash )
11:26 dubi0us joined 11:30 domidumont joined 11:31 dubi0us left
timotimo HantyQuash 11:34
11:38 dubi0us joined 11:42 dubi0us left 11:46 bjz left 11:47 giraffe joined, giraffe left, giraffe joined, dubi0us joined, Cabanossi left 11:49 Cabanossi joined 11:52 dubi0us left 11:56 dubi0us joined 12:01 dubi0us left 12:06 dubi0us joined 12:10 dubi0us left 12:17 dubi0us joined 12:21 dubi0us left 12:27 dubi0us joined 12:32 dubi0us left 12:36 dubi0us joined 12:40 dubi0us left 12:45 dubi0us joined 12:47 Cabanossi left, domidumont left 12:49 Cabanossi joined 12:50 dubi0us left 12:52 robertle left 12:57 dubi0us joined 12:58 colomon_ joined 12:59 bjz joined, colomon left, colomon_ is now known as colomon 13:01 dubi0us left 13:06 dubi0us joined 13:10 dubi0us left 13:17 dubi0us joined 13:21 bjz left 13:24 robertle joined 13:26 dubi0us_ joined 13:27 dubi0us left, colomon left 13:28 colomon joined 13:30 dubi0us_ left 13:31 baar left 13:33 bjz joined 13:37 dubi0us joined
sacomo hi #perl6 13:39
13:41 dubi0us left 13:46 lucasb joined 13:47 dubi0us joined
rindolf sacomo: moose! 13:48
sacomo: sup? 13:49
sacomo ola
looks like everyone is sleeping
lucasb yo
sacomo konbanwa
are either of you familiar with match? 13:50
when I return a list of matches the results are wrapped in 「」 brackets 13:51
13:52 dubi0us left
lucasb you want just the string matched, not the match object? 13:52
sacomo is the best way to get thos to Str to just use .Str?
yeah, is there a better way? like some option I can pass to match?
lucasb yes, I would guess calling .Str on it is the way to go 13:53
jnthn Can also stringify them with the ~ prefix operator, or if you just use them in a context that wants a Str then you'll get that
fwiw, in Perl 6 a Match is an object (and nested matches form a tree) 13:54
sacomo ok, thanks.
jnthn And it's the .gist method that does the formatted output (which is used by `say`) 13:55
If using, for example, `put` instead of `say`, which just outputs the string value, then you'd also get them without that
sacomo the ~ prefix is simple 13:56
ok, that is good to know
13:56 dubi0us joined 13:58 dubi0us left
sacomo m: say "the quick brown fox".match(/ 'quick'|'brown' /, :g).map({.Str}); 13:58
camelia (quick brown)
sacomo m: say "the quick brown fox".match(/ 'quick'|'brown' /, :g).map({~$_}); 13:59
camelia (quick brown)
jnthn m: say ~<< "the quick brown fox".match(/ 'quick'|'brown' /, :g) 14:00
camelia (quick brown)
sacomo ooh 14:01
I like that
14:02 bjz_ joined, Cabanossi left 14:03 bjz left 14:04 Cabanossi joined, dubi0us joined 14:07 dubi0us left 14:09 dubi0us joined 14:19 leont joined 14:41 [particle] left 14:45 mr-fooba_ joined 14:47 andrzejku joined, mr-foobar left
araraloren I want make a clone method for my class. Should I clone the parent class first or after child class ? 14:49
15:03 jsoo_ joined, jsoo_ left 15:05 pilne joined 15:10 dubi0us left 15:11 dubi0us joined 15:13 Ven joined, Ven is now known as Guest79326 15:16 dubi0us_ joined 15:17 Cabanossi left 15:18 dubi0us left 15:19 Cabanossi joined, Guest79326 left 15:21 dubi0us_ left 15:22 Ven_ joined 15:25 zakharyas joined 15:26 dubi0us joined
araraloren :) 15:31
15:33 dubi0us left, dubi0us joined 15:35 dubi0us left 15:36 dubi0us joined 15:39 Celelibi joined 15:41 dubi0us left, dubi0us joined 15:42 ptolemarch left, dubi0us_ joined, ptolemarch joined 15:46 dubi0us left 15:49 [particle] joined 15:51 domidumont joined, Rawriful joined 15:56 lichtkind_ left 15:59 mniip joined 16:03 bjz joined 16:04 dubi0us_ left 16:05 bjz_ left 16:08 dubi0us joined 16:09 lichtkind_ joined
timotimo the built-in clone doesn't do what you need it to? you need deep cloning semantics? 16:12
16:12 dubi0us left
FROGGS araraloren: usually you care about dependencies first (in a recursive manner)... but I dunno what your use-case is, and whet difference there is 16:13
araraloren timotimo, yeah right, I want a deep clone
timotimo with a clone you won't likely have any inter-attribute dependencies? 16:14
you just set all the attributes?
araraloren I want figure out what is the right way to do it . 16:15
m: class B { has $.s; method clone(*%_) { self.bless(s => %_<s> // $!s.clone); } }; class A is B { has @.a; method clone(*%_) { self.bless(a => %_<a> // @!a.clone()); }; }; my $a = A.new(a => [1, 2, 3], s => 8); my $b = $a.clone(); $a.a.push(23);say $b; 16:16
camelia A.new(a => [1, 2, 3], s => Any)
16:16 Cabanossi left 16:17 dubi0us joined
araraloren m: class B { has $.s; method clone(*%_) { self.bless(s => %_<s> // $!s.clone); } }; class A is B { has @.a; method clone(*%_) { self.bless(a => %_<a> // @!a.clone()); nextwith(|%_); }; }; my $a = A.new(a => [1, 2, 3], s => 8); my $b = $a.clone(); $a.a.push(23);say $b; 16:17
camelia A.new(a => [], s => 8)
16:19 wamba joined, Cabanossi joined 16:22 dubi0us left 16:28 dubi0us joined 16:29 bwisti joined 16:33 dubi0us left 16:34 BenGoldberg joined
BenGoldberg What's the syntax for declaring a C struct with a fixed-length array embeded in it? my class Foo is repr('CStruct') { HAS ... } 16:36
timotimo we don't have that yet :( 16:37
zengargoyle m: my %h = <foo bar>; %h{*}.[0]
camelia ( no output )
zengargoyle m: my %h = <foo bar>; %h{}.[0]
camelia ( no output )
16:37 dubi0us joined
zengargoyle m: my %h = <foo bar>; %h{*}.[0].say 16:37
camelia bar
zengargoyle m: my %h = <foo bar>; %h{}.[0].say
camelia {foo => bar}
16:38 bjz left
zengargoyle jnthn: «make ($<style1> // $<style2> // $<style3>).ast» -- once upon a time... i did «make $/{*}.[0].made» for the same sort of thing. decent approach or not? 16:40
guess now that would be $/{*}.first.made. :) 16:42
timotimo yeah, or [//] @$/{*} 16:44
zengargoyle tots wishes i had remembered this before now. guess that will go into plan-e of my `at` parser. :P
in grammar, only one thing will be there.... 16:45
16:45 xinming joined
zengargoyle you just don't know which one thing you got... 16:46
timotimo the thing is that to get the .made you'd need to put parens around
16:46 Mithaldu joined
timotimo "made [//] @$/{*}:" 16:46
okay, so how about this, though:
m: my %result = :99style2; say %result{*}:kv:value.perl; 16:47
camelia Failure.new(exception => X::Adverb.new(what => "slice", source => "\%result", unexpected => ["value"], nogo => ["kv"]), backtrace => Backtrace.new)
timotimo whoops?
m: my %result = :99style2; say %result{*}:pair:value.perl;
camelia Unexpected named argument 'pair' passed
in block <unit> at <tmp> line 1
timotimo m: my %result = :99style2; say %result{*}:pairs:value.perl;
16:47 dubi0us left
camelia Unexpected named argument 'pairs' passed
in block <unit> at <tmp> line 1
timotimo m: my %result = :99style2; say %result{*}:p:value.perl;
camelia Failure.new(exception => X::Adverb.new(what => "slice", source => "\%result", unexpected => ["value"], nogo => ["p"]), backtrace => Backtrace.new)
zengargoyle :" -- ? i don't get this...
timotimo what's that one called again
16:47 dubi0us joined
timotimo oh, that's the indirect method call syntax 16:47
it's for people who really want to write "new MyClass: 1, 2, 3" 16:48
m: my %result = :99style2; say %result{*}:value;
camelia Unexpected named argument 'value' passed
in block <unit> at <tmp> line 1
timotimo m: my %result = :99style2; say %result{*}:values;
camelia Unexpected named argument 'values' passed
in block <unit> at <tmp> line 1
timotimo there totally was an adverb like that 16:49
i have no idea what it was
m: my %result = :99style2; say %result{*}:v;
camelia (99)
timotimo actually, when you have {*} :v makes no sense because you already only get that
zengargoyle if you match and hit the action, you're going to have a $/ with a $/<something> = Match
timotimo the stuff that didn't go into the match don't even end up in the match object
instead of $/{*}.[0] you can also $/.values.head 16:50
zengargoyle m: my %result = :99style2; say %result{*};
camelia (99)
16:50 lucasb left
zengargoyle {*} gives you values, {} gives you pairs.... 16:50
timotimo did you want the name of the thing matched? 16:51
16:51 bjz joined
zengargoyle no, just the thing... the $whatever.made is the only really important part in this case. 16:51
16:52 dubi0us left
timotimo right, so %result.values.head.made? 16:52
hm, i wonder
zengargoyle yeah, or %result{*}.first.made
16:52 zacts joined
timotimo m: my %result = :99foo; say head values %result::: 16:52
camelia ===SORRY!=== Error while compiling <tmp>
Undeclared routine:
head used at line 1
timotimo m: my %result = :99foo; say (head (values %result:):): 16:53
camelia 99
timotimo :) :)
zengargoyle (that's pretty much what i did recently before i remembered the {*}.[0] thing....
16:57 dubi0us joined
zengargoyle m: my %h = <foo bar>; for %h{}.[0].kv -> $k, $v { say "$k -> $v" } 16:57
camelia foo -> bar
zengargoyle m: my %h = <foo bar>; for %h{}.[0] -> $p { say "$p.key() -> $p.value()" } 17:00
camelia foo -> bar
zengargoyle howto -> $k, $v { ... }
timotimo how do you mean? 17:01
zengargoyle m: my %h = <foo bar>; for %h{}.[0] -> $k, $v { say "$k -> $v" } 17:02
camelia Too few positionals passed; expected 2 arguments but got 1
in block <unit> at <tmp> line 1
17:02 dubi0us left
zengargoyle m: my %h = <foo bar>; for %h{}.[0] -> $k => $v { say "$k -> $v" } 17:02
camelia ===SORRY!=== Error while compiling <tmp>
Preceding context expects a term, but found infix > instead
at <tmp>:1
------> my %h = <foo bar>; for %h{}.[0] -> $k => $v { say "$k -> $v" }
zengargoyle m: my %h = <foo bar>; for %h{}.[0] -> ($k, $v){ say "$k -> $v" }
camelia Too few positionals passed to ''; expected 2 arguments but got 0 in sub-signature
in block <unit> at <tmp> line 1
zengargoyle m: my %h = <foo bar>; for %h{}.[0] -> ($k => $v){ say "$k -> $v" }
camelia ===SORRY!=== Error while compiling <tmp>
Preceding context expects a term, but found infix > instead
at <tmp>:1
------> y %h = <foo bar>; for %h{}.[0] -> ($k => $v){ say "$k -> $v" }
timotimo m: my %h = <foo bar>; say %h{}.perl
camelia {:foo("bar")}
zengargoyle sorta like that
timotimo looks like %h{} just returns %h
a zen-slice, like @foo[] 17:03
17:03 Ven_ left
zengargoyle ah 17:03
17:04 perigrin joined
timotimo m: my %h = <foo bar>; my ($k, $v) = %h.kv; say $k.perl; say $v.perl 17:05
camelia "foo"
araraloren so, There is no pretty way to do a clone for a child class ? 17:06
17:06 zakharyas left
araraloren github.com/araraloren/perl6-termin...ng.pm6#L22 17:06
17:06 dubi0us joined
timotimo in that clone method you have there the result of self.bless is unused and just thrown away 17:06
araraloren Look at this String, it inherit from Str, also I know that clone maybe wrong. 17:07
Yeah, so what should I do..
timotimo i'd my $theclone = callsame; $theclone.style = $theclone.style.clone
17:08 BenGoldberg left
timotimo of course you'll have to have accessors for $!style 17:08
araraloren I also have read some rakudo source code, but found no way.
timotimo oh
how about this
nextwith(|(%_, {style => self.style.clone}))
araraloren em, I will try 17:09
timotimo m: my %foo = :1bar, :2baz; sub sayparams(*%_) { say %_.perl }; sayparams(|(%foo, {style => 99}))
camelia Too many positionals passed; expected 0 arguments but got 2
in sub sayparams at <tmp> line 1
in block <unit> at <tmp> line 1
timotimo m: my %foo = :1bar, :2baz; sub sayparams(*%_) { say %_.perl }; sayparams(|%(%foo, {style => 99}))
camelia {:bar(1), :baz(2), :style(99)}
timotimo there we go
17:10 perigrin left 17:11 dubi0us left
zengargoyle sould have said make a .perl and EVAL. :) method clone() { return EVAL self.perl } -- like. 17:11
araraloren timotimo, seems like you code is right, I will make more test 17:12
17:13 perigrin joined
araraloren s/you/your/ 17:13
17:17 dubi0us joined, Cabanossi left 17:19 Cabanossi joined 17:22 dubi0us left 17:27 dubi0us joined 17:31 bjz left 17:32 dubi0us left 17:33 bjz joined 17:35 nhywyll joined 17:37 dubi0us joined
zengargoyle m: my %h = <foo bar>; given %h.first -> (:key($k), :value($v)) { say "$k -> $v" } 17:37
camelia foo -> bar
zengargoyle that's what i was looking for. 17:38
17:41 dubi0us left 17:47 dubi0us joined 17:52 dubi0us left, bjz left 17:53 bjz joined 17:57 dubi0us joined
jnthn zengargoyle: Hm, that's cute. %().first.made may also work (iirc %() is short for %($/)) 17:59
zengargoyle m: grammar D { rule TOP { a+ | b+ { say "in TOP" } } }; say so D.parse("aaa"); 18:06
camelia True
zengargoyle where's my "in TOP" ?
18:07 grumble joined
zengargoyle m: grammar D { rule TOP { a+ | b+ { make "in TOP" } } }; say D.parse("aaa").made; 18:08
camelia No such method 'gist' for invocant of type 'NQPMu'. Did you mean 'isa'?
in block <unit> at <tmp> line 1
zengargoyle m: grammar D { rule TOP { a+ | b+ { make "in TOP" } } }; say D.parse("bbb").made; 18:10
camelia in TOP
18:10 jamesaxl joined
zengargoyle frell 18:10
m: grammar D { rule TOP { [ a+ | b+ ] { make "in TOP" } } }; say D.parse("aaa").made;
camelia in TOP
18:11 dubi0us left
Geth ecosystem: d22b30e8ea | loren++ (committed using GitHub Web editor) | META.list
Update Terminal::Table version 

fix clone method
18:19 dubi0us joined 18:20 Ven joined, Ven is now known as Guest28990 18:21 Guest28990 left
zengargoyle m: my grammar D { token a { a+ }; token b { b+ }; rule TOP { [ <a> | <b> ] { given %().kv -> ($k,$v) { make [ $k, $v ] } } }; }; say so D.parse("aaaa"); say D.parse("aaaa").made; 18:21
camelia True
[a 「aaaa」]
18:23 dubi0us left 18:25 cdg joined
Geth doc: 64a0330591 | (Jan-Olof Hendig)++ | doc/Type/IO/CatHandle.pod6
Formatting fixes
18:27 dubi0us_ joined 18:28 Cabanossi left 18:31 Khisanth left 18:32 Cabanossi joined, dubi0us_ left
zengargoyle m: my grammar D { token a { a+ }; token b { b+ }; rule TOP { [ <a> | <b> ] { make %().kv } }; }; say so D.parse("aaaa"); say D.parse("aaaa").made; 18:36
camelia True
(a 「aaaa」)
18:37 dubi0us joined 18:45 dubi0us left 18:47 darutoko left, dubi0us joined
Geth doc: 33a6888252 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/quoting.pod6
show the example as described
18:49 Kaffe left 18:52 dubi0us left 18:56 dubi0us joined 19:02 Kaffe joined 19:04 Khisanth joined 19:06 dubi0us left 19:09 dubi0us joined 19:14 bjz left
sjn how does one introspect the signature of the method you're currently in? (I'm thinking of calling .signature on something similar to Perl5's __SUB__) 19:16
19:16 travis-ci joined
travis-ci Doc build errored. Jan-Olof Hendig 'Formatting fixes' 19:16
travis-ci.org/perl6/doc/builds/249162155 github.com/perl6/doc/compare/f682c...a0330591a5
19:16 travis-ci left 19:18 dubi0us_ joined, dubi0us left 19:19 Khisanth left 19:22 dubi0us_ left 19:28 dubi0us joined
geekosaur m: class A { method a { dd &?ROUTINE.signature } }; A.new.a 19:29
camelia :(A $: *%_)
geekosaur sjn ^^
19:31 nhywyll left 19:32 dubi0us left
tbrowder hi, how can i get the number of bytes in a Str? i can get graphemes, but i haven't been able to convert to a Buf to get bytes. 19:32
geekosaur you need to specify an encoding 19:34
tbrowder never mind, looks like Str encode method is the route to go, thnx
geekosaur m: say "Åä".encode('UTF-8').bytes 19:35
camelia 4
geekosaur yes
19:37 madgoat joined, dubi0us joined 19:38 travis-ci joined
travis-ci Doc build errored. Tom Browder 'show the example as described' 19:38
travis-ci.org/perl6/doc/builds/249166391 github.com/perl6/doc/compare/64a03...a68882521e
19:38 travis-ci left 19:40 madgoat left 19:42 dubi0us left 19:45 kyan left 19:47 dubi0us joined 19:52 dubi0us left, lucasb joined 19:55 Shanta joined 19:57 dubi0us joined, kyan joined
Shanta Hi I am new to perl 6 in the process of installing zef using. 2 git clone github.com/ugexe/zef.git 3 cd zef 4 perl6 -Ilib bin/zef install zef 19:57
Too few positionals passed; expected 2 arguments but got 1 in code at /home/shanta/zef/lib/Zef/Repository/LocalCache.pm6 (Zef::Repository::LocalCache) line 90 in method slurp-package-list at /home/shanta/zef/lib/Zef/Repository/LocalCache 19:58
What am I missing? 19:59
20:04 cdg left, jamesaxl left 20:06 dubi0us left 20:07 TEttinger joined, dubi0us joined, dubi0us left 20:08 dubi0us joined 20:16 Cabanossi left, cyphase joined 20:19 user3 joined, Cabanossi joined, rindolf left
user3 how do I get the symmetric difference between 2 hash variables %h1 and %h2 20:20
%h1 is a proper superset of %h2 20:23
moritz Shanta: what's your version of Perl 6? 20:25
yoleaux 30 Jun 2017 22:01Z <AlexDaniel> moritz: clog handles unicode rather poorly nowadays… ¦ appears as ¦ and I don't think this issue existed previously
moritz perl6 --version
zengargoyle Shanta: try: perl6 -I. ./bin/zef install .
moritz user3: sets support difference as an operator, duno if hashes do
zengargoyle and/or the instructions say: perl6 -Ilib bin/zef install . 20:27
it might not be able to install a named module from the internets from it's source dir 'install zef', but should install a directory (itself) with 'install .' 20:28
sjn Shanta: perl6 -v # gives the version you're running now. zef needs a recent version
jnthn m: my %h1 = :a, :b, :c; my %h2 = :c, :d; say %h1 ⊖ %h2 20:30
camelia set(d, b, a)
jnthn m: my %h1 = :a, :b, :c; my %h2 = :c, :d; say %h1 (^) %h2 # ascii
camelia set(d, b, a)
zengargoyle oh, yeah, maybe perl6 version. :) 20:31
20:32 rindolf joined
zengargoyle .u ⊖ 20:33
yoleaux U+2296 CIRCLED MINUS [Sm] (⊖)
zengargoyle docs.perl6.org/language/setbagmix#...e_operator 20:36
i think docs.perl6.org/language/glossary#i...s_operator needs a link to docs.perl6.org/language/unicode_texas 20:38
20:42 |oLa| left, Khisanth joined, |oLa| joined 20:44 BenGoldberg joined 20:45 ilbot3 left, ilbot3 joined, ChanServ sets mode: +v ilbot3
moritz m: say 42 20:46
camelia 42
20:48 Cabanossi left 20:49 Cabanossi joined, rindolf left 20:51 andrzejku left
leont My code is doing «my $raw = $optional || %variables{$key}:exists», and the compiler complains about «You can't adverb &infix:<||>», what am I doing wrong? 20:51
20:52 rindolf joined
moritz just precedence 20:54
my $raw = $optional || (%variables{$key}:exists);
zengargoyle thinks it's too late in the day to figure out usage of L<> in docs. :)
20:56 user3 left 20:57 |oLa| left
Juerd Interesting that adverbs are looser than || 20:58
Does that have use cases?
leont Solved it be switching them around 20:59
20:59 |oLa| joined
masak Juerd: adverbs don't really participate in the precedence game. they just seek out the highest node in the AST fragment they're in. 20:59
Juerd masak: What's a good strategy for me, as a code reading human, to know what the adverb will be applied to? 21:01
leont ugexe: And now zef doesn't want to do anything. «Too few positionals passed; expected 2 arguments but got 1», Zef::Repository::LocalCache line 90
masak Juerd: it will apply to the loosest operator that precedes it (but no looser than infix:<,>) 21:04
21:05 parv joined
masak Juerd: so if you have a sense of the order the operators will execute in, you can form an intuition of what the adverb will bind to 21:05
Juerd masak: Oh, so in %foo{$key}:exists it applies to the operator {}, rather than the hash?
masak aye
Juerd I should read up on adverbs. I understand very little about them.
masak %foo is a term, not an operator :)
Juerd Good point, but I find this syntax rather alien :)
masak but with `+%foo{$key} :exists`, it applies to the prefix:<+>; probably not intended 21:06
Juerd Ahh
masak because prefix:<+> is very loose
Juerd Thanks, this clears up a lot of the fog in my mind, regarding adverbs
masak the one that always bites me is the `||` above. or `&&`
basically, I find (for me) adverbs break a fundamental expectation of refactoring
that subexpressions can be re-arranged according to mathematical laws 21:07
leont I would have expected them to bind on proximity
masak yes, that might have been nice
timotimo maybe it's time for a slang to explore this 21:09
masak \o/
to the slang machine!
timotimo that was not me volunteering
masak history will be the judge of that 21:10
timotimo historians from the future will not be able to retroactively force me to implement this :) 21:11
well, if sufficiently far in the future, it might be possible 21:12
21:12 domidumont left 21:13 broquaint left, iH2O joined
masak any sufficiently advanced future-historianism is indistinguishable from coercion 21:13
iH2O why doesn't "say;" work to print an empty line? what is the cleanest way to do it? 21:14
21:14 araraloren left
masak m: say "" 21:14
iH2O say ''
masak iH2O: historical reasons.
masak iH2O: in Perl 5, `say` means `say $_` 21:15
iH2O ok
masak iH2O: and it was decided early on that people who wrote `say;` in Perl 6 would be far too likely to mean `say $_;` (influenced by Perl 5) even though by the logic of Perl 6 it clearly means `say "";` 21:16
timotimo m: put
camelia ===SORRY!===
Argument to "put" seems to be malformed
at <tmp>:1
------> put<EOL>
Other potential difficulties:
Function "put" may not be called without arguments (please use () or whitespace to denote arguments, or &put to r…
timotimo m: put()
timotimo m: say()
timotimo there you go, you can do that, as well
parv m: say put 21:18
yoleaux 30 Jun 2017 10:19Z <HelpBot[perl6]> parv: you should only ever use releases and not "build every day" off a random commit. Non-release commits aren't as thoroughly tested and it isn't uncommon for them to have some regressions. People who build them are like people who do 30 over speed limit: they think they know better and would like to get (bugfixes) fast, but eventually they'll come across a untested pothole that wipes all their data.
camelia ===SORRY!===
Argument to "put" seems to be malformed
at <tmp>:1
------> say put<EOL>
Other potential difficulties:
Function "put" may not be called without arguments (please use () or whitespace to denote arguments, or &put …
masak I've always felt that those of us who don't have a strong Perl 5 lilt have been short-changed by that "potential difficulty" error. `say;` is such a nice, short, clear, straightforward thing to write.
but, on the other hand, I haven't been strongly pushing for a pragma-or-something to turn it off, either, so... :)
parv masak, i won't have minded if Perl 6 would not even bear a passing similarity to Perl 5 (which I have been using for a long time) 21:20
m: say say
camelia ===SORRY!===
Argument to "say" seems to be malformed
at <tmp>:1
------> say say<EOL>
Other potential difficulties:
Unsupported use of bare "say"; in Perl 6 please use .say if you meant to call it as a method on $_, or use an…
21:21 iH2O left
timotimo with slanngs you can make it as outlandish as you like :D 21:24
21:31 setty1 left
Shanta This is Rakudo version 2016.12 built on MoarVM version 2016.12 implementing Perl 6.c. 21:34
timotimo that's rather old 21:35
21:36 lucasb left
Shanta zengargoyle tried yor sugestion shorter error list but same problem 21:38
timotimo Shanta: it's definitely possible that your version of rakudo is too old to install zef 21:44
Shanta Just downloaded from the site. 21:47
timotimo you're on a 32bit windows? 21:51
no, that's 2016.01
Shanta linux
timotimo where did you download it? rakudo.org has 2017.04, or 2016.01, not 2016.12
Shanta yes
I will try again from the tar. 21:52
did the first install from the web page code as shown way above. 21:53
21:54 wamba left
El_Che Shanta: in case you just want rakudo and want to install modules with zef: github.com/nxadm/rakudo-pkg/releases 21:57
Shanta wget rakudo.perl6.org/downloads/rakudo/....06.tar.gz 3 tar xzf rakudo-2017.06.tar.gz 4 cd rakudo-2017.06/ 5 perl Configure.pl --gen-moar --gen-nqp --backends=moar 6 make 7 make install
timotimo it will not install that rakudo systemwide btw 21:58
Shanta El_Che can't get zef installed yet.
timotimo maybe you have a PATH that points to an older perl6 binary? 21:59
what would "which perl6" say?
El_Che Shanta: the link I gave you are precompiled linux packages that include a script to install zef. 22:00
Shanta I am reading the i should have .06
El_Che rakudo star on linux are: source to compiles with a set of pre-chose modules
Shanta code used to get zef git clone github.com/ugexe/zef.git Cloning into 'zef'... 22:01
timotimo + documentation 22:02
Shanta path seems to be /usr/bin/perl6
22:02 parv left
timotimo okay, it wouldn't install that with the commandline you gave above 22:03
so that must be the przoblem
did you try installing a perl6 with your package manager?
22:03 |oLa| left
Shanta yes them removed it as it would be too old. 22:03
timotimo hm, but somehow it must have stuck around 22:04
Shanta Maybe I pull a windows to get the path to refresh Primarily flowing Gabor Szabo's new book. 22:07
timotimo oh cool
if there's no perl6 binary at that path, which wouldn't output it and calling perl6 wouldn't try to run it
22:09 robertle left 22:11 Shanta left 22:12 Shanta joined 22:19 sftp left 22:20 sftp joined 22:28 cyphase left 22:33 bjz joined 22:44 bjz left 22:59 dubi0us_ joined 23:01 dubi0us left 23:02 Cabanossi left 23:03 pmurias left 23:04 Cabanossi joined 23:06 cyphase joined, Ven joined 23:07 Ven is now known as Guest98263 23:08 dubi0us_ left 23:10 dubi0us joined 23:11 dubi0us_ joined 23:12 Guest98263 left 23:14 dubi0us left, dubi0us__ joined 23:17 dubi0us_ left 23:23 cyphase left 23:24 dubi0us__ left 23:27 cyphase joined, dubi0us joined 23:29 Rawriful left 23:32 dubi0us left 23:35 dubi0us joined, dubi0us_ joined 23:40 dubi0us left 23:48 bjz joined, Cabanossi left 23:49 Cabanossi joined 23:53 dubi0us joined 23:56 dubi0us_ left, Ben_Goldberg joined, BenGoldberg left, Ben_Goldberg is now known as BenGoldberg