»ö« 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.
00:14 agwind joined 00:21 itaipu left 00:22 lookatme joined
lookatme o/ 00:24
tyil hi 00:25
lookatme morning #perl6
00:28 Cabanossi left 00:29 Cabanossi joined 00:36 softmoth joined
Geth doc: 9835edb949 | (Dmitri Iouchtchenko)++ | doc/Language/traps.pod6
Tidy up regex trap example code
00:41
doc: df41c1a7ab | (Dmitri Iouchtchenko)++ | 2 files
Improve wording
synopsebot Link: doc.perl6.org/language/traps
doc: d20fe3561c | (Alex Chen)++ (committed using GitHub Web editor) | 2 files
Merge pull request #1717 from 0/regex

Minor adjustments
00:54 kkk joined 00:55 kkk is now known as Guest63475 00:56 Cabanossi left 00:59 Cabanossi joined 01:00 Guest63475 left 01:18 aindilis left 01:19 aindilis joined 01:32 tbrowder left 01:33 Herby__ joined 01:48 khw left 01:49 colomon left 01:51 Herby__ left 01:54 mingdao is now known as PICNIC, PICNIC is now known as mingdao 01:59 ruschlem left 02:10 agwind left
Geth doc: c3de4989b8 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/pod.pod6
update legal config key value formats
02:14
synopsebot Link: doc.perl6.org/language/pod
02:16 tbrowder joined
tbrowder o/ lookatme 02:23
lookatme :) 02:24
02:25 wamba left 02:26 khw joined 02:31 ruschlem joined 02:34 comborico1611 left 02:35 astronavt left 02:40 aindilis` joined 02:41 aindilis left 02:42 Cabanossi left 02:43 astronavt joined 02:44 Cabanossi joined 02:46 ilbot3 left 02:58 ilbot3 joined, ChanServ sets mode: +v ilbot3 03:01 ruschlem left 03:09 astronavt left 03:10 astronavt joined 03:11 astronavt left 03:25 cdg joined 03:27 agwind joined 03:30 cdg left 03:36 cdg joined 03:47 pilne left 04:03 softmoth left 04:04 softmoth joined 04:10 softmoth left 04:11 Cabanossi left 04:14 Cabanossi joined
timotimo reads the day 14 advent post 04:23
wordpress ate a bunch of characters in the code 04:24
again
04:26 espadrine left 04:34 nige joined 04:43 Cabanossi left 04:44 Cabanossi joined 04:53 cdg left 04:58 Cabanossi left, Cabanoss- joined, Cabanoss- is now known as Cabanossi 05:25 itaipu joined 05:38 khw left 06:02 itaipu left 06:10 Cabanossi left 06:13 Cabanossi joined
moritz good morning 06:17
yoleaux 17 Dec 2017 22:27Z <lizmat> moritz: we need some irclog cleaning again (just now)
moritz deletes some spam 06:19
06:20 andrzejku joined 06:37 andrzejku left 06:40 Cabanossi left 06:43 Cabanossi joined 06:45 aborazmeh joined, aborazmeh left, aborazmeh joined 06:48 darutoko joined 06:53 Morfent joined 06:54 Morfent left 06:55 Morfent joined 07:26 nige left 07:28 ruschlem joined 07:41 Cabanossi left
AlexDaniel can somebody try zef install Text::Markdown::Discount ? 07:41
it's right there but it says “No candidates found matching identity: Text::Markdown::Discount
lookatme same here, no candidates 07:43
07:43 Cabanossi joined
teatime wat.. how do I not have zef installed.. 07:43
TimToady failed here too 07:44
lookatme And `zef search` return 0 result
07:52 nige joined 07:53 khisanth_ left
teatime html/web question: you cannot/shouldn't really make up your own random attribute names the way this does… or can you?… « <div class="TTreview" reviewId="2318" date="1504554477000" upvotes="0" downVotes="0" rating="5" itemscope itemtype="schema.org/Review"> » 08:01
or is there some spec now for upvotes= and downvotes= that I missed
08:02 domidumont joined
moritz if I remember correctly, you can make up your own attributes in the "data-" namespace 08:02
so data-upvotes=0, data-downvotes=0 would be valid
teatime yeah, yes that's right. 08:03
it's monoprice.com I noticed it in ... funny that they go to apparent trouble to markup their metadata semantically, 08:04
geekosaur is that actually web though? nothing stops someone from making an xml schema based on xhtml+xml-1.0 with their own extensions, and then relying on web browsers doing their render-at-any-cost thing
teatime but then they do that? *shrug*
it is web, yeah
geekosaur and, if you do that, you can still manipulate it via the DOM. so yeh, not that ssurprising. if they declare the page to be standards compliant though and not their extension, they should probably be slapped. (of course, who bells the cat?)
teatime it always bugs me that you can't define your own elements in practice for html 08:05
like, that's what xml namespaces are for, yeah? but xhtml is dead, so?
08:07 domidumont left, khisanth_ joined
teatime oh well, as it happens, I don't even need to worry about rendering it, I need to parse it, and it looks alright for that 08:07
geekosaur the web is the wild west and always will be. mozilla tried being strict about that and lost
08:07 domidumont joined
teatime it's such an interesting exercise in... game theory? 08:08
geekosaur and psychology and several other topics :)
TEttinger game psychiatry
teatime that could totally be a thing in 15 years. 08:09
TEttinger neural networks to diagnose your neural networks
geekosaur they're already doing that :p
08:10 eliasr joined 08:19 wamba joined 08:23 cosimo joined 08:27 ruschlem left 08:28 abraxxa joined, abraxxa left 08:30 abraxxa joined 08:33 ruschlem joined 08:38 nige left 08:40 Cabanossi left 08:43 Cabanossi joined 08:59 mziescha joined 09:00 dogbert17 left
Geth doc: e2cb057c88 | (Luca Ferrari)++ | doc/Language/5to6-perlop.pod6
Enahnce the 'Conditional Operator' section.

Added a simple example based on the previous one that shows side-to-side the difference between the Perl 5 and Perl 6 ?: and ??!!. Added a space in C<? :> for coherence with the C<?? !!>.
09:02
synopsebot Link: doc.perl6.org/language/5to6-perlop
mziescha Hey, can someone help me? I try to make an object from string. In perl5 like that $package_string->new($param); Is there a way like that in perl6? 09:07
09:08 aborazmeh left
lookatme You mean like "Int".new ? 09:10
piojo mziescha: which type is the object, and what's the format of a string?
oh, lookatme understood better than me
m: say ::{'Int'}.new 09:12
camelia 0
mziescha Yeah like that
my current try is like that:
require ::($s_namespace);
my $obj_write_queries = $s_namespace.new;
but that's wrong
I'm trying to implement queries from a namespace dynamicaly 09:14
lookatme off work now :) bye
09:14 scimon joined, lookatme left
piojo mziescha: this may be useful: docs.perl6.org/language/packages 09:15
And this page describes dynamic 'require': docs.perl6.org/syntax/require 09:16
mziescha thank you i will try 09:17
the require works fine I just had no clue about the new 09:18
piojo oh, good. I didn't know what exactly wasn't working.
m: my Hash[Int] %hash-of-hash; %hash-of-hash<x><y> = 5;
camelia Type check failed in assignment to %hash-of-hash; expected Hash[Int] but got Hash (${})
in block <unit> at <tmp> line 1
piojo Is the above considered a bug? Hash autovivication doesn't do something sane when the hash's values are type-constrained 09:19
09:20 lowbro joined, lowbro left, lowbro joined 09:27 Cabanossi left 09:28 Cabanossi joined 09:34 scovit left 09:37 hobbs left
piojo m: say now()-now() 09:40
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
now used at line 1. Did you mean 'not', 'HOW'?
piojo that's gotta be a bug!
oh, I guess it's not 09:41
what is now if it's not a routine?
09:44 sena_kun joined, hobbs joined, hobbs left, hobbs joined 09:48 rindolf joined
moritz a term 09:53
m: say &term:<now>
camelia sub term:<now> () { #`(Sub|36504768) ... }
09:54 TEttinger left, gregf_ joined
piojo moritz: thanks. I didn't know about terms 09:56
10:01 dogbert2 left
piojo Is it illegal to bind a state variable to another variable? 10:02
I mean, does it make it not a state variable anymore?
m: 'sub f() { state %h; say %h.perl; %h := {a => 5}; }; f; f; 10:03
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in single quotes; couldn't find final "'" (corresponding starter was at line 1)
at <tmp>:1
------> 3h; say %h.perl; %h := {a => 5}; }; f; f;7⏏5<EOL>
expecting …
piojo m: sub f() { state %h; say %h.perl; %h := {a => 5}; }; f; f;
camelia {}
{}
piojo I really thought I could re-bind it and still have it be a state variable, but I guess not... 10:04
moritz I guess it shouldn't silently swallow the binding 10:14
either do it, or blow up
10:36 domidumont1 joined 10:38 domidumont left
f3ew looks for a lizmat 10:48
10:56 Voldenet left
AlexDaniel f3ew: may I ask why? Thinking that maybe some pseudolizmat can help :) 11:01
rindolf f3ew: hi 11:02
11:02 Voldenet joined, Voldenet left, Voldenet joined 11:03 ruschlem left 11:06 dogbert2 joined
lizmat is awake 11:12
f3ew: what is the problem? 11:13
11:13 wamba left
dogbert2 #MoarVM is filled with spam 11:13
lizmat well, I think mst has irc powers there 11:14
and moritz could be asked to perform some irclog sanitizing on #moarvm
which moritz apparently has done on #perl6-dev already 11:15
11:15 ZzZombo left 11:18 itaipu joined 11:25 ZzZombo joined 11:26 ZzZombo left, ZzZombo joined
abraxxa how can I call this sub without specifying $name? github.com/retupmoca/P6-Net-AMQP/b...l.pm6#L140 11:37
ilmari m: sub foo($name, :$stuff) { say $name, $stuff }; foo(stuff => 42) 11:46
camelia Too few positionals passed; expected 1 argument but got 0
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
ilmari abraxxa: you can't, it's a mandatory parameter
DrForr Just call Net::AMQP::Queue.new() directly, since $name is optional?
abraxxa DrForr: i need the other params 11:47
DrForr (though if you're calling declare-queue, ilmari is correct.)
abraxxa '' seems to work as the amqp message generating module inside the dist expects a chars method on it
ilmari couldn't conn => $!conn be written :$!conn?
abraxxa most modules still don't have a Perl6ish api
no types for example 11:48
11:48 araraloren joined
moritz ilmari: it could 11:50
lizmat moritz: could you also rinse #moarvm irclog of garbage? 11:51
timotimo teatime: have you looked into web components at all?
moritz lizmat: I'm on it. Somehow my sql server seems to hang during the delete :( 11:52
11:57 Cabanossi left 11:58 Cabanossi joined 12:05 kst left 12:12 Hotkeys left
Geth doc: 7f113600f0 | (Elizabeth Mattijsen)++ | doc/Type/Telemetry/Instrument/Threadpool.pod6
First stab at documenting Telemetry::Instrument::ThreadPool
12:14
synopsebot Link: doc.perl6.org/type/Telemetry/Instr...Threadpool
moritz the #moarvm spam is removed from the IRC logs 12:19
lizmat moritz++ 12:22
f3ew lizmat: what's a good email address to reach you at?
AlexDaniel: not a technical question, thanks though :) 12:23
f3ew waves at rindolf
Geth doc: ed9df178a0 | (Elizabeth Mattijsen)++ | doc/Type/Telemetry/Instrument/Thread.pod6
First stab at documenting Telemetry::Instrument::Thread
synopsebot Link: doc.perl6.org/type/Telemetry/Instrument/Thread
Geth doc: 5801be3e61 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/pod.pod6
add some config formats
12:25
synopsebot Link: doc.perl6.org/language/pod
dogbert2 moritz++ 12:27
12:28 wamba joined 12:44 squashable6 left, reportable6 left, unicodable6 left, greppable6 left, benchable6 left, squashable6 joined, ChanServ sets mode: +v squashable6, reportable6 joined, unicodable6 joined, ChanServ sets mode: +v unicodable6, greppable6 joined, benchable6 joined 12:45 wamba left 12:53 itaipu left 12:54 itaipu joined 12:57 mahafyi joined
mahafyi good day to all :) 12:57
13:05 telex left
Geth mu: f4d3b19eb3 | lizmat++ (committed using GitHub Web editor) | misc/perl6advent-2017/schedule
Change my slot to something more advent like

I intend to publish the originally intended blog post early in the new year, on blogs.perl.org instead.
13:08
13:10 itaipu left
araraloren Is there any method of Iterator can skip all rest element ? The .sink-all is not what I wanted 13:12
scimon So... I'm wondering if adding a small coating of elves to my post is required? Hmm 13:14
araraloren Oh, I should set them Nil or IterationEnd :) 13:15
Thanks
[Coke] h/win 6 13:17
araraloren m: my @a = lazy gather do { say "foo"; take 1; say "bar"; take 2; }; say @a.is-lazy; @a.skip-one; say @a; 13:21
camelia True
No such method 'skip-one' for invocant of type 'Array'
in block <unit> at <tmp> line 1
araraloren m: my @a = lazy gather do { say "foo"; take 1; say "bar"; take 2; }; say @a.is-lazy; my $i = @a.iterator; $i.skip-one; say $i.pull-one; 13:22
camelia True
foo
bar
2
araraloren I wonder why when I call .skip-one, it still print `foo`?
13:23 telex joined
lizmat araraloren: if the iterator doesn't implement its own "skip-one", it falls back to "pull-one" and ignoring the returned value 13:23
araraloren m: my @a = lazy gather do { say "foo"; take 1; say "bar"; take 2; }; say @a.is-lazy; my $i = @a.iterator; say $i.pull-one; $i.skip-one;
camelia True
foo
1
bar
13:23 Zoffix joined
araraloren Or at least, I dont' want this `bar` 13:24
Zoffix araraloren: you'd need to make your own iterator then
lizmat that could indeed be considered a deficiency in the GATHER iterator
Zoffix araraloren: also, you're not really meant to call iterator methods directly
m: my @a = (lazy gather do { say "foo"; take 1; say "bar"; take 2; }).skip(1); @a.skip; say @a;
camelia foo
bar
[2]
lizmat please make a GH issue for after the release
Zoffix never mind the second .skip 13:25
araraloren: maybe this would be of help: rakudo.party/post/Perl-6-Seqs-Drug...ll--Part-2
Geth mu: c236552563 | (Will Coleda)++ (committed using GitHub Web editor) | misc/perl6advent-2017/schedule
Update schedule
araraloren I have already read your post :) 13:26
but not finished
thanks
13:26 itaipu joined
araraloren What is GH 13:26
Should I report a bug ? or optimization advice ? 13:27
Zoffix araraloren: GH = GitHub. github.com/rakudo/rakudo/issues/new
araraloren :( I dont' even know GH = github
Zoffix I don't really know how gather {} can know what code to skip when doing skip-one. `take` just throws a control exception, innit? 13:28
araraloren Zoffix, I thought is was lazy generator, it maybe can skip the rest code 13:30
lizmat m: dd (gather {}).^name # but gather returns a .Seq and that has an iterator and that could be taught how to drop one "take" on the floor if a .skip-one is done
camelia "Seq"
Zoffix But it'd still need to run the `say "bar"` in `say "bar"; take 2;` to get to the second take to drop it, no? 13:31
s: &GATHER
SourceBaby Zoffix, Sauce is at github.com/rakudo/rakudo/blob/4fca...eq.pm#L170
lizmat Zoffix: true, so yes, it wouldn't prevent that 13:32
Zoffix Ah.
araraloren yeah, or, at least, skip rest code when call `skip-all`, though that method not exists
Zoffix There's still this bug: RT#131829
synopsebot RT#131829 [open]: rt.perl.org/Ticket/Display.html?id=131829 Weird memory leakage of sequences and other things ( (1…∞).grep(* < 0)[^10] )
Zoffix Oh wait, that's in SEQUENCE 13:33
:)
13:33 Zoffix left
AlexDaniel gah, what was the ticket for “expected Array[Str] but got Array[Str].new("this")” issue 13:51
13:51 Herby_ left
AlexDaniel ah, RT#128287 / RT#132525 13:52
synopsebot RT#128287 [open]: rt.perl.org/Ticket/Display.html?id=128287 [BUG] Type check `Array[Foo]` in module gets confused if `Array[Foo]` was already referenced in another precompiled module.
RT#132525 [open]: rt.perl.org/Ticket/Display.html?id=132525 [REGRESSION][PRECOMP] type constraints to Array[Pair] don't work when precompiled
AlexDaniel huggable: expected :is: RT#127001 RT#127049 RT#127309 RT#128287 RT#132525 RT#132592 13:58
huggable AlexDaniel, Added expected as RT#127001 RT#127049 RT#127309 RT#128287 RT#132525 RT#132592
synopsebot RT#127001 [open]: rt.perl.org/Ticket/Display.html?id=127001 [PRECOMP] [NATIVECALL] CArray[CArray[int8]] fails type check
RT#127049 [new]: rt.perl.org/Ticket/Display.html?id=127049 [BUG] expected Array[Str] but got Array[Str].new("<a>") (2015.12 Regression from 2015.11)
RT#127309 [new]: rt.perl.org/Ticket/Display.html?id=127309 Type check failure for Array[...] as return value caused by irrelevent inclusion from another compunit
RT#132592 [new]: rt.perl.org/Ticket/Display.html?id=132592 Typed Array assignment type check fails sometimes
14:01 aindilis` left 14:03 david_xd joined
teatime timotimo: yeah, I think I get the high-level idea. so I get how such a thing would take input from arbitrary data-foo attribs. but arbitrary attribs is still invalid html, even though I think a few frameworks use them 14:04
like, all the ng-* attributes, yeah?
jast afaik in html5 they're not invalid
teatime I am not a web dev guy, I just keep a semi-curious eye on the stacks
jast: ah, now that would be pretty cool ...
Geth ecosystem: 7469b4d102 | (Aleks-Daniel Jakimenko-Aleksejev)++ | META.list
Fix META6.json link
14:10
14:11 perlpilot left
Geth doc: b26526ff25 | (Luca Ferrari)++ | doc/Language/5to6-perlop.pod6
Verbose explaination of the range operators.

Since, so far, pod tables cannot deal with C<>, I switched the table of range operators to a list of items with a specific code example following.
14:14
synopsebot Link: doc.perl6.org/language/5to6-perlop
doc: 82088c8b05 | (Luca Ferrari)++ | doc/Language/5to6-perlop.pod6
Remove extra blank line in conditional operator.
doc: 964d8ac472 | (Luca Ferrari)++ | doc/Language/5to6-perlop.pod6
Fix links fo operators 'ff' and 'fff'.

Rewording of the explaination within the range operators about flip-flop operators in Perl 5 compared to ff and fff in Perl 6.
14:15 abraxxa left 14:16 abraxxa joined 14:17 wamba joined
Geth Swapped META.info → META6.json in 1 dists in github.com/perl6/ecosystem/commit/9db66401c0 14:20
14:25 kaare_ left 14:26 Cabanossi left 14:28 Cabanossi joined
Geth doc: 4d19770550 | (Elizabeth Mattijsen)++ | doc/Language/variables.pod6
Minimal documentation of &*EXIT
14:29
synopsebot Link: doc.perl6.org/language/variables
14:32 poohman joined
poohman hello - is there a way to have conditional or pattern matching in a point block for loop?? 14:33
for 'somefile.IO.lines -> $name {} 14:34
lizmat for 'somefile.IO.lines.grep ? 14:35
poohman that could work 14:36
Geth doc: ae8b031374 | (Elizabeth Mattijsen)++ | doc/Language/variables.pod6
Minimal documentation of $*SAMPLER
14:37
lizmat poohman: and it would still be lazy
poohman cool - but could I have expression or sub before pusing it to $name 14:38
lizmat for 'somefile.IO.lines.grep( * ne "poohman" ) -> $name { # something like that ? 14:39
poohman something like for 'somefile.IO.lines -> something -> $name { }
timotimo you can try feeds 14:40
poohman and my something could be a switch case sub
timotimo m: lines() ==> grep( / << .. >> / ) ==> map({ say "this is it: $_" }) 14:41
camelia this is it: »Um die siebente Stund‘, am Brückendamm.«
this is it: »Am Mittelpfeiler.«
this is it: Und die Brücke muß in den Grund hinein.«
this is it: »Und der Zug, der in die Brücke tritt
this is it: Um die sie…
timotimo m: lines() ==> grep( / << ....... >> / ) ==> map({ say "this is it: $_" }) 14:42
camelia this is it: »Wann treffen wir drei wieder zusamm?«
this is it: »Ich mit«
this is it: »Und ich vom Süden.«
this is it: »Und ich vom Meer.«
this is it: Und die Brücke muß in den Grund hinein.«
this is it: …
poohman lines() = where or what is this reading? 14:43
timotimo standard input 14:44
lizmat $*IN
poohman ok
I can use both Lizs and your methods - but how do I incorporate in the for pointy block - in a sort of closure way 14:46
not sure I am expressing myself properly
lizmat is not sure she understands the question :-)
poohman can I somehow put the following in a for pointy block? 14:47
lines() ==> grep( / << ....... >> / ) ==> map({ say "this is it: $_" }) 14:48
14:48 Zoffix joined
Zoffix FWIW: lines() reads from $*ARGFILES 14:48
lines.grep( / << ....... >> / ).map({ say "this is it: $_" })
lizmat oops, yup, and that defaults to $*IN, right ?
Zoffix It defaults to an IO::CatHandle with $*IN as source handle 14:49
14:49 Morfent left
lizmat Zoffix++ :-) 14:49
poohman nice - let me play around and have a look - thanks everyone 14:50
timotimo you can just "for lines().grep(/ << ...... >> /) -> $line { ... }"
14:53 pdcawley left 14:55 pdcawley joined
poohman cool - so instead of grep I can make my closurey sub and do pattern matching there - right? 14:57
Zoffix 🤓🤓🤓 Or rather it defaults to IO::ArgFiles (which is just an empty class that inherits from IO::CatHandle) with $*IN as source handle + $*IN's attributes :ln-in, :chomp, :encoding, :bin set from $*IN 14:58
timotimo not sure how you mean that
m: for <a b c d e>.grep(-> Int $foo { say "test" }) -> { .say }
camelia Type check failed in binding to parameter '$foo'; expected Int but got Str ("a")
in block <unit> at <tmp> line 1
14:58 cdg joined
timotimo if your pattern match fails, it'll throw this error 14:58
araraloren m: my %h = a => 1; say %h<a>:delete; 14:59
camelia 1
araraloren Is the delete return removed Pair's value ? 15:00
m: my %h = a => "removed"; say %h<a>:delete;
camelia removed
poohman Can I use anything else other than grep?
Zoffix poohman: what are you trying to do exactly? 15:01
timotimo m: my %h = a => "removed"; say %h<a>:delete:p;
camelia a => removed
timotimo m: my %h = a => "removed"; say %h<a>:delete:kv;
camelia (a removed)
timotimo m: my %h = a => "removed"; say %h<a>:delete:k;
camelia a
timotimo araraloren: ^
araraloren I did see that in document :)
poohman give me sometime timotimo - ill get ack with some code 15:02
araraloren It just said remove it from Hash
timotimo m: my %h = a => "removed"; say %h<a>:delete:exists; say %h<not-in-there>:delete:exists
camelia True
False
araraloren :\ seems like complicate 15:03
Geth doc: 099a4f8f2c | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/variables.pod6
Make $*ARGFILES def more precise

  - Mention it's an IO::ArgFiles object that's just a reskinned IO:::CatHandle
  - Mention details about attrs being copied when source is lone $*IN
15:04
synopsebot Link: doc.perl6.org/language/variables
Zoffix m: my %h = a => "removed"; say %h<a>:delete:kv:exists 15:09
camelia (a True)
Zoffix bug
Oh
timotimo it is?
lizmat m: my %h = a => 42, b => 666; dd %h<a c d>:delete:p # only return the ones actually removed 15:10
camelia (:a(42),)
lizmat m: my %h = a => "removed"; say %h<b>:delete:kv:exists
camelia ()
Zoffix Well, it's a bit of a DITWIDT, but it seems to work right. The :kv just applies to :exists's return value
lizmat the :kv, :k, :v, :p filter on existence
Docter It Tweets When I Do This ? 15:11
Zoffix :)
lizmat *Doctor :-)
15:13 Zoffix left
DrForr . o ( You rang? ) 15:14
15:33 troys joined, cdg left 15:34 cdg joined
AlexDaniel huggable: advent 15:37
huggable AlexDaniel, Sign up to write an Advent blog post: github.com/perl6/mu/blob/master/mi...7/schedule
15:42 silug joined 16:00 comborico1611 joined
araraloren How can I read specify size chunk from IO::Socket::Async.Supply ? 16:00
How can I read specify size chunk from IO::Socket::Async ?
16:17 troys is now known as troys_
scimon Having one of those (Oh that's nice) moments. When I find that that Date Ranges... just work. 16:21
m: enum DoW < Sunday Monday Tuesday Wednesday Thursday Friday Saturday >;say (Date.new("2018-01-01")..Date.new("2018-12-31")).grep( *.day-of-week == Saturday ) 16:22
camelia (2018-01-06 2018-01-13 2018-01-20 2018-01-27 2018-02-03 2018-02-10 2018-02-17 2018-02-24 2018-03-03 2018-03-10 2018-03-17 2018-03-24 2018-03-31 2018-04-07 2018-04-14 2018-04-21 2018-04-28 2018-05-05 2018-05-12 2018-05-19 2018-05-26 2018-06-02 2018-06-…
scimon :D
16:23 araraloren left
scimon I get wildly impressed by the simplest things. 16:26
moritz simple but awesome :-)
16:28 troys_ is now known as troys
[Coke] scimon: I used something like that to help me calculate the number of Friday the 13ths since I started dating my wife (on Friday the 13th). 16:29
scimon :D 16:33
Wondering if a talk on making Objects that can "just work" would be good for TPC Glasgow. (This gives me enough time to learn how to do it properly) 16:34
Got some great feedback on my talk as LPW but there was a point made that we could do with some more in depth topic talks. 16:36
16:39 zakharyas joined 16:40 mziescha left 16:41 philomath_ joined 16:44 david_xd left 16:49 abraxxa left
sena_kun hi folks! 16:53
tyil hi 16:54
sena_kun if I have, say, supply { whenever { react { whenever }}}(because I need to proceed inner whenever before the rest of outer whenever code), but I end up unable to emit from inner whenever. I just need some additional variables(e.g. save inner results and emit it later) or there's some neat trick possible? 16:56
s/proceed/process/
16:57 Srini joined 16:58 Srini left, wamba left
sena_kun hmm, now intermediate variable seems the simplest solution for me. probably never mind me then(if there's something neater I'm still open to it though). :) 16:59
b2gills scimon: Date.day-of-week returns 1..7; so you need: enum DoW ( Monday => 1, |<Tuesday Wednesday Thursday Friday Saturday Sunday> ); 17:04
scimon Doh.
I read that too... except I was just interested in Tuesdays so I focussed on that bit. 17:05
Oh well.
b2gills sena_kun: are you sure you need the inner react?
sena_kun b2gills, without react inner whenever will be fired only after the rest of outer code execution. 17:07
17:08 domidumont1 left
b2gills I have found that sometimes adding a `start` before a whenever fixes such things 17:08
17:09 armin joined
sena_kun it adds non-determinism, since I cannot be sure that a thread will be started fast enough. :/ 17:09
m: supply { whenever Promise.in(0.5) { react { whenever Promise.in(0.5) { say "Inner" } }; say "Outer"; } }.List 17:11
camelia ( no output )
sena_kun supply { whenever Promise.in(0.5) { whenever Promise.in(0.5) { say "Inner" }; say "Outer"; } }.List 17:13
m: supply { whenever Promise.in(0.5) { whenever Promise.in(0.5) { say "Inner" }; say "Outer"; } }.List
camelia ( no output )
sena_kun o.0
m: say supply { whenever Promise.in(0.5) { whenever Promise.in(0.5) { say "Inner" }; say "Outer"; } }.List 17:15
camelia Outer
Inner
()
sena_kun m: say supply { whenever Promise.in(0.5) { react { whenever Promise.in(0.5) { say "Inner" } }; say "Outer"; } }.List
camelia Inner
Outer
()
armin hi, is it appropriate to ask total-beginner-perl6 questions in here when trying to follow along the docs? 17:16
e.g. rakudo / moarvm vs. perl6
geekosaur yes
mahafyi i am trying to search IO::Socket::Async in modules.perl6.org , and tried keyword search as well, but i cannot seem to find it
Voldenet mahafyi: have you tried just using it? :> 17:17
geekosaur whether you get answers may depend on who's around at the time though
Voldenet m: use IO::Socket::Async
camelia ===SORRY!===
IO::Socket::Async is a builtin type, not an external module
geekosaur mahafyi, it should be in the core rakudo distribution
Voldenet the error code says it all
armin can anyone describe what the "perl6" package on debian is? from what i see it's NOT rakudo/moarvm (which is probably what i want, but i'm not sure, yet, probably because i didn't adapt to the new way of thinking in perl6 that involves a compiler!?).
Voldenet s/code/message/
armin: eh, perl6 has a runtime, like most languages 17:18
armin Voldenet: is it apropriate to call it an "interpreter"?
mahafyi Voldenet, geekosaur thanks
geekosaur armin, the perl6 package is a "metapackage", one consisting only (or primarily) of dependencies on other packages 17:19
armin geekosaur: gotcha, ty.
geekosaur because package managers work best when you split large things with components that other things need to depend on into the smaller components, then put them back together somehow. the "somehow" is a metapackage 17:20
timotimo armin: it behaves similar enough to an interpreter from the user's perspective. you call perl6 the-script.p6 and it runs that code
geekosaur also the line between compiler and interpreter has been blurry for a long time. perl 5 and python can also be considered compilers, they just don't normally expose that aspect separately.
but there are ways to expose it in both 17:21
timotimo python also does precompilation of modules like perl6 does; i don't think perl5 does that, though
geekosaur it can
it's just less useful than one would hope
timotimo it's not very useful in python, either. that just caches the result of parsing the text
17:22 lowbro left
timotimo in perl6 you can run code at compile-time and the results from that are stored in the precompilation result. it's rather sophisticated 17:22
armin: any questions in particular you'd like answered? 17:24
armin timotimo: that was a very good answer to my question actually. i'm just trying to follow the docs a bit to see if i should stick with perl5 for now since i know people consider perl6 "a completely new language". i'm basically a bash/python guy who decided to get a bit more into perl so the first steps might confuse the people on IRC that are willing to help - i hope it's not too bad, though. 17:27
17:28 cdg_ joined 17:29 scimon left
AlexDaniel armin: I wonder if this document is any good: docs.perl6.org/language/py-nutshell 17:30
17:31 cdg left
armin AlexDaniel: reading, thank you. 17:31
17:31 wamba joined
timotimo i think we should introduce a formatting code or something that makes the "Python 2" and "Perl 6" text stick closer to the code blocks 17:32
17:33 khw joined
AlexDaniel timotimo: there's also this doc ticket: github.com/perl6/doc/issues/1430 17:33
17:38 xi- left, wamba left, wamba joined 17:39 xi- joined, madosan joined
madosan This may seem like a dumb question, but what is the simplest/shortest way to remove all of the items in a string array that start with a period 17:39
17:40 cdg_ left
[Coke] @a.grep(!*.starts-with('.')) 17:40
timotimo if you want to assign the result right back into @a in this example, you can write @a .= grep(...) 17:41
armin AlexDaniel: looks good to me, though i must say i really find a lot of aspects counter-intuitive, coming from python - but it's mostly ok i think.
madosan timotimo: Thanks! I like this solution
timotimo @a.grep(none(/^\./)) # a tiny bit shorter, but significantly slower 17:42
AlexDaniel timotimo: oh please, put some quotes around that dot :)
[Coke] ... I deliberately gave you the version with no junctions or regular expressions. :P 17:43
madosan AlexDaniel: should it have quotes?
AlexDaniel madosan: well, you can write it as /^ \. / or as /^ '.' /
madosan ah
AlexDaniel madosan: the former seems a bit toothpicky to me :)
17:44 domidumont joined
Voldenet m: <a b c .>.grep(*[0] ne ".").say 17:44
camelia (a b c)
Voldenet I'm unsure about its performance, but it works
AlexDaniel Voldenet: docs.perl6.org/language/traps#Stri...e_indexing
m: <aaa bbbb ccc .ddd>.grep(*.comb[0] ne ".").say 17:45
camelia (aaa bbbb ccc)
Voldenet Oh. 17:46
17:47 itaipu left
Geth doc: 8ae378f03f | (Aleks-Daniel Jakimenko-Aleksejev)++ (committed using GitHub Web editor) | doc/Language/traps.pod6
: → ;
17:48
synopsebot Link: doc.perl6.org/language/traps
AlexDaniel madosan: that's a pretty good question actually, especially given the variety of ways you can approach it :) 17:49
17:50 setty1 joined
madosan :P 17:50
[Coke] runs doc xtest after a week, uhoh 17:51
AlexDaniel armin: what's the most counter-intuitive thing you've found found so far? I'm thinking maybe it should be mentioned in that document, with some explanations on why things are the way they are
17:57 itaipu joined
madosan Just to make sure, when you do something along the lines of ` Supply.Interval(60).tap: { scan(); } `, it does run once immediately and THEN starts the timer 17:57
right? 17:58
17:59 Zoffix joined
Voldenet madosan: if you set the delay then no 17:59
Zoffix [Coke]: FWIW, I tried to make it pass 2 days ago, per the usual Zoffix-runs-xtest-during-rakudo-releases thing, and it was passing, other than :COLUMNS stuff for Telemetry: github.com/perl6/doc/commit/287bd0...c0ef191d9b
madosan hm 18:00
18:01 geospeck joined
[Coke] hurls emetry/Instrument/Usage.pod6 has 1 spelling errors' 18:02
er.
Zoffix madosan: in your code, yes, it will run the first iteration right away
[Coke] hurls gist.github.com/coke/723923364ed7d...175bc3aff6
Zoffix: thanks for keeping it up to date, appreciate it.
madosan Zoffix: What did Voldenet mean?
Zoffix madosan: unsure. 18:03
Voldenet the interval method has the second parameter
Zoffix Ah
Voldenet so it doesn't run immediately then
Zoffix Cool. Voldenet++ 18:04
Relevant docs: docs.perl6.org/type/Supply.html#method_interval
18:04 zakharyas left 18:05 zakharyas joined
madosan I see 18:05
mahafyi i am trying to connect to asterisk manager in perl5 -> metacpan.org/pod/Asterisk::AMI#SYNOPSIS ; docs.perl6.org/type/IO::Socket::As...od_connect does not seem to provide a way to connect with a username and password?
i am not trying to do it in perl5, in case the last message was mis leading
Zoffix huggable: deb 18:06
huggable Zoffix, CentOS, Debian, Fedora and Ubuntu Rakudo packages: github.com/nxadm/rakudo-pkg/releases
Zoffix armin: ^ FWIW, we have latest Debian packages there, in case yours is too old. (I know mine are :o) 18:07
mahafyi: right, likely Asterisk::AMI uses some protocol that needs username and password, which is what you'd set. 18:08
Whereas IO::Socket::Async is just raw socket
18:08 coverable6 left, nativecallable6 left
Zoffix s/raw/without any bells and whistles/; 18:08
18:09 coverable6 joined, ChanServ sets mode: +v coverable6, nativecallable6 joined
mahafyi Zoffix : i see 18:09
Zoffix mahafyi: you could attempt to use Perl5's Asterisk::AMI via Inline::Perl5 18:10
eco: Inline::Perl5
buggable Zoffix, Inline::Perl5 'Use Perl 5 code in a Perl 6 program': github.com/niner/Inline-Perl5 1 other matching results: modules.perl6.org/s/
Zoffix bot's busted :(
mahafyi Zoffix : thanks. 18:11
18:13 Zoffix left 18:14 |oLa| joined
mahafyi maybe i can should here instead - docs.perl6.org/type/IO::Socket#method_write 18:21
hmm, docs say fails if socket is not connected 18:22
18:23 wamba left 18:24 mscha joined
mscha m: for ^5 -> $i { say $i; NEXT say 'and'; } 18:25
camelia 0
and
1
and
2
and
3
and
4
and
mscha Is there an elegant way to prevent that last ‘end’? I.e. a phaser that runs only when actually jumpint back to the beginning of the loop?
18:26 domidumont left
buggable New CPAN upload: PDF-Class-0.0.1.tar.gz by WARRINGD cpan.metacpan.org/authors/id/W/WA/...0.1.tar.gz 18:28
AlexDaniel m: for ^5 -> $i { say ‘and’ if $++; say $i } 18:29
camelia 0
and
1
and
2
and
3
and
4
AlexDaniel mscha: you sure you don't want .join ? :)
mscha AlexDaniel: yes, this is a highly simplified example.
In reality I want to sleep before the next attempt, but not after the last one.
AlexDaniel what about throttle? :) 18:30
docs.perl6.org/type/Supply#method_throttle
mscha throttle looks nice, will have to look into that. Your "$++" solution is a good workaround, but not very elegant. ;-) 18:32
AlexDaniel m: react whenever <a b c>.Supply.throttle(1, 2) { say now } 18:34
camelia Instant:1513622107.921977
Instant:1513622109.915237
Instant:1513622111.918349
18:38 darutoko left
mahafyi mscha : would you consider an if , else to be elegant? what makes a line elegant? 18:38
18:38 philomath_ left
mahafyi m: for ^5 -> $i { if $i < 4 { say $i; say 'and';} else { say $i; } } 18:39
camelia 0
and
1
and
2
and
3
and
4
mahafyi of course, i am at the point where if it works, then *very* happy , heh
mscha mahafyi: yes, that works, of course; but no, I don't consider that elegant. ;-) 18:41
18:41 Cabanossi left 18:43 Cabanossi joined
[Coke] m: class A::3x3 { ... } 18:46
camelia ===SORRY!===
Name A:: ends with '::' and cannot be used as a package name
18:48 itaipu left 18:51 sjn left 18:56 cdg joined
buggable New CPAN upload: HTML-Canvas-0.0.1.tar.gz by WARRINGD cpan.metacpan.org/authors/id/W/WA/...0.1.tar.gz 18:58
19:00 itaipu joined, zakharyas left 19:01 cdg left 19:08 espadrine joined 19:16 mziescha joined 19:29 sjn joined 19:42 wamba joined, g41j1n joined
Geth doc: 2f4f7a2ee4 | (Zoffix Znet)++ (committed using GitHub Web editor) | assets/sass/style.scss
Simlify CSS

  - Remove dead code
  - Remove dated browser workarounds for now-supported properties
19:48
19:49 mahafyi left
Geth doc: 40471d259e | (Luca Ferrari)++ (committed by Zoffix Znet) | doc/Language/subscripts.pod6
Fix slice table. (#1702)

The L<> directive does not work within a table, while it seems to work within an iterable list.
19:49
synopsebot Link: doc.perl6.org/language/subscripts
19:50 cdg joined 19:51 itaipu left 19:52 dha joined
Geth doc: 58ec437f37 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/subscripts.pod6
Clarify diff between `[*]` and `[]` slices

Also mention they decont (don't see deconting in search on docs site, so linked to the Advent article)
19:54
doc: c0fc1afc9f | lefth++ (committed by Zoffix Znet) | doc/Language/packages.pod6
Describe how to look up class members (#1699)

Lookup within packages and the global namespace is described. Classes should be covered as well.
19:55
synopsebot Link: doc.perl6.org/language/packages
Geth doc: 4f53943fa0 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/packages.pod6
Clarify .^lookup shows only public attribs accessors
19:57
19:59 g41j1n left 20:01 mscha left 20:04 ruschlem2 joined 20:05 leah2 left 20:07 ruschlem2 left 20:16 perlpilot joined 20:20 leah2 joined 20:24 itaipu joined 20:30 cdg_ joined 20:32 cdg left 20:41 MasterDuke left
mziescha Hey, I try to go through an array in a hash like that 'for ( %foo.{'key'} ) {...};' but I always get an array in a array. Can someone explain what happen inside perl6? 20:42
Wanna understand
20:48 Zoffix joined
Zoffix mziescha: is this what you mean perhaps? perl6advent.wordpress.com/2017/12/...rs/#decont 20:49
m: my %h = :key<a b c d e>; for %h<key> { .say }
camelia (a b c d e)
Zoffix m: my %h = :key<a b c d e>; for %h<key><> { .say }
camelia a
b
c
d
e
Zoffix Starts in previous section actually: perl6advent.wordpress.com/2017/12/...oneandonly 20:50
Zoffix relocates &
20:50 Zoffix left
mziescha Ahh got it 'for ( %foo.<key><>} ) {...};' was the solution. 20:56
20:57 committable6 left
moritz or .lsit 20:57
20:57 committable6 joined
moritz sorry 20:57
.list
20:58 evalable6 left, releasable6 left, bisectable6 left, quotable6 left, statisfiable6 left, bloatable6 left, bisectable6 joined, bloatable6 joined, quotable6 joined, releasable6 joined, evalable6 joined, statisfiable6 joined
lizmat and another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2017/12/18/...rty-years/ 20:58
mziescha @Zoffix But to be honest, it looks a lil complicated for me. I mean in p5 it's simple like that 'for (@{$foo->{key}}){}' 21:00
21:00 ChanServ sets mode: +vvv statisfiable6 evalable6 releasable6
moritz mziescha: you can write it as for @( %foo<key> ) as well 21:01
21:02 Hotkeys joined
mziescha Ahh nice thank you 21:02
21:02 Hotkeys left, Hotkeys joined, Hotkeys left, Hotkeys joined
Hotkeys o7 21:03
mziescha That should be writen in 5to6-nutshell :-) 21:04
21:04 Zoffix joined
moritz mziescha: feel free to add it 21:04
Zoffix mziescha: I don't see how five extra characters are more complicated than 2 :) 21:05
mziescha: also, it's apple and oranges here. You can bind to your key and avoid containerization and not have to decont (the article I linked to talks about it)
Also: using .list or @ instead of <> decont can lead to subtle memory leak bugs (the article talks about it too) 21:06
mziescha: basically in Perl 6 there's no flattening and a container system. There's some surface similarities to Perl 5's arrayrefs in your code, but they're quite different overall 21:09
mziescha I see 21:10
Zoffix m: my %h; %h<a> := <a b c>; .say for %h<a>; # no need for decont here 21:11
camelia a
b
c
21:11 Cabanossi left 21:12 david_xd joined
Zoffix m: my %h := Map.new: (a => <a b c>); .say for %h<a>; # no need for decont here 21:12
camelia a
b
c
21:13 Cabanossi joined
Zoffix m: my %h; %h<a> = <a b c>; %h<a>.map: *.say; # no need for decont here 21:13
camelia a
b
c
21:15 imcsk8_ is now known as imcsk8, itaipu left
mziescha Ok thanks for your help :-) 21:17
21:19 mziescha left 21:37 Zoffix left, mahafyi joined 21:54 david_xd left 21:58 kerframil joined
dha So... It seems odd to me that, when trying to install a module, nqp would be a missing prereq. Am I wrong to feel that way? 21:58
21:59 |oLa| left
[Coke] ... nqp isn't a separate thing, so yes. 22:06
(I mean, you get the binary as part of the perl6 install)
dha: which module?
dha I'm trying to isolate 22:07
But, yeah, it just generally seemed weird, for the reasons you mention.
22:07 TEttinger joined 22:11 setty1 left
timotimo dha: you mean som emodule has "nqp" in its dependency list? 22:11
dha Was installing a bunch of modules with zef, and it threw up at me because it couldn't install nqp, which is, apparently, a prereq for *something*. 22:12
[Coke] what was the list? 22:13
timotimo that's not good
timotimo pulls all-modules
[Coke] or we can let timo do it the hard way. :)
dha Looks like it's Grammar::BNF 22:14
timotimo seems like some things have it in the test-depends 22:15
not in the current version though? 22:16
22:16 Zoffix joined
Zoffix dha: what's the actual error? 22:16
timotimo i only see it in a projects.json rabidgravy included in META6's test suite
dha ===> Searching for missing dependencies: nqp 22:17
===> Failed to find dependencies: nqp
22:17 geospeck left
Zoffix dha: and what module are you trying to install? 22:17
dha Grammar::BNF 22:18
timotimo i can install Grammar::BNF just fine
Zoffix Same here and it has no prereqs, other than Test
timotimo does "zef update" change anything? 22:19
Zoffix dha: zef --force install github.com/ugexe/zef/archive/master.zip; zef update; zef --/cache install Grammar::BNF
try that
dha Let me see...
Zoffix zef --/cached install Grammar::BNF
For the last one, not --/cache
timotimo it looks like there's two Grammar::BNF in zef list 22:21
moritz different versions? different auth? 22:22
dha update by itself didn't help. Trying the more complicated version now. :-)
Zoffix Hm: $ zef depends Grammar::BNF
Failed to resolve some missing dependencies
Even tho it installed it :o
dha :-/ 22:23
Zoffix timotimo: I only got one version. Are you sure the second one you see isn't from Zef::Repository::LocalCache?
timotimo ugh, the headers in between pieces don't stand out at all 22:24
dha Ok, that last incantation seems to have worked.
Zoffix Sweet 22:25
timotimo you're right
it *is* in the localcache
dha Ok, and with that solved, I'm going to go home and play some guitar. 22:27
Thanks!
22:27 dha left 22:59 comborico1611 left 23:00 comborico1611 joined
mahafyi As i have been reading, for anything that perl6 does not (yet) offer, we can use inline::perl5. which i think will already have anything one needs. 23:19
23:19 ruschlem2 joined 23:24 ruschlem2 left
Zoffix mahafyi: it's a two-edged sword though. Inline::Perl5 isn't perfect and some things don't work with it, but because it exists, people are less motivated to write native solutions :) 23:27
mahafyi Zoffix : i would like to try and do with pure perl6 itself. i have not been able to see how to connect to the asterisk pbx manager via username and password on port 5038. I am learning in bits, but trying to work my way up to something thats of value someday. in this case a perl6 call center solution. 23:30
what would it take to learn to write a module that can connect to a socket with authentication? i mean how would one go about it? 23:33
timotimo that entirely depends on how the authentication works 23:34
it's all determined by the protocol that's in use 23:35
basically, all you need to do is send the right list of numbers between 0 and 255 to the server
of course that's entirely unhelpful, but every additional detail depends entirely on what protocol the pbx manager understands/expects 23:37
if you have a program that connects and authenticates itself, you can sniff the network traffic and reverse-engineer how to do it, but it's best to find a specification somewhere
mahafyi github.com/asterisk-perl/asterisk-perl , i have no idea how the socket connection works under the hood, but i think it will be found at this link. 23:39
23:39 cdg_ left
mahafyi I will study this tomorrow, though. 23:39
23:39 cdg joined
mahafyi also www.voip-info.org/wiki/view/Asteri...ionPackets gives a good explanation. and the knowledgeable folks at #asterisk will help, though unlike here it is like facing a gun sometimes, lol. 23:41
23:41 Cabanossi left 23:43 rindolf left
timotimo it looks like a somewhat simple text-based protocol 23:43
23:43 Cabanossi joined
mahafyi it is, but it can also support md5 23:43
23:44 cdg left
mahafyi which is also text, i suppose, correctly viewed, just not plain text. 23:44
timotimo yes, but all it uses that for is grab the Challenge thing the server sends you, put it in front of the password, and calculate the md5 sum of that, then send the result as a hex string in the Key field
i'd still call that plaintext 23:47
mahafyi got it.
also in practice everyone connects on port 5039, over SSL. 23:48
timotimo OK, in that case you'd just use one of the SSL socket modules we have
mahafyi ok i will start the headbanging tomorrow, :) 23:49
timotimo best of luck! 23:50
mahafyi timotimo : thanks
with the thought that if perl6 is my mid-life crisis, i may have been better off having an affair, i better get some shut-eye before the sun rises :) thanks to all. 23:57
timotimo rest well 23:59