»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:00 Cabanossi left, lichtkind left 00:02 Cabanossi joined, mcmillhj left 00:04 itsame left
samcv ok hopefully fixed the period one. on the docs. going to address the % ones 00:04
there's no point to have something /([ foo ])/ right? in capturing parens and in non-capture brackets for regex? 00:05
i see it somewhere and can probably just have the non-capturing ones removed 00:06
00:06 SCHAPiE left 00:08 ggoebel joined 00:12 mcmillhj joined 00:17 mcmillhj left 00:18 SCHAPiE joined 00:25 itsame joined 00:26 mcmillhj joined
samcv ZofBot, thanks for that PR to fix IO::String btw 00:27
travis docs build failing cause of it. but you probably already know :) 00:28
00:29 Cabanossi left 00:31 mcmillhj left 00:32 Cabanossi joined 00:42 mcmillhj joined 00:43 bjz left 00:44 wamba left 00:47 mcmillhj left 00:52 kurahaupo left 01:00 mcmillhj joined 01:05 mcmillhj left 01:12 mcmillhj joined 01:17 mcmillhj left 01:28 mcmillhj joined 01:32 bjz joined 01:33 mcmillhj left 01:37 bjz left 01:39 mcmillhj joined 01:40 Actualeyes joined 01:41 bjz joined 01:44 mcmillhj left 01:45 ilbot3 left 01:49 ilbot3 joined, ChanServ sets mode: +v ilbot3 01:50 raschipi joined
Geth doc: 8472cde81c | (Zoffix Znet)++ | doc/Language/glossary.pod6
Document what "reify" means

  - Can't think of a good section to write this in, so writing it
   in glossary
  - Fixes #1265
01:52
01:52 mcmillhj joined
raschipi #1265 01:52
01:57 mcmillhj left 02:01 Cabanossi left 02:02 Cabanossi joined
Geth doc: 3bb170f8de | (Zoffix Znet)++ | doc/Language/5to6-perlfunc.pod6
Proc::Async.kill is *not* the alternative for Perl 5's kill

Fixes #1277
02:06
02:07 itsame left 02:08 raschipi left 02:09 imcsk8_ left, imcsk8 joined
Geth doc: bcbef20ead | (Zoffix Znet)++ | doc/Language/traps.pod6
Document precompilation of constants as a trap

Fixes #1276
02:13
doc: 35a90d9feb | (Zoffix Znet)++ | doc/Type/Junction.pod6
Use correct heading level
02:15
02:19 mcmillhj joined 02:23 mcmillhj left 02:26 dct left 02:33 mcmillhj joined
Geth doc: 7628708384 | (Zoffix Znet)++ | doc/Type/Junction.pod6
Document Failure and Exceptions in Junctions

  - Fixes #1271
  - Closes RT#131118: rt.perl.org/Ticket/Display.html?id=131118
02:37
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=131118
02:38 mcmillhj left 02:40 kurahaupo joined 02:51 travis-ci joined
travis-ci Doc build errored. Zoffix Znet 'Document Failure and Exceptions in Junctions 02:51
travis-ci.org/perl6/doc/builds/229352697 github.com/perl6/doc/compare/35a90...28708384bd
02:51 travis-ci left
Geth doc: 51f37892d2 | (Zoffix Znet)++ | 2 files
Fix typos; MasterDuke++
02:54
02:57 bjz left 03:00 Cabanossi left
Geth doc: d29b8b3475 | (Zoffix Znet)++ | doc/Type/WhateverCode.pod6
Use kebob-case in example
03:00
03:02 Cabanossi joined
Geth doc: f9973e55fc | (Zoffix Znet)++ | doc/Type/WhateverCode.pod6
Rephrase
03:09
doc: fc1a679d58 | (Zoffix Znet)++ | doc/Type/WhateverCode.pod6
Include examples for type-constraining for Whatevercode

  - `WhateverCode` are already included in previous examples
  - Add example with `Callable` type contraint
  - Add example with `&` sigil to indicate `Callable` type constraint
  - Fixes #1279
03:10
03:15 Cabanossi left 03:17 Cabanossi joined 03:20 mcmillhj joined 03:23 travis-ci joined
travis-ci Doc build errored. Zoffix Znet 'Rephrase' 03:23
travis-ci.org/perl6/doc/builds/229356140 github.com/perl6/doc/compare/d29b8...973e55fcce
03:23 travis-ci left 03:25 mcmillhj left 03:30 bjz joined 03:37 mcmillhj joined, khw left 03:41 mcmillhj left 03:44 itsame joined 03:50 labster left 03:55 labster joined 03:56 aborazmeh joined, aborazmeh left, aborazmeh joined 04:14 kurahaupo left 04:24 mcmillhj joined 04:31 mcmillhj left 04:42 wigner joined
Geth doc: 96993c6142 | (Zoffix Znet)++ | 2 files
Fix make xtest
04:47
04:57 itsame left 05:14 mcmillhj joined 05:19 skids left, mcmillhj left
Geth doc: 0728c55159 | (Zoffix Znet)++ | doc/Type/Pair.pod6
Document Pair.ACCEPTS

Fixes #1235
05:24
05:24 itsame joined 05:31 mcmillhj joined
Geth doc: f6472b6bba | (Zoffix Znet)++ | doc/Language/syntax.pod6
Bring prose about Array constructor up to date

Fixes #1229
05:34
05:35 mcmillhj left 05:38 travis-ci joined
travis-ci Doc build errored. Zoffix Znet 'Fix make xtest' 05:38
travis-ci.org/perl6/doc/builds/229367550 github.com/perl6/doc/compare/fc1a6...993c6142d7
05:38 travis-ci left
Geth doc: 840d55fc4a | (Zoffix Znet)++ | doc/Language/testing.pod6
Remove stuff about Hash comparisons

Map/Hash stringification is not random. Other Associative's currently have a bug where it is, but is known and will be made non-random
05:44
doc: 0dc3f85dbb | (Zoffix Znet)++ | doc/Language/testing.pod6
Add note about `is-deeply` being busted accidentally on purpose

  github.com/rakudo/rakudo/commit/096bc17cd5
05:47
05:48 aborazmeh left 05:52 mcmillhj joined 05:57 mcmillhj left 06:10 pat_js left
Geth doc: 5c7901084e | (Samantha McVey)++ | lib/Pod/Htmlify.pm6
Fix names page names with % in them and html text encoding at end
06:11
06:14 mcmillhj joined
samcv think all pages with symbols should be fixed after that last commit. though we can probably clean it up a bit more 06:14
06:18 espadrine joined 06:19 mcmillhj left 06:22 xtreak joined 06:25 BenGoldberg left 06:29 domidumont joined 06:34 itsame left 06:36 domidumont left, mcmillhj joined, domidumont joined 06:40 mcmillhj left 06:52 wamba joined 06:53 itsame joined 06:57 mcmillhj joined 06:59 CIAvash joined 07:02 itsame left, mcmillhj left 07:14 stmuk_ joined 07:16 stmuk left 07:19 rindolf joined 07:20 mcmillhj joined 07:23 parv joined 07:24 mcmillhj left 07:26 mcmillhj joined 07:30 mcmillhj left 07:47 darutoko joined 07:54 setty1 joined 07:56 geekosaur left 07:58 geekosaur joined, mcmillhj joined 08:02 xtreak left 08:03 mcmillhj left 08:09 mcmillhj joined 08:14 mcmillhj left 08:16 itsame joined 08:17 Cabanossi left 08:19 Cabanossi joined, brrt joined 08:57 lowbro left 09:05 pierre_ joined 09:14 espadrine left 09:21 setty1 left 09:24 espadrine joined 09:25 brrt left 09:29 pierre_ left 09:35 bjz left, bjz_ joined 09:42 itsame left 09:47 itsame joined 09:48 lizmat joined, Cabanossi left 09:49 Cabanossi joined 09:57 labster left 10:05 TEttinger left 10:10 lizmat left 10:11 pierre_ joined 10:12 wamba left 10:13 dct joined 10:28 wamba joined 10:33 ChoHag joined 10:37 brrt joined 10:41 parv left 10:49 brrt left 11:00 dct left 11:02 dct joined 11:09 pierre_ left 11:13 mgliana joined 11:17 Cabanossi left 11:19 Cabanossi joined 11:35 xtreak joined, Ven joined, Ven is now known as Guest35758 11:36 Guest35758 left 11:41 Ven_ joined 11:42 xtreak left 11:43 Ven_ left 11:44 chatter29 joined, chatter29 left 11:50 dct left 11:58 kyan joined 12:02 Cabanossi left 12:03 Cabanossi joined 12:08 itsame left
Voldenet Can I somehow force the routine in a role that returns promise to be "non-blocking"? 12:13
I've encountered the problem that the routine can just block the thread for 20 seconds without returning any promise at all
while it's still a design issue from the consumer's side, it'd be nice to capture it 12:14
eater Voldenet: can you give a code example? 12:25
12:26 Ven_ joined
Voldenet erm, sure 12:26
12:31 ChoHag left 12:33 Ven_ left, ChoHag joined 12:34 Ven joined, Ven is now known as Guest37184
Voldenet hm, I keep wondering if perl6 has Promise.from-completed or something, I remember using it somewhere 12:37
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 non-blocking
Voldenet as you can test... it just "waits 10 seconds", which is not that good 12:39
timotimo m: say 10.Promise
camelia No such method 'Promise' for invocant of type 'Int'
in block <unit> at <tmp> line 1
timotimo we totally should have somethign for that, ye
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:40
maybe something like "if promise is not returned within 1 second then fork..." 12:41
except with libuv forking might not be the bestest idea
timotimo why don't you just make a start block?
we totally have threads and thread pools 12:42
Voldenet Well, I'm the consumer of the role
not a producer of an implementation ;)
timotimo also, if you "use v6.d.PREVIEW" you can await things without blocking a thread
eater await without blocking?? 12:43
it will only block when the variable is accessed then?
Voldenet Well, "await $promise" line should block
"impl.get()" shouldn't
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
Voldenet (also, is there a version of non-blocking sleep?) 12:46
Promise.in?
12:47 Cabanossi left
timotimo await Promise.in(...) 12:47
or, of course, Promise.in(...).then({ }) 12:48
timotimo AFK
12:48 Guest37184 left, Cabanossi joined 12:50 Ven_ joined 13:01 Ven_ left 13:04 Ven_ joined 13:05 itsame joined, kaare__ left, Grauwolf left 13:07 wamba left 13:15 colomon_ joined, itsame left 13:16 colomon left, colomon_ is now known as colomon, Cabanossi left 13:17 brrt joined 13:18 Ven_ left, Cabanossi joined 13:19 itsame joined, anton_p joined 13:21 Ven_ joined 13:23 avalenn_ left 13:31 yqt joined 13:32 dct joined, Ven_ left 13:33 Ven joined, Ven is now known as Guest45772 13:34 lizmat joined 13:38 mxco86 left, Guest45772 left 13:40 Ven_ joined 13:42 sena_kun joined
Geth perl6-examples: 59af292b14 | (Trey Harris)++ | doc/example-template.pl
Add Emacs vars to vim vars in template
13:47
13:47 dct left, Cabanossi left 13:48 Cabanossi joined 13:49 dct joined 13:51 itsame left 13:53 itsame joined 14:02 raiph left, Ven_ left 14:03 Ven_ joined 14:06 dct left, pmurias joined
pmurias hi 14:06
Voldenet hello 14:07
I wonder if nqp has atomic increment operation built in
14:07 itaipu joined, Ven_ left
Voldenet something like nqp::atomic_increment 14:08
lucs What is the "implicit CATCH block" mentioned in the .../language/exceptions doc? 14:09
14:10 Ven_ joined
Voldenet probably CATCH { } 14:10
m: try { die("dead") } 14:11
camelia ( no output )
pmurias Voldenet: I don't think so, the preincrement op is syntax sugar on all the NQP backends
14:12 ChoHag left
Voldenet m: try { CATCH { .say } die("dead") } 14:13
camelia 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") }
Voldenet m: try { CATCH { .say }; die("dead") }
camelia 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
Voldenet m: try { CATCH { .throw }; die("dead") }
camelia dead
in block at <tmp> line 1
in block <unit> at <tmp> line 1
Voldenet m: try { CATCH { when X::AdHoc { say "caught die $_"; } }; die("dead") } 14:14
camelia caught die dead
lucs Oh, so basically, the implicit CATCH block, catches the exception, but does nothing whatsoever with it.
pmurias Voldenet: the js backend is single threaded so everything is atomic there
;)
lucs s/block,/block/
Voldenet m: class E is Exception { method message() { "Fail" } } try { CATCH { when X::AdHoc { say "caught die $_"; } }; E.new.throw }
camelia 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…
Voldenet m: class E is Exception { method message() { "Fail" } }; try { CATCH { when X::AdHoc { say "caught die $_"; } }; E.new.throw } 14:15
camelia Fail
in block <unit> at <tmp> line 1
Voldenet pmurias: that's very useful 14:16
lucs Voldenet: Thanks for the examples.
14:17 xtreak joined 14:18 ChoHag joined 14:22 pmurias left, wamba joined
Geth doc: 341cdd3083 | (Samantha McVey)++ | lib/Pod/Htmlify.pm6
Try and fix bug in previous commit
14:23
TreyHarris What's the corect way to alias additional names to a method? 14:24
14:24 pmurias joined 14:25 andrzejku joined
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:30
14:30 Ven_ left 14:31 Ven joined
TreyHarris (like DateTime.timezone's 'alias' .offset, which just is C<method offset() { $!timezone }> 14:31
14:31 Ven is now known as Guest38218 14:32 itaipu left 14:35 Guest38218 left 14:38 Ven_ joined
eater calling Log::Any functions in several threads messes up :'), you'll get mixed messages (hehe) 14:38
14:40 xtreak left 14:41 khw joined 14:42 Ven_ left 14:43 ZofBot left, ZofBot joined, ChanServ sets mode: +v ZofBot, ZofBot left
TreyHarris I tried C<method φ (--> Numeric) is rw handles 'θ' {>, that compiled but didn't define a .θ 14:44
14:44 Ven_ joined 14:45 Ven_ left, ZofBot joined, ChanServ sets mode: +v ZofBot, Ven_ joined
TreyHarris I also tried C<::?CLASS.^method_table<θ> = ::?CLASS.^method_table<φ>;>, but that dies compiling: 'Cannot modify an immutable Method' 14:46
14:47 Cabanossi left 14:48 Cabanossi joined
TreyHarris C<our \θ := ::?CLASS.^method_table<φ>;> fails with "expecting any of: new term to be defined" 14:49
14:54 haxmeister left 14:55 haxmeister joined 14:57 haxmeister left, haxmeister joined, eiro_ joined 14:58 eiro_ is now known as guiguizmo 14:59 raschipi joined 15:00 guiguizmo is now known as gu1gu1, ZofBot left, gu1gu1 left
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:08
jnthn Point:: is the Point package; putting stuff into that won't have any influence over method calls 15:11
Adding a method needs a .^add_method($name, &method) call
(Done at BEGIN time if you do it in a module that should be pre-compilable) 15:12
15:12 Ven_ left
TreyHarris Hmm, okay. C<BEGIN { .^add_method('θ', &::('&φ')); };> gives a compile-time: Code ref '' does not exist in serialization context 15:15
15:16 Cabanossi left 15:18 lizmat left
TreyHarris C<BEGIN { .^add_method('θ', ::?CLASS.^method_table<φ>) };> gets me back to the "No such method" 15:18
rather, "No such method 'θ' for invocant of type 'Num'"
15:19 Cabanossi joined
TreyHarris oddly: $x.^can('θ') # (<anon> φ) 15:23
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:27
TreyHarris ( C<$x.φ> works just fine, btw, and $x.WHAT is Point, and $x ~~ Num is False) 15:28
haxmeister: what named parameters are you talking about?
haxmeister in sub defs 15:29
my-sub( :mynamed)
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.?
haxmeister yes 15:31
raschipi foo(:3val)
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
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)
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
jnthn TreyHarris: You'd need ::?CLASS.^add_method
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).
haxmeister or foo :v(32)
raschipi There's also :numkey
haxmeister it's a simple thing.. but I just really love that about perl6 15:34
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
been superceded, though it's definitely written for the Perl 5 expert.)
haxmeister well I haven't done anything with perl5 in 8yrs or so.. save for some little 10 line scripts 15:36
so learning perl6 has been a new experience just like learning lisp after C 15:37
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:38
I'm spending a lot of time finding information I want that is also geared toward the "no intimate perl6 knowledge" crowd 15:40
raschipi The tutorials up to this point were geared towards finding new developers for Perl6. 15:41
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
'Point' already has a method 'θ' (did you mean to declare a multi-method?)␤at :"
(and yes, it really ends there, "at :" with no line number or block reference)
MasterDuke_ TreyHarris: that error is LTA, could you rakudobug it? 15:44
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
programmers or non-OO programmers.)
MasterDuke_: sure.
MasterDuke_: should I rakudobrew head first, or is 6.c okay?
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:47
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, lizmat joined
TreyHarris Ahh... I was using "let's talk again", which was slightly sensible but not very :-) 15:48
Geth doc: 1c5621434d | (Samantha McVey)++ | 2 files
Rename escape-filename to replace-badchars-with-goodnames
15:49
MasterDuke_ we want really good error messages, not just some unhelpful notification that something, somewhere, somehow, somewhy went wrong
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
s/sub trait/method trait/
raschipi "escape-filename" sounds like a PHP function name. 15:56
15:58 mgliana left
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
I thought there was a trait for "this attribute is also known by this other name"
eater m: start { say "hello" } 16:00
camelia ( no output )
eater is that supposed to happen? :')
MasterDuke_ TreyHarris: lizmat created an `aka` trait at one point, maybe she put it into the ecosystem?
16:00 kyan left
geekosaur eater, I think yes, the script exits before the start can run 16:02
the main thread si pretty much always special in that if it exits, all other threads are killed
raschipi m: start { say "hello" }; sleep 2;
camelia hello
MasterDuke_ m: await start { say "hello" } 16:03
camelia hello
16:03 kaare__ joined
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:04
(so, runtime) 16:05
eater \baka 16:06
geekosaur: :') cool
16:07 pierre_ left
MasterDuke_ TreyHarris: this is where it was removed from rakudo, you might be able to re-purpose github.com/rakudo/rakudo/commit/33...e6af6fc5af 16:07
16:12 Ven joined, Ven is now known as Guest29528 16:13 kyan joined 16:18 Cabanossi left 16:19 Cabanossi joined 16:20 aindilis joined 16:23 Guest29528 left
TreyHarris MasterDuke_: thanks. My husband has me for some chores now, but I'll minimize my example and submit a bug in < 24h. Email [email@hidden.address] title '[BUG] ...', right, or is there an actual rakudobug program I don't have installed? 16:24
MasterDuke_ TreyHarris: that's pretty much it 16:27
huggable: rakudobug
huggable MasterDuke_, Report bugs by emailing to [email@hidden.address]
eater how can I reliable empty a channel at the end of the runtime? 16:29
16:29 cog_ joined, jantore left 16:32 lizmat left, cognominal left 16:33 andrzejku left 16:36 Ven_ joined, dct joined 16:39 Grauwolf joined, Grauwolf left, Grauwolf joined 16:50 brrt left 16:58 Ven_ left
Geth doc: 3a264bc6fd | (Samantha McVey)++ | lib/Pod/Htmlify.pm6
Add '^' to badchars for url's so those pages work again
17:01
doc: a9d617aad3 | (Samantha McVey)++ | html/.htaccess
Add updated .htaccess entries for rewriting
17:11 dct left 17:22 Actualeyes left 17:31 raschipi left 17:34 andrzejku joined 17:38 Actualeyes joined 17:44 ChoHag left 17:47 dct joined 17:53 raschipi joined
TimToady TreyHarris: see perl6.org/archive/rfc/84.html and perl6.org/archive/rfc/128.html for the origins of pairs and named args 17:58
(both by TheDamian)
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 (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 : `.".
moritz eater: first you close it, so that no new elements can come in
TreyHarris TimToady: thanks
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"
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:00
TimToady TreyHarris: don't recall exactly, but it seems to me that 'aka' is kinda backwards from what you want 18:02
generally the name you're declaring should come up front, and the details of how it's defined come after
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:03
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
18:06 kyan left
TimToady the inline should get rid of that rapidly, if you're worried about performance 18:06
*inliner
TreyHarris TimToady: no, more that that's a lot of text to just say φ and θ both are names for the same thing 18:07
(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
I guess that's my main aesthetic gripe about it
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:09
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
18:10 AlexDani` joined, AlexDani` left
TimToady troo 18:10
18:10 AlexDani` joined 18:11 AlexDani` is now known as AlexDaniel
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:12
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
but i'm not seriously suggesting that's good
TimToady MasterDuke_: I wasn't gonna point that out :)
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
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
TreyHarris I like the listy syntax, yes
TimToady well, I worry that & or | would be ambiguous in some situations, though maybe not
TreyHarris (And was joking about the junctions) 18:17
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:18
m: method any:<φ θ> {...} 18:19
camelia 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 itsame left
TimToady m: my method any:<φ θ> {...} 18:19
camelia ( no output )
TimToady I guess it doesn't mind it
m: my method :<φ θ> {...}
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3my method7⏏5 :<φ θ> {...}
TimToady m: say :<foo>.WHAT 18:20
camelia (Str)
TimToady m: say :<foo bar>.WHAT
camelia (List)
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]
AlexDaniel which is weird… but that's how it's done usually 18:22
18:22 dct left
TreyHarris Ah-hah. 18:23
TimToady m: my method names:<φ θ> {...}
camelia ( no output )
18:24 ajr_ joined
MasterDuke_ m: .name.say for class :: { method any:<a b>($c) { say $c } }.new.^methods 18:24
camelia any:<a b>
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>
camelia WARNINGS for <tmp>:
Useless use of constant value a b in sink context (lines 1, 1)
hi
True
TimToady but the chance that anyone has used that name already is vanishingly small
18:27 ZofBot joined, ChanServ sets mode: +v ZofBot
ajr_ I succeeded in installing Rak* 2017.01 on the Raspberry Pi, but I'm having trouble with 2017.04 18:27
18:27 buggable left, buggable joined, ChanServ sets mode: +v buggable, Geth left 18:28 Geth joined, ChanServ sets mode: +v Geth
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
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)
TimToady TreyHarris: suppose you want to write it as method names:[@some-compile-time-list] for some reason
timotimo (i was under the assumption i'd have a month to shake problems out)
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
TimToady in any case, the main difficulty is not syntax, but semantics 18:31
one has to install a loop in the action routines for the declaration
stmuk_ at least with --no-telemeh a fix is possible
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
bbl
ajr_ MD - no, the downloaded *
TimToady TreyHarris: I'll also note that it's formally ambiguous with enum Foo <a b c>;
or at least with the anonymous form of that
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
ajr_: a binary, or are you building the source? 18:35
stmuk_ which isn't the R* configure.pl
TreyHarris TimToady: yep, I just noticed that grepping about the perl6 tree
MasterDuke_ stmuk_: ah, didn't realize that
stmuk_ R* uses bundled tarballs and not git 18:36
18:36 itsame joined
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:40
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
ajr_ (The source code of that module does not appear to have changed between versions) 18:42
stmuk_ MasterDuke_: I had to config MoarVM with --no-telemeh make install and then built nqp (which finds moar) and then R* 18:45
so three Configure, make install steps
MasterDuke_: hmmm the --gen-nqp step may work I'll try it thanks 18:46
MasterDuke_ ajr_: ^^^ looks like it should be possible
stmuk_ yes a two step possible should be saner
ajr_ From the 2017.04 directory, what should the sequence of commands be? (Or is there somewhere I can find this?) 18:48
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
ajr_ stmuk, sure, I'm not in a rush 18:54
BTW, is stmuk Steve Mynott? 18:58
18:59 lichtkind left
stmuk_ yes 18:59
at least this isn't ARM Windows on a PI :) 19:00
ajr_ (I wouldn't do that to anybody :-)* ) To save IRC bandwidth, mail the sequence to Parrot Raiser? 19:02
19:02 zakharyas left, sena_kun left 19:04 AlexDaniel left 19:08 xinming left 19:10 xinming joined 19:11 lichtkind joined 19:15 labster joined 19:17 AlexDaniel joined 19:18 darutoko left 19:22 itsame left
stmuk_ ajr_: gist.github.com/stmuk/84b49fc92cba...f6c4ce9bfe 19:22
19:23 andrzejku left 19:25 domidumont left 19:28 whoami joined
whoami hello! 19:29
19:30 whoami left
ajr_ ping? 19:31
19:33 who joined
raschipi hi 19:33
who hi 19:34
19:34 ajr_ left 19:35 ajr_ joined
who anybody here? 19:38
ajr_ Yes, though it's been quiet for a while
pmurias anyone planning to go to (YAPC::EU/The Perl Conference) this year? 19:39
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:41
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
(since perl 5 doesn't really have types)
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
pmurias who: I assume it's much easier to get a Perl 5 job if that's what you are concerned about 19:47
who estou a aprender Perl 19:50
sorry 19:51
portuguese...
ajr_ who: Perl 6 was intended (among other ideas) to fix the misfeatures of 5, which could not be done without breaking backwards compatibility
who I'm learning Perl and 19:52
I would like to know how I can help the community?
19:55 kaare_ joined 19:56 sQuEE left 19:57 geekosaur left, kaare__ left, andrzejku joined 19:59 who left
raschipi saiu... 19:59
19:59 geekosaur joined 20:02 sQuEE joined 20:03 TEttinger joined 20:07 setty1 joined 20:11 mr-foobar left 20:14 andrzejku left 20:17 Cabanossi left 20:18 Cabanossi joined 20:23 dct joined, Sgeo left 20:26 Sgeo joined
ajr_ who: I don't know what the status of the documentation in Portugese is, but translation might be one way to help 20:34
20:36 itsame joined, itsame left
raschipi ajr_: He's gone. 20:37
ajr_ Oh, right, I didn't notice. 20:38
20:43 itsame joined, itsame left 20:44 kurahaupo joined
raschipi ajr_: does your client support tab completion for usernames? 20:46
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:49
20:53 itsame joined 20:59 ajr_ left
raschipi TreyHarris: a hash doesn't cut it? 21:02
21:03 dct left
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
21:03 wigner left
TreyHarris raschipi: no, because I'm just trying to quickly ducktype a mock 21:03
I need it in a scalar variable and I need $x.methodname to return the thing I stored
21:05 dct joined
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
21:07 kaare__ joined
MasterDuke_ TreyHarris: you can give a regex to quotable6 to search the irc logs 21:08
21:09 kaare_ left
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.
m: use Test::Mock 21:10
camelia ===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::…
TreyHarris jnthn: I really thought I'd seen people do it on camelia.
AlexDaniel star: use Test::Mock
camelia ( no output )
jnthn If you wish to roll your own thing, then method FORWARD is probably useful
oops
method FALLBACK
21:11 labster left
TreyHarris jnthn: yes, it's easy. I just though it already existed. 21:11
jnthn Ah, right, you already mentioned fallback :) 21:12
jnthn only half reading
But no, there's not something build in that does that
raschipi m: my $capture = \( x => 5, y => 20, z => [1, 2] ); my $x = Local::Class.new(|$capture); say $x; say $x.y;
camelia Could not find symbol '&Class'
in block <unit> at <tmp> line 1

Actually thrown at:
in block <unit> at <tmp> line 1
jnthn *built in
grr, my typing is awful
github.com/jnthn/test-mock is the module I referred to, anyways 21:13
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 Could not find symbol '&Class'
in block <unit> at <tmp> line 1

Actually thrown at:
in block <unit> at <tmp> line 1
sammers m: my $x = class { has $.a = 1; has $.b = 'foo' }.new; $x.a.say; $x.b.say;
camelia 1
foo
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:17
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:18
jnthn OK; in that case a suspect a class with FALLBACK is the easiest thing, or something like sammers showed 21:19
TreyHarris nods 21:20
jnthn (Test::Mock relies on the methods already existing in the object to be mocked, so is not useful in this case) 21:21
jnthn bbiab 21:22
TreyHarris mixing in Associative and passing a list of captures would probably be just as easy. 21:25
21:32 anton_p left 21:33 labster joined 21:37 CIAvash left 21:38 Skarsnik joined 21:56 pmurias left 22:01 Cabanossi left 22:02 jantore joined 22:03 Cabanossi joined 22:07 BenGoldberg joined 22:08 espadrine left 22:26 itsame left, itsame joined 22:27 araujo joined
araujo hello :) 22:28
b2gills m: say 'hi' 22:31
camelia hi
raschipi oi araujo 22:44
huggable: hug araujo 22:46
huggable hugs araujo
22:50 rindolf left
haxmeister can someone link me to info regarding IO from files with a delimiter? 22:53
raschipi "delimiter"? 22:55
haxmeister like comma seperated files.. or any given delimiter besides comma 22:56
csv
timotimo just set .nl-in
haxmeister ah
where can I find that info though?
raschipi just use .split
docs.perl6.org/routine/split 22:57
timotimo better to use Text::CSV
raschipi That also works.
timotimo csv is at least 10x more complex than you thinw 22:58
thinw
darn it
haxmeister it's not csv 22:59
but it has a pattern that I can pick out with the write tools.. thanks for the help guys
raschipi I know how complicated it is. But split does a good aproximation. 23:00
23:03 Cabanossi left, dct left 23:04 Cabanossi joined 23:13 pmurias joined 23:17 AlexDaniel left 23:36 cpage_ left 23:40 Skarsnik left 23:51 pmurias left 23:57 itsame left