Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-05-06

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:02 Cabanossi joined #perl6
00:04 samcv ok hopefully fixed the period one. on the docs. going to address the % ones
00:05 samcv there's no point to have something /([  foo ])/ right? in capturing parens and in non-capture brackets for regex?
00:06 samcv i see it somewhere and can probably just have the non-capturing ones removed
00:08 ggoebel joined #perl6
00:12 mcmillhj joined #perl6
00:18 SCHAPiE joined #perl6
00:25 itsame joined #perl6
00:26 mcmillhj joined #perl6
00:27 samcv ZofBot, thanks for that PR to fix IO::String btw
00:28 samcv travis docs build failing cause of it. but you probably already know :)
00:32 Cabanossi joined #perl6
00:42 mcmillhj joined #perl6
01:00 mcmillhj joined #perl6
01:12 mcmillhj joined #perl6
01:28 mcmillhj joined #perl6
01:32 bjz joined #perl6
01:39 mcmillhj joined #perl6
01:40 Actualeyes joined #perl6
01:41 bjz joined #perl6
01:49 ilbot3 joined #perl6
01:49 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!
01:50 raschipi joined #perl6
01:52 Geth ¦ doc: 8472cde81c | (Zoffix Znet)++ | doc/Language/glossary.pod6
01:52 Geth ¦ doc: Document what "reify" means
01:52 Geth ¦ doc:
01:52 Geth ¦ doc: - Can't think of a good section to write this in, so writing it
01:52 Geth ¦ doc:     in glossary
01:52 Geth ¦ doc: - Fixes #1265
01:52 Geth ¦ doc: review: https://github.com/perl6/doc/commit/8472cde81c
01:52 mcmillhj joined #perl6
01:52 raschipi #1265
02:02 Cabanossi joined #perl6
02:06 Geth ¦ doc: 3bb170f8de | (Zoffix Znet)++ | doc/Language/5to6-perlfunc.pod6
02:06 Geth ¦ doc: Proc::Async.kill is *not* the alternative for Perl 5's kill
02:06 Geth ¦ doc:
02:06 Geth ¦ doc: Fixes #1277
02:06 Geth ¦ doc: review: https://github.com/perl6/doc/commit/3bb170f8de
02:09 imcsk8 joined #perl6
02:13 Geth ¦ doc: bcbef20ead | (Zoffix Znet)++ | doc/Language/traps.pod6
02:13 Geth ¦ doc: Document precompilation of constants as a trap
02:13 Geth ¦ doc:
02:13 Geth ¦ doc: Fixes #1276
02:13 Geth ¦ doc: review: https://github.com/perl6/doc/commit/bcbef20ead
02:15 Geth ¦ doc: 35a90d9feb | (Zoffix Znet)++ | doc/Type/Junction.pod6
02:15 Geth ¦ doc: Use correct heading level
02:15 Geth ¦ doc: review: https://github.com/perl6/doc/commit/35a90d9feb
02:19 mcmillhj joined #perl6
02:33 mcmillhj joined #perl6
02:37 Geth ¦ doc: 7628708384 | (Zoffix Znet)++ | doc/Type/Junction.pod6
02:37 Geth ¦ doc: Document Failure and Exceptions in Junctions
02:37 Geth ¦ doc:
02:37 Geth ¦ doc: - Fixes #1271
02:37 Geth ¦ doc: - Closes RT#131118: https://rt.perl.org/Ticket/Display.html?id=131118
02:37 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=131118
02:37 Geth ¦ doc: review: https://github.com/perl6/doc/commit/7628708384
02:40 kurahaupo joined #perl6
02:51 travis-ci joined #perl6
02:51 travis-ci Doc build errored. Zoffix Znet 'Document Failure and Exceptions in Junctions
02:51 travis-ci https://travis-ci.org/perl6/doc/builds/229352697 https://github.com/perl6/doc/compare/35a90d9feba6...7628708384bd
02:51 travis-ci left #perl6
02:54 Geth ¦ doc: 51f37892d2 | (Zoffix Znet)++ | 2 files
02:54 Geth ¦ doc: Fix typos; MasterDuke++
02:54 Geth ¦ doc: review: https://github.com/perl6/doc/commit/51f37892d2
03:00 Geth ¦ doc: d29b8b3475 | (Zoffix Znet)++ | doc/Type/WhateverCode.pod6
03:00 Geth ¦ doc: Use kebob-case in example
03:00 Geth ¦ doc: review: https://github.com/perl6/doc/commit/d29b8b3475
03:02 Cabanossi joined #perl6
03:09 Geth ¦ doc: f9973e55fc | (Zoffix Znet)++ | doc/Type/WhateverCode.pod6
03:09 Geth ¦ doc: Rephrase
03:09 Geth ¦ doc: review: https://github.com/perl6/doc/commit/f9973e55fc
03:10 Geth ¦ doc: fc1a679d58 | (Zoffix Znet)++ | doc/Type/WhateverCode.pod6
03:10 Geth ¦ doc: Include examples for type-constraining for Whatevercode
03:10 Geth ¦ doc:
03:10 Geth ¦ doc: - `WhateverCode` are already included in previous examples
03:10 Geth ¦ doc: - Add example with `Callable` type contraint
03:10 Geth ¦ doc: - Add example with `&` sigil to indicate `Callable` type constraint
03:10 Geth ¦ doc: - Fixes #1279
03:10 Geth ¦ doc: review: https://github.com/perl6/doc/commit/fc1a679d58
03:17 Cabanossi joined #perl6
03:20 mcmillhj joined #perl6
03:23 travis-ci joined #perl6
03:23 travis-ci Doc build errored. Zoffix Znet 'Rephrase'
03:23 travis-ci https://travis-ci.org/perl6/doc/builds/229356140 https://github.com/perl6/doc/compare/d29b8b34756b...f9973e55fcce
03:23 travis-ci left #perl6
03:30 bjz joined #perl6
03:37 mcmillhj joined #perl6
03:44 itsame joined #perl6
03:55 labster joined #perl6
03:56 aborazmeh joined #perl6
03:56 aborazmeh joined #perl6
04:24 mcmillhj joined #perl6
04:42 wigner joined #perl6
04:47 Geth ¦ doc: 96993c6142 | (Zoffix Znet)++ | 2 files
04:47 Geth ¦ doc: Fix make xtest
04:47 Geth ¦ doc: review: https://github.com/perl6/doc/commit/96993c6142
05:14 mcmillhj joined #perl6
05:24 Geth ¦ doc: 0728c55159 | (Zoffix Znet)++ | doc/Type/Pair.pod6
05:24 Geth ¦ doc: Document Pair.ACCEPTS
05:24 Geth ¦ doc:
05:24 Geth ¦ doc: Fixes #1235
05:24 Geth ¦ doc: review: https://github.com/perl6/doc/commit/0728c55159
05:24 itsame joined #perl6
05:31 mcmillhj joined #perl6
05:34 Geth ¦ doc: f6472b6bba | (Zoffix Znet)++ | doc/Language/syntax.pod6
05:34 Geth ¦ doc: Bring prose about Array constructor up to date
05:34 Geth ¦ doc:
05:34 Geth ¦ doc: Fixes #1229
05:34 Geth ¦ doc: review: https://github.com/perl6/doc/commit/f6472b6bba
05:38 travis-ci joined #perl6
05:38 travis-ci Doc build errored. Zoffix Znet 'Fix make xtest'
05:38 travis-ci https://travis-ci.org/perl6/doc/builds/229367550 https://github.com/perl6/doc/compare/fc1a679d58cb...96993c6142d7
05:38 travis-ci left #perl6
05:44 Geth ¦ doc: 840d55fc4a | (Zoffix Znet)++ | doc/Language/testing.pod6
05:44 Geth ¦ doc: Remove stuff about Hash comparisons
05:44 Geth ¦ doc:
05:44 Geth ¦ doc: Map/Hash stringification is not random. Other Associative's currently
05:44 Geth ¦ doc: have a bug where it is, but is known and will be made non-random
05:44 Geth ¦ doc: review: https://github.com/perl6/doc/commit/840d55fc4a
05:47 Geth ¦ doc: 0dc3f85dbb | (Zoffix Znet)++ | doc/Language/testing.pod6
05:47 Geth ¦ doc: Add note about `is-deeply` being busted accidentally on purpose
05:47 Geth ¦ doc:
05:47 Geth ¦ doc: https://github.com/rakudo/rakudo/commit/096bc17cd5
05:47 Geth ¦ doc: review: https://github.com/perl6/doc/commit/0dc3f85dbb
05:52 mcmillhj joined #perl6
06:11 Geth ¦ doc: 5c7901084e | (Samantha McVey)++ | lib/Pod/Htmlify.pm6
06:11 Geth ¦ doc: Fix names page names with % in them and html text encoding at end
06:11 Geth ¦ doc: review: https://github.com/perl6/doc/commit/5c7901084e
06:14 mcmillhj joined #perl6
06:14 samcv think all pages with symbols should be fixed after that last commit. though we can probably clean it up a bit more
06:18 espadrine joined #perl6
06:22 xtreak joined #perl6
06:29 domidumont joined #perl6
06:36 mcmillhj joined #perl6
06:36 domidumont joined #perl6
06:52 wamba joined #perl6
06:53 itsame joined #perl6
06:57 mcmillhj joined #perl6
06:59 CIAvash joined #perl6
07:14 stmuk_ joined #perl6
07:19 rindolf joined #perl6
07:20 mcmillhj joined #perl6
07:23 parv joined #perl6
07:26 mcmillhj joined #perl6
07:47 darutoko joined #perl6
07:54 setty1 joined #perl6
07:58 geekosaur joined #perl6
07:58 mcmillhj joined #perl6
08:09 mcmillhj joined #perl6
08:15 itsame joined #perl6
08:19 Cabanossi joined #perl6
08:19 brrt joined #perl6
09:05 pierre_ joined #perl6
09:24 espadrine joined #perl6
09:35 bjz_ joined #perl6
09:47 itsame joined #perl6
09:48 lizmat joined #perl6
09:49 Cabanossi joined #perl6
10:11 pierre_ joined #perl6
10:13 dct joined #perl6
10:28 wamba joined #perl6
10:33 ChoHag joined #perl6
10:37 brrt joined #perl6
11:02 dct joined #perl6
11:13 mgliana joined #perl6
11:19 Cabanossi joined #perl6
11:35 xtreak joined #perl6
11:35 Ven joined #perl6
11:41 Ven_ joined #perl6
11:44 chatter29 joined #perl6
11:58 kyan joined #perl6
12:03 Cabanossi joined #perl6
12:13 Voldenet Can I somehow force the routine in a role that returns promise to be "non-blocking"?
12:13 Voldenet I've encountered the problem that the routine can just block the thread for 20 seconds without returning any promise at all
12:14 Voldenet while it's still a design issue from the consumer's side, it'd be nice to capture it
12:25 eater Voldenet: can you give a code example?
12:25 Ven_ joined #perl6
12:26 Voldenet erm, sure
12:33 ChoHag joined #perl6
12:33 Ven joined #perl6
12:37 Voldenet hm, I keep wondering if perl6 has Promise.from-completed or something, I remember using it somewhere
12:38 Voldenet m: sub promise-done(Any:D $v){ my $p = Promise.new; $p.keep($v); return $p; }; role Async { method get() returns Promise:D { ... }}; class BlockSync does Async { method get() { sleep(10); promise-done(1) }}; my Async $x = BlockSync.new(); my $promise = $x.get(); say "non-blocking"; await $promise
12:38 camelia rakudo-moar 096bc1: OUTPUT: «non-blocking␤»
12:39 Voldenet as you can test... it just "waits 10 seconds", which is not that good
12:39 timotimo m: say 10.Promise
12:39 camelia rakudo-moar 096bc1: OUTPUT: «No such method 'Promise' for invocant of type 'Int'␤  in block <unit> at <tmp> line 1␤␤»
12:39 timotimo we totally should have somethign for that, ye
12:40 Voldenet the question about non-blockability awaits, while I've never seen this problem really resolved in any language that offers await, I'd still want to get my hands on
12:41 Voldenet maybe something like "if promise is not returned within 1 second then fork..."
12:41 Voldenet except with libuv forking might not be the bestest idea
12:41 timotimo why don't you just make a start block?
12:41 timotimo we totally have threads and thread pools
12:42 Voldenet Well, I'm the consumer of the role
12:42 Voldenet not a producer of an implementation ;)
12:42 timotimo also, if you "use v6.d.PREVIEW" you can await things without blocking a thread
12:43 eater await without blocking??
12:43 eater it will only block when the variable is accessed then?
12:43 Voldenet Well, "await $promise" line should block
12:43 Voldenet "impl.get()" shouldn't
12:44 Voldenet but i'm starting to think that always using start is not that bad idea
12:44 timotimo it blocks, but it doesn't block a thread
12:44 pierre_ joined #perl6
12:46 Voldenet (also, is there a version of non-blocking sleep?)
12:46 Voldenet Promise.in?
12:47 timotimo await Promise.in(...)
12:48 timotimo or, of course, Promise.in(...).then({ })
12:48 * timotimo AFK
12:48 Cabanossi joined #perl6
12:50 Ven_ joined #perl6
13:04 Ven_ joined #perl6
13:05 itsame joined #perl6
13:15 colomon_ joined #perl6
13:17 brrt joined #perl6
13:18 Cabanossi joined #perl6
13:19 itsame joined #perl6
13:19 anton_p joined #perl6
13:21 Ven_ joined #perl6
13:31 yqt joined #perl6
13:32 dct joined #perl6
13:33 Ven joined #perl6
13:34 lizmat joined #perl6
13:40 Ven_ joined #perl6
13:42 sena_kun joined #perl6
13:47 Geth ¦ perl6-examples: 59af292b14 | (Trey Harris)++ | doc/example-template.pl
13:47 Geth ¦ perl6-examples: Add Emacs vars to vim vars in template
13:47 Geth ¦ perl6-examples: review: https://github.com/perl6/perl6-examples/commit/59af292b14
13:48 Cabanossi joined #perl6
13:49 dct joined #perl6
13:53 itsame joined #perl6
14:03 Ven_ joined #perl6
14:06 pmurias joined #perl6
14:06 pmurias hi
14:07 Voldenet hello
14:07 Voldenet I wonder if nqp has atomic increment operation built in
14:07 itaipu joined #perl6
14:08 Voldenet something like nqp::atomic_increment
14:09 lucs What is the "implicit CATCH block" mentioned in the .../language/exceptions doc?
14:10 Ven_ joined #perl6
14:10 Voldenet probably CATCH { }
14:11 Voldenet m: try { die("dead") }
14:11 camelia rakudo-moar 096bc1: ( no output )
14:11 pmurias Voldenet: I don't think so, the preincrement op is syntax sugar on all the NQP backends
14:13 Voldenet m: try { CATCH { .say } die("dead") }
14:13 camelia rakudo-moar 096bc1: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Strange text after block (missing semicolon or comma?)␤at <tmp>:1␤------> 3try { CATCH { .say }7⏏5 die("dead") }␤»
14:13 Voldenet m: try { CATCH { .say }; die("dead") }
14:13 camelia rakudo-moar 096bc1: OUTPUT: «dead␤  in block <unit> at <tmp> line 1␤␤dead␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
14:13 Voldenet m: try { CATCH { .throw }; die("dead") }
14:13 camelia rakudo-moar 096bc1: OUTPUT: «dead␤  in block  at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
14:14 Voldenet m: try { CATCH { when X::AdHoc { say "caught die $_"; } }; die("dead") }
14:14 camelia rakudo-moar 096bc1: OUTPUT: «caught die dead␤»
14:14 lucs Oh, so basically, the implicit CATCH block, catches the exception, but does nothing whatsoever with it.
14:14 pmurias Voldenet: the js backend is single threaded so everything is atomic there
14:14 pmurias ;)
14:14 lucs s/block,/block/
14:14 Voldenet m: class E is Exception { method message() { "Fail" } } try { CATCH { when X::AdHoc { say "caught die $_"; } }; E.new.throw }
14:14 camelia rakudo-moar 096bc1: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Strange text after block (missing semicolon or comma?)␤at <tmp>:1␤------> 3xception { method message() { "Fail" } }7⏏5 try { CATCH { when X::AdHoc { say "caug␤    expecting any of:␤        in…»
14:14 Voldenet m: class E is Exception { method message() { "Fail" } }; try { CATCH { when X::AdHoc { say "caught die $_"; } }; E.new.throw }
14:14 camelia rakudo-moar 096bc1: OUTPUT: «Fail␤  in block <unit> at <tmp> line 1␤␤»
14:16 Voldenet pmurias: that's very useful
14:16 lucs Voldenet: Thanks for the examples.
14:17 xtreak joined #perl6
14:18 ChoHag joined #perl6
14:22 wamba joined #perl6
14:23 Geth ¦ doc: 341cdd3083 | (Samantha McVey)++ | lib/Pod/Htmlify.pm6
14:23 Geth ¦ doc: Try and fix bug in previous commit
14:23 Geth ¦ doc: review: https://github.com/perl6/doc/commit/341cdd3083
14:24 TreyHarris What's the corect way to alias additional names to a method?
14:24 pmurias joined #perl6
14:25 andrzejku joined #perl6
14:30 TreyHarris All the cases of "alias" in the docs aren't actually aliases; they refer to cases where two names point at a third, underlying, undocumented thing, or where a method by the "alias" is simply returning an attribute by another name that's also public
14:31 Ven joined #perl6
14:31 TreyHarris (like DateTime.timezone's 'alias' .offset, which just is C<method offset() { $!timezone }>
14:38 Ven_ joined #perl6
14:38 eater calling Log::Any functions in several threads messes up :'), you'll get mixed messages (hehe)
14:41 khw joined #perl6
14:43 ZofBot joined #perl6
14:44 TreyHarris I tried C<method φ (--> Numeric) is rw handles 'θ' {>, that compiled but didn't define a .θ
14:44 Ven_ joined #perl6
14:45 ZofBot joined #perl6
14:45 Ven_ joined #perl6
14:46 TreyHarris I also tried C<::?CLASS.^method_table<θ> = ::?CLASS.^method_table<φ>;>, but that dies compiling: 'Cannot modify an immutable Method'
14:48 Cabanossi joined #perl6
14:49 TreyHarris C<our \θ := ::?CLASS.^method_table<φ>;> fails with "expecting any of: new term to be defined"
14:55 haxmeister joined #perl6
14:57 haxmeister joined #perl6
14:57 eiro_ joined #perl6
14:58 raschipi joined #perl6
15:08 TreyHarris All three of C<Point::{'θ'} := Point::{'&φ'};  Point::{'θ'} := &::('&φ'); &::{'θ'} := &::('&φ');> compile and create a class method, but that method then fails "No such method 'θ' for invocant of type 'Num'"
15:11 jnthn Point:: is the Point package; putting stuff into that won't have any influence over method calls
15:11 jnthn Adding a method needs a .^add_method($name, &method) call
15:12 jnthn (Done at BEGIN time if you do it in a module that should be pre-compilable)
15:15 TreyHarris Hmm, okay. C<BEGIN { .^add_method('θ', &::('&φ')); };> gives a compile-time: Code ref '' does not exist in serialization context
15:18 TreyHarris C<BEGIN { .^add_method('θ', ::?CLASS.^method_table<φ>) };> gets me back to the "No such method"
15:18 TreyHarris rather, "No such method 'θ' for invocant of type 'Num'"
15:18 Cabanossi joined #perl6
15:23 TreyHarris oddly: $x.^can('θ') # (<anon> φ)
15:27 haxmeister I love named parameters.. whoever came up with that for perl6... excellent idea, at first it seemed silly but now I can't do it any other way..lol
15:28 TreyHarris ( C<$x.φ> works just fine, btw, and $x.WHAT is Point, and $x ~~ Num is False)
15:28 TreyHarris haxmeister: what named parameters are you talking about?
15:29 haxmeister in sub defs
15:29 haxmeister my-sub( :mynamed)
15:30 haxmeister it's all in the little things..
15:30 TreyHarris haxmeister: you mean like 'sub foo(Bool :$bar)' in particular, where foo(:bar) alone is sufficient? Or also foo(:val<3>), etc.?
15:31 haxmeister yes
15:31 raschipi foo(:3val)
15:31 haxmeister absolutely beautiful idea.. I find that I often use the same name locally in some subs as the argument that I'm sending anyway.. this actually makes sense of that
15:31 TreyHarris Unless I'm mistaken, that's TimToady (Larry Wall)'s refactoring of the already-extant perl 5 hash-passing which allowed calls like foo(val => 3)
15:32 TreyHarris Since in Perl 6, '=>' is an infix Pair constructor and hashes are constructed from lists of Pairs, it followed
15:32 haxmeister foo(:val(32)) works too
15:32 jnthn TreyHarris: You'd need ::?CLASS.^add_method
15:33 raschipi But in Perl6, it isn't just a cast from a list of pairs into a hash.
15:33 TreyHarris :key<value> is another pair constructor, as is :key(expr).
15:33 haxmeister or foo :v(32)
15:33 raschipi There's also :numkey
15:34 haxmeister it's a simple thing.. but I just really love that about perl6
15:35 TreyHarris so "who came up with the idea" is either TimToady, or the entire community, I think. The second Apocalypse itself had :2nd be equivalent to 'nd => 2', so the idea was in Perl 6 from the start; I'd have to look at the Apocalypse again to see if it was actually used for named parameters from the beginning. (I think it was. But reading the Apocalypses is useful to get the idea of the design, even though much has
15:35 TreyHarris been superceded, though it's definitely written for the Perl 5 expert.)
15:36 haxmeister well I haven't done anything with  perl5 in 8yrs or so.. save for some little 10 line scripts
15:37 haxmeister so learning perl6 has been a new experience just like learning lisp after C
15:38 haxmeister but I'm in love with it already.. I just wish there were more tuts geared toward people learning perl from the ground up instead of from the perspect of a perl5 programmer
15:40 haxmeister I'm spending a lot of time finding information I want that is also geared toward the "no intimate perl6 knowledge" crowd
15:41 raschipi The tutorials up to this point were geared towards finding new developers for Perl6.
15:42 TreyHarris jnthn: gah, once I got that I got a redefinition error. turns out "method φ (--> Numeric) is rw handles 'θ' {" was creating a theta method after all, just not one that was useful, and I forgot to remove it, so who knows which if any of the above might have also worked. But that particular one (C<BEGIN { ::?CLASS.^add_method('θ', ::?CLASS.^method_table<φ>) };>) gave me the compile-time error of "Package
15:42 TreyHarris 'Point' already has a method 'θ' (did you mean to declare a multi-method?)␤at :"
15:42 TreyHarris (and yes, it really ends there, "at :" with no line number or block reference)
15:44 MasterDuke_ TreyHarris: that error is LTA, could you rakudobug it?
15:46 TreyHarris haxmeister: the docs.perl.org has several "5to6..." docs that may be worth a skim just because they might help help you with those assumptions even if you don't know the Perl 5 people are talking about. But when you find such cases, could you raise them to our attention? We want the docs to be accessible to people with no particularl language experience. (Though I don't think we're targeting brand-new
15:46 TreyHarris programmers or non-OO programmers.)
15:46 TreyHarris MasterDuke_: sure.
15:46 TreyHarris MasterDuke_: should I rakudobrew head first, or is 6.c okay?
15:47 MasterDuke_ i don't know of any recent commits that would change anything there, but at least put the output of perl6 --version in the bug report
15:48 TreyHarris MasterDuke_: (And this is a good time to ask since I've seen it but never seen it defined or in a context that defined it for me: what's "LTA"?)
15:48 MasterDuke_ Less Than Awesome
15:48 lichtkind joined #perl6
15:48 lizmat joined #perl6
15:48 TreyHarris Ahh... I was using "let's talk again", which was slightly sensible but not very :-)
15:49 Geth ¦ doc: 1c5621434d | (Samantha McVey)++ | 2 files
15:49 Geth ¦ doc: Rename escape-filename to replace-badchars-with-goodnames
15:49 Geth ¦ doc: review: https://github.com/perl6/doc/commit/1c5621434d
15:49 MasterDuke_ we want really good error messages, not just some unhelpful notification that something, somewhere, somehow, somewhy went wrong
15:51 TreyHarris jnthn, MasterDuke_: that said, shouldn't my 'handles' sub trait work? I see looking at source why it doesn't. (I might even be able to make it work though I'm a bit hesitant to touch it since my understanding of this is clearly at the cargo-cult stage.)
15:51 TreyHarris s/sub trait/method trait/
15:56 raschipi "escape-filename" sounds like a PHP function name.
15:59 TreyHarris oh, I see S12 defines it to work that way. "method select_tail handles <wag hang> {...}" is the example. And that makes sense, 'handles' means "chain another method call onto the end", not "replace the method call". so "has $!paw handles <hand>" is incorrect, but "has Hand $!paw handles <shake>" is correct
15:59 TreyHarris I thought there was a trait for "this attribute is also known by this other name"
16:00 eater m: start { say "hello" }
16:00 camelia rakudo-moar 096bc1: ( no output )
16:00 eater is that supposed to happen? :')
16:00 MasterDuke_ TreyHarris: lizmat created an `aka` trait at one point, maybe she put it into the ecosystem?
16:02 geekosaur eater, I think yes, the script exits before the start can run
16:02 geekosaur the main thread si pretty much always special in that if it exits, all other threads are killed
16:02 raschipi m: start { say "hello" }; sleep 2;
16:02 camelia rakudo-moar 096bc1: OUTPUT: «hello␤»
16:03 MasterDuke_ m: await start { say "hello" }
16:03 camelia rakudo-moar 096bc1: OUTPUT: «hello␤»
16:03 kaare__ joined #perl6
16:04 TreyHarris MasterDuke_: not that I see by looking for '\baka\b' in ALL-MODULES. Three modules at least have defined a generalized aliasing metamethod, but not implemented as traits.
16:05 TreyHarris (so, runtime)
16:06 eater \baka
16:06 eater geekosaur: :') cool
16:07 MasterDuke_ TreyHarris: this is where it was removed from rakudo, you might be able to re-purpose https://github.com/rakudo/rakudo/commit/337b4c8c6e6af6fc5af
16:12 Ven joined #perl6
16:13 kyan joined #perl6
16:19 Cabanossi joined #perl6
16:20 aindilis joined #perl6
16:24 TreyHarris MasterDuke_: thanks. My husband has me for some chores now, but I'll minimize my example and submit a bug in < 24h. Email rakudobug@perl.org title '[BUG] ...', right, or is there an actual rakudobug program I don't have installed?
16:27 MasterDuke_ TreyHarris: that's pretty much it
16:27 MasterDuke_ huggable: rakudobug
16:27 huggable MasterDuke_, Report bugs by emailing to rakudobug@perl.org
16:29 eater how can I reliable empty a channel at the end of the runtime?
16:29 cog_ joined #perl6
16:36 Ven_ joined #perl6
16:36 dct joined #perl6
16:39 Grauwolf joined #perl6
16:39 Grauwolf joined #perl6
17:01 Geth ¦ doc: 3a264bc6fd | (Samantha McVey)++ | lib/Pod/Htmlify.pm6
17:01 Geth ¦ doc: Add '^' to badchars for url's so those pages work again
17:01 Geth ¦ doc: review: https://github.com/perl6/doc/commit/3a264bc6fd
17:01 Geth ¦ doc: a9d617aad3 | (Samantha McVey)++ | html/.htaccess
17:01 Geth ¦ doc: Add updated .htaccess entries for rewriting
17:01 Geth ¦ doc: review: https://github.com/perl6/doc/commit/a9d617aad3
17:34 andrzejku joined #perl6
17:38 Actualeyes joined #perl6
17:47 dct joined #perl6
17:53 raschipi joined #perl6
17:58 TimToady TreyHarris: see https://perl6.org/archive/rfc/84.html and https://perl6.org/archive/rfc/128.html for the origins of pairs and named args
17:58 TimToady (both by TheDamian)
17:58 TreyHarris Huh, interesting... I wasn't sure if rt.perl.org would handle my text/alternative email with a Markdown HTML and a test part. It did (https://rt.perl.org/Public/Bug/Display.html?id=131262) but while it monospaced the blocks, it didn't monospace the "at :." in "Note the message completes with at :.", even though I typed it as "with `at : `.".
17:58 moritz eater: first you close it, so that no new elements can come in
17:58 TreyHarris TimToady: thanks
17:59 moritz eater: and then you consume elements until you're done
17:59 TreyHarris TimToady: do you know what controversy there was about the C<aka> trait? The commit message removing it said it was being removed because of the "lack of consensus"
18:00 eater moritz: hmm I think the problem I'm really hitting is that stdout closes or the thread is killed before I can write everything
18:02 TimToady TreyHarris: don't recall exactly, but it seems to me that 'aka' is kinda backwards from what you want
18:02 TimToady generally the name you're declaring should come up front, and the details of how it's defined come after
18:03 TreyHarris Well, for context, in order to better-document using a read-write Proxy as a class attribute accessor, I was implementing a 2D Point as a Complex so it could be referenced in either Cartesian or polar notation, and this means there are a number of methods that can be re-used under two names, most significanty φ and θ both can refer to the polar angular component.
18:06 TreyHarris So I could choose one (φ  to match the ISO standard) as the one with the implementation, and then write C<method θ (--> Numeric) is rw { return-rw .φ; }>, but avoiding the nested method call seemed desirable.
18:06 TimToady the inline should get rid of that rapidly, if you're worried about performance
18:06 TimToady *inliner
18:07 TreyHarris TimToady: no, more that that's a lot of text to just say φ and θ both are names for the same thing
18:08 TreyHarris (especially since there are several other cases like that in a full implementation of Point2D, not that I'd include them in the Proxy doc, but I might in the examples)
18:08 TimToady sure, but if two names are supposed to be roughly the same importance, using a trait seems like a really asymmetrical way to do that
18:08 TimToady I guess that's my main aesthetic gripe about it
18:09 TreyHarris TimToady: really? C<method φ aka θ ...> seems to me the way that most clearly states "i could've used either name here, reversing them wouldn't change behavior at all"
18:10 TreyHarris a method calling another method makes it seem like the one with logic is the "primary" name while the one that just returns the other is a "secondary" name
18:10 AlexDani` joined #perl6
18:10 TimToady troo
18:10 AlexDani` joined #perl6
18:12 TimToady but if we're gonna do something like this, I'd still druther it be a disjunctional name of some sort rather than a trait, and then we get the benifit of it anywhere you can declare a name
18:14 MasterDuke_ TreyHarris: that asymmetry could be addressed by something like: sub foo_and_bar_implementor() {}; sub foo() { foo_and_bar_implementor() }; sub bar() { foo_and_bar_implementor() }
18:14 MasterDuke_ but i'm not seriously suggesting that's good
18:14 TimToady MasterDuke_: I wasn't gonna point that out :)
18:15 MasterDuke_ TimToady: heh, i guess you have more restraint than i
18:15 TimToady something like "method <φ θ> (@args) {...}" appeals to me more than a trait
18:16 TreyHarris TimToady: I agree. A compile-time junction? method φ & θ () { ... } and/or method φ | θ () { ... } ? The and-junction resulting in both names being available, the or-junction resulting in whichever name used being the only name allowed? ;-)
18:16 TimToady esp since traits tend to come after the args, which could be long
18:16 TreyHarris I like the listy syntax, yes
18:16 TimToady well, I worry that & or | would be ambiguous in some situations, though maybe not
18:16 TreyHarris (And was joking about the junctions)
18:18 TimToady we do already have syntax, kinda, such that "method any:<φ θ>" or some such can already be parsed, though for now I believe it's rejected as a non-categorical
18:19 TimToady m: method any:<φ θ> {...}
18:19 camelia rakudo-moar 096bc1: OUTPUT: «Potential difficulties:␤    Useless declaration of a has-scoped method in mainline (did you mean 'my method any:<φ θ>'?)␤    at <tmp>:1␤    ------> 3method7⏏5 any:<φ θ> {...}␤»
18:19 TimToady m: my method any:<φ θ> {...}
18:19 camelia rakudo-moar 096bc1: ( no output )
18:19 TimToady I guess it doesn't mind it
18:19 TimToady m: my method :<φ θ> {...}
18:19 camelia rakudo-moar 096bc1: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3my method7⏏5 :<φ θ> {...}␤»
18:20 TimToady m: say :<foo>.WHAT
18:20 camelia rakudo-moar 096bc1: OUTPUT: «(Str)␤»
18:20 TimToady m: say :<foo bar>.WHAT
18:20 camelia rakudo-moar 096bc1: OUTPUT: «(List)␤»
18:21 TreyHarris Okay, so how does one go about such a proposal now? The RFC process has been gone a long time, right? So what, an email to p6-language? Just commit to perl6/specs and see if someone reverts me? (j/k ;-)
18:21 MasterDuke_ you can create an RT ticket with [RFC]
18:22 AlexDaniel which is weird… but that's how it's done usually
18:23 TreyHarris Ah-hah.
18:23 TimToady m: my method names:<φ θ> {...}
18:23 camelia rakudo-moar 096bc1: ( no output )
18:24 ajr_ joined #perl6
18:24 MasterDuke_ m: .name.say for class :: { method any:<a b>($c) { say $c } }.new.^methods
18:24 camelia rakudo-moar 096bc1: OUTPUT: «any:<a b>␤»
18:25 TimToady doesn't do anything special with it currently
18:25 TreyHarris m: class Foo { method names:<a b> { say "hi" } }; say Foo.names:<a b>
18:25 camelia rakudo-moar 096bc1: OUTPUT: «WARNINGS for <tmp>:␤Useless use of constant value a b in sink context (lines 1, 1)␤hi␤True␤»
18:25 TimToady but the chance that anyone has used that name already is vanishingly small
18:27 ZofBot joined #perl6
18:27 ajr_ I succeeded in installing Rak* 2017.01 on the Raspberry Pi, but I'm having trouble with 2017.04
18:27 buggable joined #perl6
18:28 Geth joined #perl6
18:28 TreyHarris TimToady: and the argument for "method names:<φ θ>" over "method <φ θ>" is less chance of grammar ambiguity?
18:28 ajr_ Steve Mynott has given me some hints, but I'm finding them ambiguous
18:29 MasterDuke_ ajr_: i think there's a known problem with a new default MoarVM compile option (made non-default on HEAD). have you tried adding '--no-telemeh' to the MoarVM Configure.pl call?
18:29 timotimo (i should have immediately protested when someone decided to put that into star)
18:29 TimToady TreyHarris: suppose you want to write it as method names:[@some-compile-time-list] for some reason
18:29 timotimo (i was under the assumption i'd have a month to shake problems out)
18:30 TimToady though I suppose there's «@some-compile-time-list[]» as a counter argument
18:30 stmuk_ the reason it was put in star was because moarvm was totally broken under a large number of platforms
18:31 TimToady in any case, the main difficulty is not syntax, but semantics
18:31 TimToady one has to install a loop in the action routines for the declaration
18:31 stmuk_ at least with --no-telemeh a fix is possible
18:32 ajr_ timotimo /MaterDuke - thanks, that's what Steve said, but I'm not clear what the sequence of commands should be. Previously, there was a single config
18:32 MasterDuke_ ajr_: are you using rakudobrew?
18:33 timotimo you can just put --moar-option=--no-telemeh in rakudo's Configure.pl
18:33 timotimo bbl
18:33 ajr_ MD - no, the downloaded *
18:33 TimToady TreyHarris: I'll also note that it's formally ambiguous with enum Foo <a b c>;
18:33 TimToady or at least with the anonymous form of that
18:34 stmuk_ timotimo: I think thats the configure for nqp not rakudo there
18:34 MasterDuke_ stmuk_: you can do that with Rakudo's Configure.pl
18:35 MasterDuke_ ajr_: a binary, or are you building the source?
18:35 stmuk_ which isn't the R* configure.pl
18:35 TreyHarris TimToady: yep, I just noticed that grepping about the perl6 tree
18:35 MasterDuke_ stmuk_: ah, didn't realize that
18:36 stmuk_ R* uses bundled tarballs and not git
18:36 itsame joined #perl6
18:40 ajr_ MD - I downloaded the tarball from the site, untarred it, cd'd into rakudo-star-2017.04 and ran perl Configure.pl --backend=moar --gen-moar
18:41 MasterDuke_ stmuk_: couldn't you build MoarVM yourself from the tarball with the --no-telemeh option, and then Configure.pl --backend=moar --gen-nqp (not --gen-moar)?
18:41 ajr_ The equivalent sequence worked for 2017.01, but this time a compiler error occurred in a module
18:42 zakharyas joined #perl6
18:42 ajr_ (The source code of that module does not appear to have changed between versions)
18:44 stmuk_ MasterDuke_: I had to config MoarVM with --no-telemeh make install and then built nqp (which finds moar) and then R*
18:45 stmuk_ so three Configure, make install steps
18:46 stmuk_ MasterDuke_: hmmm the --gen-nqp step may work I'll try it thanks
18:46 MasterDuke_ ajr_: ^^^ looks like it should be possible
18:46 stmuk_ yes a two step possible should be saner
18:48 ajr_ From the 2017.04 directory, what should the sequence of commands be? (Or is there somewhere I can find this?)
18:53 ajr_ I think it's worth getting this into a published set of coherent instructions, because I can't be the only Pi owner interested in P6
18:53 stmuk_ ajr_: give me a few mins
18:54 ajr_ stmuk, sure, I'm not in a rush
18:58 ajr_ BTW, is stmuk Steve Mynott?
18:59 stmuk_ yes
19:00 stmuk_ at least this isn't ARM Windows on a PI :)
19:02 ajr_ (I wouldn't do that to anybody :-)* ) To save IRC bandwidth, mail the sequence to Parrot Raiser?
19:10 xinming joined #perl6
19:11 lichtkind joined #perl6
19:15 labster joined #perl6
19:17 AlexDaniel joined #perl6
19:22 stmuk_ ajr_: https://gist.github.com/stmuk/84b49fc92cba789e00112cf6c4ce9bfe
19:28 whoami joined #perl6
19:28 whoami hello!
19:30 whoami left #perl6
19:31 ajr_ ping?
19:33 who joined #perl6
19:33 raschipi hi
19:34 who hi
19:35 ajr_ joined #perl6
19:38 who anybody here?
19:38 ajr_ Yes, though it's been quiet for a while
19:39 pmurias anyone planning to go to (YAPC::EU/The Perl Conference) this year?
19:41 who Why does not the community combine the features of Perl 6 with Perl 5 and make a unique language? Why take two different paths? It's kind of confusing, not a Perl 5 and Perl 6?
19:42 who I do not speak English very well so sorry
19:42 geekosaur perl 5 is adopting stuff from perl 6 already, although some of it just doesn't apply
19:43 geekosaur (since perl 5 doesn't really have types)
19:44 pmurias a combined Perl 5/6 wouldn't be able to run the existing Perl 5 code
19:44 who Then would it be safer to learn perl 6?
19:45 geekosaur right, perl 6 is actually a different language even though it maintains many of the core *ideas* of perl. so there is no real upgrade path; things have to be rewritten and in many cases redesigned
19:47 pmurias who: I assume it's much easier to get a Perl 5 job if that's what you are concerned about
19:50 who estou a aprender Perl
19:51 who sorry
19:51 who portuguese...
19:51 ajr_ who: Perl 6 was intended (among other ideas) to fix the misfeatures of 5, which could not be done without breaking backwards compatibility
19:52 who I'm learning Perl and
19:52 who I would like to know how I can help the community?
19:55 kaare_ joined #perl6
19:57 andrzejku joined #perl6
19:59 who left #perl6
19:59 raschipi saiu...
19:59 geekosaur joined #perl6
20:02 sQuEE joined #perl6
20:03 TEttinger joined #perl6
20:07 setty1 joined #perl6
20:18 Cabanossi joined #perl6
20:23 dct joined #perl6
20:26 Sgeo joined #perl6
20:34 ajr_ who: I don't know what the status of the documentation in Portugese is, but translation might be one way to help
20:36 itsame joined #perl6
20:37 raschipi ajr_: He's gone.
20:38 ajr_ Oh, right, I didn't notice.
20:42 itsame joined #perl6
20:44 kurahaupo joined #perl6
20:46 raschipi ajr_: does your client support tab completion for usernames?
20:49 TreyHarris Gah, my memory's like a sieve sometimes... what's the quick way to create an object whose .new takes any named args you give it and sticks it into so-named attributes without needing explicit has? I thought that was my $x = Any.new(a => 1, b => 2), but it isn't....
20:53 itsame joined #perl6
21:02 raschipi TreyHarris: a hash doesn't cut it?
21:03 TreyHarris Am I really just imagining that thing existed? Not a hash, but something where 'my $x = ??.new(:a(1), :b<foo>); $x.a.say; $x.b.say;' works?
21:03 TreyHarris raschipi: no, because I'm just trying to quickly ducktype a mock
21:03 TreyHarris I need it in a scalar variable and I need $x.methodname to return the thing I stored
21:05 dct joined #perl6
21:07 TreyHarris I mean, I can write it in five or six lines using a hash and a fallback, but I really thought I'd seen people quickly construct struct-like objects this way on camelia just by doing a .new on an existing type
21:07 kaare__ joined #perl6
21:08 MasterDuke_ TreyHarris: you can give a regex to quotable6 to search the irc logs
21:09 jnthn TreyHarris: If you don't mind a dependency, Test::Mock may be useful to you
21:09 TreyHarris MasterDuke_: I know, I have several ways to search the logs, but I have no idea how to write a pattern that finds that. 'new' followed by :something followed by .something? That'll turn up a huge number of things that aren't what I thought I've seen.
21:10 TreyHarris m: use Test::Mock
21:10 camelia rakudo-moar 824cfa: OUTPUT: «===SORRY!===␤Could not find Test::Mock at line 1 in:␤    /home/camelia/.perl6␤    /home/camelia/rakudo-m-inst-2/share/perl6/site␤    /home/camelia/rakudo-m-inst-2/share/perl6/vendor␤    /home/camelia/rakudo-m-inst-2/share/perl6␤    CompUnit::…»
21:10 TreyHarris jnthn: I really thought I'd seen people do it on camelia.
21:10 AlexDaniel star: use Test::Mock
21:10 camelia star-m 2016.10: ( no output )
21:10 jnthn If you wish to roll your own thing, then method FORWARD is probably useful
21:10 jnthn oops
21:10 jnthn method FALLBACK
21:11 TreyHarris jnthn: yes, it's easy. I just though it already existed.
21:12 jnthn Ah, right, you already mentioned fallback :)
21:12 * jnthn only half reading
21:12 jnthn But no, there's not something build in that does that
21:12 raschipi m: my $capture = \( x => 5, y => 20, z => [1, 2] );  my $x = Local::Class.new(|$capture); say $x; say $x.y;
21:12 camelia rakudo-moar 824cfa: OUTPUT: «Could not find symbol '&Class'␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
21:12 jnthn *built in
21:12 jnthn grr, my typing is awful
21:13 jnthn https://github.com/jnthn/test-mock is the module I referred to, anyways
21:14 raschipi m: classLocal::Class {}; my $capture = \( x => 5, y => 20, z => [1, 2] );  my $x = Local::Class.new(|$capture); say $x; say $x.y;
21:14 camelia rakudo-moar 824cfa: OUTPUT: «Could not find symbol '&Class'␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
21:14 sammers m: my $x = class { has $.a = 1; has $.b = 'foo' }.new; $x.a.say; $x.b.say;
21:14 camelia rakudo-moar 824cfa: OUTPUT: «1␤foo␤»
21:16 TreyHarris jnthn: yep. In this case I want to test my classes, each of which solve a system of equations relating the variables--which are attributes--if a sufficient number of variables have ben set (and throws a tantrum if you pass too many values that lead to no solutions). It would be useful for testing to create a list of objects with solved sets of values, and then I can automatically test each permutation.
21:18 TreyHarris having "my @solutions = Solution.new(:x<1>, :y<2>, :a(i), :b(pi)), Solution.new(:x(0), :y(0), :a(0), :b(i * pi))...." and just looping through it
21:19 jnthn OK; in that case a suspect a class with FALLBACK is the easiest thing, or something like sammers showed
21:20 * TreyHarris nods
21:21 jnthn (Test::Mock relies on the methods already existing in the object to be mocked, so is not useful in this case)
21:22 * jnthn bbiab
21:25 TreyHarris mixing in Associative and passing a list of captures would probably be just as easy.
21:33 labster joined #perl6
21:38 Skarsnik joined #perl6
22:01 jantore joined #perl6
22:03 Cabanossi joined #perl6
22:07 BenGoldberg joined #perl6
22:26 itsame joined #perl6
22:27 araujo joined #perl6
22:28 araujo hello :)
22:31 b2gills m: say 'hi'
22:31 camelia rakudo-moar 824cfa: OUTPUT: «hi␤»
22:43 raschipi oi araujo
22:46 raschipi huggable: hug araujo
22:46 * huggable hugs araujo
22:53 haxmeister can someone link me to info regarding IO from files with a delimiter?
22:55 raschipi "delimiter"?
22:56 haxmeister like comma seperated files.. or any given delimiter besides comma
22:56 haxmeister csv
22:56 timotimo just set .nl-in
22:56 haxmeister ah
22:56 haxmeister where can I find that info though?
22:56 raschipi just use .split
22:57 raschipi https://docs.perl6.org/routine/split
22:57 timotimo better to use Text::CSV
22:57 raschipi That also works.
22:58 timotimo csv is at least 10x more complex than you thinw
22:58 timotimo thinw
22:58 timotimo darn it
22:59 haxmeister it's not csv
22:59 haxmeister but it has a pattern that I can pick out with the write tools.. thanks for the help guys
23:00 raschipi I know how complicated it is. But split does a good aproximation.
23:04 Cabanossi joined #perl6
23:13 pmurias joined #perl6

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

Perl 6 | Reference Documentation | Rakudo