Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-09-16

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:17 [particle] joined #perl6
00:18 nebuchad` joined #perl6
00:21 TEttinger joined #perl6
00:21 xiaomiao joined #perl6
00:21 xiaomiao joined #perl6
00:21 sftp joined #perl6
00:23 laouji joined #perl6
00:30 dalek roast: e60f683 | skids++ | S32-exceptions/misc.t:
00:30 dalek roast: Add test for RT#125504
00:30 dalek roast: review: https://github.com/perl6/roast/commit/e60f683e3c
00:30 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=125504
00:30 bonsaikitten joined #perl6
00:31 japhb_ joined #perl6
00:31 atta_ joined #perl6
00:31 gfldex_ joined #perl6
00:31 notostraca joined #perl6
00:31 zm1 joined #perl6
00:33 Timbus_ joined #perl6
00:34 stux|RC joined #perl6
00:36 ilogger2_ joined #perl6
00:37 domm joined #perl6
00:38 TimToady joined #perl6
00:38 vike joined #perl6
00:40 laouji joined #perl6
00:42 laouji joined #perl6
00:42 isacloud joined #perl6
00:42 g4 joined #perl6
00:42 Zoffix joined #perl6
00:42 isacloud joined #perl6
00:50 japhb_ nick japhb
00:51 japhb blurfle
00:51 yoleaux 14 Sep 2015 17:36Z <tony-o> japhb: because the META.json was broken
00:51 japhb timotimo: Have you pushed your perl6-bench changes?
00:53 thou joined #perl6
01:07 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:11 bowtie joined #perl6
01:11 AlexDaniel joined #perl6
01:12 AlexDaniel .
01:15 Zoffix joined #perl6
01:18 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
01:18 skids Yeah, more code these days.
01:19 skids This is a relativey new lt with an SSD.
01:19 skids (thanks, $DAYJOB)
01:21 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 ShimmerFairy skids: at least I'm not compiling rakudo-p on a G3 Powerbook (with linux installed, of course) anymore :P
01:24 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)
01:28 ShimmerFairy 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 ShimmerFairy so  my $app = EVALFILE($filename)  , most likely
01:29 tokuhiro_ ShimmerFairy: thanks! EVALFILE was what i wanted!
01:30 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:46 ilbot3 joined #perl6
01:46 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend!
01:54 dayangkun joined #perl6
02:07 grondilu my attempt at parallelizing the sum of numbers:
02:07 grondilu sub sum(@a) { [+] await @a.rotor(+@a div 4, :partial).map(-> $a { start { [+] @$a } }) }; say sum rand xx 100_000;
02:08 grondilu it's actually much slower
02:09 BenGoldberg m: say [+] rand xx 100_000;
02:09 camelia rakudo-moar b3a772: OUTPUT«49890.2559994881␤»
02:09 BenGoldberg m: say [+] rand xx 100_000 for 1..10;
02:09 camelia rakudo-moar b3a772: OUTPUT«50014.9002982538␤49985.757855625␤5006​8.7320578887␤49895.3369435958␤50031.64005530​55␤49905.676195838␤49772.3432185231␤50062.23​56501596␤49910.1236297258␤49922.6322905629␤»
02:09 BenGoldberg m: sub sum(@a) { [+] await @a.rotor(+@a div 4, :partial).map(-> $a { start { [+] @$a } }) }; say sum rand xx 100_000;
02:10 camelia rakudo-moar b3a772: OUTPUT«49975.8131482832␤»
02:11 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.4186879697␤4.2388345␤»
02:11 grondilu m: say [+] rand xx 100_000; say now - INIT now
02:11 camelia rakudo-moar b3a772: OUTPUT«49955.8728328982␤0.89295784␤»
02:30 ilbot3 joined #perl6
02:30 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend!
02:34 g4 joined #perl6
02:41 thou joined #perl6
02:41 _sri wow, that fluent interfaces example makes perl6 look pretty bad https://en.wikipedia.org/wi​ki/Fluent_interface#Perl_6
02:49 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:50 _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 #perl6
02:53 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
02:53 _sri (imo)
02:54 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:56 _sri that's literally what i would call the given block
02:56 _sri incomprehensible line noise
02:57 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').su​rname('Ride').salary(200)
02:57 _sri that is clean
02:57 ugexe i like it
02:57 ShimmerFairy or in other words, my definition of "line noise" is literally a line of text that's impossible to read well :)
02:58 skids The Perl6 solutio at least does not suffer from the problems listed in the "problems" section.
02:59 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
03:01 _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 #perl6
03:02 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:04 skids It is probably why the "set attribute and return self" question popped up earlier.
03:05 ShimmerFairy skids: I believe the example exists because of the question, IIRC :)
03:06 laouji joined #perl6
03:06 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:<.>
03:07 skids (considering how deep it is emedded in the grammar)
03:14 _sri looks like there was a better version before https://en.wikipedia.org/w/index.php?title=​Fluent_interface&amp;oldid=681159313#Perl_6
03:18 telex joined #perl6
03:21 [Coke] http://brokemaniacsmusicbox.tumblr.com/post/12914​4150932/sofluffysoyummy-a-cat-and-a-lowercase-cat ... unicode is weird.
03:21 skids m: my $f = Failure.new.flat[0];
03:21 camelia rakudo-moar b3a772: OUTPUT«Failed␤␤Actually thrown at:␤  in block <unit> at /tmp/61pcO3Hzra:1␤␤»
03:22 skids methinks the .flat streamlining may have sunk something.
03:31 skids Ah, I know why, RT#125769.
03:31 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=125769
03:34 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.
03:34 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=125769
03:37 telex joined #perl6
03:49 dalek nqp: e59aa09 | hoelzro++ | .travis.yml:
03:49 dalek nqp: Add JS to Travis build matrix
03:49 dalek nqp: review: https://github.com/perl6/nqp/commit/e59aa09638
04:10 vendethiel joined #perl6
04:20 Bobby__ joined #perl6
04:26 rmgk_ joined #perl6
04:28 telex joined #perl6
04:29 thou joined #perl6
04:36 laouji joined #perl6
04:40 Khisanth joined #perl6
04:44 ugexe hoelzro: i dont think your travis config does what you think
04:44 ugexe you are sending the --backends= option twice. once under `script` and once from the matrix NQP_OPTIONS
04:46 ugexe 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:51 hoelzro ugexe: ahhh, thanks for pointing that out
04:51 dalek nqp: 869ccbb | hoelzro++ | .travis.yml:
04:51 dalek nqp: Remove redundant --backends option in Travis config
04:51 dalek nqp: review: https://github.com/perl6/nqp/commit/869ccbb0bc
05:01 ugexe whats the purpose of --backends=js,moar when the first two NQP options do the same thing for moar
05:01 ugexe does the js backend need moar?
05:05 ugexe i.e. i think the first 2 NQP_OPTIONS were made redundant by your two new NQP_OPTIONS
05:07 ugexe 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:28 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
05:29 ugexe - NQP_OPTIONS="--gen-moar"
05:29 ugexe - NQP_OPTIONS="--gen-moar=master"
05:29 ugexe - NQP_OPTIONS="--gen-moar --backends=js,moar"
05:29 ugexe - NQP_OPTIONS="--gen-moar=master --backends=js,moar"
05:31 ugexe 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:32 ugexe and assuming that the default branch for moar is already master, its testing the exact same moar setup 4 times
05:33 ugexe im not sure how the branches differ though. i just know the first point is true
05:34 Khisanth joined #perl6
05:38 xfix joined #perl6
05:46 ShimmerFairy ugexe: if the moar-only ones pass and the js-including ones don't, then it's pretty clearly js's problem :)
05:47 ugexe whats the point
05:47 ShimmerFairy ?
05:47 ugexe if it was the js by itself it would A. be faster B. use less travis resources C. be more clear
05:48 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:58 laouji joined #perl6
06:05 dayangkun_ joined #perl6
06:07 FROGGS[mobile] joined #perl6
06:07 FROGGS[mobile] o/
06:15 rurban joined #perl6
06:17 thou joined #perl6
06:19 hobbs joined #perl6
06:20 dalek rakudo/nom: c9c87a9 | skids++ | src/core/Mu.pm:
06:20 dalek rakudo/nom: Add some helpful advice to Str(Mu:U) per RT#113888
06:20 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c9c87a92bb
06:20 dalek rakudo/nom: 3fa29b7 | niner++ | src/core/Mu.pm:
06:20 dalek rakudo/nom: Merge pull request #534 from skids/lta_errors
06:20 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=113888
06:20 dalek rakudo/nom:
06:20 dalek rakudo/nom: Add some helpful advice to Str(Mu:U) per RT#113888
06:20 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=113888
06:20 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3fa29b7255
06:20 Gardner joined #perl6
06:20 diana_olhovik_ joined #perl6
06:20 retupmoca joined #perl6
06:20 FROGGS joined #perl6
06:21 dalek nqp: 350aeb7 | ugexe++ | .travis.yml:
06:21 dalek nqp: Use non-legacy travis-ci builds
06:21 dalek nqp: review: https://github.com/perl6/nqp/commit/350aeb75aa
06:21 dalek nqp: 0c380a8 | FROGGS++ | .travis.yml:
06:21 dalek nqp: Merge pull request #244 from ugexe/patch-2
06:21 dalek nqp:
06:21 dalek nqp: Use non-legacy travis-ci builds
06:21 dalek nqp: review: https://github.com/perl6/nqp/commit/0c380a8bdb
06:22 Alina-malina joined #perl6
06:24 thou joined #perl6
06:27 dalek rakudo/nom: 24931c4 | usev6++ | src/core/Any-iterable-methods.pm:
06:27 dalek rakudo/nom: Remove stringification when using :&as parameter for .squish
06:27 dalek rakudo/nom:
06:27 dalek rakudo/nom: Fixes RT #124204
06:27 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/24931c4307
06:27 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=124204
06:27 dalek rakudo/nom: d3f71ac | niner++ | src/core/Any-iterable-methods.pm:
06:27 dalek rakudo/nom: Merge pull request #532 from usev6/rt124204
06:27 dalek rakudo/nom:
06:27 dalek rakudo/nom: Remove stringification when using :&as parameter for .squish
06:27 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d3f71acf16
06:27 rurban Did someone manage to get appveyor.yml right? Travis for Windows. I failed so far
06:28 dylanwh_ joined #perl6
06:34 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? https://github.com/rakudo/rakudo/com​pare/nom...ugexe:curli_load?expand=1
06:35 FROGGS ugexe: ahh, I see what I did wrong...
06:36 FROGGS ugexe: I think the better patch is to install CURLI stuff in a directory scheme, and also keep file extensions...
06:37 _mg_ joined #perl6
06:37 FROGGS ugexe: so installing Foo.pm means installing into site/<n>/lib/Foo.pm, where <n> is the distribution counter
06:37 laouji joined #perl6
06:38 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 FROGGS ugexe: do you agree?
06:39 domidumont joined #perl6
06:39 FROGGS ugexe: we might need to normalize filenames at some point though, but this can be a lossy normalization
06:40 FROGGS ugexe: like the punycode like thing I used on testers.perl6.org
06:40 CQ2 joined #perl6
06:42 telex joined #perl6
06:44 domidumont joined #perl6
06:53 mr-foobar joined #perl6
06:57 telex joined #perl6
06:58 masak morning, #perl6
06:58 lizmat masak o/
06:59 moritz \o
06:59 lizmat moritz o/
07:01 laouji joined #perl6
07:04 Khisanth joined #perl6
07:06 [Tux] test             50000    38.645    38.566
07:06 [Tux] test-t           50000    41.678    41.599
07:06 [Tux] :/
07:06 [Tux] ran that twice
07:08 KDr2 joined #perl6
07:09 lizmat [Tux]: so since when was this performance regression ?
07:09 [Tux] yesterday
07:10 [Tux] 30 freenode-#perl6.log:Sep 13 10:00:01 <[Tux]>  test-t           50000    39.341    39.259
07:10 [Tux] 30 freenode-#perl6.log:Sep 14 11:15:50 <|Tux|>  test-t           50000    37.080    37.000
07:10 [Tux] 30 freenode-#perl6.log:Sep 14 19:21:54 <|Tux|>  test-t           50000    36.905    36.826
07:10 [Tux] 30 freenode-#perl6.log:Sep 16 09:06:05 <[Tux]>  test-t           50000    41.678    41.599
07:10 moritz [Tux]: could you please locally revert 7662c4637d99addb7989ba9e9bcab1d5553f7e55 and benchmark again?
07:10 [Tux] sorry, sep 14
07:11 lizmat well, the last one from Sep 14 is after 7662c4637d99addb7989ba9e9bcab1d5553f7e55 , so it's not a MoarVM issue, I would think
07:14 rurban FROGGS: appveyor is like Travis, see e.g. https://ci.appveyor.com/project/rurban/cperl
07:15 rurban just 10x slower and horribly to setup properly
07:20 zakharyas joined #perl6
07:24 nine moritz: I can't believe your commit could cause such a slow down.
07:25 g4 joined #perl6
07:25 [Tux] test             50000    39.132    39.046
07:25 [Tux] test-t           50000    40.932    40.846
07:25 [Tux] I reverted that commit and did a make. Would that be sufficient?
07:26 lizmat should be
07:27 lizmat breakfast&
07:29 nine I guess only a bisect will tell us want went wrong
07:31 nine OTOH I don't see any commit that I'd even remotely call a candidate. There weren't that many.
07:38 moritz [Tux]: you need a 'make install'
07:38 [Tux] bummer :)
07:44 [Tux] test             50000    38.965    38.883
07:44 [Tux] test-t           50000    40.789    40.706
07:44 [Tux] no diff
07:45 darutoko joined #perl6
07:46 xinming_ joined #perl6
07:50 abraxxa joined #perl6
07:54 Ven joined #perl6
07:57 lizmat anybody any thoughts about https://github.com/rakudo/r​akudo/commit/425845d723afb  ??
08:00 pink_mist sounds reasonable to me
08:01 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.
08:01 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=125769
08:01 lizmat jnthn: maybe because it is slightly more work ??
08:02 lizmat 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"
08:02 lizmat well, it spectests clean so far
08:02 jnthn lizmat: But given I didn't actually manage to think of such a WAT yet... :)
08:03 jnthn star: say 1 == *
08:03 camelia star-m 2015.03: OUTPUT«WhateverCode.new()␤»
08:03 lizmat the only thing I was thinking is that maybe it should work for a Whatever type object as well
08:03 jnthn Of course, that auto-curries so you have to try quite hard to hit that code path :)
08:03 lizmat indeed
08:03 g6 joined #perl6
08:04 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␤␤»
08:04 lizmat m: sub a($a) { say "foo" if $a == Inf }; a(*)
08:04 camelia rakudo-moar d3f71a: OUTPUT«foo␤»
08:04 ribasushi joined #perl6
08:05 jnthn Ah, that way around
08:09 lizmat yup  :-)
08:11 nine Well, we often use * to signify Inf, but does that mean that * _is_ actually Inf?
08:11 nine m: say *..0
08:11 camelia rakudo-moar d3f71a: OUTPUT«-Inf..0␤»
08:11 nine It can also be -Inf
08:11 nine s/be/mean/
08:11 lizmat nine: it will only coerce Whatever:D: to Inf in Numeric "context"  :-)
08:13 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
08:16 pink_mist Inf|-Inf?
08:17 thou joined #perl6
08:18 nine FWIW I'm not actually against the change. Just poking around to see if we discover arguments.
08:19 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
08:20 masak that's just its most common desugaring
08:21 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 lizmat .oO( that's wet  (not DRY) )
08:22 jnthn Yeah, but the software industry has got so obsessed with re-use it hurts us as much as helps us by now...
08:23 jnthn 'cus re-use = use = dependency = coupling
08:23 g6 joined #perl6
08:24 g4 joined #perl6
08:26 sftp joined #perl6
08:27 dakkar joined #perl6
08:33 ribasushi joined #perl6
08:33 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 duncan_dmg joined #perl6
08:33 lizmat meanwhile, sightseeing and commute&
08:35 patrickz joined #perl6
08:37 masak so the problem `Whatever.new == Inf` solves is that there's repeated checking of whatever and Inf in the core setting?
08:37 masak is that a problem that could alternatively be solved by introducing a convenience subroutine? something like, is_whatever_or_inf ?
08:37 FROGGS masak: well, also in your code where you have a param $limit which can either be Inf or Whatever
08:38 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.
08:38 jnthn That is, in the built-in APIs we make * usable in place of Inf in many places
08:38 telex joined #perl6
08:38 jnthn This would mean people get it "for free"
08:39 jnthn 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.
08:39 jnthn masak: Yeah, I think that's my hold-up too...but Whatever is already quite special... ;)
08:39 masak yeah.
08:40 masak I'm having an impulse to object, but this time it's "below the threshold" :)
08:40 FROGGS yeah, w/e :o)
08:40 jnthn Well, so far I've found my reason to keep it more credible than any of my reasons not to... :)
08:40 masak I guess the question we should be asking is "how do we want client/user code to look?", and then optimize for that.
08:40 masak and that might well be `== Inf`
08:40 FROGGS masak: then I'd +1 for the patch
08:40 masak right.
08:41 masak +0.98 :)
08:41 FROGGS fair enuff
08:44 telex joined #perl6
08:51 espadrine joined #perl6
08:51 larion joined #perl6
08:53 espadrine joined #perl6
08:53 cognominal joined #perl6
08:54 espadrine joined #perl6
08:55 espadrine joined #perl6
09:08 itz joined #perl6
09:08 itz mornin'
09:10 BooK is there a difference between Inf and +Inf ?
09:11 cognominal the sign? :)
09:11 itz m: Inf eqv +Inf
09:11 camelia rakudo-moar d3f71a: ( no output )
09:11 itz m: say Inf eqv +Inf
09:11 camelia rakudo-moar d3f71a: OUTPUT«True␤»
09:12 cognominal say Inf =:= +Inf
09:12 cognominal m: say Inf =:= +Inf
09:12 camelia rakudo-moar d3f71a: OUTPUT«True␤»
09:13 cognominal according to wp, IEE 754 says there are 2 infinities
09:15 psch m: say -Inf =:= Inf
09:15 camelia rakudo-moar d3f71a: OUTPUT«False␤»
09:15 mrf =:= ?
09:15 BooK I just looked at lizmat's patch, and wondered about the cases when * might actually mean -Inf, like nine when he said *..0
09:16 cognominal BooK, * means different things in different places
09:16 psch mrf: object identity, like == on object in Java for example
09:16 cognominal that's its very purpose
09:17 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
09:18 FROGGS m: say *..0.min
09:18 camelia rakudo-moar d3f71a: OUTPUT«-Inf..0␤»
09:18 FROGGS m: say (*..0).min
09:18 camelia rakudo-moar d3f71a: OUTPUT«-Inf␤»
09:19 FROGGS BooK: the Whatever is usually already turned into -Inf before you call .Numeric on it
09:19 CIAvash joined #perl6
09:19 FROGGS BooK: like in my example because it is the left hand side
09:20 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 #perl6
09:23 masak the only other place where I can think of a numeric value making sense for * is in @ary[*-2]
09:23 masak in that case, the numeric value is not Inf, but +@ary
09:23 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_ joined #perl6
09:26 cognominal BooK, and that's leads you the a Range.new multimethod  https://github.com/rakudo/rakudo​/blob/nom/src/core/Range.pm#L20
09:26 domidumont joined #perl6
09:27 cognominal so just like I said * becomes whatever that multimethod chooses it to be.
09:28 cognominal 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?
09:28 itz or is it just the associated lists?
09:29 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:30 cognominal And if you find the dump too verbose and not specific enough, there is a patch for that :  https://github.com/cognominal/nqp/commit/​d9b171227ffdcde952ce7989f5f42dedc2985489  :)
09:41 [Tux] itz, IIRC gather/take is now default lazy
09:42 [Tux] 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 [Tux] please core-folk correct me if I am wrong
09:44 [Tux] pre-GLR «gather { ... take 0..Inf }» → post-GLR «gather { ... take ((0 .. Inf).Slip);
09:45 itz m: say (gather { take 0..Inf}).is-lazy
09:45 camelia rakudo-moar d3f71a: OUTPUT«False␤»
09:45 itz m: say (lazy gather { take 0..Inf}).is-lazy
09:45 camelia rakudo-moar d3f71a: OUTPUT«True␤»
09:47 itz pre-glr
09:47 itz > say (gather { take 0..Inf}).infinite
09:47 itz False
09:47 itz > say (lazy gather { take 0..Inf}).infinite
09:47 itz False
09:48 [Tux] m: (gather {take 0..Inf}).perl.say
09:48 camelia rakudo-moar d3f71a: OUTPUT«(0..Inf,).Seq␤»
09:48 [Tux] it is a .Seq now
09:49 [Tux] I just checked, it is still not lazy enough for my purpose
09:49 psch m: say (gather { .take for ^Inf })
09:49 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…»
09:49 psch m: say (gather { .take for ^Inf }).is-lazy
09:49 camelia rakudo-moar d3f71a: OUTPUT«False␤»
09:49 [Tux] FROGGS? was it you who wanted to fix that?
09:49 psch "take 0..Inf" takes one lazy list
09:50 psch but gather/take isn't lazy own its own
09:50 [Tux] $from..$to != ^$to :(
09:51 FROGGS [Tux]: unlikely, I dunno how
09:51 FROGGS or where to start for that matter
09:51 FROGGS nine++ might be able to give a hint
09:52 dalek nqp: 4740820 | peschwa++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java:
09:52 dalek nqp: Clone VMHashInstance.storage before building an Iterator.
09:52 dalek nqp:
09:52 dalek nqp: Otherwise we get ConcurrentModificationException thrown when changing a Hash
09:52 dalek nqp: while iterating over it.
09:52 dalek nqp: review: https://github.com/perl6/nqp/commit/4740820ddd
09:53 FROGGS m: say (gather { take 0..Inf })
09:53 camelia rakudo-moar d3f71a: OUTPUT«(0..Inf)␤»
09:53 [Tux] Sep 09 18:47:29 <nine>  |Tux|: in case you didn't see it. I do have a fix for your Inf problem
09:53 FROGGS psch++
09:54 dalek rakudo/nom: ed47bb4 | peschwa++ | tools/build/NQP_REVISION:
09:54 dalek rakudo/nom: Bump NQP_REVISION.
09:54 dalek rakudo/nom:
09:54 dalek rakudo/nom: This pulls the "clone VMHashInstance for VMIterInstance" fix for nqp-j, which
09:54 dalek rakudo/nom: gives us somewhere in the vicinity of 200 passing tests back.
09:54 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ed47bb4551
09:56 travis-ci joined #perl6
09:56 travis-ci NQP build failed. Pepe Schwarz 'Clone VMHashInstance.storage before building an Iterator.
09:56 travis-ci https://travis-ci.org/perl6/nqp/builds/80604088 https://github.com/perl6/nqp/com​pare/0c380a8bdb71...4740820dddbb
09:56 travis-ci left #perl6
09:56 psch aww
09:57 psch it worked locally :l
09:57 psch ehh
09:57 psch the js,moar failed
09:57 psch i'm taking responsibility for that :P
09:57 psch err
09:57 psch *not*
09:58 psch /home/travis/build/perl6/nqp/node_modu​les/nqp-runtime/deserialization.js:409
09:58 psch throw 'Unsupported serialization format version: ' + version;
09:58 psch yeah that's not on me
10:01 araujo joined #perl6
10:03 [Tux] IIRC travis removed some META stuff
10:05 thou joined #perl6
10:10 rindolf joined #perl6
10:11 psch r: say Bag.new("a", "b", "c").roll #
10:11 camelia rakudo-moar d3f71a: OUTPUT«c␤»
10:11 camelia ..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 #perl6
10:12 masak ooh, a backend difference
10:12 masak m: say Seq ~~ Positional
10:12 camelia rakudo-moar d3f71a: OUTPUT«False␤»
10:12 masak r: say Seq ~~ Positional
10:12 camelia rakudo-{moar,jvm} d3f71a: OUTPUT«False␤»
10:13 FROGGS the PositionalBindFailover still needs some love it seems
10:13 psch FROGGS: yeah, that sounds about right
10:15 psch # expected: 'o  3 b     1 a     2 p     2'
10:15 psch #      got: 'o  3 b     1 p     2 a     2'
10:15 psch grrr
10:18 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"))␤»
10:18 camelia ..rakudo-jvm d3f71a: OUTPUT«(val("1") val("10") val("2") val("3"))␤»
10:19 FROGGS errr
10:19 FROGGS r: say 1 cmp 10
10:19 camelia rakudo-{moar,jvm} d3f71a: OUTPUT«Less␤»
10:19 psch r: say <1> cmp <10>
10:19 camelia rakudo-{moar,jvm} d3f71a: OUTPUT«Less␤»
10:19 psch r: say val("1") cmp val("10")
10:19 camelia rakudo-{moar,jvm} d3f71a: OUTPUT«Less␤»
10:19 FROGGS r: say +<1> cmp +<10>
10:19 camelia rakudo-moar d3f71a: OUTPUT«Less␤»
10:19 camelia ..rakudo-jvm d3f71a: OUTPUT«Same␤»
10:19 FROGGS :D
10:19 psch neat
10:19 psch :D
10:20 FROGGS j: say +<10>
10:20 camelia rakudo-jvm d3f71a: OUTPUT«10␤»
10:20 FROGGS j: say (+<10>).WHAT
10:20 camelia rakudo-jvm d3f71a: OUTPUT«(Int)␤»
10:20 FROGGS r: say +<1> == +<10>
10:20 camelia rakudo-jvm d3f71a: OUTPUT«True␤»
10:20 camelia ..rakudo-moar d3f71a: OUTPUT«False␤»
10:20 psch wha
10:20 ShimmerFairy joined #perl6
10:20 FROGGS how, what
10:20 arnsholt WAT?
10:21 arnsholt r: say +<1>; say +<10>
10:21 camelia rakudo-jvm d3f71a: OUTPUT«10␤1␤»
10:21 camelia ..rakudo-moar d3f71a: OUTPUT«1␤10␤»
10:21 pink_mist wat
10:21 psch uhh
10:21 FROGGS haha
10:21 psch i uhm
10:21 psch wat
10:21 FROGGS wtf
10:22 arnsholt r: say +<1>
10:22 camelia rakudo-{moar,jvm} d3f71a: OUTPUT«1␤»
10:23 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>
10:23 pink_mist r: say +<3>; say +<10>;
10:23 camelia rakudo-jvm d3f71a: OUTPUT«'1' Int - '1' Int␤»
10:23 camelia ..rakudo-moar d3f71a: OUTPUT«'1' Int - '10' Int␤»
10:23 camelia rakudo-moar d3f71a: OUTPUT«3␤10␤»
10:23 camelia ..rakudo-jvm d3f71a: OUTPUT«10␤1␤»
10:23 arnsholt Something being done LIFO when it should be FIFO, perhaps
10:23 arnsholt m: say +<1>, +<2>, +<3>
10:23 camelia rakudo-moar ed47bb: OUTPUT«123␤»
10:24 arnsholt r: say +<1>, +<2>, +<3>
10:24 FROGGS it does some caching it seems
10:24 camelia rakudo-jvm ed47bb: OUTPUT«333␤»
10:24 camelia ..rakudo-moar ed47bb: OUTPUT«123␤»
10:24 arnsholt r: say +<1>; say +<2>; say +<3>
10:24 camelia rakudo-jvm ed47bb: OUTPUT«3␤1␤1␤»
10:24 camelia ..rakudo-moar ed47bb: OUTPUT«1␤2␤3␤»
10:24 FROGGS maybe it messed up its string heap?
10:24 arnsholt Something weird going on with constants, yeah
10:24 FROGGS j: say +<1>; say +<2>; say +<3>
10:24 camelia rakudo-jvm ed47bb: OUTPUT«3␤1␤1␤»
10:24 FROGGS j: say +<1>; say +<2>; say +<3>
10:25 camelia rakudo-jvm ed47bb: OUTPUT«3␤1␤1␤»
10:25 FROGGS hmmm
10:25 psch might be the getBI hack i guess
10:25 psch although i wouldn't know how
10:25 psch it's pretty terrible anyway, so if anyone has a better solution... :)
10:27 FROGGS getBI?
10:28 gensym joined #perl6
10:28 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 nine [Tux]: Writing lazy gather { ... } is an easy enough workaround
10:28 psch FROGGS: org.perl6.nqp.runtime.Ops.getBI
10:28 FROGGS psch: eeks!
10:28 psch FROGGS: ec6341f71b7164a38a367ee51d658187c2cf5833
10:28 * [Tux] tries that
10:29 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
10:32 nine psch: regarding the expected 'Positional' but got 'Seq', commits 9fdaf03b0a43e527f5a808f7a8eff68a18684be5 and 749b72e95f24ed75810666886c5c29efa47eec5a may be of interest
10:35 [Tux] nine, https://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
10:35 * [Tux] leaves for customer-visit. bbl
10:36 nine psch: yes, teaching the dispatcher about PositionalBindFailover was one of the very last changes of the GLR
10:42 telex joined #perl6
10:43 Ven joined #perl6
10:43 * masak leaves for a train &
10:44 Ven bai masak
10:45 Ven and \o, #perl6!
10:50 espadrine_ joined #perl6
10:55 colomon joined #perl6
10:57 telex joined #perl6
10:57 moritz http://blogs.perl.org/users/ovid/2015/09/flue​nt-interfaces-in-perl-6.html#comment-1615534 # people asking random, unrelated Perl 6 questions in response to any Perl 6 content at all
10:58 moritz oh, and OvidPerl++
10:58 sergot joined #perl6
10:59 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 psch ooh
11:01 psch duh
11:01 psch 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!
11:01 camelia rakudo-moar ed47bb: OUTPUT«ok 1 - @tap contained what was expected at the time␤»
11:01 camelia ..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: ''␤»
11:01 psch which is probably the same allomorph wonkiness
11:02 psch that's what i get for not actually copying and pasting the whole test :)
11:02 Skarsnik joined #perl6
11:07 telex joined #perl6
11:30 masak OvidPerl: just a minor stylistic thing in http://blogs.perl.org/users/ovid/2015​/09/fluent-interfaces-in-perl-6.html
11:31 masak 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:32 masak 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);
11:32 camelia rakudo-moar ed47bb: OUTPUT«1.000000 0.000000 0.000000 0.000000 0.000000␤»
11:32 camelia ..rakudo-jvm ed47bb: OUTPUT«java.lang.NumberFormatException: For input string: "nan"␤␤»
11:32 masak gfldex++ # whatever it is you're doing, it's interesting
11:34 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.
11:34 masak that's admirable.
11:34 gfldex nqp::sprintf seams not to like Seq much
11:35 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
11:35 masak gfldex: in any case, what you have above is rakudobuggable, definitely.
11:36 gfldex so NaN should numify to 0.0 instead of NaN?
11:38 masak no, it should numify to NaN.
11:38 masak m: say +"NaN"
11:38 camelia rakudo-moar ed47bb: OUTPUT«NaN␤»
11:38 masak NaN, despite the name, is of type number.
11:39 masak and if you numify a string with it, you get it.
11:39 masak ditto Inf and -Inf.
11:39 gfldex so nqp::sprintf is double wrong twice. I shall rakudobug at once!
11:41 masak gfldex++
11:45 telex joined #perl6
11:45 timotimo o/
11:47 timotimo https://confluence.jetbrains.com/display​/Kotlin/Type-safe+Groovy-style+builders - this reminds me of the discussion we've had about fluent interfaces and a "construct { }" block
11:47 timotimo masak: i think you were the one who suggested the construct block?
11:48 yakudza joined #perl6
11:53 thou joined #perl6
11:55 masak timotimo: yes, it would make a cute macro.
11:55 pmurias joined #perl6
11:58 FROGGS awwww, such macro
12:06 telex joined #perl6
12:08 telex joined #perl6
12:13 itz hmmm DEPRECATED is being used by ecosystem modules which means the warning appears with text suggests internal deprecation
12:14 itz maybe there should be RAKUDO_DEPRECATED (or similar) for internal deprecations and DEPRECATED be repurposed for module author use?
12:15 timotimo japhb: i shall push the extra microbenchmarks
12:16 timotimo japhb: though i'm a little bit hesitant, as there's already so many and benchmarking already takes rather long
12:16 timotimo japhb: also, the benchmarks have only a perl6 variant
12:24 timotimo japhb: i thought it doesn't meet the criteria for inclusion
12:25 Ven joined #perl6
12:34 Ulti are there any examples of NativeCall with a CPP object anywhere? or is that not a thing
12:37 [Coke] lizmat. +*==Inf is fine with me.
12:45 [Coke] there are already tickets about sprintf'ing nan, btw.
12:49 pmurias joined #perl6
12:49 xinming joined #perl6
13:02 dalek perl6-examples: c29c3b4 | (Steve Mynott)++ | categories/99-problems/P17-topo.pl:
13:02 dalek perl6-examples: [99probs] GLR fix P17-topo.pl
13:02 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/c29c3b451a
13:11 hernanGOA joined #perl6
13:11 telex joined #perl6
13:16 alpha-cent joined #perl6
13:17 _sri is Ovid correct here? http://blogs.perl.org/users/ovid/2015/09/flue​nt-interfaces-in-perl-6.html#comment-1615544
13:17 _sri is given really more perl6-ish than method chaining?
13:18 pink_mist . o O ( class Foo is Chaining ... )
13:19 _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, .... ) ?
13:20 PerlJam _sri: why sadly?
13:21 _sri PerlJam: i love fluent interfaces, and can't stand the style he's using
13:22 _sri it feels like trying to be different for the sake of it
13:22 Ven _sri: I'd agree
13:22 Ven given + .foo;.bar;.bar ... Looks like smalltalk :P
13:22 Ven _sri: well, I'd certainly prefer Employee.new(:name<foo>, :lastname<bar>), though.
13:23 _sri it's certainly not the best example, guess i'd use something more jQuery-ish
13:24 _sri or mojolicious-ish ;p
13:24 PerlJam heh
13:25 tokuhirom9 joined #perl6
13:25 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:26 PerlJam (does "fluent" == "method chaining"? )
13:26 _sri hah, you said given vs fluent ;p
13:27 _sri 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. :)
13:27 _sri or rather, the preferred version
13:27 masak I could see them being used, mind.
13:27 _sri masak: it's easy enough with a trait, as Ovid has shown in the old version of the wikipedia entry
13:28 masak yes, but the thing is that Perl 6 doesn't really set attribute values like that, generally.
13:28 _sri https://en.wikipedia.org/w/index.php?title=​Fluent_interface&amp;oldid=681159313#Perl_6
13:28 masak it's Perl 5-think.
13:28 masak we do it with `=`
13:28 _sri has NonEmptyString $.name    is chainymutable;
13:29 masak and so giving an example with chained setters is misleading because it's by definition not very idiomatic Perl 6.
13:29 masak it's "trying to cram chained methods into Perl 6".
13:30 khw joined #perl6
13:30 _sri to be fair, you don't do that much in ruby either
13:30 _sri but they have a nice looking example anyway
13:31 masak ...if you like duck-punching :P
13:31 masak in Ruby, IIRC, methods return `self` by default?
13:31 FROGGS joined #perl6
13:31 masak oh, no. that's not what's going on there.
13:32 PerlJam no, a "string" is just a String.
13:32 masak right.
13:32 masak yeah, that is a nice example.
13:32 masak we could copy that. :)
13:32 masak but maybe do the .&foo thing instead of punching the duck
13:34 masak yes, that's a good point. fluent interfaces and method chaining don't have to have anything to do with accessors/setters.
13:35 Ven masak: no, methods in ruby return their latest expression
13:37 cdc joined #perl6
13:39 masak yeah, I realized after looking at them for a while.
13:39 masak I was probably thinking of Smalltalk.
13:40 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 #perl6
13:41 thou joined #perl6
13:43 andreoss joined #perl6
13:43 masak ok.
13:43 _sri cdc: that's why you use an example like the ruby one
13:44 masak right. fluent interfaces don't have to be about setters.
13:45 cdc I agree: it's not about setters, that's why I suggested yesterday to add .say in the "given" block.
13:46 duncan_dmg joined #perl6
13:46 masak I agree that by the time you have a `given` block and individual statements inside, it's no longer a fluent interface.
13:47 PerlJam As long as it's not an effluent interface, I think we're okay.  ;)
13:48 masak but it's an interesting idea to have a syntactic convenience to turn something into a fluent interface, like (apparently) Smalltalk.
13:48 masak that could also be a macro, I guess.
13:48 Ven masak: well, isn't given enough?
13:48 masak the methods could return anything, but you can still do $obj.foo.bar.baz
13:48 masak Ven: I don't understand the question. conditional jumps are "enough".
13:49 masak 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 ».?
13:49 moritz .foo;.bar;.baz given $obj
13:49 Ven masak: I mean, instead of a macro
13:49 masak for me, most of the time, probably yes.
13:49 masak but I feel the question is a little bit of "what use is a newborn baby?"
13:50 andreoss m: say (0.1 ** 103 == 0)
13:50 camelia rakudo-moar ed47bb: OUTPUT«False␤»
13:50 andreoss m: say (0.0001 ** 100 == 0)
13:50 camelia rakudo-moar ed47bb: OUTPUT«True␤»
13:50 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:53 rurban joined #perl6
14:02 cognominal joined #perl6
14:03 dalek doc: 5d3eae7 | (Zoffix Znet)++ | lib/Language/5to6-perlop.pod:
14:03 dalek doc: Fix unescaped ">" in C<>
14:03 dalek doc: review: https://github.com/perl6/doc/commit/5d3eae7b5f
14:04 Ven m: my @a = gather for 1 { take |$_..Inf; }; say @a[^5];
14:04 camelia rakudo-moar ed47bb: OUTPUT«(1..Inf)␤»
14:04 Ven m: my @a = gather for 1 { take |$_..Inf; }; say @a[^5].perl
14:04 camelia rakudo-moar ed47bb: OUTPUT«(1..Inf,)␤»
14:04 Ven I can't `take |`?
14:06 thou joined #perl6
14:07 skids Ven: precedence on |.  But if you parenthesis $_..Inf it will hang.
14:07 skids Because the array assignment is eager.
14:08 Ven skids: Ha! even I get caught by this >.>
14:08 Ven m: my @a = gather for 1 { take |($_..Inf); }; say @a[^5].perl
14:08 grondilu oh cool the YAPC::EU keynote video is online
14:08 Ven nope, that's not to rakudo's liking
14:08 grondilu https://youtu.be/RvCkvXvqi3U
14:08 camelia rakudo-moar ed47bb: OUTPUT«(timeout)»
14:08 Loren joined #perl6
14:09 telex joined #perl6
14:09 skids $a = should work, but also hangs for some reason.
14:09 Loren evening #perl6.
14:10 FROGGS_ joined #perl6
14:10 skids Oh, I know why.
14:10 skids nope, nm.
14:12 skids 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)␤»
14:12 moritz the problem with take |($_..Inf) is that it tries to pass an infinitely long argument list to &take
14:14 skids Isn't | basically slip() ?
14:15 masak trying to pass an infinitely long argument list sounds like a thing that ought to fail as early as possible.
14:16 skids Or, is that what the mystery S07 line 159 means?
14:16 skids That | at the front of an arglist is special somehow...
14:17 ugexe FROGGS_: agreed on suggested file path change for CURLI
14:17 itz is liz off travelling?
14:18 FROGGS_ ugexe: cool!
14:18 FROGGS_ let's doit then :o)
14:18 FROGGS_ and also add install capabilities to CURLF
14:19 FROGGS_ and precomp, but more cache-like
14:22 ugexe precomp would still be a method of CU right?
14:24 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/FZf4jjk7u0␤Strange 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…»
14:24 nine m: my @a = gather for 1 { take $_ for $_..Inf; }; say @a[^5].perl;
14:24 nine m: my @a = lazy gather for 1 { take $_ for $_..Inf; }; say @a[^5].perl;
14:24 camelia rakudo-moar ed47bb: OUTPUT«(timeout)»
14:24 camelia rakudo-moar ed47bb: OUTPUT«(1, 2, 3, 4, 5)␤»
14:24 nine m: my @a = lazy gather for 1 { take $_ for $_..Inf; }; say @a[^5].perl;
14:24 camelia rakudo-moar ed47bb: OUTPUT«(1, 2, 3, 4, 5)␤»
14:25 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?
14:26 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 (http://pastebin.com/EAzAM18D)
14:34 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:36 plicease joined #perl6
14:36 FROGGS_ ugexe: interesting aspect...
14:36 FROGGS_ I'll think about it
14:37 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 carlin joined #perl6
14:43 cgfbee joined #perl6
14:44 cfloare joined #perl6
14:45 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:47 carlin m: say now
14:47 camelia rakudo-moar ed47bb: OUTPUT«Instant:1442414905.049917␤»
14:48 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:51 tokuhiro_ joined #perl6
14:52 dalek roast: ce80412 | skids++ | integration/error-reporting.t:
14:52 dalek roast: Add test for RT#113888
14:52 dalek roast: review: https://github.com/perl6/roast/commit/ce804126b5
14:52 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=113888
15:08 telex joined #perl6
15:11 * grondilu listened to Larry saying:  "For instance, I wanted our compiler to be completely bootstrapped on full Perl6 code".
15:12 grondilu ^That's not possible, is it?  Something like a Tarski theorem or something.
15:14 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
15:14 Ven or a compiled version of it (say, in JS) that you can compile
15:15 Ven 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
15:15 pmurias grondilu: NQP is just faster
15:16 Ven grondilu: well, what language is your C compiler written in?
15:16 Ven ok, it's actually written in C++. the point still stands :P.
15:16 TimToady I know, we should just write the nqp compiler in Perl 6
15:16 cognominal grondilu, to state that in biologic terms, ontogeny does not need to fully recapitulate phylogeny
15:17 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
15:17 TimToady I would say that nqp's grammar is one of the places where nqp is pretty close to full Perl 6
15:18 BooK This reminds of cranes. They say it takes one to build one.
15:21 itz someone on another channel read S07-glr-draft.pod by mistake rather than S07, wondering whether to delete it
15:21 araujo joined #perl6
15:21 PerlJam didn't jnthn update S07 to match reality?  If so, I'd say delete S07-glr-draft
15:22 TimToady +1
15:23 dalek perl6-examples: 954185f | paultcochrane++ | categories/99-problems/P09-topo.pl:
15:23 dalek perl6-examples: [99probs] fix P09-topo post GLR
15:23 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/954185f045
15:25 dalek specs: e80063c | (Steve Mynott)++ | S07-glr-draft.pod:
15:25 dalek specs: delete S07-glr-draft.pod. OK on IRC
15:25 dalek specs: review: https://github.com/perl6/specs/commit/e80063ccf3
15:29 jnthn (glr-draft) aye, JFDI
15:29 jnthn Oh, already did :)
15:31 araujo joined #perl6
15:32 pmurias S07 has been updated?
15:32 PerlJam about a week ago IIRC
15:33 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 renormalist joined #perl6
15:33 jnthn But for the stuff people will typically encounter using Perl 6, yes.
15:34 pmurias great
15:35 jnthn I'll get back to it soonish
15:35 jnthn But been a bit tied up with talks.
15:36 dalek ecosystem: c12405a | (Shoichi Kaji)++ | META.list:
15:36 dalek ecosystem: Add App::Mi6
15:36 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/c12405a445
15:36 dalek ecosystem: 27034b7 | ab5tract++ | META.list:
15:36 dalek ecosystem: Merge pull request #57 from shoichikaji/add-module
15:36 dalek ecosystem:
15:36 dalek ecosystem: Add App::Mi6
15:36 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/27034b79ed
15:40 FROGGS_ ugexe: a CU can also be constructed from memory, so there might be no file involved at all...
15:40 Alina-malina joined #perl6
15:40 FROGGS_ ugexe: but I think we need to shell out anyway for the time being when precompiling things
15:40 FROGGS_ ugexe: this also let's us easily precompile for several backends at once
15:42 psch #note "*cough* {c.perl} -> {$test(|c).perl}";
15:42 FROGGS_ hmm?
15:42 arnsholt r: my int @dims[2; 2] = (1,2;3,4); say @dims[1;1] # I wonder...
15:42 camelia rakudo-jvm ed47bb: ( no output )
15:42 camelia ..rakudo-moar ed47bb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmpfile␤Shaped 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␤»
15:42 psch FROGGS_: Any-iterable-methods.pm:306
15:42 * psch feels less bad about having commited "if %*ENV<DEBUG_PLS>" once :P
15:44 araujo joined #perl6
15:44 araujo joined #perl6
15:48 * colomon is trying to remember where he recently bumped into discussion about a package alleged to be great for visual graphing ….
15:50 arnsholt Just creating plots of data, you mean?
15:50 arnsholt Might be ggplot for R?
15:51 arnsholt Or pandas for Python
15:52 colomon arnsholt: yeah, something like graphviz.  Only I seem to recall this one was alleged to be better than graphviz.
15:54 telex joined #perl6
15:54 colomon err… so perhaps nothing at all like ggplot.  :)
15:57 dalek perl6-roast-data: b4d2bcc | coke++ | / (9 files):
15:57 dalek perl6-roast-data: today (automated commit)
15:57 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/b4d2bcc7e9
16:13 domidumont joined #perl6
16:15 domidumont joined #perl6
16:16 telex joined #perl6
16:20 TEttinger joined #perl6
16:27 spider-mario joined #perl6
16:27 adu joined #perl6
16:37 arnsholt Oh, graphviz. No idea then, I'm afraid
16:37 psch r: say %(a => 1, b => 2).pairs.grep: { True }
16:37 camelia rakudo-jvm ed47bb: OUTPUT«(b => 2 a => 1)␤»
16:37 camelia ..rakudo-moar ed47bb: OUTPUT«(a => 1 b => 2)␤»
16:37 psch r: say grep { True }, %(a => 1, b => 2).pairs
16:37 camelia rakudo-moar ed47bb: OUTPUT«(a => 1 b => 2)␤»
16:37 camelia ..rakudo-jvm ed47bb: OUTPUT«Type check failed in binding @values; expected 'Positional' but got 'Seq'␤  in block <unit> at /tmp/tmpfile:1␤␤»
16:37 psch ...but sub grep calls @values.grep? :/
16:38 Sqirrel joined #perl6
16:43 nine psch: .pairs returns a Seq
16:43 nine psch: we never return lists unless absolutely necessary
16:44 patrickz joined #perl6
16:45 psch nine: how does that help with the discrepancy between moar and jvm and the sub and method form? :s
16:45 psch the method form works on both, but sub only breaks on jvm
16:46 frodwith joined #perl6
16:48 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:49 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
16:50 pink_mist why is there a difference between moar and jvm though?
16:50 psch pink_mist: because the jvm Binder isn't correct
16:50 pink_mist ah
16:53 hoelzro joined #perl6
16:54 hoelzro o/ #perl6
16:54 * hoelzro got k-lined =(
16:56 FROGGS_ o/
17:08 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:09 [Coke] moritz++ caching kinds.
17:09 ugexe i understand what you are getting at though
17:14 muraiki joined #perl6
17:16 perl6_newbee joined #perl6
17:20 [Coke] m: my @a=1,2,3;my $a=@a;for @a {.say};for $a {.say}
17:20 camelia rakudo-moar ed47bb: OUTPUT«1␤2␤3␤[1 2 3]␤»
17:20 telex joined #perl6
17:21 [Coke] (needed somethign I could paste into a FB thread. :)
17:22 telex joined #perl6
17:22 psch hrm, hack is at 140 load avg
17:23 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 #perl6
17:33 [ptc] m: [+] (True); [+] (True, False)
17:33 camelia rakudo-moar ed47bb: ( no output )
17:33 [ptc] m: say [+] (True); say [+] (True, False)
17:33 camelia rakudo-moar ed47bb: OUTPUT«True␤1␤»
17:33 [ptc] m: say [+] (True,); say [+] (True, False)
17:33 camelia rakudo-moar ed47bb: OUTPUT«True␤1␤»
17:33 timotimo oh interessant
17:33 timotimo it does not mummify like prefix +
17:33 [ptc] why does that happen?
17:34 timotimo check the one-parameter version of infix +
17:34 [Coke] skids: can you explain the all() in https://github.com/perl6/roast/commit/c​e804126b542a026c3ce9eb21dc4d1b35608e9d4 ?
17:34 timotimo I'm using a phone right now, so i can't do it quickly
17:34 skids mummification is usually a slow chemical reaction between the embalming fliud and the skin.
17:34 [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.
17:35 skids [Coke]: other tests did that to test more than one rx//
17:35 skids print 'a'.WHAT
17:35 skids m: print 'a'.WHAT
17:35 camelia rakudo-moar ed47bb: OUTPUT«Use of uninitialized value of type Str in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block <unit> at /tmp/cCv1ik3juY:1␤»
17:35 [ptc] timotimo: do you mean to check the code in Rakudo?
17:35 [Coke] m: print "a".WHAT
17:35 camelia rakudo-moar ed47bb: OUTPUT«Use of uninitialized value of type Str in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block <unit> at /tmp/cERsmz8Yvz:1␤»
17:35 timotimo yes
17:35 [ptc] ok, will do
17:36 [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.
17:36 * [Coke] also doesn't autoscroll to the bottom before sending something, whoops. :)
17:37 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
17:38 * 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
17:39 [ptc] timotimo: no worries, I'm trying to git grep the best I can :-)
17:39 timotimo m: say True.Numeric
17:39 camelia rakudo-moar ed47bb: OUTPUT«1␤»
17:39 timotimo it is in numeric.pm
17:39 timotimo capital n
17:39 [ptc] wow, you're good!!!
17:39 * [ptc] puts on impressed look
17:39 timotimo haha
17:40 timotimo it's just experience
17:40 timotimo but why does it not call the one argument version fifor the one element list?
17:40 timotimo m: say [+](True)
17:40 camelia rakudo-moar ed47bb: OUTPUT«True␤»
17:41 timotimo er
17:41 timotimo m: &[+](True)
17:41 camelia rakudo-moar ed47bb: ( no output )
17:41 timotimo damn it
17:41 timotimo m: say &[+](True)
17:41 camelia rakudo-moar ed47bb: OUTPUT«1␤»
17:42 [ptc] m: [-](True)
17:42 camelia rakudo-moar ed47bb: ( no output )
17:42 [ptc] m: say [-](True)
17:42 camelia rakudo-moar ed47bb: OUTPUT«True␤»
17:42 [ptc] m: say [-](False)
17:42 camelia rakudo-moar ed47bb: OUTPUT«False␤»
17:42 [ptc] maybe there isn't a one argument version?
17:42 [ptc] everything looks ok/consistent in Numeric.pm
17:43 [Coke] lots of "make test" failures on OS X: https://gist.github.com/coke/58515c044cd59c6e454d
17:43 grondilu wow this actually works:
17:43 [Coke] all nativecall related.
17:43 grondilu m: say [Z+] (1, 2), (3, 4);
17:43 camelia rakudo-moar ed47bb: OUTPUT«(4 6)␤»
17:43 timotimo of course it works
17:43 TimToady ENODALEK
17:44 [ptc] can't exterminate?
17:44 * [Coke] stares at grondilu's send.
17:45 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)
17:45 camelia rakudo-moar ed47bb: OUTPUT«True␤1␤»
17:46 [ptc] timotimo: there doesn't seem to be a single-arg version of infix:+
17:46 timotimo [pi saw it
17:46 FROGGS m: class Foo { ... }; class Bar does Foo { }; role Foo { } # was that reported already?
17:46 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…»
17:46 timotimo it's the one that also handles the 0 arg case
17:47 skids m: +().say
17:47 camelia rakudo-moar ed47bb: OUTPUT«WARNINGS:␤Useless use of "+" in expression "+().say" in sink context (line 1)␤()␤»
17:47 [ptc] do you mean this: multi sub infix:<+>($x = 0)      { $x.Numeric }
17:47 skids m: (+()).say
17:47 camelia rakudo-moar ed47bb: OUTPUT«0␤»
17:47 skids Most operators with identity build off that.
17:47 [ptc] but that only handles the case where the input is zero, or am I misunderstanding the code?
17:48 TimToady skids: that's just calling ().Numeric
17:48 skids [ptc]: no that's a default value.
17:48 telex joined #perl6
17:48 grondilu m: say [»+«] (1, 2), (3, 4);
17:48 camelia rakudo-moar ed47bb: OUTPUT«(4 6)␤»
17:48 [ptc] skids: ah, ok
17:48 grondilu m: say [»+«] (^1024).rotor(4);
17:48 camelia rakudo-moar ed47bb: OUTPUT«(130560 130816 131072 131328)␤»
17:48 grondilu m: say [+] [»+«] (^1024).rotor(4);
17:48 camelia rakudo-moar ed47bb: OUTPUT«523776␤»
17:48 [ptc] skids: yes, of course.  Wasn't thinking of it as a default value...
17:48 grondilu m: say [+] ^1024
17:48 camelia rakudo-moar ed47bb: OUTPUT«523776␤»
17:49 grondilu m: say [+] [»+«] (rand xx 1024).rotor(4); say now - INIT now;
17:49 camelia rakudo-moar ed47bb: OUTPUT«521.356479573331␤0.2698897␤»
17:49 grondilu m: say [+] ^1024; say now - INIT now
17:49 camelia rakudo-moar ed47bb: OUTPUT«523776␤0.0047310␤»
17:50 grondilu m: say [+] [»+«] (rand xx 1024*32).rotor(4); say now - INIT now;
17:50 camelia rakudo-moar ed47bb: OUTPUT«16374.3125817925␤7.5548696␤»
17:50 grondilu m: say [+] ^(1024*32); say now - INIT now
17:50 camelia rakudo-moar ed47bb: OUTPUT«536854528␤0.04957762␤»
17:51 * grondilu forgot to use rand
17:51 grondilu m: say [+] rand xx (1024*32); say now - INIT now
17:51 camelia rakudo-moar ed47bb: OUTPUT«16397.0718246223␤0.2615754␤»
17:52 grondilu m: say [+] [»+«] (rand xx 1024*400).rotor(4); say now - INIT now;
17:52 camelia rakudo-moar ed47bb: OUTPUT«(timeout)»
17:53 grondilu m: say [+] rand xx (1024*400); say now - INIT now
17:53 camelia rakudo-moar ed47bb: OUTPUT«204682.28740312␤3.09294368␤»
17:53 [ptc] m: True.Numeric
17:53 camelia rakudo-moar ed47bb: ( no output )
17:53 [ptc] m: say True.Numeric
17:53 camelia rakudo-moar ed47bb: OUTPUT«1␤»
17:54 telex joined #perl6
17:55 [ptc] m: say +True
17:55 camelia rakudo-moar ed47bb: OUTPUT«1␤»
17:55 [ptc] m: say [+]True
17:55 camelia rakudo-moar ed47bb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ScL2pTLP6Q␤Two terms in a row␤at /tmp/ScL2pTLP6Q:1␤------> 3say [+]7⏏5True␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        stateme…»
17:55 [ptc] m: say [+](True)
17:55 camelia rakudo-moar ed47bb: OUTPUT«True␤»
17:56 [ptc] is that a rakudobug, or is that just plain PEBKAC?
17:56 TimToady neither, I think
17:56 sufrostico joined #perl6
17:57 TimToady see S03:4637
17:57 nine How many lines should $io.lines return for a file containing exactly "foo\n"?
17:59 * [ptc] looks
18:01 TimToady nine: why would it be anything other than 1?
18:02 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.
18:02 TimToady 2 would be wrong
18:02 nine I first thought it's a regression from jnthn's performance work, but it behaved just the same previously.
18:02 TimToady nine: did you see this bug:
18:02 TimToady m: for $[1,2,3] { .say }; .say for $[1,2,3]
18:02 camelia rakudo-moar ed47bb: OUTPUT«[1 2 3]␤1␤2␤3␤»
18:03 TimToady we currently have two tests failing because of that one
18:03 nine TimToady: yes, that's the next issue on my list
18:03 TimToady in a related issue, I just checked in a new slurpy that does one-arg
18:04 nine Oh nice!
18:04 TimToady m: sub foo (+@args) { say @args.elems }; foo [1..4]; foo [1..4],2
18:04 camelia rakudo-moar ed47bb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/oxfEcA7C5n␤Malformed parameter␤at /tmp/oxfEcA7C5n:1␤------> 3sub foo (7⏏5+@args) { say @args.elems }; foo [1..4];␤    expecting any of:␤        formal parameter␤»
18:04 TimToady that should work in a few minutes
18:04 nine So it's not |@args after all
18:04 TimToady no, I decided solutions with | or \ looked too confusing
18:04 TimToady and this also gives us +args for the raw form
18:09 TimToady 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:10 rurban joined #perl6
18:14 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 TimToady but it's enough to start playing with
18:15 TimToady afk &
18:32 lichtkind joined #perl6
18:38 dha joined #perl6
18:39 dha joined #perl6
18:44 tping joined #perl6
18:49 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: https://gist.github.com/mu​raiki/24c7dac46733b58abcfb
18:49 muraiki if I remove the .unique line, it works without a problem
18:50 [Coke] moritz: my open irssi session seems very responsive... that's about it, though.
18:51 telex joined #perl6
18:52 moritz the last nagios alert said load average: 32.54
18:52 [ptc] moritz: hope that's not the perl6-examples going haywire again
18:53 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:54 [ptc] hrm, ssh to hack is taking ages...
18:54 moritz [ptc]: did you add ulimits?
18:54 [ptc] moritz: I thought you did...
18:54 moritz dha: I don't think it changed
18:54 [Coke] I'm ON hack, and opening a new screen shell isn't happening.
18:54 dha Cool.
18:54 sufrostico joined #perl6
18:54 moritz dha: fwiw I think a better way to get review would be to open pull requests
18:55 [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 moritz [Coke]: unlikely
18:55 [ptc] moritz++
18:55 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
18:55 dha moritz - ok. So noted.
18:55 [Coke] moritz: ah, tht window is frozen. it's just irssi that's behaving nicely. :)
18:56 moritz [Coke]: time to reboot hack? :/
18:56 [ptc] is the load higher than 32 in nagios now?
18:57 [ptc] ... 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
18:57 moritz (and no access to the web interface, I think)
18:58 [ptc] ah, ok
18:58 * moritz powercycles it
18:59 sufrostico joined #perl6
18:59 dalek joined #perl6
19:00 telex joined #perl6
19:02 psch joined #perl6
19:02 telex joined #perl6
19:02 psch fwiw, the highest load i saw on hack (before i went for a walk about 25 minutes ago) was around 470
19:04 _itz it might be worth enabling sar(1) accounting in order to display historic load etc from the command line
19:05 [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 [ptc] _itz: also not a bad idea
19:05 dalek doc: 9be03d2 | (David H. Adler)++ | lib/Language/variables.pod:
19:05 dalek doc: Changed code example for C<state> and tweaked related language
19:05 dalek doc: review: https://github.com/perl6/doc/commit/9be03d2b93
19:06 _itz http://www.leonardoborda.com/blog/how-t​o-configure-sysstatsar-on-ubuntudebian/
19:06 _itz I would probably ignore step 3 in that
19:06 dalek rakudo/nom: 9fb93a9 | (Stefan Seifert)++ | src/core/IO/Handle.pm:
19:06 dalek rakudo/nom: Fix lines() returning an empty line at EOF
19:06 dalek rakudo/nom:
19:06 dalek rakudo/nom: IO::Handle::lines now behaves exactly like Perl 5's:
19:06 dalek rakudo/nom: lines on a file containing "" will return 0 lines.
19:06 dalek rakudo/nom: lines on a file containing "\n" will return one line containing "".
19:06 dalek rakudo/nom: lines on a file containing "foo" will return one line containing "foo".
19:06 dalek rakudo/nom: lines on a file containing "foo\n" will return one line containing "foo".
19:06 dalek rakudo/nom: lines on a file containing "foo\nbar" will return two lines.
19:06 dalek rakudo/nom: With .chomp set to False on the handle the behavior is the same except for the
19:06 dalek rakudo/nom: \n still there if it was in the input file.
19:06 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9fb93a9128
19:07 nine This ^^^ fixes the t/spec/S32-io/pipe.t regression.
19:07 nine Sadly it also costs quite a bit of performance :/
19:07 timotimo damn :(
19:08 _itz [ptc]: one of the examples seemed to hang post glr .. I forget details
19:08 _itz maybe *060* something
19:08 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...
19:09 dalek star: 3051d54 | (Steve Mynott)++ | docs/cheatsheet.txt:
19:09 dalek star: parcel is now list and keep comma
19:09 dalek star: review: https://github.com/rakudo/star/commit/3051d54372
19:09 dalek star: 0304600 | lizmat++ | docs/cheatsheet.txt:
19:09 dalek star: Merge pull request #49 from stmuk/master
19:09 dalek star:
19:09 dalek star: parcel is now list and keep comma
19:09 dalek star: review: https://github.com/rakudo/star/commit/0304600394
19:09 lizmat joined #perl6
19:09 [Coke] joined #perl6
19:09 timotimo hehe
19:10 rurban joined #perl6
19:11 [ptc] _itz: yes, there are many which aren't yet working again
19:11 [ptc] _itz: I'm having a hard time working out what the correct array/list syntax should be so that things wokr again
19:11 * lizmat waves from home
19:11 lizmat really
19:11 [ptc] *work
19:11 [ptc] o/
19:11 _itz [ptc]: yes its not easy :/
19:11 lizmat [ptc] o/
19:12 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 moritz _itz: as happens with collectd, for example (http://collect.p6c.org/)
19:12 [Coke] only 231 views on larry's christmas q&a. Share and Enjoy! ;)
19:12 _itz moritz: this is true .. but sar is lightweight and can give insight when compared against cron logs etc
19:13 moritz _itz: I'll give it a try
19:14 dalek doc: c2fd7e7 | (David H. Adler)++ | lib/Language/regexes.pod:
19:14 dalek doc: Added language to specify the default values for C<:c>
19:14 dalek doc: review: https://github.com/perl6/doc/commit/c2fd7e7514
19:14 dalek doc: a5cc58c | (David H. Adler)++ | WANTED:
19:14 dalek doc: Added C<srand> and C<state> to WANTED
19:14 dalek joined #perl6
19:16 * _itz votes up on https://www.reddit.com/r/perl6/
19:17 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:19 Util joined #perl6
19:20 [ptc] Util: did you get my email wrt the parrot.org certifcate?
19:21 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
19:21 [ptc] I sent it at the end of August.  Just wondering if I used the correct address
19:22 kanishka joined #perl6
19:23 bartolin moritz++
19:24 _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.
19:24 bartolin moritz: looks like there is not a single file on hack which was last modified between 17 and 18:55 CEST.
19:24 [ptc] Util: oh, ok.  Hope you're feeling better now!
19:24 Util [ptc]: I will handle it. Thanks for routing it to me, and for the extra reminder.
19:25 [ptc] Util: no probs!  Thanks for handling it :-)
19:25 bartolin moritz: that makes me think that the disk was completely unavailable
19:26 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:27 [ptc] Util: :-)
19:31 dalek rakudo/nom: 197fbbf | (Stefan Seifert)++ | src/Perl6/Actions.nqp:
19:31 dalek rakudo/nom: Allow for itemization to prevent iteration for statement modfier for
19:31 dalek rakudo/nom:
19:31 dalek rakudo/nom: foo() for $@arr; will now iterate only once, just like for $@arr { foo() }
19:31 dalek rakudo/nom: Fixes t/spec/S04-statement-modifiers/for.t
19:31 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/197fbbfcb6
19:31 dalek roast: d72abe5 | (Stefan Seifert)++ | S06-signature/passing-arrays.t:
19:31 dalek roast: Need to un-itemize the passed list for for to iterate
19:31 dalek roast: review: https://github.com/perl6/roast/commit/d72abe57cb
19:31 dalek roast: 143a705 | (Stefan Seifert)++ | S32-list/squish.t:
19:31 dalek roast: Remove obsolete todo markers
19:31 dalek roast: review: https://github.com/perl6/roast/commit/143a7057c6
19:31 nine We're now spec test clean :)
19:32 bartolin \o/ nine++
19:32 [ptc] nine++
19:32 telex joined #perl6
19:33 sjn nine++
19:37 lizmat nine: re 9fb93a9128e45ef227343816dc , I looked at doing that way as well, but decided against that
19:37 lizmat I feel the problem is *really* with nqp::eoffh
19:37 nine lizmat: I concur
19:38 lizmat this solution is fine ad interim, but it slows .lines down with ~ 15%
19:38 thou joined #perl6
19:38 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
19:39 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  :-)
19:40 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...
19:40 FROGGS that's a problem we won't solve
19:41 alpha- left #perl6
19:41 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?
19:42 TimToady m: sub foo (+@args) { say @args.elems }; foo [1..4]; foo [1..4],2
19:42 camelia rakudo-moar 9fb93a: OUTPUT«4␤2␤»
19:42 FROGGS I mean, we don't want to know how many chars are in there
19:42 [Coke] reminder to everyone who did stuff in the past -two- months, release tomorrow, update the changelog!
19:42 nine FROGGS: it's what we do in Str.Bool. If we find something better, we should use it there, too
19:42 FROGGS ohh
19:42 FROGGS interesting
19:42 FROGGS [Coke]: aye captain
19:43 [Coke] That's Mr. Dr. Captain, to you.
19:43 FROGGS [Coke]: :P
19:43 FROGGS [Coke]: at what time (offset to now) are you probably start cutting the release?
19:44 nine TimToady: have you had a look at the gmr branch lately? I'd like to talk about merging :)
19:44 diana_olhovik_ joined #perl6
19:46 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:47 bartolin moritz: that shouldn't be too hard and could give some insights ...
19:48 bartolin s/are duplicated and/is/
19:49 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.
19:49 FROGGS [Coke]: very good
19:49 [Coke] it will probably take up my evening tomorrow.
19:49 psch dha: i think =head3 for with{,out} works better - it's still just a special case, not a new construct
19:50 dha psch - me too. Thanks.
19:50 psch oh, but that was already PR'd :)
19:50 TimToady nine: I'm okay with gmr, esp if it gets us closer to using real object arrays for sets, etc.
19:51 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 ?
19:52 TimToady s/arrays/hashes/ I meant
19:52 FROGGS m: say "".split: ""
19:52 camelia rakudo-moar 9fb93a: OUTPUT«()␤»
19:52 FROGGS star-m: say "".split: ""
19:52 camelia star-m 2015.03: OUTPUT«Nil␤»
19:52 lizmat TimToady: *phew*  :-)
19:53 lizmat 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:54 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
19:54 nine I'm on MoarVM master and nqp master from mere minutes ago
19:55 vendethiel joined #perl6
19:55 lizmat nine: going to run a spectest in a mo
19:56 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.
19:57 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]␤»
19:58 TimToady there's the bug I mentioned, shouldn't flatten that first onearg
19:58 tokuhiro_ joined #perl6
19:58 nine TimToady: why not? It's an Iterable
19:59 [Coke] nine; you could grep through the previous log/ commits on coke/perl6-roast-data to see.
20:00 TimToady m: sub foo (+@args) { say @args.perl }; foo (1..*); foo (1..*),2
20:00 camelia rakudo-moar 197fbb: OUTPUT«(timeout)»
20:00 TimToady m: sub foo (+@args) { say @args.perl }; foo (1..*),2
20:00 camelia rakudo-moar 197fbb: OUTPUT«[1..Inf, 2]␤»
20:01 TimToady a slurpy should handle an infinite list
20:01 rindolf joined #perl6
20:03 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:04 dalek rakudo/nom: 0d8da86 | FROGGS++ | docs/ChangeLog:
20:04 dalek rakudo/nom: add my changes to the changelog
20:04 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0d8da86498
20:05 Sgeo joined #perl6
20:06 dha Pull request for LINEs added.
20:06 jdv79 nine: what
20:07 FROGGS nine is just a four letter word
20:07 nine jdv79: obviously you are not familiar with Horse the Band :)
20:07 jdv79 nope
20:07 dha Me neither.
20:07 lizmat nine: I just see a failure in t/spec/S06-signature/passing-arrays.t  (repeatble)
20:08 lizmat not ok 4 - count2((1,2,3))   ( expected 3, got 1)
20:08 nine lizmat: I fixed that?
20:08 lizmat ah...  oops
20:08 nine lizmat: roast commit 143a7057c6630a1a893e731f591db819823d3209
20:09 lizmat i had some changes in spec that blocked the spectest update
20:14 telex joined #perl6
20:19 AlexDaniel joined #perl6
20:31 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?
20:32 FROGGS timotimo: now it sounds less russian :D
20:32 colomon joined #perl6
20:32 FROGGS dha: I've never used it
20:32 jdv79 ditto
20:32 dha Me neither. But it needs to be documented. :-)
20:32 FROGGS hehe
20:33 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.
20:33 dalek rakudo/nom: 3c0cd8a | FROGGS++ | docs/ChangeLog:
20:33 dalek rakudo/nom: fix grammar-o in changelog, timotimo++
20:33 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3c0cd8a0f5
20:33 jdv79 ha
20:33 dha which is what the p5 example does.
20:34 dha 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:35 jdv79 make sure to get the real whys
20:35 jdv79 if any.  may be useful.
20:35 dha Oh, In intend to.
20:35 * dha even has a pen and a notebook with him.
20:36 timotimo will one notebook suffice?
20:37 dha It's a so far unused notebook.
20:37 dha 240 pages. It's a start.
20:40 dha Hm. I think the p5 example for redo is confusing. That will not help.
20:41 jdv79 my naive guess is that redo is not particularly useful/applicable
20:42 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...
20:42 camelia rakudo-moar 0d8da8: OUTPUT«16␤»
20:42 dha "Eh. don't bother."
20:42 jdv79 probably not
20:42 psch redo seems like a very TIMTOWTDI op
20:43 psch (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.
20:44 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:45 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␤»
20:45 psch well, except for the inline comment :)
20:45 dha psch -  hm. Maybe. Takes a bit of thought, but it might do.
20:46 psch dha: yeah, redo seems very foresight-y, fwiw
20:46 telex joined #perl6
20:46 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;
20:46 camelia rakudo-moar 0d8da8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/94OKBxl1VE␤Variable '$draw' is not declared␤at /tmp/94OKBxl1VE:1␤------> 3my @deck; for (^5) { 7⏏5$draw = <j q k a joker>.pick; redo if $d␤»
20:46 skids m: my @deck; for (^5) { my $draw = <j q k a joker>.pick; redo if $draw eq joker; @deck[$_] = $draw }; @deck.say;
20:46 camelia rakudo-moar 0d8da8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/bDEAVcOmbX␤Undeclared routine:␤    joker used at line 1␤␤»
20:46 skids ah anyway.
20:47 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 #perl6
20:48 telex joined #perl6
20:50 dha do we have a pastebot?
20:51 zacts joined #perl6
20:52 timotimo what does "pastebot" mean?
20:52 mst is there a conversation going on about redo in here?
20:52 mst all the help channels I'm in are getting spammed with questions about it at once
20:52 timotimo some place you can paste to that'll automatically put the url to the paste in the channel?
20:52 skids We already redid it.
20:53 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?
20:54 timotimo easy
20:54 timotimo the site is without docs
20:56 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 #perl6
20:57 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.
20:57 jdv79 can  we dump it?
20:58 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.
20:58 mst anybody who doesn't think it's a mistake gets to provide an example :)
20:58 dha mst -  this *has* been suggested. :-)
20:58 skids Why?  There are those that would say any given procedural code can be better rewritten in functional style.
20:58 jdv79 should tht heading be with/orwith/without or something (mainly include orwith somehow) - idk
20:58 lizmat jdv79: there is one use of redo in metaops.pm
20:59 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]␤»
20:59 psch not sure how i do that with "next"
20:59 psch ...if i'm confusing rand and it doesn't go to 1, make that a 0
21:00 mst while 1 { my $x = rand; next if $x == 1; $_ *= $x; last; }
21:00 dha http://www.panix.com/~dha/test/redo.txt
21:01 masak joined #perl6
21:01 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
21:01 dha jdv79 -  I had thought about that. If people think adding orwith, I would do so. Is there an orwithout?
21:01 skids mst: The point you miss is you can iterate naively at the top of the loop and have your iterator restored.
21:01 mst psch: but really that seems highly contrivbed
21:02 mst 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.
21:02 jdv79 dha: orwith is in the example - just not the head - no big deal
21:03 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?
21:03 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
21:03 jdv79 orwith is just elsif so i'd guess no
21:03 psch mst: you're multiplying 1 by rand, i'm multiplying 0..4
21:03 * skids shuts up as there are obviously some bad moods for some weird reason, time to decommute anyway.
21:04 psch mst++ # fueling the fir^Wdiscussion
21:04 mst psch: I was attempting to translate psuedocode
21:04 mst psch: my response was expected to be imperfect
21:08 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...
21:08 mst psch: but, yeah, my point is that for any real, actual, code, I've ended up rewriting it
21:09 mst 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
21:12 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 { ... }
21:12 jdv79 q
21:12 timotimo with three dots in there
21:12 jdv79 oops
21:12 timotimo that's how you declare a stubbed class in perl6
21:13 dha so, assuming I'm not just going to write "=head2 redo\n\nFOR THE LOVE OF GOD WHY????", what do people think of http://www.panix.com/~dha/test/redo.txt ?
21:14 sufrostico joined #perl6
21:15 mst right, but that's a "don't do that" example
21:15 timotimo how about user interaction?
21:15 timotimo "please input a number"?
21:16 mst oooh, yes, I've done that and it actually wasn't terrible
21:16 mst I did eventually rewrite it with 'last if' instead of 'redo unless'
21:16 Skarsnik timotimo, ok, thank you :)
21:17 timotimo you're welcome :)
21:17 mst but I'm pretty sure that was as I added features
21:17 mst and the original version with redo wasn't actually evil
21:17 mst i.e. I outgrew it, but it didn't originally suck
21:17 mst timotimo++ # good call
21:18 mst { my $x = prompt("Enter a number"); redo unless is_a_number($x) }
21:18 timotimo thank you :)
21:19 mst dha: ^^ solved
21:19 dha Yay!
21:19 timotimo i'm glad you're hanging out in here, mst :)
21:20 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++
21:20 timotimo one good guideline is "we can never typecheck on method calls, except for private methods"
21:20 timotimo i mean
21:20 timotimo check at compile time
21:24 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
21:24 masak mst: not just a block, because a block ain't a loop
21:24 timotimo the thing about methods is that they are late-bound and perl6 does not restrict the signature of methods in derived classes
21:24 mst masak: oh, right, you can redo a block in perl5
21:25 masak aye
21:25 mst I was mostly illustrating the idea
21:25 mst as with the while loop
21:25 masak IIUC, blocks are loops in Perl 5 'cus that's how the `do {} while` and `do {} until` loops can actually loop
21:25 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
21:26 masak timotimo: correct
21:26 mst masak: works with plain blocks too, so I'm not sure that's quite it
21:26 masak hm.
21:27 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 mst so, um, not necessarily claiming it's a good idea, just that it's there :)
21:27 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
21:28 muraiki Skarsnik: this presentation helped me grok why methods are late bound in p6: http://jnthn.net/papers/201​5-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:36 dha I have got pull requests coming out of my ears today...
21:37 masak your ears are sending you pull requests? :P
21:37 * masak .oO( patch to make user listen more )
21:37 jdv79 first sucessful p6 cpan upload of a well formed dist file
21:37 timotimo are you sure you're the first?
21:37 timotimo didn't froggs or lizmat do that a few months back?
21:38 jdv79 since pause blocked it before the bug i fixed pretty sure
21:38 leont joined #perl6
21:38 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)?
21:38 timotimo yes, you can put "is rw" after the class name
21:38 jdv79 slowly shaping up
21:38 timotimo otherwise you can put "is rw" on individual attributes, too
21:38 Skarsnik Oh after the class name :)
21:38 colomon joined #perl6
21:38 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)
21:39 timotimo :)
21:39 lizmat timotimo: FROGGS probably, not me
21:39 timotimo mhm
21:40 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
21:40 timotimo i see
21:40 jdv79 but details count in the end:)
21:41 jdv79 cpan eco stuff likes that - plus its polite to not tarbomb
21:41 timotimo aye
21:43 jdv79 i tried a quick, albeit dumb, fix for the qt size thing
21:43 jdv79 but it OOM'ed my box so...
21:44 jdv79 the real fix is probably to use a real C json lib in there
21:44 timotimo uh oh
21:44 timotimo probably :\
21:44 jdv79 my C sucks pretty hard
21:44 jdv79 otherwise i would have done it
21:45 timotimo thank you for caring, in aany case :)
21:45 jdv79 if nobody else does in ?2? weeks i might
21:45 jdv79 well, its kinda ridiculous that a profile is unusable
21:46 jdv79 we need something proper like Devel::NYTProf
21:46 timotimo well
21:46 jdv79 maybe tim bunce could do that instead of DBI.  we have Inline::Perl5.  but no real profiler.
21:46 timotimo here's the thing
21:46 timotimo we construct a full call graph for measurements
21:47 timotimo i have a branch in moarvm that kicks in after a specific depth of call graph and will sum up values
21:47 timotimo we don't need a call graph of depth >10 in most cases, certainly not >15
21:47 timotimo sadly, that branch leads to wrong results :\
21:48 timotimo 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?
21:48 timotimo nothing
21:48 timotimo things just get summed up
21:48 jdv79 ok
21:49 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
21:49 timotimo yes, perl6 --profile foo.pm
21:49 jdv79 Skarsnik: my guess is the grammar part
21:49 Skarsnik There is no grammar
21:49 jdv79 huh.  i remember its super slow.  guess i misremembered why.
21:50 * timotimo has forgotten what HTML::Parser::XML itself does exactly
21:50 Skarsnik It look like a C algorythm for most of the stuff
21:50 Skarsnik parse a html document and produce a XML object
21:51 jdv79 i think it takes maybe 10s to parse yahoo.com
21:51 timotimo mhm
21:51 jdv79 its pretty terrible - at least last i tried it
21:51 timotimo mhm
21:51 timotimo well, we're hoping to make all parts of rakudo and friends faster
21:53 jdv79 Skarsnik: you could try the moarvm profiler
21:53 jdv79 if its small its useable
21:53 ugexe Skarsnik: https://github.com/supernovus/exem​el/blob/master/lib/XML/Grammar.pm6
21:53 ugexe this is a grammar  used by HTML::Parser::XML
21:54 jdv79 ugexe: does it still?
21:54 jdv79 i don't see where atm
21:55 Skarsnik not it does not
21:55 dalek rakudo/nom: 0091cee | TimToady++ | src/core/List.pm:
21:55 dalek rakudo/nom: +slurpy needs a decont, not a .list
21:55 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0091cee765
21:55 Skarsnik *no
21:55 leont It seems precompilation is breaking my exported sub, is that a known issue?
21:56 pmurias_ joined #perl6
21:56 timotimo huh, we have precompilation?
21:56 timotimo :P
21:56 ugexe th eonly thing that doesnt precompile is panda :P
21:56 timotimo yup, zef still does it
21:57 Skarsnik http://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
21:57 ugexe Grammar.parse() directly rather
21:58 Skarsnik I spend some time fixing stuff in this module. It parse everything itself ~~
21:58 jdv79 ah ha
21:58 ugexe no it doesnt
21:59 Skarsnik XML can't parse HTML document btw ^^
21:59 ugexe hence HTML::Parser::XML
21:59 jdv79 Skarsnik: profile it and see:)
21:59 tokuhiro_ joined #perl6
21:59 jdv79 --profile
21:59 lizmat sleep&
22:00 Skarsnik it's taking forever huhu
22:00 jdv79 wait til you try to load the output
22:00 jdv79 try to make it the smallest run useful maybe
22:01 Skarsnik I edit the test to only do one parse ^^
22:02 ugexe i think he means when you profile it
22:02 dalek rakudo/nom: 7c20517 | TimToady++ | src/core/List.pm:
22:02 dalek rakudo/nom: Revert "+slurpy needs a decont, not a .list"
22:02 dalek rakudo/nom:
22:02 dalek rakudo/nom: This reverts commit 0091cee765e067ccfc545b56b5a15dc8cda563d0, which
22:02 dalek rakudo/nom: was dumb.
22:02 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7c20517355
22:02 jdv79 yup
22:04 leont The precompiling makes rather a difference in my use-case (TAP::Harness), but its issues are annoying
22:09 jdv79 ok, 35s for yahoo
22:09 jdv79 ugh
22:11 Skarsnik profiling even one try of my benchmark was not a good idea xD
22:13 ugexe leont: i had a similar problem (although slightly different). seems related to the new use of CompUnit for loading modules
22:16 skids joined #perl6
22:17 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
22:17 jdv79 didn't look too closely though
22:18 ugexe https://github.com/rakudo/rakudo/blob/nom/s​rc/core/CompUnitRepo/Local/File.pm#L42-L47
22:23 rurban joined #perl6
22:23 leont Given speed differences, I'm pretty sure it's loading the precompiled one
22:26 ugexe not that i dont believe it, but not having to export a bunch of symbols would speed it up as well
22:27 ugexe well, s/not having to export/not exporting/
22:30 telex joined #perl6
22:31 leont I doubt that's the main factor here, given how little I export (and how big the packages are)
22:33 ugexe i had a similar problem yesterday with CURLI and it would only attempt to load the first module
22:33 ugexe but that was with source or precompiled
22:33 ugexe s/or/and/
22:35 raiph joined #perl6
22:35 ugexe looked like it was attempting to load with the wrong module loader
22:35 ugexe RAKUDO_MODULE_DEBUG=1 will show you
23:07 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:08 tony-o 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
23:09 tony-o crashing might be a better option.  then you at least know your html is .. poorly formed.
23:10 tony-o https://validator.w3.org/nu/?doc=http%3A%2F%2​Fwww.nyo.fr%2F~skarsnik%2Ftmp%2Fcopyfav.html
23:11 timotimo i bet 99.99999999% of html on the 'web is malformed :)
23:12 tony-o timotimo: this is beyond malformed, though.  even chrome doesn't parse this
23:12 tony-o although i agree with what you're saying.
23:14 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)
23:15 Skarsnik it's taken from https://www.fimfiction.net/​bookshelf/751448/favourites (the module take forever to parse this ^^)
23:17 ugexe in perl 5 land i think a separate module does the cleaning of HTML before parsing
23:18 Skarsnik There are like 4000+ module to parse HTML probably too
23:18 ugexe so
23:19 ugexe 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 mos
23:20 ugexe sorta like how perl 5 web::scraper cant properly scrape espns html even WITH cleaning
23:20 ugexe well, parse rather
23:20 timotimo "xhtm which it most" ... "definitely isn't"?
23:20 timotimo i thought head and body tags are still optional in html5?
23:21 Skarsnik I maybe remove them ~~
23:22 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:23 timotimo ah
23:23 timotimo so a <head> can just turn into the <body> section of the document when a <h1> for example appears?
23:23 tony-o i think it's still optional, it just depends on how the document is formed
23:23 tony-o that's how i read it, yea
23:24 timotimo funny
23:29 Skarsnik tony-o, http://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:30 tony-o what do you expect to see as the last div>
23:30 tony-o ?
23:30 Skarsnik also it tend to create extra xml::text with only space/tab/cariage return
23:31 Skarsnik 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?
23:32 tony-o your first div is story_container
23:32 Skarsnik yes, extra_story_data must be in story_container
23:33 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:37 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 Skarsnik well the .node attribute has more than 2 things
23:39 Sqirrel_ joined #perl6
23:40 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 khw joined #perl6
23:52 aborazmeh joined #perl6
23:52 aborazmeh joined #perl6
23:56 adu joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo