Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-09-15

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:00 lichtkind jnthn: ohai and welcome back
00:00 dalek 6model: d70553b | mberends++ | java/ (4 files):
00:00 dalek 6model: [java] implement lambdas as anonymous classes in Init
00:00 dalek 6model: review: http://github.com/jnthn/6model/commit/d​70553be0f5a973963368f1969e7b572624a2bab
00:01 lichtkind good night
00:01 lichtkind left #perl6
00:05 vdrab left #perl6
00:10 diakopter mberends: o_O implement lambdas as anonymous classes in Init
00:11 arnsholt Anonymous inner classes in Java are closures, if with an excessively verbose syntax =)
00:14 diakopter I'll bet they get compiled to mangled state machine classes ... just as in C#->CIL ?
00:23 jferrero left #perl6
00:28 patspam left #perl6
00:32 lucs joined #perl6
00:36 ZadYree left #perl6
00:44 BillN1VUX1 joined #perl6
00:46 * BillN1VUX1 Boston.pm  Rakudo* demo tonight.
00:47 larsen left #perl6
00:47 cognominal left #perl6
00:48 larsen joined #perl6
00:49 meppl joined #perl6
00:50 cognominal joined #perl6
00:57 QinGW joined #perl6
01:10 araujo joined #perl6
01:10 araujo left #perl6
01:13 Patterner left #perl6
01:16 araujo joined #perl6
01:19 molaf left #perl6
01:20 alksentrs left #perl6
01:22 rurban joined #perl6
01:25 jasonmay left #perl6
01:26 Chillance left #perl6
01:30 jasonmay joined #perl6
01:32 supernovus Well, for anyone who's interested there is a new XML library for Perl 6 in town. http://github.com/supernovus/exemel  It's a parser and emitter.
01:33 mantovan1 thank you supernovus.
01:33 molaf joined #perl6
01:34 BillN1VUX1 cool
01:34 s1n_mini left #perl6
01:37 supernovus So, now that Exemel is ready, I'm onto what it was created for... a port of the Petal template engine (that I am calling Flower, since Butterflies like flowers...)
01:46 BillN1VUX1 OOOH THE PUN !!!!!!!!!!!!!!!!!!!!!!!!
01:47 * BillN1VUX1 Boston.pm applause at end of Rakudo demo
01:49 BillN1VUX1 left #perl6
01:50 hercynium left #perl6
01:56 whiteknight left #perl6
01:56 agentzh joined #perl6
01:56 cdarroch left #perl6
01:59 bpalmer` joined #perl6
02:03 redicaps joined #perl6
02:05 lue ohai o/
02:06 hillu joined #perl6
02:06 lue rakudo: grammar A { method B { <xdigit>+ } }; say "3Fc" ~~ A.B;
02:06 p6eval rakudo 5ac20e: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 22␤»
02:06 lue rakudo: grammar A { method B { <digit>+ } }; say "392" ~~ A.B;
02:06 p6eval rakudo 5ac20e: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 22␤»
02:07 lue rakudo: grammar A { token B { <xdigit>+ } }; say "3Fc" ~~ A.B;
02:07 p6eval rakudo 5ac20e: OUTPUT«Type objects are abstract and have no attributes, but you tried to access &!regex␤  in 'A::B' at line 22:/tmp/0htBEApZi0␤  in main program body at line 22:/tmp/0htBEApZi0␤»
02:07 lue rakudo: grammar A { token B { <xdigit>+ } }; say A.B.^methods(:local)
02:07 p6eval rakudo 5ac20e: OUTPUT«Type objects are abstract and have no attributes, but you tried to access &!regex␤  in 'A::B' at line 22:/tmp/OZxEsBsdBr␤  in main program body at line 22:/tmp/OZxEsBsdBr␤»
02:13 masonkramer left #perl6
02:15 Util_ is now known as Util
02:15 Util rakudo: $_ = "abc";                         say /a(b)c/ ?? 1 !! 0; say $0;
02:15 p6eval rakudo 5ac20e: OUTPUT«1␤b␤»
02:15 Util rakudo: $_ = "abc"; my $re = regex {a(b)c}; say /$re/   ?? 1 !! 0; say $0;
02:15 p6eval rakudo 5ac20e: OUTPUT«1␤␤»
02:16 Util Why isn't $0 populated in the 2nd example?
02:21 Italian_Plumber left #perl6
02:24 lue rakudo: $_ = "abc"; my $re = /a(b)c/; say /$re/ ?? 1 !! 0; say $0;
02:24 p6eval rakudo 5ac20e: OUTPUT«1␤␤»
02:24 lue rakudo: $_ = "abc"; my $re = Regex.new(/a(b)c/); say /$re/ ?? 1 !! 0; say $0;
02:24 p6eval rakudo 5ac20e: OUTPUT«too few positional arguments: 2 passed, 3 (or more) expected␤  in main program body at line 1␤»
02:24 lue rakudo: $_ = "abc"; my $re = Regex.new(a(b)c); say /$re/ ?? 1 !! 0; say $0;
02:24 jhuni joined #perl6
02:24 p6eval rakudo 5ac20e: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 22␤»
02:25 brxue left #perl6
02:25 cognominal left #perl6
02:39 redicaps left #perl6
03:01 orafu left #perl6
03:01 orafu joined #perl6
03:02 Psyche^ joined #perl6
03:02 Psyche^ is now known as Patterner
03:04 supernovus Whoops, initial version of Exemel had some debugging 'say' statements still in the code. Oops. Oh well, the tests now cover a lot more functionality anyway.
03:06 supernovus left #perl6
03:09 shortcircuit joined #perl6
03:14 sftp left #perl6
03:24 leftleg_ joined #perl6
03:25 leftleg_ left #perl6
03:29 meppel joined #perl6
03:32 meppl left #perl6
03:34 meppel is now known as meppl
03:42 f00li5h is now known as f00li5h[notFAQ]
04:03 satyavvd joined #perl6
04:03 f00li5h[notFAQ] is now known as f00li5h
04:08 hercynium joined #perl6
04:09 hercynium left #perl6
04:09 hercynium joined #perl6
04:15 skyheights joined #perl6
04:16 skyheights left #perl6
04:20 QinGW left #perl6
04:22 QinGW joined #perl6
04:23 skyheights joined #perl6
04:24 skyheights left #perl6
04:29 am0c^ left #perl6
04:30 BillN1VUX joined #perl6
04:34 karb joined #perl6
04:36 karb left #perl6
04:40 hercynium left #perl6
04:42 kjeldahl_ joined #perl6
04:49 tylercurtis joined #perl6
04:52 dalek book: e547152 | perlpilot++ | src/regexes.pod:
04:52 dalek book: [regex] a slightly more verbose explanation of alternation
04:52 dalek book: review: http://github.com/perl6/book/commit/e5​471522485cdfdad332842077ccc2d05d4adde9
04:52 dalek book: c6e4555 | perlpilot++ | src/grammars.pod:
04:52 dalek book: [grammars] hopefully better explanations
04:52 dalek book: review: http://github.com/perl6/book/commit/c6​e45554441e11b53126150c130cc83b3ec92a11
05:00 LaVolta joined #perl6
05:06 testilbot left #perl6
05:06 testilbot joined #perl6
05:07 thowe joined #perl6
05:14 rurban left #perl6
05:15 f00li5h left #perl6
05:16 am0c^ joined #perl6
05:28 thowe left #perl6
05:29 * tylercurtis is glad some people liked his "given open(...) {...; .close}" example on Stack Overflow. (backlogging)
05:30 standz left #perl6
05:30 justatheory left #perl6
05:34 BillN1VUX left #perl6
05:39 f00li5h joined #perl6
05:41 cjk101010 joined #perl6
05:41 sorear good * #perl6
05:42 sorear diakopter: no
05:42 sorear diakopter: AICs in Java cannot access non-readonly variables from the outer scope
05:43 sorear which means that it's impossible for an AIC to close over a variable, and keeping variables on the heap is unneccessary
05:43 sorear AICs can only close over values, not variables
05:43 * tylercurtis wonders if it would discourteous of him to write a module named With.
05:48 f00li5h left #perl6
05:48 f00li5h joined #perl6
06:09 tylercurtis rakudo: { die 'foo'; LEAVE { say 'leaving'; } }
06:09 p6eval rakudo 5ac20e: OUTPUT«===SORRY!===␤LEAVE phaser not yet implemented at line 22, near " }"␤»
06:13 lucs left #perl6
06:14 rgrau_ left #perl6
06:20 lucs joined #perl6
06:23 cottoo left #perl6
06:23 cottoo joined #perl6
06:33 uniejo joined #perl6
06:44 dalek niecza: db99704 | sorear++ | src/Niecza/Actions.pm:
06:44 dalek niecza: Try to mitigate error cascades
06:44 dalek niecza: review: http://github.com/sorear/niecza/commit/d​b997045e147571ec8c7287a593b69ba6302ebd3
06:44 dalek niecza: 43d8d6e | sorear++ | / (2 files):
06:44 dalek niecza: Refactor trampoline for a couple more percent
06:44 dalek niecza: review: http://github.com/sorear/niecza/commit/4​3d8d6e6283d9981335baf56da3a57010ec1909f
06:58 sorear Can I assume that a Perl6 \n is always U+000A?
07:00 sorear oh, hmm
07:00 sorear "logical" newline
07:00 sorear argh I need clarifications on this
07:01 sorear what is a logical newline and how should I store one in a Str?
07:03 sorear TimToady: ping, S05
07:12 TimToady you should store it as a native newline for your platform
07:13 TimToady "strict in what you emit, liberal in what you match" is how \n works
07:13 mberends left #perl6
07:16 sorear Assuming I have a sequence of Unicode codepoints, what should \n mean?
07:16 sorear \cM?\cJ  ?
07:16 sorear * /\n/
07:16 Ross^ joined #perl6
07:17 TimToady on Unix it should produce a \x0A, but match any of \x0A, \x0D\x0A, and maybe \x0D by itself (assuming old mac hardward)
07:18 TimToady but CRLF should be only one \n, not two
07:18 TimToady on unix "\n" should be \x0A
07:18 TimToady on windows it probably depends on whether we're going with logical or physical representation
07:19 TimToady since historically Windows has stripped 0A from text files (but not binary files), I'd say you can probably get away with just \n there too
07:19 sorear Given that we're going with Unicode and ord('A') is the same on every platform, I think it would be nice to make /\n/ match the same set of strings everywhere
07:20 TimToady it does; it's supposed to match all customary newlines
07:20 TimToady a file mounted under samba or nfs should not care whether it has CRLF or just LF in it
07:21 TimToady the pattern \n matches either.
07:21 TimToady it's only the *character* \n that has to decide what's native, or consistent with what else is there, or whatever criterion it uses to decide
07:21 TimToady but I think LF is probably good enough for most purposes
07:23 TimToady and Perl 6 probably has less problem than Perl 5 here, since p6 distinguishes text strings from binary
07:24 TimToady so I think just putting \x0A into a text string is fine, if the platform supports translating text to binary on output, as windows professes to
07:25 TimToady in any case, I'd just as soon push in the direction of 1-char logical newlines, and see how much we can get away with
07:25 sorear Should Buf -> Str do any kind of newline mangling?
07:26 sorear Where do PARAGRAPH SEPARATOR and LINE SEPARATOR fit into this?
07:26 TimToady they are \v, but not \n, I think
07:26 TimToady to \n the pattern, it doesn't matter if we mangle or not
07:27 TimToady if we can get away with Str only containing logical newlines, I'd prefer that, so I'd be in favor of Buf->Str removing CR
07:28 sorear But \n should be tolerant of bad mangling and accept [ \x0A | \x0D | \x0D\x0A ]
07:28 sorear ?
07:28 TimToady yes, with LTM semantics
07:28 TimToady we can't control when foreign filesystems are mounted
07:29 TimToady and other sources may give us "strings" that don't have CR removed
07:30 Guest23195 joined #perl6
07:30 TimToady doubtless real life will intrude at some point and force us to provide pragmas and handle options, but a bit of pressure towards uniformity will prevent needless propagation of difference just because someone might be slightly invonvenienced at some point.
07:31 Ross^ left #perl6
07:31 TimToady in other words, we'll push the point a bit and see if anyone pushes back
07:32 TimToady as with much of the rest of Unicode, I'd just as soon keep the model clean as long as we can get away with it
07:33 TimToady other things want to filter out on input too, like BOMs.
07:33 tadzik joined #perl6
07:34 tadzik hello
07:34 TimToady o/
07:35 * TimToady goes to get ready for bed...
07:35 Mowah joined #perl6
07:36 sorear Does \x0D\x0A ever match \s or \v?
07:37 TimToady that would be two \s or two \v, by current reckoning
07:37 TimToady but only one \n
07:39 sorear "p\x0D\x0Ap" ~~ / p \n \n p /  ?
07:40 sorear :r?
07:40 TimToady no, wouldn't match
07:41 TimToady \n sees CRLF as an indivisible unit
07:42 TimToady I could argue that \n should be a superset of \v though, since it's any logical newline
07:42 TimToady that might be saner
07:43 TimToady then people wouldn't have to write /\n|\v/
07:45 sorear I think in the spirit of "push on this end" I'm going to munge all Postel newlines into U+000A on Buf->Str
07:45 sorear and see if anyone complains
07:46 TimToady I don't think people would like to lose information like paragraph separator though
07:46 TimToady those semantics *are* part of Unicode
07:47 TimToady so I'd rather keep form feeds etc in the buffer but provide something like \n that matches them all
07:47 TimToady s/buffer/string/
07:48 sorear I think \n should be simple newlines (0A 0D0A 0D) and \v should be the "catch all"
07:48 sorear \v would match a physical 0D0A because of the mangling
07:49 TimToady that's more or less the stataus quo, which is okay
07:50 sorear status quo re. 6 or 5?
07:50 TimToady 6
07:50 sorear ok
07:55 am0c^ left #perl6
08:00 * TimToady --> thunkstate &
08:01 masak joined #perl6
08:02 masak o hai!
08:02 moritz_ o/
08:02 LaVolta hi masak :)
08:02 masak hi LaVolta! long time no see.
08:03 LaVolta masak:  yea, I was finding myself a sysadmin intern (i know you can understand this...)
08:03 tadzik oh hai masak
08:04 Mowah left #perl6
08:05 masak LaVolta: yes, I know the feeling :)
08:05 sorear hello masak!
08:05 sorear hello LaVolta, do I know you?
08:05 LaVolta school days now finished...(and that is for my bad english :D)
08:05 dalek rakudo: 3f6392d | patrickas++ | src/core/operators.pm:
08:05 dalek rakudo: Avoid copying all of the lhs since we only need  elements off of it
08:05 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/3​f6392dd0b59f64dda5d8b421db3a8b2f8a29cb6
08:05 LaVolta sorear:  I guess...well...
08:05 LaVolta yes?
08:05 am0c^ joined #perl6
08:12 timbunce joined #perl6
08:13 IllvilJa joined #perl6
08:15 IllvilJa Just tried to send a msg to p6eval... got a sensible response.  Cool feature!
08:16 moritz_ \o/
08:16 IllvilJa o/
08:18 wamba joined #perl6
08:18 LaVolta is try.rakudo.org under heavy load?
08:20 moritz_ 10:19:01 up 45 days,  6:35,  1 user,  load average: 0.21, 0.45, 0.41
08:20 moritz_ not exactly "heavy load" :-)
08:20 masak do we get visitor statistics for try.rakudo.org?
08:21 moritz_ should be possible to arrange
08:21 masak phenny: ask supernovus mind adding http://github.com/supernovus/exemel to http://github.com/perl6/ecosys​tem/blob/master/projects.list ?
08:22 phenny masak: I'll pass that on when supernovus is around.
08:22 moritz_ we have an access.log file
08:22 masak supernovus++, by the way.
08:22 masak moritz_: would be interesting to plot trends, such as visitors by country over time.
08:22 masak moritz_: where is the access.log file?
08:23 LaVolta just a little bit slow here (2 minutes passed and nothing showed up in my broswer), but occasionally very fast
08:23 moritz_ feather3, /var/log/apache2/try.rakudo.org/access.log
08:23 masak kthx.
08:24 LaVolta and since the load's okay, let's blame the network...:(
08:25 sanemat joined #perl6
08:26 sanemat left #perl6
08:27 am0c^ left #perl6
08:28 moritz_ http://moritz.faui2k3.org/tmp/tryrakudo.html simple logs
08:29 masak moritz_++
08:30 masak has try.rakudo.org ever been announced in any sense? I mean, since ash_ fixed it to be the good version.
08:30 moritz_ notreally
08:31 masak rakudo: my @array = (3,8,2,9,3,8); @array >>+=>> 42; say ~@array; # via flussence++
08:31 p6eval rakudo 5ac20e: OUTPUT«Cannot modify readonly value␤  in '&infix:<=>' at line 1␤  in <anon> at line 204:CORE.setting␤  in 'hyper' at line 1␤  in 'hyper' at line 211:CORE.setting␤  in main program body at line 1␤»
08:31 sorear apparently someone found it on page 1 of google
08:31 sorear (not here)
08:31 masak <flussence> that's straight from S03...
08:31 * masak submits rakudobug
08:31 moritz_ ash_++ agreed to blog about it, but so far I haven't seen anything
08:31 masak I think it should also be in the next Rakudo Star announcement.
08:31 moritz_ maybe I should do it, exposure on planetsix would certainly help
08:32 masak moritz_: I think you should. I don't think ash_ will mind.
08:32 tadzik exemel seems pretty nice
08:33 dalek niecza: dadfba0 | sorear++ | / (5 files):
08:33 dalek niecza: Implement ^/^^/$/$$/<</>>
08:33 dalek niecza: review: http://github.com/sorear/niecza/commit/d​adfba0c193b905962c3376c94f4f9ea5675e322
08:34 dakkar joined #perl6
08:35 tylercurtis Good night, #perl6.
08:35 sorear I think 62 tests may have been a bit excessive for that
08:35 sorear I got carried away
08:35 * moritz_ doesn't think so
08:35 masak rakudo: $_ = "abc";                         say /a(b)c/ ?? 1 !! 0; say $0; # via Util++
08:35 p6eval rakudo 5ac20e: OUTPUT«1␤b␤»
08:35 masak rakudo: $_ = "abc"; my $re = regex {a(b)c}; say /$re/   ?? 1 !! 0; say $0;
08:35 p6eval rakudo 5ac20e: OUTPUT«1␤␤»
08:35 masak <Util> Why isn't $0 populated in the 2nd example?
08:35 masak I'm inclined to classify this as a bug.
08:35 moritz_ that's spec
08:35 moritz_ because /$re/ has no capture
08:35 moritz_ only $re has
08:35 masak oh, ok.
08:36 masak goodie. no ticket.
08:36 moritz_ and since we properly nest matches, it would have to be
08:36 tylercurtis left #perl6
08:36 moritz_ /<cap=$re>/ && say $<cap>[0]
08:38 thebird joined #perl6
08:42 daxim joined #perl6
08:45 masak nod.
08:46 masak ok, I have a Rakudo programmer question. the enums patch went in yesterday, but I couldn't make this work:
08:46 masak rakudo: enum A <b c d>; say A.WHAT
08:46 p6eval rakudo 5ac20e: OUTPUT«()␤»
08:46 masak how can I make it say 'A' or maybe 'A()'?
08:47 moritz_ rakudo: my $re = rx/ a(b)c /; say 'fooabced' ~~ /oo<cap=$re>/; say $<cap>[0]
08:47 p6eval rakudo 5ac20e: OUTPUT«ooabc␤b␤»
08:47 moritz_ \o/
08:47 moritz_ rakudo: enum A <b c d>; say A.PARROT
08:47 p6eval rakudo 5ac20e: OUTPUT«Perl6Scalar->␤»
08:47 moritz_ rakudo: say Int.WHAT
08:47 masak more specifically, how do I make the type object of an anonymous class print itself as something I want to print it as?
08:47 p6eval rakudo 5ac20e: OUTPUT«Int()␤»
08:48 am0c^ joined #perl6
08:48 masak hm, s/specifically/generally/
08:49 sorear when you find out, let me know
08:49 sorear stringifying type objects baffle me generally
08:49 moritz_ in rakudo, there's a role that's mixed into type objects
08:49 moritz_ which controls stringification
08:49 masak how? where?
08:50 moritz_ but I guess in the end it'll need to be method Str:U or so
08:50 sorear this is one of the things I need to extract from jnthn
08:50 moritz_ masak: not sure; I'm just parrotting what jnthn++ told me at YAPC::EU
08:50 masak also, I'm wondering whatever will happen if someone does A.new to an enum object.
08:50 shortcircuit is now known as Rosetta
08:51 Rosetta is now known as shortcircuit
08:51 masak moritz_: experiments with Str in the anon class yesterday weren't successful.
08:51 moritz_ masak: right, those will only be called on instances
08:51 masak huh?
08:51 moritz_ (as is currently; don't think that's spec)
08:51 masak rakudo: class A { method foo { "OH HAI" } }; say A.foo
08:51 moritz_ rakudo: class A { method Str { 'foo' } }; say ~A
08:52 masak rakudo: class A { method Str { "OH HAI" } }; say A.Str
08:52 p6eval rakudo 5ac20e: OUTPUT«(timeout)»
08:52 sorear Did someone diable p6eval echo to channel?
08:52 p6eval rakudo 5ac20e: OUTPUT«A()␤»
08:52 p6eval rakudo 5ac20e: OUTPUT«OH HAI␤»
08:52 masak rakudo: class A { method foo { "OH HAI" } }; say A.foo
08:52 p6eval rakudo 5ac20e: OUTPUT«OH HAI␤»
08:52 masak something fishy is happening there.
08:53 masak rakudo: class A { method Str { "OH HAI" } }; say A.WHAT
08:53 dalek niecza: d4e20e7 | sorear++ | / (5 files):
08:53 dalek niecza: Implement :my et al in regexes
08:53 dalek niecza: review: http://github.com/sorear/niecza/commit/d​4e20e76c91cb07d84dfdcdeb5cedbc058370b63
08:53 p6eval rakudo 3f6392: OUTPUT«A()␤»
08:53 sorear p6eval times out computations in real time
08:54 moritz_ masak: anyway, that's something to ask jnthn++ once he appears
08:54 masak phenny: tell jnthn! \o/
08:54 phenny masak: I'll pass that on when jnthn! is around.
08:55 masak *sigh*
08:55 masak phenny: tell jnthn ! \o/
08:55 phenny masak: I'll pass that on when jnthn is around.
09:02 redicaps joined #perl6
09:09 redicaps left #perl6
09:17 muixirt joined #perl6
09:20 moritz_ try.rakudo.org is unresponsive here :(
09:21 tadzik same here
09:22 tadzik http://downforeveryoneorjustme.com/try.rakudo.org
09:24 moritz_ phenny: ask ash_ what to do when try.rakudo.org is unresponsive - is there a way to restart the backend? if yes, how?
09:24 phenny moritz_: I'll pass that on when ash_ is around.
09:25 masak phenny++
09:29 am0c^ left #perl6
09:30 * moritz_ has a hard time getting used to not include [t/spec] in the roast commit messages :-)
09:32 daxim yo moritz_, when are you putting up the fixed mu repo?
09:33 sorear "fixed"?
09:33 daxim sorear, without svn-id crap and with proper committer ids
09:34 moritz_ daxim: not sure yet; $real-life takes its toll
09:34 daxim delegate.
09:34 daxim I did already the hard part
09:35 dalek modules.perl6.org: 6c8eff0 | moritz++ | web/index.tmpl:
09:35 dalek modules.perl6.org: update source location information
09:35 dalek modules.perl6.org: review: http://github.com/perl6/modules.perl6.org/com​mit/6c8eff06c307072729c52ff851f6e69a1aff91d5
09:36 moritz_ daxim: I think you removed too much; the svn revisions should be available in some form in the commit message
09:37 moritz_ because commit messages often refer to other svn revisions, and that leaves dangling pointers
09:38 moritz_ I thought you just wanted to remove the repo ID and URL
09:38 daxim better upgrade those to sha1, then
09:38 bpalmer` left #perl6
09:38 moritz_ that doesn't work for the p6l and p6c archives
09:39 daxim what's that now?
09:39 moritz_ mailing lists
09:41 daxim I see, I think it's still better to upgrade, legacy pointers can look up svn ids in a separately published mapping table
09:42 * moritz_ disagrees. The accuracy of meta data decreases with distance
09:43 daxim how can this possibly be true?  prove it
09:44 moritz_ it's easier to forget the mapping table if it's elswhere
09:44 moritz_ when you do a history rewrite
09:44 moritz_ (which is what we're doing at the moment)
09:44 sorear What could possibly be the point of separate publishing of svn ids?
09:44 wooden joined #perl6
09:45 daxim like he said, when a mail from a year ago refers to an svn id and you want to see which commit that would be in git
09:45 moritz_ then you grep through 'git log'
09:46 sorear The point of a VCS is to centralize metadata.
09:46 sorear That's why git has revision properties.
09:47 sorear Or are you just allergic to RFC-822 and everything that uses it?
09:47 daxim :-|
09:55 rgrau left #perl6
09:56 makkksimal how is the default destructor called?
09:57 moritz_ new
09:57 moritz_ TypeName.new(attribute => value, attrib2 => value2 )
09:59 tadzik destructor
09:59 moritz_ oh
09:59 * moritz_ can't read
09:59 moritz_ DESTROY
09:59 moritz_ but rakudo doesn't call it yet
09:59 * sorear out
10:00 tadzik how about END? :)
10:00 sorear it's unlikely the default destructor will ever be used as designed
10:00 sorear it's really a relic of a refcounted world and needs revision to deal with GCs
10:03 awwaiid left #perl6
10:03 QinGW left #perl6
10:04 am0c^ joined #perl6
10:05 makkksimal and i thought i might need another cup of coffee :). thanks for the info.
10:05 awwaiid joined #perl6
10:10 makkksimal so the way to destroy objects is to manually declare and call DESTROY()? at least it seems to do what i expected
10:11 moritz_ if you want all destructors to be called, use $obj.*DESTROY()
10:13 masak won't destructors potentially be called multiple times if they're called manually? I mean, the GC might get around to calling them too.
10:13 moritz_ masak: only if the GC actually calls them :-)
10:14 masak I find that way of programming slightly capricious.
10:14 masak oh well, I guess the DESTROY methods could be coded defensively to only do things once.
10:15 masak but it feels philosophically wrong to manually call a captital-letters submethod.
10:15 moritz_ that's what they call a workaround :-)
10:16 masak oh, I've heard of those. somewhere.
10:16 masak lunch &
10:18 tadzik rakudo: try { "foobar".index: "asd"; CATCH { say "ok" } }
10:18 p6eval rakudo 3f6392:  ( no output )
10:19 tadzik rakudo: "foobar".index: "asd"
10:19 p6eval rakudo 3f6392:  ( no output )
10:19 tadzik hmm, dies aloud in REPL
10:19 moritz_ because it tries to strinfiy the return value
10:19 moritz_ try
10:19 tadzik http://wklej.org/id/389208/
10:19 moritz_ "foobar".index: "asd"; 1
10:20 tadzik hmm
10:21 tadzik oh-key
10:21 Mowah joined #perl6
10:23 osfameron left #perl6
10:25 moritz_ which document should spec the default metaclass API? S12? or a new document?
10:28 LaVolta bye #perl6, see you tomorrow
10:28 LaVolta left #perl6
10:35 aesop left #perl6
10:36 Zapelius joined #perl6
10:37 cmadsen1 joined #perl6
10:37 kst` joined #perl6
10:37 cmadsen left #perl6
10:39 wooden left #perl6
10:39 kst left #perl6
10:39 aesop joined #perl6
10:40 wooden joined #perl6
10:42 Zapelius I have a debian sid installation that at some point just started to return "This Parrot cannot read bytecode files with version 8.2." at any attempt to run perl6
10:42 Zapelius meanwhile the same version/checkout works fine on osx
10:42 Zapelius It started ~1-2months ago and still exists with rakudo compiled just a few moments ago (updating debian/linux now in background)
10:44 gfldex Zapelius: how did you install rakudo?
10:44 Zapelius git + svn checkout
10:45 gfldex find parrot_install/ and remove it
10:45 gfldex then rebuild
10:45 Zapelius ok, thanks
10:51 am0c^ left #perl6
10:54 am0c^ joined #perl6
10:59 Zapelius works now :)
11:01 gfldex :)
11:09 envi^home joined #perl6
11:18 constant left #perl6
11:21 constant joined #perl6
11:21 constant left #perl6
11:21 constant joined #perl6
11:41 testilbot left #perl6
11:43 REPLeffect left #perl6
11:44 am0c^ left #perl6
11:45 s1n left #perl6
11:47 nadim left #perl6
11:49 nadim joined #perl6
12:00 satyavvd left #perl6
12:05 tadzik left #perl6
12:05 moritz_ anybody happens to know which ticket tracks CATCH { die() } recursing infinitely?
12:06 masak I can find it for you.
12:06 moritz_ that would be nice, as an additional reference for http://www.perlmonks.org/?node_id=860206
12:07 moritz_ http://rt.perl.org/rt3/Tic​ket/Display.html?id=63430 seems similar
12:07 masak moritz_: ok, I found three. you'll have to decide if anyone of them applies: http://rt.perl.org/rt3/Tic​ket/Display.html?id=68728 http://rt.perl.org/rt3/Tic​ket/Display.html?id=64262 http://rt.perl.org/rt3/Tic​ket/Display.html?id=63430
12:10 jferrero joined #perl6
12:10 moritz_ masak: thanks. It's the second that describes it best, and I've re-opened it because the test fails
12:11 masak moritz_++
12:11 moritz_ I remember that the patch which "fixed" it was reverted
12:11 moritz_ because pmichaud++ said it caused other trouble, and it's the wrong fix anyway
12:11 moritz_ or something like that
12:14 lamstyle joined #perl6
12:21 toebu joined #perl6
12:22 toebu from a class  method, how do I call the same method in the parent class ?
12:22 sftp joined #perl6
12:23 moritz_ of which parent class are you talking? there could be several
12:23 moritz_ in general you want nextwith($signature) or nextsame(), thought it's not always a method from a superclass
12:24 takadonet morning all
12:25 masak takadonet: \o
12:26 Italian_Plumber joined #perl6
12:28 toebu reading up on nextwith
12:31 toebu thanks ... callsame was what I was looking for ...
12:33 bluescreen joined #perl6
12:34 am0c^ joined #perl6
12:38 patspam joined #perl6
12:41 plainhao joined #perl6
12:43 am0c^ left #perl6
12:56 pmichaud good morning, #perl6
12:57 moritz_ good morning, pm
12:58 takadonet pmichaud: morning
12:59 masak morning greetings, pmichaud
12:59 daemon joined #perl6
13:01 pmichaud I might be able to fix (or at least provide a workaround for) RT #64262.
13:02 awwaiid left #perl6
13:06 moritz_ that would be greatly appreciated
13:06 pmichaud I'm trying to think if there's an easy way to detect "am I already in this block's dynamic scope?"
13:07 pmichaud without looking up the caller chain
13:12 satyavvd joined #perl6
13:12 Kodi joined #perl6
13:12 jhuni left #perl6
13:15 mathw pmichaud: sub am-in-this-blocks-dynamic-scope(Block $b --> Bool) { return (Bool::True, Bool::False).pick(1); }
13:15 pmichaud mathw: :)
13:16 masak mathw: Bool.pick
13:16 masak rakudo: enum A <b c d e>; say A.pick
13:16 p6eval rakudo 3f6392: OUTPUT«Use of uninitialized value in numeric context␤Use of uninitialized value in numeric context␤␤»
13:16 moritz_ rakduo: say ~Bool.pick for ^10
13:16 masak :(
13:16 moritz_ rakudo: say ~Bool.pick for ^10
13:16 p6eval rakudo 3f6392: OUTPUT«Bool()␤Bool()␤Bool()␤Bool()␤Bool​()␤Bool()␤Bool()␤Bool()␤Bool()␤Bool()␤»
13:17 masak ENYI
13:17 Patterner left #perl6
13:17 moritz_ since Bool isn't a proper enum, I guess it must be added by hand for now
13:18 * mathw giggles
13:18 Psyche^ joined #perl6
13:18 Psyche^ is now known as Patterner
13:18 mathw pmichaud: or did you want correctness too?
13:18 pmichaud augment class Bool { method pick(...) { (Bool::True, Bool::False).pick(...) }
13:19 moritz_ pmichaud: that's what I'm writing right now :-)
13:19 moritz_ except that I don't see the need to fully qualify True and False
13:20 mathw I'm fairly sure last time I checked Rakudo required that, but that was aaaages ago
13:20 mathw so hopefully it doesn't now
13:20 moritz_ rakudo: say True
13:20 p6eval rakudo 3f6392: OUTPUT«1␤»
13:21 mathw Anybody want to do a firewalk? Proximity to Nottingham, UK is a plus :)
13:22 colomon firewalk?
13:22 masak mathw: I think you're confusing #perl6 with #myfeet_ow_ow_ow
13:22 * moritz_ only knows firewalls
13:24 mathw I have accomplished my task
13:24 mathw I asked...
13:24 mathw ;)
13:24 timbunce_ joined #perl6
13:25 mathw Got two people from work coming
13:25 mathw Should start on local friends. Is a first date too early to invite someone to something that crazy? :D
13:25 masak mathw: someone at work asked you to make someone from #perl6 do a firewalk?
13:25 mathw masak: no it's something my aikido school is doing, they want us to invite everyone, so I did
13:25 masak :)
13:26 timbunce left #perl6
13:26 timbunce_ is now known as timbunce
13:26 masak mathw: a firewalk on a first date sounds like something I'd like to try sometime.
13:26 mathw I didn't say do the actual walk on a first date...
13:26 mathw but it would be different
13:27 mathw which reminds me, they announced the appointment of a new full-time staff member at the dojo - on his first day, they're throwing him out of an aeroplane
13:27 mathw I'd have wanted to start a week later if it was me...
13:27 masak tough first day.
13:27 moritz_ rakudo: my $x = enum <a b c>; say $x.pick.perl
13:27 p6eval rakudo 3f6392: OUTPUT«"b" => 1␤»
13:27 masak \o/
13:27 mathw but maybe it's a condition of employment or something :)
13:27 mathw masak: \o/
13:28 moritz_ is that spec? that it returns a Pair?
13:28 masak I don't think so.
13:28 moritz_ rakudo: my $x = enum A <a b c>; say $x.pick.perl
13:28 masak I think it should stringify.
13:28 p6eval rakudo 3f6392: OUTPUT«Use of uninitialized value in numeric context␤Use of uninitialized value in numeric context␤()␤»
13:28 mathw named enums are still weird
13:28 moritz_ rakudo: my $x = enum A <a b c>; say $x
13:28 p6eval rakudo 3f6392: OUTPUT«()␤»
13:28 masak moritz_: oh wait. you did it on an anon enum.
13:28 masak moritz_: then it's spec.
13:29 moritz_ uh. Named and anonymous differ?
13:29 masak yes.
13:29 moritz_ when calling .pick on it?
13:29 mathw well there's no name for the element
13:29 masak moritz_: I don't know about that.
13:29 masak moritz_: it's a very good question.
13:29 masak let's find out.
13:29 moritz_ mathw: huh? it's not the elements that are anonymous
13:30 masak according to the spec, an anon enum is basically an EnumMap.
13:30 muixirt some spec tests run "forever"
13:30 moritz_ muixirt: some take long. 'make quicktest' excludes those
13:30 moritz_ at least on my machine none actually loops
13:31 mathw moritz_: an anonymous enum exports its elements into the scope? hmm
13:31 moritz_ mathw: that's not what I said
13:31 mathw but then I don't really see why you'd have anonymous enums in the first place so I'll just go hide over there ->
13:31 muixirt moritz_: more than 15 min?
13:32 moritz_ muixirt: don't think so
13:32 moritz_ muixirt: is your copy of t/spec still an svn repository?
13:32 moritz_ muixirt: if so, you have outdated tests, and should rm -rf t/spec/. Then the next spectest run will check out the new git repo with newer tests
13:33 muixirt moritz_: oops!
13:33 moritz_ we should really have a fatal error in 'make spectest' if t/spec/ is svn
13:33 moritz_ muixirt: you're not the first one :-)
13:34 muixirt thanks moritz_
13:36 Zapelius left #perl6
13:37 moritz_ it's the changed series tests that hang
13:38 zulon joined #perl6
13:39 moritz_ well, spec and implementation changed, but the tests in pugs svn did not
13:41 muixirt perl6 is a fast moving target for the occational lurker :-)
13:42 masak muixirt: that's why it's important to get involved.
13:42 moritz_ well, the repo move was much faster than planned :(
13:44 * Kodi is grateful for the switch to Git, though.
13:45 moritz_ it does make some things easier
13:45 moritz_ actualy I'm surprised how little fallout it caused so far
13:47 masak for some reason, nowadays when I read people saying "I'm surprised", I parse it as "I'm disappointed". that tends to make previously optimistic utterances a bit odd.
13:49 dalek roast: d94794a | moritz++ | S32-io/note.t:
13:49 dalek roast: unfudge .note test for rakudo
13:49 dalek roast: review: http://github.com/perl6/roast/commit/d9​4794aee2ae01a1f1b5ff372ae59c366f34efef
13:50 dalek rakudo: a15b2b1 | moritz++ | src/core/Bool.pm:
13:50 dalek rakudo: implement Bool.pick
13:50 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/a​15b2b1c6f6911305f101de639f61da8d8fb77d5
13:50 dalek rakudo: 52bf6f3 | moritz++ | docs/ChangeLog:
13:50 dalek rakudo: update ChangeLog
13:50 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/5​2bf6f376d498565be353d657c23ed599a22eb7a
13:51 pmichaud ....why is the first argument to .pick constrained to Cool?
13:52 moritz_ because we know how to use Cool objects as numbers
13:52 moritz_ as integers, to be exact
13:52 pmichaud we wouldn't accept any non-Cool number, even if it knows how to do operate properly with math ops?
13:52 moritz_ class A { }; (1..10).pick(A.new) # what should that do, if not dispatch fail?
13:53 moritz_ pmichaud: if we had the Integer role, we'd probably have a candidate that accepts Integers
13:53 icwiener joined #perl6
13:54 moritz_ (1..10).pick(Matrix.new(2, 5)) # huh?
13:54 pmichaud I agree it should fail, I'm not sure it should be a dispatch fail.
13:55 masak why not?
13:55 pmichaud do we also have a version of .pick that takes a Numeric argument?
13:55 moritz_ I wouldn't know how to implement that
13:55 moritz_ <a b c>.pick(2.3 + 4i) # huh?
13:56 pmichaud my preference would be to do something like
13:56 pmichaud method pick($n as Int = 1, ...) { ... }
13:56 pmichaud and then let the coercion to Int fail
13:56 moritz_ rakudo: say (2.3 + 4i).Int
13:56 p6eval rakudo 3f6392: OUTPUT«You can only coerce a Complex to Real if the imaginary part is zero␤  in 'Int' at line 1␤  in main program body at line 22:/tmp/wUOI1oskvQ␤»
13:56 moritz_ rakudo: class A { }; say +A
13:56 p6eval rakudo 3f6392: OUTPUT«Use of uninitialized value in numeric context␤0␤»
13:56 moritz_ rakudo: class A { }; say A.Int
13:57 p6eval rakudo 3f6392: OUTPUT«Method 'Int' not found for invocant of class ''␤  in main program body at line 22:/tmp/XL5mQ69zwz␤»
13:57 moritz_ rakudo: say Whatever ~~ Cool
13:57 p6eval rakudo 3f6392: OUTPUT«0␤»
13:57 moritz_ oh.
13:57 moritz_ so the Cool case doesn't allow *
13:57 pmichaud that too
13:58 pmichaud it just feels like an incorrect constraint.
13:59 colomon Spec says .pick takes Int, for what that's worth
13:59 pmichaud Spec is wrong.
13:59 pmichaud @list.pick('3')   should work.
14:00 masak hehe: http://twitter.com/rhruiz/status/24566110570 http://twitter.com/carlmasak/status/24566424988 http://twitter.com/rhruiz/status/24571541080 http://twitter.com/carlmasak/status/24572006873
14:00 masak pmichaud: I agree.
14:00 gottreu so spectest works for rakudo, but not the rakudo star distribution?
14:01 moritz_ masak++
14:01 masak :)
14:01 pmichaud gottreu: I think that the spectest that rakudo star uses isn't sync'd.
14:01 pmichaud i.e., rakudo star currently grabs the latest copy of spectests, which may have changed since the time of the release.
14:02 pmichaud (and since spectests are no longer available via svn, it's definitely broken)
14:02 moritz_ just a quick reminder for all rakudo developers: remember to update docs/ChangeLog when you implement a nice feature, or add a singificant speedup or so
14:02 moritz_ lowers the burden on the release manager
14:03 dalek rakudo: 15c3f75 | moritz++ | src/core/Bool.pm:
14:03 dalek rakudo: remove Cool type constraint from Bool.pick
14:03 dalek rakudo:
14:03 dalek rakudo: It doesn't allow a Whatever-star, so it's certainly wrong. It now let the
14:03 dalek rakudo: re-dispatch to Parcel.pick do the type check or coercion, if any.
14:03 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/1​5c3f75925542a5d6e9eb4bcf7a0e75e8af49406
14:03 pmichaud moritz++  # much better to let Parcel.pick handle it
14:04 moritz_ pmichaud++ # convincing me that it's better that way :-)
14:04 colomon do we not have tests for .pick(*), or were the tests fudged?
14:05 moritz_ colomon: I just added Bool.pick
14:05 moritz_ if we had tests for it, we didn't run them
14:06 colomon ah!
14:06 colomon rakudo: say (1..10).pick(*).munch(10).perl
14:06 p6eval rakudo 3f6392: OUTPUT«(10, 9, 6, 8, 5, 3, 2, 7, 4, 1)␤»
14:06 colomon rakudo: say (1..10).pick(*, :replace).munch(10).perl
14:06 moritz_ only infinite with :replace
14:06 p6eval rakudo 3f6392: OUTPUT«(7, 3, 2, 7, 7, 4, 6, 8, 8, 9)␤»
14:06 colomon rakudo: say (1..10).pick(*, :replace).munch(20).perl
14:07 p6eval rakudo 3f6392: OUTPUT«(7, 7, 8, 6, 9, 4, 8, 5, 10, 10, 9, 5, 8, 8, 10, 5, 4, 5, 2, 10)␤»
14:07 aloha left #perl6
14:07 bacek left #perl6
14:07 colomon ah.
14:08 colomon so you created the problem and then fixed it, too.  :)
14:08 moritz_ right
14:09 uniejo left #perl6
14:10 bluescreen left #perl6
14:10 colomon pmichaud: any idea if progress has been made getting the parrot profiler to run on rakudo again?
14:11 pmichaud colomon: afaik, no progress.
14:11 jnthn o/
14:11 phenny jnthn: 08:55Z <masak> tell jnthn ! \o/
14:11 agentzh left #perl6
14:11 jnthn ...informative message is informative... :-)
14:12 aloha joined #perl6
14:12 masak jnthn: um. anon classes! stringification! how?
14:12 jnthn Same as normal classes, no?
14:13 masak how how how? :)
14:13 jnthn rakudo: my $c = class { method Str() { "lol" } }; say ~$c.new
14:13 p6eval rakudo 3f6392: OUTPUT«lol␤»
14:13 jnthn There.
14:13 moritz_ jnthn: not objects, classses
14:13 jnthn oh
14:13 moritz_ rakudo: my $c = class { method Str() { "lol" } }; say ~$c
14:13 p6eval rakudo 3f6392: OUTPUT«()␤»
14:13 masak :(
14:13 dalek 6model: 5ed61d6 | jnthn++ | parrot/src/metamodel/repr.h:
14:13 dalek 6model: All methods in the representation API should get PARROT_INTERP.
14:13 dalek 6model: review: http://github.com/jnthn/6model/commit/5​ed61d659e0cbadede01b1e31792810d49df8b3e
14:13 dalek 6model: 05a08a5 | jnthn++ | parrot/src/metamodel/repr.h:
14:13 dalek 6model: Fix pointer-o.
14:13 dalek 6model: review: http://github.com/jnthn/6model/commit/0​5a08a5c0dacdad996a234e4931a3906ded119e3
14:13 dalek 6model: b6d5448 | jnthn++ | parrot/src/metamodel/reprs/KnowHOW. (2 files):
14:13 dalek 6model: Start to stub out KnowHOWREPR in the Parrot implementation.
14:13 dalek 6model: review: http://github.com/jnthn/6model/commit/b​6d54482a310a8512cb1c4ec62dabbf56ce3714d
14:13 dalek 6model: e86a007 | jnthn++ | java/ (18 files):
14:13 dalek 6model: Merge branch 'master' of github.com:jnthn/6model
14:13 dalek 6model: review: http://github.com/jnthn/6model/commit/e​86a0076f458a875773d4468d566c820b05cc9fa
14:13 masak pmichaud: that must've been why I did .new on the anon class in my enums patch.
14:13 jnthn Well, you can't at the moment.
14:14 jnthn Well, you can if you manually put it together with ClassHOW
14:14 jnthn Anyway, that's one thing that'll be fixed in the new meta-model
14:14 jnthn Basically
14:14 pmichaud I don't understand "anon class stringification"
14:14 jnthn method Str() { "loll" } # objects and classes stringify to lol
14:15 jnthn method Str($?CLASS:D) { "loll" } # objects stringify to lol
14:15 jnthn And :U just to set how the type object does
14:15 jnthn pmichaud: s/class/type object/
14:15 pmichaud that I understand a bit better, yes.
14:16 jnthn But at the moment there's not a way to twiddle it by overriding Str
14:16 jnthn (for type objects)
14:16 jferrero left #perl6
14:16 jnthn 'cus of the role mixin thingy we do.
14:16 jnthn (That's one thing that the new meta-model impl drops)
14:17 masak so essentially, there's no way to do that right just now.
14:17 jnthn no
14:17 jnthn Not without using ClassHOW directly.
14:17 masak wonder if there's any easy workaround.
14:18 dalek roast: d71f4c3 | moritz++ | S02-builtin_data_types/bool.t:
14:18 dalek roast: Bool.pick
14:18 dalek roast: review: http://github.com/perl6/roast/commit/d7​1f4c3086d509ed7d616bbae88a1616e092c734
14:20 bacek joined #perl6
14:20 satyavvd left #perl6
14:21 jnthn pir::setattribute($c.HOW, 'shortname', $name) # may work, but WILL break when the new meta-model lands.
14:22 masak ok.
14:22 masak will try. thanks.
14:23 jnthn np
14:24 bluescreen joined #perl6
14:25 alksentrs joined #perl6
14:25 patrickas joined #perl6
14:25 patrickas o/
14:25 patrickas masak++ hug-a-troll
14:25 moritz_ \o patrickas
14:26 patrickas moritz_++ thanks for the suggestion yesterday!
14:27 timbunce is there a url for a smolder instance running the perl6 test suite?
14:28 moritz_ timbunce: http://tinyurl.com/rakudosmoke before it broke down
14:28 moritz_ patrickas: http://www.perlfoundation.org/​contributor_license_agreement
14:28 patrickas moritz_ I printed but got surprised it had to be mailed not faxed
14:29 timbunce moritz_: oh, pity. Thanks. Any plans for it to be revived?
14:29 moritz_ timbunce: I don't know of any, and I'm too busy with other stuff atm
14:33 alester joined #perl6
14:35 masak stuff--
14:37 spq1 joined #perl6
14:39 jnthn train change time, bbl
14:39 yoasif left #perl6
14:43 timbunce left #perl6
14:43 timbunce joined #perl6
14:47 masak S32 is being deliberately vague on what -M will end up being called in Perl 6. just that it'll be a method.
14:48 masak I guess I don't even need to ask whether it's OK if I just implement it as some method and ask forgiveness later? :)
14:48 jaldhar left #perl6
14:48 masak I haz a need for it. it would speed up my static website generator.
14:48 moritz_ masak: what part of "forgiveness > permission" did you not understand? :-)
14:48 masak moritz_: I guess I deserved that :)
14:49 * TimToady gives masak permission before he asks for forgiveness, just to mess things up
14:49 risou joined #perl6
14:49 masak whoa. so now I essentially have *both* permission and a cultural promise of forgiveness? groovy.
14:50 TimToady it's not exactly an indulgence
14:50 masak :D
14:51 TimToady I wish there was something shorter than age-in-days-since-modification
14:51 yoasif joined #perl6
14:51 moritz_ masak: you have permission, and are encouraged to ask for forgiveness
14:51 pmichaud 'untouched-since'
14:51 TimToady that would return a date, not an age
14:51 pmichaud right
14:51 pmichaud I'm just branestormin
14:51 moritz_ hey, we have Durations now
14:52 masak there's already a 'modifytime' method in IO::Stat.
14:52 masak someone++
14:52 moritz_ just have it return an Instant
14:52 masak nod.
14:52 pmichaud 'staleness'
14:52 * masak makes it so
14:52 pmichaud 'freshness'
14:52 TimToady bugs me that modify is a verb
14:52 masak 'age'
14:53 pmichaud age implies "since birth", not "since change" though
14:53 moritz_ age refers to creation, not modification
14:53 TimToady since mod is the usual one, we could give that the Huffman nod
14:53 masak 'lastmod'
14:53 TimToady again, seems to imply a date
14:53 pmichaud 'touchage'
14:53 pmichaud 'modage'
14:53 pmichaud 'agemod'
14:54 masak 'touchmod'
14:54 TimToady at one point we had mage, cage, and uage
14:54 moritz_ TimToady: I don't see why we shouldn't return an Instant
14:54 moritz_ but rather a time difference
14:54 moritz_ that way we also avoid the clumsy since-start-of-script thing
14:54 justatheory joined #perl6
14:54 masak +1
14:55 pmichaud .created, .modified, .accessed
14:55 TimToady if you want to compare two ages, they have to share the same "epoch"
14:55 masak we have a winner.
14:55 masak pmichaud++
14:55 TimToady those are fine for returning the instant
14:56 masak that's all I need.
14:56 moritz_ TimToady: I don't see a problem with needing a common Epoch
14:56 pmichaud age is then    now - .created, yes?
14:56 TimToady that's bad
14:56 masak ooc, what's the difference between 'modifytime' and 'changetime' in IO::Stat?
14:57 TimToady ctime is when the inode changed, such as for a chmod
14:57 TimToady mtime doesn't track that
14:58 TimToady you can't calculate in terms of age if now is different between the two .modified calls
14:58 TimToady that's why P5 bases -M on the start time of the script
14:59 TimToady "foo".mod-age == "foo".mod-age  would be false
14:59 masak I can see the merit in basing .age on the start of the script.
14:59 TimToady that being said, ages were mostly in there for emulating find(1)
15:00 Kodi left #perl6
15:00 moritz_ don't forget those .IO methods :-)
15:00 masak I'm on it.
15:00 masak the use case I have right now only needs to compare Instants.
15:00 moritz_ access time must die!
15:00 masak basically, I only want to regenerate/upload things if the files compare in such a way that it turns out to be necessary.
15:01 masak moritz_: sorry, what?
15:01 TimToady eh? I use access time all the time
15:01 TimToady well, some of the time :)
15:01 TimToady every now and then...
15:02 masak practically never.
15:02 moritz_ masak: access time stores the last time somebody opens or reads a file
15:02 masak rakudo: say "README".IO.stat.modifytime # can someone tell me how to go from this to an Instant?
15:02 moritz_ masak: which means that every read access also causes a write access. Yow.
15:02 p6eval rakudo 15c3f7: OUTPUT«1284330623␤»
15:03 masak moritz_: that sounds... less than optimal. :/
15:03 moritz_ masak: it is. Which is why I say it must die :-)
15:03 TimToady it's cached in memory most of the time
15:03 moritz_ except when not :-)
15:04 TimToady ignorance is not always bliss
15:04 masak Instant.from-posix ? is that a POSIX time I have above?
15:04 masak if so, it's pretty easy :)
15:05 moritz_ masak: I'd say try it out, and comare with the time that ls -l shows
15:05 masak hokay.
15:05 TimToady I think the main thing we need to do is make sure we've recorded the script start Instant somewhere
15:05 masak even if it's not strictly correct, it'll yield an Instant and probably work for my use case. :P
15:06 masak TimToady: you could always spec it to be that way... :)
15:06 TimToady if I always do that then I'll never do anything else :P
15:06 masak bah, overgeneralization.
15:07 TimToady besides, it's already specced
15:07 masak oh!
15:07 TimToady S28:202
15:07 TimToady rakudo: say $*INITTIME
15:07 p6eval rakudo 15c3f7:  ( no output )
15:08 pmichaud it can be added.
15:08 TimToady well, shouldn't be human readable output anyway
15:08 moritz_ rakudo: say now
15:08 p6eval rakudo 15c3f7: OUTPUT«(DateTime.new(year => 1970).Instant + 1284561988.27251)␤»
15:08 pmichaud "There will be patches."
15:08 moritz_ rakudo: say now + 1
15:08 p6eval rakudo 15c3f7: OUTPUT«Too many positional parameters passed; got 1 but expected 0␤  in 'now' at line 6306:CORE.setting␤  in main program body at line 22:/tmp/Tpz0MMnJI7␤»
15:08 moritz_ std: now ~~ 1
15:08 p6eval std : OUTPUT«ok 00:01 116m␤»
15:09 moritz_ it's parsed as a term
15:09 moritz_ so we should do that too :-)
15:09 moritz_ std: now()
15:09 p6eval std : OUTPUT«[31m===[0mSORRY![31m===[0m␤Undeclared routine:␤   'now' used at line 1␤Check failed␤FAILED 00:01 114m␤»
15:09 pmichaud now patching 'now', 'time', etc.
15:09 TimToady std: now now
15:09 p6eval std : OUTPUT«[31m===[0mSORRY![31m===[0m␤Two terms in a row at /tmp/BUKw3gaf3q line 1:␤------> [32mnow [33m⏏[31mnow[0m␤    expecting any of:␤     bracketed infix␤  infix or meta-infix␤      statement modifier loop␤Parse failed␤FAILED 00:01 116m␤»
15:11 pmichaud std: there there
15:11 p6eval std : OUTPUT«[31m===[0mSORRY![31m===[0m␤Undeclared routine:␤   'there' used at line 1,1␤Check failed␤FAILED 00:01 115m␤»
15:11 TimToady std: constant there = 42; there there
15:11 p6eval std : OUTPUT«[31m===[0mSORRY![31m===[0m␤Two terms in a row at /tmp/1RzyGFsIQv line 1:␤------> [32mconstant there = 42; there [33m⏏[31mthere[0m␤    expecting any of:␤    bracketed infix␤  infix or meta-infix␤      statement modifier loop␤Parse failed␤FAILED 00:01 117m␤»
15:20 pmichaud std: rand()
15:20 p6eval std : OUTPUT«[31m===[0mSORRY![31m===[0m␤Unsupported use of rand(); in Perl 6 please use rand at /tmp/qbDg6wWYrS line 1:␤------> [32mrand[33m⏏[31m()[0m␤Parse failed␤FAILED 00:01 114m␤»
15:20 pmichaud std: time()
15:20 p6eval std : OUTPUT«ok 00:01 114m␤»
15:20 pmichaud hmmmm.
15:21 pmichaud stdbug?
15:21 TimToady what is this "time" of which you speak?
15:21 pmichaud =head1 C<time>
15:21 pmichaud Returns the current POSIX time as an C<Int>. Use C<now> for an
15:21 pmichaud epoch-agnostic measure of atomic seconds (i.e., an C<Instant>).
15:21 pmichaud (S32)
15:21 pmichaud Saying C<time()> doesn't work unless you happen to have a function
15:21 pmichaud of that name defined.
15:22 TimToady hmm
15:22 pmichaud and STD.pm6 defines  term:sym<time>
15:22 rindolf joined #perl6
15:22 TimToady overridden by CORE, it seems
15:23 TimToady not sure which way is better to fix it
15:23 TimToady people are used to writing time()
15:23 masak "overridden by CORE" sounds like a deus-ex-machina happy ending to a budget-style animated adventure.
15:24 TimToady the master cylinder would like to have a word with you backstage
15:24 masak dang! foiled again. I'll get you next time, CORE!
15:25 TimToady and we'd kinda like to discourage casual use of time() anyway
15:26 pmichaud We can always define time() as   sub time() { fail 'What is this "time" of which you speak?" }
15:26 pmichaud s/k."/k.'/
15:26 pmichaud er
15:26 pmichaud nm.
15:26 TimToady Failure()
15:27 TimToady I guess I'll leave time as a term for now.
15:27 rindolf TimToady: what we will write now instead of time() ?
15:27 pmichaud rindolf: yes.
15:27 pmichaud :-)
15:28 rindolf pmichaud: my $timestamp = yes()?
15:28 rokoteko rindolf: now. :)
15:28 pmichaud rindolf: my $timestamp = now;
15:28 pmichaud exactly as you said :)
15:28 rindolf pmichaud: ah.
15:28 rindolf pmichaud: well, that's not what I meant.
15:28 pmichaud "we will right <now> instead of <time()>"  :-P
15:28 pmichaud *write
15:28 pmichaud grrr
15:29 rindolf I meant what will we write for Perl 6 instead of Perl 5's time() ?
15:29 pmichaud right.
15:29 TimToady I have deleted time() from STD's CORE
15:29 pmichaud and we will write "now"  :)
15:29 TimToady so it's now a term, and we'll rely on the huffmanization of now to encourage its use
15:29 pmichaud and time() will fail with "Undeclared routine"?
15:30 TimToady yes
15:30 TimToady maybe we should have a mandatory warning if they say 'use POSIX;'  :)
15:30 masak four new IO methods added. I already know that .modified works for my purposes.
15:31 TimToady Instant success.
15:31 TimToady 1) Profit!!!
15:31 pmichaud Instant gratification :)
15:31 TimToady wait, shouldn't that be 0) Profit!!!  ?
15:32 masak 哈哈
15:32 pmichaud my Instant $coffee;     # when we get our break
15:33 TimToady 吼吼
15:33 TimToady or maybe 齁齁
15:33 Holy_Cow joined #perl6
15:35 Ross^ joined #perl6
15:35 dalek rakudo: 5507cf6 | masak++ | src/core/IO.pm:
15:35 dalek rakudo: [core/IO] created/modified/accessed/changed methods
15:35 dalek rakudo:
15:35 dalek rakudo: Not spec yet, but the spec sounded very non-committal, and I need those
15:35 dalek rakudo: methods now. :)
15:35 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/5​507cf6e7c61c58d559dfeffc05b0ff3f104a304
15:35 masak just to make moritz_ happy, I'll add them to the ChangeLog too :)
15:40 TimToady I think .pick(..., :replace) should die because its semantics are just too different from .pick, and it's too unweildy for a common case
15:40 cjk101010 left #perl6
15:40 masak TimToady: I'd hate to see it die before we have an alternative that's clearly better.
15:40 TimToady we can certainly support :replace while we replace it
15:40 TimToady I'm not that picky
15:41 masak TimToady++ # groan
15:43 flussence .grab?
15:43 TimToady no, that's the mutable pick
15:45 gottreu .swap ?
15:45 aesop left #perl6
15:46 TimToady .repick maybe
15:46 TimToady and defaults to .repick(*)
15:46 masak I'd like a nice verb that already exists.
15:46 TimToady .multipick
15:47 masak that already exists.
15:47 pmichaud .nitpick
15:47 masak :)
15:47 masak .pick is nice because you feel that it doesn't put things back.
15:47 Kodi joined #perl6
15:47 wolverian left #perl6
15:47 masak some verb that indicates that you put things back would be the best.
15:47 dalek rakudo: 323a672 | masak++ | docs/ChangeLog:
15:47 dalek rakudo: [ChangeLog] new IO methods
15:47 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/3​23a672ffe4d7cd54977d7dc8e9be25bde29a6b1
15:47 pmichaud or some verb that indicates you select without taking
15:47 TimToady it's a pretty complicated action to find a verb for
15:47 TimToady yes, that's more likely
15:48 masak .choose
15:48 pmichaud i.e., ignore the "put it back" -- it's more along the lines of "identify an element of the set but leave it there"
15:48 masak .pick and .choose :)
15:48 gottreu .exchange ?    .interchange?  .substitute?
15:48 TimToady I could live with .choose :)
15:48 masak \o/
15:48 masak it's Strangely Consistent!
15:48 pmichaud a court judge (with a think hispanic accent) once asked me on the witness stand if I knew the difference between "pick" and "choose"
15:48 kst` is now known as kst
15:48 pmichaud he said that "pick" is where you select from a group, and "choose" is what you wear on your feet.
15:48 masak pmichaud: hahahaha
15:49 TimToady .oO(Texans...)
15:49 pmichaud *thick hispanic accent
15:49 pmichaud my typing has gone sooooo far downhill over the last few years.  :(
15:49 pmichaud I blame Perl 6.  :)
15:50 pmichaud of course, it's also in the court transcript that the judge thought I was thirteen years old at the time (I was twenty-six)
15:51 supernovus joined #perl6
15:51 masak TimToady: I don't think .choose should have * as the default if .pick has 1 as the default.
15:51 TimToady I think that's a foolish consistency
15:51 flussence wait, what's Array.rand?
15:52 flussence oh, indexes
15:52 aesop joined #perl6
15:52 TimToady ja
15:52 flussence the floating-point numbers were confusing me for a minute
15:52 masak TimToady: what's your reason for having the default of .choose be * ?
15:53 TimToady I don't want people using argumentless .choose as a synonym for argumentless .pick
15:53 masak TimToady: linguistically, I'd say "choose" implies "choose one" rather than "choose until you drop dead"
15:53 flussence having it * lets something higher up the chain decide how many it wants, I guess?
15:54 masak same could be said for .pick
15:54 TimToady that's true of any lazy list
15:55 TimToady it just feels like a wasted huffmanization to make .pick and .choose mean the same thing
15:55 masak why do they think that "yada yada" is an operator? :( http://www.activestate.com/blog/2010/04/wha​ts-new-activeperl-rollout-features-perl-512
15:55 masak it must be terribly confusing to believe that.
15:55 TimToady when very often people will want @universe.choose.map: *.stuff
15:55 masak TimToady: now you're talking.
15:55 masak I can agree with that.
15:56 TimToady and the very fact that choose "puts back" means there's an eternal supply of it
15:56 wolverian joined #perl6
15:57 Kodi The more I think about it, the more I prefer "repick" to "choose". This rather important distinction shouldn't be made to seem so subtle.
15:57 TimToady the main problem with repick is that it isn't 're' the first time
15:57 Kodi Ja.
15:58 TimToady though the 'rep' on the front kinda resonates with "replace"
15:58 * masak never felt a deep connection with ':replace'
15:58 Kodi How about "rpick"? Too ughly?
15:58 Kodi (That was an ughly typo.)
15:58 TimToady .repick does, however, better justify defaulting to *
15:59 flussence should the non-destructive method have a shorter name than the destructive one?
15:59 masak flussence: neither .pick nor .choose is destructive.
15:59 masak flussence: oh, you meant .grab ?
15:59 rokoteko .select?
16:00 flussence am I understanding these right even?
16:00 TimToady .grab is semantically heavier; we don't always measure huffman in .chars space
16:00 * flussence goes to read the spec again
16:01 daxim left #perl6
16:02 TimToady .repick does somewhat indicate the relationship to .pick, unlike .choose
16:02 TimToady it's uglier though
16:02 masak .choose also indicates a relationship to .pick
16:03 masak it's just more subtle.
16:03 wolverian left #perl6
16:03 TimToady it is heavier, indicating a heavier concept, in some sense
16:04 TimToady doesn't .choose have some combinatoric overloadings though?
16:04 flussence okay, so .pick without :replace doesn't touch the list but remembers what it's picked so far?
16:04 Kodi Right.
16:05 TimToady yes, uses a grab to keep state internally
16:05 TimToady but is officially "immutable" in API
16:05 gottreu .harvest?
16:05 TimToady that implies taking away
16:06 flussence .some?
16:06 TimToady too much like a junction?
16:06 * gottreu lacks basic English comprehension skills despite decades of practice.
16:06 pmichaud .select, but has the wrong database-y ideas behind it
16:06 TimToady too much history
16:06 pmichaud right
16:07 Kodi .some with a default argument of * would be really surprising.
16:07 TimToady .some implies subset
16:07 TimToady this is more like an eternal bag
16:08 Kodi .infinite is kind of nice in the case of *, but there's no clue as to the random order.
16:08 pmichaud .sample ?
16:08 TimToady looking at it sideways, it's pick-set vs pick-bag
16:09 TimToady maybe
16:09 dalek specs: f73043b | KodiB++ | S32-setting-library/Containers.pod:
16:09 dalek specs: [S32::Containers] Changed the *default* default default KeyHash value to Any.
16:09 dalek specs:
16:09 dalek specs: S02 says the default default value is sensitive to the value type of the KeyHash. If the default value type of a KeyHash is Any, which seems logical to me, then the default default default value should be a prototype Any, not 0.
16:09 dalek specs: review: http://github.com/perl6/specs/commit/f7​3043b80803f95bb094c90c34e7f2883ad549ee
16:09 rokoteko .collect :) but it sound more like .pick than .pick does. ;)
16:09 TimToady .sample has possibilities
16:09 pmichaud or even .resample ?   :-)
16:09 rokoteko heh. Anyway. Nice game you are playing.. Ill be afk for a while. :)
16:09 meteorjay left #perl6
16:10 TimToady .choose(5) reads better than .sample(5)
16:10 TimToady except that .choose(5) now reads like .pick(5)
16:10 TimToady implying exclusivity
16:11 cdarroch joined #perl6
16:11 cdarroch left #perl6
16:11 cdarroch joined #perl6
16:11 TimToady .sample has the factory connotation of pulling things off the line that may be the same
16:12 zulon left #perl6
16:13 TimToady .arbitrary is a bit long
16:13 gottreu .elect ?
16:13 pmichaud "wr" is the standard statistical abbrev for "with replacement", so maybe   .pickwr ?
16:14 TimToady would prefer .pick-replace if we went that route
16:14 TimToady maybe .pick-repl
16:14 moritz_ pick your REPL!
16:14 moritz_ pick-copy
16:15 pmichaud or even just  .pickr
16:15 moritz_ values are copied, not removed
16:15 moritz_ (no, that's bad, objects aren't actually copied)
16:15 Kodi What if @a.choose(*) was the same as @a.choose(+@a), and we had a separate method for producing an infinite list? @a.choose(+@a) would be useful for, e.g., statistical bootstrapping.
16:15 TimToady .random
16:15 masak .jumble
16:15 pmichaud .random is a little close to .rand
16:15 pmichaud .jumble is interesting
16:15 pmichaud .mix
16:16 masak .shake
16:16 moritz_ .mix sounds like shuffle
16:16 pmichaud .shuffle :)
16:16 moritz_ so does .shake
16:16 masak .bake
16:16 moritz_ which is explicitly not with replacing
16:16 moritz_ .rake
16:16 TimToady .picks
16:16 moritz_ .cake!
16:16 masak .bikeshed
16:16 * moritz_ -> decommute
16:16 masak .commute
16:16 TimToady .picks implies multiple of them
16:17 pmichaud .samples ?
16:17 pmichaud for @array.samples { .say }   # forever
16:18 TimToady reads pretty well
16:18 pmichaud (more)
16:18 pmichaud .samples($n)   could mean "infinite list of .pick($n)"
16:19 pmichaud i.e.,   @array.samples(3)   would return an infinite list of parcels with @array.pick(3)
16:19 pmichaud ...maybe...
16:19 TimToady but then what means .pick(3, :replace)?
16:19 pmichaud ummmmmm
16:19 pmichaud I dunno.  :)
16:19 TimToady I don't see a big use case either
16:19 pmichaud right
16:20 pmichaud anyway,   @array.samples   kinda gets there
16:20 pmichaud I almost want it to be  @array.examples   but that's not quite right
16:21 pmichaud oh, with the earlier interpretation of samples, it'd be    @array.samples[^3]   :-)
16:21 TimToady "sample" does have the connotation of "removing an insignificant amount"
16:22 pmichaud i.e.,  @array.samples[^3]  would be the same as .pick(3, :replace).  I agree that's not syntactically very elegant.
16:22 TimToady not very smooth
16:22 pmichaud so, might be useful someday, but still wants some better sugar coating.
16:23 pmichaud @array.samples(100)[^10]   # ten samples of 100 elements chosen at random from @array
16:25 pmichaud of course, that's also just    (@array.pick(100) for ^10)       :-)
16:25 pmichaud which means pick with replace is just
16:25 pmichaud (@array.pick for ^3)
16:28 wolverian joined #perl6
16:29 pmichaud .randomized ?
16:29 TimToady too much like .shuffle
16:29 pmichaud still soun.... right
16:29 gottreu .draw ?
16:30 TimToady to "takey"
16:30 pmichaud .remix
16:30 TimToady *too
16:30 z-b is now known as zb
16:30 masak swimming &
16:30 masak left #perl6
16:31 pmichaud maybe we want the notion of "generator" in here somewhere
16:31 pmichaud i.e., it's something that generates elements selected at random
16:32 TimToady sorta what 're' and 'multi' and -xx were aiming at
16:32 pmichaud right
16:33 pmichaud .sin
16:33 pmichaud no
16:33 TimToady and plurals
16:33 pmichaud .spin
16:33 pmichaud like spinning a random number wheel :-)
16:33 pmichaud three spins could produce the same element three times :)
16:33 TimToady .spins maybe
16:33 araujo left #perl6
16:34 pmichaud @array.spin(3)   give me 3 elements from @array, with replcaement
16:34 pmichaud for @array.spin { .say }   # forever
16:34 TimToady .roll
16:34 TimToady .roller :)
16:35 PerlJam what happens when you roll over?  :)
16:35 pmichaud .fortune   ("grab one at random"  :-)
16:35 TimToady spin has association with spin-locks, so that's kinda busy-sounding, which is good, I think
16:35 pmichaud .sajak   "Wheel!  Of!   Fortune!"
16:35 TimToady .lucky  :)
16:35 TimToady .wheel
16:36 pmichaud .roulette
16:36 pmichaud implies randomness and repeatability all at once :)
16:36 pmichaud *replaceability
16:36 pmichaud (grrr)
16:36 PerlJam except for russian roulette
16:37 TimToady first *.bullet
16:37 pmichaud (1 xx 5, Failure.new).roulette    # 1 in 6 chance of dying!  :-)
16:38 TimToady .roulette is kinda clubby, I think I like .spin a bit better
16:38 pmichaud yeah
16:39 TimToady also, political spin doesn't change the facts, it just emphasizes one part or another :)
16:39 pmichaud I came up with spin because I wanted to put everyone in a group, mix them around, see who's in front, then mix then around again, see who's in front, etc.
16:39 TimToady and spinning is a continuous process
16:39 TimToady we could rename .pick to .musical-chairs
16:40 slavik2 so now the russian roulette with system is a one liner :D
16:42 TimToady I wonder if anyone has ever written a murder mystery in which the gun contains one empty chamber plus 5 chambers of aspirin
16:43 tylercurtis joined #perl6
16:44 slavik2 TimToady: after the murder or before?
16:45 TimToady I suppose those would be two different stories
16:51 PerlJam I guess .rand is too obviously wrong?
16:53 gottreu is english required?   Latin's .seligere?  (or the more cognatious .selectus)
16:54 colomon actually, I kind of like .rand for it.
16:56 PerlJam It already has the right connotation as far as I'm concerned.
16:57 flussence @array[@array.rand(5)] makes sense to me.
16:57 PerlJam flussence: that doesn't make sense to me :)
16:58 PerlJam @array.rand(5)  # give me 5 elements of @array at random.
16:58 flussence The thing is, .rand already returns a random index number
16:58 PerlJam depends on what the invocant is (or should)
16:59 flussence waitaminute.
16:59 flussence rakudo: my @a = [2, 3]; say ~(@a.rand xx 3) # probably not
16:59 p6eval rakudo 323a67: OUTPUT«0.569536720260174 0.569536720260174 0.569536720260174␤»
17:00 flussence rakudo: my @a = [2, 3]; say ~(@a>>.rand[^3])
17:00 p6eval rakudo 323a67: OUTPUT«1.77777758119095 Any() Any()␤»
17:00 flussence bah, going down that road is ugly anyway
17:01 pmichaud note that   my @a = [2, 3];  leaves @a with only one element, too :)
17:01 * flussence facepalm
17:06 dakkar left #perl6
17:07 PerlJam also, if .pick and .pick(:replace) become two things, what happens to .grab ?
17:08 envi^home left #perl6
17:09 PerlJam (at the moment, I think .grab as a weighted .pick seems wrong somehow)
17:11 rokoteko .extract :)
17:11 meppl left #perl6
17:11 dukeleto howdy!
17:11 thebird left #perl6
17:13 rcfox left #perl6
17:14 flussence rakudo: my @a = 1..8; say ~({@a.rand}...*)[^5]>>.Int
17:14 p6eval rakudo 323a67: OUTPUT«2 4 7 6 6␤»
17:14 PerlJam fwiw, I think .grab should really be some form of .pick (and .rand) where you pass a weighting function similar to how you pass a comparator to sort.
17:16 PerlJam that way you can use a continuous function for the weighting as well as a discrete function (currently .grab only allows for discrete weighting IIRC)
17:16 PerlJam but, I'm not quite sure of the utility there.
17:17 PerlJam afk, pick up kids
17:18 Kodi left #perl6
17:18 rokoteko PerlJam: that sounds like .derive($n, &sub) :)
17:19 dalek roast: 8e4955e | KodiB++ | S02-builtin_data_types/ (2 files):
17:19 dalek roast: Added tests for Sets and Bags.
17:19 dalek roast: review: http://github.com/perl6/roast/commit/8e​4955e60e6ea9da5dde0d1130e21fcac352dc2e
17:19 Alias_ left #perl6
17:21 envi^home joined #perl6
17:21 Chillance joined #perl6
17:29 TimToady after much consideration, I think we should go with a dice metaphor instead, because multiple rolls are automatically independent
17:29 rindolf Is there a Perl 6 equivalent for http://community.livejournal​.com/shlomif_tech/46303.html ?
17:29 TimToady @die.roll(3)
17:31 moritz_ rindolf: you have a double-escape > in that post
17:31 moritz_ rindolf: and I don't understand the connection between that PDL snippet and the subs afterwards
17:32 TimToady what does it do?
17:32 rindolf moritz_: it's not a double escape - it's a missing ampersand.
17:33 rindolf moritz_: fixed now.
17:33 moritz_ rindolf: you have markup fuckup in your post. Better? :-)
17:33 moritz_ s/have/had/
17:33 TimToady as far I can read it, it's some kind of grep on either the indexes or the values
17:34 rindolf moritz_: well, let's suppose I do $self->stuff->more_stuff->even_more_stuff->with({ $_->index() * $_ })
17:34 TimToady what is being given as the argument?
17:34 TimToady to the closure
17:35 rindolf TimToady: what left of the ->with
17:35 flussence rakudo: say ~Buf.^methods; # why does this return "7" on my machine?
17:35 p6eval rakudo 323a67: OUTPUT«7␤»
17:35 TimToady rindolf: I don't believe you, because if that were true, you wouldn't need a closure
17:35 rindolf TimToady: ->with operates on a value and yields an expression based on it.
17:35 TimToady the "a value" isn't just the left side
17:36 rindolf TimToady: 5->with(sub { $_ * $_ } ) will be 25.
17:36 TimToady why do you need application
17:36 rindolf For a small example.
17:36 rindolf TimToady: because I'm too lazy to assign it to a variable.
17:37 jedai left #perl6
17:38 TimToady well, in theory you could do 5 R. ({$_ * $_})
17:38 TimToady rakudo: say 5 R. ({$_ * $_})
17:38 p6eval rakudo 323a67: OUTPUT«===SORRY!===␤Confused at line 22, near "say 5 R. ("␤»
17:38 supernovus Exemel updated, now with better grammar and spelin.
17:38 phenny supernovus: 08:21Z <masak> ask supernovus mind adding http://github.com/supernovus/exemel to http://github.com/perl6/ecosys​tem/blob/master/projects.list ?
17:39 TimToady but map will work here for scalars
17:39 TimToady rakudo: say 5.map: * * *
17:39 p6eval rakudo 323a67:  ( no output )
17:39 TimToady rakudo: say 5.map({$_ * $_})
17:39 jedai joined #perl6
17:39 p6eval rakudo 323a67: OUTPUT«25␤»
17:40 tylercurtis rakudo: say 5.:<**>(2)
17:40 p6eval rakudo 323a67: OUTPUT«===SORRY!===␤Confused at line 22, near "say 5.:<**"␤»
17:40 tylercurtis std: say 5.:<**>(2)
17:41 p6eval std : OUTPUT«ok 00:01 116m␤»
17:43 TimToady rakudo: say 5.&[**](2)
17:43 p6eval rakudo 323a67: OUTPUT«25␤»
17:44 s1n joined #perl6
17:45 supernovus phenny: tell masak I will make a branch of ecosystem and add it, unlike proto, I don't have write access to that project to add it directly.
17:45 phenny supernovus: I'll pass that on when masak is around.
17:45 TimToady rakudo: say .(5) given * * *;
17:45 p6eval rakudo 323a67: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤  in <anon> at line 10:/tmp/z6Ki5uRQQa␤  in main program body at line 22:/tmp/z6Ki5uRQQa␤»
17:45 TimToady right
17:46 TimToady rakudo: say .(5) given * ** 2
17:46 p6eval rakudo 323a67: OUTPUT«25␤»
17:47 TimToady here we go
17:47 TimToady rakudo: 5.&(* ** 2).say
17:47 p6eval rakudo 323a67: OUTPUT«===SORRY!===␤Non-declarative sigil is missing its name at line 22, near "&(* ** 2)."␤»
17:47 TimToady std: 5.&(* ** 2).say
17:47 p6eval std : OUTPUT«ok 00:01 120m␤»
17:48 TimToady rakudo: 5.$(* ** 2).say
17:48 p6eval rakudo 323a67: OUTPUT«===SORRY!===␤Non-declarative sigil is missing its name at line 22, near "$(* ** 2)."␤»
17:48 TimToady I think that's probably a known bug, but I'm not sure
17:50 TimToady rakudo: say (1..6).item.map(~*)
17:50 p6eval rakudo 323a67: OUTPUT«123456␤»
17:51 TimToady rakudo: say (1..6).list.item.map(~*)
17:51 p6eval rakudo 323a67: OUTPUT«123456␤»
17:51 uniejo joined #perl6
17:51 supernovus There, I sent a pull request, exemel is now in projects.list, for anyone who wants to play with it.
17:51 TimToady hmm, doesn't seem to be a way to force map to run on a list as an item
17:51 TimToady rakudo: say (1..6).flat.item.map(~*)
17:51 p6eval rakudo 323a67: OUTPUT«123456␤»
17:51 cognominal joined #perl6
17:52 moritz_ supernovus: you have now commit access to perl6/ecosystem
17:52 moritz_ (and a few other repos, like test suite, module.perl6.org etc.)
17:53 supernovus moritz_: thanks :-)
17:54 risou left #perl6
17:55 rokoteko is there an unicode or latex character for Mu?
17:55 flussence µ?
17:56 gottreu i'd bet there are many Mu's in unicode...or at least 2
17:56 TimToady
17:56 rokoteko erm. whats that in hex?
17:56 TimToady .u 無
17:56 phenny U+7121 CJK UNIFIED IDEOGRAPH-7121 (無)
17:56 gottreu and i'm not even meaning case-wise
17:56 flussence .u 2205
17:56 phenny U+2205 EMPTY SET (∅)
17:57 TimToady rakudo: say Set ~~ Mu, Mu ~~ Set
17:57 p6eval rakudo 323a67: OUTPUT«10␤»
17:57 flussence oh, there's more of these than I thought...
17:57 TimToady a Set has semantics; Mu just exists
17:57 flussence .u 2400
17:57 phenny U+2400 SYMBOL FOR NULL (␀)
17:58 * flussence can't find one for "undefined" though.
17:58 rokoteko flussence: well *that's* obvious.
17:59 TimToady but Mu is also undefined because it's the "or doesn't exist" part of 有無 "umu"
17:59 TimToady which more or less means to be or not to be
17:59 rokoteko yes it's obviolus very Zen, but try to talk about such on irc.
17:59 TimToady arguably the top type should be 有 and the bottom type should be 無
18:00 TimToady then everything would derive from Oo rather than Moo
18:01 justatheory left #perl6
18:02 envi^home left #perl6
18:02 gottreu .u 00b5
18:02 phenny U+00B5 MICRO SIGN (µ)
18:02 gottreu .u 03BC
18:02 phenny U+03BC GREEK SMALL LETTER MU (μ)
18:03 TimToady .u 𝞵
18:03 phenny U+1D7B5 MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL MU (𝞵)
18:03 TimToady those mathematicians have a lot to answer for...
18:04 gottreu Anyone else sad that the unicode dominoes only go up to 6?
18:04 TimToady how many programming languages do you know that only allow single character variable names?
18:05 TimToady gottreu: yes, but where would you stop?
18:05 TimToady and what shape would you put around them?
18:05 TimToady I use circled nums for up to 20
18:05 * flussence has seen a set with up to 9
18:06 TimToady surely you've seen an icosohedral die?
18:06 gottreu at a reasonable number.  if they've been mass produced, then it's reasonable.  Our family set goes to 16.  And came with plastic trains.
18:06 rokoteko Ah. Unicode would be brilliant if it would also encode the character's shape to the number that represents the character in some logical numerical form..
18:06 TimToady well, obviously 1..12 should have a pentagon around it
18:08 rokoteko probably would need atleast 3d characters at that point.
18:08 TimToady 1⃤
18:08 TimToady that's obvsiously from 1..20
18:08 rokoteko .u 1�C�
18:08 phenny UnicodeDecodeError: 'utf8' codec can't decode bytes in position 1-3: invalid data (file "/usr/lib/python2.5/encodings/utf_8.py", line 16, in decode)
18:09 rokoteko .py ?
18:09 TimToady actually, I think most icosohedral dice go 0..19
18:09 phenny SyntaxError: unexpected EOF while parsing (<string>, line 1)
18:09 TimToady rokoteko: your UTF-8 is broken
18:09 TimToady .u 1⃤
18:09 phenny U+0031 DIGIT ONE (1)
18:09 phenny U+20E4 COMBINING ENCLOSING UPWARD POINTING TRIANGLE (⃤)
18:09 gottreu TimToady: not the AD&D dice i've seen
18:10 TimToady most of the ones I've seen have 00 instead of 20, and you can use them either way
18:11 TimToady no enclosing pentagon though :/
18:11 rokoteko U+20E4 I dont seem to have font for.
18:11 TimToady maybe that's just as well, considering how magical people think text is already...
18:11 TimToady your browser might
18:12 slavik2 TimToady: http://thedailywtf.com/Articl​es/Very-Special-Strings.aspx
18:12 slavik2 :)
18:12 rokoteko I tried that on my browser. Im on latin1 terminal on irc, hence the fail earlier (it had some control chars I didnt have control over when doing the copy+paste)
18:12 TimToady oh, right, finnish...
18:13 IllvilJa My very unscientific contribution to the discussion: checked my collection and I got three icosahedral dices marked 1 through 20, and two such dices (from the 80ies) with numbers 0 through 9 (every number appearing twice)
18:13 colomon TimToady: I think that's mostly older ones.
18:13 TimToady one can just as easily treat 20 as 0, I suppose
18:14 TimToady mostly I think people ignore the first digit when they want a 10s multiplier anyway
18:15 rokoteko IllvilJa: do you collect dices?
18:15 TimToady douses
18:15 colomon TimToady: I'd wager these days, most people who want a 10s multiplier use a d10 instead of a d20.  ;)
18:15 PerlJam back.
18:15 rokoteko IllvilJa: have you yet decided what are your odds for getting the collection you wished to have when  you began?
18:15 TimToady mice, mouse, lice, louse...
18:15 TimToady dice, douse
18:16 gottreu spice, spouse
18:16 PerlJam so ...  @array.roll(7)   ?
18:16 IllvilJa rokoteko: I have my very old role playing dices around, together with new ones I've bought on a whimsical basis (and my son gave me a complete set for christmas just for fun)
18:16 TimToady picture a Day-sided die...
18:16 TimToady Day.roll(3)  # Tue, Sat, Mon
18:17 TimToady Day.roll(3)  # Fri,Fri,Fri   ->  Jackpot!!!
18:17 IllvilJa To mess things further... the old 20 sided dices with digits 0 through 9 (each digit twice) had the digits painted in two colors.   0 through 9 in (say) blue denoted 1 through 10 and 0 through in red were 11 through 20.
18:17 * colomon hasn't seen any of his dice since his move.  : (  Of course, he hasn't had call to use them, either.  :( :(
18:17 PerlJam so, does .grab keep its :replace ?
18:18 IllvilJa TimToady: a sevensided barrel dice would be cool for making "weekday rolls".
18:18 TimToady PerlJam: it's already gone
18:18 PerlJam ah
18:18 TimToady (from spec)
18:19 TimToady anyone wants to split pick into pick-n-roll, feel free :)
18:19 TimToady groceries &
18:20 IllvilJa PerlJam: a few games were given away/thrown away, but I got a handful left.  They are terribly dated, I cannot really imagine getting the teenage kids to play them.  But the old dices are still a bit useful!
18:21 sorear good * #perl6
18:22 IllvilJa Dammit, my (dissatisfied) obsession for games is one of the key drivers for my interest in learning programming languages, web applications and network coding.  Not that any games get written, but I can make a living writing code that actually is useful.
18:22 IllvilJa Once I get some spare time, I'll kick the Perl6 tires by (trying to) write some minimalistic game.
18:28 supernovus left #perl6
18:36 timbunce left #perl6
18:38 dalek ecosystem: 68d8e43 | supernovus++ | projects.list:
18:38 dalek ecosystem: Added exemel to projects.list
18:38 dalek ecosystem: review: http://github.com/perl6/ecosystem/commit/​68d8e43191b2fe3048a6713dbd3479ef4521a8ea
18:39 colomon guh, there are .pick methods all over the source now.
18:42 cottoo left #perl6
18:42 molaf left #perl6
18:43 cotto joined #perl6
18:44 * jnthn made it back home :-)
18:45 takadonet \o/
18:48 araujo joined #perl6
18:50 slavik2 jnthn: dang it, I'll have to hire better mercenaries next time :P
18:51 slavik2 nose.pick() ?
18:53 jnthn oh nose, that's disgusting... :P
18:54 sorear jnthn: mind explaining to me how class stringification is supposed to work?
18:54 sorear niecza: say Num;
18:54 p6eval niecza d4e20e7: OUTPUT«Unhandled exception: System.NullReferenceException: Object reference not set to an instance of an object␤  at Niecza.Kernel.UnboxDO (Niecza.DynObject o) [0x00000] in <filename unknown>:0 ␤  at Niecza.Kernel.UnboxAny (Niecza.IP6 o) [0x00000] in <filename unknown>:0 ␤  at
18:54 p6eval ..SAFE.Str_10…
18:59 jnthn sorear: It falls out of multi-method dispatch.
18:59 molaf joined #perl6
18:59 jnthn sorear: In Object there should be a multi method Str(Mu:U :) { self.^name } # or some such
19:02 moritz_ so normal methods default to :D ?
19:02 jnthn Either that or for ones where it matters you should declare 'em that way
19:02 jnthn I'm kinda fine with that for ACCEPTS
19:02 jnthn It's uppercase and so you should know what you're doing
19:03 jnthn Less comfortable we make people do it for .Str though. Maybe the default should be :D
19:03 sorear 'Object'?
19:03 jnthn sorear: er, Mu :-)
19:03 sorear TimToady says ACCEPTS is probably a my multi sub, fwiw
19:03 jnthn ...guess I smoked too much C# of late
19:03 jnthn sorear: lol
19:03 jnthn sorear: That's the first time I've heard that :/
19:04 rindolf jnthn: why are you using C#?
19:04 rindolf jnthn: I don't think it's bad, but I'm just curious.
19:04 sorear I was asking about the given -> jumptable optimization & how the compiler needs to be able to know about ACCEPTS stuff at compile time
19:04 jnthn rindolf: Use it at $dayjob, also using it for prototyping stuff at the moment
19:04 diakopter rindolf: should he rather use F# or VB.net? :P
19:04 sorear he said it was either very magical, or maybe not a method at all
19:04 jnthn Hmm
19:05 rindolf diakopter: VB.net!
19:05 icwiener left #perl6
19:05 jnthn rindolf: Noooo!
19:05 rindolf jnthn: yes!
19:05 * jnthn does not like VB syntax :-)
19:05 * rindolf forces jnthn to use VB.NET.
19:05 rindolf Because I'm Sadistic.
19:06 * jnthn quits programming and goes to work at McDonalds to avoid the VB.Net
19:06 rindolf Heh.
19:06 diakopter McDonalds hires many many programmers
19:07 diakopter as programmers, I mean.
19:07 jnthn Maybe McDonalds is just a company full of VB haters who like cheezburger.
19:09 diakopter oracle/java, based on their job postings
19:10 diakopter & cobol
19:10 moritz_ oh noes
19:13 rindolf It's been rumoured their PoS systems used to run SCO UNIX.
19:16 PerlJam Anything running SCO unix is a PoS  ;>
19:16 lucs Acronym collision!
19:16 lucs :)
19:16 PerlJam #perl6 is all about the pun
19:17 plainhao left #perl6
19:17 slavik2 didn't sco go out of business?
19:17 slavik2 officially?
19:17 moritz_ out of UNIX business, long ago
19:18 moritz_ they've been doing some laywer business since then
19:18 wamba left #perl6
19:21 meinwald left #perl6
19:21 slavik joined #perl6
19:24 uniejo left #perl6
19:27 meinwald joined #perl6
19:28 meinwald is now known as Guest9777
19:34 * sorear makes a note to add jaw-breaking, ground-dropping performance improvements to niecza
19:34 pmichaud sorear++
19:39 Holy_Cow left #perl6
19:40 REPLeffect joined #perl6
19:42 TimToady rakudo: say (1 div 0).WHAT
19:42 p6eval rakudo 323a67: OUTPUT«Divide by zero␤  in 'infix:<div>' at line 3616:CORE.setting␤  in main program body at line 22:/tmp/hqz7YiLXvk␤»
19:43 TimToady rakudo: say (1 / 0).WHAT
19:43 p6eval rakudo 323a67: OUTPUT«Rat()␤»
19:43 tylercurtis left #perl6
19:46 Chillance left #perl6
19:47 Chillance joined #perl6
19:49 dukeleto I just added a smolder project for rakudo at : http://smolder.parrot.org/a​pp/projects/smoke_reports/5
19:49 meppl joined #perl6
19:57 alksentrs left #perl6
19:58 dalek specs: 8ecf53a | TimToady++ | S32-setting-library/Containers.pod:
19:58 dalek specs: [Containers] split pick into pick and roll
19:58 dalek specs: review: http://github.com/perl6/specs/commit/8e​cf53a93a9e9a4a871603b482e41993e085db4f
19:59 Italian_Plumber left #perl6
20:00 TimToady phone
20:03 pmichaud omw
20:06 diakopter omw nomw nomw nomw
20:09 sorear diakopter does teh meetings too now?
20:10 Italian_Plumber joined #perl6
20:11 TimToady nope
20:12 alksentrs joined #perl6
20:13 colomon whatever happened to chromatic's writeups on the meetings?  seems like I haven't seen one in months...  :(
20:15 kuzuha left #perl6
20:15 sorear he does them only on request now
20:15 sorear ping him in #parrot if you want some
20:15 TimToady chromatic++ blames it on the use.perl snafu, at least in part
20:15 TimToady we're discussing where they might go instead
20:18 Mowah left #perl6
20:18 colomon I certainly appreciated reading them.
20:18 sorear me too
20:19 moritz_ blogs.perl.org would be nice
20:23 dalek niecza: a413960 | sorear++ | / (4 files):
20:23 dalek niecza: Add codegen support for eh-spans
20:23 dalek niecza: review: http://github.com/sorear/niecza/commit/a​413960b4ce8a911537cf2aa2d420a1756d901ea
20:23 dalek niecza: 2d649c9 | sorear++ | / (4 files):
20:23 dalek niecza: Generate control exn records for loops
20:23 dalek niecza: review: http://github.com/sorear/niecza/commit/2​d649c92ae446320d3aa8bd4ffa4ef1f2d1c3cbb
20:23 dalek niecza: 59fa498 | sorear++ | / (5 files):
20:23 dalek niecza: Generate control exception data for return
20:23 dalek niecza: review: http://github.com/sorear/niecza/commit/5​9fa498a5677d73da07c843802c53d7204536fdc
20:26 tadzik joined #perl6
20:27 rindolf left #perl6
20:29 sorear Is Block.leave a control exception, or is it some kind of raw unwind that bypasses CONTROL and calls only LEAVE?
20:29 justatheory joined #perl6
20:29 alester left #perl6
20:34 TimToady I think of it as lower level
20:34 alksentrs left #perl6
20:34 TimToady blogs.perl.org is where it looks like they're going
20:37 colomon \o/
20:41 patrickas left #perl6
20:43 Ross^ left #perl6
20:44 dalek roast: ea8f32d | KodiB++ | S02-builtin_data_types/bag.t:
20:44 dalek roast: [bag.t] Use .roll instead of .pick with :replace.
20:44 dalek roast: review: http://github.com/perl6/roast/commit/ea​8f32d7a1df64bdfb9a8bb190cb3efd5a816001
20:45 PacoLinux left #perl6
20:45 Ross^ joined #perl6
20:46 sahadev1 joined #perl6
20:47 Italian_Plumber left #perl6
20:48 PacoLinux joined #perl6
20:48 sahadev left #perl6
20:53 patspam left #perl6
20:55 whiteknight joined #perl6
20:56 rindolf joined #perl6
21:09 Ross^ left #perl6
21:11 sorear When does Any strify to "", or is that part of P5 being completely discarded?
21:20 justatheory left #perl6
21:20 TimToady ~ (that is, .Stringy) promotes undefined to "" with warning, while the lower-level .Str tries to produce a human representation of whatever it is
21:21 TimToady print and say use .Str so you get Any(), but ~ gets ""
21:21 justatheory joined #perl6
21:21 TimToady also, if you use a Failure as ~ you get a thrown exception
21:21 justatheory left #perl6
21:28 bluescreen left #perl6
21:43 Guest23195 left #perl6
21:49 hercynium joined #perl6
21:50 Guest9777 is now known as meinwald
21:51 pmichaud we have some difficulties implementing .Stringy on type objects because the current design of type objects predates Stringy (and it's not easily remedied without going through a Parrot deprecation cycle)
21:52 pmichaud s/design/implementation/
21:52 jnthn pmichaud: It's only in p6object though?
21:52 pmichaud jnthn: yes, but I haven't found a good way to override it yet.
21:52 pmichaud without substantially changing p6object.
21:52 jnthn pmichaud: I'd just wait
21:52 pmichaud I'm not sure .Stringy can wait, though.
21:53 jnthn Ah
21:53 jnthn It's not just a case of "add a method", I'm guessing?
21:53 pmichaud it's a case of "override a vtable"
21:53 pmichaud get_string, in this case.
21:53 pmichaud since p6object already overrides get_string, there's not a good way to override it yet again
21:54 jnthn Ah
21:54 sorear let's suppose I'm hacking on an implementation with no Parrot baggage
21:54 jnthn Is it that it overrides it and does the wrong thing in the override (or at least, the thing that's now wrong)?
21:54 pmichaud jnthn: yes.
21:54 sorear what would be the cleanest way to handle Str/Stringy/typeobjects?
21:54 jnthn pmichaud: Ah
21:54 pmichaud sorear: in Mu,    method Stringy(Mu:U) { ... }
21:55 jnthn multi method, I hope :-)
21:55 pmichaud will handle type object stringification
21:55 pmichaud yes, +multi
21:55 jnthn But yes, other than that, it's what I expect too
21:55 jnthn For it to work we also need to have the new-style multi dispatch.
21:55 jnthn (We'll get it during the object model switch.)
21:57 jnthn pmichaud: Have you checked if you could sneak it in under the blanket "PCT <-> P6object link to be broken" deprecation notice I put in on the last cycle?
21:57 pmichaud jnthn: hmmmmmm
21:58 jnthn pmichaud: It's (deliberately) quite broad.
21:58 jnthn But explicitly for changes to the meta-model implementation beneath PCT stuff. :-)
21:58 sorear If we drop the deprecation policy, do we need a deprecation cycle for it? :)
21:58 diakopter heh
21:58 pmichaud jnthn: I suppose it's possible to slip it in under there.
21:58 jnthn :-)
21:58 jnthn win :-)
21:59 diakopter sorear: if it deprecates itself retroactively..
21:59 pmichaud when I last looked, Stringy was getting a bit messy to do in one fell swoop, so I think I need to do it in very small iterations.
21:59 jnthn Yes, I can imagine it's a painful all-in-one switch.
21:59 sorear niecza doesn't currently have Stringy at all
21:59 pmichaud yeah, that's where rakudo started (no Stringy)
21:59 sorear I (mis)read S02 as saying that Stringy was part of the Cat system
22:00 sorear i.e. $foo.Stringy is allowed to return a Cat, but is otherwise the same as $foo.Str
22:00 pmichaud unfortunately, we quickly mapped the get_string vtable to .Str, when it really wants to act more like .Stringy
22:00 pmichaud and breaking that mapping isn't trivial.  (not necessarily hard, but not trivial)
22:00 sorear is get_string allowed to return Cat or Junction?
22:00 tadzik left #perl6
22:01 jnthn er...no... :/
22:01 sorear seen lichtkind
22:01 aloha lichtkind was last seen in #perl6 21 hours 59 mins ago saying "good night".
22:02 jnthn pmichaud: Given that Parrotty stuff tends to use get_string to get down to a Parrot string, I wonder if we already have it right already?
22:02 jnthn pmichaud: That is, maybe the v-table mapping really is after the more low-level meaning of string.
22:06 pmichaud jnthn: I tend to think of get_string as being "give me what you would use in... e.g.,  a 'join' operation"
22:06 pmichaud or a concat operation
22:06 pmichaud that tends to be the high-level meaning.
22:07 pmichaud to me, the low-level meaning really ought to be the (now deprecated/gone) 'get_repr' opcode :-P
22:07 pmichaud at least I think that opcode is gone... let me check.
22:07 jnthn pmichaud: That doesn't play well with get_string v-table only being able to return a STRING* though
22:07 pmichaud jnthn: ?
22:07 pmichaud I don't quite understand.
22:08 jnthn .sub 'foo' :vtable('get_string')
22:08 jnthn ...
22:08 jnthn .return ($P0)
22:08 jnthn .end
22:08 jnthn The PMC won't get returned
22:08 pmichaud you mean in rakudo?
22:08 pmichaud that should be
22:08 pmichaud .sub 'foo' :vtable('get_string')
22:08 pmichaud $S0 = self.'Stringy'()
22:08 pmichaud .return ($S0)
22:08 pmichaud .end
22:09 jnthn Aren't we risking getting recursive there?
22:09 jnthn I'd guess on Str it has method String() { self }
22:09 pmichaud I don't think we are any more recursive that what we've done w/o Stringy at all
22:09 lue ohai o/
22:09 jnthn er, Stringy
22:09 pmichaud currently we have
22:10 pmichaud .sub '' :vtable('get_string') :method $S0 = self.'Str'() .return ($S0)
22:10 pmichaud .end
22:10 pmichaud it's not really any different.
22:10 jnthn Oh
22:10 * jnthn tries to work out where this bottoms out
22:10 pmichaud I think my point is that if I have     pir::join(' ', @a)
22:10 pmichaud then the values of @a that get joined together are their .Stringy representations and not the .Str ones
22:11 pmichaud (e.g., if there are unset elements of @a, they become '' and not 'Any()'
22:11 jnthn Hm
22:11 jnthn I don't disagree with that.
22:11 thowe joined #perl6
22:11 jnthn I'm just a bit worried about in the case of, for example
22:11 pmichaud so that tells me that get_string vtable tends to map closer to Stringy
22:11 pmichaud which is "return your value as a string"
22:11 jnthn I agree from taht angle.
22:12 jnthn I'm worried from the low-level distinction angle though.
22:12 jnthn That is, what we need to end up with is a low level string to return from get_string
22:12 jnthn What if I have a Cat
22:12 jnthn It maybe has a method Stringy { self }
22:12 thowe I see that I can "use CGI;"  Is there documentation for that CGI class somewhere?  It is a class, right?
22:13 jnthn So in our v-table method we return a Cat object again
22:13 jnthn But we need to get an S register here
22:13 pmichaud in that case, I'd suspect that Cat needs to likewise override get_string
22:13 justatheory joined #perl6
22:13 jnthn So the calling conventions in order to do that coercion call get_string v-table on what cmes back
22:13 jnthn Which recurses...
22:13 jnthn infinitely.
22:13 jnthn Unless I'm missing something.
22:14 pmichaud Cat would want to override get_string
22:14 jnthn Well, yes, but what are you going to override it to do?
22:14 pmichaud to return the string value of the Cat, of course
22:14 jnthn Right, which is what .Str would do.
22:14 pmichaud so, no problem.  :-)
22:14 pmichaud .namespace ['Cat']
22:14 pmichaud .sub '' :vtable('get_string') :method
22:14 jnthn Right, but that's the argument for it mapping to the low-level Str instead.
22:15 pmichaud I think there are a lot more instances of wanting the high-level Stringy than the low-level Str
22:15 pmichaud and since we're explicitly talking about vtable details, it's all cheats anyway.
22:15 jnthn True
22:15 jnthn oh *sigh*...methods in namespaces...
22:16 jnthn (sorry, unrelated panic :-))
22:16 jnthn But yes, you're right.
22:16 pmichaud I need to read up on Cats a bit, though
22:17 jnthn I think the Stringy argument is stronger than the "maps more naturally to low level" one.
22:17 jnthn I think both have some points in their favour though. :-)
22:18 jnthn (Specifically, that the low-level one is easier to make "bottom out" without scattering so many v-table overrides around.)
22:19 jnthn To expand, my worry isn't so much that we can't write the v-table method in Cat. Sure we can.
22:19 jnthn It's what happens if somebody else wants to write a type like Cat.
22:19 jnthn We can't really (from a Perl 6 perspective) expect them to supply the v-table override.
22:19 pmichaud agreed
22:20 pmichaud but as long as Parrot's vtable interface limits us to specific types, we're kinda stuck no matter what.
22:20 pmichaud a similar problem exists with get_number
22:20 pmichaud i.e., get_number constraints us to a floating point representation- there's no generic "numification" vtable.
22:20 jnthn Well, the real issue is that it doesn't distinguish coercion to a low-level type from coercion to something that's conceptually num-ish/string-ish.
22:21 pmichaud right
22:21 pmichaud or list-ish/hash-ish for that matter.
22:21 pmichaud (which are the other two high-level coercion's I'd really like to have)
22:21 pmichaud s/'//
22:22 jnthn get_numish :-)
22:22 jnthn But yes, there's a case here that we have too few v-table methods I guess.
22:23 jnthn (We at the same time have too many things as v-table methods that I don't think should be.)
22:23 jnthn (e.g. add...)
22:24 meinwald left #perl6
22:28 meinwald joined #perl6
22:28 meinwald is now known as Guest30046
22:29 zfe joined #perl6
22:30 zfe left #perl6
22:37 krakan left #perl6
22:37 krakan joined #perl6
22:42 lue rakudo: my $a = 3; say $a ~~ Mu; say Mu ~~ $a;
22:42 p6eval rakudo 323a67: OUTPUT«1␤Nominal type check failed for parameter '$other'; expected Any but got Mu instead␤  in 'ACCEPTS' at line 3251:CORE.setting␤  in main program body at line 22:/tmp/5VStNcHYlD␤»
22:51 Chillance left #perl6
22:52 sahadev1 left #perl6
22:54 skyheights joined #perl6
22:58 sorear niecza now has control exceptions
22:59 sorear I think the only big feature missing for STD is roles
23:00 skangas left #perl6
23:03 Italian_Plumber joined #perl6
23:03 Italian_Plumber left #perl6
23:04 dalek niecza: aad86a4 | sorear++ | / (3 files):
23:04 dalek niecza: A new, ehspan-aware, exception dispatcher
23:04 dalek niecza: review: http://github.com/sorear/niecza/commit/a​ad86a4c2c25fad30489c4881bbbcdb4564925a8
23:04 dalek niecza: ae2e557 | sorear++ | / (3 files):
23:04 dalek niecza: Implement control operators next, redo, last, return
23:04 dalek niecza: review: http://github.com/sorear/niecza/commit/a​e2e557bab6edd35a0a635cf118c85d28ffb782a
23:04 rindolf left #perl6
23:06 skyheights left #perl6
23:08 muixirt left #perl6
23:09 dalek roast: ea0bb44 | KodiB++ | S02-builtin_data_types/ (2 files):
23:09 dalek roast: Revamped keyhash.t.
23:09 dalek roast: review: http://github.com/perl6/roast/commit/ea​0bb443bab8795b58381b19653bd3e3b7c4d618
23:18 colomon rakudo: say 5.rand
23:18 p6eval rakudo 323a67: OUTPUT«2.95718454218999␤»
23:23 Italian_Plumber joined #perl6
23:30 thowe so, if I install rakudo in my local dir, what's the command for perldoc?  perl6doc?
23:31 flatwhatson left #perl6
23:31 \xF0 you wish
23:31 \xF0 thowe: we'll be waiting a bit on perl6doc
23:32 thowe Oh.  Well, I never got an answer about where the CGI class docs were, so I figured it must be a dumb question.
23:32 thowe IS there some way to at least make it tell me what methods are available?  Is there POD docs for that class included?
23:33 thowe er, is it "Pod" not "POD" now?
23:34 thowe I did find this: http://github.com/viklund/novembe​r/blob/master/t/cgi/cgi_post_test
23:34 thowe Is there a better example?
23:40 cdarroch left #perl6
23:57 meppl left #perl6

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

Perl 6 | Reference Documentation | Rakudo