Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-09-10

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:02 pat_js joined #perl6
00:08 chenryn joined #perl6
00:25 dalek rakudo/test-handles: 78f60a3 | (Rob Hoelz)++ | lib/Test.pm:
00:25 dalek rakudo/test-handles: Restore "Test.pm - Allow output handles to be queried and modified"
00:25 dalek rakudo/test-handles:
00:25 dalek rakudo/test-handles: We must delay initializing Test handles until runtime
00:25 dalek rakudo/test-handles: review: https://github.com/rakudo/rakudo/commit/78f60a348b
00:26 hoelzro FROGGS: could you try your v5 stuff that I broke against https://github.com/rakudo/​rakudo/commit/78f60a348b?
00:26 hoelzro I would like to see if that fixes it
00:26 hoelzro also, if anyone else could help explain to me how compile vs run time works in Perl 6, I would be grateful
00:27 hoelzro in Perl 5, afaict, "my $foo = 17;" declares a lexical scalar variable $foo at compile time, but it's initialized to 17 at runtime
00:28 hoelzro so I'm wondering why 'my $output = $PROCESS::OUT' wouldn't behave similarly in Perl 6
00:28 hoelzro granted, that just might be the way things are, but it could be a stumbling block for Perl 5 programmers like myself
00:48 xfix joined #perl6
00:53 TimToady my works the same in p6, so just looks like a plain old bug to me; $PROCESS::OUT should automatically be re-inited to the new stdout under separate compilation
00:53 TimToady if it is re-inited, and not being seen, then something is doing unwarranted "constant" folding
00:55 TimToady either that, or INIT is re-initing too lazily
00:55 hoelzro TimToady: if I do an explicit INIT, it works fine
00:55 hoelzro only if my $output = $PROCESS::OUT is in the mainline does FROGGS' example break, it seems
00:56 TimToady yes, but init time should be doing that for you already wrt $PROCESS::OUT
00:57 TimToady there's no reason at all for $PROCESS::OUT to try to preserve the compiler's stdout
00:57 hoelzro right, that's what I was thinking
00:58 TimToady I presume this is something that used to work, and has broken with all the startup code fiddling
00:59 hoelzro TimToady: I've seen precompilation issues similar to this one before
00:59 hoelzro I'm wondering how the spectest would behave if we precompiled it and ran it
01:07 yeahnoob joined #perl6
01:08 xenoterracide joined #perl6
01:08 aborazmeh joined #perl6
01:11 pat_js left #perl6
01:16 grettis joined #perl6
01:27 tinyblak joined #perl6
01:30 FROGGS_ joined #perl6
01:31 dayangkun joined #perl6
01:39 grettis joined #perl6
01:46 telex joined #perl6
01:52 jerrycheung joined #perl6
01:55 jack_rabbit joined #perl6
02:06 itz joined #perl6
02:27 allen joined #perl6
02:27 allen I'm having some slight confusions with the mailing list. Do I send arbitrary text in the body and automatically get added?
02:28 allen for: perl6-language-subscribe@perl.org
02:33 chenryn joined #perl6
02:37 allen TimToady, hey Larry :)
02:40 rindolf joined #perl6
02:47 allen perl6: my $problem = "Mailing List Registration"; my $solved = false; if not $solved { say $problem };
02:47 camelia rakudo-jvm d315ab: OUTPUT«(timeout)»
02:47 camelia ..niecza v24-109-g48a8de3: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared routine:â�¤    'false' used at line 1â�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1502 (die @ 5) â�¤  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp…»
02:47 camelia ..rakudo-{parrot,moar} d315ab: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Undeclared routine:â�¤    false used at line 1â�¤â�¤Â»
02:48 allen perl6: say 'my name is camelia'
02:48 camelia rakudo-{parrot,jvm,moar} d315ab, niecza v24-109-g48a8de3: OUTPUT«my name is camelia␤»
02:48 allen perl6: say 'please excuse my metadata'
02:48 camelia rakudo-{parrot,jvm,moar} d315ab, niecza v24-109-g48a8de3: OUTPUT«please excuse my metadata␤»
02:50 grettis joined #perl6
02:50 japhb allen: Save time by just using m: instead of perl6:
02:53 noganex joined #perl6
02:53 allen m: say "Thanks, japhb"
02:53 camelia rakudo-moar d315ab: OUTPUT«Thanks, japhb␤»
03:07 colomon joined #perl6
03:17 jerrycheung joined #perl6
03:22 yeahnoob joined #perl6
03:26 rurban joined #perl6
03:42 yeahnoob joined #perl6
03:52 allen will the extensability of perl syntax allowus to create shortcuts like (+ 3 4 5) in stead of (3 + 4 + 5)
03:53 allen @+ [3 4 5]
03:56 japhb m: [+] 3 .. 5
03:56 camelia rakudo-moar d315ab: ( no output )
03:56 japhb m: say [+] 3 .. 5
03:56 camelia rakudo-moar d315ab: OUTPUT«12␤»
04:00 geekosaur I expect you could define a slang, but making sure it integrates sanely would be your problem
04:01 dalek rakudo/nom: 02db739 | TimToady++ | src/core/ListIter.pm:
04:01 dalek rakudo/nom: more performant fix for .[100000]
04:01 dalek rakudo/nom:
04:01 dalek rakudo/nom: I believe this will scale better than the previous fix.
04:01 dalek rakudo/nom: Feel free to revert if this turns out not to be the case.
04:01 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/02db739a82
04:02 timotimo thank you, TimToady :)
04:03 timotimo m: say (&infix:<+> 1, 2, 3, 4)
04:03 camelia rakudo-moar d315ab: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/NBb1nyWzWrâ�¤Two terms in a rowâ�¤at /tmp/NBb1nyWzWr:1â�¤------> [32msay (&infix:<+> [33mâ��[31m1, 2, 3, 4)[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix stopperâ�¤        infix o…»
04:03 timotimo m: say (&infix:<+>: 1, 2, 3, 4)
04:03 camelia rakudo-moar d315ab: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tvwR2pVHeSâ�¤Two terms in a rowâ�¤at /tmp/tvwR2pVHeS:1â�¤------> [32msay (&infix:<+>[33mâ��[31m: 1, 2, 3, 4)[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix stopperâ�¤        infix …»
04:03 timotimo m: say &infix:<+>(1, 2, 3, 4)
04:03 camelia rakudo-moar d315ab: OUTPUT«Too many positionals passed; expected 0 to 2 arguments but got 4␤  in sub infix:<+> at src/gen/m-CORE.setting:4433␤  in block <unit> at /tmp/t3B7u4YiH9:1␤␤»
04:03 timotimo m: say &infix:<+><1 2>
04:03 camelia rakudo-moar d315ab: OUTPUT«postcircumfix:<{ }> not defined for type Sub+{<anon>}+{Precedence}␤  in method gist at src/gen/m-CORE.setting:13425␤  in method gist at src/gen/m-CORE.setting:7545␤  in sub say at src/gen/m-CORE.setting:14951␤  in block <unit> at /tmp/f2NG8zn9yI:1…»
04:03 timotimo m: say &infix:<+>(<1 2>)
04:03 camelia rakudo-moar d315ab: OUTPUT«2␤»
04:03 timotimo nope.
04:04 TimToady that's just infix:<+>(2)
04:04 timotimo yes
04:04 TimToady <1 2> would be a parcel in any case
04:04 timotimo m: say &infix:<+>(|<1 2>)
04:04 camelia rakudo-moar d315ab: OUTPUT«3␤»
04:04 timotimo i was trying to make it use less characters that didn't exist in (+ 3 4 5)
04:04 timotimo not more :)
04:05 TimToady m: say [+] 3..5
04:05 camelia rakudo-moar d315ab: OUTPUT«12␤»
04:05 TimToady that's shorter :P
04:05 timotimo that it is.
04:06 TimToady or are you just trying to get "12"?
04:06 timotimo m: say +"12"
04:06 camelia rakudo-moar d315ab: OUTPUT«12␤»
04:16 jerrycheung joined #perl6
04:17 yeahnoob m:say <+> 3..5
04:17 yeahnoob m: say <+> 3..5
04:17 camelia rakudo-moar d315ab: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/nU5khypgNrâ�¤Two terms in a rowâ�¤at /tmp/nU5khypgNr:1â�¤------> [32msay <+> [33mâ��[31m3..5[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix stopperâ�¤        infix or meta-infixâ�¤â€¦Â»
04:19 yeahnoob m: say (+ 1 2)
04:19 camelia rakudo-moar d315ab: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/xZcaTNmgiaâ�¤Two terms in a rowâ�¤at /tmp/xZcaTNmgia:1â�¤------> [32msay (+ 1 [33mâ��[31m2)[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix stopperâ�¤        infix or meta-infixâ�¤ …»
04:20 timotimo i gave http://rakudo.org/community/ an overhaul
04:22 kaare_ joined #perl6
04:27 dalek specs: 24fb00c | TimToady++ | S02-bits.pod:
04:27 dalek specs: make Bag/Mix.list more hashy, returning .pairs
04:27 dalek specs:
04:27 dalek specs: Bags and Mixes are more naturally hashy, so we'll default to returning
04:27 dalek specs: .pairs in list context.  Set, however, still returns only .keys for its
04:27 dalek specs: default list, since the values are uninterestingly true.  (cf RT #121947)
04:27 dalek specs: review: https://github.com/perl6/specs/commit/24fb00c9f0
04:27 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=121947
04:28 japhb timotimo: "planetaria" is misspelled (the link seems correct, though
04:28 timotimo thanks!
04:29 japhb :-)
04:30 timotimo http://planeteria.org/perl6/ i'd like to receive comments about the "which download to choose" section i put here
04:32 japhb .... Code object coerced to string (please use .gist or .perl to do that)  in any !cursor_init at gen/jvm/stage2/QRegex.nqp:599
04:32 timotimo er
04:32 timotimo that's not the right link.
04:32 japhb Now how the heck did I do that?
04:32 timotimo http://rakudo.org/how-to-get-rakudo/
04:33 japhb s/but the for/but the/
04:34 japhb Also, choose whether to capitalize Asynchronous IO or not, but don't mix them.  (I'd go with lowercase 'a')
04:35 timotimo fixed
04:35 flussence No mention of r-j?
04:35 timotimo we don't have a jakudo star yet
04:35 timotimo there's still some module problems
04:35 flussence oh, right.
04:35 japhb I'd also say titlecase 'Windows' when referring to the OS.
04:40 TimToady masak: your gist of smartmatches changes is a Mixed Bag (puns intended); list patterns need a better rethink than that, and implied searching for Num or Str is a non-starter, since those mandate the left side to work under + or ~ respectively, or they become unoptimizable
04:42 TimToady but I agree that a distributed smartmatch might be a good thing, since you don't always have an explicit ~~ to Z or hyper
04:43 japhb .oO( All puns must now be capitalized, by order of the Pun Police )
04:43 yeahnoob joined #perl6
04:43 TimToady only if they're Type Pun Type
04:44 TimToady *of the
04:53 chenryn joined #perl6
04:56 TimToady my current inclination is to limit list smartmatching to parcels and maybe lols, because arrays ought to act more like typed data than like a sequence of fancy gizmos
04:56 skarn joined #perl6
04:56 TimToady so you'd have to parcelize an array to get it to smartmatch the elements
04:57 TimToady whereas it's perfectly normal to sneak things like * and ** into parcels and lols
04:57 TimToady and we can now use bare sigils for matching too, I suspect...
04:57 TimToady m: say 42 ~~ $
04:58 camelia rakudo-moar 02db73: OUTPUT«True␤»
04:58 TimToady yeah
04:58 japhb m: say 42 ~~ @
04:58 camelia rakudo-moar 02db73: OUTPUT«False␤»
04:58 japhb I'll be darned
04:59 TimToady that might or might not be working for the correct reason :)
04:59 TimToady m: say [42] ~~ @
04:59 camelia rakudo-moar 02db73: OUTPUT«False␤»
05:00 TimToady the $ works because it defaults to Any or some such
05:00 TimToady m: say ($).WHAT
05:00 camelia rakudo-moar 02db73: OUTPUT«(Any)␤»
05:00 TimToady yeah
05:00 TimToady m: say [] ~~ @
05:01 camelia rakudo-moar 02db73: OUTPUT«True␤»
05:01 TimToady whereas @ just defaults to ()
05:02 TimToady so we'd have to decide whether to stick with * matching multiple values
05:02 TimToady at first I thought maybe * should match a single value and ** multiple values, but then that makes lol patterns less useful
05:02 anaeem1_ joined #perl6
05:02 dj_goku so I want to add some tests for rosetta code into perl6/roast, but that is a lot of coping and pasting. I am trying to figure out how to run a roast.
05:03 TimToady build rakudo under moar, then "make spectest" is one way
05:03 TimToady s/under/over/ :)
05:04 dj_goku hmm
05:04 TimToady lemme guess, you just used rakudobrew...
05:05 dj_goku I did.
05:05 dj_goku *magic*
05:05 TimToady if so, there's probably some subdir containing the nom build that you can run it in
05:05 TimToady or maybe rakudobrew knows spectest targets?
05:05 TimToady (dunno offhand)
05:07 kurahaupo joined #perl6
05:08 Tene joined #perl6
05:08 Tene joined #perl6
05:08 djanatyn joined #perl6
05:09 dj_goku TimToady: cool. so my other question about automating the download/running of code on Rosetta Code does that seem like something I can add to roast? Or should I just add all the tests manually?
05:10 dj_goku I found the moar dir and running spectest now.
05:13 TimToady we should test RC entries, but probably outside of roast if we download straight from RC, since roast is the official definition of Perl 6, while RC is a wiki, so anyone could redefine Perl 6 just by changing the wiki, if roast had an RC dependency
05:14 TimToady we do have a few RC entries as part of roast currently, and we could certainly have more, but they need to be vetted and nailed down for a particular version of roast representing, say, Perl 6.0.0
05:15 TimToady at some point ingy++ was working on automated download of RC entries, dunno where he got with that
05:15 dj_goku sounds interesting. :D
05:15 dj_goku I wanted to start manually added them. But though I can only do a few. :)
05:16 dj_goku HTTP::UserAgent might be up to the task almost. :)
05:20 ingy https://github.com/acmeism/RosettaCodeData
05:21 ingy I need to run it again soon
05:21 PerlJam It would be nice if there were an RC API  (not just the mediawiki API, but specific to RC)
05:22 tinyblak joined #perl6
05:23 tinyblak joined #perl6
05:24 dj_goku PerlJam: yeah totally.
05:25 dj_goku A friend is writing a web app that uses RC code samples.
05:30 kaleem joined #perl6
05:40 dolmen joined #perl6
05:41 mberends left #perl6
05:46 mr-foobar joined #perl6
05:47 SamuraiJack_ joined #perl6
05:49 gfldex joined #perl6
05:51 anaeem1_ joined #perl6
05:52 rindolf Hi all.
05:57 timotimo ohai rindolf, what's up? :)
05:58 rindolf timotimo: hi.
05:59 rindolf timotimo: I'm looking for a way to translate https://metacpan.org/relea​se/Games-Solitaire-Verify to JS.
05:59 timotimo ouch, the change log below the examples :o
06:01 rindolf timotimo: what?
06:01 timotimo it has bullet points *and* wrapped lines
06:01 timotimo i wonder how that happened
06:02 rindolf timotimo: where? Link/URL?
06:02 timotimo the url you gave me; scroll to the bottom
06:04 rindolf timotimo: ah, I don't know how metacpan parses the changelog.
06:05 rindolf timotimo: https://metacpan.org/source/SHLOMIF/G​ames-Solitaire-Verify-0.1300/Changes - use the source, Luke!
06:06 timotimo ah, the way meta::cpan does that is obviously LTA
06:06 rindolf timotimo: http://www.shlomifish.org/humour/fortunes/s​how.cgi?id=sharp-perlcafe-trusting-the-docs
06:06 rindolf timotimo: what is LTA?
06:07 timotimo "less than awesome"
06:07 rindolf timotimo: hmm...
06:07 rindolf timotimo: https://duckduckgo.com/?q=lta - nothing about it here.
06:08 rindolf timotimo: "WHat do you mean by 'WDYM'?" - avoid strange and obscure acronyms.
06:08 timotimo we have the S99 :)
06:11 rindolf timotimo: S99?
06:12 rindolf http://www.perlcabal.org/syn/S99.html#LTA - ah.
06:14 rindolf timotimo: http://www.joelonsoftware.​com/items/2009/12/30.html
06:22 timotimo hmm
06:24 [Sno] joined #perl6
06:34 kaleem joined #perl6
06:37 darutoko joined #perl6
06:47 FROGGS joined #perl6
06:53 djanatyn joined #perl6
06:53 dalek rakudo/nom: 0792a91 | TimToady++ | src/core/List.pm:
06:53 dalek rakudo/nom: fix .plan method to reify correctly later
06:53 dalek rakudo/nom:
06:53 dalek rakudo/nom: Turns out p6listiter needed a ref back to us to know where to put reified values.
06:53 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0792a91cc7
06:54 FROGGS morning
06:54 TimToady o/
06:55 timotimo heyo
06:56 grettis joined #perl6
06:56 FROGGS has somebody (perhaps near germany) an osx box for sale? I'd like to fix libuv before the rakudo compiler release
06:56 FROGGS I failed yesterday to buy a mac mini
06:58 sergot o/
06:58 timotimo \o
06:59 * FROGGS .oO( ohh noes! he escaped! )
06:59 FROGGS and yes, this kind of joke is totally fine before third coffee!
06:59 TimToady we need some decent tests for .plan now that it works better
07:00 TimToady I'll get to it eventually if no one else does, but that might take a couple days
07:01 TimToady m: my @a = 1,2,3; @a.plan: 4..*; say @a[^10]
07:01 camelia rakudo-moar 02db73: OUTPUT«(timeout)»
07:01 TimToady that should say 1 through 10 when the last patch is compiled
07:02 TimToady > perl6 -e 'my @a = 1,2,3; @a.plan: 4..*; say @a[^10]'
07:02 TimToady 1 2 3 4 5 6 7 8 9 10
07:02 TimToady like that
07:03 TimToady > perl6 -e 'my @a = 1,2,3; @a.plan: 4..*; say @a.infinite'
07:03 TimToady True
07:04 FROGGS .tell hoelzro that seems to work!
07:04 yoleaux FROGGS: I'll pass your message to hoelzro.
07:04 Px12 joined #perl6
07:10 rindolf TimToady: BTW, do you charge money for public speeches?
07:13 rindolf OK, I think I'm off to the shopping centre to see if anyone there may be able to give me a job. "THere are no small jobs, only small employees."
07:13 TimToady my fee is generally to bring Gloria along :)
07:13 rindolf TimToady: ah.
07:13 Isp-sec joined #perl6
07:14 grettis joined #perl6
07:14 moritz TimToady: "Fee" is the German word for fairy, so that makes Gloria your fairy :-)
07:14 rindolf TimToady: I think you can become self-sustaining from making public appearances - see https://plus.google.com/+Sh​lomiFish/posts/MRLntf3xu5Y
07:14 rindolf mr-foobar: heh.
07:14 rindolf Is it from the French fille - a girl?
07:15 moritz I have no idea
07:16 TimToady we would spell it "Fey" in English
07:18 TimToady and it has more to do with madness, I think, than with girls, though far too many jokes suggest themselves here
07:19 TimToady and it might have to do etymologically with "ferry", as in to get carried away :)
07:19 TimToady c.f. "pherein" in Greek, "to carry"
07:20 rindolf TimToady: ah.
07:20 TimToady 'course, I could just be making stuff up because I'm fey...
07:20 rindolf Fairy NUff
07:21 rindolf TimToady: https://en.wiktionary.org/wiki/fairy
07:21 rindolf From fate.
07:21 * rindolf is away - job hunt.
07:22 cbk1090 joined #perl6
07:22 anaeem1_ joined #perl6
07:23 grettis joined #perl6
07:24 TimToady well, they might still be related back in proto-Indo-European, since a fate is where you get carried to whether you like it or not
07:25 TimToady but I'm not near my AmHer to look it up
07:26 cbk1090 Anybody know of some good/working IO::Socket.INET examples?  What I have is no longer working, has something changed?  I'm using the latest perl6...?
07:31 moritz cbk1090: https://github.com/sergot/http-useragent
07:31 cbk1090 this is what I had...  Really just a copy of an example I found that I was trying to adapt... http://pastebin.com/1LfhbzFN
07:32 Px12 joined #perl6
07:32 moritz doing the .close inside the loop is a bad idea
07:32 moritz I mean, after the first line, it'll close the socket
07:33 moritz and the subsequent sends can't ever work
07:33 * TimToady closes his sockets --> zzz &
07:34 moritz cbk1090: and it would also be helpful if you told us how it is "no longer working"
07:34 cbk1090 At one point, I had it working.  It was a chat client.
07:34 moritz does your keyboard erupt into blue flames when you run it?
07:35 moritz if not, what is the failure mode?
07:35 cbk1090 It does not connect.
07:35 moritz any error message?
07:35 cbk1090 No. just says connection refused.
07:36 moritz well, that's an error message.
07:36 moritz is the server running?
07:37 cbk1090 yeah, I have basically the same code, but have the listen flag set.
07:38 moritz "connection refused" means that either the port isn't open, or it's firewalled
07:38 moritz (at least not open on the machine you want to connect to)
07:38 moritz oh
07:38 moritz my $host = "http://10.10.224.101";
07:39 moritz that's bad
07:39 moritz that's an URL, not a host
07:39 moritz try
07:39 moritz my $host = "10.10.224.101";
07:39 zakharyas joined #perl6
07:39 cbk1090 well like i said it worked.  and it was cool!  I could chat to different computers on my LAN
07:40 moritz well, if it worked, it was by accident
07:40 cbk1090 well the http:// part is a new add.  I was trying that out just now
07:40 moritz what happens when you   telnet 10.10.224.101 25535  on the command line?
07:41 timotimo aye, the $client.close is a bad idea to have inside the loop
07:42 cbk1090 I can move that I just want it to work again, and that is how I had it when it worked...
07:43 moritz cbk1090: well, if you want it to work, you need to find out what's wrong.
07:43 moritz cbk1090: claiming that it worked before doesn't help you with that
07:43 moritz cbk1090: you did that three times now, instead of just going ahead and answering my questions
07:44 moritz or acting on any of the information I gave you, for all I can tell
07:44 cbk1090 telnet says "10.10.224.101:25535: Name or service not known"
07:45 cognome joined #perl6
07:45 moritz that's what I get when I run "telnet 10.10.224.101:25535"
07:45 moritz but not when I run "telnet 10.10.224.101 25535"
07:45 * moritz gives up
07:49 virtualsue joined #perl6
07:52 FROGGS cbk1090: please do *exactly* what moritz said:  telnet 10.10.224.101 25535
07:52 FROGGS cbk1090: there is no colon before the port number
07:53 cbk1090 telnet: connect to address 10.10.224.101: Connection refused
07:53 FROGGS cbk1090: so it is a problem with your network
07:53 timotimo aye. did you paste the server portion yet?
07:53 timotimo it seems like there's nothing listening on that port on that machine, or a firewall is blocking connections
07:53 moritz or the IP might be wrong
07:54 cbk1090 no but here it is... http://pastebin.com/VRTn76nd
07:54 moritz (which would also mean "nothing listening on that port")
07:54 FROGGS cbk1090: what is the output of this?   nmap -sS -p 25535 10.10.224.101
07:54 cbk1090 25535/tcp closed unknown
07:55 moritz cbk1090: stop.
07:55 moritz cbk1090: that code can't even run.
07:55 moritz cbk1090: I'm getting the impression you're trolling us
07:56 moritz that code doesn't even compile, and it didn't compile on older versions of any Perl 6 compiler
07:56 cbk1090 no, not at all.
07:56 moritz then stop presenting us so many plain wrong pieces of information
07:56 moritz you're not running that code. Period.
07:56 moritz because it can't run.
07:57 moritz also, you claimed that the client code you pasted earlier ran on older versions. It didn't.
07:57 moritz you claimed you ran the telnet command I gave you. You didn't.
07:57 moritz we can't help you like that
07:57 moritz and I don't want to anymore.
07:57 timotimo cbk1090: in general it's only a good idea to specify a host for a listen socket, if you know *exactly* why you want to do that. otherwise you don't want to do that
07:57 cbk1090 Ok Its running right now on my system.
07:57 moritz cbk1090: I don't believe you
07:57 moritz cbk1090: it has undeclared variables. It can't run.
07:58 timotimo this will be especially problematic if the machine you're running the server process on actually has a different IP address than the one you're specifying
07:58 timotimo m: say  DateTime.now().gist
07:58 camelia rakudo-moar 0792a9: OUTPUT«Dynamic variable $*TZ not found␤  in method Int at src/gen/m-CORE.setting:13422␤  in method in-timezone at src/gen/m-CORE.setting:16222␤  in method new at src/gen/m-CORE.setting:16029␤  in method now at src/gen/m-CORE.setting:16083␤  in block <un…»
07:58 timotimo m: say $*TZ; say DateTime.now().gist
07:58 camelia rakudo-moar 0792a9: OUTPUT«Dynamic variable $*TZ not found␤  in method gist at src/gen/m-CORE.setting:13426␤  in sub say at src/gen/m-CORE.setting:14952␤  in block <unit> at /tmp/3lzgH3WJpg:1␤␤»
07:59 timotimo seriously? >_>
07:59 timotimo m: say $*TZ;
07:59 camelia rakudo-moar 0792a9: OUTPUT«Dynamic variable $*TZ not found␤  in method gist at src/gen/m-CORE.setting:13426␤  in sub say at src/gen/m-CORE.setting:14952␤  in block <unit> at /tmp/JZrrYjO1UE:1␤␤»
07:59 timotimo m: my $*TZ = 1; say DateTime.now().gist
07:59 camelia rakudo-moar 0792a9: OUTPUT«Default DateTime formatter: offset 1 not divisible by 60.␤  in block <unit> at /tmp/B_khCujYxr:1␤␤2014-09-10T07:59:37+0000␤»
07:59 timotimo m: my $*TZ = 0; say DateTime.now().gist
07:59 camelia rakudo-moar 0792a9: OUTPUT«2014-09-10T07:59:46Z␤»
07:59 moritz timotimo: iirc $*TZ is in seconds
08:00 timotimo m: my $*TZ = 0; say DateTime.now().gist.replace("T", " ")
08:00 camelia rakudo-moar 0792a9: OUTPUT«No such method 'replace' for invocant of type 'Str'␤  in block <unit> at /tmp/h3UY47OT4x:1␤␤»
08:00 timotimo m: my $*TZ = 0; say DateTime.now().gist.replace(/T/, " ")
08:00 camelia rakudo-moar 0792a9: OUTPUT«No such method 'replace' for invocant of type 'Str'␤  in block <unit> at /tmp/0644NTTR5b:1␤␤»
08:00 FROGGS subst
08:00 timotimo oh
08:00 timotimo yeah
08:00 timotimo m: my $*TZ = 0; say DateTime.now().gist.subst("T", " ")
08:00 camelia rakudo-moar 0792a9: OUTPUT«2014-09-10 08:00:25Z␤»
08:00 timotimo m: my $*TZ = 0; say DateTime.now().subst("T", " ")
08:00 camelia rakudo-moar 0792a9: OUTPUT«No such method 'subst' for invocant of type 'DateTime'␤  in block <unit> at /tmp/mwlggoUXAu:1␤␤»
08:00 timotimo m: my $*TZ = 0; say DateTime.now().Str.subst("T", " ")
08:00 camelia rakudo-moar 0792a9: OUTPUT«2014-09-10 08:00:33Z␤»
08:00 FROGGS cbk1090: $encoding and $type is not declared btw
08:00 timotimo m: my $*TZ = 0; say DateTime.now().Str.tr("T" => " ", "Z" => " ")
08:00 camelia rakudo-moar 0792a9: OUTPUT«No such method 'tr' for invocant of type 'Str'␤  in block <unit> at /tmp/_AOL2ZWVKK:1␤␤»
08:01 timotimo m: my $*TZ = 0; say DateTime.now().Str.trans("T" => " ", "Z" => " ")
08:01 camelia rakudo-moar 0792a9: OUTPUT«2014-09-10 08:01:03 ␤»
08:01 timotimo m: my $*TZ = 0; say DateTime.now().Str.trans("T" => " ", "Z" => "")
08:01 camelia rakudo-moar 0792a9: OUTPUT«2014-09-10 08:01:07␤»
08:01 timotimo ^- much shorter than your sub getDateTime
08:01 cbk1090 FROGGS, it is using the default value!
08:01 cbk1090 dont need to be declared btw.
08:01 moritz wtf.
08:01 FROGGS cbk1090: O.o
08:01 timotimo m: IO::Socket::INET.new(:$host);
08:01 camelia rakudo-moar 0792a9: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/cepmu3TcYdâ�¤Variable '$host' is not declaredâ�¤at /tmp/cepmu3TcYd:1â�¤------> [32mIO::Socket::INET.new(:​$host[33mâ��[31m);[0mâ�¤Â»
08:01 timotimo you should see this error message, cbk1090
08:02 * moritz is so >.< close to kickbanning cbk1090
08:02 timotimo well, not for "host", but for "encoding" and "type"
08:02 kaare_ joined #perl6
08:02 timotimo moritz: step away from IRC and let me handle this? :)
08:02 tadzik . o O ( Ensign, step away from the console )
08:02 FROGGS cbk1090: Perl 6 is very strict about variables, so the *need* to be declared (not initialized, but declared)
08:04 timotimo it would seem like cbk1090 is just running different source code locally, probably by mistake
08:05 cbk1090 FROGGS, respectfully if you see they are there there just commented out.  I have tried both ways.  (I sorry to say this again, I had it working ether by accident or not.  Im just trying to figure out what changed so I can get to work again)
08:05 FROGGS timotimo: still, you cannot get proper help when you paste the wrong piece of code
08:05 timotimo that's right
08:05 timotimo but i understand where they're coming from
08:06 timotimo cbk1090: there are several oddities with your code, aside from what froggs and moritz have been complaining about
08:06 FROGGS cbk1090: that's what we say, please paste the code that you are running, not something you fiddled with an hour ago
08:06 FROGGS cbk1090: we need to talk about the exact same thing
08:06 cbk1090 timotimo, I just installed the latest Rakudo from source. and using perl6-m
08:06 timotimo 1) specifying a host for the server socket, that is the one with :listen, is only necessary if your machine has multiple addresses and you only want the server to be reached at one of those addresses. on top of that, it must be an ip address, not a URL
08:07 cbk1090 FROGGS, ok
08:07 timotimo if you use :listen, you can leave out the host parameter
08:07 timotimo and you probably should
08:07 cbk1090 timotimo, ok i'll do that.
08:08 timotimo also, you're accepting connections, receiving a single message from them, but you are not closing the individual connections from the server side. the reason why this *does* work is that after sending a single message, your client closes the connection
08:08 bcode joined #perl6
08:08 Timbus it wouldnt matter anyway, the local port binding is :localhost
08:08 timotimo oh!
08:08 timotimo Timbus: good catch!
08:08 timotimo this probably ought to give a proper error message, then.
08:08 Timbus dont ask me why, i just copied perl 5
08:09 Timbus it should probably also error if the port is over 65535 haha
08:09 timotimo yes
08:12 moritz FROGGS: http://irclog.perlgeek.de/perl6/​search/?nick=nine&amp;q=VMThread search now works again
08:13 timotimo cbk1090: it may be a good idea to test the server and client in isolation; i suppose you are on linux, so you should be able to get the "netcat" package via your package manager
08:13 FROGGS moritz++
08:13 timotimo if you netcat -l -p YOUR_PORT_NUMBER, that'll behave very similar to your server code
08:14 timotimo and if you echo "my sweet message" | netcat SERVER_IP YOUR_PORT_NUMBER, that'll behave very similar to your client code
08:14 timotimo not exactly, but close enough for testing purposes
08:14 cbk1090 timotimo, ok i'll go back and work on that.  Thank you
08:15 timotimo good luck!
08:16 dalek rakudo/nom: 405573a | (Elizabeth Mattijsen)++ | src/core/Str.pm:
08:16 dalek rakudo/nom: Oopsy, forgot to remove 2 lines, japhb++
08:16 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/405573a470
08:16 FROGGS "Oopsy" *g*
08:20 grettis joined #perl6
08:21 denis_boyun_ joined #perl6
08:24 Timbus wait wtf. cbk1090 if you want to open a listening port, you need to specify :localport
08:24 Timbus not :port
08:24 Timbus that will probably fix it
08:24 timotimo ooooooh
08:25 cbk1090 ok
08:25 timotimo Timbus: would you like to work on the .new method to make this more obvious?
08:25 timotimo perhaps split it in two; one multi candidate for listen and one for connect?
08:26 Timbus i think, err, there was some discussion about that many years ago..
08:26 M_o_C joined #perl6
08:26 cbk1090 ok it works now!!!
08:27 cbk1090 perl6 is my friend again! yeah baby!
08:27 Timbus haha
08:28 Timbus timotimo, i think that's probably a good idea. ive never seen a listen socket take a non-local address..
08:29 Timbus if that even does anything?
08:29 tadzik sounds like rakudo could get smarter if you supply both listen and address/port
08:29 Timbus yes
08:31 efat joined #perl6
08:31 yeahnoob joined #perl6
08:31 dakkar joined #perl6
08:33 rindolf Hi all, I'm back from the job hunt.
08:33 moritz did you shoot one?
08:33 rindolf Nothing final, but I have a few leads.
08:34 rindolf moritz: shoot?
08:34 Timbus hunt
08:34 moritz rindolf: well, that's what you do when you go hunting
08:34 Timbus i think your joke missed :<
08:35 rindolf moritz: ah.
08:36 rindolf moritz: I'll shoot using a longbow - very high tech. Jennifer Lawrence will love it.
08:36 lizmat good *, #perl6!
08:36 tadzik Timbus: ahhaah
08:37 lizmat m: (bag <a b c>) ~~ (set <a b c>)   # this fails after the latest TimToady spec change
08:37 camelia rakudo-moar 0792a9: ( no output )
08:37 FROGGS morning lizmat
08:37 lizmat m: say (bag <a b c>) ~~ (set <a b c>)   # this fails after the latest TimToady spec change
08:37 camelia rakudo-moar 0792a9: OUTPUT«True␤»
08:38 lizmat I guess I will need to add a specific ACCEPTS somewhere  :-)
08:38 rindolf The original Rindolf the Dwarven Warrior's weapons of choice were the pick axe and the short bow.
08:39 moritz well, dwarvs do have a certain disadvantage when it comes to using longbows
08:40 rindolf moritz: unless they are very tall dwarves.
08:41 FROGGS tallrves? never heard of such a thing
08:41 cbk1090 https://plus.google.com/10509240​0598046607875/posts/MguN8eJc3tz  Once again thanks for all of your help.
08:42 timotimo rindolf: is it the short arms that prevent the bow's string from being pulled very far back or is it the length of the bow being too long for the dwarf to hold without standing on a stool?
08:44 rindolf timotimo: don't know.
08:44 rindolf timotimo: I played AD&D 2nd edition.
08:44 rindolf Since then there were other editions of D&D.
08:50 spider-mario joined #perl6
08:54 spider-mario joined #perl6
08:55 Px12 joined #perl6
09:00 lizmat TimToady: it feels to me that Set will also need pairs for .list
09:01 lizmat otherwise we need to rethink / complicate a lot of set operators (at least from what I see now)
09:04 tadzik I think dwarf could always hold the bow sideways
09:04 FROGGS moritz: was the "it's now at" link supposed to point to https://github.com/perl6/form instead?
09:05 moritz FROGGS: it's supposed to point to https://github.com/perl6/form
09:05 FROGGS moritz: shall I reply to your mail?
09:07 timotimo tadzik: doesn't that have stability drawbacks?
09:07 moritz FROGGS: if there's something left to be said, sure
09:07 dalek rakudo/nom: 9c7b2fd | (Elizabeth Mattijsen)++ | src/core/Baggy.pm:
09:07 dalek rakudo/nom: Naively implement spec change 24fb00c9f0ca1ed63113
09:07 dalek rakudo/nom:
09:07 dalek rakudo/nom: Setty.list returns keys, whereas Baggy/Mixy.list return pairs.  This causes
09:07 dalek rakudo/nom: some smartmatching and set operators to return "unexpected" results in roast.
09:07 dalek rakudo/nom: Investigating whether this would require change of the spec (Setty.list also
09:07 dalek rakudo/nom: returning pairs) or changes in the set operators / smart matching.
09:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9c7b2fd9d1
09:07 tadzik timotimo: I dunno, I play a human :P
09:08 timotimo i haven't really played D&D yet
09:08 tadzik it's not my favourite system
09:09 dalek roast: e8acf51 | (Elizabeth Mattijsen)++ | S02-types/ (4 files):
09:09 dalek roast: Fix fixable test because of spec change 24fb00c9f0
09:09 dalek roast: review: https://github.com/perl6/roast/commit/e8acf5196a
09:09 lizmat timotimo: any idea of the code path for --target=-mbc ?
09:10 timotimo the --target argument just lands in the HLL::Compiler instance we have
09:10 lizmat trying to find out why the "Missing serialize REPR function for REPR VMThread" is happening when @*INC is lazy
09:10 timotimo it will go through the stages as specified and stop after the one that's set in --target
09:11 timotimo and then there's some magic to figure out how each stage's output is supposed to be dumped
09:11 moritz lizmat: what does "is lazy" mean, exactly?
09:11 moritz lizmat: is it a lazy list?
09:11 timotimo no
09:11 lizmat no
09:11 FROGGS it is initialized via a subroutine on first use, right?
09:11 FROGGS via a proxy?
09:12 timotimo i think there's a special mechanism now
09:12 lizmat see commit d05d411e968b3408420bbc7b02c1248f3dc005de
09:12 lizmat https://github.com/rakudo/r​akudo/commit/d05d411e968b3
09:12 FROGGS lizmat: I still get that message with VMThread in v5 with rakudo HEAD fwiw
09:13 lizmat well, the lazy @*INC got reverted
09:13 lizmat so that can't be the reason
09:13 FROGGS lizmat: true
09:13 lizmat (as it broke panda)
09:13 FROGGS I don't know yet why it fails in v5
09:16 lizmat I guess the answer is somewhere in nqp/src/HLL/Compiler.nqp
09:22 grettis joined #perl6
09:24 leont joined #perl6
09:26 Akagi201_ joined #perl6
09:28 Rotwang joined #perl6
09:38 lizmat nice blog: http://blogs.perl.org/users/maettu/2014/09/​m-learns-perl-6---find-in-a-large-file.html
09:38 BizarreCake joined #perl6
09:40 timotimo m: my $search_string = "hi"; say "foo bar hi baz quux" ~~ m/$search_string/
09:40 camelia rakudo-moar 9c7b2f: OUTPUT«「hi」␤␤»
09:40 timotimo neat, i had already forgotten you can interpolate literals this easily
09:42 lizmat FWIW, I was thinking of adding a grep(Str) candidate that would do rx/$string/
09:42 lizmat so you could do:
09:42 FROGGS m: my @search_strings = "bar", "baz"; say "foo bar hi baz quux" ~~ m/@search_strings/ # or this easily :o)
09:42 camelia rakudo-moar 9c7b2f: OUTPUT«「bar」␤␤»
09:42 lizmat m: <a b c>.grep('a').say
09:42 camelia rakudo-moar 9c7b2f: OUTPUT«a␤»
09:42 FROGGS m: my @search_strings = "baz", "bar"; say "foo bar hi baz quux" ~~ m/@search_strings/
09:42 lizmat ah, you can already ?
09:42 camelia rakudo-moar 9c7b2f: OUTPUT«「bar」␤␤»
09:42 timotimo aye.
09:42 moritz well, grep does a smart match
09:43 timotimo m: say "hello" ~~ "ll"
09:43 camelia rakudo-moar 9c7b2f: OUTPUT«False␤»
09:43 FROGGS m: my @search_strings = "baz", "bar"; say "foo bar hi baz quux" ~~ m/|| @search_strings/
09:43 camelia rakudo-moar 9c7b2f: OUTPUT«「bar」␤␤»
09:43 timotimo not the same as rx/$string/
09:43 lizmat ok, bad idea then  :-)
09:43 FROGGS ahh, position wins of course
09:46 dalek rakudo/nom: 0e7397d | (Elizabeth Mattijsen)++ | src/core/Str.pm:
09:46 dalek rakudo/nom: micro opt tweak in Str.lines
09:46 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0e7397d158
09:47 lizmat only CR delimited files would benefit from that one
09:47 FROGGS osx++ \o/
09:48 moritz afaict from profiling, IO.lines is now mostly limited by reify
09:49 dayangkun joined #perl6
09:57 yeahnoob joined #perl6
10:00 fhelmberger joined #perl6
10:04 Test joined #perl6
10:05 mberends joined #perl6
10:10 rindolf joined #perl6
10:12 yeahnoob $^V
10:12 yeahnoob m: $^V
10:12 camelia rakudo-moar 9c7b2f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/0Z4PV8kFpU�Unsupported use of $^V variable; in Perl 6 please use $*PERL_VERSION�at /tmp/0Z4PV8kFpU:1�------> [32m$^V[33m�[31m<EOL>[0m�»
10:13 yeahnoob m: $*PERL_VERSION
10:13 camelia rakudo-moar 9c7b2f: OUTPUT«Unhandled exception: Dynamic variable $*PERL_VERSION not found␤   at <unknown>:1  (/home/p6eval/rakudo-inst-2/languages/perl6/r​untime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:13432  (/home/p6eval/rakudo-inst-2/languages/perl6/…»
10:13 yeahnoob ...
10:14 grettis joined #perl6
10:16 timotimo oh well.
10:16 timotimo m: say $*PERL.perl
10:16 camelia rakudo-moar 9c7b2f: OUTPUT«Perl.new(compiler => Compiler.new(release => "", build-date => DateTime.new(year => 2014, month => 9, day => 10, hour => 9, minute => 24, second => 36), codename => "", name => "rakudo", auth => "The Perl Foundation", version => Version.new('2014.8.300.g.9…»
10:16 timotimo m: say $*PERL<version>
10:16 camelia rakudo-moar 9c7b2f: OUTPUT«postcircumfix:<{ }> not defined for type Perl␤  in method gist at src/gen/m-CORE.setting:13424␤  in sub say at src/gen/m-CORE.setting:14950␤  in block <unit> at /tmp/zQrOQzmyQw:1␤␤»
10:17 timotimo m: say $*PERL.version
10:17 camelia rakudo-moar 9c7b2f: OUTPUT«vunknown␤»
10:17 timotimo er ... huh?
10:17 timotimo oh, is that inside the compiler?
10:17 lizmat yup
10:17 timotimo m: say $*PERL.compiler.version
10:17 camelia rakudo-moar 9c7b2f: OUTPUT«v2014.8.300.g.9.c.7.b.2.fd␤»
10:17 yeahnoob timotimo: Ola! Thank you.
10:17 lizmat the Perl version is unknown..  :-)
10:17 lizmat the compiler.version is the git commit id / tag
10:18 lizmat versionised
10:18 timotimo right
10:25 fhelmberger joined #perl6
10:35 anaeem1_ joined #perl6
10:46 * masak .oO( my Perl version is vunknown -- I'm vunimpressed )
10:52 lizmat TimToady insisted on version objects, and they stringify with a 'v' in front
10:52 lizmat see Systemic in the spec
10:52 FROGGS vunkown could very well be a Version type object...
10:52 lizmat S28:142 to be more precise
10:52 synopsebot Link: http://perlcabal.org/syn/S28.html#line_142
10:53 lizmat FROGGS: perhaps
10:54 FROGGS m: say $*TZ
10:54 camelia rakudo-moar 0e7397: OUTPUT«Dynamic variable $*TZ not found␤  in method gist at src/gen/m-CORE.setting:13422␤  in sub say at src/gen/m-CORE.setting:14948␤  in block <unit> at /tmp/8HmkXRJKlu:1␤␤»
10:55 FROGGS but I guess we want to fix that one first :o)
10:58 FROGGS should that put $x in PROCESS.WHO?
10:58 FROGGS elsif try INITIALIZE(name) -> \result {
10:58 FROGGS $x := result;
10:58 FROGGS }
10:58 * FROGGS tries
10:59 FROGGS aah, wait
10:59 FROGGS I'm talking rubbish
11:02 FROGGS m: say get-local-timezone-offset()
11:02 camelia rakudo-moar 0e7397: OUTPUT«0␤»
11:02 FROGGS haha!
11:02 FROGGS that's falsish!
11:05 anaeem___ joined #perl6
11:06 sqirrel joined #perl6
11:08 SamuraiJack joined #perl6
11:08 yeahnoob joined #perl6
11:08 * FROGGS has a patch
11:09 timotimo ah, d'oh
11:09 timotimo "defined" needed again
11:09 FROGGS I did it differently, but yeah
11:09 timotimo something like that
11:10 kurahaupo joined #perl6
11:14 FROGGS m: say %*ENV
11:14 camelia rakudo-moar 0e7397: OUTPUT«"HOME" => "/home/p6eval", "LANG" => "en_US.UTF-8", "LANGUAGE" => "en_US:en", "LC_CTYPE" => "de_DE.UTF-8", "LESSCLOSE" => "/usr/bin/lesspipe \%s \%s", "LESSOPEN" => "| /usr/bin/lesspipe \%s", "LOGNAME" => "p6eval", "LS_COLORS" => "rs=0:di=01;34:ln=01;36:mh=…»
11:15 grettis joined #perl6
11:15 Akagi201 joined #perl6
11:16 Rotwang joined #perl6
11:18 FROGGS that's my patch and I wander why that explodes in RESTRICTED.setting...
11:18 FROGGS https://gist.github.com/FR​OGGS/5ef84cab70b6367e7d2b
11:18 FROGGS bbiab, lunch&
11:35 dalek rakudo/nom: 3f662ee | (Elizabeth Mattijsen)++ | src/core/Str.pm:
11:35 dalek rakudo/nom: Str.lines works with CR/CRLF/LF or a mix of them
11:35 dalek rakudo/nom:
11:35 dalek rakudo/nom: Also added smart support for .lines(Inf) and .lines(*)
11:35 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3f662ee22b
11:41 Ven joined #perl6
11:42 Ven o/, #perl6
11:42 Ven timotimo: you're the one that likey speedruns, right ?
11:42 timotimo yup
11:42 Ven have you seen the Ocarina of Time in 18:10 one?
11:42 Ven CosmoWright is a beast.
11:43 timotimo i have subscribed to his youtube channel, so it popped up in my timeline :)
11:43 hoelzro FROGGS: I'll spectest and push it up, then!
11:43 yoleaux 07:04Z <FROGGS> hoelzro: that seems to work!
11:43 Ven timotimo: I've just seen it now (we have french commentators that review 1/2 "big" speedruns per week), and wow, I'm baffled. I can get the theory, as a developer, but that's ... Incredible.
11:43 hoelzro o/ #perl6
11:44 dalek rakudo/nom: ec1e0ce | (Elizabeth Mattijsen)++ | src/core/Str.pm:
11:44 dalek rakudo/nom: Hmmm... samewith doesn't return?
11:44 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ec1e0cedf9
11:44 Ven Loved his reaction at the end, like he just got out of water after holding his breath for 20 min :p. (also his gf jumping on him and the chat reaction)
11:45 dalek roast: 3d7042c | (Elizabeth Mattijsen)++ | S32-str/lines.t:
11:45 dalek roast: Unfudge and add some more Str.lines tests
11:45 dalek roast: review: https://github.com/perl6/roast/commit/3d7042cd89
11:45 timotimo seems like i should watch it, too :)
11:45 moritz lizmat: I think 'return samewith' is better written as 'callwith'
11:45 Ven moritz: I still can't remember which is which.
11:45 grettis joined #perl6
11:45 moritz lizmat: (but please check that before committing)
11:45 Ven Makes me think we culd have that in the FAQ :)
11:45 Ven timotimo: well, I think he has a commentated version of his own on the channel? I need to watch it
11:45 moritz Ven: sure, please write thta entry
11:46 Ven moritz: you're supposed to say "well volunteered"
11:46 moritz Ven: I like to vary my speech a bit :-)
11:49 anaeem1_ joined #perl6
11:49 Timbus samewith??
11:50 Timbus isnt it nextsame
11:50 Ven Timbus: You live and learn
11:50 Timbus or callwith
11:50 Timbus ah
11:50 Ven (I'm as surprised as you are)
11:50 moritz oh
11:50 moritz nextwith
11:50 moritz yes :-
11:50 Timbus i was reading the source, i  didnt see your discussion haha
11:51 lizmat nextwith doesn't work, because it will look for the next dispatcher
11:51 lizmat I want it to be done by the same dispatcher
11:51 timotimo Ven: i believe he does
11:51 moritz m: multi f($x) { nextwith; say "not here" }; multi f() { 23 }; say f 1
11:51 camelia rakudo-moar 0e7397: OUTPUT«not here␤True␤»
11:51 Ven timotimo: what?
11:52 timotimo have a commentated version up on his channel
11:52 Ven timotimo: yes yes, I was merely pointing it out :p
11:53 Timbus moritz, that.. shouldnt have printed, i don't think
11:53 Ven m: multi f($x) { callsame; say "not here" }; multi f() { 23 }; say f 1
11:53 camelia rakudo-moar 0e7397: OUTPUT«not here␤True␤»
11:54 Px12 joined #perl6
11:54 Timbus call should return, next shouldn't. at  least that's what I thought
11:55 timotimo Timbus: the nextwith did nothing at all in that case
11:58 ribasushi jnthn: sorry didn't get a chance to prepare a better example, ECRAPOVERLOAD
11:58 ribasushi jnthn: I will get back to you soon on this
11:58 telex joined #perl6
11:58 Timbus timotimo, o.
12:02 kaleem joined #perl6
12:05 prevost joined #perl6
12:11 dalek rakudo/nom: 51ddd5d | (Elizabeth Mattijsen)++ | src/core/Str.pm:
12:11 dalek rakudo/nom: Don't obfuscate what we mean
12:11 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/51ddd5dd45
12:14 FROGGS hoelzro: what do you mean by "push it up"? it was not in nom?
12:15 Ven timotimo: Well. I've just seen Kappa (if you know that face from twitch) retweeting dibblego (the scalaz guy). Uh.
12:15 FROGGS hoelzro: (I've only tested nom)
12:15 hoelzro FROGGS: no, I just threw it in a branch
12:15 FROGGS eww
12:15 FROGGS hoelzro: then I need to test it properly :o)
12:15 timotimo scalaz?
12:15 hoelzro FROGGS: ah ha
12:18 Ven timotimo: yea, it's a functional programming lib for scala
12:18 timotimo ah, interesting
12:20 Ven Maybe I'll do "siz" (six + z) for p6 :p
12:20 Ven well, it's far less useful without type inference, but it still is
12:21 Ven m: role A[::T] {}; class B does A { has $.val; submethod BUILD(::T $val) { self.bless(:$val) } }; my A[Int] $a = B.new(5);
12:21 camelia rakudo-moar 0e7397: OUTPUT«===SORRY!===␤None of the parametric role variants for 'A' matched the arguments supplied.␤Cannot call ''; none of these signatures match:␤:(Mu ::$?CLASS ::::?CLASS, Mu ::T)␤»
12:22 Ven m: role A[::T] {}; class B[::T] does A[T] { has $.val; submethod BUILD(::T $val) { self.bless(:$val) } }; my A[Int] $a = B.new(5); # ofc this doesnt work
12:22 timotimo classes cannot be parametric
12:22 camelia rakudo-moar 0e7397: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/THUz5s8HFIâ�¤Unable to parse class definitionâ�¤at /tmp/THUz5s8HFI:1â�¤------> [32mrole A[::T] {}; class B[33mâ��[31m[::T] does A[T] { has $.val; submethod B[0mâ�¤    expecting any of:â�¤       …»
12:22 Ven timotimo: I'm feeling sadder each and every day :(
12:22 timotimo aaw :(
12:22 Ven it's supposed to be a minor point, but it's just so useful
12:23 Ven being able to parameterize classes seems like a basic point of generics to me, though
12:23 Ven I really wonder what's the reasoning?
12:23 timotimo i suppose we want a class to have a fixed layout
12:23 timotimo and not per-instance
12:24 timotimo you can still just pun a role if you'd like
12:24 Ven timotimo: well, yes, but this forces me to have `make`-er methods
12:25 Ven or do you suggest `does`-ing a role in BUILDM
12:25 Ven ?
12:25 moritz you can simply use the role as if it were a class
12:25 timotimo m: role A[::T] { has T $.foo is rw }; my $boing = A[Int].new(foo => 123); say $boing.perl
12:25 camelia rakudo-moar 0e7397: OUTPUT«A[Int].new(foo => 123)␤»
12:25 timotimo ^- there you go
12:26 moritz and the class is transparently generated for you on the fly
12:26 timotimo we do like our puns in perl6-land
12:27 Ven timotimo: maybe p6 will have some local type-inference in 2025 :)
12:27 Ven I prolly don't want it sooner
12:27 timotimo huh? why not sooner?
12:28 Ven timotimo: because I don't quite have the time to volunteer ;)
12:29 timotimo ah
12:29 * moritz could imagine that stuffing a type inference engine into the optimizer might be good fun
12:29 Ven moritz: well, it can only make running programs faster
12:29 moritz Ven: nope
12:29 Ven moritz: oh yes :)
12:30 moritz Ven: it can also promote inevitable run-time type errors to compile time errors
12:30 Ven moritz: ah, that's not what I meant
12:30 moritz ah
12:30 Ven I meant - it can't make running your programs slower – only faster
12:30 moritz well, it can make them slower too :-)
12:30 timotimo yeah, type inference could cost a bunch of time
12:30 moritz (when the inference engine is slower than the benefits
12:31 moritz )
12:31 Ven well, some basic and local type inference could be really easy to do. Like
12:31 Ven m: sub a(Int $a, Int $b) { $a + $b }; sub f{ my $f = "a"; a(1, $b) }; say "alive";
12:31 camelia rakudo-moar 0e7397: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/_81RnwN6Smâ�¤Variable '$b' is not declaredâ�¤at /tmp/_81RnwN6Sm:1â�¤------> [32m{ $a + $b }; sub f{ my $f = "a"; a(1, $b[33mâ��[31m) }; say "alive";[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
12:31 Ven m: sub a(Int $a, Int $b) { $a + $b }; sub f{ my $b = "a"; a(1, $b) }; say "alive";
12:31 camelia rakudo-moar 0e7397: OUTPUT«alive␤»
12:32 Ven this one we could "fix" easily, I think
12:32 timotimo the rabbit hole goes on for ever :)
12:32 Ven that's where it's the most fun anyway :)
12:32 Ven are we even...
12:33 hoelzro FROGGS: it's clean on spectests, so let me know when you've tested it and I can push it into nom
12:33 timotimo what do perl6ers recommend having on your desk?
12:33 Ven m: sub f(--> Int) { 5 }; sub b(Int, Str){  }; sub bar{ b(5, f) }
12:33 camelia rakudo-moar 0e7397: ( no output )
12:33 Ven that one should blow up.
12:33 timotimo i've just removed pretty much everything from mine
12:33 Ven and without type inference
12:33 woolfy joined #perl6
12:34 Ven just "basic" type computation :)
12:34 Ven (which is why languages like c++ and c# have with auto and var anyway. that's not "inference")
12:34 timotimo feel free to contribute :)
12:35 Ven (admittedly, c++ has type inference with its templates, but even that know is broken loose due to additions in c++11/14)
12:35 timotimo the optimizer is one of the first places i did internals hacking in when i started out as a perl6 newbie
12:35 timotimo it's a pretty nice peace of code
12:35 Ven peace, code :p
12:36 timotimo er
12:38 Ven I'm *really* out of time these days. I need to finish stuff up for my school, public transport card, driver license reg, and more stuff.
12:38 Ven I'd like to "finish" the tutorial at least.
12:38 timotimo that's fine :)
12:38 timotimo yeah, the tutorial is a good thing to spend time on!
12:38 * Ven is really glad of the feedback he's had
12:40 FROGGS m: say GLOBAL::<%ENV>
12:40 camelia rakudo-moar ec1e0c: OUTPUT«(Any)␤»
12:40 FROGGS m: say PROCESS::<%ENV>
12:40 camelia rakudo-moar ec1e0c: OUTPUT«"HOME" => "/home/p6eval", "LANG" => "en_US.UTF-8", "LANGUAGE" => "en_US:en", "LC_CTYPE" => "de_DE.UTF-8", "LESSCLOSE" => "/usr/bin/lesspipe \%s \%s", "LESSOPEN" => "| /usr/bin/lesspipe \%s", "LOGNAME" => "p6eval", "LS_COLORS" => "rs=0:di=01;34:ln=01;36:mh=…»
12:41 woolfy joined #perl6
12:46 grettis joined #perl6
12:49 woolfy joined #perl6
12:49 FROGGS lizmat / jnthn: we have a race condition... we do run the code that sets up PROCESS::<%ENV> before looking up %*ENV when compiling the restricted setting
12:53 Ven Elixir 1.0 is out!
12:53 FROGGS lizmat / jnthn: because:
12:53 FROGGS rakudo/src/gen/m-CORE.settin​g:18968:$PROCESS::SCHEDULER = ThreadPoolScheduler.new();
12:53 FROGGS rakudo/src/gen/m-CORE.setting:21160:    PROCESS::<%ENV> := %ENV;
12:54 FROGGS lizmat / jnthn: and the ThreadPoolScheduler accesses %*ENV<RAKUDO_MAX_THREADS>
12:55 FROGGS lizmat: this could very well be related to your hang when building the restricted setting
12:57 BizarreCake joined #perl6
13:00 [Coke] I cannot open pl6anet.org from work.
13:00 lizmat joined #perl6
13:02 synopsebot joined #perl6
13:02 tadzik S99:FYI # PerlJam++
13:02 synopsebot Link: http://perlcabal.org/syn/S99.html#FYI_#_PerlJam++
13:03 tadzik heh
13:03 tadzik S99:FAIL
13:03 synopsebot Link: http://perlcabal.org/syn/S99.html#FAIL
13:03 timotimo hahaha
13:03 timotimo that's pretty neat.
13:04 PerlJam S99:adverbial pair
13:04 synopsebot Link: http://perlcabal.org/syn/S99.html#adverbial_pair
13:04 PerlJam S99:compilation unit
13:04 synopsebot Link: http://perlcabal.org/syn/S99.html#compilation_unit
13:05 PerlJam tadzik++  I've wanted that almost since S99 was created  :)
13:05 tadzik :)
13:05 rurban1 joined #perl6
13:05 tadzik I should probably add (help|source) to it
13:06 tadzik or maybe someone wants to be the 4th contributor :)
13:06 tadzik also, it's really unnecessary for synopsebot to be in Perl 5
13:07 nwc10 yay! use more 'dogfood';
13:07 PerlJam S32/Str:206
13:07 synopsebot Link: http://perlcabal.org/syn/S32/Str.html#line_206
13:07 kaare__ joined #perl6
13:08 fhelmberger joined #perl6
13:08 PerlJam tadzik: I wonder if the name lookup thing could be generalized so that you could also do  S32/Str:index
13:08 PerlJam (I'm sure it can, but maybe someone else wants to do it? :)
13:12 cognome joined #perl6
13:13 kaleem joined #perl6
13:16 lizmat FROGGS: maybe I should make $*SCHEDULER lazy ?
13:17 FROGGS lizmat: no, I put Env.pm before ThreadPoolScheduler.pm, and it seems to work
13:17 FROGGS I'm currently spectesting my stuff
13:17 lizmat ok
13:17 FROGGS wow, a lot of fails >.<
13:17 FROGGS mixhash and friends
13:17 lizmat yes, that's changed spec of TimToady
13:18 lizmat I'm not sure I like it
13:18 FROGGS okay
13:20 gmunoz joined #perl6
13:27 zoosha joined #perl6
13:33 zoosha joined #perl6
13:34 zoosha joined #perl6
13:35 zoosha joined #perl6
13:35 dalek rakudo/nom: f79201d | (Tobias Leich)++ | / (11 files):
13:35 dalek rakudo/nom: reorganize lookup of dynamic variables
13:35 dalek rakudo/nom:
13:35 dalek rakudo/nom: The code before assumed that a dynamic variable always has an true-ish
13:35 dalek rakudo/nom: value after it has been initialized. This was not true for $*TZ and
13:35 dalek rakudo/nom: perhaps others. Now we have a candidate for INITIALIZE_DYNAMIC that
13:35 dalek rakudo/nom: returns an exception, and we can check on that and fail.
13:35 dalek rakudo/nom: Also I reordered the source files, so that we build Env.pm before
13:35 dalek rakudo/nom: ThreadPoolScheduler.pm, since the ThreadPoolScheduler accesses
13:35 dalek rakudo/nom: %*ENV<RAKUDO_MAX_THREADS>. This used to cause a hang when building
13:35 dalek rakudo/nom: RESTRICTED.setting on my box.
13:35 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f79201d416
13:36 FROGGS m: say $*TZ # this should work in a few
13:36 camelia rakudo-moar ec1e0c: OUTPUT«Dynamic variable $*TZ not found␤  in method gist at src/gen/m-CORE.setting:13457␤  in sub say at src/gen/m-CORE.setting:14983␤  in block <unit> at /tmp/DB3I5e7Mf9:1␤␤»
13:37 timotimo good work, FROGGS++ :)
13:38 FROGGS lizmat: it would be mega awesome if you could test that with --gen-moar=libuv-upgrade, but you'd have to wipe MoarVM or make realclean in there
13:39 FROGGS see you later, I need to pick up one of my kids
13:47 grettis joined #perl6
13:51 firnsy joined #perl6
13:55 timotimo hmm. when we get better list iteration, maybe we'll reach niecza speeds for some kinds of stuff?
13:57 jnthn ribasushi: No worries, I slept awfully for a second night running so I'm probably close to useless today anyway :/
13:58 jnthn timotimo: I...think we exceed it for some kinds of stuff already. :)
13:58 jnthn timotimo: For one I don't think it got native types...
14:00 timotimo well, nqp probably exceeds niecza for some stuff
14:00 timotimo but at composite stuff we're still pretty bad, like rc-forest-fire or 9-billion-names or something
14:01 firnsy joined #perl6
14:01 firnsy joined #perl6
14:01 jnthn Could always measure rather than guessing :P
14:01 timotimo that sounds like work
14:02 jnthn I suspect the rule is "if it involves lists Rakudo is probably slower"...
14:02 timotimo i suspect so, too
14:02 timotimo i've been thinking:
14:02 timotimo if we spesh a few ops that run on constant strings
14:02 timotimo we could end up getting a faster sprintf
14:03 timotimo we'd probably not be able to completely dead-code-remove, say, float handling if our format string has only %d in it ...
14:04 timotimo could be an opt for *way* later, though
14:04 FROGGS[mobile] joined #perl6
14:04 yeahnoob joined #perl6
14:06 nwc10 timotimo: http://morepypy.blogspot.co.at/2011/08/​pypy-is-faster-than-c-again-string.html
14:06 nwc10 it's a good idea. It's not clear how much is a good idea when
14:06 nwc10 but some research on what's most common/most hot might be interesting
14:07 nwc10 it might be that %x variants are fairly common
14:10 timotimo yes, remembering that thing gave me the idea
14:13 chenryn joined #perl6
14:17 MilkmanDan joined #perl6
14:18 masak m: macro postfix:<!!>($o) { quasi { die "Null check failed for ", $o.Str unless defined {{{$o}}}; {{{$o}}} } }; say 42!!; my $cookies; my $food = $cookies!!
14:18 camelia rakudo-moar 51ddd5: OUTPUT«42␤Null check failed for ␤  in any  at /tmp/eDFyDUJWaN:1␤  in block <unit> at /tmp/eDFyDUJWaN:1␤␤»
14:18 masak so close.
14:18 * masak submits rakudobug
14:19 masak (it should capture the string '$cookies' in $o.Str, IMO)
14:19 mberends_ joined #perl6
14:22 masak that is, the error message shoulda been 'Null check failed for $cookies'
14:22 leont nwc10: reminds me of an article I once read where Perl5 was being faster than C for OpenGLy stuff because generating shaders is string manipulation and executing them is on the GPU anyway
14:23 moritz : macro postfix:<!!>($o) { say $o.^name }; my $cookies; $cookies!!
14:23 moritz m: macro postfix:<!!>($o) { say $o.^name }; my $cookies; $cookies!!
14:23 camelia rakudo-moar 51ddd5: OUTPUT«AST␤===SORRY!===␤Too few positionals passed; expected 3 arguments but got 2␤»
14:23 treehug88 joined #perl6
14:24 moritz masak: I see nothing in AST.pm that would initialize $!Str
14:24 masak moritz: it's done from the Actions, IIRC.
14:25 masak moritz: and the logic works for infix ops.
14:25 masak or at least for non-op subs.
14:26 moritz nqp::bindattr($quasi_ast, $ast_class, '$!Str', $code_string);
14:26 masak m: macro foo($e) { quasi { say $e.Str } }; foo "hi, I'm a string"
14:26 camelia rakudo-moar 51ddd5: OUTPUT« "hi, I'm a string"␤»
14:27 moritz yes, method EXPORT calls add_macro_arguments($_.ast, @argument_asts, '');
14:27 masak m: macro infix:<+++>($L, $R) { quasi { say $L.Str, " and ", $R.Str, " went into a bar" } }; "Plato" +++ "a platypus"
14:27 camelia rakudo-moar 51ddd5: OUTPUT« and  went into a bar␤»
14:27 moritz that third argument is the relevant string
14:27 masak infix ops also don't work :/
14:27 moritz I wonder if changing it to $sym makes it work
14:28 * moritz patches and recompiles
14:28 masak method EXPORT calls add_macro_arguments?
14:28 masak that's... new, I think.
14:30 moritz masak: you touched that code in July this year :-)
14:30 moritz commit 9b8e9c5f4eeb99200279d255bd663dd1a132a543
14:32 masak oh, I'm familiar with the calls to add_macro_arguments; I made that sub.
14:32 guru joined #perl6
14:32 masak I also grok the contents of that commit.
14:33 masak but I didn't know about (and still don't see) any relation to any EXPORT method...
14:33 moritz sorry, EXPR
14:33 * moritz typo'ed
14:33 masak oh!
14:33 masak big phew
14:33 moritz +++ and +++ went into a bar
14:34 masak ah.
14:34 moritz not quite what you wanted, no? :-)
14:34 masak these are not the nodes you're looking for
14:34 masak thought it's still nice, in a way
14:34 masak I need to sit down and brain in a way that sticks about this one
14:34 * moritz tries with ~$/ instead, which seems much more sinsble
14:35 moritz erm, ~$_
14:35 masak moritz++ # perseveritude
14:37 moritz "Plato" and "a platypus" went into a bar
14:38 FROGGS joined #perl6
14:43 dalek rakudo-star-daily: c2b3509 | coke++ | log/ (14 files):
14:43 dalek rakudo-star-daily: today (automated commit)
14:43 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/c2b3509f26
14:44 dalek doc: dc2e59b | (Ben Tyler)++ | lib/Language/objects.pod:
14:44 dalek doc: tiny typo fix in private method example
14:44 dalek doc: review: https://github.com/perl6/doc/commit/dc2e59b38c
14:49 dalek rakudo/nom: d1dd37e | (Elizabeth Mattijsen)++ | src/core/ThreadPoolScheduler.pm:
14:49 dalek rakudo/nom: Lazily initialize $*SCHEDULER
14:49 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d1dd37e9da
14:49 masak moritz++!
14:49 masak moritz: guess you're spectesting now ;)
14:49 grettis joined #perl6
14:49 moritz masak: aye, I am
14:50 moritz thought the sepctest is noisy enough that it doesn't tell me anything :(
14:50 dalek rakudo/nom: a843a4a | moritz++ | src/Perl6/Actions.nqp:
14:50 dalek rakudo/nom: Fix AST.Str for operator macros
14:50 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a843a4a556
14:50 [Coke] moritz: YES I ALSO RANT
14:51 [Coke] (about noisy spectests that keep getting dirtier! bad devs!)
14:51 FROGGS hoelzro: test-handles works for v5
14:51 FROGGS [Coke]: :o(
14:52 FROGGS [Coke]: though, the date stuff should work again
14:52 [Coke] FROGGS: not in this run, but tomorrow's, aye? thanks!
14:52 FROGGS [Coke]: yes, was patched about 80 minutes ago
14:52 [Coke] FROGGS++
14:52 dalek specs: 063e711 | (L. Grondin)++ | S99-glossary.pod:
14:52 dalek specs: define process
14:52 dalek specs: review: https://github.com/perl6/specs/commit/063e711747
14:52 dalek specs: 5757b4c | (L. Grondin)++ | S02-bits.pod:
14:52 dalek specs: Merge branch 'master' of github.com:perl6/specs
14:52 dalek specs: review: https://github.com/perl6/specs/commit/5757b4cf45
14:53 chenryn joined #perl6
15:03 anaeem1 joined #perl6
15:06 hoelzro FROGGS: thanks, I'll push that patch into nom then
15:06 dalek roast: 72b7cdc | moritz++ | integration/advent2012-day13.t:
15:06 dalek roast: adopt advent test to new spec
15:06 dalek roast: review: https://github.com/perl6/roast/commit/72b7cdcf08
15:06 FROGGS moritz: that's how HEAD looks like currently: https://gist.github.com/FR​OGGS/273d41dfa3557647033b
15:06 FROGGS hoelzro++
15:06 nwc10 does the advent calendar web page also get a "this week" update?
15:07 moritz FROGGS: now one test failure less :-)
15:07 dalek rakudo/nom: ac4b214 | (Rob Hoelz)++ | lib/Test.pm:
15:07 dalek rakudo/nom: Restore "Test.pm - Allow output handles to be queried and modified"
15:07 dalek rakudo/nom:
15:07 dalek rakudo/nom: We must delay initializing Test handles until runtime
15:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ac4b214710
15:08 yeahnoob joined #perl6
15:10 yeahnoob joined #perl6
15:10 hoelzro if someone could help explain to me how compile vs run time works in Perl 6, I would be grateful
15:10 hoelzro I was talking to TimToady about this a bit last night
15:11 yeahnoob joined #perl6
15:11 moritz they are interleaved
15:11 hoelzro about how I assumed that my $foo = 17; would create a lexical scalar $foo at compile time, but the assignment of $foo to 17 would be delayed until runtime
15:11 hoelzro (well, I could see it being optimized out)
15:11 hoelzro moritz: how do compilation/runtime phases work wrt precompilation, though?
15:11 FROGGS one important bit is that the result of the stuff that happens at compile time is serialized to the .moarvm file when you precompile code
15:11 jnthn hoelzro: The key thing your model may be missing is that when you "use" a module, then its mainline has its runtime right away
15:12 jnthn hoelzro: Meaning that the module mainline's runtime happens during the dependent module's compile time.
15:12 hoelzro jnthn: that makes sense to me (it's the same in Perl 5)
15:12 hoelzro jnthn: did you see the bug I caused that FROGGS found?
15:12 jnthn Yes, but what is *not* the same in Perl 5 is that we do precomp
15:12 hoelzro true
15:12 grondilu joined #perl6
15:13 timotimo nwc10: what do you mean with advent calendar and "this week" update?
15:13 jnthn If you were to, for example, tweak something that is exported during the module mainline, then it'd be the importing module's pre-compilation that'd end up serializing it.
15:13 nwc10 the joke some years back was "this week", referring to the fact that back then, the spec moved quite fast
15:13 nwc10 so "this week" was implying "the spec has changed"
15:13 FROGGS jnthn: yes, exactly that happened with filehandles
15:14 jnthn If you export a variable and stick a file handle in it then...well, fun...
15:14 nwc10 and it was really "does the original page get updated to also show the new version?"
15:14 * grondilu was looking at http://rosettacode.org/wiki/Modular_inverse#Perl_6 and thought it would be nice to write 'multi infix:<div>($a, $b, :$modulus) {...}' but it's currently not possible because &infix:<div> has a hard-coded proto in Numeric, with no possible adverb
15:15 hoelzro jnthn: so is my $h = $PROCESS::OUT a bug, then?
15:15 FROGGS hoelzro: if you export it
15:15 hoelzro does one have to do an explicit my $h; INIT $h = $PROCESS::OUT; ?
15:17 hoelzro I just see this behavior potentially tripping people up
15:17 hoelzro because it did me =)
15:17 jnthn Well, perhaps the real issue is that the VM tries to serialize the file handle...or that the filehandle doesn't just serialize a closed form of itself or something.
15:17 jnthn Since it seeems you just re-assign it on each load anyway.
15:18 jnthn Heck, we could even get it to serialize to a VMNull as an initial attempt.
15:18 jnthn I *think* that the Perl 6 level IO code might then do the Right Thing or so...
15:19 FROGGS jnthn: does that apply to VMThreads too?
15:19 jnthn FROGGS: If youre ending up trying to serialize one of those...we have a problem, I think.
15:19 FROGGS jnthn: yes, that happens somewhere in v5 due to a change in rakudo, but I don't know details yet
15:20 hoelzro what I would expect is (and this could be a dumb idea) for a compunit A.pm, containing "module A; our $h = $*OUT", is that if I precompile A, and I 'use A; $A::h.say: "hi"', A's mainline would run immediately after use, initializing $h
15:20 hoelzro oooooh
15:20 hoelzro I think I understand the problem now
15:20 hoelzro thanks for rubber ducking =)
15:20 jnthn hoelzro: Yes, I think what I'm suggesting would give you that.
15:21 hoelzro it's because the *consumer* of A is being precompiled, so $h is assigned during compilation (because, afaik, A's mainline would be run then), and *kudo can't figure out how to serialize an OS handle
15:21 jnthn Right
15:22 jnthn Yeah, generally when looking at serialization issues you need to stop and ponder very carefully exactly what is being compiled at the point an object comes to exist and is made visible...
15:22 chenryn joined #perl6
15:22 MilkmanD1n joined #perl6
15:22 jnthn You may like to try https://gist.github.com/jnthn/9f6bcae485fed4511392 and see if it helps
15:22 nwc10 this is all going to be fun, but at least it feels easier to deal with it from the start.
15:23 hoelzro jnthn: I could give it a whirl
15:23 jnthn nwc10: Yes, pre-comp is worth it overall, but there are traps.
15:23 nwc10 I agree with both parts of that
15:25 jnthn It's *really hard* to nail pre-compiling stuff together with modules being able to do whatever they like at BEGIN time and load time.
15:26 jnthn Not to mention when you also have to deal with things like augment.
15:26 timotimo aughh, meeeen
15:27 * masak .oO( did timotimo just have an augmental breakdown? )
15:27 jnthn Which demands a mechanism along the lines of "oh, I see you just changed this object graph that was serialized by this module, so I need to re-serialize it AND build a fix-up table so I can modify the original with your changes AND I need to notice if two modules you pull in both did augments and then complain"
15:27 jnthn and yes, we do ALL those already, and it was a real nuisance. :)
15:27 masak clearly I haven't been bashing enough at those parts.
15:28 masak I don't remember submitting any bug reports about them :>
15:28 hoelzro I look at precomp like I look at threads: really useful, but hard to get right =)
15:28 jnthn Oh, you have, but maybe not appreciating that they were bugs in this area.
15:28 masak oh, good.
15:29 masak mission accomplished! apparently.
15:29 jnthn "Where the heck did that symbol go when Ipre-compile" is the classic one :)
15:29 jnthn The bit I didn't say above is that when we detect a conflict in objects, we actually clone the conflicting one before overwriting it with the updated one
15:30 jnthn And then let th emodule loader inspect the conflcits and merge any that it can.
15:30 jnthn It will merge Stash instances.
15:30 jnthn And whine about the rest. :)
15:31 jnthn The "torment the implementors" thing on pre-comp has already gone far enough that we actually have merge algorithms in the module loader. :P
15:32 jnthn Most folks of course don't know any of this is being taken care of, and happily --target=mbc/jar, and it usually works out. :)
15:32 mr-foobar joined #perl6
15:32 hoelzro jnthn++
15:32 hoelzro (anyone else who worked on precomp)++
15:32 jnthn But yeah, I tend to see it these days as - some things I can make work out, others we're just going to have to accept are probably impossible.
15:33 carlin the only gotcha I've hit with precomp is if you do `is native(foo)` (where foo is a sub that locates a .so) the result of foo() gets precompiled
15:33 masak I think sorear once said that Perl 6 is basically the only language that does *both* precomp and dynamic module loading, and that that creates special, um, tensions. or something like that.
15:34 jnthn carlin: is native is a trait and so is invoked at compile time
15:35 jnthn carlin: Are you wanting to punt deciding the actual library name until runtime?
15:36 carlin jnthn: no, just the path to it
15:36 jnthn Well, same thing *handwave* :)
15:36 jnthn carlin: I'll ponder a mechanism for that.
15:37 jnthn I can probably come up with something.
15:37 timotimo "oh! oh! oh! we can constant fold this! awesome!"
15:38 carlin trait_mod:<is>(&thesub, :native(foo)); works
15:38 carlin but isn't as nice as sub thesub is native(...)
15:38 timotimo agreed
15:38 jnthn Yes, and that is runtime, not BEGIN time, so you're kinda asking for pre-comp problems
15:38 timotimo maybe we want the phaser that happens during "linking, ALAP"?
15:38 jnthn Not for your module, but for the thing using you rmodule.
15:39 jnthn I'm pondering a role LibraryNameProvider { method name() { ... } }
15:39 jnthn And it expects you to provide a class implemeting that role.
15:39 jnthn is native(ThatClass)
15:40 jnthn And so it's jus tthe class we commit to at compile time
15:40 jnthn And it calls the method on it at runtime to get the library name.
15:40 diakopter how would such a thing be hooked into compile time
15:40 timotimo ohai diakopter! :)
15:40 jnthn diakopter: You're just passing a type object to the trait at compile time.
15:41 diakopter yep, that's what I'm asking; what calls that trait tjingie at compile time
15:41 jnthn The compiler.
15:41 diakopter thingie
15:41 jnthn That's what traits are: the compiler delegating to a trait_mod
15:42 dalek perl6-roast-data: e89bbfa | coke++ | / (6 files):
15:42 dalek perl6-roast-data: today (automated commit)
15:42 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/e89bbfa482
15:43 diakopter timotimo: hi :)
15:43 * masak .oO( which makes trait_mods "macroish", I guess )
15:43 diakopter I was abiut to sai
15:43 diakopter iiii
15:44 masak dangit, I need to give up "macroish" as a lost cause, and go with a term that actually means something related to macros :)
15:44 diakopter ii iiii ii
15:44 diakopter
15:44 masak "macrotastic", perhaps
15:44 diakopter macrostic
15:44 masak macrobatic
15:44 jnthn masak: "BEGIN time" :P
15:44 diakopter macabre
15:45 masak jnthn: that's what "macroish" has come to mean, basically
15:45 masak jnthn: I'm looking for a term meaning "pertaining to macros" -- which *should* have been "macroish", of course
15:45 masak but history isn't always kind, or sensible... :)
15:45 jnthn macro-related :P
15:46 diakopter macrois
15:46 jnthn Or just call it "marco" :P
15:46 masak aaaaaaaaaaa
15:46 diakopter polo
15:48 masak I swear, the next time I am brooding over some extremely brain-twisty corner of macro logic, and someone comes on the channel and does "macro marco"... some plate is going to break or someone is going to be kickbanned.
15:49 tadzik hugme: hug masak
15:49 * hugme hugs masak
15:49 diakopter hugme: hug macro marco
15:49 * hugme hugs macro
15:50 grettis joined #perl6
15:50 jnthn masak: So work on macros in a Greek restaurant. Problem solved. :P
15:50 diakopter wheresa hackathon
15:50 diakopter whena
15:51 masak ¡ay caramba!
15:52 diakopter why would you kickban a plate
15:52 * masak .oO( to dish out some punishment )
15:53 diakopter .oO( I put some flatware in your hardware )
15:55 carlin serving up some puns
16:02 hoelzro macro'ni and cheese?
16:03 * hoelzro is a bit late to the pun party
16:03 mberends_ joined #perl6
16:03 jnthn Time for sleep...'night
16:07 timotimo gnite jnthn :)
16:09 leont Any reason why require returns Nil instead of something truthy?
16:09 anaeem1_ joined #perl6
16:10 masak m: say (require Temporal)
16:10 camelia rakudo-moar ac4b21: OUTPUT«Could not find Temporal in any of: /home/p6eval/rakudo-inst-2/languages/perl6/lib, /home/p6eval/rakudo-inst-2/languages/perl6␤  in any load_module at src/gen/m-ModuleLoader.nqp:186␤  in method load_module at src/gen/m-CORE.setting:21969␤  in block <u…»
16:10 FROGGS m: say (require Test)
16:10 camelia rakudo-moar ac4b21: OUTPUT«Nil␤»
16:10 masak leont: as to reasons, don't think so.
16:11 masak leont: it'd probably not be too late to spec it to be truthy.
16:11 masak leont: is there a good reason for it to be, besides being generally positive? :)
16:11 masak I mean, either the require succeeds or it dies.
16:11 leont Now doing if (try { require Foo; 1}) { ... }, that 1 feels a bit wrong there
16:12 masak hm. yes.
16:12 leont Or maybe I'm missing a more sensible way to dynamically load
16:14 FROGGS require could return a Failure/True I guess...
16:14 leont Also, are the possbile values of $*DISTRO.name documented somewhere? On Unix I'd assume it to follow uname, but what about Windows?
16:14 FROGGS or Failure/CompUnit when we are at it
16:14 timotimo erm, if you try { require Foo } doesn't that make Foo only available inside the { } ?
16:15 masak m: sub leont-require($module) { try require $module; !$! }; for <Test Puppies> { if leont-require $_ { say "loaded $_!" } else { say "awww! no $_!" } }
16:15 camelia rakudo-moar ac4b21: OUTPUT«loaded Test!␤awww! no Puppies!␤»
16:15 masak roll your own sub(TM)
16:16 timotimo where i come from, subs are more "folded" than "rolled"
16:16 FROGGS timotimo: same with masak's sub
16:16 cognome joined #perl6
16:17 masak m: macro postfix:<!!>($o) { quasi { die "Null check failed for ", $o.Str unless defined {{{$o}}}; {{{$o}}} } }; say 42!!; my $cookies; my $food = $cookies!!
16:17 camelia rakudo-moar ac4b21: OUTPUT«42␤Null check failed for $cookies␤  in any  at /tmp/JPz5CiJgGW:1␤  in block <unit> at /tmp/JPz5CiJgGW:1␤␤»
16:17 masak moritz++!!
16:18 timotimo mighty fine :)
16:18 leont timotimo: I could live with that, I could just return that $module's type object, right?
16:18 leont Or at least, when I know it will be the name of a type
16:18 leont Those aren't really the same of course
16:19 timotimo return "the object" :)
16:19 FROGGS TimToady: what do think about require returning Failure on failure, or CompUnit in case it wasn't called in sink context?
16:19 masak "in case it wasn't called in sink context" sounds like wantarray to me
16:21 FROGGS masak: I just mean that we don't have to construct a CompUnit return value just to throw it away
16:22 FROGGS and the in-any-case return Failure (on failure), would explode like a Howler if it is not .Bool'd like a Failure
16:23 masak *nod*
16:23 masak what's the use case of 'require' returning a CompUnit?
16:24 FROGGS masak: it feels saner than True, and you could inspect it...
16:24 FROGGS m: say CompUnit.new
16:24 camelia rakudo-moar ac4b21: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤  in method new at src/gen/m-CORE.setting:21783␤  in block <unit> at /tmp/OPPuytyy39:1␤␤»
16:24 masak like, OK, now you have a CompUnit, so that you can... what?
16:24 masak if there is no use case, I recommend returning Nil like we do today ;)
16:24 FROGGS masak: you could query it path :o)
16:25 FROGGS masak: but Nil isnt true
16:25 masak right, today we have Nil-or-death, not True-or-False
16:26 masak Nil makes a certain kind of sense to me. because 'require' isn't something you'd expect to use for its value.
16:27 FROGGS masak: perhaps not in the perl world :o)
16:27 masak point taken.
16:28 masak though in my argument's defense, that is the current world :P
16:28 FROGGS *g*
16:28 FROGGS ture
16:28 FROGGS true*
16:28 masak 'night
16:30 FROGGS I'd like to see a: if require 'Foo' { ::('Foo').new() } instead of: try require 'Foo'; if ::('Foo') !~~ Failure { ... }
16:30 FROGGS note that the second (currently working) case only works if Foo.pm offers a symbol Foo
16:30 FROGGS gnight masak
16:32 TimToady m: require Test; say Test
16:32 camelia rakudo-moar ac4b21: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/7yaaPGDzUjâ�¤Undeclared name:â�¤    Test used at line 1â�¤â�¤Â»
16:32 guru joined #perl6
16:32 TimToady require barename is supposed to be special enough to introduce the name, I thought
16:32 FROGGS it does not stub that symbol yet
16:32 jaffa4 joined #perl6
16:32 TimToady m: require Test
16:32 camelia rakudo-moar ac4b21: ( no output )
16:33 jaffa4 hi all
16:33 FROGGS hi jaffa4
16:33 jaffa4 I have problem with native call
16:33 TimToady okay, it doesn't fail to require, just doesn't introduce the name
16:33 TimToady that's fixable
16:33 FROGGS TimToady: correct
16:33 [Coke] jaffa4: what's up?
16:34 mberends joined #perl6
16:34 japhb grondilu: re: 063e7117473f98eb81c137ba5dab377aabae3aaf , the OS is aware of some types of threads, so that's insufficiently distinguishing.  More important is that a process is a security domain, and by default other processes do not share the same memory, sockets, etc.  Threads by default *do* share these things (though of course sharing these correctly is difficult).
16:35 jaffa4 this http://pastebin.com/Q95gACED
16:35 jaffa4 perl6 gives me an error message which looks mysterious
16:36 jaffa4 I followed a nativecall example
16:36 FROGGS jaffa4: don't use methods, use subs only for the 'ise native' trait
16:36 FROGGS is*
16:36 jaffa4 I use sub only
16:37 jaffa4 It complains about parameter mismatch
16:37 jaffa4 whcih does not make sense
16:37 FROGGS jaffa4: can you paste the code of nativecalltest.p6 too?
16:38 jaffa4 I cut it down for you
16:38 FROGGS thanks
16:38 jaffa4 that is all you need what | pasted
16:40 carlin jaffa4: you're paste doesn't show how you're calling TopWindow_Paint, what are you passing to it?
16:40 carlin *your
16:40 jaffa4 I am not calling it
16:40 jaffa4 what calls it in the paste
16:41 jaffa4 you should see what calls it, it is found there
16:41 jaffa4 http://pastebin.com/yz9QRhqp
16:41 jaffa4 ths is the call  TopWindow_Paint (self,$w);
16:42 jaffa4 self is class TopWindow is repr('CPointer') {
16:43 TimToady m: my @a = 1,2,3; @a.plan: 4..*; say @a[^10]
16:43 camelia rakudo-moar ac4b21: OUTPUT«1 2 3 4 5 6 7 8 9 10␤»
16:45 jaffa4 self has type TopWIndow., right?
16:45 FROGGS yes, self is of type TopWindow
16:46 jaffa4 alling 'TopWindow_Paint' will never work with argument types (Mu)?
16:46 jaffa4 What is Mu?
16:46 FROGGS ohh
16:46 FROGGS your method new returns Mu
16:46 FROGGS at line 284
16:47 FROGGS because the sub TopWindow_TopWindow has no returns trait
16:47 FROGGS but all in all that code looks weird
16:47 jaffa4 Why?
16:47 * moritz still doesn't see how (self, $w)  becomes (Mu)
16:51 grettis joined #perl6
16:51 FROGGS star-m: use NativeCall; sub Foo_new() is native is symbol('xdr_array') { ... }; class Foo is repr('CPointer') { method new { Foo_new() } }; say Foo.new
16:51 camelia star-m 2014.04: OUTPUT«(signal )»
16:51 FROGGS moritz: a bit like that
16:52 jaffa4 that is the translation of TopWindow C++ class into TopWindow Perl6 class
16:52 FROGGS star-m: use NativeCall; sub Foo_new is native is symbol('herror') { ... }; class Foo is repr('CPointer') { method new { Foo_new() } }; say Foo.new
16:52 camelia star-m 2014.04: OUTPUT«Resolver Error 0 (no error)␤(Mu)␤»
16:52 FROGGS moritz: ^^
16:53 FROGGS because the native sub has no returns trait is returns Mu, which is what we return from .new
16:53 FROGGS and that is what get passed along
16:53 moritz but there's still $w
16:53 moritz so the call capture should have two elements
16:53 moritz and not be reported as (Mu)
16:54 FROGGS eww
16:54 FROGGS TopWindow_Paint (self,$w)
16:54 FROGGS look at that space :P
16:54 moritz ARGL
16:55 moritz but then it should be (Parcel), no?
16:55 xinming joined #perl6
16:55 FROGGS jaffa4: please remove the space char before the '('
16:55 FROGGS m: say (Mu,Int)
16:55 camelia rakudo-moar ac4b21: OUTPUT«(Mu) (Int)␤»
16:55 FROGGS m: say (Mu,Int).Parcel
16:55 camelia rakudo-moar ac4b21: OUTPUT«(Mu) (Int)␤»
16:55 moritz m: say (Mu, Int).^name
16:55 camelia rakudo-moar ac4b21: OUTPUT«Parcel␤»
16:56 jaffa4 FROGGS: yes that is it
16:56 molaf joined #perl6
16:56 moritz FROGGS++
16:57 jaffa4 I think many users faill into that.
16:57 moritz m: sub f(Int, Str) { }; f (Mu, 'foo')
16:57 camelia rakudo-moar ac4b21: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤  in sub f at /tmp/PRXfyj8mU9:1␤  in block <unit> at /tmp/PRXfyj8mU9:1␤␤»
16:57 moritz why is that a runtime error?
16:59 TimToady good question
17:00 TimToady Mu is not a valid Int either
17:00 TimToady m: sub f(Int, Str) { }; f (Int, 'foo')
17:00 camelia rakudo-moar ac4b21: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤  in sub f at /tmp/rhW3Wyi4eL:1␤  in block <unit> at /tmp/rhW3Wyi4eL:1␤␤»
17:00 moritz TimToady: but Mu never tries to bind to an Int container
17:00 moritz TimToady: it's always a Parcel
17:00 TimToady m: sub f(Int, Str) { }; say "alive"; f (Int, 'foo')
17:00 camelia rakudo-moar ac4b21: OUTPUT«alive␤Too few positionals passed; expected 2 arguments but got 1␤  in sub f at /tmp/xKjNPHCdkz:1␤  in block <unit> at /tmp/xKjNPHCdkz:1␤␤»
17:00 TimToady answer, it's not runtime
17:01 TimToady oh wait, I'm blind
17:01 * TimToady is stumped
17:02 TimToady maybe gives up on Parcel, on the assumption that it might expand in list context?
17:02 TimToady despite the fact that it could know there's no list context
17:02 FROGGS m: sub f(Str) { }; say "alive"; f(Int)
17:02 camelia rakudo-moar ac4b21: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/vMdnefc5rNâ�¤Calling 'f' will never work with argument types (Int)â�¤    Expected: :(Str)â�¤at /tmp/vMdnefc5rN:1â�¤------> [32msub f(Str) { }; say "alive"; [33mâ��[31mf(Int)[0mâ�¤Â»
17:02 FROGGS m: sub f(Str) { }; say "alive"; f (Int)
17:02 camelia rakudo-moar ac4b21: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/QJNSxO1jaIâ�¤Calling 'f' will never work with argument types (Int)â�¤    Expected: :(Str)â�¤at /tmp/QJNSxO1jaI:1â�¤------> [32msub f(Str) { }; say "alive"; [33mâ��[31mf (Int)[0mâ�¤Â»
17:02 FROGGS m: sub f(Str) { }; say "alive"; f(Mu)
17:02 camelia rakudo-moar ac4b21: OUTPUT«alive␤Type check failed in binding <anon>; expected 'Str' but got 'Mu'␤  in sub f at /tmp/EWCMiFm7B4:1␤  in block <unit> at /tmp/EWCMiFm7B4:1␤␤»
17:03 TimToady but I thought it did a conjectural dispatch to discover this
17:03 FROGGS interesting
17:03 TimToady maybe gives up on Mu
17:03 zakharyas joined #perl6
17:04 TimToady maybe something to do with junction logic
17:04 TimToady "it's outside of Any, just give up"
17:05 * TimToady supposes one could actually go and read the source code, if one were ambitious
17:06 TimToady reading source code is hard, let's go backlogging...
17:10 [Sno] joined #perl6
17:14 [Coke] just re-ran daily spec test for parrot & moar; no change in parrot failures since the previously posted run. (for FROGGS)
17:14 FROGGS O.o
17:15 FROGGS [Coke]: this should pass:
17:15 FROGGS S32-temporal/Date.t 4 - Date.today
17:15 FROGGS S32-temporal/DateTime.rakudo.moar aborted 108 test(s)
17:15 FROGGS S32-temporal/local.rakudo.moar 1 - $*TZ is defined
17:15 grettis joined #perl6
17:15 [Coke] FROGGS: FACEPALM
17:16 [Coke] what i ran was not parrot and moar, but moar and moar-jit
17:16 FROGGS but still, it should pass on HEAD :o)
17:16 [Coke] yes, rakudo.moar is now only failing 71 tests, not 126. Thanks!
17:17 TimToady m: say %*ENV
17:17 camelia rakudo-moar ac4b21: OUTPUT«"HOME" => "/home/p6eval", "LANG" => "en_US.UTF-8", "LANGUAGE" => "en_US:en", "LC_CTYPE" => "de_DE.UTF-8", "LESSCLOSE" => "/usr/bin/lesspipe \%s \%s", "LESSOPEN" => "| /usr/bin/lesspipe \%s", "LOGNAME" => "p6eval", "LS_COLORS" => "rs=0:di=01;34:ln=01;36:mh=…»
17:18 anaeem1 joined #perl6
17:18 TimToady m: say %*ENV<TZ>
17:18 camelia rakudo-moar ac4b21: OUTPUT«(Any)␤»
17:21 jaffa4 what does this mean? annot invoke object with invocation handler in this context
17:23 vendethiel joined #perl6
17:25 TimToady it means something called find_invokee_internal without passing a valid tweak_cs, and now you know as much as I know
17:26 leont m: my $method = "Int"; "123".$method.say
17:26 camelia rakudo-moar ac4b21: OUTPUT«Cannot find method 'postcircumfix:<( )>'␤  in block <unit> at /tmp/syuNRxbxC7:1␤␤»
17:26 leont Can anyone tell me how I should have done that? (Dynamic method calls that is)
17:26 TimToady m: my $method = "Int"; "123"."$method"().say
17:26 camelia rakudo-moar ac4b21: OUTPUT«123␤»
17:27 TimToady unlike p5, p6 always uses different syntax for hard deref vs soft deref
17:27 TimToady (so one never needs 'use strict refs')
17:28 vendethiel soft references are like, with a variable name as a string?
17:28 * vendethiel doesn't know his p5 very well
17:28 TimToady yup
17:29 leont TimToady++ # thanks
17:29 TimToady jaffa4: if you can reduce it to a small test case, you could probably submit it as a bug
17:30 TimToady or get it to a one liner you could demo here, and then other people would probably submit it for you
17:30 vendethiel TimToady: does it kill performance in p5, too?
17:31 TimToady well, it's always going to be slower to look up a name than to follow a pointer
17:31 TimToady how much slower depends on how fast you can do name lookups
17:31 vendethiel Right, but up to which point? Does it prevent a lot of other kind of optimizations ? (ssaf, inlining, ...)
17:32 vendethiel well, that is, if they were done in the first place. also, unused variable removal
17:33 jaffa4 How to call a sub in a class?
17:33 vendethiel jaffa4: name-of-sub()
17:33 TimToady you can't, by default, since subs are lexically scoped and therefore private
17:34 vendethiel oh.
17:34 TimToady you'd have to declare it 'our'
17:34 vendethiel a sub that's in a class. Right.
17:34 gfldex joined #perl6
17:34 TimToady and then qualify it with the classname
17:35 TimToady m: class Foo { our sub bar { say "baz" }}; Foo::bar
17:35 camelia rakudo-moar ac4b21: OUTPUT«baz␤»
17:35 jaffa4 Cannot use 'our' with individual multi candidates. Please declare an our-scoped proto instead?
17:36 brrt joined #perl6
17:36 TimToady the error message assumes you know what a proto is and does
17:37 jaffa4 I know protostars
17:37 TimToady you never call multis directly, only via a proto, so it's the proto that has to be declared 'our'
17:37 TimToady if you don't have one, you need to add one to carry the 'our'
17:41 virtualsue joined #perl6
17:42 vendethiel jaffa4: incidentally, it kinda seems like the only proto use :P
17:42 leont jnthn: did you fix Proc::Status to return exit? If so, can you also add signal? (though I would have implemented it the other way around, derive exit and signal from waitstatus)
17:42 jaffa4 Why?
17:42 vendethiel well, actually, I learned p5 has "protos" too. 'twas in yapc::na, for the 5.20 sigs talk. But it looked kinda weird
18:06 TimToady there's something terribly suboptimal about TAP output; it is almost impossible to visually pick out the TODO failures from the non-TODO failures
18:07 * TimToady wants "not ok" to turn into "NOT ok" or some such when it's not TODO
18:07 TimToady so he can scan the left margin
18:07 itz hmm head moar seems to have broken  Template::Mojo
18:08 itz or its first test anyway
18:12 akaseki joined #perl6
18:16 molaf_ joined #perl6
18:24 telex joined #perl6
18:26 TimToady m: if try require Test { say "I feel fine." }
18:26 camelia rakudo-moar ac4b21: OUTPUT«Code object coerced to string (please use .gist or .perl to do that)  in any  at src/Perl6/Actions.nqp:1269â�¤â�¤[31m​===[0mSORRY![31m===[0mâ�¤Expression needs parens to avoid gobbling blockâ�¤at /tmp/qcIQ7PZ_DO:1â�¤------> [32m try require Test { say …»
18:27 TimToady m: if (try require Test) { say "I feel fine." }
18:27 camelia rakudo-moar ac4b21: ( no output )
18:28 TimToady m: if (try require Test) { say "I feel fine." } else { say $! }
18:28 camelia rakudo-moar ac4b21: OUTPUT«(Any)␤»
18:28 TimToady I think require should at least return a True if it succeeds
18:29 TimToady m: say require Test
18:29 camelia rakudo-moar ac4b21: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/seA9vge7VSâ�¤Undeclared name:â�¤    Test used at line 1â�¤Undeclared routine:â�¤    require used at line 1â�¤â�¤Â»
18:29 TimToady m: say (require Test)
18:29 camelia rakudo-moar ac4b21: OUTPUT«Nil␤»
18:33 itz oh I think an error message has changed and Template::Mojo isn't checking for it
18:36 dalek rakudo/nom: 940066d | TimToady++ | src/Perl6/Actions.nqp:
18:36 dalek rakudo/nom: make require return True on success
18:36 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/940066dfce
18:39 [Coke] I need a module that lets me say "5 sextillion". :P
18:40 [Coke] (easy to write, but I feel silly)
18:40 [Coke] suggestions on a name?
18:41 * vendethiel tries not to make the obvious joke...
18:41 vendethiel [Coke]: au bon pain ? :p
18:41 vendethiel (the joke being that some guy tried to sue au bon pain for 2 centillion dollars)
18:42 vendethiel which is like, 36 zeroes. A lot of them
18:43 moritz [Coke]: Acme::SueMe
18:43 [Coke] thbbthp
18:44 PerlJam [Coke]: what do you mean "say '5 sextillion'"?  There's a module for converting from english text to numbers already I think.
18:45 vendethiel moritz: this feels like the "'course, they're an emacs function for that"
18:46 jaffa4 m: say "big brother watches you"
18:46 camelia rakudo-moar ac4b21: OUTPUT«big brother watches you␤»
18:46 TimToady http://rosettacode.org/wiki/Names_to_numbers
18:47 [Coke] m: postfix<trillion>(Num $a) { $a * 100_000_000_000} ; say 3 trillion * 5 trillion;
18:47 camelia rakudo-moar ac4b21: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/4Eerh1E7fL�Unable to parse expression in argument list; couldn't find final ')' �at /tmp/4Eerh1E7fL:1�------> [32mpostfix<trillion>(Num [33m�[31m$a) { $a * 100_000_000_000} ; say 3 tril[…»
18:47 [Coke] m: postfix:<trillion>(Num $a) { $a * 100_000_000_000} ; say 3 trillion * 5 trillion;
18:47 camelia rakudo-moar ac4b21: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/I62xH6oMWP�Unable to parse expression in argument list; couldn't find final ')' �at /tmp/I62xH6oMWP:1�------> [32mpostfix:<trillion>(Num [33m�[31m$a) { $a * 100_000_000_000} ; say 3 tril…»
18:48 [Coke] *faceaplm*
18:48 [Coke] m: sub postfix:<trillion>(Num $a) { $a * 100_000_000_000} ; say 3 trillion * 5 trillion;
18:48 retupmoca itz: https://github.com/tadzik/Template-Mojo/pull/8 fixes it
18:48 camelia rakudo-moar ac4b21: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/eKAKf2EbiXâ�¤Two terms in a rowâ�¤at /tmp/eKAKf2EbiX:1â�¤------> [32mNum $a) { $a * 100_000_000_000} ; say 3 [33mâ��[31mtrillion * 5 trillion;[0mâ�¤    expecting any of:â�¤        postfixâ�¤    â€¦Â»
18:48 TimToady no whitespace allowed
18:49 itz retupmoca: oh I was just doing that :) I should have checked for existing pull reqs 1st
18:49 itz live n learn
18:49 [Coke] PerlJam: like that, except functional. :P (fixing offline.)
18:50 [Coke] numeric, no space between # and postfix.
18:51 [Coke] m: sub postfix:<trillion>(Numeric $a) { $a * 100_000_000_000} ; say 3trillion * 5trillion;
18:51 camelia rakudo-moar ac4b21: OUTPUT«150000000000000000000000␤»
18:51 [Coke] I'd prefer the space, but I'll take what I can get.
18:51 PerlJam gotcha.
18:52 PerlJam No ideas for the module name though.
18:52 [Coke] er plus also that's not a trillion.
18:52 [Coke] *sigh* :)
18:52 zakharyas joined #perl6
18:52 PerlJam .oO( Trillian? )
18:52 diakopter not even a european trillion
18:53 tadzik retupmoca: merged, but I do have some concerns. No time to fix it now though, will just open a ticket
18:54 TimToady [Coke]: you have to handle everything that http://rosettacode.org/wiki/Names_to_numbers does :P
18:54 PerlJam [Coke]: if you care about that space, you can make a macro
18:55 PerlJam or ... macros really
18:57 rurban1 joined #perl6
18:57 ren1us joined #perl6
18:58 ren1us my net died when i was talking about this yesterday, but i figured out why slurp was running so obscenely slow
18:58 ren1us turns out i was running out of memory
18:59 rurban1 left #perl6
18:59 * [Coke] tries to make a macro to make "2 dozen" return 24...
18:59 M_o_C joined #perl6
18:59 M_o_C joined #perl6
19:00 virtualsue joined #perl6
19:01 ren1us on a related note, a 4 million element list of single-character strings also makes me run out of memory, and this time it's not due to some other process.  should i be surprised?  not especially familiar with this sort of scale
19:02 itz ==> Testing Grammar::Profiler::Simple
19:02 itz t/csv.t .. 1/15 No such method 'name' for invocant of type 'Mu'
19:03 FROGGS ren1us: it takes at least 4 bytes per character
19:05 TimToady oh, it takes much more than that if you've got 4 million stirngs
19:05 TimToady *ri
19:06 ren1us yeah, 4 bytes each would come out to only about 15MB
19:06 diakopter I think at least 400 bytes per P6 String
19:06 ren1us i'm just watching the memory usage explode on a comb(/\w/, <4.2 million character string>)
19:08 treehug88 joined #perl6
19:08 anaeem1 joined #perl6
19:08 TimToady we need to find a way to cut that down for itty bitty strings
19:13 moritz and do it lazily for such a big list
19:15 TimToady that's only helpful if you process it lazily and don't mind it running even slower...
19:18 PerlJam itz: try again.
19:19 * leont just ran prove6 on its own tests, it works o/
19:20 tadzik nice!
19:20 tadzik now to run it instead of prove in panda+emmentaler, you can check if it differs anywhere in the entire ecosystem
19:20 FROGGS \o/
19:21 leont Well, there is a Proc::Async bug that prevents it from being used on actual test suites (something with losing input sometimes), but other than that it's almost complete
19:22 leont Parallel testing gives "interesting" results :-/
19:31 leont Currently only missing major 3 features: parallel formatting (tricky to test when parallel running is having issues), console colorization (hence the require question) and timers. None of them should be particularly hard.
19:33 [Coke] m: macro dozen { {{{*12}}} }; say 3 dozen;
19:33 camelia rakudo-moar 940066: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/5lIfYq00RMâ�¤Two terms in a rowâ�¤at /tmp/5lIfYq00RM:1â�¤------> [32mmacro dozen { {{{*[33mâ��[31m12}}} }; say 3 dozen;[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix stopperâ�¤   …»
19:34 [Coke] m: macro dozen { quasi {{{*12}}} }; say 3 dozen;
19:34 camelia rakudo-moar 940066: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/zXX7os0i0_â�¤Two terms in a rowâ�¤at /tmp/zXX7os0i0_:1â�¤------> [32mmacro dozen { quasi {{{*[33mâ��[31m12}}} }; say 3 dozen;[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix stopper…»
19:36 vendethiel [Coke]: macros are statements :)
19:37 [Coke] vendethiel: so there's no way to use the existing macros to make that work?
19:38 * TimToady channels mjd
19:39 [Coke] I'm just trying to do what PerlJam told me, mang.
19:39 vendethiel dont think so
19:39 [Coke] er, man.
19:39 [Coke] 'dude'
19:39 vendethiel maaang
19:47 [Coke] do we have an example of a slang that is smaller than "the v5 repo" ?
19:52 TimToady offline for a few hours &  # decommuting
19:54 tadzik hmm, does "Generating music sheets from a MIDI signal from a keyboard instrument" sound like a somewhat proper english?
19:55 flussence .oO( wishful thinking: would be nice if I could write dwimmy things like «$somenum ~~ uint16.Range» )
19:55 [Coke] tadzik: yes
19:56 colomon tadzik: "sheet music" rather than "music sheets", I think
19:56 [Coke] flussence: would $somenum.narrow.WHAT help?
19:56 ggoebel1111114 joined #perl6
19:56 tadzik [Coke], colomon: okay, thank you :)
19:57 [Coke] m: say (120 X/ 1,2,3,4 X/ 1,2,3,6 X/1,2,3).sort.uniq.grep:{$_.narrow.WHAT === Int}
19:57 camelia rakudo-moar 940066: OUTPUT«5 10 15 20 30 40 60 120␤»
19:57 flussence [Coke]: my line of thinking is using a (nativetype).Range that knows its min/max values for where clauses and such
19:58 [Coke] m: say 33.Range;
19:58 camelia rakudo-moar 940066: OUTPUT«No such method 'Range' for invocant of type 'Int'␤  in block <unit> at /tmp/14rSZ3_Pzv:1␤␤»
19:58 [Coke] so we could steal Range for that on the types, I guess.
19:58 [Coke] i would call it .domain, maybe.
19:59 flussence that's a better name :)
19:59 timotimo hmm
20:00 timotimo i can kind of see how we could make a "tinystring" like the "smallbigint"
20:00 timotimo i don't know what the performance implications are when we have a check "is this a tinystring?" in front of every op
20:01 timotimo but if someone has a program that deals with great numbers of single-codepoint (later: grapheme) strings, that could have much better memory usage
20:02 timotimo oh
20:02 timotimo it'd still be 128 byte per character in that case
20:02 FROGGS byte?
20:03 timotimo er ... bit.
20:03 timotimo plus the MVMObject header of course
20:06 timotimo well, all the ops already have to check what storage_type we're using
20:06 timotimo so just adding another storage type wouldn't hurt
20:06 diakopter true, that flag is 2 or 3 bits
20:07 timotimo and if i'm careful, this tinystring storage type could even abuse num_graphs to store a second grapheme/codepoint/whatever
20:13 timotimo does that sound like a good idea, or a terrible idea?
20:14 [Coke] let's say you do this optimization; how do we track that it keeps being an optimization?
20:14 diakopter comparison tests in p6bench?
20:16 timotimo hmm.
20:16 timotimo could mayhaps become a #define'd portion of code
20:16 timotimo or a long-term branch?
20:18 lizmat aren't native str much smaller ?
20:19 timotimo oh, yeah, there's also the Box
20:19 timotimo i was just talking about MVMString right now
20:20 dolmen joined #perl6
20:21 itz PerlJam: yeah works now
20:24 moritz eeks, rakudo spectest hangs on my laptop
20:24 lizmat which test ?
20:24 moritz several
20:24 moritz oh, maybe my moarvm is too old
20:25 lizmat or no reconfigure after FROGGS's changes earlier today ?
20:26 FROGGS yes, reconfigure is needed
20:26 moritz dunno; I just rm -rf'ed install/ and realclean'ed
20:30 * sjn reads pl6anet.org
20:31 sjn quick, Q: Has there been any consensus around the DESTROY naming discussion timotimo is mention there?
20:31 sjn mentioning*
20:31 moritz sjn: mostly, yes
20:31 sjn cool, what was the verdict? :)
20:31 moritz sjn: it seems only lizmat++ opposes the name DESTROY, and everyone else is fine with it
20:31 sjn aah
20:32 * sjn sees lizmat's point, really
20:32 sjn but oh well
20:32 moritz sjn: I see her point as well
20:32 * lizmat has already given up on it
20:32 moritz sjn: but renaming it doesn't decrease the amount of information we have to communicate
20:32 lizmat I need my energy on other things
20:32 sjn s/DESTROY/UNREACHABLE/ # ?
20:33 flussence if it's an opposite of BUILD that happens at some unspecific point in time, maybe COLLAPSE?
20:33 moritz sjn: see http://irclog.perlgeek.de/​perl6/2014-09-09#i_9322394
20:34 carlin silly mistake on my part, but... doing .send() to an IO::Socket::INET that has been .close()'d segfaults
20:34 sjn moritz: thanks
20:34 moritz sjn, flussence: a different name doesn't solve problem; we *still* have to communicate that it's not time, *and* we have to communicate the new name, and why it's new
20:35 hoelzro carlin: that's a good bug to know about, though =)
20:35 moritz carlin: that's bad.
20:36 Ven joined #perl6
20:39 virtualsue joined #perl6
20:44 lizmat sleep&
20:45 rurban1 joined #perl6
20:45 rurban1 left #perl6
20:46 btyler I wonder if that's what causes the segfaults in HTTP::Server::Async when under load from wrk
20:49 labster joined #perl6
20:50 moritz hrm
20:50 moritz method send has
20:50 moritz fail("Not connected") unless $!PIO;
20:51 moritz as the very first line
20:51 moritz but I wonder if a closed $!PIO actually evaluates to false
20:53 moritz probably not
20:54 * moritz tries a fix
20:59 dalek rakudo/nom: d04b505 | moritz++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
20:59 dalek rakudo/nom: [BOOTSTRAP] add more native type declarations
20:59 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d04b505617
20:59 dalek rakudo/nom: a09f17d | moritz++ | src/core/IO/Socket.pm:
20:59 dalek rakudo/nom: Do not segfault on sending to closed socket
20:59 dalek rakudo/nom:
20:59 dalek rakudo/nom: carlin++ for reporting the error.
20:59 dalek rakudo/nom: The problem was that send() and write() tested $!PIO for truthness,
20:59 dalek rakudo/nom: but a closed socket does not evaluate to False on JVM and Moar
20:59 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a09f17d381
20:59 moritz carlin: FTFY :-)
21:03 carlin Not connected in block <unit> at client_test.pl6:10
21:03 carlin moritz++
21:05 moritz now do I print to STDERR in nqp?
21:05 timotimo nqp::sayfh?
21:06 timotimo and nqp::getstderr?
21:06 moritz timotimo: and how do I get stderr?
21:06 moritz ah
21:09 moritz btyler: fancy load-testing HTTP::Server::Async again under newest rakudo?
21:10 btyler moritz: just rebuilt everything, then realized I needed to make realclean/rm -rf install/
21:11 btyler moar's nearly done compiling
21:11 [Coke] S99:FTFY ?
21:11 synopsebot Link: http://perlcabal.org/syn/S99.html#FTFY_?
21:11 moritz [Coke]: "Fixed that for you"
21:11 PerlJam S99:FTFY
21:11 synopsebot Link: http://perlcabal.org/syn/S99.html#FTFY
21:12 moritz oh, it's even there :-)
21:12 timotimo actually, synopsebot could also paste the explanation for S99 directly
21:12 timotimo it's usually rather short, so the first n words would usually suffice, then it'd have a link at the end (or beginning)
21:14 dalek rakudo/nom: 1cc69a7 | moritz++ | src/core/IO/Socket/INET.pm:
21:14 dalek rakudo/nom: simplify preprocessor directives
21:14 dalek rakudo/nom:
21:14 dalek rakudo/nom: and remove a stray §?endif
21:14 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1cc69a7c50
21:14 dalek rakudo/nom: e8ab80a | moritz++ | tools/build/gen-cat.pl:
21:14 dalek rakudo/nom: [build] remove gen-cat.pl
21:14 dalek rakudo/nom:
21:14 dalek rakudo/nom: we use gen-cat.nqp now
21:14 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e8ab80a6bf
21:15 dalek rakudo/nom: 2b7e232 | moritz++ | tools/build/gen-cat.nqp:
21:15 dalek rakudo/nom: [build] warn about stray #?endif in gen-cat.nqp
21:15 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2b7e232731
21:15 moritz sleep&
21:16 timotimo moritz++ # socket love
21:19 btyler moritz: looks like a different issue for the async server + wrk -- still segfaulting after rebuilding everything
21:44 [Coke] Hey, Padred is on github: https://github.com/PadreIDE/Padre ; wonder if their p6 support still works...
21:52 timotimo padred?
21:53 btyler padre, the perl IDE
21:55 BenGoldberg joined #perl6
21:58 timotimo ah, the d was just a typo
22:01 leont I haven't heard anyone other than Gabor about it in a long time, is it actually being used?
22:02 FROGGS I'm not using it fwiw
22:06 oetiker joined #perl6
22:22 leont I'm trying to dynamically load Term::ANSIColor and use it if possible, how do I do that?
22:25 FROGGS star-m: try require Term::ANSIColor; say ::('Term::ANSIColor')
22:25 camelia star-m 2014.04: OUTPUT«(Term::ANSIColor)␤»
22:25 mberends I use Padre occasionally on Debian, and recommend it to students on Perl programming courses
22:25 FROGGS leont: try require Term::ANSIColor; if ::('Term::ANSIColor') !~~ Failure { do something with ::('Term::ANSIColor') }
22:28 Remosi joined #perl6
22:33 grettis_ joined #perl6
22:33 leont Yes, but how do I do that something?
22:35 leont Term::ANSIColor::colored("", "") doesn't seem to work
22:37 FROGGS star-m: try require Term::ANSIColor; say ::('Term::ANSIColor')::colored("", "")
22:37 camelia star-m 2014.04: OUTPUT«===SORRY!===␤No such symbol 'Term::ANSIColor::colored'␤»
22:38 jack_rabbit joined #perl6
22:38 FROGGS star-m: try require Term::ANSIColor; say &colored("", "")
22:38 camelia star-m 2014.04: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/f8VMQxE8MWâ�¤Undeclared routine:â�¤    &colored used at line 1â�¤â�¤Â»
22:38 FROGGS star-m: try require Term::ANSIColor; say ::('colored')("", "")
22:38 camelia star-m 2014.04: OUTPUT«===SORRY!===␤No such symbol 'colored'␤»
22:38 FROGGS star-m: try require Term::ANSIColor; say &::('colored')("", "")
22:38 camelia star-m 2014.04: OUTPUT«===SORRY!===␤No such symbol '&::colored'␤»
22:38 FROGGS star-m: try require Term::ANSIColor; say ::('&colored')("", "")
22:38 camelia star-m 2014.04: OUTPUT«===SORRY!===␤No such symbol '&colored'␤»
22:38 FROGGS :o(
22:38 colomon joined #perl6
22:39 FROGGS ahh, we cannot import at runtime
22:39 FROGGS star-m: try require Term::ANSIColor <&colored>; say colored("", "")
22:39 camelia star-m 2014.04: OUTPUT«Cannot invoke this object (REPR: Uninstantiable, cs = 0)␤  in block  at /tmp/FApCXL8xN1:1␤␤»
22:42 FROGGS star-m: try require Term::ANSIColor <&colored>; say GLOBAL::Term::ANSIColor::EXP​ORT::DEFAULT::<&colored>("", "")
22:42 camelia star-m 2014.04: OUTPUT«Invalid attribute name ''␤  in block  at /home/p6eval/star-2014.04/language​s/perl6/lib/Term/ANSIColor.pm:45␤  in method reify at src/gen/m-CORE.setting:7686␤  in method reify at src/gen/m-CORE.setting:7549␤  in method gimme at src/gen/m-CORE.setting:80…»
22:42 FROGGS star-m: try require Term::ANSIColor <&colored>; say GLOBAL::Term::ANSIColor::EXPOR​T::DEFAULT::<&colored>("foo", "red")
22:42 camelia star-m 2014.04: OUTPUT«[31mfoo[0m�»
22:42 FROGGS leont: ^^
22:42 FROGGS and so comprehensive >.<
22:43 leont Thanks, that does help
22:52 leont Assigning it to &colored gives redeclaration warnings, but $colored seems to work fine. It can be made prettier later on.
22:53 leont No, that was just me being sloppy
22:54 davido_ joined #perl6
23:03 timotimo hm.
23:03 timotimo star-m: try require Term::ANSIColor <&colored>; say colored("foo", "red")
23:03 camelia star-m 2014.04: OUTPUT«Cannot invoke this object (REPR: Uninstantiable, cs = 0)␤  in block  at /tmp/b4_KtvgxGJ:1␤␤»
23:03 timotimo star-m: require Term::ANSIColor <&colored>; say colored("foo", "red")
23:03 camelia star-m 2014.04: OUTPUT«[31mfoo[0m�»
23:03 timotimo huh.
23:03 FROGGS O.o
23:06 timotimo wait
23:06 timotimo star-m is 2014.04?
23:06 grettis joined #perl6
23:06 FROGGS yes
23:06 FROGGS star-m: try require Term::ANSIColor <&colored>; say ::
23:06 camelia star-m 2014.04: OUTPUT«PseudoStash.new("\&colored", Callable, "\$!", X::AdHoc.new(payload => "Lexical with name '\&colored' does not exist in this frame"), "\$/", Nil, "\$_", Nil, "GLOBALish", GLOBAL, "EXPORT", EXPORT, "\$?PACKAGE", GLOBAL, "::?PACKAGE", GLOBAL, "\$=pod", Array.new(…»
23:06 timotimo i get the same error locally, though
23:07 FROGGS it does something with &colored though
23:07 FROGGS star-m: require Term::ANSIColor <&colored>; say ::
23:07 camelia star-m 2014.04: OUTPUT«PseudoStash.new("\&colored", sub colored(Str $what, Str $how) { #`(Sub|51454624) ... }, "\$!", Nil, "\$/", Nil, "\$_", Nil, "GLOBALish", GLOBAL, "EXPORT", EXPORT, "\$?PACKAGE", GLOBAL, "::?PACKAGE", GLOBAL, "\$=pod", Array.new(), "!UNIT_MARKER", !UNIT_MARKER, …»
23:07 FROGGS ahh
23:07 timotimo star-m: try require Term::ANSIColor <&colored>; say $!
23:07 camelia star-m 2014.04: OUTPUT«Lexical with name '&colored' does not exist in this frame␤  in method bind_key at src/gen/m-CORE.setting:9816␤  in sub postcircumfix:<{ }> at src/gen/m-CORE.setting:2608␤  in sub REQUIRE_IMPORT at src/gen/m-CORE.setting:17002␤  in block  at /tmp/fL_qYS…»
23:07 timotimo star-m: my &colored; try require Term::ANSIColor <&colored>; say $!
23:07 camelia star-m 2014.04: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/bujaqei97Vâ�¤Redeclaration of symbol &coloredâ�¤at /tmp/bujaqei97V:1â�¤------> [32m; try require Term::ANSIColor <&colored>[33mâ��[31m; say $![0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
23:07 leont m: require Term::ANSIColor <&colored>; say ::("&colored")("foo", "red")
23:07 camelia rakudo-moar 2b7e23: OUTPUT«Could not find Term::ANSIColor in any of: /home/p6eval/rakudo-inst-1/languages/perl6/lib, /home/p6eval/rakudo-inst-1/languages/perl6␤  in any load_module at src/gen/m-ModuleLoader.nqp:186␤  in method load_module at src/gen/m-CORE.setting:21970␤  in b…»
23:08 timotimo star-m: my &colored; try require Term::ANSIColor <colored>; say $!
23:08 camelia star-m 2014.04: OUTPUT«Trying to import from 'Term::ANSIColor', but the following symbols are missing: colored␤  in sub REQUIRE_IMPORT at src/gen/m-CORE.setting:17005␤  in block  at /tmp/pH015CW1RH:1␤␤»
23:08 timotimo hm. so the & ought to be correct
23:08 leont Huh, that worked for me
23:09 timotimo and also for me. except i get "cannot find method 'Any'" ...
23:11 leont m: my &colored = do { try { require Term::ANSIColor <&colored>; ::("&colored") } }; say colored("foo", "red")
23:11 camelia rakudo-moar 2b7e23: OUTPUT«Cannot invoke this object (REPR: Uninstantiable, cs = 0)␤  in block <unit> at /tmp/dpUx6X6V12:1␤␤»
23:11 FROGGS star-m: my &colored = do { try { require Term::ANSIColor <&colored>; ::("&colored") } }; say colored("foo", "red")
23:11 camelia star-m 2014.04: OUTPUT«[31mfoo[0m�»
23:12 FROGGS leont: m is the compiler only, so you only get lib and Test
23:12 leont Right
23:12 xragnar_ joined #perl6
23:13 leont I'm currently at my &colored = do { try { require Term::ANSIColor <&colored>; ::("&colored") // sub (Str $text, Str $) { $text } } };
23:14 leont But the else case doesn't work yet, because ::("&colored") evaluates to something truthy but uninstantiable
23:15 leont Right, should have moved the // out of the do-try
23:18 leont This seems to do the trick: my &colored = do { try { require Term::ANSIColor <&colored>; ::("&colored") } } // sub (Str $text, Str $) { $text };
23:19 avuserow joined #perl6
23:22 cognome joined #perl6
23:29 brrt left #perl6
23:32 leont Why does that code work on my one-liner but not in my class?
23:32 leont "Trying to import symbols &colored from 'Term::ANSIColor', but it does not export anything" :-/
23:33 FROGGS hmmm
23:33 FROGGS no idea offhand
23:33 leont Smells like a bug, but not one I grok
23:51 vendethiel joined #perl6
23:53 xenoterracide joined #perl6
23:54 xiaomiao joined #perl6

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

Perl 6 | Reference Documentation | Rakudo