»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:03 Chillance joined
grondilu do you think one day a private rocket will use Perl6 code on board? ;) 00:08
00:10 fgomez left 00:16 Patterner left
sorear depends on how you define "use" 00:18
for hard-real-time high-assurance avionics, there will likely always be better choices 00:19
grondilu at least for simulation, it will be cool to use a high level language such as Perl6. 00:21
use Rocket; my Rocket $falcon .= new; wait 9* 1min and $falcon.take-off; # :) 00:28
00:28 whiteknight left 00:29 cognominal joined 00:30 fgomez joined
colomon grondilu: shoot, forgot about the launch and washed the dishes instead of watching! 00:48
00:51 tadzik left 00:52 tadzik joined 00:55 fgomez left 01:01 anuby joined 01:14 hypolin joined 01:29 fgomez joined 02:03 am0c joined 02:07 m0ss joined 02:21 m0ss left 02:25 erkan left 02:41 orafu left 02:42 orafu joined
cognominal r: say CORE.WHO.keys 02:44
p6eval rakudo 870d18: OUTPUT«&undefine &prefix:<temp> &prefix:<let> &INDIRECT_NAME_LOOKUP &REQUIRE_IMPORT &METAOP_ASSIGN &METAOP_TEST_ASSIGN:<//> &METAOP_TEST_ASSIGN:<||> &METAOP_TEST_ASSIGN:<&&> &METAOP_NEGATE &METAOP_REVERSE &METAOP_CROSS &METAOP_ZIP &METAOP_REDUCE_LEFT &METAOP_REDUCE_RIGHT …
cognominal typing it twice at the prompt on two different lines gives : Nominal type check failed for parameter '$got'; expected Any but got Perl6::Metamodel::ContainerDescriptor instead 02:47
03:02 Celelibi left 03:07 wamba joined, hypolin left 03:09 hypolin joined 03:13 cognominal left 03:39 Celelibi joined 03:46 Celelibi left 03:50 Celelibi joined 04:07 wamba left 04:10 sftp left 04:13 s1n left 04:25 telex left, fgomez left 04:27 fgomez joined 04:29 s1n joined 04:33 telex joined 04:34 fgomez left 04:51 s1n left 04:57 fridim_ left 05:01 erkan joined 05:03 will1309 left 05:11 SamuraiJack joined 05:15 hash_table left 05:18 s1n joined 05:21 Playb3yond joined 05:22 kaleem joined 05:27 fgomez joined 05:32 Playb3yond left 05:33 birdwindupbird joined 05:41 Psyche^ joined, Psyche^ is now known as Patterner
moritz good morning 05:47
05:53 cognominal joined
sorear o/ 05:54
moritz \o 05:59
06:00 Chillance left
jnthn morning o/ 06:04
06:11 cognominal left
sorear jnthn! 06:13
\o/
06:19 cognominal joined
jnthn hi sorear :) 06:24
06:27 mst left, mst joined 06:40 flightrecorder joined 06:53 FROGGS joined 06:55 mikemol left 06:57 mikemol joined 07:08 brrt joined 07:09 xinming_ left 07:15 xinming joined
mathw good morning! 07:15
brrt morning 07:16
07:36 fhelmberger joined 07:44 cibs left 07:47 irssi394 joined 07:51 mishin joined 07:52 irssi394 left, alcapowned joined 08:08 kresike joined
kresike good morning all you happy perl6 people 08:09
tadzik mornings 08:10
08:13 thou left
sorear o/ 08:13
brrt \o sorear 08:14
08:14 cibs joined 08:27 replore joined 08:30 wamba joined 08:34 brrt left 08:36 mishin left
mathw o/ 08:36
08:37 xiaoyafeng joined 08:42 xiaoyafeng left 08:44 mishin joined 08:47 mishin left 08:50 mishin joined 09:05 kaleem left 09:19 am0c left 09:22 replore left, SamuraiJack_ joined 09:23 SamuraiJack left, telex left 09:24 telex joined 09:26 wamba left, wamba joined 09:32 replore joined 09:36 leont joined 09:37 replore left 09:48 rindolf joined 09:49 Patterner left 09:50 Psyche^ joined, Psyche^ is now known as Patterner 10:03 hypolin left 10:04 daxim joined 10:09 anuby left 10:17 wamba left 10:30 wamba joined 10:32 wk_ left 10:33 wamba left 10:38 Sense_ joined 10:43 mucker joined 10:46 rindolf left 10:48 rindolf joined 10:53 cognominal left 10:57 Sense_ left 10:59 cognominal joined 11:01 leont left, tokuhiro_ joined 11:03 wk joined 11:05 Su-Shee_ joined 11:09 Su-Shee left 11:11 Su-Shee_ is now known as Su-Shee 11:29 replore joined 11:33 adu joined 11:34 grondilu left 11:37 kaleem joined 11:40 rindolf left 11:49 gootle left 11:53 rindolf joined 12:06 tokuhiro_ left 12:07 tokuhiro_ joined 12:12 tokuhiro_ left 12:15 rindolf left 12:16 rindolf joined 12:19 GlitchMr joined 12:24 sftp joined 12:25 rindolf left 12:26 rindolf joined 12:34 adu left 12:39 snearch joined 12:42 cognominal left 12:47 killbot left 12:48 aharoni joined 12:49 benabik left, benabik joined 12:50 cognominal joined 12:52 rindolf left, rindolf joined 12:54 adu joined 12:57 mucker left 12:58 mucker joined 12:59 PacoAir joined 13:00 hash_table joined, killbot joined 13:04 atrodo joined 13:07 benabik left 13:12 cognominal_ joined 13:13 cognominal left 13:17 replore left 13:22 replore_ joined 13:23 zb left 13:28 rindolf left, rindolf joined 13:29 zb joined
cognominal_ r: my ($a, $b) = <1..3>; say $b 13:32
p6eval rakudo 870d18: OUTPUT«Nil␤»
cognominal_ r: my ($a, *, $b) = <1..3>; say $b 13:33
p6eval rakudo 870d18: OUTPUT«===SORRY!===␤Malformed parameter␤at /tmp/36wzfNvY3y:1␤»
cognominal_ r: my ($a, $, $b) = <1..3>; say $b
p6eval rakudo 870d18: OUTPUT«Nil␤»
13:33 hash_table left
[Coke] r: my ($a, *, $b) = 1, 2, 3; say $b 13:33
p6eval rakudo 870d18: OUTPUT«===SORRY!===␤Malformed parameter␤at /tmp/fbNSL0dXdM:1␤»
[Coke] r: my ($a, $b) = 1, 2, 3; say $b 13:34
p6eval rakudo 870d18: OUTPUT«2␤»
cognominal_ I expected a list context. For the $ versus *, I am not too sure if the doc is a fossil or if the implementation is wrong
masak the former, methinks. 13:36
phenny masak: 04 Oct 20:54Z <sorear> tell masak possible rakudobugs, "r: .++" and "r: $_.++"; STD is fine with both; are they known?
masak: 04 Oct 20:55Z <sorear> tell masak well, rakudobugs for sure, possibly *new*
moritz huh, it is a list context
erm wait, I might be looking at the wrong line of output right now 13:37
cognominal_ oops, I should have chosen betwen <1 2 3> and 1..3 # silly me
brainfart
[Coke] my ($a, $, $b) = (<1..3>); say $b; 13:38
r: my ($a, $, $b) = (<1..3>); say $b;
p6eval rakudo 870d18: OUTPUT«Nil␤»
[Coke] r: my ($a, $, $b) = <1..3>.list; say $b;
p6eval rakudo 870d18: OUTPUT«Nil␤»
masak sorear: I'm on vacation and not likely to submit rakudobugs this week ;) 13:39
cognominal_ funny how mind automatisms work, apparently I could not choose between the two, so I choosed both, which wrong :)
masak or even swap in my extensive knowledge about what's submitted and what isn't... :P
13:39 replore_ left
cognominal_ I should compile my errors, I will probably learn a lot about my thought processes when going wrong 13:41
S)2: Outside of declarative constructs you may use C<*> for a placeholder:
I don't see the benefit 13:42
13:49 rindolf left 14:09 stopbit joined
diakopter hm, I wonder whether I have $work today 14:13
14:15 benabik joined 14:20 cognominal_ left 14:21 cognominal_ joined 14:26 buubot_backup joined 14:30 benabik_ joined 14:33 benabik left, benabik_ is now known as benabik 14:34 wk left 14:35 integral left, crab2313 joined, cognominal_ left 14:37 kaare__ joined 14:39 spider-mario joined, crab2313 left 14:43 cognominal_ joined 14:44 fridim_ joined 14:49 hash_table joined 14:50 thou joined, replore joined 14:51 integral joined, integral left, integral joined 14:54 replore left 14:57 telex left 14:59 telex joined 15:05 kaleem left 15:07 birdwindupbird left, snearch left
kresike bye folks 15:12
15:12 kresike left, replore_ joined 15:17 rindolf joined 15:21 adu left 15:23 rindolf left, sirrobert joined 15:25 integral left, sirrobert left 15:26 integral joined, integral left, integral joined, sirrobert joined
sirrobert hi p6 15:27
phenny sirrobert: 05 Oct 21:27Z <raiph> tell sirrobert expected Blah but got Blah: irclog.perlgeek.de/perl6/2012-03-01 discussion starts at 15:30
15:28 wamba joined 15:36 wamba left
masak what does 5) mean under S05/Overview? could someone give an example? 15:55
16:10 MayDaniel joined 16:21 wamba joined, Timbus left, Timbus joined 16:23 mikemol left 16:24 mikemol joined 16:26 Chillance joined 16:32 snearch joined 16:35 snearch left
PerlPilot masak: irclog.perlgeek.de/perl6/2010-05-05#i_2296683 might help :) 16:36
phenny PerlPilot: 28 Apr 13:49Z <tadzik> tell PerlPilot I've sent you a pull request for Benchmark.pm
16:36 PerlPilot is now known as PerlJam
PerlJam phenny: you have a long memory :) 16:37
16:44 zby_home_ joined 16:50 raiph joined 17:03 wk joined 17:06 replore_ left 17:12 benabik_ joined 17:14 benabik left, benabik_ is now known as benabik 17:16 leont joined 17:17 mucker left 17:20 replore_ joined 17:24 mucker joined 17:25 replore_ left, Pleiades` left 17:27 wamba left 17:29 Circlepuller joined, Circlepuller left 17:33 Pleiades` joined 17:34 fhelmberger left
tadzik wow :D 17:37
that was before I knew PerlJam is PerlPilot :) 17:38
17:42 wamba joined 17:50 fridim_ left 17:51 fglock joined 17:57 cognominal_ left, am0c joined
[Coke] I am bemused that we are all hacking on #perl6, but still use IRC. 18:03
18:04 killbot left
tadzik why is that surprising? 18:04
sorear masak: Nobody knows.
18:04 cognominal joined
[Coke] irc is like the perl3 of chat. 18:05
doy what would you suggest as a replacement? 18:06
jnthn MSN Messenger!
PerlJam [Coke]: as soon as we get that telepathic link up and running, we can all join TIC (telepathic internet chat)
jnthn
.oO( The PHP of chat... )
18:07 killbot joined
[Coke] doy: my preference would be xmpp. 18:08
rjbs doesn't know of any xmpp clients half as useful as irssi. 18:09
(Not that I need a vote in this, since I only show up to tell Coke to play D&D or to ask very basic questions.)
[Coke] rjbs: dammit! I do want to play, really! 18:10
(that dammit was to me, not you!)
rjbs [Coke]: :-) Saturday!
[Coke] rjbs: ironically? I've been playing a lot of skyrim lately.
tadzik [Coke]: I guess the irc is just good enough, and xmpp doesn't really have any real advantage
[Coke] actually, I do play skyrim ironically. Just to be hip.
sirrobert does xmpp allow persistent channels? that can be joined without invite? 18:11
tadzik yes
sirrobert I didn't know that
tadzik one big cons: you need an xmpp account to join xmpp chat
sirrobert what's it called?
tadzik: ahh
tadzik I don't know if it's called anything
I guess it's just MUC
sirrobert just did a search for it but didn't know how to search for it =)
[Coke] tadzik: yah, that's not a con.
sirrobert xmpp channel
tadzik oh yes it is
"hey guys, move to this service. It serves the same purpose, but you need an account" 18:12
[Coke] for guests? sure. For you and I? no it isn't. But you can allow guests.
tadzik: I /already/ need an account to use freenode.
tadzik well, you get persistent identities on xmpp
doy rjbs: "bitlbee"
tadzik on irc we work around that, which is imperfect
[Coke] tadzik: which, IMO, is a big enough reason to switch. But I am clearly outvoted, so the discussion is moot. 18:13
doy [Coke]: you don't, really... it just whines at you a lot if you don't have one
(:
tadzik [Coke]: well, I'm quite a fan of xmpp myself
rjbs doy: Hm. I 've used that, but never for chat rooms on xmpp. Hm.
doy rjbs: i've never tried it with xmpp chat rooms, actually
but it works fine for normal xmpp messages
tadzik [Coke]: I guess the big win is that it's easier to bring people in to irc 18:14
just "hey, click here and you're online"
[Coke] tadzik: you can do the same with xmpp web chat, IIRC. 18:15
tadzik [Coke]: is it possible to communicate on xmpp without an account?
[Coke] tadzik: I believe so, yes.
tadzik curious :)
[Coke] let's assume it is: no one is switching, it's moot. :) 18:16
tadzik is that specified in some XEP?
[Coke] stops talking about it because it's just depressing.
tadzik now that you got me interested? You cruel person :)
tadzik goes to look at xmpp specs 18:17
18:17 am0c left
[Coke] chuckles. 18:22
moritz somebody[tm] could write a Perl 6 wrapper around libpurple (the IM lib that pidgin and some other clients ues) 18:23
*use
tadzik hm 18:24
I used loudmouth for clients I wrote, but it is absolutely horrible :)
or maybe just horribly undermaintained 18:25
moritz I've used none of those directly myself, from the usage patterns I just assumed that libpurple was a quasi-standard
tadzik I think telepathy is now a go-to thing 18:26
but maybe not :)
18:27 mishin left
timotimo_ you can communicate on xmpp without accounts. it's how zeroconf chatting works 18:28
tadzik cool
do you have any technical links I could read?
timotimo_ but i don't think you can get onto the federated network like that
xmpp.org/extensions/xep-0174.html 18:29
tadzik oh, nice
[Coke] timotimo++ 18:40
it has been a LONG time since I've read any xeps.
flussence found this sub-thread interesting, wondering how it'd go in p6; www.reddit.com/r/programming/commen...?context=2 18:43
(and then I invariably ended up wondering what the heck andthen/orelse are used for...)
arnsholt How attached can I expect people to be to S21 (Calling foreign code)?
flussence arnsholt: meh, I've rewritten my code entirely once already, don't care :) 18:44
PerlJam arnsholt: Why do you ask?
sirrobert fluessence: a tabular return is appropriate there. P6 may have some more terse syntax, though 18:45
arnsholt I was going to spec the interface provided by NativeCall
jnthn arnsholt: Go for it, imho
flussence after actually looking at S21, +1 18:46
arnsholt Cool
PerlJam arnsholt: what they said :)
jnthn S21 is...basically empty
arnsholt I think I'll kill most of the stuff that's there, and relegate Perl 5 interop to a "how do we want this to work?" section
18:47 bluescreen10 joined 18:52 tadzik is now known as tadzikarp
[Coke] jnthn: minor ping on nqp#59 18:55
19:01 cognominal left 19:02 cognominal joined 19:03 brrt joined
brrt p6: sub foo(|@args) { say @args.elems }; foo(1,2,3) 19:05
p6eval rakudo 870d18: OUTPUT«Obsolete use of | or \ with sigil on param @args␤Nominal type check failed for parameter '@args'; expected Positional but got Capture instead␤ in sub foo at /tmp/O9vIfrbjoT:1␤ in block at /tmp/O9vIfrbjoT:1␤␤»
..niecza v22-7-g7df6137: OUTPUT«Potential difficulties:␤ Unsupported use of | with sigil; nowadays please use | without sigil at /tmp/siNhJ8TWqb line 1:␤------> sub foo(|@args⏏) { say @args.elems }; foo(1,2,3)␤␤3␤»
brrt p6: sub foo(|args) { say |args.elems }; foo(1,2,3)
p6eval niecza v22-7-g7df6137: OUTPUT«Unhandled exception: Unable to resolve method Capture in type Int␤ at /tmp/QyvKey6_jK line 1 (foo @ 5) ␤ at /tmp/QyvKey6_jK line 1 (mainline @ 4) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4198 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting li… 19:06
..rakudo 870d18: OUTPUT«3␤»
brrt how does this work?
also
p6: sub foo(|args) { say |args.elems }; foo(1, (2, 3), 4) 19:07
p6eval niecza v22-7-g7df6137: OUTPUT«Unhandled exception: Unable to resolve method Capture in type Int␤ at /tmp/W4WMGkEMDr line 1 (foo @ 5) ␤ at /tmp/W4WMGkEMDr line 1 (mainline @ 4) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4198 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting li…
..rakudo 870d18: OUTPUT«3␤»
sirrobert sub foo (@args) { say @args }; foo(|@args);
r: sub foo (@args) { say @args }; foo(|@args);
p6eval rakudo 870d18: OUTPUT«===SORRY!===␤Variable @args is not declared␤at /tmp/gTChAFUuwY:1␤»
brrt in short
sirrobert r: sub foo (@args) { say @args }; my @args = 1,2,3; foo(|@args);
p6eval rakudo 870d18: OUTPUT«Nominal type check failed for parameter '@args'; expected Positional but got Int instead␤ in sub foo at /tmp/JQFsT8Ry9n:1␤ in block at /tmp/JQFsT8Ry9n:1␤␤»
brrt does perl 6 do callee side argument flattening
sirrobert yeah, you flatten when you call
not in the method sig (I'm pretty sure)
brrt yeah, thats caller side
usually 19:08
i'm wondering about callee-side
sirrobert ohh
sorry, dunno
brrt believes it is possible, and it has quite large implications 19:09
sirrobert r: sub test ($foo, |@bar) { say $foo; say @bar.perl }; test(1,2,3,4); 19:10
p6eval rakudo 870d18: OUTPUT«Obsolete use of | or \ with sigil on param @bar␤Nominal type check failed for parameter '@bar'; expected Positional but got Capture instead␤ in sub test at /tmp/y0Vhb0RrTd:1␤ in block at /tmp/y0Vhb0RrTd:1␤␤»
sirrobert r: sub test ($foo, *@bar) { say $foo; say @bar.perl }; test(1,2,3,4); 19:11
p6eval rakudo 870d18: OUTPUT«1␤Array.new(2, 3, 4)␤»
sirrobert Is that what you wanted?
brrt i knew that was possible :-) i'm wondering about the following case
r: sub text
p6eval rakudo 870d18: OUTPUT«===SORRY!===␤Missing block␤at /tmp/CF3GOj6Zvl:1␤»
brrt r: sub test($foo, *@bar) { say $foo; say @bar.perl }; test(1, 2, (3, 4)) 19:12
p6eval rakudo 870d18: OUTPUT«1␤Array.new(2, 3, 4)␤»
brrt damn you, perl6
sirrobert I know what you mean:
brrt back to the drawing board, it is
sirrobert r: sub test($foo, *@bar) { say $foo; say @bar.perl }; test(1, 2, [3, 4])
p6eval rakudo 870d18: OUTPUT«1␤Array.new(2, [3, 4])␤»
sirrobert right? 19:13
you want to flatten that?
brrt yes
or, more properly
i want to know if perl6 will /allow/ flattening it
and, considering the 2, (3, 4) example, i'm guessing that it is
jnthn r: sub test($foo, *@bar) { say $foo; say @bar.perl }; test(1, 2, (3, 4)) 19:14
p6eval rakudo 870d18: OUTPUT«1␤Array.new(2, 3, 4)␤»
jnthn r: sub test($foo, **@bar) { say $foo; say @bar.perl }; test(1, 2, (3, 4))
p6eval rakudo 870d18: OUTPUT«1␤LoL.new(2, $(3, 4))␤»
19:14 tadzikarp is now known as tadzik
sirrobert brrt, I think you have to flatten on the caller side for that. 19:14
jnthn Dunno if that's what you're looking for
brrt yeah, pretty much
jnthn: this means that a callee must be able to flatten the LoL of the caller 19:15
which is a Problem if you wish to implement it 19:16
jnthn doesn't quite see the problem.
brrt great, then you might enlighten me :-) 19:17
jnthn Or vice versa ;)
sirrobert heh
brrt ok, my problem, or challenge, is this
jnthn A LoL preserves parcel structure.
A normal *@foo flattens any flattening things that are passed. 19:18
brrt (keep going please :-))
i wish to design and implement a bytecode that is high-level enough to implement many languages simultaneously and interoperably
i.e., i want to replace parrot
jnthn Note that there's a difference between 19:19
r: sub foo(*@a) { say @a.elems }; my @bar = 1,2,3; foo(@bar)
p6eval rakudo 870d18: OUTPUT«3␤»
19:19 daxim left
jnthn r: sub foo(*@a) { say @a.elems }; foo([1,2,3]) 19:19
p6eval rakudo 870d18: OUTPUT«1␤» 19:20
jnthn The [...] array constructor gives an item
r: sub foo(*@a) { say @a.elems }; my @bar = 1,2,3; foo($@bar) # also
p6eval rakudo 870d18: OUTPUT«===SORRY!===␤Invalid hard reference syntax at line 2, near "@bar) # al"␤»
jnthn er
r: sub foo(*@a) { say @a.elems }; my @bar = 1,2,3; foo($(@bar)) # also
p6eval rakudo 870d18: OUTPUT«1␤»
jnthn More generally, things know if they will flatten or they are meant to be single items and that lives on with them when they are passed. 19:21
(finished now, ask questions if you have 'em :)) 19:22
brrt yes, thanks :-)
ehm, my point was, in general
i had imagined a scheme where things that you want to flatten would provide an iterator 19:23
19:23 Su-Shee left
brrt i.e., a flattened hash would give an iterator for pairs 19:23
a flattened array would give an iterator for its items 19:24
however
if you can have callee-side flattening, this scheme fails
because my intention was to have the interpreter /not/ know which items can flatten 19:25
jnthn If I was building Parrot's calling conventions again, I'd have the flatten thing just set a bit somewhere and leave the callee to figure out what to do
brrt yeah, thats my back-to-the-drawing board plan 19:26
jnthn Rakudo has a custom signature binder, fwiw.
It kinda needs it.
Binding Perl 6 signatures can lead to recursive calls into the binder, for example. 19:27
arnsholt Regarding specs: are there any conventions for including speculations/marginalia into the text?
jnthn arnsholt: I've seen things like (Conjectural: blah blah)
arnsholt I'll go with that for the moment then. Some more experienced spec wrangler can fix it if it's too bad =) 19:28
sirrobert what's the best way to do a method factory? e.g. class A { for <a b c> -> $name { method $name () {...} } }; 19:29
19:30 Su-Shee joined, mucker left
brrt jnthn: if you could read this: github.com/bdw/parakeet/blob/maste...entions.md 19:30
and then tell me where i'm wrong
i'd be delighted
(although you have given me a pretty good idea)
jnthn sirrobert: You should probably do that at BEGIN time 19:31
sirrobert jnthn: hmm... ok
jnthn And use the MOP I guess
r: class A { BEGIN { for <a b c> -> $m { A.HOW.add_method(A, $m, method () { "method $m" }) } } }; say A.a; say A.c; 19:32
p6eval rakudo 870d18: OUTPUT«method a␤method c␤»
jnthn hah, nailed it first time :) 19:33
sirrobert heh nice
thanks
What does BEGIN { ... }mean inside a class declaration?
19:33 zby_home_ left
jnthn Same as it means anywhere else 19:35
"Run this right now"
colomon has a grammar trace which has been running for three hours now...
jnthn o.O 19:36
sirrobert jnthn: ah.. I interpreted it as a different meaning in p5
jnthn cognominal: Is it actually tracing?
colomon jnthn: yes, and my names not cognominal. ;)
jnthn sirrobert: The thing to understand about classes is that as the parser runs over them, it makes a bunch of method calls.
colomon: oops :)
colomon: OK. This is Grammar::Tracer? :) 19:37
colomon jnthn: yes
jnthn It's not hung or messed up?
sirrobert jnthn: ok, will think about that.
jnthn 3 hours is...crazy long.
colomon it's never stopped printing things out. I think it might be in an endless loop of some sort
jnthn Yeah
I mean, it carries overhead compared to the normal un-traced parse but...
...that sounds excessive. 19:38
sirrobert This also works. Why would it be undesirable?
colomon it never came back with a result in a non-traced run, which is why I switched over to traced.
sirrobert r: class A { }; for <a b c> -> $m { A.HOW.add_method(A, $m, method () { "method $m" }) }; say A.a; say A.c;
p6eval rakudo 870d18: OUTPUT«method a␤method c␤»
colomon jnthn: I kind of had a (late) birthday party after I started it, so I haven't been watching it very carefully. It hasn't repeated itself in the last four minutes.... 19:39
jnthn colomon: OK. Maybe tracing really *is* that slow. 19:41
colomon jnthn: it is parsing a 1.3 meg STEP file, so it is doing quite a lot of work. (Just thought to look, and it is 4x longer than the next longest STEP file I've tried to parse, so maybe it's not too surprising it's slow.) 19:43
19:44 birdwindupbird joined
brrt also, isn't a Pair surprisingly like a cons? 19:46
19:48 fgomez left
colomon brrt: ;) 19:49
brrt by the way... is it ever the intention we can 'flatten' an infinite list? 19:50
i.e., what happens now 19:51
r: sub foo(*@args) { say @args[0]; }; my @a = 1..Inf; foo(@a); 19:52
p6eval rakudo 870d18: OUTPUT«1␤»
brrt ... what happens to me now
19:53 kaare__ left
jnthn But we don't flatten there really 19:53
@args is an Array that contains @a and @a contains the Range and is flattening, so when you ask for @args[0] it asks for @a[0] which produces the first value from the range 19:54
But that's nothing to do with calling conventions.
Well, the creation of the outer Array for @args is I guess
brrt basically 19:55
you're saying the callee makes a flattening array and therefore has to figure it out
19:56 fgomez joined
jnthn Well, the important flattening thing here is the @a 19:56
brrt i guess that makes sense 19:59
se
sirrobert how can I tell if two data structures match deeply?
jnthn sirrobert: Did you try eqv? 20:00
sirrobert no ... I've never used eqv yet =)
trying now
jnthn OK, it may be what you want :)
20:00 wamba left
sirrobert jnthn: yep, apparently it is =) 20:00
jnthn \o/ 20:01
brrt the funny thing is
jnthn colomon: It occurs to me I can probably make Grammar::Tracer perform a little better.
brrt p6 binding is not even that hard
its just hard if you make cheap assumptions about it
r: sub foo($x, $y, $z) { say $x.perl; say $y.perl; say $z;perl }; foo(1,(2,3),4) 20:02
p6eval rakudo 870d18: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&perl' called (line 1)␤»
brrt r: sub foo($x, $y, $z) { say $x.perl; say $y.perl; say $z.perl }; foo(1,(2,3),4)
p6eval rakudo 870d18: OUTPUT«1␤$(2, 3)␤4␤»
brrt $(2, 3) is a literal parcel? 20:03
20:03 cognominal left
jnthn It's a parcel in item context. 20:03
(2, 3) # would flatten
$(2, 3) # like (2, 3).item
colomon jnthn: ooooo 20:04
jnthn Actually $(2, 3) compiles to (2, 3).item
colomon jnthn: still not repeating itself, BTW.
jnthn I'm getting kinda tired for today, but I'll see if I can look at it tomorrow or so
colomon jnthn: but the bad news is the file I really want to process is 12 megs, so if things are really this slow on a 1.3 meg file, I may be in trouble here. 20:05
jnthn colomon: You need to process it with tracing?
colomon: Grammar::Tracer slows down grammar execution quite significantly. 20:06
brrt jnthn: thanks a lot 20:07
jnthn I wrote it with "OK, I'm building a grammar and it doesn't work, let me work out where" in mind.
colomon jnthn: no, I just need to process it. But I'm doing the trace because the 1.3 meg file was so slow I thought it was in an infinite loop the tracer would help me find. If instead it's really just that slow, then I've got big issues with running a 12 meg file.
20:08 SamuraiJack_ left
jnthn colomon: 3 hours sounds quite crazy. I mean, we chew through all 400 KB of CORE.setting - including building the AST - in not incredibly long. 20:09
20:09 GlitchMr left
jnthn Not with tracing, but still... 20:09
20:10 cognominal joined
brrt there is a factor of 30 difference only or so 20:11
jnthn colomon: It's not backtracking in some place, is it? 20:12
colomon: As in, it's all rule/token and not regex?
colomon jnthn: all rule/token 20:15
20:16 hash_table left
colomon jnthn: I may just not have been showing enough patience, I just tried again (no trace, that's still running on a different machine) and it parsed the file in question in 3 minutes 47 seconds. :) 20:20
20:21 fglock left
arnsholt perl6-language is the list for all things spec, right? 20:23
20:23 birdwind1pbird joined 20:24 wamba joined
sorear ya 20:24
arnsholt signs up 20:25
20:25 birdwindupbird left, kurahaupo joined 20:26 bbkr_ joined
bbkr_ star: use JSON::Tiny; use JSON::RPC::Client; try { CATCH { JSON::RPC::ParseError.new( data => ~$! ).throw };from-json( q|{"jsonrpc": "2.0", "method": "foobar, "params": "bar", "baz]| ) } 20:33
p6eval star 2012.07: OUTPUT«use of uninitialized value of type Any in string context in block <anon> at /tmp/r2pmhDBl2E:1␤␤Parse error (-32700): ""␤»
20:33 Chillance left
jnthn bbkr_: Inside CATCH, the current exception is in $_ 20:34
bbkr_ do we have newest star available? code above SegFaults on 2012.09 on my machine
jnthn (thus why it can be smart-matched on
jnthn wonders whihc star is running there 20:35
star: say %*PERL<version>
p6eval star 2012.07: OUTPUT«postcircumfix:<{ }> not defined for type Failure␤ in method gist at src/gen/CORE.setting:9574␤ in sub say at src/gen/CORE.setting:6980␤ in block <anon> at /tmp/zgCUo4q9jU:1␤␤»
20:35 M_o_C joined
jnthn star: say $*PERL 20:35
p6eval star 2012.07: OUTPUT«("name" => "rakudo", "compiler" => {"name" => "rakudo", "ver" => "2012.07", "release-number" => "", "build-date" => "2012-07-28T09:39:00Z", "codename" => ""}).hash␤»
jnthn ah
bbkr_ jnthn: I know, this is done on purpose (SegFault should not happen no matter how badly logic is broken)
jnthn bbkr_: Indeed. 20:36
bbkr_: Please file a ticket; golfing welcome if possible.
bbkr_ jnthn: I will after I isolate the root of the problem as much as possible. 20:37
jnthn bbkr_: Thanks.
When I get chance, I'll try and get it reproduced here under the debugger.
bbkr_ confirmation from someone running 2012.09 is still welcome, I'm not sure if it's Rakudo or OS fault 20:38
brrt bbkr_: can you run it in gdb?
bbkr_ brrt, I'll try after I isolate the case a bit more 20:40
rakudo: try { CATCH { ~$! }; die } # shortest form that segfaults on my machine 20:41
p6eval rakudo 870d18: OUTPUT«(signal SEGV)»
bbkr_ rakudo: say $*PERL
p6eval rakudo 870d18: OUTPUT«("name" => "rakudo", "compiler" => {"name" => "rakudo", "ver" => "2012.09.1-19-g870d189", "release-number" => "", "build-date" => "2012-10-07T20:14:14Z", "codename" => ""}).hash␤»
jnthn eek 20:42
rakudo: try { CATCH { say $! }; die }
p6eval rakudo 870d18: OUTPUT«Mu()␤␤ in block at /tmp/PvCL0g0K2j:1␤␤»
jnthn rakudo: try { CATCH { say pir::typeof__SP($!) }; die }
p6eval rakudo 870d18: OUTPUT«Null PMC access in name()␤ in block at /tmp/z1hRUMISze:1␤ in block at /tmp/z1hRUMISze:1␤␤»
jnthn yowser
bbkr_ ? 20:43
jnthn Yeah, that's bad.
colomon jnthn: I just gave up on the long trace when I realized it was still only a third of the way through the file.
jnthn colomon: OK, so the tracer really is slow indeed. :)
colomon: I'll see if I can't speed it up a bit :)
colomon jnthn++ 20:44
brrt jnthn, bbkr_: works for me in gdb, although i have an oldish version 20:45
jnthn Yeah, I'm thinking it's a regression that's snuck in and didn't get caught by spectest.
brrt oh, wait, stringifying gives a segfault
bbkr_ RT #115184 20:46
jnthn How old is your oldish?
brrt in Rakudo_cont_decontainerize
jnthn bbkr_: Thanks
brrt 2012-07-359
old
cointainer.c, line 20 20:47
gdb is awesome
colomon jnthn: yow, top says the 12 meg file has used up 4.5 gigs of memory so far in parsing.
brrt anywhere i can post a backtrace? 20:49
jnthn gist?
brrt ok, data and _metadata of our pmc are null
20:50 flightrecorder left, flightrecorder joined
jnthn I'm guessing it's a PMCNULL 20:50
brrt probably 20:51
sorear colomon: p6 parsers are slowww
brrt basically, it derefs the data
colomon sorear: it seems like it's the memory usage rather than the raw speed which is getting me... 20:52
brrt i can't really figure out what opcodes cause it 20:53
20:54 birdwind1pbird left
bbkr_ rakudo: say try { 666; CATCH { }; } # does this follow a spec? IMO place of phaser definition should be irrelevant to block return value. 20:56
p6eval rakudo 870d18: OUTPUT«Nil␤»
20:56 benabik left 20:59 MayDaniel left
brrt gist of backstrace 21:01
also
gist.github.com/3854954
Mu() is PMCNULL?
jnthn No
brrt it /appears/ to be so 21:02
jnthn I think something somewhere is transforming it
21:03 MayDaniel joined
brrt added the pmc dump 21:03
to the gist
jnthn oh, it blows up trying to do a multi-dispatch
Probably to prefix:<~>
21:09 hash_table joined 21:13 cognominal left, fridim_ joined
brrt off 21:13
jnthn sleeps & 21:15
21:17 brrt left 21:19 cognominal joined
colomon oh, the good news here is I successfully read a 4 meg file in 18.5 minutes 21:21
colomon wonders how long Niecza will take... 21:22
21:23 cognominal left 21:24 cognominal joined 21:25 mtk left
sorear slurp() should be decently fast since it's not looping at the p6 level :D 21:26
21:26 mikemol left 21:27 mikemol joined
diakopter :D 21:30
diakopter wonders if there's a smiley for tongue-in-cheek
bbkr_ :􏿽xDF 21:31
diakopter not in my font
bbkr_ (german double s) 21:32
21:34 cognominal left
bbkr_ is phaser definition considered "a statement" considering a fact that it's tied to execution phase of a block rather than to position in this block? 21:34
21:35 colomon left 21:41 cognominal joined
bbkr_ rakudo: try { CATCH { }; die; }; say "alive" 21:43
p6eval rakudo 870d18: OUTPUT«␤ in block at /tmp/SogYHm1UM4:1␤␤»
bbkr_ hm, why is catched exception still causing code to die? 21:44
sorear because you didn't catch the exception. 21:48
inside of a CATCH behaves as a given-block
if the exception is not matched by any when, it is not caughrt 21:49
r: try { CATCH { default { say $_ } }; die; }; say "alive"
p6eval rakudo 870d18: OUTPUT«␤ in block at /tmp/NN9cdx7k3H:1␤␤alive␤»
21:54 benabik joined
bbkr_ r: try {CATCH { return 1;}; die; }; say "alive"; # then why this example works? 21:57
p6eval rakudo 870d18: OUTPUT«alive␤»
bbkr_ r: try {CATCH { 1;}; die; }; say "alive"; # and this does not, despite the fact that implicit block return value should behave in the same way in both cases? 21:58
p6eval rakudo 870d18: OUTPUT«␤ in block at /tmp/_lAUdcPMDl:1␤␤»
sorear bbkr_: because "return" isn't the same as implicit block return. 21:59
21:59 M_o_C left
TimToady but there's no 'sub' there in either case 22:00
22:00 fgomez left
TimToady np: try {CATCH { return 1;}; die; }; say "alive"; 22:01
22:01 fgomez joined
TimToady n: try {CATCH { return 1;}; die; }; say "alive"; 22:01
p6eval niecza v22-7-g7df6137: OUTPUT«alive␤»
TimToady n: try {CATCH { 1;}; die; }; say "alive";
p6eval niecza v22-7-g7df6137: OUTPUT«alive␤»
sorear n still does not do lexical returns
bbkr_ niecza bug?
TimToady there's nothing to return to, if CATCH is parsing as a block rather than a sub 22:02
and I'd tend to argue that phasers should be considered blocks rather than subs 22:03
22:04 MayDaniel left
bbkr_ so we have discrepancies between R and N here on "CATCH {1;}" case, which one behaves correctly? 22:04
sorear no, bbkr, the discrepancy is with "try" 22:05
diakopter rn: try {CATCH { 1; CATCH { say 55 }; die 4; }; die; }; say "alive";
sorear in niecza, "try" eats uncaught exceptions
always
p6eval rakudo 870d18: OUTPUT«(timeout)55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤55␤5
..niecza v22-7-g7df6137: OUTPUT«55␤alive␤»
22:05 cognominal left
diakopter 0_0 22:05
sorear diakopter: dying in a catch block is a bad idea 22:06
diakopter :)
22:07 wtw left, gugod left
diakopter still. why does it recurse 22:07
bbkr_ rephrasing the question: should try{} consume uncaught exception or not?
doy why is dying in a catch block a bad idea?
TimToady well, more like CATCH in a CATCH is a bad idea; the spec handles dying in a CATCH block
diakopter also, how can the inner CATCH go with the outer try, when there's no inner try 22:08
22:08 aharoni left
diakopter rn: try { try { try { die 66 } } }; say $! 22:09
p6eval niecza v22-7-g7df6137: OUTPUT«66␤»
..rakudo 870d18: OUTPUT«Any()␤»
sorear doy: because the exception hasn't really been handled at that point, CATCH blocks are closer to filters than real exception handlers
doy: the stack isn't unwound until the catch block returns 22:10
spider-mario I just discovered that perl5 actually supports string interpolation of arbitrary expressions
diakopter so, $! isn't lexical to the inner try in niecza, but it is in rakudo; which is right
spider-mario except for nested double quotes appearently
$ "${\('a' . 'b')}"
ab
a little more verbose than perl6’s {}, but still 22:11
TimToady @{['a' . 'b']} is usual formulation, if list context doesn't get in your way
spider-mario oh, I see 22:12
thanks
22:12 PacoAir left, cognominal joined
diakopter rn: CATCH { BEGIN { say $! } }; 22:13
p6eval rakudo 870d18: OUTPUT«Mu()␤»
..niecza v22-7-g7df6137: OUTPUT«Any()␤»
diakopter rn: say $!
p6eval rakudo 870d18, niecza v22-7-g7df6137: OUTPUT«Any()␤»
spider-mario it certainly doesn’t matter but ${} seems faster 22:14
Rate @ $
@ 1096074/s -- -81%
$ 5892226/s 438% --
but, hey, it’s string formatting after all. :p 22:15
it’s not like the user will notice, and it’s the expression inside that matter most anyway, I guess
matters* 22:16
diakopter wth:
rn: CATCH { say 66 }; die 4
p6eval niecza v22-7-g7df6137: OUTPUT«66␤Unhandled exception: 4␤ at /home/p6eval/niecza/lib/CORE.setting line 1437 (die @ 5) ␤ at /tmp/3QHNBoQizv line 1 (mainline @ 4) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4198 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4199 (module-…
..rakudo 870d18: OUTPUT«4␤ in block at /tmp/JRnkKpmCzM:1␤␤»
diakopter rn: sub a() { CATCH { say 66 }; die 4 }; try { a }
p6eval rakudo 870d18, niecza v22-7-g7df6137: OUTPUT«66␤»
cognominal r: for CORE.WHO.keys.sort { try { $_=eval $_; say $_.perl if $_ ~~ Code }}
p6eval rakudo 870d18: OUTPUT«(timeout)sub ANON_ENUM(*@args) { ... }␤sub AUTOTHREAD(&call, *@pos, *%named) { ... }␤sub AUTOTHREAD_METHOD($name, *@pos, *%named) { ... }␤sub COMP_EXCEPTION() { ... }␤sub DIVIDE_NUMBERS(Int:D \nu, Int:D \de, $t1, $t2) { ... }␤sub DUMP() { ... }␤sub DYNAMIC(\name) {… 22:17
cognominal a nice way to list subs in the CORE
22:18 wamba left
diakopter aha! : 22:18
rn: my $a; try { $a = sub { CATCH { say 66 }; die 4 } }; $a()
p6eval rakudo 870d18: OUTPUT«66␤4␤ in sub at /tmp/k15G15jPxa:1␤ in block at /tmp/k15G15jPxa:1␤␤» 22:19
..niecza v22-7-g7df6137: OUTPUT«66␤Unhandled exception: 4␤ at /home/p6eval/niecza/lib/CORE.setting line 1437 (die @ 5) ␤ at /tmp/l91QU6Y8l_ line 1 (ANON @ 5) ␤ at /tmp/l91QU6Y8l_ line 1 (mainline @ 10) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4198 (ANON @ 3) ␤ at /home/p6eval/n…
cognominal the try is necessary because of some stubbing
22:19 wtw joined
diakopter niecza dies 4; rakudo says 66 22:19
sorear: I have no clue which is right
oh wait.
they both do both.
<-- needs more coffee
cognominal sub incore($type) { for CORE.WHO.keys { try { $_=eval $_; say $_.perl if $_ ~~ Code and $_.signature.params>>.type >>~~>> $type; } } } ; incore(Version) 22:20
diakopter wait.
22:21 gugod joined, whiteknight joined
diakopter why do they both do both? does it catch it or not? 22:21
cognominal it should print core subs with an argument which match a $type, here Version, but somehow its list everything :(
diakopter why does it die 4 if it says 66
sorear diakopter: it doesn't catch.
22:21 bluescreen10 left
diakopter how does it print 66 22:21
sorear it enters the CATCH block, but you don't have anything in there to actually catch the exception. 22:22
22:22 flightrecorder left, FROGGS left
sorear exceptions are caught by when statements inside CATCH blocks 22:22
diakopter oh ...
cognominal ho, an array of boolean is not a boolean! 22:24
bbkr_ TimToady: speaking of phasers - should phaser definition affect return value of a block like in "say try { 123; CATCH{} }" example? Spec says that in this case "the return value of a block is the value of its final statement" while phaser position cannot be described as "final" because it is executed in certain phase, not at the end of the block (in this case). 22:25
spider-mario what d’you think it is? fortran? J? :)
22:27 _jaldhar joined
cognominal r: sub incore($type) { for CORE.WHO.keys { try { $_=eval $_; say $_.perl if $_ ~~ Code and [&] $_.signature.params>>.type >>~~>> $type; } } } ; incore(Version) 22:27
p6eval rakudo 870d18: OUTPUT«(timeout)sub term:<time>() { ... }␤sub term:<now>() { ... }␤»
22:28 jaldhar left
cognominal weird 22:28
sorear bbkr_: the phaser is syntactically a statement and is treated as 'Nil;' for most purposes 22:29
22:30 stopbit left
bbkr_ sorear: thanks, I was not sure if "statement" in this part of spec refers to syntax or something being executed 22:32
diakopter rn: CATCH { 4 } while 0 { say 5 }; say "alive" 22:33
p6eval niecza v22-7-g7df6137: OUTPUT«===SORRY!===␤␤Strange text after block (missing comma, semicolon, comment marker?) at /tmp/15hPT7beWC line 1:␤------> CATCH { 4 }⏏ while 0 { say 5 }; say "alive"␤␤Parse failed␤␤» 22:34
..rakudo 870d18: OUTPUT«alive␤»
diakopter how could it parse that
22:35 cognominal left
bbkr_ will try { "some sleep".get() } # good night 22:36
22:36 spider-mario left, bbkr_ left 22:41 MikeFair_ left 22:44 cognominal joined, _jaldhar left 22:46 MikeFair_ joined 22:54 nebuchadnezzar left 22:57 replore_ joined
diakopter rn: say try { say 5; return try { 4 } }; say "alive" 22:57
p6eval niecza v22-7-g7df6137: OUTPUT«5␤Unhandled exception: Illegal control operator: return␤ at /tmp/VknWX79dZh line 1 (ANON @ 9) ␤ at /tmp/VknWX79dZh line 1 (mainline @ 5) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4198 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4199 (…
..rakudo 870d18: OUTPUT«5␤»
diakopter rn: say try { die try { 4 } }; say "alive" 23:00
p6eval rakudo 870d18: OUTPUT«4␤ in block at /tmp/9TsxcR3LUH:1␤␤alive␤»
..niecza v22-7-g7df6137: OUTPUT«Any()␤alive␤»
diakopter why doesn't rakudo catch it 23:01
I mean.
why does niecza catch it
I mean. one of those. 23:02
sorear diakopter: "try" in niecza always catches, whether or not the CATCH does anything 23:03
diakopter oh. does rakudo do the wrong thing?
sorear *shrug* 23:04
23:10 drbean left
diakopter r: eval 'say ' ~ 'try ' x 900 ~ '66' 23:11
p6eval rakudo 870d18: OUTPUT«(timeout)» 23:12
diakopter n: eval 'say ' ~ 'try ' x 900 ~ '66'
p6eval niecza v22-7-g7df6137: OUTPUT«66␤»
diakopter n: eval 'say ' ~ 'try ' x 3000 ~ '66' 23:13
p6eval niecza v22-7-g7df6137: OUTPUT«(timeout)»
23:13 _jaldhar joined
diakopter so rakudo takes more than 10 ms per try 23:14
23:14 drbean joined, gfldex left
sorear diakopter: I think that you're seeing quadratic behavior 23:14
r: eval 'try 66; ' x 900 23:15
p6eval rakudo 870d18: OUTPUT«(timeout)»
sorear r: eval 'try { 66 }; ' x 900
p6eval rakudo 870d18: OUTPUT«(timeout)»
sorear huh
23:15 gfldex joined
sorear n: eval 'try { 66 }; ' x 3000 23:15
p6eval niecza v22-7-g7df6137: OUTPUT«(timeout)» 23:16
sorear maybe not.
diakopter niecza times out at at least 1750
n: eval 'say ' ~ 'try ' x 1750 ~ '66'
p6eval niecza v22-7-g7df6137: OUTPUT«(timeout)»
diakopter trying to bisect
like I did with rakudo 23:17
sorear n: eval 'say ' ~ 'try ' x 50 ~ '66'; say times[0]
p6eval niecza v22-7-g7df6137: OUTPUT«66␤1.180073␤»
sorear n: eval 'say ' ~ 'try ' x 500 ~ '66'; say times[0]
p6eval niecza v22-7-g7df6137: OUTPUT«66␤2.316144␤»
sorear n: eval 'say ' ~ 'try ' x 1500 ~ '66'; say times[0] 23:18
p6eval niecza v22-7-g7df6137: OUTPUT«66␤8.848553␤»
diakopter hard to say due to startup time
oh wait, what's times
sorear n: say (2.316 - 1.180) / 450; say (8.848 - 1.180) / 1450
p6eval niecza v22-7-g7df6137: OUTPUT«0.0025244444444444446␤0.0052882758620689651␤»
sorear perldoc -f times 23:19
times[0] is noncumulative user time
23:24 replore_ left 23:25 benabik left
diakopter rn: sub a() { eval 'return ' x 2000 ~ '5' }; say a 23:26
p6eval rakudo 870d18, niecza v22-7-g7df6137: OUTPUT«(timeout)» 23:27
23:27 replore joined 23:29 drbean left
diakopter sorear: is there a way to measure niecza's time to lookup a unicode property like alpha 23:29
23:30 replore left
diakopter or rakudo's for that matter 23:31
23:32 benabik joined
sorear diakopter: depends a bit on what you mean I guess 23:33
diakopter how long would it take to do a million
sorear when you do <:alpha> in niecza it embeds an inversion list into the regex
diakopter what's an inversion list 23:34
23:34 drbean joined
sorear actually it's a sorted list of intervals 23:34
does binary search to find the nearest interval, then checks membership
23:35 carillke joined 23:36 whiteknight left
diakopter what's the golfedest way to check alpha on an alpha char 23:37
in a regex let's say
23:39 drbean left
diakopter n: my $a = 'a'x 50000; say times[0]; $a ~~ /<alpha>*/; say times[0] 23:39
23:39 leont left
p6eval niecza v22-7-g7df6137: OUTPUT«10.148634␤10.24064␤» 23:39
diakopter hm, is <alpha> the right thing
I always forget the syntax 23:40
sorear <alpha> works but <:alpha> will be faster 23:41
23:42 MikeFair_ left
diakopter n: my $a = 'a'x 50000; say times[0]; $a ~~ /<:Letter>*/; say times[0] 23:45
p6eval niecza v22-7-g7df6137: OUTPUT«10.196637␤10.212638␤»
diakopter I can't construct large strings fast enough to fit within p6eval's timeout 23:47
sorear n: 'a' x 50000 23:48
p6eval niecza v22-7-g7df6137: ( no output )
sorear n: say ('a' xx 50000).join
p6eval niecza v22-7-g7df6137: OUTPUT«(timeout)»
sorear n: say [~] 'a' xx 50000
p6eval niecza v22-7-g7df6137: OUTPUT«aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa…
diakopter ahhhh neat 23:49
sorear [~] is using an internal StringBuilder
I think x is using the stupid quadratic algo
23:50 MikeFair joined
diakopter n: my $a = [~] 'a' xx 100000; say times[0]; $a ~~ /<:Letter>*/; say times[0] 23:50
p6eval niecza v22-7-g7df6137: OUTPUT«7.860491␤7.952497␤»
23:58 cognominal left