»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
00:02 pat_js joined 00:08 chenryn joined, chenryn left 00:25 Rotwang left
dalek kudo/test-handles: 78f60a3 | (Rob Hoelz)++ | lib/Test.pm:
Restore "Test.pm - Allow output handles to be queried and modified"

We must delay initializing Test handles until runtime
00:25
hoelzro FROGGS: could you try your v5 stuff that I broke against github.com/rakudo/rakudo/commit/78f60a348b? 00:26
I would like to see if that fixes it
also, if anyone else could help explain to me how compile vs run time works in Perl 6, I would be grateful
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:27
so I'm wondering why 'my $output = $PROCESS::OUT' wouldn't behave similarly in Perl 6 00:28
granted, that just might be the way things are, but it could be a stumbling block for Perl 5 programmers like myself
00:43 lichtkind left 00:45 aborazmeh left 00:47 xfix left 00:48 xfix joined 00:50 grettis left
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
if it is re-inited, and not being seen, then something is doing unwarranted "constant" folding
either that, or INIT is re-initing too lazily 00:55
hoelzro TimToady: if I do an explicit INIT, it works fine
only if my $output = $PROCESS::OUT is in the mainline does FROGGS' example break, it seems
TimToady yes, but init time should be doing that for you already wrt $PROCESS::OUT 00:56
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
TimToady I presume this is something that used to work, and has broken with all the startup code fiddling 00:58
hoelzro TimToady: I've seen precompilation issues similar to this one before 00:59
I'm wondering how the spectest would behave if we precompiled it and ran it
01:02 xenoterracide left 01:07 yeahnoob joined 01:08 xenoterracide joined, aborazmeh joined 01:11 pat_js left 01:16 grettis joined 01:24 grettis left 01:25 aborazmeh left 01:27 tinyblak joined 01:30 FROGGS_ joined 01:31 dayangkun joined 01:34 FROGGS left 01:39 grettis joined 01:44 telex left 01:46 telex joined 01:49 jack_rabbit left 01:52 jerrycheung joined 01:55 jack_rabbit joined 02:00 leont left 02:06 itz joined 02:08 itz_ left 02:21 grettis left 02:27 allen joined
allen I'm having some slight confusions with the mailing list. Do I send arbitrary text in the body and automatically get added? 02:27
for: [email@hidden.address] 02:28
02:33 chenryn joined
allen TimToady, hey Larry :) 02:37
02:40 rindolf joined
allen perl6: my $problem = "Mailing List Registration"; my $solved = false; if not $solved { say $problem }; 02:47
camelia rakudo-jvm d315ab: OUTPUT«(timeout)»
..niecza v24-109-g48a8de3: OUTPUT«===SORRY!===␤␤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…»
..rakudo-{parrot,moar} d315ab: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Undeclared routine:␤ false used at line 1␤␤»
allen perl6: say 'my name is camelia' 02:48
camelia rakudo-{parrot,jvm,moar} d315ab, niecza v24-109-g48a8de3: OUTPUT«my name is camelia␤»
allen perl6: say 'please excuse my metadata'
camelia rakudo-{parrot,jvm,moar} d315ab, niecza v24-109-g48a8de3: OUTPUT«please excuse my metadata␤»
02:50 grettis joined
japhb allen: Save time by just using m: instead of perl6: 02:50
02:53 noganex joined
allen m: say "Thanks, japhb" 02:53
camelia rakudo-moar d315ab: OUTPUT«Thanks, japhb␤»
02:56 noganex_ left 03:00 jerrycheung left 03:06 yeahnoob left 03:07 colomon joined 03:13 rurban left 03:17 jerrycheung joined 03:22 yeahnoob joined 03:26 rurban joined 03:29 yeahnoob left 03:42 yeahnoob joined
allen will the extensability of perl syntax allowus to create shortcuts like (+ 3 4 5) in stead of (3 + 4 + 5) 03:52
@+ [3 4 5] 03:53
japhb m: [+] 3 .. 5 03:56
camelia ( no output )
japhb m: say [+] 3 .. 5
camelia rakudo-moar d315ab: OUTPUT«12␤»
geekosaur I expect you could define a slang, but making sure it integrates sanely would be your problem 04:00
dalek kudo/nom: 02db739 | TimToady++ | src/core/ListIter.pm:
more performant fix for .[100000]

I believe this will scale better than the previous fix. Feel free to revert if this turns out not to be the case.
04:01
timotimo thank you, TimToady :) 04:02
m: say (&infix:<+> 1, 2, 3, 4) 04:03
camelia rakudo-moar d315ab: OUTPUT«===SORRY!=== Error while compiling /tmp/NBb1nyWzWr␤Two terms in a row␤at /tmp/NBb1nyWzWr:1␤------> say (&infix:<+> ⏏1, 2, 3, 4)␤ expecting any of:␤ postfix␤ infix stopper␤ infix o…»
timotimo m: say (&infix:<+>: 1, 2, 3, 4)
camelia rakudo-moar d315ab: OUTPUT«===SORRY!=== Error while compiling /tmp/tvwR2pVHeS␤Two terms in a row␤at /tmp/tvwR2pVHeS:1␤------> say (&infix:<+>⏏: 1, 2, 3, 4)␤ expecting any of:␤ postfix␤ infix stopper␤ infix …»
04:03 jerrycheung left
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␤␤»
timotimo m: say &infix:<+><1 2>
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…»
timotimo m: say &infix:<+>(<1 2>)
camelia rakudo-moar d315ab: OUTPUT«2␤»
timotimo nope.
TimToady that's just infix:<+>(2) 04:04
timotimo yes
TimToady <1 2> would be a parcel in any case
timotimo m: say &infix:<+>(|<1 2>)
camelia rakudo-moar d315ab: OUTPUT«3␤»
timotimo i was trying to make it use less characters that didn't exist in (+ 3 4 5)
not more :)
TimToady m: say [+] 3..5 04:05
camelia rakudo-moar d315ab: OUTPUT«12␤»
TimToady that's shorter :P
timotimo that it is. 04:06
TimToady or are you just trying to get "12"?
timotimo m: say +"12"
camelia rakudo-moar d315ab: OUTPUT«12␤»
04:10 BenGoldberg left 04:16 mr-foobar left, jerrycheung joined
yeahnoob m:say <+> 3..5 04:17
m: say <+> 3..5
camelia rakudo-moar d315ab: OUTPUT«===SORRY!=== Error while compiling /tmp/nU5khypgNr␤Two terms in a row␤at /tmp/nU5khypgNr:1␤------> say <+> ⏏3..5␤ expecting any of:␤ postfix␤ infix stopper␤ infix or meta-infix␤…»
yeahnoob m: say (+ 1 2) 04:19
camelia rakudo-moar d315ab: OUTPUT«===SORRY!=== Error while compiling /tmp/xZcaTNmgia␤Two terms in a row␤at /tmp/xZcaTNmgia:1␤------> say (+ 1 ⏏2)␤ expecting any of:␤ postfix␤ infix stopper␤ infix or meta-infix␤ …»
timotimo i gave rakudo.org/community/ an overhaul 04:20
04:22 kaare_ joined 04:26 yeahnoob left
dalek ecs: 24fb00c | TimToady++ | S02-bits.pod:
make Bag/Mix.list more hashy, returning .pairs

Bags and Mixes are more naturally hashy, so we'll default to returning
  .pairs in list context. Set, however, still returns only .keys for its
default list, since the values are uninterestingly true. (cf RT #121947)
04:27
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=121947
japhb timotimo: "planetaria" is misspelled (the link seems correct, though 04:28
timotimo thanks!
japhb :-) 04:29
timotimo planeteria.org/perl6/ i'd like to receive comments about the "which download to choose" section i put here 04:30
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
that's not the right link.
japhb Now how the heck did I do that?
timotimo rakudo.org/how-to-get-rakudo/
japhb s/but the for/but the/ 04:33
04:34 xenoterracide left
japhb Also, choose whether to capitalize Asynchronous IO or not, but don't mix them. (I'd go with lowercase 'a') 04:34
timotimo fixed 04:35
flussence No mention of r-j?
timotimo we don't have a jakudo star yet
there's still some module problems
flussence oh, right.
japhb I'd also say titlecase 'Windows' when referring to the OS.
04:37 kurahaupo left
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:40
04:42 [Sno] left
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:42
04:43 chenryn left
japhb
.oO( All puns must now be capitalized, by order of the Pun Police )
04:43
04:43 yeahnoob joined
TimToady only if they're Type Pun Type 04:43
*of the 04:44
04:45 skarn left 04:52 allen left 04:53 chenryn joined
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
04:56 skarn joined
TimToady so you'd have to parcelize an array to get it to smartmatch the elements 04:56
04:56 skarn is now known as Guest62656
TimToady whereas it's perfectly normal to sneak things like * and ** into parcels and lols 04:57
and we can now use bare sigils for matching too, I suspect...
m: say 42 ~~ $ 04:58
camelia rakudo-moar 02db73: OUTPUT«True␤»
TimToady yeah
japhb m: say 42 ~~ @
camelia rakudo-moar 02db73: OUTPUT«False␤»
japhb I'll be darned
TimToady that might or might not be working for the correct reason :) 04:59
m: say [42] ~~ @
camelia rakudo-moar 02db73: OUTPUT«False␤»
TimToady the $ works because it defaults to Any or some such 05:00
m: say ($).WHAT
camelia rakudo-moar 02db73: OUTPUT«(Any)␤»
TimToady yeah
m: say [] ~~ @ 05:01
camelia rakudo-moar 02db73: OUTPUT«True␤»
TimToady whereas @ just defaults to ()
so we'd have to decide whether to stick with * matching multiple values 05:02
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
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:02
TimToady build rakudo under moar, then "make spectest" is one way 05:03
s/under/over/ :)
dj_goku hmm 05:04
TimToady lemme guess, you just used rakudobrew...
dj_goku I did. 05:05
*magic*
TimToady if so, there's probably some subdir containing the nom build that you can run it in
or maybe rakudobrew knows spectest targets?
(dunno offhand)
05:06 Tene left, djanatyn left 05:07 kurahaupo joined 05:08 Tene joined, Tene left, Tene joined, djanatyn joined
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:09
I found the moar dir and running spectest now. 05:10
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:13
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:14
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
I wanted to start manually added them. But though I can only do a few. :)
HTTP::UserAgent might be up to the task almost. :) 05:16
ingy github.com/acmeism/RosettaCodeData 05:20
I need to run it again soon 05:21
05:21 tinyblak left
PerlJam It would be nice if there were an RC API (not just the mediawiki API, but specific to RC) 05:21
05:22 tinyblak joined 05:23 tinyblak left, tinyblak joined
dj_goku PerlJam: yeah totally. 05:24
A friend is writing a web app that uses RC code samples. 05:25
05:28 jack_rabbit left 05:30 kaleem joined 05:38 kaleem left 05:40 dolmen joined 05:41 mberends left 05:43 anaeem1_ left 05:46 mr-foobar joined 05:47 dolmen left, SamuraiJack_ joined 05:49 gfldex joined 05:51 anaeem1_ joined
rindolf Hi all. 05:52
timotimo ohai rindolf, what's up? :) 05:57
rindolf timotimo: hi. 05:58
timotimo: I'm looking for a way to translate metacpan.org/release/Games-Solitaire-Verify to JS. 05:59
timotimo ouch, the change log below the examples :o
06:00 FROGGS_ left
rindolf timotimo: what? 06:01
timotimo it has bullet points *and* wrapped lines
i wonder how that happened
rindolf timotimo: where? Link/URL? 06:02
timotimo the url you gave me; scroll to the bottom
rindolf timotimo: ah, I don't know how metacpan parses the changelog. 06:04
timotimo: metacpan.org/source/SHLOMIF/Games-...00/Changes - use the source, Luke! 06:05
timotimo ah, the way meta::cpan does that is obviously LTA 06:06
rindolf timotimo: www.shlomifish.org/humour/fortunes/...g-the-docs
timotimo: what is LTA?
timotimo "less than awesome" 06:07
rindolf timotimo: hmm...
timotimo: duckduckgo.com/?q=lta - nothing about it here.
timotimo: "WHat do you mean by 'WDYM'?" - avoid strange and obscure acronyms. 06:08
timotimo we have the S99 :)
rindolf timotimo: S99? 06:11
www.perlcabal.org/syn/S99.html#LTA - ah. 06:12
06:14 gfldex left
rindolf timotimo: www.joelonsoftware.com/items/2009/12/30.html 06:14
timotimo hmm 06:22
06:24 [Sno] joined 06:34 kaleem joined 06:37 darutoko joined 06:47 FROGGS joined 06:48 grettis left 06:52 djanatyn left 06:53 djanatyn joined
dalek kudo/nom: 0792a91 | TimToady++ | src/core/List.pm:
fix .plan method to reify correctly later

Turns out p6listiter needed a ref back to us to know where to put reified values.
06:53
FROGGS morning 06:54
TimToady o/
timotimo heyo 06:55
06:56 grettis joined
FROGGS has somebody (perhaps near germany) an osx box for sale? I'd like to fix libuv before the rakudo compiler release 06:56
I failed yesterday to buy a mac mini
sergot o/ 06:58
timotimo \o
FROGGS .oO( ohh noes! he escaped! ) 06:59
and yes, this kind of joke is totally fine before third coffee!
TimToady we need some decent tests for .plan now that it works better
I'll get to it eventually if no one else does, but that might take a couple days 07:00
m: my @a = 1,2,3; @a.plan: 4..*; say @a[^10] 07:01
07:01 grettis left
camelia rakudo-moar 02db73: OUTPUT«(timeout)» 07:01
TimToady that should say 1 through 10 when the last patch is compiled
> perl6 -e 'my @a = 1,2,3; @a.plan: 4..*; say @a[^10]' 07:02
1 2 3 4 5 6 7 8 9 10
like that
> perl6 -e 'my @a = 1,2,3; @a.plan: 4..*; say @a.infinite' 07:03
True
FROGGS .tell hoelzro that seems to work! 07:04
yoleaux FROGGS: I'll pass your message to hoelzro.
07:04 Px12 joined
rindolf TimToady: BTW, do you charge money for public speeches? 07:10
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 :)
rindolf TimToady: ah.
07:13 Isp-sec joined 07:14 grettis joined
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 plus.google.com/+ShlomiFish/posts/MRLntf3xu5Y
mr-foobar: heh.
Is it from the French fille - a girl?
moritz I have no idea 07:15
TimToady we would spell it "Fey" in English 07:16
and it has more to do with madness, I think, than with girls, though far too many jokes suggest themselves here 07:18
07:18 grettis left
TimToady and it might have to do etymologically with "ferry", as in to get carried away :) 07:19
07:19 Px12 left
TimToady c.f. "pherein" in Greek, "to carry" 07:19
rindolf TimToady: ah. 07:20
TimToady 'course, I could just be making stuff up because I'm fey...
rindolf Fairy NUff
TimToady: en.wiktionary.org/wiki/fairy 07:21
From fate.
rindolf is away - job hunt.
07:22 Isp-sec left, anaeem1_ left, cbk1090 joined, anaeem1_ joined 07:23 grettis joined
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:24
but I'm not near my AmHer to look it up 07:25
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:26
07:28 grettis left
moritz cbk1090: 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... pastebin.com/1LfhbzFN
07:32 Px12 joined
moritz doing the .close inside the loop is a bad idea 07:32
I mean, after the first line, it'll close the socket
and the subsequent sends can't ever work 07:33
TimToady closes his sockets --> zzz &
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.
moritz does your keyboard erupt into blue flames when you run it?
if not, what is the failure mode? 07:35
cbk1090 It does not connect.
moritz any error message?
cbk1090 No. just says connection refused.
moritz well, that's an error message. 07:36
is the server running?
cbk1090 yeah, I have basically the same code, but have the listen flag set. 07:37
moritz "connection refused" means that either the port isn't open, or it's firewalled 07:38
(at least not open on the machine you want to connect to)
oh
my $host = "10.10.224.101";
that's bad 07:39
that's an URL, not a host
try
my $host = "10.10.224.101";
07:39 zakharyas joined
cbk1090 well like i said it worked. and it was cool! I could chat to different computers on my LAN 07:39
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
moritz what happens when you telnet 10.10.224.101 25535 on the command line?
timotimo aye, the $client.close is a bad idea to have inside the loop 07:41
cbk1090 I can move that I just want it to work again, and that is how I had it when it worked... 07:42
moritz cbk1090: well, if you want it to work, you need to find out what's wrong. 07:43
cbk1090: claiming that it worked before doesn't help you with that
cbk1090: you did that three times now, instead of just going ahead and answering my questions
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 left, cognome joined
moritz that's what I get when I run "telnet 10.10.224.101:25535" 07:45
but not when I run "telnet 10.10.224.101 25535"
moritz gives up
07:49 Px12 left, virtualsue joined 07:50 cognome left
FROGGS cbk1090: please do *exactly* what moritz said: telnet 10.10.224.101 25535 07:52
cbk1090: there is no colon before the port number
cbk1090 telnet: connect to address 10.10.224.101: Connection refused 07:53
FROGGS cbk1090: so it is a problem with your network
timotimo aye. did you paste the server portion yet?
it seems like there's nothing listening on that port on that machine, or a firewall is blocking connections
moritz or the IP might be wrong 07:54
cbk1090 no but here it is... pastebin.com/VRTn76nd
moritz (which would also mean "nothing listening on that port")
FROGGS cbk1090: what is the output of this? nmap -sS -p 25535 10.10.224.101
cbk1090 25535/tcp closed unknown
moritz cbk1090: stop. 07:55
cbk1090: that code can't even run.
cbk1090: I'm getting the impression you're trolling us
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.
moritz then stop presenting us so many plain wrong pieces of information
you're not running that code. Period.
because it can't run.
also, you claimed that the client code you pasted earlier ran on older versions. It didn't. 07:57
you claimed you ran the telnet command I gave you. You didn't.
we can't help you like that
and I don't want to anymore.
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
cbk1090 Ok Its running right now on my system.
moritz cbk1090: I don't believe you
cbk1090: it has undeclared variables. It can't run.
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
m: say DateTime.now().gist
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…»
timotimo m: say $*TZ; say DateTime.now().gist
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␤␤»
timotimo seriously? >_> 07:59
m: say $*TZ;
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␤␤»
timotimo m: my $*TZ = 1; say DateTime.now().gist
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␤»
timotimo m: my $*TZ = 0; say DateTime.now().gist
camelia rakudo-moar 0792a9: OUTPUT«2014-09-10T07:59:46Z␤»
moritz timotimo: iirc $*TZ is in seconds
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␤␤»
timotimo m: my $*TZ = 0; say DateTime.now().gist.replace(/T/, " ")
camelia rakudo-moar 0792a9: OUTPUT«No such method 'replace' for invocant of type 'Str'␤ in block <unit> at /tmp/0644NTTR5b:1␤␤»
FROGGS subst
timotimo oh
yeah
m: my $*TZ = 0; say DateTime.now().gist.subst("T", " ")
camelia rakudo-moar 0792a9: OUTPUT«2014-09-10 08:00:25Z␤»
timotimo m: my $*TZ = 0; say DateTime.now().subst("T", " ")
camelia rakudo-moar 0792a9: OUTPUT«No such method 'subst' for invocant of type 'DateTime'␤ in block <unit> at /tmp/mwlggoUXAu:1␤␤»
timotimo m: my $*TZ = 0; say DateTime.now().Str.subst("T", " ")
camelia rakudo-moar 0792a9: OUTPUT«2014-09-10 08:00:33Z␤»
FROGGS cbk1090: $encoding and $type is not declared btw
timotimo m: my $*TZ = 0; say DateTime.now().Str.tr("T" => " ", "Z" => " ")
camelia rakudo-moar 0792a9: OUTPUT«No such method 'tr' for invocant of type 'Str'␤ in block <unit> at /tmp/_AOL2ZWVKK:1␤␤»
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 ␤»
timotimo m: my $*TZ = 0; say DateTime.now().Str.trans("T" => " ", "Z" => "")
camelia rakudo-moar 0792a9: OUTPUT«2014-09-10 08:01:07␤»
timotimo ^- much shorter than your sub getDateTime
cbk1090 FROGGS, it is using the default value!
dont need to be declared btw.
moritz wtf.
FROGGS cbk1090: O.o
08:01 kaare_ left
timotimo m: IO::Socket::INET.new(:$host); 08:01
camelia rakudo-moar 0792a9: OUTPUT«===SORRY!=== Error while compiling /tmp/cepmu3TcYd␤Variable '$host' is not declared␤at /tmp/cepmu3TcYd:1␤------> IO::Socket::INET.new(:$host⏏);␤»
timotimo you should see this error message, cbk1090
moritz is so >.< close to kickbanning cbk1090 08:02
timotimo well, not for "host", but for "encoding" and "type"
08:02 kaare_ joined
timotimo moritz: step away from IRC and let me handle this? :) 08:02
tadzik . o O ( Ensign, step away from the console )
FROGGS cbk1090: Perl 6 is very strict about variables, so the *need* to be declared (not initialized, but declared)
08:03 tinyblak left
timotimo it would seem like cbk1090 is just running different source code locally, probably by mistake 08:04
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
timotimo that's right
but i understand where they're coming from
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
cbk1090: we need to talk about the exact same thing
08:06 bcode left
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
cbk1090 FROGGS, ok 08:07
timotimo if you use :listen, you can leave out the host parameter
and you probably should
cbk1090 timotimo, ok i'll do that.
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
08:08 bcode joined
Timbus it wouldnt matter anyway, the local port binding is :localhost 08:08
timotimo oh!
Timbus: good catch!
this probably ought to give a proper error message, then.
Timbus dont ask me why, i just copied perl 5
it should probably also error if the port is over 65535 haha 08:09
timotimo yes
moritz FROGGS: irclog.perlgeek.de/perl6/search/?ni...q=VMThread search now works again 08:12
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++
timotimo if you netcat -l -p YOUR_PORT_NUMBER, that'll behave very similar to your server code
and if you echo "my sweet message" | netcat SERVER_IP YOUR_PORT_NUMBER, that'll behave very similar to your client code 08:14
not exactly, but close enough for testing purposes
cbk1090 timotimo, ok i'll go back and work on that. Thank you
timotimo good luck! 08:15
dalek kudo/nom: 405573a | (Elizabeth Mattijsen)++ | src/core/Str.pm:
Oopsy, forgot to remove 2 lines, japhb++
08:16
FROGGS "Oopsy" *g*
08:19 yeahnoob left 08:20 grettis joined 08:21 denis_boyun_ joined 08:22 firefish5000 left
Timbus wait wtf. cbk1090 if you want to open a listening port, you need to specify :localport 08:24
not :port
that will probably fix it
timotimo ooooooh
cbk1090 ok 08:25
timotimo Timbus: would you like to work on the .new method to make this more obvious?
perhaps split it in two; one multi candidate for listen and one for connect?
08:25 grettis left
Timbus i think, err, there was some discussion about that many years ago.. 08:26
08:26 M_o_C joined
cbk1090 ok it works now!!! 08:26
08:27 baest_ is now known as baest
cbk1090 perl6 is my friend again! yeah baby! 08:27
Timbus haha
timotimo, i think that's probably a good idea. ive never seen a listen socket take a non-local address.. 08:28
if that even does anything? 08:29
tadzik sounds like rakudo could get smarter if you supply both listen and address/port
Timbus yes
08:31 efat joined, efat left, yeahnoob joined, dakkar joined 08:33 jerrycheung left
rindolf Hi all, I'm back from the job hunt. 08:33
moritz did you shoot one?
rindolf Nothing final, but I have a few leads.
moritz: shoot? 08:34
Timbus hunt
moritz rindolf: well, that's what you do when you go hunting
Timbus i think your joke missed :<
rindolf moritz: ah. 08:35
moritz: I'll shoot using a longbow - very high tech. Jennifer Lawrence will love it. 08:36
lizmat good *, #perl6!
tadzik Timbus: ahhaah
lizmat m: (bag <a b c>) ~~ (set <a b c>) # this fails after the latest TimToady spec change 08:37
camelia ( no output )
FROGGS morning lizmat
lizmat m: say (bag <a b c>) ~~ (set <a b c>) # this fails after the latest TimToady spec change
camelia rakudo-moar 0792a9: OUTPUT«True␤»
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.
moritz well, dwarvs do have a certain disadvantage when it comes to using longbows 08:39
rindolf moritz: unless they are very tall dwarves. 08:40
FROGGS tallrves? never heard of such a thing 08:41
cbk1090 plus.google.com/105092400598046607...guN8eJc3tz Once again thanks for all of your help.
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:42
rindolf timotimo: don't know. 08:44
timotimo: I played AD&D 2nd edition.
Since then there were other editions of D&D.
08:50 spider-mario joined, spider-mario left 08:54 spider-mario joined 08:55 Px12 joined
lizmat TimToady: it feels to me that Set will also need pairs for .list 09:00
otherwise we need to rethink / complicate a lot of set operators (at least from what I see now) 09:01
09:02 Px12 left
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 github.com/perl6/form instead?
moritz FROGGS: it's supposed to point to github.com/perl6/form 09:05
FROGGS moritz: shall I reply to your mail?
timotimo tadzik: doesn't that have stability drawbacks? 09:07
moritz FROGGS: if there's something left to be said, sure
dalek kudo/nom: 9c7b2fd | (Elizabeth Mattijsen)++ | src/core/Baggy.pm:
Naively implement spec change 24fb00c9f0ca1ed63113

Setty.list returns keys, whereas Baggy/Mixy.list return pairs. This causes some smartmatching and set operators to return "unexpected" results in roast. Investigating whether this would require change of the spec (Setty.list also returning pairs) or changes in the set operators / smart matching.
tadzik timotimo: I dunno, I play a human :P
timotimo i haven't really played D&D yet 09:08
tadzik it's not my favourite system
dalek ast: e8acf51 | (Elizabeth Mattijsen)++ | S02-types/ (4 files):
Fix fixable test because of spec change 24fb00c9f0
09:09
lizmat timotimo: any idea of the code path for --target=-mbc ?
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
timotimo it will go through the stages as specified and stop after the one that's set in --target
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?
lizmat: is it a lazy list?
timotimo no
lizmat no
FROGGS it is initialized via a subroutine on first use, right?
via a proxy?
timotimo i think there's a special mechanism now 09:12
lizmat see commit d05d411e968b3408420bbc7b02c1248f3dc005de
github.com/rakudo/rakudo/commit/d05d411e968b3
FROGGS lizmat: I still get that message with VMThread in v5 with rakudo HEAD fwiw
lizmat well, the lazy @*INC got reverted 09:13
so that can't be the reason
FROGGS lizmat: true
lizmat (as it broke panda)
FROGGS I don't know yet why it fails in v5
lizmat I guess the answer is somewhere in nqp/src/HLL/Compiler.nqp 09:16
09:22 grettis joined 09:24 leont joined 09:26 Akagi201_ joined 09:27 grettis left 09:28 Rotwang joined 09:29 Akagi201 left 09:30 yeahnoob left
lizmat nice blog: blogs.perl.org/users/maettu/2014/09...-file.html 09:38
09:38 BizarreCake joined
timotimo m: my $search_string = "hi"; say "foo bar hi baz quux" ~~ m/$search_string/ 09:40
camelia rakudo-moar 9c7b2f: OUTPUT«「hi」␤␤»
timotimo neat, i had already forgotten you can interpolate literals this easily
lizmat FWIW, I was thinking of adding a grep(Str) candidate that would do rx/$string/ 09:42
so you could do:
FROGGS m: my @search_strings = "bar", "baz"; say "foo bar hi baz quux" ~~ m/@search_strings/ # or this easily :o)
camelia rakudo-moar 9c7b2f: OUTPUT«「bar」␤␤»
lizmat m: <a b c>.grep('a').say
camelia rakudo-moar 9c7b2f: OUTPUT«a␤»
FROGGS m: my @search_strings = "baz", "bar"; say "foo bar hi baz quux" ~~ m/@search_strings/
lizmat ah, you can already ?
camelia rakudo-moar 9c7b2f: OUTPUT«「bar」␤␤»
timotimo aye.
moritz well, grep does a smart match
timotimo m: say "hello" ~~ "ll" 09:43
camelia rakudo-moar 9c7b2f: OUTPUT«False␤»
FROGGS m: my @search_strings = "baz", "bar"; say "foo bar hi baz quux" ~~ m/|| @search_strings/
camelia rakudo-moar 9c7b2f: OUTPUT«「bar」␤␤»
timotimo not the same as rx/$string/
lizmat ok, bad idea then :-)
FROGGS ahh, position wins of course
dalek kudo/nom: 0e7397d | (Elizabeth Mattijsen)++ | src/core/Str.pm:
micro opt tweak in Str.lines
09:46
lizmat only CR delimited files would benefit from that one 09:47
FROGGS osx++ \o/
moritz afaict from profiling, IO.lines is now mostly limited by reify 09:48
09:48 dayangkun left 09:49 dayangkun joined 09:51 Akagi201_ left 09:53 rindolf left 09:57 yeahnoob joined 10:00 fhelmberger joined, kurahaupo left 10:04 Test joined 10:05 fhelmberger left, mberends joined 10:08 Test left 10:10 rindolf joined
yeahnoob $^V 10:12
m: $^V
camelia rakudo-moar 9c7b2f: OUTPUT«===SORRY!=== Error while compiling /tmp/0Z4PV8kFpU␤Unsupported use of $^V variable; in Perl 6 please use $*PERL_VERSION␤at /tmp/0Z4PV8kFpU:1␤------> $^V⏏<EOL>␤»
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/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:13432 (/home/p6eval/rakudo-inst-2/languages/perl6/…»
yeahnoob ...
10:14 grettis joined
timotimo oh well. 10:16
m: say $*PERL.perl
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…»
timotimo m: say $*PERL<version>
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␤␤»
timotimo m: say $*PERL.version 10:17
camelia rakudo-moar 9c7b2f: OUTPUT«vunknown␤»
timotimo er ... huh?
oh, is that inside the compiler?
lizmat yup
timotimo m: say $*PERL.compiler.version
camelia rakudo-moar 9c7b2f: OUTPUT«v2014.8.300.g.9.c.7.b.2.fd␤»
yeahnoob timotimo: Ola! Thank you.
lizmat the Perl version is unknown.. :-)
the compiler.version is the git commit id / tag
versionised 10:18
timotimo right
10:19 grettis left 10:25 fhelmberger joined 10:32 kaleem left 10:35 anaeem1_ left, anaeem1_ joined 10:45 Rotwang left
masak .oO( my Perl version is vunknown -- I'm vunimpressed ) 10:46
lizmat TimToady insisted on version objects, and they stringify with a 'v' in front 10:52
see Systemic in the spec
FROGGS vunkown could very well be a Version type object...
lizmat S28:142 to be more precise
synopsebot Link: perlcabal.org/syn/S28.html#line_142
lizmat FROGGS: perhaps 10:53
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␤␤»
FROGGS but I guess we want to fix that one first :o) 10:55
10:55 yeahnoob left
FROGGS should that put $x in PROCESS.WHO? 10:58
elsif try INITIALIZE(name) -> \result {
$x := result;
}
FROGGS tries
aah, wait 10:59
I'm talking rubbish
m: say get-local-timezone-offset() 11:02
camelia rakudo-moar 0e7397: OUTPUT«0␤»
FROGGS haha!
that's falsish!
11:05 anaeem___ joined 11:06 sqirrel joined 11:07 anaeem1_ left, SamuraiJack_ left 11:08 SamuraiJack joined, yeahnoob joined
FROGGS has a patch 11:08
timotimo ah, d'oh 11:09
"defined" needed again
FROGGS I did it differently, but yeah
timotimo something like that
11:10 kurahaupo joined
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, Akagi201 joined 11:16 Rotwang joined
FROGGS that's my patch and I wander why that explodes in RESTRICTED.setting... 11:18
gist.github.com/FROGGS/5ef84cab70b6367e7d2b
bbiab, lunch&
11:20 grettis left, chenryn left 11:30 sqirrel left
dalek kudo/nom: 3f662ee | (Elizabeth Mattijsen)++ | src/core/Str.pm:
Str.lines works with CR/CRLF/LF or a mix of them

Also added smart support for .lines(Inf) and .lines(*)
11:35
11:41 Ven joined
Ven o/, #perl6 11:42
timotimo: you're the one that likey speedruns, right ?
timotimo yup
Ven have you seen the Ocarina of Time in 18:10 one?
CosmoWright is a beast.
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!
yoleaux 07:04Z <FROGGS> hoelzro: that seems to work!
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.
hoelzro o/ #perl6
dalek kudo/nom: ec1e0ce | (Elizabeth Mattijsen)++ | src/core/Str.pm:
Hmmm... samewith doesn't return?
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)
dalek ast: 3d7042c | (Elizabeth Mattijsen)++ | S32-str/lines.t:
Unfudge and add some more Str.lines tests
11:45
timotimo seems like i should watch it, too :)
moritz lizmat: I think 'return samewith' is better written as 'callwith'
Ven moritz: I still can't remember which is which.
11:45 grettis joined
moritz lizmat: (but please check that before committing) 11:45
Ven Makes me think we culd have that in the FAQ :)
timotimo: well, I think he has a commentated version of his own on the channel? I need to watch it
moritz Ven: sure, please write thta entry
Ven moritz: you're supposed to say "well volunteered" 11:46
11:46 BizarreCake left
moritz Ven: I like to vary my speech a bit :-) 11:46
11:48 anaeem___ left 11:49 anaeem1_ joined
Timbus samewith?? 11:50
isnt it nextsame
11:50 grettis left
Ven Timbus: You live and learn 11:50
Timbus or callwith
ah
Ven (I'm as surprised as you are)
moritz oh
nextwith
yes :-
Timbus i was reading the source, i didnt see your discussion haha
lizmat nextwith doesn't work, because it will look for the next dispatcher 11:51
I want it to be done by the same dispatcher
timotimo Ven: i believe he does
moritz m: multi f($x) { nextwith; say "not here" }; multi f() { 23 }; say f 1
camelia rakudo-moar 0e7397: OUTPUT«not here␤True␤»
Ven timotimo: what?
timotimo have a commentated version up on his channel 11:52
Ven timotimo: yes yes, I was merely pointing it out :p
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
camelia rakudo-moar 0e7397: OUTPUT«not here␤True␤»
11:54 Px12 joined
Timbus call should return, next shouldn't. at least that's what I thought 11:54
timotimo Timbus: the nextwith did nothing at all in that case 11:55
11:56 telex left
ribasushi jnthn: sorry didn't get a chance to prepare a better example, ECRAPOVERLOAD 11:58
jnthn: I will get back to you soon on this
11:58 telex joined
Timbus timotimo, o. 11:58
12:02 kaleem joined 12:05 prevost joined
dalek kudo/nom: 51ddd5d | (Elizabeth Mattijsen)++ | src/core/Str.pm:
Don't obfuscate what we mean
12:11
12:14 lizmat left
FROGGS hoelzro: what do you mean by "push it up"? it was not in nom? 12:14
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)
hoelzro FROGGS: no, I just threw it in a branch
FROGGS eww
hoelzro: then I need to test it properly :o)
timotimo scalaz?
hoelzro FROGGS: ah ha
Ven timotimo: yea, it's a functional programming lib for scala 12:18
timotimo ah, interesting 12:19
Ven Maybe I'll do "siz" (six + z) for p6 :p 12:20
well, it's far less useful without type inference, but it still is
12:20 rindolf left
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)␤»
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
camelia rakudo-moar 0e7397: OUTPUT«===SORRY!=== Error while compiling /tmp/THUz5s8HFI␤Unable to parse class definition␤at /tmp/THUz5s8HFI:1␤------> role A[::T] {}; class B⏏[::T] does A[T] { has $.val; submethod B␤ expecting any of:␤ …»
Ven timotimo: I'm feeling sadder each and every day :(
timotimo aaw :(
Ven it's supposed to be a minor point, but it's just so useful
being able to parameterize classes seems like a basic point of generics to me, though 12:23
I really wonder what's the reasoning?
timotimo i suppose we want a class to have a fixed layout
and not per-instance 12:24
you can still just pun a role if you'd like
Ven timotimo: well, yes, but this forces me to have `make`-er methods
or do you suggest `does`-ing a role in BUILDM 12:25
?
moritz you can simply use the role as if it were a class
timotimo m: role A[::T] { has T $.foo is rw }; my $boing = A[Int].new(foo => 123); say $boing.perl
camelia rakudo-moar 0e7397: OUTPUT«A[Int].new(foo => 123)␤»
timotimo ^- there you go
moritz and the class is transparently generated for you on the fly 12:26
timotimo we do like our puns in perl6-land
Ven timotimo: maybe p6 will have some local type-inference in 2025 :) 12:27
I prolly don't want it sooner
timotimo huh? why not sooner?
Ven timotimo: because I don't quite have the time to volunteer ;) 12:28
timotimo ah 12:29
12:29 woolfy left
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
moritz Ven: nope
Ven moritz: oh yes :)
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
moritz ah
Ven I meant - it can't make running your programs slower – only faster
moritz well, it can make them slower too :-)
timotimo yeah, type inference could cost a bunch of time
moritz (when the inference engine is slower than the benefits 12:31
)
Ven well, some basic and local type inference could be really easy to do. Like
m: sub a(Int $a, Int $b) { $a + $b }; sub f{ my $f = "a"; a(1, $b) }; say "alive";
camelia rakudo-moar 0e7397: OUTPUT«===SORRY!=== Error while compiling /tmp/_81RnwN6Sm␤Variable '$b' is not declared␤at /tmp/_81RnwN6Sm:1␤------> { $a + $b }; sub f{ my $f = "a"; a(1, $b⏏) }; say "alive";␤ expecting any of:␤ postfix␤»
Ven m: sub a(Int $a, Int $b) { $a + $b }; sub f{ my $b = "a"; a(1, $b) }; say "alive";
camelia rakudo-moar 0e7397: OUTPUT«alive␤» 12:32
Ven this one we could "fix" easily, I think
timotimo the rabbit hole goes on for ever :)
Ven that's where it's the most fun anyway :)
are we even...
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?
Ven m: sub f(--> Int) { 5 }; sub b(Int, Str){ }; sub bar{ b(5, f) }
camelia ( no output )
Ven that one should blow up.
timotimo i've just removed pretty much everything from mine
Ven and without type inference
12:33 woolfy joined
Ven just "basic" type computation :) 12:34
(which is why languages like c++ and c# have with auto and var anyway. that's not "inference")
timotimo feel free to contribute :)
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
it's a pretty nice peace of code
Ven peace, code :p
timotimo er 12:36
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
I'd like to "finish" the tutorial at least.
timotimo that's fine :)
12:38 woolfy left
timotimo yeah, the tutorial is a good thing to spend time on! 12:38
Ven is really glad of the feedback he's had
FROGGS m: say GLOBAL::<%ENV> 12:40
camelia rakudo-moar ec1e0c: OUTPUT«(Any)␤»
FROGGS m: say PROCESS::<%ENV>
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 12:46 grettis joined 12:48 woolfy left 12:49 woolfy joined
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:49
12:51 grettis left
Ven Elixir 1.0 is out! 12:53
FROGGS lizmat / jnthn: because:
rakudo/src/gen/m-CORE.setting:18968:$PROCESS::SCHEDULER = ThreadPoolScheduler.new();
rakudo/src/gen/m-CORE.setting:21160: PROCESS::<%ENV> := %ENV;
lizmat / jnthn: and the ThreadPoolScheduler accesses %*ENV<RAKUDO_MAX_THREADS> 12:54
lizmat: this could very well be related to your hang when building the restricted setting 12:55
12:57 BizarreCake joined, anaeem1_ left
[Coke] I cannot open pl6anet.org from work. 13:00
13:00 lizmat joined 13:02 synopsebot left, synopsebot joined
tadzik S99:FYI # PerlJam++ 13:02
synopsebot Link: perlcabal.org/syn/S99.html#FYI_#_PerlJam++
tadzik heh 13:03
S99:FAIL
synopsebot Link: perlcabal.org/syn/S99.html#FAIL
timotimo hahaha
that's pretty neat.
PerlJam S99:adverbial pair 13:04
synopsebot Link: perlcabal.org/syn/S99.html#adverbial_pair
PerlJam S99:compilation unit
synopsebot Link: perlcabal.org/syn/S99.html#compilation_unit
PerlJam tadzik++ I've wanted that almost since S99 was created :) 13:05
tadzik :)
13:05 rurban1 joined
tadzik I should probably add (help|source) to it 13:05
or maybe someone wants to be the 4th contributor :) 13:06
also, it's really unnecessary for synopsebot to be in Perl 5
13:07 kaare_ left
nwc10 yay! use more 'dogfood'; 13:07
PerlJam S32/Str:206
synopsebot Link: perlcabal.org/syn/S32/Str.html#line_206
13:07 fhelmberger left, kaare__ joined 13:08 fhelmberger joined
PerlJam tadzik: I wonder if the name lookup thing could be generalized so that you could also do S32/Str:index 13:08
(I'm sure it can, but maybe someone else wants to do it? :)
13:12 donaldh left, kaleem left, cognome joined 13:13 kaleem joined 13:14 zoosha left
lizmat FROGGS: maybe I should make $*SCHEDULER lazy ? 13:16
FROGGS lizmat: no, I put Env.pm before ThreadPoolScheduler.pm, and it seems to work 13:17
I'm currently spectesting my stuff
lizmat ok
FROGGS wow, a lot of fails >.<
mixhash and friends
lizmat yes, that's changed spec of TimToady 13:18
I'm not sure I like it
FROGGS okay
13:20 gmunoz joined, gmunoz left 13:27 zoosha joined, zoosha left 13:33 zoosha joined 13:34 zoosha left, zoosha joined 13:35 zoosha left, zoosha joined
dalek kudo/nom: f79201d | (Tobias Leich)++ | / (11 files):
reorganize lookup of dynamic variables

The code before assumed that a dynamic variable always has an true-ish value after it has been initialized. This was not true for $*TZ and perhaps others. Now we have a candidate for INITIALIZE_DYNAMIC that returns an exception, and we can check on that and fail. Also I reordered the source files, so that we build Env.pm before ThreadPoolScheduler.pm, since the ThreadPoolScheduler accesses
  %*ENV<RAKUDO_MAX_THREADS>. This used to cause a hang when building
RESTRICTED.setting on my box.
13:35
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␤␤»
timotimo good work, FROGGS++ :) 13:37
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:38
see you later, I need to pick up one of my kids 13:39
13:40 FROGGS left 13:47 grettis joined, yeahnoob left 13:49 firnsy left 13:52 firnsy joined 13:53 grettis left, Ven left
timotimo hmm. when we get better list iteration, maybe we'll reach niecza speeds for some kinds of stuff? 13:55
jnthn ribasushi: No worries, I slept awfully for a second night running so I'm probably close to useless today anyway :/ 13:57
timotimo: I...think we exceed it for some kinds of stuff already. :) 13:58
timotimo: For one I don't think it got native types...
timotimo well, nqp probably exceeds niecza for some stuff 14:00
14:00 firnsy left
timotimo but at composite stuff we're still pretty bad, like rc-forest-fire or 9-billion-names or something 14:00
14:01 firnsy joined
jnthn Could always measure rather than guessing :P 14:01
timotimo that sounds like work
jnthn I suspect the rule is "if it involves lists Rakudo is probably slower"... 14:02
timotimo i suspect so, too
i've been thinking:
if we spesh a few ops that run on constant strings
we could end up getting a faster sprintf
14:02 mr-foobar left
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:03
could be an opt for *way* later, though 14:04
14:04 FROGGS[mobile] joined, yeahnoob joined
nwc10 timotimo: morepypy.blogspot.co.at/2011/08/pyp...tring.html 14:06
it's a good idea. It's not clear how much is a good idea when
but some research on what's most common/most hot might be interesting
it might be that %x variants are fairly common 14:07
timotimo yes, remembering that thing gave me the idea 14:10
14:13 chenryn joined 14:17 MilkmanDan left, MilkmanDan joined
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␤␤»
masak so close.
masak submits rakudobug
(it should capture the string '$cookies' in $o.Str, IMO) 14:19
14:19 mberends_ joined
masak that is, the error message shoulda been 'Null check failed for $cookies' 14:22
14:22 mberends left
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:22
moritz : macro postfix:<!!>($o) { say $o.^name }; my $cookies; $cookies!! 14:23
m: macro postfix:<!!>($o) { say $o.^name }; my $cookies; $cookies!!
camelia rakudo-moar 51ddd5: OUTPUT«AST␤===SORRY!===␤Too few positionals passed; expected 3 arguments but got 2␤»
14:23 treehug88 joined
moritz masak: I see nothing in AST.pm that would initialize $!Str 14:24
masak moritz: it's done from the Actions, IIRC.
moritz: and the logic works for infix ops. 14:25
or at least for non-op subs.
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"
camelia rakudo-moar 51ddd5: OUTPUT« "hi, I'm a string"␤»
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"
camelia rakudo-moar 51ddd5: OUTPUT« and went into a bar␤»
moritz that third argument is the relevant string
masak infix ops also don't work :/
moritz I wonder if changing it to $sym makes it work
moritz patches and recompiles 14:28
masak method EXPORT calls add_macro_arguments?
that's... new, I think.
moritz masak: you touched that code in July this year :-) 14:30
commit 9b8e9c5f4eeb99200279d255bd663dd1a132a543
masak oh, I'm familiar with the calls to add_macro_arguments; I made that sub. 14:32
14:32 guru joined
masak I also grok the contents of that commit. 14:32
14:33 guru is now known as Guest65195
masak but I didn't know about (and still don't see) any relation to any EXPORT method... 14:33
14:33 Guest65195 is now known as ajr_
moritz sorry, EXPR 14:33
moritz typo'ed
masak oh!
big phew
moritz +++ and +++ went into a bar 14:34
masak ah.
moritz not quite what you wanted, no? :-)
masak these are not the nodes you're looking for
thought it's still nice, in a way
I need to sit down and brain in a way that sticks about this one
moritz tries with ~$/ instead, which seems much more sinsble
erm, ~$_ 14:35
masak moritz++ # perseveritude
moritz "Plato" and "a platypus" went into a bar 14:37
14:38 FROGGS joined, chenryn left
dalek kudo-star-daily: c2b3509 | coke++ | log/ (14 files):
today (automated commit)
14:43
14:44 FROGGS[mobile] left
dalek c: dc2e59b | (Ben Tyler)++ | lib/Language/objects.pod:
tiny typo fix in private method example
14:44
kudo/nom: d1dd37e | (Elizabeth Mattijsen)++ | src/core/ThreadPoolScheduler.pm:
Lazily initialize $*SCHEDULER
14:49
masak moritz++!
moritz: guess you're spectesting now ;)
14:49 grettis joined
moritz masak: aye, I am 14:49
thought the sepctest is noisy enough that it doesn't tell me anything :( 14:50
dalek kudo/nom: a843a4a | moritz++ | src/Perl6/Actions.nqp:
Fix AST.Str for operator macros
[Coke] moritz: YES I ALSO RANT
[Coke] (about noisy spectests that keep getting dirtier! bad devs!) 14:51
FROGGS hoelzro: test-handles works for v5
14:51 kaleem left
FROGGS [Coke]: :o( 14:51
[Coke]: though, the date stuff should work again 14:52
[Coke] FROGGS: not in this run, but tomorrow's, aye? thanks!
FROGGS [Coke]: yes, was patched about 80 minutes ago
[Coke] FROGGS++
dalek ecs: 063e711 | (L. Grondin)++ | S99-glossary.pod:
define process
ecs: 5757b4c | (L. Grondin)++ | S02-bits.pod:
Merge branch 'master' of github.com:perl6/specs
14:53 chenryn joined 14:54 grettis left 15:03 anaeem1 joined
hoelzro FROGGS: thanks, I'll push that patch into nom then 15:06
dalek ast: 72b7cdc | moritz++ | integration/advent2012-day13.t:
adopt advent test to new spec
FROGGS moritz: that's how HEAD looks like currently: gist.github.com/FROGGS/273d41dfa3557647033b
hoelzro++
nwc10 does the advent calendar web page also get a "this week" update?
moritz FROGGS: now one test failure less :-) 15:07
dalek kudo/nom: ac4b214 | (Rob Hoelz)++ | lib/Test.pm:
Restore "Test.pm - Allow output handles to be queried and modified"

We must delay initializing Test handles until runtime
15:07 yeahnoob left 15:08 yeahnoob joined 15:09 yeahnoob left 15:10 yeahnoob joined
hoelzro if someone could help explain to me how compile vs run time works in Perl 6, I would be grateful 15:10
I was talking to TimToady about this a bit last night
15:10 yeahnoob left 15:11 yeahnoob joined
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
(well, I could see it being optimized out)
moritz: how do compilation/runtime phases work wrt precompilation, though?
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
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
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)
jnthn: did you see the bug I caused that FROGGS found?
jnthn Yes, but what is *not* the same in Perl 5 is that we do precomp
hoelzro true
15:12 grondilu joined
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.
nwc10 the joke some years back was "this week", referring to the fact that back then, the spec moved quite fast
so "this week" was implying "the spec has changed"
FROGGS jnthn: yes, exactly that happened with filehandles
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?"
grondilu was looking at 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
hoelzro jnthn: so is my $h = $PROCESS::OUT a bug, then? 15:15
FROGGS hoelzro: if you export it
hoelzro does one have to do an explicit my $h; INIT $h = $PROCESS::OUT; ?
I just see this behavior potentially tripping people up 15:17
because it did me =)
15:17 denis_boyun_ left, chenryn left
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
Since it seeems you just re-assign it on each load anyway.
Heck, we could even get it to serialize to a VMNull as an initial attempt. 15:18
15:18 mberends_ left
jnthn I *think* that the Perl 6 level IO code might then do the Right Thing or so... 15:18
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.
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
oooooh
I think I understand the problem now
thanks for rubber ducking =)
jnthn hoelzro: Yes, I think what I'm suggesting would give you that.
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
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
15:22 chenryn joined, MilkmanD1n joined
jnthn You may like to try 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.
hoelzro jnthn: I could give it a whirl 15:23
15:23 MilkmanDan left
jnthn nwc10: Yes, pre-comp is worth it overall, but there are traps. 15:23
nwc10 I agree with both parts of that
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:25
Not to mention when you also have to deal with things like augment. 15:26
timotimo aughh, meeeen
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"
and yes, we do ALL those already, and it was a real nuisance. :)
masak clearly I haven't been bashing enough at those parts.
I don't remember submitting any bug reports about them :> 15:28
15:28 chenryn left
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.
masak oh, good.
mission accomplished! apparently. 15:29
jnthn "Where the heck did that symbol go when Ipre-compile" is the classic one :)
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
And then let th emodule loader inspect the conflcits and merge any that it can. 15:30
It will merge Stash instances.
And whine about the rest. :)
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:31
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
15:32 mr-foobar joined
hoelzro jnthn++ 15:32
(anyone else who worked on precomp)++
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.
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.
jnthn carlin: is native is a trait and so is invoked at compile time 15:34
carlin: Are you wanting to punt deciding the actual library name until runtime? 15:35
carlin jnthn: no, just the path to it 15:36
jnthn Well, same thing *handwave* :)
carlin: I'll ponder a mechanism for that.
I can probably come up with something. 15:37
timotimo "oh! oh! oh! we can constant fold this! awesome!"
carlin trait_mod:<is>(&thesub, :native(foo)); works 15:38
but isn't as nice as sub thesub is native(...)
timotimo agreed
jnthn Yes, and that is runtime, not BEGIN time, so you're kinda asking for pre-comp problems
timotimo maybe we want the phaser that happens during "linking, ALAP"?
jnthn Not for your module, but for the thing using you rmodule.
I'm pondering a role LibraryNameProvider { method name() { ... } } 15:39
And it expects you to provide a class implemeting that role.
is native(ThatClass)
And so it's jus tthe class we commit to at compile time 15:40
And it calls the method on it at runtime to get the library name.
diakopter how would such a thing be hooked into compile time
timotimo ohai diakopter! :)
jnthn diakopter: You're just passing a type object to the trait at compile time.
diakopter yep, that's what I'm asking; what calls that trait tjingie at compile time 15:41
jnthn The compiler.
diakopter thingie
jnthn That's what traits are: the compiler delegating to a trait_mod
dalek rl6-roast-data: e89bbfa | coke++ | / (6 files):
today (automated commit)
15:42
15:42 zakharyas left
diakopter timotimo: hi :) 15:43
masak .oO( which makes trait_mods "macroish", I guess )
diakopter I was abiut to sai
iiii
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
masak "macrotastic", perhaps
diakopter macrostic
masak macrobatic
15:44 [Sno] left
jnthn masak: "BEGIN time" :P 15:44
diakopter macabre
masak jnthn: that's what "macroish" has come to mean, basically 15:45
jnthn: I'm looking for a term meaning "pertaining to macros" -- which *should* have been "macroish", of course
but history isn't always kind, or sensible... :)
jnthn macro-related :P
diakopter macrois 15:46
jnthn Or just call it "marco" :P
masak aaaaaaaaaaa
diakopter polo
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:48
15:48 anaeem1 left
tadzik hugme: hug masak 15:49
hugme hugs masak
diakopter hugme: hug macro marco
hugme hugs macro
15:50 grettis joined
jnthn masak: So work on macros in a Greek restaurant. Problem solved. :P 15:50
diakopter wheresa hackathon
whena
masak ¡ay caramba! 15:51
diakopter why would you kickban a plate 15:52
masak .oO( to dish out some punishment )
diakopter
.oO( I put some flatware in your hardware )
15:53
carlin serving up some puns 15:55
15:55 grettis left
hoelzro macro'ni and cheese? 16:02
hoelzro is a bit late to the pun party 16:03
16:03 mberends_ joined
jnthn Time for sleep...'night 16:03
16:04 mberends_ is now known as mberends 16:06 rurban1 left
timotimo gnite jnthn :) 16:07
leont Any reason why require returns Nil instead of something truthy? 16:09
16:09 anaeem1_ joined
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…»
FROGGS m: say (require Test)
camelia rakudo-moar ac4b21: OUTPUT«Nil␤»
masak leont: as to reasons, don't think so.
leont: it'd probably not be too late to spec it to be truthy. 16:11
leont: is there a good reason for it to be, besides being generally positive? :)
16:11 yeahnoob left
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
masak hm. yes. 16:12
leont Or maybe I'm missing a more sensible way to dynamically load
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?
FROGGS or Failure/CompUnit when we are at it
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 $_!" } }
camelia rakudo-moar ac4b21: OUTPUT«loaded Test!␤awww! no Puppies!␤»
masak roll your own sub(TM)
16:16 cognome left
timotimo where i come from, subs are more "folded" than "rolled" 16:16
FROGGS timotimo: same with masak's sub
16:16 cognome joined
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␤␤»
masak moritz++!!
timotimo mighty fine :) 16:18
leont timotimo: I could live with that, I could just return that $module's type object, right?
Or at least, when I know it will be the name of a type
Those aren't really the same of course
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?
masak "in case it wasn't called in sink context" sounds like wantarray to me
16:20 cognome left
FROGGS masak: I just mean that we don't have to construct a CompUnit return value just to throw it away 16:21
and the in-any-case return Failure (on failure), would explode like a Howler if it is not .Bool'd like a Failure 16:22
masak *nod* 16:23
what's the use case of 'require' returning a CompUnit?
FROGGS masak: it feels saner than True, and you could inspect it... 16:24
m: say CompUnit.new
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␤␤»
masak like, OK, now you have a CompUnit, so that you can... what?
16:24 anaeem1_ left
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)
masak: but Nil isnt true 16:25
masak right, today we have Nil-or-death, not True-or-False
Nil makes a certain kind of sense to me. because 'require' isn't something you'd expect to use for its value. 16:26
FROGGS masak: perhaps not in the perl world :o) 16:27
masak point taken.
16:28 prevost left
masak though in my argument's defense, that is the current world :P 16:28
FROGGS *g*
ture
true*
masak 'night
FROGGS I'd like to see a: if require 'Foo' { ::('Foo').new() } instead of: try require 'Foo'; if ::('Foo') !~~ Failure { ... } 16:30
note that the second (currently working) case only works if Foo.pm offers a symbol Foo
gnight masak
TimToady m: require Test; say Test 16:32
16:32 ajr_ left
camelia rakudo-moar ac4b21: OUTPUT«===SORRY!=== Error while compiling /tmp/7yaaPGDzUj␤Undeclared name:␤ Test used at line 1␤␤» 16:32
16:32 guru joined, guru is now known as Guest42566
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 Guest42566 is now known as ajr_, jaffa4 joined
TimToady m: require Test 16:32
camelia ( no output )
jaffa4 hi all 16:33
FROGGS hi jaffa4
jaffa4 I have problem with native call
TimToady okay, it doesn't fail to require, just doesn't introduce the name
that's fixable
FROGGS TimToady: correct
[Coke] jaffa4: what's up?
16:33 mberends left 16:34 mberends joined
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:34
jaffa4 this pastebin.com/Q95gACED 16:35
perl6 gives me an error message which looks mysterious
I followed a nativecall example 16:36
FROGGS jaffa4: don't use methods, use subs only for the 'ise native' trait
is*
jaffa4 I use sub only
It complains about parameter mismatch 16:37
whcih does not make sense
FROGGS jaffa4: can you paste the code of nativecalltest.p6 too?
jaffa4 I cut it down for you 16:38
FROGGS thanks
jaffa4 that is all you need what | pasted
carlin jaffa4: you're paste doesn't show how you're calling TopWindow_Paint, what are you passing to it? 16:40
*your
jaffa4 I am not calling it
what calls it in the paste
you should see what calls it, it is found there 16:41
pastebin.com/yz9QRhqp
ths is the call TopWindow_Paint (self,$w);
self is class TopWindow is repr('CPointer') { 16:42
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:44 dayangkun left
jaffa4 self has type TopWIndow., right? 16:45
FROGGS yes, self is of type TopWindow
jaffa4 alling 'TopWindow_Paint' will never work with argument types (Mu)? 16:46
What is Mu?
FROGGS ohh
your method new returns Mu
at line 284
because the sub TopWindow_TopWindow has no returns trait 16:47
but all in all that code looks weird
jaffa4 Why?
moritz still doesn't see how (self, $w) becomes (Mu)
16:48 SamuraiJack left 16:51 grettis joined
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 )»
FROGGS moritz: a bit like that
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
camelia star-m 2014.04: OUTPUT«Resolver Error 0 (no error)␤(Mu)␤»
FROGGS moritz: ^^
because the native sub has no returns trait is returns Mu, which is what we return from .new 16:53
and that is what get passed along
moritz but there's still $w
so the call capture should have two elements
and not be reported as (Mu)
16:54 xinming left
FROGGS eww 16:54
TopWindow_Paint (self,$w)
look at that space :P
moritz ARGL
but then it should be (Parcel), no? 16:55
16:55 xinming joined
FROGGS jaffa4: please remove the space char before the '(' 16:55
m: say (Mu,Int)
camelia rakudo-moar ac4b21: OUTPUT«(Mu) (Int)␤»
FROGGS m: say (Mu,Int).Parcel
camelia rakudo-moar ac4b21: OUTPUT«(Mu) (Int)␤»
moritz m: say (Mu, Int).^name
camelia rakudo-moar ac4b21: OUTPUT«Parcel␤»
jaffa4 FROGGS: yes that is it 16:56
16:56 grettis left, molaf joined
moritz FROGGS++ 16:56
jaffa4 I think many users faill into that. 16:57
moritz m: sub f(Int, Str) { }; f (Mu, 'foo')
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␤␤»
moritz why is that a runtime error?
TimToady good question 16:59
Mu is not a valid Int either 17:00
m: sub f(Int, Str) { }; f (Int, 'foo')
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␤␤»
moritz TimToady: but Mu never tries to bind to an Int container
TimToady: it's always a Parcel
TimToady m: sub f(Int, Str) { }; say "alive"; f (Int, 'foo')
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␤␤»
TimToady answer, it's not runtime
oh wait, I'm blind 17:01
TimToady is stumped
maybe gives up on Parcel, on the assumption that it might expand in list context? 17:02
despite the fact that it could know there's no list context
FROGGS m: sub f(Str) { }; say "alive"; f(Int)
camelia rakudo-moar ac4b21: OUTPUT«===SORRY!=== Error while compiling /tmp/vMdnefc5rN␤Calling 'f' will never work with argument types (Int)␤ Expected: :(Str)␤at /tmp/vMdnefc5rN:1␤------> sub f(Str) { }; say "alive"; ⏏f(Int)␤»
FROGGS m: sub f(Str) { }; say "alive"; f (Int)
camelia rakudo-moar ac4b21: OUTPUT«===SORRY!=== Error while compiling /tmp/QJNSxO1jaI␤Calling 'f' will never work with argument types (Int)␤ Expected: :(Str)␤at /tmp/QJNSxO1jaI:1␤------> sub f(Str) { }; say "alive"; ⏏f (Int)␤»
FROGGS m: sub f(Str) { }; say "alive"; f(Mu)
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␤␤»
TimToady but I thought it did a conjectural dispatch to discover this 17:03
FROGGS interesting
TimToady maybe gives up on Mu
17:03 zakharyas joined
TimToady maybe something to do with junction logic 17:04
"it's outside of Any, just give up"
TimToady supposes one could actually go and read the source code, if one were ambitious 17:05
reading source code is hard, let's go backlogging... 17:06
17:07 dakkar left 17:10 [Sno] joined
[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
[Coke]: this should pass: 17:15
S32-temporal/Date.t 4 - Date.today
S32-temporal/DateTime.rakudo.moar aborted 108 test(s)
S32-temporal/local.rakudo.moar 1 - $*TZ is defined
17:15 grettis joined
[Coke] FROGGS: FACEPALM 17:15
what i ran was not parrot and moar, but moar and moar-jit 17:16
FROGGS but still, it should pass on HEAD :o)
[Coke] yes, rakudo.moar is now only failing 71 tests, not 126. Thanks!
17:17 virtualsue left
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
TimToady m: say %*ENV<TZ> 17:18
camelia rakudo-moar ac4b21: OUTPUT«(Any)␤»
17:20 DrSeki left
jaffa4 what does this mean? annot invoke object with invocation handler in this context 17:21
17:23 vendethiel joined
TimToady it means something called find_invokee_internal without passing a valid tweak_cs, and now you know as much as I know 17:25
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␤␤»
leont Can anyone tell me how I should have done that? (Dynamic method calls that is)
TimToady m: my $method = "Int"; "123"."$method"().say
camelia rakudo-moar ac4b21: OUTPUT«123␤»
TimToady unlike p5, p6 always uses different syntax for hard deref vs soft deref 17:27
(so one never needs 'use strict refs')
vendethiel soft references are like, with a variable name as a string? 17:28
vendethiel doesn't know his p5 very well
TimToady yup
17:28 M_o_C left
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
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?
TimToady well, it's always going to be slower to look up a name than to follow a pointer 17:31
how much slower depends on how fast you can do name lookups
vendethiel Right, but up to which point? Does it prevent a lot of other kind of optimizations ? (ssaf, inlining, ...)
well, that is, if they were done in the first place. also, unused variable removal 17:32
jaffa4 How to call a sub in a class? 17:33
vendethiel jaffa4: name-of-sub()
TimToady you can't, by default, since subs are lexically scoped and therefore private
vendethiel oh. 17:34
TimToady you'd have to declare it 'our'
vendethiel a sub that's in a class. Right.
17:34 gfldex joined
TimToady and then qualify it with the classname 17:34
m: class Foo { our sub bar { say "baz" }}; Foo::bar 17:35
camelia rakudo-moar ac4b21: OUTPUT«baz␤»
jaffa4 Cannot use 'our' with individual multi candidates. Please declare an our-scoped proto instead?
17:36 brrt joined
TimToady the error message assumes you know what a proto is and does 17:36
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'
if you don't have one, you need to add one to carry the 'our'
17:41 virtualsue joined
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)
jaffa4 Why?
vendethiel well, actually, I learned p5 has "protos" too. 'twas in yapc::na, for the 5.20 sigs talk. But it looked kinda weird
17:44 zakharyas left 18:02 treehug88 left
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:06
TimToady wants "not ok" to turn into "NOT ok" or some such when it's not TODO 18:07
so he can scan the left margin
itz hmm head moar seems to have broken Template::Mojo
or its first test anyway 18:08
18:08 anaeem1 left 18:12 akaseki joined 18:16 molaf_ joined 18:17 ajr_ left 18:20 molaf left 18:22 telex left 18:24 telex joined
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␤␤===SORRY!===␤Expression needs parens to avoid gobbling block␤at /tmp/qcIQ7PZ_DO:1␤------> try require Test { say …»
TimToady m: if (try require Test) { say "I feel fine." } 18:27
camelia ( no output )
TimToady m: if (try require Test) { say "I feel fine." } else { say $! } 18:28
camelia rakudo-moar ac4b21: OUTPUT«(Any)␤»
TimToady I think require should at least return a True if it succeeds
m: say require Test 18:29
camelia rakudo-moar ac4b21: OUTPUT«===SORRY!=== Error while compiling /tmp/seA9vge7VS␤Undeclared name:␤ Test used at line 1␤Undeclared routine:␤ require used at line 1␤␤»
TimToady m: say (require Test)
camelia rakudo-moar ac4b21: OUTPUT«Nil␤»
18:30 epochbel1 left 18:32 huf_ is now known as huf
itz oh I think an error message has changed and Template::Mojo isn't checking for it 18:33
dalek kudo/nom: 940066d | TimToady++ | src/Perl6/Actions.nqp:
make require return True on success
18:36
18:39 virtualsue left
[Coke] I need a module that lets me say "5 sextillion". :P 18:39
(easy to write, but I feel silly) 18:40
suggestions on a name?
vendethiel tries not to make the obvious joke... 18:41
[Coke]: au bon pain ? :p
(the joke being that some guy tried to sue au bon pain for 2 centillion dollars)
which is like, 36 zeroes. A lot of them 18:42
moritz [Coke]: Acme::SueMe 18:43
[Coke] thbbthp
PerlJam [Coke]: what do you mean "say '5 sextillion'"? There's a module for converting from english text to numbers already I think. 18:44
vendethiel moritz: this feels like the "'course, they're an emacs function for that" 18:45
jaffa4 m: say "big brother watches you" 18:46
camelia rakudo-moar ac4b21: OUTPUT«big brother watches you␤»
TimToady rosettacode.org/wiki/Names_to_numbers
[Coke] m: postfix<trillion>(Num $a) { $a * 100_000_000_000} ; say 3 trillion * 5 trillion; 18:47
camelia rakudo-moar ac4b21: OUTPUT«===SORRY!=== Error while compiling /tmp/4Eerh1E7fL␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/4Eerh1E7fL:1␤------> postfix<trillion>(Num ⏏$a) { $a * 100_000_000_000} ; say 3 tril[…»
[Coke] m: postfix:<trillion>(Num $a) { $a * 100_000_000_000} ; say 3 trillion * 5 trillion;
camelia rakudo-moar ac4b21: OUTPUT«===SORRY!=== Error while compiling /tmp/I62xH6oMWP␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/I62xH6oMWP:1␤------> postfix:<trillion>(Num ⏏$a) { $a * 100_000_000_000} ; say 3 tril…»
[Coke] *faceaplm* 18:48
m: sub postfix:<trillion>(Num $a) { $a * 100_000_000_000} ; say 3 trillion * 5 trillion;
retupmoca itz: github.com/tadzik/Template-Mojo/pull/8 fixes it
camelia rakudo-moar ac4b21: OUTPUT«===SORRY!=== Error while compiling /tmp/eKAKf2EbiX␤Two terms in a row␤at /tmp/eKAKf2EbiX:1␤------> Num $a) { $a * 100_000_000_000} ; say 3 ⏏trillion * 5 trillion;␤ expecting any of:␤ postfix␤ …»
TimToady no whitespace allowed
itz retupmoca: oh I was just doing that :) I should have checked for existing pull reqs 1st 18:49
live n learn
[Coke] PerlJam: like that, except functional. :P (fixing offline.)
numeric, no space between # and postfix. 18:50
m: sub postfix:<trillion>(Numeric $a) { $a * 100_000_000_000} ; say 3trillion * 5trillion; 18:51
camelia rakudo-moar ac4b21: OUTPUT«150000000000000000000000␤»
[Coke] I'd prefer the space, but I'll take what I can get.
PerlJam gotcha.
No ideas for the module name though. 18:52
[Coke] er plus also that's not a trillion.
*sigh* :)
18:52 zakharyas joined
PerlJam
.oO( Trillian? )
18:52
diakopter not even a european trillion
tadzik retupmoca: merged, but I do have some concerns. No time to fix it now though, will just open a ticket 18:53
TimToady [Coke]: you have to handle everything that rosettacode.org/wiki/Names_to_numbers does :P 18:54
PerlJam [Coke]: if you care about that space, you can make a macro
or ... macros really 18:55
18:56 darutoko left 18:57 rurban1 joined, ren1us joined
ren1us my net died when i was talking about this yesterday, but i figured out why slurp was running so obscenely slow 18:58
turns out i was running out of memory
18:59 rurban1 left
[Coke] tries to make a macro to make "2 dozen" return 24... 18:59
18:59 M_o_C joined, M_o_C left, M_o_C joined 19:00 virtualsue joined 19:01 MilkmanD1n is now known as MilkmanDan
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:01
itz ==> Testing Grammar::Profiler::Simple 19:02
t/csv.t .. 1/15 No such method 'name' for invocant of type 'Mu'
FROGGS ren1us: it takes at least 4 bytes per character 19:03
TimToady oh, it takes much more than that if you've got 4 million stirngs 19:05
*ri
ren1us yeah, 4 bytes each would come out to only about 15MB 19:06
diakopter I think at least 400 bytes per P6 String
ren1us i'm just watching the memory usage explode on a comb(/\w/, <4.2 million character string>)
19:08 treehug88 joined, anaeem1 joined
TimToady we need to find a way to cut that down for itty bitty strings 19:08
moritz and do it lazily for such a big list 19:13
TimToady that's only helpful if you process it lazily and don't mind it running even slower... 19:15
PerlJam itz: try again. 19:18
leont just ran prove6 on its own tests, it works o/ 19:19
tadzik nice! 19:20
now to run it instead of prove in panda+emmentaler, you can check if it differs anywhere in the entire ecosystem
FROGGS \o/
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:21
Parallel testing gives "interesting" results :-/ 19:22
19:29 virtualsue left
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:31
[Coke] m: macro dozen { {{{*12}}} }; say 3 dozen; 19:33
19:33 zakharyas left
camelia rakudo-moar 940066: OUTPUT«===SORRY!=== Error while compiling /tmp/5lIfYq00RM␤Two terms in a row␤at /tmp/5lIfYq00RM:1␤------> macro dozen { {{{*⏏12}}} }; say 3 dozen;␤ expecting any of:␤ postfix␤ infix stopper␤ …» 19:33
[Coke] m: macro dozen { quasi {{{*12}}} }; say 3 dozen; 19:34
camelia rakudo-moar 940066: OUTPUT«===SORRY!=== Error while compiling /tmp/zXX7os0i0_␤Two terms in a row␤at /tmp/zXX7os0i0_:1␤------> macro dozen { quasi {{{*⏏12}}} }; say 3 dozen;␤ expecting any of:␤ postfix␤ infix stopper…»
vendethiel [Coke]: macros are statements :) 19:36
[Coke] vendethiel: so there's no way to use the existing macros to make that work? 19:37
TimToady channels mjd 19:38
[Coke] I'm just trying to do what PerlJam told me, mang. 19:39
vendethiel dont think so
[Coke] er, man.
'dude'
vendethiel maaang
[Coke] do we have an example of a slang that is smaller than "the v5 repo" ? 19:47
19:51 BizarreCake left
TimToady offline for a few hours & # decommuting 19:52
tadzik hmm, does "Generating music sheets from a MIDI signal from a keyboard instrument" sound like a somewhat proper english? 19:54
flussence
.oO( wishful thinking: would be nice if I could write dwimmy things like «$somenum ~~ uint16.Range» )
19:55
[Coke] tadzik: yes
colomon tadzik: "sheet music" rather than "music sheets", I think 19:56
[Coke] flussence: would $somenum.narrow.WHAT help?
19:56 ggoebel1111114 joined
tadzik [Coke], colomon: okay, thank you :) 19:56
19:57 ren1us left
[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␤»
flussence [Coke]: my line of thinking is using a (nativetype).Range that knows its min/max values for where clauses and such
[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 ggoebel1111113 left
[Coke] so we could steal Range for that on the types, I guess. 19:58
i would call it .domain, maybe.
flussence that's a better name :) 19:59
timotimo hmm
i can kind of see how we could make a "tinystring" like the "smallbigint" 20:00
i don't know what the performance implications are when we have a check "is this a tinystring?" in front of every op
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:01
oh 20:02
it'd still be 128 byte per character in that case
FROGGS byte?
timotimo er ... bit. 20:03
plus the MVMObject header of course
well, all the ops already have to check what storage_type we're using 20:06
so just adding another storage type wouldn't hurt
20:06 kaare__ left
diakopter true, that flag is 2 or 3 bits 20:06
timotimo and if i'm careful, this tinystring storage type could even abuse num_graphs to store a second grapheme/codepoint/whatever 20:07
does that sound like a good idea, or a terrible idea? 20:13
[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?
timotimo hmm. 20:16
could mayhaps become a #define'd portion of code
or a long-term branch?
lizmat aren't native str much smaller ? 20:18
timotimo oh, yeah, there's also the Box 20:19
i was just talking about MVMString right now
20:20 dolmen joined
itz PerlJam: yeah works now 20:21
moritz eeks, rakudo spectest hangs on my laptop 20:24
lizmat which test ?
moritz several
oh, maybe my moarvm is too old
lizmat or no reconfigure after FROGGS's changes earlier today ? 20:25
FROGGS yes, reconfigure is needed 20:26
moritz dunno; I just rm -rf'ed install/ and realclean'ed
sjn reads pl6anet.org 20:30
quick, Q: Has there been any consensus around the DESTROY naming discussion timotimo is mention there? 20:31
mentioning*
moritz sjn: mostly, yes
sjn cool, what was the verdict? :)
moritz sjn: it seems only lizmat++ opposes the name DESTROY, and everyone else is fine with it
sjn aah
sjn sees lizmat's point, really 20:32
but oh well
moritz sjn: I see her point as well
lizmat has already given up on it
moritz sjn: but renaming it doesn't decrease the amount of information we have to communicate
lizmat I need my energy on other things
sjn s/DESTROY/UNREACHABLE/ # ?
flussence if it's an opposite of BUILD that happens at some unspecific point in time, maybe COLLAPSE? 20:33
moritz sjn: see irclog.perlgeek.de/perl6/2014-09-09#i_9322394
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
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
hoelzro carlin: that's a good bug to know about, though =) 20:35
moritz carlin: that's bad.
20:35 treehug88 left 20:36 Ven joined, labster left 20:39 virtualsue joined
lizmat sleep& 20:44
20:45 rurban1 joined, rurban1 left
btyler I wonder if that's what causes the segfaults in HTTP::Server::Async when under load from wrk 20:46
20:49 labster joined
moritz hrm 20:50
method send has
fail("Not connected") unless $!PIO;
as the very first line 20:51
but I wonder if a closed $!PIO actually evaluates to false
20:52 Rotwang left
moritz probably not 20:53
moritz tries a fix 20:54
dalek kudo/nom: d04b505 | moritz++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
[BOOTSTRAP] add more native type declarations
20:59
kudo/nom: a09f17d | moritz++ | src/core/IO/Socket.pm:
Do not segfault on sending to closed socket

  carlin++ for reporting the error.
The problem was that send() and write() tested $!PIO for truthness, but a closed socket does not evaluate to False on JVM and Moar
moritz carlin: FTFY :-)
carlin Not connected in block <unit> at client_test.pl6:10 21:03
moritz++
moritz now do I print to STDERR in nqp? 21:05
timotimo nqp::sayfh?
and nqp::getstderr? 21:06
moritz timotimo: and how do I get stderr?
ah
21:08 gfldex left
moritz btyler: fancy load-testing HTTP::Server::Async again under newest rakudo? 21:09
btyler moritz: just rebuilt everything, then realized I needed to make realclean/rm -rf install/ 21:10
moar's nearly done compiling 21:11
[Coke] S99:FTFY ?
synopsebot Link: perlcabal.org/syn/S99.html#FTFY_?
moritz [Coke]: "Fixed that for you"
PerlJam S99:FTFY
synopsebot Link: perlcabal.org/syn/S99.html#FTFY
moritz oh, it's even there :-) 21:12
21:12 davido_ left
timotimo actually, synopsebot could also paste the explanation for S99 directly 21:12
21:12 anaeem1 left
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:12
dalek kudo/nom: 1cc69a7 | moritz++ | src/core/IO/Socket/INET.pm:
simplify preprocessor directives

and remove a stray §?endif
21:14
kudo/nom: e8ab80a | moritz++ | tools/build/gen-cat.pl:
[build] remove gen-cat.pl

we use gen-cat.nqp now
kudo/nom: 2b7e232 | moritz++ | tools/build/gen-cat.nqp:
[build] warn about stray #?endif in gen-cat.nqp
21:15
moritz sleep&
timotimo moritz++ # socket love 21:16
btyler moritz: looks like a different issue for the async server + wrk -- still segfaulting after rebuilding everything 21:19
21:24 M_o_C left 21:32 Ven left
[Coke] Hey, Padred is on github: github.com/PadreIDE/Padre ; wonder if their p6 support still works... 21:44
21:45 oetiker left
timotimo padred? 21:52
btyler padre, the perl IDE 21:53
21:55 BenGoldberg joined
timotimo ah, the d was just a typo 21:58
leont I haven't heard anyone other than Gabor about it in a long time, is it actually being used? 22:01
FROGGS I'm not using it fwiw 22:02
22:06 colomon left, oetiker joined 22:18 virtualsue left
leont I'm trying to dynamically load Term::ANSIColor and use it if possible, how do I do that? 22:22
FROGGS star-m: try require Term::ANSIColor; say ::('Term::ANSIColor') 22:25
camelia star-m 2014.04: OUTPUT«(Term::ANSIColor)␤»
mberends I use Padre occasionally on Debian, and recommend it to students on Perl programming courses
FROGGS leont: try require Term::ANSIColor; if ::('Term::ANSIColor') !~~ Failure { do something with ::('Term::ANSIColor') }
22:28 Remosi joined 22:32 dolmen left 22:33 grettis_ joined, grettis left
leont Yes, but how do I do that something? 22:33
Term::ANSIColor::colored("", "") doesn't seem to work 22:35
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
FROGGS star-m: try require Term::ANSIColor; say &colored("", "") 22:38
camelia star-m 2014.04: OUTPUT«===SORRY!=== Error while compiling /tmp/f8VMQxE8MW␤Undeclared routine:␤ &colored used at line 1␤␤»
FROGGS star-m: try require Term::ANSIColor; say ::('colored')("", "")
camelia star-m 2014.04: OUTPUT«===SORRY!===␤No such symbol 'colored'␤»
FROGGS star-m: try require Term::ANSIColor; say &::('colored')("", "")
camelia star-m 2014.04: OUTPUT«===SORRY!===␤No such symbol '&::colored'␤»
FROGGS star-m: try require Term::ANSIColor; say ::('&colored')("", "")
camelia star-m 2014.04: OUTPUT«===SORRY!===␤No such symbol '&colored'␤»
FROGGS :o(
22:38 colomon joined
FROGGS ahh, we cannot import at runtime 22:39
star-m: try require Term::ANSIColor <&colored>; say colored("", "")
camelia star-m 2014.04: OUTPUT«Cannot invoke this object (REPR: Uninstantiable, cs = 0)␤ in block at /tmp/FApCXL8xN1:1␤␤»
FROGGS star-m: try require Term::ANSIColor <&colored>; say GLOBAL::Term::ANSIColor::EXPORT::DEFAULT::<&colored>("", "") 22:42
camelia star-m 2014.04: OUTPUT«Invalid attribute name ''␤ in block at /home/p6eval/star-2014.04/languages/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…»
FROGGS star-m: try require Term::ANSIColor <&colored>; say GLOBAL::Term::ANSIColor::EXPORT::DEFAULT::<&colored>("foo", "red")
camelia star-m 2014.04: OUTPUT«foo␤»
FROGGS leont: ^^
and so comprehensive >.<
leont Thanks, that does help 22:43
Assigning it to &colored gives redeclaration warnings, but $colored seems to work fine. It can be made prettier later on. 22:52
No, that was just me being sloppy 22:53
22:54 davido_ joined 22:55 spider-mario left 22:59 grettis_ left
timotimo hm. 23:03
star-m: try require Term::ANSIColor <&colored>; say colored("foo", "red")
camelia star-m 2014.04: OUTPUT«Cannot invoke this object (REPR: Uninstantiable, cs = 0)␤ in block at /tmp/b4_KtvgxGJ:1␤␤»
timotimo star-m: require Term::ANSIColor <&colored>; say colored("foo", "red")
camelia star-m 2014.04: OUTPUT«foo␤»
timotimo huh.
FROGGS O.o
timotimo wait 23:06
star-m is 2014.04?
23:06 grettis joined
FROGGS yes 23:06
star-m: try require Term::ANSIColor <&colored>; say ::
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(…»
timotimo i get the same error locally, though
FROGGS it does something with &colored though 23:07
star-m: require Term::ANSIColor <&colored>; say ::
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, …»
FROGGS ahh
timotimo star-m: try require Term::ANSIColor <&colored>; say $!
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…»
timotimo star-m: my &colored; try require Term::ANSIColor <&colored>; say $!
camelia star-m 2014.04: OUTPUT«===SORRY!=== Error while compiling /tmp/bujaqei97V␤Redeclaration of symbol &colored␤at /tmp/bujaqei97V:1␤------> ; try require Term::ANSIColor <&colored>⏏; say $!␤ expecting any of:␤ postfix␤»
23:07 avuserow left
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…»
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␤␤»
timotimo hm. so the & ought to be correct
leont Huh, that worked for me
timotimo and also for me. except i get "cannot find method 'Any'" ... 23:09
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␤␤»
FROGGS star-m: my &colored = do { try { require Term::ANSIColor <&colored>; ::("&colored") } }; say colored("foo", "red")
camelia star-m 2014.04: OUTPUT«foo␤»
FROGGS leont: m is the compiler only, so you only get lib and Test 23:12
leont Right
23:12 xragnar_ joined, xragnar is now known as Guest78704, xragnar_ is now known as xragnar
leont I'm currently at my &colored = do { try { require Term::ANSIColor <&colored>; ::("&colored") // sub (Str $text, Str $) { $text } } }; 23:13
But the else case doesn't work yet, because ::("&colored") evaluates to something truthy but uninstantiable 23:14
Right, should have moved the // out of the do-try 23:15
23:16 Guest78704 left
leont This seems to do the trick: my &colored = do { try { require Term::ANSIColor <&colored>; ::("&colored") } } // sub (Str $text, Str $) { $text }; 23:18
23:19 avuserow joined 23:22 cognome joined 23:29 brrt left
leont Why does that code work on my one-liner but not in my class? 23:32
"Trying to import symbols &colored from 'Term::ANSIColor', but it does not export anything" :-/
FROGGS hmmm 23:33
no idea offhand
leont Smells like a bug, but not one I grok
23:46 vendethiel left 23:51 vendethiel joined 23:52 bonsaikitten left 23:53 xenoterracide joined 23:54 xiaomiao joined