»ö« 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 | |||
08:05
_mg_ joined
|
|||
RabidGravy | ew | 08:06 | |
abraxxa | since upgrading to 2015.10 I can't run any DBIish test any more, they all fail with Could not find file 'DBDish::Oracle' for module DBDish::Oracle | 08:14 | |
when run with perl6 -Ilib t/45-oracle-common.t | 08:15 | ||
moritz | abraxxa: sounds like a 'require' gone wrong | ||
abraxxa: did you merge from upstream DBIish? | |||
it's fixed there, I believe | |||
abraxxa | just checked its repo if there are any commits that i'd need to merge but it doesn't seem so | ||
this one? github.com/perl6/DBIish/commit/08d...cf98841fee | 08:16 | ||
ok, merging | |||
moritz | yes, that one | ||
08:16
tokuhiro_ joined
|
|||
lizmat | hmmm... looks like 76391ca91b37e14b323d broke sub a ($a is rw) {$a}; a 42 | 08:17 | |
08:17
darutoko joined
|
|||
lizmat | test #5 in t/spec/S06-traits/misc | 08:17 | |
peschwa seems to have done that | 08:18 | ||
RabidGravy | naughty peschwa | ||
moritz | but that's supposed to fail, now? | ||
s/now/no/ | |||
lizmat | yes, and it doesn't anymore | ||
moritz | ah | ||
lizmat | m: sub a ($a is rw) {$a}; a 42 | ||
camelia | rakudo-moar 273e89: OUTPUT«Parameter '$a' expected a writable container, but got Int value in sub a at /tmp/2qiClYJJ6U:1 in block <unit> at /tmp/2qiClYJJ6U:1» | ||
lizmat | huh? | 08:19 | |
m: use Test; sub a ($a is rw) {$a}; throws-like { a 42 }, X::Parameter::RW | |||
camelia | rakudo-moar 273e89: OUTPUT« 1..2 not ok 1 - code dies # Failed test 'code dies'# at /tmp/sIxNEMjt9i line 1 ok 2 - # SKIP Code did not die, can not check exception # Looks like you failed 1 test of 2not ok 1 - did we throws-like X::Parameter::RW?…» | ||
lizmat | m: sub a ($a is rw) {$a}; { a 42 } | 08:20 | |
camelia | ( no output ) | ||
08:20
ely-se joined
|
|||
lizmat | m: sub a ($a is rw) {say $a}; { a 42 } | 08:20 | |
camelia | rakudo-moar 273e89: OUTPUT«Parameter '$a' expected a writable container, but got Int value in sub a at /tmp/o7eih1KFDY:1 in block <unit> at /tmp/o7eih1KFDY:1» | ||
lizmat | so it apparently only doesn't fail if it's inside a block and nothing's done to it | 08:21 | |
moritz | m: sub a ($a is rw) {say $a}; if 0 { a 42 } | ||
camelia | ( no output ) | ||
08:22
tokuhiro_ left
|
|||
moritz | m: use Test; sub a ($a is rw) {$a}; throws-like { sink a 42 }, X::Parameter::RW; | 08:22 | |
camelia | rakudo-moar 273e89: OUTPUT« 1..2 not ok 1 - code dies # Failed test 'code dies'# at /tmp/1M3SzdJJlu line 1 ok 2 - # SKIP Code did not die, can not check exception # Looks like you failed 1 test of 2not ok 1 - did we throws-like X::Parameter::RW?…» | ||
RabidGravy | okay, that's weird travis-ci.org/sergot/http-useragen...s/88943847 whichs seems to suggest that Encode is broken but it tests fine here | 08:23 | |
is there anything gone in the last day that could have broken it? | 08:24 | ||
08:25
firstdayonthejob left
08:32
bbkr left,
risou is now known as risou_awy,
risou_awy is now known as risou
08:35
dakkar joined
08:36
pdcawley joined
|
|||
lizmat | RabidGravy: doesn't ring a bell | 08:36 | |
RabidGravy | yeah, odd. when my computer settles down I'll build a new rakudo and check again | 08:37 | |
lizmat | .tell jnthn any idea what "get_boxed_ref could not unbox for the representation '20'" could mean ? | 08:46 | |
yoleaux | lizmat: I'll pass your message to jnthn. | ||
08:52
g4 joined,
g4 left,
g4 joined
|
|||
lizmat | .tell jnthn nvm, needed some nqp::decont() sprinkling | 08:58 | |
yoleaux | lizmat: I'll pass your message to jnthn. | ||
08:58
espadrine joined
08:59
softmoth joined
09:03
softmoth left
09:10
Alina-malina joined
09:12
zakharyas joined
09:13
][Sno][ joined,
[Sno] left,
abaugher left
09:14
abaugher joined
09:18
kjs_ joined
|
|||
dalek | kudo/nom: 6e490dc | lizmat++ | src/core/Range.pm: Move all of Range.pm into the GLR-era This results in moderate speedups of ~25% and some bug fixes related to ranges where the max is smaller than the min. |
09:21 | |
RabidGravy | erk, travis for http::useragent all good again now. something a little weird going on there. | 09:22 | |
09:27
azawawi joined
|
|||
azawawi | hi | 09:27 | |
RabidGravy | marning | 09:28 | |
09:30
Psyche^_ joined
|
|||
RabidGravy | azawawi, so what cool and excellent things are you going to make today? | 09:30 | |
lizmat | afk for a few hours& | 09:31 | |
azawawi | im looking at the github stars (i.e. interest) in my modules lol | 09:32 | |
RabidGravy | :) | 09:33 | |
azawawi | funny thing farabi (my old Perl 5 in-browser) experiment has the highest starred github repo | ||
09:34
finanalyst left,
Psyche^ left
|
|||
azawawi | RabidGravy: Net::Curl has the same interest as farabi6... lol | 09:34 | |
RabidGravy: the funny thing is that selenium p6 module has the lowest even though i worked on it the most along with Electron | 09:36 | ||
RabidGravy: so the least effort has the highest interest lol | |||
RabidGravy | even some of the P5 modules I have (e.g. Term::Readkey) which are depended on all over the place have very few stars | 09:37 | |
RabidGravy stars some of azawawi's modules ;-) | 09:40 | ||
09:40
andreoss joined
|
|||
RabidGravy | I wonder, idly, if there is an API for starring things on github and whether that could be integrated into modules.perl6.org | 09:41 | |
09:43
kjs_ left
|
|||
azawawi | RabidGravy: thanks... it is not about starring... it is about working on stuff that really matters to the Perl 6 community :) | 09:44 | |
RabidGravy: but the stars are cool also lol | |||
RabidGravy | azawawi, absolutely | 09:46 | |
:) | |||
unfortunately my TODO list is getting longer and longer - at some point the dam will burst and I will release a massive bunch of modules as I'm blocking on a few very small things | 09:50 | ||
09:51
Ven_ joined
|
|||
RabidGravy | I've got about six in flight with various deadlocks and blockers | 09:53 | |
jnthn | morning, #perl6 | 09:55 | |
yoleaux | 08:46Z <lizmat> jnthn: any idea what "get_boxed_ref could not unbox for the representation '20'" could mean ? | ||
08:58Z <lizmat> jnthn: nvm, needed some nqp::decont() sprinkling | |||
mrf | morning jnthn | ||
09:55
espadrine left
|
|||
azawawi | RabidGravy: I want to use Perl 6 in my workplace. Hence I am writing more support libraries. | 09:57 | |
jnthn | azawawi++ | 09:58 | |
RabidGravy | I want to re-do github.com/jonathanstowe/Emitria as a Perl 6 application | ||
;-) | 09:59 | ||
right shower | |||
azawawi | irclog.perlgeek.de/perl6/2007-05-14#i_16193 # first hello in Perl 6 as far as IRC log gives me... it is a long time :) | 10:00 | |
jnthn | awwaiid: The context arg to EVAL is decidedly "internal"; note that EVAL being uppercase is to indicate it's a special form, and the compiler is free to optimize away things if it doesn't see a literal call to EVAL in a given lexical scope. | 10:01 | |
.tell sprocket Define both structs, and then write constant TheStruct = $*KERNEL eq 'darwin' ?? TheOSXStruct !! TheLinuxStruct; | 10:02 | ||
yoleaux | jnthn: I'll pass your message to sprocket. | ||
10:02
kjs_ joined
|
|||
JimmyZ | jnthn: do we have plans to expose fd to support some system call like github.com/MoarVM/MoarVM/issues/281 ? | 10:05 | |
jnthn | Yeah, there's an RT that wants it too | 10:07 | |
JimmyZ | that would be nice :P | ||
not sure about handle though .. | 10:08 | ||
file handle etc.. | |||
mrf | m: say "ll" ~~ /l ** 3..4/ | 10:09 | |
camelia | rakudo-moar 273e89: OUTPUT«Nil» | ||
mrf | nqp-m: say("ll" ~~ /l ** 3..4/) | 10:10 | |
camelia | nqp-moarvm: OUTPUT«Substring length (-5) cannot be negative at gen/moar/stage2/QRegex.nqp:1778 (/home/camelia/rakudo-inst-1/share/nqp/lib/QRegex.moarvm:Str:18) from gen/moar/stage2/NQPCORE.setting:696 (/home/camelia/rakudo-inst-1/share/nqp/lib/NQPCORE.setting.moarvm:join:1…» | ||
mrf | given that Rakudo/moar seems to hide that error from nqp I assume that is an expected error | 10:11 | |
jnthn | Rakudo's Match.Str has just been more smartly implemented than NQP's I guess :) | 10:12 | |
Oh, or actually it returns Nil on a failed match | 10:13 | ||
And NQP doesn't have Nil | |||
mrf | jnthn: question out of the blue. Do you think that ** 10^ should throw a specific warning in NQP? context: I am adding support for 1^..^10 style range quantifier in nqp | 10:15 | |
jnthn: or do you think the 'Malformed range' error it currently throws is fine. | 10:16 | ||
jnthn | Malformed range seems fine to me | ||
I've not really seen people try/expect 10^ to work in a ^10 way so far. | |||
And every error we add bulks the compiler up a little more, so they should at least pull a little weight :) | 10:17 | ||
Ven_ | m: sub postfix:<^>($n){^$n}; 3.succ^ | ||
camelia | ( no output ) | ||
Ven_ | m: sub postfix:<^>($n){^$n}; say 3.succ^ | ||
camelia | rakudo-moar 273e89: OUTPUT«^4» | ||
mrf | jnthn: yeah. It was something I was discussing very early this morning but TimToady has said no to it. So just wondering if we want to explict it | ||
jnthn | I don't think so, unless we see lots of people tripping over it, but so far they haven't. | ||
mrf | thats fine. It would have only really been a shortcut for 10^..* in any case which is not exactly a lot of chars. The only argument in its favour was the symetry with ^10 when getting things from arrays | 10:18 | |
10:22
Alina-malina left,
espadrine joined
10:23
anaeem1 joined,
anaeem1 left
|
|||
RabidGravy | JimmyZ: RT #126541 | 10:29 | |
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=126541 | ||
RabidGravy | please feel free to chime in if you can think of more use-cases | ||
10:29
Actualeyes left
10:35
yeahnoob left
|
|||
JimmyZ | oh, new RT! | 10:36 | |
mrf | github.com/perl6/nqp/pull/249 | 10:37 | |
Hopefully that meets approval now. :S | |||
^ If there is someone this change should be documented then if someone can point that out then I will add them | 10:38 | ||
dalek | kudo/nom: 45e56b8 | jnthn++ | src/core/Rakudo/Internals.pm: Hopefully unbust the JVM build. |
10:46 | |
RabidGravy | right off to the seaside to get some fresh air, play nicely now kids ;-) | ||
see y'all later | |||
10:47
softmoth joined
|
|||
mrf | RabidGravy: \o | 10:47 | |
jnthn | RabidGravy: Enjoy :) | 10:48 | |
mrf: It looks good to me. Will you add some spectests also? | |||
mrf | jnthn: I added some tests to t/qregex/rx_quantifier. Was there somewhere else needed? | 10:49 | |
10:50
RabidGravy left
|
|||
jnthn | mrf: Yeah, those cover the regex engine, but we should have some in roast too, so it's actually tested as part of the Perl 6 langauge definition | 10:51 | |
dalek | p: a3ab8d8 | (Mike Francis)++ | src/QRegex/P6Regex/ (2 files): Allow ^10 style ranges as a quantifier |
||
p: 795fc8d | (Mike Francis)++ | src/QRegex/P6Regex/Grammar.nqp: Support ^* Inf ranges in quantifiers Actually test the important \n/\r\n case. |
|||
10:51
dalek left
|
|||
jnthn | Merged the PR | 10:51 | |
mrf++ | |||
10:51
softmoth left,
dalek joined,
ChanServ sets mode: +v dalek
|
|||
mrf | jnthn: point me to where they need to be added and I will happily add them :D | 10:51 | |
mrf has now got a commit in 3 p6 repos :D | 10:52 | ||
jnthn | mrf: github.com/perl6/roast/blob/master...x/repeat.t | 10:53 | |
mrf | ok. Will add some tests in there. | ||
10:55
pink_mist joined
|
|||
jnthn | Thanks | 10:56 | |
mrf | np | 10:57 | |
11:09
Actualeyes joined
|
|||
azawawi | .tell RabidGravy to get the github stars on a certain github repo, get api.github.com/repos/rakudo/rakudo which returns a JSON response and use "stargazers_count" key :) | 11:09 | |
yoleaux | azawawi: I'll pass your message to RabidGravy. | ||
azawawi | i think this will be useful on modules.perl6.org/ , number of stars and watchers a project has... | 11:10 | |
s/project/module/ | |||
azawawi forks github.com/perl6/modules.perl6.org/ :) | 11:12 | ||
moritz | azawawi: don't you have push access already? | 11:13 | |
azawawi | moritz: true lol | ||
moritz: i always forget it :) | 11:14 | ||
moritz: i will work on my fork and then commit it once it is working... safer that way | |||
one thing i dont understand, most LICENSE files in our repo have "Copyright (c) 2000-2006, The Perl Foundation." | 11:15 | ||
is that correct? | |||
moritz | azawawi: the copyright of the license is by TPF, the copyright of the module typically not | 11:17 | |
azawawi | I find MIT license to be simpler though | 11:18 | |
but that's me :) | |||
tadzik | +1 :) | ||
yoleaux | 1 Nov 2015 23:58Z <RabidGravy> tadzik: it would be a great boon to me if you could take a look at github.com/tadzik/JSON-Unmarshal/pull/9 :) | ||
tadzik | yoleaux: tell RabidGravy I just did, thanks a lot :) | ||
.tell RabidGravy I just did, thanks a lot :) | |||
yoleaux | tadzik: I'll pass your message to RabidGravy. | ||
tadzik | thanks, yolo | ||
dalek | kudo/nom: d48f6ed | jnthn++ | src/core/Rakudo/Internals.pm: Correct thinko in setting multiple separators. |
11:21 | |
11:21
dayangkun left
|
|||
azawawi | tadzik: :) | 11:21 | |
tadzik: i submitted a PR for rakudobrew build-zef... Can you check it out? | 11:22 | ||
tadzik | azawawi: it should be merged as of few minutes ago | ||
azawawi | tadzik: cool | ||
hopefully it wont break anything :) | 11:23 | ||
tadzik | it didn't look like it was about to :P | ||
azawawi | cool | 11:24 | |
tadzik: re .bat for win32 panda, Nov 24, 2014 till now... the power of the followup :) | 11:27 | ||
tadzik: thx :) | |||
11:28
virtualsue joined
|
|||
tadzik | :) | 11:28 | |
I know a bit about open bugs hanging there forever :P | 11:29 | ||
dalek | ast: 80d5590 | lizmat++ | S03-operators/range-basic.t: Some more Range tests |
11:36 | |
kudo/nom: 9979bf2 | jnthn++ | src/core/ (6 files): Move towards naving nl-in and nl-out. Now, nl-in is for input line separator, and supports being provided with an array of strings. The output line separator is nl-out. Plain nl is deprecated, but still has the effect of setting both for now. Note that Proc and IO::Socket::INET both need further updates. |
|||
11:37
mr-foobar left
|
|||
dalek | ast: f985b22 | jnthn++ | S (3 files): Track nl => nl-in/nl-out change. |
11:38 | |
11:38
mr-foobar joined
11:40
azawawi left
11:43
kjs_ left
11:47
woolfy left
11:49
aborazmeh joined,
aborazmeh left,
aborazmeh joined
11:51
xpen left
11:53
xpen joined
11:54
chenryn joined
11:55
xpen left
11:58
virtualsue left
|
|||
Ven_ | jnthn: is there no point to leaving :nl to be both an alias to :nl-in and :nl-out? | 11:59 | |
12:01
_mg_ left
|
|||
jnthn | Ven_: I don't think so, 'cus it opens the "what if you pass that *and* nl-in" can of worms | 12:01 | |
dalek | kudo/nom: eabc734 | lizmat++ | src/core/Range.pm: Make Array methods throw an Awesome error message |
||
Ven_ | jnthn: yeah, sure, but that already exists for, say, open, with :r/:w and :rw | ||
(I'd know, it took me 3 PRs to get it working correctly :P) | |||
jnthn | I'm not sure one existing awkward case justifies adding another ;) | 12:02 | |
Ven_ | it might justify removing the original awkward case ;) | 12:04 | |
andreoss | m: «(1 2 3)».WHAT.say | 12:07 | |
camelia | rakudo-moar 273e89: OUTPUT«(List)» | ||
andreoss | m: «(1,2,3)».WHAT.say | 12:09 | |
camelia | rakudo-moar 273e89: OUTPUT«(Str)» | ||
12:11
sufrostico joined
12:12
eliasr joined
|
|||
jnthn | m: «(1 2 3)».perl.say | 12:12 | |
camelia | rakudo-moar 273e89: OUTPUT«("(1", IntStr.new(2, "2"), "3)")» | ||
12:12
lolisa joined
|
|||
jnthn | It splits on whitespace, and there ain't any in the second one. | 12:12 | |
pdcawley | m: quasi { $bibble }.perl.say | 12:13 | |
camelia | rakudo-moar 273e89: OUTPUT«5===SORRY!5=== Error while compiling /tmp/NZE8SMuuvLVariable '$bibble' is not declaredat /tmp/NZE8SMuuvL:1------> 3quasi { 7⏏5$bibble }.perl.say» | ||
pdcawley | m: quasi { $bibble }.WHAT.say | ||
camelia | rakudo-moar 273e89: OUTPUT«5===SORRY!5=== Error while compiling /tmp/4kb2wCJeTNVariable '$bibble' is not declaredat /tmp/4kb2wCJeTN:1------> 3quasi { 7⏏5$bibble }.WHAT.say» | ||
pdcawley | m: my $bibble = 1; quasi { $bibble }.perl.say | 12:14 | |
camelia | rakudo-moar 273e89: OUTPUT«AST.new» | ||
12:14
aborazmeh left
|
|||
pdcawley | Hmm... is that going to make a scope injecting macro a bit tricky to write? | 12:14 | |
12:15
Ven_ left
|
|||
lizmat | masak might know, but he's probably having dinner about now | 12:16 | |
12:18
TEttinger left,
tokuhiro_ joined
|
|||
pdcawley | lizmat: I'm just surprised that the quasi thinks it knows the scope in which it's going to be evaluated. | 12:18 | |
m: quasi { 1 } | 12:19 | ||
camelia | ( no output ) | ||
pdcawley | m: quasi { 1 }.perl.say | ||
camelia | rakudo-moar 273e89: OUTPUT«AST.new» | ||
pdcawley | m: quasi { 1 }.eval.say | ||
camelia | rakudo-moar 273e89: OUTPUT«Method 'eval' not found for invocant of class 'AST' in block <unit> at /tmp/cqcCUem9S2:1» | ||
lizmat | pdcawley: /me fully Perl 6 macro noob | ||
pdcawley grins | |||
lizmat | pdcawley: it's EVAL nowadays | ||
pdcawley | m: quasi { 1 }.EVAL.say | ||
camelia | rakudo-moar 273e89: OUTPUT«Method 'EVAL' not found for invocant of class 'AST' in block <unit> at /tmp/MUMHc92jXD:1» | ||
lizmat | ok, but not for AST's apparently :-) | 12:20 | |
pdcawley | So, how do I evaluate an AST in an environment. | ||
masak | I'm here :) | ||
jnthn | Note that most macro exploration is actually being done by masak outside of the Rakudo repo, and that macro/quasi etc. are deferred to 6.future | ||
Ah, there's masak :) | |||
pdcawley | I _think_ quasi { $bibble } failing to compile is a bug, if the AST doesn't have an environment attached. | ||
masak | short answer: quasis are not a get-out-of-jail-free card with regards to scoping. | ||
pdcawley | jnthn: fair enough. | ||
masak: they bloody well should be. | 12:21 | ||
masak | if you want unhygiene, you'll want to refer to things (or declare them) as COMPILING:: | ||
pdcawley | Since the AST they generate doesn't know its scope. | ||
masak | pdcawley: well, you're wrong about that. | ||
pdcawley | masak: Then why doesn't $anAST.EVAL do anything? | ||
dalek | ast: daaa141 | lizmat++ | S02-types/range.t: Add some Immutable and some int-bounds tests |
||
masak | pdcawley: I'm sorry, I don't understand your question. could you rephrase? | ||
you're aware that macros are not fully featured in Rakudo, right? | |||
pdcawley | masak: Am now :) | ||
12:22
tokuhiro_ left
12:24
chenryn left
|
|||
masak | Qtrees should be able to do .EVAL, but I'm not sure .EVAL is a good name for that. | 12:26 | |
in 007 I've taken to calling it .melt, following some kind of "ASTs are solid, runtime values are liquid" analogy | |||
andreoss | if i have a grammar and an action class what should i do to make it work with EVAL ... :lang<Mygrammar>? | 12:30 | |
i've tried to figure it out from rubish example, but it seems broken and also in nqp | 12:31 | ||
arnsholt | From memory, you need to nqp::compreg a compiler object that implements the HLL::Compiler interface | ||
12:32
esh joined
12:34
jojotus left
12:35
pierrot joined,
softmoth joined,
jojotus joined
|
|||
awwaiid | thanks jnthn. I'm using EVAL to build a REPL, you see. | 12:36 | |
dalek | c: aa3c53f | lizmat++ | doc/Type/Range.pod: Add some badly needed Range documentation |
12:37 | |
12:38
kid51 joined
|
|||
llfourn | andreoss: EVAL is a multi so you can export something with :lang<MyLang> | 12:38 | |
12:38
andreoss` joined
|
|||
llfourn | andreoss: are you introducing your language by messing with %*LANG? | 12:39 | |
12:40
softmoth left
|
|||
andreoss` | not really, i have a simple grammar that parses lisp code and building simple ast (nested arrays), i wonder how much effort would it take to turn it into a Slang | 12:41 | |
12:41
Ven_ joined
|
|||
lizmat | .oO( Lisp In A Block: Wow! ) |
12:42 | |
llfourn | andreoss: I haven't done a fully contains language in perl6 before but I guess exporting a multi EVAL is best place to start to call your language from p6 | ||
jnthn | .oO( It's my Lisp in a block, girl... ) |
||
andreoss`: I'd take a look at one of the existing slangs; getting it wired up to EVAL probably isn't enough for that. | 12:45 | ||
jnthn has an NQP that is totally happy with rn as a single grapheme and is spectesting Rakudo at the moment | |||
Couple of fails :/ | 12:46 | ||
pink_mist | (\r\n as a single grapheme)++ | 12:47 | |
jnthn | Ah, first failing one is a test that does a silly workaround for Windows anyway | 12:48 | |
12:48
kid51 left
12:49
aborazmeh joined,
aborazmeh left,
aborazmeh joined
|
|||
llfourn | andreoss: if you create a slang by modifying %*LANG you won't get EVAL to work either from my experience. When EVALing p6 will use %?LANG to determine which language to use -- but modifying %*LANG doesn't do %?LANG. | 12:49 | |
I haven't seen a slang module that provides some way of using the slang in eval other than EVAL 'use MySlang; ...' | 12:51 | ||
masak | andreoss`: did you see github.com/masak/ipso ? | 12:52 | |
12:55
xpen joined
|
|||
andreoss` | masak: no, but seems like what i was trying to do | 12:56 | |
masak | :) | ||
Ven_ | macro m { state $x++; quasi { $x } }; for ^3 { say m; } | 12:57 | |
m: macro m { state $x++; quasi { $x } }; for ^3 { say m; }; for ^3 { say m; } | |||
camelia | rakudo-moar 273e89: OUTPUT«222222» | ||
12:57
Odud joined
|
|||
Ven_ | masak: ^ wat? why is my $x not captured? | 12:57 | |
masak | Ven_: should be, AFAICS. | 12:58 | |
Ven_ | so, "bug"? | ||
masak | yeah | ||
feel free to submit | |||
Ven_ nods | |||
I wouldn't want to take that away from you ;-) | |||
Odud | Trting to install Inline::Perl5 using panda on Windows 10 and getting 'cl' is not recognized as an internal or external command error reported by nmake - any ideas/solutions | 12:59 | |
masak submits rakudobug | |||
dalek | p: c7bfa55 | jnthn++ | src/QRegex/P6Regex/Actions.nqp: Smarter fix for \v under NFG. |
||
p: db2fdbb | jnthn++ | t/qregex/01-qregex.t: Harden test against \r\n -> 1 grapheme. |
|||
13:00
xpen left
|
|||
jnthn | Odud: It can't find the compiler, it seems. Try running "vcvars64" (or maybe "vcvars32") to see if it sets up your environment enough for things to work. | 13:00 | |
(I'm assuming you actually do have a C compiler to hand, given you have nmake) | 13:01 | ||
13:01
andreoss` left
|
|||
Odud | Hi jnthm I have installed the community edition of Visual Studio so assumed the compiler is there, thanks for your suggestions also I will go and check the path looks ok | 13:02 | |
13:02
espadrine left
|
|||
llfourn | m: my $check = "a"; my $sub = sub ($ where $check) { }; $check = "b"; $sub("a") # any way to freeze the value of $check | 13:03 | |
camelia | rakudo-moar 273e89: OUTPUT«Constraint type check failed for parameter '<anon>' in sub at /tmp/MMlDsvqOLo:1 in block <unit> at /tmp/MMlDsvqOLo:1» | ||
stmuk | Odud: there is a link from the start menu called something like "developer prompt" for VS you could try that too | 13:04 | |
masak | Ven_: huh -- no, wait | ||
Ven_: it's `state`, so it's *shared* between both macro calls, no? | |||
Ven_: that's what `state` does. | |||
Ven_ | I increment it. | ||
jnthn | masak: I strongly advise against using "state" in macros, fwiw. :) | ||
Ven_ | sub f { $++ }; say f, f, f; # shared but different | 13:05 | |
m: sub f { $++ }; say f, f, f; # shared but different | |||
camelia | rakudo-moar 273e89: OUTPUT«012» | ||
masak | jnthn: yes, but what *should* it do? :) | ||
arnsholt | masak: I guess the question is what the quasi {$x} is supposed to do | ||
jnthn | masak: The state vars will persist across compilations, and conflict across concurrent compilations... | ||
masak | Ven_: yes, but with the macro they all evaluate late. | ||
arnsholt | Should it freeze $x at the time of evaluation, or not | ||
masak | Ven_: and the increments happen early. | ||
moritz | $*W.sorry('"state" in macros is a really bad idea') | ||
masak | Ven_: so I no longer see the bug. | ||
arnsholt | Yeah, what moritz said =D | 13:06 | |
Ven_ | masak: then I feel even stronger against this kind of scope mixups ;) | ||
recipe for disaster | |||
masak | we've been down the road of trying to restrict things we don't see the use of before... | ||
arnsholt | Thinking some more towards what this would be in something like CL, I'm inclined to say it's not a bug | ||
masak | right | ||
I think I can reason my way to that being correct | 13:07 | ||
Rakudo++ # correct :) | |||
Ven_ | arnsholt: CL doesn't allow you to do crazy stuff like (let ((x 2)) `(x)) | ||
masak | ENOTABUG | ||
Ven_ | perl6/007's macros allow this | ||
masak | the waves have gone high in #6macros about this today | ||
Ven_ | that they have. it's something that's going to trip up a lot of people ;) | 13:09 | |
masak | it shouldn't be about what will trip up people, it should be about what you can use to build useful things | ||
arnsholt | Ven_: Sure it lets you let() over a defmacro(). But trying to write down the CL code, it doesn't actually make sense to do so for what you wrote, I think | 13:10 | |
masak | imagine if someone came to regexes as they were being built and said "backtracking? that's going to trip up a lot of people! don't do that." :) | ||
13:10
_mg_ joined
|
|||
masak | I will take arguments against Perl 6 scoping a lot more seriously when I feel that the arguments are starting from a general sympathy with Perl and Perl 6 thinking. | 13:11 | |
not with what's expected coming from a Lisp direction. | |||
arnsholt | Oh, I agree | ||
masak | and yes, I am reading all the required books. slowly. | ||
I am paying attention. I am taking notes. | |||
arnsholt | I just find that all my thinking about macros ends up being in terms of Common Lisp | 13:12 | |
nine | Backtracking? What doya wanna next? Recursion? | ||
masak | my main conclusion is that Perl 6 is not exactly Lisp :) | ||
arnsholt | Common Lisp being the only language with macros with I know | ||
masak | and trying to bolt Lisp macros onto Perl 6 would not end happily | ||
arnsholt | Yeah, I think something like Dylan is a better point of comparison | ||
masak | Dylan is on my list of things to look at, yes. | ||
arnsholt | (Assuming Dylan is the one with macros, which I think it is) | 13:13 | |
masak | it is. | ||
arnsholt | Interestingly, I hacked up some CL code similar to what Ven_ wrote. Got an interesting result | 13:14 | |
CL-USER(1): (load "test.lisp") | 13:15 | ||
; Loading /home/arne/test/test.lisp | |||
1 | |||
2 | |||
3 | |||
4 | |||
T | |||
gist.github.com/arnsholt/4d285d91f7ad8bb892b4 | |||
Whoops, a bit of a mispaste there | |||
Although, I guess the weird result might be due to magic happening in the loop() macro | 13:16 | ||
stmuk | if I type "panda" it takes 5 secs to return the help args | 13:17 | |
masak | m: my $c = 0; macro m() { my $n = $c++; quasi { say $n } }; for ^3 { m() }; for ^3 { m() } | 13:18 | |
camelia | rakudo-moar 273e89: OUTPUT«000111» | ||
masak | works as advertised. | ||
so if you want to *share* state across macro calls, you use `state`. | 13:19 | ||
if you don't want that, you use `my` and the kind of copying used above. | |||
easy :) | |||
13:20
darutoko- joined
|
|||
masak | er, but that `= 0` in the beginning is probably bogus. ignore that. | 13:20 | |
it will be run *late*, not *early*. | |||
masak likes this distinction more and more | |||
m: BEGIN my $c = 0; macro m() { my $n = $c++; quasi { say $n } }; for ^3 { m() }; for ^3 { m() } | 13:21 | ||
camelia | rakudo-moar 273e89: OUTPUT«000111» | ||
masak | there. :) | ||
stmuk | does the --verbose flag on t/harness still work? | ||
for roast | |||
13:21
samigarus joined
|
|||
arnsholt | I guess it's the comple-time vs. run-time distinction all over again | 13:22 | |
13:22
sufrostico left,
samigarus is now known as oahong,
oahong left,
oahong joined
|
|||
masak | arnsholt: yes, but -- macros are runtime inside of compile time | 13:22 | |
13:22
sufrosti1o joined,
darutoko left,
tony-o left,
tony-o joined
|
|||
arnsholt | Yeah. And you need to keep track of the distinction between run-time for the *macro* code, and run-time of the code generated by the macro code | 13:22 | |
masak | aye | 13:23 | |
13:23
f3ew joined
|
|||
masak | and the things that pass into the macro "freeze" and are no longer values, they're trees | 13:23 | |
13:24
Alina-malina joined
|
|||
arnsholt | Yup | 13:25 | |
masak | and the quasi is a run-time value representing a compile-time AST that you put back into the program so it can run later | ||
arnsholt | Whee, fun! =) | ||
13:25
Alina-malina left
|
|||
dalek | c: c16e4d8 | smls++ | doc/Type/List.pod: expand &reduce documentation |
13:27 | |
p: 1358834 | jnthn++ | src/vm/moar/QAST/QASTRegexCompilerMAST.nqp: Remove special case not needed post-NFG. This will regress a couple of tests until we bump to an NFG-supporting MoarVM. |
|||
p: 1a0ead0 | jnthn++ | / (12 files): Bump Moar for \r\n as 1 grapheme; rebootstrap. |
|||
p: 568f06a | jnthn++ | src/QRegex/P6Regex/Actions.nqp: Make \r\n in a regex mean the grapheme. |
|||
jnthn | lunch & | 13:30 | |
mrf | jnthn++ # You have just saved me writing a whole new grammar with that change | ||
13:32
mattn_jp_ joined
|
|||
dalek | kudo/nom: d02fede | lizmat++ | src/core/ (2 files): Handle Array methods on List/Range similarly |
13:32 | |
13:32
cygx joined
|
|||
dalek | ast: ae478c6 | lizmat++ | S02-types/ (2 files): Handle testing Array methods on List/Range similarly |
13:33 | |
cygx | jnthn: I figured out that NativeCall was to blame for my inability to export a multi trait_mod:<is> - cf #126547 | 13:35 | |
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=126547 | ||
cygx | going things with NativeCall also makes the bytecode sizes of precompiled modules blow up | ||
*doing | |||
abraxxa | I want to store native typed values in a hash for passing to a NativeCall function but fail | 13:40 | |
cygx | jnthn: including NativeCall to add a Pointer parameter declaration added 1.7m to the bytecode size... | ||
abraxxa | my long $valuep = $v; %!in_bind_for{$k} = $valuep; fails with Native call expected argument that references a native integer, but got P6opaque | ||
the issue I'm facing is that Perl6 seems to garbage collect a variable I'm passing by reference to a C function | 13:41 | ||
lizmat | abraxxa: if you could golf that, that would be much appreciated | ||
there's an nqp::op to force a gc, I forget what it was, maybe nqp::force_gc ? | 13:42 | ||
abraxxa | lizmat: ??? | ||
lizmat | m: use nqp; nqp::force_gc # indeed, that's it | ||
camelia | ( no output ) | ||
abraxxa | golf? Dieselgate? | 13:43 | |
lizmat | en.wikipedia.org/wiki/Code_golf | ||
llfourn | abraxxa: reproduce it in a very compact way :) | ||
abraxxa | llfourn: i see, thanks | 13:44 | |
don't think that's easily possible as this involves Oracle OCI | |||
lizmat | perhaps the use of nqp::force_gc might help you to reproduce the problem better ? | ||
abraxxa | if I do %!in_bind_for{$k} := $valuep; the NativeCall error goes away but the problem persists | ||
I still don't get the difference between = and := | 13:45 | ||
13:45
raiph joined
|
|||
lizmat | m: my $a := 42; $a = 666 | 13:45 | |
camelia | rakudo-moar 273e89: OUTPUT«Cannot assign to an immutable value in block <unit> at /tmp/CraQ1CHvD4:1» | ||
lizmat | m: my $a = 42; $a = 666 | ||
camelia | ( no output ) | ||
llfourn | m: my $a = 1; my $b := $a; $b = 42; say $a; | 13:46 | |
camelia | rakudo-moar 273e89: OUTPUT«42» | ||
lizmat | m: my $a = 42; my $b := $a; dd :$a,:$b; $b = 666; dd :$a,:$b | ||
camelia | rakudo-moar 273e89: OUTPUT«Int a = 42Int b = 42Int a = 666Int b = 666» | ||
lizmat | := binds (aliases), = just assigns | ||
m: my $a = 42; my $b = $a; dd :$a,:$b; $b = 666; dd :$a,:$b | |||
camelia | rakudo-moar 273e89: OUTPUT«Int a = 42Int b = 42Int a = 42Int b = 666» | ||
abraxxa | why does passing %!in_bind_for{$k} to the NativeCall function throw this error? | 13:47 | |
m: my %hash; my $k = "foo"; %hash{$k} = 3; say %hash{$k}.WHAT; | |||
camelia | rakudo-moar 273e89: OUTPUT«(Int)» | ||
abraxxa | m: my $v = 3; my long $valuep = $v; my %hash; my $k = "foo"; %hash{$k} = $valuep; say %hash{$k}.WHAT; | 13:48 | |
camelia | rakudo-moar 273e89: OUTPUT«5===SORRY!5===Type 'long' is not declaredat /tmp/XIpaN4h4X0:1------> 3my $v = 3; my long7⏏5 $valuep = $v; my %hash; my $k = "foo"; Malformed myat /tmp/XIpaN4h4X0:1------> 3my $v = 3; my7⏏5 long $valuep = $v; my %hash; my $k…» | ||
abraxxa | m: use NativeCall; my $v = 3; my long $valuep = $v; my %hash; my $k = "foo"; %hash{$k} = $valuep; say %hash{$k}.WHAT; | ||
camelia | rakudo-moar 273e89: OUTPUT«(Int)» | ||
abraxxa | why is it Int and not long? | 13:49 | |
lizmat | I think that's because Perl 6 hashes can only have P6 objects, not natives | ||
m: my %h; my int $a = 42; %h<a> = $a; dd %h<a> | 13:50 | ||
camelia | rakudo-moar 273e89: OUTPUT«Int $var = 42» | ||
lizmat | so the native got upgraded to a HLL Int | ||
abraxxa | what do you propose to do to pass native typed vars to the NativeCall function and prevent gc to happen before the C library access the memory region by pointer? | 13:51 | |
lizmat | well, the question is really I think: why do you want to use a hash ? | 13:52 | |
abraxxa | my idea was to have a hash of in and out binds in the StatementHandle object so they don't get gc-ed | ||
and as the placeholders are keyed a hash is better suited than an array | 13:53 | ||
13:53
aborazmeh left
|
|||
abraxxa | i won't need to access the in binds later but need it for the out binds (data returned by a query) | 13:54 | |
13:54
aborazmeh joined,
aborazmeh left,
aborazmeh joined
|
|||
lizmat | I think you will get a better impedance match if you would define constants for indexes, and then use a native array | 13:54 | |
brb | 13:55 | ||
13:59
aborazmeh left
14:00
domm left
|
|||
[Coke] | java build failed. | 14:02 | |
make | 14:03 | ||
./perl6-j --target=jar --output=lib/Test.pm.jar -Ilib lib/Test.pm | |||
java.lang.NullPointerException | |||
in (gen/jvm/CORE.setting) | |||
in (gen/jvm/ModuleLoader.nqp:380) | |||
... | |||
that's with a fresh build of nqp as well. | |||
14:04
raiph left
14:05
domm joined
14:08
ZoffixW joined
|
|||
Ven_ | arnsholt: part of it is because you're just dealing with a self-evaluating, non quoted value in your gist. Also, you're emulating "state", which wasn't the point of my ((let)) example | 14:11 | |
masak: using "my $foo; macro xx { $foo }" makes me think there's yet another time mixup | |||
ZoffixW | How would I convert a hex string to base10 int? | ||
m: say "ff".base(10) | |||
camelia | rakudo-moar 273e89: OUTPUT«Method 'base' not found for invocant of class 'Str' in block <unit> at /tmp/GBkYRd3P8L:1» | ||
masak | Ven_: not really. | 14:12 | |
Ven_ | oh, you said it later | ||
dalek | href="https://modules.perl6.org:">modules.perl6.org: 9a665e2 | azawawi++ | web/build- (6 files): chmod -x build-*.png |
||
ShimmerFairy | m: say :16<FF> | ||
camelia | rakudo-moar 273e89: OUTPUT«255» | ||
Ven_ | yes, because the macro is run at parse time, and $foo doesn't have the value then | ||
masak | Ven_: it's difference between static structure and runtime frames. | ||
Ven_ | how so? $foo's assignment is run later than the macro is, ain't it? | ||
ZoffixW | And actually, what I'm doing is trying to unpack hex string, say, "ffbbcc" into R G B ints, but I'm having a real trouble with Perl types getting in the way | ||
masak | Ven_: variables very much have values at parse time. in the static lexpads. | ||
Ven_: that's how constants work. | |||
Ven_: that's how BEGIN-time works. | 14:13 | ||
Ven_ | constants, yes, variables? | ||
m: my $a = 5; BEGIN say $a; | |||
camelia | rakudo-moar 273e89: OUTPUT«(Any)» | ||
ZoffixW | ShimmerFairy, but how do I do that with variables? | ||
Ven_ | which is what I'd expect. | ||
ZoffixW | m: my $str = "ffbbcc"; my ( $r, $g, $b ) = map ( :16<$_> ), $str ~~ /(..)(..)(..)/; say [ $r, $g, $b ].perl | ||
camelia | rakudo-moar 273e89: OUTPUT«5===SORRY!5=== Error while compiling /tmp/lNBPz9adLsMalformed radix numberat /tmp/lNBPz9adLs:1------> 3"ffbbcc"; my ( $r, $g, $b ) = map ( :16<7⏏5$_> ), $str ~~ /(..)(..)(..)/; say [ $r, expecting any of: number in radix …» | ||
ShimmerFairy | m: my $a = "2A"; say :16($a) | ||
camelia | rakudo-moar 273e89: OUTPUT«42» | ||
ShimmerFairy | ^^^ that's how :) | ||
ZoffixW | ShimmerFairy++ thanks | 14:14 | |
masak | Ven_: me too. | ||
14:14
perl6sum joined
|
|||
masak | Ven_: I did fix that late assignment later, using a BEGIN. | 14:14 | |
Ven_ | masak: which is exactly what I pointed at around 15:12 (well, definitely not *your* $localtime) | 14:15 | |
14:15
sprocket joined
|
|||
Ven_ isn't really sure where masak++ is right now :) | 14:15 | ||
perl6sum | how to get autocompletion in perl 6 in interactive session | 14:17 | |
I am running rakudo star latest on windows 10 | |||
i get prompt when I type perl6 in cmd prompt | |||
stmuk | perl6sum: doc.perl6.org/language/faq#How_can_...REPL%29%3F | 14:18 | |
actually I don't think it works for autocompletion just yet, although there was an experimental attempt a few months back | 14:19 | ||
14:19
skids joined
|
|||
stmuk | just history | 14:19 | |
perl6sum | stmuk I want autocompletion | ||
ZoffixW | Is there a nice way to get a list of matches of a regexp using a single statement? I'm having trouble with types: | 14:20 | |
m: my $str = "ffbbcc"; my ( $r, $g, $b ) = map ( :16($_) ), $str.match(/(..)(..)(..)/).list; say [ $r, $g, $b ].perl | |||
camelia | rakudo-moar 273e89: OUTPUT«Cannot call UNBASE(Int, Any); none of these signatures match: (Int:D $base, Any:D $num) (Int:D $base, Str:D $str) in block <unit> at /tmp/DhQdHcjwKs:1» | ||
ZoffixW | Why am I getting "Any" there? | ||
moritz | ZoffixW: map { :16($_) } | 14:21 | |
ZoffixW: otherwise the :16($_) is evaluated before it's passed to map | |||
ZoffixW | moritz++ thanks | 14:22 | |
masak | Ven_: I'm in UTC+08:00 | ||
'night, #perl6 | |||
ZoffixW | Night | 14:23 | |
JimmyZ | masak is in china? :) | ||
14:23
cygx left
|
|||
jnthn | cygx: I guess NativeCall is probably doing something that's bad for pre-comp. | 14:23 | |
Ven_ | pdcawley: I'd also agree quasi{} shouldn't do that, but we've established that the current quasi{} isn't a quasi | 14:26 | |
14:26
espadrine joined
|
|||
jnthn | m: my $str = "ffbbcc"; my ( $r, $g, $b ) = map { :16($_) }, $str.comb(/../); .say for $r, $g, $b | 14:26 | |
camelia | rakudo-moar 273e89: OUTPUT«255187204» | ||
lizmat | wonder if $str.comb(2) would be a lot faster there | 14:27 | |
commute to Amsterdam.pm meeting& | |||
14:28
lizmat left
14:29
sprocket left
|
|||
ZoffixW | Thanks. I'll read up on .comb | 14:30 | |
14:31
espadrine_ joined
14:32
espadrine left
|
|||
dalek | kudo/nom: d598af3 | jnthn++ | src/core/Str.pm: Prepare Str.lines for \r\n as 1 grapheme. Leave it able to support JVM too. |
14:32 | |
href="https://modules.perl6.org:">modules.perl6.org: 426a267 | azawawi++ | Build.PL: IO::Socket::SSL 1.94+ is needed for Mojo::UserAgent |
14:37 | ||
ZoffixW | 0.o we have a Mojo::UserAgent now | 14:38 | |
Oh. I thought it was a P6 module :P | 14:39 | ||
14:40
isBEKaml joined
|
|||
dalek | kudo/nom: 3e6bc1e | (Steve Mynott)++ | src/core/Kernel.pm: fix S02-magicals/KERNEL.t on DragonFly BSD by upper casing signal names |
14:42 | |
kudo/nom: a94389e | jnthn++ | src/core/Kernel.pm: Merge pull request #571 from stmuk/nom fix S02-magicals/KERNEL.t on DragonFly BSD by upper casing signal names |
|||
14:42
azawawi joined
|
|||
azawawi | ZoffixW: hi | 14:42 | |
ZoffixW | azawawi, hey | 14:43 | |
azawawi | ZoffixW: im trying to edit module.perl6.org repo to add watchers_count and stargazers_count | ||
ZoffixW: e.g. api.github.com/repos/rakudo/rakudo | |||
ZoffixW: if we have those two columns, we can sort by them. What do you think? | 14:44 | ||
ZoffixW: i.e. to find the most popular or used modules | |||
ZoffixW: open_issues_count is useful also | |||
dalek | ast: fa4431a | jnthn++ | S16-filehandles/io_in_while_loops.t: Update test to cope with Windows line ending too. |
14:46 | |
ZoffixW | azawawi, OK. | ||
azawawi, that info should be in this hashref: github.com/perl6/modules.perl6.org...ub.pm#L117 | |||
So, $repo->{stargazers_count} etc | 14:47 | ||
azawawi, and yeah, I think it would be good to have more info. | |||
My only concern is we're making that table wider and wider. | |||
dalek | ast: 125cf07 | jnthn++ | / (17 files): Fix Windows line ending workarounds. The completion of the NFG work making \r\n a single grapheme, per the Unicode spec, means that the approaches these tests took to work on Windows became bogus. Note that we'll probably have to take a pass through these all again in the near future, when \n in a string will become \r\n on Windows by default (hopefully clearing up a lot of this cruft). |
14:48 | |
ZoffixW | Or rather, not wider, but tighter :P 'cause all of the extra info has to fit it on one row. | ||
azawawi | ZoffixW: hmmm, top 10 lists? | ||
14:49
sufrosti1o left
|
|||
azawawi | ZoffixW: e.g. metacpan.org/favorite/leaderboard | 14:49 | |
ZoffixW | Woohoo Mojolicious is #1 :) Before even Perl :D | ||
azawawi | ZoffixW: Mojolicious is the new Perl 5 :) | 14:50 | |
14:50
ely-se left
|
|||
ZoffixW | azawawi, yeah, I think having something like this—a separate page—might be more useful. | 14:50 | |
dalek | ast: 2d5a420 | (Steve Mynott)++ | S06-traits/misc.t: correct typo |
||
isBEKaml | hoelzro: ping | 14:51 | |
azawawi | ZoffixW: true since why do you want to sort them repos with no stargazers... | ||
ZoffixW: /sort them/sort/ | |||
isBEKaml | hoelzro: have you had enough success with vim-perl syntax highlighting for perl6? | ||
hoelzro: I ask since I see this weirdness on vim right now: github.com/rakudo/rakudo/blob/3e6b...nel.pm#L13 | 14:52 | ||
dalek | kudo/nom: 75b2451 | jnthn++ | tools/build/NQP_REVISION: Bump NQP_REVISION for \r\n as 1 grapheme. This may have some ecosystem fallout for code that has been written assuming that "\r\n".chars will be 2. Thankfully, since .chomp is used in most such cases, this should be relatively little. |
||
isBEKaml | hoelzro: It seems to treat the '|' as scope delimiters for s// :-) | ||
hoelzro: that said, this should really go through: github.com/vim-perl/vim-perl/issues/194 | 14:53 | ||
azawawi | ZoffixW: also badges column is redundant in the sense why do i need to see success badges, show me failed audits | ||
PerlJam | ZoffixW: as long as your making changes ... why does travis say "build passing" or "build failing" etc? The word "build" seems superfluous. Maybe remove that to gain a tiny bit more horizontal space. | ||
s/your/you're/ | 14:54 | ||
dalek | ast: 302de05 | jnthn++ | S15-nfg/grapheme-break.t: Unfudge test for \r\n as a single grapheme. |
||
isBEKaml | .tell hoelzro sorry, I left too many messages for you in the backlog. Please check messages around this timestamp :-) | ||
yoleaux | isBEKaml: I'll pass your message to hoelzro. | ||
jnthn | That's RT #125927 ticked off :) | ||
isBEKaml | jnthn: I was just looking at that ticket :-) | ||
14:54
freeze joined
|
|||
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=125927 | 14:55 | |
nine | jnthn: congratulations! | ||
hoelzro | isBEKaml: I can look at this more in depth later, but first - are you using the latest version of syntax/perl6.vim from vim-perl? | 14:56 | |
yoleaux | 14:54Z <isBEKaml> hoelzro: sorry, I left too many messages for you in the backlog. Please check messages around this timestamp :-) | ||
isBEKaml | hoelzro: yes | ||
hoelzro | I just tried it with the latest and it works for me =/ | ||
ZoffixW | PerlJam, I think it was azawawi who was making changes :) But that's a good point. I'll open an Issue | ||
hoelzro | could you send me a screenshot? | ||
14:56
xpen joined
|
|||
hoelzro | I have to get going to work, but I can have a quick look when I get there | 14:56 | |
PerlJam | zostay: sorry :) | 14:57 | |
er, ZoffixW even | |||
hoelzro wonders if one of the channel bots should detect github.com/rakudo/rakudo/blob/mast...nel.pm#L13 and rewrite it as github.com/rakudo/rakudo/blob/3e6b...nel.pm#L13 | |||
isBEKaml | hoelzro: send you an email or upload somewhere? | 14:58 | |
ZoffixW | azawawi, yeah, some of the badges might not be needed any more. I opened an issue for the topic: github.com/perl6/modules.perl6.org/issues/19 | ||
[Coke] | jnthn++ | 14:59 | |
azawawi | ZoffixW: i verified the hash and yes the information is already there... thanks :) | ||
ZoffixW | \o/ | 15:00 | |
isBEKaml | hoelzro: d'oh - never mind. | ||
hoelzro: I did :se ft=perl6 and it all looks fine now. The .pm confusion strikes again! :-| | 15:01 | ||
15:01
khw joined
15:02
xpen left
|
|||
isBEKaml | hmm, my vim didn't read those editor markers for perl6... | 15:04 | |
azawawi is waiting for build-project-list.pl to finish | 15:09 | ||
moritz | that thing could use some caching, IMHO | ||
15:10
AlexDaniel joined
|
|||
azawawi | moritz: yup it is way too slow | 15:10 | |
178/432... | |||
15:11
AlexDaniel left
|
|||
ZoffixW | azawawi, if you're just doing testing, it accepts a --limit option | 15:11 | |
to build just --limit X dists instead of all of them | |||
azawawi wants to write a proper README.md after finishing :) | 15:12 | ||
dalek | rl6-roast-data: 4d0ec70 | coke++ | / (9 files): today (automated commit) |
||
[Coke] | 37232 failing tests in rakudo-jvm today. :| | ||
[Coke] starts a slow bisect. | |||
jnthn | :( | 15:13 | |
[Coke]++ | |||
15:15
cygx joined
15:16
mrsolo joined
|
|||
colomon | [Coke]: wouldn’t it be more time efficient if you started a fast bisect? ;) | 15:16 | |
stmuk | renice -20 :) | 15:17 | |
[Coke] | colomon: :P | 15:19 | |
15:19
ketadmin joined,
tokuhiro_ joined
15:20
perl6sum left
15:24
tokuhiro_ left
|
|||
[Coke] | oneof the intermediate builds fails with: | 15:25 | |
Stage jast : Error while compiling op setinputlineseps (source text: "nqp::setinputlineseps(handle, endings)"), no registered operation handler | |||
15:26
RabidGravy joined
|
|||
RabidGravy | wahay! | 15:26 | |
yoleaux | 11:09Z <azawawi> RabidGravy: to get the github stars on a certain github repo, get api.github.com/repos/rakudo/rakudo which returns a JSON response and use "stargazers_count" key :) | ||
11:19Z <tadzik> RabidGravy: I just did, thanks a lot :) | |||
15:26
sprocket joined
15:27
pyrimidine joined
|
|||
RabidGravy | azawawi++ # most excellent | 15:27 | |
pyrimidine | jnthn++ # fix for RT #122971 | 15:29 | |
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=122971 | ||
15:31
pmurias joined
|
|||
RabidGravy | tadzik++ # lets me do this | 15:32 | |
dalek | osystem: 02d2303 | RabidGravy++ | META.list: Fix branch on Perl6::Maven |
||
osystem: 251b4d1 | RabidGravy++ | /: Merge branch 'master' of github.com:perl6/ecosystem |
|||
osystem: 0a4e339 | RabidGravy++ | META.list: Merge branch 'master' of github.com:perl6/ecosystem |
|||
osystem: ef1f0f1 | RabidGravy++ | META.list: Add the JSON::Class github.com/jonathanstowe/JSON-Class |
|||
15:33
mayuresh joined,
AlexDaniel joined
|
|||
RabidGravy | why didn't I take my own advice and rebase ;-) | 15:33 | |
15:33
joe___ joined
|
|||
mayuresh | is [coke] around? | 15:33 | |
[Coke] | Hio | ||
RabidGravy | there | ||
mayuresh | [coke] did your problem about that processing hanging get resolved? | 15:34 | |
i meant, process hanging. :) | |||
[Coke] | which process? | ||
mayuresh | weren't you the one running some tests under mac os x? | 15:35 | |
umnn, maybe it's just me being a jackass. ;-) | |||
sprocket | how would i be able to define different things for different architectures? | ||
yoleaux | 10:02Z <jnthn> sprocket: Define both structs, and then write constant TheStruct = $*KERNEL eq 'darwin' ?? TheOSXStruct !! TheLinuxStruct; | ||
sprocket | yoleaux: thanks :) | ||
15:36
cognominal joined
|
|||
[Coke] | I do lots of stuff. That's not enough of a callback for me to remember the specific issue, sorry. | 15:36 | |
mayuresh | [coke], are you the same person running mac os x, after having worked under windows for years! | ||
ilmari | m: $*KERNEL.version | 15:37 | |
camelia | ( no output ) | ||
ilmari | m: say $*KERNEL.version | ||
camelia | rakudo-moar 273e89: OUTPUT«v3.16.6.2.default» | ||
[Coke] | no, I'm not a windows person. | ||
mayuresh | ah, so i am indeed being a jackass. ;) | ||
i just can't remember who it was that got stuck with the process hanging issue under mac os x and couldn't find tools to inspect the problem. | 15:38 | ||
15:38
Odud left
|
|||
mayuresh | i think i might have some tips for that person. | 15:38 | |
15:38
g4 left
|
|||
mayuresh | actually conversed with a bunch of mac os x developers | 15:38 | |
just to get that piece of information. | |||
and now it's all useless. :( | |||
just because i can't remember who it was i intended to help. | 15:39 | ||
gah. | |||
this is utterly disgusting on my part. | 15:40 | ||
i should simply leave now. | |||
15:40
mayuresh left
|
|||
[Coke] | oh. Yes, I was trying to use that tool. I'm not a windows person, though. | 15:40 | |
but that was days ago. I have no idea how to reproduce the failing I was seeing. | |||
hoelzro | isBEKaml: which editor markers? | 15:41 | |
[Coke] | please write that information down in a gist somewhere so I can use it in 3 weeks when I need it again. :) | ||
*the failure | |||
isBEKaml | hoelzro: those # vim: ft=perl6... | 15:42 | |
hoelzro | isBEKaml: do you have modeline set to true? | ||
15:44
softmoth joined
|
|||
nine | [Coke]: mayuresh already left | 15:45 | |
15:45
pullphinger left,
pullphinger joined
15:46
cygx left
|
|||
ilmari | huh, the percentage bar at the top of github.com/perl6/nqp claims 66.8% parrot, but when you click it it finds nothing | 15:46 | |
[Coke] | well, I hope they review next time. whoops. | ||
isBEKaml | hoelzro: ah, that's it. I have now set it in my .vimrc -- that's what happens when you move between machines not knowing which setting it was that worked on the other machine :-) | ||
moritz | ilmari: probably due to the .pir bootstrapping files | ||
hoelzro | isBEKaml: there's also a contrib/ file called perl11.vim that tries to detect which type the file is | 15:47 | |
isBEKaml | hoelzro: but that would surely fail with a file like Kernel.pm? | ||
hoelzro looks | |||
ilmari | moritz: I was more boggling at the actual search disagreeing with it | ||
hoelzro | isBEKaml: it should work | 15:48 | |
unless it changes =) | |||
ilmari | github.com/perl6/nqp/search?l=parrot | ||
hoelzro | it uses the heuristics set out in S02 to detect a Perl 6 file | ||
ie. if the first non-comment line has a class/role/etc declaration | |||
or if 'use v6' is found | |||
s/non-comment/non-comment, non-empty/ | 15:49 | ||
isBEKaml | hoelzro: grr, I did the install the old way of doing 'make install' after extracting the tarball. perl11.vim is in ftdetect which is not part of the install | 15:51 | |
hoelzro | you should be able to just drop it in under ftdetect/; I don't think it's meant to be installed by default | 15:52 | |
isBEKaml | hoelzro: yeah, it works. but no matter, I got my modeline back =) | 15:53 | |
hoelzro | \o/ | 15:54 | |
azawawi | ZoffixW: nearly there :) | ||
ZoffixW: generating image :) | |||
isBEKaml | thanks, hoelzro! | 15:55 | |
hoelzro | happy to help! | ||
15:57
softmoth left
|
|||
dalek | kudo/nom: 2c43078 | jnthn++ | src/core/core_prologue.pm: Introduce a $?NL which represents the platform \n. |
15:58 | |
kudo/nom: 0396397 | jnthn++ | / (3 files): Add newline pragmatic module to control $?NL. |
|||
15:58
azawawi left
15:59
flaviusb joined
16:02
liztormato joined
|
|||
liztormato | jnthn: why a separate file for that new pragma? Why not use the new approach for pragmas? | 16:04 | |
jnthn | liztormato: What new approach? | ||
liztormato: The %*PRAGMAS thing is there as a stopgap until we can write all pragmas in a "first class" way, not an ideal. | |||
liztormato | In World.nqp: do_pragma | 16:05 | |
jnthn | Then we have to bulk up the compiler with it | ||
There's no reason to do that; this one is trivially implementable as a normal pragmatic module. | 16:06 | ||
liztormato | Well having it as an external means all sorts of repo overhead | ||
jnthn | That's fine; I don't expect this to be commonly used :) | ||
16:06
liztormato left
|
|||
jnthn | And I hope we can get that overhead down some. | 16:06 | |
The bigger issue with this is that now \r\n has a surprising meaning on Windows... | 16:07 | ||
isBEKaml | m: $*DISTRO.^methods.say # are these <anon>s meant to be there? | 16:08 | |
camelia | rakudo-moar 273e89: OUTPUT«(BUILD cur-sep Str gist <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon>)» | ||
jnthn | Well, .^methods isn't meant to hide things | 16:09 | |
dalek | kudo/nom: e98b114 | (Stefan Seifert)++ | src/Perl6/Actions.nqp: Fix optimized for range loop messing up lexicals The optimized code is created from the original op tree, not what p6for generates. So creating the closure for $block in p6for is not enough. Add the block_closure to the original op tree instead, so we get it in the optimized code, too. |
16:10 | |
kudo/nom: f59b910 | timotimo++ | src/Perl6/Optimizer.nqp: Bring back optimization of for $range loops Only optimize for Range to while when looping in sink context. Only optimize unlabled for loops. Otherwise we miss the control exception handlers. |
|||
isBEKaml | jnthn: so what would you recommend I use instead? | ||
nine | .tell timotimo it is done! | ||
yoleaux | nine: I'll pass your message to timotimo. | ||
16:10
mr_ron joined
|
|||
iv | how does one have anonymous methods? | 16:10 | |
nine | Bring forth those benchmarks! | ||
PerlJam wonders if there's a :named to go along with :local and :global for .^methods | |||
jnthn | isBEKaml: What do you want to do? | ||
isBEKaml | jnthn: nothing! :P | 16:11 | |
timotimo | nine: hooray! nine++ | ||
yoleaux | 16:10Z <nine> timotimo: it is done! | ||
isBEKaml | jnthn: well, I'm mostly curious after being away from perl6 :-) | ||
mr_ron | m: say Nil.Str # docs.perl6.org/type/Nil#method_Str | ||
camelia | rakudo-moar 273e89: OUTPUT«Use of Nil in string context in block <unit> at /tmp/Q_n_kNl3GR:1» | ||
jnthn | isBEKaml: You may find .^method_table of interest | ||
nine++ | 16:12 | ||
16:12
tokuhiro_ joined
|
|||
timotimo | nine: there's a commit there that's allegedly mine, but i don't remember making it :P | 16:12 | |
sprocket | so the design docs call for $*GID / $*UID / $*EGID / $*EUID to be defined, but attempting to use them is giving me an error | ||
is that something that’s coming eventually and just hasn’t been implemented yet? | |||
nine | timotimo: it's your WIP commit with two fixes added | ||
timotimo | sprocket: probably | ||
llfourn | sprocket: Not Yet Implemented :) | ||
sprocket | :) ok, i can work around that, thanks! | 16:13 | |
isBEKaml | jnthn: huh, wow. | ||
llfourn | m: for ^10 { my $answer = 42; try { let $answer = 84; die "resetting $answer" if Bool.pick } ; print $answer } | ||
camelia | rakudo-moar 273e89: OUTPUT«42424242424242424242» | ||
timotimo | nine: also with commit message changes attached, i see ;) | ||
llfourn | Am I very unlucky? | ||
mr_ron | Did I misunderstand the docs or am I missing something else? | 16:14 | |
jnthn | m: say Bool.pick | ||
camelia | rakudo-moar 273e89: OUTPUT«True» | ||
jnthn | m: say Bool.pick | ||
camelia | rakudo-moar 273e89: OUTPUT«False» | ||
timotimo | m: say Nil.Str.perl | ||
camelia | rakudo-moar 273e89: OUTPUT«Use of Nil in string context in block <unit> at /tmp/h6Oa4wgA79:1""» | ||
timotimo | mr_ron: it's exactly as documented. except, it also throws a warning :) | 16:15 | |
llfourn | m: for ^10 { my $answer = 42; try { let $answer = 84; my $b = Bool.pick; say $b; die "resetting $answer" if $b } ; print $answer } | ||
camelia | rakudo-moar 273e89: OUTPUT«True42True42True42False42False42False42True42True42True42True42» | ||
llfourn | eh | ||
timotimo | :\ | ||
mr_ron | Should I file an RT? I didn't see one for this. | 16:16 | |
llfourn | m: for ^10 { my $answer = 42; try { let $answer = 84; my $b = Bool.pick; say $b; if $b { die "resetting $answer" } } ; print $answer } | ||
camelia | rakudo-moar 273e89: OUTPUT«True42True42True42True42True42True42True42False42True42False42» | ||
16:16
_mg_ left,
tokuhiro_ left
|
|||
timotimo | perhaps the try { } around it makes the exception nonfatal and nonfailure-y enough to prevent let from resetting? | 16:17 | |
llfourn | m: my $answer = 42; try { let $answer = 84; die} ; say $answer; | 16:18 | |
camelia | rakudo-moar 273e89: OUTPUT«42» | ||
llfourn | timotimo: maybe... | ||
m: my $answer = 42; try { let $answer = 84; } ; say $answer; | 16:19 | ||
camelia | rakudo-moar 273e89: OUTPUT«84» | ||
jnthn | .tell TimToady Turns out making \n magical mostly trips up over every \r\n usage out there. Should we special-case \r\n to mean The Right Thing also? | ||
yoleaux | jnthn: I'll pass your message to TimToady. | ||
llfourn | timotimo: but let *does* reset it | 16:20 | |
timotimo | huh. | ||
dalek | kudo/magical-n: 95f66bb | jnthn++ | src/ (5 files): Work-in-progress on making \n platform magical. |
||
llfourn | m: for ^10 { my $answer = 42; try { let $answer = 84; my $b = Bool.pick; say $b; if $b { die "resetting $answer" } } ; print $answer } | ||
camelia | rakudo-moar 273e89: OUTPUT«False42False42True42False42False42False42False42False42True42False42» | ||
llfourn | 42 means it was reset | ||
mr_ron | timotimo: sorry I misunderstood your answer, I think I understand now | 16:21 | |
16:21
Skarsnik joined
|
|||
timotimo | isn't a change made by let supposed to survive leaving the block, though? | 16:22 | |
PerlJam | m: for ^10 { my $a = 42; try { let $a = 84; fail if Bool.pick; 1 } ; say $a; } | ||
camelia | rakudo-moar 273e89: OUTPUT«84428484424284424242» | ||
llfourn | timotimo: yes, so it's dieing every time | ||
PerlJam | llfourn: looks like a bug to me. | ||
timotimo | um, should "fail" in there really work? | ||
fail is a sort of return, after all | |||
m: for ^10 { say "test"; return } | |||
camelia | rakudo-moar 273e89: OUTPUT«test» | ||
PerlJam | m: for ^10 { my $a = 42; try { let $a = 84; die if Bool.pick; 1 } ; say $a; } | ||
camelia | rakudo-moar 273e89: OUTPUT«42844242844242848442» | ||
timotimo | oh! | 16:23 | |
Skarsnik | Hi there, where I can find the source code of the eval bot? x) | ||
timotimo | Skarsnik: probably perl6/evalbot or perl6/camelia | ||
the else-block of that postfix-if returns a "interpreted as failure" value | |||
PerlJam: good catch! | |||
llfourn | timotimo: eh the block has to return true? | ||
16:24
sufrostico joined,
pmurias left
|
|||
llfourn | m: for ^10 { my $answer = 42; try { let $answer = 84; my $b = Bool.pick; say $b; if $b { die "resetting $answer" }; 1 } ; print $answer } | 16:24 | |
camelia | rakudo-moar 273e89: OUTPUT«False84False84False84True42True42True42False84False84False84False84» | ||
timotimo | llfourn: has to return a defined value, iirc | ||
16:25
pmurias joined
|
|||
timotimo | m: for ^10 { my $a = 42; try { let $a = 84; Bool.pick ?? 1 !! Any } ; say $a; } | 16:25 | |
camelia | rakudo-moar 273e89: OUTPUT«84428442844284844242» | ||
llfourn | Ah well that explains it. Thanks guys. | ||
Skarsnik | Also. I was wondering is there a way to have something similar to how package work in java. Like I define stuff in a MyModule package/namespace and I have access to then in a MyModule::OtherStuff. But not in a code that just do use MyModule. | 16:26 | |
[Coke] | I didn't see an answer to the Nil.Str question - no, working as intended. | 16:27 | |
m: my $a = Nil.Str; say "alive"; say ":{$a}:" | 16:28 | ||
camelia | rakudo-moar 273e89: OUTPUT«Use of Nil in string context in block <unit> at /tmp/c1Ijzh3fs4:1alive::» | ||
garu | Skarsnik: you mean like use lib? | ||
[Coke] | ^^ it's warning you, but it's still returning the empty string. | ||
timotimo | [Coke]: i answered, but i'm not sure it "arrived" | 16:29 | |
Skarsnik | garu, use lib? | ||
16:29
RabidGravy left
|
|||
[Coke] | timotimo++ | 16:31 | |
dalek | ast: 0a388d1 | jnthn++ | S16-io/handles-between-threads.t: Test for file handle use between threads. |
16:32 | |
16:32
RabidGravy joined
|
|||
PerlJam | llfourn: maybe that should be part of a best practices or a FAQ or something ... if you're going to use "let" make *sure* you handle both success/failure in the block. | 16:33 | |
llfourn | PerlJam: I'm just writing a quick doc for let now. Will be sure to mention it :) | ||
PerlJam | llfourn: your example was non-intuitive precisely because you were only concerned with the failure side and didn't specify success adequately | ||
RabidGravy | don't say "best practices" | 16:34 | |
llfourn | PerlJam: I thought failure meant exception thrown not block return value | ||
[Coke] | are we not doing jenkins on the jvm builds? | ||
mrf | Anyone know how I force update of nqp in rakudobrew. (along with anything that would have to be updated as a result) | 16:35 | |
PerlJam | llfourn: S04:1772 | 16:36 | |
synbot6 | Link: design.perl6.org/S04.html#line_1772 | ||
llfourn | PerlJam: cheers. | ||
16:41
ZoffixW left
|
|||
jdv79 | is someone starting a p6bp? | 16:43 | |
RabidGravy | if they do I leave | ||
jdv79 | haha | 16:44 | |
PerlJam | RabidGravy best practice: don't start a Perl 6 Best Practices | ||
RabidGravy | the people who have the loudest voices and the most dubious opinions form the "best practice" | 16:45 | |
PerlJam++ # precisely | 16:46 | ||
TimToady | m: say &[Z+].name | 16:47 | |
yoleaux | 16:19Z <jnthn> TimToady: Turns out making \n magical mostly trips up over every \r\n usage out there. Should we special-case \r\n to mean The Right Thing also? | ||
camelia | rakudo-moar 273e89: OUTPUT«» | ||
stmuk | "there is more than one way to do but only my way is Right" | ||
RabidGravy | stmuk++ | ||
TimToady | m: say &[Z+].name | 16:48 | |
camelia | rakudo-moar 273e89: OUTPUT«» | ||
PerlJam | RabidGravy: are you sure you're not reacting to the evangelization of PBP? | ||
jdv79 | im imterested in what a p6 tidier will do | ||
TimToady | camelia is about 24 hours out-of-date now | ||
stmuk | I think most p5 progammers agree with about 2/3 of PBP but not which 2/3 | ||
PerlJam | RabidGravy: I mean, Damian wasn't really loud and his opinions weren't dubious, it was just when people decided to take his word as gospel that things went sideways | ||
RabidGravy | partly that and partly to the newspeak of "best practices" wherever it is found | 16:49 | |
yes, blindly taking things as gospel | |||
see also "Modern Perl" | |||
timotimo | did 2015.10 already have GLR in it? | ||
nine | timotimo: yes | 16:50 | |
timotimo | OK | ||
nine: i'm going to compare the benchmark results to 2015.09 | |||
jdv79 | well, modern perl seemed a bit better thought out and based in reality | ||
imo | |||
RabidGravy | PerlJam, totally agree fwiw | ||
pmurias | some of the opinions in PBP were dubious, like the inside out objects | 16:51 | |
dalek | Heuristic branch merge: pushed 89 commits to rakudo/curli by niner | 16:52 | |
nine | note to self: first push the merge, then push the new commit | ||
PerlJam | pmurias: How were inside out objects dubious exactly? | ||
RabidGravy | I'm only going to say this once but "Modern Perl" (in my mind) reduces Perl to a scripting language for a small set of cabal mandated frameworks | ||
jdv79 | its definitely not a best practice | ||
16:53
_mg_ joined
|
|||
jdv79 | io objs that is | 16:53 | |
16:53
joe___ left
|
|||
tony-o | m: "\r\n".ord.say; | 16:54 | |
camelia | rakudo-moar 273e89: OUTPUT«13» | ||
stmuk | inside objects were in fashion for about 6 months in 2005 | ||
grondilu | is everything still inline for Xmas? | 16:55 | |
tony-o | i think christmas is still going to happen this year grondilu | ||
jdv79 | amd how is a fad a best practice in any sense? | ||
RabidGravy | well we've worked out where we're going to buy a christmas tree this year | ||
16:56
abraxxa left
|
|||
TimToady | tony-o: that's still yesterday's camelia | 16:56 | |
.seen moritz | |||
yoleaux | I saw moritz 15:46Z in #perl6: <moritz> ilmari: probably due to the .pir bootstrapping files | ||
sprocket | hey all - i’ve done a first cut at a POSIX module containing some of the functions I needed for another project (ie. setuid, setgid, etc) and have pushed it out to github. how would i go about getting that added to the p6 module ecosystem? | ||
16:57
mr_ron left
|
|||
xenu | pbp spawned perl critic, which is pretty useful tool, but can be horribly misused. unfortunately usually that's the case | 16:57 | |
16:57
_mg_ left
|
|||
ugexe | im getting strange behavior reguarding \r\n. the ord for it is changing depending on what is in the string | 16:58 | |
gist.github.com/ugexe/09cfce18f3ece8b6e83b | 16:59 | ||
sometimes \r\n is converted as '13', sometimes '4294967309' | |||
if i remove a line of text from that example, sometimes the 4294967309 changes to a '13' | 17:00 | ||
RabidGravy | sprocket, fork, clone the github.com/perl6/ecosystem add your META.info to the META.list (i.e the raw entry), make PR | ||
TimToady | ord should always report 13, and not the synthetic | ||
jdv79 | whats a pjpeg? | ||
TimToady | (and the synthetic should probably be reported as negative, not huge positive) | ||
stmuk | hahaha "make sandwich" | 17:01 | |
RabidGravy | sprocket, if you're on a roll and making several modules someone may add you to the ecosystem project | 17:02 | |
I don't have that force | |||
sprocket | RabidGravy: thanks! | ||
[Coke] | onder if the synthetic is underflowing? | 17:03 | |
TimToady | .tell jnthn either we accept \r\n as the same, or we blow up and say "you gotta say 'use newline :lf' for \r\n to work" | ||
yoleaux | TimToady: I'll pass your message to jnthn. | ||
TimToady | looks like a 32-bit number, so maybe 32 vs 64-bit problem? | 17:04 | |
17:05
pmurias left
|
|||
tony-o | dunno, check this out | 17:07 | |
tonyo@imac ~$ perl6 -e '.ord.say for "\r\n".comb;' | |||
13 | |||
timotimo | nine: t.h8.lv/p6bench/2015-11-02-rakudo_m...t_glr.html | ||
jnthn | If synthetics are somehow leaking, that's a bug | 17:08 | |
yoleaux | 17:03Z <TimToady> jnthn: either we accept \r\n as the same, or we blow up and say "you gotta say 'use newline :lf' for \r\n to work" | ||
jnthn | TimToady: I think we'll go with "make it work as it did" | ||
TimToady: Least surprise, for msot definitions | |||
Note that if you .ord a synthetic you get the ord of the base char. | 17:09 | ||
17:10
sufrostico left
|
|||
dalek | c: 89362d6 | (Lloyd Fournier)++ | doc/Language/ (2 files): let example (duplicated) |
17:10 | |
17:10
telex left
|
|||
tony-o | wonder how that works with trans | 17:10 | |
llfourn | PerlJam: ^^ for your reviewing pleasure :) | ||
tony-o | ah, doesn't transform at all with trans | 17:11 | |
nine | timotimo: the results for for loops look awesome! But why would while have become so much slower? | ||
17:11
sufrostico joined
|
|||
timotimo | good questoin | 17:11 | |
... question | |||
i'm currently working on #job, so can't delve too deep | |||
perhaps you can figure out something about [+] 1 .. SCALE, though? | |||
that's become 14x slower | 17:12 | ||
17:12
telex joined
|
|||
nine | Well, I'm off to a Calexico concert now. | 17:13 | |
timotimo | oh | ||
enjoy! :) | |||
nine | Thanks :) | ||
17:14
dakkar left
17:16
raiph joined
|
|||
PerlJam | llfourn: if Bool.pick returns True, the die is executed and $answer will be 42. Your text has it backward. | 17:16 | |
llfourn | PerlJam: ah thanks | ||
PerlJam | llfourn: I find the sentence "Like the temp prefix, but only restores the value if the block exits unsuccessfully" tedious to parse | 17:17 | |
well ... and understadn | |||
llfourn | PerlJam: Agreed | ||
sprocket | RabidGravy: the ecosystem META.list has the urls as “raw.githubusercontent.com/….” - but i’m not able to view my META.info with the url yet | 17:18 | |
RabidGravy: will that appear eventually? | |||
17:18
mrsolo left
|
|||
PerlJam | llfourn: sorry I've only got criticism, my brain is occupied elsewhere enough that I don't have suggestions for better wording. | 17:18 | |
ugexe | how do i construct a string with a \r\n that matches a regex with \r\n but not \n? | 17:19 | |
RabidGravy | sprocket, go to the file in github, there's a "raw" button to the top right, click that copy the URI | ||
sprocket | RabidGravy: ah! thank you | ||
TimToady | a Str cannot contain \r\n except as a synthetic | ||
RabidGravy | top middle right, that is | 17:20 | |
llfourn | PerlJam: nw looks good now thanks. It's never the last commit! | ||
TimToady | a Buf.new(13,10) is a CRLF | ||
RabidGravy | if it isn't we ain't having no web clients ;0) | ||
ugexe | right, but in this case i want to write a test for a http header. its not very convienient to store the test data as a Buf instead of as a human readable string | 17:21 | |
dalek | c: 9fc68ca | (Lloyd Fournier)++ | doc/Language/ (2 files): fix let example and clean up first sentence |
||
17:21
zakharyas left
|
|||
ilmari | huh, doesn't Buf have a .join method? | 17:23 | |
otherwise you could have done ('Foo: bar','Baz: zot').map(*.encode('ascii')).join(Buf.new(13, 10)) | |||
dalek | osystem: 926458a | cspencer++ | META.list: Added Perl 6 POSIX module to ecosystem. |
17:24 | |
osystem: 1ffbc3d | (Zoffix Znet)++ | META.list: Merge pull request #86 from cspencer/master Added Perl 6 POSIX module to ecosystem: github.com/cspencer/perl6-posix |
|||
TimToady | we probably need better ways to write Buf/Uni literals | ||
RabidGravy | sprocket++ # I'll look later, but damn good stuff ;-) | 17:25 | |
jnthn | \r\n in a regex won't match a \n | 17:26 | |
RabidGravy | which would be quite weird | 17:27 | |
ugexe | "\x[d]\x[a]\x[d]\x[a]".encode will encode to 13, 10, 13, 10 | ||
jnthn | \n in a regex is logical | ||
sprocket | RabidGravy: appreciate it, thanks for all your help! | 17:28 | |
ugexe | yea, but i want to write a string with a \r\n that doesnt match a \n token in a regex | ||
jnthn | \n in a regex has always matched \r\n | 17:29 | |
You need to write something like \xA in the regex if you really mean "exactly this char" | |||
TimToady | but that won't work either if the Str is NFG | ||
jnthn | How so? | 17:30 | |
TimToady | not unless you ignore the \n "mark" | ||
er, wait, \xa is linefeed | |||
ugexe | yea i already use \x0D \x0A | 17:31 | |
TimToady | so you're matching only the "combiner" | ||
is \xd\xa in a pattern somehow smart enough to match a single grapheme? | |||
jnthn | ugexe: Can you give me a golfed example of what you're doing and geting unexpected results with? I'm not quite following what you want to do. | ||
17:31
espadrine_ left
|
|||
jnthn | TimToady: Yes | 17:31 | |
17:31
ollej joined
|
|||
TimToady | okay | 17:32 | |
ugexe | ill try, but its for Grammar::HTTP which is probably the poster child for something that would choke on such a change | 17:33 | |
17:33
Alina-malina joined
|
|||
ugexe | but it seems to boil down to me writing the headers as a string for tests, and those \r\n get turned into \n | 17:34 | |
jnthn | say so qq{\r\n} ~~ /\r\n/ # True | 17:36 | |
say so qq{\n} ~~ /\r\n/ # False | |||
This is without the Windows magical \n in place yet | 17:37 | ||
17:37
ambs left
|
|||
garu | Skarsnik: nevermind, I thought you meant something else. That said, I'm not entirely sure what you do mean :) | 17:39 | |
raiph | Have folk discussed the idea of `has $foo` being the mid ground between 100% private `has $!foo` and 100% public `has $.foo`? | 17:41 | |
TimToady | the middle ground is a bog | 17:42 | |
jnthn | raiph: What would that mean, exactly? | ||
Skarsnik | garu, I written a module (Gumbo) it's a binding to a c lib. It export a single function but define internally lot of cstruct/ccall. I want to write a Gumbo::Parser class in a Gumbo/Parser.pm6 file and have access to all these internal cstruct. But I don't want then exposed to an user of the module | ||
17:42
mr_ron joined
|
|||
tony-o | Skarsnik: just don't export the struct classes.. | 17:43 | |
mr_ron | m: grammar G { token TOP { a+ } }; my Nil $x = G.parse("zz") | 17:44 | |
camelia | rakudo-moar 273e89: OUTPUT«Type check failed in assignment to $x; expected Nil but got Any in block <unit> at /tmp/r2t2se6KEB:1» | ||
17:44
ambs joined
|
|||
raiph | m: class c { has $foo }; c.new(:foo) # would initialize the private foo attribute # jnthn | 17:44 | |
camelia | ( no output ) | ||
PerlJam | raiph: and how to we retrieve the private $foo value? | 17:45 | |
17:45
Alina-malina left
|
|||
tony-o | you'd have to write your own getter/setters for it.. | 17:45 | |
raiph | PerlJam: same as currently | ||
17:46
lolisa left
|
|||
JimmyZ | m: has $foo; | 17:46 | |
camelia | rakudo-moar 273e89: OUTPUT«5===SORRY!5=== Error while compiling /tmp/9XkvUyLB19You cannot declare attribute '$foo' here; maybe you'd like a class or a role?at /tmp/9XkvUyLB19:1------> 3has $foo7⏏5; expecting any of: constraint» | ||
mr_ron | m: grammar G { token TOP { a+ } }; my Nil $x = G.parse("zz") # docs.perl6.org/type/Grammar#method_parse "Returns a Match object on success, and Nil on failure." | 17:47 | |
camelia | rakudo-moar 273e89: OUTPUT«Type check failed in assignment to $x; expected Nil but got Any in block <unit> at /tmp/M2IcZbVvcg:1» | ||
jnthn | raiph: Ah, initializable publicly but then not public. No, we've not considered that, and I don't think it's likely. | ||
17:47
^elyse^ joined
|
|||
mr_ron | What am I missing again ? | 17:47 | |
17:48
Ven_ left
|
|||
raiph | jnthn: thanks | 17:49 | |
17:50
go|dfish joined
17:55
sufrostico left
|
|||
mr_ron | m: grammar G { token TOP { a+ | <bs> }; token bs { b+ } }; say G.parse("zz").WHAT; say G.parse("aa")<bs>.WHAT | 17:56 | |
camelia | rakudo-moar 273e89: OUTPUT«(Any)Nil» | ||
garu | Skarsnik: what tony-o said... looks as if you'd have to do something if you wanted to expose the cstruct, not the other way around | 17:58 | |
18:00
uruwi left
18:01
andreoss left
18:04
diana_olhovik joined,
firstdayonthejob joined,
diana_olhovik left
|
|||
mr_ron | Is G.parse() returning the wrong thing? It looks to me like it is. | 18:05 | |
18:05
ChoHag left
|
|||
tony-o | m: grammar G { rule TOP { a+ } }; G.parse('zz').perl.say; | 18:06 | |
camelia | rakudo-moar 273e89: OUTPUT«Any» | ||
tony-o | m: grammar G { rule TOP { a+ } }; G.parse('zz').WHAT.say; | ||
camelia | rakudo-moar 273e89: OUTPUT«(Any)» | ||
tony-o | m: say Nil ~~ Any; | ||
camelia | rakudo-moar 273e89: OUTPUT«True» | ||
tony-o | m: say Any ~~ Nil; | ||
camelia | rakudo-moar 273e89: OUTPUT«False» | ||
tony-o | m: my Nil $a = Any.new; | ||
camelia | rakudo-moar 273e89: OUTPUT«Type check failed in assignment to $a; expected Nil but got Any in block <unit> at /tmp/eTOiFilv7h:1» | ||
18:06
raiph left
18:07
diana_olhovik joined
|
|||
mr_ron | m: grammar G { token TOP { a+ } }; my Nil $x = G.parse("zz") | 18:07 | |
camelia | rakudo-moar 273e89: OUTPUT«Type check failed in assignment to $x; expected Nil but got Any in block <unit> at /tmp/HMNfyPJjvI:1» | ||
tony-o | mr_ron: appears either the doc is wrong or .parse is returning the wrong type | ||
18:07
sufrostico joined
|
|||
mr_ron | The definition of Nil is the 'Absence of a value' suggesting to me the doc makes sense anyway | 18:09 | |
Skarsnik | :m my @t = 1..5; @t.tail(1); | 18:10 | |
m: my @t = 1..5; @t.tail(1); | |||
camelia | ( no output ) | ||
tony-o | mr_ron: agreed | ||
Skarsnik | I get Method 'tail' not found for invocant of class 'Array' ~~ | 18:11 | |
18:11
diana_olhovik left
|
|||
tony-o | update rakudo | 18:13 | |
18:13
spider-mario joined
|
|||
Skarsnik | it's a recent addition? | 18:14 | |
18:15
isBEKaml left
|
|||
gfldex | Date: Tue Oct 27 23:02:09 2015 +0100 | 18:15 | |
Introduce .head($n)/.tail($n) | |||
Skarsnik: ^^^ | |||
18:17
tokuhiro_ joined
18:19
ChoHag joined
18:20
bpmedley left
|
|||
ugexe | this \r\n problem seems it may be related to submatches and matching on \r\n | 18:21 | |
18:21
tokuhiro_ left
|
|||
ugexe | my $request = q{GET /http.html HTTP/1.1} ~ "\r\n"; my $u = $request ~~ /\r\n/; say $u.Str ~~ /^\n/; | 18:21 | |
the actual token is `token status-line { <HTTP-version> <.SP> <status-code> <.SP> <reason-phrase> <.CRLF> }`. By passing in a string that ends with "\r\n" the <CRLF> is left to match against ord 13, and not \x0d \x0a, so it fails | 18:25 | ||
18:30
mrsolo joined,
_mg_ joined
18:36
raiph joined
|
|||
dalek | kudo/lines-vm-chomp: afef47d | jnthn++ | src/core/IO/Handle.pm: Use nqp::readlinechompfh for .get and .lines. Needs the JVM backend to support this op before we can merge it, but pushing it so nobody duplicates the work, and so we can see how much it helps performance. |
18:43 | |
jnthn | ugexe: A string "\r\n" will match /^\n/ | 18:44 | |
ugexe: But if we're really getting the ord 13 in there, yeah, something's not right | |||
ugexe: But still not seeing how that happens. Alas, time to make dinner now. | 18:45 | ||
18:46
mr_ron left
|
|||
jnthn | & | 18:47 | |
18:48
_mg_ left
18:49
_mg_ joined
18:52
khw left,
Actualeyes left,
kmel joined
18:57
llfourn left
18:58
raiph left
18:59
xpen joined
19:01
raiph joined
19:03
kmel left,
kmel_ joined
19:04
xpen left
|
|||
flussence | looks like panda needs \r\n-fixing... explodes in the projects.json HTTP request stuff. | 19:09 | |
dalek | c: 7a6dc7d | (Steve Mynott)++ | doc/Language/faq.pod: minor typos and tweaking |
19:11 | |
19:12
raiph left
19:14
yqt joined
19:20
_mg_ left
19:23
vendethiel joined
19:25
zakharyas joined
19:29
kmel_ left,
kmel joined
|
|||
kmel | hello everybody | 19:29 | |
vendethiel | ahoy! | 19:30 | |
PerlJam | kmel: greetings! | ||
19:31
raiph joined
|
|||
kmel | if i defined a sub with optional arguments, how can i check if the user passed arguments or not? | 19:31 | |
hi vendethiel PerlJam | |||
vendethiel | kmel: as in, did not pass Nil explicitly? | 19:32 | |
kmel | vendethiel, the user just called a sub without any arguments | 19:33 | |
vendethiel | m: sub foo($a?) { say $a.defined }; foo; foo(3); # kmel | ||
camelia | rakudo-moar 273e89: OUTPUT«FalseTrue» | ||
PerlJam | m: sub foo($a?) { say $a.defined }; foo(Any); foo(Nil); # note this too | ||
camelia | rakudo-moar 273e89: OUTPUT«FalseFalse» | ||
kmel | aha .defined will do the job | 19:34 | |
vendethiel | PerlJam: yeah, hence my prior question | ||
kmel | thanks | ||
vendethiel PerlJam thanks | 19:35 | ||
PerlJam | vendethiel: right, kmel's response led me to believe this was a foreign concept | ||
flussence | if I do «$file.print: @stuff», rakudo writes @stuff as-is, but if I do «$socket.print: @stuff», the elements get joined with spaces between. Is that meant to happen? | 19:36 | |
PerlJam | flussence: I hope not. | ||
19:42
_mg_ joined
19:44
rindolf left
|
|||
grondilu is not sure what flussence means by "as-is" | 19:44 | ||
19:44
_mg_ left
|
|||
flussence | if @stuff is ^10, the output would be exactly 10 chars long | 19:45 | |
grondilu | ok, a concatenated output then | 19:46 | |
19:46
zakharyas left
19:55
raiph left
|
|||
PerlJam | flussence: I'd probably change IO::Socket.print into multi methods just like IO::Handle does. | 19:58 | |
Though that would mean that passing Cool things to print would call the listy version which would stringify and call the stringy version whereas now, it only calls the stringy version. | 20:02 | ||
20:03
geraud joined
20:04
kmel left
20:08
zakharyas joined
20:09
perigrin joined
20:14
][Sno][ left
20:16
kjs_ joined
|
|||
cognominal | I got something in a Buf, how to see it as a repr(CStruct). How do I make it independant of the indianness? I would like to avoid unpack. | 20:20 | |
for info, that's a .git/index | |||
20:20
darutoko- left
20:28
cygx joined
|
|||
bartolin | r: use nqp; say nqp::backendconfig<osname> | 20:28 | |
camelia | rakudo-jvm 273e89: OUTPUT«(Any)» | ||
..rakudo-moar 273e89: OUTPUT«linux» | |||
cygx | cognominal: for the first part of the question, cf: | ||
class Foo is repr<CStruct> { has int8 $.a; has int8 $.b; }; my $buf := Buf[int8].new(42,2,37); say nativecast Foo, CArray[int8].new($buf.list); # => Foo.new(a => 42, b => 2) | |||
20:29
_mg_ joined
|
|||
cygx | it's not efficient as copying to the CArray happens element (ie byte) by element | 20:29 | |
it would be better if you could get at a CPointer to the data | |||
bartolin | r: use nqp; say nqp::atkey(nqp::backendconfig(), "osname") # that prevents JVM build atm | ||
retupmoca | cygx: you can't nativecast directly from a blob? | 20:30 | |
camelia | rakudo-moar 273e89: OUTPUT«linux» | ||
..rakudo-jvm 273e89: OUTPUT«java.lang.NullPointerException in block <unit> at /tmp/tmpfile:1» | |||
retupmoca | cygx: I know you can nativecast from a Blob -> CArray (nativecast CArray[uint8], $stuff;) | ||
cygx | retupmoca: my bad, you actually can | ||
retupmoca | err, from a blob to a carray at least | ||
cygx | no idea why I thought you could not... | 20:31 | |
ie nativecast Foo, $buf in the example works as expected | |||
cognominal: ^ | 20:32 | ||
retupmoca | ah, ok. Good, that's much faster :) | ||
20:32
xfix joined
|
|||
cygx | now, does anyone know how 'int' gets its nativesize from? | 20:32 | |
I've been ack-ing through the source, but no dice yet | 20:33 | ||
retupmoca | pretty sure int is always 64bit on a 64bit build | ||
and 32bit on a 32bit build | |||
cognominal | thx, cygx. | ||
cygx | retupmoca: NativeCall thinks int should map to long, which is 32-bit on windows | 20:34 | |
retupmoca | cygx: that may have changed then - when I was first writing Compress::Zlib, 'int' didn't work on windows because it was 64bit | 20:36 | |
I had to end up using 'long' | |||
star: use NativeCall; my long $x = 32; say $x; | |||
camelia | star-m 2015.09: OUTPUT«32» | ||
cygx | well %type_map in NativeCall.pm says int translates to long, but nativesizeof int is 8 (whereas a proper long is size 4 here) | 20:37 | |
zengargoyle | how often is doc.perl6.org built from repo sources? | 20:38 | |
cygx | why on earth someone who's interested in supporting both *nix and windows would use long as a default type for int is beyond me anyway | 20:39 | |
zengargoyle | m: say <a a b b b c c>.repeated | 20:40 | |
camelia | rakudo-moar 273e89: OUTPUT«(a b b c)» | ||
zengargoyle | m: say <a b b c c b a>.repeated | ||
camelia | rakudo-moar 273e89: OUTPUT«(b c b a)» | ||
[Coke] | java bisect is done. the skipped commits here all complained about an NQP op- I was testing for the NPE in the current build. | ||
gist.github.com/coke/bf0196891ef9dc9b8ada | |||
zengargoyle | m: say <a A B b c b C>.repeated(:as(&lc)) | ||
camelia | rakudo-moar 273e89: OUTPUT«(A b b C)» | ||
AlexDaniel | m: grammar Test { token TOP { ^ <custom=x> $ }; token x { .* } }; say Test.parse(‘foo’); | 20:42 | |
camelia | rakudo-moar 273e89: OUTPUT«「foo」 x => 「foo」 custom => 「foo」» | ||
[Coke] | ah. so 45e56b8ed7f403e2c45b3bbedab41a4a41afb710 looks like what probably changed one error to another. | ||
AlexDaniel | Is it a bug? | ||
cygx | for now, I'll just do a `constant int = int32` to make my tests pass ;) | ||
retupmoca | cygx: assuming a 64bit build, 'int' is always 64 bits within the perl6 world. I'm not sure what NativeCall does with it, but you probably want to use 'long' or 'longlong' instead of 'int' for NativeCall | 20:43 | |
zengargoyle | Type/List doc has the first two of those wrong. and a couple Perl5 POD =over/=back lists that don't render correctly. have to look up Perl 6 POD version of lists... | ||
[Coke] | I'm guessing that nqp::setinputlineseps(handle, endings); | ||
is a problem on the jvm, since we're now giving it a list. | |||
testing... | |||
AlexDaniel | I was expecting to see “custom” without “x”… | ||
retupmoca | cygx: basically, if you use 'int' for NativeCall code, it's probably wrong | ||
bartolin | [Coke]: irclog.perlgeek.de/perl6/2015-11-03#i_11477695 | ||
PerlJam | m: grammar Test { token TOP { ^ <custom=.x> $ }; token x { .* } }; say Test.parse(‘foo’); | 20:44 | |
camelia | rakudo-moar 273e89: OUTPUT«「foo」 custom => 「foo」» | ||
cygx | retupmoca: sure - but it nevertheless should be consistent | ||
20:44
][Sno][ joined
|
|||
PerlJam | AlexDaniel: ^^^ | 20:44 | |
cygx | currently, it is not | ||
AlexDaniel | oh right! | ||
PerlJam: I forgot about that dot! | |||
thanks | |||
[Coke] sighs, he missed that bartolin found anything. | |||
20:44
lizmat joined
|
|||
[Coke] | r: say $*VM.config<osname> | 20:45 | |
camelia | rakudo-jvm 273e89: OUTPUT«(Any)» | ||
..rakudo-moar 273e89: OUTPUT«linux» | |||
lizmat waves from the Amsterdam.pm meeting | |||
jnthn: something came up here wrt to using multiple line endings | 20:46 | ||
ilmari | r: say $*KERNEL.name | ||
bartolin | [Coke]: looks like it reads the values from nqp/bin/jvmconfig.properties -- and there is no osname :/ | ||
camelia | rakudo-{moar,jvm} 273e89: OUTPUT«linux» | ||
lizmat | suppose we have 4 different line endings. and we're chomping. how would you find out *which* line ending was used ? | 20:47 | |
to mark the end of a line | |||
[Coke] | bartolin: that line is never invoked on the jvm. | ||
it's warpped in an #if moar block ? | |||
*wrapped | |||
lizmat | jnthn: so perhaps, we need something like nqp::chomped | ||
[Coke] | j: nqp::p6box_s(nqp::atkey(nqp::jvmgetproperties(), 'os.name')); | ||
camelia | rakudo-jvm 273e89: OUTPUT«===SORRY!===java.lang.NullPointerException» | 20:48 | |
[Coke] | -there- we go. | ||
lizmat | which would give you the line ending of the last line that was read with nqp::linechomp (or whatever it is / will be called) | ||
cygx | retupmoca: to clarify, there are basically 3 types of 'int' - p6-land int (normally 64-bit), C-land int (normally 32-bit) and NativeCall-parameter-land int, which is a long, ie corresponding to p6-land int on linux and C-land int on win32 | 20:50 | |
bartolin | [Coke]: src/core/core_prologue.pm line 24 | ||
[Coke]: at least that looked like the source of the problem to me | |||
cygx | I've got a failing testcase which I suspect indicates that somewhere, we assume P6-land and NativeCall-parameter-land agree | ||
20:50
zakharyas left
|
|||
[Coke] | bartolin: ah, I was looking in src/core/IO/Spec.pm | 20:51 | |
PerlJam | lizmat: it's too bad chomp itself can't tell you what it chomped. | 20:56 | |
lizmat | PerlJam: we want to prevent chomping in Perl 6 land | ||
and it should become available, *especially* if we support muiltiple simultaneous line endings | 20:57 | ||
20:57
espadrine_ joined
|
|||
[Coke] | j: use nqp; say nqp::p6box_s(nqp::atkey(nqp::jvmgetproperties(), 'os.name')); | 20:57 | |
20:57
_mg_ left
|
|||
camelia | rakudo-jvm 273e89: OUTPUT«Linux» | 20:58 | |
[Coke] | ok, the NPE we got on that before was for something else. :) | ||
fixing... | |||
lizmat | m: $*DISTRO.name | 20:59 | |
camelia | ( no output ) | ||
bartolin | [Coke]++ | ||
lizmat | m: say $*DISTRO.name | ||
camelia | rakudo-moar 273e89: OUTPUT«opensuse» | ||
lizmat | [Coke]: isn't that what you're looking for ? | ||
21:00
xpen joined
|
|||
[Coke] | lizmat: Yes, but if you look in backscroll, that gave me an NPE earlier. | 21:00 | |
so it sent me down an alley for a few minutes. I'm fine now. | 21:01 | ||
lizmat | j: say $*DISTRO.name | ||
camelia | rakudo-jvm 273e89: OUTPUT«opensuse» | ||
lizmat | ok | ||
[Coke] | We now have 2 places where we are keying off jvm vs. moar to get the os name. we should probably not do that. | ||
bartolin | another option seems to be to add 'osname=$Config{osname}' to 'nqp/tools/build/gen-jvm-properties.pl' | ||
moritz | but we want the OS name of the host system, not where it was compiled | 21:03 | |
and java code is supposed to be portable, no? | |||
bartolin | oh! | ||
[Coke] | I'm testing a patch using the same logic in IO/Spec | ||
21:05
xpen left
|
|||
[Coke] | bartolin++ for tracking that down. no doubt faster than doing a bisect over 30 versions with 2 very different forms of breakage. :) | 21:09 | |
dalek | c: c1140e7 | lizmat++ | doc/Type/List.pod: Fix problems found by zengargoyle++ |
||
[Coke] | still more NPEs.. | 21:10 | |
bartolin | :-/ | ||
[Coke] | and of course the stack trace starts out with no line number or sub name. | 21:11 | |
in (gen/jvm/CORE.setting) | |||
in (gen/jvm/ModuleLoader.nqp:380) | 21:12 | ||
in load_setting (gen/jvm/ModuleLoader.nqp:370) | |||
it's only 34287 lines... | |||
AlexDaniel | So if I want to have a constructor, do I really have to do this? “method new(&callback, *@dependencies) {” or is there something simpler? | 21:14 | |
21:15
espadrine_ left
|
|||
moritz | AlexDaniel: you get a constructor by default | 21:15 | |
AlexDaniel | moritz: I know, but what if I want to do stuff? :) | ||
moritz | AlexDaniel: you can do stuff with the default constructor | ||
AlexDaniel | moritz: hmmm | ||
moritz | AlexDaniel: you seem to want a custom constructor, but to not write a custom constructor. That confuses me. | 21:16 | |
AlexDaniel | moritz: nah, that's just my non-perl6 thinking, I guess | 21:17 | |
moritz: thanks! I'll try that | |||
I mean, I'll try to see if I really need one | |||
21:18
bpmedley joined
|
|||
AlexDaniel | m: my regex foo { ‘test’ } | 21:19 | |
camelia | rakudo-moar 273e89: OUTPUT«5===SORRY!5===Unrecognized regex metacharacter ‘ (must be quoted to match literally)at /tmp/CZeBhJ1YlJ:1------> 3my regex foo {7⏏5 ‘test’ }Regex not terminated.at /tmp/CZeBhJ1YlJ:1------> 3my regex foo { ‘7⏏5test’…» | ||
AlexDaniel | ‘’ do not work in regexes? | ||
moritz | m: my $x = ‘foo’ | 21:20 | |
camelia | ( no output ) | ||
moritz | seems not | ||
AlexDaniel | bug or not? | ||
inconsistency for sure | |||
moritz | dunno; I haven't seen fancy quotes in S05 | ||
zengargoyle | lizmat++ thanks for fixing, i was off reading up on POD6 :) | 21:21 | |
[Coke] | They were added to the language much later by timtoady directly. I wouldn't mind if they also existed in rules. | ||
bartolin: any idea how to find that exception? | 21:22 | ||
AlexDaniel submits rakudobug then | |||
[Coke] | r: say $*VM.config<osname>; say $*VM.config<os.name>; | 21:23 | |
bartolin | [Coke]: I'm looking, but without a good idea . | ||
camelia | rakudo-jvm 273e89: OUTPUT«(Any)(Any)» | ||
..rakudo-moar 273e89: OUTPUT«linux(Any)» | |||
[Coke] | r: say Any eq 'MSWin32' | 21:24 | |
camelia | rakudo-{moar,jvm} 273e89: OUTPUT«Use of uninitialized value of type Any in string contextAny of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in block <unit> at /tmp/tmpfile:1False» | ||
21:25
spider-mario left
|
|||
dalek | kudo/nom: 6cb35b4 | coke++ | src/core/core_prologue.pm: Fix one potential NPE on the jvm. |
21:25 | |
c: 3ebb144 | (Christopher Bottoms)++ | doc/Language/faq.pod: Minor edits Couple of grammar edits, plus replacing space with nonbreaking space in "Perl 6". |
21:26 | ||
c: 909ac44 | RabidGravy++ | doc/Language/faq.pod: Merge pull request #183 from molecules/patch-1 Minor edits |
|||
21:32
TEttinger joined
|
|||
AlexDaniel | moritz: I want to write something like “has $.foo = initfoo();”, but I can't do that (where initfoo is a method). What would be the right way to get it to work? | 21:33 | |
or should I probably have one .init() method and call that manually? Not sure if I want that | 21:34 | ||
lizmat | AlexDaniel: do you know about BUILD | 21:35 | |
? | |||
AlexDaniel | lizmat: well, I've seen that, but it's a bit hard to type | 21:36 | |
lizmat | B U I L D :-) | ||
AlexDaniel | lizmat: what about (:&!callback, :@!dependencies) ? Or should I just omit that? | ||
yes, indeed | 21:37 | ||
lizmat: right! | |||
lizmat: thanks | |||
21:41
xfix left
21:48
MadcapJake joined,
kaare_ left
21:49
MadcapJake left
21:50
MadcapJake joined,
leont joined
|
|||
MadcapJake | Why am I getting "Can't use unknown trait 'is native' in a sub declaration"? | 21:50 | |
[Coke] | m: sub foo is native { * }; | 21:51 | |
camelia | rakudo-moar 273e89: OUTPUT«5===SORRY!5=== Error while compiling /tmp/t5gKqcM7U9Can't use unknown trait 'is native' in a sub declaration.at /tmp/t5gKqcM7U9:1 expecting any of: rw raw hidden-from-backtrace hidden-from-USAGE cached pure default DEPRE…» | ||
[Coke] | m: use Nativecall; sub foo is native { * }; | ||
camelia | rakudo-moar 273e89: OUTPUT«===SORRY!===Could not find Nativecall in any of: file#/home/camelia/.perl6/2015.10-134-g273e895/lib inst#/home/camelia/.perl6/2015.10-134-g273e895 file#/home/camelia/rakudo-inst-1/share/perl6/lib file#/home/camelia/rakudo-inst-1/share/pe…» | ||
ilmari | m: use NativeCall; sub getuid() returns uint32 is native(Str) {}; say getuid(); | 21:52 | |
camelia | rakudo-moar 273e89: OUTPUT«1012» | ||
ugexe | m: class Foo { has $.bar; method new(*%_) { my $self = self.bless(|%_); $self.init(); $self; }; method init { $!bar = 1; }; }; my $x = Foo.new( :bar(3) ); say $x.perl; # not ideal, but sorta works | 21:54 | |
camelia | rakudo-moar 273e89: OUTPUT«Foo.new(bar => 1)» | ||
MadcapJake | oh i need to declare `use NativeCall` thanks! | ||
AlexDaniel | is anybody using HTTP::Client ? | ||
cygx | there's a weird bug for you: I pass a block to use so I can execute it in the corresponding EXPORT; if the block contains calls with named parameters, their value gets passed as positionals | ||
the workaround: use a sub() {} instead | 21:55 | ||
AlexDaniel | it does not work for me and travis says 「build | unknown」 | ||
21:55
lizmat left
|
|||
cygx | (or rather a sub () {} - whitespace matters) | 21:55 | |
ilmari | m: class Foo { has $.bar; submethod BUILD { $!bar = 1 } }; say Foo.new(:bar(3)) | 21:56 | |
camelia | rakudo-moar 273e89: OUTPUT«Foo.new(bar => 1)» | ||
ugexe | but then you have to declare all your variables inside the BUILD signature | ||
ilmari | only the ones that you want to initialise from a method call | 21:57 | |
ugexe | yes, thats what he wanted to avoid | ||
MadcapJake | is there an environment variable that perl6 uses to find native libraries? | ||
ilmari | ugexe: it's a lot less than your example of overriding new | 21:58 | |
ugexe | not if you have multiple variables | ||
with long variable names at that | |||
ilmari | ugexe: how is your method init { $!bar = 1; } different from submethod BUILD { $!bar = 1; }? | ||
RabidGravy | AlexDaniel, the build unknown just means that travis is turned on for it, but hasn't actually run yet | 21:59 | |
ilmari | other than the fact tht you have to override new and call it manually, that is | ||
ugexe | because you can pass mine any number of parameters without having to declare a huge BUILD signature | ||
AlexDaniel | RabidGravy: interesting. Looking at the log, I see that on my machine all tests were successful | ||
so it should work | |||
ilmari | m: class Foo { has $.bar; method new(*%_) { my $self = self.bless(|%_); $self.init(); $self; }; method init { $!bar = 1; }; }; say Foo.new(:bar(3),:baz(42) ); | 22:00 | |
camelia | rakudo-moar 273e89: OUTPUT«Foo.new(bar => 1)» | ||
ilmari | ugexe: you still have to declare the attributes for them to be stored anywhere, no? | 22:01 | |
ugexe | yes | ||
has $.whatever; instead of has $.whatever; submethod BUILD($!whatever) | |||
RabidGravy | MadcapJake, look at LibraryMake that has an example | ||
ilmari | ugexe: eh, you don't need a signature on BUILD | ||
m: class Foo { has $.bar; has $.baz submethod BUILD { $!bar = 1 } }; say Foo.new(bar=>3, baz=>7) | 22:02 | ||
camelia | rakudo-moar 273e89: OUTPUT«5===SORRY!5=== Error while compiling /tmp/rpDKau3RCfTwo terms in a rowat /tmp/rpDKau3RCf:1------> 3class Foo { has $.bar; has $.baz7⏏5 submethod BUILD { $!bar = 1 } }; say Fo expecting any of: infix infix stoppe…» | ||
ilmari | m: class Foo { has $.bar; has $.baz; submethod BUILD { $!bar = 1 } }; say Foo.new(bar=>3, baz=>7) | ||
camelia | rakudo-moar 273e89: OUTPUT«Foo.new(bar => 1, baz => Any)» | ||
AlexDaniel | RabidGravy: “Unsupported protocol, 'https'.” uh! | ||
RabidGravy | boo | ||
ugexe | aha i did not know that | 22:03 | |
AlexDaniel | “if ($request.protocol ne 'http') { die …” | ||
I wonder if it will work without this check | |||
RabidGravy | AlexDaniel, if it doesn't use OpenSSL unlikely | 22:04 | |
AlexDaniel | okay :( | ||
I'll just create an issue on github then | |||
RabidGravy | HTTP::UserAgent *does* support https | 22:05 | |
AlexDaniel | RabidGravy: OH! | ||
RabidGravy: I did not notice it. Thanks! | |||
though I wonder if I should create an issue anyway? | |||
RabidGravy | do it | 22:06 | |
AlexDaniel | ok, thanks | ||
ilmari | ugexe: oh, that appears to inhibit the default bindig to attributes | 22:07 | |
22:10
Peter_R joined
22:13
kjs_ left
|
|||
Skarsnik | I was wondering, should LWP::Simple support cookies? I mean for me it like the equivalent of writing 'wget mywebsite' | 22:18 | |
22:18
tokuhiro_ joined
|
|||
tadzik | HTTP::UA does, I think | 22:19 | |
ilmari | well, wget supports cookies, and even has --load-cookies, --save-cookies | 22:20 | |
by default it won't load or save, but it'll use them if it does multiple requests in a session | |||
AlexDaniel | Skarsnik: does it support https? :) | ||
Skarsnik | Yes, but if I just want to get some html from a webpage once. I don't necessary need to create a ua object | 22:21 | |
AlexDaniel | try require IO::Socket::SSL; # seems so | ||
Skarsnik | ilmari, I think wget does. I have an exemple where requesting a page without cookies just fail (or does weird thing) and wget work on it | 22:22 | |
22:23
tokuhiro_ left,
skids left,
ketadmin left
|
|||
ilmari | Skarsnik: yes, it sets a cookie and redirects, wget will send that cookie on the second request, if it applies | 22:23 | |
s/, it/, if it/ | |||
vendethiel | mmh, do we have a module for terminal color codes around? | 22:25 | |
Skarsnik | could be cool if lwp:simple act a similar way like "give me my html" I don't care for details | ||
* and it leave the dev out of details | |||
vendethiel | yay \o/. I implemented a little script to sync all my repos, push the correct branch, and then ping on some remote at $work. wanted to give it nice output | ||
sprocket | how do i declare a typed array in p6? | 22:26 | |
ie) an array of Str | |||
Skarsnik | my Str @array | ||
sprocket | oh, that’s straightforward then :) | ||
thanks! | |||
RabidGravy | Skarsnik, "use HTTP::UserAgent :simple; say get('some-url')" | 22:34 | |
Skarsnik | hm | 22:35 | |
I think it will not work, since by default cookie are not activated | 22:37 | ||
RabidGravy | if it doesn't send an isuue with the headers of the request, as it should | 22:38 | |
22:45
^elyse^ left
|
|||
jdv79 | the header parsing code is buggy if thats what you mean | 22:45 | |
Skarsnik | hm interesting it work fine now. I had a really weird behavior from H:UA 2 months ago (like it took 0 sec or 50 sec to get this page) | 22:48 | |
22:49
adu joined
|
|||
RabidGravy | Skarsnik, quite a lot of fixes gone in the last few months | 22:52 | |
22:53
vendethiel left
23:00
xpen joined
|
|||
Skarsnik | Unrelated, is there some tricks to speed up the creation of new object? | 23:01 | |
23:01
caymanboy joined
|
|||
caymanboy is looking forward to Perl6 1.0 next month | 23:02 | ||
jdv79 | yes, H:UA had a bunch of bugs more than it still has:) | 23:04 | |
ugexe | jnthn: my problem was defining token CRLF { [<.CR> <.LF>] }, so the match on <.CR> would fail. token CRLF { \x0d \x0a } fixed it. grammar::tracer++ | 23:05 | |
23:05
xpen left
|
|||
ugexe | that behavior is still slightly confusing though | 23:06 | |
AlexDaniel | caymanboy: oh hi again :) | 23:07 | |
23:23
cygx left
|
|||
japhb | .ask pmurias Do you need help getting perl6-bench working for nqp-js? If you PM me configure/build instructions, I can do the necessary patch to build and benchmark it along with the other backends. (timotimo knows how too, but I don't want to speak for his time.) | 23:27 | |
yoleaux | japhb: I'll pass your message to pmurias. | ||
RabidGravy | right bed time | 23:39 | |
23:44
RabidGravy left
|
|||
zengargoyle | does anybody have a recommendation for/against any of various the github CLI tools? anything to make it easy to keep a cloned fork up to date and submit pull requests and such without going through the web gui? | 23:44 | |
Hotkeys | there's always git | 23:53 | |
23:53
kid51 joined
|
|||
dalek | osystem: b3c8a7b | retupmoca++ | META.list: Add Crust::Middleware::Syslog github.com/retupmoca/P6-Crust-Middleware-Syslog |
23:57 | |
23:58
firstdayonthejob left
23:59
cognominal left
|