»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend! Set by sorear on 4 February 2011. |
|||
00:01
mberends left
00:03
donaldh left
|
|||
census | Good night rindolf! :) | 00:09 | |
00:13
skids joined,
cognominal left,
cognominal joined
00:17
cognominal left
|
|||
TimToady | lue: why not just use eqv if you really want to check for equivalence? | 00:35 | |
(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 | ||
(just working my way through the spec; not actually coding) | 00:37 | ||
TimToady | that's just it, the compiler rarely checks name equivalence, but usually type containment is all that is wanted | 00:42 | |
othewise polymorphism doesn't work right | |||
00:59
anuby joined
01:14
woosley joined
|
|||
[Coke] yawns. | 01:18 | ||
01:20
hypolin joined
|
|||
diakopter yawns | 01:21 | ||
[Coke] | hah! | 01:27 | |
japhb | dangit, you got me too. | 01:34 | |
TimToady sips his coffee bemusedly, and wonders if it will keep him awake too late tonight... | 01:35 | ||
Pleiades` | mmmmm coffee | 01:39 | |
rjbs misreads Name Equivalence twice as Near Equivalence. | |||
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 gist.github.com/rjbs/5001268 | 01:49 | ||
TimToady | don't need the parens on assignment to %for | 01:51 | |
01:51
apejens joined
|
|||
rjbs | woah | 01:52 | |
TimToady | don't need the parens on the while either | ||
01:53
adu joined
|
|||
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 | |
and used loop. then I did what you see | |||
TimToady | might be a way to recast the while as a for, though asking how many elements is left is harder | ||
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:54 | |
TimToady | using an accumulator like $result often means you could join '', gather ... instead | 01:55 | |
rjbs will consult perl6advent.wordpress.com/2009/12/2...r-of-eden/ for gather. | |||
TimToady | dunno why you have the last if, when the splice should go false | 01:56 | |
if it doesn't, maybe you found a bug | |||
rjbs | Oops, that's cruft from when I'd written it as a loop{...} | ||
TimToady | could use for @zchars -> $c1, $c2 = 5, $c3 = 5, then or in the 0x8000 outside the loop | 01:59 | |
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. | ||
(@x -> $x, $y) seemed, gut-wise, more p6ish. | |||
what do we call those guys on the rhs of the -> ? | 02:01 | ||
TimToady | parameters | ||
it's just a lambda | |||
rjbs | . o O ( I can't believe it's just lambda!™ ) | ||
TimToady | it's just applied funny so that it chews its parameters off the list and leaves the rest | 02:02 | |
well, and the syntax is magical, insofar as its occuring where a term would be expected | 02:03 | ||
*it's | |||
rjbs | my $b = gather for @a -> $x, $y { take $x } | 02:05 | |
That's pretty cool. | |||
dalek | osystem: 3975e6f | grondilu++ | META.list: Adding modular arithmetic module This is a translation of Perl5's Math::ModInt |
02:07 | |
rjbs | TimToady: Actually, deleting that last on line 48 leaves me looping forever! | 02:08 | |
TimToady | r: say so [].splice(0,3) | 02:09 | |
p6eval | rakudo 6392d6: OUTPUT«True» | ||
TimToady | oopsie | ||
yes, a bug | |||
r: say +[].splice(0,3) | |||
p6eval | rakudo 6392d6: OUTPUT«3» | ||
TimToady | n: say +[].splice(0,3) | ||
p6eval | niecza v24-23-g0520c7c: OUTPUT«0» | ||
TimToady | rakudobug | ||
census | Has anybody worked with Jaro-Winkler distance between strings before? | 02:10 | |
TimToady suspects Jaro and Winkler have, for some reason... | 02:11 | ||
rjbs | How do I get the last element in an Array? | 02:12 | |
TimToady | [*-1] | ||
sorear | @foo[*-1] | ||
rjbs | Thanks | ||
TimToady | nr: @foo[-1] | 02:13 | |
p6eval | rakudo 6392d6: OUTPUT«===SORRY!===Variable '@foo' is not declaredat /tmp/99m_Ufdgea:1------> @foo[-1]⏏<EOL> expecting any of: postfix infix or meta-infix infix stopper statement end statement modifier … | ||
..niecza v24-23-g0520c7c: OUTPUT«===SORRY!===Unsupported use of [-1] subscript to access from end of array; in Perl 6 please use [*-1] at /tmp/iUPBW6SdMV line 1 (EOF):------> @foo[-1]⏏<EOL>Parse failed» | |||
TimToady | nr: .[-1] | ||
p6eval | rakudo 6392d6: OUTPUT«Cannot use negative index -1 on Anycurrent 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… | ||
..niecza v24-23-g0520c7c: OUTPUT«===SORRY!===Unsupported use of [-1] subscript to access from end of array; in Perl 6 please use [*-1] at /tmp/1PeW3ivn0D line 1 (EOF):------> .[-1]⏏<EOL>Parse failed» | |||
rjbs | updated gist.github.com/rjbs/5001268 with gather/take; pleased | ||
TimToady | that's a lot prettier | 02:14 | |
rjbs | Could probably just make that a map | ||
TimToady | sure | ||
and the ~= could be a join of a map too | 02:15 | ||
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? | ||
rjbs | Hm. How do I map pairwise? | ||
cotto | gist.github.com/anonymous/5001423 | ||
rjbs | I think I'm getting a bit overwhelmed at ==><== and ambidextrous flow. | ||
TimToady | rjbs: just supply two parameters to the lambda | ||
well, I dunno if join is smart about Buf | 02:18 | ||
actually, [~] would likely be better than join '' anyway | 02:19 | ||
cotto | pull request submitted; feel free to continue ignoring the gist | 02:21 | |
TimToady | :) | 02:22 | |
TimToady has no rakudo commit bit, for the record... | |||
[Coke] | I do. those semicolons seems reasonable. | 02:23 | |
cotto | I didn't intend to refer to anyone in particular. | ||
rjbs | Works, not useful: my $x <== map -> $_ { word($_) } <== @values; | ||
Doesn't work, would think it useful: my $x = [~] <== map -> $_ { word($_) } <== @values; | |||
02:24
lustlife joined
|
|||
dalek | kudo/nom: c3dc86e | cotto++ | src/ops/perl6.ops: clean up some op definitions |
02:24 | |
kudo/nom: 134b008 | (Will Coleda)++ | src/ops/perl6.ops: Merge pull request #105 from cotto/nom clean up some op definitions |
|||
[Coke] | Thanks, cotto. | ||
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. | ||
TimToady | r: map {...} 1,2,3 | 02:26 | |
p6eval | rakudo 6392d6: OUTPUT«===SORRY!===Two terms in a rowat /tmp/9p8rUavgui:1------> map {...} ⏏1,2,3 expecting any of: argument list postfix infix or meta-infix infix stopper statement end statement … | ||
TimToady | n: map {...} 1,2,3 | ||
p6eval | niecza v24-23-g0520c7c: OUTPUT«===SORRY!===Strange text after block (missing comma, semicolon, comment marker?) at /tmp/3QVV91MteN line 1:------> map {...}⏏ 1,2,3Parse failed» | ||
rjbs | I saw that error quite a lot. | ||
TimToady | it could use an error more like niecza's there | ||
dalek | p: f802b49 | cotto++ | src/ops/nqp (3 files): clean up some ops definitions |
02:27 | |
p: 031801c | cotto++ | src/ops/nqp_dyncall.ops: use a non-empty default case |
|||
p: 2ddd4dc | cotto++ | src/ops/nqp (3 files): Merge pull request #75 from perl6/ops-fixes clean up some ops definitions |
|||
TimToady | map and grep are not magic syntax in p6 | ||
rjbs | TimToady: must be nice! | ||
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. :) | ||
TimToady | but it does mean we all leave out the comma occasionally | ||
rjbs | Updated my gist one more time, feeling better. And now, back to p5. Blockers to track! | 02:30 | |
Thanks for the review! | |||
TimToady | soitinly | ||
afk & | 02:32 | ||
02:36
ObseLeTe left
|
|||
adu | hi TimToady | 02:38 | |
02:43
jaldhar joined
03:03
gdey left,
census left
|
|||
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:07 | |
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:08 | ||
03:16
census joined
03:26
orafu left
03:27
orafu joined
|
|||
rjbs | japhb: turning ints into words, I think, would be more likely to lead to me accidentally using word instead of byte | 03:35 | |
japhb: I agree, re making most of the header one big call; that's an artifact of the construcion that I could fix | |||
japhb: ...but note that many of the header segments are not contiguous. | |||
It could be done with pairs... | 03:36 | ||
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:38 | |
03:39
crazedpsyc is now known as Getly,
Getly is now known as crazedpsyc
03:51
adu left
|
|||
diakopter | swarley: O_O | 03:51 | |
diakopter nudges you back toward 6model/qast | |||
swarley | Don't worry. I'm not moving away from it. | ||
I just wanted to see what it looked like using libjit as a base instead of what was already in place | 03:54 | ||
diakopter | you're a jit | 03:57 | |
swarley | :( I know | ||
diakopter | it was a joke of the absurd.. | 03:58 | |
swarley | i'd hate to see parrot die, it's such a neat project. | ||
diakopter | if my last msg had been 1s later.. | 04:00 | |
swarley | haha. | 04:01 | |
diakopter | TimToady: that STD_P5 grammar would be helpful pretty soon | 04:03 | |
pugs: { use v6; say 4; { use v5; print 33; { use v6; say 44 } } } | 04:05 | ||
p6eval | pugs: OUTPUT«4Error 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.» | ||
diakopter | TimToady: that oughtta keep you occupied a week or few :P | 04:12 | |
04:13
dayangkun joined
|
|||
diakopter | TimToady: oh, and, it needs to support source filters and extensions that hook the parser ;) | 04:19 | |
04:24
xinming_ joined
|
|||
swarley | ew filters.. | 04:27 | |
04:28
xinming left
04:38
rking joined
04:41
SamuraiJack joined
04:44
preflex_ joined
04:46
preflex left,
preflex_ is now known as preflex
04:52
DrEeevil joined
|
|||
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» | ||
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» | ||
grondilu | tadzik: panda shows way too many error lines when failing to find a module | ||
labster | agreed grondilu. 70 some, the last time I checked. | ||
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» | ||
labster | role can't take 'is rw'? | ||
PerlJam | I'm not sure what it would mean. | 05:01 | |
(I'm not sure what "is rw" means on a class even) | |||
The only place "class.*is rw" appears in the spec even is an example that illustrates that traits are applied with "is" | 05:03 | ||
S12:134 fwiw | |||
TimToady | see S12:703 | 05:06 | |
PerlJam | ah | ||
05:10
census left
|
|||
labster | Roles are class-like in a lot of places, but I guess this is not one of them. | 05:10 | |
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 | ||
it's not like it means "is open" | 05:22 | ||
05:32
Chillance left
05:38
hypolin left
|
|||
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«===SORRY!===Cannot use bind operator with this LHS at /tmp/J88IlP4BpB line 1:------> $i) { state @p := grep &is-prime, 2 .. *⏏; return @p[$i] }; say foo 5;Unhandled exception: Check failed at /home/p6eval/niecza… | ||
..rakudo 134b00: OUTPUT«(timeout)» | |||
grondilu | rn: sub foo($i) { my @p := grep &is-prime, 2 .. *; return @p[$i] }; say foo 5; | ||
p6eval | rakudo 134b00, niecza v24-23-g0520c7c: OUTPUT«13» | ||
moritz | \o | 05:42 | |
grondilu | rn: sub foo($i) { state @p = grep &is-prime, 2 .. *; return @p[$i] }; say foo 5; | ||
p6eval | rakudo 134b00, niecza v24-23-g0520c7c: OUTPUT«(timeout)» | ||
grondilu | is grep supposed to be eager? | 05:43 | |
TimToady | no, but assignment is | ||
grondilu | why assignement should be eager? I will always hang. | 05:45 | |
(well at least I can't see an example where it wouldn't) | 05:46 | ||
.-1s/I will always/It will always/ | |||
moritz | because in too many places it would surprise too many people if it were lazy | ||
TimToady | I'm trying to figure out why the := doesn't work; maybe sink is not treating is special as it does my? | 05:47 | |
grondilu | moritz: don't you think it is worse if the program hangs?? | 05:48 | |
05:48
SamuraiJack left
|
|||
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 ..." | ||
TimToady | r: sub foo($i) { (state @p := grep &is-prime, 2 .. *)[$i] }; say foo 5; | ||
p6eval | rakudo 134b00: OUTPUT«13» | ||
TimToady | r: sub foo($i) { state @p := grep &is-prime, 2 .. *; return @p[$i] }; say foo 5; | 05:49 | |
p6eval | rakudo 134b00: OUTPUT«(timeout)» | ||
TimToady | r: sub foo($i) { so state @p := grep &is-prime, 2 .. *; return @p[$i] }; say foo 5; | ||
p6eval | rakudo 134b00: OUTPUT«13» | ||
moritz | r: sub foo($i) { my @p := grep &is-prime, 2 .. *; return @p[$i] }; say foo 5; | 05:50 | |
p6eval | rakudo 134b00: OUTPUT«13» | ||
TimToady | yes, seems to be sinking it | ||
not treating state like my | |||
05:50
benabik joined
|
|||
TimToady | moritz: maybe the desugaring of 'state' is introducing a sink somehow? | 05:52 | |
or hiding the state from the 'my' recognizer? | |||
grondilu | I guess I should just get used to using ':=' more often. | ||
moritz | TimToady: that seems to be the case, yes | ||
05:54
hypolin joined
06:06
kaleem joined
06:20
rindolf joined
06:22
DrEeevil is now known as bonsaikitten
06:45
erkan left
06:46
rindolf left
|
|||
dalek | kudo/nom: cd95e40 | moritz++ | src/Perl6/Actions.pm: /./ and rx/./ literals now match against $_ in sink context |
06:48 | |
kudo/nom: 5dfb733 | moritz++ | src/Perl6/Actions.pm: avoid sinking of state initializers |
|||
06:49
rindolf joined
|
|||
TimToady | moritz++ for being moritz | 06:57 | |
07:01
sqirrel joined
07:04
FROGGS joined
|
|||
rindolf | Hi all. | 07:04 | |
TimToady: hi. | |||
TimToady | .oO(I'm not part of all?) |
07:05 | |
tadzik | grondilu: could you open a bug please? | 07:06 | |
I can look at that in some spare minute | 07:07 | ||
07:10
rindolf left,
rindolf joined
07:16
rindolf left
07:17
rindolf joined
|
|||
sorear | o/ rindolf, sqirrel, FROGGS | 07:18 | |
rindolf | sorear: hi. | 07:22 | |
grondilu | tadzik: I don't know how to open a bug about panda | ||
rindolf | TimToady: “all for TimToady, and TimToady for all.” | ||
07:22
rindolf left
07:23
rindolf joined,
hypolin left
|
|||
FROGGS | morning @all | 07:23 | |
07:29
rindolf left,
rindolf joined
07:35
hypolin joined
07:37
rindolf left,
rindolf joined,
salv0 joined
07:43
rindolf left
07:44
rindolf joined
07:56
rindolf left,
rindolf joined
07:58
SamuraiJack joined
07:59
mberends joined
|
|||
sorear | mberends! \o/ | 08:00 | |
mberends | \o sorear! | ||
08:03
am0c_ joined
|
|||
sorear | :D | 08:03 | |
08:03
am0c_ is now known as am0c
|
|||
FROGGS | grondilu: github.com/tadzik/panda/issues | 08:04 | |
mberends | sorear: have you looked at rurban++'s p2 and _why++'s potion underneath it? perl11.org/p2/potion.html | ||
08:07
sitaktif joined,
rindolf left
08:08
rindolf joined
08:11
cosimo joined
|
|||
sorear | mberends: not really. | 08:11 | |
i've decided to get out of the language design/implementation game. not my cuppa | |||
FROGGS | sorear: may I ask what's your "cuppa" nowadays? | 08:12 | |
mberends | sorear: I understand. I read that you were happily writing in JavaScript nowadays. | 08:13 | |
08:15
domidumont joined
|
|||
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:17 | |
FROGGS: my current $work involves using programs to sell shoes. It's suprisingly fun. | 08:18 | ||
08:18
rindolf left,
rindolf joined
|
|||
FROGGS | sorear: I totally agree | 08:19 | |
08:22
anuby_ joined
08:23
anuby left,
DarthGandalf joined
|
|||
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 | |
" I love it when a plan comes together." | |||
08:37
domidumont left,
domidumont joined
08:39
FROGGS left
|
|||
timotimo | good day | 08:41 | |
08:47
fhelmberger joined
08:51
FROGGS joined
08:53
am0c left
08:54
census joined
08:55
am0c joined
09:04
census left
09:36
dakkar joined
09:38
cognominal joined
09:40
ObseLeTe joined
09:43
labster left
09:57
spider-mario joined
10:01
hypolin left
10:05
daxim joined
10:08
marloshouse joined
10:11
anuby_ left
10:19
REPLeffect joined
10:21
donaldh joined
10:30
FROGGS left
10:35
erkan joined,
erkan left,
erkan joined
|
|||
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 | ||
arnsholt: github.com/jnthn/nqp-jvm-prep/blob...tance.java | 10:36 | ||
10:36
dayangkun left
|
|||
arnsholt | Cool. A Java array, wrapped with a bit of logic to handle accesses | 10:37 | |
tadzik | aye | ||
10:37
FROGGS joined
|
|||
arnsholt | I think that'll fit with what I'm pondering | 10:38 | |
And Java guarantees the widths of byte, short, int and long. Even better! | 10:39 | ||
FROGGS | well, thats the job of a sane VM | 10:40 | |
arnsholt | Well, Java isn't a VM, so it could just say that it should be -at least- those sizes | 10:41 | |
FROGGS | ohh, yeah, thought you're talking about JVM | ||
arnsholt | Common Lisp for example only mandates a minimum width for its numerics | ||
masak | good forenoon, #perl6 | 10:42 | |
FROGGS | masak! \o/ | ||
10:42
REPLeffect left
|
|||
tadzik | hello! | 10:43 | |
donaldh | arnsholt: what are you pondering? | 10:44 | |
arnsholt | donaldh: Adding a buffer type to NQP | ||
donaldh | oh, it looks like VMArrayInstance reimplements a lot of what is already available in the Java collections. | ||
FROGGS | nqp: say("foobar" ~~ MAKE_REGEX("fo+")) | 10:45 | |
p6eval | nqp: OUTPUT«Could not find sub &MAKE_REGEXcurrent instr.: '' pc 46 ((file unknown):38) (/tmp/paionMTqV_:1)» | ||
arnsholt | Rakudo needs better support to implement Buf properly, and NativeCall needs better Bufs to handle blobs better | ||
jnthn | morning o/ | 10:52 | |
Or forenooning at least | |||
timotimo | got a second to merge github.com/rakudo/rakudo/pull/104 ? :) | ||
arnsholt | Just in the nick of time for forenoon =) | ||
FROGGS | hi jnthn | 10:53 | |
arnsholt | A timo-commit to my repo =D | 10:54 | |
timotimo | untested, alas | ||
though i imagine with in-proc sockets one could build a bit of testing code without even having to make multiple processes | |||
arnsholt | I think that gives timotimo++ the distinction of first-ever committer that isn't me to one of my repos =) | ||
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 :) | ||
jnthn | timotimo: I think it would be more general to put the (...) parsing where STD does - in typename: 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 | ||
jnthn | Well, then it'll catch it everywhere <typename> is used | 10:57 | |
Also it's in the right place for the luck person who gets to implement the feature ;) | |||
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]) | ||
timotimo | oh, right, because it's not an out parameter | 10:58 | |
i'll fix it real quick | |||
arnsholt | And you're nulling the values, rather than setting them to $value =) | ||
Do $val[0] = $value instead | |||
timotimo | my only excuse is that it's late :) | 10:59 | |
er, it was when i copypasted that code | |||
10:59
cognominal left
|
|||
arnsholt | I made some brainos as well, so you're excused I think =) | 10:59 | |
10:59
REPLeffect joined
|
|||
timotimo | i ended up copypasting the get function and changed every get to set ... in the get function >_< | 10:59 | |
arnsholt | =D | ||
Classic copy-pasta | |||
donaldh | jnthn: are we committed to BCEL or could we consider alternatives? | 11:00 | |
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. | ||
jnthn | donaldh: Also, I don't much feel like re-writing JASTToJVMBytecode.java...it wasn't much fun to do in the first place ;) | ||
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 gist.github.com/arnsholt/4963237 (no rush to comment though, won't have much time 'till over the week-end I think) | ||
donaldh | jnthn: asm.ow2.org/ | 11:03 | |
jnthn: I'll keep working on BCEL for now but I might also try an ASM port of JASTToJVMBytecode.java on a branch. | 11:04 | ||
11:05
cognominal joined
|
|||
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
REPLeffect left
|
|||
jnthn | donaldh: The other BCEL usage is in P6opaque | 11:07 | |
donaldh | jnthn: that looks fairly hairy ;-) | 11:09 | |
11:10
ObseLeTe left
|
|||
jnthn | donaldh: Yeah, it's generating a backing class | 11:14 | |
donaldh | nice | 11:15 | |
timotimo | jnthn: good tip, it works well now. | ||
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 | ||
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
|
|||
FROGGS | no, it might not since your changed the grammar | 11:20 | |
timotimo | might not what? fail to parse? but if it does parse it would NYI immediately | 11:21 | |
FROGGS | timotimo: everytime you change the grammar it is possible that there is a piece of code that is unparseable then.... | 11:23 | |
11:23
cognominal left
|
|||
daxim | I don't like the location where panda bootstrap put the library files (~/.perl6), how do I override that? | 11:24 | |
11:25
REPLeffect left
|
|||
timotimo | FROGGS: with this change, i feel somewhat confident that it would work for any input that was parsable before :D | 11:25 | |
tadzik | daxim: I don't think panda puts stuff there anymore | 11:26 | |
not since we got CUSTOM_LIB and all that | |||
daxim | I'm running rakudo 2012.12 and panda from github HEAD | ||
tadzik | hm | ||
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 | ||
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/.… | ||
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:31 | |
11:32
cognominal joined
|
|||
daxim | yes, I have that set: paste.scsys.co.uk/231735 bootstrap already put stuff into ~/.perl6, looks like panda itself and its deps | 11:32 | |
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 | ||
2012.12 sounds fresh enough for %*CUSTOM_LIB and all that | 11:34 | ||
daxim: above everything, panda should respect DESTDIR if you set that | |||
daxim | then how do I set DESTDIR? | ||
tadzik | so the install location is always overridable; if not, then it's a bug | ||
DESTDIR=./foolib panda install Stuff | 11:35 | ||
that ought to work | |||
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? | ||
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 | ||
tadzik | that sounds veery wrong. There is no ".perl6" in panda these days, as I see it | ||
are you sure it's github.com/tadzik/panda, master, up-to-date? | |||
moritz | r: say Int("42").WHAT | 11:39 | |
p6eval | rakudo 5dfb73: OUTPUT«Int()» | ||
daxim | confirmed. now let me paste the follow-up problem | ||
tadzik | go ahead | 11:40 | |
daxim | paste.scsys.co.uk/231736 | ||
tadzik | r: say @*INC.perl | ||
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… | ||
daxim | even though I changed the installation directory, it still assumes ~/.perl6 at run time | ||
tadzik | /home/daxim/.perl6/2012.12/lib | 11:41 | |
that's odd | |||
timotimo | All tests successful. - now my branch can be merged :) | ||
tadzik | or may be that custom-lib put that there | ||
moritz? | |||
FROGGS | timotimo++ | ||
11:41
REPLeffect joined
|
|||
tadzik | daxim: yeah, most puzzling | 11:41 | |
daxim: I assume you don't set PERL6LIB yourself in any way? | |||
daxim | echo $PERL6LIB is empty | 11:42 | |
moritz | tadzik: it does that as a fallback if the site dir isn't writable | ||
tadzik | ah, there we are | 11:43 | |
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 | ||
11:44
xenoterracide left
|
|||
moritz | so you have to set PERL6LIB to $DESTDIR/lib ? | 11:44 | |
tadzik | I think so | ||
moritz | or to $DESTDIR? | ||
moritz not sure | |||
daxim | aha, let me try | ||
tadzik | /lib | 11:45 | |
daxim | yes, with lib | ||
tadzik | but hm, you say moritz that CUSTOM_LIB will fallback to /home/user/.perl6/version, right? | ||
ah, ok | |||
I understand | |||
11:45
REPLeffect left
|
|||
daxim | gosh, there's *still* a ~/.perl6 dir | 11:46 | |
it has a ~/.perl6/2012.12/panda/projects.json file in it | |||
moritz | tadzik: yes, where $version is really the whole git-describe string | ||
just for releases it simpliefies to the release version | |||
tadzik | daxim: ah, yes. It usually goes to the site dir too :/ | 11:47 | |
I guess you can't (easily) override that | |||
moritz had an apicoectomy on two teeth today | 11:48 | ||
tadzik | github.com/tadzik/panda/blob/maste.../panda#L96 | ||
you can mangle that though | |||
perhaps we should make it configurable too | |||
PANDADIR=somewhere panda make sandwich or such | |||
but no, that should just work | |||
hrm | |||
tadzik hugs moritz | 11:49 | ||
11:49
xenoterracide joined
|
|||
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 | ||
it's not fixing the problem though (yet) | 11:50 | ||
unless the bootstrap script will modify the binary it's installing | 11:51 | ||
moritz | it could. | ||
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? | ||
I can take a look at that today or tomorrow | |||
daxim | "see GNU autotools" | 11:52 | |
tadzik | think of your perfect... ah | ||
11:52
REPLeffect joined
|
|||
tadzik | that's sort of a different story, I think | 11:52 | |
you fire autotools and install some binaries. You don't install autotools themselves for later use | |||
11:53
integral joined,
integral left,
integral joined
|
|||
tadzik | but I guess bootstrap.pl can be the autotools here, and panda being panda | 11:53 | |
11:53
PerlJam joined
|
|||
daxim | ok | 11:54 | |
tadzik | I agree that the experience should be improved | 11:55 | |
if I myself consider panda fragile and confusing, that means stuff is bad :) | |||
moritz | but it's a healthy perception | 11:56 | |
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 | ||
tadzik | gotcha :) | ||
so I can expect you on the Polish Perl Workshop? :) | |||
daxim | I'll know for certain next week | ||
tadzik | awesome | ||
seen brianwisti | 12:00 | ||
dalek | kudo/nom: 9c59a13 | (Timo Paulssen)++ | src/ (2 files): turn LTA error for coercive type declarations into NYI. |
||
moritz | timotimo: thank's for your patches. I --squash'ed them all into one and applied | ||
12:00
SmokeMachine joined
|
|||
timotimo | that was acceptable | 12:01 | |
no need to have embarassing brainos all over the commit history :) | |||
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!" | |||
moritz | and it's only one deletion and two inserts that way :-) | ||
but less karma, so I need to timotimo++ manually :-) | |||
timotimo | haha, all right :) | 12:02 | |
moritz | funny, the pull request on github still shows "applies cleanly" | 12:03 | |
12:04
stephen joined,
stephen is now known as Guest13313
12:05
Guest13313 left
12:07
cognominal left,
census joined
|
|||
census | Hi! Has anybody used EM algorithm before? | 12:07 | |
12:09
cognominal joined
|
|||
tadzik | EM? | 12:09 | |
census | Expectation-Maximization algorithm | 12:10 | |
moritz | elektromagnetic? | ||
tadzik wonders if he knows the Polish name of it | 12:12 | ||
moritz | wikipedia only has the Russian name :-) | ||
tadzik | but it doesn't look familiar | ||
moritz hasn't used it either | 12:13 | ||
the german wiki page for EM algorithm has visual example data of eruptions of the Old Faithful geyser | 12:15 | ||
so now I'm reading about that one | |||
census | interesting . . . | 12:16 | |
moritz | I really have to visit yellowstone at some point | ||
and Iceland | 12:17 | ||
timotimo | hm, i think i remember expectation maximization from somewhere. maybe school. | ||
12:18
cognominal left
|
|||
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
REPLeffect left
|
|||
census | i thought EM was common in CS and machine larning | 12:20 | |
learning | |||
timotimo | oh, no, that was university | ||
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
12:30
shinobicl joined
|
|||
dalek | p: 6f3692d | jnthn++ | src/HLL/Grammar.pm: Port EXPR to NQP. Much code from kboga++. |
12:32 | |
p: 866304d | jnthn++ | src/HLL/Compiler.pm: Toss long-broken --dumper option and related code. Looking at the code, it almost certainly hasn't worked for a long time. |
|||
12:35
cognominal__ joined
12:36
cognominal left
12:37
REPLeffect joined
|
|||
dalek | p: 688763c | jnthn++ | src/HLL/Grammar.pm: Toss outdated comment. |
12:38 | |
jnthn | HLL::Grammar is free of Q:PIR now \o/ | ||
moritz | \o/ | ||
Harzilein | where is Q:somelang explained btw? | 12:39 | |
12:40
cognominal__ left
|
|||
timotimo | in the nqp documentation? :P | 12:41 | |
12:41
rindolf left,
rindolf joined
|
|||
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:41 | |
12:43
cognominal__ joined
|
|||
Harzilein | jnthn: well, niecza also has Q:CgOp and i was interested in reading up on that. | 12:47 | |
dalek | p-jvm-prep: bb49a80 | jnthn++ | lib/QAST/JASTCompiler.nqp: Fix non-scanning. |
12:55 | |
p-jvm-prep: 6375842 | jnthn++ | t/nqp/45-smartmatch.t: We now pass 45-smartmatch.t. |
|||
FROGGS | (EXPR to NQP)++ | 13:01 | |
kboga++ | |||
13:08
domidumont left
13:09
domidumont joined
|
|||
moritz | seems there are three Q:PIR groups left | 13:12 | |
FROGGS | well, if I could read pir I would try to translate that, but ... | 13:15 | |
pir is like asm to me | |||
moritz | in HLL::Compiler, method lineof does a cache lookup, and if it fails, a binary search | 13:16 | |
to map an index into a string into a line number | 13:17 | ||
13:17
dayangkun joined
13:18
tomaw joined
|
|||
FROGGS | moritz: hmm, I may give it a try after my "current project" | 13:20 | |
13:21
woosley1 joined
13:28
ObseLeTe joined
13:30
skids left
13:34
stevan_ joined
13:37
mtk left
|
|||
census | rindolf: I'm sorry your friend reset your connection | 13:40 | |
13:40
toebu joined
|
|||
rindolf | census: what? | 13:41 | |
census: where? | |||
census | rindolf [~Shlomi@bzq-109-64-185-17.red.bezeqint.net] has quit [Read error: Connection reset by peer] | ||
rindolf | census: are you jumping into conclusions? | ||
13:41
toebu left
|
|||
rindolf | census: yes, it's probably due to lost packets. | 13:41 | |
census: I didn't see it naturally. | |||
census: IRC disconnections happen (surprise!). | |||
census | oh ok, i'm sorry you experienced that. that is all. | 13:42 | |
13:42
domidumont left
|
|||
mberends | peer is not rindolf's friend | 13:42 | |
FROGGS | (peer is a first name in northern countries) | ||
rindolf | use.perl.org/use.perl.org/~Mark+Lei...rnal/35016 - sucks - it's down. :-( | ||
13:42
toebu joined
13:43
domidumont joined
|
|||
rindolf | web.archive.org/liveweb/http://use....rnal/35016 - nothing here either. | 13:43 | |
rindolf hunts and kills Pudge. | |||
13:43
daxim_ joined
|
|||
rindolf | web.archive.org/web/*/http://www.shlomifish.org/ - everything from 2004. | 13:44 | |
moritz | FROGGS: isn't the first name spelled "Per"? | 13:45 | |
rindolf | web.archive.org/web/20041013231902/...ifish.org/ | ||
Wow, what great CSS skills I had back then! | |||
masak | -me .oO( friend is not rindolf's peer ) | ||
masak .oO( friend is not rindolf's peer ) | |||
13:46
mtk joined
|
|||
masak | FROGGS: I can't recall ever seeing the name spelled "Peer", though. only "Per". | 13:46 | |
well, there's "Peer Gynt", but he's fictional. | 13:47 | ||
13:47
daxim left
|
|||
mberends .oO( any peer of rindolf is my peer) | 13:47 | ||
timotimo | a peer of my peer is my peer. | ||
13:48
toebu_ joined
|
|||
mberends | to peer or not to peer | 13:48 | |
mberends peers at #perl6 | |||
FROGGS | masak: my friend's name is Lars Peer Davidson | ||
moritz | and when he talks to another guy named Peer, it's P2P :-) | 13:49 | |
FROGGS | *gg* | ||
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:50 | |
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
toebu left
|
|||
FROGGS | female Lords in rindolf's imagination? | 13:52 | |
huh | |||
rindolf | FROGGS: are you British? | 13:53 | |
masak | FROGGS: is your friend Norwegian? | ||
13:53
woolfy joined
|
|||
FROGGS | rindolf: no | 13:53 | |
masak: no | |||
rindolf | In .uk though, females can become dames which is the female equivalent of a knight. | ||
FROGGS: OK. | |||
mberends | woolfy ! | ||
woolfy | Martin...! | 13:54 | |
mberends | woolfy ! woolfy ! (sorry masak) | ||
woolfy | Please ignore me, just "listening" to the wizards of Perl 6... | ||
mberends ignores | |||
woolfy | :-) | ||
FROGGS | masak: some ancesters might be from there, be he isnt | ||
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 :) | ||
rindolf | FROGGS: OK. | 13:57 | |
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. | 13:58 | ||
FROGGS .oO( first perl 6 rpg made by rindolf? ) | 14:00 | ||
masak | woolfy: oh, a self-confessed lurker! welcome ;) | 14:03 | |
pmichaud | I'm lurkng also. :) | ||
masak | pmichaud: yeah, it's not like big chunks of Rakudo source code are yours, or something :P | ||
woolfy | Thanks, masak! | ||
rindolf | FROGGS: it's not an RPG. | ||
FROGGS: it's not even an adventure game. | 14:04 | ||
FROGGS | rindolf: not yet :P | ||
masak is not a wizard, more like a warrior/archer: strangelyconsistent.org/blog/perl-6-is-my-mmorpg | |||
FROGGS | masak: the link to the learning curve image is borken | 14:06 | |
14:06
daniel-s joined
14:07
toebu_ is now known as toebu
|
|||
woolfy Masak is a wizard in my eyes | 14:08 | ||
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). | ||
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:12 | ||
FROGGS | woolfy: ya, it's simply not enough to have the standard book of spells grade one in the shelf :o) | 14:13 | |
PerlJam | heh | 14:14 | |
14:14
PacoAir joined
|
|||
mberends | woolfy has the world's largest collection of Perl spells on the shelves, srsly | 14:16 | |
14:16
PacoAir left
14:17
PacoAir joined
|
|||
woolfy | And hoping to one day... having a lot of Perl 6 books added to those shelves! | 14:17 | |
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: web.archive.org/web/20090718140949/...gCurve.jpg | ||
moritz: true. I've seen archers that were sufficiently advanced as to be indistinguishable from wizards ;) | 14:19 | ||
FROGGS | hehe | 14:20 | |
nice one | |||
masak | r: say "gonna show woolfy some spells :)" | 14:21 | |
p6eval | rakudo 9c59a1: OUTPUT«gonna show woolfy some spells :)» | ||
masak | r: .say for 10 ... 1; say "LIFTOFF!" | ||
p6eval | rakudo 9c59a1: OUTPUT«10987654321LIFTOFF!» | ||
14:21
Psyche^ joined
|
|||
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.333333One: 1 -- look, no loss of precision!» | ||
pmichaud | r: .say for (10 ... 1), "LIFTOFF"; | ||
p6eval | rakudo 9c59a1: OUTPUT«10987654321LIFTOFF» | ||
14:23
ObseLeTe left
|
|||
nwc10 | $ perl -E 'my $third = 1/3; say "A third: $third"; say "One: @{[$third * 3]} -- look, no loss of precision!"' | 14:24 | |
A third: 0.333333333333333 | |||
One: 1 -- look, no loss of precision! | |||
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» | ||
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 | ||
s/it$/what they do/ | |||
masak | nwc10: troo. | ||
pmichaud | r: my $third = 1/3; say "A third: ", $third; #how about this? | ||
p6eval | rakudo 9c59a1: OUTPUT«A third: 0.333333» | ||
masak | nwc10: do you have a good example, ooc? | ||
pmichaud | er... hmm | ||
r: my $third = 1/3; say "A third: ", $third.gist; #how about this? | |||
p6eval | rakudo 9c59a1: OUTPUT«A third: 0.333333» | ||
pmichaud | r: my $third = 1/3; say "A third: ", $third.Str; #how about this? | ||
p6eval | rakudo 9c59a1: OUTPUT«A third: 0.333333» | ||
masak | pmichaud: we've hidden the rattiness pretty deep ;) | ||
nwc10 | masak: no, sorry. I'm not sure where the best place to get the IEEE stuff to break down is | ||
pmichaud | masak: is that a change from a year ago or so? | 14:26 | |
14:26
Patterner left,
Psyche^ is now known as Patterner
|
|||
masak | pmichaud: think so. | 14:26 | |
pmichaud: it's for people who don't know and don't care about Rats. | |||
pmichaud | r: my $third = 1/3; say $third.perl | 14:27 | |
p6eval | rakudo 9c59a1: OUTPUT«1/3» | ||
pmichaud | \o/ | ||
FROGGS | r: my $third = 1/3; say $third * 3 | ||
p6eval | rakudo 9c59a1: OUTPUT«1» | ||
masak learns that Mendeleev was inspired by playing solitaire when inventing the periodic table | |||
Wikipedia++ | |||
FROGGS | r: my $third = 1/3; say $third.Str * 3 | 14:28 | |
p6eval | rakudo 9c59a1: OUTPUT«0.999999» | ||
FROGGS | coo | ||
l | |||
masak: well, dont trust wikipedia blindly | |||
masak | FROGGS: who said anything about trusting Wikipedia blindly? :) | 14:29 | |
FROGGS | :o) | ||
14:33
PerlJam left,
p6eval left,
kaare_ joined,
PerlJam joined
14:34
Util joined
|
|||
masak | welcome back, feather. | 14:36 | |
14:37
pmurias joined
14:38
[Coke] joined
14:39
p6eval joined,
ChanServ sets mode: +v p6eval
14:40
benabik left,
domidumont left
|
|||
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:40 | |
arnsholt | If all you have is GCed memory, you're C interop is going to be hard anyways | 14:41 | |
s/you're// | |||
14:42
domidumont joined
|
|||
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:42 | |
pmurias | I can allocated none GCed memory under V8, but I can't turn GCed memory into none GC one | 14:43 | |
s/allocated/allocate/ | |||
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? | ||
s/that are/ | 14:46 | ||
pmurias can't type today | |||
arnsholt | Yeah. Except the buffer stuff, this is all motivated by NativeCall/Zavolaj | ||
The buffer stuff is in there because I need it for other NativeCall things, even though it's a bit different | 14:47 | ||
Does that answer your concerns? | 14:51 | ||
14:52
woosley1 left
|
|||
pmurias | arnsholt: yes, if the adopted disown object are explicitly allocated in non GCed memory it seems sane | 14:53 | |
* objects | |||
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() | ||
which might not be the case for all of them | |||
arnsholt | Well, non-pointer things are marshalled to natively typed stuff, which don't need special handling | 14:59 | |
14:59
skids joined
|
|||
arnsholt | This is only for pointer-typed stuff | 14:59 | |
timotimo | hm, should i give a NYI for this here, too? | 15:01 | |
r: my Hash{Any} %a; | |||
p6eval | rakudo 9c59a1: OUTPUT«===SORRY!===Type 'Hash' is not declaredat /tmp/_gShenxJjD:1------> my Hash⏏{Any} %a;Malformed myat /tmp/_gShenxJjD:1------> my Hash⏏{Any} %a; expecting any of: scoped declarator»… | ||
timotimo | oh, huh | 15:02 | |
unfortunately, i haven't yet looked at what exactly the { } do after a typename | |||
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» | ||
moritz | r: my %h := Hash[Int].new; %h{3} = 4; say %h.perl | ||
p6eval | rakudo 9c59a1: OUTPUT«("3" => 4).hash» | ||
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» | ||
moritz | r: my %h{Int}; %h{42} = 'x'; say %h.perl | ||
p6eval | rakudo 9c59a1: OUTPUT«(42 => "x").hash» | ||
timotimo | i was wondering. there's a rule in STD.pm6 where you can have { ... } in a typename | ||
TimToady | it's a WHENCE, I think | 15:07 | |
moritz | it's for the MyClass.new(:a(49), SuperClass{ a => 23 } ) thing, right? | ||
TimToady | yes, an "autoviv closure" too | 15:08 | |
timotimo | ah, i see. | ||
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 | ||
daxim_ | is this in the book? | ||
moritz | that's pretty useful | ||
daxim_: no | 15:10 | ||
arnsholt | Yeah. I debugged a friend's Python program by knowing that Python doesn't thunk default values in sigs | ||
timotimo | indeed. | 15:11 | |
sometimes that is used as a "trick" to have static per-method variables | |||
which will probably make many newbies go: o_O | |||
arnsholt | Eww. =) | ||
moritz wonders if default values are documented on doc.perl6.org somewhere | |||
oh, it already does explain it | 15:12 | ||
"Default values can depend on previous parameters, and are (at least | |||
notionally) computed anew for each call" | |||
in the docs for type Signature | |||
TimToady | it's a good thing someone's been working on constant folding... | 15:13 | |
jnthn | I think if you do sub foo($x = 42) { } then we already avoid the closure | 15:14 | |
moritz | I'm pretty sure we avoid it, yes | 15:15 | |
r: my $sig := :($ = 42); say $sig.params[0].default | |||
p6eval | rakudo 9c59a1: OUTPUT«Block.new()» | ||
moritz | r: my $sig := :($ = 42); say $sig.params[0].default() | ||
p6eval | rakudo 9c59a1: OUTPUT«Block.new()» | ||
moritz | :( | ||
r: my $sig := :($ = 42); say $sig.params[0].default()() | |||
p6eval | rakudo 9c59a1: OUTPUT«42» | ||
moritz | seems we don't anymore :( | 15:16 | |
FROGGS | we need way more tests | ||
moritz could try to fix that | |||
FROGGS | it is too easy to break things you dont test | 15:17 | |
TimToady | that's because it's too easy to test things you don't break :) | 15:18 | |
FROGGS | it would be awesome to have ppl write the tests who actually dont know how it is implemented | 15:19 | |
15:22
tipdbmp joined
|
|||
tipdbmp | How come JSON::Tiny's from-json cannot parse 'modules.perl6.org/proto.json'? =) | 15:23 | |
FROGGS | because 'modules.perl6.org/proto.json' is an url? | 15:24 | |
(joke) | |||
tadzik | :D | 15:26 | |
FROGGS | tipdbmp: you want it to automatically download and parse that file? you get my +1 for that :o) | 15:27 | |
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:28 | |
FROGGS | .oO( a shoe-o-scope? ) |
15:29 | |
TimToady | we're selling...IR Cloggers! | ||
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
|
|||
moritz | JSON::Tiny will never automatically download anything | 15:30 | |
first, it has JSON in the name, not "HTTP". Second, it has "Tiny" in the name | 15:31 | ||
third, automatically downloading stuff is a terrible idea security wise | |||
fourth: separation of concerns | 15:32 | ||
TimToady | fifth: moritz doesn't like it | ||
FROGGS | .oO( JSON::Tiny.from-json( fetch => url ) ) <--- tiny code to write |
||
masak | moritz++ # doesn't like it | 15:33 | |
moritz | still violates the "tiny" and the "separation of concerns" | ||
masak .oO( the separation of tiny concerns ) | |||
tadzik | JSON::Tiny.from-json( fetch(url) ) is as tiny | ||
and saner | |||
moritz | also note that from-json is a sub, not a method | ||
"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". | ||
moritz | quoteby John Carmack | ||
FROGGS | ohh, (John Carmack)++ | ||
nwc10 | masak: is it in two halves - the logger, and the web publishing side? | ||
FROGGS | now I have to agree too :/ | ||
moritz | and colomon++ for retweeting that quote | 15:35 | |
masak: mostly: doing it | |||
masak: and for the web frontend, performance is a concern | |||
nwc10 | so, start with the actual logger? | ||
and run a Rakudo logger in parallel with a perl 5 logger | |||
until the diffs are reliably zero :-) ? | |||
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 ? | ||
moritz | nqp: 1 && say(42) | ||
p6eval | nqp: OUTPUT«42» | ||
FROGGS | nqp: say(1 && 2) | ||
p6eval | nqp: OUTPUT«2» | ||
15:37
CharellKing1 left
|
|||
FROGGS | nqp: say(1 && 2 || 3) | 15:37 | |
p6eval | nqp: OUTPUT«2» | ||
moritz | nqp: 1 || say(42) | ||
p6eval | nqp: ( no output ) | ||
moritz | nqp: 0 && say(42) | ||
p6eval | nqp: ( no output ) | ||
moritz | yes, they do | ||
PerlJam | doh! I coulda done that :) | ||
TimToady | ayup | ||
FROGGS | minions++ | 15:38 | |
PerlJam | wizards++ ;) | ||
moritz | evalbots++ | ||
nwc10 | (*reliable* minions)++ | ||
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. | ||
FROGGS | hehe | ||
TimToady++ | 15:39 | ||
see ya | |||
15:39
FROGGS left
|
|||
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:39 | |
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. | ||
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 | |
census: no offense :) | |||
TimToady | I vote census Most Improved in that regard | ||
PerlJam | a single fish would last me about half a day unless it was a really big fish. | ||
tadzik | or a very small man | 15:43 | |
TimToady | a fish that would last me all die might well kill me due to allergies... | ||
*day | |||
gah, fraudian typos | 15:44 | ||
huf | depends on how you use it | ||
geekosaur | PerlJam, ever seen a tuna? | ||
huf | you all assume you'd eat the fish | ||
PerlJam | huf: bait? | ||
huf | or just sit on it, or something | ||
TimToady | I don't want a bait that lasts all day | ||
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. | ||
:P | |||
TimToady | old cabbage is real food now, is it? | ||
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 | ||
huf | at least it's wiser and less prone to panic | ||
TimToady | but yes, if I were the bait, I'd prefer to last at least a day | ||
huf | maybe you are, and you did. | 15:47 | |
TimToady | take me to your leader | ||
PerlJam | sounds like it could be the beginning of a good AFJ to me. | 15:48 | |
masak | tadzik: so, I guess no-one told you what Soylent Green is actually made of, huh? :P | 15:49 | |
15:54
gdey joined
|
|||
tadzik | what's Soylent Green? | 15:58 | |
huf | food | ||
a bit like cram | |||
TimToady | kurumono desu ka? | ||
tipdbmp | rakudo: sub not-working { say "'not-' not allowed as a sub name prefix?"; }; not-working(); | ||
p6eval | rakudo 9c59a1: OUTPUT«===SORRY!===Undeclared routine: working used at line 1» | ||
TimToady | apologies for a multilingual pun | 15:59 | |
neither of which is English | 16:01 | ||
huf | you've lost me | ||
TimToady | Kuru is from Fore, a New Guinian language | 16:02 | |
or it means "comes" in Japanese | |||
so "Is it something that comes?" | |||
census | Thank you TimToady!! :) | 16:03 | |
16:03
FROGGS joined
|
|||
TimToady apologizes for his prion-infested brane | 16:03 | ||
census | masak: No offense taken!! You are infinitely nicer than #perl | ||
FROGGS | hi all \o/ | ||
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 | |
16:06
bluescreen10 joined
|
|||
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» | ||
masak | tadzik: the reference is to an old Harry Harrison novel: 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. | ||
moritz | r: my $param := :($ = 42).params[0]; say nqp::getattr(nqp::p6decont($param), Parameter, '$!default_value') | ||
p6eval | rakudo 9c59a1: OUTPUT«42» | ||
16:07
gdey left
|
|||
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. | ||
moritz: there could be a consistency-based argument for keeping it that way. | 16:08 | ||
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:10 | |
tipdbmp | I don't know. | 16:12 | |
census | Timtoday: I just wish you had some pull with #perl to get me unbanned there! :) | ||
TimToady | I cannot be everyone's mother. | 16:13 | |
census | (and that you would not mind using that pull :) | ||
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
ggoebel_ left
|
|||
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 | ||
census | not at all!! | ||
I try it out in the hopes that the ban is over | |||
geekosaur | which makes me think apeiron is not quite as swift as he thinks he is | ||
census | Since nobody told me when it expired | ||
How am I supposed to know when I am unbanned? | |||
16:14
gdey joined
|
|||
PerlJam | census: keep trying to join until it works :) | 16:15 | |
census | PerlJam: Apparently that only gets me rebanned | ||
geekosaur | he also really doesn't like people who autorejoin, and has admitted this | ||
so I think you just have to stop trying for a wek or so | |||
census | I do not do autorejoin. I do not know what that means | ||
And I don't try that often. | 16:16 | ||
geekosaur | maybe you're not autorejoining since you said you try it periodically | ||
census | I try like once every few days | ||
geekosaur | you're trying often enough, apparently | ||
more 0often than that | |||
census | Aperion will not tell me what is "enough" | ||
16:16
Chillance joined
|
|||
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? | ||
Because I don't want to magically try in one week and then get rebanned | 16:17 | ||
Aperion will not tell me ANYTHING ever | |||
TimToady | depends on whether you've flipped the bozo bit | ||
census | I just want to sit in #perl without talking. | ||
moritz | wow, the ban list in #perl is quite long | ||
census | I want to learn by osmosis | ||
Yes, aperion loves to ban people | |||
I've been making friends with some of the banned people | |||
geekosaur | I'm not saying exactly | ||
apeiron is not a computer | 16:18 | ||
awwaiid | maybe you should start #perlbanned :) | ||
census | I know! :) | ||
Aperion just bans but does not say for how long or why | |||
Just change #perl to #aperion and friends | |||
like #foxandfriends | |||
huf | why are you still doing this? | ||
census | because i want to be unbanned | 16:19 | |
TimToady | this is starting to get a little OT here | ||
huf | talk to an op | ||
and not here. | |||
masak .oO( "#perlbanned. You will never find a more wretched hive of scum and villainy. We must be cautious." ) | |||
census | I'm sorry TimToady | ||
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." ) |
||
PerlJam | :) | 16:21 | |
census | :) | ||
TimToady | census: it's not so much the topic, but the perseveration, I think... see en.wikipedia.org/wiki/Perseveration | ||
masak .oO( <pumpkin> Perl 6, I am your father. <perl6> nooooooooooo ) | 16:22 | ||
TimToady: "...doing the same thing over and over again and expecting different results..."? | 16:23 | ||
TimToady | well, yes <blush> | 16:24 | |
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 | ||
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 :) | ||
TimToady | well, I have no idea if I'm banned on #perl or not... | 16:26 | |
huf | :) | ||
masak | :P | ||
PerlJam | census: another data point: Short sentences or phrases punctuated with newline that appear "rapidly" are likely to pique #perl's ire. | ||
huf | "daddy cant come into the couch fort, it's kids only" | ||
16:26
kaleem left
|
|||
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" | ||
p6eval | rakudo 9c59a1: OUTPUT«hello» | ||
census | thank you perljam | 16:27 | |
masak | r: say "the goggles, they do nothing!" | ||
p6eval | rakudo 9c59a1: OUTPUT«the goggles, they do nothing!» | ||
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:28 | |
oh wait, it was com::foo::Blah:from<java>, eh? | 16:29 | ||
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? | ||
I'm about to implement this for moe is why I ask :) | |||
(about as in a 1-ish-week period) | 16:31 | ||
moritz | I think so, yes | ||
awwaiid | k. I'll go with that. | ||
thanks | |||
moritz | though of course use ::('com.foo.Blah'):from<java> is also thinkable | ||
though not very handy, if you ask me | |||
FROGGS | n: my @foo = ("a+b", "b+c"); say "aaaabbbbbcaaab" ~~ /^<@foo>+/ | 16:35 | |
p6eval | niecza v24-23-g0520c7c: OUTPUT«「aaaabbbbbcaaab」» | ||
16:37
SamuraiJack left
|
|||
masak | FROGGS: wow. | 16:38 | |
I... wow. | |||
FROGGS | ? | ||
that's niecza | |||
jnthn | Is it LTMing those? | ||
masak | did you just *merge* two DFAs!? | ||
16:38
SamuraiJack joined
|
|||
moritz | masak: isn't that what proto regexes do all the time_ | 16:39 | |
s/_/?/ | |||
jnthn | Prety much :) | ||
FROGGS | jnthn: yes, by default. but I'm not sure if the algorithm perfect | ||
masak | I know, but these are first-class values. | ||
jnthn | *pretty | ||
FROGGS | n: say "abcde" ~~ /@(<a bc b cde>)+/ | 16:40 | |
lee_ | !? | ||
p6eval | niecza v24-23-g0520c7c: OUTPUT«「abc」» | ||
moritz | masak: it's all code and state machines | ||
masak | n: my @foo = /a+b/, /b+c/; say "aaaabbbbbcaaab" ~~ /^<@foo>+/ | ||
p6eval | niecza v24-23-g0520c7c: OUTPUT«「aaaabbbbbcaaab」» | ||
masak | lee_: !! | ||
lee_ | mistype :P ignore me! | ||
masak | ...another lurker... :) | ||
FROGGS | jnthn: I my last example would use NFA, it should match the entire string, right? | ||
TimToady | n: say "abcde" ~~ /<@(<a bc b cde>)>+/ | ||
masak | lee_: hi! :D | 16:41 | |
p6eval | niecza v24-23-g0520c7c: OUTPUT«「abc」» | ||
16:41
cognominal__ left
|
|||
masak | moritz: say what you like, I think that's totally awesome. :D | 16:41 | |
jnthn | n: say "abcde" ~~ /<@(<a b bc cde>)>+/ | ||
p6eval | niecza v24-23-g0520c7c: OUTPUT«「abc」» | ||
FROGGS | TimToady: first "a", then "bc" because "bc" > "b", then nothing there that start with "d" | ||
TimToady | I just said that | 16:42 | |
moritz | masak: it is | ||
TimToady | ah | ||
FROGGS | n: say "abcde" ~~ /||<@(<a b bc cde>)>+/ | ||
p6eval | niecza v24-23-g0520c7c: OUTPUT«「abc」» | ||
masak | FROGGS: I love it how you actually explain LTM to TimToady... :P | ||
FROGGS | n: say "abcde" ~~ / || @(<a b bc cde>)+/ | ||
p6eval | niecza v24-23-g0520c7c: OUTPUT«「abc」» | ||
FROGGS | masak: *g* | ||
hmm, weird | |||
moritz | masak: and the fact that niecza does it made one of the candidates for the p6cc2011 quite pointless :-) | ||
jnthn | n: say "abcde" ~~ /<@(<a b bc? cde>)>+/ | 16:43 | |
p6eval | niecza v24-23-g0520c7c: OUTPUT«「abc」» | ||
masak | moritz: which one, ooc? | ||
moritz: also, I don't know if "pointless" is the word you're looking for... :) | |||
jnthn | n: say "abcde" ~~ /<@(<a b {}bc? cde>)>+/ | ||
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… | ||
masak | just because there are short, elegant solutions... | ||
FROGGS | r: say "abcde" ~~ / || @(<a b bc cde>)+/ | ||
p6eval | rakudo 9c59a1: OUTPUT«「abcde」» | ||
FROGGS | there we go | ||
jnthn | r: say "abcde" ~~ / | @(<a b bc cde>)+/ | 16:44 | |
p6eval | rakudo 9c59a1: OUTPUT«「abc」» | ||
16:44
domidumont left
|
|||
moritz | r: say 'abcde' ~~ / | @(<a ab abc>) / | 16:44 | |
p6eval | rakudo 9c59a1: OUTPUT«「abc」» | ||
FROGGS | jnthn: NFA would try more combinations? | ||
16:47
cognominal__ joined,
kaleem joined
|
|||
TimToady | nr: say "abcde" ~~ / | [@(<a b bc cde>)]+»/ | 16:49 | |
p6eval | niecza v24-23-g0520c7c: OUTPUT«「abcde」» | ||
..rakudo 9c59a1: OUTPUT«「cde」» | |||
masak | FROGGS: NFAs don't so much "try combinations" as "exist in a superposition of all combinations possible at this point". | ||
TimToady | nr: say "abcde" ~~ / | @(<a b bc cde>)+»/ | 16:50 | |
p6eval | niecza v24-23-g0520c7c: OUTPUT«「abcde」» | ||
..rakudo 9c59a1: OUTPUT«「cde」» | |||
TimToady | nr: say "abcde" ~~ / | <@(<a b bc cde>)>+»/ | ||
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… | ||
..rakudo 9c59a1: OUTPUT«#<failed match>» | |||
TimToady | wow | 16:51 | |
masak | FROGGS: if you haven't come upon swtch.com/~rsc/regexp/regexp1.html, I can heartily recommend it. it's enlightening. | ||
TimToady | I think I see about three bugs there | ||
masak | TimToady: I don't, so feel free to enumerate them. | 16:52 | |
I see that Niecza and Rakudo differ on the first one. | |||
TimToady | well, n and r disagree on the first | ||
masak | :) | ||
TimToady | and neither works on the second | ||
masak | what's that » doing there? | ||
word boundary, right? | 16:53 | ||
TimToady | nod | ||
forcing backtracking | |||
masak | oh! | ||
TimToady | which n does but r doesn't for the literals | ||
masak | so... Niecza is right on the first one? | ||
TimToady | and neither seems to work for the regex forms | ||
yes, because nothing committed to the current LTM inside the @ | 16:54 | ||
masak submits rakudobug | |||
that's one. | |||
"neither works on the second" may just be NYI. | |||
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 :-) | ||
TimToady | nr: say "abcde" ~~ / (a | b | bc | cde)+»/ | 16:57 | |
p6eval | rakudo 9c59a1: OUTPUT«「abcde」 0 => 「a」 0 => 「bc」 0 => 「b」 0 => 「cde」» | ||
..niecza v24-23-g0520c7c: OUTPUT«「abcde」 0 => 「a」 0 => 「b」 0 => 「cde」» | |||
masak | moritz: exactly. like Yoda. :) | ||
TimToady | ooh, another bug | 16:58 | |
backtrack isn't taking out the [bc] in rakudo | |||
16:58
kaleem left
|
|||
FROGGS is voting for more regex tests! | 16:59 | ||
masak submits rakudobug | |||
FROGGS: well volunteered! | |||
FROGGS | masak: can you assign it to me? | ||
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) | ||
masak | FROGGS: I'll try. | 17:00 | |
FROGGS: done. | 17:02 | ||
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 | ||
FROGGS | masak: I generally care about regexes these days btw | ||
Volkswagen | |||
masak | oops, thanks. | ||
indeed. | |||
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:06 | ||
rjbs | r: say so [].splice(0,3) | 17:09 | |
p6eval | rakudo 9c59a1: OUTPUT«True» | ||
rjbs | What's "so" there? | ||
moritz | rjbs: boolification | ||
FROGGS | masak: I'm more interested in getting tickets closed and TODOs done :o) | 17:10 | |
moritz | doc.perl6.org/language/operators#prefix+so | ||
masak | r: say [].splice(0, 3) | ||
p6eval | rakudo 9c59a1: OUTPUT«use of uninitialized value of type Any in string context in block at /tmp/H85DOXJPHT:1use of uninitialized value of type Any in string context in block at /tmp/H85DOXJPHT:1use of uninitialized value of type Any in string context in block at /tmp/H85DOXJPH… | ||
rjbs | Is there any mnemonic? | ||
moritz | say [].splice(0, 3).perl | ||
r: say [].splice(0, 3).perl | |||
p6eval | rakudo 9c59a1: OUTPUT«Array.new(Any, Any, Any)» | ||
masak | rjbs: yes, it's the opposite of "not". | ||
moritz | rjbs: opposite of 'not' | ||
masak faster again | |||
masak | rjbs: "I'm *not* kidding" -- "I'm *so* kidding" | ||
moritz: quit post-predicting me! :P | 17:11 | ||
rjbs | Thank you. | ||
FROGGS | r: sub so-thing { }; so-thing() | ||
p6eval | rakudo 9c59a1: OUTPUT«===SORRY!===Undeclared routine: thing used at line 1» | ||
FROGGS | r: sub not-thing { }; not-thing() | ||
p6eval | rakudo 9c59a1: OUTPUT«===SORRY!===Undeclared routine: thing used at line 1» | ||
rjbs filed a rakudobug about the result of splice in Rakudo. | 17:12 | ||
17:12
SunilJoshi joined
17:13
zby_home_ joined
|
|||
masak | r: my @a = << >>; my @c = splice @a, 0, 3; say ?@c | 17:13 | |
p6eval | rakudo 9c59a1: OUTPUT«True» | ||
masak | r: my @a = << >>; my @c = splice @a, 0, 3; say @c.elems | ||
p6eval | rakudo 9c59a1: OUTPUT«3» | ||
masak | rjbs: you're getting three undefined elements back. | 17:14 | |
moritz | masak: postditicting? :-) | ||
masak | rjbs: ?3 is True. | ||
rjbs | n: says o [].splice(0,3) | ||
p6eval | niecza v24-23-g0520c7c: OUTPUT«===SORRY!===Undeclared routines: 'o' used at line 1 'says' used at line 1Unhandled 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_… | ||
rjbs | n: say so [].splice(0,3) | ||
p6eval | niecza v24-23-g0520c7c: OUTPUT«False» | ||
rjbs | masak: TimToady called Rakudo's behavior a bug, last night. | ||
masak reads the spec for .splice | |||
moritz | yes, the return value should be the empty list, IMHO | ||
masak | rjbs: ah, ok. | ||
rjbs | it prevents: while my $x = splice @a, 0, 3 {...} from terminating | 17:15 | |
moritz | nr: say so (Any, Any, Any) | ||
p6eval | rakudo 9c59a1, niecza v24-23-g0520c7c: OUTPUT«True» | ||
moritz | that part is correct, no doubt | ||
masak | agreed. | ||
rjbs | I'd expect that to be true, and for the splice in question to return an empty list. | ||
masak | While it is illegal for the offset to be larger than the size of | 17:16 | |
the array, it is allowed for the final position to be off the end of the array; | |||
in this case the entire rest of the array is spliced, whatever is available. | |||
moritz | rjbs: then your expectations are aligned with the specs, and with niecza | ||
masak | this makes it sound like Niecza is right and Rakudo is wrong. | ||
17:17
census_ joined,
census_ left,
gdey left
17:18
census_ joined,
census left,
census_ left
|
|||
moritz | and I'm pretty sure I know why rakudo does it wrong | 17:19 | |
it simply slices the array with the arguments | |||
17:19
census joined
|
|||
moritz | and an array-slice past the end of the array is non-empty (otherwise you couldn't assign to its elements) | 17:19 | |
masak | then it shouldn't simply slice :) | 17:20 | |
moritz | presumably, yes | ||
or convert to List first | |||
r: say (my @).list.WHAT | |||
p6eval | rakudo 9c59a1: OUTPUT«Array()» | ||
masak | heh. | 17:21 | |
bug? | |||
jnthn | No. | ||
moritz | no | ||
jnthn | r: say Array ~~ List | ||
p6eval | rakudo 9c59a1: OUTPUT«True» | ||
masak | ah. | ||
moritz | Array is a subcl... what jnthn said | ||
masak hugs p6eval | |||
moritz | pity that it violates Liskov | ||
masak | what does? | ||
FROGGS | r: sub and-thing { }; and-thing() | 17:22 | |
p6eval | rakudo 9c59a1: ( no output ) | ||
moritz | slicing a List beyond its end simply returns Nil or the empty list or so | ||
but slicing an Array doesn't | |||
FROGGS | r: sub do-thing { }; do-thing() | ||
p6eval | rakudo 9c59a1: ( no output ) | ||
masak grumbles about subclasses being an attractive but ultimately ugly idea in programming languages... | |||
moritz | nr: say <a b c>[1..5].elems | ||
p6eval | rakudo 9c59a1: OUTPUT«2» | ||
..niecza v24-23-g0520c7c: OUTPUT«5» | |||
17:23
SunilJoshi left
|
|||
moritz | nr: say <a b c>.list[1..5].elems | 17:23 | |
p6eval | rakudo 9c59a1: OUTPUT«2» | ||
..niecza v24-23-g0520c7c: OUTPUT«5» | |||
moritz | ... at least in Rakudo | 17:28 | |
17:30
census_ joined
|
|||
pmurias | is niecza or rakudo correct? | 17:30 | |
17:30
census left
17:31
census_ left,
alester joined,
census joined
|
|||
moritz | I'm pretty sure rakudo's behavior is intentional. Not sure about correct though | 17:32 | |
nr: say <a b c>[1..*].perl | |||
p6eval | niecza v24-23-g0520c7c: OUTPUT«(timeout)» | 17:33 | |
..rakudo 9c59a1: OUTPUT«("b", "c")» | |||
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 | |
nr: say (1..*).WHAT | |||
p6eval | rakudo 9c59a1, niecza v24-23-g0520c7c: OUTPUT«Range()» | ||
moritz | oh wait, it's not even a WhateverCode | ||
but iirc index ranges ending with * were one of the reasons for rakudo's current behavior | |||
huh, seems that dalek hasn't joined us :( | 17:35 | ||
17:36
daxim_ left
17:38
dalek joined,
ChanServ sets mode: +v dalek
17:44
SamuraiJack left
17:53
cognominal__ left
17:59
cognominal__ joined
18:03
dakkar left
18:05
cognominal__ left
18:21
prammer_ joined
18:23
odoacre_ joined
18:24
dayangkun left
18:25
dayangkun joined
18:29
baest_ joined
18:31
DrEeevil joined
18:32
lustlife left,
bonsaikitten left,
baest left,
s0rear joined,
lustlife1 joined,
ObseLeTe joined
|
|||
dalek | p-jvm-prep: b25f471 | jnthn++ | / (12 files): Refactors in preparation for exceptions support. This adds in some pieces that will be needed for exceptions in the more general case, then switches the existing next/last/redo exceptions over to using the new approach. (Note, they need integrating so CONTROL, which may run on the stack top and resume, will work out.) |
18:35 | |
diakopter | the baa clog is .. amusing | 18:37 | |
moritz | .oO( blah clog ) |
18:38 | |
jnthn | *sigh* Implementing Perl 6 exceptions considered tricky... | ||
nwc10 | s/ exceptions// ? | 18:39 | |
jnthn | yeay, but I find many parts of the tricky fun | ||
nwc10 | do you have to do all of Perl 6 exceptions for NQP? | ||
jnthn | Exceptions aren't. They're just annoying. | ||
nwc10 | people should just stop making errors | ||
jnthn | No, but I don't want to have to do the whole thing over again. | ||
diakopter | Chuck Norris decides NP-Complete questions in O(0) | 18:40 | |
(time and space) | 18:41 | ||
moritz | and Turing-Complete questions in O(whatever he wants) | ||
japhb | diakopter, he's already decided them ...? | 18:42 | |
moritz, that's Bruce Schneier's job. :-) | |||
diakopter | japhb: :D as soon as they are posed, it is realized they are answered | ||
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? | ||
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:53 | |
But I guess you may be in multiple throws at once so a handler stack is likely needed. | 18:54 | ||
18:56
census_ joined
|
|||
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:57 | |
18:57
census left
|
|||
TimToady | and I'm not sure that control exceptions stack at all... | 18:58 | |
18:58
census_ left,
census joined
|
|||
diakopter | do not pass Go; go directly to Forth | 18:58 | |
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 | 18:59 | |
19:02
domidumont joined
19:03
cognominal joined
|
|||
FROGGS | the parsers in nqp and rakudo that parse the setting are NFA based? | 19:04 | |
jnthn | Yes | 19:05 | |
See src/QRegex/NFA | |||
FROGGS | k | ||
ya, seen that | |||
jnthn | Also !protoregex and !alt in Cursor | 19:06 | |
jnthn noms | 19:15 | ||
19:21
raiph left,
raiph__ left
19:22
raiph_ left
19:31
raiph joined,
ObseLeTe left,
WAB0GL7 joined,
raiph_ joined
|
|||
moritz | ~- | 19:32 | |
masak | new operator? :) | 19:33 | |
looks like string subtraction... | |||
moritz | I was just unable to type <return>~. | ||
nwc10 | mmm, yes, ssh escapes | 19:34 | |
moritz | though string subtraction is interesting | ||
if $a starts with $b, give me the aprt of $b that's after $a | |||
and $a otherwise | |||
diakopter | part of $a that's after $b you mean? | 19:35 | |
masak .oO( two minutes after the operator was created, there was already uncertainty about what it meant... ) | 19:36 | ||
moritz | diakopter: yes | ||
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«===SORRY!===Variable $while is not predeclared at /tmp/rbCcI_VvpV line 1:------> $l) eq $prefix ?? $whole.substr($l) !! ⏏$while }; say 'foobar' ~- 'fo'Unhandled exception: Check failed at /home/p6eval/niecza/bo… | ||
..rakudo 9c59a1: OUTPUT«===SORRY!===Variable '$while' is not declaredat /tmp/oXKL67hxRK:1------> q $prefix ?? $whole.substr($l) !! $while⏏ }; say 'foobar' ~- 'fo' expecting any of: postfix» | |||
moritz | nr: sub infix:<~->($whole, $prefix) { my $l = $prefix.chars; $whole.substr(0, $l) eq $prefix ?? $whole.substr($l) !! $whole }; say 'foobar' ~- 'fo' | ||
p6eval | rakudo 9c59a1, niecza v24-23-g0520c7c: OUTPUT«obar» | ||
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» | ||
dalek | rl6-roast-data: e522d98 | coke++ | / (3 files): today (automated commit) |
19:39 | |
[Coke] | wow, roast is going days at a time without a commit! | 19:42 | |
masak | rn: sub infix:<~->($whole, $prefix) { $whole ~~ /^$prefix(.*:)/ ?? ~$0 !! $whole }; say "foobar" ~- "fo" | 19:44 | |
p6eval | rakudo 9c59a1, niecza v24-23-g0520c7c: OUTPUT«obar» | ||
masak | hm, probably didn't need to ratchet that quantifier... | 19:45 | |
tadzik | in the middle of Higher Order Perl I feel a strange urge to rewrite Panda in functional style instead of oop | 19:46 | |
I know, I know, closures are just objects | |||
nwc10 | maybe Perl 6 is stable? ship it! | 19:48 | |
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. | ||
tadzik: I believe most code will have a healthy mixture of OO and closures. | 19:50 | ||
moritz | ad-hoc mini objects | ||
masak | yes! :D | ||
I'm currently in love with JavaScript's common pattern: function () { /* privates */; return { /* publics */ } } | 19:51 | ||
19:51
prammer_ left
|
|||
masak | if you take that pattern seriously, JavaScript's lack of private attributes doesn't feel so serious anymore. | 19:51 | |
(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 | ||
wtf | |||
ohh. The "$! instead of $_ in CATCH" again | 19:53 | ||
masak | I do that one too often, too. | ||
tadzik | and I need a when {}, alwyas | 19:55 | |
jnthn back | 19:56 | ||
dalek | nda: b7b966b | tadzik++ | bin/panda: Catch Panda.resolve exceptions correctly. Fixes GH-32 |
19:57 | |
nwc10 | sucessfully nommed? | ||
jnthn | yes :) | ||
20:02
ObseLeTe joined
20:05
fhelmberger left
20:18
cognominal left
20:19
labster joined
|
|||
dalek | osystem: 18a5136 | (Brent Laabs)++ | META.list: Adding Lingua::Number |
20:23 | |
20:25
ObseLeTe left
20:27
gdey joined
20:28
cognominal joined
|
|||
moritz | I just stumbled over the same bug as daxim++ earlier | 20:28 | |
panda installed to ~/.perl6/lib/, which isn't in path | 20:29 | ||
and the site dir is writable | |||
ah, and I know why | 20:30 | ||
$PATH is wrong, it picks up an old panda first | |||
20:33
alec__ left
20:38
zby_home_ left
|
|||
GlitchMr | Just wondering, does Rakudo with JVM mean that it would be possible to make Java applet that would be online REPL? | 20:43 | |
20:46
domidumont left
|
|||
[Coke] | ... yes. but ew, applets. | 20:49 | |
masak | there's more than one way to do it. | ||
your way is *wrong*. :P | |||
GlitchMr | I know. | 20:50 | |
jnthn | I suspect it'll be possible, with some amount of effort. | ||
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,
Liz_ is now known as lizmat
|
|||
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. | ||
Anyway, I'm currently compiling Rakudo with emscripten. | 20:52 | ||
I wonder if I will get anything. | |||
"make" script appears to work | |||
20:52
applicative_ joined
|
|||
GlitchMr | But I'm not sure what would be size of it. | 20:52 | |
And I'm almost sure that 100MB wouldn't be too practical. | 20:53 | ||
I don't even mean server space. | |||
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 | ||
wait... | |||
Why it's using cc? | |||
21:05
dolmen1 joined
|
|||
[Coke] | what is it? | 21:05 | |
masak | it's a popular C compiler, written by the GNU people. | 21:15 | |
masak hides | |||
masak watched "Spy Hard" recently :) | |||
FROGGS | nqp: my $nfa := QRegex::NFA.new; $nfa.addnode( QAST::Regex.new( "foobar" ) ); say( $nfa.run("foobar", 0) ); | 21:16 | |
p6eval | nqp: OUTPUT«[ 0 ]» | ||
FROGGS | I'm not supposed to use it that way, no? | ||
jnthn: ? | |||
you have a hint for me? | |||
masak | it returned you a 0. | 21:17 | |
looks quite promising. | |||
FROGGS | nqp: my $nfa := QRegex::NFA.new; $nfa.addnode( QAST::Regex.new( "foobar" ) ); say( $nfa.run("abcdef", 0) ); | ||
p6eval | nqp: OUTPUT«[ 0 ]» | ||
masak | nqp: my $nfa := QRegex::NFA.new; $nfa.addnode( QAST::Regex.new( "foobar" ) ); say( $nfa.run("le foobar", 0) ); | ||
p6eval | nqp: OUTPUT«[ 0 ]» | ||
masak | hm. | ||
FROGGS | ya | ||
ó.ò | |||
jnthn | Generally, you don't fun an NFA directly but instead merge a bunch of them together, giving each possiblity a fate. | 21:20 | |
See what happens in, iirc, !protoregex_nfa | |||
(So you run a merged NFA.) | 21:24 | ||
In fact, looking at !alt_nfa is probably more useful. | |||
And the way it calls merge_substates | |||
FROGGS | so I have to call mergesubstates? | ||
k | |||
jnthn | yeah | ||
A regex will already have an NFA generally, which you can get by calling .NFA on it. | 21:25 | ||
21:25
SmokeMachine left
21:26
benabik joined
|
|||
FROGGS | ohh, nice | 21:26 | |
nqp: say (/a/).NFA | |||
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)» | ||
FROGGS | nqp: say((/a/).NFA) | ||
p6eval | nqp: OUTPUT«Method 'NFA' not found for invocant of class 'NQPRegex'current instr.: '' pc 119 ((file unknown):155890185) (/tmp/8CAjkQUo1m:1)» | ||
FROGGS | okay, within rakudo then | ||
in Cursor | |||
dalek | p-jvm-prep: 2e88e42 | jnthn++ | / (12 files): First pass at exception handling. Makes basic try/CATCH work. Enough to pass 3 out of 8 tests in 44-try-catch.t. |
21:41 | |
[Coke] | jnthn++ | ||
FROGGS | jnthn: do I just run the nfa and return that from INTERPOLATE? | 21:43 | |
21:43
benabik left
|
|||
jnthn | FROGGS: No | 21:44 | |
FROGGS: You (presumably) have an array of things to run. | |||
You use the NFA to tell you which indexes of the array to try and in which order. | |||
So your fates in this case are array indexes. | 21:45 | ||
21:46
shinobicl left
|
|||
masak | oh! nice. | 21:49 | |
21:51
sqirrel left
21:54
ObseLeTe joined
21:55
ObseLeTe left
21:56
bluescreen10 left
21:58
bluescreen10 joined
21:59
rindolf left
22:03
skids left
22:04
lustlife1 left
22:06
applicative_ left
22:25
PacoAir left
22:28
kaare_ left
22:33
dolmen1 left
22:35
census left
|
|||
masak | 'night, #perl6 | 22:35 | |
22:35
census joined
22:39
woolfy left
22:46
woolfy1 joined
|
|||
dalek | p-jvm-prep: f4ee919 | jnthn++ | lib/QAST/JASTCompiler.nqp: Fix a thinko, winning one more test. |
22:47 | |
p-jvm-prep: da77c72 | jnthn++ | lib/QAST/JASTCompiler.nqp: Toss an unused parameter. |
|||
p-jvm-prep: aa2d439 | jnthn++ | / (3 files): Arg re-ordering to simplify stack handling. |
|||
22:49
wk joined
22:55
s0rear is now known as sorear
23:01
bluescreen10 left
23:02
FROGGS left
|
|||
dalek | p-jvm-prep: 909516f | jnthn++ | docs/ROADMAP: Update ROADMAP. |
23:05 | |
jnthn | sleep & | 23:07 | |
23:16
woolfy1 left
23:33
hash_table joined
23:36
skids joined,
mberends left
23:42
hash_table left
|
|||
grondilu | sub count(@a) { my %count; %count{$_}++ for @a; return %count } # Any more elegant way to write this?? | 23:49 | |
sorear | that's almost, but not quite, what classify is for. or is that categorize now | 23:53 | |
23:54
cognominal left
|
|||
[Coke] | r: my @a = <a b c d e a b c>; say @.classify(); | 23:56 | |
p6eval | rakudo 9c59a1: OUTPUT«===SORRY!===Variable @.classify used where no 'self' is availableat /tmp/yfn1Ob4War:1------> @a = <a b c d e a b c>; say @.classify()⏏;» | ||
[Coke] | r: my @a = <a b c d e a b c>; say @a.classify(); | ||
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» | ||
[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» | ||
[Coke] | r: my @a = <a b c d e a b c>; say @a.classify(.Str); | ||
p6eval | rakudo 9c59a1: OUTPUT«use of uninitialized variable $_ of type Any in string context in block at /tmp/iJIJhfkd4d:1Nominal 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… | ||
[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); | ||
p6eval | rakudo 9c59a1: OUTPUT«("a" => ["a", "a"], "b" => ["b", "b"], "c" => ["c", "c"], "d" => ["d"], "e" => ["e"]).hash» | ||
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» | ||
spider-mario | r: my @a = <a b c d e a b c>; say @a.classify: {$_}; | ||
p6eval | rakudo 9c59a1: OUTPUT«("a" => ["a", "a"], "b" => ["b", "b"], "c" => ["c", "c"], "d" => ["d"], "e" => ["e"]).hash» |