»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
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␤»
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
tadzik leont: awesome 00:05
leont: I did start a Tap harness some time ago, but never really brought it to a working-well state
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:09
s/say/saw/ 00:10
zapho53 So is the Perl 6 book on github the most up to date documentation? 00:14
tadzik not really 00:23
leont: that's awesome
00:25 avuserow left 00:26 telex left 00:28 chenryn left, telex joined
zapho53 tadzik: Where should I look instead? 00:28
tadzik zapho53: that depends :) learnxinyminutes.com/docs/perl6/ is said to be good, I never read it myself I must admit 00:29
perlgeek.de/en/article/5-to-6 is great if you know Perl 5 already
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:30
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:32
tadzik oh, that's not produced by someone outside :) But yes, they are a little dated 00:33
that first like is really fresh 00:34
doc.perl6.org is the reference
perlcabal.org/syn/ is the specification
generally we try to keep perl6.org/documentation as a best possible resource
zapho53 tadzik: Would you say doc.perl6.org is the most up to date, then? 00:36
tadzik: ... relatively, I mean. 00:37
00:39 avuserow joined 00:43 chenryn joined 00:46 _thou joined 00:49 chenryn left 00:50 leont left 00:51 _thou left
dalek p: f84a159 | (David Warring [email@hidden.address] | examples/rubyish/rubyish.nqp:
[examples/rubyish] tidy up/comment 'new' method for object construction
00:52
tadzik zapho53: it's being kept up to date, yes 00:54
00:57 davido_ joined
ingy TimToady: I'm at the SL.pm meeting. Everyone says O HAI! 01:04
01:09 zapho53 left 01:20 dayangkun joined 01:22 BenGoldberg joined 01:26 dolmen left 01:27 yoleaux left 01:41 kurahaupo left, nbrown___ joined 01:43 nbrown___ left 01:58 FROGGS_ joined 02:01 FROGGS left 02:02 noganex joined 02:04 immortal joined, immortal left, immortal joined 02:05 noganex_ left 02:07 erkan left 02:08 rindolf joined 02:32 yeahnoob joined 02:35 _thou joined 02:37 xenoterracide left 02:40 _thou left 02:59 noganex_ joined 03:02 noganex left 03:09 davido_ left
dalek kudo/nom: 69d9f99 | (Rob Hoelz)++ | src/Perl6/Pod.nqp:
Don't panic when parsing POD tables that don't meet our expectations
03:12
ast: 05e76cc | (Rob Hoelz)++ | S26-documentation/wacky.t:
Test unterminated POD
03:15
ast: cae5dd3 | (Rob Hoelz)++ | S26-documentation/wacky.t:
Test partial POD chunks
03:20 kurahaupo joined 03:22 yeahnoob left 03:29 dwarring left 03:34 yeahnoob joined 03:38 jack_rabbit left 03:47 yeahnoob_ joined 03:50 yeahnoob left 03:57 khisanth_ is now known as Khisanth 04:08 raiph joined 04:12 davido_ joined 04:21 [Sno] left 04:23 yeahnoob_ is now known as yeahnoob 04:24 _thou joined 04:25 kaare_ joined 04:29 _thou left 04:30 petercommand joined 04:32 BenGoldberg left 04:36 petercom1and joined
grondilu m: say (my Int @) ~~ Array[Int] 04:40
camelia rakudo-moar 69d9f9: OUTPUT«False␤»
grondilu m: say (my Int @).WHAT; 04:41
camelia rakudo-moar 69d9f9: OUTPUT«(Array[Int])␤»
grondilu :\
04:46 SamuraiJack joined 04:50 petercommand left 04:55 petercom1and is now known as petercommand, lastofthe left 05:02 SamuraiJack_ joined, SamuraiJack left 05:18 jerrycheung joined 05:41 mr-foobar left 05:49 robinsmidsrod left
raiph perlmonks.org/?node_id=1099617 # P5: 1 second versus P6: 3 minutes 05:49
05:51 robinsmidsrod joined 05:52 robinsmidsrod left 05:53 [Sno] joined 05:54 robinsmidsrod joined 06:01 chenryn joined 06:02 SamuraiJack_ left 06:06 gfldex joined
grondilu wonders what << means in a regex 06:06
grondilu learns it's left word boundary 06:09
06:11 domidumont joined 06:13 _thou joined 06:16 gfldex left 06:17 yeahnoob left, _thou left 06:19 raiph left 06:22 renormalist joined
lizmat raiph: wonder what --profile would tell on that 06:26
06:29 yeahnoob joined 06:34 yeahnoob left 06:35 mr-foobar joined
sergot morning o/ 06:37
grondilu \o 06:43
06:52 yeahnoob joined 06:53 denis_boyun_ joined 06:55 davido_ left 06:58 yeahnoob left 07:03 xiaomiao left 07:04 brrt joined 07:05 darutoko joined, virtualsue joined
lizmat off to day #1 of SPW & 07:05
07:05 lizmat left 07:06 woolfy left
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:09
m: "foo" ~~ /bar/; say $/; # I guess no #<failed match> here 07:10
camelia rakudo-moar 69d9f9: OUTPUT«Nil␤»
07:10 yeahnoob joined 07:13 xiaomiao joined
moritz grondilu: iirc #<failed match> is from the time when failed matches returned Match objects 07:14
07:16 kurahaupo left, tinyblak joined 07:17 zakharyas joined
grondilu ok. Not sure that would help much but I guess then that the line could be removed. 07:17
07:18 denis_boyun_ left 07:19 ClarusCogitatio left 07:20 ClarusCogitatio joined, rindolf left 07:21 kurahaupo joined, Ven joined, rindolf joined, tinyblak left
Ven o/, #perl6 07:26
grondilu also maybe in Match.Str: $!orig.substr: $!from, max 0, $!to - $!from
grondilu checks if that's any faster 07:30
grondilu learns that it's actually much slower. 07:33
07:36 jerrycheung left 07:49 FROGGS_ is now known as FROGGS
FROGGS wtf, I cannot reply to a perlmonks post ò.ó 07:49
"permission denied"
moritz FROGGS: that's sometimes a symptom of a timeout 07:50
FROGGS grondilu: you've got a failed match when $!to < $!from 07:51
moritz: I'll try to post again in a few minutes :/
07:58 denis_boyun joined
Ven FROGGS: which one? 08:00
FROGGS <raiph> perlmonks.org/?node_id=1099617 # P5: 1 second versus P6: 3 minutes
08:02 _thou joined 08:03 xiaomiao left 08:07 _thou left
brrt well, that puts us on the spot a bit :-) 08:12
brrt wonders why there is such a large difference there
moritz one reason is that $0.gist is really a tree traversal 08:13
08:13 Mouq joined
Mouq github.com/rakudo/rakudo/pull/305 08:13
08:17 yoleaux joined, ChanServ sets mode: +v yoleaux, fhelmberger joined 08:18 virtualsue left
timotimo "man perl" doesn't explain the -n and -l flags on my machine 08:20
nwc10 man perlrun
08:21 ClarusCogitatio left
nwc10 "man perl" for Perl 4 would have :-) 08:21
08:21 xiaomiao joined
dalek kudo/nom: 54638e0 | Mouq++ | src/Perl6/Actions.nqp:
Make -n and -p faster
08:21
kudo/nom: 8591319 | lizmat++ | src/Perl6/Actions.nqp:
Merge pull request #305 from Mouq/nom

Make -n and -p faster
08:21 Mouq left, lizmat joined
timotimo oh, nice one, Mouq. 08:22
08:22 tinyblak joined
timotimo i wonder how much faster it is 08:22
gunzip++ # finding a nice little benchmark that shows a drastic speed difference with little code 08:23
08:23 ClarusCogitatio joined
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
brrt hmm
do we special-case say in the compiler / optimizer?
timotimo i don't think so
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
lizmat $*OUT is the reason, I think
as anybody can change that at any time
brrt hmmm
lizmat $ 6 '$*OUT = $*ERR; say "foo"' >/dev/null 08:27
foo
timotimo well, we *could* guard on the value of a dynvar
but i'm not sure if that'll help a whole lot 08:28
it's quite amazing how big the difference is when you just remove the parens in that match
from 2:49 down to 2:20?
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
timotimo .o( and also, we still ought to rewrite the MATCH function to no longer use CAPHASH )
08:30 Mouq joined
lizmat there don't seem to be any tests for -n and -p 08:31
Mouq Thanks lizmat!
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.
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.
Mouq The microbenchmarkish thing I used was:
perl6 -e'for 1..5000 { say ("a".."e").pick(5).join}' > rm-me
time perl6 -ne'say $/ if m/<<\w**5>>/' rm-me 08:32
But that doesn't say much about the speed of scanning of m// 08:33
timotimo github.com/perl6/nqp/commit/775ac8...f2b160712d - this is the commit i am referring to for eliminating caphash
does the << prevent us from doing a scan implemented with "findcclass"? 08:34
i.E. is it any faster to do m/ \w <?after \W\w> \w ** 4 >> /? 08:35
08:36 tinyblak left
timotimo well, that's not strictly equivalent 08:36
as it could be the first char in a line or something 08:37
08:39 Mouq left 08:42 Ven left
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
FROGGS ahh, okay
thanks :o)
08:49 Woodi left
lizmat
.oO( Perl 5 doesn't have performance issues :-)
08:55
nine lizmat: if only that were true :) 08:58
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
fwiw, i rewrote that in C and it took.. seconds
09:01 kaleem joined
brrt it was an algorithm optimising images for e-readers btw :-) 09:01
moritz a classical CPU bound task
brrt very unfortunately, i couldn't use 4 bit grayscale png's 09:02
because of librarybrokenness
moritz which also benefits a lot from known numeric types
brrt yeah.. i'm wondering how well we'd do that on perl6 today]
probably not good enough due to not having a native array thingy yet
but with that + JIT we should have a good chance of running these things at an acceptable speed 09:03
timotimo i'm hoping for much more than "acceptable", fwiw 09:09
09:11 virtualsue joined 09:20 leont joined
brrt we may have different ideas of acceptable :-) 09:25
timotimo may be :)
brrt maybe my acceptable is more than yours
i.e. more performant 09:26
not more as in a larger group
timotimo yeah, possibly
basically, as long as perl6 is slower than hand-tuned assembly, i'm not satisfied!! :P
09:27 yeahnoob left, spider-mario joined 09:28 ibo2perl joined, spider-mario left
timotimo that's not true, of course 09:29
09:32 spider-mario joined
timotimo oh wow. 09:34
diakopter ?
such such?
09:35 domidumont left
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
does that happen only with JIT or always
09:36 domidumont joined
timotimo i'm trying that now. 09:36
09:36 ClarusCogitatio left
timotimo happens with jit disabled, too 09:36
MVM_SPESH_INLINE_DISABLE=1 or MVM_SPESH_DISABLE=1 will not trigger the bug, though
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
moritz: doesn't change things
moritz timotimo: so still bugs out? 09:39
brrt ok, so it is probably an inlining thingy
09:39 ClarusCogitatio joined
moritz I can reproduce the bug too 09:39
timotimo that's right.
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
you mean the spesh_manipulate_allocate_temp thing?
moritz FROGGS: perlmonks is fixed now 09:41
09:42 mberends left
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:42
(the same goes for the line with $code = (...) ?? { $^x.pred } !! { $^x.succ } i suppose) 09:43
brrt yeah that thing 09:44
(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
ibo2perl m: 'mooseee' ~~ /(e*)/ 09:46
camelia ( no output )
ibo2perl but 'mooseee' ~~ /(se*)/
09:46 ClarusCogitatio left
ibo2perl m: 'mooseee' ~~ /(se*)/ 09:46
camelia ( no output )
brrt timotimo: do we have a github issue or similar for this heap corruption thing yet
as in, we have numerous reports of ASAN / GC problems with moarvm that seem to depend on inlining
could well be the same bug
but it's difficult to be sure 09:47
09:47 kurahaupo left 09:48 xinming_ joined
brrt and anyway, the more information we can collect on it the better chance we have for fixing 09:48
09:49 ClarusCogitatio joined, xinming left 09:51 _thou joined 09:54 domidumont left, ClarusCogitatio left 09:56 _thou left 09:59 ClarusCogitatio joined 10:14 yeahnoob joined 10:17 ClarusCogitatio left 10:21 ClarusCogitatio joined
lizmat m: say "mooseee" ~~ /(se*)/ # ibo2perl: is that what you wanted? 10:22
camelia rakudo-moar 859131: OUTPUT«「seee」␤ 0 => 「seee」␤␤»
10:30 ClarusCogitatio left 10:31 ClarusCogitatio joined 10:33 brrt left
yeahnoob $ perl6 --version 10:34
This is perl6 version 2014.08-217-g8591319 built on MoarVM version 2014.08-55-ga5ae111
Is that the most recent rakudo build? I tried to build it from [email@hidden.address] . 10:36
grondilu This is perl6 version 2014.08-215-g69d9f99 built on MoarVM version 2014.08-55-ga5ae111
^mine
10:36 ClarusCogitatio left 10:37 [Sno] left
grondilu and I'm fairly up-to-date 10:37
yeahnoob Now I want to try the .words without .comb rakudo version, as FROGGS said before. 10:38
10:39 Mouq joined, ClarusCogitatio joined
yeahnoob Normally I use the rakudo-star version. 10:40
10:41 sqirrel joined
FROGGS yeahnoob: you would have to build rakudo using rakudobrew perhaps 10:42
ohh, nvm
you already have a recent rakudo
moritz: thanks, and confirmed :o) 10:43
yeahnoob I feel like walking in a Deep forest...many version numbers & [abcdefg]... 10:44
ibo2perl m: say "mooseee" ~~ /(e*)/
camelia rakudo-moar 859131: OUTPUT«「」␤ 0 => 「」␤␤»
Ulti yeahnoob: do you head N S E or W, a rickety gate lies to the North
ibo2perl lizmat: i didnt understand why this found nothing 10:45
moritz ibo2perl: it found something 10:46
ibo2perl: it found the empty string at the start of the strong
ibo2perl: if you want at lest one e, use e+ instead of e*
moritz should write a regex FAQ
ibo2perl moritz++ 10:48
10:54 Rotwang joined 10:55 Rotwang left
ibo2perl morittz: though I still dont understand why "mooseee" ~~ /(e*)/ it doesnt TLM like "mooseee" ~~ /(se*)/ does 10:58
FROGGS ibo2perl: position has a higher priority than length 11:00
m: say "foo bar fooooooo" ~~ /fo+/ 11:01
camelia rakudo-moar 859131: OUTPUT«「foo」␤␤»
FROGGS ibo2perl: so when the match succeeds at position 0, it won't continue to scan 11:02
11:04 Mouq left 11:09 lizmat left 11:13 lizmat joined 11:18 sqirrel left 11:24 ClarusCogitatio left 11:26 yeahnoob left, ClarusCogitatio joined
moritz ibo2perl: leftest-match first beats LTM 11:27
leont @list.max({}) seems to return the value of the sub, not the original item. Is there an easy way to do that? 11:32
moritz leont: @list.map(...).max 11:33
leont That's what max seems to do already 11:34
But not what I want
11:34 _thou joined
moritz huh 11:34
m: say (1, 2,3).max: *+2
camelia rakudo-moar 859131: OUTPUT«3␤»
moritz nope
it returns the list value
11:35 lastofthe joined
moritz m: say (1, 2,3).max: -> $x { $x * 10 } 11:35
camelia rakudo-moar 859131: OUTPUT«3␤»
leont Hmmm
moritz leont: can you boil it down to a minimal-ish example?
leont I have no idea what I'm doing wrong then, will try to reduce his failure-case
11:36 BenGoldberg joined
leont Ah, of course the problem is somewhere completely else, and I made my conclusion too early 11:37
The list was empty, so max returns -Inf
11:38 philh_ joined 11:41 chenryn left
leont I'm doing @foo = @( Typename ), and observing an empty list. That is not what I expected 11:41
FROGGS leont: and Typename.list should return something non-empty? 11:43
leont Still empty :-s 11:46
m: my @foo = @(Promise.list); say @foo.perl 11:47
camelia rakudo-moar 859131: OUTPUT«Array.new()␤»
FROGGS m: say Promise.list 11:48
camelia rakudo-moar 859131: OUTPUT«␤»
FROGGS @(something) results in something.list 11:49
moritz m: say Int.list.perl
camelia rakudo-moar 859131: OUTPUT«().list␤»
11:49 telex left
moritz well, that's weird, IMHO 11:49
lizmat that you can call .list on a type object? 11:50
11:50 telex joined
moritz no, that it doesn't give me a list containing the type object 11:52
m: say 42.list.perl
camelia rakudo-moar 859131: OUTPUT«(42,).list␤»
moritz I don't see why it should behave differently for type objects
lizmat indeed... and it's done specifically so: in src/core/Any.pm, line 44 11:53
seems I did that about a year ago, although I'm pretty sure that was just a refactor 11:54
moritz Make .list, .flat, .eager & .hash type object aware. 11:55
If called on just a type object, they will all return an empty list/hash.
that's what the commit message says
doesn't sound like a refactor :-) 11:56
11:56 rindolf left
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 :-)
well, spectesting now with the special casing removes
*d
moritz irclog.perlgeek.de/perl6/2013-07-24#i_7364242 has some discussion 11:58
12:00 ClarusCogitatio left
BenGoldberg On another note: 12:00
m: say 0xffff.chr
camelia rakudo-moar 859131: OUTPUT«(signal )»
moritz thats's not good. 12:01
12:01 yeahnoob joined, ClarusCogitatio joined 12:02 yeahnoob left, yeahnoob joined
lizmat seems a slot opened up at the SPW, I'll be doing my "C-Day Is Coming" talk again 12:02
12:04 yeahnoob left, ClarusCogitatio left, yeahnoob joined 12:05 ClarusCogitatio joined
ggoebel1111112 lizmat++ 12:06
lizmat ok, I remember the discussion now 12:07
probably not a good idea to just change it without further discussion and tests 12:08
moritz (and without changing the specs too) 12:09
12:10 itz_ left 12:11 itz joined, ClarusCogitatio left
leont suspects he's observing Promise.allof spinlocking or some such. 100% CPU usage, but no input is coming in :-/ 12:11
12:12 _thou left 12:15 ClarusCogitatio joined 12:18 Woodi joined
lizmat leont: could you gist that ? 12:18
12:20 kaare_ left 12:21 yeahnoob_ joined
leont Would need to reduce it first, but sure 12:22
12:22 yeahnoob left, Rotwang joined 12:23 yeahnoob_ is now known as yeahnoob, yeahnoob left 12:24 yeahnoob__ joined, yeahnoob__ is now known as yeahnoob 12:26 ClarusCogitatio left
colomon moritz, flussence: new module failures this morning: host07.perl6.com:8080/report 12:26
12:26 yeahnoob left
colomon carlin: Crypt::Reop worked! 12:26
12:26 yeahnoob joined
FROGGS nice! 12:27
12:27 ClarusCogitatio joined
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
but moritz++ fixed it by adding a postcircumfix:<[ ]> candidate for carray 12:29
moritz though, for the record, I'm not very happy with that patch 12:31
when somebody gets a CArray, but not hte postcircumfix:<[ ]> candidate, they are still screwed
FROGGS and also every Proxy in an at_pos seems to be affected 12:32
12:32 Alula_ left, kurahaupo joined
dalek kudo/nom: 3f87260 | (Elizabeth Mattijsen)++ | src/core/Str.pm:
Native str doesn't do METAOP yet
12:32
kudo/nom: ca00625 | (Elizabeth Mattijsen)++ | src/core/Any.pm:
MMD Any .list/.flat/.eager/,hash

In the hopes it will get better optimized
12:32 Alula joined
jnthn Wait, why do we have type objects vanishing under .list? 12:36
(I know the patch didn't change the behavior, and yes, it allows easier/simpler inlining)
lizmat the reason is this: 12:41
m: my %h; say %h<a>.list.perl
camelia rakudo-moar 859131: OUTPUT«().list␤» 12:42
lizmat do we want that list to contain Any or not ?
m: my %h; say %h<a>.list.elems
camelia rakudo-moar 859131: OUTPUT«0␤»
lizmat do we want 1 in there or 0 ?
jnthn ^^^
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:43
lizmat moritz: well, I think we need to revert the rewrite
because initially, it would fail all samecase tests
(cannot change immutable str)
and now it hangs
so, there is something weird going on... 12:44
jnthn lizmat: Hmmm
lizmat jnthn: there could be other ways of fixing this behaviour 12:45
and have Int.list.elems be 1 and %h<doesnexist>.list.elems be 0
moritz lizmat: returning Nil from %h<a> would be one
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...
lizmat moritz: that is not an option
moritz lizmat: why?
oh 12:46
lizmat m: my Int %h; say %h<doesnexist>
camelia rakudo-moar 859131: OUTPUT«(Int)␤»
moritz because you can't assingn anymore
jnthn Right :)
moritz
.oO( assigning is overrated anyway )
jnthn Yeah! Immutability FTW! :P
lizmat
.oO( and in darkness, bind them all :-)
12:47
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:49
lizmat so where does it go to Perl6 space CompuUnitRepo?
where should it keep whether a module is loaded (with auth / version info?) 12:50
jnthn All actual module loading stuff seems to happen in ModuleLoader.nqp at present
12:50 ClarusCogitatio left
lizmat module *searching* also happens there atm 12:50
jnthn lizmat: Right.
lizmat that's why I wanted some 15 mins with you at YAPC::EU :-) 12:51
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.
And then delegate to what's in ModuleLoader.nqp for the low-level bits
12:51 ClarusCogitatio joined
jnthn That is, when we actually decided on a particular bytecode file to load or .pm to pre-compile 12:51
12:51 sqirrel joined
masak yanks jnthn away for dinner 12:51
lizmat just when it was getting interesting... 12:52
nom nom jnthn masak
ttyl
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?
masak to be continued :)
jnthn Then bits that should be in Perl 6 can be migrated piecemeal?
jnthn puts on shoes :)
nwc10 oh, thanks for the dinner reminder
12:54 cibs left
jnthn masak: OK, heading down to meet you :) 12:54
lizmat: bbl
12:54 virtualsue left 12:56 cibs joined
dalek kudo/nom: 8b65a08 | (Elizabeth Mattijsen)++ | src/core/Str.pm:
Revert 72f0e37a3c201c0666 and 3f87260758f1ebe

The original rewrite of samecase broke tests. THe naive fix for the exec error caused hanging. It is also not clear whether the solution is actually a good one: irclog.perlgeek.de/perl6/2014-09-05#i_9302559
12:57
12:57 lizmat left 12:58 lizmat joined 13:02 raiph joined
[Coke] "Is Christmas a four letter word?" Proposed perl 6 talk title. 13:05
13:05 _thou joined 13:08 sqirrel left
moritz [Coke]++ 13:09
m: say 'Christmas'.chars == 4 13:10
camelia rakudo-moar 859131: OUTPUT«False␤»
FROGGS "Perl 6 - A Christmas Carol"
moritz mini challenge: write some code that appears to test the above, but actually prints True
13:10 xenoterracide joined
FROGGS m: say 'Christmas'.chars ~~ 4.WHAT # (sort of) 13:11
camelia rakudo-moar 859131: OUTPUT«True␤»
moritz not bad
lizmat [Coke]: is C-Day a 4 letter word ? 13:13
FROGGS yes, cause '-' is not a letter
leont My spinlock seems to have gone away when I await()ed in the same thread that created the Proc::Async 13:14
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␤»
lizmat leont: interesting datapoint :-) 13:16
wonder what jnthn would want to say about that :-)
leont perl6 -e 'my $waiter = Proc::Async.new(:path($*EXECUTABLE), :args(["helper.pl"])).start; await start { await $waiter };' 13:22
Let's make that easier: perl6 -e 'my $waiter = Proc::Async.new(:path("echo"), :args(<Hello World>)).start; await start { await $waiter };' 13:23
13:25 cibs left 13:26 cibs joined
moritz leont++ # golfing 13:28
leont: could you please submit that to [email@hidden.address] 13:30
leont Sure
13:30 ClarusCogitatio left
lizmat is not going to look at this now, need to make some last min modifications 13:31
13:33 lastofthe left 13:34 ClarusCogitatio joined 13:45 xenoterracide left 13:48 guru joined 13:49 guru is now known as Guest37042, Guest37042 is now known as ajr_ 13:52 mberends joined
Woodi hallo #perl6 :) 13:52
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 ? 13:54
moritz Woodi: stuff changed to return utf8, not Buf 13:55
Woodi can I just s/Buf/utf8/g ? :) 13:56
retupmoca r: say "asdf".encode.^name; say "asdf".encode ~~ Buf; say "asdf".encode ~~ Blob; say Buf ~~ Blob; # or just s/Buf/Blob/g 13:58
camelia rakudo-jvm 8b65a0: OUTPUT«(timeout)»
..rakudo-{parrot,moar} 8b65a0: OUTPUT«utf8␤False␤True␤True␤»
14:07 fhelmberger left 14:11 jkg joined 14:18 cibs left 14:19 chenryn joined 14:27 cibs joined
masak today's mini-challenge: given two circles in the plane, do they intersect, and at which point(s)? 14:29
/me writes up his solution 14:30
masak writes up his solution
danaj Perhaps one of the RC aficionados could look at 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:30 ajr_ left 14:31 lizmat left
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
14:31 ajr joined 14:32 ajr is now known as Guest76134, treehug88 joined, Guest76134 is now known as ajr_
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:33
jnthn returns 14:34
[Coke] is reminded to test more rosettacode stuff. :| 14:36
too many half-finished projects.
dalek kudo-star-daily: f35ed29 | coke++ | log/ (14 files):
today (automated commit)
14:38 chenryn left
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?
jnthn timotimo: Yeah, modulo the fact that match object construction is using Perl 6 types, so it's a little different... 14:41
timotimo that wouldn't be terribly hard, i'd think 14:43
jnthn timotimo: Aye. go for it! :)
14:44 chenryn joined 14:46 itz_ joined
masak here's my answer to the mini-challenge. don't look if you don't want spoilers. gist.github.com/masak/7a77fb9e4fdaae9a1164 14:47
I enjoyed solving this one. I'm going to try to express it as code, too.
14:48 itz left
moritz the "do they intersect" part is very easy to answer :-) 14:51
masak yeah, that one I don't mind spoiling :)
moritz sqrt( ($p1.x - $p2.x) ** 2 + ($p1.y - $p2.y) ** 2) <= ($p1.r + $p2.r) 14:52
masak that's necessary but not sufficient. 14:54
timotimo did you all consider the circle being completely inside the other? 14:55
moritz oh right
masak two circles at the origin with nonzero radiuses don't intersect.
unless they intersect at all points.
oh, man. I gotta redo my solution, too :P
timotimo also "near the origin" would be able to cause that
masak yes, just an example.
BenGoldberg If they overlap perfectly, then do they have an infinite number of points of intersection>
? 14:56
masak guess so.
actually, forget "near the origin". they just have to have centers sufficiently near each other.
moritz this geometry stuff is always harder than it looks on the surface 14:59
masak no pun intended.
14:59 mr-foobar left 15:00 virtualsue joined
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␤␤»
masak Woodi: I agree. there is no particular sense in all the casting/conversion methods. 15:02
15:02 ajr_ left 15:04 guru joined, guru is now known as ajr_ 15:05 lizmat joined 15:06 dalek left 15:07 dalek joined, ChanServ sets mode: +v dalek 15:11 kjs_ joined 15:12 MilkmanDan left 15:16 beastd joined 15:17 MilkmanDan joined 15:19 denis_boyun left 15:22 chenryn left
lizmat masak: I don't think TimToady thinks of .hash and .list as coercers 15:29
15:29 BenGoldberg left
lizmat BTW, there is no .set, but there is a set() 15:29
m: say sat <a b c>
camelia rakudo-moar 8b65a0: OUTPUT«===SORRY!=== Error while compiling /tmp/tt_NKzCC2S␤Undeclared routine:␤ sat used at line 1. Did you mean 'say', 'set'?␤␤»
lizmat m: say set <a b c>
camelia rakudo-moar 8b65a0: OUTPUT«set(a, b, c)␤»
15:31 itz joined 15:33 itz_ left 15:34 [Sno] joined
lizmat end of day #1 at SPW 15:37
jnthn git st
oops
lizmat ww, it happens to the best :-)
timotimo it seems like in Match.pm, we getlexcaller('$/') twice, but could do it only once
in sub make 15:38
TimToady someone should add an AI to irssi that says "Did you really mean to do that here?"
jnthn timotimo: Thta is worth optimizing.
timotimo i'll first begin doing the caphash thing, though
jnthn aye
FROGGS \o/ 15:39
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:42 FROGGS left
jnthn timotimo: I think we may be a tad less careful with it in NQP... 15:43
15:44 FROGGS joined 15:45 zakharyas left 15:46 jdv79 left 15:47 jdv79 joined 15:48 BizarreCake joined 15:49 kjs_ left 15:50 ajr_ left, guru joined, guru is now known as Guest61909 15:52 Guest61909 is now known as ajr_
lizmat what should the impact be of optimizing make() ? 15:53
lizmat is not seeing any impact :-(
timotimo we could perhaps see it in perl6 code that uses grammars with the "make" sub
so, json-parse?
15:54 itz_ joined
colomon or maybe ABC? But I don't know that it's a particularly big time drag on either.... 15:54
TimToady how does one optimize 'make'? it's just storing a pointer 15:55
15:56 itz left
timotimo well, the make sub stores two things, and gets the caller's $/ twice 15:56
TimToady oh, okay, haven't got to that bit of backlog yet 15:57
15:58 Rotwang left
TimToady perhaps make should just be rewritten to take $/ as a hidden parameter internally 15:58
or it turns into $/.make or so 15:59
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:00
TimToady gets another cuppa to make sure he's not spouting nonsense...wait, coffee is a necessary but not sufficient condition... 16:01
timotimo hm, i'll be AFK for a while again before i can look at MATCH more 16:06
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?
timotimo JSON::Tiny is kind of simple
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
dalek kudo/nom: e61580f | (Elizabeth Mattijsen)++ | src/core/Match.pm:
Naive optimization of make()
16:10
lizmat please adapt / revert if it doesn't make sense
timotimo look at what you're deconting there 16:11
dalek rl6-roast-data: b0db04d | coke++ | / (6 files):
today (automated commit)
timotimo it seems like the $slash.CURSOR wants to be deconted instead of the $/ in the second bindattr 16:12
so i think $slash should only contain nqp:getlexcaller
[Coke] these failed across the board today:
S05-modifier/ii.rakudo.moar aborted 18 test(s)
S05-substitution/subst.rakudo.moar aborted 19 test(s)
S32-str/samecase.t aborted 8 test(s)
integration/99problems-51-to-60.t aborted 17 test(s)
TimToady yes, the AST really goes into the cursor, if I'm not mistaken
so it's really $¢.make, and $/ isn't really needed at all for that bit 16:13
16:14 mr-foobar joined
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
but i think it might be faster to getlexcaller $/ and then grab the .CURSOR from there
TimToady I don't think rakudo has a $¢
they're always writing $/.CURSOR 16:15
that seems bassackwards to me, but haven't really thought about it that hard
to me the cursor is real, and the $/ is a "view"
timotimo m: regex Test { a { say $¢ } }; say "aaaaaa" ~~ Test; 16:16
camelia rakudo-moar 8b65a0: OUTPUT«===SORRY!=== Error while compiling /tmp/Ibtzx07hMP␤Two terms in a row␤at /tmp/Ibtzx07hMP:1␤------> regex Test { a { say $⏏¢ } }; say "aaaaaa" ~~ Test;␤ expecting any of:␤ postfix␤ infix s…»
timotimo m: regex Test { a { say($¢) } }; say "aaaaaa" ~~ Test;
camelia rakudo-moar 8b65a0: OUTPUT«===SORRY!=== Error while compiling /tmp/J7O1GgvGA6␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/J7O1GgvGA6:1␤------> regex Test { a { say($⏏¢) } }; say "aaaaaa" ~~ Test;␤ e…»
jnthn I *think* we actually do install a $¢ in regexes
[Coke] ponders pronouncing that "docent" 16:17
jnthn m: grammar G { token T { :my $ = say ::.keys; <?> }; 'abc' ~~ /<G::T>/
camelia rakudo-moar 8b65a0: OUTPUT«===SORRY!=== Error while compiling /tmp/QxKsjGMQ_g␤Unable to parse expression in block; couldn't find final '}' ␤at /tmp/QxKsjGMQ_g:1␤------> = say ::.keys; <?> }; 'abc' ~~ /<G::T>/⏏<EOL>␤ expecting any of…»
lizmat [Coke]: fixed those tests by reverting some stuff
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␤»
jnthn Seems it's in there
[Coke] lizmat++ thanks.
jnthn m: grammar G { token T { :my $ = say $¢; <?> }; 'abc' ~~ /<G::T>/
camelia rakudo-moar 8b65a0: OUTPUT«===SORRY!=== Error while compiling /tmp/nGpuDg3xyg␤Two terms in a row␤at /tmp/nGpuDg3xyg:1␤------> grammar G { token T { :my $ = say $⏏¢; <?> }; 'abc' ~~ /<G::T>/␤ expecting any of:␤ postfix␤ …»
jnthn yowser :)
TimToady
.oO("buckpenny")
jnthn std: grammar G { token T { :my $ = say $¢; <?> }; 'abc' ~~ /<G::T>/
[Coke] lizmat: btw, many parrot date/time tests still failing.
camelia std 53b3ca6: OUTPUT«===SORRY!===␤Unable to parse block at /tmp/ELf18M0eIK line 1:␤------> grammar G ⏏{ token T { :my $ = say $¢; <?> }; 'abc'␤Couldn't find final '}'; gave up at /tmp/ELf18M0eIK line 1 (EOF):␤------> :my $ = say $…»
jnthn m: grammar G { token T { :my $ = say $¢; <?> } }; 'abc' ~~ /<G::T>/ 16:19
camelia rakudo-moar 8b65a0: OUTPUT«===SORRY!=== Error while compiling /tmp/Gnj5UvkH7X␤Two terms in a row␤at /tmp/Gnj5UvkH7X:1␤------> grammar G { token T { :my $ = say $⏏¢; <?> } }; 'abc' ~~ /<G::T>/␤ expecting any of:␤ postfix␤ …»
jnthn std: grammar G { token T { :my $ = say $¢; <?> } }; 'abc' ~~ /<G::T>/
camelia std 53b3ca6: OUTPUT«ok 00:01 130m␤»
jnthn Sorry for the spam
Hm, so STD parses it.
[Coke] lizmat: figured the if/def would cover it, but didn't. i'll ahve to dig deeper there.
TimToady rakudo has never recognized $¢ that I know of
jnthn ohhh... 16:20
token special_variable:sym<$¢> { <sym> }
STD has that.
So, that's what we miss :)
lizmat spectesting adapted sub make opt 16:21
dalek kudo/nom: 6628ca3 | (Elizabeth Mattijsen)++ | src/core/Match.pm:
Decont the proper thing before binding
16:22
16:23 chenryn joined 16:26 dayangkun left, yeahnoob left 16:38 _thou left, chenryn left, kaare_ joined
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:41
jnthn And sub lookup caching, and making wval resolution constant 16:43
Also for optimizing some forms of argument handling
It'll learn multi-dispatch in the future...
leont Hmmm. My actions are called, but nowhere to be found in the resulting Match object :-s
jnthn leont: You do call "make" to attach stuff to the matches? 16:44
hoelzro jnthn: I ask because I'm curious if it would be possible to build an invokedynamic-less jakudo 16:46
for Android
leont I do
timotimo did you fetch the resulting object's .made? 16:47
leont Where am I supposed to do that?
gtodd javakudo?
oh wait I get it :-)
timotimo on the result of .parse
jnthn hoelzro: I was mostly hoping for a invokedynamic-full Android :P
hoelzro jnthn: I would prefer that, but I'm thinking about what I have more influence over ;) 16:48
leont That returns an Any :-/
jnthn leont: Did you do a make in the TOP action method? 16:49
timotimo did you "make" something in your TOP method?
jnthn Or whatever rule the grammar was entered in...
leont Yes, but I wouldn't be surprised if I'm doing it wrong there
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…»
hoelzro is it unreasonable to think that should work? ↑
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
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
hoelzro gtodd: I would like to write web service bindings in Perl 6, but use them from apps I write
TimToady: understandable 16:52
jnthn: but we *could* have array access on a parameterized role do the right thing (barring any performance setbacks, of course)
right?
TimToady and what jnthn++ said, it's currently a special form in the parser
jnthn hoelzro: It feels like a hack/level mix to me, tbh
hoelzro ok 16:53
then I won't file that as an RT issue =)
jnthn hoelzro: If you really want it in a scalar varialbe you can ues the MOP to work with it
TimToady and we want the optimizer to know that it can assume the insides of .[] are 0..*
hoelzro I'm guessing my $role = R; class C does $r { ... } is also out of the question?
jnthn If you don't then you can always declare a constant
Yes, because that's a complete compile time / runtime confusion.
hoelzro ok 16:54
jnthn m: role Shazam[::T] {} ; constant r = Shazam; my $subrole = r[Num]
camelia ( no output )
hoelzro just going through some things I've run across and sanity checking them =)
TimToady oh, we're already far past the bounds of sanity :) 16:55
16:55 philh_ left
hoelzro =) 16:55
Is there a way to refer to a particular candidate of a role (a la &foo:(Str, Num))?
other than walking R.^candidates by hand, that is 16:56
leont The TOP action does not appear to be called :-s
timotimo what's your parse call look like? 16:57
and: did your match succeed?
jnthn leont: Your grammar does actually match, just to be sure?
hah, timotimo++ is constantly a step ahead of me :P
TimToady surely being a step ahead is run time?
timotimo jnthn: so that you can focus on more difficult stuff :P
leont Ah, it doesn't. It just looked to me like it did 16:58
(was look at Match.perl, not evaluating Match.Bool) 16:59
timotimo did you try Grammar::Tracer from the Grammar::Debugger package?
leont It also got me confused because it did trigger specific actions
timotimo aye, everything that gets matched on the way through will have their action methods called 17:00
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
so generally just store something to handle in a later pass
17:03 lastofthe joined 17:04 tinyblak joined
TimToady we don't support lazy action methods as SNOBOL does 17:04
17:04 kaleem left
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
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
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
TimToady so make sure all the side effects aren't side effects
jnthn My JSON::Path thingy used actions to build up a tree of closures :)
Turned out fairly neat. 17:07
So long as I didn't think too hard about why it worked. :)
TimToady us bear-of-very-little-brains don't want to think about it at all :) 17:08
otoh, that's very similar to what we want with the list refactor: just hand me back some closures to call later
17:08 ajr_ left
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:09
17:10 guru joined, guru is now known as Guest65728, Guest65728 is now known as ajr_
jnthn gtodd: My point was that you *cna't* write it like that 17:10
Though...
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)␤»
jnthn m: role A { }; role B { }; constant R = (A, B).pick; class C does R { }; say C.^roles
camelia rakudo-moar 8b65a0: OUTPUT«(A)␤»
jnthn m: role A { }; role B { }; constant R = (A, B).pick; class C does R { }; say C.^roles
camelia rakudo-moar 8b65a0: OUTPUT«(A)␤»
jnthn m: role A { }; role B { }; constant R = (A, B).pick; class C does R { }; say C.^roles
camelia rakudo-moar 8b65a0: OUTPUT«(B)␤»
jnthn :)
timotimo tee hee.
gtodd eek ... there so many styles and ways to make machines do things ...
TimToady your coin is obviously biased 17:12
17:12 ajr_ left
jnthn Gah, I musta been handed back a fake one again... 17:12
[Coke] jnthn: wow, that's evil! 17:13
TimToady well, don't pass it on, I hear the penalty for counterfeiting is high there...
gtodd when I was a child "compose yourself" used to mean "focus", "relax", "calm down" :-) ...
TimToady yes, that's about right; figure out which methods suit you 17:14
gtodd heh nice
TimToady and settle into a role :)
jnthn And if you're not sure, just pick some at random :P
gtodd TimToady: hah truly you are a masterful linguist :-) 17:15
17:15 ajr joined
TimToady well, but that's why we picked "role" in the first place, because of the metaphor 17:15
17:15 ajr is now known as Guest2867
gtodd jnthn: that is sounding very "human" or life like 17:15
17:16 Guest2867 is now known as ajr_
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)
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 ...)
jnthn say calls .gist
And then outputs that string, plus a newline
TimToady gtodd: aren't you thinking of R&G are dead? 17:18
gtodd oopsie
:)
17:19 kaare_ left
TimToady is the guy who flipped 10 heads in a row in high-school biology when we were doing remedial probablility 17:19
so I knew I was special :)
colomon one in a thousand, anyway. ;)
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
gtodd TimToady: that sort of experience (which is random) could effect your whole life! 17:21
firefish5000 *$Obj[0] or just $Obj
TimToady firefish5000: why would you want to override .gist to return a non-string? 17:22
it doesn't make very much sense
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 tinyblak left
gtodd heh 17:23
jnthn Time for some sleep :) 17:24
'night, #perl6
TimToady o/
colomon \o
firefish5000 So gist should return a string. Good to know.. Thanks TimToady!
gtodd firefish5000: hardly anyone does - this is perl6 ... a whole new planet :-)
17:25 BizarreCake left
TimToady m: constant minus1 = -1; multi sub foo (minus1) { say "HERE" }; foo(-1) 17:25
camelia rakudo-moar 8b65a0: OUTPUT«HERE␤»
TimToady grondilu: ^^^
17:26 ajr_ left
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␤␤»
gtodd wow
firefish5000: /planet/several new interconnected planets/
17:27 tinyblak joined
TimToady we was hopin' for a whole arm of the galaxy, oh well 17:27
17:27 zakharyas joined, tinyblak_ left 17:30 gfldex joined
gtodd well p6 seems to be getting ready to spread at the speed of light 17:30
TimToady at least the speed of light is evenly distributed :) 17:31
gtodd heh
TimToady light itself, however, is not
gtodd true ...
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:35
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.
*lieves
gtodd heh .. ... anyway I now see that the Waiting for Godot bit of perl6 is in "loop" ... 17:38
TimToady we should have a "pool" verb that does the opposite of "loop" 17:39
gtodd if I am remembering the play correctly
ooh nice....
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:41
17:47 tinyblak_ joined 17:49 Alina-malina left 17:50 tinyblak left, Alina-malina joined
retupmoca .seen grondilu 17:54
yoleaux I saw grondilu 10:37Z in #perl6: <grondilu> and I'm fairly up-to-date
retupmoca .tell grondilu PR to fix Digest tests please :) github.com/grondilu/libdigest-perl6/pull/3 17:55
yoleaux retupmoca: I'll pass your message to grondilu.
17:57 Alina-malina left, Alina-malina joined 18:00 tinyblak joined, tinyblak_ left
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:01
maybe pool is a short cut for gather/take but is gather/take the opposite of loop ... 18:02
18:02 tinyblak_ joined
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…»
masak something's bitrotted a little in division by 0?
colomon m: say (1 / 0).WHAT 18:05
camelia rakudo-moar 6628ca: OUTPUT«(Rat)␤»
18:05 tinyblak left
colomon in Rat.gist, perhaps? 18:05
TimToady the whole expected Foo but got Failure thing ought to be expanding on the Failure
since it's the Failure that indicates the location of the original error 18:06
(we hope)
masak just did `perl6 -pe '.=indent(4)'` and it worked! 18:08
masak is quite happy
my solution to today's mini-challenge, gist.github.com/masak/7a77fb9e4fdaae9a1164 -- now contains working Perl 6 code. 18:09
gtodd masak: nice :-)
masak good night, #perl6 18:10
colomon \o
colomon wonders what perl6 -pe '.=indent(4)' does...
gtodd colomon: indents a file :-)
18:11 slavik left
colomon ponders this 18:12
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!!)
perl6 -pe '.=indent(4)'`blah.txt
colomon oh!
gtodd yes!
colomon m: say "Hello".indent(4)
camelia rakudo-moar 6628ca: OUTPUT« Hello␤»
colomon gtodd++ timotimo++ 18:14
gtodd oops that shoulda been perl6 -pe '.=indent(4)' blah.txt
hehe
I hope you all have excellent weekends ... :-) 18:16
apparently going for a walk can help perl6 development www.newyorker.com/tech/elements/wal...s-us-think
cheers
18:17 gtodd left, tinyblak_ left 18:19 BizarreCake joined 18:20 esaym153 joined 18:22 brrt joined
esaym153 so is there a quick why to get the latest perl6 like github.com/tokuhirom/Perl-Build ? 18:23
TimToady rakudobrew maybe
hoelzro there's also a docker image, if you're into that sort of thing 18:24
18:24 slavik joined
hoelzro that's rakudo star, though, so it's lagging behind by about a week of what's in Git 18:24
esaym153 hmm, let me try rakudobrew first 18:25
hoelzro m: #|(A B<bold> statement) class Simple {} ; say Simple.WHY 18:26
camelia rakudo-moar 6628ca: OUTPUT«A B<bold> statement␤»
hoelzro should that B<...> be specially handled? 18:27
declarator docs seem to exist somewhere between comments and POD
18:28 brrt left, teodozjan joined
timotimo yeah, rakudobrew is an excellent tool for getting an up-to-date rakudo up and running fast 18:28
teodozjan hi, I cannot boostrap panda and bisected it github.com/rakudo/rakudo/commit/ca...ba97440b97 is this known issue? 18:30
hoelzro "In all other respects they act just like comments" 18:33
this makes me inclined to say "no" (wrt my earlier question)
TimToady esaym153: I think I see the problem 18:34
18:35 Sqirrel joined
dalek kudo/nom: fd92389 | TimToady++ | src/core/Any.pm:
restore missing my
18:36
TimToady esaym153: try again with that fix
18:37 zakharyas left
TimToady er, I mean, teodozjan 18:37
esaym153 heh 18:38
TimToady sorry, misread backlog
teodozjan already compiling :)
esaym153 ran rakudobrew, now running bare perl5 scripts with no issues. Interesting... 18:39
TimToady perl5?
do you mean v5? 18:40
FROGGS unlikely 18:41
esaym153 TimToady: yea, some pretty simple p5 scripts that don't have 'use' anywhere
FROGGS O.o
TimToady you sure you're executing perl6? 18:42
esaym153 wait, I'm an idiot, perl still points to perl5...
changed on the wrong terminal
TimToady yes, and it should continue to do so for now, unless you're into pain and suffering :)
esaym153 was quite shocking for a minute!
TimToady is it expected that t/spec/S22-package-format/parse-spec.rakudo.moar fails now? 18:44
there's an extra :name parameter or so
lizmat will look at that soon
not sure why that started failing all of a sudden
it actually looks at first sight that the *expected* value is wrong
TimToady could be the missing my's
lizmat goes back to socializing and dessert 18:45
TimToady yes, it was
teodozjan TimToady: This was very fast fix, works now, thanks :)
TimToady lizmat: when you did the multi fix, you inadvertently left out the 'my' on % =
so they were state vars instead of my 18:46
so any routine that calls .hash twice clobbers the first value
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
it only took ~47000 seconds
wait no, that's user time
wallclock is 22:59:05
18:48 raiph left
hoelzro is it ok to just file issues against perl6/spec if I have an idea for a change to the spec? 18:48
TimToady well, if you simulatenously want it to be remembered, but never actually considered :P 18:49
hoelzro =) 18:50
TimToady: did you see my comment on POD formatting in declarator docs?
I would like to know what you think about that
TimToady is still feebly backlogging 18:51
18:51 telex left
hoelzro sorry, no rush! 18:52
18:52 telex joined
colomon TimToady++: panda rebootstraps okay with your change 18:54
18:54 itz joined 18:56 araujo left, itz_ left
jdv79 building panda hung earlier today for me. so where is the fix? what do i update. 19:04
i think it hung testing json tiny or right after
TimToady just get nom HEAD 19:05
teodozjan jdv79, update rakudo 19:06
19:06 kjs_ joined
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 19:11 darutoko left
timotimo avuserow: how much ram did it take at its peak? 19:17
also, avuserow++ # heroic profiling 19:18
19:19 BizarreCake left 19:30 kjs_ left 19:31 raiph joined
lizmat TimToady: I thought the absence meant "my"... :-( 19:38
thanks for fixing...
FROGGS if (SvTHINKFIRST(sv))
sv_force_normal_flags(sv, append ? 0 : SV_COW_DROP_PV);
else if (RsSNARF(PL_rs)) {
^--------- wth
lizmat that's C for you :-) 19:39
FROGGS yeah but....
think first? why on earth?
19:39 kjs_ joined 19:40 kjs_ left
TimToady lizmat: 'my' is already short, so we gave the sugar to 'state' instead, which needs it more :) 19:40
and turns out to be useful in its own right
grondilu hi
yoleaux 17:55Z <retupmoca> grondilu: PR to fix Digest tests please :) github.com/grondilu/libdigest-perl6/pull/3
grondilu retupmoca: done
grondilu thought he had already done that but well 19:41
TimToady grondilu: you can also use constant minus1 = -1;
grondilu yeah, saw that will backlogging
while* 19:42
TimToady though I wouldn't be adverse to making -1 work directly
19:42 dwarring joined
TimToady can't just assume -1 in an expression is reducable though 19:42
so sigs would have to be special cased
FROGGS grondilu: I did the same PR and it got merged
grondilu: see github.com/grondilu/libdigest-perl6/pull/4 19:45
grondilu yeah in github.com/grondilu/libdigest-perl...c309b337ef I don't understand. What did I do wrong?
FROGGS I opened a duplicate PR, four days after retupmoca++ did... 19:46
so merging now was a noop
retupmoca oh, I figured it wasn't merged, since I was still seeing failures in the module smoker
FROGGS dang, why does it fail now? 19:47
retupmoca not sure - host07.perl6.com:8080/project/Digest 19:48
grondilu I'll try to learn how to allow other users to do commits
FROGGS \o/ 19:49
settings->collabs->enter FROGGS, and then retupmoca :D
grondilu well, that was eaasy 19:50
retupmoca grondilu++
FROGGS I love it!
grondilu++
grondilu you can add yourself in github.com/grondilu/libdigest-perl...er/CREDITS if you want.
TimToady hides behind a simple parcel semantic... 19:51
FROGGS I don't care about credits :o)
grondilu I meant it as a way to test if you can indeed commit
FROGGS grondilu: I got the mail from github, and it never lied 19:52
grondilu ok 19:53
19:54 dolmen joined
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:54
dwarring looking at stackoverflow.com/questions/2566910...tever-star 19:55
'* + 2' curries, but '* min 2' doesn't 19:57
colomon really?
dwarring m: say * + 2
camelia rakudo-moar fd9238: OUTPUT«WhateverCode.new()␤»
dwarring m: say * min 2
camelia rakudo-moar fd9238: OUTPUT«2␤»
dwarring yep
FROGGS m: say * max 2
camelia rakudo-moar fd9238: OUTPUT«*␤» 19:58
dwarring say min 10, 12, 42, 3
FROGGS so it becomes Inf-ish?
dwarring say 3 min 4
m: say 3 min 4
camelia rakudo-moar fd9238: OUTPUT«3␤»
colomon where's that list of non-WhateverCode operators?
dwarring min can be used as an infix
colomon n: say * min 2 19:59
camelia niecza v24-109-g48a8de3: OUTPUT«{ ... }␤»
dwarring but isn't currying as such
colomon I think this might be a rakudobug?
FROGGS perhaps it checks for an existing sub before it checks for infixes?
(just guessing) 20:00
colomon p6: say (1..20).map(* min 3)
dwarring something to do with the signature (also guessing)
camelia rakudo-jvm fd9238: OUTPUT«(timeout)»
..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…»
..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␤…»
..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␤»
colomon perlcabal.org/syn/S02.html#Operator...c_Whatever 20:01
I don't see any reason this list should also include min / max?
TimToady sees no signatures with * offhand 20:02
lizmat m: say (1..20).map: { $_ min 3 } # works ok
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␤»
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
lizmat well, at any case, that error for say (1..20).map(* min 3) is LTA 20:06
retupmoca (needed more .flat is all)
FROGGS ohh, weird
retupmoca I think anyway, I don't actually know how these hash algorithms work 20:07
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"?
I can't think of any reason it should, but maybe there's something I'm missing here. 20:10
grondilu retupmoca++
TimToady I'd call it a POLA bug 20:13
20:13 araujo joined, araujo left, araujo joined
TimToady something is treating min as if it were a range 20:13
lizmat POLA? 20:14
20:14 mohawk joined
TimToady just like POLS, only differnet 20:14
colomon POLS?
TimToady s/Surprise/Astonishment/
dwarring heh
colomon ah 20:15
TimToady has heard both variants
.oO(POLW)
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
mohawk i hear you 20:17
ingy moritz: re: github.com/ingydotnet/pig-latin-ac...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.
mohawk are you "no strong feelings one way or the other"?
TimToady me thinks people will still call it perl5
TimToady has not strong feelings on the branding of perl5 these days
*no
mohawk that's awesome, thanks for your time 20:18
ingy Timbus: I wrote more into github.com/ingydotnet/pig-latin-acme#readme as to explain the project goals.
20:18 kaare_ joined
ingy mohawk: what problem are you thinking to solve? 20:18
mohawk good question
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
ingy: that's certainly what perl -V reports
ingy oh?
mohawk but the masses are less easily confused than you ;-)
dalek ecs: f79cf81 | (Elizabeth Mattijsen)++ | S99-glossary.pod:
Add POLA / POLS lemma's
itz I think its a silly idea
mohawk Summary of my perl5 (revision 5 version 20 subversion 0) configuration: 20:20
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
ingy sorry, couldn't resist
I also think that 'Perl' is just a contextual branding. It's like a topic ($_). Requires the context it's in. 20:22
mohawk indeed 20:23
FROGGS and both languages feel very like Perl to me
ingy Someday it might imply Perl6 to the guy walking down the street
FROGGS hopefully :o)
ingy might depend on the street
carlin AES in "Perl 6" gist.github.com/carbin/c1091bc4c44cd8eeec9b 20:24
ingy tell mst "Problem solved"
carlin: :)
mohawk: audreyt gave me comaint on Inline::{Perl,MzScheme} btw 20:25
carlin Inline::Perl5 is very nice, nine++
ingy someone need to write Inline::Perl6
fot *both* perl 5 and perl 6
carlin and then use Inline::Perl6 within Inline::Perl5 20:26
Perl-ception
ingy metacpan.org/pod/Inline::Perl
10 years old :P
20:27 guru joined, guru is now known as Guest60223
leont The part where I have a clue is already covered by nine, the other way around sounds trickier 20:27
20:27 Guest60223 is now known as ajr_
ingy I liked 'guru' better 20:27
20:29 itz_ joined, treehug88 left 20:32 itz left
FROGGS okay, sv_gets really is challenging 20:32
mohawk ingy: good news
lizmat SPW shutting down for today... see you later& 20:33
20:33 lizmat left 20:34 kaare_ left
dwarring creates RT #122708 for non currying: * min 2 20:35
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=122708
leont FROGGS: I warned you!
nine Oh my.... I really should start working on the API soon before more and more people actually use Inline::Perl5... 20:36
20:36 itz_ left
leont nine: how I know that feeling! 20:36
FROGGS leont: yes, but our readline implementation is just sloooooooow :/
20:37 itz joined
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:37
leont It's hard to make it fast, perl5 is cheating everywhere it can 20:38
FROGGS .new :o)
nine Inline::Perl5.new of course... that might really take a while to get used to.
FROGGS *g*
I also have trouble with that when hacking much on v5
leont The main thing is peeking and poking in the buffers and not copying anything more than once (if possible)
FROGGS leont: we currently scan byte by byte for the separator :o) 20:40
mohawk nine: no pressure ;-) 20:41
leont That's better than reading byte by byte ;-)
20:41 teodozjan left
ingy is going to make a Scratch→Perl6 translator! 20:42
you know… for kids!
mohawk someone should make a p5 module to UNIVERSAL::overload the '.' operator for objects
20:42 itz_ joined
leont Another thing to realize is that you want to build it upon read(2) semantics, not on fread(3) semantics 20:42
mohawk: I think someone already did for Ruby.pm or some such
mohawk ha
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
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:44
20:44 itz left
nine ah, because the class is actually called PerlInterpreter instead of Inline::Perl5 20:46
20:48 itz joined, itz_ left
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:49
20:53 leont left 20:54 leont joined, anaeem1 left, anaeem1__ joined
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:55
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
FROGGS leont: I'm not sure... but I can benchmark that 20:58
(I guess I should do that actually first :o)
err, s/benchmark/profile/
21:01 anaeem1__ left
mohawk have a good one, people 21:01
21:01 mohawk left, anaeem1 joined
FROGGS it spends 35% of the time reifying the ListIter... 21:02
nine Should Inline::Perl5 be a module like it is currently or a class (essentially what the PerlInterpreter class is right now)? 21:05
FROGGS IIRC there are some bugs about modules and exporting that classes do not suffer from 21:07
so perhaps make it a class
avuserow timotimo: sorry for delay, $dayjob grabbed me. but here's the command and time output: gist.github.com/anonymous/ca74c0e809e50299f44e
timotimo: looks like the html compresses well with gzip -9, so I'm going to upload. I guess dropbox is an okay option. 21:08
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 :)
40 gigabytes peak?
avuserow timotimo: www.dropbox.com/s/1fjt2v04v44svdx/...ml.gz?dl=0 21:15
there is some minor swap usage so maybe it swapped out some bits of the base system
timotimo i don't think i'll be able to look at this on any machine i have %)
avuserow the machine has 41203468 bytes of memory according to free
let me try opening it up in a browser 21:17
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
out of memory: 0x00000000802817AC bytes requested
m: say 0x00000000802817AC 21:19
camelia rakudo-moar fd9238: OUTPUT«2150111148␤»
avuserow m: say 0x00000000802817AC / 1024 ** 3
camelia rakudo-moar fd9238: OUTPUT«2.0024470501␤»
21:21 itz_ joined
timotimo Am loading it in vim first 21:22
dalek line-Perl5: c9b69bb | nine++ | / (8 files):
Turn Inline::Perl5 into a proper class.

The new Inline::Perl5 class is now what was the PerlInterpreter class. Replaced my $i = p5_init_perl() with my $i = Inline::Perl5.new(); No need for the user to call $i.init_callbacks(); anymore
21:23
21:23 itz left 21:26 itz_ left 21:27 woolfy joined
timotimo curiously, vim is not taking up so much ram, the usage goes down every now and then 21:27
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
grondilu avuserow++ learning me something about vim 21:34
timotimo when i did that, i got to see everything up to where the json would have started 21:35
firefox isn't hanging or allocating much memory or anything like that :\ 21:36
21:36 brrt left 21:37 lizmat joined 21:38 itz_ joined
timotimo chrome kills the tab almost immediately 21:39
21:40 itz left 21:44 itz_ left
lizmat leont: I reported #122709 , so you don't have to :) 21:44
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=122709
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
(or to golf down MoarVM's profiling output and attack it from that side)
leont lizmat: :-) 21:47
timotimo well, yeah, the profiler just spits out the complete call chain of pretty much everything 21:48
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)»
lizmat otherwise we have found a new way of deadlocking...
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
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
and now my terminal is trying to cache infinite lines of backlog
diakopter too many lines 21:51
timotimo yes
21:51 mr-foobar left
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
camelia rakudo-moar fd9238: OUTPUT«(timeout)»
avuserow I'd bet that the browsers are getting hung up in the json.parse call... 21:53
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.
timotimo lizmat: what? why would you do that? 21:58
then you can't pass promises between threads to signal a thread to go on
unless it spin-waits on it
that can certainly not be your intention
lizmat well, I think that's a recipe for trivial deadlocks 21:59
timotimo trivial deadlocks like that are trivial to spot 22:00
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
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:01
ingy timotimo, lizmat: seems like code is better than words here :) 22:02
dalek ecs: 3db5b14 | (Steve Mynott)++ | S99-glossary.pod:
fix bare say
ingy ie, gist up some situational test code to discuss 22:03
lizmat ingy: that's what I'm doing :-)
ingy xo
sorry just woke up, didn't really read back enough. *yawn* 22:04
lizmat also: we have simple Promises, and Promises created by a start {} 22:05
they might need different handling ?
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
on the other hand, isn't that what Promise.next is for ?
timotimo .. what? 22:07
i don't know what that is ...
22:07 virtualsue left
timotimo do you mean ".then"? 22:08
lizmat sorry, I meant .then
yes
timotimo that's a bit different
maybe someone with more multithreaded programming experience than me could comment ...
lizmat maybe I'm projecting my p5 ithreads experiences :-( 22:10
ingy gist, gist, gist 22:11
lizmat yeah, yeah, yeah 22:12
I'm not thinking straight anymore.... will sleep on it (no pun intended) 22:16
gnight #perl6! 22:17
tadzik gnight lizmat
timotimo :)
gnite lizmat
22:18 spider-mario left 22:20 Rotwang joined 22:21 Rotwang left 22:25 gfldex left 22:30 beastd left 22:31 Psyche^_ joined 22:35 Psyche^ left 22:41 ajr_ left 22:58 lastofthe left 23:06 dolmen left 23:12 xragnar_ joined, xragnar left, xragnar_ is now known as xragnar
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␤␤»
raiph ww 23:15
23:18 dugword joined
grondilu m: sub g($a,$b) {$a + $b}; say g 1, 2 23:18
camelia rakudo-moar fd9238: OUTPUT«3␤»
grondilu m: sub g($a,$b) {$a + $b}; say [&g] 1, 2 23:19
camelia rakudo-moar fd9238: OUTPUT«===SORRY!=== Error while compiling /tmp/i9x2JwAdd9␤Two terms in a row␤at /tmp/i9x2JwAdd9:1␤------> sub g($a,$b) {$a + $b}; say [&g] ⏏1, 2␤ expecting any of:␤ postfix␤ infix stopper␤ …»
grondilu [] works only with infixes, though.
m: sub g($a,$b) {$a + $b}; say * g 1, 5 23:20
camelia rakudo-moar fd9238: OUTPUT«===SORRY!=== Error while compiling /tmp/zkZnw8Uwr6␤Two terms in a row␤at /tmp/zkZnw8Uwr6:1␤------> sub g($a,$b) {$a + $b}; say * ⏏g 1, 5␤ expecting any of:␤ postfix␤ infix stopper␤ …»
grondilu m: sub g($a,$b) {$a + $b}; say 2 [&g] 5 23:21
camelia rakudo-moar fd9238: OUTPUT«7␤»
grondilu oh, Ic
[&f] turns a binary sub into an infix?
I did not know that.
so * [&g] 5 was interpreted as Whatever + 5, which is not defined I guess. 23:22
m: say Whatever + 1
camelia rakudo-moar fd9238: OUTPUT«WhateverCode.new()␤»
grondilu oh it is
diakopter m: say * * * * * * * * *()()()()()()()()()()()()() 23:24
camelia rakudo-moar fd9238: OUTPUT«WhateverCode.new()␤»
leont Is there a way to automatically try to coerce attributes? 23:25
E.g. I have a Int attribute, but if given a Str it will try to coerce it before failing
timotimo aye 23:30
dugword I think you'd have to consult your DM
timotimo m: sub test($foo as Int) { say "yay an int" }; test(1); test("100");
camelia rakudo-moar fd9238: OUTPUT«yay an int␤yay an int␤»
23:32 jack_rabbit joined
leont Can I apply that to an attribute? 23:33
timotimo let's test it 23:34
m: class Foo { has $bar as Int; }; Foo.new(:bar("100")).perl.say 23:35
camelia rakudo-moar fd9238: OUTPUT«===SORRY!=== Error while compiling /tmp/MLl5LW0mWz␤Cannot call 'trait_mod:<as>'; none of these signatures match:␤:(Parameter:D $param, Any $type)␤at /tmp/MLl5LW0mWz:1␤------> ␤»
timotimo ah
apparently not
leont Yeah, that's what I hit :-s 23:36
Also, rakudo's install dir order is plain wrong (lib before sitelib makes dual-life really hard). I need to rakudobug that too. 23:37
23:40 lastofthe joined 23:46 itz_ joined 23:49 itz left 23:55 raiph left