»ö« 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.
moritz \o 06:48
JimmyZ o/ 06:49
FROGGS preflex: ask TimToady Can you please look/reply on that? gist.github.com/FROGGS/6464777#comment-947906 07:47
preflex Consider it noted.
FROGGS thanks
FROGGS preflex: tell arnsholt interesting for you too: gist.github.com/FROGGS/6464777#comment-947906 07:57
preflex Consider it noted.
FROGGS if anybody else has a minute, I'd appreciate every comment/musing about that :o) 08:03
first I was thinking that there could be a pack/unpack implementation that work for rakudo *and* v5, but that does not seems to be the case
timotimo o/ 09:18
atroxaper timotimo o/ 09:19
FROGGS o/
atroxaper Do you know why i can't call .hash() with NQPMatch? 09:20
r: say Perl6::Grammar.parse('my $b=4;', :actions(Perl6::Actions.new())).hash;
camelia rakudo-jvm 2c40f6: OUTPUT«Could not find symbol '&Grammar'␤ in any find_method_fallback at gen/jvm/Metamodel.nqp:2607␤ in any find_method at gen/jvm/Metamodel.nqp:945␤ in any at gen/jvm/BOOTSTRAP.nqp:1658␤ in block at /tmp/P3pwhJAduo:1␤ in any eval at gen/jvm/stage2…»
..rakudo-parrot 2c40f6: OUTPUT«Could not find symbol '&Grammar'␤ in method <anon> at gen/parrot/CORE.setting:11987␤ in any at gen/parrot/Metamodel.nqp:2691␤ in any find_method_fallback at gen/parrot/Metamodel.nqp:2679␤ in any find_method at gen/parrot/Metamodel.nqp:946␤…»
atroxaper r: use Perl6::Grammar:from<NQP>; use Perl6::Actions:from<NQP>; say Perl6::Grammar.parse('my $b=4;', :actions(Perl6::Actions.new())).hash; 09:21
camelia rakudo-parrot 2c40f6: OUTPUT«Nominal type check failed for parameter '$got'; expected Any but got NQPMatch instead␤ in method BUILD at gen/parrot/CORE.setting:8359␤ in method new at gen/parrot/CORE.setting:8358␤ in method reify at gen/parrot/CORE.setting:8480␤ in method …»
..rakudo-jvm 2c40f6: OUTPUT«Nominal type check failed for parameter '$got'␤ in method BUILD at gen/jvm/CORE.setting:8334␤ in block at gen/jvm/CORE.setting:8451␤ in block at gen/jvm/CORE.setting:7106␤ in block at gen/jvm/CORE.setting:7106␤ in block at gen/jvm/CORE.se…»
timotimo NQPMatch doesn't know how to turn itself into a perl6 hash 09:30
FROGGS r: say nqp::hllize(Perl6::Grammar.parse('my $b=4;', :actions(Perl6::Actions.new()))).hash; 09:31
camelia rakudo-jvm 2c40f6: OUTPUT«Could not find symbol '&Grammar'␤ in any find_method_fallback at gen/jvm/Metamodel.nqp:2607␤ in any find_method at gen/jvm/Metamodel.nqp:945␤ in any at gen/jvm/BOOTSTRAP.nqp:1658␤ in block at /tmp/udqbZhEHSS:1␤ in any eval at gen/jvm/stage2…»
..rakudo-parrot 2c40f6: OUTPUT«Could not find symbol '&Grammar'␤ in method <anon> at gen/parrot/CORE.setting:11987␤ in any at gen/parrot/Metamodel.nqp:2691␤ in any find_method_fallback at gen/parrot/Metamodel.nqp:2679␤ in any find_method at gen/parrot/Metamodel.nqp:946␤…»
FROGGS r: use Perl6::Grammar:from<NQP>; use Perl6::Actions:from<NQP>; say nqp::hllize(Perl6::Grammar.parse('my $b=4;', :actions(Perl6::Actions.new()))).hash;
camelia rakudo-parrot 2c40f6: OUTPUT«Nominal type check failed for parameter '$got'; expected Any but got NQPMatch instead␤ in method BUILD at gen/parrot/CORE.setting:8359␤ in method new at gen/parrot/CORE.setting:8358␤ in method reify at gen/parrot/CORE.setting:8480␤ in method …»
..rakudo-jvm 2c40f6: OUTPUT«Nominal type check failed for parameter '$got'␤ in method BUILD at gen/jvm/CORE.setting:8334␤ in block at gen/jvm/CORE.setting:8451␤ in block at gen/jvm/CORE.setting:7106␤ in block at gen/jvm/CORE.setting:7106␤ in block at gen/jvm/CORE.se…»
atroxaper r: use Perl6::Grammar:from<NQP>; use Perl6::Actions:from<NQP>; say Perl6::Grammar.parse('my $b=4;', :actions(Perl6::Actions.new())).hash; 09:38
camelia rakudo-parrot 2c40f6: OUTPUT«Nominal type check failed for parameter '$got'; expected Any but got NQPMatch instead␤ in method BUILD at gen/parrot/CORE.setting:8359␤ in method new at gen/parrot/CORE.setting:8358␤ in method reify at gen/parrot/CORE.setting:8480␤ in method …»
..rakudo-jvm 2c40f6: OUTPUT«Nominal type check failed for parameter '$got'␤ in method BUILD at gen/jvm/CORE.setting:8334␤ in block at gen/jvm/CORE.setting:8451␤ in block at gen/jvm/CORE.setting:7106␤ in block at gen/jvm/CORE.setting:7106␤ in block at gen/jvm/CORE.se…»
FROGGS rp: use Perl6::Grammar:from<NQP>; use Perl6::Actions:from<NQP>; my Mu $x := Perl6::Grammar.parse('my $b=4;', :actions(Perl6::Actions.new())); say .Str for $x 09:54
camelia rakudo-parrot 2c40f6: OUTPUT«my $b=4;␤»
FROGGS rp: use Perl6::Grammar:from<NQP>; use Perl6::Actions:from<NQP>; my Mu $x := Perl6::Grammar.parse('my $b=4; $b++', :actions(Perl6::Actions.new())); say .Str for $x
camelia rakudo-parrot 2c40f6: OUTPUT«my $b=4; $b++␤» 09:55
timotimo so how do i find out how to fix my jvm implementation of charrange? 10:04
timotimo puts checks and throws before every array creation in the compiler 10:15
no help
at least in JASTToJVMBytecode 10:16
i wish it gave me a filename and line for that exception :( 10:26
i don't even know where i would have to put code to get that in the output 10:27
timotimo coaxed a line number out of jdb 10:32
timotimo processMethod calls visitMaxs from ASM with (0, 0) and *that* causes the negativeArraySizeException 10:34
great.
timotimo you try to pop an argument from the stack but there is no argument on stack :( 10:35
but i double-checked that everything is right :( 10:37
lizmat good *, #perl6! 10:47
timotimo hey liz :) 10:48
lizmat timotimo o/
lizmat just realized that (+=) for atomic updates is bogus
nwc10 moritz: thanks for the reality check on JVM star. 10:49
it's a bit :-/
in that, for within-the-community marketing reasons, my opinion (*opinion*) is that it's important to be able to deliver a JVM Star, to capitalise on the growing awareness of the concurrency features 10:50
timotimo yeah :( 10:51
nwc10 I have to apologise that I really have no time to help deliver on this. 10:52
timotimo come over to arnsholt's place to do housework for him, cooking and cleaning and walking the dog, then he'll have more time to spend on nativecall :D 10:53
nwc10 I don't have time to do that *either*
timotimo ;)
nwc10 however much I like walking dogs (at least, well behaved dogs)
dalek p/charrange_jvm: da40731 | (Timo Paulssen)++ | src/ (2 files):
first attempt at charrange on JVM
10:58
timotimo if anyone wants to help, i'm at my wit's end here 10:59
dalek ecs: 82ae35f | (Elizabeth Mattijsen)++ | S17-concurrency.pod:
Introduce "is cas" variable trait
lizmat timotimo: I'm afraid I'm more of a JVM noob than you
timotimo i've already tried the rubber duck method 11:00
FROGGS if there are any LHFs I would be proud to pick them... but... are there any? 11:01
timotimo FROGGS: i'm guessing you don't know terribly much about jvm bytecode? 11:02
FROGGS no :/ 11:03
nwc10 moritz: are you able to break out any of the Star blockers into "tickets others could do"?
FROGGS neither about Java/JVM in general
nwc10: that would be awesome!
having a concrete task would definitely help
nwc10 I'm not sure if I'm asking a stupidly obvious (or obviously pointless) question 11:04
but my suspicion is that some of this stuff is more scripting/automating than really JVM domain specific
timotimo moritz mentioned something about Configure.pl changes that need to happen
FROGGS 1) I guess the first thing would be to fiddle with the build system to somehow make a release at all 11:04
timotimo but nothing specific that i know of
nwc10 but that might mean that it needs more familarity/confidence with the build system
FROGGS 2) then we'd try to build modules, and fix those which are fixable without nativecall implementation 11:05
and "2)" should expose some LHFs 11:06
timotimo so i've been thinking: if the right qregex node existed, i could implement an optimizer for QRegex that turns a scan + a node that it "knows" how to negate into a smarter/faster scan. also, doing things like turning "...foo" into "search for foo and step 3 back" would also be possible, but the NFA creator must be told how to handle that 11:10
it would be best if i could just say "for the NFA, use these nodes, for creating the actual regex code, use these. they mean the same" 11:11
FROGGS like a QAST::WVal? 11:14
timotimo you mean QAST::Want?
FROGGS err yes
timotimo yeah, kind of like that 11:15
I guess that could totally be re-used for this! 11:16
FROGGS reused++ 11:17
timotimo hm, the "...foo" doesn't have to be a "search for foo, then step 3 back", it could also be "after scanning, look 3 ahead to see if there's “foo” there" 11:18
timotimo it's a bit less performant (because it doesn't use boyer-moore), but it would still be a little speed boost in that case, and it would probably be simpler to implement 11:18
FROGGS string_at_pos("foo", pos+3), yeah
(sortof)
timotimo yes :)
FROGGS yeah, that would work for everything that has a known width... 11:19
timotimo yeah
timotimo i'll just go ahead and implement negated simple charranges first instead 11:21
timotimo turns out no negated simple charranges actually exist in nqp nor rakudo 11:36
oh well. maybe some users will have regexes like that
timotimo negated charranges are also faster than their enumcharlist equivalents (20s vs 25s for 1000x 100_000 non-matching characters, 5s vs 17s for 1000x 100_000 matching characters) 11:46
timotimo (and that is if the non-matching character is found early in the enumcharlist. if i had used the latest, it would probably be a more dramatic difference) 11:51
FROGGS cool 11:52
very very cool!
lizmat timotimo++
timotimo :)
it doesn't make any difference at all in stage parse, though
FROGGS can we apply this technique to grammar rules like: token foo { \W "something" } ? 11:53
timotimo \W and friends are already specially implemented
FROGGS I guess stage parse is just about method call overhead... 11:54
ahh, k
nwc10 rakudo++ # sufficiently simple and clear that mere mortals can hack on the regex engine
FROGGS yeah, its design is quite awesome 11:55
(written in itself)++ 11:56
timotimo the debug output that spews the bytecode before compilation doesn't have the mnemonics >_< 11:57
r: (1, 2, 3, 4).hash.say 11:59
camelia rakudo-parrot 2c40f6: OUTPUT«("1" => 2, "3" => 4).hash␤»
..rakudo-jvm 2c40f6: OUTPUT«("3" => 4, "1" => 2).hash␤»
timotimo r: (1, 2, 3, 4).hash.invert.say
camelia rakudo-parrot 2c40f6: OUTPUT«2 => "1" 4 => "3"␤»
..rakudo-jvm 2c40f6: OUTPUT«4 => "3" 2 => "1"␤»
timotimo how do i tell lines() to operate on the first argument if it's given, otherwise on stdin? 12:00
ah, lines already does that
nice.
diakopter lizmat: there are atomic add instructions 12:07
timotimo sprunge.us/RjZD <- have some jvm bytecodes for you. the wrongness is somewhere around the only mention of charCodeAt 12:09
codePointAt* 12:10
colomon .u 𠀡 14:18
colomon is having fun writing Unicode tests in C++ 14:22
mathw sounds like the kind of thing you have to pay attention to 14:23
timotimo is having no fun trying to make his bytecodes work properly 14:24
colomon mathw: I discovered my text editor doesn't seem to handle codepoints greater than FFFF. 14:25
mathw: my code, on the other hand, hand no problem with that.
actually, the only bug I've found in my testing so far was failing to handle codepoints between 80 and FF. 14:26
and that's fixed.
colomon is now fantasizing about how beautiful this code would be in p6 14:27
dalek p: f8a27c0 | (Timo Paulssen)++ | src/vm/moar/QAST/QASTRegexCompilerMAST.nqp:
stub charrange for moarvm.
14:31
timotimo now nqp-moar should also build again.
pippo o/ #perl6
timotimo o/ pippo
colomon \o 14:32
pippo Hi timotimo. I hav seen you testing this earlier "(1, 2, 3, 4).hash.say"
timotimo yup
i needed a perl6 script that pretty-prints the debug output of the jvm bytecode creator. it doesn't have the mnemonics 14:33
so i copypasted the nqp::hash from the translator and changed nqp::hash(...) into (...).hash
pippo I have one question. (1, 2, 1, 4).hash.say does not return what I expect. 14:34
timotimo r: (1, 2, 1, 4).hash.say 14:34
camelia rakudo-parrot 2c40f6, rakudo-jvm 2c40f6: OUTPUT«("1" => 4).hash␤»
timotimo why not?
pippo timotmo I would expect somthing like my %h; %h.push(1, 2, 1, 4); instead 14:35
timotimo if you want these semantics, you will have to use .push instead
pippo r: my %h; %h.push(1, 2, 1, 4); say %h
timotimo i don't think the constructor should do that for you
camelia rakudo-parrot 2c40f6, rakudo-jvm 2c40f6: OUTPUT«("1" => [2, 4]).hash␤»
pippo If it should be like this. Then OK. 14:37
dalek p/charrange_jvm: 643eb6f | (Timo Paulssen)++ | src/vm/moar/QAST/QASTRegexCompilerMAST.nqp:
stub charrange for moarvm.
14:38
p/charrange_jvm: e5c7395 | (Timo Paulssen)++ | src/ (3 files):
implement negated charrange on parrot and jvm

jvm part is still b0rked, though
[Coke] spent a few moments trying to get star's modules-test to work, no luck yet.
timotimo bah, derp.
mathw colomon: the best advice about unicode is to let someone else i.e. an established unicode library handle it if at all possible 14:39
dalek p/charrange_jvm: 8f0d8f4 | (Timo Paulssen)++ | src/ (2 files):
first attempt at charrange on JVM
p/charrange_jvm: 8e4f995 | (Timo Paulssen)++ | src/ (3 files):
implement negated charrange on parrot and jvm

jvm part is still b0rked, though
mathw colomon: good way to get a headache
colomon mathw: as far as I know there is no available library for converting utf-8 to STEP-style pure-ASCII strings and vice-versa. 14:40
colomon is sorely tempted to write such a library in p6, but really should not stop doing lucrative contract work to do so. 14:42
mathw colomon: there will be soon, though? :)
colomon this code would be so much more beautiful in p6... 14:42
timotimo also probably 100_000x slower 14:43
Rotwang hi
mathw colomon: lots of code is more beautiful in P6 14:44
Rotwang can I create constant class attribute? e.g. constant $!foo = 5; doesn't work inside a class
colomon timotimo: I bet it would only be 100x slower at most
timotimo maybe on rakudo-jvm.
timotimo Rotwang: maybe our constant $foo = 5 may work? 14:45
colomon it's certainly a better idea, unless you intend to have a different constant $!foo for each class object. 14:46
Rotwang timotimo: indeed it did work, thanks
timotimo yw :)
timotimo is afk for a bit
pippo lizmat: ping 14:47
timotimo jnthn: it would be super swell if you could tell me what i'm screwing up in the charrange_jvm branch? 15:40
FROGGS thinks that timotimo++ meant that it would be totally champion or good-oh or hunky-dory or spiffing! 15:49
timotimo are the lookup tables for boyer moore string search cached? 16:18
hm, calculating them is done in C land on parrot, i bet
that's probably a small enough overhead to not need caching at all
timotimo i wonder if boyer-moore can be generalised to a subset of regex in a clever fashion 16:25
moritz thinks that timotimo looks at entirely the wrong places to optimize :( 16:26
timotimo probably :)
that's just things my mind comes up with randomly
colomon do we have good rakudo jvm profiles yet? 16:40
timotimo what's a profile?
timotimo er 16:48
i think i'm looking at a bug right here
looks like it's not honoring zerowidth if it matches \r\n 16:49
nqp: say("\r\na" ~~ /<?[\w]>'\r\na'/);
camelia nqp-moarvm: OUTPUT«Substring length (-6) cannot be negative␤Str␤»
..nqp-jvm, nqp-parrot: OUTPUT«␤»
timotimo nqp: say('\r\n'); 16:50
camelia nqp-moarvm, nqp-jvm, nqp-parrot: OUTPUT«\r\n␤»
timotimo nqp: say("\r\n");
camelia nqp-moarvm, nqp-jvm, nqp-parrot: OUTPUT«
timotimo nqp: say("\r\na" ~~ /<?[\w]>"\r\na"/);
camelia nqp-moarvm: OUTPUT«Substring length (-6) cannot be negative␤Str␤»
..nqp-jvm, nqp-parrot: OUTPUT«␤»
timotimo nqp: say("\r\na" ~~ /"\r\na"/);
camelia nqp-moarvm, nqp-jvm, nqp-parrot: OUTPUT«
timotimo ha! i has found a bug! 16:51
\o/
this one i can fix on the train ride tonight
Rotwang here is something I REALLY didn't expect:
Rotwang r: sub quux (Mu $foo) { say $foo.WHAT }; quux ( "a", ) 16:51
camelia rakudo-parrot 2c40f6, rakudo-jvm 2c40f6: OUTPUT«(Parcel)␤»
Rotwang r: sub quux (Mu $foo) { say $foo.WHAT }; quux( "a", )
camelia rakudo-parrot 2c40f6, rakudo-jvm 2c40f6: OUTPUT«(Str)␤»
timotimo spaces are significant 16:52
Rotwang now I see -__-
timotimo you can either write quux("a") or you can write quux "a"
if you write quux ("a") that's different if there are , in there
Rotwang perl6 is full of surprises [; 16:53
just spent around half an hour to find that because isa_ok from Test.pm didn't work 16:54
jaffa4 hi all 16:55
Is there true and false in Perl6?
timotimo r: say Bool.pick; 16:55
camelia rakudo-parrot 2c40f6, rakudo-jvm 2c40f6: OUTPUT«False␤»
hoelzro jaffa4: True 16:57
FROGGS .oO( use help; quux ( "a", "b" ) # would warn to keep beginners on trak )
hoelzro ;)
FROGGS .oO( maybe even: use any-help-there-is; )
timotimo er, i used \w instead of \n 17:03
nqp: say("\r\na" ~~ /<?[\n]>"\r\na"/);
camelia nqp-moarvm: OUTPUT«Substring length (-6) cannot be negative␤Str␤»
..nqp-jvm, nqp-parrot: OUTPUT«␤»
timotimo it's the same either way
jaffa4 so True
Rotwang FROGGS: if there was a book similar to the lama book it would make learning curve much flatter
timotimo nqp: say("\r\na" ~~ /"\r\na"/);
camelia nqp-moarvm, nqp-jvm, nqp-parrot: OUTPUT«
timotimo we should implement a perl6 module for this new and upcoming very efficient compression format: m68k.soup.io/post/365158786/For-exa...ld-like-to 17:14
diakopter lizmat++ # (is cas) # seems implementable efficiently (eventually) 17:16
timotimo diakopter: can you help with jvm bytecode generation? 17:19
FROGGS Rotwang: I agree, but nor I am a good writer nor do I know writers 17:20
timotimo is also not good at writing, he thinks 17:22
but it's a thing where you can get good with practice, i think
Rotwang timotimo: so practice your writing skills on new perl6 introductory book ^__^ 17:27
TimToady 's brane is completely jet-lagged from the hackers conference, even though it was only a 45-minute drive away--couldn't've had anything to do with staying up half the night gabbing... 18:16
preflex TimToady: you have 1 new message. '/msg preflex messages' to read it.
TimToady FROGGS: need more brane to think on it deeply, but how is sint32 different from int32? 18:25
(btw, I always backlog, so msging is redundant) 18:26
((I keep telling myself that redundancy is a good thing...)) 18:27
pippo TimToady: I have a question for you :-). If (1,2,1,4).hash is the hash representation of the list shall it return {"1"=>4 } or {"1" => [2,4]}? 18:29
FROGGS TimToady: sint32 has no special meaning there... replaced it by int32 18:30
timotimo Rotwang: i'm waiting for rakudo-js to become browser-able to make an interactive thingie happen 18:37
lue hello world o/ 18:38
FROGGS hi lue 18:39
jaffa4 panda, which files should I edit to add a module?
pippo o/ lue
TimToady pippo: normal hash only stringifies the key, though you can suppress that as well 18:43
TimToady oh, wait 18:43
bad line wrap so I didn't read your Q right
dalek osystem: a915ad1 | jaffa4++ | META.list:
Update META.list
18:44
TimToady it should be the first; only .push has the second semantics
pippo OK. Thank you
:-) 18:45
TimToady though how I misread [2,4] as "4" (even with the linewrap) is a mystery 18:46
probably a paris-in-the-the-spring moment 18:47
timotimo jetlagged brane probably
TimToady the two are not mutually exclusive :)
pippo :-) Time to tak a rest ?
TimToady there is never enough rest for a BDFL... :)
pippo BDFL ? 18:48
TimToady we have to plan most of our rest for after we've gone the way of all flesh :)
pippo :-) 18:50
o/ lizmat. 18:51
timotimo TimToady: i'm considering introducing QAST::Want to QRegex to signify that a section has a declarative half and an equivalent, but perhaps faster, non-declarative half. does that sounds like a terrible idea?
so, ...foo would be turned into whatever it was before for the NFA, but the WANT would have a second child "optimized" and a third would have a string-equal-at-offset assertion before the ... and the "foo" may then be dropped 18:52
TimToady is not familiar enough with QRegex to have a valid opinion
timotimo ah, that's all right then 18:53
it's basically mostly QAST::Regex nodes for everything
TimToady after a chat with Don Knuth over the weekend, maybe I should break down the barrier we erected in 2001 between me and the implementations, and plan to do some code review, and maybe I'll get a clue as to how to make things faster 18:56
timotimo you've seen plenty an optimization over your lifetime, i'm sure. that'll come in handy i bet :) 18:57
pippo \o/ perl6 faster !!!
TimToady well, after 13 years I doubt it would qualify as premature optimization :) 18:58
more likely, of course, is I'll merely discover that I've made it impossible :)
timotimo how do i .gist a string in nqp-land? :o
dalek p: 4df65de | (Timo Paulssen)++ | src/vm/parrot/QAST/Compiler.nqp:
don't move the cursor for zerowidth match of \r\n

Fixes #120511
19:06
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=120511
timotimo from my git log it doesn't look like we actually merged cursless into master! 19:08
moritz we didn't? 19:09
FROGGS ohh, ++TimToady 19:09
timotimo: we did 19:10
otherwise I'd still be at 140s instead of 125s for stage parse
moritz commit 1820f2eb7272cfeafb071b06cfa3e1d0efab2360, "Bump NQP_REVISION to get latest qregex cursor and closure fixes. jnthn++" 19:11
$ git merge origin/cursless
Already up-to-date.
and 03f81f8249120859c89bbaab6289cbb87e3c5c11 was the merge commit
FROGGS timotimo: what do you need the .gist of a string for? 19:12
timotimo i was wrong
timotimo FROGGS: testing :) 19:12
for science
moritz deletes the remote branch
FROGGS rp: say "hello".gist
camelia rakudo-parrot 2c40f6: OUTPUT«hello␤»
timotimo yeah, we actually did merge it in. i don't know why i thought otherwise
FROGGS how is that different to .Str ? 19:12
moritz but the NQP cursless branch is not merged
FROGGS O.o 19:13
moritz FROGGS: for strings not at all
FROGGS timotimo: see? :P --^
timotimo it^H^H^H^Hnqp: say("\r\n".Str);
escape sequences
FROGGS ahhh
timotimo the branch itself is not merged, but all the commits are in already it seems 19:14
FROGGS timotimo: I thought that just happens here with camelia
timotimo the JVM problem of my charrange bytecode generation is driving me mad 19:15
FROGGS TimToady: I too think that rakudo has settled enough for the most things already
timotimo i'm certain i didn't do anything wrong that i'd know of, but there must be something i'm missing
FROGGS timotimo: maybe you can use some sort of p5 script? eval "nqp-p -e '$@'" | perl -CSDL -E 'while(<>) { s/[\r\n]/\x{2424}/g; print }' 19:19
put an improved version in a nqp-debug.pl or so 19:20
timotimo enh 19:24
diakopter TimToady: mwhaha you can start with reviewing some iteration(s) of the p5 interop; oh wait you mostly did that :P 19:26
FROGGS I have suh a thing that invokes perl6 with -Mv5
timotimo bad reception here :( 19:28
i've figured out something great
the qregex NFA stuff is generated in the actions of P6Regex 19:29
that means when i get my grubby hands on it in the Optimizer, i can do whatever transformations i want and as long as they're safe, the NFA won't be affected
nwc10 TimToady: I'm not familiar with the reason(s) why a barrier was a good thing (if I knew, I've forgotten, sorry), but do those reasons still apply?
TimToady "we already know how you implement things, and we don't want Perl 6 implemented that way" :) 19:30
timotimo 7 19:31
TimToady but it was also good that I did not pick winners over that time
nwc10 the latter was my guess - at this time it seems that there is one viable winner
and whilst someone might write a better Perl 6 in the future, for the next couple of years what matters is Rakudo's completeness, performance and uptake. And without *that*, there likely won't be a future where someone writes a better Perl 6 19:32
TimToady though I still use niecza when something needs to run fast
nwc10 but the former also applies - at this time, it would be hard to subvert the Rakudo implementation into using a lexer, yacc, smoke and mirrors 19:33
written in C
TimToady nor would I want to :)
FROGGS nwc10++ # exactly
moritz and increasing the bus factor of rakudo also wouldn't hurt 19:34
nwc10 I know it's selection bias, but I keep spotting the benefits of a self-hosting implementation
FROGGS .oO( love the language - hack the language ) 19:35
moritz
.oO( love the language - hack the compiler )
19:37
TimToady diakopter: if you want more review, iterate it s'more :P 19:43
diakopter ok 19:48
lue I can only think that add_parent isn't adding the right something, but I'm not sure -> gist.github.com/lue/c0923d2d1498fce7f19c 19:50
PerlJam TimToady: If you wanted to remove the implementation barrier, you could kill two birds by starting to maintain niecza yourself :) 20:10
moritz lue: try to add a debug print in add_parent 20:11
diakopter
.oO( the bird known as niecza )
moritz and why use an array of parents when you only want to support one parent class? 20:12
lue "Null PMC access in get_string()" (I remember this being an issue yesterday. That I can't see anything once it's put in a QAST::Var)
moritz: the exercises told me to :) 20:13
That is, I can print the value of $<ident>[1] in the action method, but whatever's passed to the PHPish is completely unprintable :( 20:14
lue hates how he has to keep bugging everybody about these exercises... 20:18
timotimo switches to another train 20:19
lue: i also didn't do every exercise in the course :(
PerlJam lue, timotimo: what course? 20:20
(I'm guessing that thing that lizmat and jnthn put together)
lue timotimo: the only thing I've not done so far is fiddling with the terminators so that I don't need semicolons where I shouldn't need them. I've been insistent on doing everything else so far though :)
PerlJam: it's a "get to know NQP" course from Edument. Don't have a link to it on-hand though. 20:21
jnthn evening, #perl6 20:22
FROGGS hi jnthn 20:23
jnthn yawns
timotimo good for you :) lue++ 20:29
timotimo is about to create a regex optimizer 20:30
lue timotimo: well, I've got an annoying NULL PMC ACCESS to deal with right now :P . (The supplied rubyish example doesn't have inheritance, and NQP's own ClassHOW plays with these C3MRO thingys way more complex than what I'm doing.) 20:31
timotimo try using jvm
jnthn That probably just turns it into a null pointer exception :P 20:32
timotimo: You still having problems with code-gen on JVM? 20:33
timotimo yes 20:34
ASM is trying to tell me i pop too much by raising a negative stay size expression 20:35
jnthn yes, it's error reporting is crap
timotimo excuse the fat fingered typing
jnthn common issues are different stack sizes either side of a conditional
timotimo i've tried to make sure that all paths through the different gotos end up with 0 stuff left on the stack and may have made a mistake there 20:36
sprunge.us/RjZD - this is an excerpt, the one i generated
lue timotimo: yeah, I'll see if I still have nqp-j around
jnthn timotimo: tbh, I'd probably find it easier to read the patch to the code-gen :) 20:37
timotimo it's up in the charrange_jvm branch
see how i have an extra label to pop & fail? 20:38
lue Well, nqp-j doesn't give me Null PMC, but instead a "expecting 0..0 args, got 1" error with no useful backtrace :/ 20:41
timotimo i should be able to turn a concat with a single child into the single child, right?
jnthn + $il.append($I2L); 20:42
+ $il.append($DUP);
That looks wrong
I think that'll split the long on the stack 20:43
A long counts as two stack slots, so needs duplicating with dup2, and popping with pop2
I think a 20:44
$il.append($POP);
may also be vulnerable
jnthn timotimo: On the concat question - yes, though it isn't an optimization really othr than simplifying the tree, which I guess may make ohter opts easier... 20:50
jaffa4 Could anyone tell me how to write tests for rakudo? 20:51
for a panda module, sorry?
flussence Just make a t/ directory next to the lib/ one and panda automatically looks in there for *.t files and runs them 20:53
jaffa4 how is it possible that my tests run if I run it but it does not run properly if the panda install runs it? 20:56
flussence hmm 20:56
maybe it's running a different rakudo to your normal one 20:57
or there's some cwd-dependent library that it can't find on its own 20:58
jaffa4 it is the same rakudo 20:59
FROGGS how does it fail?
jaffa4 Cannot fetch object from non-existent serialization context BFC5F3FB5D2F2BA20A28211EC7F849095B9FC154
FROGGS O.o 21:00
then precompilation is broken
FROGGS like that the dependency of something is newer then the module using it 21:00
jaffa4 there is no dependency 21:01
FROGGS weird 21:02
timotimo thank you jnthn i did not know about thebextra size ofbthe longs onbthebstack 21:03
i I'll implementbthe fix in half an hour out so 21:04
jnthn timotimo: not by typing like that you won't :P 21:06
FROGGS r: say 12345679 * 0.00001; say 12345679 * 1e-5 21:10
camelia rakudo-parrot 2c40f6: OUTPUT«123.45679␤123.45679␤»
..rakudo-jvm 2c40f6: OUTPUT«123.45679␤123.45679000000001␤»
FROGGS scratches his head
jnthn Rat vs Num > 21:11
colomon who'd win?
moritz floating point FTL
TimToady maybe we should rename Num to Approximation :)
jaffa4 FROGGS: I think I know the reason... pir version of the same perl 6 program does not run 21:13
FROGGS jaffa4: so compilation itself breaks your code :/ 21:14
TimToady we could also change 'e' to 'timesapproximatelytentothepowerof'
jaffa4 FROGGS: I guess so
moritz you generally can't run p6 scripts compiled to pir 21:15
jnthn Yes, but this is a module I thought? 21:15
FROGGS thought so too
jaffa4 a module which is broken by compilation 21:16
moritz yes, happens 21:17
moritz there are known cases, like precompiling a constant array 21:17
and some others that have been observed but not yet narrowed down
timotimo jnthn: i have my laptop keyboard now, now i can implements! :) 21:18
jnthn \o/
jaffa4 and now? 21:19
FROGGS r: say 1e-5* 0.33 # jnthn: is that fixable? when yes: any pointers where to start fixing this up?
camelia rakudo-jvm 2c40f6: OUTPUT«3.3000000000000006E-6␤»
..rakudo-parrot 2c40f6: OUTPUT«3.3e-06␤»
moritz jaffa4: and now you don't precompile, or you try to fix the precompilation bug
jaffa4: or you figure out what triggers the bug, and avoid the trigger 21:20
jaffa4 How do I stop panda from precompiling?
FROGGS jaffa4: would be nice to know what triggers it btw
dmol Hello! How should perl6-pod parser behave on wrongly typed p6 docs like bpaste.net/show/148751/ ? Should it die?
jaffa4 probably using Perl6::Grammar from nqp 21:21
timotimo dmol: it would be nice if it had a nice error message instead
FROGGS jaffa4: can you bisect it? 21:22
jaffa4 bisect it?
FROGGS jaffa4: comment out about 50% of the code, recompile, test 21:23
dmol timotimo: I use (p5) Perl6::Pod for docs generating. Now it just silently says nothing, and includes "=end code" into the code block
FROGGS jaffa4: if the error is still there, omment out another 50% of the remaining lines, recompile, test
jaffa4: if it succeeds, activate some of the last lines again... 21:24
dmol timotimo: that causes me a lot of troubles, when I mistyped for p6::slides, when image was totally ommited.
dmol timotimo: so, if nothing other is predefined, it is better to die 21:24
FROGGS dmol: we are the wrong guys when it comes to P5 modules
timotimo :(
jnthn: java.lang.ArrayIndexOutOfBoundsException: - what could this mean now? :) 21:25
jaffa4 bye all, leaving
FROGGS jaffa4: o/
jnthn Though we should check if Rakudo's Pod parser gets a better error on it ;)
timotimo: Similar kind of issue
FROGGS dmol: IMO dying with a proper error message is never bad
dmol FROGGS: is there p6 module for generation pdf slides (latex/beamer) ? 21:26
timotimo you are right of course, i missed a POP2 replacement
jnthn timotimo: ah :) 21:26
timotimo when this works i'll be pretty happy
jnthn The whole pop vs pop2 thing on JVM is quite the annoyance.
timotimo still won't make a noticable difference in rakudo setting parsing performance, sadly 21:27
jnthn No, we've few ranges there
FROGGS dmol: no idea, maybe ask masak if here is nothing: modules.perl6.org/
timotimo i wonder what automatic optimization will help there at all
jnthn timotimo: Probably using the NFA to entirely eliminate certain rule calls, perhaps. 21:28
timotimo we've already made a lot of headway there recently, didn't we? do you recall any rules that should be, but aren't declarative?
dmol FROGGS: thanks! 21:29
timotimo iirc, making something declarative that previously wasn't can break things, because you want to have control over what takes part in the LTM etc etc
jnthn timotimo: No, I more meant (this is tricky and I ain't suggesting doing it) that after the NFA matches, it may be able to tell us "don't bother re-scanning this bit" or so 21:32
timotimo oh
i thought that already happens because it has no fate to do that part?
or did you mean re-using data from the NFA to populate captures? 21:33
lizmat is finally back and checking backlog
TimToady timotimo: there are several components to that; you can pretty easily skip declarative bits that don't capture 21:34
jnthn timotimo: It re-evaluates the rule that is chosen, it just uses the NFA to decide which path to take
timotimo ah, mhm
jnthn timotimo: And we can probably find ways to do a bit more than that. :)
TimToady there are implementations that can use declarative match to find captures, but in my experience they tend not to scale well
we may also be able to avoid doing some of the recursive descent, and just fake the tree that we know would've been returned had we done it 21:35
but that's hard to integrate with the actions
timotimo the jast dumper cannot dump jasts :( 21:36
TimToady another possible approach is to not actually rescan the declarative part unless we know that the captured bits have to be pulled out, since a certain amount of capture is accidental
but doing that lazily might be more overhead than it's worth; dunno unless someone tries it 21:37
TimToady still thinks that the fastest way to "cheat" would be to recognize when we have a stable grammar and store an equivalent YACC grammar, then call back into the recursive descent only if we get a failure that need a better error message 21:38
that's not likely a trivial undertaking either
there may be more that can be done in terms of moving hash entries into native attributes 21:40
but we really just need better profiling, including of factors that cut across the way normal profilers divide up the problem 21:43
TimToady since a bad algoritm that is replicated in many places will often not show up on routine-based profiler 21:44
timotimo yeah :(
TimToady either half my keys aren't working, or half my neurons, or both 21:45
TimToady goes to take a nap to see if it eliminates the second possiblility
FROGGS so what happens next? The Optimomizer mutates into The Profilimo? 21:47
FROGGS .oO( hey! don't expect more at that time'o'day! ) 21:48
timotimo haha 21:50
timotimo well, i can measure no performance benefit from my charrange implementation 21:52
on the jvm, that is
so maybe the jit already optimizes the hell out of that operation
FROGGS yeah, quite possible 21:54
timotimo well, since it works i'll go ahead and push it
FROGGS timotimo++ 21:55
dalek p: 098f5b7 | (Timo Paulssen)++ | src/ (2 files):
first attempt at charrange on JVM
21:56
p: b3d6cb7 | (Timo Paulssen)++ | src/ (3 files):
implement negated charrange on parrot and jvm

jvm part is still b0rked, though
p: a015b4a | (Timo Paulssen)++ | src/vm/jvm/QAST/Compiler.nqp:
longs occupy 2 slots in the stack. jnthn++
itz act.yapc.eu/lpw2013/talk/5150 21:57
lizmat itz++
tadzik ooh
makesme want to go to lpw :) 21:58
lizmat tadzik: there's still time!
dalek p: 7b9f357 | (Timo Paulssen)++ | src/vm/parrot/QAST/Compiler.nqp:
actually, don't try to find \r\n for zerowidth at all.
tadzik lizmat: yeah, but my calendar is pack()ed :( 21:59
FROGGS timotimo: does that fix the issues about <?[\w]> we had in curseless? 22:00
timotimo oh
we did?
FROGGS yeah
timotimo well, it maybe does! 22:01
FROGGS cool :o)
tadzik oh well, I'll look at flights :P
FROGGS something I can try tomorrow :o)
timotimo actually, is \w word or whitespace?
FROGGS word
timotimo in that case, no, it shouldn't fix anything
FROGGS ahh, newline, I see
timotimo after a \r\n is matched for zerowidth, the cursor was mistakenly moved ahead one ^Hcharacter 22:02
lue welp, I converted @!parents to $!parent, and now I get Attribute '%!methods' not declared at line 47, near ");\n }\n\n" :/ 22:03
timotimo :(
lue I think I somehow b0rked NQP's object system
lue &
tadzik globally!?
timotimo on the whole wide world?!?! :o 22:04
dalek ecs: fdc1356 | (Elizabeth Mattijsen)++ | S17-concurrency.pod:
Missed one more Supply role -> Publish class
22:05
FROGGS timotimo: the not converted <?before's contain \s :o)
timotimo ah! 22:06
in that case, i may have fixed it! :)
but only on windows, where there's \r\n?
jnthn Early night because exhaust &
timotimo gnite jnthn, and thanks very muc hagain!
lizmat gnight jnthn! 22:07
dalek p: 24b421b | (Timo Paulssen)++ | src/vm/parrot/QAST/Compiler.nqp:
use eqat for "\r\n" check instead of substr+iseq
22:18
dalek p: 5f497cb | (Timo Paulssen)++ | src/vm/moar/QAST/QASTRegexCompilerMAST.nqp:
moarvm had the \r\n bug, too.
22:38
lizmat n: class A {method new {say "A.new"}}; role x { method new {say "role.new"; nextsame}}; A.new does x 22:40
camelia niecza v24-98-g473bd20: OUTPUT«A.new␤Unhandled exception: Cannot use 'does' operator with an immutable object␤ at /home/p6eval/niecza/lib/CORE.setting line 1536 (die @ 5) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1469 (infix:<does> @ 8) ␤ at /tmp/pH3b7WUaaM line 1 (m…»
lizmat r: class A {method new {say "A.new"}}; role x { method new {say "role.new"; nextsame}}; A.new does x 22:41
camelia rakudo-parrot 2c40f6, rakudo-jvm 2c40f6: OUTPUT«A.new␤»
lizmat I sorta expected this to say "role.new" first before saying A.new
woolfy1 Thanks to the donation made by the Perl 6 Community! act.yapc.eu/lpw2013/news/1117 22:45
London Perl Workshop. Looking forward to meet you all there.
Juerd Wonderful, woolfy1 :) 22:46
woolfy1 Happy!
Juerd I do wonder how incredibly expensive the LPW must be, with this many sponsors! 22:47
lue Is there a non-WHAT way to learn the type of an NQP variable, or should I try nqp-m (if it exists)? 22:53
(nqp-j for some reason refuses to run the examples :/)
lizmat lue: sorry, too tired to think straight 22:54
which reminds me, I should go to bed&
lue That's alright :)
lizmat o/
woolfy1 LPW hosts 250+ attendees, it is free (as in you pay nothing to attend), also coffee/tea/snacks (not a free lunch), there are 5 tracks. The combination does ask for some funding. 22:57
Oh, that was meant for Juerd.
Juerd Oh, wow, I didn't know it was that big, and free.
Now I want to go there. :P
woolfy1 act.yapc.eu/lpw2013/stats (now already almost 200) & act.yapc.eu/lpw2012/stats (300+) 22:58
This will be our 3rd LPW. It's not just the workshop, the topics, the people. London is also magnificent. The British Museum, for example, is an immensely large museum, free entrance, mummies, fossils, the Rosetta Stone! 22:59
The British Museum dawrfs our Dutch Rijksmuseum. 23:00
s/dawrfs/dwarfs/ 23:04
arnsholt The British Museum is kind of ridiculous 23:08
Also, full of stuff the British have stolen throughout the centuries =)
woolfy1 Maybe ridiculous that it is full of stolen stuff, but on the other hand, it is magnificent. 23:13
Why ridiculous??? 23:14
arnsholt Just so massive 23:15
Not ridiculous bad, just insanely much stuff =) 23:16
woolfy1 I dunno why massice means ridiculous. Apollo rockets, pyramids, Betelgeuze, universe: not ridiculous at all.
Ack. lizmat and I went for a whole day and all we say was the Egyptian wing and bits of the Chinese section. But I saw mummies and the Rosetta Stone! 23:17
oh well, it's not Perl 6. In time, Perl 6 will be massive as well.
Bed &
bye
timotimo its memory requirements already are :) 23:31
lue My problems were apparently caused by forgetting to "mangle" the class name :) [which in the PHPish sample means "name" should actually be "::name"]
timotimo oh well...
lue (now it's back to easier debugging tasks) 23:32
pippo gnight #perl6 23:57