»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend! Set by sorear on 4 February 2011. |
|||
00:01
skids joined
|
|||
lichtkind | S02 say nothing | 00:01 | |
00:01
fgomez joined
|
|||
benabik | S09 says .bytes exists on buffer-like things. | 00:01 | |
diakopter | is there a lazy/pump version of split? match? | 00:03 | |
benabik | S32/Str says Str.bytes is gone and suggests $str.encode($encoding).bytes insteads, and Str.encode says it returns a Buf. | ||
In short, I see no Buf.bytes directly in the spec, but I see several places that says it should exist. :-D | |||
dalek | blets: 644c205 | (Herbert Breunung)++ | docs/appendix-a-index.txt: .bytes is no longer Str method |
||
lichtkind | sound sane thank you very much yes i brought it up becasue i saw in git history of spec that .bytes is gone as str | 00:04 | |
diakopter | .quads would be nice too. | ||
<bump my last question> | 00:05 | ||
lichtkind | true | ||
what you mena | |||
mean | |||
00:06
fgomez left,
fgomez joined
|
|||
dalek | blets: ceabc7f | (Herbert Breunung)++ | docs/appendix-a-index.txt: .bytes example, benabik++ |
00:06 | |
timotimo | i'm confused. i'm in the debugger and i step and nothing happens | 00:07 | |
the line is return gather { some-function-call($args, $more); }; | 00:08 | ||
it's run for the second time at that point and the first time it stepped into the gather | |||
rurban | sent day 11 advent calendar for preview. | ||
timotimo | oh, maybe it didn't match one of the multis? | 00:09 | |
lichtkind | hai reini | ||
should wrote my calendar leaf too | 00:10 | ||
00:10
ggoebel_ left
|
|||
timotimo | oh, wat? weird. | 00:11 | |
DUH, lazy evaluation | |||
i am silly. | |||
00:21
ggoebel joined
00:23
popl joined
|
|||
lichtkind | everyone is sometimes :) | 00:26 | |
no need to prag with that | |||
timotimo | so, uh, apparently $ doesn't match end of string? does it only match an actual newline? | ||
oh, it *does* match end of string | 00:27 | ||
i must be missing something obvious again, like a space at the end. | |||
sorear | $ matches only the end of string | 00:30 | |
it is different from perl 5 in this regard | |||
perl 5 $ sometimes matches end of lines | 00:31 | ||
lichtkind | yes | 00:35 | |
multiline mode is gone | |||
$$ is now end of line | |||
timotimo | ah, nice. | 00:37 | |
00:39
dayangkun joined
|
|||
timotimo | i'm going insane with this super-meta-programmy test framework | 00:45 | |
sorear | even in default mode perl 5 $ would match at EOL of the last line | ||
timotimo: you may be making it too metaprogrammy. | |||
timotimo | i'm trying to raise a project from the dead | 00:46 | |
the testing framework is ... special | |||
i'm struggling with refering to methods from a different module that is apparently not accessible from the test framework | |||
it tries to eval('&' ~ $subname) | 00:47 | ||
because the list of tests is kind of a tree of strings and the test methods are the same strings but with - instead of " " | 00:48 | ||
i don't understand what's going on. i have a has Foo $.foo handles <some stuff>; and i try to do $.foo = $foo; | 00:52 | ||
it says it cannot assign to a readonly variable, but i see no readonly anywhere | 00:53 | ||
skids | try has foo is rw | ||
TimToady | that probably won't work | 00:54 | |
well, maybe it will | |||
timotimo | now i get "cannot look up attributes in a type object" and am confused. does that mean the attribute is uninitialised? | ||
WOW | |||
it starts up | |||
skids | might have to play with where "is rw" is | 00:55 | |
diakopter | ++ | ||
timotimo | i put the is rw and it works, great! | ||
TimToady | if you're inside the class, $!foo = $foo won't need the 'is rw' | 00:56 | |
if you're outside the class, why are you setting up a delegation outside the class? | 00:57 | ||
timotimo | i'm doing necromancy on some really old code | 00:58 | |
TimToady | I was originally thinking your were trying to do $.some = $some or $.stuff = $stuff | ||
timotimo | in fact, 4 years old. | ||
TimToady | in which case the 'is rw' needs to be in the delegated class | ||
diakopter | TimToady: is there a lazy/pump version of split (in case memory is very tight and the string is very large)? | 01:00 | |
sorear | who says normal split won't be lazy? | 01:01 | |
diakopter | dunno | 01:02 | |
is it? | 01:04 | ||
01:05
anuby joined
01:06
lue joined
|
|||
TimToady | the spec seems to assume that you'd only return something lazy when splitting or combing something that is already lazy | 01:07 | |
but it doesn't prohibit lazy behavior when splitting/combing a string | 01:08 | ||
diakopter | since it's a cpu/memory tradeoff, how about an adverb? | ||
(either way) | |||
TimToady | since it's a tradeoff, how 'bout a context? | ||
and because we already have contexts :) | |||
(supposedly) | 01:09 | ||
you can do the split even faster in sink context :) | |||
timotimo | so sink is something like eager? i've been wondering what exactly it was ... | ||
TimToady ponders what a hyper or a raced split would look like... O_O | 01:10 | ||
sink is a variety of eager, yes | |||
diakopter | r: split('','' x 9000000000) | ||
p6eval | rakudo a308f3: ( no output ) | ||
diakopter | n: split('','' x 9000000000) | 01:11 | |
p6eval | niecza v24-5-g599cbcb: OUTPUT«(timeout)» | ||
TimToady | which should, of course, warn you about a Useless use of split in sink context | 01:12 | |
timotimo | what could be the reason for this not working: | ||
TimToady | looks like rakudo is just about the point of being able to provide that very useful Useless warning | ||
timotimo | regex one { <[a..z]> }; regex two { \d+ }; regex three { <one><two> }; our $.regex = /^ <three> $/; | 01:13 | |
the error i'm getting is "no such method three for invocant of type 'Cursor'" | |||
does it have to be "our regex"? | |||
TimToady | generally one puts them into a grammar in that case | 01:14 | |
timotimo | sounds sensible. | ||
TimToady | though you can say 'my regex' and then call it as <&three> | ||
but then it doesn't capture $<three> automatically, since there's a punct | |||
so you have to say <three=&three>, which is a bit suboptimal | 01:15 | ||
std: regex one { <[a..z]> }; regex two { \d+ }; regex three { <one><two> }; our $.regex = /^ <three> $/; | |||
p6eval | std a8bc48f: OUTPUT«Potential difficulties: 'regex' declaration outside of grammar at /tmp/43eKOkyz3J line 1:------> regex one ⏏{ <[a..z]> }; regex two { \d+ }; regex tok 00:01 45m» | ||
TimToady | n: regex one { <[a..z]> }; regex two { \d+ }; regex three { <one><two> }; our $.regex = /^ <three> $/; | ||
p6eval | niecza v24-5-g599cbcb: OUTPUT«===SORRY!===Methods must be used in some kind of package at /tmp/HCXWpLpCqu line 1:------> regex one ⏏{ <[a..z]> }; regex two { \d+ }; regex tMethods must be used in some kind of package at /tmp/HCXWpLpCqu line 1:-… | ||
timotimo | can i do our $.regex = /^ <mygrammar::three> $/ then? | 01:16 | |
it seems i can. next failure to hunt ... | 01:18 | ||
01:18
anuby left
01:23
anuby joined
|
|||
TimToady | maybe <:&three> should capture to $<three>, much like normal :$foo makes foo => $foo | 01:28 | |
timotimo | okay, no reason to hold back any more | 01:29 | |
i'm trying to resurrect the druid implementation masak++ made and last touched 4 years ago | |||
01:29
Exodist joined
|
|||
timotimo | stumbling over all kinds of things | 01:31 | |
i suppose that shows how far perl6 has evolved? | |||
TimToady | you should make masak do it :) | 01:32 | |
timotimo | haha | ||
no, i need practice ... i think! | |||
TimToady | you do realize that fixing other people's code is what turns a lot of people off on Perl 5? :) | 01:33 | |
timotimo | because reading perl5 code can be pretty horrifying? | 01:35 | |
01:36
araujo left
|
|||
timotimo | i'm at a point where apparently the game can be played | 01:37 | |
the test code pretty much doesn't work at all | |||
and display isn't correct, sadly | |||
01:41
japhb_ joined
|
|||
japhb_ | jnthn++ # Junction autothreader optimizations | 01:42 | |
timotimo | the perl6 vim syntax highlighting seems to have problems with #=[ multiline comments ] | 01:44 | |
japhb_ | Can't wait to see what he manages for the X issue | ||
timotimo, perhaps it assumes that # comments are single-line? | |||
mikemol has been spending a _lot_ of time in Python for work. | |||
timotimo | it makes one extra line pink, though | 01:45 | |
mikemol now wants to try putting together an NQP impl in Python. | |||
japhb_ | mikemol, Dare we ask for an NQP in PyPy? | 01:46 | |
mikemol | japhb_: All that'd require is writing it in pure Python, no? | ||
timotimo | that would instantly be the fastest perl6 interpreter :| | ||
japhb_ | mikemol, well, RPython (Restricted Python). Actually, I guess RPython : Python :: NQP : Perl 6 | ||
TimToady keeps wanting a Go implementation for some reason | 01:47 | ||
mikemol | Just as well to get some practice in that...I want to leverage PyPy for work at some point. | ||
timotimo | could it be that "next" jumps out of two for loops at once? | ||
01:47
bowtie left,
daniel-s_ joined
|
|||
timotimo | huh! | 01:49 | |
mikemol | OK, if I want to study NQP by studying its implementations, where's the best place to start? | 01:50 | |
01:51
japhb_ left,
daniel-s left
|
|||
TimToady | you should ask jnthn that, but he's asleep, like you're supposed to be :) | 01:51 | |
mikemol | Me? Supposed to be asleep? I'm in GMT-5. :) | 01:52 | |
TimToady | for some reason I have you in .de mentally | 01:53 | |
mikemol | Airport code GRR. | ||
timotimo | i'm in .de, and i was right next to him in almost every of the last lines | ||
01:54
cognominal_ joined,
japhb_ joined
|
|||
sorear | mikemol: that is a great name for an airport | 01:54 | |
japhb_ | Wheee, managed to overheat laptop until it locked up by compiling Rakudo | ||
timotimo | did this ever work? if so, how :| | 01:56 | |
01:56
cognominal left
|
|||
TimToady | timotimo: if it ran on ancient rakudo, it probably assumes a lot of stuff is in packages that no longer is | 01:56 | |
timotimo | do you mean packages as in libraries, or packages as in "what's in a .pm file"? | 01:58 | |
japhb_ | timotimo, And 4 years ago is an eternity in Rakudo Time | ||
TimToady | ancient rakudo tended to put things into packages more like Perl 5, not like Perl 6 | ||
01:58
cognominal joined
|
|||
timotimo | this code here seems wrong, but i can't really put my finger on it | 01:58 | |
did something about Array.kv drastically change in the last 4 years? | |||
01:59
cognominal_ left
|
|||
TimToady | don't think so | 02:00 | |
diakopter | TimToady: re fixing other people's code - it's how I earned a Perl 5 living for 4 years. loved it++ | ||
TimToady | yer just weerd | 02:01 | |
diakopter | but how much I've forgotten... | ||
mikemol | Is niecza really only 28k lines? | ||
timotimo | i don't really know how this could have ever been considered correct :| | ||
diakopter | mikemol: also see the .cs files | ||
mikemol | in /lib, find . -type f -name '*.cs' -print0|xargs -0 wc -l | ||
timotimo | or maybe i'm looking at the expected output and am expecting something different | 02:02 | |
mikemol | I only counted the .cs files. | ||
diakopter | oh, there's lots of Perl 6 too | ||
TimToady | including the parser :) | ||
timotimo | the 3d view doesn't seem to be drawing correctly | 02:03 | |
other than that the game seems playable now | |||
i think i'll just throw it up on github and ask masak++ to do the rest? | |||
TimToady | that could be changes in print/say semantics (gist and such) | ||
sorear | there's also 4k of perl 6 in .setting files | ||
timotimo | nah, it's rendering the board fine, what doesn't work is apparently looping over the layers and columns and such | 02:06 | |
when i make the "obvious and wrong" fix, it spews lots and lots of errors at me | |||
TimToady | is it using unary hypers? those have fishtailed a bit in semantics over time | 02:07 | |
also, old rakudo didn't really do Parcels right, or at all, depending | |||
timotimo | nah, it's super simple and i think i'm just ten times as tired and twice as stomach-achey as required for understanding perl6 good enough | 02:12 | |
02:12
japhb_ left
|
|||
TimToady | relying on order of side effects for a hyper say would also be a problem | 02:12 | |
timotimo | well, it's simply about the loop body not being executed | 02:16 | |
i'll show you the lines if you like | |||
02:17
FROGGS_ joined
|
|||
timotimo | github.com/timo/druid/blob/master/...ext.pm#L92 - this line seems to skip over all of the layers | 02:17 | |
02:18
lichtkind_ joined
|
|||
timotimo | @layers, which is assigned in the first line of that function looks like this: | 02:18 | |
Array.new([[0, 0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [...], ... [0, 0, 0, 0, 0, 0, 0, 0])) | 02:19 | ||
02:20
lichtkind left,
FROGGS left
02:21
daniel-s__ joined
02:22
Exodist left,
exodist_ joined
|
|||
timotimo | so $line would be 7 at the beginning and $row would be [0, 0, 0, 0, 0, 0, 0, 0] | 02:22 | |
and some time it would have a 1 in there to signal that there's a block there | 02:23 | ||
but $line.kv would just be ((0, 7),) :( | |||
changing it to $row.kv.reverse -> $cell, $column was not helpful at all | |||
02:23
araujo joined
02:24
daniel-s_ left
|
|||
timotimo | what a terrible night to have a curse. | 02:25 | |
02:30
_daniel-s__ joined
02:31
ggoebel_ joined
02:34
daniel-s__ left,
terribleperson joined
|
|||
timotimo | oh | 02:35 | |
there already was a "ng-compat" branch that was probably there to make it moderner | |||
02:39
wamba left
|
|||
timotimo | oh, interesting | 02:41 | |
there's a SORRY but apparently no filename? | 02:42 | ||
probably just the filename i passed on the commandline then | |||
no, actually not. | |||
good night happy perl6 people :) | 02:44 | ||
diakopter | o/ | ||
02:45
bonsaikitten joined
02:47
terribleperson left
|
|||
lichtkind_ | good night | 02:50 | |
02:50
lichtkind_ left
02:52
bonsaikitten is now known as DrEeevil
02:55
hdcool09 joined
02:57
ggoebel_ left
03:21
cognominal left
03:24
cognominal joined
03:35
terribleperson joined
03:50
colomon joined,
cognominal left
03:56
cognominal joined
03:59
cognominal_ joined
04:02
cognominal left,
noggle left
04:03
noggle joined
04:04
cognominal_ left
04:10
cognominal_ joined,
sisar joined
04:17
s1n joined
04:29
cognominal_ left
04:37
cognominal_ joined
04:39
sisar left
04:40
Patterner left
04:41
cognominal_ left
04:43
am0c left
04:45
cognominal joined
04:53
terribleperson left
04:55
terribleperson joined
04:59
dayangkun left
05:05
terribleperson left
05:06
skids left
05:17
sftp left
05:19
telex left
05:21
bluescreen100 left
05:22
bluescreen10 left
05:23
rummik left,
rummik joined
05:27
telex joined
05:44
xinming joined
05:48
xinming_ left
|
|||
dalek | kudo/nom: 7797039 | pmichaud++ | docs/parrot-relationship.txt: Add docs/parrot-relationship.txt, which codifies the relationship manager roles between the Rakudo and Parrot projects. This was adopted in June 2011, but apparently never made it into either of the repositories. So I'm adding it to the Rakudo repository now. |
06:03 | |
06:08
kaleem joined
06:12
kurahaupo left
06:23
Rix joined
06:24
dayangkun joined
06:28
cognominal left
06:34
cognominal joined
06:43
whitefaced joined
06:44
popl left
|
|||
dalek | ast: 3ac110d | moritz++ | S06-traits/is-readonly.t: fudge new, failing test for read-only attributes |
06:49 | |
whitefaced | codepad.org/SePMyCQR why does the if statement at line 27 cause my program to exit every time, even when i enter input to stdin | 06:50 | |
codepad.org/0BvMdcrN | 06:51 | ||
^ | |||
moritz | whitefaced: that looks like Perl 5. This channel is about Perl 6. Please try #perl or #perl-help or so | 06:52 | |
whitefaced | perl wouldnt help me | ||
so i had to resort to here | |||
sorry | |||
moritz | so you thought you'd just ignore the 6 in #perl6? :-) | ||
you can also try irc.perl.org | |||
whitefaced | ok | 06:53 | |
i will | |||
:D | |||
07:00
kaare_ joined
07:22
grondilu joined
07:27
kaare_ left
07:28
whitefaced left
07:32
wamba joined
07:58
samuelvasy joined
08:01
brrt joined
08:04
hdcool09 left
08:05
hdcool09 joined,
bphillips left
08:09
bphillips joined
08:24
grondilu left
08:28
marloshouse_ joined,
marloshouse_ is now known as marloshouse
08:31
kurahaupo joined,
kurahaupo left
|
|||
jnthn | morning, #perl6 | 08:32 | |
cedrvint | o/ jnthn | ||
moritz | \o | ||
cedrvint | hello #perl6, do you know if there's an upcoming event about Perl 6 in France ? | 08:33 | |
moritz | jnthn: thanks for the sinking patches, all spectests now pass | ||
brrt | hi | ||
08:33
Kharec joined
|
|||
moritz | jnthn: but there's still a known sink bug that I want to track down | 08:33 | |
jnthn | moritz: yay. And oK :) | 08:39 | |
08:41
samuelvasy left
08:43
rummik left
08:49
rummik joined
|
|||
arnsholt | cedrvint: I don't know of any, but cognominal might know | 08:50 | |
cedrvint | arnsholt: thanks, I'm waiting for his reply then. | 08:52 | |
moritz | nr: say gather { 42 } | 08:53 | |
p6eval | rakudo 779703, niecza v24-5-g599cbcb: OUTPUT«» | ||
benabik | nr: say gather { take 42 } #? | 08:56 | |
p6eval | rakudo 779703, niecza v24-5-g599cbcb: OUTPUT«42» | ||
08:57
brrt left
08:59
kurahaupo joined
|
|||
cedrvint | r: gist.github.com/4257198 | 09:04 | |
p6eval | rakudo 779703: OUTPUT«foo with constraints» | ||
cedrvint | any idea why infix:<cmp> with constaints isn't call? | ||
*called | |||
moritz | cedrvint: because there's an infix:<cmp>(Int, Int) in the setting | 09:05 | |
cedrvint: and nominal types bind tighter than contraints | |||
cedrvint | moritz: thanks! | ||
moritz | write it as | 09:06 | |
multi infix:<cmp>(R:D $a, R:D $b) { ... } | |||
felher | Good morning, #perl6 | 09:07 | |
09:08
dayangkun left,
wamba left
|
|||
jnthn | o/ felher | 09:09 | |
cedrvint | moritz: I get this message "Ambiguous call to 'infix:<cmp>'; these signatures all match: \n :(Int:D \a, Int:D \b) \n :(R:D $a, R:D $b)" | ||
moritz | grml | 09:10 | |
try | |||
R:D $a where { 1 }, R:D $b where { 1 } | |||
cedrvint | moritz++ # it works \o/ | 09:11 | |
this looks a little bit "artificial" though, is it possible to use "is tighter(...)" here? | 09:12 | ||
moritz | no | 09:13 | |
but you can say 'is default' after the signature | |||
cedrvint | thanks, it works like a charm too. | 09:14 | |
09:14
cognominal left
09:16
hx107 joined
09:17
hx107 left,
kst` joined
09:18
LordV joined,
Maddingue joined,
cognominal joined
09:19
telex left
09:21
telex joined,
kst left
09:28
kaleem left
09:29
kaleem joined
|
|||
cedrvint | the post for today isn't published yet. | 09:35 | |
irclog.perlgeek.de/perl6/2012-12-11#i_6230127 | 09:36 | ||
moritz publishes it | 09:38 | ||
cedrvint | moritz: maybe the "editor's note" should be removed (at the top)? | 09:42 | |
cedrvint isn't sure | |||
09:42
kivutar joined
|
|||
moritz | cedrvint: me neither. If rurban doesn't want it published, he just needs to remove the note from the article | 09:43 | |
09:46
dakkar joined
09:47
fhelmberger joined
|
|||
hoelzro | I'm wondering if the "30,000 foot overview of Perl 6" really merits an advent calendar post | 09:49 | |
I'm thinking something flashier and more interesting should take its place | |||
cedrvint | hoelzro: why? | ||
hoelzro | and I should just write up a series of articles about it later | ||
cedrvint: I've been looking into it, and while it's interesting, I don't think it will really "hook" people on to the language | |||
cedrvint | hoelzro: it could help to understand what's Perl 6 (langage, implementations, ...) | 09:51 | |
hoelzro | I just feel that most people know that already; maybe that's presuming too much, though | ||
cedrvint | it depends on who these "people" are, I guess most people in #perl6 already have an overview of Perl 6 | 09:54 | |
but it's not the case in my compagny for instance :) | 09:55 | ||
(and they are curious) | |||
09:55
cognominal left
|
|||
hoelzro | is it advent calendar material, though? | 09:56 | |
I look at some advent calendar posts and think "wow, that's really cool!" | |||
I feel like the advent calendar stuff should get people interested, and then they can read up on it | |||
jnthn | hoelzro: Yes, but somebody looking at a bunch of the posts and finding them interested won't automatically know exactly what is what, or how to join in, get hold of stuff, etc. | 09:57 | |
cedrvint | troo | ||
hoelzro | hmm | 09:58 | |
I would think that someone interested in Perl 6 after reading a post would just go perl6.org, and start there | |||
10:01
kurahaupo left,
cognominal joined
|
|||
moritz | well, if you want to add an overview article to perl6.org, that would be great too | 10:03 | |
hoelzro | I was thinking of digging into Parrot/NQP/Rakudo and trying to write a basic overview on how things work | 10:06 | |
so people interested in contributing find it easier to do so | |||
10:26
SmokeMachine joined
10:29
wamba joined
|
|||
timotimo | huh, there's hyphenation in the middle of the advent calendar post: "since the inter- preter's state is" and "consistency is guarant- teed" | 10:38 | |
"taking and releasing locks costs per- formance" | 10:39 | ||
"a sub does not only con- tain", is this in the source or is my browser acting up? | 10:41 | ||
10:51
cognominal left
10:52
wamba left,
wamba joined
10:53
SamuraiJack joined
11:03
cognominal joined
11:05
Su-Shee_ joined
11:09
Su-Shee left
11:15
hdcool09 left
11:21
anuby left
11:29
birdwindupbird joined
11:30
grondilu joined
|
|||
grondilu | rn: sub f { .(4) given -> $n { $n > 1 ?? &?ROUTINE($n-1)*$n !! 1 } }; say f # expecting 24 | 11:31 | |
p6eval | niecza v24-5-g599cbcb: OUTPUT«(timeout)» | ||
..rakudo 779703: OUTPUT«Too many positional parameters passed; got 1 but expected 0 in sub f at /tmp/2AK_oUMygM:1 in sub f at /tmp/2AK_oUMygM:1 in block at /tmp/2AK_oUMygM:1» | |||
jnthn | grondilu: &?ROUTINE refers to the f | 11:32 | |
grondilu | indeed, but shouldn't it refer to the anonymous sub? | ||
jnthn | No, because it's not a sub, but just a block. | ||
r: say -> { } ~~ Routine | |||
p6eval | rakudo 779703: OUTPUT«False» | 11:33 | |
grondilu | rn: sub f { .(4) given -> $n { $n > 1 ?? &?BLOCK($n-1)*$n !! 1 } }; say f # expecting 24 | ||
p6eval | rakudo 779703: OUTPUT«No such method 'Nil' for invocant of type 'Int' in at src/gen/BOOTSTRAP.pm:839 in any at src/gen/BOOTSTRAP.pm:836 in sub f at /tmp/SoPBpb2UJY:1 in block at /tmp/SoPBpb2UJY:1» | ||
..niecza v24-5-g599cbcb: OUTPUT«24» | |||
jnthn | That one should work, apart from I'm pretty sure Rakudo doesn't implement &?BLOCK yet | ||
grondilu | ok | ||
11:33
Su-Shee_ is now known as Su-Shee
|
|||
timotimo | trying out bailador and the test suite 05-post-content runs fine in a debugger but not when run by prove or rakudo standalone | 11:33 | |
tadzik | ack | 11:34 | |
jnthn | See? it really does de-bugger your programs :P | ||
timotimo | it *may* be a version discrepancy between my perl6 binary and the perl6-debug one, though | ||
perl6-debug says "this is perl6 version built on parrot 4.6.0 revision 0", but perl6 is "version 2012.11", so ... | |||
jnthn | Hm, that looks wrong | 11:35 | |
(the perl6-debug version output) | |||
timotimo | hm, it's from the same directory, though. | ||
jnthn | yeah, I think it's version reporting is just wrong. | 11:36 | |
timotimo | tadzik: the error in question is that request.env<psgi.input>.decode claims that decode is called on an Any. | ||
tadzik | yeah, I remember this one | ||
timotimo | so, just a too old rakudo version? | 11:37 | |
tadzik | please check | ||
timotimo | sure | ||
tadzik | I don't think this bug is fixed | ||
cedrvint | rn: gist.github.com/4257923 | 11:38 | |
p6eval | rakudo 779703: OUTPUT«debugTrueFalse» | ||
..niecza v24-5-g599cbcb: OUTPUT«debugUnhandled exception: Cannot call &infix:<cmp>; none of these signatures match: C where { ... }, C where { ... };; |$c where { ... } at /tmp/bjRMGun9mw line 7 (infix:<cmp> @ 8)  at /tmp/bjRMGun9mw line 9 (mainline @ 12)  at /home/p6eval/niecz… | |||
timotimo | bleh, i think i'll throw out rakudo star and get panda manually. should be pretty easy, right? | 11:39 | |
moritz | right | ||
tadzik | panda should be able to install rakudo-debugger now too :) | ||
timotimo | that's excellent | 11:40 | |
cedrvint | moritz, jnthn: I thought infix:<..> was generic as it relies on infix:<cmp> (overloaded for my class) | 11:42 | |
11:42
rindolf joined
|
|||
cedrvint | does Rakudo implement S03#3389? | 11:42 | |
timotimo | tadzik: with a very current rakudo it still fails that test | 11:44 | |
cedrvint | *S03#line_3389 | 11:47 | |
11:47
noggle left
|
|||
cedrvint doesn't know how to link to a given spec line. | 11:48 | ||
11:49
arlinius left
|
|||
moritz | cedrvint: I think it uses cmp by default, but short-cuts for strings and integers | 11:49 | |
cedrvint | I can't get infix:<cmp> indirectly called by infix:<...> in gist.github.com/4257923 | 11:51 | |
*infix:<..> | |||
moritz | r: gist.github.com/4257923 | ||
p6eval | rakudo 779703: OUTPUT«debugTrueFalse» | ||
cedrvint was not able to find any test-case in roast about that | 11:52 | ||
timotimo | r: gist.github.com/4257997 | ||
p6eval | rakudo 779703: OUTPUT«debugType check failed for return value; expected 'Bool' but got 'Order' in sub infix:<cmp> at /tmp/jmOdLX_5pn:7 in block at /tmp/jmOdLX_5pn:9» | ||
timotimo | er, yeah | ||
r: gist.github.com/4257997 | 11:53 | ||
p6eval | rakudo 779703: OUTPUT«debugIncreaseFalse» | ||
timotimo | indeed | ||
11:55
wamba left,
cognominal left
|
|||
timotimo | oh | 11:56 | |
11:57
cognominal joined
|
|||
timotimo | i can run the test with perl6, but with panda it breaks? something's terribly off here. | 11:57 | |
moritz | panda precompiles | ||
grondilu | rn: multi talk { callwith "hello" }; multi talk($msg) { say $msg }; talk; | 11:58 | |
p6eval | rakudo 779703: ( no output ) | ||
..niecza v24-5-g599cbcb: OUTPUT«Unhandled exception: Cannot call &talk; none of these signatures match: Any Any at /tmp/Hvxsa4Xiyt line 1 (mainline @ 5)  at /home/p6eval/niecza/lib/CORE.setting line 4208 (ANON @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 4209 (module-C… | |||
timotimo | moritz: good point. i added lib/ but not blib/ to P6LIB | ||
tadzik | timotimo: yeah, that's my experience too. I think it should be skipped, and I'll file a bug and assign it to flussence++ :P | ||
jnthn | grondilu: callwith iterates through a *predetermined* candidate list (namely, the list of available candidates which take no arguments, whihc is just one). | 11:59 | |
Not re-dispatches each time. | |||
If you want that, just call talk(...) again :) | |||
moritz | timotimo: you need to add blib/lib to PERL6LIB | ||
timotimo | yes, i did that now | ||
and that's exactly what breaks it, blib vs lib | 12:00 | ||
arnsholt | jnthn: Ooh, that's the confusing change that was made to the {call,next}{same,with} semantics, isn't it? | ||
timotimo | but how can my web app be webscale if i don't precompile it with rakudo before deploying it? | 12:01 | |
grondilu | ok I'll use the name of the subroutine but I would have liked something more generic, and &?ROUTINE would not redispatch :/ | 12:02 | |
jnthn | arnsholt: No, I don't think it's ever been specified to re-dispatch. | 12:03 | |
arnsholt: It's always been iterator-y | |||
tadzik | gotta love sloccount and it's COCOMO calculations | ||
arnsholt | Right. My bad then | ||
tadzik | Total Estimated Cost to Develop = $ 18,216 | ||
yeah, sure | |||
felher | rurban++ # very long blog post. Hope I will get around to read it after $job | ||
timotimo | tadzik: that's for bailador? :) | 12:04 | |
tadzik | timotimo: nah, just something at $dayjob :) | ||
timotimo | heh | ||
12:04
crab2313 joined
|
|||
tadzik | Bailador is just $ 11,328 | 12:05 | |
12:06
crab2313 left
|
|||
jnthn wonders what the debugger is :) | 12:08 | ||
moritz | tadzik: and nqp and rakudo? | ||
cedrvint | www.ohloh.net/p/rakudo/estimated_cost | 12:09 | |
www.ohloh.net/p/nqp/estimated_cost | |||
moritz | parrot: 4M | 12:11 | |
sorear | www.ohloh.net/p/niecza says that it contains 8 man-years of code D: | ||
cedrvint | sorear: how many men are you? | ||
tadzik | moritz: nqp + parrot + rakudo is $ 20,372,602 :) | 12:13 | |
150 person-years | |||
I wonder if it says person-years to be politically correct and avoid sexism accusations | |||
cedrvint agrees | 12:14 | ||
timotimo | huh? no, everybody knows that only men are persons! | ||
cognominal | the important thing is not the cost but the value, and that, you can't calculate. | 12:15 | |
sorear | one small step for mankind. | ||
jnthn | My magical coding robot is offended at the use of "person-years", and wishes it was "coding-entity-years" :P | ||
tadzik | personkind, you sexist pig! :D | ||
sorear | apparently I need to be more men, because ohloh is complaining about decreasing year over year cmmits | 12:16 | |
oh hey, created by cedrvint | 12:17 | ||
sorear wondered if ohloh was algorithmically scraping the web for projects | |||
cedrvint | :) | ||
sorear | sleep& | 12:18 | |
12:24
sftp joined
|
|||
grondilu | rn: package Foo { proto talk {*}; multi talk {...}; our talk($msg) { say $msg } }; Foo::talk "hello"; | 12:26 | |
p6eval | rakudo 779703: OUTPUT«===SORRY!===Malformed ourat /tmp/qgWOh83qB_:1------> { proto talk {*}; multi talk {...}; our ⏏talk($msg) { say $msg } }; Foo::talk "he expecting any of: scoped declarator» | ||
..niecza v24-5-g599cbcb: OUTPUT«===SORRY!===Malformed our at /tmp/9pQmveN7ZB line 1:------> { proto talk {*}; multi talk {...}; our⏏ talk($msg) { say $msg } }; Foo::talk "hParse failed» | |||
grondilu | rn: package Foo { proto talk {*}; multi talk {...}; our multi talk($msg) { say $msg } }; Foo::talk "hello"; | 12:27 | |
p6eval | rakudo 779703: OUTPUT«Could not find symbol '&talk' in method <anon> at src/gen/CORE.setting:10204 in at src/gen/Metamodel.pm:2404 in any find_method_fallback at src/gen/Metamodel.pm:2392 in any find_method at src/gen/Metamodel.pm:925 in at src/gen/BOOTSTRAP.pm:852 in any … | ||
..niecza v24-5-g599cbcb: OUTPUT«Potential difficulties: &talk is declared but not used at /tmp/FZF6rCXpEN line 1:------> package Foo { proto talk ⏏{*}; multi talk {...}; our multi talk($mhello» | |||
jnthn | grondilu: Putting "our" on a single candidate makes no sense (and should probably be an error) | ||
grondilu | rn: package Foo { our proto talk {*}; multi talk {...}; multi talk($msg) { say $msg } }; Foo::talk "hello"; | ||
p6eval | rakudo 779703: OUTPUT«Too many positional parameters passed; got 1 but expected 0 in sub talk at /tmp/vRndARrONC:1 in block at /tmp/vRndARrONC:1» | ||
..niecza v24-5-g599cbcb: OUTPUT«Potential difficulties: &talk is declared but not used at /tmp/jDQ4qhG39L line 1:------> package Foo { our proto talk ⏏{*}; multi talk {...}; multi talk($msg) Unhandled exception: System.NullReferenceException: Object reference not s… | |||
jnthn | And now your proto is not liberal enough :) | ||
grondilu | oh yeah | 12:28 | |
but what if I want a user of a module to access a version of a function, but not an other? | |||
jnthn | I think you can selectively export, but if you export the proto that's all or nothing. | 12:29 | |
Well, apart from here you're not exporting. | |||
But relying on our semantics. | |||
I'd say it's more Perl 6-ish to export, imho. | |||
grondilu | ok | ||
jnthn | But there's not a way to have just some candidates visible on the outside and others on the inside. | 12:30 | |
(with the our approach) | |||
12:33
dalek left
12:34
dalek joined,
ChanServ sets mode: +v dalek
|
|||
moritz | r: gist.github.com/4258258 | 12:35 | |
p6eval | rakudo 779703: OUTPUT«("A", "B", "Z").list» | ||
moritz | that produces ("Z", "A", "B").list in qast-sink-1 | 12:36 | |
timotimo | just trying out random perl6 modules right now. Inline gives "obsolete use of | or \ with sigil on param $arr" and SDL gives "cannot import symbol &trait_mod:<is> from Inline because it already exists in this lexical scope &trait_mod:<is>" :( | ||
i'm not sure if the last one should be a bug on SDL or on Inline? | |||
FROGGS_ | timotimo: it's a bug in rakudo, and it's known | ||
timotimo | OK | 12:37 | |
jnthn | moritz: What if you make it gatehr sink for ... ? | 12:40 | |
*gather | |||
moritz | jnthn: doesn't make a difference | 12:41 | |
jnthn: the problerm is that the inner 'take $_ for @$_; | |||
' | |||
isn't run early enough | |||
if I add 0; after that loop, all is fine | 12:42 | ||
so I guess the gather block is not sunk | |||
oh, I guess I need to patch up sub coro for that | 12:43 | ||
in PIR :( | |||
jnthn | moritz: See the PIR patching up I did in MapIter the other day for clues | ||
moritz | jnthn: that looks roughly like what I would have written myself | 12:45 | |
now that nqp::can works with modules and roles, I wonder if I should remove the check for repr_defined | 12:46 | ||
sergot | Could somebody install JSON::Tiny on feather? ;] | 12:48 | |
moritz | sergot: you should be able to install it in your home dir | ||
clone panda, then perl6 bootstrap.pl | |||
jnthn | moritz: It's a fast check. | ||
12:48
cognominal left
|
|||
jnthn | moritz: I re-ordered the checks to make sure we do them in speed order | 12:49 | |
12:49
cognominal joined
|
|||
jnthn | repr_defined should be faster than can should be faster than defined | 12:49 | |
moritz | jnthn: ok | ||
sergot | moritz: I'm, but I want to use cronjobs, and then it have to be installed on the whole server I think. | ||
moritz | sergot: cron jobs for which purpose? | 12:50 | |
sergot | moritz: generating feather.perl6.nl/~sergot/modules | ||
moritz | sergot: then it should be enough to set a few environment variables for the cron job | ||
like PATH, HOME, maybe some others | 12:51 | ||
sergot | moritz: thanks a lot. :) | 12:52 | |
12:53
SamuraiJack left
|
|||
moritz | jnthn: my patch didn't help. And the odd thing is, the gather block seems to be in sink context already | 13:02 | |
./perl6 -e 'eager do gather for ^2 { take $_; .say for 42 }' | |||
prints the 42 twice | |||
just as it should | 13:03 | ||
so it must be in sink context | |||
13:07
wamba joined
|
|||
moritz | hm | 13:10 | |
maybe the problem is that some part in there is a Parcel and not a list | |||
and there is no Parcel.sink yet | |||
jnthn | moritz: just to check - it's certainly about gather, not about the for as a statement modifier? | ||
moritz | jnthn: for as statement modifier generally work | 13:11 | |
sergot | rakudo is really fast now... ! \o/ | ||
moritz | though I'll try it with a normal loop, just to be sure | ||
no, doesn't make a difference | 13:14 | ||
bphillips | moritz: I was told you were the smartmatch "resident expert" yesterday. Does this behavior seem right? gist.github.com/4253309 (it goes into the "if" block on each loop iteration) | 13:18 | |
r: gist.github.com/4253309 | |||
p6eval | rakudo 779703: OUTPUT«Matched! c against /a/b/1/d/:e: (match was :c)Matched! d against /a/b/1/d/:e: (match was :c)Matched! e against /a/b/1/d/3: (match was :e)» | ||
moritz | bphillips: rakudo currently returns the (possibly modified) string from s///. I believe that's not quite right, but I'm not sure at the moment | 13:19 | |
bphillips | so is there no way to tell if the smartmatch actually succeeded when using s/// ? | 13:20 | |
timotimo | r: say $_ for 1, 2, 3; | ||
p6eval | rakudo 779703: OUTPUT«123» | ||
timotimo | hm. | ||
moritz | bphillips: no | ||
I should fix that | |||
bphillips | also, $/ seems to persist over multiple ~~ s/// operations (specifically, it's not reset when one fails) | 13:21 | |
timotimo | r: class A { multi method push(@a) { .push $_ for @a; }; multi method push($a) { say $a } }; A.new.push: (1, 2, 3); | ||
p6eval | rakudo 779703: OUTPUT«===SORRY!===Two terms in a rowat /tmp/Qe1k1s0qsD:1------> class A { multi method push(@a) { .push ⏏$_ for @a; }; multi method push($a) { sa expecting any of: method arguments postfix infix or meta-… | ||
bphillips | that also seems not quite right | ||
moritz | timotimo: .push $_ is wrong | ||
timotimo | that's what rakudo keeps telling me :D | 13:22 | |
moritz | must .push($something) or .push: $something | ||
timotimo | OK | ||
bphillips | moritz: is this something implemented in perl6 (vs. pir) that I could try my hand at fixing? (I've not really delved into perl6 internals but I'd love to give it a try) | ||
moritz | bphillips: yes, it is | ||
bphillips: in particular, look at method subst in src/core/Str.pm | 13:23 | ||
and method quote:sym<s> in src/Perl6/Actions.pm is the codegen for s/// | |||
timotimo | moritz: i'm getting a "unable to parse expression in block; cound't find final }" self.push <HERE>($_) for $sg.node.v; | ||
bphillips | moritz: awesome! I'll take a look | 13:24 | |
timotimo | but with a : instead of () it works | ||
moritz | timotimo: looks like you have a space between 'push' and '(' | ||
timotimo | so i'll take that | ||
or, derp, yes. | |||
[Coke] | misquotes moritz: "jnthn: thanks for all the stinking patches." | ||
bphillips | moritz: Is there a newb guide to checking out the spectests, modifying a test and running one? | 13:27 | |
moritz has a stinking feeling in his stomach that this is going to be a hard problem | |||
bphillips: 'make testable' | |||
bphillips | moritz: this subst issue is going to be a hard problem, you mean? (or something else) | 13:31 | |
moritz | bphillips: no, my remaining error in the sink branch | ||
bphillips | ah, ok :-) | ||
moritz | and I was mostly punning on sink/stink to please [Coke] ;-) | ||
jnthn | :) | 13:32 | |
moritz: Yeah, tricky... | |||
timotimo | r: class A { method new(@items) { .say for @items } }; A.new: [1, 2, 3, 4]; | ||
p6eval | rakudo 779703: OUTPUT«1234» | ||
timotimo | r: class A { method new(@items) { .say for @items } }; A.new: :items([1, 2, 3, 4]); | 13:36 | |
p6eval | rakudo 779703: OUTPUT«Not enough positional parameters passed; got 1 but expected 2 in method new at /tmp/Swv9Kv9ZfP:1 in block at /tmp/Swv9Kv9ZfP:1» | ||
timotimo | it would be cool if it said "but you passed 1 named argument where 0 were expected.", too :P | 13:37 | |
moritz | method always accept any named parameters | ||
timotimo | oh? and if they're not in the signature, they're just silently dropped? | 13:38 | |
moritz | yes | ||
timotimo | is this only for method? what about multi/sub/submethod? | ||
moritz | only for methods | ||
jnthn | For submethod too, iirc | 13:39 | |
timotimo | interesting. what's the idea behind it? | ||
jnthn | See interface consistency section of S12, but essentially it's to make deferal more useful | ||
timotimo | thanks | 13:40 | |
13:41
wamba left
|
|||
moritz thinks this is a good candidate for the FAQs | 13:46 | ||
13:48
pmurias joined
13:52
mtk left
|
|||
timotimo | r: class A { has %.n; method new(@it) { $.n{$_} = $_ for @it; } }; my $a = A.new([1, 2, 3]); say +$a.n; | 13:53 | |
p6eval | rakudo 779703: OUTPUT«Cannot look up attributes in a type object in method n at src/gen/CORE.setting:1798 in method new at /tmp/8r4QeGkCxk:1 in block at /tmp/8r4QeGkCxk:1» | ||
cedrvint | r: role R { }; multi sub infix:<..> (R:D $a, R:D $b) { !!! }; 1 .. 42; | 13:55 | |
p6eval | rakudo 779703: OUTPUT«===SORRY!===CHECK FAILED:Calling 'infix:<..>' will never work with argument types (Int, Int) (line 1) Expected any of: :(R:D $a, R:D $b)» | 13:56 | |
cedrvint | why infix:<..>(Int, Int) isn't available anymore? | ||
n: role R { }; multi sub infix:<..> (R:D $a, R:D $b) { !!! }; 1 .. 42; | 13:57 | ||
p6eval | niecza v24-5-g599cbcb: OUTPUT«Potential difficulties: $a is declared but not used at /tmp/_sb7pXOA5Z line 1:------> role R { }; multi sub infix:<..> (R:D ⏏$a, R:D $b) { !!! }; 1 .. 42; $b is declared but not used at /tmp/_sb7pXOA5Z line 1:------> { }; mult… | ||
cedrvint | n: role R { }; multi sub infix:<..> (R:D $a, R:D $b) { +$a .. +$b }; 1 .. 42; | ||
p6eval | niecza v24-5-g599cbcb: OUTPUT«Unhandled exception: Cannot call &infix:<..>; none of these signatures match: R where { ... }, R where { ... };; |$c where { ... } at /tmp/V1KSTbtsch line 1 (mainline @ 5)  at /home/p6eval/niecza/lib/CORE.setting line 4208 (ANON @ 3)  at /home/p6e… | ||
cedrvint | rn: role R { }; 1 .. 42; | 13:58 | |
p6eval | rakudo 779703, niecza v24-5-g599cbcb: ( no output ) | ||
timotimo | r: class A { has %.n is rw; method new(@it) { $.n{$_} = $_ for @it; } }; my $a = A.new([1, 2, 3]); say +$a.n; | 14:00 | |
p6eval | rakudo 779703: OUTPUT«Cannot look up attributes in a type object in method n at src/gen/CORE.setting:1786 in method new at /tmp/YkNkK4lh0s:1 in block at /tmp/YkNkK4lh0s:1» | ||
timotimo | r: class A { has %.n is rw; method new(@it) { $.n{$_} = $_ for @it; } }; my $a = A.new([1, 2, 3]); say $a; | ||
p6eval | rakudo 779703: OUTPUT«Cannot look up attributes in a type object in method n at src/gen/CORE.setting:1786 in method new at /tmp/A2uAhYBDBF:1 in block at /tmp/A2uAhYBDBF:1» | ||
moritz | timotimo: %.n isn't initialized in .new | ||
timotimo | oh, that would explain it | ||
moritz | that's done in BUILD | ||
see doc.perl6.org/language/objects#Obje...nstruction or perlgeek.de/blog-en/perl-6/object-c...ation.html | 14:01 | ||
pmurias | what's the difference between nqp::list and nqp::qlist? | ||
timotimo | thanks :) | ||
moritz | pmurias: nqp::qlist return a QRPA | ||
which is designed to be more performant in some cases, but I don't remember which :( | |||
jnthn | shift | 14:02 | |
and some others, but shift is the biggie | |||
pmurias | what's a QRPA? | 14:03 | |
jnthn: it has the same semantics but different performance? | 14:04 | ||
jnthn | pmurias: yeah, the idea is that we use it for nqp::list in the future and then nqp::qlist goes away | 14:06 | |
pmurias: It's just a transitional thing. | |||
Basically, Rakudo's iterators need shift to be efficient. | |||
And QRPA optimizes for that. | 14:07 | ||
14:07
dakkar left
|
|||
jnthn | But I don't think it really makes anything else slower either... | 14:07 | |
14:07
dakkar joined
|
|||
pmurias maps both to js Array | 14:07 | ||
timotimo | i'm not sure how to code this: i would like to have my class Graph take a list of things, like Node and Edge in its .new as a list and i call .push on that list to assign them to the proper attributes %.nodes and @.edges; how do i make the positional argument available to BUILD without having to create a new attribute for my Graph class | ||
14:08
kaleem_ joined
|
|||
jnthn | method new(@things) { self.bless(*, :@things) }; submethod BUILD(:@things) { @!edges = @things.grep(Edge); ... } | 14:09 | |
moritz | or split up @things into my @nodes, my @edges in method new | 14:10 | |
and then call self.bless(*, :@nodes, :@edges); | |||
(though that's not very friendly for subclassing) | |||
timotimo | hm, i have a multi method "push" that does the sorting, i'd like to not duplicate that in the constructor if possible :| | ||
moritz | timotimo: then put the code somewhere where you can use it both from push and from new | 14:11 | |
timotimo | i'll probably add more different cases, too. like maybe a bare Str would become a new or existing Node instead | ||
oh, yeah | |||
14:11
kaleem left
|
|||
moritz | sounds like a good task for multi subs | 14:11 | |
timotimo | well, i'll save it for later and just do named arguments for new until i find an elegant way to structure all of that | ||
cedrvint | I need your help for my Advent post: why I can't create a Range of Int anymore once I did: | 14:13 | |
r: multi sub infix:<..> (Str $a, Str $b) { !!! }; 1 .. 42 | |||
p6eval | rakudo 779703: OUTPUT«===SORRY!===CHECK FAILED:Calling 'infix:<..>' will never work with argument types (Int, Int) (line 1) Expected any of: :(Str $a, Str $b)» | ||
jnthn | r: say &infix:<..>.is_dispatcher | 14:14 | |
p6eval | rakudo 779703: OUTPUT«False» | ||
moritz | because the infix:<..> in the setting isn't a multi sub | ||
jnthn | Apparently, 'cus infix:<..> is not declared multi in the setting.. | ||
cedrvint | is it a bug in the setting? | ||
14:15
PacoAir joined
|
|||
jnthn | I'm a bit surprised it's this way, at least... | 14:15 | |
Maybe the spec says otherwise. | |||
moritz | r: multi sub infix:<..>($a, $b) { CORE::infix:<..>($a, $b) }; multi sub infix:<..> (Str $a, Str $b) { !!! }; 1 .. 42 | ||
p6eval | rakudo 779703: OUTPUT«No such method 'Any' for invocant of type 'Parcel' in at src/gen/BOOTSTRAP.pm:845 in at src/gen/BOOTSTRAP.pm:839 in any at src/gen/BOOTSTRAP.pm:836 in sub infix:<..> at /tmp/WTbUa8BQNs:1 in block at /tmp/WTbUa8BQNs:1» | ||
14:16
bluescreen10 joined,
fgomez left
|
|||
moritz | r: multi sub infix:<..>($a, $b) { Range.new($a, $b) }; multi sub infix:<..> (Str $a, Str $b) { !!! }; 1 .. 42 | 14:17 | |
p6eval | rakudo 779703: ( no output ) | ||
moritz | r: multi sub infix:<..>($a, $b) { Range.new($a, $b) }; multi sub infix:<..> (Str $a, Str $b) { !!! }; say 1 .. 42 | ||
p6eval | rakudo 779703: OUTPUT«1..42» | ||
jnthn | r: multi sub infix:<..>($a, $b) { &CORE::infix:<..>($a, $b) }; multi sub infix:<..> (Str $a, Str $b) { !!! }; say 1 .. 42 | ||
p6eval | rakudo 779703: OUTPUT«1..42» | ||
jnthn | r: multi sub infix:<..>($a, $b) { &CORE::infix:<..>($a, $b) }; multi sub infix:<..> (Str $a, Str $b) { !!! }; say "1" .. "42" | ||
p6eval | rakudo 779703: OUTPUT«Stub code executed in sub infix:<..> at /tmp/aPYneBDZlu:1 in block at /tmp/aPYneBDZlu:1» | ||
moritz | so it's CORE::... vs. &CORE:: ? | 14:19 | |
cedrvint | as of my understanding, there's no need for a "multi sub infix:<..>" since it *should* rely on infix<cmp> for user's types. | 14:20 | |
this is not the case, sadly. | |||
irclog.perlgeek.de/perl6/2012-12-11#i_6231704 | 14:21 | ||
jnthn | cedrvint: That's odd because I was looking at that code yesterday and it does call cmp | ||
cedrvint: Oh...were your objects really Int or Num + a role? | 14:22 | ||
pmurias | jnthn: do iterators support operations besides nqp::shift? | ||
dalek | kudo-js: 274e07a | (Paweł Murias)++ | wrap_nqp: IO::CaptureOutput optional while building |
||
kudo-js: 4308243 | (Paweł Murias)++ | / (2 files): [nqp] start of exception handling |
|||
kudo-js: 2f16b43 | (Paweł Murias)++ | / (2 files): Move out p6 ops to the leftover file |
|||
kudo-js: 91257ff | (Paweł Murias)++ | / (3 files): [nqp] implement many nqp:: ops, pass test 59 |
|||
jnthn | pmurias: And boolification | ||
(for if the iterator has more stuff) | 14:23 | ||
pmurias | to check if the list is empty? | ||
jnthn | true if there's more, false if not | ||
pmurias | ok | ||
nqp-js passes now passes 92 more test assertions ;) | 14:24 | ||
cedrvint | jnthn: (about "were your objects really Int or Num + a role?") I don't understand your question, I tried something like: | 14:25 | |
r: gist.github.com/4257923 | |||
p6eval | rakudo 779703: OUTPUT«debugTrueFalse» | ||
pmurias | s/passes// | ||
jnthn | cedrvint: I think you need to implement a succ in your class too for the range to work out. | 14:29 | |
skajp, bbl. | |||
pmurias: nice :) | |||
14:36
am0c joined
14:37
skids joined
|
|||
cedrvint | phenny: tell jnthn that .succ is optional according to S03: "If T also defines .succ, then the range may be iterated. (Otherwise the range may only be used as an interval, and will return failure if asked for a RangeIter.)". Also, this doesn't solve my problem: gist.github.com/4257923 | 14:38 | |
phenny | cedrvint: I'll pass that on when jnthn is around. | ||
pmurias | if I want to make nqp-js panda installable what should I check it on? latest rakudo star? | ||
14:39
birdwindupbird left,
bphillips left
14:40
bphillips joined
|
|||
cedrvint | phenny: "skajp"? | 14:40 | |
phenny | cedrvint: "skajp" (sv to en, translate.google.com) | ||
tadzik | skype phonetically, I guess | ||
pmurias: we can figure it out | |||
you probably need something like github.com/jnthn/rakudo-debugger/b...r/Build.pm | 14:41 | ||
note that it currently will also run the original Panda build() method | |||
which may have been a wrong design decision | 14:42 | ||
anyway, you just write stuff that'll put stuff in bin/ and blib/lib | |||
don't know if that'd be sufficient for a big thing like Rakudo | 14:43 | ||
pmurias | nqp-js is not a big thing yet | 14:46 | |
tadzik: I don't currently have rakudo installed so I was wandering what should I test the package against | 14:51 | ||
(I'm installing curent rakudo star now) | |||
14:54
cognominal left,
sftp left
14:55
sftp joined,
stopbit joined
|
|||
pmurias | tadzik: if nqp-js is currently run as "nqp bin/nqp-js.nqp" how should that be installed? | 14:57 | |
tadzik | pmurias: nqp-js thing, executable, having #!/usr/bin/env nqp on top, I think | 14:58 | |
pmurias: is that standalone? | |||
15:04
GlitchMr joined
15:08
betterworld joined
|
|||
[Coke] | r: sub asdf (Str $col where $col.chars==2) { say "here" } ; asdf("A"); | 15:10 | |
p6eval | rakudo 779703: OUTPUT«Constraint type check failed for parameter '$col' in sub asdf at /tmp/CfBCKozMKq:1 in block at /tmp/CfBCKozMKq:1» | ||
[Coke] | n: sub asdf (Str $col where $col.chars==2) { say "here" } ; asdf("A"); | 15:11 | |
p6eval | niecza v24-5-g599cbcb: OUTPUT«Unhandled exception: Constraint type check failed for parameter '$col' in 'asdf' at /tmp/R0ULyRnN4x line 0 (asdf @ 1)  at /tmp/R0ULyRnN4x line 1 (mainline @ 4)  at /home/p6eval/niecza/lib/CORE.setting line 4208 (ANON @ 3)  at /home/p6eval/niecza/lib… | ||
[Coke] | Is there a way to write that so the compilers are happy? | 15:12 | |
15:14
cooper left
|
|||
pmurias | tadzik: standalone? it require a .pbc library | 15:14 | |
15:15
cooper joined
|
|||
tadzik | pmurias: ah. I'm concerned about where will it be looking for that .pbc | 15:19 | |
15:24
pmurias left
15:25
BinGOs left,
sweet_kid left,
zamolxes left
15:26
BinGOs joined,
sweet_kid joined,
nyuszika7h joined,
nebuchadnezzar joined,
zamolxes joined,
yeltzooo joined,
steven___ joined,
literal joined,
sergot joined,
Juerd joined,
nyuszika7h left,
ruoso left,
pmurias joined,
ruoso joined
15:27
PacoAir left
|
|||
pmurias | tadzik: I have installed rakudo-star and wrote a Build.pm and META.info | 15:28 | |
how do I test if the module builds with panda? | |||
tadzik | pmurias: panda install /path/to/directory/ | ||
15:30
BinGOs left,
sweet_kid left,
nebuchadnezzar left,
zamolxes left,
yeltzooo left,
steven___ left,
literal left,
sergot left,
Juerd left
15:32
BinGOs joined,
sweet_kid joined,
nebuchadnezzar joined,
zamolxes joined,
yeltzooo joined,
steven___ joined,
literal joined,
sergot joined,
Juerd joined,
nyuszika7h joined,
silug joined
15:34
benabik left
15:35
benabik joined
|
|||
pmurias | tadzik: why does it fetch rakudo-js when I'm installing from hard drive? | 15:39 | |
tadzik | pmurias: it copies it to a lib where it'll build it | 15:40 | |
s/lib/dir | |||
it doesn't build in-place | |||
pmurias | shouldn't it be instant? | 15:41 | |
pmurias suspects panda prints out the info msgs at the wrong time | 15:42 | ||
tadzik | pmurias: nah, pure perl6 copying is slooow | 15:43 | |
don't ask me why :) | |||
it's not "shell cp -r" though | 15:44 | ||
15:45
hash_table joined
|
|||
hoelzro | tadzik: I'd be troubled if that were only slow under Perl 6 ;) | 15:46 | |
pmurias | hoelzro: ? | ||
hoelzro | shell cp -r | 15:47 | |
tadzik | :) | ||
15:51
mtk joined
|
|||
[Coke] was very excited to see a commit from pmichaud. | 16:01 | ||
jnthn back | 16:09 | ||
phenny | jnthn: 14:38Z <cedrvint> tell jnthn that .succ is optional according to S03: "If T also defines .succ, then the range may be iterated. (Otherwise the range may only be used as an interval, and will return failure if asked for a RangeIter.)". Also, this doesn't solve my problem: gist.github.com/4257923 | ||
jnthn | cedrvint: OK, will take a look at bit later...gotta worry about $dayjob a bit more yet today | 16:10 | |
16:12
kivutar left
16:14
bowtie joined
|
|||
pmurias | tadzik: why don't you use cp? | 16:14 | |
16:15
kaleem_ left
|
|||
jnthn | pmurias: Can't rely on having a cp command | 16:15 | |
pmurias | can\ | ||
* can't we test for that? | 16:16 | ||
16:16
david80s joined
|
|||
jnthn | It's simpler just to do it the same everywhere. | 16:16 | |
If it's really *that* slow it's better to look into why and make it faster. | 16:17 | ||
16:17
cognominal joined
|
|||
pmurias | makes sense | 16:18 | |
16:20
david80s left
16:23
david80s joined
16:24
wamba joined
|
|||
TimToady | slurp/spurt are likely not going to be fast unless you do them in binary mode | 16:31 | |
and a memory mapping will probably be faster yet | 16:32 | ||
david80s | I'm new in IRC, hope you'll get my question. Why does my 1st test on Perl6 with rakudo-star-2012.11 have a really poor low performance (30sec !! vs 0.04s with Strawberry Perl 5.16) while the source is as simple as it can be: use v6; my Int $max = 1000000; say "max=" , $max; while $max>0 { $max--; } say "loop has ended"; Thanks in advance | ||
TimToady | three reasons, or so | 16:36 | |
first, parrot is not heavily optimized yet | 16:37 | ||
second, Perl 6 defaults to arbitrary precision integers, which are a little more work | |||
third and most important, you put a type on the variable, so it thinks it has to check the type on every -- | 16:38 | ||
[Coke] | I would also add "Rakudo is not heavily optimized yet" to that. | ||
TimToady | (optimizer not smart enough to realize that -- can only produce another Int) | ||
david80s | Ok for two first args, but I've read in perlgeek.de/en/article/5-to-6 that typing variables has the ambition of optimization : "When you have type informations at compile time, you can perform certain optimizations. Perl 6 doesn't have to be slower than C, in principle.". Something went wrong ? | 16:39 | |
TimToady | [Coke]: I meant that by #1 | ||
"ambition" | |||
jnthn | Well, the type *should* help in so far as the optimizer could inline the --. But ever since we started doing the :D/:U distinction on the multis it lost its ability to do that. | ||
[Coke] | you get a very small gain by elided the Int. | 16:40 | |
*eliding | |||
david80s | well it's said "motivation" instead ambition... | ||
TimToady | oh, sorry, I was running it under niecza, where it did make some gain | 16:41 | |
[Coke] | and it explodes if you use "int" instead of Int. | ||
TimToady | also, niecza runs that particular example about 4 times faster on my machine | ||
[Coke] | r: my int $a = 3; $a--; | 16:42 | |
p6eval | rakudo 779703: OUTPUT«Cannot assign to a non-container in sub postfix:<--> at src/gen/CORE.setting:3085 in block at /tmp/d4DFfub3Ao:1» | ||
[Coke] | r: my int $a := 3; $a--; | ||
p6eval | rakudo 779703: OUTPUT«===SORRY!===Cannot bind to natively typed variable '$a'; use assignment insteadat /tmp/__Mpnpzewx:1------> my int $a := 3⏏; $a--; expecting any of: postfix infix or meta-infix infix stopper»… | ||
[Coke] | rakudo, go home, you're drunk. | ||
TimToady | which is, of course, pretty silly, since C has no problem with those semantics :) | ||
jnthn | [Coke]: You can't use -- with native ints yet since the native/rw interaction is a hard problem. | ||
[Coke] figured. | 16:43 | ||
jnthn | (Which hasn't been solved yet... :/) | ||
TimToady | yes, we basically need native pointers to do that | ||
on some level or other | |||
jnthn | The :D and :U stuff I know how to fix, I just need a chunk of undisturbed time to concentrate on it. | ||
[Coke] | TL;DR - we know, we're working on it. | ||
[Coke] pokes jnthn. "Are you free now?" | 16:44 | ||
[Coke] had a plan to keep poking you for a while, but coke is too lazy and has already given up. :) | |||
jnthn | [Coke]: No, right now I'm trying to get the material done for a class I'm meant to teach on Thu/Fri :P | 16:45 | |
TimToady | david80s: anyway, we're still "motivated" :) | 16:47 | |
[Coke] | why is it hard? overflow? | 16:48 | |
TimToady | probably recognizing that a set of static candidates has a collective property that does not arise directly from the proto | 16:49 | |
jnthn | Yeah, a lot of it is knowing we need to pass a reference rather than a value. But it's also the case that we really want it to inline well too. | 16:50 | |
TimToady | -- on Int cannot produce an undef, but that's hard to infer currently | ||
jnthn | (for the native case) | 16:51 | |
Oh, the :U/:D thing at least somewhat needs the whole concept of those as types to be a bit more deeply embedded. | |||
TimToady | coercive types like Int() you mean? | ||
jnthn | No, but those are in the same problem space. | 16:52 | |
TimToady | oh, okay, you mean like reference types, a la int** and such in C | ||
jnthn | At the moment, "as Int" (which Int() style things replace) is special cased. | ||
TimToady | and how those relate to boxed types | ||
jnthn | As is the handling of :U/:D | ||
david80s | TimToady: I hope so. I assume not being the only one looking forward to code seriously with Perl6. I've tried my test avoiding swaping '$max - -' by '$max=$max+1', and it spit the result in 9s. If this can help jnthn too... | 16:53 | |
jnthn | So only a handful of places are clueful about them. | ||
TimToady | we probably need more return type annotation of the "Just" sort, like Haskell | ||
jnthn | But yes, there's certainly a reference issue for the ++ | ||
Well, returns Int:D would probably be enough. | |||
(for the definedness case) | 16:54 | ||
We're talking about 3 different problems at once here :) | |||
TimToady | 4, if you count the fact that you're not preparing your slides :) | ||
jnthn | D'oh :) | ||
TimToady | david80s: yes, nobody wants a fast Perl 6 more than we do :) | ||
but also want it to be Perl 6, and not a fast some other language... | 16:56 | ||
which is hard | |||
16:58
cognominal left
16:59
cognominal joined
17:02
leont joined
|
|||
[Coke] is reminded that he needs to move some [spec] tickets from rakudo's queue to spec's. | 17:03 | ||
david80s | TimToady: Ok, try to keep in mind a particularity, good or bad, is strongly highlighted if it's facing a huge gap comparing to others products. I'm confident on the future and your hard work. It was a pleasure. | 17:05 | |
[Coke] | question on rt.perl.org/rt3/Ticket/Display.html?id=116014 - | 17:06 | |
given: | |||
rn: my Str $a = "Z"; $a++ | 17:07 | ||
p6eval | rakudo 779703, niecza v24-5-g599cbcb: ( no output ) | ||
17:07
david80s left
|
|||
[Coke] | rn: my Str $a = "Z"; $a++; say $a; | 17:07 | |
p6eval | rakudo 779703, niecza v24-5-g599cbcb: OUTPUT«AA» | ||
[Coke] | how is 'A' ... 'a' supposed to ever hit 'a' ? | ||
(argh. the RC link in the ticket has been smushed and is unusable) | 17:08 | ||
cedrvint: do you have the original URL for that ticket? | |||
n: 'A'...'a'.say; | 17:09 | ||
p6eval | niecza v24-5-g599cbcb: OUTPUT«a» | ||
[Coke] | n: ('A'...'a').say; | ||
p6eval | niecza v24-5-g599cbcb: OUTPUT«A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a» | ||
[Coke] | n: ('A'..'a').say; | ||
p6eval | niecza v24-5-g599cbcb: OUTPUT«"A".."a"» | ||
17:12
Kharec left
17:18
pmurias left
17:20
cognominal left
17:21
kurahaupo joined
|
|||
FROGGS_ | does somebody know if there is a spec about the module search paths? | 17:21 | |
17:23
cognominal joined
17:26
kurahaupo left
17:27
Vlavv` joined
17:28
cognominal left
17:38
benabik left,
benabik joined,
wamba left
17:42
Chillance joined
|
|||
TimToady | FROGGS_: S11 tries to discourage the concept, reserving it only for private module development | 17:42 | |
errands & | |||
FROGGS_ | TimToady: k, thanks | 17:52 | |
17:55
PacoAir joined,
wamba joined
17:57
lorn left
18:01
am0c left,
hash_table left
18:03
lorn joined
18:09
SmokeMachine left
18:13
MayDaniel joined
|
|||
GlitchMr | Oh, I've found actual Perl 6 module in CPAN | 18:17 | |
metacpan.org/module/Perl6::Conf | |||
This doesn't seem to work well | |||
18:22
MayDaniel left
|
|||
[Coke] ughs at metacpan's web page. | 18:33 | ||
ahhh. most of that pain is probably the podsix. | 18:34 | ||
timotimo | probably :| | ||
18:41
fhelmberger left
18:42
arlinius joined
|
|||
arlinius | huh? they serve totally different purposes | 18:43 | |
sorry, wrong window | |||
skids | r: multi sub a ($a is rw) { "rw".say; $a; }; multi sub a ($a) { "ro".say; $a }; my $a = 1; a($a); a(1); # should mutability factor into multidispatch? | 18:47 | |
p6eval | rakudo 779703: OUTPUT«Ambiguous call to 'a'; these signatures all match::($a is rw):($a) in block at /tmp/46e0fTEDL2:1» | 18:48 | |
jnthn | skids: yes, just nyi | 18:50 | |
skids | Wow I was expecting differently :-) | 18:51 | |
18:51
kaare_ joined
19:00
dakkar left
19:16
fgomez joined
|
|||
pmichaud | good afternoon, #perl6 | 19:17 | |
jnthn | o/ pmichaud | ||
FROGGS_ | hi pmichaud | ||
[Coke] | pmichaud: hio! | 19:18 | |
PerlJam | pmichaud: greets! LTNS | 19:19 | |
moritz | \o | ||
pmichaud | I'm about to convert the rakudo github repo to an organization repo... any objections or comments before I do that? | 19:26 | |
PerlJam: yes, ltns. Hope things are going well there. | 19:27 | ||
jnthn | pmichaud: If you're comfortable doing so, I'm fine with it. | 19:28 | |
[Coke] | pmichaud: wfm. | 19:36 | |
rjbs | seen mauke | 19:39 | |
aloha | mauke was last seen in #perl6 145 days 19 hours ago joining the channel. | ||
[Coke] | r: say 145 / (365.24/12) | 19:40 | |
p6eval | rakudo 779703: OUTPUT«4.763991» | ||
19:41
jaldhar_ left
19:50
spider-mario joined
|
|||
sorear | good * #perl6 | 19:54 | |
GlitchMr | Perl 6 makes impossible without modifying implementation things possible - nikic.github.com/2012/07/27/How-to-...o-PHP.html - 'in' operator in PHP | 19:56 | |
dalek | rl6-roast-data: 7b9a396 | coke++ | / (4 files): today (automated commit) |
||
GlitchMr | perlcabal.org/~glitchmr/examples/in - in operator in Perl 6 :-) | ||
I prefer Perl 6 version | |||
niecza> my \in = '2' | 19:57 | ||
2 | |||
niecza> in in in | |||
True | |||
But perhaps I shouldn't abuse Perl 6 like that. | 19:58 | ||
Woodi | hallo :) | 20:06 | |
rjbs | buffalo operator | ||
Woodi | GlitchMr: want to explain me something ? | ||
just --> in signature is strange - it declares type of return value ? | 20:07 | ||
GlitchMr | --> is return value | 20:08 | |
It can be even constant value instead of type, but why? | |||
Woodi | just learning Perl 6 :) | ||
two more strange/unknown things for my eye in that example... 'so' (creating booolean answer?) and why :exists and not .exists ? | 20:10 | ||
GlitchMr | :exists because I ask %b, not %b{$a} | 20:11 | |
so converts value to boolean | |||
Just like !! | 20:12 | ||
Or ? | |||
grondilu | r: say !! True | ||
p6eval | rakudo 779703: OUTPUT«True» | ||
masak | evenin', #perl6 | ||
grondilu did not know this one | |||
Woodi | o/ | ||
20:12
rindolf left
|
|||
Woodi | but 'so %b{$a}' could work too ? | 20:13 | |
GlitchMr | No | 20:14 | |
%b{$a} could exist but be falsy value | |||
I wanted it to look like in Python | |||
>>> "a" in {"a": False} | |||
True | |||
This is Python | |||
20:15
leont left
|
|||
Woodi | >>> is prompt or operator ? :) | 20:15 | |
GlitchMr | Woodi: It's Python prompt | ||
Woodi | oki :) | ||
20:24
fgomez left
20:31
wamba left
20:34
bruges left
20:35
noggle joined
20:36
bruges joined
|
|||
skids | r: my @g = 1,2,3; my ($a, $b, $c) := @g[0,1,2]; $a.say; $c.say; my $d := @g[1]; $d = 5; $b.say; @g.say; $b = 6; # newly implemented my (...) and slice binding not happy together | 20:42 | |
p6eval | rakudo 779703: OUTPUT«1321 5 3Cannot assign to a readonly variable or a value in block at /tmp/qjlELtsLRF:1» | ||
20:43
fgomez joined
|
|||
masak | skids: if you bind directly to a value (like the 2 in @g[1]), you can't assign later. | 20:45 | |
20:47
cognominal joined
20:48
popl joined
20:49
fgomez left
20:59
fgomez joined
21:03
GlitchMr left
21:04
kaare_ left
|
|||
masak | timotimo: ooh, you're resurrecting Druid? nice! | 21:08 | |
timotimo: I'll have more time next week. I could help you. | 21:09 | ||
probably needs lots more tests. | |||
timotimo | well, yeah | 21:10 | |
i was just trying to get it running. then after a few hours of digging and trying to understand what has changed in the last 4 years i see your branch that tries to do resurection, too (but 2 years ago rather than 4) | 21:11 | ||
on my branch you can apparently already play, but the 3d display doesn't work and i didn't understand why the last time i looked | |||
21:12
Chillance left
21:14
wamba joined
21:19
spider-mario_ joined,
spider-mario left
|
|||
timotimo | masak: it should only take you five minutes :D | 21:20 | |
21:23
fgomez left
|
|||
masak | I'm spent tonight, unfortuntely. need to use the remaining mana to locate the bed. | 21:23 | |
maybe I'll have a look tomorrow. but definitely next week at the latest. | |||
diakopter | .oO( under piles of laundry? ) |
||
timotimo | no problem :) | ||
it's not a high priority for me | |||
i was just boredly clicking through the perl6 module index, looking at all the failing and/or abandoned modules | 21:24 | ||
diakopter | timotimo: do you have a list of which still work? | ||
jnthn | diakopter: Ementaller (how they heck do you spell it...) produces such a list automatically | 21:26 | |
timotimo | no, i also only clicked on a few of them | ||
diakopter | it'd be nice to have that info on the module list | 21:29 | |
(but perhaps embarrassing) | |||
timotimo | well, can't an automated test run do that? | ||
ideally, the tests in those programs would be exhaustive | |||
jnthn | diakopter, timotimo: I think sergot++ is working on building something like that, and already has quite a lot of it done. | 21:30 | |
timotimo | that sounds great | 21:32 | |
21:32
fgomez joined
|
|||
tadzik | yeah, it's pretty working | 21:35 | |
feather.perl6.nl/~sergot/modules/ | |||
skids | masak: you'll notice I can and did assign to g[1] through $d. But $b can't. | ||
tadzik | some trouble with cronjobs | ||
there are those Street Lights on the right | 21:36 | ||
masak | TimToady: S02 contains *one* example of qq:to, and that example doesn't address the subtle question of what happens first: .indent(*) or variable interpolation. what's your take on which one happens first? | 21:39 | |
21:40
cedrvint_ joined
|
|||
masak | 'night, #perl6 | 21:40 | |
cedrvint_ | o/ masak | 21:41 | |
jnthn | Well, .indent before would be weird, given we don't have a string to call indent on at that point... | ||
cedrvint_ | phenny: tell [Coke] the URL is rosettacode.org/wiki/Calendar_-_for...rogrammers | 21:42 | |
phenny | cedrvint_: I'll pass that on when [Coke] is around. | ||
cedrvint_ | phenny: tell [Coke] the regression appears when Rakudo (star) has switched to NQP | 21:44 | |
phenny | cedrvint_: I'll pass that on when [Coke] is around. | ||
[Coke] | phenny: I'm not convinced it's a regression. | 21:48 | |
phenny | [Coke]: 21:42Z <cedrvint_> tell [Coke] the URL is rosettacode.org/wiki/Calendar_-_for...rogrammers | ||
[Coke]: 21:44Z <cedrvint_> tell [Coke] the regression appears when Rakudo (star) has switched to NQP | |||
[Coke] | er, cedrvint | ||
cedrvint_ | o/ [Coke] | ||
[Coke] | that snippet doesn't look like your ticket. | 21:49 | |
cedrvint_ | I reduced the problem as much as possible, indeed | ||
r: "\0"..."~" | 21:50 | ||
p6eval | rakudo 779703: ( no output ) | ||
[Coke] | cedrvint_: so, my question is: why should 'A'...'a' work, when if you get to 'Z', 'Z'++ == 'AA' ? | ||
cedrvint_ | ? | ||
r: ("\0"..."~").say | |||
p6eval | rakudo 779703: OUTPUT«(timeout)» | 21:51 | |
[Coke] | or, when doing using alphas with ..., what function generates the next value? | ||
r: ("A"..."AA").say | |||
p6eval | rakudo 779703: OUTPUT«A B C D E F G H I J K L M N O P Q R S T U V W X Y Z AA» | ||
cedrvint_ | [Coke]: I don't know | ||
[Coke] | r: ("A"..."a").say | ||
p6eval | rakudo 779703: OUTPUT«(timeout)» | 21:52 | |
cedrvint_ | I was just trying to execute this piece of RC code, then noticed a regression | ||
[Coke] | so, given a transition from Z to AA, 'a' will never show up in the list. so it's infinite, and then you try to print it out, it times out. | ||
ok, but the ticket doesn't show that code, does it? | |||
jnthn | It's possible (sorry, don't have time to check right now) that the current behavior is actually the spec one. | ||
cedrvint_ | maybe, then it's a bug in Niecza :) | 21:53 | |
and in old Rakudo versions | |||
[Coke] | ... which was my other point, there's no doubt been some spec churn since the RC entries started. | ||
21:54
cognominal left
|
|||
[Coke] | r: my $a = "\0"; say $a++; | 21:54 | |
p6eval | rakudo 779703: OUTPUT«␀» | ||
[Coke] | r: my $a = "\0"; my $i = 1000; while $i { $a++; $i--}; say $a; | 21:55 | |
p6eval | rakudo 779703: OUTPUT«␀» | ||
[Coke] | r: my $a = "\0"; my $b = $a; my $i = 1000; while $i { $a++; $i--}; say so $b == $a; | ||
p6eval | rakudo 779703: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏␀' (indicated by ⏏) in method Numeric at src/gen/CORE.setting:10197 in sub infix:<==> at src/gen/CORE.setting:2809 in sub infix:<==> at src/gen/CORE.setting:2809 in blo… | ||
[Coke] | r: my $a = "\0"; my $b = $a; my $i = 1000; while $i { $a++; $i--}; say ($b == $a); | 21:56 | |
p6eval | rakudo 779703: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏␀' (indicated by ⏏) in method Numeric at src/gen/CORE.setting:10197 in sub infix:<==> at src/gen/CORE.setting:2809 in sub infix:<==> at src/gen/CORE.setting:2809 in blo… | ||
[Coke] | r: my $a = "\0"; my $b = $a; my $i = 1000; while $i { $a++; $i--}; say ($b eq $a); | ||
p6eval | rakudo 779703: OUTPUT«True» | ||
21:56
skids left
|
|||
[Coke] | r: ("\0"..."~")[1000000].say | 21:56 | |
p6eval | rakudo 779703: OUTPUT«(timeout)» | 21:57 | |
[Coke] | (so, string increment of \0 is \0 in current rakudo.) | ||
21:58
rickza joined
|
|||
cedrvint_ | r: say "\0".ord; say ("\0"++).ord | 21:58 | |
p6eval | rakudo 779703: OUTPUT«0Cannot assign to a non-container in sub postfix:<++> at src/gen/CORE.setting:1611 in block at /tmp/jeiUgeLf_5:1» | ||
[Coke] | you have to assign it to a var first. | 21:59 | |
(before ++'ing it) | |||
cedrvint_ | r: my $c = "\0"; say $c.ord; $c++; say $c.ord | 22:00 | |
p6eval | rakudo 779703: OUTPUT«00» | ||
22:00
rickza left
|
|||
cedrvint_ | [Coke]: do you mean: 1. the bug I reported is not a bug; and 2. there's a bug elsewhere in this RC code ? | 22:01 | |
[Coke] | I'm saying I don't see much similarity between the 2 snippets except that they use the "..." operator. | 22:03 | |
22:03
cognominal joined
|
|||
[Coke] | and yes, that the bug you reported with A...a doesn't look like a bug to me. I don't see in the spec where strings get anything other than the default ++ behavior to get the next value. | 22:03 | |
cedrvint_ | [Coke]: my mistake, sorry. | 22:04 | |
[Coke] | no worries! | ||
I'm not positive, which is why I was trying to ping the channel about it earlier. no one but you responded. :) | |||
cedrvint_ | :) | 22:05 | |
[Coke] | ah! and I'm an idiot, because I see the ... range from the RC at the /end/ of the ticket. | ||
but I think that's the same bug. the RC code and your 2 samples expects that you're going to iterate over the ords, but I don't think that's the case. | |||
r: (0...1000).map(ord(*))[100]; | 22:06 | ||
p6eval | rakudo 779703: OUTPUT«===SORRY!===CHECK FAILED:Calling 'ord' will never work with argument types (Whatever) (line 1) Expected: :(Cool $s)» | ||
[Coke] | ... "close enough!" | 22:07 | |
22:11
spider-mario_ left
22:19
cedrvint_ left
22:21
sahadev1 joined
|
|||
sahadev1 | perl6: [1, 2] ~~ [1, 2] | 22:21 | |
p6eval | rakudo 779703, niecza v24-5-g599cbcb: ( no output ) | ||
sahadev1 | perl6: say [1, 2] ~~ [1, 2] | ||
p6eval | rakudo 779703, niecza v24-5-g599cbcb: OUTPUT«True» | ||
sahadev1 | perl6: say [1, 2] ~~ [1, *] | 22:22 | |
p6eval | rakudo 779703, niecza v24-5-g599cbcb: OUTPUT«False» | ||
22:26
colomon left
22:28
armitage81 joined,
armitage81 left,
armitage81 joined
23:00
bluescreen10 left
23:05
whiteknight joined
23:09
exodist_ left
23:12
stopbit left
23:14
cognominal left
23:21
PacoAir left
|
|||
jnthn | No Perl 6 tuits today, it seems :( | 23:21 | |
'night o/ | |||
23:22
cognominal joined
23:23
fgomez left
23:24
wamba left
|
|||
timotimo | how long until the next perl6advent post? :) | 23:47 | |
23:50
Vlavv` left
23:51
Vlavv joined
23:58
colomon joined
|