»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend! | Rakudo Star Released!
Set by diakopter on 6 September 2010.
lichtkind jnthn: ohai and welcome back 00:00
dalek odel: d70553b | mberends++ | java/ (4 files):
[java] implement lambdas as anonymous classes in Init
lichtkind good night 00:01
00:01 lichtkind left 00:05 vdrab left
diakopter mberends: o_O implement lambdas as anonymous classes in Init 00:10
arnsholt Anonymous inner classes in Java are closures, if with an excessively verbose syntax =) 00:11
diakopter I'll bet they get compiled to mangled state machine classes ... just as in C#->CIL ? 00:14
00:23 jferrero left 00:28 patspam left 00:32 lucs joined 00:36 ZadYree left 00:44 BillN1VUX1 joined
BillN1VUX1 Boston.pm Rakudo* demo tonight. 00:46
00:47 larsen left, cognominal left 00:48 larsen joined 00:49 meppl joined 00:50 cognominal joined 00:57 QinGW joined 01:10 araujo joined, araujo left 01:13 Patterner left 01:16 araujo joined 01:19 molaf left 01:20 alksentrs left 01:22 rurban joined 01:25 jasonmay left 01:26 Chillance left 01:30 jasonmay joined
supernovus Well, for anyone who's interested there is a new XML library for Perl 6 in town. github.com/supernovus/exemel It's a parser and emitter. 01:32
mantovan1 thank you supernovus. 01:33
01:33 molaf joined
BillN1VUX1 cool 01:34
01:34 s1n_mini left
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:37
BillN1VUX1 OOOH THE PUN !!!!!!!!!!!!!!!!!!!!!!!! 01:46
BillN1VUX1 Boston.pm applause at end of Rakudo demo 01:47
01:49 BillN1VUX1 left 01:50 hercynium left 01:56 agentzh joined, whiteknight left, cdarroch left 01:59 bpalmer` joined 02:03 redicaps joined
lue ohai o/ 02:05
02:06 hillu joined
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␤»
lue rakudo: grammar A { method B { <digit>+ } }; say "392" ~~ A.B;
p6eval rakudo 5ac20e: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 22␤»
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␤»
lue rakudo: grammar A { token B { <xdigit>+ } }; say A.B.^methods(:local)
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 02:15 Util_ is now known as Util
Util rakudo: $_ = "abc"; say /a(b)c/ ?? 1 !! 0; say $0; 02:15
p6eval rakudo 5ac20e: OUTPUT«1␤b␤»
Util rakudo: $_ = "abc"; my $re = regex {a(b)c}; say /$re/ ?? 1 !! 0; say $0;
p6eval rakudo 5ac20e: OUTPUT«1␤␤»
Util Why isn't $0 populated in the 2nd example? 02:16
02:21 Italian_Plumber left
lue rakudo: $_ = "abc"; my $re = /a(b)c/; say /$re/ ?? 1 !! 0; say $0; 02:24
p6eval rakudo 5ac20e: OUTPUT«1␤␤»
lue rakudo: $_ = "abc"; my $re = Regex.new(/a(b)c/); say /$re/ ?? 1 !! 0; say $0;
p6eval rakudo 5ac20e: OUTPUT«too few positional arguments: 2 passed, 3 (or more) expected␤ in main program body at line 1␤»
lue rakudo: $_ = "abc"; my $re = Regex.new(a(b)c); say /$re/ ?? 1 !! 0; say $0;
02:24 jhuni joined
p6eval rakudo 5ac20e: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 22␤» 02:24
02:25 brxue left, cognominal left 02:39 redicaps left 03:01 orafu left, orafu joined 03:02 Psyche^ joined, Psyche^ is now known as Patterner
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:04
03:06 supernovus left 03:09 shortcircuit joined 03:14 sftp left 03:24 leftleg_ joined 03:25 leftleg_ left 03:29 meppel joined 03:32 meppl left 03:34 meppel is now known as meppl 03:42 f00li5h is now known as f00li5h[notFAQ] 04:03 satyavvd joined, f00li5h[notFAQ] is now known as f00li5h 04:09 hercynium joined, hercynium left, hercynium joined 04:15 skyheights joined 04:16 skyheights left 04:20 QinGW left 04:22 QinGW joined 04:23 skyheights joined 04:24 skyheights left 04:29 am0c^ left 04:30 BillN1VUX joined 04:34 karb joined 04:36 karb left 04:40 hercynium left 04:42 kjeldahl_ joined 04:49 tylercurtis joined
dalek ok: e547152 | perlpilot++ | src/regexes.pod:
[regex] a slightly more verbose explanation of alternation
04:52
ok: c6e4555 | perlpilot++ | src/grammars.pod:
[grammars] hopefully better explanations
05:00 LaVolta joined 05:06 testilbot left, testilbot joined 05:07 thowe joined 05:14 rurban left 05:15 f00li5h left 05:16 am0c^ joined 05:28 thowe left
tylercurtis is glad some people liked his "given open(...) {...; .close}" example on Stack Overflow. (backlogging) 05:29
05:30 standz left, justatheory left 05:34 BillN1VUX left 05:39 f00li5h joined 05:41 cjk101010 joined
sorear good * #perl6 05:41
diakopter: no 05:42
diakopter: AICs in Java cannot access non-readonly variables from the outer scope
which means that it's impossible for an AIC to close over a variable, and keeping variables on the heap is unneccessary 05:43
AICs can only close over values, not variables
tylercurtis wonders if it would discourteous of him to write a module named With.
05:48 f00li5h left, f00li5h joined
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 06:14 rgrau_ left 06:20 lucs joined 06:23 cottoo left, cottoo joined 06:33 uniejo joined
dalek ecza: db99704 | sorear++ | src/Niecza/Actions.pm:
Try to mitigate error cascades
06:44
ecza: 43d8d6e | sorear++ | / (2 files):
Refactor trampoline for a couple more percent
sorear Can I assume that a Perl6 \n is always U+000A? 06:58
oh, hmm 07:00
"logical" newline
argh I need clarifications on this
what is a logical newline and how should I store one in a Str? 07:01
TimToady: ping, S05 07:03
TimToady you should store it as a native newline for your platform 07:12
"strict in what you emit, liberal in what you match" is how \n works 07:13
07:13 mberends left
sorear Assuming I have a sequence of Unicode codepoints, what should \n mean? 07:16
\cM?\cJ ?
* /\n/
07:16 Ross^ joined
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:17
but CRLF should be only one \n, not two 07:18
on unix "\n" should be \x0A
on windows it probably depends on whether we're going with logical or physical representation
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
TimToady it does; it's supposed to match all customary newlines 07:20
a file mounted under samba or nfs should not care whether it has CRLF or just LF in it
the pattern \n matches either. 07:21
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
but I think LF is probably good enough for most purposes
and Perl 6 probably has less problem than Perl 5 here, since p6 distinguishes text strings from binary 07:23
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:24
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?
Where do PARAGRAPH SEPARATOR and LINE SEPARATOR fit into this? 07:26
TimToady they are \v, but not \n, I think
to \n the pattern, it doesn't matter if we mangle or not
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:27
sorear But \n should be tolerant of bad mangling and accept [ \x0A | \x0D | \x0D\x0A ] 07:28
?
TimToady yes, with LTM semantics
we can't control when foreign filesystems are mounted
and other sources may give us "strings" that don't have CR removed 07:29
07:30 Guest23195 joined
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:30
07:31 Ross^ left
TimToady in other words, we'll push the point a bit and see if anyone pushes back 07:31
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:32
other things want to filter out on input too, like BOMs. 07:33
07:33 tadzik joined
tadzik hello 07:33
TimToady o/ 07:34
TimToady goes to get ready for bed...
07:35 Mowah joined
sorear Does \x0D\x0A ever match \s or \v? 07:36
TimToady that would be two \s or two \v, by current reckoning 07:37
but only one \n
sorear "p\x0D\x0Ap" ~~ / p \n \n p / ? 07:39
:r? 07:40
TimToady no, wouldn't match
\n sees CRLF as an indivisible unit 07:41
I could argue that \n should be a superset of \v though, since it's any logical newline 07:42
that might be saner
then people wouldn't have to write /\n|\v/ 07:43
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
and see if anyone complains
TimToady I don't think people would like to lose information like paragraph separator though 07:46
those semantics *are* part of Unicode
so I'd rather keep form feeds etc in the buffer but provide something like \n that matches them all 07:47
s/buffer/string/
sorear I think \n should be simple newlines (0A 0D0A 0D) and \v should be the "catch all" 07:48
\v would match a physical 0D0A because of the mangling
TimToady that's more or less the stataus quo, which is okay 07:49
sorear status quo re. 6 or 5? 07:50
TimToady 6
sorear ok
07:55 am0c^ left
TimToady --> thunkstate & 08:00
08:01 masak joined
masak o hai! 08:02
moritz_ o/
LaVolta hi masak :)
masak hi LaVolta! long time no see.
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
masak LaVolta: yes, I know the feeling :) 08:05
sorear hello masak!
hello LaVolta, do I know you?
LaVolta school days now finished...(and that is for my bad english :D)
dalek kudo: 3f6392d | patrickas++ | src/core/operators.pm:
Avoid copying all of the lhs since we only need elements off of it
LaVolta sorear: I guess...well...
yes?
08:05 am0c^ joined 08:12 timbunce joined 08:13 IllvilJa joined
IllvilJa Just tried to send a msg to p6eval... got a sensible response. Cool feature! 08:15
moritz_ \o/ 08:16
IllvilJa o/
08:18 wamba joined
LaVolta is try.rakudo.org under heavy load? 08:18
moritz_ 10:19:01 up 45 days, 6:35, 1 user, load average: 0.21, 0.45, 0.41 08:20
not exactly "heavy load" :-)
masak do we get visitor statistics for try.rakudo.org?
moritz_ should be possible to arrange 08:21
masak phenny: ask supernovus mind adding github.com/supernovus/exemel to github.com/perl6/ecosystem/blob/mas...jects.list ?
phenny masak: I'll pass that on when supernovus is around.
moritz_ we have an access.log file 08:22
masak supernovus++, by the way.
moritz_: would be interesting to plot trends, such as visitors by country over time.
moritz_: where is the access.log file?
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
masak kthx.
LaVolta and since the load's okay, let's blame the network...:( 08:24
08:25 sanemat joined 08:26 sanemat left 08:27 am0c^ left
moritz_ moritz.faui2k3.org/tmp/tryrakudo.html simple logs 08:28
masak moritz_++ 08:29
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
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␤»
sorear apparently someone found it on page 1 of google
(not here)
masak <flussence> that's straight from S03...
masak submits rakudobug
moritz_ ash_++ agreed to blog about it, but so far I haven't seen anything
masak I think it should also be in the next Rakudo Star announcement.
moritz_ maybe I should do it, exposure on planetsix would certainly help
masak moritz_: I think you should. I don't think ash_ will mind. 08:32
tadzik exemel seems pretty nice
dalek ecza: dadfba0 | sorear++ | / (5 files):
Implement ^/^^/$/$$/<</>>
08:33
08:34 dakkar joined
tylercurtis Good night, #perl6. 08:35
sorear I think 62 tests may have been a bit excessive for that
I got carried away
moritz_ doesn't think so
masak rakudo: $_ = "abc"; say /a(b)c/ ?? 1 !! 0; say $0; # via Util++
p6eval rakudo 5ac20e: OUTPUT«1␤b␤»
masak rakudo: $_ = "abc"; my $re = regex {a(b)c}; say /$re/ ?? 1 !! 0; say $0;
p6eval rakudo 5ac20e: OUTPUT«1␤␤»
masak <Util> Why isn't $0 populated in the 2nd example?
I'm inclined to classify this as a bug.
moritz_ that's spec
because /$re/ has no capture
only $re has
masak oh, ok.
goodie. no ticket. 08:36
moritz_ and since we properly nest matches, it would have to be
08:36 tylercurtis left
moritz_ /<cap=$re>/ && say $<cap>[0] 08:36
08:38 thebird joined 08:42 daxim joined
masak nod. 08:45
ok, I have a Rakudo programmer question. the enums patch went in yesterday, but I couldn't make this work: 08:46
rakudo: enum A <b c d>; say A.WHAT
p6eval rakudo 5ac20e: OUTPUT«()␤»
masak how can I make it say 'A' or maybe 'A()'?
moritz_ rakudo: my $re = rx/ a(b)c /; say 'fooabced' ~~ /oo<cap=$re>/; say $<cap>[0] 08:47
p6eval rakudo 5ac20e: OUTPUT«ooabc␤b␤»
moritz_ \o/
rakudo: enum A <b c d>; say A.PARROT
p6eval rakudo 5ac20e: OUTPUT«Perl6Scalar->␤»
moritz_ rakudo: say Int.WHAT
masak more specifically, how do I make the type object of an anonymous class print itself as something I want to print it as?
p6eval rakudo 5ac20e: OUTPUT«Int()␤»
08:48 am0c^ joined
masak hm, s/specifically/generally/ 08:48
sorear when you find out, let me know 08:49
stringifying type objects baffle me generally
moritz_ in rakudo, there's a role that's mixed into type objects
which controls stringification
masak how? where?
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
moritz_ masak: not sure; I'm just parrotting what jnthn++ told me at YAPC::EU
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, Rosetta is now known as shortcircuit
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
masak huh?
moritz_ (as is currently; don't think that's spec)
masak rakudo: class A { method foo { "OH HAI" } }; say A.foo
moritz_ rakudo: class A { method Str { 'foo' } }; say ~A
masak rakudo: class A { method Str { "OH HAI" } }; say A.Str 08:52
p6eval rakudo 5ac20e: OUTPUT«(timeout)»
sorear Did someone diable p6eval echo to channel?
p6eval rakudo 5ac20e: OUTPUT«A()␤»
rakudo 5ac20e: OUTPUT«OH HAI␤»
masak rakudo: class A { method foo { "OH HAI" } }; say A.foo
p6eval rakudo 5ac20e: OUTPUT«OH HAI␤»
masak something fishy is happening there.
rakudo: class A { method Str { "OH HAI" } }; say A.WHAT 08:53
dalek ecza: d4e20e7 | sorear++ | / (5 files):
Implement :my et al in regexes
p6eval rakudo 3f6392: OUTPUT«A()␤»
sorear p6eval times out computations in real time
moritz_ masak: anyway, that's something to ask jnthn++ once he appears 08:54
masak phenny: tell jnthn! \o/
phenny masak: I'll pass that on when jnthn! is around.
masak *sigh* 08:55
phenny: tell jnthn ! \o/
phenny masak: I'll pass that on when jnthn is around.
09:02 redicaps joined 09:09 redicaps left 09:17 muixirt joined
moritz_ try.rakudo.org is unresponsive here :( 09:20
tadzik same here 09:21
downforeveryoneorjustme.com/try.rakudo.org 09:22
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.
masak phenny++ 09:25
09:29 am0c^ left
moritz_ has a hard time getting used to not include [t/spec] in the roast commit messages :-) 09:30
daxim yo moritz_, when are you putting up the fixed mu repo? 09:32
sorear "fixed"? 09:33
daxim sorear, without svn-id crap and with proper committer ids
moritz_ daxim: not sure yet; $real-life takes its toll 09:34
daxim delegate.
I did already the hard part
dalek href="https://modules.perl6.org:">modules.perl6.org: 6c8eff0 | moritz++ | web/index.tmpl:
update source location information
09:35
moritz_ daxim: I think you removed too much; the svn revisions should be available in some form in the commit message 09:36
because commit messages often refer to other svn revisions, and that leaves dangling pointers 09:37
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
moritz_ that doesn't work for the p6l and p6c archives 09:38
daxim what's that now? 09:39
moritz_ mailing lists
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:41
moritz_ disagrees. The accuracy of meta data decreases with distance 09:42
daxim how can this possibly be true? prove it 09:43
moritz_ it's easier to forget the mapping table if it's elswhere 09:44
when you do a history rewrite
(which is what we're doing at the moment)
sorear What could possibly be the point of separate publishing of svn ids?
09:44 wooden joined
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'
sorear The point of a VCS is to centralize metadata. 09:46
That's why git has revision properties.
Or are you just allergic to RFC-822 and everything that uses it? 09:47
daxim :-|
09:55 rgrau left
makkksimal how is the default destructor called? 09:56
moritz_ new 09:57
TypeName.new(attribute => value, attrib2 => value2 )
tadzik destructor 09:59
moritz_ oh
moritz_ can't read
DESTROY
but rakudo doesn't call it yet
sorear out
tadzik how about END? :) 10:00
sorear it's unlikely the default destructor will ever be used as designed
it's really a relic of a refcounted world and needs revision to deal with GCs
10:03 awwaiid left, QinGW left 10:04 am0c^ joined
makkksimal and i thought i might need another cup of coffee :). thanks for the info. 10:05
10:05 awwaiid joined
makkksimal so the way to destroy objects is to manually declare and call DESTROY()? at least it seems to do what i expected 10:10
moritz_ if you want all destructors to be called, use $obj.*DESTROY() 10:11
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 :-)
masak I find that way of programming slightly capricious. 10:14
oh well, I guess the DESTROY methods could be coded defensively to only do things once.
but it feels philosophically wrong to manually call a captital-letters submethod. 10:15
moritz_ that's what they call a workaround :-)
masak oh, I've heard of those. somewhere. 10:16
lunch &
tadzik rakudo: try { "foobar".index: "asd"; CATCH { say "ok" } } 10:18
p6eval rakudo 3f6392: ( no output )
tadzik rakudo: "foobar".index: "asd" 10:19
p6eval rakudo 3f6392: ( no output )
tadzik hmm, dies aloud in REPL
moritz_ because it tries to strinfiy the return value
try
tadzik wklej.org/id/389208/
moritz_ "foobar".index: "asd"; 1
tadzik hmm 10:20
oh-key 10:21
10:21 Mowah joined 10:23 osfameron left
moritz_ which document should spec the default metaclass API? S12? or a new document? 10:25
LaVolta bye #perl6, see you tomorrow 10:28
10:28 LaVolta left 10:35 aesop left 10:36 Zapelius joined 10:37 cmadsen1 joined, kst` joined, cmadsen left 10:39 wooden left, aesop joined, kst left 10:40 wooden joined, wooden left, wooden joined
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
meanwhile the same version/checkout works fine on osx
It started ~1-2months ago and still exists with rakudo compiled just a few moments ago (updating debian/linux now in background)
gfldex Zapelius: how did you install rakudo? 10:44
Zapelius git + svn checkout
gfldex find parrot_install/ and remove it 10:45
then rebuild
Zapelius ok, thanks
10:50 am0c^ left 10:54 am0c^ joined
Zapelius works now :) 10:59
gfldex :) 11:01
11:09 envi^home joined 11:18 constant left 11:21 constant joined, constant left, constant joined 11:41 testilbot left 11:43 REPLeffect left 11:44 am0c^ left 11:45 s1n left 11:47 nadim left 11:49 nadim joined 12:00 satyavvd left 12:05 tadzik left
moritz_ anybody happens to know which ticket tracks CATCH { die() } recursing infinitely? 12:05
masak I can find it for you. 12:06
moritz_ that would be nice, as an additional reference for www.perlmonks.org/?node_id=860206
rt.perl.org/rt3/Ticket/Display.html?id=63430 seems similar 12:07
masak moritz_: ok, I found three. you'll have to decide if anyone of them applies: rt.perl.org/rt3/Ticket/Display.html?id=68728 rt.perl.org/rt3/Ticket/Display.html?id=64262 rt.perl.org/rt3/Ticket/Display.html?id=63430
12:10 jferrero joined
moritz_ masak: thanks. It's the second that describes it best, and I've re-opened it because the test fails 12:10
masak moritz_++ 12:11
moritz_ I remember that the patch which "fixed" it was reverted
because pmichaud++ said it caused other trouble, and it's the wrong fix anyway
or something like that
12:14 lamstyle joined 12:21 toebu joined
toebu from a class method, how do I call the same method in the parent class ? 12:22
12:22 sftp joined
moritz_ of which parent class are you talking? there could be several 12:23
in general you want nextwith($signature) or nextsame(), thought it's not always a method from a superclass
takadonet morning all 12:24
masak takadonet: \o 12:25
12:26 Italian_Plumber joined
toebu reading up on nextwith 12:28
thanks ... callsame was what I was looking for ... 12:31
12:33 bluescreen joined 12:34 am0c^ joined 12:38 patspam joined 12:41 plainhao joined 12:43 am0c^ left
pmichaud good morning, #perl6 12:56
moritz_ good morning, pm 12:57
takadonet pmichaud: morning 12:58
masak morning greetings, pmichaud 12:59
12:59 daemon joined
pmichaud I might be able to fix (or at least provide a workaround for) RT #64262. 13:01
13:02 awwaiid left
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?"
without looking up the caller chain 13:07
13:12 satyavvd joined, Kodi joined, jhuni left
mathw pmichaud: sub am-in-this-blocks-dynamic-scope(Block $b --> Bool) { return (Bool::True, Bool::False).pick(1); } 13:15
pmichaud mathw: :)
masak mathw: Bool.pick
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␤␤»
moritz_ rakduo: say ~Bool.pick for ^10
masak :(
moritz_ rakudo: say ~Bool.pick for ^10
p6eval rakudo 3f6392: OUTPUT«Bool()␤Bool()␤Bool()␤Bool()␤Bool()␤Bool()␤Bool()␤Bool()␤Bool()␤Bool()␤»
masak ENYI 13:17
13:17 Patterner left
moritz_ since Bool isn't a proper enum, I guess it must be added by hand for now 13:17
mathw giggles 13:18
13:18 Psyche^ joined, Psyche^ is now known as Patterner
mathw pmichaud: or did you want correctness too? 13:18
pmichaud augment class Bool { method pick(...) { (Bool::True, Bool::False).pick(...) }
moritz_ pmichaud: that's what I'm writing right now :-) 13:19
except that I don't see the need to fully qualify True and False
mathw I'm fairly sure last time I checked Rakudo required that, but that was aaaages ago 13:20
so hopefully it doesn't now
moritz_ rakudo: say True
p6eval rakudo 3f6392: OUTPUT«1␤»
mathw Anybody want to do a firewalk? Proximity to Nottingham, UK is a plus :) 13:21
colomon firewalk? 13:22
masak mathw: I think you're confusing #perl6 with #myfeet_ow_ow_ow
moritz_ only knows firewalls
mathw I have accomplished my task 13:24
I asked...
;)
13:24 timbunce_ joined
mathw Got two people from work coming 13:25
Should start on local friends. Is a first date too early to invite someone to something that crazy? :D
masak mathw: someone at work asked you to make someone from #perl6 do a firewalk?
mathw masak: no it's something my aikido school is doing, they want us to invite everyone, so I did
masak :)
13:26 timbunce left, timbunce_ is now known as timbunce
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...
but it would be different
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
I'd have wanted to start a week later if it was me...
masak tough first day.
moritz_ rakudo: my $x = enum <a b c>; say $x.pick.perl
p6eval rakudo 3f6392: OUTPUT«"b" => 1␤»
masak \o/
mathw but maybe it's a condition of employment or something :)
masak: \o/
moritz_ is that spec? that it returns a Pair? 13:28
masak I don't think so.
moritz_ rakudo: my $x = enum A <a b c>; say $x.pick.perl
masak I think it should stringify.
p6eval rakudo 3f6392: OUTPUT«Use of uninitialized value in numeric context␤Use of uninitialized value in numeric context␤()␤»
mathw named enums are still weird
moritz_ rakudo: my $x = enum A <a b c>; say $x
p6eval rakudo 3f6392: OUTPUT«()␤»
masak moritz_: oh wait. you did it on an anon enum.
moritz_: then it's spec.
moritz_ uh. Named and anonymous differ? 13:29
masak yes.
moritz_ when calling .pick on it?
mathw well there's no name for the element
masak moritz_: I don't know about that.
moritz_: it's a very good question.
let's find out.
moritz_ mathw: huh? it's not the elements that are anonymous
masak according to the spec, an anon enum is basically an EnumMap.
muixirt some spec tests run "forever" 13:30
moritz_ muixirt: some take long. 'make quicktest' excludes those
at least on my machine none actually loops
mathw moritz_: an anonymous enum exports its elements into the scope? hmm 13:31
moritz_ mathw: that's not what I said
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 ->
muixirt moritz_: more than 15 min?
moritz_ muixirt: don't think so 13:32
muixirt: is your copy of t/spec still an svn repository?
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
muixirt moritz_: oops! 13:33
moritz_ we should really have a fatal error in 'make spectest' if t/spec/ is svn
muixirt: you're not the first one :-)
muixirt thanks moritz_ 13:34
13:36 Zapelius left
moritz_ it's the changed series tests that hang 13:37
13:38 zulon joined
moritz_ well, spec and implementation changed, but the tests in pugs svn did not 13:39
muixirt perl6 is a fast moving target for the occational lurker :-) 13:41
masak muixirt: that's why it's important to get involved. 13:42
moritz_ well, the repo move was much faster than planned :(
Kodi is grateful for the switch to Git, though. 13:44
moritz_ it does make some things easier 13:45
actualy I'm surprised how little fallout it caused so far
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:47
dalek ast: d94794a | moritz++ | S32-io/note.t:
unfudge .note test for rakudo
13:49
kudo: a15b2b1 | moritz++ | src/core/Bool.pm:
implement Bool.pick
13:50
kudo: 52bf6f3 | moritz++ | docs/ChangeLog:
update ChangeLog
pmichaud ....why is the first argument to .pick constrained to Cool? 13:51
moritz_ because we know how to use Cool objects as numbers 13:52
as integers, to be exact
pmichaud we wouldn't accept any non-Cool number, even if it knows how to do operate properly with math ops?
moritz_ class A { }; (1..10).pick(A.new) # what should that do, if not dispatch fail?
pmichaud: if we had the Integer role, we'd probably have a candidate that accepts Integers 13:53
13:53 icwiener joined
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.
masak why not? 13:55
pmichaud do we also have a version of .pick that takes a Numeric argument?
moritz_ I wouldn't know how to implement that
<a b c>.pick(2.3 + 4i) # huh?
pmichaud my preference would be to do something like 13:56
method pick($n as Int = 1, ...) { ... }
and then let the coercion to Int fail
moritz_ rakudo: say (2.3 + 4i).Int
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␤»
moritz_ rakudo: class A { }; say +A
p6eval rakudo 3f6392: OUTPUT«Use of uninitialized value in numeric context␤0␤»
moritz_ rakudo: class A { }; say A.Int
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
p6eval rakudo 3f6392: OUTPUT«0␤»
moritz_ oh.
so the Cool case doesn't allow *
pmichaud that too
it just feels like an incorrect constraint. 13:58
colomon Spec says .pick takes Int, for what that's worth 13:59
pmichaud Spec is wrong.
@list.pick('3') should work.
masak hehe: twitter.com/rhruiz/status/24566110570 twitter.com/carlmasak/status/24566424988 twitter.com/rhruiz/status/24571541080 twitter.com/carlmasak/status/24572006873 14:00
pmichaud: I agree.
gottreu so spectest works for rakudo, but not the rakudo star distribution?
moritz_ masak++ 14:01
masak :)
pmichaud gottreu: I think that the spectest that rakudo star uses isn't sync'd.
i.e., rakudo star currently grabs the latest copy of spectests, which may have changed since the time of the release.
(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
lowers the burden on the release manager
dalek kudo: 15c3f75 | moritz++ | src/core/Bool.pm:
remove Cool type constraint from Bool.pick

It doesn't allow a Whatever-star, so it's certainly wrong. It now let the re-dispatch to Parcel.pick do the type check or coercion, if any.
14:03
pmichaud moritz++ # much better to let Parcel.pick handle it
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?
moritz_ colomon: I just added Bool.pick 14:05
if we had tests for it, we didn't run them
colomon ah! 14:06
rakudo: say (1..10).pick(*).munch(10).perl
p6eval rakudo 3f6392: OUTPUT«(10, 9, 6, 8, 5, 3, 2, 7, 4, 1)␤»
colomon rakudo: say (1..10).pick(*, :replace).munch(10).perl
moritz_ only infinite with :replace
p6eval rakudo 3f6392: OUTPUT«(7, 3, 2, 7, 7, 4, 6, 8, 8, 9)␤»
colomon rakudo: say (1..10).pick(*, :replace).munch(20).perl
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
14:07 aloha left, bacek left
colomon ah. 14:07
so you created the problem and then fixed it, too. :) 14:08
moritz_ right
14:09 uniejo left 14:10 bluescreen left
colomon pmichaud: any idea if progress has been made getting the parrot profiler to run on rakudo again? 14:10
pmichaud colomon: afaik, no progress. 14:11
jnthn o/
phenny jnthn: 08:55Z <masak> tell jnthn ! \o/
14:11 agentzh left
jnthn ...informative message is informative... :-) 14:11
14:12 aloha joined
masak jnthn: um. anon classes! stringification! how? 14:12
jnthn Same as normal classes, no?
masak how how how? :) 14:13
jnthn rakudo: my $c = class { method Str() { "lol" } }; say ~$c.new
p6eval rakudo 3f6392: OUTPUT«lol␤»
jnthn There.
moritz_ jnthn: not objects, classses
jnthn oh
moritz_ rakudo: my $c = class { method Str() { "lol" } }; say ~$c
p6eval rakudo 3f6392: OUTPUT«()␤»
masak :(
dalek odel: 5ed61d6 | jnthn++ | parrot/src/metamodel/repr.h:
All methods in the representation API should get PARROT_INTERP.
odel: 05a08a5 | jnthn++ | parrot/src/metamodel/repr.h:
Fix pointer-o.
odel: b6d5448 | jnthn++ | parrot/src/metamodel/reprs/KnowHOW. (2 files):
Start to stub out KnowHOWREPR in the Parrot implementation.
odel: e86a007 | jnthn++ | java/ (18 files):
Merge branch 'master' of github.com:jnthn/6model
masak pmichaud: that must've been why I did .new on the anon class in my enums patch.
jnthn Well, you can't at the moment.
Well, you can if you manually put it together with ClassHOW 14:14
Anyway, that's one thing that'll be fixed in the new meta-model
Basically
pmichaud I don't understand "anon class stringification"
jnthn method Str() { "loll" } # objects and classes stringify to lol
method Str($?CLASS:D) { "loll" } # objects stringify to lol 14:15
And :U just to set how the type object does
pmichaud: s/class/type object/
pmichaud that I understand a bit better, yes.
jnthn But at the moment there's not a way to twiddle it by overriding Str 14:16
(for type objects)
14:16 jferrero left
jnthn 'cus of the role mixin thingy we do. 14:16
(That's one thing that the new meta-model impl drops)
masak so essentially, there's no way to do that right just now. 14:17
jnthn no
Not without using ClassHOW directly.
masak wonder if there's any easy workaround.
dalek ast: d71f4c3 | moritz++ | S02-builtin_data_types/bool.t:
Bool.pick
14:18
14:20 bacek joined, satyavvd left
jnthn pir::setattribute($c.HOW, 'shortname', $name) # may work, but WILL break when the new meta-model lands. 14:21
masak ok. 14:22
will try. thanks.
jnthn np 14:23
14:24 bluescreen joined 14:25 alksentrs joined, patrickas joined
patrickas o/ 14:25
masak++ hug-a-troll
moritz_ \o patrickas
patrickas moritz_++ thanks for the suggestion yesterday! 14:26
timbunce is there a url for a smolder instance running the perl6 test suite? 14:27
moritz_ timbunce: tinyurl.com/rakudosmoke before it broke down 14:28
patrickas: www.perlfoundation.org/contributor_..._agreement
patrickas moritz_ I printed but got surprised it had to be mailed not faxed
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
masak stuff-- 14:35
14:37 spq1 joined
jnthn train change time, bbl 14:39
14:39 yoasif left 14:43 timbunce left, timbunce joined
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:47
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
14:48 jaldhar left
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? :-)
masak moritz_: I guess I deserved that :)
TimToady gives masak permission before he asks for forgiveness, just to mess things up 14:49
14:49 risou joined
masak whoa. so now I essentially have *both* permission and a cultural promise of forgiveness? groovy. 14:49
TimToady it's not exactly an indulgence 14:50
masak :D
TimToady I wish there was something shorter than age-in-days-since-modification 14:51
14:51 yoasif joined
moritz_ masak: you have permission, and are encouraged to ask for forgiveness 14:51
pmichaud 'untouched-since'
TimToady that would return a date, not an age
pmichaud right
I'm just branestormin
moritz_ hey, we have Durations now
masak there's already a 'modifytime' method in IO::Stat. 14:52
someone++
moritz_ just have it return an Instant
masak nod.
pmichaud 'staleness'
masak makes it so
pmichaud 'freshness'
TimToady bugs me that modify is a verb
masak 'age'
pmichaud age implies "since birth", not "since change" though 14:53
moritz_ age refers to creation, not modification
TimToady since mod is the usual one, we could give that the Huffman nod
masak 'lastmod'
TimToady again, seems to imply a date
pmichaud 'touchage'
'modage'
'agemod'
masak 'touchmod' 14:54
TimToady at one point we had mage, cage, and uage
moritz_ TimToady: I don't see why we shouldn't return an Instant
but rather a time difference
that way we also avoid the clumsy since-start-of-script thing
14:54 justatheory joined
masak +1 14:54
pmichaud .created, .modified, .accessed 14:55
TimToady if you want to compare two ages, they have to share the same "epoch"
masak we have a winner.
pmichaud++
TimToady those are fine for returning the instant
masak that's all I need. 14:56
moritz_ TimToady: I don't see a problem with needing a common Epoch
pmichaud age is then now - .created, yes?
TimToady that's bad
masak ooc, what's the difference between 'modifytime' and 'changetime' in IO::Stat?
TimToady ctime is when the inode changed, such as for a chmod 14:57
mtime doesn't track that
you can't calculate in terms of age if now is different between the two .modified calls 14:58
that's why P5 bases -M on the start time of the script
"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.
TimToady that being said, ages were mostly in there for emulating find(1)
14:59 Kodi left
moritz_ don't forget those .IO methods :-) 15:00
masak I'm on it.
the use case I have right now only needs to compare Instants.
moritz_ access time must die!
masak basically, I only want to regenerate/upload things if the files compare in such a way that it turns out to be necessary.
moritz_: sorry, what? 15:01
TimToady eh? I use access time all the time
well, some of the time :)
every now and then...
masak practically never. 15:02
moritz_ masak: access time stores the last time somebody opens or reads a file
masak rakudo: say "README".IO.stat.modifytime # can someone tell me how to go from this to an Instant?
moritz_ masak: which means that every read access also causes a write access. Yow.
p6eval rakudo 15c3f7: OUTPUT«1284330623␤»
masak moritz_: that sounds... less than optimal. :/ 15:03
moritz_ masak: it is. Which is why I say it must die :-)
TimToady it's cached in memory most of the time
moritz_ except when not :-)
TimToady ignorance is not always bliss 15:04
masak Instant.from-posix ? is that a POSIX time I have above?
if so, it's pretty easy :)
moritz_ masak: I'd say try it out, and comare with the time that ls -l shows 15:05
masak hokay.
TimToady I think the main thing we need to do is make sure we've recorded the script start Instant somewhere
masak even if it's not strictly correct, it'll yield an Instant and probably work for my use case. :P
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
masak bah, overgeneralization.
TimToady besides, it's already specced 15:07
masak oh!
TimToady S28:202
rakudo: say $*INITTIME
p6eval rakudo 15c3f7: ( no output )
pmichaud it can be added. 15:08
TimToady well, shouldn't be human readable output anyway
moritz_ rakudo: say now
p6eval rakudo 15c3f7: OUTPUT«(DateTime.new(year => 1970).Instant + 1284561988.27251)␤»
pmichaud "There will be patches."
moritz_ rakudo: say now + 1
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␤»
moritz_ std: now ~~ 1
p6eval std : OUTPUT«ok 00:01 116m␤»
moritz_ it's parsed as a term 15:09
so we should do that too :-)
std: now()
p6eval std : OUTPUT«===SORRY!===␤Undeclared routine:␤ 'now' used at line 1␤Check failed␤FAILED 00:01 114m␤»
pmichaud now patching 'now', 'time', etc.
TimToady std: now now
p6eval std : OUTPUT«===SORRY!===␤Two terms in a row at /tmp/BUKw3gaf3q line 1:␤------> now ⏏now␤ expecting any of:␤ bracketed infix␤ infix or meta-infix␤ statement modifier loop␤Parse failed␤FAILED 00:01 116m␤»
pmichaud std: there there 15:11
p6eval std : OUTPUT«===SORRY!===␤Undeclared routine:␤ 'there' used at line 1,1␤Check failed␤FAILED 00:01 115m␤»
TimToady std: constant there = 42; there there
p6eval std : OUTPUT«===SORRY!===␤Two terms in a row at /tmp/1RzyGFsIQv line 1:␤------> constant there = 42; there ⏏there␤ expecting any of:␤ bracketed infix␤ infix or meta-infix␤ statement modifier loop␤Parse failed␤FAILED 00:01 117m␤»
pmichaud std: rand() 15:20
p6eval std : OUTPUT«===SORRY!===␤Unsupported use of rand(); in Perl 6 please use rand at /tmp/qbDg6wWYrS line 1:␤------> rand⏏()␤Parse failed␤FAILED 00:01 114m␤»
pmichaud std: time()
p6eval std : OUTPUT«ok 00:01 114m␤»
pmichaud hmmmm.
stdbug? 15:21
TimToady what is this "time" of which you speak?
pmichaud =head1 C<time>
Returns the current POSIX time as an C<Int>. Use C<now> for an
epoch-agnostic measure of atomic seconds (i.e., an C<Instant>).
(S32)
Saying C<time()> doesn't work unless you happen to have a function
of that name defined.
TimToady hmm 15:22
pmichaud and STD.pm6 defines term:sym<time>
15:22 rindolf joined
TimToady overridden by CORE, it seems 15:22
not sure which way is better to fix it 15:23
people are used to writing time()
masak "overridden by CORE" sounds like a deus-ex-machina happy ending to a budget-style animated adventure.
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!
TimToady and we'd kinda like to discourage casual use of time() anyway 15:25
pmichaud We can always define time() as sub time() { fail 'What is this "time" of which you speak?" } 15:26
s/k."/k.'/
er
nm.
TimToady Failure()
I guess I'll leave time as a term for now. 15:27
rindolf TimToady: what we will write now instead of time() ?
pmichaud rindolf: yes.
:-)
rindolf pmichaud: my $timestamp = yes()? 15:28
rokoteko rindolf: now. :)
pmichaud rindolf: my $timestamp = now;
exactly as you said :)
rindolf pmichaud: ah.
pmichaud: well, that's not what I meant.
pmichaud "we will right <now> instead of <time()>" :-P
*write
grrr
rindolf I meant what will we write for Perl 6 instead of Perl 5's time() ? 15:29
pmichaud right.
TimToady I have deleted time() from STD's CORE
pmichaud and we will write "now" :)
TimToady so it's now a term, and we'll rely on the huffmanization of now to encourage its use
pmichaud and time() will fail with "Undeclared routine"?
TimToady yes 15:30
maybe we should have a mandatory warning if they say 'use POSIX;' :)
masak four new IO methods added. I already know that .modified works for my purposes.
TimToady Instant success. 15:31
1) Profit!!!
pmichaud Instant gratification :)
TimToady wait, shouldn't that be 0) Profit!!! ?
masak 哈哈 15:32
pmichaud my Instant $coffee; # when we get our break
TimToady 吼吼 15:33
or maybe 齁齁
15:33 Holy_Cow joined 15:35 Ross^ joined
dalek kudo: 5507cf6 | masak++ | src/core/IO.pm:
[core/IO] created/modified/accessed/changed methods

Not spec yet, but the spec sounded very non-committal, and I need those methods now. :)
15:35
masak just to make moritz_ happy, I'll add them to the ChangeLog too :)
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:39
15:40 cjk101010 left
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
I'm not that picky
masak TimToady++ # groan 15:41
flussence .grab? 15:43
TimToady no, that's the mutable pick
gottreu .swap ? 15:45
15:45 aesop left
TimToady .repick maybe 15:46
and defaults to .repick(*)
masak I'd like a nice verb that already exists.
TimToady .multipick
masak that already exists. 15:47
pmichaud .nitpick
masak :)
.pick is nice because you feel that it doesn't put things back.
15:47 Kodi joined, wolverian left
masak some verb that indicates that you put things back would be the best. 15:47
dalek kudo: 323a672 | masak++ | docs/ChangeLog:
[ChangeLog] new IO methods
pmichaud or some verb that indicates you select without taking
TimToady it's a pretty complicated action to find a verb for
yes, that's more likely
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"
masak .pick and .choose :)
gottreu .exchange ? .interchange? .substitute?
TimToady I could live with .choose :)
masak \o/
it's Strangely Consistent!
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
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
TimToady
.oO(Texans...)
15:49
pmichaud *thick hispanic accent
my typing has gone sooooo far downhill over the last few years. :(
I blame Perl 6. :)
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:50
15:51 supernovus joined
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
flussence wait, what's Array.rand?
oh, indexes 15:52
15:52 aesop joined
TimToady ja 15:52
flussence the floating-point numbers were confusing me for a minute
masak TimToady: what's your reason for having the default of .choose be * ?
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"
flussence having it * lets something higher up the chain decide how many it wants, I guess?
masak same could be said for .pick 15:54
TimToady that's true of any lazy list
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? :( www.activestate.com/blog/2010/04/wh...s-perl-512
it must be terribly confusing to believe that.
TimToady when very often people will want @universe.choose.map: *.stuff
masak TimToady: now you're talking.
I can agree with that.
TimToady and the very fact that choose "puts back" means there's an eternal supply of it 15:56
15:56 wolverian joined
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
Kodi Ja.
TimToady though the 'rep' on the front kinda resonates with "replace" 15:58
masak never felt a deep connection with ':replace'
Kodi How about "rpick"? Too ughly?
(That was an ughly typo.)
TimToady .repick does, however, better justify defaulting to *
flussence should the non-destructive method have a shorter name than the destructive one? 15:59
masak flussence: neither .pick nor .choose is destructive.
flussence: oh, you meant .grab ?
rokoteko .select?
flussence am I understanding these right even? 16:00
TimToady .grab is semantically heavier; we don't always measure huffman in .chars space
flussence goes to read the spec again
16:01 daxim left
TimToady .repick does somewhat indicate the relationship to .pick, unlike .choose 16:02
it's uglier though
masak .choose also indicates a relationship to .pick
it's just more subtle. 16:03
16:03 wolverian left
TimToady it is heavier, indicating a heavier concept, in some sense 16:03
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?
Kodi Right.
TimToady yes, uses a grab to keep state internally 16:05
but is officially "immutable" in API
gottreu .harvest?
TimToady that implies taking away
flussence .some? 16:06
TimToady too much like a junction?
gottreu lacks basic English comprehension skills despite decades of practice.
pmichaud .select, but has the wrong database-y ideas behind it
TimToady too much history
pmichaud right
Kodi .some with a default argument of * would be really surprising. 16:07
TimToady .some implies subset
this is more like an eternal bag
Kodi .infinite is kind of nice in the case of *, but there's no clue as to the random order. 16:08
pmichaud .sample ?
TimToady looking at it sideways, it's pick-set vs pick-bag
maybe 16:09
dalek ecs: f73043b | KodiB++ | S32-setting-library/Containers.pod:
[S32::Containers] Changed the *default* default default KeyHash value to Any.

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.
rokoteko .collect :) but it sound more like .pick than .pick does. ;)
TimToady .sample has possibilities
pmichaud or even .resample ? :-)
rokoteko heh. Anyway. Nice game you are playing.. Ill be afk for a while. :)
16:09 meteorjay left
TimToady .choose(5) reads better than .sample(5) 16:10
except that .choose(5) now reads like .pick(5)
implying exclusivity
16:11 cdarroch joined, cdarroch left, cdarroch joined
TimToady .sample has the factory connotation of pulling things off the line that may be the same 16:11
16:12 zulon left
TimToady .arbitrary is a bit long 16:13
gottreu .elect ?
pmichaud "wr" is the standard statistical abbrev for "with replacement", so maybe .pickwr ?
TimToady would prefer .pick-replace if we went that route 16:14
maybe .pick-repl
moritz_ pick your REPL!
pick-copy
pmichaud or even just .pickr 16:15
moritz_ values are copied, not removed
(no, that's bad, objects aren't actually copied)
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.
TimToady .random
masak .jumble
pmichaud .random is a little close to .rand
.jumble is interesting
.mix
masak .shake 16:16
moritz_ .mix sounds like shuffle
pmichaud .shuffle :)
moritz_ so does .shake
masak .bake
moritz_ which is explicitly not with replacing
.rake
TimToady .picks
moritz_ .cake!
masak .bikeshed
moritz_ -> decommute
masak .commute
TimToady .picks implies multiple of them
pmichaud .samples ? 16:17
for @array.samples { .say } # forever
TimToady reads pretty well 16:18
pmichaud (more)
.samples($n) could mean "infinite list of .pick($n)"
i.e., @array.samples(3) would return an infinite list of parcels with @array.pick(3) 16:19
...maybe...
TimToady but then what means .pick(3, :replace)?
pmichaud ummmmmm
I dunno. :)
TimToady I don't see a big use case either
pmichaud right
anyway, @array.samples kinda gets there 16:20
I almost want it to be @array.examples but that's not quite right
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"
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
pmichaud so, might be useful someday, but still wants some better sugar coating.
@array.samples(100)[^10] # ten samples of 100 elements chosen at random from @array 16:23
of course, that's also just (@array.pick(100) for ^10) :-) 16:25
which means pick with replace is just
(@array.pick for ^3)
16:28 wolverian joined
pmichaud .randomized ? 16:29
TimToady too much like .shuffle
pmichaud still soun.... right
gottreu .draw ?
TimToady to "takey" 16:30
pmichaud .remix
TimToady *too
16:30 z-b is now known as zb
masak swimming & 16:30
16:30 masak left
pmichaud maybe we want the notion of "generator" in here somewhere 16:31
i.e., it's something that generates elements selected at random
TimToady sorta what 're' and 'multi' and -xx were aiming at 16:32
pmichaud right
.sin 16:33
no
TimToady and plurals
pmichaud .spin
like spinning a random number wheel :-)
three spins could produce the same element three times :)
TimToady .spins maybe
16:33 araujo left
pmichaud @array.spin(3) give me 3 elements from @array, with replcaement 16:34
for @array.spin { .say } # forever
TimToady .roll
.roller :)
PerlJam what happens when you roll over? :) 16:35
pmichaud .fortune ("grab one at random" :-)
TimToady spin has association with spin-locks, so that's kinda busy-sounding, which is good, I think
pmichaud .sajak "Wheel! Of! Fortune!"
TimToady .lucky :)
.wheel
pmichaud .roulette 16:36
implies randomness and repeatability all at once :)
*replaceability
(grrr)
PerlJam except for russian roulette
TimToady first *.bullet 16:37
pmichaud (1 xx 5, Failure.new).roulette # 1 in 6 chance of dying! :-)
TimToady .roulette is kinda clubby, I think I like .spin a bit better 16:38
pmichaud yeah
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.
TimToady and spinning is a continuous process
we could rename .pick to .musical-chairs
slavik2 so now the russian roulette with system is a one liner :D 16:40
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:42
16:43 tylercurtis joined
slavik2 TimToady: after the murder or before? 16:44
TimToady I suppose those would be two different stories 16:45
PerlJam I guess .rand is too obviously wrong? 16:51
gottreu is english required? Latin's .seligere? (or the more cognatious .selectus) 16:53
colomon actually, I kind of like .rand for it. 16:54
PerlJam It already has the right connotation as far as I'm concerned. 16:56
flussence @array[@array.rand(5)] makes sense to me. 16:57
PerlJam flussence: that doesn't make sense to me :)
@array.rand(5) # give me 5 elements of @array at random. 16:58
flussence The thing is, .rand already returns a random index number
PerlJam depends on what the invocant is (or should)
flussence waitaminute. 16:59
rakudo: my @a = [2, 3]; say ~(@a.rand xx 3) # probably not
p6eval rakudo 323a67: OUTPUT«0.569536720260174 0.569536720260174 0.569536720260174␤»
flussence rakudo: my @a = [2, 3]; say ~(@a>>.rand[^3]) 17:00
p6eval rakudo 323a67: OUTPUT«1.77777758119095 Any() Any()␤»
flussence bah, going down that road is ugly anyway
pmichaud note that my @a = [2, 3]; leaves @a with only one element, too :)
flussence facepalm 17:01
17:06 dakkar left
PerlJam also, if .pick and .pick(:replace) become two things, what happens to .grab ? 17:07
17:08 envi^home left
PerlJam (at the moment, I think .grab as a weighted .pick seems wrong somehow) 17:09
rokoteko .extract :) 17:11
17:11 meppl left
dukeleto howdy! 17:11
17:11 thebird left 17:13 rcfox left
flussence rakudo: my @a = 1..8; say ~({@a.rand}...*)[^5]>>.Int 17:14
p6eval rakudo 323a67: OUTPUT«2 4 7 6 6␤»
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.
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
but, I'm not quite sure of the utility there.
afk, pick up kids 17:17
17:18 Kodi left
rokoteko PerlJam: that sounds like .derive($n, &sub) :) 17:18
dalek ast: 8e4955e | KodiB++ | S02-builtin_data_types/ (2 files):
Added tests for Sets and Bags.
17:19
17:19 Alias_ left 17:21 envi^home joined, Chillance joined
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 community.livejournal.com/shlomif_t...46303.html ?
TimToady @die.roll(3)
moritz_ rindolf: you have a double-escape > in that post 17:31
rindolf: and I don't understand the connection between that PDL snippet and the subs afterwards
TimToady what does it do? 17:32
rindolf moritz_: it's not a double escape - it's a missing ampersand.
moritz_: fixed now. 17:33
moritz_ rindolf: you have markup fuckup in your post. Better? :-)
s/have/had/
TimToady as far I can read it, it's some kind of grep on either the indexes or the values
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?
to the closure
rindolf TimToady: what left of the ->with 17:35
flussence rakudo: say ~Buf.^methods; # why does this return "7" on my machine?
p6eval rakudo 323a67: OUTPUT«7␤»
TimToady rindolf: I don't believe you, because if that were true, you wouldn't need a closure
rindolf TimToady: ->with operates on a value and yields an expression based on it.
TimToady the "a value" isn't just the left side
rindolf TimToady: 5->with(sub { $_ * $_ } ) will be 25. 17:36
TimToady why do you need application
rindolf For a small example.
TimToady: because I'm too lazy to assign it to a variable.
17:37 jedai left
TimToady well, in theory you could do 5 R. ({$_ * $_}) 17:38
rakudo: say 5 R. ({$_ * $_})
p6eval rakudo 323a67: OUTPUT«===SORRY!===␤Confused at line 22, near "say 5 R. ("␤»
supernovus Exemel updated, now with better grammar and spelin.
phenny supernovus: 08:21Z <masak> ask supernovus mind adding github.com/supernovus/exemel to github.com/perl6/ecosystem/blob/mas...jects.list ?
TimToady but map will work here for scalars 17:39
rakudo: say 5.map: * * *
p6eval rakudo 323a67: ( no output )
TimToady rakudo: say 5.map({$_ * $_})
17:39 jedai joined
p6eval rakudo 323a67: OUTPUT«25␤» 17:39
tylercurtis rakudo: say 5.:<**>(2) 17:40
p6eval rakudo 323a67: OUTPUT«===SORRY!===␤Confused at line 22, near "say 5.:<**"␤»
tylercurtis std: say 5.:<**>(2)
p6eval std : OUTPUT«ok 00:01 116m␤» 17:41
TimToady rakudo: say 5.&[**](2) 17:43
p6eval rakudo 323a67: OUTPUT«25␤»
17:44 s1n joined
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.
TimToady rakudo: say .(5) given * * *;
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␤»
TimToady right
rakudo: say .(5) given * ** 2 17:46
p6eval rakudo 323a67: OUTPUT«25␤»
TimToady here we go 17:47
rakudo: 5.&(* ** 2).say
p6eval rakudo 323a67: OUTPUT«===SORRY!===␤Non-declarative sigil is missing its name at line 22, near "&(* ** 2)."␤»
TimToady std: 5.&(* ** 2).say
p6eval std : OUTPUT«ok 00:01 120m␤»
TimToady rakudo: 5.$(* ** 2).say
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
rakudo: say (1..6).item.map(~*) 17:50
p6eval rakudo 323a67: OUTPUT«123456␤»
TimToady rakudo: say (1..6).list.item.map(~*) 17:51
p6eval rakudo 323a67: OUTPUT«123456␤»
17:51 uniejo joined
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
rakudo: say (1..6).flat.item.map(~*)
p6eval rakudo 323a67: OUTPUT«123456␤»
17:51 cognominal joined
moritz_ supernovus: you have now commit access to perl6/ecosystem 17:52
(and a few other repos, like test suite, module.perl6.org etc.)
supernovus moritz_: thanks :-) 17:53
17:54 risou left
rokoteko is there an unicode or latex character for Mu? 17:55
flussence µ?
gottreu i'd bet there are many Mu's in unicode...or at least 2 17:56
TimToady
rokoteko erm. whats that in hex?
TimToady .u 無
phenny U+7121 CJK UNIFIED IDEOGRAPH-7121 (無)
gottreu and i'm not even meaning case-wise
flussence .u 2205
phenny U+2205 EMPTY SET (∅)
TimToady rakudo: say Set ~~ Mu, Mu ~~ Set 17:57
p6eval rakudo 323a67: OUTPUT«10␤»
flussence oh, there's more of these than I thought...
TimToady a Set has semantics; Mu just exists
flussence .u 2400
phenny U+2400 SYMBOL FOR NULL (␀)
flussence can't find one for "undefined" though.
rokoteko flussence: well *that's* obvious. 17:58
TimToady but Mu is also undefined because it's the "or doesn't exist" part of 有無 "umu"
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.
TimToady arguably the top type should be 有 and the bottom type should be 無
then everything would derive from Oo rather than Moo 18:00
18:01 justatheory left 18:02 envi^home left
gottreu .u 00b5 18:02
phenny U+00B5 MICRO SIGN (µ)
gottreu .u 03BC
phenny U+03BC GREEK SMALL LETTER MU (μ)
TimToady .u 𝞵 18:03
phenny U+1D7B5 MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL MU (𝞵)
TimToady those mathematicians have a lot to answer for...
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?
gottreu: yes, but where would you stop? 18:05
and what shape would you put around them?
I use circled nums for up to 20
flussence has seen a set with up to 9
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.
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..
TimToady well, obviously 1..12 should have a pentagon around it
rokoteko probably would need atleast 3d characters at that point. 18:08
TimToady 1⃤
that's obvsiously from 1..20
rokoteko .u 1􏿽xE2C􏿽xA4
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)
rokoteko .py ? 18:09
TimToady actually, I think most icosohedral dice go 0..19
phenny SyntaxError: unexpected EOF while parsing (<string>, line 1)
TimToady rokoteko: your UTF-8 is broken
.u 1⃤
phenny U+0031 DIGIT ONE (1)
U+20E4 COMBINING ENCLOSING UPWARD POINTING TRIANGLE (⃤)
gottreu TimToady: not the AD&D dice i've seen
TimToady most of the ones I've seen have 00 instead of 20, and you can use them either way 18:10
no enclosing pentagon though :/ 18:11
rokoteko U+20E4 I dont seem to have font for.
TimToady maybe that's just as well, considering how magical people think text is already...
your browser might
slavik2 TimToady: thedailywtf.com/Articles/Very-Speci...rings.aspx 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)
TimToady oh, right, finnish...
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.
TimToady one can just as easily treat 20 as 0, I suppose
mostly I think people ignore the first digit when they want a 10s multiplier anyway 18:14
rokoteko IllvilJa: do you collect dices? 18:15
TimToady douses
colomon TimToady: I'd wager these days, most people who want a 10s multiplier use a d10 instead of a d20. ;)
PerlJam back.
rokoteko IllvilJa: have you yet decided what are your odds for getting the collection you wished to have when you began?
TimToady mice, mouse, lice, louse...
dice, douse
gottreu spice, spouse 18:16
PerlJam so ... @array.roll(7) ?
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)
TimToady picture a Day-sided die...
Day.roll(3) # Tue, Sat, Mon
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.
colomon hasn't seen any of his dice since his move. : ( Of course, he hasn't had call to use them, either. :( :(
PerlJam so, does .grab keep its :replace ?
IllvilJa TimToady: a sevensided barrel dice would be cool for making "weekday rolls". 18:18
TimToady PerlJam: it's already gone
PerlJam ah
TimToady (from spec)
anyone wants to split pick into pick-n-roll, feel free :) 18:19
groceries &
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:20
sorear good * #perl6 18:21
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
Once I get some spare time, I'll kick the Perl6 tires by (trying to) write some minimalistic game.
18:28 supernovus left 18:36 timbunce left
dalek osystem: 68d8e43 | supernovus++ | projects.list:
Added exemel to projects.list
18:38
colomon guh, there are .pick methods all over the source now. 18:39
18:42 cottoo left, molaf left 18:43 cotto joined
jnthn made it back home :-) 18:44
takadonet \o/ 18:45
18:48 araujo joined
slavik2 jnthn: dang it, I'll have to hire better mercenaries next time :P 18:50
nose.pick() ? 18:51
jnthn oh nose, that's disgusting... :P 18:53
sorear jnthn: mind explaining to me how class stringification is supposed to work? 18:54
niecza: say Num;
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
..SAFE.Str_10…
jnthn sorear: It falls out of multi-method dispatch. 18:59
18:59 molaf joined
jnthn sorear: In Object there should be a multi method Str(Mu:U :) { self.^name } # or some such 18:59
moritz_ so normal methods default to :D ? 19:02
jnthn Either that or for ones where it matters you should declare 'em that way
I'm kinda fine with that for ACCEPTS
It's uppercase and so you should know what you're doing
Less comfortable we make people do it for .Str though. Maybe the default should be :D 19:03
sorear 'Object'?
jnthn sorear: er, Mu :-)
sorear TimToady says ACCEPTS is probably a my multi sub, fwiw
jnthn ...guess I smoked too much C# of late
sorear: lol
sorear: That's the first time I've heard that :/
rindolf jnthn: why are you using C#? 19:04
jnthn: I don't think it's bad, but I'm just curious.
sorear I was asking about the given -> jumptable optimization & how the compiler needs to be able to know about ACCEPTS stuff at compile time
jnthn rindolf: Use it at $dayjob, also using it for prototyping stuff at the moment
diakopter rindolf: should he rather use F# or VB.net? :P
sorear he said it was either very magical, or maybe not a method at all
jnthn Hmm
rindolf diakopter: VB.net! 19:05
19:05 icwiener left
jnthn rindolf: Noooo! 19:05
rindolf jnthn: yes!
jnthn does not like VB syntax :-)
rindolf forces jnthn to use VB.NET.
Because I'm Sadistic.
jnthn quits programming and goes to work at McDonalds to avoid the VB.Net 19:06
rindolf Heh.
diakopter McDonalds hires many many programmers
as programmers, I mean. 19:07
jnthn Maybe McDonalds is just a company full of VB haters who like cheezburger.
diakopter oracle/java, based on their job postings 19:09
& cobol 19:10
moritz_ oh noes
rindolf It's been rumoured their PoS systems used to run SCO UNIX. 19:13
PerlJam Anything running SCO unix is a PoS ;> 19:16
lucs Acronym collision!
:)
PerlJam #perl6 is all about the pun
19:17 plainhao left
slavik2 didn't sco go out of business? 19:17
officially?
moritz_ out of UNIX business, long ago
they've been doing some laywer business since then 19:18
19:18 wamba left 19:21 meinwald left, slavik joined 19:24 uniejo left 19:27 meinwald joined 19:28 meinwald is now known as Guest9777
sorear makes a note to add jaw-breaking, ground-dropping performance improvements to niecza 19:34
pmichaud sorear++
19:39 Holy_Cow left 19:40 REPLeffect joined
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␤»
TimToady rakudo: say (1 / 0).WHAT 19:43
p6eval rakudo 323a67: OUTPUT«Rat()␤»
19:43 tylercurtis left 19:46 Chillance left 19:47 Chillance joined
dukeleto I just added a smolder project for rakudo at : smolder.parrot.org/app/projects/smoke_reports/5 19:49
19:49 meppl joined 19:57 alksentrs left
dalek ecs: 8ecf53a | TimToady++ | S32-setting-library/Containers.pod:
[Containers] split pick into pick and roll
19:58
19:59 Italian_Plumber left
TimToady phone 20:00
pmichaud omw 20:03
diakopter omw nomw nomw nomw 20:06
sorear diakopter does teh meetings too now? 20:09
20:10 Italian_Plumber joined
TimToady nope 20:11
20:12 alksentrs joined
colomon whatever happened to chromatic's writeups on the meetings? seems like I haven't seen one in months... :( 20:13
20:15 kuzuha left
sorear he does them only on request now 20:15
ping him in #parrot if you want some
TimToady chromatic++ blames it on the use.perl snafu, at least in part
we're discussing where they might go instead
20:18 Mowah left
colomon I certainly appreciated reading them. 20:18
sorear me too
moritz_ blogs.perl.org would be nice 20:19
dalek ecza: a413960 | sorear++ | / (4 files):
Add codegen support for eh-spans
20:23
ecza: 2d649c9 | sorear++ | / (4 files):
Generate control exn records for loops
ecza: 59fa498 | sorear++ | / (5 files):
Generate control exception data for return
20:26 tadzik joined 20:27 rindolf left
sorear Is Block.leave a control exception, or is it some kind of raw unwind that bypasses CONTROL and calls only LEAVE? 20:29
20:29 justatheory joined, alester left
TimToady I think of it as lower level 20:34
20:34 alksentrs left
TimToady blogs.perl.org is where it looks like they're going 20:34
colomon \o/ 20:37
20:41 patrickas left 20:43 Ross^ left
dalek ast: ea8f32d | KodiB++ | S02-builtin_data_types/bag.t:
[bag.t] Use .roll instead of .pick with :replace.
20:44
20:45 PacoLinux left, Ross^ joined 20:46 sahadev1 joined 20:47 Italian_Plumber left 20:48 PacoLinux joined, sahadev left 20:53 patspam left 20:55 whiteknight joined 20:56 rindolf joined 21:09 Ross^ left
sorear When does Any strify to "", or is that part of P5 being completely discarded? 21:11
21:20 justatheory left
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:20
print and say use .Str so you get Any(), but ~ gets "" 21:21
21:21 justatheory joined
TimToady also, if you use a Failure as ~ you get a thrown exception 21:21
21:21 justatheory left 21:28 bluescreen left 21:43 Guest23195 left 21:49 hercynium joined 21:50 Guest9777 is now known as meinwald
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:51
s/design/implementation/ 21:52
jnthn pmichaud: It's only in p6object though?
pmichaud jnthn: yes, but I haven't found a good way to override it yet.
without substantially changing p6object.
jnthn pmichaud: I'd just wait
pmichaud I'm not sure .Stringy can wait, though.
jnthn Ah 21:53
It's not just a case of "add a method", I'm guessing?
pmichaud it's a case of "override a vtable"
get_string, in this case.
since p6object already overrides get_string, there's not a good way to override it yet again
jnthn Ah 21:54
sorear let's suppose I'm hacking on an implementation with no Parrot baggage
jnthn Is it that it overrides it and does the wrong thing in the override (or at least, the thing that's now wrong)?
pmichaud jnthn: yes.
sorear what would be the cleanest way to handle Str/Stringy/typeobjects?
jnthn pmichaud: Ah
pmichaud sorear: in Mu, method Stringy(Mu:U) { ... }
jnthn multi method, I hope :-)
pmichaud will handle type object stringification 21:55
yes, +multi
jnthn But yes, other than that, it's what I expect too
For it to work we also need to have the new-style multi dispatch.
(We'll get it during the object model switch.)
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
jnthn pmichaud: It's (deliberately) quite broad. 21:58
But explicitly for changes to the meta-model implementation beneath PCT stuff. :-)
sorear If we drop the deprecation policy, do we need a deprecation cycle for it? :)
diakopter heh
pmichaud jnthn: I suppose it's possible to slip it in under there.
jnthn :-)
win :-)
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.
jnthn Yes, I can imagine it's a painful all-in-one switch.
sorear niecza doesn't currently have Stringy at all
pmichaud yeah, that's where rakudo started (no Stringy)
sorear I (mis)read S02 as saying that Stringy was part of the Cat system
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
and breaking that mapping isn't trivial. (not necessarily hard, but not trivial)
sorear is get_string allowed to return Cat or Junction?
22:00 tadzik left
jnthn er...no... :/ 22:01
sorear seen lichtkind
aloha lichtkind was last seen in #perl6 21 hours 59 mins ago saying "good night".
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
pmichaud: That is, maybe the v-table mapping really is after the more low-level meaning of string.
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
or a concat operation
that tends to be the high-level meaning.
to me, the low-level meaning really ought to be the (now deprecated/gone) 'get_repr' opcode :-P 22:07
at least I think that opcode is gone... let me check.
jnthn pmichaud: That doesn't play well with get_string v-table only being able to return a STRING* though
pmichaud jnthn: ?
I don't quite understand.
jnthn .sub 'foo' :vtable('get_string') 22:08
...
.return ($P0)
.end
The PMC won't get returned
pmichaud you mean in rakudo?
that should be
.sub 'foo' :vtable('get_string')
$S0 = self.'Stringy'()
.return ($S0)
.end
jnthn Aren't we risking getting recursive there? 22:09
I'd guess on Str it has method String() { self }
pmichaud I don't think we are any more recursive that what we've done w/o Stringy at all
lue ohai o/
jnthn er, Stringy
pmichaud currently we have
.sub '' :vtable('get_string') :method $S0 = self.'Str'() .return ($S0) 22:10
.end
it's not really any different.
jnthn Oh
jnthn tries to work out where this bottoms out
pmichaud I think my point is that if I have pir::join(' ', @a)
then the values of @a that get joined together are their .Stringy representations and not the .Str ones
(e.g., if there are unset elements of @a, they become '' and not 'Any()' 22:11
jnthn Hm
I don't disagree with that.
22:11 thowe joined
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
which is "return your value as a string"
jnthn I agree from taht angle.
I'm worried from the low-level distinction angle though. 22:12
That is, what we need to end up with is a low level string to return from get_string
What if I have a Cat
It maybe has a method Stringy { self }
thowe I see that I can "use CGI;" Is there documentation for that CGI class somewhere? It is a class, right?
jnthn So in our v-table method we return a Cat object again 22:13
But we need to get an S register here
pmichaud in that case, I'd suspect that Cat needs to likewise override get_string
22:13 justatheory joined
jnthn So the calling conventions in order to do that coercion call get_string v-table on what cmes back 22:13
Which recurses...
infinitely.
Unless I'm missing something.
pmichaud Cat would want to override get_string 22:14
jnthn Well, yes, but what are you going to override it to do?
pmichaud to return the string value of the Cat, of course
jnthn Right, which is what .Str would do.
pmichaud so, no problem. :-)
.namespace ['Cat']
.sub '' :vtable('get_string') :method
jnthn Right, but that's the argument for it mapping to the low-level Str instead.
pmichaud I think there are a lot more instances of wanting the high-level Stringy than the low-level Str 22:15
and since we're explicitly talking about vtable details, it's all cheats anyway.
jnthn True
oh *sigh*...methods in namespaces...
(sorry, unrelated panic :-)) 22:16
But yes, you're right.
pmichaud I need to read up on Cats a bit, though
jnthn I think the Stringy argument is stronger than the "maps more naturally to low level" one. 22:17
I think both have some points in their favour though. :-)
(Specifically, that the low-level one is easier to make "bottom out" without scattering so many v-table overrides around.) 22:18
To expand, my worry isn't so much that we can't write the v-table method in Cat. Sure we can. 22:19
It's what happens if somebody else wants to write a type like Cat.
We can't really (from a Perl 6 perspective) expect them to supply the v-table override.
pmichaud agreed
but as long as Parrot's vtable interface limits us to specific types, we're kinda stuck no matter what. 22:20
a similar problem exists with get_number
i.e., get_number constraints us to a floating point representation- there's no generic "numification" vtable.
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.
pmichaud right 22:21
or list-ish/hash-ish for that matter.
(which are the other two high-level coercion's I'd really like to have)
s/'//
jnthn get_numish :-) 22:22
But yes, there's a case here that we have too few v-table methods I guess.
(We at the same time have too many things as v-table methods that I don't think should be.) 22:23
(e.g. add...)
22:24 meinwald left 22:28 meinwald joined, meinwald is now known as Guest30046 22:29 zfe joined 22:30 zfe left 22:37 krakan left, krakan joined
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 22:52 sahadev1 left 22:54 skyheights joined
sorear niecza now has control exceptions 22:58
I think the only big feature missing for STD is roles 22:59
23:00 skangas left 23:03 Italian_Plumber joined, Italian_Plumber left
dalek ecza: aad86a4 | sorear++ | / (3 files):
A new, ehspan-aware, exception dispatcher
23:04
ecza: ae2e557 | sorear++ | / (3 files):
Implement control operators next, redo, last, return
23:04 rindolf left 23:06 skyheights left 23:08 muixirt left
dalek ast: ea0bb44 | KodiB++ | S02-builtin_data_types/ (2 files):
Revamped keyhash.t.
23:09
colomon rakudo: say 5.rand 23:18
p6eval rakudo 323a67: OUTPUT«2.95718454218999␤»
23:23 Italian_Plumber joined
thowe so, if I install rakudo in my local dir, what's the command for perldoc? perl6doc? 23:30
23:31 flatwhatson left
\xF0 you wish 23:31
thowe: we'll be waiting a bit on perl6doc
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
IS there some way to at least make it tell me what methods are available? Is there POD docs for that class included?
er, is it "Pod" not "POD" now? 23:33
I did find this: github.com/viklund/november/blob/ma..._post_test 23:34
Is there a better example?
23:40 cdarroch left 23:57 meppl left