»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend! Set by masak on 12 May 2015. |
|||
00:07
firstdayonthejob left
00:08
AlexDaniel left,
pmurias_ left
00:11
adu left
00:17
Ven_ joined
00:20
AlexDaniel joined
00:25
Ven_ left
00:32
aborazmeh joined,
aborazmeh left,
aborazmeh joined
00:40
raiph left
00:42
espadrine left
00:58
perlawhirl joined,
eliasr joined
|
|||
dalek | ast: 799f8f6 | TimToady++ | S32-exceptions/misc.t: routine suggestions now leave off & |
01:03 | |
01:04
yqt left,
yeahnoob joined
|
|||
dalek | p: 3fc7722 | TimToady++ | src/vm/moar/QAST/QASTOperationsMAST.nqp: tab damage |
01:10 | |
p: 4888aa6 | TimToady++ | / (27 files): Merge branch 'master' of github.com/perl6/nqp |
|||
p: c199c14 | TimToady++ | / (48 files): Merge branch 'master' of github.com/perl6/nqp |
|||
p: 64f13fc | TimToady++ | / (8 files): Merge branch 'master' of github.com/perl6/nqp |
|||
p: 237fd82 | TimToady++ | src/ (2 files): Merge branch 'master' of github.com/perl6/nqp |
|||
p: 9cc4494 | TimToady++ | / (15 files): Merge branch 'master' of github.com/perl6/nqp |
|||
p: 972432c | TimToady++ | src/QRegex/P6Regex/Actions.nqp: Catch missing + or - between cclass elems |
|||
TimToady | wow | 01:11 | |
dalek | kudo/nom: c0fa4af | TimToady++ | tools/build/NQP_REVISION: bump NQP to get missing + or - between cclass elems |
||
01:13
finanalyst joined
01:19
finanalyst left
01:21
Ven_ joined
|
|||
TimToady | those merges are all just from doing periodic ". config.status" | 01:25 | |
maybe there's a way to tune that out somehow? | 01:26 | ||
01:29
Ven_ left
01:31
leont left
|
|||
dalek | c: de9e7f3 | (Stéphane Payrard)++ | doc/Language/faq.pod: tyop |
01:32 | |
psch | TimToady: that usually happen when you're not on origin HEAD, then commit and pull after | 01:37 | |
TimToady: that's assuming less git-familiarity than you might have, though | |||
TimToady: rebasing usually purges merge commits | |||
the funny bit is that git log only shows one merge commit | 01:38 | ||
mrf | urgh Its far to early. | ||
psch | so, yeah, something is weird in there | ||
psch shrugs | 01:39 | ||
probably not really something i know enough about - neither it being early nor why there's so much merge commit spam | 01:40 | ||
01:43
Actualeyes joined
|
|||
mrf | Its 1.45 in the UK. Thats early enough I think :D | 01:44 | |
01:48
tokuhiro_ joined
01:52
tokuhiro_ left
|
|||
mrf | m: say "hello" ~~ /l ** 0..2/ | 01:53 | |
camelia | rakudo-moar 273e89: OUTPUT«「」» | ||
mrf | m: say "hello" ~~ /l ** 1..2/ | 01:54 | |
camelia | rakudo-moar 273e89: OUTPUT«「ll」» | ||
mrf | ^ is that a bug? I would expect the 0**2 to match 2 l's as well | ||
TimToady | first match takes priority over longest, and it matches '' at the beginning | 02:05 | |
mrf | TimToady: How come the 1..2 doesn't only match 1 l in the second example? | 02:06 | |
timotimo | mrf: if you want that, you'd need frugal instead of greedy matching | 02:08 | |
yoleaux | 2 Nov 2015 16:42Z <nine> timotimo: found another issue with the for range optimization. Now there's only one left (last/next support) till we have a clean spec test again :) | ||
02:09
dayangkun joined
|
|||
mrf | timotimo: Yeah I am just confused why 0..2 appears as non greedy but 1..2 is greedy | 02:09 | |
timotimo | it's not greedy vs non-greedy | ||
it's what TimToady said. early match trumps all | |||
so when it can match 0 times at the beginning, it's satisfied | |||
m: say "lhello" ~~ / l ** 1..2 / | 02:10 | ||
camelia | rakudo-moar 273e89: OUTPUT«「l」» | ||
timotimo | er | ||
m: say "lhello" ~~ / l ** 0..2 / | |||
camelia | rakudo-moar 273e89: OUTPUT«「l」» | ||
timotimo | you can see it greedily matches as many ls as it can. just turns out the most ls it could match at the beginning of "hello" is 0 | ||
mrf | ...Right! so if it matches without having to step further along the string then it stops becuase its all ready matched | 02:11 | |
timotimo | that's right | ||
mrf | Thats likely to have a rather large impact on my patch allowing ^x syntax | 02:12 | |
becuase 0..* will always match surely | |||
on the plus side it means that the two failing tests in my patch are just erroneous tests. Which means its good to go | 02:18 | ||
TimToady | it's relatively useless for scanning, sure, but most parsing doesn't scan, but anchors each match at the end of the previous | ||
mrf | TimToady: Yeah. I can see its use. Just a lack of understanding on my part | 02:19 | |
02:20
sprocket joined
02:25
Peter_R left
|
|||
mrf | TimToady: Don't worry about that earlier gist. I have pushed a PR for NQP to support using 1^ and ^2 for the ** quantifier | 02:28 | |
02:28
xpen joined
|
|||
awwaiid | Hello. Are any of the caller semantics for EVAL documented/standardized? I want to use things like use caller(...).line and have it use the 'context' passed in, but so far no dice | 02:29 | |
02:29
kaare_ joined
|
|||
awwaiid | as in EVAL('callframe().file ~ ":" ~ callframe().line') vs EVAL('callframe().file ~ ":" ~ callframe().line', context => CALLER::) | 02:29 | |
mrf | timotimo: You might be interested in that PR tbh | 02:33 | |
awwaiid | I'm prrreetttyyyy sure the answer is "caller as a param for EVAL kinda works and is a rakudo-only feature" | 02:34 | |
02:38
BenGoldberg joined
02:45
atweiden joined
|
|||
sprocket | i’m writing a NativeCall binding to a struct whose structure differs on various platforms (ie. OS X vs Linux) | 02:51 | |
how can i write the definition so that the correct struct is used on different architectures? | |||
at the moment i’ve got: if ($*KERNEL eq 'darwin') { … } else { …. } | |||
but when i attempt to run, it complains that it “Could not locate compile-time value for symbol” | 02:52 | ||
02:55
finanalyst joined
02:59
softmoth left
03:00
softmoth joined
|
|||
BenGoldberg | m: my uint8 $x = 1; $x +<= 7; say $x; | 03:03 | |
camelia | rakudo-moar 273e89: OUTPUT«-128» | ||
BenGoldberg | m: my uint8 $x = 1; $x += 255; $x += 0; say $x; | 03:04 | |
camelia | rakudo-moar 273e89: OUTPUT«0» | ||
03:05
uruwi joined
|
|||
dalek | osystem: 23b1db8 | (Fayland Lam)++ | META.list: Add Cache::LRU to ecosystem See github.com/fayland/perl6-Cache-LRU |
03:11 | |
03:13
raiph joined,
kid51 left
03:16
aborazmeh left
|
|||
psch | mrf: fwiw, 1^ looks really weird to me | 03:17 | |
m: say 1^ | |||
camelia | rakudo-moar 273e89: OUTPUT«5===SORRY!5=== Error while compiling /tmp/D2Luq2j7sDMissing required term after infixat /tmp/D2Luq2j7sD:1------> 3say 1^7⏏5<EOL> expecting any of: prefix term» | ||
psch | mrf: i assume it's short for 1 ^.. * | ||
mrf | psch: yes. | ||
psch | well, it's not like i can parse every syntax in perl6 without having to think about it... :) | 03:18 | |
mrf | I am not married to it. Was just easier to implement than catching another special case | 03:19 | |
psch | i don't really object, it's probably a useful enough shorthand | ||
considering /a{M,}/ is gone | 03:20 | ||
mrf | It certainly seemed useful enough as a 'more than' quantifier | ||
psch | so having /a ** M^/ as non-whatever-or-infix:<..>-for is neat | ||
to rephrase, having /a ** M^/ as shorthand for /a ** M..*/ seems useful enough, considering perl5 allowed leaving either end out | 03:21 | ||
timotimo | except M^ would be M+1..* | ||
with parens | |||
i am late for bed | 03:22 | ||
psch | huh | ||
yeah, that | |||
also i apparently misremembered leaving M out in {M,N} | |||
perl5 doesn't allow that | |||
timotimo | "perl5 doesn't do it" isn't a good reason to not do something, however, by now i'm afraid it might be a tiny bit more confusing to put ^ in there when it implies a +1 (or -1) | 03:23 | |
03:27
adu joined
|
|||
Hotkeys | Also while @foo[^10] easily reads as "the first 10 elements of foo", @foo[10^] doesn't seem as intuitive | 03:28 | |
I'm sure one could get used to it though | |||
(thanks zero based arrays) | 03:29 | ||
mrf | Hotkeys: I am not sure that the patch I have added would support that but it does sound like it would be something that could be added. | ||
Hotkeys | if @foo[10^..*] is possible then I don't see why the shorthand for it wouldn't work | 03:30 | |
then again I'm no parsing expert | |||
mrf | I would certainly argue that it should exist if it doesn't already | 03:31 | |
raiph | m: say 10^..* | ||
camelia | rakudo-moar 273e89: OUTPUT«10^..Inf» | ||
raiph | m: say list 10^..* | ||
camelia | rakudo-moar 273e89: OUTPUT«(11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 …» | ||
mrf | but in a regex it seems to make send to want /<token> ** 10^/ for more than 10. with + being synonymous with 0^ I suppose | 03:33 | |
Hotkeys | it seems indexing with infinite ranges on infinite sequences gets unhappy | ||
m: my @foo = 1..*; say @foo[10^..*]; | 03:34 | ||
m: my @foo = 1..20; say @foo[10^..*]; | |||
camelia | rakudo-moar 273e89: OUTPUT«(timeout)» | ||
rakudo-moar 273e89: OUTPUT«(12 13 14 15 16 17 18 19 20)» | |||
03:35
Ven_ joined
|
|||
Hotkeys | but it would still be reasonable for 10^ to work the same in that case | 03:35 | |
mrf | m: my @foo = 1..20; say @foo[^10]; say @foo[10]; say @foo] | ||
camelia | rakudo-moar 273e89: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ywWJqbmNgWUnexpected closing bracketat /tmp/ywWJqbmNgW:1------> 030; say @foo[^10]; say @foo[10]; say @foo7⏏5]» | ||
mrf | m: my @foo = 1..20; say @foo[^10]; say @foo[10]; say @foo[10^..*] | ||
camelia | rakudo-moar 273e89: OUTPUT«(1 2 3 4 5 6 7 8 9 10)11(12 13 14 15 16 17 18 19 20)» | ||
mrf | m: my @foo = 1..20; say @foo[^10]; say @foo[10]; say @foo[10^] | 03:37 | |
camelia | rakudo-moar 273e89: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ERfC_OKXTlMissing required term after infixat /tmp/ERfC_OKXTl:1------> 3ay @foo[^10]; say @foo[10]; say @foo[10^7⏏5] expecting any of: prefix term» | ||
03:37
eliasr left
|
|||
mrf | Hotkeys: it would look neatly symetrical | 03:38 | |
03:40
Ven_ left
03:44
sprocket left
|
|||
PerlJam just spent about a minute staring at some P5 code wondering why it wasn't compiling ... | 03:49 | ||
Turns out I had used the P6 ternary op rather than the P5 one | 03:50 | ||
mrf | :D | ||
03:50
sprocket joined
|
|||
Hotkeys | lol | 03:52 | |
atweiden | m: class HOH is Hash {*}; my %h := HOH.new('a', 1); my %toml; %toml<a> = %h; say %toml<a>.WHAT; say %toml.perl; | 03:54 | |
camelia | rakudo-moar 273e89: OUTPUT«(HOH){:a(${:a(1)})}» | ||
03:54
Oatmeal left
|
|||
atweiden | is there any way to customize Hash assignment so that the HOH<a> replaces the original %toml<a>? | 03:54 | |
mrf | can anyone tell me how camelia outputs  rathern than \n. Would really like if my tests could output a more readable form | 04:04 | |
04:07
Oatmeal joined
|
|||
PerlJam | .u  | 04:08 | |
yoleaux | U+2424 SYMBOL FOR NEWLINE [So] () | ||
PerlJam | mrf: by outputting the appropriate unicoe char | 04:09 | |
awwaiid | mrf: github.com/perl6/evalbot/blob/mast...ot.pl#L289 and L291 | ||
PerlJam | er, unicode | ||
psch | timotimo: i'm not saying that "perl5 doesn't allow it" is a good reason to not allow it. it just makes my attempt at drawing parellels fall apart. so that's more to be understood as "my argument isn't particularly stable under scrutiny", not "we shouldn't do that" | ||
skids | atweiden: I'm not sure what exactly you want to happen in the above. | 04:12 | |
atweiden | skids: essentially i'm trying to label this as type HOH github.com/atweiden/config-toml/bl...ns.pm#L838 | 04:13 | |
it's pretty hacky | |||
mrf | awwaiid: cheers. I was hoping there would be some magic. Regex is simple enough though | ||
PerlJam: Yeah. Was hoping there was a method like .perl that would do it | 04:14 | ||
awwaiid | mrf: you could like: sub justsayin($x) { $x ~~ s/\n//; say $x } . Could monkey-patch that sucker onto String | 04:15 | |
BenGoldberg | m: operator postfix<^> { $n ^.. * }; m: my @foo = 1..20; say @foo[^10]; say @foo[10]; say @foo[10^]; | 04:16 | |
camelia | rakudo-moar 273e89: OUTPUT«5===SORRY!5=== Error while compiling /tmp/pwcuCT1a9ZUnexpected block in infix position (missing statement control word before the expression?)at /tmp/pwcuCT1a9Z:1------> 3operator postfix<^>7⏏5 { $n ^.. * }; m: my @foo = 1..20; say @ …» | ||
BenGoldberg | m: operator postfix<^> { $n ^.. * }; my @foo = 1..20; say @foo[^10]; say @foo[10]; say @foo[10^]; | ||
camelia | rakudo-moar 273e89: OUTPUT«5===SORRY!5=== Error while compiling /tmp/s5wImMF2M5Unexpected block in infix position (missing statement control word before the expression?)at /tmp/s5wImMF2M5:1------> 3operator postfix<^>7⏏5 { $n ^.. * }; my @foo = 1..20; say @foo …» | ||
mrf | awwaiid: Yeah. I have a is_match and not_match test methods so it should be easy enough to just add it there for now. There is so much new p6 syntax I just wanted to check I wasn't missing something before I did | ||
BenGoldberg | m: sub postfix<^> { $n ^.. * }; my @foo = 1..20; say @foo[^10]; say @foo[10]; say @foo[10^]; | ||
camelia | rakudo-moar 273e89: OUTPUT«5===SORRY!5=== Error while compiling /tmp/yAKqKcqW6kMissing blockat /tmp/yAKqKcqW6k:1------> 3sub postfix7⏏5<^> { $n ^.. * }; my @foo = 1..20; say @ expecting any of: new name to be defined» | ||
mrf | awwaiid: thanks though | ||
awwaiid | mrf: cool, have fun :) | ||
mrf: interestingly I've been thinking that I might like an irssi pluging that un-does , printing output nicely :) | 04:17 | ||
04:17
Actualeyes left
|
|||
mrf | awwaiid: I will admit I am bored of writing tests for grammars | 04:17 | |
awwaiid: really. I quite like the concise-ness. to each their own I suppose | 04:18 | ||
awwaiid | mrf: maybe you should reverse it and write some grammars for tests. Then write a generator that uses the grammar to generate compliant output. | ||
mrf | awwaiid: :D | 04:19 | |
awwaiid | ok. I should clearly go to bed | ||
mrf | I should as well. Just waiting for the game to finish then I will go back to bed | 04:20 | |
BenGoldberg | debug-cat: this is a test/ | 04:22 | |
camelia | debug-cat: OUTPUT«this is a test/» | ||
BenGoldberg | debug-cat: ooh, look, it thinks it's an echo-bot. | 04:23 | |
camelia | debug-cat: OUTPUT«ooh, look, it thinks it's an echo-bot.» | ||
BenGoldberg | evalbotcontrol version | 04:27 | |
camelia | This is evalbot revision 3235487 | ||
adu | what's the difference between () and []? | 04:33 | |
04:34
Actualeyes joined
|
|||
adu | m: ().Array | 04:34 | |
camelia | ( no output ) | ||
adu | m: say ().Array | ||
camelia | rakudo-moar 273e89: OUTPUT«[]» | ||
adu | m: say [].Seq | 04:35 | |
camelia | rakudo-moar 273e89: OUTPUT«()» | ||
04:36
Ven_ joined
04:41
Ven_ left
04:42
BenGoldberg left
04:44
AlexDaniel left
|
|||
Hotkeys | m: say ().WHAT | 04:45 | |
camelia | rakudo-moar 273e89: OUTPUT«(List)» | ||
Hotkeys | m: say [].WHAT | ||
camelia | rakudo-moar 273e89: OUTPUT«(Array)» | ||
Hotkeys | adu: ^ | ||
adu | Hotkeys: thanks | 04:46 | |
m: say [1, 2] Z, [3, 4] | |||
camelia | rakudo-moar 273e89: OUTPUT«((1 3) (2 4))» | ||
04:46
cognominal left
|
|||
adu | m: say [1, 2] >>,<< [3, 4] | 04:46 | |
camelia | rakudo-moar 273e89: OUTPUT«[(1 3) (2 4)]» | ||
adu | it looks like one of those preserves type and the other doesn't, are there any other differences between Z and hyper? | 04:47 | |
moritz | adu: hyper is eager (even to the point where it's allowed to parallelize), Z is lazy | 04:49 | |
adu | interesting | 04:50 | |
Hotkeys | also note that Z alone does Z, | 04:51 | |
m: say <1 2> Z <3 4> | 04:52 | ||
camelia | rakudo-moar 273e89: OUTPUT«((1 3) (2 4))» | ||
adu | I didn't know if >><< defaults to , | ||
basically, I only know about grammars, so I'm trying to learn about the rest of Perl6 | |||
Hotkeys | I don't believe it does | ||
m: say <1 2> >><< <3 4> | |||
camelia | rakudo-moar 273e89: OUTPUT«5===SORRY!5=== Error while compiling /tmp/dEdagzv9iOMissing << or >>at /tmp/dEdagzv9iO:1------> 3say <1 2> >><7⏏5< <3 4> expecting any of: infix infix stopper» | ||
adu | you know, to smooth out my knowledge | 04:53 | |
Hotkeys | smooth knowledge is the best knowledge | ||
adu | I know a little bit about classes, but only enough to get the parsers to run | ||
TimToady | 10^ is not gonna fly either inside or outside of regex | 04:54 | |
way too ambiguous | |||
adu | TimToady! | ||
TimToady | and it's just not all that useful | ||
adu | what's next, FFI? | 04:55 | |
TimToady | hmm, camelia ain't recompilin' | 04:58 | |
05:04
tokuhiro_ joined
|
|||
psch | probably broken jvm build | 05:05 | |
setinputlinesep{,s} is missing on jvm | 05:06 | ||
adu | how do I make a type alias? | ||
psch | someone recently brought up that camelia should build indepent for both backends, 'cause she apparently doesn't | ||
adu | like can I do type GString = OpaquePointer? | 05:07 | |
psch | m: use NativeCall; constant GString = Pointer; my GString $x; | ||
camelia | ( no output ) | ||
adu | psch: ah ok | 05:08 | |
psch | hm, Pointer and OpaquePointer are probably different things. the concept still applies | ||
adu | constant works | ||
05:09
tokuhiro_ left
|
|||
psch | m: use NativeCall; constant GString = Pointer; my GString $x; $x.VAR.of.say | 05:09 | |
camelia | rakudo-moar 273e89: OUTPUT«(Pointer)» | ||
psch | adu: note, it still contains a Pointer, not a GString | ||
(where "it" is the container) | |||
dalek | ast: dc98136 | TimToady++ | S05-metasyntax/charset.t: test that cclass elems require + or - between |
||
adu | psch: what am I doing wrong: pastie.org/10525745 | 05:14 | |
I got "(Mu)" but I was expecting "!dlroW ,olleH" | 05:17 | ||
o wait, I needed "returns Str" never mind | 05:18 | ||
05:19
sprocket left
|
|||
adu | wow | 05:19 | |
that was super easy | |||
adu <3 NativeCall | |||
05:19
lucs left
|
|||
adu | you know what would be so great, like some kind of Advent Calendar, or something | 05:20 | |
TimToady | we could, like, do it leading up to Christmas and all | ||
05:20
lucs joined
|
|||
adu | I think people would like it | 05:20 | |
psch | yeah, maybe host it on wordpress | ||
cause that's easy | |||
adu: it exists, perl6advent.wordpress.com/ | 05:21 | ||
adu | I know | ||
I was being facesious, or sardonic | |||
I'm not sure which | |||
psch | well, that went over my head :) | ||
that second paragraph from last years 24th is still pretty amazing, TimToady++ | 05:22 | ||
adu | "facetious" sorry my sppeling is bad | 05:23 | |
psch | well, actually the whole post is great, but i'm a sucker for silly puns | ||
adu | psch: have you ever heard of Spoonerisms? | 05:25 | |
05:25
khw left
|
|||
psch | adu: yes, i have. i speak them occassionally, sometimes accidentally | 05:26 | |
adu | c2.com/cgi/wiki?WorstPunEver | ||
but yes, TimToady++ | 05:27 | ||
just because | |||
psch | now i'm getting a tad sad i can't share one of my favorite word plays | 05:29 | |
well, and expect people to understand it | |||
"Das Leben gleicht in manchem Sinne einer Brille - man macht viel durch." | 05:30 | ||
adu | I wonder if there's going to be a post about exception handling this year. | ||
psch | adu: you can draft one :) | ||
(the great thing about that quote is lost in translation... :P ) | 05:31 | ||
adu | well I've been wondering Python has 4 sections to it's handlers, (1) try (2) catch (3) else (4) finally, and 1, 2 and 4 are obvious in Perl6, but I'm not sure how one would do (3) | ||
actually, maybe 4 isn't obvious | 05:33 | ||
psch | m: sub f { fail }; with f() -> $res { say "did it" } else { say "nyet" } | ||
camelia | rakudo-moar 273e89: OUTPUT«nyet» | ||
psch | m: sub f { 1 }; with f() -> $res { say "did it" } else { say "nyet" } | 05:34 | |
camelia | rakudo-moar 273e89: OUTPUT«did it» | ||
psch | that's what i can make up for (3) | ||
(4) is just a LEAVE in the block that has the CATCH, i think | |||
adu | so else is run if no exception is thrown, finally is run regardless | 05:35 | |
psch | almost, with is if for definedness | ||
TimToady | there's also KEEP and UNDO | ||
psch | oh, right. UNDO is the better finally | ||
well no | 05:36 | ||
KEEP and UNDO seperate the possible cases for finally | |||
so we have more granularity | |||
m: if 0 { .say }; with 0 { .say } | |||
camelia | rakudo-moar 273e89: OUTPUT«0» | ||
psch | m: if 0 { say "if'd" }; with 0 { say "with'd" } # actually... | 05:37 | |
camelia | rakudo-moar 273e89: OUTPUT«with'd» | ||
psch | m: if fail() { say "if'd" }; with fail() { say "with'd" } | ||
camelia | ( no output ) | ||
TimToady | fail is a variant of return | ||
05:38
Ven_ joined
|
|||
psch | oh, so i'm spreading intuited half-knowledge again... | 05:38 | |
i wanted to stop that, actually :/ | |||
adu | psch: lol | ||
TimToady | just start spreading the ohter half instead | ||
*other | 05:39 | ||
05:39
lucs left,
lucs joined
|
|||
adu | I was thinking you could like set $cought = True in the CATCH block, which could be used to implement Python's else block | 05:40 | |
05:40
raiph left
05:41
vendethiel joined
|
|||
psch | afair there's a bit missing still with exception handling | 05:41 | |
m: $!.pending | 05:42 | ||
camelia | ( no output ) | ||
adu | it sounds like KEEP is similar to (try ... else), and KEEP and UNDO are like finally? | ||
psch | i think that doesn't actually hold the pending exceptions, if there were any | ||
TimToady | KEEP is like else, LEAVE is like finally | ||
adu | ah ok | ||
TimToady | iiuc | ||
psch | isn't UNDO like else? | 05:43 | |
i'm guessing python does it as "try this, if it dies do the else" | |||
05:43
skids left
|
|||
psch goes back to S04 | 05:43 | ||
hmm | 05:44 | ||
TimToady | maybe else is more like the default {} inside CATCH | ||
psch | is a block exit through a CATCH that handles an exception unsuccessful..? | ||
05:45
Ven_ left
|
|||
psch | yeah, i think else is CATCH { default {} } | 05:45 | |
(to answer my own question: "probably not" } | |||
adu | psch: no, "catch" is run if an exception is thrown AND it matches the symbol given (if any), and "else" is run if an exception is NOT thrown | ||
psch | adu: ah, okay, then TimToady was right | ||
adu | and actually, UNDO reminds me of Go's defer | 05:46 | |
Perl6 is like every language I love rolled into one :) | 05:47 | ||
psch | and the missing bits you can just slang in :) | ||
adu | or maybe it's more like LEAVE | ||
psch | (depending on how comfortable you are with extending the grammar...) | 05:48 | |
adu | psch: I've been thinking of writing a new slang | ||
adu <3 grammars | |||
psch | adu: did you look at the ones FROGGS++ implemented yet? | ||
adu | nope | 05:49 | |
psch | github.com/FROGGS/p6-Slang-Piersing | ||
adu | psch: this is one of the grammars I wrote: github.com/andydude/p6-c-parser/bl...rammar.pm6 | ||
psch | adu: oh, alright. i guess that means the missing bit is knowing which pegs to hang your tokens on | 05:51 | |
adu | I think the missing bit for me is learning how all the $* vars work | ||
psch | because (currently at least) a slang depends on knowing which tokens already exist, and how to replace the parts you want to change | 05:52 | |
llfourn | and figuring out the basics of QAST :) | 05:53 | |
psch | although i can't imagine not having to know what part of the language one wants to replace... | ||
well, for finding pegs we at least have the --target=parse | 05:54 | ||
llfourn: yeah, that's definitely useful, although i'm not sure it's always neccessary | |||
adu | like I would want to make a dramatically different slang, like put "use css; " at the top and the rest of the file would be css | 05:55 | |
llfourn | psch: thanks I didn't even know aboout --target=parse | ||
psch | adu: github.com/tony-o/perl6-slang-sql/ is sort of a step in that direction | 05:56 | |
adu: it's of course different in that it exposes a keyword to parse the rest of the statment as a sublanguage | 05:57 | ||
llfourn | adu: I think a slang is a superset of whatever the main language is where as use css would be just replacing the MAIN language | ||
psch doesn't actually know how "use css;" could be useful, but maybe css is just not the best example | 05:58 | ||
adu | psch: that's pretty cool | ||
perhaps | |||
I mean, if you're making a web server, you probably want it at the statement level anyways | 05:59 | ||
llfourn | mmmm for CSS you would just want a grammar I think | ||
psch | i'd probably want a simplified subset, because all the newfangled magic css does nowadays seems a little silly to me :) | 06:00 | |
it's probably all the writing-a-compiler-in-java i do in my free time ;) | |||
adu | CSS is mostly dictionaryies anyways, except the occational gradient and/or url link | ||
psch | ...well, *helping* to write a compiler, don't want over-emphasize my contribution :P | ||
+to | |||
adu | :) | ||
llfourn | I made a slang a while ago but I don't think it works anymore: github.com/LLFourn/perl6-slang-dotty | 06:03 | |
adu | psch: there was some talk a few months ago of integrating NativeCall, Inline::C, and C::Parser into some kind of hybrid thing | 06:04 | |
06:05
vendethiel left,
ShimmerFairy left
|
|||
psch | adu: yeah, i remember | 06:06 | |
adu: as in, i remember the idea using C::Parser to autogen most of the NativeCall declarations | |||
if not all of it | |||
adu | psch: something like that | ||
llfourn: that's pretty involved | 06:08 | ||
llfourn: where is Dotty? | |||
llfourn | adu: Dotty is a method call op? | ||
. .? etc | |||
adu | Dotty::Slang::Grammar | 06:09 | |
Dotty::Slang::Actions | |||
where are these defined? | |||
llfourn | github.com/LLFourn/perl6-slang-dot...g/Dotty.pm | 06:10 | |
I build them dynamically | |||
inside EVALs -- quite ugly :\ | |||
notice .^add_method etc | |||
adu *mind blown* | 06:11 | ||
llfourn | I think it's less complicated than it looks... I wonder if I could write it better now :) | 06:12 | |
06:12
retupmoca joined
|
|||
llfourn | ..maybe using parameterized roles | 06:13 | |
06:14
adhoc left
|
|||
llfourn goes afk for a while | 06:15 | ||
06:15
tokuhiro_ joined
06:20
tokuhiro_ left
06:21
adu left
|
|||
mrf | TimToady: Will look at removing support for 10^ from my patch when I get in to work. | 06:42 | |
06:48
Ven_ joined
06:49
ShimmerFairy joined
06:55
Ven_ left
06:58
[Sno] left
07:03
finanalyst left
07:08
telex left
07:10
telex joined
|
|||
dalek | line-Perl5: ffeb71a | (Stefan Seifert)++ | t/ (2 files): Fix tests on platforms where objectids can be negative Fixes GH #46 |
07:17 | |
07:20
softmoth left
|
|||
nine | llfourn: github.com/niner/Inline-Perl5/issu...-149920242 is a different issue | 07:21 | |
07:28
firstdayonthejob joined
|
|||
llfourn | nine: ok shall I make a new issue? :) | 07:33 | |
07:34
[Sno] joined
|
|||
llfourn checks if Inline::Perl5 still doesn't work | 07:34 | ||
07:34
atweiden left
|
|||
nine | llfourn: yes, if it still doesn't work, please open a new issue. Output of perl6 -Ilib t/use.t may help diagnosing | 07:35 | |
07:35
rindolf joined
|
|||
llfourn | nine: sure thing | 07:35 | |
07:39
camelia left,
camelia joined
07:40
ChanServ sets mode: +v camelia
|
|||
nine | Does perl6-gdb-m work on OS X? | 07:47 | |
llfourn | nine: like in general or on the test? | 07:48 | |
nine | in general | ||
llfourn | nine: I find it's hit or miss | ||
nine | If it works in general, I'd of course be interested in its output on the test :) | ||
llfourn | I'll have a go :) | 07:49 | |
07:49
xpen left,
xpen joined
|
|||
llfourn | nine: nah debug aint working at all | 07:51 | |
[Tux] | m:$*OUT.nl = ""; | ||
m: $*OUT.nl = Str; | |||
camelia | rakudo-moar 273e89: OUTPUT«Cannot unbox a type object in block <unit> at /tmp/S17UPVihvy:1» | ||
[Tux] | so half of RT#123978 has been addressed | 07:52 | |
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=123978 | ||
llfourn | nine: would a core dump be useful? | ||
nine | llfourn: I doubt as I don't have OS X and Linux's tools probably won't be able to do anything with it. | 07:53 | |
07:54
RabidGravy joined
|
|||
[Tux] | test 50000 37.191 37.078 | 07:55 | |
test-t 50000 39.284 39.171 | |||
RabidGravy | I think that's getting better | 07:56 | |
lizmat | good *, #perl6! | 07:57 | |
nine | Good morning lizmat! Thanks for the weekly :) | ||
lizmat | yesterday was better, I think | ||
you're welcome! | |||
07:59
finanalyst joined
|
|||
[Tux] | is the «$*OUT.nl = ""» fix a result of jnthn++'s grapheme work? | 07:59 | |
lizmat | not grapheme, but IO work on MoarVM | 08:00 | |
m: &&::{}[];; # this used to fail, but doesn't anymore | 08:01 | ||
camelia | rakudo-moar 273e89: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ePpNWTE8KTUndeclared routine: & used at line 1» | ||
lizmat | ah, it does? | ||
08:01
abraxxa joined
|
|||
lizmat | star-m &&::{}[];; | 08:01 | |
star-m: &&::{}[];; | |||
camelia | star-m 2015.09: OUTPUT«5===SORRY!5=== Error while compiling /tmp/PAXzNrMLiLUndeclared routine: & used at line 1» | ||
lizmat | well, it doesn't fail for me locally anymore | 08:02 | |
test #19 in t/spec/integration/weird-errors.t |