Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-02-12

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 REPLeffect joined #perl6
00:09 orafu joined #perl6
00:24 jferrero joined #perl6
00:26 colomon joined #perl6
00:28 RandalSchwartz http://drop.io/20_years_in_twenty_pages - add review comments to the file
00:35 colomon RandalSchwartz: seems like a fair summary to me.
00:37 slavik joined #perl6
00:42 RandalSchwartz thanks
00:45 athenot joined #perl6
00:45 diakopter ng: my $x; say $x.defined
00:45 p6eval ng 1a9e76: OUTPUT«0␤»
00:46 diakopter ng: my $x; say $x.defined; say $x.WHAT
00:46 p6eval ng 1a9e76: OUTPUT«0␤Mu()␤»
00:46 diakopter ng: my $x; say $x.defined; say $x.WHICH
00:46 p6eval ng 1a9e76: OUTPUT«0␤47718958194720␤»
00:46 diakopter ng: my $x; say $x.defined; say $x.WHENCE
00:46 p6eval ng 1a9e76: OUTPUT«0␤␤»
00:46 diakopter ng: my $x; say $x.defined; say $x.WHERE
00:46 p6eval ng 1a9e76: OUTPUT«0␤47953721288824␤»
00:47 diakopter ng: my $x; say $x.defined; say $x.WHOSOEVER
00:47 p6eval ng 1a9e76: OUTPUT«0␤Method 'WHOSOEVER' not found for invocant of class ''␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
01:11 colomon ng: my $str; say $str ~ "hello";
01:11 p6eval ng 1a9e76: OUTPUT«Mu()hello␤»
01:12 colomon jnthn: If we can get that one fixed, we get back while.t.
01:16 colomon rakudo: my $str; say $str ~ "hello";
01:16 p6eval rakudo 1d4928: OUTPUT«Use of uninitialized value␤hello␤»
01:18 colomon On second thought, I reckon the test should initialize to "".  It's not like that's the point of the test, and it is using an uninitialized value...
01:19 pugs_svn r29696 | colomon++ | [t/spec] Initialize the collecting string so avoid tangential issues about what uninitialized variables stringify as.
01:24 p3tr0x joined #perl6
01:24 p3tr0x hi there
01:25 p3tr0x i've a little question
01:25 colomon yes?
01:25 p3tr0x i would like to know if it's possible (and how) to send a sig{int} to a subroutine and return to the main program...
01:25 dalek rakudo/ng: ecd6840 | (Solomon Foster)++ | t/spectest.data:
01:25 dalek rakudo/ng: Turn on while.t.
01:25 dalek rakudo/ng: review: http://github.com/rakudo/rakudo/commit/ecd68409ba4f52caf79de6eba7aec5e20170451b
01:26 p3tr0x does anyone know that ?
01:27 colomon Hmmm... that's well out of my area of expertise, I fear.
01:27 colomon My guess is nothing like that is implemented in Rakudo yet, and it's probably not in the Perl 6 specs yet either.
01:27 colomon But maybe someone else out there knows more.
01:28 p3tr0x anyone?
01:28 colomon http://perlcabal.org/syn/S17.html is the relevant portion of the specs
01:29 [particle] p3tr0x: are you using perl 5 or perl 6?
01:29 colomon and http://perlcabal.org/syn/S04.html#Control_Exceptions
01:29 colomon afk # exercise time
01:30 p3tr0x perl 5 particle
01:30 p3tr0x 5.10
01:30 [particle] then you'll want to wander over to #perl
01:30 p3tr0x but I'm unable to join #perl, so I tried here
01:31 [particle] try http://webchat.freenode.net/
01:33 p3tr0x thanks you really
01:34 [particle] it is our pleasure
02:21 drbean joined #perl6
02:29 colomon ng: say (1i).Str
02:29 p6eval ng ecd684: OUTPUT«0 + 1i␤»
02:30 colomon ng: my $z = 0i; say "$z + 0 = $z"
02:30 p6eval ng ecd684: OUTPUT«Multiple Dispatch: No suitable candidate found for 'concatenate', with signature 'PPP->P'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
02:33 colomon ng: my $z = 0i; say $z;
02:33 p6eval ng ecd684: OUTPUT«0 + 0i␤»
02:33 colomon ng: my $z = 0i; say "$z  "
02:34 p6eval ng ecd684: OUTPUT«Multiple Dispatch: No suitable candidate found for 'concatenate', with signature 'PPP->P'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
02:34 colomon ng: my $z = 0i; say $z ~ " "
02:34 p6eval ng ecd684: OUTPUT«0 + 0i ␤»
02:39 colomon ng: my $z = 0i; say "  $z  "
02:39 p6eval ng ecd684: OUTPUT«  0 + 0i  ␤»
02:43 diakopter ng: say 'There are 10 types of people in the world: those who understand hex ... F the rest'
02:43 p6eval ng ecd684: OUTPUT«There are 10 types of people in the world: those who understand hex ... F the rest␤»
02:44 diakopter see google for the attribution.
02:45 colomon ng: say 2/(3+1i)
02:45 p6eval ng ecd684:  ( no output )
02:46 colomon rakudo: say 2/(3+1i)
02:46 p6eval rakudo 1d4928: OUTPUT«0.6 + -0.2i␤»
02:47 colomon ng: say 2.Num/(3+1i)
02:47 p6eval ng ecd684: OUTPUT«0.6 + 0.2i␤»
02:58 colomon ng: my $a = 2/(3+1i); say "hello"; say $a.perl;
02:58 p6eval ng ecd684: OUTPUT«hello␤Complex.new(0.6, 0.2)␤»
02:58 colomon ng: my $a = 2/(3+1i); say "hello"; say $a.perl; say $a;
02:58 p6eval ng ecd684: OUTPUT«hello␤Complex.new(0.6, 0.2)␤»
02:58 colomon wow, I've never seen say do that before.
02:59 colomon ng: my $a = 2/(3+1i); say "hello"; say $a.perl; say $a.re; say $a.im;
02:59 p6eval ng ecd684: OUTPUT«hello␤Complex.new(0.6, 0.2)␤0.6␤0.2␤»
02:59 colomon ng: my $a = 2/(3+1i); say "hello"; say $a.perl; say $a; say "$.re + {$.im}i";
02:59 p6eval ng ecd684: OUTPUT«hello␤Complex.new(0.6, 0.2)␤Lexical 'self' not found␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
03:00 colomon ng: my $a = 2/(3+1i); say "hello"; say $a.perl; say $a; say "$a.re + {$a.im}i";
03:00 p6eval ng ecd684: OUTPUT«hello␤Complex.new(0.6, 0.2)␤Multiple Dispatch: No suitable candidate found for 'concatenate', with signature 'PPP->P'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
03:02 colomon er, why are master and ng giving different results?
03:02 colomon rakudo: say 2/(3+1i)
03:02 p6eval rakudo 1d4928: OUTPUT«0.6 + -0.2i␤»
03:02 colomon ng: say 2.Num/(3+1i)
03:02 p6eval ng ecd684: OUTPUT«0.6 + 0.2i␤»
03:18 pugs_svn r29697 | colomon++ | Add initial space to test descriptions to avoid concatenate bug.
03:26 dalek rakudo/ng: c8164f1 | (Solomon Foster)++ | src/core/Complex.pm:
03:26 dalek rakudo/ng: Restore the old, working definition of infix:</>($a, Complex $b).
03:26 dalek rakudo/ng: review: http://github.com/rakudo/rakudo/commit/c8164f1084482348a5ea4fe3691b57d8d18825cb
03:26 dalek rakudo/ng: 46e2efe | (Solomon Foster)++ | t/spectest.data:
03:26 dalek rakudo/ng: Turn back on complex.t.
03:26 dalek rakudo/ng: review: http://github.com/rakudo/rakudo/commit/46e2efe8da35f856bc4b16220b5ee8a98ccaef85
03:54 jaldhar joined #perl6
04:01 justatheory joined #perl6
04:12 justatheory joined #perl6
04:16 Chillance joined #perl6
04:22 agentzh joined #perl6
04:36 justatheory joined #perl6
04:45 diakopter O_O opp birthetheth
04:59 Khisanth joined #perl6
05:59 quietfanatic joined #perl6
06:00 quietfanatic rakudo: sub X (&sub) {&sub()}; X(&say.assuming(3))
06:00 p6eval rakudo 1d4928: OUTPUT«Nominal type check failed for parameter 'sub'; expected Callable but got Code instead␤in Main (file src/gen_setting.pm, line 324)␤»
06:00 quietfanatic This is an issue.  Code should do Callable.
06:00 quietfanatic ng: sub X (&sub) {&sub()}; X(&say.assuming(3))
06:00 p6eval ng 46e2ef: OUTPUT«Symbol '&say' not predeclared in <anonymous>␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 137 (src/PCT/HLLCompiler.pir:101)␤»
06:01 quietfanatic ng: sub X (&sub) {&sub()}; sub Y ($x) {say $x}; X(&Y.assuming(3))
06:01 p6eval ng 46e2ef: OUTPUT«3␤»
06:01 quietfanatic I guess I gotta be patient then
06:01 quietfanatic ng: sub X {say caller}; sub Y {X}; Y
06:01 p6eval ng 46e2ef: OUTPUT«Could not find non-existent sub &caller␤current instr.: 'X' pc 135 (EVAL_1:57)␤»
07:10 kaare joined #perl6
07:18 Su-Shee joined #perl6
07:19 Su-Shee good morning
07:21 clausi joined #perl6
07:22 uniejo joined #perl6
07:22 takadonet joined #perl6
07:37 xinming joined #perl6
08:16 Trashlord hey
08:22 fridim joined #perl6
08:22 iblechbot joined #perl6
08:37 renormalist joined #perl6
08:50 moritz_ rakudo: say caller
08:50 p6eval rakudo 1d4928: OUTPUT«caller() is not yet implemented in Rakudo, sorry␤in sub »
08:53 mathw Good localtime
08:53 colomon o/
08:53 drbean joined #perl6
08:54 * mathw prepares his segmentation fault hunting equipment
09:07 mberends joined #perl6
09:07 mberends ng 46e2efe (current) ng comparison on Ubuntu 10.4 x86 vs amd64
09:07 mberends "Synopsis", "pass","fail","todo","skip","plan","spec"
09:07 mberends "S06",         227,     0,    10,    53,   290,   739  # x86
09:07 mberends "S06",         199,    28,    10,    53,   290,   739  # amd64
09:07 mberends "S16",         119,     0,     0,     2,   121,   246  # x84
09:07 mberends "S16",         108,    11,     0,     2,   121,   246  # amd64
09:08 mberends "S29",         466,     0,     3,     2,   471,   517  # x86
09:08 mberends "S29",         124,   346,     1,     0,   471,   517  # amd64
09:08 mberends "S32",        1941,     0,    30,   113,  2084,  3511  # x86
09:08 mberends "S32",        1734,    17,    30,   105,  1876,  3303  # amd64
09:08 mberends "total",      3820,     0,    77,   313,  4210, 16363  # x86
09:08 szbalint hm
09:08 mberends "total",      3232,   402,    75,   303,  4002, 16155  # amd64
09:08 mberends 128 files, 3820 (23.3% of 16363) pass,   0 fail  # x86
09:08 mberends 128 files, 3232 (20.0% of 16155) pass, 402 fail  # amd64
09:08 mberends errands, bbl &
09:08 szbalint drive-by-flood :)
09:11 colomon huh, wonder if those are "real" errors for amd64 or just drive-by segmentation faults?  (I'm consistently getting one of the later in S32-str/index.t on my MacBook Pro.)
09:35 mberends joined #perl6
09:36 colomon at first glance I think the answer to my question is drive-by segmentation faults.  I just built ng on 64-bit Linux, and I'm losing nearly 200 tests to a seg fault just in S32-num/unpolar.t.
09:37 lisppaste3 colomon pasted "backtrace" at http://paste.lisp.org/display/94828
09:38 mberends there is also S29-conversions/ord_and_chr.rakudo: 346 tests aborted (missing ok/not ok)
09:38 mberends planless testing would have missed those ;)
09:40 mathw isn't a drive-by segmentation fault still a segmentation fault though
09:40 colomon errr... why?   I didn't have any trouble finding the issue in unpolar.t despite its "plan *"...
09:40 mathw and thus, bad
09:40 colomon mathw: sure, it's definitely bad.
09:40 mberends because with plan * the harness would not know how many ok/notok to expect
09:41 colomon mberends: and then the problem is triggered by the lack of done_testing.
09:42 colomon btw, S29-conversions/ord_and_chr.t works fine on my amd64 build.
09:43 mberends it could be the toolchain here, gcc 4.4.3-2ubuntu1
09:44 colomon mathw: the thing is, the "drive-by" failures don't represent a failure of the immediate code being tested, they represent a transient failure in the underlying engine.
09:45 colomon Red Hat 4.1.2-42 here.
09:45 colomon mathw: that's better from the perspective of the person implementing the feature being tested, and much much worse from the overall perspective of Rakudo.
09:46 mberends S29-conversions/ord_and_chr.rakudo segfaults after ok 101 - ord() works for \82 == 'R'
09:48 colomon mathw: we've had these semi-random seg faults for months now, and as far as I know, no one has even started to get close to figuring out what might be causing them, or even if its a Rakudo issue or a Parrot issue.
09:49 mberends Rakudo doesn't generally cause segfaults, but it can trigger them in Parrot. There is very little C code in Rakudo.
09:50 moritz_ which can still be wrong :-)
09:50 mathw aaah okay
09:50 mberends yes. but this time, unlikely.
09:50 mathw that doesn't sound like a fun task
09:51 mberends much less fun if it works on colomon++'s amd64 anyway
09:53 mathw definitely
09:53 mathw means it's something subtler than this one I just found
09:53 colomon mathw: what makes it even worse from my perspective is that valgrind (my normal seg fault hunting tool) generates so many false errors in Parrot's GC that it is hopelessly noisy.
09:53 mathw I've got some code here which goes "mapListener[iID]->onMessage()"
09:53 mathw the simple problem being that mapListener[iID] is out-of-bounds
09:54 mathw just have to figure out why... but at least it's a straightforward wrong!
09:54 payload joined #perl6
09:54 mberends mathw: the identifiers suggest it's a BBC political broadcast ;)
09:54 mathw The ones I hate are the ones that result from some subtle thing somewhere else
09:54 colomon mathw: and at least half the time (at least in the older ones I looked at), running the test under valgrind makes the seg fault go away anyway.  :(
09:55 mathw or which only happen on Tuesdays
09:55 mathw colomon: oh yes, I've had that
09:55 mathw it's highly unpleasant
09:55 mathw and related to the other class of them which go away when you run it in a debugger
09:56 mathw And then there are the ones which only happen if certain other things happen in other threads in just the right order...
09:56 mathw As I keep saying to people at work, there has to be a better way to do this
09:57 mssm joined #perl6
09:58 colomon huh.  actually valgrind is pretty interesting on the unpolar.t crash.  It's an invalid write past the end of an alloc'd block in the GC function compact_pool.
09:58 mathw great
09:58 mathw at least that's definitively wrong
09:58 mathw and still showing up in valgrind!
09:59 cognominal joined #perl6
10:00 lisppaste3 colomon pasted "fatal error(s) in valgrind run on unpolar.t, amd64" at http://paste.lisp.org/display/94829
10:02 colomon I should try going back to bed...
10:02 mathw ouch
10:02 mathw that's messy
10:02 mathw I guess there's a reason why Parrot's GC still has bugs in it
10:04 payload joined #perl6
10:07 masak joined #perl6
10:07 masak another glorious day in Perl 6 land!
10:10 moritz_ \o/
10:12 szbalint ;-)
10:14 lisppaste3 mberends pasted "fatal error(s) in valgrind run on S29-conversions/ord_and_chr.rakudo, amd64" at http://paste.lisp.org/display/94832
10:15 mberends that time it crashed after \60 == '<' instead of \82 == 'R'
10:16 mberends letter R: you're forgiven
10:19 masak RandalSchwartz: page 40: s/begged the question/raised the question/, perhaps.
10:21 masak RandalSchwartz: also, the wording 'new releases nearly every few weeks' seems much less parsimonious than 'monthly releases'. is there a reason to choose the longer wording?
10:22 masak save for those two comments, nice summary.
10:23 IllvilJa joined #perl6
10:24 mathw Saluton, masak!
10:25 masak Saluton, mathw!
10:25 * masak got up fairly early today
10:26 * mathw didn't
10:26 mathw I didn't crawl out of bed until gone half past seven
10:26 mathw The cat was most put out with me
10:28 masak I got up at eight. with my recent track record, that's really early.
10:35 szbalint Let's start a petition for 28-32 hour variable length days
10:35 szbalint at least that's what my internal clock wants :S
10:36 moritz_ funnily when left alone without much social interaction and sun rythm, most people settle either on a 23h or a 25h day
10:37 mathw I think we need to slow down the rotation of the Earth
10:37 mathw just slightly
10:37 masak I did 28-h days a few months back. it's something I'd like to try again.
10:37 szbalint mathw: it is slowing down, just not fast enough
10:38 masak is the slowdown speeding up or slowing down?
10:38 szbalint moritz_: there were a few outliers in a study I read about this, some french dude settled on 28h for example
10:38 szbalint maybe a physicist knows :)
10:39 szbalint I would assume slowing down, but that's just a guess
10:39 * moritz_ worked more with very small systems :-)
10:40 * masak laughs at that
10:40 moritz_ and my angular momenta where quantized => no slowing down :-)
10:40 masak convenient.
10:41 masak to me, 'quantized' is one of those quantum suspension-of-disbelief terms. it goes "ok, we all know physical systems don't intuitively behave like that... but bear with us, OK?"
10:41 moritz_ actually there are very intuitive approaches to quantization
10:41 mathw nothing in quantum stuff is intuitive though
10:42 mberends eventually the friction due to tidal movements will slow the earth's rotation to a month, however long that will be
10:42 moritz_ when you leave a plate along long enough, it's either on the table or on the floor
10:42 mathw not according to anything I've ever read - but then I have only a layman's overview
10:42 moritz_ that's a form of quantization
10:43 moritz_ mathw: intuition depends on how familiar you are with stuff. It's very possible to gain intuitive insight in some QM phenomena when you work with them long enough
10:43 mathw No doubt
10:43 masak moritz_: nice explanation.
10:43 mathw But when your only experience is with the world we directly observe, it looks like crazy shit
10:43 mathw fun though
10:44 mathw I rather like the idea that the universe is so strange underneath
10:44 drbean joined #perl6
10:44 moritz_ one things that's not very intuitive is that baiscally all quantization comes from boundary conditions
10:44 masak I rather like that biology can be reduced to digital processing.
10:45 mathw I rather like the probability thing
10:45 mathw Oh, this atom? Yeah it might decay
10:45 mathw Or it might not
10:45 masak moritz_: as in standing waves?
10:45 mathw Just have to watch it and see
10:45 moritz_ for example in an atom, there are continuous solutions for the wave functions - but they don't decay in infinity
10:45 szbalint reality/physics is so scale dependent. That's beautiful.
10:45 moritz_ masak: as in standing waves, hard boundaries, or in knowning that wave functions often decay in large distances
10:45 moritz_ lunch&
10:46 mathw I read something about the electron energy levels being to do with there being no solutions to their wave functions in between those levels
10:46 mathw I thought that was interesting
10:47 mathw What better reason to have those states with no inbetweens than it being simply impossible for the intermediate states to exist?
10:52 mberends It's a great reason, similar to: we have no solutions to equations at levels in between, therefore they *should* not exists. electrons do math, you know, effortlessly ;)
10:53 pjcj joined #perl6
11:03 masak exactly. things are quantized because the waves like it that way. non-standing waves make them confused.
11:05 * mberends likes an ordered, well-documented Universe
11:08 masak don't know about ordered. we mislaid the Higgs billions of years ago, and still haven't found it.
11:09 mberends oops. The LHC fill find it again though, won't it?
11:10 mberends *will
11:11 mathw If it's still around
11:12 masak it wouldn't be science if we could answer that question beforehand :)
11:12 finanalyst joined #perl6
11:13 mathw well
11:13 mathw it might be
11:13 mathw but it could also be a spectacular waste of money
11:13 masak I hear that opinion now and then.
11:13 masak I'm not really one to judge in that matter.
11:14 mathw I don't think it is
11:14 mathw because we don't know that the Higgs boson even exists
11:14 mathw and it would be extremely useful to know that
11:14 mathw therefore it's worth building a machine to detect it
11:14 mathw And they'll get loads of other interesting data from it too
11:15 mberends we should spend lots of money trying to find it, because it creates jobs ;)
11:18 mathw And it might let us build cool stuff
11:19 mathw stuff that's *gasp* even cooler than Perl 6!
11:19 mberends just think, without CERN there would be no http, no html, no www...
11:20 masak speaking of letting us build cool stuff. I got unstuck again with GGE last night. still need to find the tuits, but lookarounds are within reach now. I might still reach 100% PGE compat before ng becomes master! :)
11:20 mberends \o/ masak++
11:20 frettled w00t
11:21 masak based on what TimToady++ said the other day, PGE really does some cutting of corners in the case of lookarounds. then again, it doesn't need to make it more complicated than that either, since it's not aiming for doing LTM.
11:22 masak but I'm starting to really understand why pmichaud++ chose to start from scratch rather than extend PGE :)
11:22 QC_OK joined #perl6
11:22 masak (and why he's been advising me not to try to change GGE into something more STD-compliant)
11:23 QC_OK um should I learn perl6 or perl?
11:23 masak QC_OK: I think you should.
11:23 QC_OK is perl6 even released properly yet?
11:23 masak QC_OK: yes.
11:23 masak 25 times, even.
11:23 masak well, actually, that's just Rakudo.
11:23 masak Pugs has been released a few times as well.
11:24 masak proper, honest-to-blog releases.
11:24 QC_OK I learned a bit of Perl in a Java course once
11:24 QC_OK the lecturer just had to teach us
11:24 QC_OK even though it was java
11:24 QC_OK hehe
11:24 masak :)
11:25 QC_OK he uses perl in bioinformatics
11:25 * masak too
11:25 QC_OK I might study that this year
11:25 QC_OK bio
11:25 QC_OK -informatics
11:25 masak cool.
11:25 masak I'm in the field.
11:25 QC_OK cool
11:25 QC_OK :D
11:25 masak QC_OK: wanna see some Perl 6?
11:26 QC_OK You have to have done biology in first year, but the lecturer says he can waive that requirement
11:26 QC_OK or something like that
11:26 QC_OK oik
11:26 QC_OK shoot
11:26 masak QC_OK: http://use.perl.org/~masak/journal/39238
11:26 mathw Hello QC_OK
11:27 QC_OK hi
11:27 masak rakudo: my $dna = "ttaagg"; sub translate($dna) { "FFLLSSSSYY!!CC!WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG".comb[map { :4($_) }, $dna.trans("tcag" => "0123").comb(/.../)] }; say translate($dna)
11:27 p6eval rakudo 1d4928: OUTPUT«LR␤»
11:28 QC_OK So you think perl6 is better than perl?
11:28 QC_OK I guess
11:28 QC_OK ?
11:28 masak QC_OK: no, I don't think a comparison can be made in that way.
11:28 QC_OK ah
11:28 QC_OK ok
11:28 masak QC_OK: but I know I have a warm buzz in my tummy from both.
11:28 masak and slightly more with Perl 6. :)
11:28 QC_OK heh
11:29 QC_OK hmm I guess I'll learn Perl6, then Perl.
11:29 QC_OK I actally don't really know perl at all
11:29 masak gotta start somewhere.
11:30 QC_OK heh, the write only language meme stuck with me
11:30 QC_OK I never bothered learning it
11:30 mathw It can be write only
11:30 QC_OK But I figure I should just for kicks
11:30 masak it's like this: sure, you can write a program without caring about readability.
11:30 masak but what's the fun in that?
11:30 mathw But it doesn't take much care to ensure that it's readable
11:30 QC_OK yeah...
11:30 masak much better to write beatutiful code, that other people can read.
11:30 mathw And it's certainly better if you can comprehend your own code six months later
11:31 QC_OK People say perl is a "hack" kind of langauge
11:31 masak QC_OK: well, it is.
11:31 QC_OK you can make disgusting, short code
11:31 mathw sure you can
11:31 masak you can throw things together if you want.
11:31 QC_OK that you can't read, but does what you want
11:31 mathw and sometimes that's just what you need to solve a problem quickly
11:31 masak and then later you can expand and clarify.
11:31 mathw but that doesn't mean it's the only way you can code in Perl
11:31 masak it sort of grows along with your solution.
11:31 mathw and the big non-secret is: no other popular language is any better
11:32 masak Perl 6 is, in my experience, slightly more verbose than Perl 5.
11:32 masak but only on the one-liner level.
11:32 masak after that, it really picks up speed and blazes past Perl 5.
11:32 masak um, except in terms of execution speed... :)
11:32 mathw so far
11:32 masak right.
11:32 mathw functionality, then speed
11:33 masak nod.
11:33 mathw Perl 6 estas bona!
11:33 masak :)
11:33 mathw But really you can write terrible code in any language
11:33 mathw In some languages it's even compulsory
11:33 mathw Not in Perl, though
11:34 QC_OK heh
11:35 QC_OK I learned the basics of ruby today
11:35 QC_OK But I don't like it
11:35 mathw There's some good stuff in Ruby
11:35 mathw Perl 6 'borrowed' most of it
11:35 QC_OK I'd rather learn perl
11:35 masak lots of nice projects, in my opinion.
11:35 QC_OK Ruby is like python and perl put together
11:35 mathw What about Ruby don't you like?
11:35 QC_OK which is fail in itself
11:35 masak mathw: don't know if 'most of it' is a good first approximation :)
11:36 QC_OK Clean + Messy = sorta clean
11:36 QC_OK it's stupid
11:36 QC_OK Python + Perl
11:36 QC_OK = fail
11:36 masak QC_OK: I don't find that Ruby is much like Python, actually. but YMMV.
11:36 mathw masak: throwing parameterised blocks around at the drop of a hat, mixins... what else did we want?
11:36 QC_OK code blocks are eye cancer
11:36 masak QC_OK: I don't even know what that means.
11:36 QC_OK looks horrible
11:37 QC_OK anyhow
11:37 QC_OK I don't like the begin end crap, reminds me of VB
11:37 mathw Do you mean the 10.times { |x| print x; } stuff?
11:37 QC_OK eww
11:37 mathw because I really don't like the parameter syntax for those
11:38 mathw never have. Doesn't seem connected to the right bit of structural syntax.
11:38 QC_OK you can also write 10.times begin |x| print x end
11:38 mathw and that's even worse!
11:38 QC_OK I know
11:38 QC_OK It's fail
11:38 QC_OK anyhow
11:38 QC_OK my opinion only
11:38 mathw For blocks, I like brackets or indentation, not keywords
11:38 masak the |x| syntax is from Smalltalk, right?
11:38 mathw I think so
11:38 QC_OK I never learned smalltalk
11:38 mathw I don't much care for Smalltalk's syntax either
11:38 QC_OK I'm too young :)
11:39 mathw But I do like the view of OOP as message passing instead of method calls
11:39 mathw which is something you also find in Objective-C
11:40 QC_OK !tutorial
11:40 QC_OK @tutorial
11:40 QC_OK hmm
11:40 QC_OK Do you recommend a tutorial or book for perl6?
11:41 mathw The books haven't been written yet
11:41 masak QC_OK: first off, I'd recommend you stick around.
11:41 masak QC_OK: second, do check out the Advend Calendar!
11:41 mathw Oh yes, the Advent Calendar
11:41 mathw I'd forgotten about that
11:41 mathw Which is silly, since I wrote some of it
11:41 masak http://perl6advent.wordpress.com/2009/12/01/perl-6-advent-calendar/
11:41 masak it tells a lot of the story.
11:42 QC_OK ok
11:42 QC_OK since there are no books yet, are there any good tutorials for perl 6?
11:42 masak enjoy!
11:42 masak QC_OK: what we just pointed you at.
11:42 QC_OK ok
11:42 QC_OK sorry
11:43 QC_OK that's it I guess
11:43 masak there are more, but this one is the most recent.
11:43 masak and fairly complete, as I said.
11:43 QC_OK ok
11:43 QC_OK I guess I'll come back when 6 is ready
11:44 QC_OK In the meantime I'll learn Perl.
11:44 QC_OK and by ready I mean a book or tutorial is written.
11:45 QC_OK left #perl6
11:46 mathw aawww
11:49 xdg left #perl6
11:50 snarkyboojum joined #perl6
12:03 macae joined #perl6
12:17 masak guess we should focus on getting the book published. :)
12:19 lichtkind joined #perl6
12:20 mathw :)
12:20 ruoso joined #perl6
12:23 athenot joined #perl6
12:27 SmokeMachine joined #perl6
12:29 bluescreen joined #perl6
12:42 mberends pmichaud: to make space for other emitters in future, would you consider renaming Perl6/Actions.pm to Perl6/Actions-Parrot.pm?
12:43 masak Perl6/Actions/Parrot.pm, perhaps?
12:44 mberends also fine, if preferred. but why, btw?
12:44 masak dunno. :: seems commoner in type names than -
12:44 masak and 'Actions' seems to "deserve" being a level on its own.
12:44 * moritz_ agrees with masak
12:45 * mberends prefers flatter directory hierarchies, but that's only personal taste
12:46 masak oh, definitely. it's a trade-off, no doubt.
12:51 mberends I'm currently looking for where to instantiate @*ARGS. The startup sequence is not entirely clear, but the code is nicely readable. pmichaud++
12:56 masak rakudo: my @l = [1,2,3], [4,5,6], [7,8,9]; my (@a, @b, @c) = ...; # how do I make each new array contain one sub-array of @l?
12:56 p6eval rakudo 1d4928: OUTPUT«Can't return outside a routine␤in Main (file <unknown>, line <unknown>)␤»
13:04 nacho joined #perl6
13:20 mssm joined #perl6
13:20 masak more generally, how do I assign a list of arrays in the RHS to a list of array variables in the LHS?
13:23 jnthn hi folks
13:24 moritz_ masak: do you want assignment or binding?
13:24 masak I'm not going to do any writing, so it doesn't really matter.
13:24 moritz_ (@a, @b, @c) := ([1, 2, 3], [4, 5, 6], [7, 8, 9]) should work
13:26 masak thanks.
13:26 takadonet morning all
13:26 masak takadonet: \o
13:26 masak rakudo: my (@a, @b, @c) := ([1,2,3], [4,5,6], [7,8,9]); say @a.perl
13:26 p6eval rakudo 1d4928: OUTPUT«rtype not set␤in Main (file <unknown>, line <unknown>)␤»
13:26 masak awww.
13:27 masak rakudo: my (@a, @b) := ([1], [2])
13:27 p6eval rakudo 1d4928: OUTPUT«rtype not set␤in Main (file <unknown>, line <unknown>)␤»
13:27 * masak submits rakudobug
13:28 masak so exactly the use case I could have used doesn't work.
13:33 * colomon crawls out of bed and backlogs
13:34 jaldhar joined #perl6
13:35 xomas joined #perl6
13:37 nacho joined #perl6
13:45 pugs_svn r29698 | masak++ | [S26] checked in Damian's latest changes
13:45 pugs_svn r29698 |
13:45 pugs_svn r29698 | It's the file from the email of 2009-08-16, except that I took the liberty
13:45 pugs_svn r29698 | of removing some spaces at the end of lines. Hopefully all non-significant.
13:46 masak now I can reply to TheDamian on p6l with good conscience :)
13:49 jnthn masak++
13:49 Juerd End-of-line whitespace should really always be non-significant.
13:49 mathw That's only just been done??
13:49 mathw wow
13:49 Juerd (except when quoted or escaped)
13:50 moritz_ Juerd: except for the 'whitespace' programming language :-)
13:50 Juerd moritz_: Grumble
13:50 mberends masak: thanks for the S26 update, I'd been unable to find it recently :)
13:50 Juerd I think it's time for a much narrower definition of "programming language".
13:51 masak mberends: then you need a better email client :P
13:52 mberends true, I stay out of most mailing lists, the signal to noise ratio puts me off
13:53 masak p6l has a funny kind of noise. :)
13:53 mathw moritz_: Whitespace was invented primarily to be irritating though, surely
13:54 masak it's made up of the thinking-out-loud of type theorists, other theorists, and generally people who have both feet firmly planted in the air.
13:54 mathw I used to be quite active on there
13:54 mathw A loooong time ago
13:54 nacho joined #perl6
13:56 jnthn masak: Yeah, though they have probably led me to write a doc on the Perl 6 type system once I get a moment to do it in.
13:57 * jnthn is tired of folks whining stuff isn't spec'd when in fact it's been spec'd well enough for me to implement the thing. :-/
13:57 masak :P
13:58 mberends whining--
13:58 mberends jnthn: is it true that all :init subs get called in lexical order before :main  ?
13:58 colomon jnthn: I think I made up for your lack of quantity in tests added back yesterday.  ;)
13:58 masak jnthn: I didn't say all type theoretic stuff on Perl 6 is noise.
13:58 colomon jnthn: you still win for number of test files, of course.  :)
13:58 masak but sometimes it does seem that things take off on a tangent and never really come back.
13:58 iblechbot joined #perl6
13:59 jnthn mberends: Yes and no.
13:59 mberends ugh
13:59 jnthn mberends: You usually want :load and :init
13:59 jnthn mberends: :load = run this when the PBC is loaded as a library
13:59 jnthn mberends: :init = run this when the PBC/PIR is run directory.
13:59 jnthn *directly
13:59 jnthn mberends: But yes, order should be lexical.
14:00 jnthn mberends: We rely on that.
14:00 masak I suggest that we here on #perl6 get in a few nice commits to S26 before the p6l crowd gets any ideas. (yes, I say this partly tongue-in-cheek.)
14:00 mberends in Perl6/Compiler.pir, I'm thinking of where to create @*ARGS. Line 117, possibly.
14:00 masak it would be nice to set the tone of things, as Richard Hainsworth just wrote.
14:00 colomon masak: I'm thinking that's a fine idea.
14:01 jnthn colomon: Nice - let's see how I do today. I spent most of the night awake with bad stomach pains. On the upside, I then slept the whole morning. :-/
14:01 colomon masak: my rough impression of p6l is that it's where p6 gets it's "theoretical academic language" reputation....
14:02 colomon jnthn: my wife left me sleep in, too.  :)
14:02 colomon *let
14:02 jnthn masak: It's not all noise, no. I was more addressing my furstration with some of what gets posted there.
14:03 mberends masak: after Rakudo * lands, I'll revisit S26 and Pod::Parser etc.  We'll see what of the spec is easily implementable.
14:05 jnthn mberends: I'd like to keep Compiler.pir a bit lighter.
14:05 masak colomon: I think so too.
14:05 jnthn mberends: Though it'd work there.
14:05 jnthn mberends: I popped $*IN etc's init in src/cheats/setup-io.pm
14:05 mberends cheats!
14:05 masak colomon: in some ways, I see p6l as a honeypot for the worst pie-in-the-sky types. (with full respect for all the reasonable people also on that list.)
14:06 jnthn mberends: I think I then abused that file and set up $*OS in there too.
14:06 jnthn :-/
14:06 jnthn mberends: If cheats feels horrible then pop it somewhere in glue ;-)
14:06 mberends ok
14:07 mberends glue/run.pir looks too... clean ;)
14:07 masak mberends: revisiting Pod::Parser sounds very good.
14:08 mberends Pod::Parser stalled when Rakudo consumed 15KB RAM ber byte of POD file, I hope the memory management has improved in the last year. Somehow, I don't think so.
14:08 colomon masak: :D
14:09 colomon mberends: actually, my impression is that memory management has indeed improved.
14:09 jnthn mberends: Gah, just stick it somewhere! :-P
14:09 mberends :-) cool!
14:09 masak speed has improved too.
14:10 masak everything is just... better.
14:10 clintongormley joined #perl6
14:10 mberends jnthn: stick it in glue? ok :P
14:11 colomon I think laziness will make a huge difference in speed and memory in the very near future.
14:11 pmichaud good morning #perl6
14:11 colomon o/
14:12 jnthn morning, pmichaud
14:12 mberends colomon: agreed, laziness is the biggest optimization possible
14:12 colomon jnthn, pmichaud: do we have a place to list to-do / bug things for rakudo for the next few days?  Seems like using RT is wasteful when things are changing so quickly.
14:13 masak good morning, pmichaud.
14:13 jnthn colomon: Maybe that "major ng features" wiki page?
14:13 pmichaud 12:41 <mberends> pmichaud: to make space for other emitters in future, would you consider renaming Perl6/Actions.pm to Perl6/Actions-Parrot.pm?
14:13 colomon (and storing the ones I know about only in #perl6 logs and my head seems problematic.)
14:13 pmichaud it's far more likely that I'll want Actions.pm to become more generic
14:13 pmichaud (i.e., less PIR dependencies)
14:13 jnthn Agree.
14:14 colomon jnthn: I'm cool with that if that's what you guys would like.
14:14 jnthn colomon: Or another wiki page
14:14 jnthn The wiki seems a decent place for short-term lists.
14:14 pmichaud anywhere in Actions.pm that we currently have pir::*,  :pirop, or :inline is somewhere that our abstraction level is wrong.  Those have always been intended as "just get the job done" as opposed to "this is the way to do things."
14:15 mberends pmichaud: I'd considered a Sprixel style V8 engine as an -Ofun subproject, to shake loose the Parrot dependencies
14:15 pmichaud in particular, I'm thinking that we should have a  nqp:: space.
14:15 pmichaud then nqp can provide a level of abstraction
14:16 pmichaud so, instead of, say,  pir::add($a, $b)    we'd have   nqp::add($a,$b)   and it's up to nqp to map that to the appropriate backend
14:16 mberends fair enough
14:16 pmichaud then we can also more easily determine exactly what primitives we want/need our backends to provide
14:16 jnthn pmichaud: I'd actually started reading pir:: as vm:: :-)
14:17 pmichaud could be vm:: also.
14:17 mberends anyhow, please don't waste time on that before Rakudo *
14:17 pmichaud afk for a bit, I have to grab pictures of the incredible amount of snow we received here yesterday :)
14:18 jnthn mberends: I've got a good chunk of interest in additional backends, but R* is kinda my priority for now. :-)
14:18 mberends 'course
14:18 frettled pmichaud: what about a JPEG of you shoveling snow? :)
14:18 mberends MPEG!
14:19 frettled that, too
14:20 masak there's a close to 100% probability of such image material ending up in someone's Perl 6 presentation.
14:20 frettled :D
14:20 jnthn :D
14:20 frettled One of my favourite places in Oslo hasn't had temperatures above freezing since 2009-12-13.
14:20 masak with the heading "Shuffling data" or similarly quippy.
14:20 jnthn "The Perl 6 devs are always shovelling cool stuff our way!"
14:20 masak :D
14:21 frettled jnthn: ooooh
14:21 masak "When your problem space is filled with snow, every solution looks like a shovel."
14:21 jnthn Sledge is more -Ofun.
14:22 mberends jnthn: starting to "stick" the @*ARGS init into glue/run.pir, ok?
14:22 jnthn mberends: wfm
14:22 jnthn I suspect we'll want 'em there for MAIN handling too.
14:22 pmichaud shoveling snow?  what's that?   ;-)
14:23 mberends jnthn: and %*ENV init too
14:23 pmichaud (and somehow you all seem to think I own a snow shovel.  Or that I could even find a place to purchase a snow shovel.  :-)
14:24 masak we'll simply have to add the snow shovel with Gimp, then.
14:24 jnthn mberends: Aye.
14:24 pmichaud after other @family members get dressed I might see about having my picture took :)
14:24 jnthn mberends: Though that needs more...attention. ;-)
14:24 jnthn (So assigning to it updates the environment :-))
14:25 jnthn That should be easier in ng than before though.
14:25 mberends jnthn: oh, you want a tied hash?
14:25 jnthn mberends: Eventually we will, I guess.
14:26 mberends ok, lemme see how hard it would be
14:26 jnthn Feel free to just copy to a normal hash for now, though.
14:27 jnthn Oh akshually
14:27 mberends copy - paste - compile - ship
14:27 jnthn mberends: One thing that may just work though it's evil if it does...
14:27 jnthn Get the Parrot env hash
14:28 jnthn $P0 = '&CREATE_HASH_LOW_LEVEL'(the_evn_hash)
14:28 jnthn And install $P0 in the right place :-)
14:28 jnthn It may work. :-)
14:28 mberends yes, sounds feasible
14:28 jnthn (Alternatively, it may explode. :-))
14:29 colomon boom baby boom!
14:29 frettled heh
14:30 pmichaud http://picasaweb.google.com/patrick.michaud/20100212  # snow photos.  Undoubtedly "no big deal" to people who already live in snow-climates :)
14:31 pmichaud suggestion:  for %*ENV, use the code/approach that was used in master
14:31 mberends ok, thanks pm
14:32 colomon that's a pretty decent snowfall
14:32 pmichaud it's huge for here
14:32 jnthn pmichaud: My only thought is that since our hashes now has-a Parrot hash which it uses for storage, we may get the write-semantics just by sticking the Parrot Env PMC in to our Perl 6 Hash as its backing storage.
14:33 colomon looks like enough to cross country ski
14:33 pmichaud jnthn: yes, we might
14:33 pmichaud colomon: yes, it could very well be
14:33 finanalyst left #perl6
14:33 pmichaud jnthn: I wasn't necessarily planning to do has-a Parrot hash for hashes... any particular reason it needs to be that way?
14:34 jnthn pmichaud: Yes
14:34 jnthn pmichaud: Hash should be a role really.
14:34 pmichaud okay.
14:34 jnthn pmichaud: It works out quite nicely that way.
14:34 jnthn pmichaud: I wrote pretty much the lot, including !STORE, in Perl 6.
14:36 frettled pmichaud: don't worry, we can commiserate anyway :D
14:37 jnthn pmichaud: Nice snow!
14:37 jnthn Looks like about as much as I have here :-)
14:37 pmichaud !STORE looks like it'll be really slow though :)
14:39 pmichaud still, I'm okay with it.
14:39 pmichaud perhaps %!storage instead of $!storage ?
14:40 jnthn pmichaud: I'm a little wary of that. :-)
14:40 jnthn pmichaud: It'd probably be OK
14:40 pmichaud pir::new__Ps('Hash')   probably needs to be  pir::root_new
14:40 jnthn pmichaud: Yeah but...how to write a key in nqp?
14:41 jnthn Agree in principle though.
14:41 jnthn Slow - yeah. :-/
14:42 jnthn pmichaud: It'd sorta be nice to be able to write inline NQP in the setting. :-)
14:42 pmichaud there's still Q:PIR
14:44 mberends so would it be better to build %*ENV with !STORE from core/Hash.pm (despite the slowness)?
14:44 pmichaud mberends: I think jnthn was hinting earlier that one can get %*ENV fairly simply if we just create a Hash object where $!storage is set to a Parrot Env object
14:44 jnthn pmichaud: That's exactly what I wanted to avoid. :-|
14:45 pmichaud but I'm thinking that's not really the case, because Proxy objects tend to disappear once written to.
14:45 pmichaud *now thinking
14:46 jnthn Oh. :-/
14:46 pmichaud let me review how we did things in master
14:46 mberends relying on the os process environment is going to be inefficient
14:48 mberends master uses hash_to_env(), eg in src/old/builtins-old/system.pir
14:49 pmichaud we somewhat have to rely on the os process environment, though.  We can't assume that our copy of the environment is the "correct" one.
14:49 pmichaud i.e., there's a synchronization problem.
14:49 mberends then we're back to a tied hash
14:49 mberends that is a more "normalized" way
14:50 pmichaud right.  I'd suggest creating a Hash object where $!setting is initialized to a Parrot Env object... and then let's see what breaks or doesn't work.
14:50 athenot joined #perl6
14:50 mberends ok, thanks again
14:50 pmichaud for the moment, this might be most easily done as an INIT { ... }  block in the setting somewhere.
14:50 athenot joined #perl6
14:50 frettled pmichaud: Hmm, I don't think the OS allows other processes to modify the environment for running processes
14:51 pmichaud frettled: libraries.
14:51 pmichaud frettled: we could call out to a library (in the same process) that modifies the environment.
14:51 mberends frettled: you're correct, only child processes are affected
14:51 synth joined #perl6
14:52 mberends ...and the current process
14:52 pmichaud I'm fine if we go ahead and go with a "shadow hash" for the time being, and do a process like master did.
14:52 mberends the libraries use case is a valid point in favor of a tied hash
14:52 pmichaud all master did was have its own copy of the environment hash as a plain hash, and then re-set the OS environment whenever it was about to spawn a child process
14:53 mberends indeed
14:53 frettled hmm
14:53 pmichaud right now "working code" is sufficient, we don't have to have "works in every possible case" code just yet.
14:53 pmichaud anyway, whoever writes the code gets to decide for now :)
14:54 frettled pmichaud: I believe that risk is something that the programmers just will have to live with.
14:54 mberends let's try a tied hash first, and fallback to a shadow hash only as Plan B
14:59 frettled Hmm, I don't find any specification of the behaviour of %*ENV.
14:59 frettled My Google-fu may be weak, of course.
15:01 frettled In any case, I think it's fair to use %*ENV as the environment at the time of process creation (as seen from P6's POV), and if libraries somehow modify environment without updating it inside the process -- I'm unsure how this could be expected to work in any language, anyway -- then that's a crying shame.
15:01 frettled Hmm.  What does POSIX say?
15:01 PerlJam frettled: "like Perl 5" is probably as good as it gets for the spec on %*ENV
15:04 frettled mm
15:05 mberends perldoc perlvar does not mention in-process behavior, only that it affects child processes
15:07 frettled SUS v2 is a bit unclear here, hmm.
15:11 aesop joined #perl6
15:15 frettled I don't see any way in which POSIX allows environment variables to be set by anything but the main process, that is, you can trust that when you are the process, nothing will change your variables for you.
15:15 frettled Not even your parent.
15:16 frettled If you're multi-threading, that's probably another beef, but then it would be sensible to keep local copies of the environment variables per thread or at least some sort of mutex to avoid race conditions.
15:16 frettled (I don't see any mention of this in SUSv2, though)
15:16 frettled But I may just be too lousy at searching.
15:17 mberends correct. you could do such evil things in DOS, but never in Unix
15:18 mberends what would we prefer in Perl 6 for the multi-threading case?
15:18 frettled A choice?
15:18 mberends :/
15:18 frettled heh
15:18 moritz_ in Perl 6, all variables from outer scopes are shared
15:19 moritz_ only if a thread creates a new lexical variable, it is private
15:19 frettled I think there's a good case for that.  For the case where a thread needs a local scope, the programmer can just copy.
15:20 PerlJam or use temp
15:20 mberends good, then it will be fun to try using jnthn++'s !STORE :)
15:20 clintongormley joined #perl6
15:21 masak bet it has lots of beer. :)
15:21 mberends heh
15:21 jnthn :-)
15:23 * pmichaud decides that for today, Array and Seq will be eager.
15:23 jnthn masak: Bizzarely, the word "beer" can not be found anywhere in the Rakudo source. :-/
15:23 masak .oO( "One flew over the eager Seq" )
15:23 jnthn <groan>
15:24 masak jnthn: surely that's a mistake that needs fixing.
15:24 barney joined #perl6
15:24 jnthn masak: Quite! File RT!
15:24 jnthn :-)
15:25 masak my conscience won't allow me to do that :)
15:27 frettled hehe
15:35 justatheory joined #perl6
15:38 alester joined #perl6
15:43 masak so binding is the only known way to assign a many-array RHS to a many-array LHS?
15:44 pmichaud jnthn: ping
15:44 masak I was hoping there was some way involving subsignatures or something...
15:45 cognominal joined #perl6
15:45 nihiliad joined #perl6
15:46 wanradt_ joined #perl6
15:47 rgau joined #perl6
15:54 Psyche^ joined #perl6
15:54 jnthn pmichaud: pong
15:54 pmichaud did we not implement setprophash ?  I thought we did.
15:54 jnthn pmichaud: I remember discussing it.
15:54 pmichaud okay, guess we didn't.
15:54 jnthn pmichaud: Multiple times.
15:54 jnthn pmichaud: I don't remember implementing it myself.
15:54 jnthn It should be easy.
15:55 pmichaud I think I'll avoid it.
15:55 pmichaud next question :-)
15:55 jnthn heh
15:55 jnthn I can write it for you fairly quick if you want it. :-)
15:55 pmichaud after looking at Seq and Array more, I'm seriously considering making them array of Perl6Scalar
15:55 cognominal joined #perl6
15:56 jnthn Heh. We've been back and forth on that one a few times too. :-)
15:56 jnthn The main argument against is just than it's extra GCables.
15:56 pmichaud I think we might actually end up with fewer GCables anyway, though.
15:56 pmichaud or roughly the same
15:57 pmichaud as it is, making copies of values is generating lots of GCables
15:57 jnthn That's a Good Point.
15:57 pmichaud it might be nice to make a stronger distinction between mutables (Perl6Scalar) and immutables (values)
15:57 jnthn Yes, true.
15:57 jnthn I've no real objekshuns.
15:57 pmichaud I'm also thinking a bit in terms of targeting alternate backends
15:57 jnthn Hm
15:57 uniejo joined #perl6
15:58 pmichaud i.e., if we pick v8 or jvm or some other backend, I think it likely that aggregates will have to be array-of-container there too
15:58 jnthn Yes, that is true
15:58 jnthn The one that bothers me more...
15:58 jnthn ...is aggregates of native types.
15:58 jnthn But we can cross that bridge when we come to it, I guess.
15:58 pmichaud that was discussed during the conference call
15:59 pmichaud TimToady++ says that after Rakudo * is out, we probably need to put some energy into  array-of-int  and compact structs
15:59 pmichaud (at least I think that's what he said :)
15:59 * pmichaud checks the minutes
15:59 pmichaud it didn't make it into the minutes
16:00 jnthn We need to re-do the way our objects work and store things too.
16:00 pmichaud anyway, I agree, that one is a bit bothersome.  but I'm also of the "bridge-when-we-come-to-it" mentality
16:00 pmichaud oh, yes, having to redo objects might be a pain.
16:00 pmichaud hm.
16:00 jnthn I think that's a related bridge.
16:01 jnthn I want to re-do objects with a fuller picture of the alternative backend scene.
16:02 jnthn That is, emerge with viable P6opaque and KnowHOW impls for Parrot + at least one other VM.
16:02 pmichaud okay, I'm going to try  array-of-Perl6Scalar and see what sort of pain that brings
16:02 jnthn But I really feel that's something to focus on after R*. :-)
16:02 jnthn OK, go for it.
16:03 jnthn I need to spend an hour or so on $other-thing and then I can look more properly at some rakudo bits.
16:04 pmichaud one thing I haven't quite worked out
16:04 pmichaud for    $a = $b
16:04 pmichaud what I'd like to have happen is that $a and $b are Perl6Scalar, both referencing a common underlying immutable
16:04 pmichaud ummm, hmm.  maybe that's not so good
16:04 * pmichaud waffles again.
16:05 pmichaud anyway,  in that case, I'd need to descalarref $b to get to its underlying value
16:05 pmichaud but it needs to be only one level of descalarref
16:05 jnthn Yes, true.
16:05 jnthn descalarref is relatively cheap anyway.
16:05 pmichaud right
16:06 pmichaud but the "only one level of descalarref" is the tricky part
16:06 jnthn Yeah :-/
16:06 jnthn How do we add extra constraints and all that lot.
16:06 colomon ng: my $z = 1i; say " $z";
16:06 jnthn Takes more care.
16:06 p6eval ng 46e2ef: OUTPUT« 0 + 1i␤»
16:06 colomon ng: my $z = 1i; say "$z";
16:06 p6eval ng 46e2ef: OUTPUT«0 + 1i␤»
16:06 colomon ng: my $z = 1i; say " $z ";
16:06 p6eval ng 46e2ef: OUTPUT« 0 + 1i ␤»
16:07 jnthn pmichaud: Oh well, at least it's not as complex as what colomon++ is doing ;-)
16:07 pmichaud :-)
16:07 colomon arrrgh.
16:07 pmichaud maybe I'll just spend an hour trying it out and see what happens.
16:07 jnthn :-)
16:07 jnthn pmichaud: Go for it.
16:08 colomon dang it, this bug was easy to reproduce yesterday...
16:08 colomon ng: my $a = 3/2; say "$a ";
16:08 p6eval ng 46e2ef: OUTPUT«Multiple Dispatch: No suitable candidate found for 'concatenate', with signature 'PPP->P'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
16:09 colomon bingo
16:09 jnthn ewww
16:09 colomon ng: my $a = 3/2; say " $a";
16:09 p6eval ng 46e2ef: OUTPUT« 1.5␤»
16:09 jnthn ng: my $a = 3/2; say $a ~ " ";
16:09 p6eval ng 46e2ef: OUTPUT«1.5 ␤»
16:09 barney joined #perl6
16:10 pmichaud it's likely an issue with pir::join
16:10 jnthn colomon: If we could get strings to use Perl 6's ~ to stitch things together, we'd not have the problem.
16:11 pmichaud oh, no, it's a problem with vtable concatenate
16:11 pmichaud it doesn't know how to concatenate a Rat with a String (or maybe Str)
16:11 pmichaud maybe add a vtable in Mu
16:11 jnthn pmichaud: Right. Parrot's MMD values the left argument more, I think. :-/
16:11 colomon pmichaud: but it does know how to concatenate a String with a Rat.
16:12 pmichaud colomon: sure, the underlying concatenate operation for String is much more forgiving
16:12 colomon anyway, I've just made a page, and that's the first bug on it.
16:12 colomon http://wiki.github.com/rakudo/rakudo/ng-issues
16:12 jnthn pmichaud: Is there any way we could just use Perl 6's infix:<~>?
16:12 pmichaud jnthn: that'd be somewhat slow.  And we're bound to miss some.
16:12 colomon ng: my $a; say $a.Str
16:12 pmichaud I'd rather fix concatenate.
16:12 jnthn OK.
16:12 p6eval ng 46e2ef: OUTPUT«Method 'Str' not found for invocant of class ''␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
16:12 jnthn *nod*
16:13 pmichaud that's actually pretty simple -- let me create a patch.
16:13 colomon ng: my $a; say $a ~ "hello"
16:13 p6eval ng 46e2ef: OUTPUT«Mu()hello␤»
16:13 masak jnthn: oh, by the way. I tried your suggested fix to my anon-enum patch yesterday.
16:14 jnthn masak: oh, did you? :-)
16:14 masak jnthn: I'll nopaste the result.
16:14 jnthn And? Que passo?
16:14 colomon ng: my @a; @a.push: "a";
16:14 p6eval ng 46e2ef: OUTPUT«Null PMC access in get_integer()␤current instr.: 'perl6;Seq;elems' pc 268002 (src/gen/core.pir:24115)␤»
16:14 pmichaud http://nopaste.snit.ch/19577   # try this
16:15 masak jnthn: http://gist.github.com/302697
16:17 colomon pmichaud: trying.
16:17 pmichaud pmichaud@orange:~/ng$ ./perl6
16:17 pmichaud > my $a = 3/2;  say "$a ";
16:17 pmichaud too many positional arguments: 3 passed, 2 expected
16:17 pmichaud so, not quite.
16:17 jnthn masak: Right, so that means it parsed.
16:17 masak jnthn: oh! so good news? :)
16:18 masak jnthn: where do I attempt to put in the actual stuff it should do, then? Actions.pm?
16:18 jnthn masak: I think it's just saying that you didn't have an action method that made a PAST node for the enum declarator.
16:18 jnthn masak: Yes.
16:18 masak gotcha. will muddle on. :)
16:19 colomon pmichaud: why would it pass three arguments to concatenate?
16:19 pmichaud =item C<PMC *concatenate(PMC *value, PMC *dest)>
16:19 pmichaud (self being an implied third argument)
16:20 masak that error message needs to go away.
16:20 masak or it will be at the top of the newbie FAQ.
16:20 Trashlord hello
16:20 masak Trashlord: yo!
16:20 colomon pmichaud: ah, that makes sense.
16:20 jnthn hi Trashlord
16:20 Trashlord how's it going?
16:21 masak Trashlord: forwards. and soon weekend, too!
16:21 masak Trashlord: how's going with you?
16:21 pmichaud I don't know how :vtable('concatenate') is supposed to work in that case, though.
16:21 Trashlord had work at 3am today, just woke up from resting after it, heh
16:23 masak Trashlord: working nights?
16:23 Trashlord yeah, sometimes
16:23 Trashlord you get used to it eventually
16:24 masak yes. unfortunately. :/
16:24 Trashlord yeah :\
16:24 Trashlord kinda ruins the rest of your day
16:25 Trashlord at least I got a day off tomorrow, so getting back from work at 10am today doesn't matter that much
16:28 explorer__ joined #perl6
16:28 payload joined #perl6
16:29 pmichaud colomon: okay, found it. patch coming.
16:30 colomon pmichaud: \o/
16:31 masak doesn't this quote from Steele's "Gronwing a Language" sound like a very fit description of the Perl 6 community/process? http://gist.github.com/302714
16:31 colomon Gronwing: A Language   :)
16:31 masak s/Gron/Gro/ :)
16:32 pmichaud http://nopaste.snit.ch/19580  # colomon, try this one
16:33 IllvilJa masak: thanks for the encouraging FAQ regarding parrot error messages you blogged about earlier this week ;-).
16:33 masak IllvilJa: you're welcome :)
16:33 pmichaud $ ./perl6
16:33 pmichaud > my $a = 3/2;  say "$a "
16:33 pmichaud 1.5
16:34 * masak always enjoys being the fly in the ointment, if there's a chance it has good side effects
16:34 pmichaud "Waiter!  There's a fly in my ointment!"
16:34 masak :)
16:35 IllvilJa On a more serious note... has rakudo-ng (the one with the new regex engine and nqp stuff, if I'm not mistaken) become THE rakudo that get's downloaded when doing a 'git pull' for rakudo?
16:35 pmichaud IllvilJa: not yet.  very soon.
16:35 moritz_ not quite there yet
16:35 Tene I can't say that I really understood that blog post.
16:35 pmichaud IllvilJa: hopefully today, if I can get array and seq worked out.
16:35 pmichaud it's really really ugly code :-(
16:35 IllvilJa \o/
16:36 moritz_ what about hashes? do they work again?
16:36 IllvilJa Ugly code that does wonders still does wonders.
16:36 pmichaud fsvo "work"
16:36 pmichaud those will be working shortly thereafter, I'm sure.
16:36 IllvilJa I'll do a daily 'git pull' and see what comes down :-D
16:36 pmichaud it's again trying to deal with the mismatch between Parrot's PMC model and Perl 6's container/value model
16:37 IllvilJa Is rakudo-ng faster?
16:37 pmichaud IllvilJa: should be, yes.  I don't know that we have any direct comparisons.  But under the hood it's doing a lot less work.
16:37 pmichaud Also, Parrot has done some significant speedups in the past month or so.
16:38 IllvilJa Ok... I got a dog slow experimental CGI script written in Rakudo Perl6, so once rakudo-ng hit's the main trunk, I suppose I can do a (very subjective) test.
16:38 pmichaud well, when ng hits the main trunk, it'll still be a significant regression
16:38 pmichaud but I think we can prioritize a few features
16:39 pmichaud afk for a bit
16:40 masak Tene: the mistyped-class-in-a-namespace blog post?
16:40 jnthn Hashes sorta work - slices don't and they're missing a bunch of built-ins.
16:41 Tene masak: Yes.
16:41 IllvilJa Thanks for the info... I'll be back, but it's dinner time right now (and small kids we try to get to the table... interesting task at times).
16:41 IllvilJa Thanks for your hard work on rakudo and parrot!
16:41 masak Tene: it's basically about a bit of frustration I run into sometimes.
16:42 masak Tene: I've been bitten by that error messages four or five times.
16:42 Tene masak: Right, I understood the content, but I couldn't work out whether you were saying "I'm frustrated." or "You guys all suck." or "Obviously nobody cares about usability" or "Other things are great, so this stands out notably as bad", or ...
16:43 colomon pmichaud: make spectest passes for me with that fix.
16:43 masak Tene: actually, I tried to represent both the user side ("this is really not an acceptable error") and the dev side ("we know, and it's not always simple to fix") accurately.
16:44 pmichaud colomon: feel free to commit/push then, I'm a bit distracted here for a while
16:45 colomon pmichaud: I'm on it.
16:45 masak Tene: there's a clear component of "I'm frustrated" in the post, but I went to great lengths not to sound accusing.
16:45 masak "I'm frustrated" is an undeniable part of the Rakudo user experience, as of 2008/2009/early 2010 :)
16:46 jnthn Clearly things were better in 2007!
16:46 PerlJam jnthn++
16:46 masak good old days :)
16:47 Tene masak: I guess I just felt like it was a mixed message, which you're saying it actually was, so I guess I understood it after all. :)
16:47 masak it's deliberately mixed, yes.
16:47 masak that's what it's like to write Perl 6 code, too.
16:48 colomon ack, I think I just borked my ng install.  :(
16:48 masak you kind of root for the good guys (the devs), but all the same you're getting these strange, inexcusable error messages sometimes :)
16:48 masak s/inexcusable/LTA/
16:50 masak also, I hope I blog positively often enough that I have some panic capital to burn on the occasional rant... :)
16:51 Tene masak: Certainly.  I wasn't objecting to you ranting, just trying to figure out if you actually were.
16:51 masak guess I were.
16:51 jnthn .oO( "What it's like to be a Rakudo dev" could make a good blog post one day )
16:52 masak jnthn: sure, why not?
16:52 jnthn masak: Only the same reason as "why not" everything else - there's only so many hours in a day. :-)
16:53 dalek rakudo/ng: bb80570 | (Solomon Foster)++ | src/builtins/Mu.pir:
16:53 dalek rakudo/ng: pmichaud++'s patch which adds Mu.concatenate and Mu.concatenate_str.
16:53 dalek rakudo/ng: review: http://github.com/rakudo/rakudo/commit/bb80570ec037c5995b575f29138531f850ed35cd
16:53 masak "Hello, did you implement infinite-dimensional hashes yet?" -- "What, you didn't fix the bug that I submitted half a month ago yet?" -- "When's Perl 6 coming out?"
16:58 colomon I often find myself asking those same questions.  ;)
16:58 masak :)
16:58 masak I don't so much anymore.
16:58 masak I'm more like, "ok, here's what works today. what can we build with it?"
17:00 dual joined #perl6
17:01 pugs_svn r29699 | colomon++ | [t/spec] Remove initial spaces in test description strings added yesterday as a workaround for a bug which has now been fixed.
17:03 * moritz_ wishes a good weekend to everybody and says "ciao"
17:03 masak ciao, moritz_!
17:05 colomon moritz_: have a good weekend!
17:10 masak by the way, I saw that rindolf showed up on the channel the other day, saying "ok, I'm ready to learn a bit of Perl 6 now". that's actually quite significant, considering his stance as of 2004. http://freshmeat.net/articles/critique-of-where-perl-6-is-heading
17:10 PerlJam masak: just because he's ready to learn it doesn't mean he's changed his position  :)
17:11 masak true.
17:11 masak but I think he has, too.
17:11 masak the comments are interesting in themselves... first, tens of confused commenters trying to defend Perl 6 from a point of little information, then Schwern and Ovid commenting the living daylights out of the post...
17:12 masak ...then a lot of people agreeing with Schwern and Ovid, and finally, years later, two jerks assuming that Perl 6 is vapourware.
17:13 masak I'm pondering whether a reasoned comment might help de-confuse people reading all the way down.
17:15 masak anyway, not right now. I'm off to a housewarming party! o/
17:16 SmokeMachine joined #perl6
17:18 cotto_work joined #perl6
17:30 colomon ng: (1..10).grep(say $_; 1;).eager
17:30 p6eval ng bb8057: OUTPUT«Confused at line 1, near "(1..10).gr"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (src/stage0/HLL-s0.pir:328)␤»
17:31 colomon ng: (1..10).grep({say $_; 1;})
17:31 p6eval ng bb8057:  ( no output )
17:31 colomon ng: (1..10).grep({say $_; 1;}).eager
17:31 p6eval ng bb8057: OUTPUT«Mu()␤Mu()␤Mu()␤Mu()␤Mu()␤Mu()␤Mu()␤Mu()␤Mu()␤Mu()␤»
17:31 jnthn Epic fail. :-/
17:32 colomon Just working on updating the issues wiki.  ;)
17:32 colomon actually, I was starting to look at sin.t, and then remembered these errors that should get added to the list.
17:34 colomon And now I'm hitting them!
17:34 jnthn ooh, trig!
17:34 colomon I won't really get to it today, I don't think, but I thought I'd take a peek and see where we are today.
17:35 colomon rakudo: say pi.Rat(1e-10);
17:35 p6eval rakudo 1d4928: OUTPUT«3.14159265361894␤»
17:35 colomon rakudo: say pi.Rat(1e-10).perl;
17:35 p6eval rakudo 1d4928: OUTPUT«312689/99532␤»
17:38 pmurias joined #perl6
17:39 colomon If I take away the (now incorrect) Num in AngleAndResult.new, switch pi to (312689/99532) throughout, and $_ to $^a in greps, we pass 40 trig tests before seg faulting.
17:39 colomon That's not as bad as I fear.ed.
17:39 colomon afk # running errands.
17:45 cotto_work joined #perl6
17:57 pmichaud back again
18:01 pmichaud what's the intended difference between "NG issues" and "NG major features needed" pages?
18:01 colomon pmichaud: just trying to dodge the "major features" label.
18:01 pmichaud okay
18:01 pmichaud maybe just combine the two into "ng issues" then
18:01 colomon sort of "small scale but useful features".
18:02 colomon I've certainly no objection to that.
18:03 mberends I thought it meant short term buglets not worthy of trac reporting
18:04 jackyf joined #perl6
18:04 colomon mberends: my idea was that if they weren't fixed by this time next week they probably went into trac.
18:04 pmichaud s/trac/rt ?
18:05 stephenlb joined #perl6
18:05 mberends makes sense. s/trac/rt
18:05 colomon s/trac/rt
18:10 colomon ack, I'm afraid the sin.t may be hitting the random seg fault bug.
18:10 colomon Program received signal EXC_BAD_ACCESS, Could not access memory.
18:10 colomon Reason: KERN_INVALID_ADDRESS at address: 0x0873c000
18:10 colomon 0xffff07c7 in ?? ()
18:11 colomon (gdb) bt
18:11 colomon #0  0xffff07c7 in ?? ()
18:11 colomon #1  0x00c2fecc in ?? ()
18:11 colomon Previous frame inner to this frame (gdb could not unwind past this frame)
18:13 kaare_ joined #perl6
18:14 ShaneC joined #perl6
18:15 colomon That doesn't seem like the usual bt pattern for it.  But it does change location depending on where I add "say" statements...
18:17 cognominal joined #perl6
18:30 athenot joined #perl6
18:35 pmichaud jnthn: If you could put together a 'setprophash' opcode, I think that would be very useful.  I'm guessing it will require a new vtable.
18:35 pmichaud (I'm happy to be wrong about that, however :-)
18:36 pmichaud oh, I suppose it could be done with just a new opcode.  Anyway, when one is available, I can probably use it for some efficiency gains.
18:36 iblechbot joined #perl6
18:38 athenot joined #perl6
18:39 jnthn pmichaud: OK. I just had a nap, now I need to go and try to find something appealing to eat (my stomach is rather messed up :-|)...should be able to churn it out later today. :-)
18:39 pmichaud that's fine, no rush.  it's an optimization more than a "needed to make things work"
18:39 jnthn Will skip the new vtable and just stick it in our dynops for now.
18:40 pmichaud if it's in our dynops, I'd prefer it to not be named whatever we think the parrot opcode will be named, then
18:40 jnthn Once we're satisfied we need it, we can get it into Parrot.
18:40 jnthn Oh, good point.
18:40 pmichaud (avoids naming clashes if/when it goes into parrot)
18:40 jnthn experimental_setprophash :-)
18:40 pmichaud just x_setprophash is fine
18:40 jnthn yes, much finer :-)
18:41 jnthn OK...supermarket time.
18:41 pmichaud I'm getting spectest failures on ng...expected?
18:41 jnthn nopaste?
18:41 pmichaud I'm re-running with a fresh ng checkout at the moment... will nopaste when that's ready
18:41 pmichaud (may take a few minutes)
18:41 jnthn OK
18:42 pmichaud anyway, I have   my @a;  @a[0]++;  say @a[0];    running locally
18:42 jnthn I'll glance 'em when I get back...I only am aware of some non-zero exit codes but without fails.
18:42 cognominal joined #perl6
18:42 jnthn And problem with sign.t that is I think specific to my platform's handling of zeros or NaN or something.
18:42 jnthn back soonish...
18:44 Maddingue joined #perl6
18:47 cognominal joined #perl6
18:47 Maddingue joined #perl6
18:56 wanradt_ joined #perl6
19:04 pmichaud jnthn: correct, all I'm getting are the non-zero wait status errors as well.
19:12 Psyche^ joined #perl6
19:16 orafu joined #perl6
19:17 jnthn pmichaud: Yeah, they're kinda annoying. :-/
19:17 Psyche^_ joined #perl6
19:20 uniejo ng: (7 ~~ 5..10).Bool.say; (5..10 ~~ 7).Bool.say # Is this supposed to work both ways around?
19:20 p6eval ng bb8057: OUTPUT«sh: ./perl6: No such file or directory␤»
19:21 pmichaud uniejo: no, ~~ isn't commutative.
19:21 uniejo ok
19:21 pmichaud the first asks if 7 is in the range 5..10  (yes).   The second asks if 5..10 smart matches with an Int 7  (it doesn't)
19:22 dalek rakudo/ng: b577776 | pmichaud++ | src/builtins/ (2 files):
19:22 dalek rakudo/ng: Add Seq!elem and Array!elem as method for creating element PMCs
19:22 dalek rakudo/ng: in the Seq/Array and initializing properties.  This cleans up
19:22 dalek rakudo/ng: some of the array issues, such as  "my @a;  @a[0]++;  say @a[0];".
19:22 dalek rakudo/ng: review: http://github.com/rakudo/rakudo/commit/b5777764f78d93073cbe1a461e19049795b46773
19:24 ash__ joined #perl6
19:25 jnthn pmichaud++
19:25 pmichaud now to restore list assignment
19:26 jnthn \o/
19:31 Chillance joined #perl6
19:34 dalek rakudo/ng: fb6d8a5 | pmichaud++ | src/builtins/assign.pir:
19:34 dalek rakudo/ng: Clean up assignment to scalars.
19:34 dalek rakudo/ng: review: http://github.com/rakudo/rakudo/commit/fb6d8a5108ae719f811e2ba157bfee431601d368
19:38 snarkyboojum joined #perl6
19:38 stephenlb joined #perl6
19:40 clausi joined #perl6
19:44 ash__ what is '::=' called? a read only bind?
19:44 PerlJam compile-time bind
19:44 pmichaud it's now a read-only bind
19:45 PerlJam (well, that's what *I* call it :(
19:45 PerlJam er, :)
19:45 pmichaud ("compile-time bind" is outdated)
19:45 pmichaud in particular, it no longer happens at compile-time :)
19:46 PerlJam read-only bind means what exactly?  After the bind the container is ro?
19:46 pmichaud Yes.
19:46 PerlJam but you can still rebind, yes?
19:46 pmichaud not sure about that.
19:46 pmichaud > my ($a, $b) = 7, 9;  say "$a $b"
19:46 pmichaud 7 9
19:46 pmichaud \o/
19:47 ash__ yay, list assignment!
19:47 pmichaud spectesting now, then push.
19:48 ash__ i was talking with someone in here the other day about custom indices on arrays, is that still practical? (or needed)? its in S09 under "User Defined array indexing"
19:48 ash__ it seems like it turns @arrays into effectively ordered hashes, unless i am completely wrong in my understanding of how that works
19:48 PerlJam ash__: "practical"?  For whom?  I think that practicality is kind of the point.
19:49 ash__ well, they seem like hashes at that point, so why not use a hash?
19:49 PerlJam ash__: because you require the ordering.
19:49 ash__ unless they want to use them as ordered hashes, which i guess makes sense to have the distinct
19:51 dalek rakudo/ng: bbcb6b0 | pmichaud++ | src/builtins/Parcel.pir:
19:51 dalek rakudo/ng: Add Parcel!STORE (list assignment).
19:51 dalek rakudo/ng: review: http://github.com/rakudo/rakudo/commit/bbcb6b0efb220ca00d4e5487f4d1eeb6398e2930
19:51 PerlJam ash__: one of the ways I look at it is that custom indices are very useful for domain-specific problems so that you don't have to manage the mapping from problem-domain identifier to array index yourself.
19:52 pmichaud okay, list assignment and arrays are now back in the ng branch.  I'll be interested to see what's still broken about them.
19:52 pmichaud I'll do slices next.
19:53 PerlJam pmichaud: and then merge?
19:53 pmichaud fsvo "merge", yes.
19:53 PerlJam okay, how about "make ng master" then?
19:53 pmichaud yes.
19:53 PerlJam cool
19:55 orafu joined #perl6
19:56 takadonet !!!!
20:01 justatheory joined #perl6
20:04 jnthn pmichaud: Wow, that was quick! :-)
20:06 colomon omg, I go away and there is amazing stuff pushed.  \o/
20:09 mberends just curious, what files/code do .loadlib 'perl6_group', 'perl6_ops' and 'math_ops' load?
20:10 jnthn mberends: dynpmcs and dynops
20:10 jnthn mberends: perl6_group refers to a DLL/SO from src/pmc/*.pmc
20:10 jnthn perl6_ops.[dll|so] is from src/ops/perl6.ops
20:11 mberends thx, writing a few docs about Rakudo architecture (also for the coming talks)
20:14 jnthn \o/
20:15 jnthn mberends: Commits to docs/ welcome, imo. :-)
20:15 mberends will do :)
20:19 pmichaud perl6_group is the dynamic PMCs
20:19 pmichaud perl6_ops are the dynamic ops
20:19 pmichaud math_ops  are Parrot's dynamic math ops
20:20 mberends the =head1 DESCRIPTION \n =cut in Perl6/Compiler.pir looked so small and helpless, it desperately needed fulfilment ;) thx pmichaud
20:25 mberends jnthn: thanks, docs/compiler_overview is a better place for what I was writing.  I'll update that instead and refer the POD in Perl6/Compiler.pir to that.
20:26 orafu joined #perl6
20:31 nacho joined #perl6
20:38 jnthn mberends++
20:39 mberends updating docs/compiler_overview.pod will take lots of forgiveness for misunderstandings ;)
20:41 bluescreen joined #perl6
20:43 dalek rakudo/ng: f8ea414 | jonathan++ | src/ops/perl6.ops:
20:43 dalek rakudo/ng: Implement x_setprophash dynop for pmichaud++.
20:43 dalek rakudo/ng: review: http://github.com/rakudo/rakudo/commit/f8ea414c9294b12b5cd9115bce96fb5d5a8066fa
20:53 Trashlord joined #perl6
20:55 dalek rakudo/ng: 90ba35c | (Solomon Foster)++ | t/spectest.data:
20:55 dalek rakudo/ng: Turn back on S32-array/end.t, S32-array.pop.t, S32-array/shift.t, S32-list/end.t, and S32-list/first.t.  pmichaud++
20:55 dalek rakudo/ng: review: http://github.com/rakudo/rakudo/commit/90ba35c22e592d98dcbcb2fdb53dfaceee953b30
20:55 dalek rakudo/ng: 1aa8acf | (Solomon Foster)++ | src/ops/perl6.ops:
20:55 dalek rakudo/ng: Merge branch 'ng' of git@github.com:rakudo/rakudo into ng
20:55 dalek rakudo/ng: review: http://github.com/rakudo/rakudo/commit/1aa8acf0cf862068ed62a17940defc6094a7d2f1
20:55 jnthn Wow!
20:55 mberends colomon++
20:55 jnthn colomon: I think I've worked out the grep issue.
20:56 jnthn Just need to spectest to make sure I didn't break anything else while fixing it.
20:57 colomon mberends: pmichaud++ gets all the credit for this one.  All I did was have a notion that those tests were being blocked by the my @a; bug.
20:58 PerlJam pmichaud: if you use "git pull --rebase" or put "rebase=true" in your .git/config under the appropriate branch, you won't see those "merge A into B" commits anymore.
20:58 colomon I didn't count the exact number, but I think those 5 got us back well over 100 tests.
20:58 mberends :D
20:58 colomon PerlJam: that's my fault, I think.  I thought it was git pull --ff ?
20:59 * jnthn does git pull --rebase
20:59 colomon --rebase sounds right to me, now that PerlJam++ has mentioned it.
20:59 colomon I just got out of the habit during the long dark tea-time of ng.
21:00 PerlJam --ff is the default behavior.  It only doesn't generate a merge commit if it can fast-forward.
21:01 dalek rakudo/ng: 952d99e | jonathan++ | src/core/Block.pm:
21:01 dalek rakudo/ng: Fix Block.ACCEPTS, which was the problem at the root of the 'grep bug'.
21:01 dalek rakudo/ng: review: http://github.com/rakudo/rakudo/commit/952d99e04b920f5a36b80c6e2260312bada13a34
21:02 colomon \o/
21:03 colomon It's like Christmas!
21:03 jnthn ;-)
21:06 pugs_svn r29700 | jnthn++ | [t/spec] Untodo a test that ng passes.
21:06 pmichaud I've heard conflicting views on the use of --rebase
21:08 jnthn Aren't there conflicting views on just about everything in git, apart from everyone agrees it's awesome? :-)
21:08 PerlJam pmichaud: me too, but I've been using it for a couple of weeks now and it seems fine.
21:09 colomon I'm pretty sure I use --rebase all last fall for rakudo with no ill-effects I'm aware of.
21:09 PerlJam pmichaud: the main "problem" with --rebase is that it could rewrite commits that you've already pushed.  I haven't been able to make this happen though and I'm not sure how it could happen
21:10 PerlJam for the type of workflow that most (all?) of us use, I don't think --rebase could be a problem.
21:10 colomon I thought if there was a conflict rebase would just do a normal merge?
21:13 jnthn pmichaud: ping
21:13 colomon heh: http://www.viget.com/extend/only-you-can-prevent-git-merge-commits/
21:14 pmichaud jnthn: pong
21:14 jnthn pmichaud: Just want to avoid a conflict...
21:14 jnthn pmichaud: Are you working on slice stuff atm?
21:15 jnthn pmichaud: I was pondering trying to get match object indexing working.
21:15 pmichaud atm, no, but I plan to "shortly"
21:15 jnthn But figure we might end up hitting on the same bit of code...
21:15 pmichaud I'd recommend leaving match object to me
21:15 jnthn OK, wfm
21:15 pmichaud I can do that real quick, aksually
21:15 jnthn OK, cool
21:16 jnthn I may take a look at why mixins are broked then.
21:16 jnthn They did work at one point :-/
21:19 jnthn oh gah
21:19 jnthn iter correctly hands back a SeqIter
21:19 vamped joined #perl6
21:19 jnthn But then vtable shift tries to call shift, not get.
21:20 jnthn And the code also needs to work on RPAs.
21:20 pmichaud I've been thinking that we should have :vtable entries for Iterator.
21:20 pmichaud (that then forward to .get)
21:21 jnthn Ooh, that'd work.
21:21 pmichaud well, sort of.
21:21 pmichaud get_boolean is still going to be problematic
21:21 pmichaud I've been thinking that we may want/need a ParrotIterator type that converts any list/iterator into something that follows the Parrot iteration semantics
21:22 pmichaud and then :vtable('get_iter')  returns one of those.
21:23 pmichaud the ParrotIterator can then do any lookahead to see if we've reached the end of the list and properly return bool true/false
21:23 jnthn oh yeah
21:23 jnthn YOu're right, we can't just make it work by fixing up shit.]
21:23 jnthn *shift
21:23 jnthn ...
21:24 jnthn I'll have a crack at that.
21:32 vamped left #perl6
21:35 meppl joined #perl6
21:56 alanhuyle joined #perl6
21:58 jnthn pmichaud: ParrotIter idea works out very nicely. :-) And mix-ins work again. :-)
21:58 pmichaud +1
21:58 pmichaud even if I haven't been coding, I've been designing/thinking about things :)
21:59 jnthn That's important too :-)
21:59 jnthn Pushed.
21:59 k23z__ joined #perl6
22:00 simcop2387 joined #perl6
22:00 pmichaud does find_method opcode work on role objects?
22:01 pmichaud i.e., I want to get the (multi)method for postcircumfix:<[ ]>  from the Positional role
22:02 lichtkind joined #perl6
22:02 jnthn pmichaud: yes and no
22:02 jnthn It'll think you want to pun.
22:02 pmichaud punning is okay.
22:02 pmichaud at least, I think punning will be okay.
22:03 jnthn Checking something...
22:04 dalek rakudo/ng: 400373d | jonathan++ |  (3 files):
22:04 dalek rakudo/ng: Add ParrotIter, which provides Parrot iterator semantics in terms of the Perl 6 iterator semantics. Our get_iter vtable override hands that back.
22:04 dalek rakudo/ng: review: http://github.com/rakudo/rakudo/commit/400373d4ade37e1bebb5955dfd356b92392f0c13
22:04 jnthn pmichaud: Gah. The one problem here is that postcircumfix:<[ ]> has been considered special for roles up to now.
22:04 jnthn Becasue it's the way that you parameterize.
22:04 pmurias_ joined #perl6
22:04 jnthn e.g. Positional[Int]
22:04 pmichaud I don't have a problem with that, either.
22:05 pmichaud at least, I don't think I do.
22:05 jnthn pmichaud: I suggest that you:
22:05 jnthn 1) Get the Positional role and pun it
22:05 pmichaud I just need to get to the method object that normally responds to postcircumfix:<[ ]>
22:05 jnthn 2) find_method on the pun
22:05 jnthn $P0 = get_hll_global 'Positional'
22:06 pmichaud right now I'm trying
22:06 pmichaud $P0 = get_hll_global 'Positional'
22:06 pmichaud $P0 = find_method $P0, 'postcircumfix:<[ ]>'
22:06 pmichaud .tailcall invocant.$P0(args :flat)
22:06 jnthn Yeah, I don't think that'll work.
22:07 pmichaud what's the "pun" step, then?
22:07 pmichaud or, perhaps I should just look up the method in the namespace for now?
22:07 jnthn Easiest way is $P0 = $P0.'new'()
22:07 pmichaud (not a big fan of that... but it might be easiest for now)
22:08 jnthn And find_method on that
22:08 pmichaud hmmm.
22:08 jnthn I need to tidy up a bunch of this stuff after a discussion with TimToady++
22:08 pmichaud I'll just try a namespace lookup for now.
22:08 jnthn That'll work for now
22:08 pmichaud creating a new object gets expensive on every .[] call
22:08 pmichaud (Yes, I could cache the result somewhere.)
22:08 jnthn Well, you can cache it.
22:09 jnthn In many senses that should do the Right Thing, anyways.
22:09 cotto_work joined #perl6
22:09 clintongormley joined #perl6
22:23 pmichaud > "abc" ~~ /a(.)c/;  say $/[0];
22:23 pmichaud b
22:23 colomon \o/
22:24 pmichaud > "abc" ~~ /a(.)c/;  say $0;
22:24 pmichaud Confused at line 1, near "say $0;\n"
22:25 Trashlord joined #perl6
22:25 Trashlord joined #perl6
22:33 dalek rakudo/ng: adc7d3a | pmichaud++ |  (3 files):
22:33 dalek rakudo/ng: Refactor !postcircumfix:<[ ]> into Positional.pir .
22:33 dalek rakudo/ng: review: http://github.com/rakudo/rakudo/commit/adc7d3ae351305bafc195a62f8a7a9507df8831c
22:33 dalek rakudo/ng: 13e77a2 | pmichaud++ | src/builtins/Positional.pir:
22:33 dalek rakudo/ng: Update Positional.postcircumfix:<[ ]>(Int) to work with foreign objects.
22:33 dalek rakudo/ng: review: http://github.com/rakudo/rakudo/commit/13e77a27d13b2286b5c9690791776b79120ed337
22:33 dalek rakudo/ng: 141fa1a | pmichaud++ |  (3 files):
22:33 dalek rakudo/ng: Merge branch 'ng' of git@github.com:rakudo/rakudo into ng
22:33 dalek rakudo/ng: review: http://github.com/rakudo/rakudo/commit/141fa1ae83443eab12b2db4775c75176b018dcef
22:36 jnthn pmichaud: Nice :-)
22:36 jnthn pmichaud: Are you popping back the $0 etc too? I can easily do those if not.
22:37 * jnthn figures with those, we win back a bunch of S05 tests.
22:38 pmichaud > "abc" ~~ /a(.)c/;  say $0
22:38 pmichaud b
22:39 payload joined #perl6
22:39 jnthn \o/
22:43 * colomon is very glad he has company coming over tonight, but kind of wishes he could hack on rakudo instead... exciting times!
22:44 cotto_work joined #perl6
22:47 * jnthn yawns
22:47 ash__ '12ab' ~~ /<alpha>+/; say $/<alpha>; is probably next on the line then?
22:47 pmichaud I can work on Associative as well, yes.
22:48 ash__ do the named captures like that get set to anything? kinda how ( ) go to $1, $2, ... $n
22:48 pmichaud they go to  $<alpha>, $<digit>, etc.
22:48 jnthn You can use $<foo>
22:49 jnthn Which saves....1 character. :-)
22:49 athenot joined #perl6
22:49 ash__ ah, yeah, i forgot about that, you can omit the /
22:50 dalek rakudo/ng: 0a37674 | pmichaud++ | src/Perl6/ (2 files):
22:50 dalek rakudo/ng: Add implementation for $0, $1, $2, etc.
22:50 dalek rakudo/ng: review: http://github.com/rakudo/rakudo/commit/0a37674e73e563f87f58225e2fdafc1571dce633
22:50 mberends ooh! my buglet fixed! pmichaud++, and thanks on behalf of proto...
22:52 pmichaud yes, I should be able to stomp on quite a few buglets this weekend.
22:52 jnthn http://wiki.github.com/rakudo/rakudo/ng-issues has only 3 issues left now :-)
22:52 mberends :D will try proto a bit more as well
22:53 * jnthn should have a reasonable amount of hacking time at the weekend
22:53 * mberends too
23:01 pmichaud ng:  my @a = 4,5,6;  say @a[1];
23:01 p6eval ng 0a3767: OUTPUT«5␤»
23:01 pmichaud ng:  my @a = 4,5,6;  say @a[-1];
23:01 p6eval ng 0a3767: OUTPUT«Cannot use negative index on arrays␤current instr.: '&die' pc 15509 (src/builtins/Junction.pir:169)␤»
23:01 jnthn :-)
23:01 jnthn ng: my @a = 4,5,6; @a[1] = 42; say @a[1];
23:01 p6eval ng 0a3767: OUTPUT«42␤»
23:01 jnthn \o/
23:01 * jnthn is glad that one is fixed
23:02 pmichaud almost as good:
23:02 jnthn ng: my %h = a => 4, b => 5; %h<a> = 42; say %h<a>;
23:02 pmichaud my @a;   @a[5] = 42;  say @a;
23:02 p6eval ng 0a3767: OUTPUT«42␤»
23:02 pmichaud my @a;   @a[5] = 42;  say ~@a;
23:02 jnthn pmichaud: Yay! Whatever you did also fixed the same issue hashes had. :-D
23:02 pmichaud ng:  my @a;   @a[5] = 42;  say ~@a;
23:02 p6eval ng 0a3767: OUTPUT«     42␤»
23:02 jnthn :-)
23:02 pmichaud the hashes issue there was undoubtedly a list assignment issue or something.
23:03 pmichaud because I hadn't touched hashes yet (but touching them now :)
23:03 jnthn pmichaud: Possibly, yes. :-)
23:03 pmichaud ng:  "abc123" ~~ /<digit>/;   say $/<digit>;   # expect fail
23:03 p6eval ng 0a3767: OUTPUT«Can't postcircumfix:<{ }> foreign objects yet.␤current instr.: '!postcircumfix:<{ }>' pc 322695 (src/gen/core.pir:43993)␤»
23:04 pmichaud fixing.
23:05 wasy_ joined #perl6
23:07 iblechbot joined #perl6
23:09 jnthn ng: sub foo { return 1, 2, :a<3>; }; my ($a, $b, $c) = foo(); say ($a, $b, $c)>>.perl
23:09 p6eval ng 0a3767: OUTPUT«12Pair.new(:key("a"), :value("3"))␤»
23:09 jnthn \o/
23:10 pmichaud something is weird with named captures....
23:10 jnthn Oh?
23:11 pmichaud rebuilding fresh to see if I can lock it down
23:11 pmichaud but I'm getting "recursion depth exceeded" in the match itself.
23:11 jnthn :-/
23:11 jnthn That's...weird.
23:11 pmichaud and it's having something to do with role management :-(
23:12 jnthn Got a short example?
23:14 pmichaud hmmm, not after I checked out fresh.
23:14 pmichaud I must've done something wrong earlier -- trying again.
23:17 * jnthn may try and get Capture back in place tomorrow.
23:18 jnthn And a bunch of coercions to it. And then nested signatures can work again, and I can get :(\$capture) working too. :-)
23:24 pmichaud ugh, looks like we have something incorrectly calling "postcircumfix:<{ }>" without the leading !
23:24 pmichaud or something else is happening when I try to add a postcircumfix:<{ }> into the Associative role.
23:25 jnthn What's the error?
23:25 pmichaud maximum recursion depth exceeded.
23:25 pmichaud In the match.
23:26 jnthn During the actual match itself? Ouch. That's...really strange.
23:27 pmichaud yeah, I'm getting lots of calls to "&CREATE_HASH_LOW_LEVEL"  and "Perl6;Metamodel;RoleToRoleApplier"
23:27 pmichaud my code I'm running is    "abc123" ~~ /<digit>/;
23:27 jnthn Ouch.
23:28 pmichaud it's definitely the existence of "postcircumfix:<{ }>"  in Associative[::T]  that is causing the problem.
23:29 jnthn Attempting to reproduce.
23:29 pmichaud I'm trying a workaround where I call the method something else.
23:29 jnthn I have a nasty feeling of what it is though.
23:31 jnthn Argh!
23:31 jnthn pmichaud: *sigh*
23:31 jnthn pmichaud: Yes, it is that.
23:32 jnthn pmichaud: Something in the role compositon ends up calling a method defined in the Perl 6 setting.
23:32 jnthn This method in turn has a slurpy named parameter.
23:32 jnthn It thus tries to instantiate a Hash, meaning it tries to compose the Hash role, apart from...
23:33 jnthn ...we were already doing that, so we try again, and ... blah.
23:33 pmichaud > "abc456" ~~ /<digit>/;  say $<digit>;
23:33 pmichaud 4
23:34 jnthn pmichaud: Just worked around it?
23:34 pmichaud yes, I've named the method XXX-postcircumfix:<{ }> for now.
23:34 jnthn OK.
23:34 pmichaud but that's a problem that will have to be resolved if we want hash slices to work
23:35 pmichaud or hash keys based on WhateverCode
23:35 jnthn Right.
23:35 ShaneC joined #perl6
23:35 ShaneC left #perl6
23:35 jnthn It's a tricky problem.
23:35 pmichaud ...is something calling postcircumfix:<{ }>  as a method directly?
23:36 jnthn What I *think* is happening is...
23:36 jnthn You have a method that is in Associative, but also in EnumMap
23:36 jnthn This makes the role applier take a different code path (needs to know not to use the one in Associative or some such)
23:36 pmichaud is EnumMap a role also?
23:36 jnthn And in doing so, it calls Mu.Bool
23:37 jnthn Yeah
23:37 jnthn This is to get the parametric-y stuff to work.
23:37 pmichaud what's the difference between Associative and EnumMap, then?
23:38 jnthn Associative just says "this thing does postcircumfix:<{ }>". It also provides .of
23:38 jnthn EnumMap is essentially a Hash minus !STORE
23:38 pmichaud does EnumMap have to have a postcircumfix:<{ }> then?  Can it just use the one from Associative?
23:39 jnthn It could do
23:39 jnthn That may fix it.
23:39 jnthn But I guess there's other ways to try and deal with it too.
23:39 pmichaud anyway, I'll test+push what I have working now, and head to dinner.
23:39 jnthn OK
23:39 jnthn I'll try and look at that tomorrow - too tired to debug the role composer tonight.
23:39 pmichaud I need to review and understand EnumMap anyway, so perhaps this is best to wait for tomorrow
23:39 pmichaud I haven't read all of the spec changes relating to Enum/EnumMap.
23:40 jnthn In a nutshell, Enum just seems to be an immutable Pair.
23:40 jnthn I asked if the expectation was that Pair ~~ Enum and Hash ~~ EnumMap and was told that sounded reasonable. :-)
23:40 pmichaud EnumMap sounds analogous to a Seq
23:40 jnthn Yeah, I think so.
23:41 jnthn Though with hashes there isn't the laziness angle.
23:41 pmichaud it's currently a role?
23:41 jnthn Yes
23:41 pmichaud maybe it should be a class, like Seq currently is.
23:41 jnthn The reason being that in theory we can then pass along the type parameters.
23:41 jnthn Well
23:41 jnthn That's the other question on Seq.
23:41 jnthn How do we put back typed lists.
23:41 pmichaud how did we do it before?  (did we do it before?)
23:41 jnthn We could just make them all classes and cheat like we do in master.
23:41 pmichaud right.
23:42 jnthn In master, we mix-in the role.
23:42 jnthn e.g. make an Array or whatever, and then do @thingy does Positional[Int]
23:42 jnthn That always felt like a cheat to me.
23:42 pmichaud seems like Seq should mix-in  Positional[<type>]    and     EnumMap should mix-in  Associative[<type>]
23:42 pmichaud but yes, perhaps it's a cheat
23:42 jnthn But...maybe I can see it as less of one and make our lives easier.
23:42 jnthn :-)
23:43 jnthn I'm not sure. The thing is that it implies that all of those thingies want to be roles.
23:43 pmichaud anyway, I'll look at it tomorrow.  I do know that Seq's postcircumfix:<[ ]>  needs to be able to override the one from Positional, and EnumMap's  postcircumfix:<{ }>  probably needs to override the one from Associative
23:43 jnthn Right.
23:43 jnthn We maybe could switch Hash and EnumMap to classes for now.
23:44 jnthn And carry on with the same approach as master.
23:44 pmichaud I'd be fine with that.
23:45 jnthn It just feels a tad cheaty, and one of those things that mighta been worth trying to get right from the start with hashes.
23:45 jnthn If not for lists.
23:45 pmichaud well, whatever we do for one we ought to do for the other.  and slices + multi-method indexing are pretty important.
23:45 jnthn OTOH, maybe consistency in approach between them is better.
23:46 pmichaud pushing latest commit
23:46 pmichaud and time for dinner
23:46 pmichaud bbl
23:46 jnthn OK, let's for now say they're classes.
23:46 jnthn OK, I'll sleep pretty soon.
23:48 dalek rakudo/ng: 0d86e31 | pmichaud++ |  (3 files):
23:48 dalek rakudo/ng: Refactor !postcircumfix:<{ }> into Associative.pir .
23:48 dalek rakudo/ng: review: http://github.com/rakudo/rakudo/commit/0d86e3113ce7e77c7677f109703f85e1d55a8ff7
23:48 dalek rakudo/ng: c0f4ccc | pmichaud++ | src/builtins/Associative.pir:
23:48 dalek rakudo/ng: Add in postcircumfix:<{ }> for foreign objects (especially match objects
23:48 dalek rakudo/ng: from nqp-rx).  Currently we have to cheat on postcircumfix:<{ }>
23:48 dalek rakudo/ng: (by calling it "XXX-postcircumfix:<{ }>") to avoid an infinite recursion
23:48 dalek rakudo/ng: having to do with EnumMap.  This will ultimately have to be fixed to
23:48 dalek rakudo/ng: get hash slices to work.
23:48 dalek rakudo/ng: review: http://github.com/rakudo/rakudo/commit/c0f4ccc36ee44d97aaf39b0c9aa8b3c63853b716
23:51 Schwern joined #perl6
23:52 payload joined #perl6
23:53 * jnthn -> rest

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

Perl 6 | Reference Documentation | Rakudo