Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-09-05

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:00 grondilu m: class A { constant a is export = f; sub f { pi } }; import A; say a
00:00 camelia rakudo-moar 72f0e3: OUTPUT«===SORRY!===␤Cannot invoke null object␤»
00:00 leont tadzik: I'm planning to go over panda and file some issues/PRs, my current TAP work will eventually be part of that
00:02 jack_rabbit joined #perl6
00:05 tadzik leont: awesome
00:05 tadzik leont: I did start a Tap harness some time ago, but never really brought it to a working-well state
00:09 leont I've been planning to rewrite (perl5's) TAP::Harness for some time because its async sucks balls (and a severe case of design pattern explosion) and I was planning to play with perl6's async, and then I say perl6 didn't have a harness of its own yet. And then it made perfect sense to make that my 2014 perl6 project.
00:10 leont s/say/saw/
00:14 zapho53 So is the Perl 6 book on github the most up to date documentation?
00:23 tadzik not really
00:23 tadzik leont: that's awesome
00:28 telex joined #perl6
00:28 zapho53 tadzik: Where should I look instead?
00:29 tadzik zapho53: that depends :) http://learnxinyminutes.com/docs/perl6/ is said to be good, I never read it myself I must admit
00:29 tadzik http://perlgeek.de/en/article/5-to-6 is great if you know Perl 5 already
00:30 zapho53 tadzik: If that's produced by someone outside Perl 6 I can't see it being any more up to date than what the Perl 6 community has to offer.
00:32 zapho53 I think those articles at perlgeek.de are 2009. Not saying they're no good of course. Just trying to establish what's the most recent.
00:33 tadzik oh, that's not produced by someone outside :) But yes, they are a little dated
00:34 tadzik that first like is really fresh
00:34 tadzik doc.perl6.org is the reference
00:34 tadzik perlcabal.org/syn/ is the specification
00:34 tadzik generally we try to keep perl6.org/documentation as a best possible resource
00:36 zapho53 tadzik: Would you say doc.perl6.org is the most up to date, then?
00:37 zapho53 tadzik: ... relatively, I mean.
00:39 avuserow joined #perl6
00:43 chenryn joined #perl6
00:46 _thou joined #perl6
00:52 dalek nqp: f84a159 | (David Warring david.warring@gmail.com)++ | examples/rubyish/rubyish.nqp:
00:52 dalek nqp: [examples/rubyish] tidy up/comment 'new' method for object construction
00:52 dalek nqp: review: https://github.com/perl6/nqp/commit/f84a1593d7
00:54 tadzik zapho53: it's being kept up to date, yes
00:57 davido_ joined #perl6
01:04 ingy TimToady: I'm at the SL.pm meeting. Everyone says O HAI!
01:20 dayangkun joined #perl6
01:22 BenGoldberg joined #perl6
01:41 nbrown___ joined #perl6
01:58 FROGGS_ joined #perl6
02:02 noganex joined #perl6
02:04 immortal joined #perl6
02:04 immortal joined #perl6
02:08 rindolf joined #perl6
02:32 yeahnoob joined #perl6
02:35 _thou joined #perl6
02:59 noganex_ joined #perl6
03:12 dalek rakudo/nom: 69d9f99 | (Rob Hoelz)++ | src/Perl6/Pod.nqp:
03:12 dalek rakudo/nom: Don't panic when parsing POD tables that don't meet our expectations
03:12 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/69d9f99106
03:15 dalek roast: 05e76cc | (Rob Hoelz)++ | S26-documentation/wacky.t:
03:15 dalek roast: Test unterminated POD
03:15 dalek roast: review: https://github.com/perl6/roast/commit/05e76ccb32
03:15 dalek roast: cae5dd3 | (Rob Hoelz)++ | S26-documentation/wacky.t:
03:15 dalek roast: Test partial POD chunks
03:15 dalek roast: review: https://github.com/perl6/roast/commit/cae5dd3e91
03:20 kurahaupo joined #perl6
03:34 yeahnoob joined #perl6
03:47 yeahnoob_ joined #perl6
04:08 raiph joined #perl6
04:12 davido_ joined #perl6
04:24 _thou joined #perl6
04:25 kaare_ joined #perl6
04:30 petercommand joined #perl6
04:36 petercom1and joined #perl6
04:40 grondilu m: say (my Int @) ~~ Array[Int]
04:40 camelia rakudo-moar 69d9f9: OUTPUT«False␤»
04:41 grondilu m: say (my Int @).WHAT;
04:41 camelia rakudo-moar 69d9f9: OUTPUT«(Array[Int])␤»
04:41 grondilu :\
04:46 SamuraiJack joined #perl6
04:55 lastofthe left #perl6
05:02 SamuraiJack_ joined #perl6
05:18 jerrycheung joined #perl6
05:49 raiph http://perlmonks.org/?node_id=1099617 # P5: 1 second versus P6: 3 minutes
05:51 robinsmidsrod joined #perl6
05:53 [Sno] joined #perl6
05:54 robinsmidsrod joined #perl6
06:01 chenryn joined #perl6
06:06 gfldex joined #perl6
06:06 * grondilu wonders what << means in a regex
06:09 * grondilu learns it's left word boundary
06:11 domidumont joined #perl6
06:13 _thou joined #perl6
06:22 renormalist joined #perl6
06:26 lizmat raiph: wonder what --profile would tell on that
06:29 yeahnoob joined #perl6
06:35 mr-foobar joined #perl6
06:37 sergot morning o/
06:43 grondilu \o
06:51 yeahnoob joined #perl6
06:53 denis_boyun_ joined #perl6
07:04 brrt joined #perl6
07:05 darutoko joined #perl6
07:05 virtualsue joined #perl6
07:05 lizmat off to day #1 of SPW &
07:06 woolfy left #perl6
07:09 grondilu because of the permonks entry /me is looking into Match.gist and wonders how this can ever return #<failed match> since it's in a multi with :D invocant
07:10 grondilu m: "foo" ~~ /bar/; say $/;  # I guess no #<failed match> here
07:10 camelia rakudo-moar 69d9f9: OUTPUT«Nil␤»
07:10 yeahnoob joined #perl6
07:13 xiaomiao joined #perl6
07:14 moritz grondilu: iirc #<failed match> is from the time when failed matches returned Match objects
07:16 tinyblak joined #perl6
07:17 zakharyas joined #perl6
07:17 grondilu ok.  Not sure that would help much but I guess then that the line could be removed.
07:20 ClarusCogitatio joined #perl6
07:21 kurahaupo joined #perl6
07:21 Ven joined #perl6
07:21 rindolf joined #perl6
07:26 Ven o/, #perl6
07:26 grondilu also maybe in Match.Str:  $!orig.substr: $!from, max 0, $!to - $!from
07:30 * grondilu checks if that's any faster
07:33 * grondilu learns that it's actually much slower.
07:49 FROGGS wtf, I cannot reply to a perlmonks post ò.ó
07:49 FROGGS "permission denied"
07:50 moritz FROGGS: that's sometimes a symptom of a timeout
07:51 FROGGS grondilu: you've got a failed match when $!to < $!from
07:51 FROGGS moritz: I'll try to post again in a few minutes :/
07:58 denis_boyun joined #perl6
08:00 Ven FROGGS: which one?
08:00 FROGGS <raiph> http://perlmonks.org/?node_id=1099617 # P5: 1 second versus P6: 3 minutes
08:02 _thou joined #perl6
08:12 brrt well, that puts us on the spot a bit :-)
08:12 * brrt wonders why there is such a large difference there
08:13 moritz one reason is that $0.gist is really a tree traversal
08:13 Mouq joined #perl6
08:13 Mouq https://github.com/rakudo/rakudo/pull/305
08:17 yoleaux joined #perl6
08:17 fhelmberger joined #perl6
08:20 timotimo "man perl" doesn't explain the -n and -l flags on my machine
08:20 nwc10 man perlrun
08:21 nwc10 "man perl" for Perl 4 would have :-)
08:21 xiaomiao joined #perl6
08:21 dalek rakudo/nom: 54638e0 | Mouq++ | src/Perl6/Actions.nqp:
08:21 dalek rakudo/nom: Make -n and -p faster
08:21 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/54638e0a9c
08:21 dalek rakudo/nom: 8591319 | lizmat++ | src/Perl6/Actions.nqp:
08:21 dalek rakudo/nom: Merge pull request #305 from Mouq/nom
08:21 dalek rakudo/nom:
08:21 dalek rakudo/nom: Make -n and -p faster
08:21 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8591319351
08:21 lizmat joined #perl6
08:22 timotimo oh, nice one, Mouq.
08:22 tinyblak joined #perl6
08:22 timotimo i wonder how much faster it is
08:23 timotimo gunzip++ # finding a nice little benchmark that shows a drastic speed difference with little code
08:23 ClarusCogitatio joined #perl6
08:24 brrt yeah, that is very true
08:24 timotimo though i'd say the equivalent of say $/ in perl5 should probably be say ~$0 or ~$/ in our case
08:24 brrt hmm
08:24 brrt do we special-case say in the compiler / optimizer?
08:24 timotimo i don't think so
08:25 timotimo could very well be pessimized due to the use of $*OUT?
08:25 brrt i was under the impression that perl5 has a lot of special cases
08:25 lizmat $*OUT is the reason, I think
08:25 lizmat as anybody can change that at any time
08:25 brrt hmmm
08:27 lizmat $ 6 '$*OUT = $*ERR; say "foo"' >/dev/null
08:27 lizmat foo
08:27 timotimo well, we *could* guard on the value of a dynvar
08:28 timotimo but i'm not sure if that'll help a whole lot
08:28 timotimo it's quite amazing how big the difference is when you just remove the parens in that match
08:28 timotimo from 2:49 down to 2:20?
08:30 timotimo also (on a only somewhat related note) i wonder if we can make the handling of <( and )> better by changing the code that does the assignment to the "to" and "from" keys in the match
08:30 lizmat LHF: tests for -n and -p
08:30 timotimo .o( and also, we still ought to rewrite the MATCH function to no longer use CAPHASH )
08:30 Mouq joined #perl6
08:31 lizmat there don't seem to be any tests for -n and -p
08:31 Mouq Thanks lizmat!
08:31 yoleaux 1 Sep 2014 13:50Z <jnthn> Mouq: there are two operations you can do regarding the current routine's MVMCallCapture: usecapture and savecapture. The first populates a per-thread singleton and so is not reentrant. The latter saves a copy.
08:31 yoleaux 1 Sep 2014 13:51Z <jnthn> Mouq: both are worth avodiing on hot paths; savecapture has to allocate a GC-able, so it's the more expensive of the two.
08:31 Mouq The microbenchmarkish thing I used was:
08:31 Mouq perl6  -e'for 1..5000 { say ("a".."e").pick(5).join}' > rm-me
08:32 Mouq time perl6 -ne'say $/ if m/<<\w**5>>/' rm-me
08:33 Mouq But that doesn't say much about the speed of scanning of m//
08:33 timotimo https://github.com/perl6/nqp/commit/77​5ac85288898bcc50af356be995c2f2b160712d - this is the commit i am referring to for eliminating caphash
08:34 timotimo does the << prevent us from doing a scan implemented with "findcclass"?
08:35 timotimo i.E. is it any faster to do m/ \w <?after \W\w> \w ** 4 >> /?
08:36 timotimo well, that's not strictly equivalent
08:37 timotimo as it could be the first char in a line or something
08:43 FROGGS gah, I still cannot reply to that perlmonks post >.<
08:43 moritz FROGGS: it seems to be permantly broken; I and others have the same problem
08:43 FROGGS ahh, okay
08:43 FROGGS thanks :o)
08:55 lizmat .oO( Perl 5 doesn't have performance issues :-)
08:58 nine lizmat: if only that were true :)
09:00 brrt perl5 doesn't have performance issues when it is acting like awk :-)
09:00 * brrt renembers writing a colour-to-grayscale algorithm using gd and perl5 and waiting very very long
09:00 brrt fwiw, i rewrote that in C and it took.. seconds
09:01 kaleem joined #perl6
09:01 brrt it was an algorithm optimising images for e-readers btw :-)
09:01 moritz a classical CPU bound task
09:01 brrt very unfortunately, i couldn't use 4 bit grayscale png's
09:02 brrt because of librarybrokenness
09:02 moritz which also benefits a lot from known numeric types
09:02 brrt yeah.. i'm wondering how well we'd do that on perl6 today]
09:02 brrt probably not good enough due to not having a native array thingy yet
09:03 brrt but with that + JIT we should have a good chance of running these things at an acceptable speed
09:09 timotimo i'm hoping for much more than "acceptable", fwiw
09:11 virtualsue joined #perl6
09:20 leont joined #perl6
09:25 brrt we may have different ideas of acceptable :-)
09:25 timotimo may be :)
09:25 brrt maybe my acceptable is more than yours
09:26 brrt i.e. more performant
09:26 brrt not more as in a larger group
09:26 timotimo yeah, possibly
09:26 timotimo basically, as long as perl6 is slower than hand-tuned assembly, i'm not satisfied!! :P
09:27 spider-mario joined #perl6
09:28 ibo2perl joined #perl6
09:29 timotimo that's not true, of course
09:32 spider-mario joined #perl6
09:34 timotimo oh wow.
09:34 diakopter ?
09:34 diakopter such such?
09:35 timotimo running perl6  -e'for 1..5000 { say ("a".."e").pick(5).join}' > rm-me actually gives me a heap corruption; pointer 0x7f2534208248 to past fromspace
09:35 brrt .. very well
09:35 brrt does that happen only with JIT or always
09:36 domidumont joined #perl6
09:36 timotimo i'm trying that now.
09:36 timotimo happens with jit disabled, too
09:36 timotimo MVM_SPESH_INLINE_DISABLE=1 or MVM_SPESH_DISABLE=1 will not trigger the bug, though
09:38 moritz timotimo: what about MVM_SPESH_OSR_DISABLE ?
09:38 timotimo well well. the difference between say $/ and say ~$/ is between a 3x and 4x improvement
09:38 timotimo moritz: doesn't change things
09:39 moritz timotimo: so still bugs out?
09:39 brrt ok, so it is probably an inlining thingy
09:39 ClarusCogitatio joined #perl6
09:39 moritz I can reproduce the bug too
09:39 timotimo that's right.
09:40 brrt does it maybe have anything to do with the temporary register allocation scheme?
09:40 timotimo i'll be afk for a bit now, though. maybe afterwards i'll look into making rakudo's MATCH not rely on CAPHASH any more
09:40 timotimo you mean the spesh_manipulate_allocate_temp thing?
09:40 moritz FROGGS: perlmonks is fixed now
09:42 timotimo a random thought: SEQUENCE could have the subs succpred and unisuccpred moved outside, so it doesn't have to takeclosure each time we enter it. it's probably only a very small cost compared to running the actual thing, though.
09:43 timotimo (the same goes for the line with $code = (...) ?? { $^x.pred } !! { $^x.succ } i suppose)
09:44 brrt yeah that thing
09:45 brrt (administrative question: are we ok in discussing random moarvm bugs on #perl6, or should we move that to #moarvm?)
09:45 moritz brrt: we're generally OK with moarvm stuff being discussed here
09:46 ibo2perl m: 'mooseee' ~~ /(e*)/
09:46 camelia rakudo-moar 859131: ( no output )
09:46 ibo2perl but 'mooseee' ~~ /(se*)/
09:46 ibo2perl m: 'mooseee' ~~ /(se*)/
09:46 camelia rakudo-moar 859131: ( no output )
09:46 brrt timotimo: do we have a github issue or similar for this heap corruption thing yet
09:46 brrt as in, we have numerous reports of ASAN / GC problems with moarvm that seem to depend on inlining
09:46 brrt could well be the same bug
09:47 brrt but it's difficult to be sure
09:48 xinming_ joined #perl6
09:48 brrt and anyway, the more information we can collect on it the better chance we have for fixing
09:49 ClarusCogitatio joined #perl6
09:51 _thou joined #perl6
09:59 ClarusCogitatio joined #perl6
10:14 yeahnoob joined #perl6
10:21 ClarusCogitatio joined #perl6
10:22 lizmat m: say "mooseee" ~~ /(se*)/  # ibo2perl: is that what you wanted?
10:22 camelia rakudo-moar 859131: OUTPUT«「seee」␤ 0 => 「seee」␤␤»
10:33 ClarusCogitatio joined #perl6
10:34 yeahnoob $ perl6 --version
10:34 yeahnoob This is perl6 version 2014.08-217-g8591319 built on MoarVM version 2014.08-55-ga5ae111
10:36 yeahnoob Is that the most recent rakudo build? I tried to build it from git@github.com:rakudo/rakudo .
10:36 grondilu This is perl6 version 2014.08-215-g69d9f99 built on MoarVM version 2014.08-55-ga5ae111
10:36 grondilu ^mine
10:37 grondilu and I'm fairly up-to-date
10:38 yeahnoob Now I want to try the .words without .comb rakudo version, as FROGGS said before.
10:39 Mouq joined #perl6
10:39 ClarusCogitatio joined #perl6
10:40 yeahnoob Normally I use the rakudo-star version.
10:41 sqirrel joined #perl6
10:42 FROGGS yeahnoob: you would have to build rakudo using rakudobrew perhaps
10:42 FROGGS ohh, nvm
10:42 FROGGS you already have a recent rakudo
10:43 FROGGS moritz: thanks, and confirmed :o)
10:44 yeahnoob I feel like walking in a Deep forest...many version numbers & [abcdefg]...
10:44 ibo2perl m: say "mooseee" ~~ /(e*)/
10:44 camelia rakudo-moar 859131: OUTPUT«「」␤ 0 => 「」␤␤»
10:44 Ulti yeahnoob: do you head N S E or W, a rickety gate lies to the North
10:45 ibo2perl lizmat: i didnt understand why this found nothing
10:46 moritz ibo2perl: it found something
10:46 moritz ibo2perl: it found the empty string at the start of the strong
10:46 moritz ibo2perl: if you want at lest one e, use e+ instead of e*
10:46 * moritz should write a regex FAQ
10:48 ibo2perl moritz++
10:54 Rotwang joined #perl6
10:58 ibo2perl morittz: though I still dont understand why "mooseee" ~~ /(e*)/ it doesnt TLM like "mooseee" ~~ /(se*)/ does
11:00 FROGGS ibo2perl: position has a higher priority than length
11:01 FROGGS m: say "foo bar fooooooo" ~~ /fo+/
11:01 camelia rakudo-moar 859131: OUTPUT«「foo」␤␤»
11:02 FROGGS ibo2perl: so when the match succeeds at position 0, it won't continue to scan
11:13 lizmat joined #perl6
11:26 ClarusCogitatio joined #perl6
11:27 moritz ibo2perl: leftest-match first beats LTM
11:32 leont @list.max({}) seems to return the value of the sub, not the original item. Is there an easy way to do that?
11:33 moritz leont: @list.map(...).max
11:33 leont That's what max seems to do already
11:34 leont But not what I want
11:34 _thou joined #perl6
11:34 moritz huh
11:34 moritz m: say (1, 2,3).max: *+2
11:34 camelia rakudo-moar 859131: OUTPUT«3␤»
11:34 moritz nope
11:34 moritz it returns the list value
11:35 lastofthe joined #perl6
11:35 moritz m: say (1, 2,3).max: -> $x { $x * 10 }
11:35 camelia rakudo-moar 859131: OUTPUT«3␤»
11:35 leont Hmmm
11:35 leont I have no idea what I'm doing wrong then, will try to reduce his failure-case
11:35 moritz leont: can you boil it down to a minimal-ish example?
11:36 BenGoldberg joined #perl6
11:37 leont Ah, of course the problem is somewhere completely else, and I made my conclusion too early
11:37 leont The list was empty, so max returns -Inf
11:38 philh_ joined #perl6
11:41 leont I'm doing @foo = @( Typename ), and observing an empty list. That is not what I expected
11:43 FROGGS leont: and Typename.list should return something non-empty?
11:46 leont Still empty :-s
11:47 leont m: my @foo = @(Promise.list); say @foo.perl
11:47 camelia rakudo-moar 859131: OUTPUT«Array.new()␤»
11:48 FROGGS m: say Promise.list
11:48 camelia rakudo-moar 859131: OUTPUT«␤»
11:49 FROGGS @(something) results in something.list
11:49 moritz m: say Int.list.perl
11:49 camelia rakudo-moar 859131: OUTPUT«().list␤»
11:49 moritz well, that's weird, IMHO
11:50 lizmat that you can call .list on a type object?
11:50 telex joined #perl6
11:52 moritz no, that it doesn't give me a list containing the type object
11:52 moritz m: say 42.list.perl
11:52 camelia rakudo-moar 859131: OUTPUT«(42,).list␤»
11:52 moritz I don't see why it should behave differently for type objects
11:53 lizmat indeed...  and it's done specifically so: in src/core/Any.pm, line 44
11:54 lizmat seems I did that about a year ago, although I'm pretty sure that was just a refactor
11:55 moritz Make .list, .flat, .eager & .hash type object aware.
11:55 moritz
11:55 moritz If called on just a type object, they will all return an empty list/hash.
11:55 moritz that's what the commit message says
11:56 moritz doesn't sound like a refactor :-)
11:57 moritz and the commit before that is "Make sure we don't flatten type objects on either side of a hyper"
11:57 lizmat ah, ok  :-)
11:57 lizmat well, spectesting now with the special casing removes
11:57 lizmat *d
11:58 moritz http://irclog.perlgeek.de/​perl6/2013-07-24#i_7364242 has some discussion
12:00 BenGoldberg On another note:
12:00 BenGoldberg m: say 0xffff.chr
12:00 camelia rakudo-moar 859131: OUTPUT«(signal )»
12:01 moritz thats's not good.
12:01 yeahnoob joined #perl6
12:01 ClarusCogitatio joined #perl6
12:02 yeahnoob joined #perl6
12:02 lizmat seems a slot opened up at the SPW, I'll be doing my "C-Day Is Coming" talk again
12:06 yeahnoob joined #perl6
12:08 itz joined #perl6
12:11 ClarusCogitatio joined #perl6
12:11 ggoebel1111112 lizmat++
12:11 * leont suspects he's observing Promise.allof spinlocking or some such. 100% CPU usage, but no input is coming in :-/
12:12 lizmat ok, I remember the discussion now
12:12 lizmat probably not a good idea to just change it without further discussion and tests
12:13 moritz (and without changing the specs too)
12:17 ClarusCogitatio joined #perl6
12:18 Woodi joined #perl6
12:19 lizmat leont: could you gist that ?
12:21 yeahnoob_ joined #perl6
12:22 leont Would need to reduce it first, but sure
12:23 yeahnoob__ joined #perl6
12:24 Rotwang joined #perl6
12:26 colomon moritz, flussence: new module failures this morning: http://host07.perl6.com:8080/report
12:26 colomon carlin: Crypt::Reop worked!
12:26 yeahnoob joined #perl6
12:27 FROGGS nice!
12:28 ClarusCogitatio joined #perl6
12:28 jnthn Hm, looking at that report, seems something busted a load of modules 3 days ago?
12:28 FROGGS NativeCall was busted due to Parcel patches
12:29 FROGGS but moritz++ fixed it by adding a postcircumfix:<[ ]> candidate for carray
12:31 moritz though, for the record, I'm not very happy with that patch
12:31 moritz when somebody gets a CArray, but not hte postcircumfix:<[ ]> candidate, they are still screwed
12:32 kurahaupo joined #perl6
12:32 dalek rakudo/nom: 3f87260 | (Elizabeth Mattijsen)++ | src/core/Str.pm:
12:32 dalek rakudo/nom: Native str doesn't do METAOP yet
12:32 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3f87260758
12:32 dalek rakudo/nom: ca00625 | (Elizabeth Mattijsen)++ | src/core/Any.pm:
12:32 dalek rakudo/nom: MMD Any .list/.flat/.eager/,hash
12:32 dalek rakudo/nom:
12:32 dalek rakudo/nom: In the hopes it will get better optimized
12:32 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ca00625c2e
12:33 FROGGS and also every Proxy in an at_pos seems to be affected
12:33 Alula joined #perl6
12:37 jnthn Wait, why do we have type objects vanishing under .list?
12:37 jnthn (I know the patch didn't change the behavior, and yes, it allows easier/simpler inlining)
12:47 lizmat the reason is this:
12:47 lizmat m: my %h; say %h<a>.list.perl
12:47 camelia rakudo-moar 859131: OUTPUT«().list␤»
12:47 lizmat do we want that list to contain Any or not ?
12:47 lizmat m: my %h; say %h<a>.list.elems
12:47 camelia rakudo-moar 859131: OUTPUT«0␤»
12:48 lizmat do we want 1 in there or 0 ?
12:48 lizmat jnthn ^^^
12:48 moritz looking at Str.samecase, I wonder if it wouldn't be faster to fill an array with those string chunks (and join() in the end) than doing repeated concatenation (which is O(n^2))
12:48 lizmat moritz: well, I think we need to revert the rewrite
12:49 lizmat because initially, it would fail all samecase tests
12:49 lizmat (cannot change immutable str)
12:49 lizmat and now it hangs
12:50 lizmat so, there is something weird going on...
12:50 jnthn lizmat: Hmmm
12:50 lizmat jnthn: there could be other ways of fixing this behaviour
12:50 lizmat and have Int.list.elems be 1 and %h<doesnexist>.list.elems be 0
12:50 moritz lizmat: returning Nil from %h<a> would be one
12:50 jnthn lizmat: Well, it's a lang design issue, so for TimToady++. I'm just a bit surprised to see type objects vanishing into nowhere...
12:50 lizmat moritz: that is not an option
12:51 sqirrel joined #perl6
12:51 moritz lizmat: why?
12:51 moritz oh
12:51 lizmat m: my Int %h; say %h<doesnexist>
12:51 camelia rakudo-moar 859131: OUTPUT«(Int)␤»
12:51 moritz because you can't assingn anymore
12:51 jnthn Right :)
12:51 moritz .oO( assigning is overrated anyway )
12:52 jnthn Yeah! Immutability FTW! :P
12:52 lizmat .oO( and in darkness, bind them all :-)
12:52 jnthn lizmat: I'm looking at module loading and failing to see the spaghetti you are... A use statement seen in Grammar.nqp load_module on world, which does (a) calling load_module on the ModuleLoader, and (b) a little code-gen to make sure that when we pre-compile, the module is loaded at startup.
12:52 lizmat so where does it go to Perl6 space CompuUnitRepo?
12:52 lizmat where should it keep whether a module is loaded (with auth / version info?)
12:52 jnthn All actual module loading stuff seems to happen in ModuleLoader.nqp at present
12:52 lizmat module *searching* also happens there atm
12:52 jnthn lizmat: Right.
12:52 lizmat that's why I wanted some 15 mins with you at YAPC::EU  :-)
12:52 jnthn lizmat: To a first approximation, it'd seem that World should call something written in Perl 6, and have the code-gen also call that thing.
12:52 jnthn And then delegate to what's in ModuleLoader.nqp for the low-level bits
12:52 ClarusCogitatio joined #perl6
12:52 jnthn That is, when we actually decided on a particular bytecode file to load or .pm to pre-compile
12:52 * masak yanks jnthn away for dinner
12:52 lizmat just when it was getting interesting...
12:52 lizmat nom nom jnthn  masak
12:52 lizmat ttyl
12:52 jnthn Would it help if I was to do something to squeeze a trip via Perl 6 into that flow that basially does the delegation off to ModuleLoader?
12:52 masak to be continued :)
12:53 jnthn Then bits that should be in Perl 6 can be migrated piecemeal?
12:53 * jnthn puts on shoes :)
12:53 nwc10 oh, thanks for the dinner reminder
12:56 dalek rakudo/nom: 8b65a08 | (Elizabeth Mattijsen)++ | src/core/Str.pm:
12:56 dalek rakudo/nom: Revert 72f0e37a3c201c0666 and 3f87260758f1ebe
12:56 dalek rakudo/nom:
12:56 dalek rakudo/nom: The original rewrite of samecase broke tests.  THe naive fix for the exec
12:56 dalek rakudo/nom: error caused hanging.  It is also not clear whether the solution is actually
12:56 dalek rakudo/nom: a good one: http://irclog.perlgeek.de/​perl6/2014-09-05#i_9302559
12:56 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8b65a08380
12:57 jnthn masak: OK, heading down to meet you :)
12:57 jnthn lizmat: bbl
12:58 cibs joined #perl6
13:00 lizmat joined #perl6
13:03 raiph joined #perl6
13:05 [Coke] "Is Christmas a four letter word?" Proposed perl 6 talk title.
13:05 _thou joined #perl6
13:09 moritz [Coke]++
13:10 moritz m: say 'Christmas'.chars == 4
13:10 camelia rakudo-moar 859131: OUTPUT«False␤»
13:10 FROGGS "Perl 6 - A Christmas Carol"
13:10 moritz mini challenge: write some code that appears to test the above, but actually prints True
13:10 xenoterracide joined #perl6
13:11 FROGGS m: say 'Christmas'.chars ~~ 4.WHAT # (sort of)
13:11 camelia rakudo-moar 859131: OUTPUT«True␤»
13:12 moritz not bad
13:13 lizmat [Coke]: is C-Day a 4 letter word ?
13:13 FROGGS yes, cause '-' is not a letter
13:14 leont My spinlock seems to have gone away when I await()ed in the same thread that created the Proc::Async…
13:15 BenGoldberg m: my ($a, $b) := 'Christmas'.encode("latin1").sort[0,*-1]; say 4 == ($b-$a) div 10;
13:15 camelia rakudo-moar 859131: OUTPUT«True␤»
13:16 lizmat leont: interesting datapoint  :-)
13:16 lizmat wonder what jnthn would want to say about that  :-)
13:22 leont perl6 -e 'my $waiter = Proc::Async.new(:path($*EXECUTABLE), :args(["helper.pl"])).start; await start { await $waiter };'
13:23 leont Let's make that easier: perl6 -e 'my $waiter = Proc::Async.new(:path("echo"), :args(<Hello World>)).start; await start { await $waiter };'
13:27 cibs joined #perl6
13:29 moritz leont++ # golfing
13:30 moritz leont: could you please submit that to rakudobug@perl.org?
13:30 leont Sure
13:31 * lizmat is not going to look at this now, need to make some last min modifications
13:34 ClarusCogitatio joined #perl6
14:03 guru joined #perl6
14:03 mberends joined #perl6
14:03 Woodi hallo #perl6 :)
14:03 Woodi I checked Redis module and it fails with:  Type check failed for return value; expected 'Buf' but got 'utf8'   for  multi method foo(...) returns Buf { ... }   what changed ?
14:03 moritz Woodi: stuff changed to return utf8, not Buf
14:03 Woodi can I just s/Buf/utf8/g ? :)
14:03 retupmoca r: say "asdf".encode.^name; say "asdf".encode ~~ Buf; say "asdf".encode ~~ Blob; say Buf ~~ Blob; # or just s/Buf/Blob/g
14:03 camelia rakudo-jvm 8b65a0: OUTPUT«(timeout)»
14:03 camelia ..rakudo-{parrot,moar} 8b65a0: OUTPUT«utf8␤False␤True␤True␤»
14:11 jkg joined #perl6
14:19 chenryn joined #perl6
14:27 cibs joined #perl6
14:29 masak today's mini-challenge: given two circles in the plane, do they intersect, and at which point(s)?
14:30 masak /me writes up his solution
14:30 * masak writes up his solution
14:30 danaj Perhaps one of the RC aficionados could look at http://rosettacode.org/wiki​/Bitwise_operations#Perl_6   It's from 2011 and doesn't seem to work with latest Rakudo.  If nothing else, a simple working example should be there before going into NYI stuff.
14:31 BenGoldberg masak, They intersect at either 0, 1, or 2 points.  But if that's all the information that the challenge provides, it's not possible to answer more precisely.
14:31 ajr joined #perl6
14:32 treehug88 joined #perl6
14:33 masak BenGoldberg: maybe I should be more precise in the problem statement. it's the Euclidian plane, and the circles each have a given center and radius.
14:34 * jnthn returns
14:36 * [Coke] is reminded to test more rosettacode stuff. :|
14:36 [Coke] too many half-finished projects.
14:36 dalek rakudo-star-daily: f35ed29 | coke++ | log/ (14 files):
14:36 dalek rakudo-star-daily: today (automated commit)
14:36 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/f35ed29b4f
14:40 jnthn Woodi: utf8 ~~ Blob (immutable), but not Buf (mutable), since if it could be mutated arbitraily then it would easily become invalid utf8...
14:40 timotimo jnthn: the port of Match to no longer use CAPHASH ... it'd probably be an almost 1:1 copy of the patch that does the thing for NQPMatch, right?
14:41 jnthn timotimo: Yeah, modulo the fact that match object construction is using Perl 6 types, so it's a little different...
14:43 timotimo that wouldn't be terribly hard, i'd think
14:43 jnthn timotimo: Aye. go for it! :)
14:44 chenryn joined #perl6
14:46 itz_ joined #perl6
14:47 masak here's my answer to the mini-challenge. don't look if you don't want spoilers. https://gist.github.com/masak/7a77fb9e4fdaae9a1164
14:47 masak I enjoyed solving this one. I'm going to try to express it as code, too.
14:51 moritz the "do they intersect" part is very easy to answer :-)
14:51 masak yeah, that one I don't mind spoiling :)
14:52 moritz sqrt( ($p1.x - $p2.x) ** 2 + ($p1.y - $p2.y) ** 2) <= ($p1.r + $p2.r)
14:54 masak that's necessary but not sufficient.
14:55 timotimo did you all consider the circle being completely inside the other?
14:55 moritz oh right
14:55 masak two circles at the origin with nonzero radiuses don't intersect.
14:55 masak unless they intersect at all points.
14:55 masak oh, man. I gotta redo my solution, too :P
14:55 timotimo also "near the origin" would be able to cause that
14:55 masak yes, just an example.
14:55 BenGoldberg If they overlap perfectly, then do they have an infinite number of points of intersection>
14:56 BenGoldberg ?
14:56 masak guess so.
14:56 masak actually, forget "near the origin". they just have to have centers sufficiently near each other.
14:59 moritz this geometry stuff is always harder than it looks on the surface
14:59 masak no pun intended.
15:00 virtualsue joined #perl6
15:01 Woodi m: say ['a','b'].hash;  say ['a','b'].Set;   say ['a','b'].set;  #  unexpected. sets are collections-like like hashes and arrays
15:01 camelia rakudo-moar 8b65a0: OUTPUT«"a" => "b"␤set(a, b)␤No such method 'set' for invocant of type 'Array'␤  in block <unit> at /tmp/Mgl6cV2Bp9:1␤␤»
15:02 masak Woodi: I agree. there is no particular sense in all the casting/conversion methods.
15:03 guru joined #perl6
15:05 lizmat joined #perl6
15:07 dalek joined #perl6
15:12 kjs_ joined #perl6
15:16 beastd joined #perl6
15:17 MilkmanDan joined #perl6
15:29 lizmat masak: I don't think TimToady thinks of .hash and .list as coercers
15:29 lizmat BTW, there is no .set, but there is a set()
15:29 lizmat m: say sat <a b c>
15:29 camelia rakudo-moar 8b65a0: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tt_NKzCC2Sâ�¤Undeclared routine:â�¤    sat used at line 1. Did you mean 'say', 'set'?â�¤â�¤Â»
15:29 lizmat m: say set <a b c>
15:29 camelia rakudo-moar 8b65a0: OUTPUT«set(a, b, c)␤»
15:31 itz joined #perl6
15:34 [Sno] joined #perl6
15:37 lizmat end of day #1 at SPW
15:37 jnthn git st
15:37 jnthn oops
15:37 lizmat ww, it happens to the best  :-)
15:37 timotimo it seems like in Match.pm, we getlexcaller('$/') twice, but could do it only once
15:38 timotimo in sub make
15:38 TimToady someone should add an AI to irssi that says "Did you really mean to do that here?"
15:38 jnthn timotimo: Thta is worth optimizing.
15:38 timotimo i'll first begin doing the caphash thing, though
15:38 jnthn aye
15:39 FROGGS \o/
15:41 * lizmat taks the "make" LHF
15:41 timotimo huh? how come i don't see ast nor made in the patch for NQPMatch's MATCH method?
15:43 jnthn timotimo: I think we may be a tad less careful with it in NQP...
15:44 FROGGS joined #perl6
15:47 jdv79 joined #perl6
15:48 BizarreCake joined #perl6
15:50 guru joined #perl6
15:53 lizmat what should the impact be of optimizing make() ?
15:53 * lizmat is not seeing any impact  :-(
15:53 timotimo we could perhaps see it in perl6 code that uses grammars with the "make" sub
15:53 timotimo so, json-parse?
15:54 itz_ joined #perl6
15:54 colomon or maybe ABC?  But I don't know that it's a particularly big time drag on either....
15:55 TimToady how does one optimize 'make'?  it's just storing a pointer
15:56 timotimo well, the make sub stores two things, and gets the caller's $/ twice
15:57 TimToady oh, okay, haven't got to that bit of backlog yet
15:58 TimToady perhaps make should just be rewritten to take $/ as a hidden parameter internally
15:59 TimToady or it turns into $/.make or so
16:00 timotimo my working memory is having a bit of a hard time doing the three-way-diff for porting MATCH over to not use CAPHASH ...
16:01 * TimToady gets another cuppa to make sure he's not spouting nonsense...wait, coffee is a necessary but not sufficient condition...
16:06 timotimo hm, i'll be AFK for a while again before i can look at MATCH more
16:07 timotimo so maybe someone with more free headspace will do it in the mean time %)
16:07 leont Is there a simple example of an action class?
16:07 timotimo JSON::Tiny is kind of simple
16:09 leont Thanks, I think that will do :-)
16:09 TimToady when you think about it, make is very like the replacement argument of a .subst
16:10 dalek rakudo/nom: e61580f | (Elizabeth Mattijsen)++ | src/core/Match.pm:
16:10 dalek rakudo/nom: Naive optimization of make()
16:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e61580f9ae
16:10 lizmat please adapt / revert if it doesn't make sense
16:11 timotimo look at what you're deconting there
16:11 dalek perl6-roast-data: b0db04d | coke++ | / (6 files):
16:12 dalek perl6-roast-data: today (automated commit)
16:12 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/b0db04d09b
16:12 timotimo it seems like the $slash.CURSOR wants to be deconted instead of the $/ in the second bindattr
16:12 timotimo so i think $slash should only contain nqp:getlexcaller
16:12 [Coke] these failed across the board today:
16:12 [Coke] S05-modifier/ii.rakudo.moar aborted 18 test(s)
16:12 [Coke] S05-substitution/subst.rakudo.moar aborted 19 test(s)
16:12 [Coke] S32-str/samecase.t aborted 8 test(s)
16:12 [Coke] integration/99problems-51-to-60.t aborted 17 test(s)
16:12 TimToady yes, the AST really goes into the cursor, if I'm not mistaken
16:13 TimToady so it's really $¢.make, and $/ isn't really needed at all for that bit
16:14 mr-foobar joined #perl6
16:14 TimToady at least, that's how STD has it
16:14 timotimo well, if we want to getlexcaller('$¢') on top of getlexcaller('$/'), that'd be fine
16:14 timotimo but i think it might be faster to getlexcaller $/ and then grab the .CURSOR from there
16:14 TimToady I don't think rakudo has a $¢
16:15 TimToady they're always writing $/.CURSOR
16:15 TimToady that seems bassackwards to me, but haven't really thought about it that hard
16:15 TimToady to me the cursor is real, and the $/ is a "view"
16:16 timotimo m: regex Test { a { say $¢ } }; say "aaaaaa" ~~ Test;
16:16 camelia rakudo-moar 8b65a0: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Ibtzx07hMPâ�¤Two terms in a rowâ�¤at /tmp/Ibtzx07hMP:1â�¤------> [32mregex Test { a { say $[33mâ��[31m¢ } }; say "aaaaaa" ~~ Test;[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix s…»
16:16 timotimo m: regex Test { a { say($¢) } }; say "aaaaaa" ~~ Test;
16:16 camelia rakudo-moar 8b65a0: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/J7O1GgvGA6â�¤Unable to parse expression in argument list; couldn't find final ')' â�¤at /tmp/J7O1GgvGA6:1â�¤------> [32mregex Test { a { say($[33mâ��[31m¢) } }; say "aaaaaa" ~~ Test;[0mâ�¤    e…»
16:16 jnthn I *think* we actually do install a $¢ in regexes
16:17 * [Coke] ponders pronouncing that "docent"
16:17 jnthn m: grammar G { token T { :my $ = say ::.keys; <?> }; 'abc' ~~ /<G::T>/
16:17 camelia rakudo-moar 8b65a0: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/QxKsjGMQ_gâ�¤Unable to parse expression in block; couldn't find final '}' â�¤at /tmp/QxKsjGMQ_g:1â�¤------> [32m = say ::.keys; <?> }; 'abc' ~~ /<G::T>/[33mâ��[31m<EOL>[0mâ�¤    expecting any of…»
16:17 lizmat [Coke]: fixed those tests by reverting some stuff
16:18 jnthn m: grammar G { token T { :my $ = say ::.keys; <?> } }; 'abc' ~~ /<G::T>/
16:18 camelia rakudo-moar 8b65a0: OUTPUT«self %_ $/ $¢ $ANON_VAR__1 $?REGEX $*DISPATCHER &?ROUTINE␤»
16:18 jnthn Seems it's in there
16:18 [Coke] lizmat++ thanks.
16:18 jnthn m: grammar G { token T { :my $ = say $¢; <?> }; 'abc' ~~ /<G::T>/
16:18 camelia rakudo-moar 8b65a0: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/nGpuDg3xygâ�¤Two terms in a rowâ�¤at /tmp/nGpuDg3xyg:1â�¤------> [32mgrammar G { token T { :my $ = say $[33mâ��[31m¢; <?> }; 'abc' ~~ /<G::T>/[0mâ�¤    expecting any of:â�¤        postfixâ�¤   …»
16:18 jnthn yowser :)
16:18 TimToady .oO("buckpenny")
16:18 jnthn std: grammar G { token T { :my $ = say $¢; <?> }; 'abc' ~~ /<G::T>/
16:18 [Coke] lizmat: btw, many parrot date/time tests still failing.
16:18 camelia std 53b3ca6: OUTPUT«[31m===[0mSORRY![31m===[0m�Unable to parse block at /tmp/ELf18M0eIK line 1:�------> [32mgrammar G [33m�[31m{ token T { :my $ = say $¢; <?> }; 'abc'[0m�Couldn't find final '}'; gave up at /tmp/ELf18M0eIK line 1 (EOF):�------> [32m:my $ = say $…»
16:19 jnthn m: grammar G { token T { :my $ = say $¢; <?> } }; 'abc' ~~ /<G::T>/
16:19 camelia rakudo-moar 8b65a0: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Gnj5UvkH7Xâ�¤Two terms in a rowâ�¤at /tmp/Gnj5UvkH7X:1â�¤------> [32mgrammar G { token T { :my $ = say $[33mâ��[31m¢; <?> } }; 'abc' ~~ /<G::T>/[0mâ�¤    expecting any of:â�¤        postfixâ�¤ …»
16:19 jnthn std: grammar G { token T { :my $ = say $¢; <?> } }; 'abc' ~~ /<G::T>/
16:19 camelia std 53b3ca6: OUTPUT«ok 00:01 130m␤»
16:19 jnthn Sorry for the spam
16:19 jnthn Hm, so STD parses it.
16:19 [Coke] lizmat: figured the if/def would cover it, but didn't. i'll ahve to dig deeper there.
16:19 TimToady rakudo has never recognized $¢ that I know of
16:20 jnthn ohhh...
16:20 jnthn token special_variable:sym<$¢> { <sym> }
16:20 jnthn STD has that.
16:20 jnthn So, that's what we miss :)
16:21 lizmat spectesting adapted sub make opt
16:22 dalek rakudo/nom: 6628ca3 | (Elizabeth Mattijsen)++ | src/core/Match.pm:
16:22 dalek rakudo/nom: Decont the proper thing before binding
16:22 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6628ca3532
16:23 chenryn joined #perl6
16:38 kaare_ joined #perl6
16:41 hoelzro I know the JVM backend for Rakudo uses invokedynamic - but what does it use it for? just regular (ie. non-multi) method dispatch?
16:43 jnthn And sub lookup caching, and making wval resolution constant
16:43 jnthn Also for optimizing some forms of argument handling
16:43 jnthn It'll learn multi-dispatch in the future...
16:43 leont Hmmm. My actions are called, but nowhere to be found in the resulting Match object :-s
16:44 jnthn leont: You do call "make" to attach stuff to the matches?
16:46 hoelzro jnthn: I ask because I'm curious if it would be possible to build an invokedynamic-less jakudo
16:46 hoelzro for Android
16:46 leont I do
16:47 timotimo did you fetch the resulting object's .made?
16:47 leont Where am I supposed to do that?
16:47 gtodd javakudo?
16:47 gtodd oh wait I get it :-)
16:47 timotimo on the result of .parse
16:47 jnthn hoelzro: I was mostly hoping for a invokedynamic-full Android :P
16:48 hoelzro jnthn: I would prefer that, but I'm thinking about what I have more influence over ;)
16:48 leont That returns an Any :-/
16:49 jnthn leont: Did you do a make in the TOP action method?
16:49 timotimo did you "make" something in your TOP method?
16:49 jnthn Or whatever rule the grammar was entered in...
16:49 leont Yes, but I wouldn't be surprised if I'm doing it wrong there
16:50 hoelzro m: role Shazam[::T] {} ; my $r = Shazam; my $subrole = $r[Num]
16:50 camelia rakudo-moar 8b65a0: OUTPUT«Invocant requires an instance, but a type object was passed␤  in method Bridge at src/gen/m-CORE.setting:5008␤  in sub infix:<<> at src/gen/m-CORE.setting:4614␤  in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:2566␤  in block <unit> at /tmp/X3…»
16:50 hoelzro is it unreasonable to think that should work? ↑
16:50 gtodd something ... even toy like (i.e. maybe not for building real "apps") to do rakudo/perl6 on android would be nice ... using the bundled perl that is in CCTools on android to try stuff out is convenient
16:51 TimToady hoelzro: it's unreasonable if it slows down normal array access
16:51 jnthn hoelzro: Yes, R[...] is parsed as a type name, not an array access, iirc
16:51 hoelzro gtodd: I would like to write web service bindings in Perl 6, but use them from apps I write
16:52 hoelzro TimToady: understandable
16:52 hoelzro jnthn: but we *could* have array access on a parameterized role do the right thing (barring any performance setbacks, of course)
16:52 hoelzro right?
16:52 TimToady and what jnthn++ said, it's currently a special form in the parser
16:52 jnthn hoelzro: It feels like a hack/level mix to me, tbh
16:53 hoelzro ok
16:53 hoelzro then I won't file that as an RT issue =)
16:53 jnthn hoelzro: If you really want it in a scalar varialbe you can ues the MOP to work with it
16:53 TimToady and we want the optimizer to know that it can assume the insides of .[] are 0..*
16:53 hoelzro I'm guessing my $role = R; class C does $r { ... } is also out of the question?
16:53 jnthn If you don't then you can always declare a constant
16:53 jnthn Yes, because that's a complete compile time / runtime confusion.
16:54 hoelzro ok
16:54 jnthn m: role Shazam[::T] {} ; constant r = Shazam; my $subrole = r[Num]
16:54 camelia rakudo-moar 8b65a0: ( no output )
16:54 hoelzro just going through some things I've run across and sanity checking them =)
16:55 TimToady oh, we're already far past the bounds of sanity :)
16:55 hoelzro =)
16:55 hoelzro Is there a way to refer to a particular candidate of a role (a la &foo:(Str, Num))?
16:56 hoelzro other than walking R.^candidates by hand, that is
16:56 leont The TOP action does not appear to be called :-s
16:57 timotimo what's your parse call look like?
16:57 timotimo and: did your match succeed?
16:57 jnthn leont: Your grammar does actually match, just to be sure?
16:57 jnthn hah, timotimo++ is constantly a step ahead of me :P
16:57 TimToady surely being a step ahead is run time?
16:57 timotimo jnthn: so that you can focus on more difficult stuff :P
16:58 leont Ah, it doesn't. It just looked to me like it did
16:59 leont (was look at Match.perl, not evaluating Match.Bool)
16:59 timotimo did you try Grammar::Tracer from the Grammar::Debugger package?
16:59 leont It also got me confused because it did trigger specific actions
17:00 timotimo aye, everything that gets matched on the way through will have their action methods called
17:03 TimToady which is why action methods want to be as lazy as possible when you might backtrack, since you're throwing away work
17:03 TimToady so generally just store something to handle in a later pass
17:03 lastofthe joined #perl6
17:04 tinyblak joined #perl6
17:04 TimToady we don't support lazy action methods as SNOBOL does
17:05 TimToady though one could, of course, build a tree of closures to call later
17:05 leont I'm not sure if I like that mental image or not :-p
17:06 timotimo aye, and when backtracking happens over a regex that has an action method added to it, it may be called pretty often
17:06 timotimo and there's no simple way to have an UNDO phaser or something fire when we backtrack over the thing that causes the action method to be fired
17:06 TimToady so make sure all the side effects aren't side effects
17:06 jnthn My JSON::Path thingy used actions to build up a tree of closures :)
17:07 jnthn Turned out fairly neat.
17:07 jnthn So long as I didn't think too hard about why it worked. :)
17:08 TimToady us bear-of-very-little-brains don't want to think about it at all :)
17:08 TimToady otoh, that's very similar to what we want with the list refactor: just hand me back some closures to call later
17:09 gtodd wha?? my $role = R ; class C does $are ... hmm so one could have a bunch of roles and then write a class where you somehow say  "compose yourself"  ...  ?
17:10 guru joined #perl6
17:10 jnthn gtodd: My point was that you *cna't* write it like that
17:10 jnthn Though...
17:11 jnthn m: role A { }; role B { }; constant R = (A, B).pick; class C does R { }; say C.^roles
17:11 camelia rakudo-moar 8b65a0: OUTPUT«(A)␤»
17:11 jnthn m: role A { }; role B { }; constant R = (A, B).pick; class C does R { }; say C.^roles
17:11 camelia rakudo-moar 8b65a0: OUTPUT«(A)␤»
17:11 jnthn m: role A { }; role B { }; constant R = (A, B).pick; class C does R { }; say C.^roles
17:11 camelia rakudo-moar 8b65a0: OUTPUT«(A)␤»
17:11 jnthn m: role A { }; role B { }; constant R = (A, B).pick; class C does R { }; say C.^roles
17:11 camelia rakudo-moar 8b65a0: OUTPUT«(B)␤»
17:11 jnthn :)
17:11 timotimo tee hee.
17:11 gtodd eek ... there so many styles and ways to make machines do things ...
17:12 TimToady your coin is obviously biased
17:12 jnthn Gah, I musta been handed back a fake one again...
17:13 [Coke] jnthn: wow, that's evil!
17:13 TimToady well, don't pass it on, I hear the penalty for counterfeiting is high there...
17:13 gtodd when I was a child "compose yourself"  used to mean "focus", "relax", "calm down" :-) ...
17:14 TimToady yes, that's about right; figure out which methods suit you
17:14 gtodd heh nice
17:14 TimToady and settle into a role :)
17:14 jnthn And if you're not sure, just pick some at random :P
17:15 gtodd TimToady: hah truly you are a masterful linguist :-)
17:15 ajr joined #perl6
17:15 TimToady well, but that's why we picked "role" in the first place, because of the metaphor
17:15 gtodd jnthn: that is sounding very "human" or life like
17:16 firefish5000 hmm, if $Obj = MyClass.new; what does say $Obj call/return? ( .gist seems to be part of it, but Im thinking there is more to it. is it .gist.Str?)
17:16 TimToady .oO(today I'm playing Hamlet)
17:17 jnthn .gist returns a string
17:17 gtodd heh well constant R = (A, B).pick sounds a bit like "Waiting for Godot" (the first bit of that play ...)
17:17 jnthn say calls .gist
17:17 jnthn And then outputs that string, plus a newline
17:18 TimToady gtodd: aren't you thinking of R&G are dead?
17:18 gtodd oopsie
17:18 gtodd :)
17:19 * TimToady is the guy who flipped 10 heads in a row in high-school biology when we were doing remedial probablility
17:19 TimToady so I knew I was special :)
17:19 colomon one in a thousand, anyway.  ;)
17:20 TimToady that's kibi to you
17:20 firefish5000 I Overrode .gist to return a list, and tried say $Obj[1] I get an error, but say $Obj.gist[1] gives me the expected output (and say $Obj[0] returns a stringified .gist) correct?
17:21 tinyblak_ joined #perl6
17:21 gtodd TimToady: that sort of experience (which is random) could effect your whole life!
17:21 firefish5000 *$Obj[0] or just $Obj
17:22 TimToady firefish5000: why would you want to override .gist to return a non-string?
17:22 TimToady it doesn't make very much sense
17:23 TimToady and is likely to blow up anything that assume .gist returns a string
17:23 firefish5000 ...because the list value was more usefull to me, I don't realy know what I am doing :P
17:23 gtodd heh
17:24 jnthn Time for some sleep :)
17:24 jnthn 'night, #perl6
17:24 TimToady o/
17:24 colomon \o
17:24 firefish5000 So gist should return a string. Good to know.. Thanks TimToady!
17:24 gtodd firefish5000: hardly anyone does -  this is perl6 ... a whole new planet :-)
17:25 TimToady m: constant minus1 = -1; multi sub foo (minus1) { say "HERE" }; foo(-1)
17:25 camelia rakudo-moar 8b65a0: OUTPUT«HERE␤»
17:25 TimToady grondilu: ^^^
17:26 TimToady m: constant minus1 = -1; multi sub foo (minus1) { say "HERE" }; foo(-2)
17:26 camelia rakudo-moar 8b65a0: OUTPUT«Cannot call 'foo'; none of these signatures match:␤:(Int $ where { ... })␤  in sub foo at /tmp/g4LFCPOSfc:1␤  in block <unit> at /tmp/g4LFCPOSfc:1␤␤»
17:26 gtodd wow
17:26 gtodd firefish5000: /planet/several new interconnected planets/
17:27 tinyblak joined #perl6
17:27 TimToady we was hopin' for a whole arm of the galaxy, oh well
17:27 zakharyas joined #perl6
17:30 gfldex joined #perl6
17:30 gtodd well p6 seems to be getting ready to spread at the speed of light
17:31 TimToady at least the speed of light is evenly distributed :)
17:31 gtodd heh
17:31 TimToady light itself, however, is not
17:31 gtodd true ...
17:35 TimToady You can tell what kind of physicist you have by asking them the speed of light; if they say "Most conveniently, 1" then you know you have a theoretical physicist. :)
17:37 gtodd hah good heuristic that ..  I want to corner one of them at a party ... if the universe is constantly expanding then  would light be slowing down relative to time as a constant ?  or maybe time does not really have "duration" ?
17:37 TimToady or, to put it another way, a theoretical physicist belives that E = m.
17:37 TimToady *lieves
17:38 gtodd heh .. ... anyway I now see that the Waiting for Godot bit of  perl6 is in "loop" ...
17:39 TimToady we should have a "pool" verb that does the opposite of "loop"
17:39 gtodd if I am remembering the play correctly
17:39 gtodd ooh nice....
17:41 gtodd in a module or in the core set of methods keywords ? :-)  ... I have a vague sense that - yes -  "pool" could be the opposite of "loop"
17:47 tinyblak_ joined #perl6
17:50 Alina-malina joined #perl6
17:54 retupmoca .seen grondilu
17:54 yoleaux I saw grondilu 10:37Z in #perl6: <grondilu> and I'm fairly up-to-date
17:55 retupmoca .tell grondilu PR to fix Digest tests please :) https://github.com/grondilu/libdigest-perl6/pull/3
17:55 yoleaux retupmoca: I'll pass your message to grondilu.
17:57 Alina-malina joined #perl6
18:00 tinyblak joined #perl6
18:01 gtodd TimToady:  in a loop  an iterator controls how some action goes on around it ... in a pool items defined by something accumulate around it  ...  :)
18:02 gtodd maybe pool is a short cut for gather/take but is gather/take the opposite of loop ...
18:02 tinyblak_ joined #perl6
18:03 masak m: say 1 / 0
18:03 camelia rakudo-moar 6628ca: OUTPUT«Type check failed for return value; expected 'Int' but got 'Failure'␤  in any return_error at src/vm/moar/Perl6/Ops.nqp:646␤  in method floor at /home/p6eval/rakudo-inst-2/languages/​perl6/runtime/CORE.setting.moarvm:1␤  in method Str at src/gen/m-COR…»
18:03 masak something's bitrotted a little in division by 0?
18:05 colomon m: say (1 / 0).WHAT
18:05 camelia rakudo-moar 6628ca: OUTPUT«(Rat)␤»
18:05 colomon in Rat.gist, perhaps?
18:05 TimToady the whole expected Foo but got Failure thing ought to be expanding on the Failure
18:06 TimToady since it's the Failure that indicates the location of the original error
18:06 TimToady (we hope)
18:08 * masak just did `perl6 -pe '.=indent(4)'` and it worked!
18:08 * masak is quite happy
18:09 masak my solution to today's mini-challenge, https://gist.github.com/masak/7a77fb9e4fdaae9a1164 -- now contains working Perl 6 code.
18:09 gtodd masak: nice :-)
18:10 masak good night, #perl6
18:10 colomon \o
18:10 * colomon wonders what perl6 -pe '.=indent(4)' does...
18:10 gtodd colomon: indents a file :-)
18:12 * colomon ponders this
18:13 timotimo i think -p slurps the ARGFILES, sets $_ and afterwards prints $_, no?
18:13 gtodd cat > blah.txt ... [a beautiful poem] ^D.... time passes ... .oO(oh crap I forgot to indent my poem!!)
18:13 gtodd perl6 -pe '.=indent(4)'`blah.txt
18:13 colomon oh!
18:13 gtodd yes!
18:13 colomon m: say "Hello".indent(4)
18:13 camelia rakudo-moar 6628ca: OUTPUT«    Hello␤»
18:14 colomon gtodd++ timotimo++
18:14 gtodd oops that shoulda been    perl6 -pe '.=indent(4)' blah.txt
18:14 gtodd hehe
18:16 gtodd I hope you all have excellent weekends ...  :-)
18:16 gtodd apparently going for a walk can help perl6 development http://www.newyorker.com/tech/e​lements/walking-helps-us-think
18:16 gtodd cheers
18:17 gtodd left #perl6
18:19 BizarreCake joined #perl6
18:20 esaym153 joined #perl6
18:22 brrt joined #perl6
18:23 esaym153 so is there a quick why to get the latest perl6 like https://github.com/tokuhirom/Perl-Build ?
18:23 TimToady rakudobrew maybe
18:24 hoelzro there's also a docker image, if you're into that sort of thing
18:24 slavik joined #perl6
18:24 hoelzro that's rakudo star, though, so it's lagging behind by about a week of what's in Git
18:25 esaym153 hmm, let me try rakudobrew first
18:26 hoelzro m: #|(A B<bold> statement) class Simple {} ; say Simple.WHY
18:26 camelia rakudo-moar 6628ca: OUTPUT«A B<bold> statement␤»
18:27 hoelzro should that B<...> be specially handled?
18:27 hoelzro declarator docs seem to exist somewhere between comments and POD
18:28 teodozjan joined #perl6
18:28 timotimo yeah, rakudobrew is an excellent tool for getting an up-to-date rakudo up and running fast
18:30 teodozjan hi, I cannot boostrap panda and bisected it https://github.com/rakudo/rakudo/commit/​ca00625c2e69745b3d752856377e62ba97440b97 is this known issue?
18:33 hoelzro "In all other respects they act just like comments"
18:33 hoelzro this makes me inclined to say "no" (wrt my earlier question)
18:34 TimToady esaym153: I think I see the problem
18:35 Sqirrel joined #perl6
18:36 dalek rakudo/nom: fd92389 | TimToady++ | src/core/Any.pm:
18:36 dalek rakudo/nom: restore missing my
18:36 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/fd92389752
18:36 TimToady esaym153: try again with that fix
18:37 TimToady er, I mean, teodozjan
18:38 esaym153 heh
18:38 TimToady sorry, misread backlog
18:38 teodozjan already compiling :)
18:39 esaym153 ran rakudobrew, now running bare perl5 scripts with no issues. Interesting...
18:39 TimToady perl5?
18:40 TimToady do you mean v5?
18:41 FROGGS unlikely
18:41 esaym153 TimToady: yea, some pretty simple p5 scripts that don't have 'use' anywhere
18:41 FROGGS O.o
18:42 TimToady you sure you're executing perl6?
18:42 esaym153 wait, I'm an idiot, perl still points to perl5...
18:42 esaym153 changed on the wrong terminal
18:42 TimToady yes, and it should continue to do so for now, unless you're into pain and suffering :)
18:42 esaym153 was quite shocking for a minute!
18:44 TimToady is it expected that t/spec/S22-package-format/parse-spec.rakudo.moar fails now?
18:44 TimToady there's an extra :name parameter or so
18:44 * lizmat will look at that soon
18:44 lizmat not sure why that started failing all of a sudden
18:44 lizmat it actually looks at first sight that the *expected* value is wrong
18:44 TimToady could be the missing my's
18:45 * lizmat goes back to socializing and dessert
18:45 TimToady yes, it was
18:45 teodozjan TimToady: This was very fast fix, works now, thanks  :)
18:45 TimToady lizmat: when you did the multi fix, you inadvertently left out the 'my' on % =
18:46 TimToady so they were state vars instead of my
18:46 TimToady so any routine that calls .hash twice clobbers the first value
18:47 avuserow timotimo: good news! looks like the profile run I started yesterday has completed successfully, making a 1.1GB HTML file. I'm working on compressing and copying it somewhere useful
18:47 avuserow it only took ~47000 seconds
18:47 avuserow wait no, that's user time
18:48 avuserow wallclock is 22:59:05
18:48 hoelzro is it ok to just file issues against perl6/spec if I have an idea for a change to the spec?
18:49 TimToady well, if you simulatenously want it to be remembered, but never actually considered :P
18:50 hoelzro =)
18:50 hoelzro TimToady: did you see my comment on POD formatting in declarator docs?
18:50 hoelzro I would like to know what you think about that
18:51 * TimToady is still feebly backlogging
18:52 hoelzro sorry, no rush!
18:52 telex joined #perl6
18:54 colomon TimToady++: panda rebootstraps okay with your change
18:54 itz joined #perl6
19:04 jdv79 building panda hung earlier today for me.  so where is the fix?  what do i update.
19:04 jdv79 i think it hung testing json tiny or right after
19:05 TimToady just get nom HEAD
19:06 teodozjan jdv79, update rakudo
19:06 kjs_ joined #perl6
19:07 jdv79 cool
19:07 TimToady lizmat++ introduced a slight bug earlier, in an otherwise good patch; I'd actually be interested to know whether it was just a refactoro or a thinko wrt bare sigil semantics
19:09 brrt joined #perl6
19:17 timotimo avuserow: how much ram did it take at its peak?
19:18 timotimo also, avuserow++ # heroic profiling
19:31 raiph joined #perl6
19:38 lizmat TimToady: I thought the absence meant "my"...  :-(
19:38 lizmat thanks for fixing...
19:38 FROGGS if (SvTHINKFIRST(sv))
19:38 FROGGS sv_force_normal_flags(sv, append ? 0 : SV_COW_DROP_PV);
19:38 FROGGS else if (RsSNARF(PL_rs)) {
19:38 FROGGS ^--------- wth
19:39 lizmat that's C for you  :-)
19:39 FROGGS yeah but....
19:39 FROGGS think first? why on earth?
19:39 kjs_ joined #perl6
19:40 TimToady lizmat: 'my' is already short, so we gave the sugar to 'state' instead, which needs it more :)
19:40 TimToady and turns out to be useful in its own right
19:40 grondilu hi
19:40 yoleaux 17:55Z <retupmoca> grondilu: PR to fix Digest tests please :) https://github.com/grondilu/libdigest-perl6/pull/3
19:40 grondilu retupmoca: done
19:41 * grondilu thought he had already done that but well
19:41 TimToady grondilu: you can also use constant minus1 = -1;
19:41 grondilu yeah, saw that will backlogging
19:42 grondilu while*
19:42 TimToady though I wouldn't be adverse to making -1 work directly
19:42 dwarring joined #perl6
19:42 TimToady can't just assume -1 in an expression is reducable though
19:42 TimToady so sigs would have to be special cased
19:42 FROGGS grondilu: I did the same PR and it got merged
19:45 FROGGS grondilu: see https://github.com/grondilu/libdigest-perl6/pull/4
19:45 grondilu yeah in https://github.com/grondilu/libdigest-perl6/co​mmit/97a5caed423561d709410ac234c198c309b337ef  I don't understand.  What did I do wrong?
19:46 FROGGS I opened a duplicate PR, four days after retupmoca++ did...
19:46 FROGGS so merging now was a noop
19:46 retupmoca oh, I figured it wasn't merged, since I was still seeing failures in the module smoker
19:47 FROGGS dang, why does it fail now?
19:48 retupmoca not sure - http://host07.perl6.com:8080/project/Digest
19:48 grondilu I'll try to learn how to allow other users to do commits
19:49 FROGGS \o/
19:49 FROGGS settings->collabs->enter FROGGS, and then retupmoca :D
19:50 grondilu well, that was eaasy
19:50 retupmoca grondilu++
19:50 FROGGS I love it!
19:50 FROGGS grondilu++
19:50 grondilu you can add yourself in https://github.com/grondilu/libd​igest-perl6/blob/master/CREDITS if you want.
19:51 * TimToady hides behind a simple parcel semantic...
19:51 FROGGS I don't care about credits :o)
19:51 grondilu I meant it as a way to test if you can indeed commit
19:52 FROGGS grondilu: I got the mail from github, and it never lied
19:53 grondilu ok
19:54 dolmen joined #perl6
19:54 FROGGS and the edit button on the github page does not tell anymore that it is going to fork for me... so all is fine :o)
19:55 * dwarring looking at http://stackoverflow.com/questions/256​69107/when-can-i-use-the-whatever-star
19:57 dwarring '* + 2' curries, but '* min 2' doesn't
19:57 colomon really?
19:57 dwarring m: say * + 2
19:57 camelia rakudo-moar fd9238: OUTPUT«WhateverCode.new()␤»
19:57 dwarring m: say * min 2
19:57 camelia rakudo-moar fd9238: OUTPUT«2␤»
19:57 dwarring yep
19:57 FROGGS m: say * max 2
19:58 camelia rakudo-moar fd9238: OUTPUT«*␤»
19:58 dwarring say min 10, 12, 42, 3
19:58 FROGGS so it becomes Inf-ish?
19:58 dwarring say 3 min 4
19:58 dwarring m: say 3 min 4
19:58 camelia rakudo-moar fd9238: OUTPUT«3␤»
19:58 colomon where's that list of non-WhateverCode operators?
19:58 dwarring min can be used as an infix
19:59 colomon n: say * min 2
19:59 camelia niecza v24-109-g48a8de3: OUTPUT«{ ... }␤»
19:59 dwarring but isn't currying as such
19:59 colomon I think this might be a rakudobug?
19:59 FROGGS perhaps it checks for an existing sub before it checks for infixes?
20:00 FROGGS (just guessing)
20:00 colomon p6: say (1..20).map(* min 3)
20:00 dwarring something to do with the signature (also guessing)
20:00 camelia rakudo-jvm fd9238: OUTPUT«(timeout)»
20:00 camelia ..rakudo-parrot fd9238: OUTPUT«No such method 'count' for invocant of type 'Int'␤  in method reify at gen/parrot/CORE.setting:7892␤  in method reify at gen/parrot/CORE.setting:7808␤  in method reify at gen/parrot/CORE.setting:7808␤  in method reify at gen/parrot/CORE.setting:7…»
20:00 camelia ..rakudo-moar fd9238: OUTPUT«No such method 'count' for invocant of type 'Int'␤  in method reify at src/gen/m-CORE.setting:7943␤  in method reify at src/gen/m-CORE.setting:7855␤  in method reify at src/gen/m-CORE.setting:7855␤  in method reify at src/gen/m-CORE.setting:7956␤…»
20:00 camelia ..niecza v24-109-g48a8de3: OUTPUT«1 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3␤»
20:01 colomon http://perlcabal.org/syn/S02.html#Op​erators_with_idiosyncratic_Whatever
20:01 colomon I don't see any reason this list should also include min / max?
20:02 * TimToady sees no signatures with * offhand
20:02 lizmat m: say (1..20).map: { $_ min 3 } # works ok
20:02 camelia rakudo-moar fd9238: OUTPUT«1 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3␤»
20:05 * grondilu notices that Digest still does not pass all tests and looks into it
20:05 retupmoca grondilu, FROGGS: I just fixed the Digest tests
20:06 lizmat well, at any case, that error for say (1..20).map(* min 3) is LTA
20:06 retupmoca (needed more .flat is all)
20:06 FROGGS ohh, weird
20:07 retupmoca I think anyway, I don't actually know how these hash algorithms work
20:09 dwarring ^^ does this deserve a ticket (* min 2 not currying)
20:09 colomon I guess (reading over it again) the spec question is, should infix:<min> be "Whatever-aware"?
20:10 colomon I can't think of any reason it should, but maybe there's something I'm missing here.
20:10 grondilu retupmoca++
20:13 TimToady I'd call it a POLA bug
20:13 araujo joined #perl6
20:13 TimToady something is treating min as if it were a range
20:14 lizmat POLA?
20:14 mohawk joined #perl6
20:14 TimToady just like POLS, only differnet
20:14 colomon POLS?
20:14 TimToady s/Surprise/Astonishment/
20:14 * dwarring heh
20:15 colomon ah
20:15 * TimToady has heard both variants
20:15 TimToady .oO(POLW)
20:16 mohawk TimToady: if perl5 were to be re-branded as Camel Perl (subject of course to a conversation with Mr O'Reilly), how would you feel about that?
20:16 * TimToady thinks it wouldn't make any substantive difference
20:17 mohawk i hear you
20:17 ingy moritz: re: https://github.com/ingydotnet/pig-lati​n-acme/blob/master/lib/Pig/Latin.cafe and "moritz_ has a chronical dislike for languages that don't have explicit variable declarations"… all variables in that sample are declared by *assignment* (and also statically typed (in theory)). Explicit (my/var) keyword declaration and typesetting will be provided in the syntax, but strives to be implicit.
20:17 mohawk are you "no strong feelings one way or the other"?
20:17 TimToady me thinks people will still call it perl5
20:17 * TimToady has not strong feelings on the branding of perl5 these days
20:17 TimToady *no
20:18 mohawk that's awesome, thanks for your time
20:18 ingy Timbus: I wrote more into https://github.com/ingydot​net/pig-latin-acme#readme as to explain the project goals.
20:18 kaare_ joined #perl6
20:18 ingy mohawk: what problem are you thinking to solve?
20:18 mohawk good question
20:19 ingy I think of Perl-5.20.0 as Perl5 v20.0
20:19 mohawk on irc.perl.org/#london.pm we're re-discussing mst's idea of rebranding perl5 in a non-numeric way
20:19 mohawk ingy: that's certainly what perl -V reports
20:19 ingy oh?
20:19 mohawk but the masses are less easily confused than you ;-)
20:19 dalek specs: f79cf81 | (Elizabeth Mattijsen)++ | S99-glossary.pod:
20:19 dalek specs: Add POLA / POLS lemma's
20:19 dalek specs: review: https://github.com/perl6/specs/commit/f79cf81434
20:19 itz I think its a silly idea
20:20 mohawk Summary of my perl5 (revision 5 version 20 subversion 0) configuration:
20:21 ingy itz, like, just your opinion, man…
20:21 FROGGS I think that introducing new names to P5 or P6 does not help the confused ppl either
20:21 ingy sorry, couldn't resist
20:22 ingy I also think that 'Perl' is just a contextual branding. It's like a topic ($_). Requires the context it's in.
20:23 mohawk indeed
20:23 FROGGS and both languages feel very like Perl to me
20:23 ingy Someday it might imply Perl6 to the guy walking down the street
20:23 FROGGS hopefully :o)
20:23 ingy might depend on the street
20:24 carlin AES in "Perl 6" https://gist.github.com/ca​rbin/c1091bc4c44cd8eeec9b
20:24 ingy tell mst "Problem solved"
20:24 ingy carlin: :)
20:25 ingy mohawk: audreyt gave me comaint on Inline::{Perl,MzScheme} btw
20:25 carlin Inline::Perl5 is very nice, nine++
20:25 ingy someone need to write Inline::Perl6
20:25 ingy fot *both* perl 5 and perl 6
20:26 carlin and then use Inline::Perl6 within Inline::Perl5
20:26 carlin Perl-ception
20:26 ingy https://metacpan.org/pod/Inline::Perl
20:26 ingy 10 years old :P
20:27 guru joined #perl6
20:27 leont The part where I have a clue is already covered by nine, the other way around sounds trickier
20:27 ingy I liked 'guru' better
20:29 itz_ joined #perl6
20:32 FROGGS okay, sv_gets really is challenging
20:32 mohawk ingy: good news
20:33 lizmat SPW shutting down for today...  see you later&
20:35 * dwarring creates RT #122708 for non currying: * min 2
20:35 * synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=122708
20:35 leont FROGGS: I warned you!
20:36 nine Oh my.... I really should start working on the API soon before more and more people actually use Inline::Perl5...
20:36 leont nine: how I know that feeling!
20:36 FROGGS leont: yes, but our readline implementation is just sloooooooow :/
20:37 itz joined #perl6
20:37 nine I'd rather replace p5_init_perl() with Inline::Perl5->new. This can then do p5_init_perl() and $i.init_callbacks() without the user having to worry about that.
20:38 leont It's hard to make it fast, perl5 is cheating everywhere it can
20:38 FROGGS .new :o)
20:38 nine Inline::Perl5.new of course... that might really take a while to get used to.
20:38 FROGGS *g*
20:38 FROGGS I also have trouble with that when hacking much on v5
20:38 leont The main thing is peeking and poking in the buffers and not copying anything more than once (if possible)
20:40 FROGGS leont: we currently scan byte by byte for the separator :o)
20:41 mohawk nine: no pressure ;-)
20:41 leont That's better than reading byte by byte ;-)
20:42 * ingy is going to make a Scratch→Perl6 translator!
20:42 ingy you know… for kids!
20:42 mohawk someone should make a p5 module to UNIVERSAL::overload the '.' operator for objects
20:42 itz_ joined #perl6
20:42 leont Another thing to realize is that you want to build it upon read(2) semantics, not on fread(3) semantics
20:42 leont mohawk: I think someone already did for Ruby.pm or some such
20:42 mohawk ha
20:43 FROGGS we read a chunk of size 32768 before doing the scan as it seems
20:43 mohawk the swine, stealing my idea by the use of time-travel
20:43 anaeem1 joined #perl6
20:44 nine Why is perl telling me "You cannot create an instance of this type" when I try adding a constructor to Inline::Perl5 and call Inline::Perl5.new()?
20:46 nine ah, because the class is actually called PerlInterpreter instead of Inline::Perl5
20:48 itz joined #perl6
20:49 hoelzro hmm...not only do we have to worry about invokedynamic for running Jakudo on android, but I'm guessing class generation would be trickier too?
20:53 leont left #perl6
20:54 leont joined #perl6
20:54 anaeem1__ joined #perl6
20:55 leont FROGGS: also, it's cheating by not decoding in sv_gets. If that happens at all, it has happened in some IO layer such as :encoding
20:56 FROGGS we're decoding every line before we hand it back
20:56 leont How optimized is that? That can also be a serious factor
20:58 FROGGS leont: I'm not sure... but I can benchmark that
20:58 FROGGS (I guess I should do that actually first :o)
20:58 FROGGS err, s/benchmark/profile/
21:01 mohawk have a good one, people
21:01 anaeem1 joined #perl6
21:02 FROGGS it spends 35% of the time reifying the ListIter...
21:05 nine Should Inline::Perl5 be a module like it is currently or a class (essentially what the PerlInterpreter class is right now)?
21:07 FROGGS IIRC there are some bugs about modules and exporting that classes do not suffer from
21:07 FROGGS so perhaps make it a class
21:07 avuserow timotimo: sorry for delay, $dayjob grabbed me. but here's the command and time output: https://gist.github.com/ano​nymous/ca74c0e809e50299f44e
21:08 avuserow timotimo: looks like the html compresses well with gzip -9, so I'm going to upload. I guess dropbox is an okay option.
21:14 nine I'm not sure if current bugs should dicdate the design of the API. But making it a class seems the better choice anyway.
21:14 timotimo avuserow: thank you :)
21:14 timotimo 40 gigabytes peak?
21:15 avuserow timotimo: https://www.dropbox.com/s/1fjt2v04v44svd​x/profile-1409933505.20451.html.gz?dl=0
21:15 avuserow there is some minor swap usage so maybe it swapped out some bits of the base system
21:15 timotimo i don't think i'll be able to look at this on any machine i have %)
21:15 avuserow the machine has 41203468 bytes of memory according to free
21:17 avuserow let me try opening it up in a browser
21:18 timotimo i'll exit almost all programs i have running now and then i'll try to open it :)
21:18 avuserow Firefox OOMed internally on my 6GB laptop
21:18 avuserow out of memory: 0x00000000802817AC bytes requested
21:19 avuserow m: say 0x00000000802817AC
21:19 camelia rakudo-moar fd9238: OUTPUT«2150111148␤»
21:19 avuserow m: say 0x00000000802817AC / 1024 ** 3
21:19 camelia rakudo-moar fd9238: OUTPUT«2.0024470501␤»
21:21 itz_ joined #perl6
21:22 timotimo Am loading it in vim first
21:23 dalek Inline-Perl5: c9b69bb | nine++ | / (8 files):
21:23 dalek Inline-Perl5: Turn Inline::Perl5 into a proper class.
21:23 dalek Inline-Perl5:
21:23 dalek Inline-Perl5: The new Inline::Perl5 class is now what was the PerlInterpreter class.
21:23 dalek Inline-Perl5: Replaced my $i = p5_init_perl() with my $i = Inline::Perl5.new();
21:23 dalek Inline-Perl5: No need for the user to call $i.init_callbacks(); anymore
21:23 dalek Inline-Perl5: review: https://github.com/niner/Inl​ine-Perl5/commit/c9b69bb619
21:27 woolfy joined #perl6
21:27 timotimo curiously, vim is not taking up so much ram, the usage goes down every now and then
21:30 timotimo oh, it could be that vim is trying to highlight the html for me? but wouldn't it stop after the first page full of code?
21:30 avuserow you can kill syntax highlighting and other loading stuff with ctrl+c in vim
21:32 itz joined #perl6
21:34 grondilu avuserow++ learning me something about vim
21:35 timotimo when i did that, i got to see everything up to where the json would have started
21:36 timotimo firefox isn't hanging or allocating much memory or anything like that :\
21:36 brrt left #perl6
21:37 lizmat joined #perl6
21:38 itz_ joined #perl6
21:39 timotimo chrome kills the tab almost immediately
21:44 lizmat leont: I reported #122709 , so you don't have to  :)
21:44 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=122709
21:45 avuserow I feel like the only viable way to understand this would be to extract the json, and use a _fast_ JSON parser to extract just the bits we're interested in
21:45 avuserow (or to golf down MoarVM's profiling output and attack it from that side)
21:47 leont lizmat: :-)
21:48 timotimo well, yeah, the profiler just spits out the complete call chain of pretty much everything
21:49 lizmat m: my $p; $p = start { await $p }; await $p  # I wonder whether we should force awaiting for a Promise in the thread it was made
21:49 camelia rakudo-moar fd9238: OUTPUT«(timeout)»
21:49 lizmat otherwise we have found a new way of deadlocking...
21:50 diakopter or at least not waiting for itself
21:50 lizmat forcing this would be simple and a simple way to avoid this type of deadlock
21:50 itz joined #perl6
21:50 timotimo i think i may have truncated the end of the json data in my tries to remove everything but the json data
21:50 timotimo and now my terminal is trying to cache infinite lines of backlog
21:51 diakopter too many lines
21:51 timotimo yes
21:52 lizmat m: my $p; my $q; $p = start { await $q }; $q = start { await $p }; await $p   # and what about this case?
21:52 timotimo yeah, well ... i suppose we'll haev to do the change to the profiler output routine rather than massaging the json into a format we like
21:52 camelia rakudo-moar fd9238: OUTPUT«(timeout)»
21:53 avuserow I'd bet that the browsers are getting hung up in the json.parse call...
21:57 lizmat .tell jnthn re "my $p; $p = start { await $p }; await $p" deadlock, maybe we should force waiting for a start promise to only be allowed in the originating thread ?
21:57 yoleaux lizmat: I'll pass your message to jnthn.
21:58 timotimo lizmat: what? why would you do that?
21:58 timotimo then you can't pass promises between threads to signal a thread to go on
21:58 timotimo unless it spin-waits on it
21:58 timotimo that can certainly not be your intention
21:59 lizmat well, I think that's a recipe for trivial deadlocks
22:00 timotimo trivial deadlocks like that are trivial to spot
22:00 timotimo also, the scheduler doesn't currently know how to delegate work to a different thread while the one you're in is waiting for something to continue
22:01 timotimo from letting a waiting thread take on the work of another task to giving a helpful error message on trivial deadlocks is only a short step
22:02 ingy timotimo, lizmat: seems like code is better than words here :)
22:02 dalek specs: 3db5b14 | (Steve Mynott)++ | S99-glossary.pod:
22:02 dalek specs: fix bare say
22:02 dalek specs: review: https://github.com/perl6/specs/commit/3db5b145f7
22:03 ingy ie, gist up some situational test code to discuss
22:03 lizmat ingy: that's what I'm doing :-)
22:03 ingy xo
22:04 ingy sorry just woke up, didn't really read back enough. *yawn*
22:05 lizmat also: we have simple Promises, and Promises created by a start {}
22:05 lizmat they might need different handling ?
22:06 lizmat timotimo: I see the point your making about passing a Promise to be able to let a separate thread wait until another is done...
22:06 lizmat on the other hand, isn't that what Promise.next is for ?
22:07 timotimo .. what?
22:07 timotimo i don't know what that is ...
22:08 timotimo do you mean ".then"?
22:08 lizmat sorry, I meant .then
22:08 lizmat yes
22:08 timotimo that's a bit different
22:08 timotimo maybe someone with more multithreaded programming experience than me could comment ...
22:10 lizmat maybe I'm projecting my p5 ithreads experiences  :-(
22:11 ingy gist, gist, gist
22:12 lizmat yeah, yeah, yeah
22:16 lizmat I'm not thinking straight anymore....  will sleep on it  (no pun intended)
22:17 lizmat gnight #perl6!
22:17 tadzik gnight lizmat
22:17 timotimo :)
22:17 timotimo gnite lizmat
22:20 Rotwang joined #perl6
22:31 Psyche^_ joined #perl6
23:12 xragnar_ joined #perl6
23:14 raiph m: sub g($a,$b) {$a + $b}; say * [&g] 5
23:14 camelia rakudo-moar fd9238: OUTPUT«Cannot call 'Numeric'; none of these signatures match:␤:(Mu:U \v: *%_)␤  in sub infix:<+> at src/gen/m-CORE.setting:4404␤  in sub g at /tmp/g56fIaLtZk:1␤  in block <unit> at /tmp/g56fIaLtZk:1␤␤»
23:15 raiph ww
23:18 dugword joined #perl6
23:18 grondilu m: sub g($a,$b) {$a + $b}; say g 1, 2
23:18 camelia rakudo-moar fd9238: OUTPUT«3␤»
23:19 grondilu m: sub g($a,$b) {$a + $b}; say [&g] 1, 2
23:19 camelia rakudo-moar fd9238: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/i9x2JwAdd9â�¤Two terms in a rowâ�¤at /tmp/i9x2JwAdd9:1â�¤------> [32msub g($a,$b) {$a + $b}; say [&g] [33mâ��[31m1, 2[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix stopperâ�¤     …»
23:19 grondilu [] works only with infixes, though.
23:20 grondilu m: sub g($a,$b) {$a + $b}; say * g 1, 5
23:20 camelia rakudo-moar fd9238: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/zkZnw8Uwr6â�¤Two terms in a rowâ�¤at /tmp/zkZnw8Uwr6:1â�¤------> [32msub g($a,$b) {$a + $b}; say * [33mâ��[31mg 1, 5[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix stopperâ�¤      â€¦Â»
23:21 grondilu m: sub g($a,$b) {$a + $b}; say 2 [&g] 5
23:21 camelia rakudo-moar fd9238: OUTPUT«7␤»
23:21 grondilu oh, Ic
23:21 grondilu [&f] turns a binary sub into an infix?
23:21 grondilu I did not know that.
23:22 grondilu so * [&g] 5 was interpreted as Whatever + 5, which is not defined I guess.
23:22 grondilu m: say Whatever + 1
23:22 camelia rakudo-moar fd9238: OUTPUT«WhateverCode.new()␤»
23:22 grondilu oh it is
23:24 diakopter m: say * * * * * * * * *()()()()()()()()()()()()()
23:24 camelia rakudo-moar fd9238: OUTPUT«WhateverCode.new()␤»
23:25 leont Is there a way to automatically try to coerce attributes?
23:25 leont E.g. I have a Int attribute, but if given a Str it will try to coerce it before failing
23:30 timotimo aye
23:30 dugword I think you'd have to consult your DM
23:30 timotimo m: sub test($foo as Int) { say "yay an int" }; test(1); test("100");
23:30 camelia rakudo-moar fd9238: OUTPUT«yay an int␤yay an int␤»
23:32 jack_rabbit joined #perl6
23:32 leont Can I apply that to an attribute?
23:34 timotimo let's test it
23:35 timotimo m: class Foo { has $bar as Int; }; Foo.new(:bar("100")).perl.say
23:35 camelia rakudo-moar fd9238: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/MLl5LW0mWz�Cannot call 'trait_mod:<as>'; none of these signatures match:�:(Parameter:D $param, Any $type)�at /tmp/MLl5LW0mWz:1�------> �»
23:35 timotimo ah
23:35 timotimo apparently not
23:36 leont Yeah, that's what I hit :-s
23:37 leont Also, rakudo's install dir order is plain wrong (lib before sitelib makes dual-life really hard). I need to rakudobug that too.
23:40 lastofthe joined #perl6
23:46 itz_ joined #perl6

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

Perl 6 | Reference Documentation | Rakudo