Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-12-18

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:14 agwind joined #perl6
00:22 lookatme joined #perl6
00:24 lookatme o/
00:25 tyil hi
00:25 lookatme morning #perl6
00:29 Cabanossi joined #perl6
00:36 softmoth joined #perl6
00:41 Geth ¦ doc: 9835edb949 | (Dmitri Iouchtchenko)++ | doc/Language/traps.pod6
00:41 Geth ¦ doc: Tidy up regex trap example code
00:41 Geth ¦ doc: review: https://github.com/perl6/doc/commit/9835edb949
00:41 Geth ¦ doc: df41c1a7ab | (Dmitri Iouchtchenko)++ | 2 files
00:41 Geth ¦ doc: Improve wording
00:41 synopsebot Link: https://doc.perl6.org/language/traps
00:41 Geth ¦ doc: review: https://github.com/perl6/doc/commit/df41c1a7ab
00:41 Geth ¦ doc: d20fe3561c | (Alex Chen)++ (committed using GitHub Web editor) | 2 files
00:41 Geth ¦ doc: Merge pull request #1717 from 0/regex
00:41 Geth ¦ doc:
00:41 Geth ¦ doc: Minor adjustments
00:41 Geth ¦ doc: review: https://github.com/perl6/doc/commit/d20fe3561c
00:54 kkk joined #perl6
00:59 Cabanossi joined #perl6
01:19 aindilis joined #perl6
01:33 Herby__ joined #perl6
01:59 ruschlem left #perl6
02:14 Geth ¦ doc: c3de4989b8 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/pod.pod6
02:14 Geth ¦ doc: update legal config key value formats
02:14 Geth ¦ doc: review: https://github.com/perl6/doc/commit/c3de4989b8
02:14 synopsebot Link: https://doc.perl6.org/language/pod
02:16 tbrowder joined #perl6
02:23 tbrowder o/ lookatme
02:24 lookatme :)
02:26 khw joined #perl6
02:31 ruschlem joined #perl6
02:40 aindilis` joined #perl6
02:56 astronavt joined #perl6
02:56 Cabanossi joined #perl6
02:58 ilbot3 joined #perl6
02:58 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
03:10 astronavt joined #perl6
03:25 cdg joined #perl6
03:27 agwind joined #perl6
03:36 cdg joined #perl6
04:04 softmoth joined #perl6
04:14 Cabanossi joined #perl6
04:23 * timotimo reads the day 14 advent post
04:24 timotimo wordpress ate a bunch of characters in the code
04:24 timotimo again
04:34 nige joined #perl6
04:44 Cabanossi joined #perl6
04:58 Cabanoss- joined #perl6
05:25 itaipu joined #perl6
06:13 Cabanossi joined #perl6
06:17 moritz good morning
06:17 yoleaux 17 Dec 2017 22:27Z <lizmat> moritz: we need some irclog cleaning again (just now)
06:19 * moritz deletes some spam
06:20 andrzejku joined #perl6
06:43 Cabanossi joined #perl6
06:45 aborazmeh joined #perl6
06:45 aborazmeh joined #perl6
06:48 darutoko joined #perl6
06:53 Morfent joined #perl6
06:55 Morfent joined #perl6
07:28 ruschlem joined #perl6
07:41 AlexDaniel can somebody try zef install Text::Markdown::Discount ?
07:41 AlexDaniel it's right there but it says “No candidates found matching identity: Text::Markdown::Discount”
07:43 lookatme same here, no candidates
07:43 Cabanossi joined #perl6
07:43 teatime wat.. how do I not have zef installed..
07:44 TimToady failed here too
07:44 lookatme And `zef search` return 0 result
07:52 nige joined #perl6
08:01 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="http://schema.org/Review"> »
08:01 teatime or is there some spec now for upvotes= and downvotes= that I missed
08:02 domidumont joined #perl6
08:02 moritz if I remember correctly, you can make up your own attributes in the "data-" namespace
08:02 moritz so data-upvotes=0, data-downvotes=0 would be valid
08:03 teatime yeah, yes that's right.
08:04 teatime 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
08:04 teatime but then they do that?  *shrug*
08:04 teatime it is web, yeah
08:04 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?)
08:05 teatime it always bugs me that you can't define your own elements in practice for html
08:05 teatime like, that's what xml namespaces are for, yeah?  but xhtml is dead, so?
08:07 khisanth_ joined #perl6
08:07 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 #perl6
08:08 teatime it's such an interesting exercise in... game theory?
08:08 geekosaur and psychology and several other topics :)
08:08 TEttinger game psychiatry
08:09 teatime that could totally be a thing in 15 years.
08:09 TEttinger neural networks to diagnose your neural networks
08:09 geekosaur they're already doing that :p
08:10 eliasr joined #perl6
08:19 wamba joined #perl6
08:23 cosimo joined #perl6
08:28 abraxxa joined #perl6
08:30 abraxxa joined #perl6
08:33 ruschlem joined #perl6
08:43 Cabanossi joined #perl6
08:59 mziescha joined #perl6
09:02 Geth ¦ doc: e2cb057c88 | (Luca Ferrari)++ | doc/Language/5to6-perlop.pod6
09:02 Geth ¦ doc: Enahnce the 'Conditional Operator' section.
09:02 Geth ¦ doc:
09:02 Geth ¦ doc: Added a simple example based on the previous one that shows side-to-side
09:02 Geth ¦ doc: the difference between the Perl 5 and Perl 6 ?: and ??!!.
09:02 synopsebot Link: https://doc.perl6.org/language/5to6-perlop
09:02 Geth ¦ doc: Added a space in C<? :> for coherence with the C<?? !!>.
09:02 Geth ¦ doc: review: https://github.com/perl6/doc/commit/e2cb057c88
09:07 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:10 lookatme You mean like "Int".new  ?
09:10 piojo mziescha: which type is the object, and what's the format of a string?
09:10 piojo oh, lookatme understood better than me
09:12 piojo m: say ::{'Int'}.new
09:12 camelia rakudo-moar 3f90f663b: OUTPUT: «0␤»
09:12 mziescha Yeah like that
09:12 mziescha my current try is like that:
09:12 mziescha require ::($s_namespace);
09:12 mziescha my $obj_write_queries = $s_namespace.new;
09:12 mziescha but that's wrong
09:14 mziescha I'm trying to implement queries from a namespace dynamicaly
09:14 lookatme off work now :) bye
09:14 scimon joined #perl6
09:15 piojo mziescha: this may be useful: https://docs.perl6.org/language/packages
09:16 piojo And this page describes dynamic 'require': https://docs.perl6.org/syntax/require
09:17 mziescha thank you i will try
09:18 mziescha 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.
09:18 piojo m: my Hash[Int] %hash-of-hash; %hash-of-hash<x><y> = 5;
09:18 camelia rakudo-moar 3f90f663b: OUTPUT: «Type check failed in assignment to %hash-of-hash; expected Hash[Int] but got Hash (${})␤  in block <unit> at <tmp> line 1␤␤»
09:19 piojo Is the above considered a bug? Hash autovivication doesn't do something sane when the hash's values are type-constrained
09:20 lowbro joined #perl6
09:20 lowbro joined #perl6
09:28 Cabanossi joined #perl6
09:40 piojo m: say now()-now()
09:40 camelia rakudo-moar 3f90f663b: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    now used at line 1. Did you mean 'not', 'HOW'?␤␤»
09:40 piojo that's gotta be a bug!
09:41 piojo oh, I guess it's not
09:41 piojo what is now if it's not a routine?
09:44 sena_kun joined #perl6
09:44 hobbs joined #perl6
09:44 hobbs joined #perl6
09:48 rindolf joined #perl6
09:53 moritz a term
09:53 moritz m: say &term:<now>
09:53 camelia rakudo-moar 3f90f663b: OUTPUT: «sub term:<now> () { #`(Sub|36504768) ... }␤»
09:54 gregf_ joined #perl6
09:56 piojo moritz: thanks. I didn't know about terms
10:02 piojo Is it illegal to bind a state variable to another variable?
10:02 piojo I mean, does it make it not a state variable anymore?
10:03 piojo m: 'sub f() { state %h; say %h.perl; %h := {a => 5}; }; f; f;
10:03 camelia rakudo-moar 3f90f663b: OUTPUT: «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 …»
10:03 piojo m: sub f() { state %h; say %h.perl; %h := {a => 5}; }; f; f;
10:03 camelia rakudo-moar 3f90f663b: OUTPUT: «{}␤{}␤»
10:04 piojo I really thought I could re-bind it and still have it be a state variable, but I guess not...
10:14 moritz I guess it shouldn't silently swallow the binding
10:14 moritz either do it, or blow up
10:36 domidumont1 joined #perl6
10:48 * f3ew looks for a lizmat
11:01 AlexDaniel f3ew: may I ask why? Thinking that maybe some pseudolizmat can help :)
11:02 rindolf f3ew: hi
11:02 Voldenet joined #perl6
11:02 Voldenet joined #perl6
11:06 dogbert2 joined #perl6
11:12 * lizmat is awake
11:13 lizmat f3ew: what is the problem?
11:13 dogbert2 #MoarVM is filled with spam
11:14 lizmat well, I think mst has irc powers there
11:14 lizmat and moritz could be asked to perform some irclog sanitizing on #moarvm
11:15 lizmat which moritz apparently has done on #perl6-dev already
11:18 itaipu joined #perl6
11:25 ZzZombo joined #perl6
11:26 ZzZombo joined #perl6
11:37 abraxxa how can I call this sub without specifying $name? https://github.com/retupmoca/P6-Net-AMQP/blob/master/lib/Net/AMQP/Channel.pm6#L140
11:46 ilmari m: sub foo($name, :$stuff) { say $name, $stuff }; foo(stuff => 42)
11:46 camelia rakudo-moar 3f90f663b: OUTPUT: «Too few positionals passed; expected 1 argument but got 0␤  in sub foo at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
11:46 ilmari abraxxa: you can't, it's a mandatory parameter
11:46 DrForr Just call Net::AMQP::Queue.new() directly, since $name is optional?
11:47 abraxxa DrForr: i need the other params
11:47 DrForr (though if you're calling declare-queue, ilmari is correct.)
11:47 abraxxa '' seems to work as the amqp message generating module inside the dist expects a chars method on it
11:47 ilmari couldn't conn => $!conn be written :$!conn?
11:47 abraxxa most modules still don't have a Perl6ish api
11:48 abraxxa no types for example
11:48 araraloren joined #perl6
11:50 moritz ilmari: it could
11:51 lizmat moritz: could you also rinse #moarvm irclog of garbage?
11:51 timotimo teatime: have you looked into web components at all?
11:52 moritz lizmat: I'm on it. Somehow my sql server seems to hang during the delete :(
11:58 Cabanossi joined #perl6
12:14 Geth ¦ doc: 7f113600f0 | (Elizabeth Mattijsen)++ | doc/Type/Telemetry/Instrument/Threadpool.pod6
12:14 Geth ¦ doc: First stab at documenting Telemetry::Instrument::ThreadPool
12:14 Geth ¦ doc: review: https://github.com/perl6/doc/commit/7f113600f0
12:14 synopsebot Link: https://doc.perl6.org/type/Telemetry/Instrument/Threadpool
12:19 moritz the #moarvm spam is removed from the IRC logs
12:22 lizmat moritz++
12:22 f3ew lizmat: what's a good email address to reach you at?
12:23 f3ew AlexDaniel: not a technical question, thanks though :)
12:23 * f3ew waves at rindolf
12:23 Geth ¦ doc: ed9df178a0 | (Elizabeth Mattijsen)++ | doc/Type/Telemetry/Instrument/Thread.pod6
12:23 Geth ¦ doc: First stab at documenting Telemetry::Instrument::Thread
12:23 Geth ¦ doc: review: https://github.com/perl6/doc/commit/ed9df178a0
12:23 synopsebot Link: https://doc.perl6.org/type/Telemetry/Instrument/Thread
12:25 Geth ¦ doc: 5801be3e61 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/pod.pod6
12:25 synopsebot Link: https://doc.perl6.org/language/pod
12:25 Geth ¦ doc: add some config formats
12:25 Geth ¦ doc: review: https://github.com/perl6/doc/commit/5801be3e61
12:27 dogbert2 moritz++
12:28 wamba joined #perl6
12:44 squashable6 joined #perl6
12:44 reportable6 joined #perl6
12:44 unicodable6 joined #perl6
12:44 greppable6 joined #perl6
12:44 benchable6 joined #perl6
12:54 itaipu joined #perl6
12:57 mahafyi joined #perl6
12:57 mahafyi good day to all :)
13:08 Geth ¦ mu: f4d3b19eb3 | lizmat++ (committed using GitHub Web editor) | misc/perl6advent-2017/schedule
13:08 Geth ¦ mu: Change my slot to something more advent like
13:08 Geth ¦ mu:
13:08 Geth ¦ mu: I intend to publish the originally intended blog post early in the new year, on blogs.perl.org instead.
13:08 Geth ¦ mu: review: https://github.com/perl6/mu/commit/f4d3b19eb3
13:12 araraloren Is there any method of Iterator can skip all rest element ? The .sink-all is not what I wanted
13:14 scimon So... I'm wondering if adding a small coating of elves to my post is required? Hmm
13:15 araraloren Oh, I should set them Nil or IterationEnd :)
13:15 araraloren Thanks
13:17 [Coke] h/win 6
13:21 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 rakudo-moar 3f90f663b: OUTPUT: «True␤No such method 'skip-one' for invocant of type 'Array'␤  in block <unit> at <tmp> line 1␤␤»
13:22 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 rakudo-moar 3f90f663b: OUTPUT: «True␤foo␤bar␤2␤»
13:22 araraloren I wonder why when I call .skip-one, it still print `foo`?
13:23 telex joined #perl6
13:23 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;
13:23 camelia rakudo-moar 3f90f663b: OUTPUT: «True␤foo␤1␤bar␤»
13:24 Zoffix joined #perl6
13:24 araraloren Or at least, I dont' want this `bar`
13:24 Zoffix araraloren: you'd need to make your own iterator then
13:24 lizmat that could indeed be considered a deficiency in the GATHER iterator
13:24 Zoffix araraloren: also, you're not really meant to call iterator methods directly
13:24 Zoffix m: my @a = (lazy gather do { say "foo"; take 1; say "bar"; take 2; }).skip(1); @a.skip; say @a;
13:24 camelia rakudo-moar 3f90f663b: OUTPUT: «foo␤bar␤[2]␤»
13:24 lizmat please make a GH issue for after the release
13:25 Zoffix never mind the second .skip
13:25 Zoffix araraloren: maybe this would be of help: https://rakudo.party/post/Perl-6-Seqs-Drugs-and-Rock-n-Roll--Part-2
13:25 Geth ¦ mu: c236552563 | (Will Coleda)++ (committed using GitHub Web editor) | misc/perl6advent-2017/schedule
13:25 Geth ¦ mu: Update schedule
13:25 Geth ¦ mu: review: https://github.com/perl6/mu/commit/c236552563
13:26 araraloren I have already read your post :)
13:26 araraloren but not finished
13:26 araraloren thanks
13:26 itaipu joined #perl6
13:26 araraloren What is GH
13:27 araraloren Should I report a bug ? or optimization advice ?
13:27 Zoffix araraloren: GH = GitHub. https://github.com/rakudo/rakudo/issues/new
13:27 araraloren :( I dont' even know GH = github
13:28 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:30 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
13:30 camelia rakudo-moar 3f90f663b: OUTPUT: «"Seq"␤»
13:31 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 Zoffix s: &GATHER
13:31 SourceBaby Zoffix, Sauce is at https://github.com/rakudo/rakudo/blob/4fca94743/src/core/Seq.pm#L170
13:32 lizmat Zoffix: true, so yes, it wouldn't prevent that
13:32 Zoffix Ah.
13:32 araraloren yeah, or, at least, skip rest code when call `skip-all`, though that method not exists
13:32 Zoffix There's still this bug: RT#131829
13:32 synopsebot RT#131829 [open]: https://rt.perl.org/Ticket/Display.html?id=131829 Weird memory leakage of sequences and other things ( (1…∞).grep(* < 0)[^10] )
13:33 Zoffix Oh wait, that's in SEQUENCE
13:33 Zoffix :)
13:33 Zoffix left #perl6
13:51 AlexDaniel gah, what was the ticket for “expected Array[Str] but got Array[Str].new("this")” issue
13:52 AlexDaniel ah, RT#128287 / RT#132525
13:52 synopsebot RT#128287 [open]: https://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.
13:52 synopsebot RT#132525 [open]: https://rt.perl.org/Ticket/Display.html?id=132525 [REGRESSION][PRECOMP] type constraints to Array[Pair] don't work when precompiled
13:58 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
13:58 synopsebot RT#127001 [open]: https://rt.perl.org/Ticket/Display.html?id=127001 [PRECOMP] [NATIVECALL] CArray[CArray[int8]] fails type check
13:58 synopsebot RT#127049 [new]: https://rt.perl.org/Ticket/Display.html?id=127049 [BUG] expected Array[Str] but got Array[Str].new("<a>") (2015.12 Regression from 2015.11)
13:58 synopsebot RT#127309 [new]: https://rt.perl.org/Ticket/Display.html?id=127309 Type check failure for Array[...] as return value caused by irrelevent inclusion from another compunit
13:58 synopsebot RT#132592 [new]: https://rt.perl.org/Ticket/Display.html?id=132592 Typed Array assignment type check fails sometimes
14:03 david_xd joined #perl6
14:04 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 teatime like, all the ng-* attributes, yeah?
14:04 jast afaik in html5 they're not invalid
14:04 teatime I am not a web dev guy, I just keep a semi-curious eye on the stacks
14:04 teatime jast: ah, now that would be pretty cool ...
14:11 Geth ¦ ecosystem: 7469b4d102 | (Aleks-Daniel Jakimenko-Aleksejev)++ | META.list
14:11 Geth ¦ ecosystem: Fix META6.json link
14:11 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/7469b4d102
14:14 Geth ¦ doc: b26526ff25 | (Luca Ferrari)++ | doc/Language/5to6-perlop.pod6
14:14 Geth ¦ doc: Verbose explaination of the range operators.
14:14 Geth ¦ doc:
14:14 Geth ¦ doc: Since, so far, pod tables cannot deal with C<>, I switched the table of
14:14 Geth ¦ doc: range operators to a list of items with a specific code example following.
14:14 synopsebot Link: https://doc.perl6.org/language/5to6-perlop
14:14 Geth ¦ doc: review: https://github.com/perl6/doc/commit/b26526ff25
14:14 Geth ¦ doc: 82088c8b05 | (Luca Ferrari)++ | doc/Language/5to6-perlop.pod6
14:14 Geth ¦ doc: Remove extra blank line in conditional operator.
14:14 Geth ¦ doc: review: https://github.com/perl6/doc/commit/82088c8b05
14:14 Geth ¦ doc: 964d8ac472 | (Luca Ferrari)++ | doc/Language/5to6-perlop.pod6
14:14 Geth ¦ doc: Fix links fo operators 'ff' and 'fff'.
14:14 Geth ¦ doc:
14:14 Geth ¦ doc: Rewording of the explaination within the range operators about
14:15 Geth ¦ doc: flip-flop operators in Perl 5 compared to ff and fff in Perl 6.
14:15 Geth ¦ doc: review: https://github.com/perl6/doc/commit/964d8ac472
14:16 abraxxa joined #perl6
14:17 wamba joined #perl6
14:20 Geth Swapped META.info → META6.json in 1 dists in https://github.com/perl6/ecosystem/commit/9db66401c0
14:28 Cabanossi joined #perl6
14:29 Geth ¦ doc: 4d19770550 | (Elizabeth Mattijsen)++ | doc/Language/variables.pod6
14:29 Geth ¦ doc: Minimal documentation of &*EXIT
14:29 Geth ¦ doc: review: https://github.com/perl6/doc/commit/4d19770550
14:29 synopsebot Link: https://doc.perl6.org/language/variables
14:32 poohman joined #perl6
14:33 poohman hello - is there a way to have conditional or pattern matching in a point block for loop??
14:34 poohman for 'somefile.IO.lines -> $name {}
14:35 lizmat for 'somefile.IO.lines.grep ?
14:36 poohman that could work
14:37 Geth ¦ doc: ae8b031374 | (Elizabeth Mattijsen)++ | doc/Language/variables.pod6
14:37 Geth ¦ doc: Minimal documentation of $*SAMPLER
14:37 Geth ¦ doc: review: https://github.com/perl6/doc/commit/ae8b031374
14:37 lizmat poohman: and it would still be lazy
14:38 poohman cool - but could I have expression or sub before pusing it to $name
14:39 lizmat for 'somefile.IO.lines.grep( * ne "poohman" ) -> $name {   # something like that ?
14:39 poohman something like  for 'somefile.IO.lines -> something -> $name { }
14:40 timotimo you can try feeds
14:40 poohman and my something could be a switch case sub
14:41 timotimo m: lines() ==> grep( / << .. >> / ) ==> map({ say "this is it: $_" })
14:41 camelia rakudo-moar 3f90f663b: OUTPUT: «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…»
14:42 timotimo m: lines() ==> grep( / << ....... >> / ) ==> map({ say "this is it: $_" })
14:42 camelia rakudo-moar 3f90f663b: OUTPUT: «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:     …»
14:43 poohman lines() = where or what is this reading?
14:44 timotimo standard input
14:44 lizmat $*IN
14:44 poohman ok
14:46 poohman 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 poohman not sure I am expressing myself properly
14:46 * lizmat is not sure she understands the question :-)
14:47 poohman can I somehow put the following in a for pointy block?
14:48 poohman lines() ==> grep( / << ....... >> / ) ==> map({ say "this is it: $_" })
14:48 Zoffix joined #perl6
14:48 Zoffix FWIW: lines() reads from $*ARGFILES
14:48 Zoffix lines.grep( / << ....... >> / ).map({ say "this is it: $_" })
14:48 lizmat oops, yup, and that defaults to $*IN, right ?
14:49 Zoffix It defaults to an IO::CatHandle with $*IN as source handle
14:49 lizmat Zoffix++  :-)
14:50 poohman nice - let me play around and have a look - thanks everyone
14:50 timotimo you can just "for lines().grep(/ << ...... >> /) -> $line { ... }"
14:55 pdcawley joined #perl6
14:57 poohman cool - so instead of grep I can make my closurey sub and do pattern matching there - right?
14:58 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
14:58 timotimo m: for <a b c d e>.grep(-> Int $foo { say "test" }) -> { .say }
14:58 camelia rakudo-moar 3f90f663b: OUTPUT: «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 #perl6
14:58 timotimo if your pattern match fails, it'll throw this error
14:59 araraloren m: my %h = a => 1; say %h<a>:delete;
14:59 camelia rakudo-moar 3f90f663b: OUTPUT: «1␤»
15:00 araraloren Is the delete return removed Pair's value ?
15:00 araraloren m: my %h = a => "removed"; say %h<a>:delete;
15:00 camelia rakudo-moar 3f90f663b: OUTPUT: «removed␤»
15:00 poohman Can I use anything else other than grep?
15:01 Zoffix poohman: what are you trying to do exactly?
15:01 timotimo m: my %h = a => "removed"; say %h<a>:delete:p;
15:01 camelia rakudo-moar 3f90f663b: OUTPUT: «a => removed␤»
15:01 timotimo m: my %h = a => "removed"; say %h<a>:delete:kv;
15:01 camelia rakudo-moar 3f90f663b: OUTPUT: «(a removed)␤»
15:01 timotimo m: my %h = a => "removed"; say %h<a>:delete:k;
15:01 camelia rakudo-moar 3f90f663b: OUTPUT: «a␤»
15:01 timotimo araraloren: ^
15:01 araraloren I did see that in document :)
15:02 poohman give me sometime timotimo - ill get ack with some code
15:02 araraloren It just said remove it from Hash
15:02 timotimo m: my %h = a => "removed"; say %h<a>:delete:exists; say %h<not-in-there>:delete:exists
15:02 camelia rakudo-moar 3f90f663b: OUTPUT: «True␤False␤»
15:03 araraloren :\ seems like complicate
15:04 Geth ¦ doc: 099a4f8f2c | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/variables.pod6
15:04 Geth ¦ doc: Make $*ARGFILES def more precise
15:04 Geth ¦ doc:
15:04 Geth ¦ doc: - Mention it's an IO::ArgFiles object that's just a reskinned IO:::CatHandle
15:04 Geth ¦ doc: - Mention details about attrs being copied when source is lone $*IN
15:04 synopsebot Link: https://doc.perl6.org/language/variables
15:04 Geth ¦ doc: review: https://github.com/perl6/doc/commit/099a4f8f2c
15:09 Zoffix m: my %h = a => "removed"; say %h<a>:delete:kv:exists
15:09 camelia rakudo-moar 3f90f663b: OUTPUT: «(a True)␤»
15:09 Zoffix bug
15:09 Zoffix Oh
15:09 timotimo it is?
15:10 lizmat m: my %h = a => 42, b  => 666; dd %h<a c d>:delete:p   # only return the ones actually removed
15:10 camelia rakudo-moar 3f90f663b: OUTPUT: «(:a(42),)␤»
15:10 lizmat m: my %h = a => "removed"; say %h<b>:delete:kv:exists
15:10 camelia rakudo-moar 3f90f663b: OUTPUT: «()␤»
15:10 Zoffix Well, it's a bit of a DITWIDT, but it seems to work right. The :kv just applies to :exists's return value
15:10 lizmat the :kv, :k, :v, :p filter on existence
15:11 lizmat Docter It Tweets When I Do This ?
15:11 Zoffix :)
15:11 lizmat *Doctor :-)
15:13 Zoffix left #perl6
15:14 DrForr . o ( You rang? )
15:33 troys joined #perl6
15:34 cdg joined #perl6
15:37 AlexDaniel huggable: advent
15:37 huggable AlexDaniel, Sign up to write an Advent blog post: https://github.com/perl6/mu/blob/master/misc/perl6advent-2017/schedule
15:42 silug joined #perl6
16:00 comborico1611 joined #perl6
16:00 araraloren How can I read specify size chunk from IO::Socket::Async.Supply ?
16:00 araraloren How can I read specify size chunk from IO::Socket::Async ?
16:21 scimon Having one of those (Oh that's nice) moments. When I find that that Date Ranges... just work.
16:22 scimon 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 rakudo-moar 3f90f663b: OUTPUT: «(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-…»
16:22 scimon :D
16:26 scimon I get wildly impressed by the simplest things.
16:26 moritz simple but awesome :-)
16:29 [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:33 scimon :D
16:34 scimon 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:36 scimon 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:39 zakharyas joined #perl6
16:41 philomath_ joined #perl6
16:53 sena_kun hi folks!
16:54 tyil hi
16:56 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 sena_kun s/proceed/process/
16:57 Srini joined #perl6
16:59 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). :)
17:04 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.
17:05 scimon I read that too... except I was just interested in Tuesdays so I focussed on that bit.
17:05 scimon Oh well.
17:05 b2gills sena_kun: are you sure you need the inner react?
17:07 sena_kun b2gills, without react inner whenever will be fired only after the rest of outer code execution.
17:08 b2gills I have found that sometimes adding a `start` before a whenever fixes such things
17:09 armin joined #perl6
17:09 sena_kun it adds non-determinism, since I cannot be sure that a thread will be started fast enough. :/
17:11 sena_kun m: supply { whenever Promise.in(0.5) { react { whenever Promise.in(0.5) { say "Inner" } }; say "Outer"; } }.List
17:11 camelia rakudo-moar 3f90f663b: ( no output )
17:13 sena_kun supply { whenever Promise.in(0.5) { whenever Promise.in(0.5) { say "Inner" }; say "Outer"; } }.List
17:13 sena_kun m: supply { whenever Promise.in(0.5) { whenever Promise.in(0.5) { say "Inner" }; say "Outer"; } }.List
17:13 camelia rakudo-moar 3f90f663b: ( no output )
17:13 sena_kun o.0
17:15 sena_kun m: say supply { whenever Promise.in(0.5) { whenever Promise.in(0.5) { say "Inner" }; say "Outer"; } }.List
17:15 camelia rakudo-moar 3f90f663b: OUTPUT: «Outer␤Inner␤()␤»
17:15 sena_kun m: say supply { whenever Promise.in(0.5) { react { whenever Promise.in(0.5) { say "Inner" } }; say "Outer"; } }.List
17:15 camelia rakudo-moar 3f90f663b: OUTPUT: «Inner␤Outer␤()␤»
17:16 armin hi, is it appropriate to ask total-beginner-perl6 questions in here when trying to follow along the docs?
17:16 armin e.g. rakudo / moarvm vs. perl6
17:16 geekosaur yes
17:16 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
17:17 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
17:17 Voldenet m: use IO::Socket::Async
17:17 camelia rakudo-moar 3f90f663b: OUTPUT: «===SORRY!===␤IO::Socket::Async is a builtin type, not an external module␤»
17:17 geekosaur mahafyi, it should be in the core rakudo distribution
17:17 Voldenet the error code says it all
17:17 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!?).
17:17 Voldenet s/code/message/
17:18 Voldenet armin: eh, perl6 has a runtime, like most languages
17:18 armin Voldenet: is it apropriate to call it an "interpreter"?
17:18 mahafyi Voldenet, geekosaur thanks
17:19 geekosaur armin, the perl6 package is a "metapackage", one consisting only (or primarily) of dependencies on other packages
17:19 armin geekosaur: gotcha, ty.
17:20 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
17:20 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.
17:21 geekosaur 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
17:21 geekosaur it can
17:21 geekosaur it's just less useful than one would hope
17:21 timotimo it's not very useful in python, either. that just caches the result of parsing the text
17:22 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:24 timotimo armin: any questions in particular you'd like answered?
17:27 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:28 cdg_ joined #perl6
17:30 AlexDaniel armin: I wonder if this document is any good: https://docs.perl6.org/language/py-nutshell
17:31 armin AlexDaniel: reading, thank you.
17:31 wamba joined #perl6
17:32 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:33 khw joined #perl6
17:33 AlexDaniel timotimo: there's also this doc ticket: https://github.com/perl6/doc/issues/1430
17:38 wamba joined #perl6
17:39 xi- joined #perl6
17:39 madosan joined #perl6
17:39 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:40 [Coke] @a.grep(!*.starts-with('.'))
17:41 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.
17:41 madosan timotimo: Thanks! I like this solution
17:42 timotimo @a.grep(none(/^\./)) # a tiny bit shorter, but significantly slower
17:42 AlexDaniel timotimo: oh please, put some quotes around that dot :)
17:43 [Coke] ... I deliberately gave you the version with no junctions or regular expressions. :P
17:43 madosan AlexDaniel: should it have quotes?
17:43 AlexDaniel madosan: well, you can write it as /^ \. / or as /^ '.' /
17:43 madosan ah
17:43 AlexDaniel madosan: the former seems a bit toothpicky to me :)
17:44 domidumont joined #perl6
17:44 Voldenet m: <a b c .>.grep(*[0] ne ".").say
17:44 camelia rakudo-moar 3f90f663b: OUTPUT: «(a b c)␤»
17:44 Voldenet I'm unsure about its performance, but it works
17:44 AlexDaniel Voldenet: https://docs.perl6.org/language/traps#Strings_are_not_Lists,_so_beware_indexing
17:45 AlexDaniel m: <aaa bbbb ccc .ddd>.grep(*.comb[0] ne ".").say
17:45 camelia rakudo-moar 3f90f663b: OUTPUT: «(aaa bbbb ccc)␤»
17:46 Voldenet Oh.
17:48 Geth ¦ doc: 8ae378f03f | (Aleks-Daniel Jakimenko-Aleksejev)++ (committed using GitHub Web editor) | doc/Language/traps.pod6
17:48 Geth ¦ doc: : → ;
17:48 Geth ¦ doc: review: https://github.com/perl6/doc/commit/8ae378f03f
17:48 synopsebot Link: https://doc.perl6.org/language/traps
17:49 AlexDaniel madosan: that's a pretty good question actually, especially given the variety of ways you can approach it :)
17:50 setty1 joined #perl6
17:50 madosan :P
17:51 * [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 #perl6
17:57 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:58 madosan right?
17:59 Zoffix joined #perl6
17:59 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: https://github.com/perl6/doc/commit/287bd03332584626d9618bfb5fe673c0ef191d9b
18:00 madosan hm
18:01 geospeck joined #perl6
18:02 * [Coke] hurls emetry/Instrument/Usage.pod6 has 1 spelling errors'
18:02 [Coke] er.
18:02 Zoffix madosan: in your code, yes, it will run the first iteration right away
18:02 * [Coke] hurls https://gist.github.com/coke/723923364ed7de699313ab175bc3aff6
18:02 [Coke] Zoffix: thanks for keeping it up to date, appreciate it.
18:02 madosan Zoffix: What did Voldenet mean?
18:03 Zoffix madosan: unsure.
18:03 Voldenet the interval method has the second parameter
18:03 Zoffix Ah
18:03 Voldenet so it doesn't run immediately then
18:04 Zoffix Cool. Voldenet++
18:04 Zoffix Relevant docs: https://docs.perl6.org/type/Supply.html#method_interval
18:05 zakharyas joined #perl6
18:05 madosan I see
18:05 mahafyi i am trying to connect to asterisk manager in perl5 -> https://metacpan.org/pod/Asterisk::AMI#SYNOPSIS  ; https://docs.perl6.org/type/IO::Socket::Async#method_connect does not seem to provide a way to connect with a username and password?
18:05 mahafyi i am not trying to do it in perl5, in case the last message was mis leading
18:06 Zoffix huggable: deb
18:06 huggable Zoffix, CentOS, Debian, Fedora and Ubuntu Rakudo packages: https://github.com/nxadm/rakudo-pkg/releases
18:07 Zoffix armin: ^ FWIW, we have latest Debian packages there, in case yours is too old. (I know mine are :o)
18:08 Zoffix mahafyi: right, likely Asterisk::AMI uses some protocol that needs username and password, which is what you'd set.
18:08 Zoffix Whereas IO::Socket::Async is just raw socket
18:08 Zoffix s/raw/without any bells and whistles/;
18:09 coverable6 joined #perl6
18:09 nativecallable6 joined #perl6
18:09 mahafyi Zoffix : i see
18:10 Zoffix mahafyi: you could attempt to use Perl5's Asterisk::AMI via Inline::Perl5
18:10 Zoffix eco: Inline::Perl5
18:10 buggable Zoffix, Inline::Perl5 'Use Perl 5 code in a Perl 6 program': https://github.com/niner/Inline-Perl5 1 other matching results: https://modules.perl6.org/s/
18:10 Zoffix bot's busted :(
18:11 mahafyi Zoffix : thanks.
18:13 Zoffix left #perl6
18:14 |oLa| joined #perl6
18:21 mahafyi maybe i can should here instead - https://docs.perl6.org/type/IO::Socket#method_write
18:22 mahafyi hmm, docs say fails if socket is not connected
18:24 mscha joined #perl6
18:25 mscha m: for ^5 -> $i { say $i; NEXT say 'and';  }
18:25 camelia rakudo-moar 3f90f663b: OUTPUT: «0␤and␤1␤and␤2␤and␤3␤and␤4␤and␤»
18:25 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:28 buggable New CPAN upload: PDF-Class-0.0.1.tar.gz by WARRINGD https://cpan.metacpan.org/authors/id/W/WA/WARRINGD/Perl6/PDF-Class-0.0.1.tar.gz
18:29 AlexDaniel m: for ^5 -> $i { say ‘and’ if $++; say $i }
18:29 camelia rakudo-moar 3f90f663b: OUTPUT: «0␤and␤1␤and␤2␤and␤3␤and␤4␤»
18:29 AlexDaniel mscha: you sure you don't want .join ? :)
18:29 mscha AlexDaniel: yes, this is a highly simplified example.
18:29 mscha In reality I want to sleep before the next attempt, but not after the last one.
18:30 AlexDaniel what about throttle? :)
18:30 AlexDaniel https://docs.perl6.org/type/Supply#method_throttle
18:32 mscha throttle looks nice, will have to look into that.  Your "$++" solution is a good workaround, but not very elegant.  ;-)
18:34 AlexDaniel m: react whenever <a b c>.Supply.throttle(1, 2) { say now }
18:34 camelia rakudo-moar 3f90f663b: OUTPUT: «Instant:1513622107.921977␤Instant:1513622109.915237␤Instant:1513622111.918349␤»
18:38 mahafyi mscha : would you consider an if , else to be elegant? what makes a line elegant?
18:39 mahafyi m: for ^5 -> $i { if $i < 4 { say $i; say 'and';} else { say $i; } }
18:39 camelia rakudo-moar 3f90f663b: OUTPUT: «0␤and␤1␤and␤2␤and␤3␤and␤4␤»
18:39 mahafyi of course, i am at the point where if it works, then *very* happy , heh
18:41 mscha mahafyi: yes, that works, of course; but no, I don't consider that elegant.  ;-)
18:43 Cabanossi joined #perl6
18:46 [Coke] m: class A::3x3 { ... }
18:46 camelia rakudo-moar 3f90f663b: OUTPUT: «===SORRY!===␤Name A:: ends with '::' and cannot be used as a package name␤»
18:56 cdg joined #perl6
18:58 buggable New CPAN upload: HTML-Canvas-0.0.1.tar.gz by WARRINGD https://cpan.metacpan.org/authors/id/W/WA/WARRINGD/Perl6/HTML-Canvas-0.0.1.tar.gz
19:00 itaipu joined #perl6
19:08 espadrine joined #perl6
19:16 mziescha joined #perl6
19:29 sjn joined #perl6
19:42 wamba joined #perl6
19:42 g41j1n joined #perl6
19:48 Geth ¦ doc: 2f4f7a2ee4 | (Zoffix Znet)++ (committed using GitHub Web editor) | assets/sass/style.scss
19:48 Geth ¦ doc: Simlify CSS
19:48 Geth ¦ doc:
19:48 Geth ¦ doc: - Remove dead code
19:48 Geth ¦ doc: - Remove dated browser workarounds for now-supported properties
19:48 Geth ¦ doc: review: https://github.com/perl6/doc/commit/2f4f7a2ee4
19:49 Geth ¦ doc: 40471d259e | (Luca Ferrari)++ (committed by Zoffix Znet) | doc/Language/subscripts.pod6
19:49 Geth ¦ doc: Fix slice table. (#1702)
19:49 Geth ¦ doc:
19:49 Geth ¦ doc: The L<> directive does not work within a table, while it seems to work
19:49 synopsebot Link: https://doc.perl6.org/language/subscripts
19:49 Geth ¦ doc: within an iterable list.
19:49 Geth ¦ doc: review: https://github.com/perl6/doc/commit/40471d259e
19:50 cdg joined #perl6
19:52 dha joined #perl6
19:54 Geth ¦ doc: 58ec437f37 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/subscripts.pod6
19:54 Geth ¦ doc: Clarify diff between `[*]` and `[]` slices
19:54 Geth ¦ doc:
19:54 Geth ¦ doc: Also mention they decont (don't see deconting in search on docs site,
19:54 Geth ¦ doc: so linked to the Advent article)
19:54 Geth ¦ doc: review: https://github.com/perl6/doc/commit/58ec437f37
19:55 Geth ¦ doc: c0fc1afc9f | lefth++ (committed by Zoffix Znet) | doc/Language/packages.pod6
19:55 Geth ¦ doc: Describe how to look up class members (#1699)
19:55 Geth ¦ doc:
19:55 Geth ¦ doc: Lookup within packages and the global namespace is described. Classes should be covered as well.
19:55 Geth ¦ doc: review: https://github.com/perl6/doc/commit/c0fc1afc9f
19:55 synopsebot Link: https://doc.perl6.org/language/packages
19:57 Geth ¦ doc: 4f53943fa0 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/packages.pod6
19:57 Geth ¦ doc: Clarify .^lookup shows only public attribs accessors
19:57 Geth ¦ doc: review: https://github.com/perl6/doc/commit/4f53943fa0
20:04 ruschlem2 joined #perl6
20:16 perlpilot joined #perl6
20:20 leah2 joined #perl6
20:24 itaipu joined #perl6
20:30 cdg_ joined #perl6
20:42 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 mziescha Wanna understand
20:48 Zoffix joined #perl6
20:49 Zoffix mziescha: is this what you mean perhaps? https://perl6advent.wordpress.com/2017/12/02/perl-6-sigils-variables-and-containers/#decont
20:49 Zoffix m: my %h = :key<a b c d e>; for %h<key> { .say }
20:49 camelia rakudo-moar 3f90f663b: OUTPUT: «(a b c d e)␤»
20:49 Zoffix m: my %h = :key<a b c d e>; for %h<key><> { .say }
20:49 camelia rakudo-moar 3f90f663b: OUTPUT: «a␤b␤c␤d␤e␤»
20:50 Zoffix Starts in previous section actually: https://perl6advent.wordpress.com/2017/12/02/perl-6-sigils-variables-and-containers/#theoneandonly
20:50 * Zoffix relocates &
20:50 Zoffix left #perl6
20:56 mziescha Ahh got it 'for ( %foo.<key><>} ) {...};' was the solution.
20:57 moritz or .lsit
20:57 committable6 joined #perl6
20:57 moritz sorry
20:57 moritz .list
20:58 bisectable6 joined #perl6
20:58 bloatable6 joined #perl6
20:58 quotable6 joined #perl6
20:58 releasable6 joined #perl6
20:58 evalable6 joined #perl6
20:58 statisfiable6 joined #perl6
20:58 lizmat and another Perl 6 Weekly hits the Net: https://p6weekly.wordpress.com/2017/12/18/2017-51-thirty-years/
21:00 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:01 moritz mziescha: you can write it as for @( %foo<key> ) as well
21:02 Hotkeys joined #perl6
21:02 mziescha Ahh nice thank you
21:02 Hotkeys joined #perl6
21:02 Hotkeys joined #perl6
21:03 Hotkeys o7
21:04 mziescha That should be writen in 5to6-nutshell :-)
21:04 Zoffix joined #perl6
21:04 moritz mziescha: feel free to add it
21:05 Zoffix mziescha: I don't see how five extra characters are more complicated than 2 :)
21:05 Zoffix 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)
21:06 Zoffix Also: using .list or @ instead of <> decont can lead to subtle memory leak bugs (the article talks about it too)
21:09 Zoffix 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:10 mziescha I see
21:11 Zoffix m: my %h; %h<a> := <a b c>; .say for %h<a>; # no need for decont here
21:11 camelia rakudo-moar 3f90f663b: OUTPUT: «a␤b␤c␤»
21:12 david_xd joined #perl6
21:12 Zoffix m: my %h := Map.new: (a => <a b c>); .say for %h<a>; # no need for decont here
21:12 camelia rakudo-moar 3f90f663b: OUTPUT: «a␤b␤c␤»
21:13 Cabanossi joined #perl6
21:13 Zoffix m: my %h; %h<a> = <a b c>; %h<a>.map: *.say; # no need for decont here
21:13 camelia rakudo-moar 3f90f663b: OUTPUT: «a␤b␤c␤»
21:17 mziescha Ok thanks for your help :-)
21:37 Zoffix left #perl6
21:37 mahafyi joined #perl6
21:58 kerframil joined #perl6
21:58 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:59 |oLa| left #perl6
22:06 [Coke] ... nqp isn't a separate thing, so yes.
22:06 [Coke] (I mean, you get the binary as part of the perl6 install)
22:06 [Coke] dha: which module?
22:07 dha I'm trying to isolate
22:07 dha But, yeah, it just generally seemed weird, for the reasons you mention.
22:07 TEttinger joined #perl6
22:11 timotimo dha: you mean som emodule has "nqp" in its dependency list?
22:12 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:13 [Coke] what was the list?
22:13 timotimo that's not good
22:13 * timotimo pulls all-modules
22:13 [Coke] or we can let timo do it the hard way. :)
22:14 dha Looks like it's Grammar::BNF
22:15 timotimo seems like some things have it in the test-depends
22:16 timotimo not in the current version though?
22:16 Zoffix joined #perl6
22:16 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
22:17 dha ===> Searching for missing dependencies: nqp
22:17 dha ===> Failed to find dependencies: nqp
22:17 Zoffix dha: and what module are you trying to install?
22:18 dha Grammar::BNF
22:18 timotimo i can install Grammar::BNF just fine
22:18 Zoffix Same here and it has no prereqs, other than Test
22:19 timotimo does "zef update" change anything?
22:19 Zoffix dha: zef --force install https://github.com/ugexe/zef/archive/master.zip; zef update; zef --/cache install Grammar::BNF
22:19 Zoffix try that
22:19 dha Let me see...
22:19 Zoffix zef --/cached install Grammar::BNF
22:19 Zoffix For the last one, not --/cache
22:21 timotimo it looks like there's two Grammar::BNF in zef list
22:22 moritz different versions? different auth?
22:22 dha update by itself didn't help. Trying the more complicated version now. :-)
22:22 Zoffix Hm: $ zef depends Grammar::BNF
22:22 Zoffix Failed to resolve some missing dependencies
22:22 Zoffix Even tho it installed it :o
22:23 dha :-/
22:23 Zoffix timotimo: I only got one version. Are you sure the second one you see isn't from Zef::Repository::LocalCache?
22:24 timotimo ugh, the headers in between pieces don't stand out at all
22:24 dha Ok, that last incantation seems to have worked.
22:25 Zoffix Sweet
22:25 timotimo you're right
22:25 timotimo it *is* in the localcache
22:27 dha Ok, and with that solved, I'm going to go home and play some guitar.
22:27 dha Thanks!
23:00 comborico1611 joined #perl6
23:19 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 ruschlem2 joined #perl6
23:24 ruschlem2 left #perl6
23:27 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:30 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:33 mahafyi 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:34 timotimo that entirely depends on how the authentication works
23:35 timotimo it's all determined by the protocol that's in use
23:35 timotimo basically, all you need to do is send the right list of numbers between 0 and 255 to the server
23:37 timotimo of course that's entirely unhelpful, but every additional detail depends entirely on what protocol the pbx manager understands/expects
23:37 timotimo 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
23:39 mahafyi https://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 mahafyi I will study this tomorrow, though.
23:39 cdg joined #perl6
23:41 mahafyi also https://www.voip-info.org/wiki/view/Asterisk+manager+API#ActionPackets gives a good explanation. and the knowledgeable folks at #asterisk will help, though unlike here it is like facing a gun sometimes, lol.
23:43 timotimo it looks like a somewhat simple text-based protocol
23:43 Cabanossi joined #perl6
23:43 mahafyi it is, but it can also support md5
23:44 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
23:47 timotimo i'd still call that plaintext
23:47 mahafyi got it.
23:48 mahafyi 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
23:49 mahafyi ok i will start the headbanging tomorrow, :)
23:50 timotimo best of luck!
23:50 mahafyi timotimo : thanks
23:57 mahafyi 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:59 timotimo rest well

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

Perl 6 | Reference Documentation | Rakudo