»ö« 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:20
Guest34330 left,
fgomez left
|
|||
diakopter | r: .Str.say for ('abcdefg' ~~ /(a) [ (bc) (d) | .* (ef) ] .* (g)/).list | 00:20 | |
p6eval | rakudo 81402b: OUTPUT«aefuse of uninitialized value of type Any in string context in block <anon> at /tmp/Nlit50o0Kp:1g» | ||
diakopter | well, that's different from before at least | 00:21 | |
00:27
fgomez joined
00:33
xinming joined
00:36
xinming_ left
00:44
lichtkind left
00:50
stephenlb joined
|
|||
[Coke] | if gen-parrot checks out a fresh copy, there's no need to realclean. minor time sink. | 00:55 | |
01:03
spaceships left
01:09
drbean left
01:11
drbean joined
01:12
[particle] joined
01:15
[particle]1 left,
tokuhiro_ joined
01:18
libertyprime left
01:19
libertyprime joined
01:39
drbean left,
drbean joined
|
|||
dalek | kudo/nom: 6ab416b | pmichaud++ | src/ (4 files): Get binder to recognize QRPAs; let nqp::istype and nqp::islsit inherit from nqp. |
01:54 | |
02:09
drbean left
02:10
scott_ joined,
scott_ is now known as Guest24159
02:11
drbean joined
02:22
fgomez left
02:30
am0c joined
02:31
fgomez joined
02:39
drbean left
02:41
drbean joined
02:43
tyatpi left
03:03
tokuhiro_ left
03:17
xinming left
03:21
xinming joined
03:25
qelseio joined
|
|||
qelseio | hello | 03:26 | |
sorear | Hello. | 03:31 | |
03:39
drbean left
03:40
drbean joined
03:42
libertyprime left,
libertyprime joined
03:56
libertyprime left
03:57
libertyprime joined
04:01
libertyprime left,
libertyprime joined
|
|||
sjohnson | hi | 04:08 | |
04:09
drbean left
04:10
drbean joined
04:14
adu joined
|
|||
adu | what does "Method 'match' not found for invocant of class 'String'" mean? | 04:16 | |
04:16
qelseio left
|
|||
diakopter | context? | 04:16 | |
adu | I'm calling parse() on a grammar | 04:17 | |
diakopter | do you have any inline code in the rules? | ||
(I don't remember from when I read through your xml grammar) | |||
adu | this is a new grammar :) | 04:18 | |
sorear | adu: It means you, or something you called, tried to invoke .match() on a raw Parrot String object | ||
raw Parrot Strings don't have a .match method. hence, it failed. | |||
adu | i suppose I should paste | ||
pastebin.com/xSpeq9r7 | 04:19 | ||
sorear | Why is that error message confusing? How can it be improved? | 04:20 | |
adu | first of all, I can't find any inline code | ||
secondly, I never call a .match method explicitly, so I don't know what else to look for | |||
sorear | Did you see that it has a backtrace? | ||
hmm. I am getting confrontational. I should drop this. | 04:21 | ||
adu | there is no backtrace | ||
diakopter | hugme: hug all | ||
hugme hugs all | |||
adu | :) | ||
sorear | what, no backtrace? :| | ||
adu | indeed | ||
diakopter decides to run it | 04:22 | ||
adu | I have a file with "say Go::Grammar.parse(@*ARGS[0]);" in it | ||
and "use Go::Grammar;" | |||
that's how I'm running it | |||
diakopter | what are you supplying to args | 04:23 | |
go go gadget grammar | |||
04:23
am0c left
|
|||
adu | diakopter: '1' | 04:23 | |
since I'm using TOP { <literal> } it should match <int_lit> | 04:24 | ||
diakopter | haha | ||
I get Error while reading from file: Malformed UTF-8 string | |||
adu | hmm | ||
diakopter | my text editor must have failed | ||
when pasting | |||
adu | I have some funky sym<<bla>> | ||
04:24
cognominal_ left
|
|||
sorear | adu: try "" ~ @*ARGS[0] | 04:25 | |
adu | hmm nope | ||
04:26
cognominal joined
|
|||
diakopter | sigh. the utf8 encoding thing is better, but now rakudo is failing to parse the file at line l. itz Cornfuzzled | 04:27 | |
sorear | .u l | 04:28 | |
phenny | U+006C LATIN SMALL LETTER L (l) | ||
diakopter | ok. I give up. switching to linux rakudo | ||
sorear: oops :) | 04:29 | ||
sigh. even more fail. | 04:31 | ||
I blame pastebin. | |||
adu: well, your use of ** is incorrect | 04:34 | ||
at statement_list | |||
** is for (un)bounded repetition with a range | 04:35 | ||
adu | that might be it | ||
diakopter | use ]* % ';' | ||
adu | I commented out everything until it gave a different error | ||
diakopter | except I tried it, and even more fail | ||
adu | ws should be \s* | ||
not \s | |||
hehe :) | |||
sorear | diakopter: what adu has is the old syntax, rakudo ought to still support it | 04:36 | |
diakopter: also, x**y is x+ % y, not x* % y | |||
adu | thanks for helping :) | 04:37 | |
it works now | |||
this will be my third Go parser | 04:38 | ||
diakopter | sorear: did you test that or are you just saying "rakudo ought to still support it" because... why? | ||
adu | evolving languages should freeze a feature set at some point, what features get frozen are a matter of debate | 04:39 | |
diakopter | r: say "5,3" ~~ /\d ** ","/ | ||
p6eval | rakudo 6ab416: OUTPUT«===SORRY!===Quantifier quantifies nothing at line 2, near " \",\"/"» | ||
04:39
drbean left
|
|||
adu | I'm quite happy with % | 04:39 | |
diakopter | n: say "5,3" ~~ /\d ** ","/ | ||
p6eval | niecza v18-6-ge52d6c3: OUTPUT«Potential difficulties: Unsupported use of atom ** "," as separator; nowadays please use atom+ % "," at /tmp/47fC34_vex line 1:------> say "5,3" ~~ /\d ** ","⏏/#<match from(0) to(3) text(5,3) pos([].list) named({}.hash)>» | ||
diakopter | sorear: see rakudo's error above | 04:40 | |
mr confrontational; lulz :P | |||
adu | lol | ||
04:41
drbean joined
|
|||
dalek | p: 6be8ad9 | pmichaud++ | / (2 files): Fix count overrun bug in QRPA.splice. |
04:43 | |
diakopter | adu: I reproduced your Method 'match' not found for invocant of class 'String' error | 04:47 | |
pmichaud: parrot leakage here I think | |||
adu | diakopter: i see | 04:50 | |
diakopter | adu: for amusement I'll try to golf the error | 04:51 | |
sorear | 'String' is a PMC type, not a Perl 6 type | ||
it *has* to be Parrot leakage. | |||
diakopter | oh! it's failing while parsing the input file | ||
the grammar file | 04:52 | ||
bug | |||
sorear | oh? | ||
diakopter | r: gist.github.com/2893670 | 04:53 | |
p6eval | rakudo 6ab416: OUTPUT«===SORRY!===Method 'match' not found for invocant of class 'String'at /tmp/e_WwfLP01C:162» | ||
diakopter | now to golf it | 04:54 | |
rule expression_list { [ <statement> | <?> ]+ % ';' } | 04:58 | ||
is killing it | |||
how, I have no diea | |||
idea | |||
rule statement_list { [ <statement> | <?> ]+ % ';' } | |||
is just fine | |||
04:58
thou joined
|
|||
diakopter | wth | 04:59 | |
oh. | 05:00 | ||
expression_list is in there twice | |||
r: grammar G { rule a { }; rule a { } } | |||
p6eval | rakudo 6ab416: OUTPUT«===SORRY!===Method 'match' not found for invocant of class 'String'at /tmp/1gme0LaT2i:1» | ||
diakopter | there you go, golfed | 05:01 | |
where's masakbot when you need him | |||
adu | hmm | 05:02 | |
that is strange | |||
diakopter | adu: you have too many expression_list | ||
adu | so i doo | 05:03 | |
oops | |||
05:04
birdwindupbird joined
|
|||
moritz | \o | 05:13 | |
diakopter | moritz: bug above | ||
howdy | |||
moritz | jnthn++ # blog | ||
bugs before waking up :/ | |||
diakopter | it's minor | 05:16 | |
quiet easy fix I'm sure | |||
pmichaud | dalek flood coming up | 05:23 | |
diakopter | pmichaud: watch this | 05:24 | |
r: grammar G { rule a { }; rule a { } } | |||
p6eval | rakudo 6ab416: OUTPUT«===SORRY!===Method 'match' not found for invocant of class 'String'at /tmp/edQM_CEFt3:1» | ||
diakopter | little fun one adu just found | ||
pmichaud | diakopter: sure, looks like issue with rule method definitions | ||
diakopter wants to see dalek flood | 05:25 | ||
pmichaud | here it comes.... | ||
05:25
dalek left
|
|||
diakopter | hee | 05:25 | |
pmichaud | bye dalek :-) | ||
moritz waves | |||
sorear | that was me deactivating it for safety :p | ||
05:26
dalek joined,
ChanServ sets mode: +v dalek
|
|||
pmichaud | anyway, that merges in the new MapIter code. I still have some improvements to make, but I can do it in the nom branch instead of subbranches | 05:26 | |
moritz | pmichaud++ | 05:27 | |
pmichaud | there are also still a couple of pieces that are too eager, but I can track them down and clean them up also | ||
diakopter | r: grammar A { token a { }; token a { } } | 05:28 | |
p6eval | rakudo 6ab416: OUTPUT«===SORRY!===Method 'match' not found for invocant of class 'String'at /tmp/TaBvwFfZ6b:1» | ||
diakopter looks at github.com/rakudo/rakudo/commit/20...e70fead616 | |||
pmichaud | anyway, time for sleep here... will hack more tomorrow | 05:34 | |
adu | sweet! | 05:42 | |
pastebin.com/hJWLrmsV | |||
diakopter: oh, so ** had nothing to do with it, it was only the repeated definition? | 05:45 | ||
diakopter | yeah, but ** doens't work either | ||
for me | |||
adu | so both | ||
right that was an error in my code as well | 05:46 | ||
anyways, the grammar is working quite well now | |||
diakopter | why can I not find a link to create a rakudobug | ||
sorear | because you can't create rakudobugs using the Web | ||
send mail to [email@hidden.address] | 05:47 | ||
any content will be automatically (subject to greylisting) be filed as a bug against rakudo | |||
05:49
xinming left,
xinming joined
05:50
cognominal_ joined
05:51
xinming left
05:53
cognominal left
05:55
xinming joined,
pupoque left
06:00
kaleem joined
06:09
drbean left
06:11
drbean joined
|
|||
adu | hmm | 06:28 | |
how do I code these rules? golang.org/ref/spec#Semicolons | |||
diakopter | study how STD.pm6 does it with terminator | 06:30 | |
there is a special case for following } | |||
adu | hmm | 06:31 | |
diakopter: on line 4907? | 06:39 | ||
06:39
drbean left,
drbean joined
|
|||
jnthn | morning o/ | 06:40 | |
pmichaud++ # MapIter merge | 06:41 | ||
adu | morning :) | 06:42 | |
06:57
fridim_ joined,
kresike joined
|
|||
kresike | good morning all you happy perl6 people | 06:57 | |
06:59
stephenlb left
|
|||
sorear | heya, kresike | 07:00 | |
kresike | sorear, o/ | ||
07:09
drbean left,
drbean joined
07:12
cognominal___ joined,
adu left
07:14
cognominal_ left
07:23
adu joined
07:27
GlitchMr joined
07:31
brrt joined
07:40
thou left
07:42
NamelessTee joined
07:47
fgomez left
|
|||
diakopter | lol. on github just now: Great repository names are short and memorable. Need inspiration? How about finna-be-octo-dangerzone. | 07:52 | |
07:57
cognominal___ left
07:58
cognominal joined
|
|||
GlitchMr | I actually wonder how many people followed GitHub suggestions :P | 08:03 | |
It's obvious joke, but still | |||
freezing-ninja | |||
ok... | |||
08:04
fridim__ joined
|
|||
GlitchMr | ... actually... I think I will name my Clippy for PHP "fuzzy-ninja" | 08:04 | |
diakopter | the joke wasn't obvious to me; I thought it was algorithm fail | 08:06 | |
GlitchMr | None of those names is serious | 08:07 | |
are* | |||
diakopter | is | ||
None is singular :) | |||
GlitchMr | ... well... whatever | ||
08:07
adu left
|
|||
diakopter | because none is short for not one | 08:08 | |
08:09
drbean left
08:11
drbean joined
|
|||
GlitchMr | Repositories names aren't that important (aside of username.github.com one), but it's easier to say "check repository hello-world" than "check repository jgdsigjeiowf-vrejhjg-erhjjdewr" | 08:13 | |
cosimo | GlitchMr: thanks for your pull requests | 08:15 | |
GlitchMr | I'm going to send pull requests like that to every repository :P | ||
cosimo | I see automation possibilities :) | ||
08:16
cognominal_ joined
|
|||
tadzik | GlitchMr: glad you're doing that :) | 08:18 | |
GlitchMr | I'm currently at "gge" | ||
tadzik | it would make sense to drop panda support for the repo-url thing once all the important stuff is updated | ||
GlitchMr | github.com/masak/gge/pull/1 | 08:19 | |
:) | |||
08:19
cognominal left
|
|||
tadzik | GlitchMr++ | 08:20 | |
GlitchMr | lol... GitHub for Windows stopped working | ||
It works like this: "fork", "clone in Windows", create branch "panda-badge", fix "META.info", make commit, send pull request | 08:22 | ||
Oh, and publish | 08:25 | ||
I forgot to mention that | |||
08:26
cognominal_ left
08:27
cognominal joined
|
|||
GlitchMr | github.com/perl6/Pod-To-HTML/ | 08:27 | |
I guess that I can skip pull request on that :P | 08:28 | ||
08:30
not_gerd joined
|
|||
not_gerd | hello, #perl6 | 08:30 | |
is it possible to compile .pm -> .pir from within a script (ie without spawning a new Rakudo process)? | 08:31 | ||
brrt | euh... | 08:34 | |
this is a moritz question | |||
not_gerd | ;) | 08:35 | |
brrt | but, yeah, probably, if you can get access to the rakudo compiler object | ||
which is what the compreg() opcode does for parrot | 08:36 | ||
but, i'm not sure rakudo gives you access | |||
not_gerd | well, there's always pir:: | ||
not_gerd needs to figure out how pir::compreg__Ps('perl6') works | 08:37 | ||
or rather, if it does what I want | |||
brrt | probably, yes | ||
but i'm not sure if the registered compiler is rakudo or perl6 | |||
compreg returns either NULL or a HLLCompiler | 08:38 | ||
not_gerd | pir::compreg__Ps('perl6') return a Perl6::Compiler | ||
^returns | 08:39 | ||
08:39
drbean left
|
|||
brrt | oh, that will work | 08:40 | |
can you find the relevant documentation? | |||
not_gerd | brrt: probably | ||
08:40
drbean joined
|
|||
brrt | great :-) | 08:41 | |
not_gerd | just hope that they are up to date ;) | 08:43 | |
moritz | you'll probably need to read the sources | 08:55 | |
not_gerd | Type check failed in assignment to '$comp'; expected 'Mu' but got 'Perl6::Compiler' | 08:56 | |
moritz | try binding | 08:57 | |
r: my $comp := pir::compregs__Ps('perl6') | |||
p6eval | rakudo 809b8f: OUTPUT«use of uninitialized value of type Mu in string context in any <anon> at src/gen/BOOTSTRAP.pm:104use of uninitialized value of type Mu in string context in any <anon> at src/gen/BOOTSTRAP.pm:104===SORRY!===error:imcc:syntax error, unexpected PREG, expecting … | ||
moritz | r: my $comp := pir::compreg__Ps('perl6') | ||
p6eval | rakudo 809b8f: ( no output ) | ||
moritz | you must emulate the stuff that's in src/main.nqp | ||
brrt | no synopsis for getting the compiler yet? | 08:58 | |
moritz | ie create an @*END_PHASERS dynamic var, then invoke $comp.command_line | ||
not_gerd | my current problem is that I can't use Perl6::Grammar (which I assume is NQP) from Perl6 | 08:59 | |
I don't know how to get at hll-config as well, as it seems to be lexical | 09:01 | ||
moritz | r: my $comp := pir::compreg__Ps('perl6'); my $args := nqp::list; nqp::push($args, 'lib/Test.pm'); $comp.command_line($args, :encoding<utf8>); | 09:05 | |
p6eval | rakudo 809b8f: OUTPUT«> Land der Berge, Land am Strome,CHECK FAILED:Undefined routine '&Berge' called (line 1)Undefined routine '&Strome' called (line 1)Undefined routine '&am' called (line 1)Undefined routine '&Land' called (lines 1, 1)Undefined routine '&der' called (line 1)> L… | ||
moritz | wow, that seems to have invoked the REPL or something | 09:06 | |
strike | |||
the first element in the array to command_line is supposed to be the executable name | 09:07 | ||
brrt | thats dangerous stuff, really | 09:08 | |
moritz | not_gerd: gist.github.com/2894632 | ||
not_gerd: that's only a first shot, you still need to separate the lists for the END phasers and so on | |||
not_gerd: but you don't need to 'use' Perl6::Grammar etc. separately, because main.nqp already does that | 09:09 | ||
tadzik | moritz: why's there both filename.pl and A.pm? | ||
09:09
drbean left
|
|||
moritz | tadzik: because HLL::Compiler expects the executable name at index 0 | 09:09 | |
not_gerd | moritz: figured that out as well - it seems the compiler object that compreg returns is already set up | 09:10 | |
09:10
drbean joined
|
|||
tadzik | okay | 09:10 | |
moritz | and with RAKUDO_MODULE_DEBUG=1 ./perl6 -I. -e 'use A;' I could verify that it actually loads A.pir | 09:11 | |
tadzik | it that much faster compared to run("perl6 bla bla")? | 09:12 | |
I guess startup time isn't that painful nowadays | |||
not_gerd | tadzik: I'm still working on a dwimmy ufo version | 09:14 | |
I'm making it portable by not using shell built-ins but perl6 code | 09:15 | ||
tadzik | I see | ||
not_gerd | so compiling to pir means starting a perl6 process which immediately shells out to perl6 | ||
and that's... not that fast ;) | |||
tadzik | yeah. I guess Panda could use that too | ||
and if it did, we could quickly test if it doesn't break anything | 09:16 | ||
not_gerd | now, I need a replacement for rm -rf | ||
tadzik | and if that is possible, then we could be pretty close to Pod module | ||
not_gerd | how do I get a list of files in a directory? | ||
tadzik | not_gerd: doesn't Shell::Command have it? | ||
github.com/tadzik/perl6-File-Tools...Command.pm it's close to having it :) | 09:17 | ||
moritz | not_gerd: dir() | ||
r: say dir() | |||
p6eval | rakudo 809b8f: OUTPUT«star src .bashrc nom-inst1 test3.pl .profile t nom-inst2 nom-inst examples Makefile .gitignore lib test2.pl rakudo p1 VERSION simple-tests .perlbrew std obj main.pl .lesshst nom niecza test.pl .cpanm .bash_logout run TODO Pugs.hs dalek LICENSE .ssh License-MS-PL.tx… | ||
09:17
aindilis` joined
|
|||
jnthn | Mmmm... .ssh | 09:18 | |
;) | |||
tadzik | ew, evalbot allows dir()? :) | 09:19 | |
moritz | it does. And the ssh keys are public anyway :-) | ||
r: say dir('.ssh/') | |||
p6eval | rakudo 809b8f: OUTPUT«authorized_keys» | ||
09:19
stepnem_ joined
|
|||
jnthn | ah, no private key in there. Phew :) | 09:20 | |
09:20
not_gerd left,
sunnavy_ joined
09:21
jtpalmer_ joined,
pnu joined,
clkao_ joined,
stepnem left,
aindilis left,
sunnavy left,
jtpalmer left,
pnu_ left,
stepnem_ is now known as stepnem
09:22
not_gerd joined,
sunnavy_ is now known as sunnavy
|
|||
brrt | say cat('.ssh/authorized_keys') | 09:23 | |
09:23
not_gerd_ joined
09:24
not_gerd_ left
|
|||
moritz | r: say slurp(.ssh/authorized_keys') | 09:25 | |
p6eval | rakudo 809b8f: OUTPUT«===SORRY!===Unable to parse postcircumfix:sym<( )>, couldn't find final ')'» | ||
moritz | r: say slurp('.ssh/authorized_keys') | ||
p6eval | rakudo 809b8f: OUTPUT«ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDPEkT8qXSWd/OFKrJAM8pEW0gmpvDkvcY0vdOdez+EKXGdsbhz/NnmVcjOfJo11VbZAn3ADlj4W+O3z1ocduCAPiUNAF9o4x9d0tUaSHtqZQZf5ltP60Zvc+Q7liMwmfnBhRSvErJghj/ZTsJdk55cONLkkp0mxkTXjm9bEWjCzn1JAzNcOcv0qnkvaBu/42+SQy652Q5E4AE6HHwKkPIQATUVArlb4DqKF… | ||
09:25
cognominal_ joined
|
|||
brrt | ah, i didn't dare to do that | 09:26 | |
moritz | it's not a secrect | ||
if you can deduce private SSH keys from public keys you'll have a lot more interesting targets than feather3 :-) | 09:27 | ||
09:28
cognominal left
|
|||
brrt | fair enough | 09:28 | |
if i could do that, i'd be in jail or have millions, whichever comes first | 09:29 | ||
tadzik | why not both? :) | ||
jnthn | Because spending your millions in jail is hard work? :) | 09:32 | |
tadzik | ;) | 09:33 | |
kresike | well he didn't say anything about spending the money :) | ||
brrt | getting in jail while you have millions is hard wor, too | ||
s/wor/work/ | |||
but thats another discussion entirely | |||
jnthn | lunch & | 09:36 | |
09:39
drbean left
09:40
drbean joined
09:59
daxim joined
|
|||
dalek | osystem: 71caa9d | GlitchMr++ | SHELTER/ (6 files): Update old modules to fit current module specifications. |
10:00 | |
tadzik | I think most of those old modules should be removed from the ecosystem | 10:04 | |
(some already are) | |||
GlitchMr | lol... GitHub for Windows randomly crashes | 10:08 | |
That newest update was buggy | |||
10:09
brrt1 joined
10:10
brrt left
10:11
am0c joined
|
|||
GlitchMr | ok | 10:12 | |
Unless I have missed some module, after everybody will accept Pull Request, every module should have panda badge | |||
tadzik | great | 10:13 | |
GlitchMr++ | |||
not_gerd | portable version of my dwimmy ufo reimplmentation: gist.github.com/2891292 | 10:14 | |
GlitchMr | github.com/GlitchMr | 10:15 | |
also my repository list is full of forked Perl 6 modules | |||
:P | |||
not_gerd | for some reason, it has extremely slow startup | ||
might be the multi MAIN dispatch... | 10:16 | ||
time ./ufo --foo | |||
^that's a failed dispatch, and it takes nearly 2 seconds | |||
GlitchMr | And after that, we could remove those panda badges... until something will change again :P | ||
tadzik | not_gerd: may it be that you're doing many things in mainline, before MAIN appears | 10:17 | |
not_gerd | Stage parse: 1.317 | 10:19 | |
moritz | not_gerd: multi dispatch generally isn't slow | ||
(compared to many other operations in rakudo, that is) | 10:20 | ||
not_gerd | t's the parsing of the script... | ||
time to rebuild the toolchain and see if it helps... | 10:21 | ||
wolverian | 10:22 | ||
moritz | I think we should throw out proto | ||
it has bitrotted, and panda works and is maintained | |||
10:22
JimmyZ joined
|
|||
tadzik | +1 | 10:24 | |
10:24
Guest24159 left
|
|||
moritz | (and it was a prototype anyway :-) | 10:25 | |
dalek | osystem: 941013f | moritz++ | META.list: remove proto it has bitrotted, and thorougly replaced by panda |
||
moritz | so | ||
my exception grant is finished | |||
my ufo rewrite is finished and waits for review | 10:26 | ||
tadzik | congratulations! | ||
moritz | the question is: what to hack on next? | ||
I'll throw around some ideas | |||
tadzik | if I were you I'd take a look at P5 interop | ||
moritz | 1) focus on the book and other documentaiton effort (not too much fun) | ||
2) more DBIish work (maybe add niecza compatible backends?) | 10:27 | ||
JimmyZ | thread! | ||
phenny | JimmyZ: 04 Jun 16:38Z <TimToady> tell JimmyZ irclog.perlgeek.de/perl6/2012-06-04#i_5680738 is right behavior, except that the compiler should really warn about "Useless use of 3 in a sink context" | ||
moritz | 3) precompilation stuff (though jnthn kinda seems a better fit for that; OTOH he seems a better fit for nearly all topics... :-) | 10:28 | |
4) start to partially port Mojo to p6 | |||
JimmyZ | or Dancer? | 10:29 | |
moritz | 5) trace module loading, so that compile time excpetions can show the module loading backtrace | ||
p5 interop and threads aren't topics for me | 10:30 | ||
mojo vs dancer: I happen to have used Mojolicious | |||
JimmyZ doesn't know what's the difference between Mojo and Dancer | 10:31 | ||
10:31
stepnem left
|
|||
moritz | and it has zero dependencies, so it's a much better target for porting | 10:31 | |
tadzik | Dancer limits itself to what Mojolicious::Lite provides | ||
JimmyZ | Dancer has some dependencies? | ||
tadzik | yes | ||
moritz | JimmyZ: deps.cpantesters.org/?module=Dancer...;os=any+OS | 10:32 | |
tadzik | small ones, I happen to live without them when working on Bailador (so far) | ||
10:33
stepnem joined
|
|||
moritz | the other reason is that Mojo provides lots of basic web stuff that we need anyway at some point (cookies, HTTP classes, DOM tree handling etc.) | 10:33 | |
anyway, those were just some ideas | 10:34 | ||
and I feel torn | |||
not_gerd | Stage parse: 1.610 | 10:35 | |
moritz | documentation would probably the most beneficial, but least fun, and rather frustrating | ||
JimmyZ | I'm +1 to 4 _ and 5 ) | ||
not_gerd | another regression in parsing speed :( | ||
JimmyZ | 4 ) and 5 ) | ||
moritz | not_gerd: is that after updating to newest rakudo? | 10:37 | |
not_gerd | moritz: yes | ||
moritz | not_gerd: iirc jnthn said he had some ideas for optimizations | 10:38 | |
tadzik | moritz: Mojo seems a worthwhile goal. I keep finding myself reimplementing lots of HTTP stuff for various projects, so having them collected, well-written and maintained will be awesome | 10:39 | |
moritz | "Web depends on HTTP::Daemon, which was not found in the ecosystem" | ||
eeks | |||
tadzik | it's been like this for ages :) | ||
not_gerd | is it possible to precompile scripts? | ||
naive approach fails with Missing or wrong version of dependency 'src/Perl6/World.pm' | 10:40 | ||
brrt1 thinks it is, perl6 --target=pir or something? | |||
moritz | not_gerd: no | ||
GlitchMr | nr: m:g/42/ | 10:41 | |
p6eval | rakudo 809b8f: OUTPUT«No such method 'match' for invocant of type 'Any' in block <anon> at /tmp/T6999f0ZHt:1» | ||
..niecza v18-6-ge52d6c3: OUTPUT«===SORRY!===Regex modifier g not yet implemented at /tmp/F2IOGCToyB line 1:------> m:g⏏/42/Unhandled exception: Check failed at /home/p6eval/niecza/boot/lib/CORE.setting line 1401 (die @ 5)  at /home/p6eval/nie… | |||
GlitchMr | Should I use .subst() hack for niecza? | 10:42 | |
'string'.subst(/(42)/, { @arr.push(0) }, :g) | |||
... or perhaps I should use grammars... yeah... that's the solution | 10:43 | ||
colomon | GlitchMr: if you just want to find all the examples of a regex in a string, use .comb | 10:51 | |
ie 'string'.comb(/42/) | |||
GlitchMr | Works :) | 10:52 | |
10:53
stepnem left
|
|||
GlitchMr | Also, does Perl 6 contain something like .charAt() in JavaScript? | 10:54 | |
'abc'.charAt(0) // returns 'a' in JavaScript | |||
colomon | rn: say "This is a test of comb".comb(/<[aeiou]>./).perl | ||
p6eval | rakudo 809b8f: OUTPUT«("is", "is", "a ", "es", "of", "om").list» | ||
..niecza v18-6-ge52d6c3: OUTPUT«["is", "is", "a ", "es", "of", "om"].list» | |||
not_gerd | GlitchMr: you mean a borken implementation of Unicode? | 10:55 | |
hopefully, not | |||
GlitchMr | No | ||
I just mean character at position | |||
But not using UTF-16 :P. I want full Unicode support for that. | |||
colomon | GlitchMr: note that comb by default returns strings, if you want Match objects from it you need to use the :match argument | 10:56 | |
GlitchMr | I could use .substr(), but I don't know fast it would be. And it probably wouldn't be idiomatic. | ||
10:56
crab2313 joined
|
|||
colomon | GlitchMr: for charAt, use substr | 10:56 | |
10:59
stepnem joined
|
|||
GlitchMr | nr: my @a = 1, 2; my @b = 3, 4; @b ,= @a; print @a | 11:02 | |
p6eval | rakudo 809b8f, niecza v18-6-ge52d6c3: OUTPUT«12» | ||
GlitchMr | nr: my @a = 1, 2; my @b = 3, 4; @b ,= @a; print @b | 11:03 | |
p6eval | rakudo 809b8f, niecza v18-6-ge52d6c3: OUTPUT«3412» | ||
GlitchMr | :) | ||
... | |||
But actually... I think I should use .push() instead of ,= operator | |||
tadzik | it's probably more idiomatic, yes | 11:04 | |
11:09
fridim__ left,
drbean left
11:11
drbean joined
11:18
brrt1 left
11:30
kaleem left,
JimmyZ left,
JimmyZ joined
11:32
crab2313 left
|
|||
colomon | nr: my @a = 1, 2; my @b = 3, 4; @b ,= @a; print @b.perl | 11:36 | |
p6eval | niecza v18-6-ge52d6c3: OUTPUT«[3, 4, 1, 2].list» | ||
..rakudo 809b8f: OUTPUT«Array.new(3, 4, 1, 2)» | |||
11:36
cosimo left
|
|||
colomon is kind of charmed by ,= | 11:36 | ||
11:39
am0c left,
drbean left
11:40
drbean joined
11:42
am0c joined,
plobsing left
11:43
plobsing joined
11:44
fridim_ left
|
|||
jnthn | Yes, altnfa merge slowed parsing down a bit | 11:45 | |
Correctness first, then speed. I improved correctness. Now I can focus on speed. :) | |||
11:45
skids left
|
|||
jnthn | moritz: 5 would be cool; 4 also. 3 - feel free to golf any pre-comp issues but beyond that point I can probably deal with them faster. | 11:46 | |
moritz: Another possible task is versioned modules | |||
moritz: Also, trying to work out the import lists for require | 11:47 | ||
But there's spec issues there... | |||
I will also try to wire up some stuff for a :Perl5 attribute on regexes in the next few days, for anybody who wants to hack in this area. | 11:50 | ||
12:00
tyatpi joined
12:06
att joined
12:09
drbean left
12:11
drbean joined
12:16
cognominal_ left
12:21
crab2313 joined
12:22
cognominal joined
12:23
_jaldhar left,
am0c left
12:36
sergot joined
|
|||
sergot | hi o/ ! :) | 12:37 | |
kresike | hi sergot o/ | ||
12:39
drbean left
12:40
xinming left,
grondilu joined
12:41
drbean joined
|
|||
grondilu | p6: module life { constant meaning is export = 42 }; import life; say meaning; | 12:41 | |
p6eval | rakudo 809b8f: OUTPUT«===SORRY!===CHECK FAILED:Undefined routine '&meaning' called (line 1)» | ||
..niecza v18-6-ge52d6c3: OUTPUT«===SORRY!===Action method statement_control:import not yet implemented at /tmp/6njLz1Q4jO line 1:------> nt meaning is export = 42 }; import life⏏; say meaning;Unhandled exception: Unable to resolve method statement… | |||
..pugs: OUTPUT«***  Unexpected "is" expecting ":" or "(" at /tmp/f7WBHMHEDW line 1, column 32» | |||
grondilu | can't I export constants? | ||
moritz | grondilu: not yet | ||
jnthn: import lists for require also sounds itneresting | 12:42 | ||
grondilu | also, I finally managed to overwrite &infix:<+> but it's kind of weird. I must export one of the multi, but if I write a proto then I can not add normal integers anymore. | 12:43 | |
r: module A { class Foo {}; multi infix:<+>(Foo, Foo) { Foo } }; say Foo + Foo; say 1 + 1; | 12:44 | ||
p6eval | rakudo 809b8f: OUTPUT«===SORRY!===CHECK FAILED:Undefined routine '&Foo' called (lines 1, 1)» | ||
moritz | right; if you write a proto, it replaces the existing infix:<+> | ||
grondilu | but the weird thing is that all the multi get exported, even if I wrote 'is export' on only one. | 12:45 | |
r: module A { class Foo {}; multi infix:<+>(Foo, Foo) is export { Foo }; multi infix:<*>(Foo, Foo) { Foo } }; import A; say A::Foo + A::Foo; say 1 + 1; | |||
p6eval | rakudo 809b8f: OUTPUT«Foo()2» | ||
grondilu | r: module A { class Foo {}; multi infix:<+>(Foo, Foo) is export { Foo }; multi infix:<*>(Foo, Foo) { Foo } }; import A; say A::Foo + A::Foo; say A::Foo * A::Foo; say 1 + 1; | 12:46 | |
p6eval | rakudo 809b8f: OUTPUT«Foo()use of uninitialized value of type Foo in numeric context in block <anon> at /tmp/q61YjDR6NH:1use of uninitialized value of type Foo in numeric context in block <anon> at /tmp/q61YjDR6NH:102» | ||
grondilu | ahh | ||
I don't get it. I had a different result yesterday. | |||
r: module A { class Foo {}; multi infix:<+>(Foo, Foo) is export { Foo }; multi infix:<*>(Foo, Foo) is export { Foo } }; import A; say A::Foo + A::Foo; say 1 + 1; | 12:48 | ||
p6eval | rakudo 809b8f: OUTPUT«Foo()2» | ||
moritz | erm, what? it picked up the correct candidate for + but the wrong one for * ? | ||
grondilu | seems so. Weird, huh? | ||
hang on. I forgot the '*' | 12:49 | ||
moritz | r: module A { class Foo { }; multi infix:<*>(Foo, Foo) is export { Foo }; import A; say A::Foo * A::Foo | ||
grondilu | r: module A { class Foo {}; multi infix:<+>(Foo, Foo) is export { Foo }; multi infix:<*>(Foo, Foo) is export { Foo } }; import A; say A::Foo + A::Foo, A::Foo 1 + 1; | ||
p6eval | rakudo 809b8f: OUTPUT«===SORRY!===Cannot import symbol '&infix:<*>' from package 'A', since it already exists in the lexpad» | ||
rakudo 809b8f: OUTPUT«===SORRY!===Confusedat /tmp/_QYXCv7P0Z:1» | |||
grondilu | r: module A { class Foo {}; multi infix:<+>(Foo, Foo) is export { Foo }; multi infix:<*>(Foo, Foo) is export { Foo } }; import A; .say for A::Foo + A::Foo, A::Foo * A::Foo, 1 + 1; | ||
p6eval | rakudo 809b8f: OUTPUT«use of uninitialized value of type Foo in numeric context in block <anon> at /tmp/y6GIC55bsN:1use of uninitialized value of type Foo in numeric context in block <anon> at /tmp/y6GIC55bsN:1Foo()02» | ||
moritz | r: module A { class Foo { }; multi infix:<*>(Foo, Foo) is export { Foo } }; import A; say A::Foo * A::Foo | ||
p6eval | rakudo 809b8f: OUTPUT«Foo()» | ||
moritz | r: module A { class Foo { }; multi infix:<+>(Foo, Foo) { Foo }; multi infix:<*>(Foo, Foo) is export { Foo } }; import A; say A::Foo * A::Foo | 12:50 | |
p6eval | rakudo 809b8f: OUTPUT«Foo()» | ||
PerlJam | good * #perl6 | 12:53 | |
sergot | o/ :) | 12:55 | |
moritz | r: require Test <&ok &done>; | ||
p6eval | rakudo 809b8f: OUTPUT«===SORRY!===require with argument list not yet implemented. Sorry. at /tmp/3OrIxqx4HG:1» | ||
pmichaud | good morning, #perl6 | 12:56 | |
jnthn | pmichaud! \o/ | ||
12:57
cognominal left,
cognominal_ joined
|
|||
grondilu | my Digest module (git@github.com:grondilu/libdigest-perl6.git) has two sub modules: Digest::sha256 and Digest::rmd160. How should I name the repo to conform to the ecosystem. Would digest-sha256-rmd160 be fine? | 12:59 | |
GlitchMr | nr: print (@("\x00" .. "\x1F")).perl | ||
p6eval | rakudo 809b8f: OUTPUT«(timeout)» | ||
..niecza v18-6-ge52d6c3: OUTPUT«("\x[0]", ).list» | |||
moritz | grondilu: there's no mandatory naming scheme | 13:00 | |
GlitchMr | How can I make byte ranges? | 13:01 | |
moritz | 'modulename' or 'perl6-modulename' seems rather common | ||
r: say (0..0x1F)>>.chr.perl | |||
p6eval | rakudo 809b8f: OUTPUT«("\x[0]", "\x[1]", "\x[2]", "\x[3]", "\x[4]", "\x[5]", "\x[6]", "\x[7]", "\b", "\t", "\n", "\x[b]", "\x[c]", "\r", "\x[e]", "\x[f]", "\x[10]", "\x[11]", "\x[12]", "\x[13]", "\x[14]", "\x[15]", "\x[16]", "\x[17]", "\x[18]", "\x[19]", "\x[1a]", "\x[1b]", "\x[1c]", "\… | ||
GlitchMr | :) | ||
I like this solution | |||
@characters.push((.substr(0, 1).ord .. .substr(3, 4).ord)».chr); | 13:03 | ||
Seems to work... | |||
pmichaud | moritz: (what to work on) I've been wondering what it would take to start a 'perldoc -f' equivalent. | ||
grondilu | r: say chrs ^0x20 | 13:04 | |
p6eval | rakudo 809b8f: OUTPUT«␀  | ||
tadzik | grondilu: how about Digest? | ||
GlitchMr | Wait... | ||
there is chrs function? | |||
Nice :) | |||
moritz | pmichaud: it's probably not too hard to get a basic version started | 13:05 | |
pmichaud: but it needs to be extended to methods too | |||
grondilu | tadzik: there is no 'perl6' reference in 'Digest', but I guess I could just name it p6-digest. | ||
pmichaud | moritz: aye, methods too | ||
grondilu | GlitchMr: yes, there is. And there is also ords. | ||
tadzik | grondilu: please don't put references to Perl 6 in module names | ||
there's no point in naming everything Perl6-Something in Perl 6 module directory | 13:06 | ||
grondilu | tadzik: but it could mess up with my other repos on Github :( | ||
moritz | tadzik: but it might make sense for a repo name if you want a 'Digest' module in another programming language | ||
PerlJam | pmichaud, moritz: a smarter-than-perldoc that doesn't need -f to find functions/methods would be nice. | ||
tadzik | oh, repo name | ||
Woodi | afternoon ppls | 13:07 | |
tadzik | I though we're talking about the module name | ||
in META.info and so | |||
moritz | PerlJam: the problem with smart things is that they tend to go wrong when there are multiple things with the same name | ||
tadzik | grondilu: I used to name my module repos perl6-Something on github | ||
Woodi | is maybe Storable or something with freeze to disk/load later builtinto p6 ? | ||
grondilu | Woodi that would be great. And also File::Map. | 13:08 | |
Woodi cpanning | |||
tadzik | grondilu: so regarding your question: there's no policy regarding repo names and the ecosystem. Ecosystem does not really care about repo names, only module names, as I noted | ||
13:08
Psyche^ joined
|
|||
PerlJam | moritz: so it needs to be even smarter! :) | 13:09 | |
grondilu | tadzik: ok so I'll keep 'libdigest-perl6' since I don't know how to rename a repo :) | ||
tadzik | grondilu: looks debianish :) | ||
grondilu: there's some option in the repo admin tools for renaming a repo, iirc | 13:10 | ||
I know I renamed Pies to panda at some point in time | |||
Woodi | OpenBSD use p5-Curses-UI :) | ||
[Coke] | moritz++ # mojo | 13:11 | |
pmichaud | anyway, some sort of 'perldoc -f' tool would be hugely useful for people | ||
grondilu | 'perldoc -f' would be awesome. | ||
Woodi | and I thinked that simple modules/dirty/fast hacks or pp versions could be Simple::... | 13:12 | |
estrai | 'perldoc -f'++ | ||
grondilu | s/perldoc/perl6doc/ | ||
13:12
Patterner left,
Psyche^ is now known as Patterner
|
|||
tadzik | perldoc -f would be relly easy once we can get Pod into the settign | 13:12 | |
and I think it belongs aside perl6 --doc, not as a separate tool | 13:13 | ||
pmichaud | I'm wondering if we really want Pod in the setting, though. | 13:14 | |
Woodi | can .perl for use in storable is good idea ? (or one possible maybe ?) | ||
13:14
xinming joined
|
|||
grondilu | Woodi: it's better than nothing. | 13:14 | |
[Coke] | jnthn: what diagnostic tools do you use to make rakudo faster? | ||
Woodi | k, thanx | ||
pmichaud | (pod in setting) seems like we'd want documentation improvements to happen more rapidly, at least initially. | ||
13:15
thou joined
|
|||
tadzik | more rapidly than what? | 13:15 | |
[Coke] | (smarter than perldoc -f: grok) | ||
pmichaud | than someone needing to edit the source code files to update the docs. | ||
tadzik | true | ||
pmichaud | as far as compile speed goes, we could certainly fix tools/build/gen-cat.pl to strip pod from the src/core/ files as it's building CORE.setting | 13:16 | |
tadzik | why would we have it there then? | 13:17 | |
pmichaud | well, there is something to be said for having the documentation near the thing being documented | ||
and when pod-in-setting works, then we'd have .WHY working on the builtins | 13:18 | ||
tadzik | not if we strip it for compile speed, as you said | ||
pmichaud | I meant as a temporary step until pod-in-setting is plausible | ||
tadzik | okay | ||
pmichaud | afk in 10, in case anyone has questions/comments for me :) | 13:19 | |
afk | 13:28 | ||
13:39
drbean left
13:40
spider-mario joined
13:42
drbean joined
|
|||
TimToady | nr: "[" ~~ /(\[)/; say $0 | 13:45 | |
p6eval | niecza v18-6-ge52d6c3: OUTPUT«#<match from(0) to(1) text([) pos([].list) named({}.hash)>» | ||
..rakudo 809b8f: OUTPUT«q[[]» | |||
13:48
colomon left
13:50
alvis`` joined
13:52
p6eval left,
not_gerd left,
zb left
13:53
Util left,
cognominal_ left,
gfldex left,
zb joined,
mathw joined,
Util joined
13:54
odoacre left,
gfldex joined,
sorear joined,
aindilis` left,
alvis` left
13:55
cognominal joined,
charsbar____ joined
13:58
cognominal left,
p6eval joined,
ChanServ sets mode: +v p6eval
13:59
awwaiid joined
14:00
cognominal joined
14:01
att left,
odoacre joined,
colomon joined
|
|||
moritz | r: say $*PROGRAM_NAME | 14:02 | |
p6eval | rakudo 809b8f: OUTPUT«/tmp/57BaluvP_n» | ||
14:09
snearch joined,
drbean left
14:10
drbean joined
14:11
fridim_ joined
14:16
fridim_ left
14:17
PacoAir joined
|
|||
grondilu | Check out my perl6 #bitcoin library: [email@hidden.address] Most of elliptic curve and addresses dealing is done. I'll soon work on database and network. | 14:27 | |
tadzik | wow | 14:28 | |
grondilu: you probably want to add dependencies to META.info | 14:29 | ||
grondilu doesn't know much about META.info | 14:32 | ||
I'll fix that. | |||
tadzik | grondilu: you may want to read wiki.perl6.org/Create%20and%20Distr...%20Modules | ||
pmichaud | oh cool, the new MapIter code is 20% faster than 2012.05 (for 1..500000 { ... }) | 14:33 | |
tadzik | cool | ||
pmichaud | 5.37 sec vs 6.14 sec | ||
tadzik | pmichaud++ | ||
pmichaud | oh, maybe that's only 15% | ||
r: say (6.14-5.37)/6.14 | |||
p6eval | rakudo 809b8f: OUTPUT«0.125407» | ||
pmichaud | 12.5% | ||
moritz | still an improvement | ||
14:34
skids joined
|
|||
pmichaud | plus less greedy | 14:34 | |
14:34
colomon left
|
|||
pmichaud | okay, I can live with that. now for more improvements :) | 14:34 | |
tadzik | what is the most costly thing about it, lack of sink context? | ||
felher | pmichaud++ | ||
pmichaud | I'm not sure what the greatest cost is atm. lack of sink context probably increases memory usage but I doubt it's affecting the speed much | 14:35 | |
(modulo gc issues) | |||
moritz | have you tried --profile? | 14:36 | |
pmichaud | not yet | ||
I have another minor optimization spectesting now | |||
14:37
ggoebel left
|
|||
kresike | bye all | 14:39 | |
tadzik | bye kresike | ||
14:39
kresike left
|
|||
moritz | r: say join ', ', reverse <a b c> X~ 1..3 | 14:41 | |
p6eval | rakudo 809b8f: OUTPUT«c3, c2, c1, b3, b2, b1, a3, a2, a1» | ||
14:42
ggoebel joined
|
|||
moritz | r: say join ', ', <a b c> XR~ 1..3 | 14:42 | |
p6eval | rakudo 809b8f: OUTPUT«» | ||
moritz | r: say join ', ', <a b c> X~ 1..3 | ||
p6eval | rakudo 809b8f: OUTPUT«» | ||
moritz | r: say join ', ', (<a b c> X~ 1..3) | 14:43 | |
p6eval | rakudo 809b8f: OUTPUT«a1, a2, a3, b1, b2, b3, c1, c2, c3» | ||
moritz | r: say join ', ', (<a b c> XR~ 1..3) | ||
p6eval | rakudo 809b8f: OUTPUT«1a, 2a, 3a, 1b, 2b, 3b, 1c, 2c, 3c» | ||
grondilu | I'm surprised you needed parens. | 14:44 | |
14:45
JimmyZ left
|
|||
moritz | list ops like X have loser precedence than , | 14:45 | |
grondilu | I thought X~ would have the same precedence as ~ | ||
14:45
snearch left
14:46
snearch joined
|
|||
pmichaud | how does the output of --profile work? do I feed that to kcachegrind or something? | 14:47 | |
moritz | pmichaud: like that, yes | ||
tadzik | I think so | ||
jnthn | Open it in kcachegrind | ||
moritz | perl6 --profile yourprog.pl 2>profile.log | ||
kcachegrind profile.log | 14:48 | ||
pmichaud installs kcachegrind again | |||
14:48
colomon joined
14:50
mikemol joined
|
|||
moritz | the unless nqp::isconcrete($!reified) { ... } block in ListIter.reify seems to use up most of the CPU time | 14:51 | |
jnthn | What? :) | ||
pmichaud | well, that's the list handler, so it makes sense | ||
jnthn | isconcrete is a flag check... | ||
pmichaud | not the flag check, the block | ||
14:51
JimmyZ joined
|
|||
jnthn | oh! | 14:51 | |
pmichaud | okay, I have some optimizations for that block | 14:52 | |
14:52
thelazydeveloper joined
|
|||
pmichaud | however, it's interesting that the cost of that block is not coming from any of the various methods it calls | 14:52 | |
so there's likely something pathological there | 14:53 | ||
moritz | it makes 90% in my profile | ||
pmichaud | ....90%? | ||
in mine it's 17% | |||
jnthn | Are you lookign at inclusive or exclusive? :) | ||
moritz | pmichaud: are you looking at "ticks" or "ops"? | 14:54 | |
pmichaud | ops | ||
I can look at ticks | |||
moritz | I looked at ticks | ||
it's much lower in ops | |||
(ticks are time, ops just counts the number of invoked parrot opcodes; much less useful IMHO) | 14:55 | ||
jnthn | The ratio can be sometimes interesting though | ||
Few ops to ticks suggests some op is very expensive | |||
If it's that costly, a C level profile may also show it up | |||
14:56
grondilu left
|
|||
pmichaud | just a sec, let me screen dump my profile and you all can walk me through it | 14:56 | |
jnthn | OK, but gotta go in 5 or so... | 14:57 | |
(train) | |||
pmichaud | pmichaud.com/work/kc-1.png | 14:58 | |
moritz | pmichaud: first click on the column header 'self' | ||
pmichaud | okay, done | ||
GlitchMr | nr: print &pack | 14:59 | |
p6eval | niecza v18-6-ge52d6c3: OUTPUT«===SORRY!===Undeclared routine: 'pack' used at line 1Unhandled exception: Check failed at /home/p6eval/niecza/boot/lib/CORE.setting line 1401 (die @ 5)  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 37)  at /home… | ||
..rakudo 809b8f: OUTPUT«pack» | |||
moritz | that way it's sorted by exclusive time | ||
jnthn | Yeah, the exclusive time bet is interesting. | ||
High exclusive time in CORE.setting especially so | |||
moritz | now some _block(\d+) should show up on top | ||
pmichaud | so, on mine the bulk of the time is in block 1013 (33.66%) and postfix:<++> (29.90%) | 15:00 | |
moritz | you just grep for that name in src/gen/CORE.setting.pir | ||
[Coke] is happy that this level of profiling is available. | |||
moritz | and there you can see in the annotations which line in src/gen/CORE.setting it corresponds to | ||
and that way you can find out the enclosing routine | |||
pmichaud | pmichaud.com/work/kc-2.png (sorted by 'self') | 15:01 | |
so, on mine it looks like the bulk of the time is spent calling the { $i++ } block (500K times) | |||
jnthn | The most expensive block is the one in the program, not the actual list guts. | ||
pmichaud | that indicates to me that the cost of the map itself is less than 37% | ||
15:02
adu joined
|
|||
moritz | ah, I had an empty block in my for loop | 15:02 | |
pmichaud | oh, well, yes -- if your for loop has an empty block, then the loop takes up 90% of the execution time :) | ||
15:03
spider-mario left
|
|||
moritz | well, not the loop, just one block in the loop | 15:03 | |
pmichaud | anyway, yes, this works for me. I'm not seeing anything too unexpected here at the moment | 15:05 | |
[Coke]: (profiling available) I'm very happy to see it also. It's a huge help that we went without for too long. | |||
dalek | kudo/nom: 8bb2fad | pmichaud++ | src/core/MapIter.pm: Use QRPA for ListIter's $!rest in MapIter. |
15:06 | |
[Coke] | I hope to find time to play with it soon and find expensive things to clean up. ;) | ||
15:06
spider-mario joined
|
|||
jnthn | decommute & | 15:08 | |
15:08
_jaldhar joined
15:09
drbean left
15:10
drbean joined
|
|||
adu | good morning | 15:15 | |
15:16
_jaldhar left
|
|||
TimToady | likewise | 15:17 | |
15:19
_jaldhar joined
|
|||
[Coke] | # 06/07/2012 - rakudo++ (22423); niecza (91.29%); pugs (34.56%) | 15:20 | |
minor gains by rakudo | |||
15:20
fridim_ joined
|
|||
adu | rakudo++ | 15:21 | |
xinming | If I remember right, In our roadmaps, That we targeting compiling of perl 6 into plain C source files, and ship the source files to another machines and build via a C Compiler, Am I right? | 15:25 | |
moritz | xinming: who is the "we"/"our" you're speaking of? | 15:26 | |
pmichaud | xinming: that's not been the plan for rakudo, no. | ||
moritz | I'm pretty sure it was never on a roadmap of mine | ||
pmichaud | at least, not in any sort of short-term or medium-term roadmap. | ||
xinming | I don't mean roadmap | ||
I remember that when we are at pugs age, And people compiling perl 6 into javascript | 15:27 | ||
and someone "said"(maybe I'm wrong), That we can write a C emmit kind of thing to generate C code directly. | |||
pmichaud | I think I remember hearing that, yes. I don't know how feasible that's ever been. | 15:28 | |
[Coke] | the problem with that is eval. | 15:29 | |
s/the/a/ | |||
TimToady | well, all you have to do is emit a parrot too, which is in C :) | ||
pmichaud | well, I suppose someone could write Perl 6 code that implements a Perl 6 VM (including dynamic stuff) and is translatable to C. | ||
arnsholt | I'm not sure I see (much) of a use-case for emitting to C | 15:30 | |
adu | "all you have to do" | ||
arnsholt | But I do think in the really long term someone'll probably get around to writing a compiler that compiles to native code | ||
PerlJam | arnsholt: the usual reason is "speed" (but we know how that turns out) | ||
pmichaud | adu: TimToady often says "all you have to do" :-) | ||
adu: "All you have to do is implement protoregexes and longest token matching via DFAs and ... " :-P | 15:31 | ||
arnsholt | PerlJam: There is that, but I think a compiler to machine code is more viable. Not unlike the state of Common Lisp compilers | ||
Most of the CL compilers are written in CL and emit machine code (just like C compilers tend to be written in C) | 15:32 | ||
xinming | arnsholt: If I remember right, sbcl can compile lisp code to C | 15:33 | |
adu | clj emits jvm | ||
[Coke] | I'm more sanguine about parrot getting a JIT in the next year than I am about rakudo or niecza emitting C. | 15:34 | |
adu | I was interested in doing that | ||
arnsholt | Definitely. Native-code compiler is very-much a long term possibility, I think. Not just something that can be magically conjured into existence | 15:35 | |
moritz | fwiw the codegen part (when compiling to C) will be much less work than providing all the runtime support | ||
arnsholt | Well, true. But it's not very useful without the runtime support = | 15:39 | |
s/=/=) | |||
15:39
drbean left
15:40
drbean joined
15:41
spaceships joined
15:45
daxim left
15:46
spaceships left
|
|||
moritz | github.com/perl6/doc | 15:47 | |
felher | moritz++ :) | 15:48 | |
pmichaud | maybe "p6doc" is a better repo name, to match the name of the tool. | 15:50 | |
other than that, moritz++ | 15:51 | ||
moritz | pmichaud: well, I also want to gather the docs, not just the tool | ||
pmichaud | fair enough. | 15:52 | |
where "docs" != "specs", of course :) | |||
moritz | of | 15:56 | |
course | |||
[Coke] | are the docs going to be tied to an implementation? | 15:57 | |
or annotated for same? | |||
or pretend to be universal for a spec revision? | 15:58 | ||
moritz | universal | ||
pmichaud | r: say 20/540 | 16:01 | |
p6eval | rakudo 8bb2fa: OUTPUT«0.037037» | ||
moritz | nr: say fc 'foo' | 16:05 | |
p6eval | niecza v18-6-ge52d6c3: OUTPUT«===SORRY!===Undeclared routine: 'fc' used at line 1Unhandled exception: Check failed at /home/p6eval/niecza/boot/lib/CORE.setting line 1401 (die @ 5)  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 37)  at /home/p… | ||
..rakudo 8bb2fa: OUTPUT«===SORRY!===CHECK FAILED:Undefined routine '&fc' called (line 1)» | |||
moritz | nr: say titlecase 'foo' | 16:06 | |
p6eval | niecza v18-6-ge52d6c3: OUTPUT«===SORRY!===Undeclared routine: 'titlecase' used at line 1Unhandled exception: Check failed at /home/p6eval/niecza/boot/lib/CORE.setting line 1401 (die @ 5)  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 37)  at … | ||
..rakudo 8bb2fa: OUTPUT«===SORRY!===CHECK FAILED:Undefined routine '&titlecase' called (line 1)» | |||
felher | moritz: what exactly do mean by 'gather documentation'? Go through the specs, write documentation for builtin functions and such and let them be viewable using p6doc? :) | ||
moritz | felher: exactly | ||
felher | \o/ :) | ||
moritz | nr: say 'abc'.index('b').WHAT | 16:07 | |
p6eval | rakudo 8bb2fa, niecza v18-6-ge52d6c3: OUTPUT«Int()» | ||
16:08
birdwindupbird left
|
|||
moritz | in cases where both rakudo and niecza deviate from the spec in the same way, I'm going to describe what is, not what should be | 16:08 | |
16:09
drbean left
|
|||
moritz | nr: say 'abc'.index('d').WHAT | 16:10 | |
p6eval | niecza v18-6-ge52d6c3: OUTPUT«Num()» | ||
..rakudo 8bb2fa: OUTPUT«Str()» | |||
16:10
drbean joined
|
|||
felher | moritz++ :) | 16:10 | |
moritz | Num? why Num? | ||
nr: say 'abc'.index('d') | |||
p6eval | niecza v18-6-ge52d6c3: OUTPUT«Num()» | ||
..rakudo 8bb2fa: OUTPUT«Str()» | |||
moritz | eeks | ||
I'd expect either a Failure or the Int type object | |||
pmichaud | (deviate) also note that it's a deviation somehow :) | 16:12 | |
16:13
_jaldhar left,
am0c joined
16:16
Chillance joined
|
|||
moritz | the dalek hook from perl6/doc doesn't seem to work :/ | 16:17 | |
16:19
mikemol_ joined
16:20
mikemol left
|
|||
sorear | good * #perl6 | 16:21 | |
moritz | \o sorear | ||
16:24
vlixes joined
16:25
bluescreen10 joined
|
|||
moritz | sorear: any idea why commits to perl6/doc don't show up here? | 16:26 | |
I've added feather3.perl6.nl:5000/dalek?t=freenode,perl6 as a post-commit URL | 16:27 | ||
16:27
adu left,
adu joined
|
|||
moritz | nr: say Parcel ~~ Positional | 16:28 | |
p6eval | rakudo 8bb2fa, niecza v18-6-ge52d6c3: OUTPUT«True» | ||
moritz | nr: say split('a', 'bac', :all).perl | 16:30 | |
16:30
Vlavv_ left
|
|||
p6eval | rakudo 8bb2fa: OUTPUT«("b", "a", "c").list» | 16:30 | |
..niecza v18-6-ge52d6c3: OUTPUT«["b", #<match from(1) to(2) text(a) pos([].list) named({}.hash)>, "c"].list» | |||
16:30
JimmyZ left
|
|||
sorear | moritz: | 16:33 | |
moritz: I think it needs to be #perl6 | |||
moritz | sorear: ok | ||
sorear: mu/misc/dalek-push.txt doesn't include the # | 16:34 | ||
sorear: and with the # it also doesn't work :/ | 16:35 | ||
sorear | actually, it doesn't work because I think the parrot folks might have done something | ||
dalek crashed spewing errors from the CREDITS parser | 16:36 | ||
16:39
drbean left
16:40
drbean joined
16:42
Vlavv_ joined
|
|||
moritz | sorear: so, what's the problem with the CREDITS file? | 16:47 | |
sorear | starting that investigation now | 16:48 | |
GlitchMr | back (for a while :P) | 16:49 | |
moritz | the last commit that touched CREDITS removed the pod markers | ||
sorear | yeah, dalek depends on searching the file for =cut | 16:55 | |
bad #parrot | |||
[Coke] | bad dalek, that's not a pod file. ;) | ||
seems like reading to the end is safe. | 16:57 | ||
sorear | ok, dalek is patched and restarted, moritz you can try again | 16:58 | |
[Coke] | sorear++ | 17:01 | |
GlitchMr | nr: say "c"~ <\ | / ->[$_%4]for^Inf | 17:06 | |
nr: say "c"~ <\ | / ->[$_%4]for 1..10 | |||
p6eval | rakudo 8bb2fa: OUTPUT«(timeout)c\c|c/c-c\c|c/c-c\c|c/c-c\c|c/c-c\c|c/c-c\c|c/c-c\c|c/c-c\c|c/c-c\c|c/c-c\c|c/c-c\c|c/c-c\c|c/c-c\c|c/c-c\c|c/c-c\c|c/c-c\c|c/c-… | ||
..niecza v18-6-ge52d6c3: OUTPUT«(timeout)c\c|c/c-c\c|c/c-c\c|c/c-c\c|c/c-c\c|c/c-c\c|c/c-c\c|c/c-c\c|c/c-c\c|c/c-c\c|c/c-c\c|c/c-c\c|c/c-c\c|c/c-c\c|c/c-c\c|c/c-c\c|… | |||
rakudo 8bb2fa, niecza v18-6-ge52d6c3: OUTPUT«c|c/c-c\c|c/c-c\c|c/» | |||
GlitchMr | Makes sense... | 17:07 | |
[Coke] | dalek just posted in #parrot; sorear++ | 17:09 | |
17:09
drbean left
17:10
drbean joined
|
|||
pmichaud | in perl6/doc, is it worth it to come up with a shorthand notation that indicates implementation status? E.g., "r+ n+"? | 17:16 | |
(borrowing from the 'features' repo for the moment.) | 17:17 | ||
I'm also reminded of the IndexDotHTML support key system: www.blooberry.com/indexdot/misc/suppkey.htm where they indicated support for HTML features by browser type | 17:19 | ||
(yes, it's very outdated; the idea is the thing) | |||
moritz | pmichaud: don't think it's worth the shortcut | 17:21 | |
pmichaud: there's enough implemented stuff we can document first :-) | |||
pmichaud | okay. I'm just wondering about "not implemented in XXX" becoming stale | 17:22 | |
having a shortcut means we might be able to use this to have a "detailed features" online matrix | |||
but since I'm not doing the work (yet), it's just an idea and not really a "iwbni" :-) | |||
dalek | c: 137e690 | moritz++ | CREDITS: update my CREDITS entry to match the repository |
17:25 | |
17:26
icwiener joined
17:29
mikemol joined
17:31
zby_home joined
|
|||
moritz | tadzik: ping | 17:32 | |
17:32
alvis``` joined,
mikemol_ left
|
|||
moritz | tadzik: I want to extract only a section of Pod of which I know the name of the heading in advance | 17:33 | |
tadzik: any good ideas how I could do that? | |||
17:34
alvis`` left
|
|||
moritz | so far I've come up with some ideas: 1) preprocess with regexes, write only the interesting part to a temp file, run rakudo on that | 17:34 | |
2) patch rakudo somehow to magically do it for me (but how?) | |||
3) subclass Pod::To::Text (but then I'm screwed when I want a different backend) | |||
4) inject a filter stage between parsing and emission backend (is that overkill)? | 17:35 | ||
eiro | hello guys | ||
moritz | tadzik: any thoughts? | ||
\o eiro | |||
erm, eiro/ | |||
:-) | 17:36 | ||
eiro | trying to write a script to install a rakudo/fpw | ||
is there a chance to have a tag for fpw12 ? | |||
moritz | yes | 17:37 | |
eiro | cool :) | 17:38 | |
moritz | eiro: I just need to check if/how it interacts with rakudo's own version reporting | ||
eiro | the goal of the script: bailador + tags + dbi | ||
ok | |||
moritz | eiro: any particular revision you want to tag? | 17:39 | |
17:39
drbean left
|
|||
eiro | moritz, you tell me :) i really don't know what commit is the best to use | 17:40 | |
perhaps tadzik could tell ? | |||
i'm trying the very last tag for now | 17:41 | ||
17:42
drbean joined
|
|||
eiro | 8bb2fadddd5f4779d3d33f09880cd2fb3d415be8 | 17:42 | |
GlitchMr | How can I make Perl 5 style sub. That means I can use it either as method of class or by specifying it as first argument? | ||
So I could do both of those: | |||
$something->do_that('a') | |||
And | |||
$something.do_that('a') | 17:43 | ||
* | |||
and | |||
Something.do_that($something, 'a') | |||
moritz | you can't do that in p5 either | ||
eiro | yes you can in perl5 | ||
moritz | you can do Someting::do_that($something, 'a') in p5 | ||
eiro | ohh .. :: instead . , right | 17:44 | |
moritz | eiro: yes, but only if special-case the subroutine to ignore the first argument if it's a string | ||
GlitchMr | Well, whatever. So I can use method directly or on instance | ||
17:44
fgomez joined
|
|||
moritz | r: class A { our method x is export { 'A::x' } }; say A.x; say A::x(A) | 17:44 | |
p6eval | rakudo 8bb2fa: OUTPUT«A::xA::x» | ||
moritz | GlitchMr: like this | ||
GlitchMr | Interesting :) | ||
eiro | moritz, anyway: you can Something->do_that( $something, 'a'), you have 3 parameters then | ||
17:45
fgomez left,
fgomez joined
|
|||
eiro | 'Something', $something, 'a' | 17:45 | |
moritz | eiro: yes, I know | ||
eiro: but since it's not normal calling convention, the routine must be written to explicitly take that case into account | 17:47 | ||
17:48
simcop2387 left
17:49
mtk left,
simcop2387 joined
|
|||
zby_home | is there something like local::lib for perl6 nopaste.snit.ch/143553 ? | 17:50 | |
moritz | phenny: "Nie ma takiego pliku ani katalogu"? | 17:51 | |
phenny | moritz: "No such file or directory" (pl to en, translate.google.com) | ||
moritz | zby_home: you need perl6 in $PATH for now | ||
zby_home | OK | 17:52 | |
interesting - I did not even noticed that that error message was in Polish | |||
GlitchMr | lol | 17:53 | |
moritz | I did :-) | ||
GlitchMr | I did too :P | ||
But too late | |||
Well... 1:1... whatever that means | |||
17:53
simcop2387 left
|
|||
GlitchMr | Isn't need for perl6 in $PATH a bug? | 17:54 | |
geekosaur | "for now" implies it's something expected to change in the future | 17:55 | |
which suggests if not a bug then a known infelicity | |||
17:55
simcop2387 joined
|
|||
GlitchMr | oh, ok | 17:55 | |
eiro | masak, remember where Tags.pm is ? | 17:56 | |
moritz | eiro: if neither jnthn nor pmichaud object, i'll push the fpw12 tag tomorrow | 18:04 | |
dalek | kudo/nom: 5a415c9 | moritz++ | src/core/Cool.pm: return Int type object from failed Str.index |
18:07 | |
18:08
mtk joined
|
|||
eiro | moritz, ok: i'll test from it | 18:09 | |
18:09
drbean left
18:10
drbean joined
|
|||
pmichaud | ...fpw12 tag? | 18:12 | |
pmichaud reads backscroll | |||
18:13
mtk left
|
|||
pmichaud | I see no issue with a fpw12 tag. Most of the release details look specifically for tags that begin with "2012..." or the like. | 18:13 | |
18:13
am0c left
|
|||
pmichaud | looks like it looks for tags beginning with "2" | 18:14 | |
anyway, fpw12 tag +1 from me if you want | |||
moritz | good | ||
pmichaud | (foldcase) I wasn't sure if ICU's foldcase semantics matched the ones we want for p6 | 18:15 | |
also, we can always write our own opcode to access ICU's foldcase rather than wait/ask parrot to do it | 18:16 | ||
see, for example, the is_uprop opcode in src/ops/nqp.ops | 18:17 | ||
(which gives us access to ICU's property databse, which Parrot also doesn't expose) | |||
pmichaud adds note to issue ticket | 18:18 | ||
18:22
mtk joined
|
|||
adu | how do I match \n when it's already matched by <ws>? | 18:24 | |
moritz | you can match ^^ which is begin-of-line | 18:25 | |
adu | oh | ||
thanks | |||
moritz | r: say "a\nb" ~~ /<alpha> <.ws> ^^ b/ | ||
p6eval | rakudo 5a415c: OUTPUT«q[ab] alpha => q[a]» | 18:26 | |
moritz | r: say "a\n b" ~~ /<alpha> <.ws> ^^ b/ | ||
p6eval | rakudo 5a415c: OUTPUT«#<failed match>» | ||
moritz | so be careful that you don't use <.ws> if it could slurp up a space after the newline | ||
pmichaud | also note that \h* can be used for whitespace that isn't newline | 18:27 | |
(horizontal whitespace) | |||
adu | and \v | ||
anyways, I'll give it a think | |||
moritz | and in grammars you can write your own token ws that fits your needs | 18:28 | |
adu | I'm aware of that | 18:29 | |
I suppose I could write a special newline token that fails when it could be an automatic semicolon... | 18:30 | ||
[\n <!semi>] | 18:31 | ||
where <semi> matches newlines under certain conditions? | 18:32 | ||
moritz | well | ||
that would be an \n not followed by a semi | |||
maybe you rather want <!semi> \n ? | |||
adu | [\n & <!semi>] | ||
moritz | no | ||
adu | <!before semi> \n | 18:33 | |
moritz | & is for matches of the same length left and right | ||
adu | <semi> either matches ';' or \n | ||
moritz | <!before <semi>> and <!semi> do the same thing | ||
adu | those are both the same length | ||
moritz | but <!semi> matches 0 chars | ||
adu | oh | ||
so yes, I want <!semi> \n :) | 18:34 | ||
moritz++ | |||
18:39
drbean left
18:40
drbean joined
18:46
_jaldhar joined
18:49
_jaldhar left
18:51
skids left
18:52
_jaldhar joined
19:00
kaleem joined
19:07
mikemol left,
topologist joined
19:17
birdwindupbird joined
|
|||
dalek | c: 03bfa61 | moritz++ | lib/Str.pod: Str.comb |
19:28 | |
c: 67120d9 | moritz++ | bin/p6doc: basic implementation of -f |
|||
c: 24ae160 | moritz++ | README: more examples for README |
|||
19:38
kaleem left
19:39
drbean left
19:40
drbean joined
19:46
fgomez left,
fgomez joined
19:53
brrt joined
19:57
snearch left
20:03
zby_home left
20:06
preflex left
20:07
sporous left
20:09
sporous joined,
preflex joined
20:10
Telgalizer left
20:13
sporous left,
sporous_ joined
20:14
GlitchMr left,
Telgalizer joined,
preflex left
20:15
preflex_ joined
20:16
preflex_ is now known as preflex
20:19
sporous_ is now known as sporous
|
|||
brrt | r: pir::compreg_Ps('nqp'); | 20:22 | |
p6eval | rakudo 5a415c: OUTPUT«use of uninitialized value of type Mu in string context in any <anon> at src/gen/BOOTSTRAP.pm:104use of uninitialized value of type Mu in string context in any <anon> at src/gen/BOOTSTRAP.pm:104===SORRY!===error:imcc:syntax error, unexpected PREG, expecting … | ||
moritz | r: my $n := pir::compreg__Ps('nqp') | 20:23 | |
p6eval | rakudo 5a415c: ( no output ) | ||
moritz | brrt: need two __ between pirop and signature | 20:24 | |
brrt | a, i see | 20:25 | |
moritz: would you know why load_language('nqp') in winxed causes a segfault? is that normal? | |||
moritz | brrt: I hope it's not normal :-) | ||
brrt | hmm, i can't seem to start gdb with the correct arguments | 20:26 | |
moritz | gdb --args your command line | ||
run | |||
brrt | oh, i see | ||
moritz | and no, I don't know why that happens | ||
otherwise only the first argument is treated as executable | |||
and you have to supply the rest of the args to the 'run' command in gdb | 20:27 | ||
brrt | its in Parrot_oo_find_vtable_override | ||
none of its arguments seem to be zero | 20:28 | ||
is this an nqp bug or a parrot bug? | 20:30 | ||
20:30
birdwindupbird left
|
|||
moritz | hard to know | 20:30 | |
20:31
skids joined
|
|||
moritz | nqp: my $r := pir::compreg__Ps('nqp') | 20:34 | |
p6eval | nqp: ( no output ) | ||
tadzik is back | 20:35 | ||
moritz | \o tadzik | ||
20:35
brrt left
|
|||
tadzik | moritz: okay, Pod extraction. You mean to extract Pod from a separate file somehow? | 20:36 | |
if you want it from the file you're in that should be quite easy | 20:37 | ||
moritz | from a different file | ||
tadzik | even easier if we implemented all the spec :) | ||
now that's a hard part | |||
moritz | p6doc Str.split # searches for Str.pod =head3 split # or so | ||
tadzik | as we don't really have a Pod Parser which we can tell "parse this file" | ||
moritz | we do | ||
it's called perl6 :-) | 20:38 | ||
tadzik | well, yeah :) | ||
but you'll have to execute something from another file's UNIT scope, or so | |||
moritz | I've now done a regex job and extracted the pod section into a temp file | ||
p6doc Str.split # works | |||
it's not a nice solution, but better than nothing | |||
tadzik | true | ||
moritz | now we just need docs :-9 | 20:39 | |
tadzik | okay, you have all the pods in $=pod, which is an array of Pod::Blocks | ||
20:39
drbean left
|
|||
tadzik | so you could do .first on it, looking for Pod::Block::Heading (I think) where .name eq something | 20:39 | |
20:39
brrt joined
|
|||
moritz | but how do I get another files' $=pod var? | 20:40 | |
tadzik | oh, it's just .content, not .name | ||
yeah, that's the hard part | |||
20:40
drbean joined
|
|||
tadzik | I wonder if we could eval { $file ~ '; $=pod' } ;) | 20:40 | |
20:41
wooden joined,
wooden left,
wooden joined
|
|||
tadzik | string eval, I mean | 20:41 | |
moritz | and have all our variables leak into the inner scope | ||
tadzik | yeah, seems to work | 20:42 | |
oh, will they :F | |||
yeah, they will | 20:43 | ||
tadzik considers extracting Pod grammar into a module | |||
jnthn home | 20:45 | ||
20:45
thou left
|
|||
tadzik | hello jnthn | 20:46 | |
jnthn: any ideas about stealing some file's unit-scoped $=pod? | 20:47 | ||
jnthn | hi, tadzik | ||
"stealing"? | |||
tadzik | accessing, from a perl 6 code | 20:49 | |
so far the best idea is "my $somepod = eval(slurp('foo.pl') ~ ';$=pod');", which is hardly awesome | |||
moritz | tadzik: I think the best approach is to install a hook between the pod parser and the emitter | 20:52 | |
and which can transform the pod tree | 20:53 | ||
tadzik | an emmiter is called from within the file with $=pod | ||
moritz | yes | ||
but we already have hooks to use a different emitter | |||
tadzik | yes | 20:54 | |
moritz | --doc=html # irrc | ||
tadzik | oh | ||
moritz | erm, iirc | ||
so | |||
20:54
thou joined
|
|||
tadzik | so you can write anything you want, yes | 20:54 | |
moritz | --doc=myfilter | ||
tadzik | and you'll get your $=pod | ||
moritz | and Pod::To::Myfilter can then pass on stuff to Pod::To::Whatever | ||
tadzik | you need any class with a render() method | ||
20:55
lichtkind joined
|
|||
tadzik | which takes $=pod as an argument | 20:55 | |
so class Myfilter { method render($pod) { ... } } and you're done | |||
then --doc=Myfilter will work | |||
lichtkind | o/ | 20:56 | |
tadzik | \o | ||
jnthn | +1 to doing it through existing API :) | 20:57 | |
lichtkind | tadzik: I will have tuits in 2 weeks again when next issue of foo is out | 20:58 | |
20:58
thou left
|
|||
tadzik | lichtkind: any particular ideas for spending tuits? | 20:58 | |
lichtkind | tadzik: sure my grant is still open - i want complete the glossary tablet | 21:00 | |
and sync it a bit with the glossary in ther perldoc and camel | |||
21:09
drbean left
21:11
drbean joined
21:22
brrt left
|
|||
jnthn | pmichaud: ping | 21:26 | |
21:27
pupoque_gnexus joined
21:30
pupoque_gnexus is now known as pupoque
|
|||
moritz | r: say Pod::Heading | 21:31 | |
p6eval | rakudo 5a415c: OUTPUT«Heading()» | ||
21:32
pupoque left,
pupoque_gnexus joined,
pupoque_gnexus left
|
|||
sergot | good night! o/ | 21:34 | |
pmichaud | jnthn: pong | ||
21:35
sergot left
|
|||
jnthn | pmichaud: One slowdown: while loops always generate exception handling stuff | 21:36 | |
pmichaud | jnthn: yes, but ? | ||
jnthn | pmichaud: Even if redo/next/last are not used. | ||
pmichaud | I'm not sure what this is in reference to. | ||
jnthn | pmichaud: but it's expensive when you have while loops in your LTM code. | ||
pmichaud | oh! | ||
jnthn | pmichaud: I don't have a way to write a loop in NQP, so far as I can tell, that doesn't result in creating a Parrot ExceptionHandler | 21:37 | |
pmichaud: I don't think that's very cheap :) | |||
pmichaud | we could make one. | 21:38 | |
nqp::while(...) with some option that says "don't generate exception handlers" | 21:39 | ||
jnthn | pmichaud: Yeah, something like that. | ||
dalek | p: dceb34b | jnthn++ | src/QRegex/Cursor.nqp: Simplify and improve performance of !alt a bit; creates less junk. ~4% improvement on CORE.setting parse time. |
||
pmichaud | in our other Actions.pm stuff, do we make much use of 'next' or 'last', ooc? | 21:40 | |
jnthn | Not much. | ||
dalek | c: beac27d | moritz++ | lib/Pod/To/SectionFilter.pm: add a Pod::To:: module that searches for a given section |
||
jnthn | Or at least, I don't remember off hand anywhere that we do. | ||
pmichaud | I count seven instances in src/Perl6 | ||
moritz | 3 x last, 1x next | ||
in Actions.pm | 21:41 | ||
pmichaud | er, 6 instances | ||
3 in Pod.pm, one in ClassHOW, 2 in Actions.pm | |||
('next') | |||
so, it does get used some. | |||
Hrm. | |||
jnthn | Seems a shame to penalize every while loop though. | ||
Especially when we can probably statically detect it. | |||
It's lexical, innit? | 21:42 | ||
pmichaud | according to p6 it's lexotic | ||
jnthn | Or at least, we can constrain NQP that way. | ||
pmichaud | which means dynamic | ||
jnthn | Ah. | ||
pmichaud | I wouldn't be opposed to making it lexical-only in nqp | ||
dynamic instances of next/last aren't really all that common | |||
or, more to the point, I wouldn't mind that someone would have to code a loop such that it can detect the need for the handler lexically | 21:43 | ||
jnthn | *nod* | ||
pmichaud | i.e., you only get the handler if there's a lexical next/last/redo. The handler is still dynamic; but you have to explicitly add a next to get it. | ||
thus if 0 { next; } would be good enough to generate the handler but not cause much of a runtime cost | 21:44 | ||
so, we'd need to extend the ast while node to have an option that says "don't install a handler", and then have the lexical detection of next/redo/last | 21:45 | ||
jnthn | Yeah | 21:46 | |
pmichaud | I wonder if it makes sense to do the same for 'for' loops. :-) | 21:47 | |
(I believe they share some of the underlying code gen anyway.) | |||
for that matter, I wonder how many of our occurrences of next/last actually occur in while loops :) | |||
jnthn | Oh, I thought aht's what you'd searched for | 21:48 | |
I didn't realize you were looking at for loops too :) | |||
pmichaud | no, I just searched for instances of next/last | ||
lichtkind | jnthn: model6 landed fully? | ||
jnthn | lichtkind: Huh? :) | ||
21:48
spider-mario left
|
|||
lichtkind | hai | 21:48 | |
i mean that this work on wrenching model6 into rakudo is now completed? | 21:49 | ||
pmichaud | jnthn: ooc, which ltm code are you looking at wrt while loops? | ||
jnthn | !alt | ||
And !protoregex | |||
pmichaud | is the cost of the handler showing up in a profile, ooc? | 21:50 | |
I mean, it's one handler per while loop, not one per while loop iteration | 21:51 | ||
jnthn | I'd need to do a C level profile...generally I just know that reducing the amount of junk each !alt call generated just made a fairly sizable difference. | 21:52 | |
And that ExceptionHandler creation there is probably multiple PMCs. | 21:53 | ||
iirc, there's an RPA of the handler IDs created also | |||
Or maybe it's just the one... | |||
Plus the ops to set it up | |||
Just looking for ways to streamline !alt and !protoregex, really. | |||
pmichaud | they're showing up in the profile? | ||
(just checking for confirmation, not doubting that they could be) | 21:54 | ||
jnthn | I remember it showing up in the last C level profile I did...lemme generate a new one. | ||
Problem is...the answer is fuzzy (more) | |||
pmichaud | I agree the exception handlers can be expensive -- we've seen that when we did rakudo-level subs | ||
jnthn | I don't have a way to correlate the "we spend time creating them" in the C level profile with the HLL level profile. | 21:55 | |
pmichaud | does every method/sub/etc still get an exception handler to catch returns? I think you detect those lexically also, iirc | ||
jnthn | So in a sense even though I recall there being some cost there, it's ahrd to actually conclusively say "it's the while loops here" | ||
In NQP? | 21:56 | ||
pmichaud | yeah, in nqp | ||
jnthn | It only gets a return handler if there's an explicit return. | ||
pmichaud | so yes, having while and for loops only get iteration handlers on explicit next/last/redo seems very doable. | ||
jnthn | It detects it's there, then adds it only if needed. | ||
pmichaud | at least seems like it could follow a similar pattern. | ||
jnthn | *nod* | ||
lichtkind | jnthn: i just wanted ask beause i read in your blog nowadays only about QAST and such and was wandering if 6model is an topic anymore | 21:57 | |
pmichaud | and I suspect also that it means that many (most?) exception handler creations you're seeing are coming from loops, not methods or subs | ||
jnthn | pmichaud: Yes, that's my guess. I wish I had better data. | ||
Not sure how to get it. | |||
lichtkind: The core of 6model is largely stable enough these days that it doesn't see much development. | |||
pmichaud | I can certainly do a few tests to see how much the exception handler creation might be costing us. | 21:58 | |
jnthn | lichtkind: The point of 6model was that we'd do development of meta-objects in a HLL (like NQP) though. | ||
pmichaud: Could be good to get an idea of what it might save us. | |||
lichtkind | jnthn: thanks i slowly preparing for the next update article :) | ||
pmichaud | jnthn: actually, come to think of it, I already have a perfect test case. the MapIter code has to install an exception handler -- I can compare it to with/without pretty easily | 21:59 | |
just a sec | |||
dalek | p: d738608 | jnthn++ | src/QRegex/Cursor.nqp: Similar simplification to !protoregex as just done to !alt; much less noticable difference, probably because we just pick the first answer much of the time and it works out. |
||
pmichaud | jnthn: have you tried replacing new "ResizableIntegerArray" with a clone yet? | 22:00 | |
istr you said that showed up on the profile some. | |||
I also wonder if RIA is at all suboptimal. Doesn't seem likely, since we only really do push + pop on it. | 22:01 | ||
jnthn | pmichaud: Not tried that yet. | ||
22:01
pupoque joined
|
|||
jnthn | pmichaud: fyi, !alt is called 323,000 times in CORE.setting parse. | 22:02 | |
pmichaud | oh! | 22:03 | |
the other thing you could do is to replace the while loop with Q:PIR { ... } -- like MapIter does | 22:04 | ||
jnthn | Yeah, I was hoping not to do Q:PIR blocks :( | ||
pmichaud | I agree that's not a general solution to the problem, but for hotspots it's plausible | ||
and when we get fast loops again we can always go back :) | |||
okay, trying mapiter w and w/o handler | 22:05 | ||
just a sec | |||
22:09
drbean left
|
|||
sjohnson | @karma | 22:10 | |
tadzik | karma sjohnson | 22:11 | |
aloha | sjohnson has karma of 5. | ||
tadzik | sjohnson++ # ¯\_(ツ)_/¯ | ||
sjohnson | heheh | ||
pmichaud | 50K while loops with handler installed: 17.048 sec | ||
22:11
Telgsta joined
|
|||
pmichaud | 50K while loops w/o handler installed: 16.263 sec | 22:11 | |
jnthn | Oh? | ||
That's...much smaller than I'd have imagined. Hm. | |||
22:11
Telgalizer left
|
|||
pmichaud | r: say (17.048-16.263)/17.048 | 22:12 | |
p6eval | rakudo 5a415c: OUTPUT«0.046046» | ||
22:12
drbean joined
|
|||
pmichaud | 4% | 22:12 | |
22:12
bluescreen10 left
|
|||
jnthn | Pretty small difference. | 22:12 | |
pmichaud | that particular test might be swamped by other execution time stuff; but it's clear that the time involved is on the order of 0.8 / 50000 sec | 22:13 | |
r: say 0.8 / 50000 | |||
p6eval | rakudo 5a415c: OUTPUT«0.000016» | ||
22:13
vlixes left
|
|||
sjohnson | tadzik++ | 22:13 | |
jnthn | r: say 0.000016 * 300000 | 22:14 | |
p6eval | rakudo 5a415c: OUTPUT«4.8» | ||
jnthn | Adds up when you do it 300,000 times... | ||
pmichaud | yeah, 300K loops would add 5 seconds | ||
jnthn | And the profile says we're doing that many. | 22:15 | |
pmichaud | out of 100 seconds (on my box) needed to parse CORE.settings, that means it's costing 5% | ||
seems worth fixing at some level then | |||
plus, that's just the cost of the while loops for the alt handler | |||
we have lots of other loops in the compilation :) | |||
jnthn | Yeah. | ||
Well, we have one in !protoregex, but that one actually *uses* last. :) | 22:16 | ||
pmichaud | so, +1 to fixing it. Need me to adjust the PAST nodes, or ... ? | ||
jnthn | Depends how soon we want the fix. | ||
pmichaud | I'm thinking of all of the while and for loops in Actions.pm, though. | ||
jnthn | I mean, maybe we just do it right in QAST? :) | ||
pmichaud | well, doing it right in QAST goes without saying :) | ||
I can certainly add a replacement 'while' node type to PAST that provides the new capability | 22:17 | ||
or, since this is optional, I can even add it to Parrot's PAST nodes directly | |||
jnthn | If it won't take much time, it'd mean we can improve the parse performance in time for the next release. | 22:18 | |
er | |||
It'd help us to improve the... | |||
:) | |||
pmichaud | oh, the PAST part is pretty straightforward. I can do that, like, tonight. | ||
the detection of lexical last/next is the trickier part, at least for me. But since you've already done it, I suspect you could do that quickly also :) | 22:19 | ||
jnthn | Hah, I just ahve a $*USES_RETURN or something in routine_def :) | ||
pmichaud | right, we just need a $*USES_NEXT or something | 22:20 | |
in statement:<while> and friends | |||
jnthn | Right. | ||
pmichaud | okay -- let's do this. if I get time tonight (likely), I'll work on the whole thing some. | ||
I'll leave word via phenny about how far I get. | |||
getting the PAST node updated should be no problem. | |||
22:20
ponbiki joined
|
|||
pmichaud | I should have some time tomorrow, also, but my schedule has other events on it to deal with :-/ | 22:21 | |
plus I should probably make sure my stuff is ready for yapc :-) | |||
jnthn | Ah, yeah, YAPC is soon, right? | ||
pmichaud | I leave tuesday, it starts wed | ||
jnthn | k | ||
pmichaud | and a good bit of sunday is unavailable for me | 22:22 | |
jnthn | OK. | ||
I'm around quite a bit this weekend and early on next week | |||
Towards next weekend I'll be largely afk | |||
pmichaud | anyway, I agree based on the above that avoiding the exception handlers is probably worth(pardon the pun)while | 22:23 | |
jnthn | :P | 22:24 | |
pmichaud | afk for a bit | 22:27 | |
22:31
ranguard_ joined,
daemon_ joined,
betterwo1ld joined
|
|||
dalek | p: ac5f5fc | jnthn++ | src/ops/nqp.ops: Re-use state arrays in NFA runner, saving roughly a million PMC allocations during CORE.setting parse. Another couple of percent off. |
22:31 | |
22:31
Juerd_ joined
22:35
ivan``_ joined
22:36
pupoque left,
ivan`` left,
betterworld left,
wolverian left,
daemon left,
hugme left,
tadzik left,
Juerd left,
ranguard left,
Juerd_ is now known as Juerd
22:37
ivan``_ is now known as ivan``
22:38
NamelessTee left
22:39
cognominal_ joined,
mattp_ joined,
Facefox left,
drbean left
22:42
cognominal left,
drbean joined,
wolverian joined,
sjohnson joined
|
|||
lichtkind | good night | 22:42 | |
22:43
tadzik joined
22:44
alester joined
22:45
adu left,
Facefox joined,
icwiener left
22:47
hugme joined,
ChanServ sets mode: +v hugme
23:26
alester left
|
|||
spacebat_ | trying to build rakudo on the nom branch, from a clean checkout, running Configure.pl has nqp complain it can't find libgmp.so.3, parrot complains it can't find libicuuc.so.42, then make-realclean fails with /usr/local/perl5/perlbrew/perls/perl-5.14.1/bin/perl5.14.1: not found | 23:37 | |
but nothing in my environment mentions perlbrew being under /usr/local, and nothing mentions 5.14.1, I use 5.14.2 | |||
I've build rakudo on this machine before alright, so I have libgmp and libicu installed | 23:38 | ||
am I building a broken old branch? | 23:39 | ||
23:39
drbean left
|
|||
jnthn | No, "nom" branch is the right one. | 23:40 | |
Latest commits were earlier today...I built latest recently also and it worked out. Seems it's something ICU related, though the perlbrew error is really odd too. | 23:41 | ||
spacebat_ | I'll try a fresh clone | ||
23:41
drbean joined
23:45
whiteknight joined
|
|||
spacebat_ | I think my nqp and parrot submodules must have been out of date or something | 23:45 | |
23:45
whiteknight is now known as Guest38800
|
|||
dalek | p: f60f402 | jnthn++ | src/ops/nqp.ops: Refactor to pull much of the NFA runner out of the op body. |
23:46 | |
p: ba8bf93 | jnthn++ | src/ (3 files): Refactor the NFA ops; we needn't get the ordering back and then push it onto the bstack in a loop, we can just do it right in an op; we've a few other ops that manipulate the bstack after all. Another little win. |
|||
p: 35db044 | jnthn++ | src/stage0/ (8 files): Update bootstrap. |
|||
p: 7176d14 | jnthn++ | src/ops/nqp.ops: Toss now-unused op. |
|||
23:47
_jaldhar left
|
|||
dalek | kudo/nom: 0fde4a1 | jnthn++ | tools/build/NQP_REVISION: Use latest NQP for some parsing performance improvements (roughly 8% improvement for CORE.setting). |
23:53 | |
diakopter | jnthn++ | ||
jnthn | Sometime over the weekend I'll try to recover our spectest time too. | 23:55 | |
(We spent a load of time early in the parse building NFAs that we could build at compile time and serialize.) | |||
s/spent/spend/ | |||
The LTM transitivity is to blame. | 23:57 |