Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-02-21

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:09 census Good night rindolf! :)
00:12 skids joined #perl6
00:13 cognominal joined #perl6
00:35 TimToady lue: why not just use eqv if you really want to check for equivalence?
00:36 TimToady (usually one doesn't want that though)
00:36 lue TimToady: I wanted to see if there was some way I could print what the compiler uses to check Name Equivalence
00:37 lue (just working my way through the spec; not actually coding)
00:42 TimToady that's just it, the compiler rarely checks name equivalence, but usually type containment is all that is wanted
00:42 TimToady othewise polymorphism doesn't work right
00:59 anuby joined #perl6
01:14 woosley joined #perl6
01:18 * [Coke] yawns.
01:20 hypolin joined #perl6
01:21 * diakopter yawns
01:27 [Coke] hah!
01:34 japhb dangit, you got me too.
01:35 * TimToady sips his coffee bemusedly, and wonders if it will keep him awake too late tonight...
01:39 Pleiades` mmmmm coffee
01:39 * rjbs misreads Name Equivalence twice as Near Equivalence.
01:49 rjbs I have written a very simple Perl 6 program to write a very simple z-machine program.  I was pleased to get it working.  I might keep putzing around.  If anybody feels like wasting a little time on me, I'd be curious as to how badly my p5 accent is showing in https://gist.github.com/rjbs/5001268
01:51 TimToady don't need the parens on assignment to %for
01:51 apejens joined #perl6
01:52 rjbs woah
01:52 TimToady don't need the parens on the while either
01:53 adu joined #perl6
01:53 rjbs I felt like I ought to be using splice as a method there, but I failed to do it the first time
01:53 rjbs and used loop.  then I did what you see
01:53 TimToady might be a way to recast the while as a for, though asking how many elements is left is harder
01:54 rjbs I feel really weird ditching those parens on %for=.  I'll either have a hanging indent or a line with just ;.  Ah, the tribulations of Perl! :)
01:55 TimToady using an accumulator like $result often means you could join '', gather ...  instead
01:55 * rjbs will consult http://perl6advent.wordpress.com/2009/12/23/day-23-lazy-fruits-from-the-gather-of-eden/ for gather.
01:56 TimToady dunno why you have the last if, when the splice should go false
01:56 TimToady if it doesn't, maybe you found a bug
01:56 rjbs Oops, that's cruft from when I'd written it as a loop{...}
01:59 TimToady could use for @zchars -> $c1, $c2 = 5, $c3 = 5, then or in the 0x8000 outside the loop
02:00 TimToady mebbe
02:00 rjbs Yeah, I had tried that between my first while/splice and loop{...}, but was unsure how to proceed with the 0x8000 so I rejiggered it.  Now that I have it working, good time to revisit that.
02:00 rjbs (@x -> $x, $y) seemed, gut-wise, more p6ish.
02:01 rjbs what do we call those guys on the rhs of the -> ?
02:01 TimToady parameters
02:01 TimToady it's just a lambda
02:01 rjbs . o O ( I can't believe it's just lambda!™ )
02:02 TimToady it's just applied funny so that it chews its parameters off the list and leaves the rest
02:03 TimToady well, and the syntax is magical, insofar as its occuring where a term would be expected
02:03 TimToady *it's
02:05 rjbs my $b = gather for @a -> $x, $y { take $x }
02:05 rjbs That's pretty cool.
02:07 dalek ecosystem: 3975e6f | grondilu++ | META.list:
02:07 dalek ecosystem: Adding modular arithmetic module
02:07 dalek ecosystem:
02:07 dalek ecosystem: This is a translation of Perl5's Math::ModInt
02:07 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/3975e6f975
02:08 rjbs TimToady: Actually, deleting that last on line 48 leaves me looping forever!
02:09 TimToady r: say so [].splice(0,3)
02:09 p6eval rakudo 6392d6: OUTPUT«True␤»
02:09 TimToady oopsie
02:09 TimToady yes, a bug
02:09 TimToady r: say +[].splice(0,3)
02:09 p6eval rakudo 6392d6: OUTPUT«3␤»
02:09 TimToady n: say +[].splice(0,3)
02:09 p6eval niecza v24-23-g0520c7c: OUTPUT«0␤»
02:09 TimToady rakudobug
02:10 census Has anybody worked with Jaro-Winkler distance between strings before?
02:11 * TimToady suspects Jaro and Winkler have, for some reason...
02:12 rjbs How do I get the last element in an Array?
02:12 TimToady [*-1]
02:12 sorear @foo[*-1]
02:12 rjbs Thanks
02:13 TimToady nr: @foo[-1]
02:13 p6eval rakudo 6392d6: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Variable '@foo' is not declaredâ�¤at /tmp/99m_Ufdgea:1â�¤------> [32m@foo[-1][33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix or meta-infixâ�¤        infix stopperâ�¤        statement endâ�¤        statement modifierâ�¤  â€¦
02:13 p6eval ..niecza v24-23-g0520c7c: OUTPUT«[31m===[0mSORRY![31m===[0m��Unsupported use of [-1] subscript to access from end of array; in Perl 6 please use [*-1] at /tmp/iUPBW6SdMV line 1 (EOF):�------> [32m@foo[-1][33m�[31m<EOL>[0m��Parse failed��»
02:13 TimToady nr: .[-1]
02:13 p6eval rakudo 6392d6: OUTPUT«Cannot use negative index -1 on Any␤current instr.: 'throw' pc 333436 (src/gen/CORE.setting.pir:149675) (src/gen/CORE.setting:9303)␤called from Sub 'sink' pc 365333 (src/gen/CORE.setting.pir:162404) (src/gen/CORE.setting:10525)␤called from Sub 'MAIN' pc 585 (src/ge…
02:13 p6eval ..niecza v24-23-g0520c7c: OUTPUT«[31m===[0mSORRY![31m===[0m��Unsupported use of [-1] subscript to access from end of array; in Perl 6 please use [*-1] at /tmp/1PeW3ivn0D line 1 (EOF):�------> [32m.[-1][33m�[31m<EOL>[0m��Parse failed��»
02:13 rjbs updated https://gist.github.com/rjbs/5001268 with gather/take; pleased
02:14 TimToady that's a lot prettier
02:14 rjbs Could probably just make that a map
02:14 TimToady sure
02:15 TimToady and the ~= could be a join of a map too
02:16 TimToady which you could return directly without a $result variable
02:16 cotto Could I get either Rakudo commit bit or someone to apply a patch?
02:16 rjbs Hm.  How do I map pairwise?
02:16 cotto https://gist.github.com/anonymous/5001423
02:16 rjbs I think I'm getting a bit overwhelmed at ==><== and ambidextrous flow.
02:16 TimToady rjbs: just supply two parameters to the lambda
02:18 TimToady well, I dunno if join is smart about Buf
02:19 TimToady actually, [~] would likely be better than join '' anyway
02:21 cotto pull request submitted; feel free to continue ignoring the gist
02:22 TimToady :)
02:22 * TimToady has no rakudo commit bit, for the record...
02:23 [Coke] I do. those semicolons seems reasonable.
02:23 cotto I didn't intend to refer to anyone in particular.
02:23 rjbs Works, not useful: my $x <== map -> $_ { word($_) } <== @values;
02:23 rjbs Doesn't work, would think it useful: my $x = [~] <== map -> $_ { word($_) } <== @values;
02:24 lustlife joined #perl6
02:24 dalek rakudo/nom: c3dc86e | cotto++ | src/ops/perl6.ops:
02:24 dalek rakudo/nom: clean up some op definitions
02:24 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c3dc86e7af
02:24 dalek rakudo/nom: 134b008 | (Will Coleda)++ | src/ops/perl6.ops:
02:24 dalek rakudo/nom: Merge pull request #105 from cotto/nom
02:24 dalek rakudo/nom:
02:24 dalek rakudo/nom: clean up some op definitions
02:24 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/134b008701
02:24 [Coke] Thanks, cotto.
02:25 TimToady why not just my $x = [~] map { word($_) }, @values
02:25 rjbs Couldn't get that formulation, groped a lot.  Maybe I was always missing the comma before @values.
02:26 TimToady r: map {...} 1,2,3
02:26 p6eval rakudo 6392d6: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Two terms in a rowâ�¤at /tmp/9p8rUavgui:1â�¤------> [32mmap {...} [33mâ��[31m1,2,3[0mâ�¤    expecting any of:â�¤        argument listâ�¤        postfixâ�¤        infix or meta-infixâ�¤        infix stopperâ�¤        statement endâ�¤        statement …
02:26 TimToady n: map {...} 1,2,3
02:26 p6eval niecza v24-23-g0520c7c: OUTPUT«[31m===[0mSORRY![31m===[0m��Strange text after block (missing comma, semicolon, comment marker?) at /tmp/3QVV91MteN line 1:�------> [32mmap {...}[33m�[31m 1,2,3[0m��Parse failed��»
02:26 rjbs I saw that error quite a lot.
02:26 TimToady it could use an error more like niecza's there
02:27 dalek nqp: f802b49 | cotto++ | src/ops/nqp (3 files):
02:27 dalek nqp: clean up some ops definitions
02:27 dalek nqp: review: https://github.com/perl6/nqp/commit/f802b49b20
02:27 dalek nqp: 031801c | cotto++ | src/ops/nqp_dyncall.ops:
02:27 dalek nqp: use a non-empty default case
02:27 dalek nqp: review: https://github.com/perl6/nqp/commit/031801cf2d
02:27 dalek nqp: 2ddd4dc | cotto++ | src/ops/nqp (3 files):
02:28 TimToady map and grep are not magic syntax in p6
02:28 dalek nqp: Merge pull request #75 from perl6/ops-fixes
02:28 dalek nqp:
02:28 dalek nqp: clean up some ops definitions
02:28 dalek nqp: review: https://github.com/perl6/nqp/commit/2ddd4dc187
02:28 rjbs TimToady: must be nice!
02:29 TimToady people say they don't use indirect objects in p5 but map and grep are parsed that way, in fact
02:29 rjbs That's true of squintillions of things people say they don't use in p5. :)
02:29 TimToady but it does mean we all leave out the comma occasionally
02:30 rjbs Updated my gist one more time, feeling better.  And now, back to p5.  Blockers to track!
02:30 rjbs Thanks for the review!
02:30 TimToady soitinly
02:32 TimToady afk &
02:38 adu hi TimToady
02:43 jaldhar joined #perl6
03:07 japhb rjbs, looking at your gist, it occurs to me that write-at could use a little more magic, so that writing the header is less wordy.  You already have write-at slurping the buffers, but you don't use that for the START HEADER.
03:08 japhb But it could even be a little smarter than that, by transparently handling Ints as words (since that seems to be the most common thing you need to use).
03:16 census joined #perl6
03:27 orafu joined #perl6
03:35 rjbs japhb: turning ints into words, I think, would be more likely to lead to me accidentally using word instead of byte
03:35 rjbs japhb: I agree, re making most of the header one big call; that's an artifact of the construcion that I could fix
03:35 rjbs japhb: ...but note that many of the header segments are not contiguous.
03:36 rjbs It could be done with pairs...
03:38 swarley I got bored, so I'm writing a PASM compiler. I suppose that's one way to spend an afternoon (Making something useless)
03:51 diakopter swarley: O_O
03:51 * diakopter nudges you back toward 6model/qast
03:51 swarley Don't worry. I'm not moving away from it.
03:54 swarley I just wanted to see what it looked like using libjit as a base instead of what was already in place
03:57 diakopter you're a jit
03:57 swarley :( I know
03:58 diakopter it was a joke of the absurd..
03:58 swarley i'd hate to see parrot die, it's such a neat project.
04:00 diakopter if my last msg had been 1s later..
04:01 swarley haha.
04:03 diakopter TimToady: that STD_P5 grammar would be helpful pretty soon
04:05 diakopter pugs: { use v6; say 4; { use v5; print 33; { use v6; say 44 } } }
04:05 p6eval pugs: OUTPUT«4␤Error eval perl5: "sub { use ops (':default', 'binmode', 'entereval');; print 33; {use v6; say 44 } ␤}"␤*** 'print' trapped by operation mask at (eval 2) line 1.␤␤Can't call method "" on an undefined value.␤»
04:12 diakopter TimToady: that oughtta keep you occupied a week or few :P
04:13 dayangkun joined #perl6
04:19 diakopter TimToady: oh, and, it needs to support source filters and extensions that hook the parser ;)
04:24 xinming_ joined #perl6
04:27 swarley ew filters..
04:38 rking joined #perl6
04:41 SamuraiJack joined #perl6
04:44 preflex_ joined #perl6
04:52 DrEeevil joined #perl6
04:55 labster r: class A is rw { has $.foo; }; class B is A is rw { method bar { $.foo = 1 }; }; say B.new.bar;
04:55 p6eval rakudo 134b00: OUTPUT«1␤»
04:56 labster r: role A is rw { has $.foo = 2; }; class B is A is rw { method bar { $.foo = 1 }; }; say B.new.bar;
04:56 p6eval rakudo 134b00: OUTPUT«Cannot assign to a readonly variable or a value␤  in method bar at /tmp/B6IdxBKuTI:1␤  in block  at /tmp/B6IdxBKuTI:1␤␤»
04:56 grondilu tadzik: panda shows way too many error lines when failing to find a module
04:56 labster agreed grondilu.  70 some, the last time I checked.
04:57 labster r: role A is rw { has $.foo }; class B is A is rw { method bar { $.foo = 1 }; }; say B.new.bar;
04:57 p6eval rakudo 134b00: OUTPUT«Cannot assign to a readonly variable or a value␤  in method bar at /tmp/5pxKV9ssHV:1␤  in block  at /tmp/5pxKV9ssHV:1␤␤»
04:57 labster role can't take 'is rw'?
05:01 PerlJam I'm not sure what it would mean.
05:01 PerlJam (I'm not sure what "is rw" means on a class even)
05:03 PerlJam The only place "class.*is rw" appears in the spec even is an example that illustrates that traits are applied with "is"
05:03 PerlJam S12:134 fwiw
05:06 TimToady see S12:703
05:06 PerlJam ah
05:10 labster Roles are class-like in a lot of places, but I guess this is not one of them.
05:21 PerlJam labster: They could be.  It's only a spec change away.  ;)
05:21 sorear i see no reason why "is rw" *shouldn't* be extended to roles
05:22 sorear it's not like it means "is open"
05:41 grondilu rn: sub foo($i) { state @p := grep &is-prime, 2 .. *; return @p[$i] }; say foo 5;
05:41 p6eval niecza v24-23-g0520c7c: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Cannot use bind operator with this LHS at /tmp/J88IlP4BpB line 1:â�¤------> [32m$i) { state @p := grep &is-prime, 2 .. *[33mâ��[31m; return @p[$i] }; say foo 5;[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza…
05:41 p6eval ..rakudo 134b00: OUTPUT«(timeout)»
05:41 grondilu rn: sub foo($i) { my @p := grep &is-prime, 2 .. *; return @p[$i] }; say foo 5;
05:41 p6eval rakudo 134b00, niecza v24-23-g0520c7c: OUTPUT«13␤»
05:42 moritz \o
05:42 grondilu rn: sub foo($i) { state @p = grep &is-prime, 2 .. *; return @p[$i] }; say foo 5;
05:42 p6eval rakudo 134b00, niecza v24-23-g0520c7c: OUTPUT«(timeout)»
05:43 grondilu is grep supposed to be eager?
05:43 TimToady no, but assignment is
05:45 grondilu why assignement should be eager?  I will always hang.
05:46 grondilu (well at least I can't see an example where it wouldn't)
05:46 grondilu .-1s/I will always/It will always/
05:46 moritz because in too many places it would surprise too many people if it were lazy
05:47 TimToady I'm trying to figure out why the := doesn't work; maybe sink is not treating is special as it does my?
05:48 grondilu moritz: don't you think it is worse if the program hangs??
05:48 moritz grondilu: no. It's easy to find out why, and dealing with infinite lists/ranges is relatively rare
05:48 PerlJam "doctor, it hurts ..."
05:48 TimToady r: sub foo($i) { (state @p := grep &is-prime, 2 .. *)[$i] }; say foo 5;
05:48 p6eval rakudo 134b00: OUTPUT«13␤»
05:49 TimToady r: sub foo($i) { state @p := grep &is-prime, 2 .. *; return @p[$i] }; say foo 5;
05:49 p6eval rakudo 134b00: OUTPUT«(timeout)»
05:49 TimToady r: sub foo($i) { so state @p := grep &is-prime, 2 .. *; return @p[$i] }; say foo 5;
05:49 p6eval rakudo 134b00: OUTPUT«13␤»
05:50 moritz r: sub foo($i) { my @p := grep &is-prime, 2 .. *; return @p[$i] }; say foo 5;
05:50 p6eval rakudo 134b00: OUTPUT«13␤»
05:50 TimToady yes, seems to be sinking it
05:50 TimToady not treating state like my
05:50 benabik joined #perl6
05:52 TimToady moritz: maybe the desugaring of 'state' is introducing a sink somehow?
05:52 TimToady or hiding the state from the 'my' recognizer?
05:52 grondilu I guess I should just get used to using ':=' more often.
05:52 moritz TimToady: that seems to be the case, yes
05:54 hypolin joined #perl6
06:06 kaleem joined #perl6
06:20 rindolf joined #perl6
06:48 dalek rakudo/nom: cd95e40 | moritz++ | src/Perl6/Actions.pm:
06:48 dalek rakudo/nom: /./ and rx/./ literals now match against $_ in sink context
06:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cd95e40998
06:48 dalek rakudo/nom: 5dfb733 | moritz++ | src/Perl6/Actions.pm:
06:48 dalek rakudo/nom: avoid sinking of state initializers
06:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5dfb733866
06:49 rindolf joined #perl6
06:57 TimToady moritz++ for being moritz
07:01 sqirrel joined #perl6
07:04 FROGGS joined #perl6
07:04 rindolf Hi all.
07:04 rindolf TimToady: hi.
07:05 TimToady .oO(I'm not part of all?)
07:06 tadzik grondilu: could you open a bug please?
07:06 tadzik I can look at that in some spare minute
07:10 rindolf joined #perl6
07:17 rindolf joined #perl6
07:18 sorear o/ rindolf, sqirrel, FROGGS
07:22 rindolf sorear: hi.
07:22 grondilu tadzik: I don't know how to open a bug about panda
07:22 rindolf TimToady: “all for TimToady, and TimToady for all.”
07:23 rindolf joined #perl6
07:23 FROGGS morning @all
07:29 rindolf joined #perl6
07:35 hypolin joined #perl6
07:37 rindolf joined #perl6
07:37 salv0 joined #perl6
07:44 rindolf joined #perl6
07:56 rindolf joined #perl6
07:58 SamuraiJack joined #perl6
07:59 mberends joined #perl6
08:00 sorear mberends! \o/
08:00 mberends \o sorear!
08:03 am0c_ joined #perl6
08:03 sorear :D
08:04 FROGGS grondilu: https://github.com/tadzik/panda/issues
08:04 mberends sorear: have you looked at rurban++'s p2 and _why++'s potion underneath it? http://perl11.org/p2/potion.html
08:07 sitaktif joined #perl6
08:08 rindolf joined #perl6
08:11 cosimo joined #perl6
08:11 sorear mberends: not really.
08:11 sorear i've decided to get out of the language design/implementation game.  not my cuppa
08:12 FROGGS sorear: may I ask what's your "cuppa" nowadays?
08:13 mberends sorear: I understand.  I read that you were happily writing in JavaScript nowadays.
08:15 domidumont joined #perl6
08:17 sorear FROGGS: i would like to be in a field where programs are the means, not the end.  telescope development would be ideal if I can make that happen
08:18 sorear FROGGS: my current $work involves using programs to sell shoes.  It's suprisingly fun.
08:18 rindolf joined #perl6
08:19 FROGGS sorear: I totally agree
08:22 anuby_ joined #perl6
08:23 DarthGandalf joined #perl6
08:30 FROGGS at work I like that if you made program A, B and C (internal websites), then you have several opportunities to comfort the employees and reduce chores just by connecting A, B and C
08:30 FROGGS " I love it when a plan comes together."
08:37 domidumont joined #perl6
08:41 timotimo good day
08:47 fhelmberger joined #perl6
08:51 FROGGS joined #perl6
08:54 census joined #perl6
08:55 am0c joined #perl6
09:36 dakkar joined #perl6
09:38 cognominal joined #perl6
09:40 ObseLeTe joined #perl6
09:57 spider-mario joined #perl6
10:05 daxim joined #perl6
10:08 marloshouse joined #perl6
10:19 REPLeffect joined #perl6
10:21 donaldh joined #perl6
10:35 erkan joined #perl6
10:35 erkan joined #perl6
10:35 arnsholt jnthn: What are you using as the underlying Java type for nqp::list in NQP-JVM; arrays or one of the List<T> implementations?
10:35 tadzik I think it's an array
10:36 tadzik arnsholt: https://github.com/jnthn/nqp-jvm-prep/blob/master/src/org/perl6/nqp/sixmodel/reprs/VMArrayInstance.java
10:37 arnsholt Cool. A Java array, wrapped with a bit of logic to handle accesses
10:37 tadzik aye
10:37 FROGGS joined #perl6
10:38 arnsholt I think that'll fit with what I'm pondering
10:39 arnsholt And Java guarantees the widths of byte, short, int and long. Even better!
10:40 FROGGS well, thats the job of a sane VM
10:41 arnsholt Well, Java isn't a VM, so it could just say that it should be -at least- those sizes
10:41 arnsholt Common Lisp for example only mandates a minimum width for its numerics
10:41 FROGGS ohh, yeah, thought you're talking about JVM
10:42 masak good forenoon, #perl6
10:42 FROGGS masak! \o/
10:43 tadzik hello!
10:44 donaldh arnsholt: what are you pondering?
10:44 arnsholt donaldh: Adding a buffer type to NQP
10:44 donaldh oh, it looks like VMArrayInstance reimplements a lot of what is already available in the Java collections.
10:45 FROGGS nqp: say("foobar" ~~ MAKE_REGEX("fo+"))
10:45 p6eval nqp: OUTPUT«Could not find sub &MAKE_REGEX␤current instr.: '' pc 46 ((file unknown):38) (/tmp/paionMTqV_:1)␤»
10:45 arnsholt Rakudo needs better support to implement Buf properly, and NativeCall needs better Bufs to handle blobs better
10:52 jnthn morning o/
10:52 jnthn Or forenooning at least
10:52 timotimo got a second to merge https://github.com/rakudo/rakudo/pull/104 ? :)
10:52 arnsholt Just in the nick of time for forenoon =)
10:53 FROGGS hi jnthn
10:54 arnsholt A timo-commit to my repo =D
10:54 timotimo untested, alas
10:54 timotimo though i imagine with in-proc sockets one could build a bit of testing code without even having to make multiple processes
10:54 arnsholt I think that gives timotimo++ the distinction of first-ever committer that isn't me to one of my repos =)
10:55 arnsholt Yeah, that might work. I looked a bit at the S32-io socket tests last night for inspiration as well
10:55 timotimo whoa! yays :)
10:56 jnthn timotimo: I think it would be more general to put the (...) parsing where STD does - in typename: https://github.com/perl6/std/blob/master/STD.pm6#L2547
10:56 timotimo hm, i had a look at that, but for some reason i decided not to do that. i should reconsider i guess
10:57 jnthn Well, then it'll catch it everywhere <typename> is used
10:57 jnthn Also it's in the right place for the luck person who gets to implement the feature ;)
10:57 arnsholt timotimo: A couple of comments: The last argument of zmq_setsockopt is a size_t, so the last Perl 6 type should be just int, rather than CArray[int] (get sockopt has size_t* for the last one, thus CArray[int])
10:58 timotimo oh, right, because it's not an out parameter
10:58 timotimo i'll fix it real quick
10:58 arnsholt And you're nulling the values, rather than setting them to $value =)
10:58 arnsholt Do $val[0] = $value instead
10:59 timotimo my only excuse is that it's late :)
10:59 timotimo er, it was when i copypasted that code
10:59 arnsholt I made some brainos as well, so you're excused I think =)
10:59 REPLeffect joined #perl6
10:59 timotimo i ended up copypasting the get function and changed every get to set ... in the get function >_<
10:59 arnsholt =D
10:59 arnsholt Classic copy-pasta
11:00 donaldh jnthn: are we committed to BCEL or could we consider alternatives?
11:01 jnthn donaldh: Depends on the alternative and why.
11:01 donaldh jnthn: I'm not sure invokedynamic is fully implemented in BCEL yet. Still digging through it.
11:01 jnthn donaldh: Also, I don't much feel like re-writing JASTToJVMBytecode.java...it wasn't much fun to do in the first place ;)
11:02 donaldh jnthn: And BCEL seems to be less actively developed than ASM. Also ASM has a lot of supporters
11:02 arnsholt jnthn: I've added my suggestion for NQP buffer ops to https://gist.github.com/arnsholt/4963237 (no rush to comment though, won't have much time 'till over the week-end I think)
11:03 donaldh jnthn: http://asm.ow2.org/
11:04 donaldh jnthn: I'll keep working on BCEL for now but I might also try an ASM port of JASTToJVMBytecode.java on a branch.
11:05 cognominal joined #perl6
11:05 jnthn donaldh: If you're interested in working on that, feel free. Having just taken a look, yes it seems quite active and also the license looks fine.
11:05 donaldh jnthn: yep.
11:07 jnthn donaldh: The other BCEL usage is in P6opaque
11:09 donaldh jnthn: that looks fairly hairy ;-)
11:14 jnthn donaldh: Yeah, it's generating a backing class
11:15 donaldh nice
11:15 timotimo jnthn: good tip, it works well now.
11:19 timotimo running the spectests now, but i don't see how it even could fail anything :P
11:19 FROGGS the only thing I could image that it fails parsing test files
11:19 timotimo yeah, but it would have failed to parse before, so all those parts should have already been fudged for rakudo
11:20 REPLeffect joined #perl6
11:20 FROGGS no, it might not since your changed the grammar
11:21 timotimo might not what? fail to parse? but if it does parse it would NYI immediately
11:23 FROGGS timotimo: everytime you change the grammar it is possible that there is a piece of code that is unparseable then....
11:24 daxim I don't like the location where panda bootstrap put the library files (~/.perl6), how do I override that?
11:25 timotimo FROGGS: with this change, i feel somewhat confident that it would work for any input that was parsable before :D
11:26 tadzik daxim: I don't think panda puts stuff there anymore
11:26 tadzik not since we got CUSTOM_LIB and all that
11:26 daxim I'm running rakudo 2012.12 and panda from github HEAD
11:26 tadzik hm
11:29 timotimo (but i'm running the spectest suite because i know from past experience i am dumb)
11:29 tadzik r: say %*CUSTOM_LIB.perl
11:29 p6eval rakudo 5dfb73: OUTPUT«("perl" => "/home/p6eval/nom-inst/lib/parrot/4.10.0-devel/languages/perl6", "vendor" => "/home/p6eval/nom-inst/lib/parrot/4.10.0-devel/languages/perl6/vendor", "site" => "/home/p6eval/nom-inst/lib/parrot/4.10.0-devel/languages/perl6/site", "home" => "/home/p6eval/.…
11:31 tadzik daxim: do you have that set? Can you confirm that panda is still putting stuff there, or may it be that those are just old files lying around?
11:32 cognominal joined #perl6
11:32 daxim yes, I have that set: http://paste.scsys.co.uk/231735   bootstrap already put stuff into ~/.perl6, looks like panda itself and its deps
11:33 daxim I have no old files, I just installed rakudo 20 minutes ago on this machine, it doesn't come with panda, so I bootstrap from the GH checkout
11:33 tadzik huh, hm
11:34 tadzik 2012.12 sounds fresh enough for %*CUSTOM_LIB and all that
11:34 tadzik daxim: above everything, panda should respect DESTDIR if you set that
11:34 daxim then how do I set DESTDIR?
11:34 tadzik so the install location is always overridable; if not, then it's a bug
11:35 tadzik DESTDIR=./foolib panda install Stuff
11:35 tadzik that ought to work
11:37 FROGGS timotimo: I just meant in general that there is only this one chance to break anything...
11:37 tadzik daxim: bootstrap put stuff in ~/.perl6, from fresh git checkout?
11:38 * grondilu is recompiling rakudo and realizes he will have to rebootstrap panda.  This has consistently been failing lately.
11:38 daxim yes.  with DESTDIR, the files were installed there, but then I run into a different problem
11:38 tadzik that sounds veery wrong. There is no ".perl6" in panda these days, as I see it
11:38 tadzik are you sure it's github.com/tadzik/panda, master, up-to-date?
11:39 moritz r: say Int("42").WHAT
11:39 p6eval rakudo 5dfb73: OUTPUT«Int()␤»
11:39 daxim confirmed.  now let me paste the follow-up problem
11:40 tadzik go ahead
11:40 daxim http://paste.scsys.co.uk/231736
11:40 tadzik r: say @*INC.perl
11:40 p6eval rakudo 5dfb73: OUTPUT«Array.new("/home/p6eval/nom-inst/lib/parrot/4.10.0-devel/languages/perl6/site/lib", "/home/p6eval/nom-inst/lib/parrot/4.10.0-devel/languages/perl6/vendor/lib", "/home/p6eval/nom-inst/lib/parrot/4.10.0-devel/languages/perl6/lib", "/home/p6eval/.perl6/2013.01-141-g5d…
11:40 daxim even though I changed the installation directory, it still assumes ~/.perl6 at run time
11:41 tadzik /home/daxim/.perl6/2012.12/lib
11:41 tadzik that's odd
11:41 timotimo All tests successful. - now my branch can be merged :)
11:41 tadzik or may be that custom-lib put that there
11:41 tadzik moritz?
11:41 FROGGS timotimo++
11:41 REPLeffect joined #perl6
11:41 tadzik daxim: yeah, most puzzling
11:41 tadzik daxim: I assume you don't set PERL6LIB yourself in any way?
11:42 daxim echo $PERL6LIB is empty
11:42 moritz tadzik: it does that as a fallback if the site dir isn't writable
11:43 tadzik ah, there we are
11:44 tadzik daxim: so, if you use DESTDIR then everything gets installed to it, but rakudo will not know that it should look for libraries there
11:44 moritz so you have to set PERL6LIB to $DESTDIR/lib ?
11:44 tadzik I think so
11:44 moritz or to $DESTDIR?
11:44 * moritz not sure
11:44 daxim aha, let me try
11:45 tadzik /lib
11:45 daxim yes, with lib
11:45 tadzik but hm, you say moritz that CUSTOM_LIB will fallback to /home/user/.perl6/version, right?
11:45 tadzik ah, ok
11:45 tadzik I understand
11:46 daxim gosh, there's *still* a ~/.perl6 dir
11:46 daxim it has a ~/.perl6/2012.12/panda/projects.json file in it
11:46 moritz tadzik: yes, where $version is really the whole git-describe string
11:46 moritz just for releases it simpliefies to the release version
11:47 tadzik daxim: ah, yes. It usually goes to the site dir too :/
11:47 tadzik I guess you can't (easily) override that
11:47 * moritz had an apicoectomy on two teeth today
11:48 tadzik https://github.com/tadzik/panda/blob/master/bin/panda#L96
11:48 tadzik you can mangle that though
11:48 tadzik perhaps we should make it configurable too
11:48 tadzik PANDADIR=somewhere panda make sandwich or such
11:48 tadzik but no, that should just work
11:48 tadzik hrm
11:49 * tadzik hugs moritz
11:49 xenoterracide joined #perl6
11:49 daxim you're looking for  bootstrap.pl --prefix=somedir, not env variables, that's how everyone else does it
11:49 tadzik yeah, that makes sense
11:50 tadzik it's not fixing the problem though (yet)
11:51 tadzik unless the bootstrap script will modify the binary it's installing
11:51 moritz it could.
11:51 tadzik daxim: could you write me a short spec of what would like for panda to be capable of, the interface and the desired behaviour?
11:51 tadzik I can take a look at that today or tomorrow
11:52 daxim "see GNU autotools"
11:52 tadzik think of your perfect... ah
11:52 REPLeffect joined #perl6
11:52 tadzik that's sort of a different story, I think
11:52 tadzik you fire autotools and install some binaries. You don't install autotools themselves for later use
11:53 integral joined #perl6
11:53 integral joined #perl6
11:53 tadzik but I guess bootstrap.pl can be the autotools here, and panda being panda
11:53 PerlJam joined #perl6
11:54 daxim ok
11:55 tadzik I agree that the experience should be improved
11:55 tadzik if I myself consider panda fragile and confusing, that means stuff is bad :)
11:56 moritz but it's a healthy perception
11:57 tadzik there's too much magic there and I stopped completly understanding it at some point
11:57 daxim at least I get decent replies here and gain an understanding what's wrong, you needn't worry because you're still a parsec ahead of python-pip and whatever "sup" forces ruby to do.  I'll tell you the horror stories over a beer
11:57 tadzik gotcha :)
11:57 tadzik so I can expect you on the Polish Perl Workshop? :)
11:57 daxim I'll know for certain next week
11:57 tadzik awesome
12:00 tadzik seen brianwisti
12:00 dalek rakudo/nom: 9c59a13 | (Timo Paulssen)++ | src/ (2 files):
12:00 dalek rakudo/nom: turn LTA error for coercive type declarations into NYI.
12:00 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9c59a1327b
12:00 moritz timotimo: thank's for your patches. I --squash'ed them all into one and applied
12:00 SmokeMachine joined #perl6
12:01 timotimo that was acceptable
12:01 timotimo no need to have embarassing brainos all over the commit history :)
12:01 timotimo maybe one day i'll look back at 20 year old commit data and think "wow, i didn't do as many mistakes as i thought!"
12:01 moritz and it's only one deletion and two inserts that way :-)
12:01 moritz but less karma, so I need to timotimo++ manually :-)
12:02 timotimo haha, all right :)
12:03 moritz funny, the pull request on github still shows "applies cleanly"
12:04 stephen joined #perl6
12:05 Guest13313 left #perl6
12:07 census joined #perl6
12:07 census Hi!  Has anybody used EM algorithm before?
12:09 cognominal joined #perl6
12:09 tadzik EM?
12:10 census Expectation-Maximization algorithm
12:10 moritz elektromagnetic?
12:12 * tadzik wonders if he knows the Polish name of it
12:12 moritz wikipedia only has the Russian name :-)
12:12 tadzik but it doesn't look familiar
12:13 * moritz hasn't used it either
12:15 moritz the german wiki page for EM algorithm has visual example data of eruptions of the Old Faithful geyser
12:15 moritz so now I'm reading about that one
12:16 census interesting . . .
12:16 moritz I really have to visit yellowstone at some point
12:17 moritz and Iceland
12:17 timotimo hm, i think i remember expectation maximization from somewhere. maybe school.
12:19 * moritz would have loved to attend a school that does such stuff :-)
12:19 arnsholt EM was mentioned in some of my NLP courses
12:20 census i thought EM was common in CS and machine larning
12:20 census learning
12:20 timotimo oh, no, that was university
12:20 moritz census: it probably is, but there just so many things that are common that you can't know them all :-)
12:26 cognominal joined #perl6
12:30 shinobicl joined #perl6
12:32 dalek nqp: 6f3692d | jnthn++ | src/HLL/Grammar.pm:
12:32 dalek nqp: Port EXPR to NQP. Much code from kboga++.
12:32 dalek nqp: review: https://github.com/perl6/nqp/commit/6f3692d431
12:32 dalek nqp: 866304d | jnthn++ | src/HLL/Compiler.pm:
12:32 dalek nqp: Toss long-broken --dumper option and related code.
12:32 dalek nqp:
12:32 dalek nqp: Looking at the code, it almost certainly hasn't worked for a long time.
12:32 dalek nqp: review: https://github.com/perl6/nqp/commit/866304d022
12:35 cognominal__ joined #perl6
12:37 REPLeffect joined #perl6
12:38 dalek nqp: 688763c | jnthn++ | src/HLL/Grammar.pm:
12:38 dalek nqp: Toss outdated comment.
12:38 dalek nqp: review: https://github.com/perl6/nqp/commit/688763c4c4
12:38 jnthn HLL::Grammar is free of Q:PIR now \o/
12:38 moritz \o/
12:39 Harzilein where is Q:somelang explained btw?
12:41 timotimo in the nqp documentation? :P
12:41 rindolf joined #perl6
12:41 jnthn Harzilein: Quoting constructs are probably explained in S02. But Q:PIR handling is just hard-coded into the grammar rather than anything more clever.
12:43 cognominal__ joined #perl6
12:47 Harzilein jnthn: well, niecza also has Q:CgOp and i was interested in reading up on that.
12:55 dalek nqp-jvm-prep: bb49a80 | jnthn++ | lib/QAST/JASTCompiler.nqp:
12:55 dalek nqp-jvm-prep: Fix non-scanning.
12:55 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp-jvm-prep/commit/bb49a8031b
12:55 dalek nqp-jvm-prep: 6375842 | jnthn++ | t/nqp/45-smartmatch.t:
12:55 dalek nqp-jvm-prep: We now pass 45-smartmatch.t.
12:55 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp-jvm-prep/commit/637584280e
13:01 FROGGS (EXPR to NQP)++
13:01 FROGGS kboga++
13:09 domidumont joined #perl6
13:12 moritz seems there are three Q:PIR groups left
13:15 FROGGS well, if I could read pir I would try to translate that, but ...
13:15 FROGGS pir is like asm to me
13:16 moritz in HLL::Compiler, method lineof does a cache lookup, and if it fails, a binary search
13:17 moritz to map an index into a string into a line number
13:17 dayangkun joined #perl6
13:18 tomaw joined #perl6
13:20 FROGGS moritz: hmm, I may give it a try after my "current project"
13:21 woosley1 joined #perl6
13:28 ObseLeTe joined #perl6
13:34 stevan_ joined #perl6
13:40 census rindolf: I'm sorry your friend reset your connection
13:40 toebu joined #perl6
13:41 rindolf census: what?
13:41 rindolf census: where?
13:41 census rindolf [~Shlomi@bzq-109-64-185-17.red.bezeqint.net] has quit [Read error: Connection reset by peer]
13:41 rindolf census: are you jumping into conclusions?
13:41 rindolf census: yes, it's probably due to lost packets.
13:41 rindolf census: I didn't see it naturally.
13:41 rindolf census: IRC disconnections happen (surprise!).
13:42 census oh ok, i'm sorry you experienced that.  that is all.
13:42 mberends peer is not rindolf's friend
13:42 FROGGS (peer is a first name in northern countries)
13:42 rindolf http://use.perl.org/use.perl.org/~Mark+Leighton+Fisher/journal/35016 - sucks  - it's down. :-(
13:42 toebu joined #perl6
13:43 domidumont joined #perl6
13:43 rindolf http://web.archive.org/liveweb/http://use.perl.org/use.perl.org/~Mark+Leighton+Fisher/journal/35016 - nothing here either.
13:43 * rindolf hunts and kills Pudge.
13:43 daxim_ joined #perl6
13:44 rindolf http://web.archive.org/web/*/http://www.shlomifish.org/ - everything from 2004.
13:45 moritz FROGGS: isn't the first name spelled "Per"?
13:45 rindolf http://web.archive.org/web/20041013231902/http://www.shlomifish.org/
13:45 rindolf Wow, what great CSS skills I had back then!
13:45 masak -me .oO( friend is not rindolf's peer )
13:45 * masak .oO( friend is not rindolf's peer )
13:46 mtk joined #perl6
13:46 masak FROGGS: I can't recall ever seeing the name spelled "Peer", though. only "Per".
13:47 masak well, there's "Peer Gynt", but he's fictional.
13:47 * mberends .oO( any peer of rindolf is my peer)
13:47 timotimo a peer of my peer is my peer.
13:48 toebu_ joined #perl6
13:48 mberends to peer or not to peer
13:48 * mberends peers at #perl6
13:48 FROGGS masak: my friend's name is Lars Peer Davidson
13:49 moritz and when he talks to another guy named Peer, it's P2P :-)
13:49 FROGGS *gg*
13:50 rindolf This reminds me that I have a series of novels in mind where a female adventurer and swordswoman becomes a Peer (= a Lady, or rather a she-Lord).
13:51 nwc10 jnthn: I have no ICU, so t/nqp/46-charspec.t fails. Otherwise, all suitably boring.
13:51 rindolf I was told in .uk, women cannot become Lords, but in my imaginary world they can.
13:52 FROGGS female Lords in rindolf's imagination?
13:52 FROGGS huh
13:53 rindolf FROGGS: are you British?
13:53 masak FROGGS: is your friend Norwegian?
13:53 woolfy joined #perl6
13:53 FROGGS rindolf: no
13:53 FROGGS masak: no
13:53 rindolf In .uk though, females can become dames which is the female equivalent of a knight.
13:53 rindolf FROGGS: OK.
13:53 mberends woolfy !
13:54 woolfy Martin...!
13:54 mberends woolfy ! woolfy ! (sorry masak)
13:54 woolfy Please ignore me, just "listening" to the wizards of Perl 6...
13:54 * mberends ignores
13:54 woolfy :-)
13:54 FROGGS masak: some ancesters might be from there, be he isnt
13:56 FROGGS rindolf: in .de there were Damen too, but I'm not sure they had a sword. I believe they were just the wifes of knights
13:56 jnthn nwc10: yay :)
13:57 rindolf FROGGS: OK.
13:58 rindolf FROGGS: well, in my imaginary world (an anti-Fantasy setting set in something like late middle-ages / early renaissance), there are some women warriors and there are many lords, both men and women who are scholars.
14:00 * FROGGS .oO( first perl 6 rpg made by rindolf? )
14:03 masak woolfy: oh, a self-confessed lurker! welcome ;)
14:03 pmichaud I'm lurkng also.  :)
14:03 masak pmichaud: yeah, it's not like big chunks of Rakudo source code are yours, or something :P
14:03 woolfy Thanks, masak!
14:03 rindolf FROGGS: it's not an RPG.
14:04 rindolf FROGGS: it's not even an adventure game.
14:04 FROGGS rindolf: not yet :P
14:04 * masak is not a wizard, more like a warrior/archer: http://strangelyconsistent.org/blog/perl-6-is-my-mmorpg
14:06 FROGGS masak: the link to the learning curve image is borken
14:06 daniel-s joined #perl6
14:08 * woolfy Masak is a wizard in my eyes
14:10 PerlJam woolfy: do you need help having that removed so that you may see better?  ;)
14:10 woolfy Michaud, Worthington, Lenz, Berends, Audrey, Larry...  all wizards...  (please don't feel offended if I did not mention your name).
14:12 woolfy PerlJam...  I should learn how to write Perl 6...  I already downloaded the book Using Perl 6. But for some reasons (not having downloaded and installed Perl 6 to name one), I did not get far yet...  So people like you are wizards to me.
14:13 FROGGS woolfy: ya, it's simply not enough to have the standard book of spells grade one in the shelf :o)
14:14 PerlJam heh
14:14 PacoAir joined #perl6
14:16 mberends woolfy has the world's largest collection of Perl spells on the shelves, srsly
14:17 PacoAir joined #perl6
14:17 woolfy And hoping to one day... having a lot of Perl 6 books added to those shelves!
14:18 moritz masak: an archer can be a wizard in his own right too :-)
14:18 masak FROGGS: thank you. seems the image is archived here: http://web.archive.org/web/20090718140949/http://upload.0x1011.org//files//LearningCurve.jpg
14:19 masak moritz: true. I've seen archers that were sufficiently advanced as to be indistinguishable from wizards ;)
14:20 FROGGS hehe
14:20 FROGGS nice one
14:21 masak r: say "gonna show woolfy some spells :)"
14:21 p6eval rakudo 9c59a1: OUTPUT«gonna show woolfy some spells :)␤»
14:21 masak r: .say for 10 ... 1; say "LIFTOFF!"
14:21 p6eval rakudo 9c59a1: OUTPUT«10␤9␤8␤7␤6␤5␤4␤3␤2␤1␤LIFTOFF!␤»
14:21 Psyche^ joined #perl6
14:22 masak r: my $third = 1/3; say "A third: $third"; say "One: {$third * 3} -- look, no loss of precision!"
14:22 p6eval rakudo 9c59a1: OUTPUT«A third: 0.333333␤One: 1 -- look, no loss of precision!␤»
14:22 pmichaud r: .say for (10 ... 1), "LIFTOFF";
14:22 p6eval rakudo 9c59a1: OUTPUT«10␤9␤8␤7␤6␤5␤4␤3␤2␤1␤LIFTOFF␤»
14:24 nwc10 $ perl -E 'my $third = 1/3; say "A third: $third"; say "One: @{[$third * 3]} -- look, no loss of precision!"'
14:24 nwc10 A third: 0.333333333333333
14:24 nwc10 One: 1 -- look, no loss of precision!
14:25 masak r: my @deck = ('ace', 2..10, <knave queen king>) X~ ' of ' X~ <hearts diamonds clubs spades>; say @deck.pick(5).perl
14:25 p6eval rakudo 9c59a1: OUTPUT«("3 of clubs", "8 of clubs", "9 of hearts", "3 of diamonds", "8 of hearts").list␤»
14:25 nwc10 masak: you're going to have to try harder than that to demonstrate that it's not just IEEE being really good at it
14:25 nwc10 s/it$/what they do/
14:25 masak nwc10: troo.
14:25 pmichaud r: my $third = 1/3;  say "A third: ", $third;   #how about this?
14:25 p6eval rakudo 9c59a1: OUTPUT«A third: 0.333333␤»
14:25 masak nwc10: do you have a good example, ooc?
14:25 pmichaud er... hmm
14:25 pmichaud r: my $third = 1/3;  say "A third: ", $third.gist;   #how about this?
14:25 p6eval rakudo 9c59a1: OUTPUT«A third: 0.333333␤»
14:25 pmichaud r: my $third = 1/3;  say "A third: ", $third.Str;   #how about this?
14:25 p6eval rakudo 9c59a1: OUTPUT«A third: 0.333333␤»
14:25 masak pmichaud: we've hidden the rattiness pretty deep ;)
14:25 nwc10 masak: no, sorry. I'm not sure where the best place to get the IEEE stuff to break down is
14:26 pmichaud masak: is that a change from a year ago or so?
14:26 masak pmichaud: think so.
14:26 masak pmichaud: it's for people who don't know and don't care about Rats.
14:27 pmichaud r: my $third = 1/3;  say $third.perl
14:27 p6eval rakudo 9c59a1: OUTPUT«1/3␤»
14:27 pmichaud \o/
14:27 FROGGS r: my $third = 1/3; say $third * 3
14:27 p6eval rakudo 9c59a1: OUTPUT«1␤»
14:27 * masak learns that Mendeleev was inspired by playing solitaire when inventing the periodic table
14:27 masak Wikipedia++
14:28 FROGGS r: my $third = 1/3; say $third.Str * 3
14:28 p6eval rakudo 9c59a1: OUTPUT«0.999999␤»
14:28 FROGGS coo
14:28 FROGGS l
14:28 FROGGS masak: well, dont trust wikipedia blindly
14:29 masak FROGGS: who said anything about trusting Wikipedia blindly? :)
14:29 FROGGS :o)
14:33 kaare_ joined #perl6
14:33 PerlJam joined #perl6
14:34 Util joined #perl6
14:36 masak welcome back, feather.
14:37 pmurias joined #perl6
14:38 [Coke] joined #perl6
14:39 p6eval joined #perl6
14:40 pmurias arnsholt: adopt and disown seem something that would be hard/annoying to implement on some platforms (Like V8). Allocating none garbage collected memory seems easier than turning a garbage collected chunk of memory into something that can be free()'ed
14:41 arnsholt If all you have is GCed memory, you're C interop is going to be hard anyways
14:41 arnsholt s/you're//
14:42 domidumont joined #perl6
14:42 arnsholt But if those are going to be hard on a particular platform you could make them noops and make sure users know of the limitation
14:43 pmurias I can allocated none GCed memory under V8, but I can't turn GCed memory into none GC one
14:43 pmurias s/allocated/allocate/
14:44 arnsholt Well, I'm not going to convert non-GC memory into GC memory on Parrot either. What I'll do is free the non-GC memory on object destruction if it's adopted
14:45 pmurias so things that are that can be disowned/adopted come from C land?
14:46 pmurias s/that are/
14:46 * pmurias can't type today
14:46 arnsholt Yeah. Except the buffer stuff, this is all motivated by NativeCall/Zavolaj
14:47 arnsholt The buffer stuff is in there because I need it for other NativeCall things, even though it's a bit different
14:51 arnsholt Does that answer your concerns?
14:53 pmurias arnsholt: yes, if the adopted disown object are explicitly allocated in non GCed memory it seems sane
14:53 pmurias * objects
14:54 arnsholt Yeah, this is only for NativeCall objects
14:54 pmurias arnsholt: my one concern is that adopt seems to assume that all C land things need to be destroyed by free()
14:54 pmurias which might not be the case for all of them
14:59 arnsholt Well, non-pointer things are marshalled to natively typed stuff, which don't need special handling
14:59 skids joined #perl6
14:59 arnsholt This is only for pointer-typed stuff
15:01 timotimo hm, should i give a NYI for this here, too?
15:01 timotimo r: my Hash{Any} %a;
15:01 p6eval rakudo 9c59a1: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Type 'Hash' is not declaredâ�¤at /tmp/_gShenxJjD:1â�¤------> [32mmy Hash[33mâ��[31m{Any} %a;[0mâ�¤Malformed myâ�¤at /tmp/_gShenxJjD:1â�¤------> [32mmy Hash[33mâ��[31m{Any} %a;[0mâ�¤    expecting any of:â�¤        scoped declaratorâ�¤â�¤Â»â€¦
15:02 timotimo oh, huh
15:02 timotimo unfortunately, i haven't yet looked at what exactly the { } do after a typename
15:05 moritz r: my %h := Hash{Int}.new; %h{3} = 4; say %h.perl
15:05 p6eval rakudo 9c59a1: OUTPUT«Type check failed in binding; expected 'Associative' but got 'Any'␤  in block  at /tmp/ASwXA6I90v:1␤␤»
15:05 moritz r: my %h := Hash[Int].new; %h{3} = 4; say %h.perl
15:05 p6eval rakudo 9c59a1: OUTPUT«("3" => 4).hash␤»
15:06 moritz r: my %h{Int}; %h<a> = 'x'; say %h.perl
15:06 p6eval rakudo 9c59a1: OUTPUT«Nominal type check failed for parameter 'key'; expected Int but got Str instead␤  in method at_key at src/gen/CORE.setting:6756␤  in method postcircumfix:<{ }> at src/gen/CORE.setting:1555␤  in block  at /tmp/UxgNY5HBT4:1␤␤»
15:06 moritz r: my %h{Int}; %h{42} = 'x'; say %h.perl
15:06 p6eval rakudo 9c59a1: OUTPUT«(42 => "x").hash␤»
15:06 timotimo i was wondering. there's a rule in STD.pm6 where you can have { ... } in a typename
15:07 TimToady it's a WHENCE, I think
15:07 moritz it's for the MyClass.new(:a(49), SuperClass{ a => 23 } ) thing, right?
15:08 TimToady yes, an "autoviv closure" too
15:08 timotimo ah, i see.
15:09 TimToady it's a dessert wax AND a floor topping
15:09 timotimo i was pretty happy when i realised, that default values in signatures will turn into closures automatically
15:09 daxim_ is this in the book?
15:09 moritz that's pretty useful
15:10 moritz daxim_: no
15:10 arnsholt Yeah. I debugged a friend's Python program by knowing that Python doesn't thunk default values in sigs
15:11 timotimo indeed.
15:11 timotimo sometimes that is used as a "trick" to have static per-method variables
15:11 timotimo which will probably make many newbies go:   o_O
15:11 arnsholt Eww. =)
15:11 * moritz wonders if default values are documented on doc.perl6.org somewhere
15:12 moritz oh, it already does explain it
15:12 moritz "Default values can depend on previous parameters, and are (at least
15:12 moritz notionally) computed anew for each call"
15:12 moritz in the docs for type Signature
15:13 TimToady it's a good thing someone's been working on constant folding...
15:14 jnthn I think if you do sub foo($x = 42) { } then we already avoid the closure
15:15 moritz I'm pretty sure we avoid it, yes
15:15 moritz r: my $sig := :($ = 42); say $sig.params[0].default
15:15 p6eval rakudo 9c59a1: OUTPUT«Block.new()␤»
15:15 moritz r: my $sig := :($ = 42); say $sig.params[0].default()
15:15 p6eval rakudo 9c59a1: OUTPUT«Block.new()␤»
15:15 moritz :(
15:15 moritz r: my $sig := :($ = 42); say $sig.params[0].default()()
15:15 p6eval rakudo 9c59a1: OUTPUT«42␤»
15:16 moritz seems we don't anymore :(
15:16 FROGGS we need way more tests
15:16 * moritz could try to fix that
15:17 FROGGS it is too easy to break things you dont test
15:18 TimToady that's because it's too easy to test things you don't break :)
15:19 FROGGS it would be awesome to have ppl write the tests who actually dont know how it is implemented
15:22 tipdbmp joined #perl6
15:23 tipdbmp How come JSON::Tiny's from-json cannot parse 'http://modules.perl6.org/proto.json'? =)
15:24 FROGGS because 'http://modules.perl6.org/proto.json' is an url?
15:24 FROGGS (joke)
15:26 tadzik :D
15:27 FROGGS tipdbmp: you want it to automatically download and parse that file? you get my +1 for that :o)
15:28 TimToady .oO(now, if we could only convince sorear++ that Perl 6 is a kind of telescope, or failing that, a kind of shoe...)
15:29 FROGGS .oO( a shoe-o-scope? )
15:29 TimToady we're selling...IR Cloggers!
15:30 TimToady no wait, we haven't eaten that dogfood yet...
15:30 tadzik FROGGS: hm, should there be a problem with downloading and parsing that?
15:30 CharellKing1 joined #perl6
15:30 moritz JSON::Tiny will never automatically download anything
15:31 moritz first, it has JSON in the name, not "HTTP". Second, it has "Tiny" in the name
15:31 moritz third, automatically downloading stuff is a terrible idea security wise
15:32 moritz fourth: separation of concerns
15:32 TimToady fifth: moritz doesn't like it
15:32 FROGGS .oO( JSON::Tiny.from-json( fetch => url ) ) <--- tiny code to write
15:33 masak moritz++ # doesn't like it
15:33 moritz still violates the "tiny" and the "separation of concerns"
15:33 * masak .oO( the separation of tiny concerns )
15:33 tadzik JSON::Tiny.from-json( fetch(url) ) is as tiny
15:33 tadzik and saner
15:33 moritz also note that from-json is a sub, not a method
15:34 moritz "Sometimes, the elegant implementation is just a function. Not a method. Not a class. Not a framework. Just a function."
15:34 masak what would it take for a dogfooding of the IRC logger to happen? broad brush strokes, not the 100-point list of "inch stones".
15:34 moritz quoteby John Carmack
15:34 FROGGS ohh, (John Carmack)++
15:34 nwc10 masak: is it in two halves - the logger, and the web publishing side?
15:34 FROGGS now I have to agree too :/
15:35 moritz and colomon++ for retweeting that quote
15:35 moritz masak: mostly: doing it
15:35 moritz masak: and for the web frontend, performance is a concern
15:35 nwc10 so, start with the actual logger?
15:35 nwc10 and run a Rakudo logger in parallel with a perl 5 logger
15:35 nwc10 until the diffs are reliably zero :-) ?
15:37 masak on my wishlist: someone blogging an analysis of how far we can bring down the time to process a web request, on Rakudo and/or Niecza, what we can do about it, and what the tradeoffs are.
15:37 PerlJam do && and || short-circuit in NQP ?
15:37 moritz nqp: 1 && say(42)
15:37 p6eval nqp: OUTPUT«42␤»
15:37 FROGGS nqp: say(1 && 2)
15:37 p6eval nqp: OUTPUT«2␤»
15:37 FROGGS nqp: say(1 && 2 || 3)
15:37 p6eval nqp: OUTPUT«2␤»
15:37 moritz nqp: 1 || say(42)
15:37 p6eval nqp:  ( no output )
15:37 moritz nqp: 0 && say(42)
15:37 p6eval nqp:  ( no output )
15:37 moritz yes, they do
15:37 PerlJam doh! I coulda done that  :)
15:37 TimToady ayup
15:38 FROGGS minions++
15:38 PerlJam wizards++  ;)
15:38 moritz evalbots++
15:38 nwc10 (*reliable* minions)++
15:38 TimToady Give a man a fish, and he'll eat for a day; beat a man over the head with a fish, and he'll wander off and start fishing.
15:38 FROGGS hehe
15:39 FROGGS TimToady++
15:39 FROGGS see ya
15:39 moritz give a man a fish, and he'll give you a few dollars. Phish a man's bank account data, and he'll give you all his money.
15:40 * masak .oO( Let Me Evalbot That For You )
15:40 tadzik give man a fire, and he'll be warm for a night. Set a man on fire and he'll be warm for the rest of his life.
15:42 masak give a man a fish, and you'll feed him for a day. teach a man to fish, and he'll come back the next day asking you about Perl 5, even though that's off-topic on this channel.
15:42 masak census: no offense :)
15:42 TimToady I vote census Most Improved in that regard
15:42 PerlJam a single fish would last me about half a day unless it was a really big fish.
15:43 tadzik or a very small man
15:43 TimToady a fish that would last me all die might well kill me due to allergies...
15:43 TimToady *day
15:44 TimToady gah, fraudian typos
15:44 huf depends on how you use it
15:44 geekosaur PerlJam, ever seen a tuna?
15:44 huf you all assume you'd eat the fish
15:44 PerlJam huf: bait?
15:44 huf or just sit on it, or something
15:44 TimToady I don't want a bait that lasts all day
15:45 moritz or sell it, and buy some real food in return :-)
15:45 masak on behalf of fish, I'm offended by that last remark.
15:45 masak :P
15:45 TimToady old cabbage is real food now, is it?
15:46 tadzik as a human, I'd be glad to not be considered "real food" :)
15:46 nwc10 they seem to think it is round here
15:46 huf at least it's wiser and less prone to panic
15:46 TimToady but yes, if I were the bait, I'd prefer to last at least a day
15:47 huf maybe you are, and you did.
15:47 TimToady take me to your leader
15:48 PerlJam sounds like it could be the beginning of a good AFJ to me.
15:49 masak tadzik: so, I guess no-one told you what Soylent Green is actually made of, huh? :P
15:54 gdey joined #perl6
15:58 tadzik what's Soylent Green?
15:58 huf food
15:58 huf a bit like cram
15:58 TimToady kurumono desu ka?
15:58 tipdbmp rakudo: sub not-working { say "'not-' not allowed as a sub name prefix?"; }; not-working();
15:58 p6eval rakudo 9c59a1: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Undeclared routine:â�¤    working used at line 1â�¤â�¤Â»
15:59 TimToady apologies for a multilingual pun
16:01 TimToady neither of which is English
16:01 huf you've lost me
16:02 TimToady Kuru is from Fore, a New Guinian language
16:02 TimToady or it means "comes" in Japanese
16:02 TimToady so "Is it something that comes?"
16:03 census Thank you TimToady!! :)
16:03 FROGGS joined #perl6
16:03 * TimToady apologizes for his prion-infested brane
16:03 census masak: No offense taken!!  You are infinitely nicer than #perl
16:03 FROGGS hi all \o/
16:05 moritz r: my $param := :($ = 42).params[0]; say nqp::getattr($param, Parameter, '$default_value')
16:05 p6eval rakudo 9c59a1: OUTPUT«Can not get attribute '$default_value' declared in class 'Parameter' with this object␤  in block  at /tmp/9qKPUTW7xi:1␤␤»
16:06 bluescreen10 joined #perl6
16:06 moritz r: my $param := :($ = 42).params[0]; say nqp::getattr(nqp::p6decont($param), Parameter, '$default_value')
16:06 p6eval rakudo 9c59a1: OUTPUT«Can not get attribute '$default_value' declared in class 'Parameter' with this object␤  in block  at /tmp/v5jkQrNS0K:1␤␤»
16:06 masak tadzik: the reference is to an old Harry Harrison novel: https://en.wikipedia.org/wiki/Make_Room!_Make_Room! -- spoiler alert, people are crowded, someone produces "soylent" (soy+lentils) food cheaply, but it turns out to be made of people.
16:06 moritz r: my $param := :($ = 42).params[0]; say nqp::getattr(nqp::p6decont($param), Parameter, '$!default_value')
16:06 p6eval rakudo 9c59a1: OUTPUT«42␤»
16:07 moritz long story short: the default is indeed stored as a literal (and not a closure), it's the accessor in class Parameter that wraps it in a Block
16:07 masak tadzik: "soylent green" is such a well-known meme, that it essentially means "cannibalism". cf Jonathan Coulton's "Chiron Beta Prime", where it gets a quick mention.
16:08 masak moritz: there could be a consistency-based argument for keeping it that way.
16:09 jnthn Oh, hmm. Now you say that, I have vague recollections of an RT ticket complaining about such an inconsistency...
16:09 FROGGS tipdbmp: why is that?
16:12 tipdbmp I don't know.
16:12 census Timtoday: I just wish you had some pull with #perl to get me unbanned there! :)
16:13 TimToady I cannot be everyone's mother.
16:13 census (and that you would not mind using that pull :)
16:13 census I don't know why aperion won't let me back.  Apparently I abused him . . .I don't know when or how this occurred.
16:14 PerlJam census: give it a while, the ban will go away.
16:14 geekosaur you are presently banned because you get re-ip-ed periodically and apeiron thinks you are deliberately evading the original ban
16:14 census not at all!!
16:14 census I try it out in the hopes that the ban is over
16:14 geekosaur which makes me think apeiron is not quite as swift as he thinks he is
16:14 census Since nobody told me when it expired
16:14 census How am I supposed to know when I am unbanned?
16:14 gdey joined #perl6
16:15 PerlJam census: keep trying to join until it works  :)
16:15 census PerlJam: Apparently that only gets me rebanned
16:15 geekosaur he also really doesn't like people who autorejoin, and has admitted this
16:15 geekosaur so I think you just have to stop trying for a wek or so
16:15 census I do not do autorejoin.  I do not know what that means
16:15 census And I don't try that often.
16:16 geekosaur maybe you're not autorejoining since you said you try it periodically
16:16 census I try like once every few days
16:16 geekosaur you're trying often enough, apparently
16:16 geekosaur more 0often than that
16:16 census Aperion will not tell me what is "enough"
16:16 Chillance joined #perl6
16:16 geekosaur [21 11:15] <geekosaur> so I think you just have to stop trying for a wek or so
16:16 census Geekosaur: If I stop trying for exactly 1 week, will that get me unbanned?
16:17 census Because I don't want to magically try in one week and then get rebanned
16:17 census Aperion will not tell me ANYTHING ever
16:17 TimToady depends on whether you've flipped the bozo bit
16:17 census I just want to sit in #perl without talking.
16:17 moritz wow, the ban list in #perl is quite long
16:17 census I want to learn by osmosis
16:17 census Yes, aperion loves to ban people
16:17 census I've been making friends with some of the banned people
16:17 geekosaur I'm not saying exactly
16:18 geekosaur apeiron is not a computer
16:18 awwaiid maybe you should start #perlbanned :)
16:18 census I know! :)
16:18 census Aperion just bans but does not say for how long or why
16:18 census Just change #perl to #aperion and friends
16:18 census like #foxandfriends
16:18 huf why are you still doing this?
16:19 census because i want to be unbanned
16:19 TimToady this is starting to get a little OT here
16:19 huf talk to an op
16:19 huf and not here.
16:19 * masak .oO( "#perlbanned. You will never find a more wretched hive of scum and villainy. We must be cautious." )
16:19 census I'm sorry TimToady
16:20 PerlJam census: quick!  Start talking about the Perl 6 program you're writing to help you mitigate you banned status in #perl
16:20 pmichaud .oO( "These aren't the IRC channels you're looking for." )
16:20 PerlJam :)
16:21 census :)
16:21 TimToady census: it's not so much the topic, but the perseveration, I think...  see http://en.wikipedia.org/wiki/Perseveration
16:22 * masak .oO( <pumpkin> Perl 6, I am your father. <perl6> nooooooooooo )
16:23 masak TimToady: "...doing the same thing over and over again and expecting different results..."?
16:24 TimToady well, yes <blush>
16:25 masak trying to track down the originator of that quote.
16:25 TimToady the trick is to swap in a different compulsion when you see that your current one isn't working
16:25 awwaiid not only that but... I'm not so sure I'd want to hang out with people who were mean to me. Life's too short. Plenty of other places to learn/contribute :)
16:26 TimToady well, I have no idea if I'm banned on #perl or not...
16:26 huf :)
16:26 masak :P
16:26 PerlJam census: another data point:  Short sentences or phrases punctuated with newline that appear "rapidly" are likely to pique #perl's ire.
16:26 huf "daddy cant come into the couch fort, it's kids only"
16:26 masak according to various sources, Albert Einstein, Mark Silber, Philip Mangano, and Old Chinese Proverb originated the "over and over" quote.
16:26 awwaiid r: say "hello"
16:26 p6eval rakudo 9c59a1: OUTPUT«hello␤»
16:27 census thank you perljam
16:27 masak r: say "the goggles, they do nothing!"
16:27 p6eval rakudo 9c59a1: OUTPUT«the goggles, they do nothing!␤»
16:28 awwaiid oh while we're talking about perl6. Can someone remind me (or tell me to do it myself), if we had magical java bindings, would the syntax be "use java:com.foo.Blah;"? I can't remember
16:29 awwaiid oh wait, it was com::foo::Blah:from<java>, eh?
16:30 moritz awwaiid: right, the package name must be valid Perl 6 syntax for package names
16:30 awwaiid and then :from<java> on the end?
16:30 awwaiid I'm about to implement this for moe is why I ask :)
16:31 awwaiid (about as in a 1-ish-week period)
16:31 moritz I think so, yes
16:31 awwaiid k. I'll go with that.
16:31 awwaiid thanks
16:31 moritz though of course   use ::('com.foo.Blah'):from<java> is also thinkable
16:31 moritz though not very handy, if you ask me
16:35 FROGGS n: my @foo = ("a+b", "b+c"); say "aaaabbbbbcaaab" ~~ /^<@foo>+/
16:35 p6eval niecza v24-23-g0520c7c: OUTPUT«「aaaabbbbbcaaab」␤␤»
16:38 masak FROGGS: wow.
16:38 masak I... wow.
16:38 FROGGS ?
16:38 FROGGS that's niecza
16:38 jnthn Is it LTMing those?
16:38 masak did you just *merge* two DFAs!?
16:38 SamuraiJack joined #perl6
16:39 moritz masak: isn't that what proto regexes do all the time_
16:39 moritz s/_/?/
16:39 jnthn Prety much :)
16:39 FROGGS jnthn: yes, by default. but I'm not sure if the algorithm perfect
16:39 masak I know, but these are first-class values.
16:39 jnthn *pretty
16:40 FROGGS n: say "abcde" ~~ /@(<a bc b cde>)+/
16:40 p6eval niecza v24-23-g0520c7c: OUTPUT«「abc」␤␤»
16:40 lee_ !?
16:40 moritz masak: it's all code and state machines
16:40 masak n: my @foo = /a+b/, /b+c/; say "aaaabbbbbcaaab" ~~ /^<@foo>+/
16:40 p6eval niecza v24-23-g0520c7c: OUTPUT«「aaaabbbbbcaaab」␤␤»
16:40 masak lee_: !!
16:40 lee_ mistype :P ignore me!
16:40 masak ...another lurker... :)
16:40 FROGGS jnthn: I my last example would use NFA, it should match the entire string, right?
16:40 TimToady n: say "abcde" ~~ /<@(<a bc b cde>)>+/
16:40 masak lee_: hi! :D
16:40 p6eval niecza v24-23-g0520c7c: OUTPUT«「abc」␤␤»
16:41 masak moritz: say what you like, I think that's totally awesome. :D
16:41 jnthn n: say "abcde" ~~ /<@(<a b bc cde>)>+/
16:41 p6eval niecza v24-23-g0520c7c: OUTPUT«「abc」␤␤»
16:41 FROGGS TimToady: first "a", then "bc" because "bc" > "b", then nothing there that start with "d"
16:42 TimToady I just said that
16:42 moritz masak: it is
16:42 TimToady ah
16:42 FROGGS n: say "abcde" ~~ /||<@(<a b bc cde>)>+/
16:42 p6eval niecza v24-23-g0520c7c: OUTPUT«「abc」␤␤»
16:42 masak FROGGS: I love it how you actually explain LTM to TimToady... :P
16:42 FROGGS n: say "abcde" ~~ / || @(<a b bc cde>)+/
16:42 p6eval niecza v24-23-g0520c7c: OUTPUT«「abc」␤␤»
16:42 FROGGS masak: *g*
16:42 FROGGS hmm, weird
16:42 moritz masak: and the fact that niecza does it made one of the candidates for the p6cc2011 quite pointless :-)
16:43 jnthn n: say "abcde" ~~ /<@(<a b bc? cde>)>+/
16:43 p6eval niecza v24-23-g0520c7c: OUTPUT«「abc」␤␤»
16:43 masak moritz: which one, ooc?
16:43 masak moritz: also, I don't know if "pointless" is the word you're looking for... :)
16:43 jnthn n: say "abcde" ~~ /<@(<a b {}bc? cde>)>+/
16:43 p6eval niecza v24-23-g0520c7c: OUTPUT«Unhandled exception: System.InvalidCastException: Cannot cast from source type to destination type.␤  at RxFrame.ArrayHelperC (Niecza.Frame th) [0x00000] in <filename unknown>:0 ␤  at Niecza.Kernel.RunCore (Niecza.Frame& cur) [0x00000] in <filename unknown…
16:43 masak just because there are short, elegant solutions...
16:43 FROGGS r: say "abcde" ~~ / || @(<a b bc cde>)+/
16:43 p6eval rakudo 9c59a1: OUTPUT«「abcde」␤␤»
16:43 FROGGS there we go
16:44 jnthn r: say "abcde" ~~ / | @(<a b bc cde>)+/
16:44 p6eval rakudo 9c59a1: OUTPUT«「abc」␤␤»
16:44 moritz r: say 'abcde' ~~ / | @(<a ab abc>) /
16:44 p6eval rakudo 9c59a1: OUTPUT«「abc」␤␤»
16:44 FROGGS jnthn: NFA would try more combinations?
16:47 cognominal__ joined #perl6
16:47 kaleem joined #perl6
16:48 TimToady nr: say "abcde" ~~ / | [@(<a b bc cde>)]+»/
16:49 p6eval niecza v24-23-g0520c7c: OUTPUT«「abcde」␤␤»
16:49 p6eval ..rakudo 9c59a1: OUTPUT«「cde」␤␤»
16:49 masak FROGGS: NFAs don't so much "try combinations" as "exist in a superposition of all combinations possible at this point".
16:50 TimToady nr: say "abcde" ~~ / | @(<a b bc cde>)+»/
16:50 p6eval niecza v24-23-g0520c7c: OUTPUT«「abcde」␤␤»
16:50 p6eval ..rakudo 9c59a1: OUTPUT«「cde」␤␤»
16:50 TimToady nr: say "abcde" ~~ / | <@(<a b bc cde>)>+»/
16:50 p6eval niecza v24-23-g0520c7c: OUTPUT«Unhandled exception: System.InvalidCastException: Cannot cast from source type to destination type.␤  at RxFrame.ArrayHelperC (Niecza.Frame th) [0x00000] in <filename unknown>:0 ␤  at Niecza.Kernel.RunCore (Niecza.Frame& cur) [0x00000] in <filename unknown…
16:50 p6eval ..rakudo 9c59a1: OUTPUT«#<failed match>␤»
16:51 TimToady wow
16:51 masak FROGGS: if you haven't come upon http://swtch.com/~rsc/regexp/regexp1.html, I can heartily recommend it. it's enlightening.
16:51 TimToady I think I see about three bugs there
16:52 masak TimToady: I don't, so feel free to enumerate them.
16:52 masak I see that Niecza and Rakudo differ on the first one.
16:52 TimToady well, n and r disagree on the first
16:52 masak :)
16:52 TimToady and neither works on the second
16:52 masak what's that » doing there?
16:53 masak word boundary, right?
16:53 TimToady nod
16:53 TimToady forcing backtracking
16:53 masak oh!
16:53 TimToady which n does but r doesn't for the literals
16:53 masak so... Niecza is right on the first one?
16:53 TimToady and neither seems to work for the regex forms
16:54 TimToady yes, because nothing committed to the current LTM inside the @
16:54 * masak submits rakudobug
16:54 masak that's one.
16:54 masak "neither works on the second" may just be NYI.
16:55 FROGGS masak: will read, and yes, that is what I meant by "trying" for NFA
16:55 moritz an NFA doesn't try. It just does :-)
16:57 TimToady nr: say "abcde" ~~ / (a | b | bc | cde)+»/
16:57 p6eval rakudo 9c59a1: OUTPUT«「abcde」␤ 0 => 「a」␤ 0 => 「bc」␤ 0 => 「b」␤ 0 => 「cde」␤␤»
16:57 p6eval ..niecza v24-23-g0520c7c: OUTPUT«「abcde」␤ 0 => 「a」␤ 0 => 「b」␤ 0 => 「cde」␤␤»
16:57 masak moritz: exactly. like Yoda. :)
16:58 TimToady ooh, another bug
16:58 TimToady backtrack isn't taking out the [bc] in rakudo
16:59 * FROGGS is voting for more regex tests!
16:59 * masak submits rakudobug
16:59 masak FROGGS: well volunteered!
16:59 FROGGS masak: can you assign it to me?
16:59 TimToady (which can't happen in a pure Cursor model because the info should be attached only to the cursor that is thrown away in order to backtrack)
17:00 masak FROGGS: I'll try.
17:02 masak FROGGS: done.
17:05 FROGGS thanks
17:05 masak well, Perl 6 regexes are in some ways like a perfectly crafted building of LTM and FDA-ishness, that someone crashed a Wolkswagen bus of procedural actions into :P
17:05 FROGGS masak: I generally care about regexes these days btw
17:05 FROGGS Volkswagen
17:05 masak oops, thanks.
17:05 masak indeed.
17:06 masak FROGGS: I was actively interested in Rakudo's parsing back in 2009. a lot of that interest remains, even if it's more passive today.
17:09 rjbs r: say so [].splice(0,3)
17:09 p6eval rakudo 9c59a1: OUTPUT«True␤»
17:09 rjbs What's "so" there?
17:09 moritz rjbs: boolification
17:10 FROGGS masak: I'm more interested in getting tickets closed and TODOs done :o)
17:10 moritz http://doc.perl6.org/language/operators#prefix+so
17:10 masak r: say [].splice(0, 3)
17:10 p6eval rakudo 9c59a1: OUTPUT«use of uninitialized value of type Any in string context  in block  at /tmp/H85DOXJPHT:1␤␤use of uninitialized value of type Any in string context  in block  at /tmp/H85DOXJPHT:1␤␤use of uninitialized value of type Any in string context  in block  at /tmp/H85DOXJPH…
17:10 rjbs Is there any mnemonic?
17:10 moritz say [].splice(0, 3).perl
17:10 moritz r: say [].splice(0, 3).perl
17:10 p6eval rakudo 9c59a1: OUTPUT«Array.new(Any, Any, Any)␤»
17:10 masak rjbs: yes, it's the opposite of "not".
17:10 moritz rjbs: opposite of 'not'
17:10 moritz masak faster again
17:10 masak rjbs: "I'm *not* kidding" -- "I'm *so* kidding"
17:11 masak moritz: quit post-predicting me! :P
17:11 rjbs Thank you.
17:11 FROGGS r: sub so-thing { }; so-thing()
17:11 p6eval rakudo 9c59a1: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Undeclared routine:â�¤    thing used at line 1â�¤â�¤Â»
17:11 FROGGS r: sub not-thing { }; not-thing()
17:11 p6eval rakudo 9c59a1: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Undeclared routine:â�¤    thing used at line 1â�¤â�¤Â»
17:12 * rjbs filed a rakudobug about the result of splice in Rakudo.
17:12 SunilJoshi joined #perl6
17:13 zby_home_ joined #perl6
17:13 masak r: my @a = << >>; my @c = splice @a, 0, 3; say ?@c
17:13 p6eval rakudo 9c59a1: OUTPUT«True␤»
17:13 masak r: my @a = << >>; my @c = splice @a, 0, 3; say @c.elems
17:13 p6eval rakudo 9c59a1: OUTPUT«3␤»
17:14 masak rjbs: you're getting three undefined elements back.
17:14 moritz masak: postditicting? :-)
17:14 masak rjbs: ?3 is True.
17:14 rjbs n: says o [].splice(0,3)
17:14 p6eval niecza v24-23-g0520c7c: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared routines:â�¤    'o' used at line 1â�¤     'says' used at line 1â�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1443 (die @ 5) â�¤  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_…
17:14 rjbs n: say so [].splice(0,3)
17:14 p6eval niecza v24-23-g0520c7c: OUTPUT«False␤»
17:14 rjbs masak: TimToady called Rakudo's behavior a bug, last night.
17:14 * masak reads the spec for .splice
17:14 moritz yes, the return value should be the empty list, IMHO
17:14 masak rjbs: ah, ok.
17:15 rjbs it prevents:  while my $x = splice @a, 0, 3 {...} from terminating
17:15 moritz nr: say so (Any, Any, Any)
17:15 p6eval rakudo 9c59a1, niecza v24-23-g0520c7c: OUTPUT«True␤»
17:15 moritz that part is correct, no doubt
17:15 masak agreed.
17:15 rjbs I'd expect that to be true, and for the splice in question to return an empty list.
17:16 masak While it is illegal for the offset to be larger than the size of
17:16 masak the array, it is allowed for the final position to be off the end of the array;
17:16 masak in this case the entire rest of the array is spliced, whatever is available.
17:16 moritz rjbs: then your expectations are aligned with the specs, and with niecza
17:16 masak this makes it sound like Niecza is right and Rakudo is wrong.
17:17 census_ joined #perl6
17:17 census_ left #perl6
17:18 census_ joined #perl6
17:19 moritz and I'm pretty sure I know why rakudo does it wrong
17:19 moritz it simply slices the array with the arguments
17:19 census joined #perl6
17:19 moritz and an array-slice past the end of the array is non-empty (otherwise you couldn't assign to its elements)
17:20 masak then it shouldn't simply slice :)
17:20 moritz presumably, yes
17:20 moritz or convert to List first
17:20 moritz r: say (my @).list.WHAT
17:20 p6eval rakudo 9c59a1: OUTPUT«Array()␤»
17:21 masak heh.
17:21 masak bug?
17:21 jnthn No.
17:21 moritz no
17:21 jnthn r: say Array ~~ List
17:21 p6eval rakudo 9c59a1: OUTPUT«True␤»
17:21 masak ah.
17:21 moritz Array is a subcl... what jnthn said
17:21 * masak hugs p6eval
17:21 moritz pity that it violates Liskov
17:21 masak what does?
17:22 FROGGS r: sub and-thing { }; and-thing()
17:22 p6eval rakudo 9c59a1:  ( no output )
17:22 moritz slicing a List beyond its end simply returns Nil or the empty list or so
17:22 moritz but slicing an Array doesn't
17:22 FROGGS r: sub do-thing { }; do-thing()
17:22 p6eval rakudo 9c59a1:  ( no output )
17:22 * masak grumbles about subclasses being an attractive but ultimately ugly idea in programming languages...
17:22 moritz nr: say <a b c>[1..5].elems
17:22 p6eval rakudo 9c59a1: OUTPUT«2␤»
17:22 p6eval ..niecza v24-23-g0520c7c: OUTPUT«5␤»
17:23 moritz nr: say <a b c>.list[1..5].elems
17:23 p6eval rakudo 9c59a1: OUTPUT«2␤»
17:23 p6eval ..niecza v24-23-g0520c7c: OUTPUT«5␤»
17:28 moritz ... at least in Rakudo
17:30 census_ joined #perl6
17:30 pmurias is niecza or rakudo correct?
17:31 alester joined #perl6
17:31 census joined #perl6
17:32 moritz I'm pretty sure rakudo's behavior is intentional. Not sure about correct though
17:32 moritz nr: say <a b c>[1..*].perl
17:33 p6eval niecza v24-23-g0520c7c: OUTPUT«(timeout)»
17:33 p6eval ..rakudo 9c59a1: OUTPUT«("b", "c")␤»
17:34 moritz since * is bound to the number of elements, with niecza's behavior id should produce ('b', 'c', Any), which is quite inconvenient
17:34 moritz nr: say (1..*).WHAT
17:34 p6eval rakudo 9c59a1, niecza v24-23-g0520c7c: OUTPUT«Range()␤»
17:34 moritz oh wait, it's not even a WhateverCode
17:34 moritz but iirc index ranges ending with * were one of the reasons for rakudo's current behavior
17:35 moritz huh, seems that dalek hasn't joined us :(
17:38 dalek joined #perl6
17:59 cognominal__ joined #perl6
18:21 prammer_ joined #perl6
18:23 odoacre_ joined #perl6
18:25 dayangkun joined #perl6
18:29 baest_ joined #perl6
18:31 DrEeevil joined #perl6
18:32 s0rear joined #perl6
18:32 lustlife1 joined #perl6
18:32 ObseLeTe joined #perl6
18:35 dalek nqp-jvm-prep: b25f471 | jnthn++ | / (12 files):
18:35 dalek nqp-jvm-prep: Refactors in preparation for exceptions support.
18:35 dalek nqp-jvm-prep:
18:35 dalek nqp-jvm-prep: This adds in some pieces that will be needed for exceptions in the more
18:35 dalek nqp-jvm-prep: general case, then switches the existing next/last/redo exceptions over
18:35 dalek nqp-jvm-prep: to using the new approach. (Note, they need integrating so CONTROL,
18:35 dalek nqp-jvm-prep: which may run on the stack top and resume, will work out.)
18:35 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp-jvm-prep/commit/b25f471696
18:37 diakopter the baa clog is .. amusing
18:38 moritz .oO( blah clog )
18:38 jnthn *sigh* Implementing Perl 6 exceptions considered tricky...
18:39 nwc10 s/ exceptions// ?
18:39 jnthn yeay, but I find many parts of the tricky fun
18:39 nwc10 do you have to do all of Perl 6 exceptions for NQP?
18:39 jnthn Exceptions aren't. They're just annoying.
18:39 nwc10 people should just stop making errors
18:39 jnthn No, but I don't want to have to do the whole thing over again.
18:40 diakopter Chuck Norris decides NP-Complete questions in O(0)
18:41 diakopter (time and space)
18:41 moritz and Turing-Complete questions in O(whatever he wants)
18:42 japhb diakopter, he's already decided them ...?
18:42 japhb moritz, that's Bruce Schneier's job.  :-)
18:42 diakopter japhb: :D as soon as they are posed, it is realized they are answered
18:47 nwc10 jnthn: still only the ICU test failing
18:47 pmurias jnthn: did you find a better way for resumable exceptions than keeping your own exceptions stack? like I have to do in nqp-js?
18:53 jnthn pmurias: Well, the main thing that makes them do-able at all is that exception handlers run on the stack top, so really it's just exiting the appropriate handler and returning to where the throw was, without doing any stack unwinding.
18:54 jnthn But I guess you may be in multiple throws at once so a handler stack is likely needed.
18:56 census_ joined #perl6
18:56 TimToady that's what SIMPLECATCH in S04:1035 is supposed to handle so that the "stack" is just the unhandled exceptions returned from the handler
18:58 TimToady and I'm not sure that control exceptions stack at all...
18:58 census joined #perl6
18:58 diakopter do not pass Go; go directly to Forth
18:59 TimToady though I guess you could have a new CATCH nested inside the SIMPLECATCH, but then it would have a new piece of activation stack to run on anyway
19:02 domidumont joined #perl6
19:03 cognominal joined #perl6
19:04 FROGGS the parsers in nqp and rakudo that parse the setting are NFA based?
19:05 jnthn Yes
19:05 jnthn See src/QRegex/NFA
19:05 FROGGS k
19:05 FROGGS ya, seen that
19:06 jnthn Also !protoregex and !alt in Cursor
19:15 * jnthn noms
19:31 raiph joined #perl6
19:31 20WAB0GL7 joined #perl6
19:31 raiph_ joined #perl6
19:32 moritz ~-
19:33 masak new operator? :)
19:33 masak looks like string subtraction...
19:33 moritz I was just unable to type <return>~.
19:34 nwc10 mmm, yes, ssh escapes
19:34 moritz though string subtraction is interesting
19:34 moritz if $a starts with $b, give me the aprt of $b that's after $a
19:34 moritz and $a otherwise
19:35 diakopter part of $a that's after $b you mean?
19:36 * masak .oO( two minutes after the operator was created, there was already uncertainty about what it meant... )
19:36 moritz diakopter: yes
19:37 moritz nr: sub infix:<~->($whole, $prefix) { my $l = $prefix.chars; $whole.substr(0, $l) eq $prefix ?? $whole.substr($l) !! $while }; say 'foobar' ~- 'fo'
19:37 p6eval niecza v24-23-g0520c7c: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Variable $while is not predeclared at /tmp/rbCcI_VvpV line 1:â�¤------> [32m $l) eq $prefix ?? $whole.substr($l) !! [33mâ��[31m$while }; say 'foobar' ~- 'fo'[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/bo…
19:37 p6eval ..rakudo 9c59a1: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Variable '$while' is not declaredâ�¤at /tmp/oXKL67hxRK:1â�¤------> [32mq $prefix ?? $whole.substr($l) !! $while[33mâ��[31m }; say 'foobar' ~- 'fo'[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
19:37 moritz nr: sub infix:<~->($whole, $prefix) { my $l = $prefix.chars; $whole.substr(0, $l) eq $prefix ?? $whole.substr($l) !! $whole }; say 'foobar' ~- 'fo'
19:37 p6eval rakudo 9c59a1, niecza v24-23-g0520c7c: OUTPUT«obar␤»
19:38 moritz nr: sub infix:<~->($whole, $prefix) { my $l = $prefix.chars; $whole.substr(0, $l) eq $prefix ?? $whole.substr($l) !! $whole }; say 'foobar' ~- 'bar'
19:38 p6eval rakudo 9c59a1, niecza v24-23-g0520c7c: OUTPUT«foobar␤»
19:39 dalek perl6-roast-data: e522d98 | coke++ | / (3 files):
19:39 dalek perl6-roast-data: today (automated commit)
19:39 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/e522d98223
19:42 [Coke] wow, roast is going days at a time without a commit!
19:44 masak rn: sub infix:<~->($whole, $prefix) { $whole ~~ /^$prefix(.*:)/ ?? ~$0 !! $whole }; say "foobar" ~- "fo"
19:44 p6eval rakudo 9c59a1, niecza v24-23-g0520c7c: OUTPUT«obar␤»
19:45 masak hm, probably didn't need to ratchet that quantifier...
19:46 tadzik in the middle of Higher Order Perl I feel a strange urge to rewrite Panda in functional style instead of oop
19:46 tadzik I know, I know, closures are just objects
19:48 nwc10 maybe Perl 6 is stable? ship it!
19:49 moritz nah, if it's stable, it's dead
19:49 masak tadzik: certainly there's a balance there. closures are like wonderful mini-objects.
19:50 masak tadzik: I believe most code will have a healthy mixture of OO and closures.
19:50 moritz ad-hoc mini objects
19:50 masak yes! :D
19:51 masak I'm currently in love with JavaScript's common pattern: function () { /* privates */; return { /* publics */ } }
19:51 masak if you take that pattern seriously, JavaScript's lack of private attributes doesn't feel so serious anymore.
19:52 masak (and all languages should have an easy way to create an object that just closes over its environment like that)
19:52 tadzik urgh. Somewhere, somehow, Panda is throwing an exception that's not a SixModelObject
19:52 tadzik wtf
19:53 tadzik ohh. The "$! instead of $_ in CATCH" again
19:53 masak I do that one too often, too.
19:55 tadzik and I need a when {}, alwyas
19:56 * jnthn back
19:57 dalek panda: b7b966b | tadzik++ | bin/panda:
19:57 dalek panda: Catch Panda.resolve exceptions correctly. Fixes GH-32
19:57 dalek panda: review: https://github.com/tadzik/panda/commit/b7b966b9f3
19:57 nwc10 sucessfully nommed?
19:57 jnthn yes :)
20:02 ObseLeTe joined #perl6
20:19 labster joined #perl6
20:23 dalek ecosystem: 18a5136 | (Brent Laabs)++ | META.list:
20:23 dalek ecosystem: Adding Lingua::Number
20:23 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/18a513659e
20:27 gdey joined #perl6
20:28 cognominal joined #perl6
20:28 moritz I just stumbled over the same bug as daxim++ earlier
20:29 moritz panda installed to ~/.perl6/lib/, which isn't in path
20:29 moritz and the site dir is writable
20:30 moritz ah, and I know why
20:30 moritz $PATH is wrong, it picks up an old panda first
20:43 GlitchMr Just wondering, does Rakudo with JVM mean that it would be possible to make Java applet that would be online REPL?
20:49 [Coke] ... yes. but ew, applets.
20:49 masak there's more than one way to do it.
20:49 masak your way is *wrong*. :P
20:50 GlitchMr I know.
20:50 jnthn I suspect it'll be possible, with some amount of effort.
20:51 GlitchMr Still, Java applet is better than nothing. Or perhaps I'm wrong.
20:51 nwc10 but it's not clear who would be the attacker, and who would be pwned?
20:51 Liz_ joined #perl6
20:51 masak GlitchMr: make a REPL in JavaScript instead ;)
20:51 GlitchMr Hmmm... couldn't Silverlight (I know, even worse than Java applets) work with Niecza.
20:52 GlitchMr Anyway, I'm currently compiling Rakudo with emscripten.
20:52 GlitchMr I wonder if I will get anything.
20:52 GlitchMr "make" script appears to work
20:52 applicative_ joined #perl6
20:52 GlitchMr But I'm not sure what would be size of it.
20:53 GlitchMr And I'm almost sure that 100MB wouldn't be too practical.
20:53 GlitchMr I don't even mean server space.
21:01 GlitchMr cc -c -o perl6_group.o -Isrc/pmc -I/usr/include/parrot/5.0.0 -I/usr/include/parrot/5.0.0/pmc ...
21:01 GlitchMr wait...
21:01 GlitchMr Why it's using cc?
21:05 dolmen1 joined #perl6
21:05 [Coke] what is it?
21:15 masak it's a popular C compiler, written by the GNU people.
21:15 * masak hides
21:15 * masak watched "Spy Hard" recently :)
21:16 FROGGS nqp: my $nfa := QRegex::NFA.new; $nfa.addnode( QAST::Regex.new( "foobar" ) ); say( $nfa.run("foobar", 0) );
21:16 p6eval nqp: OUTPUT«[ 0 ]␤»
21:16 FROGGS I'm not supposed to use it that way, no?
21:16 FROGGS jnthn: ?
21:16 FROGGS you have a hint for me?
21:17 masak it returned you a 0.
21:17 masak looks quite promising.
21:17 FROGGS nqp: my $nfa := QRegex::NFA.new; $nfa.addnode( QAST::Regex.new( "foobar" ) ); say( $nfa.run("abcdef", 0) );
21:17 p6eval nqp: OUTPUT«[ 0 ]␤»
21:17 masak nqp: my $nfa := QRegex::NFA.new; $nfa.addnode( QAST::Regex.new( "foobar" ) ); say( $nfa.run("le foobar", 0) );
21:17 p6eval nqp: OUTPUT«[ 0 ]␤»
21:17 masak hm.
21:17 FROGGS ya
21:17 FROGGS ó.ò
21:20 jnthn Generally, you don't fun an NFA directly but instead merge a bunch of them together, giving each possiblity a fate.
21:20 jnthn See what happens in, iirc, !protoregex_nfa
21:24 jnthn (So you run a merged NFA.)
21:24 jnthn In fact, looking at !alt_nfa is probably more useful.
21:24 jnthn And the way it calls merge_substates
21:24 FROGGS so I have to call mergesubstates?
21:24 FROGGS k
21:24 jnthn yeah
21:25 jnthn A regex will already have an NFA generally, which you can get by calling .NFA on it.
21:26 benabik joined #perl6
21:26 FROGGS ohh, nice
21:26 FROGGS nqp: say (/a/).NFA
21:26 p6eval nqp: OUTPUT«Confused at line 2, near "say (/a/)."␤current instr.: 'panic' pc 14734 (src/stage2/gen/NQPHLL.pir:5249) (src/stage2/gen/NQPHLL.pm:282)␤»
21:26 FROGGS nqp: say((/a/).NFA)
21:26 p6eval nqp: OUTPUT«Method 'NFA' not found for invocant of class 'NQPRegex'␤current instr.: '' pc 119 ((file unknown):155890185) (/tmp/8CAjkQUo1m:1)␤»
21:26 FROGGS okay, within rakudo then
21:26 FROGGS in Cursor
21:41 dalek nqp-jvm-prep: 2e88e42 | jnthn++ | / (12 files):
21:41 dalek nqp-jvm-prep: First pass at exception handling.
21:41 dalek nqp-jvm-prep:
21:41 dalek nqp-jvm-prep: Makes basic try/CATCH work. Enough to pass 3 out of 8 tests in
21:41 dalek nqp-jvm-prep: 44-try-catch.t.
21:41 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp-jvm-prep/commit/2e88e420d9
21:41 [Coke] jnthn++
21:43 FROGGS jnthn: do I just run the nfa and return that from INTERPOLATE?
21:44 jnthn FROGGS: No
21:44 jnthn FROGGS: You (presumably) have an array of things to run.
21:44 jnthn You use the NFA to tell you which indexes of the array to try and in which order.
21:45 jnthn So your fates in this case are array indexes.
21:46 shinobicl left #perl6
21:49 masak oh! nice.
21:54 ObseLeTe joined #perl6
21:58 bluescreen10 joined #perl6
22:35 masak 'night, #perl6
22:35 census joined #perl6
22:46 woolfy1 joined #perl6
22:47 dalek nqp-jvm-prep: f4ee919 | jnthn++ | lib/QAST/JASTCompiler.nqp:
22:47 dalek nqp-jvm-prep: Fix a thinko, winning one more test.
22:47 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp-jvm-prep/commit/f4ee919aac
22:47 dalek nqp-jvm-prep: da77c72 | jnthn++ | lib/QAST/JASTCompiler.nqp:
22:47 dalek nqp-jvm-prep: Toss an unused parameter.
22:47 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp-jvm-prep/commit/da77c72f23
22:47 dalek nqp-jvm-prep: aa2d439 | jnthn++ | / (3 files):
22:47 dalek nqp-jvm-prep: Arg re-ordering to simplify stack handling.
22:47 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp-jvm-prep/commit/aa2d439561
22:49 wk joined #perl6
23:05 dalek nqp-jvm-prep: 909516f | jnthn++ | docs/ROADMAP:
23:05 dalek nqp-jvm-prep: Update ROADMAP.
23:05 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp-jvm-prep/commit/909516f4d2
23:07 jnthn sleep &
23:16 woolfy1 left #perl6
23:33 hash_table joined #perl6
23:36 skids joined #perl6
23:49 grondilu sub count(@a) { my %count; %count{$_}++ for @a; return %count }  # Any more elegant way to write this??
23:53 sorear that's almost, but not quite, what classify is for.  or is that categorize now
23:56 [Coke] r: my @a = <a b c d e a b c>; say @.classify();
23:56 p6eval rakudo 9c59a1: OUTPUT«[31m===[0mSORRY![31m===[0m�Variable @.classify used where no 'self' is available�at /tmp/yfn1Ob4War:1�------> [32m@a = <a b c d e a b c>; say @.classify()[33m�[31m;[0m�»
23:56 [Coke] r: my @a = <a b c d e a b c>; say @a.classify();
23:56 p6eval rakudo 9c59a1: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤  in method classify at src/gen/CORE.setting:6066␤  in block  at /tmp/Hr7ZlaWp08:1␤␤»
23:57 [Coke] r: my @a = <a b c d e a b c>; say @a.classify($_);
23:57 p6eval rakudo 9c59a1: OUTPUT«Nominal type check failed for parameter '&test'; expected Callable but got Any instead␤  in method classify at src/gen/CORE.setting:6066␤  in block  at /tmp/KXcCBqmYnK:1␤␤»
23:57 [Coke] r: my @a = <a b c d e a b c>; say @a.classify(.Str);
23:57 p6eval rakudo 9c59a1: OUTPUT«use of uninitialized variable $_ of type Any in string context  in block  at /tmp/iJIJhfkd4d:1␤␤Nominal type check failed for parameter '&test'; expected Callable but got Str instead␤  in method classify at src/gen/CORE.setting:6066␤  in block  at /tmp/iJIJhfkd4d:1…
23:58 [Coke] ... classify. You're on your own after that. :P
23:58 spider-mario r: my @a = <a b c d e a b c>; say @a.classify(*.Str);
23:58 p6eval rakudo 9c59a1: OUTPUT«("a" => ["a", "a"], "b" => ["b", "b"], "c" => ["c", "c"], "d" => ["d"], "e" => ["e"]).hash␤»
23:59 spider-mario r: my @a = <a b c d e a b c>; say @a.classify(*);
23:59 p6eval rakudo 9c59a1: OUTPUT«Nominal type check failed for parameter '&test'; expected Callable but got Whatever instead␤  in method classify at src/gen/CORE.setting:6066␤  in block  at /tmp/rEvMpeASRe:1␤␤»
23:59 spider-mario r: my @a = <a b c d e a b c>; say @a.classify: {$_};
23:59 p6eval rakudo 9c59a1: OUTPUT«("a" => ["a", "a"], "b" => ["b", "b"], "c" => ["c", "c"], "d" => ["d"], "e" => ["e"]).hash␤»

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

Perl 6 | Reference Documentation | Rakudo