»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! Set by moritz on 22 December 2015. |
|||
kyan | mm? | 00:00 | |
timotimo | github.com/jnthn/grammar-debugger/...er.pm6#L47 | ||
00:00
kurahaupo_ left
|
|||
timotimo | this line calls into the code in the grammar that's being traced | 00:00 | |
if an exception flies, it never calls $indent-- in the next line | |||
00:00
Cabanossi joined
|
|||
timotimo | this ought to have some kind of combination of try and CATCH | 00:00 | |
kyan | Oh, interesting | 00:01 | |
timotimo | it's probably a good idea to output something about exceptions if one passes by | ||
and make sure it gets rethrown, of course | |||
m: do { die "oh no!"; CATCH { say "i caught $_" } } | |||
camelia | i caught oh no! oh no! in block <unit> at <tmp> line 1 |
||
timotimo | ^- here it gets rethrown | ||
m: do { die "oh no!"; CATCH { default { say "i caught $_" } } } | 00:02 | ||
camelia | i caught oh no! | ||
timotimo | ^- having a "when" that matches the exception or a "default" will prevent it from being rethrown | ||
well, only prevents it from being rethrown automatically for you | |||
you can still manually rethrow it | |||
kyan | I see, should I try to edit Grammar::Debugger? (It's a little intimidating, I've only been using Perl 6 for like 3 days now, heh) | 00:03 | |
kyan gonna try it, don't know how to install it though since I used "zef" instead of portage | 00:04 | ||
AlexDaniel | may be a good use for LEAVE | ||
timotimo | no problem, you can just git clone that repository, make your changes, and run "zef install --force ." in the directory | ||
kyan | Ah, thanks! | ||
timotimo | (the --force is needed so that you don't have to bump the version field in the META file every time) | ||
kyan was thinking of LEAVE, actually | |||
timotimo | LEAVE around the $indent-- will make sure the indent gets changed appropriately in any case | 00:05 | |
having an extra CATCH can then help print out something helpful | |||
kyan | Would LEAVE run the indent-- at the right time, or would it happen after the "#Dump result" bit? | 00:06 | |
I might just use a try...catch at first, seems simple | |||
AlexDaniel | my $result; { $indent++; LEAVE $indent--; $result := $meth($c, |args); } # or something? | ||
kyan: yea you'd have to introduce another block, probably | 00:07 | ||
Xliff | What is the easiest way to convert a decimal number to any base? | ||
timotimo | m: say 1234.base(16) | ||
camelia | 4D2 | ||
kyan | Mm. Thanks! | ||
Xliff | m: 64.base(2).say | 00:08 | |
camelia | 1000000 | ||
kyan | m: say 123456789.base(64) | ||
camelia | base argument to base out of range. Is: 64, should be in 2..36 in block <unit> at <tmp> line 1 |
||
Xliff | m: 65.base(2).say | ||
camelia | 1000001 | ||
Xliff | Thanks. | ||
ugexe | timotimo: when installing from a local path it will not attempt to use a cached copy | ||
oh n/m, rakudo itself needs the --force still | 00:09 | ||
e.g. CUR.install($dist, :force) | 00:10 | ||
kyan | Ok, it's working, albeit a little talkatively. I'm not sure it should mention the exception being caught and rethrown, at least not there, since it does it 4 times :P | 00:15 | |
timotimo | hm. you can have a variable that gets set when throwing was involved and when the next method gets called (and thus the whole printing business starts back up) it could output the exception stuff at the "right" level | 00:17 | |
but since most exceptions will leave straight out of the .parse or .subparse method those would need to be wrapped, too | |||
actually, perhaps parse is already wrapped? | 00:18 | ||
kyan | I mean, the caller could just be expected to handle exceptions from the grammar, I'd think | ||
timotimo | the variable i've envisioned may also be used to only print any given exception once | ||
anyway, i'm late for bed and the cat will probably enforce half an hour of cuddling before i'm allowed to sleep :) | 00:20 | ||
good luck! | |||
00:20
mcmillhj left
|
|||
kyan | Opened a PR: github.com/jnthn/grammar-debugger/pull/38 Thanks all! :D | 00:20 | |
gn! | |||
00:29
Cabanossi left
00:30
Cabanossi joined
00:31
mcmillhj joined
|
|||
kyan | gn! | 00:35 | |
oops, thought this was my terminal, tried to rerun a command -_-; Sorry. | |||
Morfent | are grammar rules allowed to be recursive? | 00:37 | |
00:38
mcmillhj left
|
|||
AlexDaniel | Morfent: sure, but there are some limitations | 00:39 | |
Morfent: for example, left-recursive things may loop forever | 00:40 | ||
00:40
andrzejku left,
andrzejku1 joined
|
|||
Morfent | ah | 00:41 | |
00:47
mryan50 left
00:51
mryan50 joined
00:53
mcmillhj joined
00:56
aborazmeh joined,
aborazmeh left,
aborazmeh joined
00:58
mcmillhj left
01:10
mcmillhj joined
01:13
Cabanossi left
01:15
mcmillhj left,
Cabanossi joined
01:26
mcmillhj joined
01:31
mcmillhj left
01:37
Ven`` joined
|
|||
Xliff | I'm writing NativeCall code and need to flip a bitmask. What's the easiest way to do that? I am getting stumped by C-think, and I don't know if the +^ operator is doing what I think it is supposed to. | 01:37 | |
01:41
Ven`` left
01:42
mcmillhj joined
01:45
ilbot3 left
|
|||
kyan | Is it possible for code to return false or whatever in such a way that Test would count it as not "ok", but that wouldn't trigger a CATCH clause? I've got something that's acting like that, afaict, but I wouldn't think that would be possible | 01:45 | |
01:48
mcmillhj left
01:54
ilbot3 joined,
ChanServ sets mode: +v ilbot3
|
|||
kyan | Ah, it does seem so. I guess returning a False Boolean triggers a test failure, but also does *not* automatically throw an exception at the same time. I guess that makes sense. Thanks. :) | 01:55 | |
01:58
eliasr left
01:59
mcmillhj joined,
j_b_s left
02:02
xiaomiao left
02:03
xiaomiao joined,
mcmillhj left,
char_var[buffer] joined
|
|||
jdv79 | so it looks like i can't tap the Supply hanging off a IO::Socket::Async more than once | 02:07 | |
does that sound right? | |||
02:15
mcmillhj joined
|
|||
jdv79 | seems lame to me but i might be missing something | 02:15 | |
but if i insert a .share in there it works. hmm. | |||
wonder why... | |||
i thought i could tap any Supply n times | 02:16 | ||
zacts | evening | ||
jdv79 | it i | 02:17 | |
s | |||
02:20
mcmillhj left,
BenGoldberg joined
02:26
roguelazer left
02:28
Cabanossi left
02:30
roguelazer joined,
Cabanossi joined,
mcmillhj joined
02:32
aborazmeh left
02:34
kyan left
02:35
mcmillhj left
02:42
itaipu joined
02:46
Wander4096 joined,
mcmillhj joined
02:51
mcmillhj left
02:55
noganex_ joined
02:57
noganex left
02:58
cpage_ left
03:02
mcmillhj joined
03:05
wamba joined
03:06
cpage_ joined,
mcmillhj left
03:10
bwisti joined
03:19
Wander4096 left,
cpage_ left
03:20
mcmillhj joined,
cpage_ joined
03:22
cpage_ left
03:24
mcmillhj left
03:28
Cabanossi left
03:29
Cabanossi joined
03:39
mcmillhj joined
03:43
mcmillhj left
03:55
Averna joined
04:04
llfourn left,
BenGoldberg left
04:06
Averna left,
Averna joined
04:12
Cabanossi left,
rngoodn left
04:14
Cabanossi joined
04:16
cgfbee left
04:19
itaipu left,
rngoodn joined
04:29
cgfbee joined
04:30
skids left
04:37
eythian left
04:43
mcmillhj joined
04:47
mcmillhj left
04:58
Cabanossi left
04:59
Cabanossi joined
05:00
mcmillhj joined
05:04
mcmillhj left,
mryan50 left
05:12
mryan50 joined,
ufobat joined
05:15
TEttinger left,
mcmillhj joined
05:20
mcmillhj left
05:22
rngoodn is now known as ryn1x
05:32
domidumont joined,
ryn1x left
05:36
domidumont left
05:44
lowbro joined,
lowbro left,
lowbro joined
05:47
rngoodn joined,
eliv joined
05:48
rngoodn left,
ryn1x joined
05:49
khw left
05:54
ryn1x left
05:55
domidumont joined
05:56
knobo left
05:57
Cabanossi left,
Averna left
05:59
Cabanossi joined
06:10
sprocket left
|
|||
TimToady | hmm, maybe .base above 36 should just return the ":60[12,34,56]" form instead | 06:11 | |
AlexDaniel | m: say 9123607.polymod(37 xx *).reverse | 06:12 | |
camelia | (4 32 4 15 36) | ||
TimToady | well, or we could have a polymul | 06:13 | |
AlexDaniel | for .parse-base? | ||
AlexDaniel doesn't get it | 06:14 | ||
TimToady | I mean going the other direction of extending .base | ||
m: say 9123607.base(37) | 06:15 | ||
camelia | base argument to base out of range. Is: 37, should be in 2..36 in block <unit> at <tmp> line 1 |
||
AlexDaniel | polymod code above is already equivalent to .base(37) | ||
TimToady | but returns a list, not string, unlike .bae | ||
*base | |||
it's just an odd little case of refusing to dwim | 06:16 | ||
or the error should suggest a workaround, but then why not just make it work? | |||
AlexDaniel | m: say sum (37 X**^∞)Z*(<4 32 4 15 36>.reverse) | ||
camelia | 9123607 | ||
TimToady | yeah, completely obvious :P | 06:17 | |
AlexDaniel | well, that's for parse-base | ||
TimToady | well, it's a minor discontinuity | 06:20 | |
TimToady ponders how to detect left-recursion efficiently... | |||
AlexDaniel | TimToady: there we go: RT #132156 | 06:21 | |
synopsebot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=132156 | ||
TimToady | well, that's assuming that's the right decision :) | 06:22 | |
well, it's certainly righter than what we have, just might not be the rightest... | 06:23 | ||
AlexDaniel | some unicode characters would be OK for me, but :60[12,34,56] is arguably wronger than what we have now… | 06:24 | |
because for variable bases you'd suddenly get something completely different when you go over 36 | 06:25 | ||
06:26
knobo joined
06:27
rindolf joined,
Cabanossi left
|
|||
TimToady | not so completely different as the difference between a string and a list though, which is what polymod returns | 06:28 | |
the question is what will be reading the string on the other end, I guess | |||
AlexDaniel | but polymod returns a list consistently | ||
TimToady | not consistently with .base :P | 06:29 | |
AlexDaniel | unfortunately cirlced numbers only go up to ㉟ | ||
06:29
Cabanossi joined
|
|||
AlexDaniel | ah wait | 06:30 | |
06:30
bwisti left
|
|||
AlexDaniel | ㊿ | 06:30 | |
TimToady | still an arbitrary limit | ||
AlexDaniel | TimToady: well, then why not give it a named arg with the character set for produced numbers | 06:33 | |
then you can go as high as you want, as long as you give it enough characters | |||
TimToady | well, but if you're getting that fancy you might as well use polymod and ordinary array lookup rather than reinventing it | 06:34 | |
I don't actually feel terribly strongly about this; it just struck me as an odd discontinuity since we do have a string rep for higher bases | 06:35 | ||
so one could argue that the real discontinuity if we do that is the need to suddenly include the base info in the string when .base(16), say, doesn't | 06:37 | ||
otoh, we note the same sort of defaulting on input: | 06:39 | ||
m: say :16(~:60[1,2,3]) | |||
camelia | 14115 | ||
06:43
andrzejku1 left
|
|||
moritz | .u ㉟ | 06:59 | |
yoleaux | U+325F CIRCLED NUMBER THIRTY FIVE [No] (㉟) | ||
07:01
jonas1 joined
07:02
abraxxa joined
07:10
thou left
07:13
eroux joined
07:17
darutoko joined,
zakharyas joined
07:23
AlexDaniel left
07:27
Cabanossi left
07:29
leont joined,
Cabanossi joined
07:33
margeas joined
07:38
eliv left,
eliv joined
|
|||
Geth | doc: 443b4b2518 | (Steve Mynott)++ | bin/p6doc add warning comment about updating p6doc docs |
07:42 | |
07:44
andrzejku joined
07:49
sena_kun joined
07:51
sproctor joined
07:55
leont left
07:59
Altreus left
08:10
dogbert11 left
08:17
araujo left
08:20
ufobat left,
ufobat joined
08:21
Altreus joined
08:26
leont joined
08:27
Cabanossi left
08:28
konsolebox joined
08:29
Cabanossi joined
08:34
kaare_ joined,
kaare__ left
08:35
zakharyas left
08:37
eliv left
08:38
virtualsue joined
08:40
kaare_ left,
kaare_ joined
08:41
araujo joined
08:42
leont left,
eliv joined,
eliv left,
eliv joined
08:43
kaare_ left,
kaare__ joined
08:48
kaare_ joined,
kaare_ left
08:49
kaare__ left,
kaare_ joined
08:50
kaare__ joined
08:53
kaare__ left,
kaare__ joined
08:54
kaare_ left
08:59
kaare__ left
09:01
kaare__ joined
09:04
mryan50 left
09:12
Cabanossi left
09:14
Cabanossi joined
|
|||
ilmari | m: say ㉟² | 09:21 | |
camelia | 1225 | ||
lizmat | .u ㉟ | 09:25 | |
yoleaux | U+325F CIRCLED NUMBER THIRTY FIVE [No] (㉟) | ||
09:26
robertle joined
09:38
mryan50 joined
09:40
eythian joined
09:46
ChoHag left
09:52
kaare__ left
09:53
ChoHag joined
|
|||
Geth | doc: 73521af75c | (Tom Browder)++ (committed using GitHub Web editor) | bin/p6doc fix typo |
10:08 | |
10:09
wamba left
10:10
kaare__ joined
|
|||
Geth | doc: 3b3c29b675 | (Zoffix Znet)++ | 2 files Document $*INIT-INSTANT Fixes #510 Fixes #1462 Rakudo impl: github.com/rakudo/rakudo/commit/6bdb2dd368 Spec: github.com/perl6/roast/commit/84b48ec92b |
10:19 | |
10:22
eroux left
10:24
mr-foobar left,
bitrauser joined
10:25
dalek left
10:28
virtualsue left
10:29
virtualsue joined,
eliv77 joined
10:30
mr-foobar joined
10:37
kaare__ left,
eliasr joined
10:43
Ven`` joined
10:44
kaare_ joined
10:52
rgrau joined
10:54
mr-foobar left
10:57
eliv77 left
10:58
mr-foobar joined
11:02
ChoHag left
11:13
ChoHag joined
11:24
wamba joined
11:27
Cabanossi left
11:28
sena_kun left
11:29
bitrauser left,
Cabanossi joined
11:40
sena_kun joined
11:41
sena_kun left
11:44
wamba left
11:54
itaipu joined
11:55
ShalokShalom_ is now known as ShalokShalom
11:58
Cabanossi left
11:59
Cabanossi joined
12:12
perlpilot joined
12:14
kurahaupo joined,
kurahaupo left,
kurahaupo joined
|
|||
[Coke] | typo: github.com/perl6/doc/blob/3b3c29b6...pod6#L1102 "statup" | 12:14 | |
12:15
ryn1x joined
|
|||
Geth | doc: ae24046577 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/variables.pod6 s/statup/startup/ |
12:16 | |
12:17
epony left
|
|||
robertle | I would like to load a module at runtime, based on some lookup. I can do "require ::($module-name);" ok, but how can I load it if it's not already in the search path? is there a runtime equivalent of "use lib 'somewhere';"? or is there a "require" with filename rather than module name? | 12:19 | |
jnthn | I vaguely recall `require $filename` working for that | 12:20 | |
moritz | right, just pass in a string | ||
robertle | when I try that I get a "Could not find ... in ...." | 12:21 | |
12:22
ryn1x left
|
|||
robertle | ah, needs an absolute path! | 12:23 | |
aewsome! | 12:24 | ||
Zoffix | ( tangently relevant: the code that pulls code from github repo and loads the module from it if it's not installed: github.com/rakudo/rakudo/blob/nom/...s6#L10-L21 ) | ||
12:25
mr-foobar left
12:27
Cabanossi left
12:28
mr-foobar joined,
nicq20 joined
12:29
Cabanossi joined
|
|||
perlpilot | How does one add to the list of places Rakudo looks for modules at run-time? $*REPO doesn't seem to be very well documented | 12:29 | |
Zoffix | This works perl6 -e 'my $path = get.trim; %*ENV<PERL6LIB> = $path; require Foo' | 12:35 | |
This works too perl6 -e 'my $path = get.trim; qq|use lib <$path>|.EVAL; require Foo' | |||
No idea about $*REPO | |||
moritz | m: say $*REPO.repo-chain | 12:39 | |
camelia | (inst#/home/camelia/.perl6 inst#/home/camelia/rakudo-m-inst-2/share/perl6/site inst#/home/camelia/rakudo-m-inst-2/share/perl6/vendor inst#/home/camelia/rakudo-m-inst-2/share/perl6 CompUnit::Repository::AbsolutePath.new(next-repo => CompUnit::Repository::… | ||
Zoffix | perlpilot: .use-repository: .repository-for-spec: $path.IO.absolute given CompUnit::RepositoryRegistry; | 12:41 | |
That's what `use lib` does under the hood | |||
huggable: run-time use lib :is: Add module search path at runtime: .use-repository: .repository-for-spec: $path.IO.absolute given CompUnit::RepositoryRegistry; | |||
huggable | Zoffix, Added run-time use lib as Add module search path at runtime: .use-repository: .repository-for-spec: $path.IO.absolute given CompUnit::RepositoryRegistry; | ||
[Coke] | Zoffix++ | 12:43 | |
12:44
mryan50 left
|
|||
Zoffix | (P.S.: .EVAL example above is dangeruuus; do not use :) ) | 12:45 | |
12:46
Aaronepower left
12:55
epony joined
12:56
HoboWithAShotgun joined,
mcmillhj joined
13:07
cdg joined
13:08
wamba joined
13:13
kyan joined,
Cabanossi left
13:14
Cabanossi joined
|
|||
kyan | Um, so I can use <?{ if condition { fail; }; }> in a grammar to fail a parse. Is there a way to do change that so it just fails matching the specific token, and continues with parsing? | 13:18 | |
TimToady | there are a number of things you could mean by "continues with parsing", so I'm wondering which one it is :) | 13:25 | |
kyan | TimToady: In other words, if I have a token baz { <foo> || <bar> }, and token foo { <?{ if condition { fail; }; }> }, I'd want it to continue to try to match <bar> if "condition" were true | 13:30 | |
timotimo | if you return a boolean from the code block it gives you a match success or match failure | ||
just like when you put a "foo" in the regex but there's no "foo" in the source. that kind of failure | 13:31 | ||
i.e. it'll also cause backtracking of stuff before it | |||
m: say "hello world" ~~ / .<?{ say "tried $/"; $++ > 5 }> / | |||
camelia | tried h tried e tried l tried l tried o tried tried w tried o tried r tried l tried d Nil |
||
timotimo | oh? | ||
kyan | Ok. Interesting. It seems to be ditching out for me | 13:32 | |
timotimo | anyway, "fail" is a lot lkie a "return" | ||
m: say "hello world" ~~ / .<?{ say "tried $/"; say $++; $++ > 5 }> / | |||
camelia | tried h 0 tried e 0 tried l 0 tried l 0 tried o 0 tried 0 tried w 0 tried o 0 tried r 0 tried l 0 tried d 0 Nil |
||
timotimo | okay, $++ isn't what i should use there | ||
13:33
mcmillhj left
|
|||
kyan | I think I might be starting to wrap my head around how that works. | 13:33 | |
Zoffix | m: my $tries; say "hello world" ~~ / .<?{ say "tried $/"; $tries++ > 5 }> / | 13:35 | |
camelia | tried h tried e tried l tried l tried o tried tried w 「w」 |
||
TimToady | note that it'll also backtrack into a | | 13:36 | |
and pick the next longest token to try | |||
kyan | Cool. Thanks! :D | ||
Zoffix | m: say "hello world" ~~ /<?{True}>/ ?? "Matched" !! "Not matched"; say "hello world" ~~ /<?{False}>/ ?? "Matched" !! "Not matched" | ||
camelia | Matched Not matched |
||
Morfent | perl regex is mindblowing compared to other languages' regex i've had to work with before | ||
TimToady | that's probably where break-everything-that-needs-breaking caused the most redesign | 13:37 | |
Morfent | which half the time was manually wrangling strings when lookbehind would've been nice to have | ||
TimToady | though you have to be a little careful with lookbehind, since it might violate the one-pass parsing idea | 13:38 | |
kyan | (not-exactly-related question: is there a way to make multiline Q[foo] string literals work with whitespace?) | ||
TimToady | for instance, never check to see if something is backslashed using lookbehind | ||
Zoffix | kyan: work how? | ||
Morfent | yeah, i avoid using it when i can | 13:39 | |
TimToady | because what if the backslash is backslashed, and then what if that one is backslashed? | ||
kyan | Ok, that was a really unclear way of phrasing it. Sorry. I'll make a gist showing what I mean | ||
kyan has not had enough coffee yet | |||
Zoffix | m: gist.github.com/zoffixznet/d1dade1...6d24488574 | 13:40 | |
camelia | Foo bar meow Meow meow mow Moooo |
||
Zoffix | kyan: I think you're talking about HEREDOCs ^ | ||
13:41
rgrau left
|
|||
kyan | gist.github.com/ethus3h/0d97aa6603...032ef590d3 | 13:42 | |
13:42
skids joined
|
|||
kyan | Zoffix: Aha, precisely. Thanks! ♥ | 13:43 | |
(your mind reading skills are impressive. I wouldn't have understood my question if I hadn't written it, upon looking back.) | 13:44 | ||
13:45
wamba left
13:48
HoboWithAShotgun left
|
|||
kyan | Thanks all for all your help. :D Off to class now... Bye! | 13:48 | |
13:49
kyan left
13:51
mcmillhj joined
|
|||
Zoffix | You know what's fun? That you can use fancy unicode chars for the `:to` delimiters that delimit a fancy unicode char for the heredoc | 13:51 | |
m: say Q:to♥✎♥; Foo bar meow Meow meow mow Moooo ✎ | |||
camelia | Foo bar meow Meow meow mow Moooo |
||
Zoffix | ehehe | ||
Apparently the colon isn't even needed in that case | 13:53 | ||
m: say Qto✏✎✏; Foo bar meow Meow meow mow Moooo ✎ | |||
camelia | Foo bar meow Meow meow mow Moooo |
||
13:54
mcmillhj left,
mr-foobar left
13:56
mr-foobar joined
14:00
leont joined,
epony left
14:03
eliasr left
14:06
HoboWithAShotgun joined
14:07
mcmillhj joined,
wamba joined
14:10
ShalokShalom_ joined,
bdmatatu joined
14:11
konsolebox left
14:12
Cabanossi left
14:13
ShalokShalom left
14:14
Cabanossi joined
|
|||
Zoffix | m: 「foo\\\bar\bar」.subst(:g, /<!after 「\」> 「\」 ./, {.Str eq 「\\」 ?? 「\」 !! .uc}).put | 14:18 | |
camelia | foo\\bar\Bar | ||
Zoffix | ^_^ | ||
14:18
Aaronepower joined
|
|||
Zoffix | Don't really get why it's not working right. The subbed part is re-examined or what? | 14:19 | |
Ah, ok, nevermind | 14:20 | ||
jnthn | 'win 23 | 14:21 | |
oops :) | |||
Zoffix adds that to the lottery patterns | 14:22 | ||
14:22
buggable left
|
|||
Zoffix | 'win 42 | 14:23 | |
14:23
buggable joined
|
|||
buggable | Zoffix, Thank you for entering Accidental /win Lottery! The next draw will happen in 5 days, 9 hours, 36 minutes, and 52 seconds | 14:23 | |
Zoffix | .oO( wonder why it used to be under @perl6.party but rejoined under @IPv6 ) |
14:24 | |
14:33
lowbro left
14:35
wamba left
14:36
leont left
14:38
AlexDaniel joined
14:39
wamba joined
14:40
eliasr joined
14:48
jonas1 left
|
|||
Zoffix | m: 「foo\\\bar\bar」.subst(:g, /「\」./, *.comb.tail.uc).put | 14:49 | |
camelia | foo\BarBar | ||
Zoffix | I gave up trying to do it with lookbehind :) | ||
m: 「foo\\\bar\bar」.subst(:g, /<!after 「\」**{1,3…5555}> 「\」 ./, *.comb.tail.uc).put # other than this, I mean | 14:51 | ||
camelia | foo\BarBar | ||
Zoffix | m: 「foo\\\bar\bar」.subst(:g, /<!after $0=[「\」+] {dd $0}> 「\」 ./, *.comb.tail.uc).put | 14:52 | |
camelia | Nil foo\\barBar Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil |
||
14:53
TEttinger joined
|
|||
Zoffix | And I kinda expected the stuff inside <after> to be its own match object that I could introspect while matching, but seems its empty or something | 14:53 | |
Ah, it just don't capture | |||
14:54
mr-foobar left
14:55
leont joined
14:59
mr-foobar joined
|
|||
Zoffix | m: 「foo\\\bar\bar」.subst(:g, /<!after <!{$/.orig.substr($/.pos).subst: /^ (「\」+) <?{$0.chars %% 2}>/, ""}>> 「\」 ./, *.comb.tail.uc).put | 15:00 | |
camelia | foo\BarBar | ||
Zoffix | Yes. I win :) | ||
AlexDaniel | e: .say for sort (.unival for 1..0x10FFFF).unique | 15:07 | |
evalable6 | (signal SIGHUP) «timed out after 10 seconds» | ||
AlexDaniel | :( | 15:08 | |
15:08
kyan joined
15:10
geekosaur left
15:11
geekosaur joined
15:12
Cabanossi left
15:14
Cabanossi joined
15:15
eliv left
15:18
ChoHag left
15:20
rgrau joined
15:32
knobo left
15:33
domidumont left
15:37
notostraca joined
15:39
TEttinger left
15:47
epony joined,
kyan left
15:49
notostraca is now known as TEttinger
15:54
robertle left
15:56
troys joined
15:58
abraxxa left
15:59
mcmillhj left
16:05
domidumont joined
|
|||
leont | Zoffix: you keep breaking my stuff! :-p github.com/Leont/build-graph6/issues/3 ;-) | 16:07 | |
Zoffix | leont: it still works, it's just deprecated. | 16:08 | |
Blame the person who documented an unspecced feature :) | |||
greppable6: \$\*INITTIME | 16:09 | ||
greppable6 | Zoffix, gist.github.com/d775c42b964195bb65...9c65023e14 | ||
Zoffix | I guess I should've checked that :} | ||
16:10
ChoHag joined
|
|||
Zoffix makes PRs | 16:10 | ||
16:12
Cabanossi left
16:14
Cabanossi joined
|
|||
Zoffix | leont: github.com/Leont/build-graph6/pull/4 | 16:15 | |
16:18
khw joined
16:19
wander4096 joined
16:20
ryn1x joined
16:24
ryn1x left
16:25
mr-foobar left,
mcmillhj joined
16:26
wander4096 left
16:27
mr-foobar joined,
wamba left
|
|||
leont | Fix looks good to me | 16:27 | |
16:28
st_elmo joined
|
|||
Zoffix | japhb: (I think you have commit rights): github.com/ab5tract/Terminal-Print/pull/53 | 16:28 | |
16:30
thou joined
16:31
chakli joined,
eliv77 joined,
ChoHag left
16:33
rgrau left
16:36
sproctor left
|
|||
[Coke] | github.com/perl6/doc/blob/ae240465...pod6#L1104 - typo in docs. "miliseconds" | 16:47 | |
16:47
dogbert2 joined
|
|||
Zoffix | gah. I can't type at all :D | 16:47 | |
Geth | doc: 2cdbde8c91 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/variables.pod6 s/miliseconds/milliseconds/; |
16:48 | |
16:51
ShalokShalom_ is now known as ShalokShalom
16:52
chakli left
16:53
thou left
16:56
mr-foobar left
|
|||
[Coke] | if I have a Proc::Async and want to feed the output of that to the input of another Proc::Async, is there a way to do it without having to explicitly tap the first and have it write to the second? | 16:59 | |
16:59
mr-foobar joined
17:01
robertle joined
17:02
ryn1x joined,
Ven joined
17:03
ryn1x left,
Ven is now known as Guest72709
|
|||
Zoffix | Don't see a way without raking object guts with nqp | 17:03 | |
17:03
ryn1x joined
|
|||
ilmari | $proc1.bind-stdout($proc2.stdin) or vice versa? | 17:05 | |
AlexDaniel | Zoffix: I just realized… | ||
Zoffix | $proc2.stdin returns a Supply tho | ||
AlexDaniel | Zoffix: merging these PRs will make the tests fail on all rakudos before 2017.10 | ||
Zoffix | I meant, it doesn't return an IO::Handle | ||
AlexDaniel | Zoffix: including the previous rakudo star | ||
Zoffix | AlexDaniel: why? | 17:06 | |
AlexDaniel: which PRs the INITTIME ones? | |||
AlexDaniel | Zoffix: ah sorry, didn't look into the PRs themselves | ||
nevermind then :) | |||
Zoffix | :) | ||
ryn1x | lizmat: Just checking back in about the selling the stuffed camelia's online... | ||
Zoffix | $proc2.stdin isn't a method actually. | ||
AlexDaniel | Zoffix++ | ||
Zoffix | Well, there's .bind-stdout that takes an IO::Handle and there's a .bind-stdin that takes IO::Handle and they use .native-descriptor to do their thing, but I don't know how to chain the two together | 17:07 | |
17:08
ChoHag joined
|
|||
ilmari | there's a .bind-stdin that takes a Proc::Async::Pipe | 17:08 | |
Zoffix | Ohhh | 17:09 | |
ilmari | which is what .stdout(:bin) returns | ||
so $proc2.bind-stdin($proc1.stdout(:bin)) | 17:10 | ||
17:10
frobisher joined
17:11
leont left
|
|||
ilmari | hence "or vice versa" above, because I couldn't immediately figure out which way around they went together | 17:11 | |
hedging++ | |||
AlexDaniel | github.com/perl6/doc/issues/1580 | ||
ilmari | AlexDaniel++ # that was quick | 17:12 | |
Zoffix | m: this works: my $proc1 = Proc::Async.new: "cal"; my $proc2 = Proc::Async.new: «perl6 -e "slurp.uc.put"»; $proc2.bind-stdin: $proc1.stdout: :bin; await $proc1.start, $proc2.start | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Undeclared routine: works used at line 1. Did you mean 'words', 'ords'? |
||
Zoffix | ilmari++ | ||
s/m: //; | 17:13 | ||
ilmari | jnthn++ # added bind-stdin(Pipe) in June | 17:15 | |
17:18
Guest_ joined,
Guest_ left
|
|||
[Coke] | ilmari++ jnthn++ danke. | 17:20 | |
Zoffix++ | 17:21 | ||
ilmari | huggable: hug everyone | ||
huggable hugs everyone | |||
17:21
thou joined
17:27
leont joined
17:28
andrzejku_ joined
|
|||
leont | Can someone remind me how I can check if the current rakudo is 2017.09+ or not? | 17:30 | |
17:31
troys is now known as troys_
|
|||
Zoffix | m: say not $*PERL.compiler.version before 2017.09 | 17:31 | |
camelia | True | ||
Zoffix | c: 2017.04 say not $*PERL.compiler.version before 2017.09 | ||
committable6 | Zoffix, ¦2017.04: «False» | ||
Zoffix | m: say $*PERL.compiler.version !before 2017.09 # prolly clearer | 17:32 | |
camelia | True | ||
Zoffix | m: say $*PERL.compiler.version !before v2017.09 # prolly clearer | 17:33 | |
camelia | True | ||
Zoffix | Oops :) missed a `v` :) | ||
m: say $*PERL.compiler.version >= v2017.09 # prolly clearer | 17:34 | ||
camelia | True | ||
Zoffix | m: say $*PERL.compiler.version ≥ v2017.09 # prolly clearer | 17:35 | |
camelia | Cannot resolve caller Real(Version: ); none of these signatures match: (Mu:U \v: *%_) in block <unit> at <tmp> line 1 |
||
Zoffix | haw | ||
lame | |||
leont | Thanks! | 17:36 | |
17:36
Guest72709 left
|
|||
Zoffix | Ah, it's due to the temp fix for the bug that makes ≥ 50x slower than >= Not all the >= candidates were added as ≥ | 17:36 | |
Zoffix hackety hacks | |||
17:40
itaipu left
|
|||
frobisher | Huh. Apparently I've been away from IRC so long that someone managed to appropriate my nick. :-/ | 17:40 | |
Zoffix | What did it use to be? | 17:41 | |
frobisher | dha | ||
Zoffix | Ah | ||
Should've registered :} | |||
frobisher | I did. | ||
If registrations don't expire, then I have no idea what happened. | 17:42 | ||
Zoffix | Hm... I think I recall a few month back Freenode saying you need to re-login if you want to keep your registration or something | ||
17:42
HoboWithAShotgun left
|
|||
teatime | I don't think they do automatically, but after a certain period of inactivity people can request staff to delete them so they can register it. | 17:42 | |
Zoffix | frobisher: it's still registered dude | 17:43 | |
frobisher: just log in and do /ghost dha | |||
frobisher | Oh. Or possibly, as it seems to be logged in from Amsterdam, maybe I somehow never got logged out. | ||
Zoffix | :D | ||
teatime | lol | ||
frobisher | Apparently, I may not ghost dha. | ||
Zoffix | You need to log in first | ||
frobisher | I'm confused. what does "log in" mean in this context? | 17:44 | |
Zoffix | login into nickserv | ||
teatime | frobisher: identify. /msg nickserv help identify | ||
frobisher | ah. | 17:45 | |
Zoffix | Syntax: GHOST <nick> [password] | ||
/msg NickServ ghost dha your-pass | |||
17:46
frobisher is now known as dha,
Zoffix left
|
|||
dha | huzzah! | 17:46 | |
thanks. | |||
lizmat | .oO( dha's back! :-) |
||
dha | Indeed. :-) | 17:47 | |
17:48
HoboWithAShotgun joined,
Zoffix joined
|
|||
leont | I don't understand the results observed in github.com/Leont/yamlish/issues/17 | 17:50 | |
That element should be a regex and not a token, I can understand | |||
But why also TOP? | |||
tinita | leont: btw, i ran the test suite matrix on yamlish. it took 18 minutes though, and i'm not sure i want to run that every time i regenrate it | 17:55 | |
17:55
mr-foobar left
|
|||
tinita | i think i need to write a script that runs all tests in one process | 17:55 | |
it passed 80 tests and died for 123 tests | 17:56 | ||
Zoffix | I don't get how that grammar matches with `regexes` at all. Wouldn't `no bar` match the `no` first and then fail because not entire string was matched? | ||
tinita | leont: flens.perlpunks.de/tinita/ytm/ # note that this is temporary | 17:57 | |
17:57
mr-foobar joined,
Ven joined,
Ven is now known as Guest37155
|
|||
leont | tinita: well, the link I just posted might explain some of those failures | 17:58 | |
17:58
wamba joined
|
|||
leont | In recent times I discovered a whole bunch of issues that need to be fixed -_- | 17:58 | |
Zoffix | Ah | ||
leont | Fixing tags/anchors on block sequences and maps would probably help a lot too | 17:59 | |
Zoffix | leont: I see why also TOP: `rule TOP` matches "no" as `<element>` but that's not the end of string, so it still has to backtrack to match a different `<element>` | ||
leont | Ah, I see. I hadn't realised that | 18:00 | |
tinita | leont: i hope i have time soon to write a batch script for the matrix tests. until then, i'll keep perl6 off the matrix | ||
leont: are you using the test suite yourself? | |||
leont | It shouldn't be that slow though, that would make me suspect something disagrees with precompilation or some such | 18:01 | |
tinita | leont: the funny thing is, the json dumper version is a bit faster | ||
15 minutes | |||
and the first one is always very slow | 18:02 | ||
leont | Your test suite? No not yet. Hadn't come around to setting that up. Is there a write-up of how to do that? | ||
tinita | so it seems precompilation is happening at least | ||
18:02
wamba left
|
|||
tinita | leont: you can just checkout the 'data' branch of yaml/yaml-test-suite | 18:03 | |
any error tests have an 'error' file in their directory, so these should fail | |||
so even if you don't output events yet, you can use it to see if parsing succeeds or not | 18:04 | ||
for perl5 YAML::PP i include the data directory in my release tarball | |||
i think it's time to add some more infos to the test suite README | 18:07 | ||
18:08
thou left,
Guest37155 left
|
|||
leont | One clear thing in that test is that currently tags are broken and anchors have issues, which isn't that much of a surprise | 18:08 | |
tinita | =) | 18:09 | |
18:09
Ven_ joined
|
|||
leont | ast branch should make fixing that easier, though actually solving it will mean more serious refactoring of the grammar | 18:10 | |
18:10
cdg left
18:11
cdg joined
18:13
Cabanossi left
18:14
Cabanossi joined
18:15
cdg left
18:17
thou joined
18:21
wamba joined
18:22
troys_ is now known as troys,
Rawriful joined
18:25
ChoHag left,
ChoHag joined
18:26
leont left,
leont joined
18:33
eliasr left
18:36
espadrine joined
18:37
itaipu joined
18:38
leont left,
rurban joined,
rurban left
18:39
domidumont left
18:57
Cabanossi left
19:00
Cabanossi joined
19:01
st_elmo left
19:03
ChoHag left
19:05
ryn1x_ joined
19:06
tom_ joined
19:08
Toni_ joined,
tom_ left
|
|||
Toni_ | hi | 19:08 | |
19:09
darutoko left
|
|||
Toni_ | how can I execute a sub which has its name in a variable? | 19:09 | |
19:09
devmikey joined
|
|||
Toni_ | sub s { say "something"} | 19:09 | |
my $x = "s" | |||
19:09
itaipu left
19:10
ryn1x_ left
|
|||
Toni_ | i want to execute $x | 19:10 | |
Zoffix | sub s { say "something"}; my $x = "s"; ::("&$x")() | ||
m: sub s { say "something"}; my $x = "s"; ::("&$x")() | |||
camelia | something | ||
19:10
Ven_ left,
itaipu joined
|
|||
Zoffix | ::() is symbol look up. Sub symbols have "&" in front of names. And the trailing () execute it (and can take args) | 19:10 | |
Toni_ | thank you Zoffix | 19:11 | |
19:14
eliv77 left
19:16
thou left
|
|||
lizmat is almost done with this week's Perl 6 Weekly | 19:21 | ||
are there any things you think I may have missed, *now* is the time to let me know! | |||
19:25
patrickz joined
19:27
wamba left
19:28
wamba joined
19:29
raschipi joined
|
|||
timotimo | i don't remember doing anything of interest the last week | 19:30 | |
the grant proposal wasn't in the last weekly, though? | |||
only until tomorrow to comment on it | |||
though i'm not sure if many readers of the weekly are good people to ask for comments here on that | 19:31 | ||
lizmat | timotimo: it wasn't in last weeks, it is in this weeks | 19:33 | |
timotimo | OK | 19:39 | |
19:40
mryan50 joined
19:43
cdg joined
19:45
robertle left
19:56
mr-foobar left
19:57
bdmatatu left,
thou joined
19:59
mr-foobar joined
|
|||
lizmat | and another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2017/09/25/...-the-pool/ | 20:02 | |
Zoffix | \o/ | 20:07 | |
raschipi | \0/ | 20:08 | |
20:09
ChoHag joined
20:10
leont joined
|
|||
AlexDaniel | “I promise to travel to wherever you live and kiss your feet if you do this latter task” | 20:11 | |
(www.reddit.com/r/perl6/comments/71.../dnd8e9m/) | |||
20:12
Cabanossi left
|
|||
Zoffix | Gross | 20:13 | |
lizmat++ good weekly | |||
Lots of new namea I don't recognize | |||
names | |||
20:14
Cabanossi joined
20:15
andrzejku_ left
|
|||
dha | lizmat++ | 20:17 | |
sjn reads the weekly | 20:23 | ||
Geth | ecosystem: 4710e04096 | (Jonathan Stowe)++ | META.list Add GDBM See github.com/jonathanstowe/p6-GDBM |
20:32 | |
20:41
patrickz left
20:43
ryn1x left
20:50
itaipu left
|
|||
AlexDaniel | “and as far as syntax, capital letters just everywhere. Sometimes entire words capitalized. I use Perl in my dev environment, which I SSH into, and it is a nightmare to try to type Perl 6 code” | 20:53 | |
20:53
wamba left
|
|||
AlexDaniel | XD somebody has troubles typing capital letters | 20:53 | |
don't tell them about unicode stuff we use | |||
( www.reddit.com/r/perl/comments/714...5/dn9capm/ ) | 20:54 | ||
21:01
rgrau joined,
Toni_ left
21:02
skids left
|
|||
Zoffix | But it doesn't say they have trouble typing capital letters. I don't know why people are mocking that person. | 21:08 | |
21:09
mryan50 left
|
|||
geekosaur | -Wtrigraphs, anyone? | 21:10 | |
timotimo | right, they complained that allcaps words are ugly to them, and then went on to say typing perl6 code is no fun for them | 21:11 | |
21:11
setty1 left
21:14
pmurias joined
|
|||
Zoffix | geekosaur: sounds like a perfect idea for a Slang :P | 21:16 | |
21:17
mcmillhj left,
dha left
21:19
leont left
21:20
rindolf left
21:22
mryan50 joined
21:28
Cabanossi left
21:29
Cabanossi joined,
HoboWithAShotgun left
|
|||
mryan50 | Are there any known problems installing ‘v5’ with zef? | 21:30 | |
21:30
HoboWithAShotgun joined,
espadrine left
|
|||
[Coke] | Is v5 working? no travis setup, 8 open issues... | 21:31 | |
Looks like v5 is depending specfically on Panda modules | 21:32 | ||
... without declaring this; so zef doesn't install them for you. | |||
lizmat | v5 is pretty bitrotten afaik | 21:33 | |
mryan50 | I’m a newbie so, I didn’t know where to look. Ok. So if v5 doesn’t work, one would expect the tests in S01-perl-5-integration should be expected to fail? | ||
timotimo | i believe v5 is bitrotted by a lot | ||
those probably use Inline::Perl5 though | |||
mryan50 | ahh.. thanks | 21:34 | |
[Coke] | (Panda) I did zef install Panda::Common, that grabbed all the deps, then it hangs during the build. | 21:35 | |
timotimo | shall we remove panda from the ecosystem in a month or two? | ||
maybe also ufo? | |||
mryan50 | So, how does one know what tests to expect to (not) work in t/spec ? | 21:36 | |
21:36
ryn1x joined
|
|||
timotimo | there's the spectest.data that defines what gets tried at all | 21:36 | |
inside the t folder | 21:37 | ||
mryan50 | ok. ta | ||
timotimo | individual tests are "fudged" with text like #?rakudo skip or todo or something | ||
AlexDaniel | m: say 42; LEAVE say ‘bye’; | ||
camelia | 42 bye |
||
21:37
pmurias left
|
|||
AlexDaniel | m: say 42; exit 0; LEAVE say ‘bye’; | 21:37 | |
camelia | 42 | ||
21:37
troys is now known as troys_
21:38
thou left
21:41
ryn1x left
21:42
HoboWithAShotgun left
21:47
rindolf joined
21:49
pmurias joined
21:51
margeas left
21:53
epony left
21:59
john51 joined
22:01
john51_ left
22:02
Praise left
22:07
TimToady left,
thou joined
22:09
TimToady joined
22:10
epony joined
22:12
pmurias left
22:19
epony left,
epony joined
22:21
mryan50 left
22:38
skids joined
22:41
mryan50 joined
22:46
rindolf left
22:47
sverre_ joined
22:48
sverre_ left,
sverre_ joined,
kurahaupo_ joined
22:49
kurahaupo_ left,
kurahaupo_ joined
22:50
kurahaupo left
22:55
sverre_ left,
sverre_ joined,
sverre_ left
22:56
Cabanossi left,
sverre_ joined
22:59
Cabanossi joined
|
|||
thou | Is it possible to do $foo.match() or $foo ~~ / pat / inside an action method? I get "Cannot assign to a readonly variable ($/) or a value". gist.github.com/softmoth/e63b4920d...d4ce065420 | 23:00 | |
Zoffix | thou: don't name the parameter $/ | ||
thou | oh, that seems simple enough | 23:01 | |
Zoffix | :) | ||
23:01
cdg left
|
|||
Zoffix | m: gist.github.com/zoffixznet/c066951...aae3069d5b | 23:01 | |
camelia | HI HI | ||
thou | … and it is simple! | ||
23:04
ufobat left
23:05
epony left
23:08
geekosaur left
|
|||
Zoffix | The error likely can be improved. Filed as rt.perl.org/Ticket/Display.html?id=132162 | 23:09 | |
23:10
Rawriful left
23:16
geekosaur joined
23:18
troys_ is now known as troys
|
|||
teatime | hmmmm... I just had a maybe really good idea... how about a weekly Perl6 quiz, like rubyquiz.com/ ? Would give me a project to do, generate a bunch of example Perl6 code for folks to read, and be a source of regular semi-interesting exercises for people wanting to learn/practice Perl6. | 23:22 | |
there used to be at least one Perl5 one | 23:23 | ||
Zoffix | teatime: do it! :) | ||
teatime | Zoffix: does it seem like a legit promising idea, or are you just being generically encouraging? :) | 23:26 | |
23:28
sverre_ left
23:29
Cabanossi left
|
|||
Zoffix | teatime: promising idea | 23:29 | |
23:29
Cabanossi joined
|
|||
Zoffix | There is (used to be?) 6Fix that emailed challenges. I had trouble using the system and never got more than 3 first challenges | 23:30 | |
teatime | ah yes... I had forgotten how long perl6 has actually been around. | 23:31 | |
23:31
devmikey left
23:32
Praise joined,
Praise left,
Praise joined
23:34
cdg joined
23:48
kyan joined
23:57
thou left
23:58
Cabanossi left
23:59
Cabanossi joined
|