»ö« 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:20
aindilis` left
00:21
[particle] joined,
nebuchad` joined,
TEttinger left,
TEttinger joined,
xiaomiao joined,
xiaomiao left,
xiaomiao joined,
sftp joined
00:23
laouji joined
00:36
ilogger2_ joined
00:37
domm joined
00:38
TimToady joined,
vike joined
00:40
laouji joined
00:42
laouji left,
laouji joined,
isacloud joined,
g4 joined,
Zoffix joined,
isacloud left,
isacloud joined
|
|||
japhb_ | nick japhb | 00:50 | |
japhb | blurfle | 00:51 | |
yoleaux | 14 Sep 2015 17:36Z <tony-o> japhb: because the META.json was broken | ||
japhb | timotimo: Have you pushed your perl6-bench changes? | ||
00:53
thou joined
00:57
thou left
|
|||
skids | Stage parse : 41.176 (slowly crept up from 30ish pre-GLR, but hopefully that's just because it is doing a better job :-) | 01:08 | |
01:11
bowtie joined,
bowtie is now known as Guest38636
01:12
AlexDaniel joined
|
|||
AlexDaniel | . | 01:12 | |
01:15
Zoffix left,
Zoffix joined
|
|||
ShimmerFairy | skids: went from 104-ish to 115-ish for me; note that there are more files that make up CORE post-GLR, if I'm not mistaken :) | 01:18 | |
ShimmerFairy should perhaps consider upgrading her CPU sometime :P | |||
skids | Yeah, more code these days. | ||
This is a relativey new lt with an SSD. | 01:19 | ||
(thanks, $DAYJOB) | |||
ShimmerFairy | skids: I have HDDs (more space for much cheaper, and a bit of a nostalgic bent to be fair :P), and an Athlon X2 CPU. | 01:21 | |
skids: at least I'm not compiling rakudo-p on a G3 Powerbook (with linux installed, of course) anymore :P | |||
tokuhiro_ | is there a perl5's `my $app = do $filename` equivalent in perl6? | 01:25 | |
ShimmerFairy | I'm not sure what that line does, but we do in fact have do { ... } (not sure if it'll do what you want, though) | ||
tokuhiro_: looking at perldoc, I'm guessing you're expecting the second case listed, which if I understand correctly would be EVALFILE in P6 | 01:28 | ||
so my $app = EVALFILE($filename) , most likely | |||
tokuhiro_ | ShimmerFairy: thanks! EVALFILE was what i wanted! | 01:29 | |
ShimmerFairy | tokuhiro_: glad I could help :) And in case you don't know/didn't guess, P5's "eval" is spelled "EVAL" in Perl 6 (to make it stand out more, since it is kinda a special thing to be doing) | 01:30 | |
01:36
AlexDaniel left
01:46
aborazmeh joined,
aborazmeh left,
aborazmeh joined,
BenGoldberg joined,
ilbot3 joined
01:54
dayangkun joined
|
|||
grondilu | my attempt at parallelizing the sum of numbers: | 02:07 | |
sub sum(@a) { [+] await @a.rotor(+@a div 4, :partial).map(-> $a { start { [+] @$a } }) }; say sum rand xx 100_000; | |||
it's actually much slower | 02:08 | ||
BenGoldberg | m: say [+] rand xx 100_000; | 02:09 | |
camelia | rakudo-moar b3a772: OUTPUT«49890.2559994881» | ||
BenGoldberg | m: say [+] rand xx 100_000 for 1..10; | ||
camelia | rakudo-moar b3a772: OUTPUT«50014.900298253849985.75785562550068.732057888749895.336943595850031.640055305549905.67619583849772.343218523150062.235650159649910.123629725849922.6322905629» | ||
BenGoldberg | m: sub sum(@a) { [+] await @a.rotor(+@a div 4, :partial).map(-> $a { start { [+] @$a } }) }; say sum rand xx 100_000; | ||
camelia | rakudo-moar b3a772: OUTPUT«49975.8131482832» | 02:10 | |
grondilu | m: sub sum(@a) { [+] await @a.rotor(+@a div 4, :partial).map(-> $a { start { [+] @$a } }) }; say sum rand xx 100_000; say now - INIT now | 02:11 | |
camelia | rakudo-moar b3a772: OUTPUT«50088.41868796974.2388345» | ||
grondilu | m: say [+] rand xx 100_000; say now - INIT now | ||
camelia | rakudo-moar b3a772: OUTPUT«49955.87283289820.89295784» | ||
BenGoldberg | m: say [+] rand xx 100_0000; say now - INIT now | 02:17 | |
camelia | rakudo-moar b3a772: OUTPUT«500149.2681263987.64512675» | ||
BenGoldberg | m: sub sum(@a) { [+] await @a.rotor(+@a div 4, :partial).map(-> $a { start { [+] @$a } }) }; say sum rand xx 100_0000; say now - INIT now | ||
camelia | rakudo-moar b3a772: OUTPUT«(timeout)» | 02:18 | |
BenGoldberg | m: sub sum(@a) { [+] await @a.rotor(+@a div 4, :partial).map(-> $a { start { 42 }) }; say sum rand xx 100_0000; say now - INIT now | 02:19 | |
camelia | rakudo-moar b3a772: OUTPUT«5===SORRY!5=== Error while compiling /tmp/LWMzaawboDMissing blockat /tmp/LWMzaawboD:1------> 3iv 4, :partial).map(-> $a { start { 42 }7⏏5) }; say sum rand xx 100_0000; say now - expecting any of: statement end s…» | ||
BenGoldberg | m: sub sum(@a) { [+] await @a.rotor(+@a div 4, :partial).map(-> $a { start { 42 } }) }; say sum rand xx 100_0000; say now - INIT now | 02:20 | |
camelia | rakudo-moar b3a772: OUTPUT«(timeout)» | ||
BenGoldberg | It's not the summation which is taking so long, since it times out even if that's ommited. | 02:21 | |
m: sub sum(@a) { [+] @a.rotor(+@a div 4, :partial).map(-> $a { 42 }) }; say sum rand xx 100_0000; say now - INIT now | |||
camelia | rakudo-moar b3a772: OUTPUT«(timeout)» | 02:22 | |
BenGoldberg | m: sub sum(@a) { [+] @a }; say sum rand xx 100_0000; say now - INIT now | ||
camelia | rakudo-moar b3a772: OUTPUT«499597.95311267615.06744666» | ||
02:24
isacloud_ joined
|
|||
BenGoldberg | Doing the summation inside a sub more than doubles the time taken! | 02:24 | |
02:28
ilbot3 left,
Zoffix left,
isacloud left,
g4 left,
isacloud_ is now known as isacloud
02:29
Zoffix joined
02:30
ilbot3 joined
02:34
g4 joined
02:41
thou joined
|
|||
_sri | wow, that fluent interfaces example makes perl6 look pretty bad en.wikipedia.org/wiki/Fluent_interface#Perl_6 | 02:41 | |
02:45
thou left
|
|||
ShimmerFairy | _sri: I suppose one might be able to write a 'is fluent' trait that you can apply to attrs which would automatically create methods for obj.name($str).age(42)... | 02:49 | |
_sri | that's what i would have expected | 02:50 | |
ShimmerFairy | _sri: also note that lots of these examples have to create those methods manually, so I think the P6 example is actually slightly better than the others already :) | ||
02:51
noganex_ joined
|
|||
ShimmerFairy | (I also think the given { } example is a more novel example, compared to all the others that use boring, predictable method chaining :P) | 02:53 | |
_sri | aesthetically it is the worst | ||
(imo) | |||
ShimmerFairy | I'd have to disagree on that, it doesn't look bad to me (may not be the cutest, but it's not incomprehensible line noise at least) :) | 02:54 | |
_sri | that's literally what i would call the given block | 02:56 | |
incomprehensible line noise | |||
ShimmerFairy | not at all, I'm thinking along the lines of emacs' toothpick regexps when I think "line noise" :P | 02:57 | |
_sri | $employee.name('Sally').surname('Ride').salary(200) | ||
that is clean | |||
ugexe | i like it | ||
ShimmerFairy | or in other words, my definition of "line noise" is literally a line of text that's impossible to read well :) | ||
skids | The Perl6 solutio at least does not suffer from the problems listed in the "problems" section. | 02:58 | |
ShimmerFairy | skids: true, there is value in keeping separate actions as separate statements. We just happen to be cool enough to still support a fluent interface for that :P | 02:59 | |
_sri | i guess perl6 just isn't for me | 03:01 | |
skids | ShimmerFairy: Well, it's a bit of a cheat: to make that "fluent" one would have to be able to do more than set attributes, and that could be done with proxies, but would get ugly. | ||
03:01
kaare_ joined
|
|||
ShimmerFairy | _sri: well, I'm not saying it's the only way (the page even mentions TIMTOWTDI, but not in name), I'm just countering your arguments for the sake of providing an alternate take on the example that was given :) | 03:02 | |
skids | It is probably why the "set attribute and return self" question popped up earlier. | 03:04 | |
03:04
laouji left
|
|||
ShimmerFairy | skids: I believe the example exists because of the question, IIRC :) | 03:05 | |
03:06
laouji joined
|
|||
flussence | the main thing wrong with that p6 example is it's demonstrating scope chaining, not fluent interface :/ | 03:06 | |
skids wonders how hard it would be to define an alternate postfix:<.> | |||
(considering how deep it is emedded in the grammar) | 03:07 | ||
_sri | looks like there was a better version before en.wikipedia.org/w/index.php?title...313#Perl_6 | 03:14 | |
03:18
telex joined
|
|||
[Coke] | brokemaniacsmusicbox.tumblr.com/pos...ercase-cat ... unicode is weird. | 03:21 | |
skids | m: my $f = Failure.new.flat[0]; | ||
camelia | rakudo-moar b3a772: OUTPUT«FailedActually thrown at: in block <unit> at /tmp/61pcO3Hzra:1» | ||
skids | methinks the .flat streamlining may have sunk something. | 03:22 | |
Ah, I know why, RT#125769. | 03:31 | ||
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=125769 | ||
skids | .tell jnthn 57a7f6a6 triggered RT#125769 (I think) so now $ = Failure.new.flat[0] throws. | 03:34 | |
yoleaux | skids: I'll pass your message to jnthn. | ||
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=125769 | ||
03:37
telex left,
telex joined
03:42
laouji left
|
|||
dalek | p: e59aa09 | hoelzro++ | .travis.yml: Add JS to Travis build matrix |
03:49 | |
04:10
vendethiel joined
04:20
Bobby__ joined
04:21
Bobby__ left
04:26
rmgk_ joined,
rmgk_ is now known as rmgk
04:27
telex left
04:28
telex joined
04:29
thou joined
04:33
vendethiel left
04:34
thou left
04:36
laouji joined
04:40
Khisanth joined
|
|||
ugexe | hoelzro: i dont think your travis config does what you think | 04:44 | |
you are sending the --backends= option twice. once under `script` and once from the matrix NQP_OPTIONS | |||
id also be surprised if `make test` tests multiple backends when sent at once via --backends=moar,jvm,js,etc but im not sure | 04:46 | ||
hoelzro | ugexe: ahhh, thanks for pointing that out | 04:51 | |
dalek | p: 869ccbb | hoelzro++ | .travis.yml: Remove redundant --backends option in Travis config |
||
04:59
Khisanth left
|
|||
ugexe | whats the purpose of --backends=js,moar when the first two NQP options do the same thing for moar | 05:01 | |
does the js backend need moar? | |||
i.e. i think the first 2 NQP_OPTIONS were made redundant by your two new NQP_OPTIONS | 05:05 | ||
the thing is, by testing each by itself you can see *which* backend failed. otherwise you just know *a* backend failed, but not which one without looking at the actual output | 05:07 | ||
ShimmerFairy | ugexe: I'm not sure, but I think 'gen-moar' implies --backend=moar, for the ones without a specific --backend option listed | 05:28 | |
ugexe | it does | ||
- NQP_OPTIONS="--gen-moar" | 05:29 | ||
- NQP_OPTIONS="--gen-moar=master" | |||
- NQP_OPTIONS="--gen-moar --backends=js,moar" | |||
- NQP_OPTIONS="--gen-moar=master --backends=js,moar" | |||
the first two are implied by the second two. but the second two dont tell you which backend fails, just that one of --backends failed | 05:31 | ||
and assuming that the default branch for moar is already master, its testing the exact same moar setup 4 times | 05:32 | ||
im not sure how the branches differ though. i just know the first point is true | 05:33 | ||
05:34
Khisanth joined
05:38
xfix joined
|
|||
ShimmerFairy | ugexe: if the moar-only ones pass and the js-including ones don't, then it's pretty clearly js's problem :) | 05:46 | |
ugexe | whats the point | 05:47 | |
ShimmerFairy | ? | ||
ugexe | if it was the js by itself it would A. be faster B. use less travis resources C. be more clear | ||
ShimmerFairy | ugexe: I don't think JS is bootstrapped yet, so that's probably why 'moar' is needed too | 05:48 | |
ugexe | i see, that would explain everything | ||
05:57
laouji left
05:58
laouji joined
05:59
BenGoldberg left
06:05
dayangkun_ joined
06:07
FROGGS[mobile] joined
|
|||
FROGGS[mobile] | o/ | 06:07 | |
06:08
dayangkun left
06:15
rurban joined
06:16
aborazmeh left
06:17
hoelzro left,
thou joined
06:19
hobbs joined
|
|||
dalek | kudo/nom: c9c87a9 | skids++ | src/core/Mu.pm: Add some helpful advice to Str(Mu:U) per RT#113888 |
06:20 | |
kudo/nom: 3fa29b7 | niner++ | src/core/Mu.pm: Merge pull request #534 from skids/lta_errors Add some helpful advice to Str(Mu:U) per RT#113888 |
|||
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=113888 | ||
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=113888 | ||
06:20
Gardner joined,
diana_olhovik_ joined,
retupmoca joined,
FROGGS joined
|
|||
dalek | p: 350aeb7 | ugexe++ | .travis.yml: Use non-legacy travis-ci builds |
06:21 | |
p: 0c380a8 | FROGGS++ | .travis.yml: Merge pull request #244 from ugexe/patch-2 Use non-legacy travis-ci builds |
|||
06:22
thou left,
Alina-malina joined
06:23
FROGGS[mobile] left
06:24
thou joined
|
|||
dalek | kudo/nom: 24931c4 | usev6++ | src/core/Any-iterable-methods.pm: Remove stringification when using :&as parameter for .squish Fixes RT #124204 |
06:27 | |
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=124204 | ||
dalek | kudo/nom: d3f71ac | niner++ | src/core/Any-iterable-methods.pm: Merge pull request #532 from usev6/rt124204 Remove stringification when using :&as parameter for .squish |
||
rurban | Did someone manage to get appveyor.yml right? Travis for Windows. I failed so far | ||
06:28
dylanwh_ joined
|
|||
FROGGS | rurban: is that something you are supposed to run on your own machine or are there also remote services? | 06:34 | |
yoleaux | 15 Sep 2015 23:45Z <ugexe> FROGGS: CURLI modules cant be use/require anymore. I've changed some stuff to get them to load, but it seems like CompUnit.load is dispatching to the self.load(Any) load method. This code lets you use the module, but none of the symbols are available. Any ideas? github.com/rakudo/rakudo/compare/n...d?expand=1 | ||
FROGGS | ugexe: ahh, I see what I did wrong... | 06:35 | |
ugexe: I think the better patch is to install CURLI stuff in a directory scheme, and also keep file extensions... | 06:36 | ||
06:37
_mg_ joined
|
|||
FROGGS | ugexe: so installing Foo.pm means installing into site/<n>/lib/Foo.pm, where <n> is the distribution counter | 06:37 | |
06:37
laouji left,
laouji joined
|
|||
FROGGS | ugexe: this would also aid MAIN_USAGE and file/line annotations, as well as finding the right files on disk as a user | 06:38 | |
ugexe: do you agree? | |||
06:39
domidumont joined
|
|||
FROGGS | ugexe: we might need to normalize filenames at some point though, but this can be a lossy normalization | 06:39 | |
ugexe: like the punycode like thing I used on testers.perl6.org | 06:40 | ||
06:40
CQ2 joined
06:41
telex left
06:42
telex joined
06:43
domidumont left
06:44
domidumont joined
06:46
laouji left
06:53
xfix left,
mr-foobar joined
06:56
telex left
06:57
Khisanth left,
telex joined
|
|||
masak | morning, #perl6 | 06:58 | |
lizmat | masak o/ | ||
moritz | \o | 06:59 | |
lizmat | moritz o/ | ||
07:01
laouji joined
07:04
Khisanth joined
|
|||
[Tux] | test 50000 38.645 38.566 | 07:06 | |
test-t 50000 41.678 41.599 | |||
:/ | |||
ran that twice | |||
07:08
KDr2 joined
|
|||
lizmat | [Tux]: so since when was this performance regression ? | 07:09 | |
[Tux] | yesterday | ||
30 freenode-#perl6.log:Sep 13 10:00:01 <[Tux]> test-t 50000 39.341 39.259 | 07:10 | ||
30 freenode-#perl6.log:Sep 14 11:15:50 <|Tux|> test-t 50000 37.080 37.000 | |||
30 freenode-#perl6.log:Sep 14 19:21:54 <|Tux|> test-t 50000 36.905 36.826 | |||
30 freenode-#perl6.log:Sep 16 09:06:05 <[Tux]> test-t 50000 41.678 41.599 | |||
moritz | [Tux]: could you please locally revert 7662c4637d99addb7989ba9e9bcab1d5553f7e55 and benchmark again? | ||
[Tux] | sorry, sep 14 | ||
lizmat | well, the last one from Sep 14 is after 7662c4637d99addb7989ba9e9bcab1d5553f7e55 , so it's not a MoarVM issue, I would think | 07:11 | |
rurban | FROGGS: appveyor is like Travis, see e.g. ci.appveyor.com/project/rurban/cperl | 07:14 | |
just 10x slower and horribly to setup properly | 07:15 | ||
07:15
thou left
07:19
g4 left
07:20
zakharyas joined
|
|||
nine | moritz: I can't believe your commit could cause such a slow down. | 07:24 | |
07:25
g4 joined
|
|||
[Tux] | test 50000 39.132 39.046 | 07:25 | |
test-t 50000 40.932 40.846 | |||
I reverted that commit and did a make. Would that be sufficient? | |||
lizmat | should be | 07:26 | |
breakfast& | 07:27 | ||
nine | I guess only a bisect will tell us want went wrong | 07:29 | |
OTOH I don't see any commit that I'd even remotely call a candidate. There weren't that many. | 07:31 | ||
moritz | [Tux]: you need a 'make install' | 07:38 | |
[Tux] | bummer :) | ||
test 50000 38.965 38.883 | 07:44 | ||
test-t 50000 40.789 40.706 | |||
no diff | |||
07:45
darutoko joined
07:46
xinming_ joined
07:50
abraxxa joined
07:54
Ven joined
|
|||
lizmat | anybody any thoughts about github.com/rakudo/rakudo/commit/425845d723afb ?? | 07:57 | |
pink_mist | sounds reasonable to me | 08:00 | |
jnthn | lizmat: A little discomfort, but I'm not awake enough to know why. :) | 08:01 | |
yoleaux | 03:34Z <skids> jnthn: 57a7f6a6 triggered RT#125769 (I think) so now $ = Failure.new.flat[0] throws. | ||
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=125769 | ||
lizmat | jnthn: maybe because it is slightly more work ?? | ||
OTOH, the candidate is as simple as they get, so should probably be inlined when possible? | 08:02 | ||
jnthn | lizmat: I'm not worried about performance, more "will this pop up as a WAT somewhere later" | ||
lizmat | well, it spectests clean so far | ||
jnthn | lizmat: But given I didn't actually manage to think of such a WAT yet... :) | ||
star: say 1 == * | 08:03 | ||
camelia | star-m 2015.03: OUTPUT«WhateverCode.new()» | ||
lizmat | the only thing I was thinking is that maybe it should work for a Whatever type object as well | ||
jnthn | Of course, that auto-curries so you have to try quite hard to hit that code path :) | ||
lizmat | indeed | ||
08:03
g6 joined
|
|||
lizmat | star: sub a($a) { say "foo" if $a == Inf }; a(*) | 08:04 | |
camelia | star-m 2015.03: OUTPUT«Cannot call 'Numeric'; none of these signatures match::(Mu:U \v: *%_) in sub infix:<==> at src/gen/m-CORE.setting:5323 in sub a at /tmp/mb4fwsdXIn:1 in block <unit> at /tmp/mb4fwsdXIn:1» | ||
lizmat | m: sub a($a) { say "foo" if $a == Inf }; a(*) | ||
camelia | rakudo-moar d3f71a: OUTPUT«foo» | ||
08:04
ribasushi joined
|
|||
jnthn | Ah, that way around | 08:05 | |
lizmat | yup :-) | 08:09 | |
nine | Well, we often use * to signify Inf, but does that mean that * _is_ actually Inf? | 08:11 | |
m: say *..0 | |||
camelia | rakudo-moar d3f71a: OUTPUT«-Inf..0» | ||
nine | It can also be -Inf | ||
s/be/mean/ | |||
lizmat | nine: it will only coerce Whatever:D: to Inf in Numeric "context" :-) | 08:12 | |
nine | Isn't semantically *..0 some sort of numeric thing as well, even if not technically? | 08:13 | |
FROGGS | Whatever can certainly mean different things, yes | ||
pink_mist | Inf|-Inf? | 08:16 | |
08:17
thou joined
|
|||
nine | FWIW I'm not actually against the change. Just poking around to see if we discover arguments. | 08:18 | |
jnthn | Maybe in 15 years somebody will pull it out in a lightning talk about Perl 6 oddnesses and everyone will lol :) | 08:19 | |
masak | no, whatever is not Inf | ||
that's just its most common desugaring | 08:20 | ||
nine | Maybe it's actually a good thing to be explicit about what Whatever means in each place. Even if that means having basically the same code spread around. | 08:21 | |
08:21
thou left
|
|||
lizmat | .oO( that's wet (not DRY) ) |
08:21 | |
jnthn | Yeah, but the software industry has got so obsessed with re-use it hurts us as much as helps us by now... | 08:22 | |
'cus re-use = use = dependency = coupling | 08:23 | ||
08:23
g6 left,
g4 left,
g6 joined
08:24
g4 joined
08:26
sftp joined
08:27
dakkar joined
08:29
ribasushi left
08:33
ribasushi joined
|
|||
lizmat | will look at the result of the * == Inf later today (or someone revert the commit if it is considered to be a WAT to happen) | 08:33 | |
08:33
duncan_dmg joined
|
|||
lizmat | meanwhile, sightseeing and commute& | 08:33 | |
08:35
patrickz joined
|
|||
masak | so the problem `Whatever.new == Inf` solves is that there's repeated checking of whatever and Inf in the core setting? | 08:37 | |
is that a problem that could alternatively be solved by introducing a convenience subroutine? something like, is_whatever_or_inf ? | |||
FROGGS | masak: well, also in your code where you have a param $limit which can either be Inf or Whatever | ||
08:38
telex left
|
|||
jnthn | In favor of the patch, it may help bring some API uniformity | 08:38 | |
masak | I don't feel strongly about what numeric value, if any, Whatever.new should have. | ||
jnthn | That is, in the built-in APIs we make * usable in place of Inf in many places | ||
08:38
telex joined
|
|||
jnthn | This would mean people get it "for free" | 08:38 | |
With the natural == Inf check they would otherwise write | 08:39 | ||
masak | I generally don't like making values more "special" by giving them weird numifications, boolifications, stringifications or definednesses. | ||
jnthn | masak: Yeah, I think that's my hold-up too...but Whatever is already quite special... ;) | ||
masak | yeah. | ||
I'm having an impulse to object, but this time it's "below the threshold" :) | 08:40 | ||
FROGGS | yeah, w/e :o) | ||
jnthn | Well, so far I've found my reason to keep it more credible than any of my reasons not to... :) | ||
masak | I guess the question we should be asking is "how do we want client/user code to look?", and then optimize for that. | ||
and that might well be `== Inf` | |||
FROGGS | masak: then I'd +1 for the patch | ||
masak | right. | ||
+0.98 :) | 08:41 | ||
FROGGS | fair enuff | ||
08:44
telex left,
telex joined
08:51
espadrine joined,
larion joined
08:52
espadrine left
08:53
espadrine joined,
cognominal joined,
espadrine left
08:54
espadrine joined
08:55
espadrine left,
espadrine joined
08:57
espadrine left
09:08
itz joined
|
|||
itz | mornin' | 09:08 | |
BooK | is there a difference between Inf and +Inf ? | 09:10 | |
cognominal | the sign? :) | 09:11 | |
itz | m: Inf eqv +Inf | ||
camelia | ( no output ) | ||
itz | m: say Inf eqv +Inf | 09:12 | |
camelia | rakudo-moar d3f71a: OUTPUT«True» | ||
cognominal | say Inf =:= +Inf | ||
m: say Inf =:= +Inf | |||
camelia | rakudo-moar d3f71a: OUTPUT«True» | ||
cognominal | according to wp, IEE 754 says there are 2 infinities | 09:13 | |
psch | m: say -Inf =:= Inf | 09:15 | |
camelia | rakudo-moar d3f71a: OUTPUT«False» | ||
mrf | =:= ? | ||
BooK | I just looked at lizmat's patch, and wondered about the cases when * might actually mean -Inf, like nine when he said *..0 | ||
cognominal | BooK, * means different things in different places | 09:16 | |
psch | mrf: object identity, like == on object in Java for example | ||
cognominal | that's its very purpose | ||
BooK | yes, but won't 'multi method Numeric(Whatever:D:) { Inf }' always turn it into Inf even when -Inf is what was meant? | 09:17 | |
mrf | psch: cheers | ||
FROGGS | m: say *..0.min | 09:18 | |
camelia | rakudo-moar d3f71a: OUTPUT«-Inf..0» | ||
FROGGS | m: say (*..0).min | ||
camelia | rakudo-moar d3f71a: OUTPUT«-Inf» | ||
FROGGS | BooK: the Whatever is usually already turned into -Inf before you call .Numeric on it | 09:19 | |
09:19
CIAvash joined
|
|||
FROGGS | BooK: like in my example because it is the left hand side | 09:19 | |
BooK | right, that's why jnthn said "you have to try quite hard to hit that code path" | 09:20 | |
FROGGS | aye | ||
09:20
aindilis joined
|
|||
masak | the only other place where I can think of a numeric value making sense for * is in @ary[*-2] | 09:23 | |
in that case, the numeric value is not Inf, but +@ary | |||
cognominal | BooK, if you do perl6 --target=ast -e '*..0', you see a - QAST::Op.new(call &infix:<..>) and you search that operator in the core | ||
09:24
dayangkun_ left,
dayangkun_ joined
09:25
domidumont left
|
|||
cognominal | BooK, and that's leads you the a Range.new multimethod github.com/rakudo/rakudo/blob/nom/...nge.pm#L20 | 09:26 | |
09:26
domidumont joined
|
|||
cognominal | so just like I said * becomes whatever that multimethod chooses it to be. | 09:27 | |
use the source, luke :) | 09:28 | ||
itz | does anyone have a (hopefully reasonably simple) explanation of how GLR has affected the behaviour of gather/take? | ||
or is it just the associated lists? | |||
09:28
dayangkun_ left
|
|||
cognominal | BooK, one does not need to to a --target=ast in that case, just to show you a tool to peek under the hood. | 09:29 | |
And if you find the dump too verbose and not specific enough, there is a patch for that : github.com/cognominal/nqp/commit/d...edc2985489 :) | 09:30 | ||
09:33
Ven left
|
|||
[Tux] | itz, IIRC gather/take is now default lazy | 09:41 | |
before GLR, «gather { ... take 0..Inf }» returned a lazy list, after GLR it returned a non-lazy Range, which changed not long after the GLR merge into a lazy range | 09:42 | ||
please core-folk correct me if I am wrong | |||
pre-GLR «gather { ... take 0..Inf }» → post-GLR «gather { ... take ((0 .. Inf).Slip); | 09:44 | ||
itz | m: say (gather { take 0..Inf}).is-lazy | 09:45 | |
camelia | rakudo-moar d3f71a: OUTPUT«False» | ||
itz | m: say (lazy gather { take 0..Inf}).is-lazy | ||
camelia | rakudo-moar d3f71a: OUTPUT«True» | ||
itz | pre-glr | 09:47 | |
> say (gather { take 0..Inf}).infinite | |||
False | |||
> say (lazy gather { take 0..Inf}).infinite | |||
False | |||
[Tux] | m: (gather {take 0..Inf}).perl.say | 09:48 | |
camelia | rakudo-moar d3f71a: OUTPUT«(0..Inf,).Seq» | ||
[Tux] | it is a .Seq now | ||
I just checked, it is still not lazy enough for my purpose | 09:49 | ||
psch | m: say (gather { .take for ^Inf }) | ||
camelia | rakudo-moar d3f71a: OUTPUT«(0 1 2 3 4 5 6 7 8 9 10 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 8…» | ||
psch | m: say (gather { .take for ^Inf }).is-lazy | ||
camelia | rakudo-moar d3f71a: OUTPUT«False» | ||
[Tux] | FROGGS? was it you who wanted to fix that? | ||
psch | "take 0..Inf" takes one lazy list | ||
but gather/take isn't lazy own its own | 09:50 | ||
[Tux] | $from..$to != ^$to :( | ||
FROGGS | [Tux]: unlikely, I dunno how | 09:51 | |
or where to start for that matter | |||
nine++ might be able to give a hint | |||
dalek | p: 4740820 | peschwa++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java: Clone VMHashInstance.storage before building an Iterator. Otherwise we get ConcurrentModificationException thrown when changing a Hash while iterating over it. |
09:52 | |
FROGGS | m: say (gather { take 0..Inf }) | 09:53 | |
camelia | rakudo-moar d3f71a: OUTPUT«(0..Inf)» | ||
[Tux] | Sep 09 18:47:29 <nine> |Tux|: in case you didn't see it. I do have a fix for your Inf problem | ||
FROGGS | psch++ | ||
dalek | kudo/nom: ed47bb4 | peschwa++ | tools/build/NQP_REVISION: Bump NQP_REVISION. This pulls the "clone VMHashInstance for VMIterInstance" fix for nqp-j, which gives us somewhere in the vicinity of 200 passing tests back. |
09:54 | |
09:56
travis-ci joined
|
|||
travis-ci | NQP build failed. Pepe Schwarz 'Clone VMHashInstance.storage before building an Iterator. | 09:56 | |
travis-ci.org/perl6/nqp/builds/80604088 github.com/perl6/nqp/compare/0c380...40820dddbb | |||
09:56
travis-ci left
|
|||
psch | aww | 09:56 | |
it worked locally :l | 09:57 | ||
ehh | |||
the js,moar failed | |||
i'm taking responsibility for that :P | |||
err | |||
*not* | |||
/home/travis/build/perl6/nqp/node_modules/nqp-runtime/deserialization.js:409 | 09:58 | ||
throw 'Unsupported serialization format version: ' + version; | |||
yeah that's not on me | |||
10:01
araujo joined
10:02
KDr2 left
|
|||
[Tux] | IIRC travis removed some META stuff | 10:03 | |
10:05
thou joined
10:09
thou left
10:10
rindolf joined
|
|||
psch | r: say Bag.new("a", "b", "c").roll # | 10:11 | |
camelia | rakudo-moar d3f71a: OUTPUT«c» | ||
..rakudo-jvm d3f71a: OUTPUT«Type check failed in binding @pairs; expected 'Positional' but got 'Seq' in block <unit> at /tmp/tmpfile:1» | |||
10:12
mprelude joined
|
|||
masak | ooh, a backend difference | 10:12 | |
m: say Seq ~~ Positional | |||
camelia | rakudo-moar d3f71a: OUTPUT«False» | ||
masak | r: say Seq ~~ Positional | ||
camelia | rakudo-{moar,jvm} d3f71a: OUTPUT«False» | 10:13 | |
FROGGS | the PositionalBindFailover still needs some love it seems | ||
psch | FROGGS: yeah, that sounds about right | ||
# expected: 'o 3 b 1 a 2 p 2' | 10:15 | ||
# got: 'o 3 b 1 p 2 a 2' | |||
grrr | |||
10:17
CIAvash left
|
|||
psch | r: my @list = <1 10 2 3>; say sort(-> $key {+$key}, @list) | 10:18 | |
camelia | rakudo-moar d3f71a: OUTPUT«(val("1") val("2") val("3") val("10"))» | ||
..rakudo-jvm d3f71a: OUTPUT«(val("1") val("10") val("2") val("3"))» | |||
FROGGS | errr | 10:19 | |
r: say 1 cmp 10 | |||
camelia | rakudo-{moar,jvm} d3f71a: OUTPUT«Less» | ||
psch | r: say <1> cmp <10> | ||
camelia | rakudo-{moar,jvm} d3f71a: OUTPUT«Less» | ||
psch | r: say val("1") cmp val("10") | ||
camelia | rakudo-{moar,jvm} d3f71a: OUTPUT«Less» | ||
FROGGS | r: say +<1> cmp +<10> | ||
camelia | rakudo-moar d3f71a: OUTPUT«Less» | ||
..rakudo-jvm d3f71a: OUTPUT«Same» | |||
FROGGS | :D | ||
psch | neat | ||
:D | |||
FROGGS | j: say +<10> | 10:20 | |
camelia | rakudo-jvm d3f71a: OUTPUT«10» | ||
FROGGS | j: say (+<10>).WHAT | ||
camelia | rakudo-jvm d3f71a: OUTPUT«(Int)» | ||
FROGGS | r: say +<1> == +<10> | ||
camelia | rakudo-jvm d3f71a: OUTPUT«True» | ||
..rakudo-moar d3f71a: OUTPUT«False» | |||
psch | wha | ||
10:20
ShimmerFairy joined
|
|||
FROGGS | how, what | 10:20 | |
arnsholt | WAT? | ||
r: say +<1>; say +<10> | 10:21 | ||
camelia | rakudo-jvm d3f71a: OUTPUT«101» | ||
..rakudo-moar d3f71a: OUTPUT«110» | |||
pink_mist | wat | ||
psch | uhh | ||
FROGGS | haha | ||
psch | i uhm | ||
wat | |||
FROGGS | wtf | ||
arnsholt | r: say +<1> | 10:22 | |
camelia | rakudo-{moar,jvm} d3f71a: OUTPUT«1» | ||
arnsholt | Looks like something weird going on in the JVM compilation when both of them are there | 10:23 | |
FROGGS | r: multi infix:<wtf>($a, $b) { "'$a' $a.^name() - '$b' $b.^name()" }; say +<1> wtf +<10> | ||
pink_mist | r: say +<3>; say +<10>; | ||
camelia | rakudo-jvm d3f71a: OUTPUT«'1' Int - '1' Int» | ||
..rakudo-moar d3f71a: OUTPUT«'1' Int - '10' Int» | |||
rakudo-moar d3f71a: OUTPUT«310» | |||
..rakudo-jvm d3f71a: OUTPUT«101» | |||
arnsholt | Something being done LIFO when it should be FIFO, perhaps | ||
m: say +<1>, +<2>, +<3> | |||
camelia | rakudo-moar ed47bb: OUTPUT«123» | ||
arnsholt | r: say +<1>, +<2>, +<3> | 10:24 | |
FROGGS | it does some caching it seems | ||
camelia | rakudo-jvm ed47bb: OUTPUT«333» | ||
..rakudo-moar ed47bb: OUTPUT«123» | |||
arnsholt | r: say +<1>; say +<2>; say +<3> | ||
camelia | rakudo-jvm ed47bb: OUTPUT«311» | ||
..rakudo-moar ed47bb: OUTPUT«123» | |||
FROGGS | maybe it messed up its string heap? | ||
arnsholt | Something weird going on with constants, yeah | ||
FROGGS | j: say +<1>; say +<2>; say +<3> | ||
camelia | rakudo-jvm ed47bb: OUTPUT«311» | ||
FROGGS | j: say +<1>; say +<2>; say +<3> | 10:25 | |
camelia | rakudo-jvm ed47bb: OUTPUT«311» | ||
FROGGS | hmmm | ||
psch | might be the getBI hack i guess | ||
although i wouldn't know how | |||
it's pretty terrible anyway, so if anyone has a better solution... :) | |||
FROGGS | getBI? | 10:27 | |
10:28
gensym joined
|
|||
nine | [Tux]: gather is not lazy by default. I gave changing that a try but the spec test fallout made me quickly forget that idea. | 10:28 | |
[Tux]: Writing lazy gather { ... } is an easy enough workaround | |||
psch | FROGGS: org.perl6.nqp.runtime.Ops.getBI | ||
FROGGS | psch: eeks! | ||
psch | FROGGS: ec6341f71b7164a38a367ee51d658187c2cf5833 | ||
[Tux] tries that | |||
itz | so, what if anything, has changed in gather/take behaviour post-GLR? | 10:29 | |
psch | but yeah, no idea if that's actually related, but that's what i had to do to get allomorphs running in the first place | ||
nine | psch: regarding the expected 'Positional' but got 'Seq', commits 9fdaf03b0a43e527f5a808f7a8eff68a18684be5 and 749b72e95f24ed75810666886c5c29efa47eec5a may be of interest | 10:32 | |
[Tux] | nine, gist.github.com/Tux/bcaaa0d9902b0993bf92 still takes forever. note that the result is taken as a slice index | 10:35 | |
psch | nine: yeah, FROGGS mentioned the PositionalBindFailover. it's apparently under implemented on jvm | ||
[Tux] leaves for customer-visit. bbl | |||
nine | psch: yes, teaching the dispatcher about PositionalBindFailover was one of the very last changes of the GLR | 10:36 | |
10:40
telex left
10:42
telex joined
10:43
Ven joined
|
|||
masak leaves for a train & | 10:43 | ||
Ven | bai masak | 10:44 | |
and \o, #perl6! | 10:45 | ||
10:50
espadrine_ joined
10:55
colomon joined
10:56
telex left
10:57
telex joined
|
|||
moritz | blogs.perl.org/users/ovid/2015/09/f...nt-1615534 # people asking random, unrelated Perl 6 questions in response to any Perl 6 content at all | 10:57 | |
oh, and OvidPerl++ | 10:58 | ||
10:58
sergot joined
|
|||
psch | r: use Test; my @data = ^10; my @tap; @data <== map {$_ + 1} <== @tap <== grep {$_ % 2} <== eager @data; is(@tap, <1 3 5 7 9>, '@tap contained what was expected at the time'); # this fails in S03-feeds/basic.t..? | 10:59 | |
camelia | rakudo-{moar,jvm} ed47bb: OUTPUT«ok 1 - @tap contained what was expected at the time» | ||
11:00
rurban left
|
|||
psch | ooh | 11:01 | |
duh | |||
r: use Test; my @data = <0 1 2 3 4 5 6 7 8 9>; my @tap; @data <== map {$_ + 1} <== @tap <== grep {$_ % 2} <== eager @data; is(@tap, <1 3 5 7 9>, '@tap contained what was expected at the time'); # *this* fails in S03-feeds/basic.t! | |||
camelia | rakudo-moar ed47bb: OUTPUT«ok 1 - @tap contained what was expected at the time» | ||
..rakudo-jvm ed47bb: OUTPUT«not ok 1 - @tap contained what was expected at the time# Failed test '@tap contained what was expected at the time'# at /tmp/tmpfile line 1# expected: '1 3 5 7 9'# got: ''» | |||
psch | which is probably the same allomorph wonkiness | ||
that's what i get for not actually copying and pasting the whole test :) | 11:02 | ||
11:02
Skarsnik joined
11:06
telex left
11:07
telex joined
|
|||
masak | OvidPerl: just a minor stylistic thing in blogs.perl.org/users/ovid/2015/09/f...erl-6.html | 11:30 | |
OvidPerl: I'd indent the heredoc further, so it doesn't stand out as statements. there's something pleasing about "continuation lines" being more indented than the start of statements, and the eye scans that more easily. | 11:31 | ||
OvidPerl: kudos for not doing qq:to/END/. I noticed. :) | 11:32 | ||
gfldex | r: say sprintf('%f %f %f %f %f', 1, Mu, Any, Nil, NaN); | ||
camelia | rakudo-moar ed47bb: OUTPUT«1.000000 0.000000 0.000000 0.000000 0.000000» | ||
..rakudo-jvm ed47bb: OUTPUT«java.lang.NumberFormatException: For input string: "nan"» | |||
masak | gfldex++ # whatever it is you're doing, it's interesting | ||
gfldex | i'm trying to hunt down a bug in tony-o/perl6-bench, what led me to ugexe/Perl6-Text--Table--Simple, what in turn led me to nqp::sprintf | 11:34 | |
masak | right. | ||
that's admirable. | |||
gfldex | nqp::sprintf seams not to like Seq much | ||
masak | gfldex: if Java thinks the input string "nan" cannot be numified, then Java is wrong, and should be wrapped with the right semantics. | 11:35 | |
gfldex | still hunting tho | ||
masak | gfldex: in any case, what you have above is rakudobuggable, definitely. | ||
11:36
espadrine_ is now known as espadrine
|
|||
gfldex | so NaN should numify to 0.0 instead of NaN? | 11:36 | |
masak | no, it should numify to NaN. | 11:38 | |
m: say +"NaN" | |||
camelia | rakudo-moar ed47bb: OUTPUT«NaN» | ||
masak | NaN, despite the name, is of type number. | ||
and if you numify a string with it, you get it. | 11:39 | ||
ditto Inf and -Inf. | |||
gfldex | so nqp::sprintf is double wrong twice. I shall rakudobug at once! | ||
masak | gfldex++ | 11:41 | |
11:44
telex left
11:45
telex joined
|
|||
timotimo | o/ | 11:45 | |
11:46
Ven left
|
|||
timotimo | confluence.jetbrains.com/display/K...e+builders - this reminds me of the discussion we've had about fluent interfaces and a "construct { }" block | 11:47 | |
masak: i think you were the one who suggested the construct block? | |||
11:48
yakudza joined
11:53
thou joined
|
|||
masak | timotimo: yes, it would make a cute macro. | 11:55 | |
11:55
pmurias joined
11:57
thou left
|
|||
FROGGS | awwww, such macro | 11:58 | |
12:00
cognominal left
12:05
telex left
12:06
telex joined
12:07
telex left
12:08
telex joined
|
|||
itz | hmmm DEPRECATED is being used by ecosystem modules which means the warning appears with text suggests internal deprecation | 12:13 | |
maybe there should be RAKUDO_DEPRECATED (or similar) for internal deprecations and DEPRECATED be repurposed for module author use? | 12:14 | ||
timotimo | japhb: i shall push the extra microbenchmarks | 12:15 | |
japhb: though i'm a little bit hesitant, as there's already so many and benchmarking already takes rather long | 12:16 | ||
japhb: also, the benchmarks have only a perl6 variant | |||
japhb: i thought it doesn't meet the criteria for inclusion | 12:24 | ||
12:25
Ven joined
12:26
pmurias left
12:28
FROGGS left
|
|||
Ulti | are there any examples of NativeCall with a CPP object anywhere? or is that not a thing | 12:34 | |
[Coke] | lizmat. +*==Inf is fine with me. | 12:37 | |
there are already tickets about sprintf'ing nan, btw. | 12:45 | ||
12:47
xinming_ left
12:49
pmurias joined,
xinming joined
|
|||
dalek | pan style="color: #395be5">perl6-examples: c29c3b4 | (Steve Mynott)++ | categories/99-problems/P17-topo.pl: [99probs] GLR fix P17-topo.pl |
13:02 | |
13:11
telex left,
hernanGOA joined,
telex joined
13:16
alpha-cent joined
|
|||
_sri | is Ovid correct here? blogs.perl.org/users/ovid/2015/09/f...nt-1615544 | 13:17 | |
is given really more perl6-ish than method chaining? | |||
pink_mist | . o O ( class Foo is Chaining ... ) | 13:18 | |
_sri | (yesterday folks around here seemed to agree sadly) | 13:19 | |
alpha-cent | What is a shortest one-liner for zipping~ lines from N files ( 1.txt, 2.txt, 3.txt, .... ) ? | ||
PerlJam | _sri: why sadly? | 13:20 | |
_sri | PerlJam: i love fluent interfaces, and can't stand the style he's using | 13:21 | |
it feels like trying to be different for the sake of it | 13:22 | ||
Ven | _sri: I'd agree | ||
given + .foo;.bar;.bar ... Looks like smalltalk :P | |||
_sri: well, I'd certainly prefer Employee.new(:name<foo>, :lastname<bar>), though. | |||
_sri | it's certainly not the best example, guess i'd use something more jQuery-ish | 13:23 | |
or mojolicious-ish ;p | 13:24 | ||
PerlJam | heh | ||
13:25
tokuhirom9 joined
|
|||
PerlJam | _sri: I think I'd say that tmtowtdi is alive and well in Perl 6, and that given v.s fluent is just a trade-off for whatever particular bit of awkwardness you're comfortable with. | 13:25 | |
(does "fluent" == "method chaining"? ) | 13:26 | ||
_sri | hah, you said given vs fluent ;p | ||
that's kinda what i would like to know, if given is really the perl6 version of fluent interfaces | 13:27 | ||
masak | I have the feeling that people are trying to cram fluent interfaces into Perl 6 somehow. and being disappointed when it doesn't fit so well. :) | ||
_sri | or rather, the preferred version | ||
masak | I could see them being used, mind. | ||
_sri | masak: it's easy enough with a trait, as Ovid has shown in the old version of the wikipedia entry | ||
masak | yes, but the thing is that Perl 6 doesn't really set attribute values like that, generally. | 13:28 | |
_sri | en.wikipedia.org/w/index.php?title...313#Perl_6 | ||
masak | it's Perl 5-think. | ||
we do it with `=` | |||
_sri | has NonEmptyString $.name is chainymutable; | ||
masak | and so giving an example with chained setters is misleading because it's by definition not very idiomatic Perl 6. | 13:29 | |
it's "trying to cram chained methods into Perl 6". | |||
13:30
khw joined
|
|||
_sri | to be fair, you don't do that much in ruby either | 13:30 | |
but they have a nice looking example anyway | |||
masak | ...if you like duck-punching :P | 13:31 | |
in Ruby, IIRC, methods return `self` by default? | |||
13:31
FROGGS joined
|
|||
masak | oh, no. that's not what's going on there. | 13:31 | |
PerlJam | no, a "string" is just a String. | 13:32 | |
masak | right. | ||
yeah, that is a nice example. | |||
we could copy that. :) | |||
but maybe do the .&foo thing instead of punching the duck | |||
yes, that's a good point. fluent interfaces and method chaining don't have to have anything to do with accessors/setters. | 13:34 | ||
Ven | masak: no, methods in ruby return their latest expression | 13:35 | |
13:37
cdc joined
|
|||
masak | yeah, I realized after looking at them for a while. | 13:39 | |
I was probably thinking of Smalltalk. | |||
cdc | _sri: A.foo(31).bar('sdf') has already a meaning in "bare" Perl 6. Using a trait to modify the current semantic will confuse people (or at least me). | 13:40 | |
Ven | masak: in smalltalk, you explicitly use ";" to chain methods to the last self | ||
13:41
skids joined,
thou joined
13:42
laouji left
13:43
andreoss joined
|
|||
masak | ok. | 13:43 | |
_sri | cdc: that's why you use an example like the ruby one | ||
masak | right. fluent interfaces don't have to be about setters. | 13:44 | |
13:45
duncan_dmg left
|
|||
cdc | I agree: it's not about setters, that's why I suggested yesterday to add .say in the "given" block. | 13:45 | |
13:46
thou left,
duncan_dmg joined
|
|||
masak | I agree that by the time you have a `given` block and individual statements inside, it's no longer a fluent interface. | 13:46 | |
PerlJam | As long as it's not an effluent interface, I think we're okay. ;) | 13:47 | |
masak | but it's an interesting idea to have a syntactic convenience to turn something into a fluent interface, like (apparently) Smalltalk. | 13:48 | |
that could also be a macro, I guess. | |||
Ven | masak: well, isn't given enough? | ||
masak | the methods could return anything, but you can still do $obj.foo.bar.baz | ||
Ven: I don't understand the question. conditional jumps are "enough". | |||
people like syntactic sugar. and much of the time they're right to do so. | 13:49 | ||
skids | Could a hyperop combiner be abused, e.g. using the same machanism as ».? | ||
moritz | .foo;.bar;.baz given $obj | ||
Ven | masak: I mean, instead of a macro | ||
masak | for me, most of the time, probably yes. | ||
but I feel the question is a little bit of "what use is a newborn baby?" | |||
andreoss | m: say (0.1 ** 103 == 0) | 13:50 | |
camelia | rakudo-moar ed47bb: OUTPUT«False» | ||
andreoss | m: say (0.0001 ** 100 == 0) | ||
camelia | rakudo-moar ed47bb: OUTPUT«True» | ||
Ven | also funny, OOC uses . to chain calls, as opposed to whitespace to do oo-style access. ie "str println()" calls the member function, "str .println() .free()" cascades | ||
13:54
rurban joined
14:02
cognominal joined
|
|||
dalek | c: 5d3eae7 | (Zoffix Znet)++ | lib/Language/5to6-perlop.pod: Fix unescaped ">" in C<> |
14:03 | |
Ven | m: my @a = gather for 1 { take |$_..Inf; }; say @a[^5]; | 14:04 | |
camelia | rakudo-moar ed47bb: OUTPUT«(1..Inf)» | ||
Ven | m: my @a = gather for 1 { take |$_..Inf; }; say @a[^5].perl | ||
camelia | rakudo-moar ed47bb: OUTPUT«(1..Inf,)» | ||
Ven | I can't `take |`? | ||
14:05
alpha-cent left
14:06
thou joined,
_mg_ left
|
|||
skids | Ven: precedence on |. But if you parenthesis $_..Inf it will hang. | 14:07 | |
Because the array assignment is eager. | |||
Ven | skids: Ha! even I get caught by this >.> | 14:08 | |
m: my @a = gather for 1 { take |($_..Inf); }; say @a[^5].perl | |||
grondilu | oh cool the YAPC::EU keynote video is online | ||
Ven | nope, that's not to rakudo's liking | ||
14:08
telex left
|
|||
grondilu | youtu.be/RvCkvXvqi3U | 14:08 | |
camelia | rakudo-moar ed47bb: OUTPUT«(timeout)» | ||
14:08
Loren joined
14:09
telex joined
|
|||
skids | $a = should work, but also hangs for some reason. | 14:09 | |
Loren | evening #perl6. | ||
14:10
FROGGS_ joined
|
|||
skids | Oh, I know why. | 14:10 | |
nope, nm. | |||
m: m: my $a = gather for 1 { take ($_..Inf).Slip; }; say $a[^5].perl # that way seems to work. | 14:12 | ||
camelia | rakudo-moar ed47bb: OUTPUT«(1, 2, 3, 4, 5)» | ||
moritz | the problem with take |($_..Inf) is that it tries to pass an infinitely long argument list to &take | ||
14:13
FROGGS left
|
|||
skids | Isn't | basically slip() ? | 14:14 | |
masak | trying to pass an infinitely long argument list sounds like a thing that ought to fail as early as possible. | 14:15 | |
skids | Or, is that what the mystery S07 line 159 means? | 14:16 | |
That | at the front of an arglist is special somehow... | |||
ugexe | FROGGS_: agreed on suggested file path change for CURLI | 14:17 | |
itz | is liz off travelling? | 14:18 | |
FROGGS_ | ugexe: cool! | ||
let's doit then :o) | |||
and also add install capabilities to CURLF | |||
and precomp, but more cache-like | 14:19 | ||
14:22
sftp left
|
|||
ugexe | precomp would still be a method of CU right? | 14:22 | |
nine | m: my @a = gather for 1 { take $_ for $_..Inf; } say @a[^5].perl; | 14:24 | |
camelia | rakudo-moar ed47bb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FZf4jjk7u0Strange text after block (missing semicolon or comma?)at /tmp/FZf4jjk7u0:1------> 3 = gather for 1 { take $_ for $_..Inf; }7⏏5 say @a[^5].perl; expecting any of: infix…» | ||
nine | m: my @a = gather for 1 { take $_ for $_..Inf; }; say @a[^5].perl; | ||
m: my @a = lazy gather for 1 { take $_ for $_..Inf; }; say @a[^5].perl; | |||
camelia | rakudo-moar ed47bb: OUTPUT«(timeout)» | ||
rakudo-moar ed47bb: OUTPUT«(1, 2, 3, 4, 5)» | |||
nine | m: my @a = lazy gather for 1 { take $_ for $_..Inf; }; say @a[^5].perl; | ||
camelia | rakudo-moar ed47bb: OUTPUT«(1, 2, 3, 4, 5)» | ||
FROGGS_ | ugexe: that makes sense, no? | 14:25 | |
nine | gather/take is already a mechanism to turn loops into iterators. Why not use it for the $_..Inf as well? | ||
Skarsnik | Hello there. I had a weirds issue with the XML module when usings the elements method, first one: When I use the SINGLE tag (supposed to stop at the first match and return a node), it always return a Bool. And sometime it fail for no reason, saying a type does not match what is expected (pastebin.com/EAzAM18D) | 14:26 | |
ugexe | FROGGS_: im just curious how cross compiling will work, since then CU could represent more than 2 files (say, the .pm6 source, and then the .moarvm and the .jar) | 14:34 | |
14:36
plicease joined
|
|||
FROGGS_ | ugexe: interesting aspect... | 14:36 | |
I'll think about it | |||
ugexe | it may also be worth thinking about CU that is just a precomp'd file and no source file (lizmat mentioned this a year ago or so) | 14:37 | |
14:37
carlin joined
14:41
araujo left
14:43
cgfbee joined
14:44
cfloare joined
|
|||
ugexe | the last thing in my notes is it seems a topological sort would need to be implemented somewhere so that files can be recompiled when updating rakudo | 14:45 | |
carlin | m: say now | 14:47 | |
camelia | rakudo-moar ed47bb: OUTPUT«Instant:1442414905.049917» | ||
carlin | why does stringify to including the word "Instant:" shouldn't it just be the stringification of the number, like now.Rat.Str? | 14:48 | |
moritz | well, it should be different from Rat.Str | ||
14:49
Loren left
14:51
tokuhiro_ joined
|
|||
dalek | ast: ce80412 | skids++ | integration/error-reporting.t: Add test for RT#113888 |
14:52 | |
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=113888 | ||
14:55
tokuhiro_ left
15:07
telex left
15:08
diana_olhovik_ left,
telex joined
|
|||
grondilu listened to Larry saying: "For instance, I wanted our compiler to be completely bootstrapped on full Perl6 code". | 15:11 | ||
^That's not possible, is it? Something like a Tarski theorem or something. | 15:12 | ||
pmurias | having a precompiled Rakudo + Perl 6 source code for Rakudo is enough | 15:14 | |
Ven | grondilu: why not? You just need the n-1 compiler | ||
or a compiled version of it (say, in JS) that you can compile | |||
s:2nd/compile/use/ | 15:15 | ||
grondilu | I mean I remember having watched a video on mathematical philosophy that dealt with this and I couldn't help relate to NQP being necessary to bootstrap Perl 6 | ||
pmurias | grondilu: NQP is just faster | ||
Ven | grondilu: well, what language is your C compiler written in? | 15:16 | |
ok, it's actually written in C++. the point still stands :P. | |||
TimToady | I know, we should just write the nqp compiler in Perl 6 | ||
cognominal | grondilu, to state that in biologic terms, ontogeny does not need to fully recapitulate phylogeny | ||
Ven | TimToady: isn't part of it in Perl6 (grammar) already? :P | 15:17 | |
grondilu | I can write a one-liner Perl6 compiler : EVAL slurp @ARGS | ||
TimToady | I would say that nqp's grammar is one of the places where nqp is pretty close to full Perl 6 | ||
BooK | This reminds of cranes. They say it takes one to build one. | 15:18 | |
itz | someone on another channel read S07-glr-draft.pod by mistake rather than S07, wondering whether to delete it | 15:21 | |
15:21
araujo joined,
araujo left
|
|||
PerlJam | didn't jnthn update S07 to match reality? If so, I'd say delete S07-glr-draft | 15:21 | |
TimToady | +1 | 15:22 | |
15:22
carlin left
|
|||
dalek | pan style="color: #395be5">perl6-examples: 954185f | paultcochrane++ | categories/99-problems/P09-topo.pl: [99probs] fix P09-topo post GLR |
15:23 | |
ecs: e80063c | (Steve Mynott)++ | S07-glr-draft.pod: delete S07-glr-draft.pod. OK on IRC |
15:25 | ||
15:26
tokuhirom9 left
|
|||
jnthn | (glr-draft) aye, JFDI | 15:29 | |
Oh, already did :) | |||
15:30
larion left
15:31
araujo joined,
araujo left
|
|||
pmurias | S07 has been updated? | 15:32 | |
PerlJam | about a week ago IIRC | ||
jnthn | pmurias: I started in on a re-write. Most of the user facing stuff is fleshed out. Iterator API and parallel iteration API to come. | 15:33 | |
15:33
renormalist joined
|
|||
jnthn | But for the stuff people will typically encounter using Perl 6, yes. | 15:33 | |
pmurias | great | 15:34 | |
jnthn | I'll get back to it soonish | 15:35 | |
But been a bit tied up with talks. | |||
dalek | osystem: c12405a | (Shoichi Kaji)++ | META.list: Add App::Mi6 |
15:36 | |
osystem: 27034b7 | ab5tract++ | META.list: Merge pull request #57 from shoichikaji/add-module Add App::Mi6 |
|||
15:37
Alina-malina left
|
|||
FROGGS_ | ugexe: a CU can also be constructed from memory, so there might be no file involved at all... | 15:40 | |
15:40
patrickz left,
Alina-malina joined
|
|||
FROGGS_ | ugexe: but I think we need to shell out anyway for the time being when precompiling things | 15:40 | |
ugexe: this also let's us easily precompile for several backends at once | 15:41 | ||
psch | #note "*cough* {c.perl} -> {$test(|c).perl}"; | 15:42 | |
FROGGS_ | hmm? | ||
arnsholt | r: my int @dims[2; 2] = (1,2;3,4); say @dims[1;1] # I wonder... | ||
camelia | ( no output ) | ||
..rakudo-moar ed47bb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmpfileShaped arrays not yet implemented. Sorry. at /tmp/tmpfile:1------> 3my int @dims[2; 2]7⏏5 = (1,2;3,4); say @dims[1;1] # I wonder. expecting any of: constraint» | |||
psch | FROGGS_: Any-iterable-methods.pm:306 | ||
psch feels less bad about having commited "if %*ENV<DEBUG_PLS>" once :P | |||
15:44
araujo joined,
araujo left,
araujo joined,
domidumont left
|
|||
colomon is trying to remember where he recently bumped into discussion about a package alleged to be great for visual graphing …. | 15:48 | ||
arnsholt | Just creating plots of data, you mean? | 15:50 | |
Might be ggplot for R? | |||
Or pandas for Python | 15:51 | ||
colomon | arnsholt: yeah, something like graphviz. Only I seem to recall this one was alleged to be better than graphviz. | 15:52 | |
15:53
telex left
15:54
telex joined
|
|||
colomon | err… so perhaps nothing at all like ggplot. :) | 15:54 | |
15:55
CQ2 left
15:56
abraxxa left
|
|||
dalek | rl6-roast-data: b4d2bcc | coke++ | / (9 files): today (automated commit) |
15:57 | |
15:58
zakharyas left
16:01
rurban left
16:13
domidumont joined
16:14
domidumont left
16:15
domidumont joined
16:16
telex left,
telex joined
16:20
TEttinger joined
16:27
spider-mario joined,
adu joined
16:36
Ven left,
mprelude left
|
|||
arnsholt | Oh, graphviz. No idea then, I'm afraid | 16:37 | |
psch | r: say %(a => 1, b => 2).pairs.grep: { True } | ||
camelia | rakudo-jvm ed47bb: OUTPUT«(b => 2 a => 1)» | ||
..rakudo-moar ed47bb: OUTPUT«(a => 1 b => 2)» | |||
psch | r: say grep { True }, %(a => 1, b => 2).pairs | ||
camelia | rakudo-moar ed47bb: OUTPUT«(a => 1 b => 2)» | ||
..rakudo-jvm ed47bb: OUTPUT«Type check failed in binding @values; expected 'Positional' but got 'Seq' in block <unit> at /tmp/tmpfile:1» | |||
psch | ...but sub grep calls @values.grep? :/ | ||
16:38
Sqirrel joined
|
|||
nine | psch: .pairs returns a Seq | 16:43 | |
psch: we never return lists unless absolutely necessary | |||
16:44
patrickz joined
|
|||
psch | nine: how does that help with the discrepancy between moar and jvm and the sub and method form? :s | 16:45 | |
the method form works on both, but sub only breaks on jvm | |||
16:46
frodwith joined
|
|||
nine | psch: It's sub grep's signature that refuses the Seq. The method form does not need binding, it just greps the Iterable | 16:48 | |
psch | nine: oh! that makes sense, actually. we already know the method can bind to the invocant, so we don't need the binder | 16:49 | |
nine | psch: in other words, Any.grep does not impose any type constraint on self, while sub grep expects a Positional as first argument | ||
pink_mist | why is there a difference between moar and jvm though? | 16:50 | |
psch | pink_mist: because the jvm Binder isn't correct | ||
pink_mist | ah | ||
16:53
hoelzro joined
|
|||
hoelzro | o/ #perl6 | 16:54 | |
hoelzro got k-lined =( | |||
FROGGS_ | o/ | 16:56 | |
16:56
FROGGS_ is now known as FROGGS
17:04
itz left
17:08
duncan_dmg left
|
|||
ugexe | FROGGS: yeah i have a distribution class i made that has the documented .content method for doing that from GitHub. it cheats and uses a temp file, but acts like an IO object so CURLI could install from it | 17:08 | |
[Coke] | moritz++ caching kinds. | 17:09 | |
ugexe | i understand what you are getting at though | ||
17:11
andreoss left
17:12
espadrine left
17:14
muraiki joined
17:16
perl6_newbee joined
17:17
dakkar left
17:20
telex left
|
|||
[Coke] | m: my @a=1,2,3;my $a=@a;for @a {.say};for $a {.say} | 17:20 | |
camelia | rakudo-moar ed47bb: OUTPUT«123[1 2 3]» | ||
17:20
telex joined
17:21
telex left
|
|||
[Coke] | (needed somethign I could paste into a FB thread. :) | 17:21 | |
17:22
telex joined
|
|||
psch | hrm, hack is at 140 load avg | 17:22 | |
nine | .tell [Tux] I tried bisecting your performance regression but could not find it. If anything, Rakudo seems to have become faster | 17:23 | |
yoleaux | nine: I'll pass your message to [Tux]. | ||
17:32
ambs joined
|
|||
[ptc] | m: [+] (True); [+] (True, False) | 17:33 | |
camelia | ( no output ) | ||
[ptc] | m: say [+] (True); say [+] (True, False) | ||
camelia | rakudo-moar ed47bb: OUTPUT«True1» | ||
[ptc] | m: say [+] (True,); say [+] (True, False) | ||
camelia | rakudo-moar ed47bb: OUTPUT«True1» | ||
timotimo | oh interessant | ||
it does not mummify like prefix + | |||
[ptc] | why does that happen? | ||
timotimo | check the one-parameter version of infix + | 17:34 | |
[Coke] | skids: can you explain the all() in github.com/perl6/roast/commit/ce80...b35608e9d4 ? | ||
timotimo | I'm using a phone right now, so i can't do it quickly | ||
skids | mummification is usually a slow chemical reaction between the embalming fliud and the skin. | ||
[Coke] | looks like it's supposed to have both "Str" and then something else, but that something else isn't in the error message I see. | ||
skids | [Coke]: other tests did that to test more than one rx// | 17:35 | |
print 'a'.WHAT | |||
m: print 'a'.WHAT | |||
camelia | rakudo-moar ed47bb: OUTPUT«Use of uninitialized value of type Str in string contextAny of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in block <unit> at /tmp/cCv1ik3juY:1» | ||
[ptc] | timotimo: do you mean to check the code in Rakudo? | ||
[Coke] | m: print "a".WHAT | ||
camelia | rakudo-moar ed47bb: OUTPUT«Use of uninitialized value of type Str in string contextAny of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in block <unit> at /tmp/cERsmz8Yvz:1» | ||
timotimo | yes | ||
[ptc] | ok, will do | ||
[Coke] | ah, I just don't have a new enough rakudo. nevermind. | 17:36 | |
skids | The second rx checks that the message mentions one of those methods. | ||
[Coke] also doesn't autoscroll to the bottom before sending something, whoops. :) | |||
skids | I was too busy to figure out <!before > or something to deal with looking for the '<element>' the RT was complaining about. | 17:37 | |
timotimo | it should call True.Numeric | ||
skids wishes pidgin would do better at resuming autoscroll. | 17:38 | ||
timotimo | i cannot give you a link to the line ouor tell you the line... because mobile version of github | ||
[ptc] | timotimo: no worries, I'm trying to git grep the best I can :-) | 17:39 | |
timotimo | m: say True.Numeric | ||
camelia | rakudo-moar ed47bb: OUTPUT«1» | ||
timotimo | it is in numeric.pm | ||
capital n | |||
[ptc] | wow, you're good!!! | ||
[ptc] puts on impressed look | |||
timotimo | haha | ||
it's just experience | 17:40 | ||
but why does it not call the one argument version fifor the one element list? | |||
m: say [+](True) | |||
camelia | rakudo-moar ed47bb: OUTPUT«True» | ||
timotimo | er | 17:41 | |
m: &[+](True) | |||
camelia | ( no output ) | ||
timotimo | damn it | ||
m: say &[+](True) | |||
camelia | rakudo-moar ed47bb: OUTPUT«1» | ||
[ptc] | m: [-](True) | 17:42 | |
camelia | ( no output ) | ||
[ptc] | m: say [-](True) | ||
camelia | rakudo-moar ed47bb: OUTPUT«True» | ||
[ptc] | m: say [-](False) | ||
camelia | rakudo-moar ed47bb: OUTPUT«False» | ||
[ptc] | maybe there isn't a one argument version? | ||
everything looks ok/consistent in Numeric.pm | |||
[Coke] | lots of "make test" failures on OS X: gist.github.com/coke/58515c044cd59c6e454d | 17:43 | |
grondilu | wow this actually works: | ||
[Coke] | all nativecall related. | ||
grondilu | m: say [Z+] (1, 2), (3, 4); | ||
camelia | rakudo-moar ed47bb: OUTPUT«(4 6)» | ||
timotimo | of course it works | ||
TimToady | ENODALEK | ||
[ptc] | can't exterminate? | 17:44 | |
[Coke] stares at grondilu's send. | |||
grondilu | on the other hand I thought I could use that to do parallel sum, but I realize Z is not parallel. I'd need to use « » | 17:45 | |
[ptc] | m: say [+^] (True); say [+^] (True, False) | ||
camelia | rakudo-moar ed47bb: OUTPUT«True1» | ||
[ptc] | timotimo: there doesn't seem to be a single-arg version of infix:+ | 17:46 | |
timotimo | [pi saw it | ||
FROGGS | m: class Foo { ... }; class Bar does Foo { }; role Foo { } # was that reported already? | ||
camelia | rakudo-moar ed47bb: OUTPUT«Unhandled exception: Method 'item' not found for invocant of class 'Foo' at <unknown>:1 (/home/camelia/rakudo-inst-1/share/perl6/runtime/CORE.setting.moarvm:print_exception:4294967295) from gen/moar/m-CORE.setting:17208 (/home/camelia/rakudo-inst…» | ||
timotimo | it's the one that also handles the 0 arg case | ||
skids | m: +().say | 17:47 | |
camelia | rakudo-moar ed47bb: OUTPUT«WARNINGS:Useless use of "+" in expression "+().say" in sink context (line 1)()» | ||
[ptc] | do you mean this: multi sub infix:<+>($x = 0) { $x.Numeric } | ||
skids | m: (+()).say | ||
camelia | rakudo-moar ed47bb: OUTPUT«0» | ||
skids | Most operators with identity build off that. | ||
[ptc] | but that only handles the case where the input is zero, or am I misunderstanding the code? | ||
17:47
telex left
|
|||
TimToady | skids: that's just calling ().Numeric | 17:48 | |
skids | [ptc]: no that's a default value. | ||
17:48
telex joined
|
|||
grondilu | m: say [»+«] (1, 2), (3, 4); | 17:48 | |
camelia | rakudo-moar ed47bb: OUTPUT«(4 6)» | ||
[ptc] | skids: ah, ok | ||
grondilu | m: say [»+«] (^1024).rotor(4); | ||
camelia | rakudo-moar ed47bb: OUTPUT«(130560 130816 131072 131328)» | ||
grondilu | m: say [+] [»+«] (^1024).rotor(4); | ||
camelia | rakudo-moar ed47bb: OUTPUT«523776» | ||
[ptc] | skids: yes, of course. Wasn't thinking of it as a default value... | ||
grondilu | m: say [+] ^1024 | ||
camelia | rakudo-moar ed47bb: OUTPUT«523776» | ||
grondilu | m: say [+] [»+«] (rand xx 1024).rotor(4); say now - INIT now; | 17:49 | |
camelia | rakudo-moar ed47bb: OUTPUT«521.3564795733310.2698897» | ||
grondilu | m: say [+] ^1024; say now - INIT now | ||
camelia | rakudo-moar ed47bb: OUTPUT«5237760.0047310» | ||
grondilu | m: say [+] [»+«] (rand xx 1024*32).rotor(4); say now - INIT now; | 17:50 | |
camelia | rakudo-moar ed47bb: OUTPUT«16374.31258179257.5548696» | ||
grondilu | m: say [+] ^(1024*32); say now - INIT now | ||
camelia | rakudo-moar ed47bb: OUTPUT«5368545280.04957762» | ||
grondilu forgot to use rand | 17:51 | ||
m: say [+] rand xx (1024*32); say now - INIT now | |||
camelia | rakudo-moar ed47bb: OUTPUT«16397.07182462230.2615754» | ||
grondilu | m: say [+] [»+«] (rand xx 1024*400).rotor(4); say now - INIT now; | 17:52 | |
camelia | rakudo-moar ed47bb: OUTPUT«(timeout)» | ||
grondilu | m: say [+] rand xx (1024*400); say now - INIT now | 17:53 | |
camelia | rakudo-moar ed47bb: OUTPUT«204682.287403123.09294368» | ||
17:53
YuviPanda is now known as Jiimmmmyyy
|
|||
[ptc] | m: True.Numeric | 17:53 | |
camelia | ( no output ) | ||
[ptc] | m: say True.Numeric | ||
camelia | rakudo-moar ed47bb: OUTPUT«1» | ||
17:53
telex left
17:54
telex joined
|
|||
[ptc] | m: say +True | 17:55 | |
camelia | rakudo-moar ed47bb: OUTPUT«1» | ||
[ptc] | m: say [+]True | ||
camelia | rakudo-moar ed47bb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ScL2pTLP6QTwo terms in a rowat /tmp/ScL2pTLP6Q:1------> 3say [+]7⏏5True expecting any of: infix infix stopper postfix statement end stateme…» | ||
[ptc] | m: say [+](True) | ||
camelia | rakudo-moar ed47bb: OUTPUT«True» | ||
[ptc] | is that a rakudobug, or is that just plain PEBKAC? | 17:56 | |
TimToady | neither, I think | ||
17:56
sufrostico joined
|
|||
TimToady | see S03:4637 | 17:57 | |
nine | How many lines should $io.lines return for a file containing exactly "foo\n"? | ||
[ptc] looks | 17:59 | ||
TimToady | nine: why would it be anything other than 1? | 18:01 | |
nine | TimToady: because then we could keep Rakudo's current implementation ;) Seems like it's always been 2 | 18:02 | |
[ptc] | hrm, ok just as spec-ed. | ||
TimToady | 2 would be wrong | ||
nine | I first thought it's a regression from jnthn's performance work, but it behaved just the same previously. | ||
TimToady | nine: did you see this bug: | ||
m: for $[1,2,3] { .say }; .say for $[1,2,3] | |||
camelia | rakudo-moar ed47bb: OUTPUT«[1 2 3]123» | ||
TimToady | we currently have two tests failing because of that one | 18:03 | |
nine | TimToady: yes, that's the next issue on my list | ||
TimToady | in a related issue, I just checked in a new slurpy that does one-arg | ||
nine | Oh nice! | 18:04 | |
TimToady | m: sub foo (+@args) { say @args.elems }; foo [1..4]; foo [1..4],2 | ||
camelia | rakudo-moar ed47bb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/oxfEcA7C5nMalformed parameterat /tmp/oxfEcA7C5n:1------> 3sub foo (7⏏5+@args) { say @args.elems }; foo [1..4]; expecting any of: formal parameter» | ||
18:04
Jiimmmmyyy is now known as yuvipanda
|
|||
TimToady | that should work in a few minutes | 18:04 | |
nine | So it's not |@args after all | ||
TimToady | no, I decided solutions with | or \ looked too confusing | ||
and this also gives us +args for the raw form | |||
there's no tests yet for the +slurpy, so if anyone wants to write some...me, I've gotta try to get my old car smogged again... | 18:09 | ||
18:10
rurban joined
|
|||
TimToady | I think there's still a small bug in my +slurpy implementation, insofar as a one-arg range ends up getting flattened | 18:14 | |
but it's enough to start playing with | |||
afk & | 18:15 | ||
18:21
perl6_newbee left
18:23
sufrostico left
18:32
lichtkind joined
18:38
dha joined,
dha left
18:39
dha joined
18:44
tping joined
|
|||
moritz | any ideas why hack keeps hanging up again? :( | 18:49 | |
muraiki | hi all. I'm experiencing a strange problem where an IO::Notification.watch-path supply is using a huge amount of CPU even with no events occurring: gist.github.com/muraiki/24c7dac46733b58abcfb | ||
if I remove the .unique line, it works without a problem | |||
[Coke] | moritz: my open irssi session seems very responsive... that's about it, though. | 18:50 | |
18:50
telex left
18:51
telex joined
|
|||
moritz | the last nagios alert said load average: 32.54 | 18:52 | |
[ptc] | moritz: hope that's not the perl6-examples going haywire again | ||
dha | so. Has C<with>/C<without> changed from the way it's described in specs/S04 ? Or can I just swipe that wholesale for the docs? | 18:53 | |
[ptc] | hrm, ssh to hack is taking ages... | 18:54 | |
moritz | [ptc]: did you add ulimits? | ||
[ptc] | moritz: I thought you did... | ||
moritz | dha: I don't think it changed | ||
[Coke] | I'm ON hack, and opening a new screen shell isn't happening. | ||
dha | Cool. | ||
18:54
sufrostico joined
|
|||
moritz | dha: fwiw I think a better way to get review would be to open pull requests | 18:54 | |
18:55
adu left
|
|||
[Coke] | I could probably kill my other chat thing, maybe that will get me a working shell... | 18:55 | |
moritz | that's our code (and doc) review service of choice | ||
18:55
sufrostico left
|
|||
moritz | [Coke]: unlikely | 18:55 | |
[ptc] | moritz++ | ||
muraiki | I feel like I've not experienced the problem I mentioned in pre-glr moar. and it also results in a server become pretty much unresponsive for a decent period of time | ||
dha | moritz - ok. So noted. | ||
[Coke] | moritz: ah, tht window is frozen. it's just irssi that's behaving nicely. :) | ||
moritz | [Coke]: time to reboot hack? :/ | 18:56 | |
[ptc] | is the load higher than 32 in nagios now? | ||
... it's just that if it's still answering to nagios requests, then it might recover | 18:57 | ||
moritz | [ptc]: I haven't got another mail from nagios since the first one | ||
(and no access to the web interface, I think) | |||
[ptc] | ah, ok | 18:58 | |
moritz powercycles it | |||
18:59
sufrostico joined,
sufrostico left,
sergot left,
dalek joined,
ChanServ sets mode: +v dalek,
telex left
19:00
telex joined,
telex left
19:02
psch joined,
telex joined
|
|||
psch | fwiw, the highest load i saw on hack (before i went for a walk about 25 minutes ago) was around 470 | 19:02 | |
_itz | it might be worth enabling sar(1) accounting in order to display historic load etc from the command line | 19:04 | |
[ptc] | moritz: the ulimits were still in force on the perl6-examples update-and-sync script. Hence it probably wasn't that. Nevertheless, I'll start a new build of the examples and see if things start to go wobbly | 19:05 | |
_itz: also not a bad idea | |||
dalek | c: 9be03d2 | (David H. Adler)++ | lib/Language/variables.pod: Changed code example for C<state> and tweaked related language |
||
_itz | www.leonardoborda.com/blog/how-to-c...ntudebian/ | 19:06 | |
I would probably ignore step 3 in that | |||
dalek | kudo/nom: 9fb93a9 | (Stefan Seifert)++ | src/core/IO/Handle.pm: Fix lines() returning an empty line at EOF IO::Handle::lines now behaves exactly like Perl 5's: lines on a file containing "" will return 0 lines. lines on a file containing "\n" will return one line containing "". lines on a file containing "foo" will return one line containing "foo". lines on a file containing "foo\n" will return one line containing "foo". lines on a file containing "foo\nbar" will return two lines. With .chomp set to False on the handle the behavior is the same except for the \n still there if it was in the input file. |
||
nine | This ^^^ fixes the t/spec/S32-io/pipe.t regression. | 19:07 | |
Sadly it also costs quite a bit of performance :/ | |||
timotimo | damn :( | ||
_itz | [ptc]: one of the examples seemed to hang post glr .. I forget details | 19:08 | |
maybe *060* something | |||
nine | Of course if 3 nqp ops per line is a noticable slow down for you, you can't be doing that much with those lines anyway... | ||
dalek | ar: 3051d54 | (Steve Mynott)++ | docs/cheatsheet.txt: parcel is now list and keep comma |
19:09 | |
ar: 0304600 | lizmat++ | docs/cheatsheet.txt: Merge pull request #49 from stmuk/master parcel is now list and keep comma |
|||
19:09
lizmat joined,
[Coke] joined
|
|||
timotimo | hehe | 19:09 | |
19:10
rurban left,
rurban joined
|
|||
[ptc] | _itz: yes, there are many which aren't yet working again | 19:11 | |
_itz: I'm having a hard time working out what the correct array/list syntax should be so that things wokr again | |||
lizmat waves from home | |||
really | |||
[ptc] | *work | ||
o/ | |||
_itz | [ptc]: yes its not easy :/ | ||
lizmat | [ptc] o/ | ||
moritz | _itz: the problem with sar and all the other tools that record to disc is that they typically stop recording when the system becomes unresponsive | 19:12 | |
_itz: as happens with collectd, for example (collect.p6c.org/) | |||
[Coke] | only 231 views on larry's christmas q&a. Share and Enjoy! ;) | ||
_itz | moritz: this is true .. but sar is lightweight and can give insight when compared against cron logs etc | ||
moritz | _itz: I'll give it a try | 19:13 | |
dalek | c: c2fd7e7 | (David H. Adler)++ | lib/Language/regexes.pod: Added language to specify the default values for C<:c> |
19:14 | |
doc: a5cc58c | (David H. Adler)++ | WANTED: | |||
doc: Added C<srand> and C<state> to WANTED | |||
19:14
dalek left,
dalek joined,
ChanServ sets mode: +v dalek
|
|||
_itz votes up on www.reddit.com/r/perl6/ | 19:16 | ||
bartolin | there even is a atop log on hack (which can be replayed with 'atop -r /var/log/atop/atop_20150916'). unfortunately it doesn't have any data after 16:50. Last entry in /var/log/syslog is from 16:58:01. | 19:17 | |
dha | So. unless and else/elsif are =head3 under if's =head 2. Should with/without get a =head2 or be a =head3 under if as well? | ||
19:18
rurban left,
rindolf left
19:19
Util joined
|
|||
[ptc] | Util: did you get my email wrt the parrot.org certifcate? | 19:20 | |
Util | [ptc]: checking... | 19:21 | |
moritz | bartolin, _itz: fwiw I'm keeping a htop running on a console, and hope that I can still connnect to that via virt-manager when it freezes the next time | ||
[ptc] | I sent it at the end of August. Just wondering if I used the correct address | ||
19:22
domidumont left,
kanishka joined
|
|||
bartolin | moritz++ | 19:23 | |
_itz | can someone do "# adduser stmuk adm" which should just me read access to most of /var/log by adding me to adm group please? | 19:24 | |
Util | [ptc]: It is the correct address; I think that it just came while I was in the hospital. | ||
bartolin | moritz: looks like there is not a single file on hack which was last modified between 17 and 18:55 CEST. | ||
[ptc] | Util: oh, ok. Hope you're feeling better now! | ||
Util | [ptc]: I will handle it. Thanks for routing it to me, and for the extra reminder. | ||
[ptc] | Util: no probs! Thanks for handling it :-) | 19:25 | |
bartolin | moritz: that makes me think that the disk was completely unavailable | ||
Util | [ptc]: Not 100% yet. Part 2 is Friday morning, but I expect nothing more than another week of discomfort, then Look Out World! | 19:26 | |
[ptc] | Util: :-) | 19:27 | |
dalek | kudo/nom: 197fbbf | (Stefan Seifert)++ | src/Perl6/Actions.nqp: Allow for itemization to prevent iteration for statement modfier for foo() for $@arr; will now iterate only once, just like for $@arr { foo() } Fixes t/spec/S04-statement-modifiers/for.t |
19:31 | |
ast: d72abe5 | (Stefan Seifert)++ | S06-signature/passing-arrays.t: Need to un-itemize the passed list for for to iterate |
|||
ast: 143a705 | (Stefan Seifert)++ | S32-list/squish.t: Remove obsolete todo markers |
|||
nine | We're now spec test clean :) | ||
19:31
telex left
|
|||
bartolin | \o/ nine++ | 19:32 | |
[ptc] | nine++ | ||
19:32
telex joined
|
|||
sjn | nine++ | 19:33 | |
19:35
thou left
|
|||
lizmat | nine: re 9fb93a9128e45ef227343816dc , I looked at doing that way as well, but decided against that | 19:37 | |
I feel the problem is *really* with nqp::eoffh | |||
nine | lizmat: I concur | ||
lizmat | this solution is fine ad interim, but it slows .lines down with ~ 15% | 19:38 | |
19:38
thou joined
|
|||
FROGGS | lizmat: btw, the old .get did something very similar | 19:38 | |
nine | lizmat: I had a look at MoarVM source code for readlinefh, but got lost in the layers of abstraction | ||
FROGGS | though, if we can update the ops, that'd be awesome | 19:39 | |
lizmat | ok, so we all agree this is a temp solution... :-) then I'm fine with it (for now :-) | ||
nine | lizmat: though I have to repeat: if the 3 additional nqp ops have a measurable performance impact, you cannot be doing all that much with those .lines | 19:40 | |
FROGGS | problem is that you only will know that you hit the EOF when you tried to read past it... | ||
that's a problem we won't solve | |||
dha | pull request filed for with/without. | 19:41 | |
FROGGS | can't we do something else then 'nqp::not_i(nqp::chars(line))' ?, like nqp::isnull_s(line) or some such? | ||
TimToady | m: sub foo (+@args) { say @args.elems }; foo [1..4]; foo [1..4],2 | 19:42 | |
camelia | rakudo-moar 9fb93a: OUTPUT«42» | ||
FROGGS | I mean, we don't want to know how many chars are in there | ||
[Coke] | reminder to everyone who did stuff in the past -two- months, release tomorrow, update the changelog! | ||
nine | FROGGS: it's what we do in Str.Bool. If we find something better, we should use it there, too | ||
FROGGS | ohh | ||
interesting | |||
[Coke]: aye captain | |||
[Coke] | That's Mr. Dr. Captain, to you. | 19:43 | |
FROGGS | [Coke]: :P | ||
[Coke]: at what time (offset to now) are you probably start cutting the release? | |||
nine | TimToady: have you had a look at the gmr branch lately? I'd like to talk about merging :) | 19:44 | |
19:44
diana_olhovik_ joined
|
|||
bartolin | moritz: what do you think about configuring a basic remote logging mechanism for hack? like: a copy of all log messages from hack are duplicated and sent to www.p6c.org (e.g.) and are written to /var/log/hack.p6c.org/ there? | 19:46 | |
moritz: that shouldn't be too hard and could give some insights ... | 19:47 | ||
s/are duplicated and/is/ | 19:48 | ||
dha | A thought: instead of documenting LABELs in the docs for each loop construct, put a section on labels between docs for loop constructs and flow control statements. | 19:49 | |
[Coke] | FROGGS: more than 24 hours from now. | ||
FROGGS | [Coke]: very good | ||
[Coke] | it will probably take up my evening tomorrow. | ||
psch | dha: i think =head3 for with{,out} works better - it's still just a special case, not a new construct | ||
dha | psch - me too. Thanks. | 19:50 | |
psch | oh, but that was already PR'd :) | ||
TimToady | nine: I'm okay with gmr, esp if it gets us closer to using real object arrays for sets, etc. | ||
dha | Right, I did it that way, but put a comment in the PR so people would notice it and weigh in. Well done! :-) | 19:51 | |
lizmat | TimToady: you would rather see Sets use an array underneath ? | ||
TimToady | s/arrays/hashes/ I meant | 19:52 | |
FROGGS | m: say "".split: "" | ||
camelia | rakudo-moar 9fb93a: OUTPUT«()» | ||
FROGGS | star-m: say "".split: "" | ||
camelia | star-m 2015.03: OUTPUT«Nil» | ||
lizmat | TimToady: *phew* :-) | ||
TimToady I don't think gmr will get us closer to that: we would need object hash support in the VM to be able to do that | 19:53 | ||
nine | Anyone else seeing occasional "*** Error in `/data/home/nine/install/rakudo/install/bin/moar': double free or corruption (!prev): 0x00007f67d4031a90 ***" during spec test runs? | 19:54 | |
FROGGS | not since the last moarvm patches | ||
nine | I'm on MoarVM master and nqp master from mere minutes ago | 19:55 | |
19:55
vendethiel joined
|
|||
lizmat | nine: going to run a spectest in a mo | 19:55 | |
nine | lizmat: I seem to be seeing them about once in 3 spec test runs | 19:56 | |
[ptc] | moritz: looks like the docs and examples builds didn't kill hack. | ||
TimToady | m: sub foo (+@args) { say @args.perl }; foo (1..4); foo (1..4),2 | 19:57 | |
camelia | rakudo-moar 197fbb: OUTPUT«[1, 2, 3, 4][1..4, 2]» | ||
TimToady | there's the bug I mentioned, shouldn't flatten that first onearg | 19:58 | |
19:58
tokuhiro_ joined
|
|||
nine | TimToady: why not? It's an Iterable | 19:58 | |
[Coke] | nine; you could grep through the previous log/ commits on coke/perl6-roast-data to see. | 19:59 | |
TimToady | m: sub foo (+@args) { say @args.perl }; foo (1..*); foo (1..*),2 | 20:00 | |
camelia | rakudo-moar 197fbb: OUTPUT«(timeout)» | ||
TimToady | m: sub foo (+@args) { say @args.perl }; foo (1..*),2 | ||
camelia | rakudo-moar 197fbb: OUTPUT«[1..Inf, 2]» | ||
TimToady | a slurpy should handle an infinite list | 20:01 | |
20:01
rindolf joined
20:02
tokuhiro_ left
|
|||
nine | Ah infinity... I'm a plumber, but what I plumb is the fruit of infinity. I'm deeper than infinity, so infinite I make infinity look like a four. | 20:03 | |
dalek | kudo/nom: 0d8da86 | FROGGS++ | docs/ChangeLog: add my changes to the changelog |
20:04 | |
20:05
Sgeo joined
|
|||
dha | Pull request for LINEs added. | 20:06 | |
jdv79 | nine: what | ||
FROGGS | nine is just a four letter word | 20:07 | |
nine | jdv79: obviously you are not familiar with Horse the Band :) | ||
jdv79 | nope | ||
dha | Me neither. | ||
lizmat | nine: I just see a failure in t/spec/S06-signature/passing-arrays.t (repeatble) | ||
not ok 4 - count2((1,2,3)) ( expected 3, got 1) | 20:08 | ||
nine | lizmat: I fixed that? | ||
lizmat | ah... oops | ||
nine | lizmat: roast commit 143a7057c6630a1a893e731f591db819823d3209 | ||
lizmat | i had some changes in spec that blocked the spectest update | 20:09 | |
20:11
colomon left
20:13
telex left
20:14
telex joined
20:19
AlexDaniel joined
20:24
darutoko left
|
|||
timotimo | FROGGS: i suggest "calling methods" rather than "calling method" | 20:31 | |
dha | Hm. Anyone have a concise example using C<redo> off the top of their heads? | ||
FROGGS | timotimo: now it sounds less russian :D | 20:32 | |
20:32
colomon joined
|
|||
FROGGS | dha: I've never used it | 20:32 | |
jdv79 | ditto | ||
dha | Me neither. But it needs to be documented. :-) | ||
FROGGS | hehe | ||
jdv79 | maybe just steal from p5's docs and adjust when/if needed? | 20:33 | |
dha | Fortunately, I can take the description from perl 5, as it hasn't changed. But I was trying to come up with a simple example that didn't involve reading a file. | ||
dalek | kudo/nom: 3c0cd8a | FROGGS++ | docs/ChangeLog: fix grammar-o in changelog, timotimo++ |
||
jdv79 | ha | ||
dha | which is what the p5 example does. | ||
I can't wait until later when the NY.pm meeting happens and people can tell me how much Perl 6 sucks. THAT'LL be fun. | 20:34 | ||
jdv79 | make sure to get the real whys | 20:35 | |
if any. may be useful. | |||
dha | Oh, In intend to. | ||
dha even has a pen and a notebook with him. | |||
timotimo | will one notebook suffice? | 20:36 | |
dha | It's a so far unused notebook. | 20:37 | |
240 pages. It's a start. | |||
Hm. I think the p5 example for redo is confusing. That will not help. | 20:40 | ||
jdv79 | my naive guess is that redo is not particularly useful/applicable | 20:41 | |
dha | Shall I put that in the docs? :-) | 20:42 | |
psch | m: my $x; for ^2 { unless $x { $x = 2; redo }; $x *= $x }; say $x # intended as a "we want to loop now, but restart if we haven't initialized" kind of example... | ||
camelia | rakudo-moar 0d8da8: OUTPUT«16» | ||
dha | "Eh. don't bother." | ||
jdv79 | probably not | ||
20:42
kaare_ left
|
|||
psch | redo seems like a very TIMTOWTDI op | 20:42 | |
(not sure if the 3rd T is conventional :P ) | 20:43 | ||
skids | dha: you could use a bit of humor and make a "redo" that's cheating at a game by redrawing cards when it gets one it does not like. | ||
dha | skids - I like the idea, but I don't think it qualifies as "concise" | 20:44 | |
psch | as in, conventional code just checks first in a case like i made up if everything is set up properly, instead of looping already and restarting when it doesn't like the current state | ||
20:44
rindolf left
|
|||
psch | m: my $x; #`[[ ... stuff ... ]]; unless $x { $x = 2 }; for ^2 { $x *= $x }; say $x # same example redo-less | 20:45 | |
camelia | rakudo-moar 0d8da8: OUTPUT«16» | ||
psch | well, except for the inline comment :) | ||
dha | psch - hm. Maybe. Takes a bit of thought, but it might do. | ||
20:45
telex left
|
|||
psch | dha: yeah, redo seems very foresight-y, fwiw | 20:46 | |
20:46
telex joined
|
|||
psch | as in, it's something that we have done differently for ages, but maybe this way makes more sense in the future | 20:46 | |
skids | m: my @deck; for (^5) { $draw = <j q k a joker>.pick; redo if $draw eq joker; @deck[$_] = $draw }; @deck.say; | ||
camelia | rakudo-moar 0d8da8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/94OKBxl1VEVariable '$draw' is not declaredat /tmp/94OKBxl1VE:1------> 3my @deck; for (^5) { 7⏏5$draw = <j q k a joker>.pick; redo if $d» | ||
skids | m: my @deck; for (^5) { my $draw = <j q k a joker>.pick; redo if $draw eq joker; @deck[$_] = $draw }; @deck.say; | ||
camelia | rakudo-moar 0d8da8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/bDEAVcOmbXUndeclared routine: joker used at line 1» | ||
skids | ah anyway. | ||
20:47
telex left
|
|||
psch | m: my @deck; for (^5) { my $draw = <j q k a joker>.pick; redo if $draw eq 'joker'; @deck[$_] = $draw }; @deck.say; | 20:47 | |
camelia | rakudo-moar 0d8da8: OUTPUT«[q j a a j]» | ||
20:48
Peter_R joined,
telex joined
|
|||
dha | do we have a pastebot? | 20:50 | |
20:51
zacts joined
|
|||
timotimo | what does "pastebot" mean? | 20:52 | |
mst | is there a conversation going on about redo in here? | ||
all the help channels I'm in are getting spammed with questions about it at once | |||
timotimo | some place you can paste to that'll automatically put the url to the paste in the channel? | ||
skids | We already redid it. | ||
mst | dha: no, but is soembody +o's themselves and runs /invite shadowpaste, you will do | 20:53 | |
jdv79 | dha: why aren't the with/without docs on the site? | ||
timotimo | easy | 20:54 | |
the site is without docs | |||
20:55
kanishka left
|
|||
psch | mst: the conversation was mostly about a decent doc'ing example | 20:56 | |
mst | well, the answer from the perl5 community would be "we don't have one because any code using redo can be better written as next/last, we're not sure why perl6 even has it" | ||
20:57
sftp joined
|
|||
jdv79 | i think that sentiment is mirrored in here | 20:57 | |
dha | mst - sadly, I'm in the position of writing documentation, so I don't have the luxury of not caring if no one uses it. | ||
jdv79 | can we dump it? | ||
mst | dha: document it as "I've no idea why we kept this mistake from perl5" and move on? | 20:58 | |
dha | jdv79 - I put in a pull request for with/without and some other stuff. | ||
mst | anybody who doesn't think it's a mistake gets to provide an example :) | ||
dha | mst - this *has* been suggested. :-) | ||
skids | Why? There are those that would say any given procedural code can be better rewritten in functional style. | ||
jdv79 | should tht heading be with/orwith/without or something (mainly include orwith somehow) - idk | ||
lizmat | jdv79: there is one use of redo in metaops.pm | ||
psch | m: my @a = ^5; for @a <-> $_ { my $x = rand; redo if $x == 1; $_ *= $x }; say @a # | 20:59 | |
camelia | rakudo-moar 3c0cd8: OUTPUT«[0 0.521163143544048 1.86028883437111 0.849965206429773 2.07568271585023]» | ||
psch | not sure how i do that with "next" | ||
...if i'm confusing rand and it doesn't go to 1, make that a 0 | |||
mst | while 1 { my $x = rand; next if $x == 1; $_ *= $x; last; } | 21:00 | |
dha | www.panix.com/~dha/test/redo.txt | ||
21:01
masak joined
|
|||
mst | also now you can replace 1 with some sort of rate limiter so you don't end up going round the loop again and again and again and again | 21:01 | |
jdv79 | dha: maybe gist.github.com is what you were looking for | ||
dha | jdv79 - I had thought about that. If people think adding orwith, I would do so. Is there an orwithout? | ||
skids | mst: The point you miss is you can iterate naively at the top of the loop and have your iterator restored. | ||
mst | psch: but really that seems highly contrivbed | ||
skids: no, I'm not missing that point, please don't assume I'm stupid or I'm not going to keep helping | 21:02 | ||
dha | jdv79 - I guess that would be an option. I guess I was just told that for actual patching I should put in pull requests rather than gisting and then adding it to the docs directly, so I was a little gist-shy. | ||
jdv79 | dha: orwith is in the example - just not the head - no big deal | ||
mst | I have written code that uses redo. I have then rewritten it to use next/last because it was a silly idea. | 21:03 | |
dha | Yeah. But *is* there an orwithout? | ||
mst | I know how it works, I've just never found a situation where it turned out to be a good plan in the long run | ||
jdv79 | orwith is just elsif so i'd guess no | ||
psch | mst: you're multiplying 1 by rand, i'm multiplying 0..4 | ||
skids shuts up as there are obviously some bad moods for some weird reason, time to decommute anyway. | |||
psch | mst++ # fueling the fir^Wdiscussion | 21:04 | |
mst | psch: I was attempting to translate psuedocode | ||
psch: my response was expected to be imperfect | |||
21:04
skids left
|
|||
Skarsnik | Hello, what is the proper way to solve soemthing like class A { has B $.b}; class B { has stuff}; ? | 21:08 | |
cognominal | I wonder what is the strange attractor that often transforms pseudocode into psuedocode... | ||
mst | psch: but, yeah, my point is that for any real, actual, code, I've ended up rewriting it | ||
psch: unsure if your example counts there, I can't see a reason why I'd want to do that for real, but that doesn't mean somebody else couldn't have a reason | 21:09 | ||
timotimo | Skarsnik: just put a "class B { ... }" in front of class A | ||
Skarsnik | just { ... } or with the proper definition? I mean in that case how to solve class A { has B $.b } class B { has A $.a}? | 21:12 | |
timotimo | no, just { ... } | ||
jdv79 | q | ||
timotimo | with three dots in there | ||
jdv79 | oops | ||
timotimo | that's how you declare a stubbed class in perl6 | ||
dha | so, assuming I'm not just going to write "=head2 redo\n\nFOR THE LOVE OF GOD WHY????", what do people think of www.panix.com/~dha/test/redo.txt ? | 21:13 | |
21:14
sufrostico joined,
colomon left
|
|||
mst | right, but that's a "don't do that" example | 21:15 | |
timotimo | how about user interaction? | ||
"please input a number"? | |||
mst | oooh, yes, I've done that and it actually wasn't terrible | 21:16 | |
I did eventually rewrite it with 'last if' instead of 'redo unless' | |||
Skarsnik | timotimo, ok, thank you :) | ||
timotimo | you're welcome :) | 21:17 | |
mst | but I'm pretty sure that was as I added features | ||
and the original version with redo wasn't actually evil | |||
i.e. I outgrew it, but it didn't originally suck | |||
timotimo++ # good call | |||
{ my $x = prompt("Enter a number"); redo unless is_a_number($x) } | 21:18 | ||
timotimo | thank you :) | ||
mst | dha: ^^ solved | 21:19 | |
dha | Yay! | ||
timotimo | i'm glad you're hanging out in here, mst :) | ||
Skarsnik | Is there a proper document about type and perl6 btw? Sometime rakudo surprise me by checking thing at compile time and sometime it fail at the execution | 21:20 | |
dha | timotimo++ | ||
timotimo | one good guideline is "we can never typecheck on method calls, except for private methods" | ||
i mean | |||
check at compile time | |||
Skarsnik | even if you put the type of a var? (sorry I close my vm with perl6 stuff on it) I remember time where it does not always fail a compile time when calling a bad method (or affecting attribute with a know type) | 21:24 | |
masak | mst: that works, but it still needs to be a `repeat { } while False` loop or something | ||
mst: not just a block, because a block ain't a loop | |||
timotimo | the thing about methods is that they are late-bound and perl6 does not restrict the signature of methods in derived classes | 21:25 | |
mst | masak: oh, right, you can redo a block in perl5 | ||
masak | aye | ||
mst | I was mostly illustrating the idea | ||
as with the while loop | |||
masak | IIUC, blocks are loops in Perl 5 'cus that's how the `do {} while` and `do {} until` loops can actually loop | ||
timotimo | so even if you have "my Str $foo" somewhere, a method call could reach a method in "class Flurb is Str { ... }" and the signature may be completely different | ||
masak | timotimo: correct | 21:26 | |
mst | masak: works with plain blocks too, so I'm not sure that's quite it | ||
masak | hm. | ||
mst | which generally one discovers by adding an inner scope to part of a foreach body and then forgetting you now need a loop label to use with next | 21:27 | |
so, um, not necessarily claiming it's a good idea, just that it's there :) | |||
timotimo | Skarsnik: on the other hand with subs, all candidates for the sub call are known at compile time - this also applies to operators of all kinds, as they do the same kind of multi-dispatch as regular subs and they live in the same namespace, too | ||
muraiki | Skarsnik: this presentation helped me grok why methods are late bound in p6: jnthn.net/papers/2015-fosdem-static-dynamic.pdf | 21:28 | |
timotimo | having methods be late-bound doesn't force this "problem" on you, but in perl6 we've made the trade-off in the opposite direction from - for example - C++ | 21:29 | |
dha | I have got pull requests coming out of my ears today... | 21:36 | |
masak | your ears are sending you pull requests? :P | 21:37 | |
masak .oO( patch to make user listen more ) | |||
jdv79 | first sucessful p6 cpan upload of a well formed dist file | ||
timotimo | are you sure you're the first? | ||
didn't froggs or lizmat do that a few months back? | |||
jdv79 | since pause blocked it before the bug i fixed pretty sure | 21:38 | |
21:38
leont joined
|
|||
timotimo | oh | 21:38 | |
Skarsnik | another dumb question is there an equivalent of the 'struct' keywoard of c++ (it's justact like class but put everything public by default)? | ||
timotimo | yes, you can put "is rw" after the class name | ||
jdv79 | slowly shaping up | ||
timotimo | otherwise you can put "is rw" on individual attributes, too | ||
Skarsnik | Oh after the class name :) | ||
21:38
colomon joined
|
|||
timotimo | and if your class is "is rw", you can "is ro" (or is it "is readonly"?) on individual attributes, too | 21:38 | |
Skarsnik | yes but it's pretty annoying/boring x) | ||
timotimo | :) | 21:39 | |
lizmat | timotimo: FROGGS probably, not me | ||
timotimo | mhm | ||
jdv79 | the preview uploads had files in the root of the tar instead of a subdir of the same name - details... | 21:40 | |
timotimo | oh | ||
i see | |||
jdv79 | but details count in the end:) | ||
cpan eco stuff likes that - plus its polite to not tarbomb | 21:41 | ||
timotimo | aye | ||
jdv79 | i tried a quick, albeit dumb, fix for the qt size thing | 21:43 | |
but it OOM'ed my box so... | |||
the real fix is probably to use a real C json lib in there | 21:44 | ||
timotimo | uh oh | ||
probably :\ | |||
jdv79 | my C sucks pretty hard | ||
otherwise i would have done it | 21:45 | ||
timotimo | thank you for caring, in aany case :) | ||
jdv79 | if nobody else does in ?2? weeks i might | ||
well, its kinda ridiculous that a profile is unusable | |||
we need something proper like Devel::NYTProf | 21:46 | ||
timotimo | well | ||
jdv79 | maybe tim bunce could do that instead of DBI. we have Inline::Perl5. but no real profiler. | ||
timotimo | here's the thing | ||
we construct a full call graph for measurements | |||
i have a branch in moarvm that kicks in after a specific depth of call graph and will sum up values | 21:47 | ||
we don't need a call graph of depth >10 in most cases, certainly not >15 | |||
sadly, that branch leads to wrong results :\ | |||
if that branch gets fixed by someone (*cough*), it could make the html version of the profiler usable for pretty much all data we have | 21:48 | ||
jdv79 | what gets thrown away? | ||
timotimo | nothing | ||
things just get summed up | |||
21:48
FROGGS left
|
|||
jdv79 | ok | 21:48 | |
timotimo | well, measured frames don't have "the right" parent any more if they are too deep in the call graph | 21:49 | |
Skarsnik | That was another question btw. Is there something to profile code? I try to figure what is f** slow in HTML::Parser::XML | ||
timotimo | yes, perl6 --profile foo.pm | ||
jdv79 | Skarsnik: my guess is the grammar part | ||
Skarsnik | There is no grammar | ||
jdv79 | huh. i remember its super slow. guess i misremembered why. | ||
timotimo has forgotten what HTML::Parser::XML itself does exactly | 21:50 | ||
Skarsnik | It look like a C algorythm for most of the stuff | ||
parse a html document and produce a XML object | |||
jdv79 | i think it takes maybe 10s to parse yahoo.com | 21:51 | |
timotimo | mhm | ||
jdv79 | its pretty terrible - at least last i tried it | ||
timotimo | mhm | ||
well, we're hoping to make all parts of rakudo and friends faster | |||
jdv79 | Skarsnik: you could try the moarvm profiler | 21:53 | |
if its small its useable | |||
ugexe | Skarsnik: github.com/supernovus/exemel/blob/...rammar.pm6 | ||
this is a grammar used by HTML::Parser::XML | |||
jdv79 | ugexe: does it still? | 21:54 | |
i don't see where atm | |||
Skarsnik | not it does not | 21:55 | |
dalek | kudo/nom: 0091cee | TimToady++ | src/core/List.pm: +slurpy needs a decont, not a .list |
||
Skarsnik | *no | ||
leont | It seems precompilation is breaking my exported sub, is that a known issue? | ||
21:56
pmurias_ joined
|
|||
timotimo | huh, we have precompilation? | 21:56 | |
:P | |||
ugexe | th eonly thing that doesnt precompile is panda :P | ||
timotimo | yup, zef still does it | ||
Skarsnik | pastebin.com/TYV7XsEW each test took around 800 sec ~~ | 21:57 | |
ugexe | and yes im assuming HTML::Parser::XML still uses a grammar since it still usees XML.pm. It doesnt call .Grammar directly but that doesnt mean it doesnt use a grammar | ||
Grammar.parse() directly rather | |||
Skarsnik | I spend some time fixing stuff in this module. It parse everything itself ~~ | 21:58 | |
jdv79 | ah ha | ||
ugexe | no it doesnt | ||
Skarsnik | XML can't parse HTML document btw ^^ | 21:59 | |
21:59
pmurias left
|
|||
ugexe | hence HTML::Parser::XML | 21:59 | |
jdv79 | Skarsnik: profile it and see:) | ||
21:59
tokuhiro_ joined
|
|||
jdv79 | --profile | 21:59 | |
lizmat | sleep& | ||
Skarsnik | it's taking forever huhu | 22:00 | |
jdv79 | wait til you try to load the output | ||
try to make it the smallest run useful maybe | |||
Skarsnik | I edit the test to only do one parse ^^ | 22:01 | |
ugexe | i think he means when you profile it | 22:02 | |
dalek | kudo/nom: 7c20517 | TimToady++ | src/core/List.pm: Revert "+slurpy needs a decont, not a .list" This reverts commit 0091cee765e067ccfc545b56b5a15dc8cda563d0, which was dumb. |
||
jdv79 | yup | ||
22:03
muraiki left,
vendethiel left
|
|||
leont | The precompiling makes rather a difference in my use-case (TAP::Harness), but its issues are annoying | 22:04 | |
22:04
tokuhiro_ left
|
|||
jdv79 | ok, 35s for yahoo | 22:09 | |
ugh | |||
22:09
dha left
|
|||
Skarsnik | profiling even one try of my benchmark was not a good idea xD | 22:11 | |
ugexe | leont: i had a similar problem (although slightly different). seems related to the new use of CompUnit for loading modules | 22:13 | |
22:16
skids joined
|
|||
jdv79 | Skarsnik: looks like a lot of the top offenders are core things | 22:17 | |
ugexe | if you load from a CompUnitRepo::Local::File i dont think it will even load the precompiled file if the source is found | ||
jdv79 | didn't look too closely though | ||
ugexe | github.com/rakudo/rakudo/blob/nom/...pm#L42-L47 | 22:18 | |
22:23
rurban joined
|
|||
leont | Given speed differences, I'm pretty sure it's loading the precompiled one | 22:23 | |
ugexe | not that i dont believe it, but not having to export a bunch of symbols would speed it up as well | 22:26 | |
well, s/not having to export/not exporting/ | 22:27 | ||
22:30
telex left,
telex joined
|
|||
leont | I doubt that's the main factor here, given how little I export (and how big the packages are) | 22:31 | |
22:32
pmurias_ left
|
|||
ugexe | i had a similar problem yesterday with CURLI and it would only attempt to load the first module | 22:33 | |
but that was with source or precompiled | |||
s/or/and/ | |||
22:35
raiph joined
|
|||
ugexe | looked like it was attempting to load with the wrong module loader | 22:35 | |
RAKUDO_MODULE_DEBUG=1 will show you | |||
22:37
diana_olhovik_ left
22:38
hernanGOA left
22:46
leont left
22:47
khw left
22:50
patrickz left
|
|||
tony-o | Skarsnik: the HTML you're referencing is very very poorly formed, i wouldn't expect to be able to parse it into XML. there are close tags for elements that don't exist | 23:07 | |
the fact that you get anything from HTML::Parser::XML at all is kind of cool. | 23:08 | ||
Skarsnik | the modules crashed or missed stuff before I made the two fix ^^ | 23:09 | |
tony-o | the part your github issue references is because you have an unclosed <div> on that page, HTML::Parser::XML is kind of doing you the favor of just closing it an returning what i did parse | ||
crashing might be a better option. then you at least know your html is .. poorly formed. | |||
validator.w3.org/nu/?doc=http%3A%2...pyfav.html | 23:10 | ||
timotimo | i bet 99.99999999% of html on the 'web is malformed :) | 23:11 | |
23:12
spider-mario left
|
|||
tony-o | timotimo: this is beyond malformed, though. even chrome doesn't parse this | 23:12 | |
although i agree with what you're saying. | |||
Skarsnik | Funny because the module get all the hierarchy right before the form | 23:14 | |
skids | .oO(web developers have good reason to be certifiable) |
||
Skarsnik | it's taken from www.fimfiction.net/bookshelf/751448/favourites (the module take forever to parse this ^^) | 23:15 | |
ugexe | in perl 5 land i think a separate module does the cleaning of HTML before parsing | 23:17 | |
Skarsnik | There are like 4000+ module to parse HTML probably too | 23:18 | |
ugexe | so | ||
im sure everyone wouuld welcome an HTML cleaning module | 23:19 | ||
tony-o | Skarsnik: there are stray '</[b|i|etc>' tags all over the place in the example html page you provided, one of the div tags isn't closed anywhere in the document, chrome renders this page in a way that is inconsistent with the way this html looks like it's meant to be rendered by the author. minor complaints about the html are that it claims to be html5 though it has no head or body tag, it also claims to be xhtml which it most | ||
ugexe | sorta like how perl 5 web::scraper cant properly scrape espns html even WITH cleaning | 23:20 | |
well, parse rather | |||
timotimo | "xhtm which it most" ... "definitely isn't"? | ||
i thought head and body tags are still optional in html5? | |||
Skarsnik | I maybe remove them ~~ | 23:21 | |
tony-o | timotimo: A body element's start tag may be omitted if the element is empty, or if the first thing inside the body element is not a space character or a comment, except if the first thing inside the body element is a meta, link, script, style, or template element. | 23:22 | |
timotimo | ah | 23:23 | |
so a <head> can just turn into the <body> section of the document when a <h1> for example appears? | |||
tony-o | i think it's still optional, it just depends on how the document is formed | ||
that's how i read it, yea | |||
timotimo | funny | 23:24 | |
Skarsnik | tony-o, pastebin.com/5R2EBPYc what the module produce with this page, but chrome/iceweasel still get the right tree with the mistakes. The </b> </i> came from the page having stuff like <i blablab /> | 23:29 | |
tony-o | what do you expect to see as the last div> | 23:30 | |
? | |||
Skarsnik | also it tend to create extra xml::text with only space/tab/cariage return | ||
the extra_story_data should be in the first div, not outside | 23:31 | ||
tony-o | should be the first div of what and not outside of what? | ||
your first div is story_container | 23:32 | ||
Skarsnik | yes, extra_story_data must be in story_container | ||
tony-o | mm, i think maybe that patch made it work but is concealing a bug rather than fixing. i see what you mean - i'll take a look at it | 23:33 | |
23:36
rurban left
|
|||
Skarsnik | actually the module creating extra xml::text was annoying when writing test. a simple <table><tr>d</tr><tr>d</tr></table> has more than 2 elements for the table element if you put indentation ~~ | 23:37 | |
23:37
sufrostico left
|
|||
Skarsnik | well the .node attribute has more than 2 things | 23:37 | |
23:39
Sqirrel_ joined,
Sqirrel left
|
|||
Skarsnik | Anyways, good night here ^^ | 23:40 | |
tony-o | it's useful for formatting the XML doc back into a string. good night | ||
23:44
Skarsnik left,
khw joined
23:52
aborazmeh joined,
aborazmeh left,
aborazmeh joined
23:56
adu joined
|