Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-05-30

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:02 BrowserUk joined #perl6
00:24 whiteknight joined #perl6
00:24 gbacon joined #perl6
00:45 snarkyboojum 32911 passing tests o/
00:49 hercynium joined #perl6
00:54 snarkyboojum over 83% pass rate
00:55 jnthn :-)
00:57 snarkyboojum that's amazing progress.. almost 600 additional passing tests since may 21
00:57 snarkyboojum (core-devs)++ :)
00:57 jnthn FINALLY!
00:57 jnthn Backtraces that might actually be useful.
00:59 snarkyboojum :O
01:00 jnthn With actual line numbers that relate to your Perl 6 program. :-)
01:12 pausenclown joined #perl6
01:12 snarkyboojum jnthn: wowsers :)
01:17 molaf_ joined #perl6
01:27 jnthn snarkyboojum: http://gist.github.com/418686 for example
01:29 lue ohai!
01:29 lue Did I just hear that backtraces are ..... useful?
01:30 sorear snarkyboojum: don't forget certain non-core devs who make tests pass.
01:37 lue jnthn: if a part of Rakudo's insides were to fail, would it still look as nice as this?
01:37 jnthn lue: Well, not if the part of the internals is the backtrace printer. ;-)
01:37 jnthn lue: For subs in the setting, it should be able to do something sensible in theory.
01:38 jnthn lue: In practice we may have one more Parrot bug to fix yet.
01:40 lue .rnd(must .... get.... phone..... with MeeGo)
01:41 jnthn OK, dare I commit the backtrace code... :-)
01:41 sorear YES
01:41 jnthn :-)
01:41 jnthn We can debug and hack on it together to make it awesome. :-)
01:41 sorear It doesn't matter if you break all the spectests - it will still be worth pulling
01:41 jnthn sorear: Oh, it doesn't do that
01:42 jnthn All pass
01:42 jnthn Just didn't want to commit something that's even less helpful that the status quo.
01:42 jnthn But I think what I have now actually reporting real line numbers is more helpful.
01:43 lue .oO(the next step in error message technology: STD-like suggestions as to what zarked up)
01:43 sorear I never payed attention to Parrot backtraces
01:43 jnthn sorear: Heh. Maybe nobody other than a few core devs did either. I dunno. :-)
01:43 jnthn sorear: They probably look a tad offputting though.
01:44 sorear No, they were better than your version
01:44 sorear However, not containing any correct information compensated for the superior formatting
01:45 jnthn sorear: Heh, superior? :-)
01:45 jnthn What do you like better about the Parrot ones?
01:45 jnthn Also, patches welcome. ;-)
01:46 sorear I thought we had the various fields lining up, but I just checked and I misremembered
01:46 jnthn sorear: ah
01:46 jnthn sorear: But nice thought.
01:46 sorear also, I'd like to see more information in backtraces
01:46 sorear like the PC value
01:46 sorear (I really did use that)
01:46 jnthn Erm
01:46 jnthn Wow. :-)
01:47 jnthn sorear: In that case I'm going to suggest, let's provide a flag --pir-backtrace or something, that disables this.
01:47 sorear does your version know how to format long names when it's not being compiled into GLOBAL?
01:47 jnthn sorear: And then people can see the real Parrot backtrace and get the PC.
01:47 jnthn sorear: Not yet, that's one of the next things to add.
01:47 sorear What about code in other HLL universes?
01:47 jnthn sorear: It should be able to show that too.
01:48 jnthn sorear: It assumes it has a Parrot sub and anything more it can find out beyond that is a bonus.
01:52 Intensity joined #perl6
01:53 dalek rakudo: b066578 | jonathan++ |  (3 files):
01:53 dalek rakudo: First cut of a backtrace printer. With recent Parrot improvements, it actually
01:53 dalek rakudo: seems to show the Perl 6 line numbers reasonably reliably. Many enhancements to
01:53 dalek rakudo: come, but commit early, commit often and all that. :-)
01:53 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/b066578c10dd4e42ffafc8fe2928e185ab421f94
01:53 dalek rakudo: 339d0b9 | jonathan++ | build/PARROT_REVISION:
01:53 dalek rakudo: Bump PARROT_REVISION to get latest Parrot with various backtrace production
01:53 dalek rakudo: fixes.
01:53 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/339d0b98671b767172f71b41cf73a07415ef1581
02:03 * sorear wonders whether enhancing the "make generated code pretty" functions would help or hurt debugging
02:05 jnthn sorear: Depends what chance they stand of breaking the code they're beautifying. ;_)
02:05 alester joined #perl6
02:07 jnthn Wow...it's getting light outside already. :-)
02:09 lue Well then, good morning jnthn o/
02:11 jnthn ;-)
02:11 jnthn Saturday late-night hacking has been *so* easier since I moved to Sweden. :-)
02:12 jnthn (Having church at 5pm rather than 9:30am means I can stay up just as long as I want and not worry about missing it. :-))
02:13 jnthn sorear: Adding namespace to the backtrace too
02:14 lue I thought now it was Sunday early-morning hacking :)
02:19 jnthn It's all relative. :-)
02:22 dalek rakudo: 8b3bb0b | jonathan++ | src/Perl6/BacktracePrinter.pm:
02:22 dalek rakudo: Include fully qualified names of routines in the backtrace, plus better handling
02:22 dalek rakudo: of anonymous things.
02:22 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/8b3bb0bba7b33c3e280cce0c08bcbda86f34f3d3
02:30 eternaleye joined #perl6
02:37 jnthn lue: Thanks for the inspiration - I tried to do something nice to make it clear what comes from the core setting: http://gist.github.com/418727
02:41 lue Ooh, nice. Now it helps both coders & P6 developers in one shot!
02:41 jnthn :-)
02:42 jnthn I hope this will make using Rakudo more -Ofun. :-)
02:42 lue I'm assuming <anon> is short for anonymous ?
02:42 jnthn lue: yeah
02:42 lue ERROR: maybe you should try calling something that exists
02:42 jnthn And the angles to indicate it's something special-ish.
02:42 jnthn ;-)
02:43 jnthn rakudo: 0/0
02:43 p6eval rakudo 9581e6: OUTPUT«Divide by zero␤current instr.: 'infix:<div>' pc 365157 (src/gen/core.pir:22103)␤»
02:43 lue please email this error code to Rakudo developers, so they can help diagnose the problem: ID-10T
02:43 jnthn Awww, it's not updated yet.
02:44 jnthn oh argh, I seem to have broken something
02:45 lue RD* is just a space station full of broken vases :P
02:50 jnthn Heh, found it.
02:50 jnthn Only broke -e and repl. ;-)
02:51 lue "only" :)
02:51 jnthn I "only" have a small glass of Nemiroff!
02:51 lue It "only" accounts for ~50% of all examples in P6 RT tickets :)
02:52 jnthn What, Nemiroff? :-)
02:52 jnthn yay, all fixed.
02:53 lue .oO(Quaternions — A healthy part of this balanced 3D modeling library)
02:57 lue rakudo: my @a=((1,2,3),(4,5,6)); my @b=((7,8),(9,1),(2,3)) my @c = (@a * @b); say @c
02:57 p6eval rakudo 8b3bb0: OUTPUT«===SORRY!===␤Confused at line 11, near "my @b=((7,"␤»
02:57 lue Awesome, jnthn!
02:57 lue jnthn++
02:58 lue But that looks suspiciously like STD...
02:58 lue std: my @a=((1,2,3),(4,5,6)); my @b=((7,8),(9,1),(2,3)) my @c = (@a * @b); say @c
02:58 p6eval std 30972: OUTPUT«[31m===[0mSORRY![31m===[0m␤Two terms in a row at /tmp/zK7i83RhI9 line 1:␤------> [32m,3),(4,5,6)); my @b=((7,8),(9,1),(2,3)) [33m⏏[31mmy @c = (@a * @b); say @c[0m␤    expecting any of:␤      bracketed infix␤  infix or meta-infix␤      statement modifier loop␤Parse
02:58 p6eval ..failed␤FAILED 00:01 …
02:58 jnthn STD is still a bit better
02:58 jnthn Colors. :-)
02:58 lue Not for me [at least in Konversation]
02:58 jnthn But yes, we are trying to converge with STD, so we now are SORRY about parse errors.
02:58 jnthn Ah, irssi shows them.
02:59 lue What caused a perfectly good matrix multiplication to go wrong?
02:59 jnthn A missing ; before the my
02:59 jnthn (the my @c)
02:59 lue durh :)
02:59 lue rakudo: my @a=((1,2,3),(4,5,6)); my @b=((7,8),(9,1),(2,3)); my @c = (@a * @b); say @c
02:59 p6eval rakudo 8b3bb0: OUTPUT«36␤»
03:00 lue hyper operators go like «*», right?
03:00 lue rakudo: my @a=((1,2,3),(4,5,6)); my @b=((7,8),(9,1),(2,3)); my @c = (@a «*» @b); say @c
03:00 p6eval rakudo 8b3bb0: OUTPUT«7162741018␤»
03:00 lue rakudo: my @a=((1,2,3),(4,5,6)); my @b=((7,8),(9,1),(2,3)); my @c = (@a «*» @b); say @c.perl
03:00 jnthn Yup, if you want both sides to dwim.
03:00 p6eval rakudo 8b3bb0: OUTPUT«[7, 16, 27, 4, 10, 18]␤»
03:01 lue I don't think it's dwimming
03:01 lue [for matrices anyway]
03:01 jnthn Oh, it won't do matrix mult. :-)
03:01 lue rakudo: my @a=((1,2,3),(4,5,6)); my @b=((7,8),(9,1),(2,3)); my @c = (@a »*« @b); say @c.perl
03:01 p6eval rakudo 8b3bb0: OUTPUT«[7, 16, 27, 4, 10, 18]␤»
03:02 * lue strangles air
03:02 * jnthn watches the air wither and die
03:02 * lue thinks of a machine that converts CO2 into diamonds (carbon) and oxygen
03:03 lue how would you make matrix multiplication work?
03:04 lue What happens above shouldn't happen, mathematically. It's errorful :)
03:04 lue [or can I not have 2d arrays?]
03:04 jnthn Well, thing is that parcels flatten
03:05 lue I thought that happened.
03:05 jnthn So for a 2D array you want [1,2,3] not (1,2,3).
03:05 lue ah, dankon
03:06 gbacon joined #perl6
03:06 lue rakudo: my @a=http://en.wikipedia.org/wiki/Special:Search?go=Go&amp;search=1,2,3],[4,5,6; my @b=http://en.wikipedia.org/wiki/Special:Search?go=Go&amp;search=7,8],[9,1],[2,3; my @c = @a »*« @b; say @c.perl
03:06 p6eval rakudo 8b3bb0: OUTPUT«===SORRY!===␤Confused at line 11, near "my @a=http"␤»
03:06 lue AH!?
03:06 lue rakudo: my @a=http://en.wikipedia.org/wiki/Special:Search?go=Go&amp;search=1,2,3],[4,5,6; my @b=http://en.wikipedia.org/wiki/Special:Search?go=Go&amp;search=7,8],[9,1],[2,3; my @c = @a »*« @b; say @c.perl
03:06 p6eval rakudo 8b3bb0: OUTPUT«===SORRY!===␤Confused at line 11, near "my @a=http"␤»
03:06 lue > my @a=http://en.wikipedia.org/wiki/Special:Search?go=Go&amp;search=1,2,3],[4,5,6; my @b=http://en.wikipedia.org/wiki/Special:Search?go=Go&amp;search=7,8],[9,1],[2,3; my @c = @a »*« @b; say @c.perl
03:06 lue what the...
03:07 lue Could this have happened because of something server-side?
03:08 lue rakudo: say [[1,2,3], [4,5,6]]
03:08 p6eval rakudo 8b3bb0: OUTPUT«1 2 3 4 5 6␤»
03:09 lue rakudo: my @a=[[1,2,3], [4,5,6]]; my @b=[[7,8], [9,1], [2,3]]; my @c = @a »*« @b; say @c.perl
03:09 p6eval rakudo 8b3bb0: OUTPUT«[6]␤»
03:09 TimToady should fail
03:09 * lue strangles ozone, going for an extra oxygen this time
03:10 TimToady hyper is only for strict parallelism
03:10 lue apparently, typing http://en.wikipedia.org/wiki/Special:Search?go=Go&amp;search=1,2,3],[4,5,6 causes some weird parsing thru IRC...
03:10 TimToady it's not do-what-a-mathematician-means
03:11 lue what if I am a mathematician? Then it has to dwim. :)
03:11 * lue ponders a Matrix type...
03:11 TimToady »op« does not mean that
03:11 jnthn TimToady: I suspect Rakudo doesn't yet know about nested arrays in hypers. There was a patch to support it, but don't think it was yet applied.
03:11 jnthn TimToady: (thus why it didn't fail as expected)
03:11 lue rakudo: my @a=[[1,2,3], [4,5,6]]; my @b=[[7,8], [9,1], [2,3]]; my @c = @a «*» @b; say @c.perl # just in case it differs
03:12 p6eval rakudo 8b3bb0: OUTPUT«[6]␤»
03:12 TimToady that also should not do what you mean :)
03:12 lue How does that happen?
03:12 lue just the [6], i mean
03:12 TimToady I imagine it's multiplying 2 by 3
03:13 jnthn I fear so. :-)
03:13 jnthn lue: It's numifying the arrays (and getting the number of elements) rather than descending into them.
03:14 TimToady rakudo: my @a = [1,2,3], [4,5,6]; say (@a »*» 3).perl
03:14 lue yeah. Seems rakudo is too scared to go farther than the first dimension :)
03:14 p6eval rakudo 8b3bb0: OUTPUT«[9, 9]␤»
03:14 TimToady alpha: my @a = [1,2,3], [4,5,6]; say (@a »*» 3).perl
03:14 jnthn phenny: help
03:14 phenny jnthn: Hi, I'm a bot. Say ".commands" to me in private for a list of my commands, or see http://inamidst.com/phenny/ for more general details. My owner is sbp.
03:14 p6eval alpha 30e0ed: OUTPUT«Non-dwimmy hyperoperator cannot be used on arrays of different sizes or dimensions.␤in Main (file <unknown>, line <unknown>)␤»
03:14 jnthn hugme: help
03:14 hugme jnthn: (add $who to $project | list projects | show $project | hug $nickname | tweet $twittername $message )
03:15 jnthn hugme: tweet rakudoperl Rakudo now has proper backtraces with line numbers from your Perl 6 code.
03:15 hugme jnthn: You need to register with freenode first
03:15 jnthn hugme: tweet rakudoperl Rakudo now has proper backtraces with line numbers from your Perl 6 code.
03:15 * hugme hugs jnthn; tweet delivered
03:15 jnthn \o/
03:16 jnthn Well, maybe I should take some sleep.
03:16 lue yeah, before noon happens. :) Good night jnthn o/
03:16 lue OOPS morning
03:17 Wolfman2000 joined #perl6
03:19 lue I love jnthn's new backtrace :)
03:19 Wolfman2000 seems like rakudo is being updated more recently. (I've been following twitter)
03:21 dalek rakudo: 6e39fe1 | jonathan++ | src/Perl6/Compiler.pir:
03:21 dalek rakudo: Little tweak so things in the core setting get shown in the backtrace with a
03:21 dalek rakudo: filename of CORE.setting.
03:21 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/6e39fe1035ef3823d320ed2131008d8631007a1d
03:21 dalek rakudo: 34542f7 | jonathan++ | src/Perl6/Actions.pm:
03:21 dalek rakudo: Emit file annotation so backtraces have file names.
03:21 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/34542f7a864fedfea4905d7f1479a2d27a65c6e7
03:23 jnthn night o/
03:23 TimToady o/
03:25 Wolfman2000 Still, Twitter doesn't say everything. How goes the Perl 6 development?
03:26 TimToady it's rapidly catching up with the future
03:26 lue .oO(And the future keeps coming to the present. It's very annoying. :) )
03:26 Wolfman2000 *chuckles*
03:27 Wolfman2000 I'm hoping to get a new Macbook Pro in a few months. Should have plenty of ram and hard drive space. When that happens, I can try compiling Perl 6 again......unless you guys managed to make Perl 6 compile with a gig of ram with no problems.
03:28 TimToady that is much improved, I think
03:28 BrowserUk joined #perl6
03:29 Wolfman2000 ...my current laptop has 2 GB ram, roughly 20 GB hard drive space left. Think I can compile Rakudo at this point with few issues?
03:30 TimToady looks like you only need 275MB of disk
03:31 Wolfman2000 hard drive space I assume for that
03:31 TimToady and 2GB ram should be plenty adequate
03:32 TimToady I certainly have no trouble with 3GB
03:32 Wolfman2000 Fair enough
03:32 lue is src/Perl6/BacktracePrinter.pm written in NQP ?
03:33 lue Darn. Looks like it is. I looked at it and thought := was implemented :)
03:35 Wolfman2000 well, may as well try to build it now
03:35 * Wolfman2000 gets the git source
03:39 * lue has been struck by what to call %_
03:39 * lue is slowly going mad again
03:40 lue Is there any language with a pronoun for a hash-like structure?
03:42 Wolfman2000 ...huh. It compiled...relatively quickly. Seemed too quick.
03:43 * Wolfman2000 goes to run the tests
03:44 sorear rakudo compilation has gotten a LOT faster in the last two months
03:44 sorear it was around 10 hours when I joined the project for me
03:44 sorear now it's down to 7 ... minutes
03:44 Wolfman2000 Compiler.pir took awhile to compile, but it...did its job
03:44 lue Maybe when R* comes along, I should try to compile on this old computer again.
03:44 Wolfman2000 It was about 7 minutes on my end as well, and I'm also pushing my ram usage to full.
03:45 * Wolfman2000 is watching an iTunes U movie
03:45 sorear should take about 300 now
03:45 sorear 2 months ago, it was running 2500
03:45 sorear which hurt a lot with 384 physical :/
03:45 sorear (all numbers in megabytes)
03:47 lue I'd say. that's my number of physical ram (in MiB)
03:49 Wolfman2000 failed part of the spectest
03:49 Wolfman2000 t/spec/S05-capture/caps.rakudo ................................. Failed 2/21 subtests
03:51 sorear you ... ran... the... spectest....?
03:51 lue I think I heard something about that a while ago.
03:51 Wolfman2000 still running
03:51 sorear oh okay
03:52 Wolfman2000 it's just the first failing line
03:52 sorear the spectest takes like 4 hours, i's very exhaustive and not really intended to be run online
03:52 Wolfman2000 ...no summer classes on Memorial day. I can wait if need be
03:52 sorear (we'll call it Perl 6 once it passes the entire spectest with no TODOs)
03:53 Wolfman2000 I haven't seen any TODOs yet. Still on S-06
03:53 Wolfman2000 err...just skipped to S-09 somehow
03:53 sorear the TODOs are applied by a special script that runs before the test harness
03:53 sorear when you see a file .rakudo, it's been modified
03:54 Wolfman2000 t/spec/S12-attributes/instance.rakudo .......................... ok   random line that has .rakudo. Clarify what you mean by modification here. Should they be .t instead?
03:54 envi^home joined #perl6
03:54 lue the .rakudo means it's been fudged.
03:54 lue aka some parts of that test file don't pass yet, and break the spectest. They are "fudged" so things don't break.
03:55 sorear Wolfman2000: look in the t/spec/S12-attributes/instance.t file
03:55 lue [How I understand it at least]
03:55 sorear you'll see some special comments like #?rakudo skip 1 "This is not yet implemented"
03:55 Wolfman2000 ...I'll check later
03:56 Wolfman2000 t/spec/S29-context/die.rakudo .................................. Failed 2/15 subtests
03:56 patspam joined #perl6
03:58 isBEKaml joined #perl6
04:00 Wolfman2000 computer slowing up...
04:00 Wolfman2000 hopefully not getting kernel paniced here
04:05 alester joined #perl6
04:07 isBEKaml TimToady: S02:629, missing variable?
04:12 Wolfman2000 ...huh. The Perl 6 code we made for Advent 2009 is part of the test spec now?
04:12 Wolfman2000 Also: the spec test has finished.
04:12 Wolfman2000 sorear: 30-40 minutes
04:14 Wolfman2000 ...huh. TimToady: paste.lisp.org doesn't seem to want me to paste to #perl6. Perhaps you can check?
04:14 lue That happens sometimes. Try gist.github.org
04:14 Wolfman2000 no server
04:15 Wolfman2000 or rather, can't find server
04:15 Eevee joined #perl6
04:16 lue on paste.lisp.org ?
04:16 Wolfman2000 gist.github.org couldnt' find server
04:17 saaki maybe your dns is flubbered, been working for me
04:17 lue .com
04:17 saaki gist.github.com
04:17 lue sorry :)
04:17 Wolfman2000 http://paste.lisp.org/display/110959
04:27 pugssvn r30973 | lwall++ | [S02] missing var noticed by isBEKaml++
04:28 Wolfman2000 ...do I have to --gen-parrot AGAIN for that one change?
04:30 lue :O I search for 'dr math quaternion' and on the first page I get a CPAN module for quaternions (P5 of course, but still)
04:30 Wolfman2000 ...oh, that's pugs. Not rakudo.
04:31 sorear Wolfman2000: --gen-parrot is for Parrot changes, which aren't even announced here
04:32 sorear also, Rakudo doesn't generally track the latest parrot
04:32 sorear there is a file in your Rakudo tree, build/PARROT_REVISION
04:32 Wolfman2000 ...I forgot there are many bots in this room.
04:32 sorear TimToady: hi! any comments on the LTM-in-rules question?
04:33 Wolfman2000 rakudo: ([+] (1..999).grep( { $_ % 3 == 0 || $_ % 5 == 0 } ))
04:33 p6eval rakudo 8b3bb0:  ( no output )
04:33 Wolfman2000 ...didn't do it right
04:33 sorear Wolfman2000: and yes, advent stuff is in the spectests.  It makes great regression fodder
04:33 TimToady sorear: I usually set BEGIN { $ENV{STD5DEBUG} = -1; }
04:33 TimToady and figure it out from the logs
04:34 sorear Wolfman2000: you need to add a .say there
04:34 Wolfman2000 rakudo: ([+] (1..999).grep( { $_ % 3 == 0 || $_ % 5 == 0 } )).say
04:34 sorear Wolfman2000: p6eval just reads and evaluates, it doesn't print
04:34 p6eval rakudo 8b3bb0: OUTPUT«233168␤»
04:34 Wolfman2000 sorear: if I recall right...doesn't rakudo ahve a time limit?
04:34 TimToady alias mc='less -R' will display the log in colors on Linux
04:34 Wolfman2000 ...guess not
04:34 sorear TimToady: I've actually been setting that on the command line
04:34 sorear ye
04:35 sorear but the question which I refer to is a semantic one, not a debugging one
04:35 sorear take a look at STD.pm6:1430
04:36 sorear notice that both sides of the alternation start with <.ws>
04:36 sorear there should be no LTM going on, right?
04:36 TimToady ah, that is factored out
04:36 Wolfman2000 rakudo: "5065726C36".comb(/<xdigit>**2/)».fmt("0x%s")».chr.join.say
04:37 p6eval rakudo 8b3bb0: OUTPUT«
04:37 Wolfman2000 ...yeah, that still fails
04:37 Wolfman2000 rakudo: "5065726C36".comb(/<xdigit>**2/).map: { chr "0x" ~ $_ }).join.say
04:37 p6eval rakudo 8b3bb0: OUTPUT«===SORRY!===␤Confused at line 11, near ").join.say"␤»
04:37 TimToady if there's whitespace before [ a | b | c ] it ignores the first whitespace on each alternative
04:37 Wolfman2000 ...and that should have worked
04:37 sorear TimToady: gimme5 factors it out, but I rather suspect it's doing so in error, since it changes the semantics - <.ws> ends a LTM pattern
04:38 TimToady a new LTM starts at the [] alternation
04:38 Wolfman2000 rakudo: ("5065726C36".comb(/<xdigit>**2/).map: { chr "0x" ~ $_ }).join.say
04:38 p6eval rakudo 8b3bb0: OUTPUT«Perl6␤»
04:38 Wolfman2000 there
04:38 TimToady each alternation is its own LTM
04:38 TimToady unless the first thing in a token
04:38 sorear I don't follow
04:38 TimToady but certaint that particular one stands on its own
04:39 sorear each alternation starts with sigspace
04:39 sorear so LTM shouldn't be able to affect which one is called?
04:39 finanalyst joined #perl6
04:40 TimToady sorear: I said it factors that whitespace out
04:40 TimToady since there is whitespace before the [], there is no need to match first inside the []
04:40 TimToady so it ignores that
04:40 sorear gimme5 does, viv doesn't
04:40 sorear I think S05 supports viv
04:41 TimToady well, then S05 is wrong :)
04:41 sorear but I'm not sure
04:42 TimToady or at least incomplete
04:46 finanalyst good morning all
04:46 TimToady biab &
04:46 finanalyst run across a bug, just checking to see if its known already
04:48 finanalyst rakudo: sub s ( $a ) { return $a }; class A { has $.b = s(2) }; my A $x .= new(); say $x.b
04:48 p6eval rakudo 8b3bb0: OUTPUT«Could not find sub &s␤in <anon> at line 11␤in main program body at line 11␤»
04:48 sorear TimToady: http://pastie.org/983940 ?
04:50 lue rakudo: our sub s ( $a ) { return $a }; class A { has $.b = s(2) }; my A $x .= new(); say $x.b
04:50 p6eval rakudo 34542f: OUTPUT«2␤»
04:50 finanalyst lue: thanx
04:51 lue you are welcome.
04:53 sorear TimToady: As a different but related issue, STD parses x ** y as x <.ws> ** y.  Wrong?
04:56 lue afk
05:05 TimToady sorear: that looks fine
05:06 TimToady S05:945 talks about the other
05:07 pugssvn r30974 | sorear++ | [S05] Describe alternation left-factoring in rules, long implemented by gimme5
05:07 sorear what about sigspace with ~ ?
05:08 TimToady I think ~ currently screws up under sigspace
05:09 TimToady at the moment it's just a "Doctor, it hurts when I do this."
05:09 TimToady "So, don't do that."
05:09 sorear the viv component which reparses ~ currently just strips <.ws> from both sides
05:09 sorear it runs a bit too low level though and even strips /explicit/ <.ws> ...
05:10 sorear I wonder what the ideal behavior is
05:11 TimToady well, if we think of '(' ~ ')' <atom> as subbing in the <atom> for the ~, it kinda makes sense to transfer the ws to around <atom>
05:11 TimToady but generally, in practice, <atom> will be something that already handles whitespace
05:11 TimToady <statementlist> for instance
05:11 TimToady or EXPR
05:12 TimToady so the situation doesn't arise often in practice, and we could just say it treats it as '('~')'
05:12 sorear *lightbulb* the parsing behavior we want for ~ is exactly the same as for **
05:12 TimToady praps
05:12 sorear let's parse it as a psuedo quantifier
05:13 TimToady whatever works, and isn't *too* disgusting  :)
05:13 sorear It'd be less disgusting than the current approach.
05:19 sorear heh.  I used $self->{dba} in the translation code for ~, but ~ is parsed with dba:additive...
05:19 TimToady you can always override the default dba
05:20 sorear no, $self is the match object for the ~ regex_infix__S_Tilde
05:20 sorear that code would have been correct if I had written it as a method on a RE_node
05:21 pugssvn r30975 | sorear++ | [viv] Fix a stupid phaso which caused all parsing failures to be reported as "additive"
05:28 TimToady biab &
05:31 kaare joined #perl6
05:32 pugssvn r30976 | sorear++ | [viv] More aggressive filtering of sigspace in ~
05:39 JimmyZ joined #perl6
05:40 JimmyZ std: { } ()
05:40 p6eval std 30975: OUTPUT«[31m===[0mSORRY![31m===[0m␤Strange text after block (missing comma, semicolon, comment marker?) at /tmp/GZr1AW0sff line 1:␤------> [32m{ }[33m⏏[31m ()[0m␤    expecting any of:␤       bracketed infix␤  infix or meta-infix␤      statement modifier loop␤Parse failed␤FAILED
05:40 p6eval ..00:01 115m␤»
05:40 JimmyZ std: {}()
05:40 p6eval std 30975: OUTPUT«ok 00:01 111m␤»
05:41 JimmyZ rakudo: {}() # oh hi, is it a bug?
05:41 p6eval rakudo 34542f: OUTPUT«invoke() not implemented in class ''␤in main program body at line 11:/tmp/fV4VLyeY9P␤»
05:41 JimmyZ rakudo: { say 'hi'; }()
05:41 p6eval rakudo 34542f: OUTPUT«hi␤»
05:41 JimmyZ rakudo: { say 'hi'; } ()
05:41 p6eval rakudo 34542f: OUTPUT«===SORRY!===␤Confused at line 11, near "{ say 'hi'"␤»
05:42 JimmyZ rakudo: { } ()
05:42 p6eval rakudo 34542f: OUTPUT«===SORRY!===␤Confused at line 11, near "{ } ()"␤»
05:43 JimmyZ std: { } ()
05:43 p6eval std 30975: OUTPUT«[31m===[0mSORRY![31m===[0m␤Strange text after block (missing comma, semicolon, comment marker?) at /tmp/lH4PkUNOFT line 1:␤------> [32m{ }[33m⏏[31m ()[0m␤    expecting any of:␤       bracketed infix␤  infix or meta-infix␤      statement modifier loop␤Parse failed␤FAILED
05:43 p6eval ..00:01 112m␤»
05:44 JimmyZ TimToady, hello
05:44 TimToady a postfix may not have space in front of it
05:48 JimmyZ rakudo: { say 'hi' }()
05:48 p6eval rakudo 34542f: OUTPUT«hi␤»
05:48 JimmyZ rakudo: {  }()
05:48 p6eval rakudo 34542f: OUTPUT«invoke() not implemented in class ''␤in main program body at line 11:/tmp/uhsZpZL0Wn␤»
05:48 TimToady rakudo: {;}()
05:48 p6eval rakudo 34542f: OUTPUT«invoke() not implemented in class ''␤in main program body at line 11:/tmp/cKD0G2h84Y␤»
05:49 TimToady rakudo: Hash.new()
05:49 p6eval rakudo 34542f:  ( no output )
05:49 JimmyZ rakudo: {1;}()
05:49 TimToady rakudo: Hash.new()()
05:49 p6eval rakudo 34542f:  ( no output )
05:49 p6eval rakudo 34542f: OUTPUT«invoke() not implemented in class ''␤in main program body at line 11:/tmp/zLkd13L4Fp␤»
05:49 JimmyZ rakudo: {say;}()
05:49 p6eval rakudo 34542f: OUTPUT«␤»
05:50 JimmyZ rakudo: {True;}()
05:50 p6eval rakudo 34542f:  ( no output )
05:50 JimmyZ rakudo: {return True;}()
05:50 p6eval rakudo 34542f:  ( no output )
05:50 JimmyZ rakudo: {return 1;}()
05:50 p6eval rakudo 34542f:  ( no output )
05:50 TimToady rakudo: say {;}.WHAT
05:50 p6eval rakudo 34542f: OUTPUT«Hash()␤»
05:50 JimmyZ rakudo: {1;}()
05:50 p6eval rakudo 34542f:  ( no output )
05:50 JimmyZ rakudo: {return 1;}.WHAT
05:50 TimToady {;} shouldn't be a hash
05:50 p6eval rakudo 34542f:  ( no output )
05:51 JimmyZ rakudo: {return 1;}.WHAT.say
05:51 p6eval rakudo 34542f: OUTPUT«Block()␤»
05:53 JimmyZ {} is a Hash or Block:
05:53 JimmyZ {} is a Hash or Block?
05:53 JimmyZ rakudo: {}.WHAT.say
05:53 p6eval rakudo 34542f: OUTPUT«Hash()␤»
05:53 JimmyZ rakudo: {}()
05:53 p6eval rakudo 34542f: OUTPUT«invoke() not implemented in class ''␤in main program body at line 11:/tmp/zeA1me5H0K␤»
05:53 sorear JimmyZ: stop
05:54 sorear hold on
05:54 JimmyZ already stop
05:56 JimmyZ I got two different results with same code
05:58 mberends jnthn++ did an awesome nightshift on Rakudo backtraces!
06:02 sorear JimmyZ: S04:1463
06:17 pugssvn r30977 | sorear++ | [viv] Bring whitespace in alternations in line with S05 changes
06:20 sorear TimToady: Since it's semantically important, what would you say about doing this analysis at the STD level?
06:21 TimToady makes sense
06:21 * sorear notes
06:21 * sorear is not going to actually change STD until viv is working
06:27 Eevee joined #perl6
06:40 sorear oh, wonderful
06:40 TimToady good w or bad w?
06:40 sorear JSPON looks like *exactly* what I want for a new viv output form
06:41 sorear it's got all the useful features of YAML but without the 200-page spec
06:41 mberends :)
06:43 mberends sorear: can you get by without YAML anchors?
06:44 sorear mberends: no
06:44 sorear every VAST node lists its children twice
06:45 sorear once positionally and once by name
06:46 mberends JSON does not do anchors afair
06:48 sorear correct
06:49 sorear which is why I said JSPON
06:49 sorear JSPON is an extension of JSON which adds anchors and object types
06:52 mberends .oO( and I thought it was a little tyPpo ;-)
06:53 pugssvn r30978 | snarkyboojum++ | [t/spec] Added Caesar Cipher tests for Perl 6 Advent Calendar Day 8
07:13 pugssvn r30979 | sorear++ | [viv] Work around STD's misparsing of whitespace in quantifiers for now
07:15 [mark] joined #perl6
07:19 gfx joined #perl6
07:22 sorear something is amiss... despite the superior optimization technology in viv, viv-compiled STD.pmc appears to be *slower*
07:23 sorear much. much. much. slower
07:23 sorear takes over 8 minutes to parsefail on line 277
07:23 sorear instead of 4 minutes to parse all 6000 lines
07:42 Su-Shee joined #perl6
07:43 snarkyboojum is it a bug that you need to prepend a module sub with our to use Module::Name::mysub() ?
07:44 moritz_ nope, that's spec
07:44 moritz_ you can also export them (doesn't need "our")
07:45 moritz_ "our" means "put into the symbol table", and Module::Name::mysub() is an access to the symbol table
07:45 snarkyboojum oh, so the first example of day 12 is wrong
07:45 snarkyboojum in the advent calendar
07:45 moritz_ might very well be the case
07:45 snarkyboojum cool.. I've always used our, so good to know :)
07:46 snarkyboojum thanks moritz_++
07:46 Jmax left #perl6
07:47 snarkyboojum moritz_: would this be an appropriate way to test 'use' etc in day 12? http://gist.github.com/418867
07:47 eternaleye joined #perl6
07:48 Su-Shee good morning.
07:50 Su-Shee mberends: can I bore you with some basic questions today? I played with some more mysql C api functions. (after I had coffee :)
07:50 moritz_ snarkyboojum: yes; though tradtionally the package go into t/spec/packages/
07:50 snarkyboojum k
07:51 snarkyboojum will move it to there then
07:53 * moritz_ starts crying
07:53 moritz_ t/spec/S05-capture/caps.rakudo ................................. Failed 2/21 subtests
07:53 moritz_ that was working yesterday
07:53 sorear crying?
07:53 moritz_ then I broke it
07:53 moritz_ then I fixed it again
07:53 moritz_ now it's broken
07:53 moritz_ sigh
07:53 * Su-Shee offers a tissue.
07:53 moritz_ thanks *sniff*
07:54 Su-Shee also remember Brazil! "it fixed itself..?!" and then robert de niro comes to the rescue. ;)
07:56 moritz_ huh, it's non-deterministic
07:56 Su-Shee it's awakening! have you named it yet?
07:59 moritz_ oh, the backtrace is printed to STDOUT
08:01 finanalyst rakudo: for 1,2 X <a b> { say "$^x $^y" }
08:01 p6eval rakudo 34542f: OUTPUT«1 a 1 b␤2 a 2 b␤»
08:02 finanalyst rakudo: for 1,2 X (<a b> X 'x') { say "$^x $^y" }
08:02 p6eval rakudo 34542f:  ( no output )
08:02 finanalyst moritz_: am i missing something in the second range?
08:03 moritz_ something's wrong
08:03 moritz_ I guess it has to do with list flattening
08:03 finanalyst ok i will file a bug
08:03 finanalyst rakudo: for 1,2 X | (<a b> X 'x') { say "$^x $^y" }
08:03 p6eval rakudo 34542f:  ( no output )
08:04 finanalyst rakudo: for 1,2 X (| <a b> X 'x') { say "$^x $^y" }
08:04 p6eval rakudo 34542f:  ( no output )
08:10 Ross joined #perl6
08:19 mberends Su-Shee: yes, I'm also working on SQL stuff
08:20 snarkyboojum moritz_: multi subs aren't exported by default in current Rakudo?
08:20 Su-Shee mberends: I didn't commit yesterday because I didn't ran make test without errors. in that regard I probably have a question too.
08:20 moritz_ snarkyboojum: no idea
08:20 snarkyboojum moritz_: ok :)
08:20 sorear snarkyboojum: afaik nothing is exported by default
08:20 snarkyboojum moritz_: doesn't seem to work :)
08:21 snarkyboojum sorear: ok - I should look up the spec - the advent post indicates that they are, but perhaps they don't work for a good reason :)
08:21 snarkyboojum otherwise why would people be writing out multi sub :)
08:23 * sorear has just discovered that Q works in double quoted strings in Perl 5
08:28 snarkyboojum not quite sure what this means "When there is no proto for a multi, the autogenerated proto is assumed to be exportable." http://perlcabal.org/syn/S11.html#line_114
08:32 mberends Su-Shee: let's have a look at the test error. I've been studying mysql_fetch_field() etc and am afraid zavolaj may be unable to handle that because it returns a struct, not an array.
08:33 Su-Shee mberends: ha, that's where I poked around the entire evening yesterday. :)
08:34 Su-Shee the test error occurs at "disconnect" ;) I'm just running without it to see wether or not this is my only fail
08:34 Su-Shee mberends: I've also added mysql_fetch_fields and tried it.
08:38 moritz_ rakudo: say Seq.new(1, 2, 3)
08:38 p6eval rakudo 34542f: OUTPUT«123␤»
08:38 moritz_ rakudo: say Seq.new(1, 2, 3).perl
08:38 p6eval rakudo 34542f: OUTPUT«(1, 2, 3)␤»
08:38 moritz_ rakudo: say %(Seq.new(1, 2, 3)).perl
08:38 p6eval rakudo 34542f: OUTPUT«Method 'hash' not found for invocant of class 'Seq'␤in main program body at line 11:/tmp/KMQY0vuGzD␤»
08:39 moritz_ rakudo: say (my %h = Seq.new(1, 2, 3)).perl
08:39 p6eval rakudo 34542f: OUTPUT«Odd number of elements found where hash expected␤in '!STORE' at line 4224:CORE.setting␤in main program body at line 11:/tmp/8ndTQS7Mqb␤»
08:39 moritz_ rakudo: say (my %h = Seq.new(1, 2, 3, 5)).perl
08:39 p6eval rakudo 34542f: OUTPUT«{"1" => 2, "3" => 5}␤»
08:39 mberends Su-Shee: if you're willing to overlook the remaining attributes of a field, the name is at the beginning of the mysql_field struct (a pointer to a null terminated string). It's a bit of a cheat, but I think we can fish the field name out of that.
08:40 moritz_ rakudo: say (my % = Seq.new(1, 2, 3, 5)).perl
08:40 Su-Shee mberends: I was always stuck with the first field name and couldn't get to anything else.
08:40 p6eval rakudo 34542f: OUTPUT«===SORRY!===␤Malformed my at line 11, near "% = Seq.ne"␤»
08:41 moritz_ rakudo: say (my (%) = Seq.new(1, 2, 3, 5)).perl
08:41 p6eval rakudo 34542f: OUTPUT«(!whatever_dispatch_helper, )␤»
08:41 Su-Shee mberends: I ended up with magically suddenly having the dbname in some fields and things like that.
08:41 moritz_ .oO( ... )
08:41 mberends Su-Shee: ah I see, well that is progress anyway
08:42 Su-Shee mberends: well I learned a lot. ;)
08:42 mantovani joined #perl6
08:42 pugssvn r30980 | snarkyboojum++ | [t/spec] Added Fancy::Utilities and initial tests for Perl 6 Advent Calendar Day 12: Modules and Exporting
08:42 moritz_ \o/ these shiny backtraces make programming with rakudo a lot more fun
08:42 mberends +1 :-) :-)
08:43 moritz_ time to update my poniewishlist blog entry :-)
08:43 Su-Shee mberends: I also learned that for some reason if OpaquePointer gets returned I can't do an if on it.
08:43 mberends it really is worth upgrading to today's ble[ea]ding Rakudo for the better error messages
08:44 Su-Shee ok, first I fix make test here. :)
08:44 Su-Shee "open source is when you already worked an hour while not even being out of bed yet."
08:45 mberends haha
08:45 moritz_ lol
08:45 snarkyboojum Su-Shee: that applies to my paid work often as well :)
08:45 Su-Shee in comparison to "work" where you at least were allowed to get up and shower and dress :)
08:46 Su-Shee snarkyboojum: I work fully dressed and showered in an office. yay for civilization! ;)
08:47 snarkyboojum Su-Shee: on a good day I try to work fully dressed and showered in a park with water views :)
08:47 * mberends feels an envious twitch
08:48 Su-Shee snarkyboojum: this doesn't impress me at all, because this is my view from work: http://en.wikipedia.org/wiki/File:Berlin_night.jpg
08:55 moritz_ rakudo: say (my %h = Seq.new('a' => 0)).perl
08:55 p6eval rakudo 34542f: OUTPUT«{"a" => 0}␤»
08:55 snarkyboojum beautiful :)
08:55 moritz_ Su-Shee: you work late at night? :-)
08:56 snarkyboojum I see more trees and water though ;) (hard to beat sydney harbour)
08:56 Su-Shee usally not, my wo-worker took the picture in winter :)
08:57 sorear joined #perl6
08:57 moritz_ ah well, in winter it's easier to be at work while it's dark
08:59 moritz_ rakudo: say Hash.new(|('abc' => 3)).perl
08:59 p6eval rakudo 34542f: OUTPUT«Too many positional parameters passed; got 2 but expected 1␤in 'EnumMap::new' at line 4035:CORE.setting␤in main program body at line 11:/tmp/UxTycbvg6n␤»
09:07 dalek rakudo: dd8b9f0 | moritz++ | docs/ChangeLog:
09:07 dalek rakudo: update ChangeLog
09:07 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/dd8b9f074a9968a1f2efdbafbbcfbc077c334e6f
09:07 dalek rakudo: 5aba135 | moritz++ | build/PARROT_REVISION:
09:07 dalek rakudo: bump PARROT_REVISION yet again to get backtraces printed to STDERR
09:07 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/5aba1353fdde14c7203c5eb841cbd744f5670b4b
09:07 dalek rakudo: 6eec67c | moritz++ | src/core/Seq.pm:
09:07 dalek rakudo: Seq hash coercion
09:07 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/6eec67cd69bdb7142092387f1a81c7ecf08fc1ff
09:08 Su-Shee aaah finally...
09:09 M_o_C joined #perl6
09:09 moritz_ jnthn: it seems the reported filename is always that of the main script, never that of a module
09:09 Su-Shee mberends: my make test fail was my fault. no further questions. ;)
09:13 mberends Su-Shee: :) the 10-mysql.t has far too many tests using fetchrow_arrayref and almost none using fetchrow_array. Could you change for example lines 406 and 409 to test your new fetchrow_array() ?
09:14 Su-Shee I saw, I was just looking for an example to copy.
09:15 Su-Shee 406 and 409 it is.
09:15 mberends :)
09:18 Su-Shee ok, first getting up.
09:19 mberends there is a new, much more concise and effective FakeDBI test script under construction locally.
09:20 pugssvn r30981 | sorear++ | [viv] Quash a bunch of escaping bugs in regexes
09:24 Su-Shee mberends: oh, nice :)
09:28 pugssvn r30982 | sorear++ | [viv] Handle backslash forms in adverbs correctly
09:31 pugssvn r30983 | sorear++ | [viv] Implement 'does' trait
09:33 pugssvn r30984 | sorear++ | [viv] Implement does and is with our scoped bases
09:36 dalek nqp-rx: d1d1d31 | moritz++ | src/stage0/ (4 files):
09:36 dalek nqp-rx: update stage0
09:36 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/d1d1d31833f3898f5d4cfa5fc3fbf92a156a9198
09:38 sorear viv-on-STD-on-viv just passed a torture test of quoted strings; I'll let it run overnight *off*
09:38 mberends sorear++
09:48 pugssvn r30985 | snarkyboojum++ | [t/spec] Added initial tests for Perl 6 Advent Calendar Day 13: Junctions
09:52 snarkyboojum wow, that was cool, I was getting a 'Divide by zero current instr.: '' pc -1 ((unknown file):-1)' error when I ran rakudo outside the rakudo root directory, until I did make install; nice error :)
09:52 snarkyboojum now I get a 'Confused at line 31....' error message
09:52 snarkyboojum :)
09:54 Su-Shee \o/ t/10-mysql.t .. ok
09:54 Su-Shee All tests successful.
09:55 mberends ship it!
09:55 Su-Shee how does that actually work with p6 tests right now? it can "ok" and a little more?
09:56 mberends "is" gives nicer diagnostics when something fails
09:57 Su-Shee but it really is perl6 already with no help of perl5?
09:57 sorear agh. It failed, ONE LINE LATER
09:57 mberends rakudo/Test.pm is a little subset of the typical P5 frameworks
09:57 snarkyboojum Su-Shee: you have ok, nok, is, isnt, is_approx, isa_ok, dies_ok, lives_ok, eval_dies_ok, eval_lives_ok, is_deeply, and anything else from Test.pm
09:57 sorear after 8+ minutes
09:58 snarkyboojum Su-Shee: and Test.pm is written in Perl 6
09:58 * Su-Shee looks at it.
10:01 Su-Shee mberends: http://pastebin.org/292310
10:02 mberends that should pass
10:02 sorear At my current rate of progress debugging viv, I will finish on Tuesday, July 29, 2042
10:03 snarkyboojum moritz_: none of day 21 passes on current rakudo unfortunately
10:03 mberends heh, window fail from my editor: "my $\o/"
10:09 Ross joined #perl6
10:12 snarkyboojum I love the for @list Z ^@list.elems -> $item, $i { } idiom for looping over a list and still getting an index $i into it
10:13 snarkyboojum well, I think it's neat anyway
10:14 masak joined #perl6
10:14 masak oh hai, #perl6!
10:14 Su-Shee do I have to do more then git push if I'm not pushing onto my repositories?
10:14 mberends masak: hai!
10:15 * masak does the "it's weekend!" dance
10:15 mberends Su-Shee: git add the changed files, git commit, then git push
10:15 Su-Shee done.
10:15 * mberends joins the dancing masak
10:16 masak :)
10:17 m6locks it's sunday, tomorrow the weekend will be over ;____;
10:17 m6locks yet, a couple of minutes left to dance
10:17 Su-Shee "minutes"? :)
10:18 m6locks sure thing, time flies
10:18 * snarkyboojum has less than 4 hours of weekend left :(
10:18 masak time flies like a Haskell arrow.
10:18 m6locks :P
10:18 masak snarkyboojum! \o/
10:18 snarkyboojum masak \o/ !
10:18 snarkyboojum :)
10:18 masak snarkyboojum: I haven't had any chance to play with if statements in Yapsi yet. thought I'd do that today.
10:19 envi^home joined #perl6
10:19 pmurias joined #perl6
10:19 snarkyboojum masak: in all truth, I haven't played with that stuff I was going to look at either :|
10:19 masak 's ok :)
10:19 snarkyboojum masak: I've been writing tests for advent calendar posts instead :O but I will!
10:20 masak snarkyboojum++ # doing stuff
10:20 snarkyboojum o/
10:20 Su-Shee how much better social control works compared to office control amazes me every day :)
10:23 mberends Su-Shee: fetchrow_array() tests out fine here too :-)
10:23 Su-Shee *pew* :)
10:24 * Su-Shee broke a billion euro thing last week, I'm a little on edge with tests. ;)
10:28 snarkyboojum rakudo: my grammar A {}
10:28 p6eval rakudo 34542f:  ( no output )
10:28 snarkyboojum alpha: my grammar A {}
10:28 p6eval alpha 30e0ed: OUTPUT«Malformed declaration at line 10, near "grammar A "␤in Main (file <unknown>, line <unknown>)␤»
10:28 snarkyboojum lexically scoped grammars are supported right?
10:31 Su-Shee mberends: is there anything else relatively simple to do?
10:32 mberends Su-Shee: I'm wondering about column names
10:33 mberends the way these things develop starts with a proof of concept in zavolaj/examples
10:33 colomon we are passing 32,920 tests!!!!!
10:34 colomon moritz_++
10:34 snarkyboojum colomon: so close to the magic 33k :P
10:36 Su-Shee mberends: I've added yesterday mysql_fetch_fields and made it a Positional of Str to look what's actually in there. But I didn't go any further.
10:36 whiteknight joined #perl6
10:36 colomon btw, snarkyboojum (backlogging): for @list.kv -> $i, $item
10:37 snarkyboojum colomon: ah .. nicer! :)
10:37 snarkyboojum colomon++
10:37 colomon not that Z isn't awesome, mind you...
10:37 snarkyboojum it seems like it'd be less efficient though :)
10:37 snarkyboojum using kv should be faster?
10:38 TiMBuS joined #perl6
10:38 colomon rakudo: my @list = 'a' ... 'f'; for @list.kv -> $i, $item { say "$i ==> $item" }
10:38 p6eval rakudo 34542f: OUTPUT«0 ==> a␤1 ==> b␤2 ==> c␤3 ==> d␤4 ==> e␤5 ==> f␤»
10:38 snarkyboojum heh
10:38 snarkyboojum rakudo: my @list = 1,2,3; for @list.kv -> $i, $item { say $item, " at ", $i } # just did that
10:38 p6eval rakudo 34542f: OUTPUT«1 at 0␤2 at 1␤3 at 2␤»
10:38 mberends Su-Shee: ok, I'll try columns from there. Another idea, there is a $sth.rows that says how many rows the last insert/update/delete affected (not select). Could you look into that?
10:39 colomon snarkyboojum: using Z for that is probably a bit less efficient, yes.
10:39 Su-Shee lemme look.
10:40 snarkyboojum colomon: cool - that was my only niggle using it :)
10:41 * colomon just realized there was another entire round of patches since his test run that had 32,920 passes.
10:43 Su-Shee mberends: that would be a method on the sth object returning null or a number? or should this be an attribute?
10:44 mberends Su-Shee: there is a mysql_affected_rows() in the API to call after executing a query. Stash the result in a new attribute. A rows() method should retrieve the value of the attribute.
10:45 Su-Shee ok.
10:46 meppl joined #perl6
10:47 Ross joined #perl6
10:54 JimmyZ joined #perl6
10:59 masak rakudo: / a+ +/
10:59 p6eval rakudo 6eec67: OUTPUT«===SORRY!===␤Can't quantify zero-width atom at line 11, near "/"␤»
10:59 masak \o/
10:59 masak fwiw, I like STD's error message better, though.
10:59 masak std: / a+ +/
10:59 p6eval std 30985: OUTPUT«[31m===[0mSORRY![31m===[0m␤quantifier quantifies nothing at /tmp/zM4ggqAbPb line 1:␤------> [32m/ a+ +[33m⏏[31m/[0m␤Check failed␤FAILED 00:01 114m␤»
10:59 masak less technical.
11:00 masak mind if I change it? it's probably in nqp-rx, right?
11:01 colomon +1
11:04 arnsholt Agreed
11:06 Su-Shee rows: 1
11:07 mberends \o/
11:09 Su-Shee oh and non-ascii chars work as well. just to mention it.
11:09 masak ok, so the message is here: http://github.com/perl6/nqp-rx/blob/master/src/Regex/P6Regex/Actions.pm#L79
11:10 masak I don't know about any of that stage0/stage1/stage2 stuff, but I'm assuming that if I make the change on that line, it will eventually find its way into Rakudo.
11:10 jnthn morning, #perl6
11:10 masak jnthn! \o/
11:10 jnthn masak! \o/
11:10 colomon o/
11:10 jnthn masak: Yes, change it in that file.
11:11 jnthn masak: make bootstrap-files if you want ot update the bootstrap
11:11 jnthn masak: But otherwise you can wait for the next time we have something bigger to roll in.
11:11 masak I'll give it a shot. I want to learn it anyway.
11:11 jnthn masak++
11:12 jnthn Bumping PARROT_REVISION is what all the cool kids are doing this weekend anyway. ;-)
11:12 masak hm, it didn't work so well. I think I have a stale independent Parrot install connected with my nqp-rx.
11:12 masak I'll just take the easy way out for now and push this.
11:13 jnthn Yeah, you need an up to date Parrot.
11:13 dalek nqp-rx: 45a6612 | masak++ | src/Regex/P6Regex/Actions.pm:
11:13 dalek nqp-rx: aligned error message with STD's
11:13 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/45a66127aaf0ca722b1b2581276f15fb61950d41
11:18 Ross^ joined #perl6
11:20 mberends Su-Shee: (non-ascii:) oh! Also uncomment FakeDBI.pm6:77,86 with your next commit to update what works. Git pull before you edit/commit.
11:22 jnthn moritz_: Ooh, yay, you beat me to fixing the STDERR thingy. :-)
11:23 jnthn moritz_: Noted bug with module file names, thanks.
11:25 finanalyst jnthn: much nicer working with nicer backtracing. ++++
11:25 masak ooh! &note is implemented! \o/
11:25 masak someone++
11:26 Su-Shee mberends: ah. ok. I see. will do.
11:26 jnthn finanalyst: :-)
11:26 masak it was moritz_++, it seems.
11:27 azert0x joined #perl6
11:27 Su-Shee food now.
11:27 mberends rakudo: my $x=42;say x # deliberate error
11:27 p6eval rakudo 6eec67: OUTPUT«Could not find sub &x␤in main program body at line 11:/tmp/MWzaw3MYDr␤»
11:28 mberends rakudo: my $x=42;say eval("x") # deliberate error vanishes
11:28 p6eval rakudo 6eec67: OUTPUT«␤»
11:29 jnthn rakudo: my $x=42; eval("x"); sy
11:29 p6eval rakudo 6eec67: OUTPUT«Could not find sub &sy␤in main program body at line 11:/tmp/14ZcyqkyRD␤»
11:29 jnthn ffff
11:29 jnthn rakudo: my $x=42; eval("x"); say $!
11:29 p6eval rakudo 6eec67: OUTPUT«Could not find sub &x␤»
11:29 jnthn mberends: There she is. :-)
11:29 mberends ah, thanks jnthn
11:29 azert0x joined #perl6
11:32 azert0x joined #perl6
11:33 dalek rakudo: 5a8bd03 | masak++ | src/core/IO.pm:
11:33 dalek rakudo: [IO.pm] better params name in &note
11:33 dalek rakudo: Only use all-caps when there's a reason.
11:33 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/5a8bd03990799d97301f14b9800cefbbb9e17672
11:33 pugssvn r30986 | colomon++ | [t/spec] Improve fudge message.
11:36 jnthn masak: WHAT'S A GOOD REASON?
11:36 masak :)
11:36 masak indicating that something unusual is happening, like BEGIN or $*ERR.
11:37 pugssvn r30987 | moritz++ | [t/spec] test for $/.chars (RT #74694)
11:37 jnthn 'tis a busy busy weekend in Perl 6 land. :-)
11:39 dalek rakudo: 3d540b8 | moritz++ | build/PARROT_REVISION:
11:39 dalek rakudo: bump PARROT_REVISION to get fix for RT #74694
11:39 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/3d540b8a0669939d459d0dcffb43b1c0a586ea43
11:39 jaldhar joined #perl6
11:40 breinbaas joined #perl6
11:40 frooh joined #perl6
11:41 kel_ joined #perl6
11:42 s1n joined #perl6
11:42 PacoLinux joined #perl6
11:44 azert0x joined #perl6
11:45 jnthn colomon: http://rt.perl.org/rt3/Ticket/Display.html?id=75246 may be one for you to glance at, if/when you have chance.
11:46 masak I think http://rt.perl.org/rt3/Ticket/Display.html?id=75440 is a manifestation of another bug whose ticket I can't find right now. the one about several gather blocks not interacting well.
11:46 masak rakudo: enum A::B <a b c>; say b
11:46 p6eval rakudo 6eec67:  ( no output )
11:47 masak odd. it gives no output.
11:48 moritz_ rakudo: say ('a' ~~ /a/).orig.PARROT
11:48 p6eval rakudo 6eec67: OUTPUT«CodeString␤»
11:48 colomon jnthn: noted
11:48 moritz_ rakudo: say ('bcatt' ~~ /a/).orig.rindex('a', 1)
11:48 p6eval rakudo 6eec67: OUTPUT«Method 'rindex' not found for invocant of class 'CodeString'␤in main program body at line 11:/tmp/HSPoJeYb1q␤»
11:49 moritz_ .orig needs fixing
11:49 moritz_ or maybe nqp-rx :-)
11:49 moritz_ rakudo: class MyMatch does Associative { method postcircumfix:<[ 9> { "foo" } }; $/ = MyMatch.new; say $0
11:49 p6eval rakudo 6eec67: OUTPUT«Method 'postcircumfix:<[ ]>' not found for invocant of class 'MyMatch'␤in main program body at line 1␤»
11:50 moritz_ rakudo: class MyMatch does Associative { method postcircumfix:<[ ]> { "foo" } }; $/ = MyMatch.new; say $0
11:50 p6eval rakudo 6eec67: OUTPUT«Too many positional parameters passed; got 2 but expected 1␤in 'MyMatch::postcircumfix:<[ ]>' at line 11:/tmp/EkQvy1dQkH␤in main program body at line 11:/tmp/EkQvy1dQkH␤»
11:50 moritz_ rakudo: class MyMatch does Associative { method postcircumfix:<[ ]>($) { "foo" } }; $/ = MyMatch.new; say $0
11:50 p6eval rakudo 6eec67: OUTPUT«foo␤»
11:54 jnthn Typing fail :-)
11:54 jnthn oops
11:54 * jnthn should comment on the current line, not one a screenful up:-)
11:55 jnthn in 'A::foo' at line 3:Foo.pm
11:55 jnthn in 'bar' at line 4:test.p6
11:55 jnthn woo
11:55 moritz_ rakudo: class A { has $foo; method b { say $.foo } }; A.b
11:55 p6eval rakudo 6eec67: OUTPUT«Method 'foo' not found for invocant of class ''␤in 'A::b' at line 11:/tmp/8h7m4KGiDf␤in main program body at line 11:/tmp/8h7m4KGiDf␤»
11:55 moritz_ rakudo: class A { has $foo; method b { say $foo } }; A.b
11:55 p6eval rakudo 6eec67: OUTPUT«Type objects are abstract and have no attributes, but you tried to access ␤in 'A::b' at line 11:/tmp/budHlgChUd␤in main program body at line 11:/tmp/budHlgChUd␤»
11:55 moritz_ that's missing the attribute name in the error message
11:55 moritz_ rakudo: class A { has $!foo; method b { say $!foo } }; A.b
11:55 p6eval rakudo 6eec67: OUTPUT«Type objects are abstract and have no attributes, but you tried to access ␤in 'A::b' at line 11:/tmp/sPdey7Lkmt␤in main program body at line 11:/tmp/sPdey7Lkmt␤»
11:56 jnthn That's LTA.
11:56 jnthn Ah, think I see why.
11:58 moritz_ rakudo: '1 3' ~~ /(\d+) \s (\d+)/; say  $0..$1
11:58 p6eval rakudo 6eec67: OUTPUT«Method 'succ' not found for invocant of class 'Match'␤in 'RangeIter::get' at line 4030:CORE.setting␤in 'say' at line 1␤in 'say' at line 4464:CORE.setting␤in main program body at line 11:/tmp/pjxGJoU7PA␤»
11:58 colomon jnthn: well, started to look at the hyper patch, but I'm nearly out of battery here and my power cord is in a room with my sleeping wife and child.
11:58 moritz_ Cool should have .succ
11:59 colomon the patch does look straightforward enough.
11:59 colomon don't understand why $i ~~ Iterable wouldn't work....
12:00 moritz_ it uses statement-modifying loops because the normal form breaks rw-aliasing of $_
12:00 moritz_ (if we're talking about the same patch)
12:00 moritz_ or was it 'if' instead of loops?
12:01 gbacon joined #perl6
12:01 colomon I'm talking about 75246....
12:01 colomon I don't see $_ involved.
12:05 jnthn > class A { has $!foo; method b { say $!foo } }; A.b
12:05 jnthn Type objects are abstract and have no attributes, but you tried to access $!foo
12:05 jnthn \o/
12:06 masak \o/
12:07 jnthn masak: When you get to play with Rakudo master, let me know how you get on with the new backtraces.
12:07 jnthn masak: I want to try and get them awesome. :-)
12:08 masak jnthn: compiling right now. will get back to you. :)
12:08 * jnthn expects masak++ will be a reliable source of breakage and bugs.
12:08 * masak becomes happy over this exchange: http://twitter.com/rentzsch/status/15005085024 http://twitter.com/cbarrett/status/15008109927
12:08 dalek rakudo: ff31b59 | jonathan++ | src/Perl6/Module/Loader.pm:
12:08 dalek rakudo: Set $?FILES in module loader, so we end up with the correct filename annotation
12:08 dalek rakudo: in modules.
12:08 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/ff31b59fb88258147ade70f861997bd8d84b9d9a
12:08 dalek rakudo: 478ba48 | jonathan++ | src/pmc/p6opaque.pmc:
12:08 dalek rakudo: Correct busted format string to fix bad error message noticed by moritz++.
12:08 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/478ba48841a8bec00ff538465d39912641493087
12:09 jnthn nice :-)
12:09 masak will we get backtraces in the REPL?
12:10 jnthn No
12:10 masak pity. they could have been useful there.
12:10 JimmyZ joined #perl6
12:10 jnthn I thought they'd be annoying there. :-)
12:10 masak the parts that pertains to Perl 6, I mean.
12:11 masak imagine that someone does 'use MyModule' and then calls something.
12:11 smash_ joined #perl6
12:11 masak backtraces would definitely help in finding where errors come from.
12:11 smash_ hello everyone
12:11 jnthn masak: The problem certainly isn't a technical one.
12:11 jnthn masak: I can make it that way if folks want it that wya.
12:11 jnthn *way
12:11 masak smash_: hi!
12:11 jnthn o/ smash_
12:11 colomon joined #perl6
12:11 jnthn masak: My gut just told me they wouldn't.
12:12 jnthn masak: fwiw, -e does have 'em.
12:12 * masak almost typed 'sudo make way instain mother' instead of 'sudo make install' :P
12:12 jnthn :D
12:13 jnthn Everyone: thoughts on backtraces in repl welcome. Or I JFDI and we see how it feels. :-)
12:14 rv2733 joined #perl6
12:14 masak I'm testing them now.
12:14 snarkyboojum my thoughts are they're already brilliantly better than they were :)
12:15 masak jnthn: fist impression: VERY NICE!
12:15 jnthn .oO( a fist impression sounds painful )
12:15 masak jnthn++
12:15 masak :D
12:15 masak *frist :P
12:15 snarkyboojum line numbers have been spot on for me this evening - very helpful indeed
12:16 masak jnthn: maybe indent the lines starting with 'in' with 2 or 4 spaces? would help to pick out the error message easier, I think.
12:16 jnthn masak: ooh, that could just work
12:16 jnthn masak: If you want to try it yourself, btw, see src/Perl6/BacktracePrinter.pm
12:16 jnthn (yes, *.pm* ;-))
12:17 masak \o/
12:17 jnthn And just search for "in"
12:17 masak I can do it.
12:17 masak but I'm not done testing it yet, so in a bit.
12:17 jnthn Sure
12:17 jnthn But in general, feel free to tweak it a bit.
12:19 masak I've found a case where a line number is one-off. shoudl I nopaste it?
12:19 * masak can't spell today
12:19 masak I'm a bit worn out after yesterdays wedding party :)
12:20 jnthn masak: please
12:20 masak I don't think it's the fault of the new backtraces thing, to be honest.
12:20 jnthn I knew you'd find something :-)
12:21 masak more like a result of parsing or something.
12:21 jnthn Well, the other thing is that we don't have a lot of :node($/)s in Actions.pm as we maybe should.
12:21 jnthn *as many
12:21 masak http://gist.github.com/418990
12:21 jnthn So could very well be some wins to be had by some careful extra scattering of those.
12:23 jnthn masak: curious
12:23 jnthn masak: Does it get it right if you do pfft() ?
12:23 jnthn as in, add parens?
12:23 * masak tries
12:23 * jnthn had a test very much like that which got it right
12:23 masak no.
12:23 jnthn ok
12:24 masak maybe it sees the statement as starting on line 1, or something?
12:24 jnthn That's very possible.
12:24 jnthn I just thought that it'd been getting it right.
12:24 jnthn (I had a very similar test case...)
12:25 * jnthn plays spot the difference
12:26 masak &
12:26 jnthn masak: hmm, I agree it seems to be one off there.
12:28 pmurias joined #perl6
12:28 pugssvn r30988 | pmurias++ | [mildew] ported over the -Cgtk backends
12:28 pugssvn r30988 | which displays the AST using a gtk viewer
12:29 pugssvn r30989 | pmurias++ | [mildew] add INFERRED-TYPE-TEST to MildewCORE.pad
12:29 pugssvn r30990 | pmurias++ | [mildew] added support for goto's and labels to mildew's m0ld frontend
12:31 moritz_ rakudo: regex foo { foo }; "foofoofoo" ~~ /<foo>+/;
12:31 moritz_ bar($<foo>); sub bar(@foos) {}
12:31 p6eval rakudo 6eec67: OUTPUT«Useless declaration of has-scoped regex in a module; add our or my to install it in the lexpad or namespace␤Method 'foo' not found for invocant of class 'Cursor'␤in <anon> at line 11:/tmp/roxnZaSl4j␤in 'Cool::match' at line 2056:CORE.setting␤in 'Regex::ACCEPTS' at line
12:31 p6eval ..4807:CORE.se…
12:31 moritz_ rakudo: my regex foo { foo }; "foofoofoo" ~~ /<foo=&foo>+/;  bar($<foo>); sub bar(@foos) {}
12:31 p6eval rakudo 6eec67:  ( no output )
12:35 * masak submits rakudobug
12:36 moritz_ huh? why now?
12:36 masak for the one-off line number.
12:36 moritz_ waitwaitwait
12:36 masak sorry, wasn't too clear on that.
12:37 * masak waits
12:37 moritz_ something p6evalish?
12:37 masak no.
12:37 moritz_ don't trust its line numbers
12:37 moritz_ ok, good
12:37 masak right.
12:37 moritz_ then go ahead :-)
12:37 masak p6eval is 11 off :P
12:37 masak or maybe 10, more like.
12:37 dalek rakudo: 1727ca5 | moritz++ |  (2 files):
12:37 dalek rakudo: implement Cool.succ and .pred
12:37 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/1727ca53c7052fabe008748b70823bf8460ad656
12:37 moritz_ depends on whether you're used to 0-zero base line nubmers :-)
12:38 masak yuck, no! :P
12:38 moritz_ hey, our arrays are 0-based already :-)
12:39 masak as they should.
12:39 jnthn masak: Submitting that one you just gave me?
12:39 masak jnthn: aye.
12:39 jnthn masak: Think it may be a Parrot fix.
12:39 jnthn masak: Thing is, the annotations in the PIR look correct.
12:40 jnthn Trying my first guess at a patch now.
12:40 masak I'll include that in the Rakudobug. :)
12:40 smash_ what is the best practice for reporting errors to users ?
12:40 jnthn lol...if you make a syntax error in the ops...and then make bootstrap-ops...then it fails of course. So then you go and correct the error...apart from you broke the bootstrap and now can't build the ops builder to create the new ops to fix the problem. :-)
12:41 masak bootstrapping is fun that way. :)
12:41 jnthn I guess I'm just not allowed to make any mistakes. :)
12:41 masak smash_: can you be more specific?
12:42 smash_ masak: sure, give me a sec
12:45 pugssvn r30991 | moritz++ | [t/spec] unfudge tests for RT #67882, and add a few more (because I did not see the existing tests early enough)
12:45 smash_ http://gist.github.com/418999
12:46 * masak looks
12:46 jnthn use fatal; probably would catch that.
12:46 moritz_ uhm
12:47 masak currently, &open in Rakudo dies as if 'use fatal' were on.
12:47 moritz_ shouldn't soft failures in sink context catch it too?
12:47 masak eventaully, yes.
12:47 jnthn moritz_: ah, possibly, yes
12:47 jnthn We don't sink yet though
12:47 moritz_ aye, but pmichaud++ has a plan :-)
12:47 masak smash_: I definitely think it should issue an error message.
12:47 jnthn Aye. :-)
12:48 masak smash_: as to what it should be, is it possible to find out *why* the socket couldn't be created? that feels like the interesting part.
12:48 azert0x joined #perl6
12:48 azert0x joined #perl6
12:49 jnthn Well, I guess .open would return the failure that we'd get unhappy about, and it has the best chance of knowing that.
12:50 azert0x joined #perl6
12:50 moritz_ rakudo: say (1|2|3) ~~ Junction
12:50 p6eval rakudo 478ba4: OUTPUT«1␤»
12:54 jnthn masak: OK, I got an improvement.
12:54 jnthn masak: There's two things at work here though.
12:54 masak only two? :)
12:55 jnthn 1) A place in Parrot there we probably should persist the PC in the context and didn't. I've fixed this.
12:55 jnthn 2) Now I get the correct annotation reported, however putting a semicolon on the end of the line makes all the difference.
12:55 pugssvn r30992 | moritz++ | [t/spec] tests for RT #75368 and new spec wrt autothreading over negated operators
12:55 jnthn masak: That is, we now report the annotation that is emitted.
12:55 jnthn masak: But if the semi is missing, we omit the line afterwards, not the line before.
12:56 smash_ http://gist.github.com/418999 well, it's not very elegant, any suggestion ?
12:56 jnthn er, s/omit/emit/
12:56 moritz_ smash_: fail(message) would be better
12:57 moritz_ smash_: which will automagically do the right thing (ie respect "use fatal", throw a soft exception) once it's implemented
12:58 masak smash_: what moritz_ said. but &note would have been more apt than &say, since it's an error condition. :)
12:58 moritz_ masak: you might get some mails for closed RT tickets without tests. Those actually have tests, but the commit message mailer takes a while to add that info to RT (just FYI)
12:58 masak moritz_: thanks for the heads-up.
12:58 jnthn masak: Anyway, half fixed. :-)
12:59 jnthn I won't bump Parrot just for this - we'll get it next time somebody does.
12:59 masak nodnod
13:00 moritz_ rakudo: say [][].perl
13:00 p6eval rakudo 478ba4: OUTPUT«[]␤»
13:00 moritz_ more or less what I espected :-)
13:00 masak rakudo: say [][][][][][][][][][].perl
13:00 p6eval rakudo 478ba4: OUTPUT«[]␤»
13:00 masak :)
13:01 jnthn rakudo: say 1 [[[[[[[[[+]]]]]]]]] 41
13:01 p6eval rakudo 478ba4: OUTPUT«42␤»
13:02 azert0x joined #perl6
13:02 masak rakudo: say 1 [[[+] 41
13:02 p6eval rakudo 478ba4: OUTPUT«===SORRY!===␤Unable to parse infixish, couldn't find final ']' at line 11␤»
13:02 jnthn :-)
13:02 * masak feels a bit infixish today
13:02 jnthn std: say 1 [[[+] 41
13:02 p6eval std 30992: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unable to parse bracketed infix at /tmp/CpzY4M1iRN line 1:␤------> [32msay 1 [[[33m⏏[31m[+] 41[0m␤Couldn't find final ']'; gave up at /tmp/CpzY4M1iRN line 1:␤------> [32msay 1 [[[+][33m⏏[31m 41[0m␤Parse failed␤FAILED 00:01 115m␤»
13:03 jnthn "gave up" :)
13:04 azert0x joined #perl6
13:05 masak walk &
13:06 dalek joined #perl6
13:06 pugssvn r30993 | pmurias++ | [mildew] the m0ld frontend parses conditional branches
13:08 azert0x joined #perl6
13:13 snarkyboojum joined #perl6
13:15 azert0x joined #perl6
13:15 azert0x joined #perl6
13:23 mtnviewmark joined #perl6
13:26 cognominal rakudo:  say "hi"; ...
13:26 p6eval rakudo 478ba4: OUTPUT«hi␤»
13:27 cognominal should not that blow up on me?
13:27 cognominal rakudo:  ...
13:27 p6eval rakudo 478ba4:  ( no output )
13:28 * mberends hears a muffled 'plop'
13:28 cognominal At least the mere ... blows up on the p6 shell
13:29 snarkyboojum cognominal: but not with -e
13:31 cognominal For once, I wanted a stack trace to see the work of jnthn++ and I fail to produce once. Ho, the irony.
13:31 JimmyZ joined #perl6
13:33 snarkyboojum rakudo: foo()
13:33 p6eval rakudo 478ba4: OUTPUT«Could not find sub &foo␤in main program body at line 1:/tmp/O0MQkzePjj␤»
13:35 snarkyboojum rakudo: die
13:35 p6eval rakudo 478ba4: OUTPUT«Died␤␤in main program body at line 11:/tmp/pRv7XBf45l␤»
13:36 snarkyboojum rakudo: last
13:36 p6eval rakudo 478ba4: OUTPUT«␤in main program body at line 1␤»
13:36 snarkyboojum rakudo: next
13:36 p6eval rakudo 478ba4: OUTPUT«␤in main program body at line 1␤»
13:38 snarkyboojum rakudo: warn
13:38 p6eval rakudo 478ba4: OUTPUT«Warning␤␤in main program body at line 1␤»
13:38 cognominal anyway I can say of Perl 6 and
13:39 cognominal rakudo:  so Cool
13:39 p6eval rakudo 478ba4:  ( no output )
13:40 snarkyboojum rakudo: does Cool
13:40 p6eval rakudo 478ba4:  ( no output )
13:41 snarkyboojum std: Mu
13:41 p6eval std 30993: OUTPUT«ok 00:01 114m␤»
13:42 M_o_C joined #perl6
13:44 elmex joined #perl6
13:47 azert0x joined #perl6
13:50 pugssvn r30994 | moritz++ | [t/spec] test for RT #73308, [][]
13:51 moritz_ std: / a+ +/
13:51 p6eval std 30993: OUTPUT«[31m===[0mSORRY![31m===[0m␤quantifier quantifies nothing at /tmp/OTa6oLVTTx line 1:␤------> [32m/ a+ +[33m⏏[31m/[0m␤Check failed␤FAILED 00:01 111m␤»
13:54 pugssvn r30995 | moritz++ | [t/spec] tests for RT #74832
13:54 masak \o/
13:54 moritz_ \\o
13:54 masak oh, it was std, not rakudo. :)
13:55 moritz_ rakudo: /a+ +/
13:55 p6eval rakudo 478ba4: OUTPUT«===SORRY!===␤Can't quantify zero-width atom at line 11, near "/"␤»
13:56 moritz_ down to 7 tickets that needs tests before closing
13:57 moritz_ masak: you might find http://rt.perl.org/rt3/Ticket/Display.html?id=75434 curious :-)
13:57 moritz_ btw it seems that JSON::Tiny is now unblocked
13:57 moritz_ only requires a small measure of debugging to get running again
13:57 masak I did find it curious. moritz_++ on the nice bug report.
13:57 moritz_ well, with the small exception of escape sequences in char classes
13:58 masak master is getting into shape refreshingly quickly. I've spent the last couple of days in GGE actually *removing* RAKUDO comments.
13:59 masak that has never happened on this scale.
13:59 moritz_ yes, the last few days were exceedingly productive
13:59 masak right now, I'm making adjustments for the fact that Match is Cool.
14:00 smash_ any documentation on how to use Q:PIR{ ... } on perl 6 modules ?
14:00 oyse joined #perl6
14:00 snarkyboojum I wonder what is causing rakudo to blow up on the grammar stuff in day 21 of the advent calendar - as soon as Question::Grammar.parse($text) is called it's game over
14:01 masak smash_: there are plenty of examples in src/core
14:01 masak snarkyboojum: is there an error message?
14:01 smash_ masak: i'm looking for it there
14:01 snarkyboojum masak: 'Confused at line 31, near "my $match "'
14:02 jnthn moritz_++ # down to 630 tickets again!
14:02 snarkyboojum masak: the line in question being "my $match = Question::Grammar.parse($text);"
14:03 jnthn snarkyboojum: What comes on the line prior to that?
14:03 snarkyboojum jnthn: a multi-line quote Q { };
14:03 masak snarkyboojum: no idea what it might be. maybe try to golf the error?
14:04 jnthn OK, there's even a semi on it, so it couldn't be the block closer = end of statement bug, which I feared it may be.
14:04 cognominal masak++ # nice expression
14:05 snarkyboojum masak: what does "golf the error" mean?
14:05 oyse Has the Path role (http://perlcabal.org/syn/S32/IO.html) been implemented Rakudo yet? I tried to use it as specified in the Synopsis, but Rakudo complains about "Unsupported use of C++ constructor syntax; in Perl 6 please use method call syntax"
14:05 masak snarkyboojum: make it as small as possible, but no smaller.
14:06 snarkyboojum masak: ah
14:06 masak snarkyboojum: 'golf' is a time-honoured technique in the Perl world, usually applied to interesting algorithms, not errors.
14:07 snarkyboojum masak: know about golfing, but didn't get it for some reason :)
14:07 masak oyse: the error message seems unrelated to what you're asking for.
14:07 snarkyboojum masak: so cheers :)
14:07 masak oyse: you're doing something akin to 'my $a = new A' when it's really "my $a = A.new' in Perl 6.
14:08 oyse masak: ah ok. I just copied what it said in the synopsis. I will change it and try again
14:08 masak oyse: I doubt the synopses tell you to use that syntax. which line of IO.pod?
14:09 snarkyboojum masak: http://gist.github.com/419050 # golfed - I think :)
14:09 masak oyse: sorry, you're right! fixing.
14:09 colomon joined #perl6
14:09 masak snarkyboojum: the bug doesn't show if you rename to something shorter? :)
14:09 snarkyboojum masak: :P
14:10 masak snarkyboojum: is the 'use v6;' required? :)
14:10 snarkyboojum I'm golfing with "good style" :P
14:10 masak snarkyboojum: clearly you don't quite appreciate the meaning of 'golf' yet :P
14:10 masak 'good style' in golfing is all about brevity.
14:11 masak are the variable assignments necessary.
14:11 masak s/\./?/
14:11 oyse masak; Changing the calling syntax took care of the error. Thanks.
14:11 colomon dang, hyper.t is all messed up.
14:11 masak oyse: thanks for unwittingly discovering the spec bug :)
14:12 masak fwiw, I think Path is overdesigned and shouldn't be in the spec.
14:14 pmichaud good morning, #perl6
14:14 pugssvn r30996 | masak++ | [S32/IO] changed a number of instances of C++-style constructor syntax
14:15 JimmyZ morning, pmichaud
14:15 masak morning, pmichaud
14:15 colomon o/
14:15 colomon rakudo: my @a = 1..3;  @a>>++; say @a;
14:15 p6eval rakudo 478ba4: OUTPUT«234␤»
14:15 smash_ masak: what is the difference between my $s = Q:PIR {...} and my $s = ~Q:PIR {...} ?
14:15 smash_ pmichaud: mornin'
14:15 masak smash_: prefix:<~> makes a thing into a Stringy.
14:16 masak usually a Str.
14:16 snarkyboojum masak: how's this http://gist.github.com/419058 :P
14:16 smash_ masak: got it, thks
14:16 masak hugme: hug jnthn # the new backtraces are wonderful!
14:16 * hugme hugs jnthn
14:16 snarkyboojum interestinly I get a different error when I try and do grammar Q::G{} :)
14:17 snarkyboojum *interestingly
14:17 masak snarkyboojum: then you've entered the 'but no smaller' part and should backtrack.
14:17 masak snarkyboojum: there are issues with things named 'Q' right now.
14:17 masak try two letters instead :)
14:18 snarkyboojum did - in the snippet below it
14:18 snarkyboojum :)
14:18 masak snarkyboojum++ # getting golfier
14:18 masak snarkyboojum: just a hunch -- what happens if you rename the grammar into 'Yi'?
14:19 jnthn morning, pmichaud
14:19 jnthn masak: Happy you like these ones. :-)
14:20 masak jnthn: I'm *really* happy we got those before Rakudo Star.
14:20 snarkyboojum masak: something completely different :) "Method 'TOP' not found for invocant of class ''"
14:20 masak snarkyboojum: then you're a victim of http://rt.perl.org/rt3/Ticket/Display.html?id=74276
14:20 masak snarkyboojum: I haven't seen this variant before, but it's the same root cause.
14:20 snarkyboojum masak: which I already knew about ;) thank you!
14:20 jnthn masak: Yeah, I knew it needed to happen before then, but wasn't in a hurry to go digging in Parrot guts. :-)
14:20 snarkyboojum I think :P
14:23 snarkyboojum masak: and renaming the grammar to grammar Yuestion::Grammar :P in the original (longer) example, gets rid of the parsing error, but still doesn't give me the right answer :)
14:23 snarkyboojum masak++ # for clever hunches
14:24 masak hunches are the fun part of debugging :)
14:24 snarkyboojum aye :)
14:26 Su-Shee mberends: I think I'm done with rows; pastebinning.
14:28 oyse Has directory operations and similar been implemented for Rakudo yet? Can I do stuff similar to "mkdir $path" or is this still missing?
14:28 jnthn rakudo: mkdir lol
14:28 p6eval rakudo 478ba4: OUTPUT«Could not find sub &lol␤in main program body at line 1:/tmp/I6npOp0W5d␤»
14:28 jnthn rakudo: mkdir "lol"
14:28 p6eval rakudo 478ba4: OUTPUT«Could not find sub &mkdir␤in main program body at line 1:/tmp/jwBd2HuRMZ␤»
14:28 jnthn ...wish I knew Perl 6 syntax... :-)
14:28 jnthn oyse: Looks like not.
14:28 snarkyboojum masak: seeing how you're on a roll http://gist.github.com/419066 :P
14:29 masak huh. p6eval reports the line numbers right? :)
14:29 jnthn masak: Well, if the code is all on one line, it's not hard to get right. :-
14:29 snarkyboojum rakudo: die
14:29 p6eval rakudo 478ba4: OUTPUT«Died␤␤in main program body at line 11:/tmp/DXQZRmHgVo␤»
14:30 masak oh, ok.
14:30 masak snarkyboojum: what am I looking at in the paste?
14:30 oyse jnthn: Ok. Will have to fall back to Perl 5 then :)
14:30 snarkyboojum masak: the incorrect result - didn't parse properly
14:31 masak ah, right.
14:31 snarkyboojum should be a proper ast
14:31 Su-Shee mberends: http://pastebin.org/293404
14:31 masak to => -3
14:31 masak means it failed to match.
14:31 snarkyboojum masak: so perhaps regex problems in the grammar?
14:31 masak yes.
14:31 masak time to bring out the regex debugger!
14:32 snarkyboojum thought as much
14:32 snarkyboojum :)
14:32 snarkyboojum matches on alpha tho :|
14:32 masak interesting.
14:33 masak good luck.
14:33 snarkyboojum masak: ;)
14:33 masak remember that you can use say statements in the middle of rules too.
14:34 Su-Shee so, Mu is essentially the type for "somewhat empty and not really defined but here I am.." ? ;)
14:36 Wolfman2000 無 basically. Mu is mu.
14:36 snarkyboojum Su-Shee: "Or just think of it as a sound a cow makes, which simultaneously means everything and nothing."
14:36 oyse left #perl6
14:37 Su-Shee I know only japanese Mu in context of art and stuff.
14:39 mberends Su-Shee: that is part of the reason the name was chosen
14:39 Su-Shee "does the method return something?" "no, it's just your mind returning to the method."
14:40 snarkyboojum Su-Shee: yeah, literally named after http://en.wikipedia.org/wiki/Mu_(negative)
14:41 * jnthn afk for a couple of hours
14:41 masak it's everything because it's at the root of the class hierarchy. it's nothing because it's the least specified object, and because it is undefined (just like other type objects).
14:41 Su-Shee masak: I'm just doing zen puns. ;)
14:42 snarkyboojum masak: nicely explanation
14:42 snarkyboojum err.. *nice
14:42 Su-Shee also, I have a new slogan for perl 6:
14:42 Su-Shee "perl 6 - puns intended."
14:43 masak :)
14:43 masak let's hope we didn't miss any unintended ones, then.
14:43 Su-Shee let's call some edition "koan" ;)
14:45 cognominal I discovered recently that I was ignostic, may be I am indeed Mu-gnostic.    http://en.wikipedia.org/wiki/Ignosticism
14:47 masak ignosticism. lovely concept. :)
14:47 cognominal At the same time, I discovered that many rabbi did not believe in god.
14:52 Wolfman2000 cognominal: I find that hard to believe
14:56 snarkyboojum masak: was pretty straightforward in the end.. rakudo wasn't matching the leading newline at the beginning of the quoted $text string
14:57 masak snarkyboojum: ah :)
14:57 masak snarkyboojum: but why does alpha match it?
14:57 masak rakudo: class A { our enum B <c d> }; say A::B::c
14:57 p6eval rakudo 1727ca: OUTPUT«Can not find sub A::B::c␤in main program body at line 1␤»
14:57 snarkyboojum masak: good question
14:57 JimmyZ I sent a email to RT half an hour ago, I can't find it :(
14:57 masak jnthn: should the above work? I think it should.
14:58 masak JimmyZ: I can't see it either.
14:59 masak maybe it didn't get through the GFW.
14:59 JimmyZ GFW only blocks some of websites.
15:00 JimmyZ something like doc.spython.org
15:00 JimmyZ *python
15:00 masak yeah, block that one :P
15:00 JimmyZ It doesn't block email
15:01 masak JimmyZ: I know. just kidding; sorry. :)
15:01 JimmyZ :)
15:01 JimmyZ Nothing
15:02 JimmyZ masak: I sent a the bug:   { ;  } shouldn't be a hash.
15:03 JimmyZ s/a//
15:03 masak 没有RT ticket
15:03 JimmyZ 是的
15:03 JimmyZ ;)
15:03 tedv| joined #perl6
15:04 masak 我不只道它是在哪里
15:04 masak that was probably wrong, it was so long. :)
15:04 JimmyZ masak: s/是//
15:04 masak oh, ok.
15:05 masak of course.
15:05 masak been a while.
15:05 Wolfman2000 Right...I still need to try to learn Japanese. I really need a Skype partner to even attempt that though.
15:05 Wolfman2000 No one local is around.
15:05 masak 在 can verb on its own.
15:06 JimmyZ learning context is difficult in perl, and more difficult in naturl languages
15:07 masak rakudo: class A { package B { our sub c { say "OH HAI" } } }; A::B::c # jnthn: what about this one?
15:07 Wolfman2000 I meant learn Japanese in general.
15:07 p6eval rakudo 1727ca: OUTPUT«Can not find sub A::B::c␤in main program body at line 1␤»
15:07 JimmyZ *nature
15:07 masak JimmyZ: 'natural', in fact. it's the adjective form.
15:08 JimmyZ ops, wrong twice
15:08 JimmyZ my poor english
15:08 colomon my @r = (1, 2, 3); @r»++; say @r.perl
15:08 moritz_ rakudo: my @r = (1, 2, 3); @r»++; say @r.perl
15:08 p6eval rakudo 1727ca: OUTPUT«[2, 3, 4]␤»
15:08 colomon rakudo: my @r = (1, 2, 3); @r»++; say @r.perl
15:08 masak JimmyZ: your English is far above the average level of people's Chinese in here :)
15:08 p6eval rakudo 1727ca: OUTPUT«[2, 3, 4]␤»
15:09 aesop class and package do the same thing?
15:09 colomon rakudo: my @r = (1, 2, 3); @r»++; say ~@r
15:09 p6eval rakudo 1727ca: OUTPUT«2 3 4␤»
15:10 Wolfman2000 Huh...so ~@ prints out each element, huh?
15:10 Wolfman2000 rakudo: my @s = (2, 4, 6); say ~@s
15:10 moritz_ ~ stringifies
15:10 p6eval rakudo 1727ca: OUTPUT«2 4 6␤»
15:10 Wolfman2000 I forgot that
15:10 colomon Wolfman2000: ~@r turns @r into a string.
15:11 colomon like moritz_++ said
15:11 masak aesop: a class can be seen as a package with 'a few' extra tricks up its sleeve. :)
15:11 masak aesop: including a metaclass that knows what to do with attributes and methods and the like.
15:11 colomon jnthn: hyper patch seems sensible, but seems to break my rakudo build.
15:11 colomon > my @r = (1, 2, 3); @r>>++; say ~@r
15:11 colomon 1 2 3
15:11 smash_ moritz_: refresh http://gist.github.com/418999
15:11 colomon will try to investigate further when I get the chance, things are a bit crazy here at the moment.
15:12 moritz_ smash_: much better
15:12 aesop masak: will class do things similar to what moose does for perl 5? like creating accessors and such
15:13 masak rakudo: class A { has $.foo }; say A.new(:foo(42)).foo
15:13 p6eval rakudo 1727ca: OUTPUT«42␤»
15:13 masak aesop: that's an accessor being called right there.
15:13 masak aesop: no need for 'will'; it's implemented already :)
15:13 aesop ahhh
15:13 aesop nice
15:14 masak aesop: the accessors are lvalue methods, so you can assign to them as well. in that sense, they're both getters and setters in one.
15:14 smash_ moritz_: but unless you 'use fatal;' it still dies silently if it can't create the socket
15:14 pugssvn r30997 | moritz++ | [t/spec] tests for RT #69596, aliasing $0 into custom match objects
15:14 aesop yea
15:14 aesop i thought so
15:14 moritz_ smash_: but once we implement void context detection, it will fail loundly in void context
15:15 smash_ moritz_: excelent.. anything else to improve or can commit it ?
15:15 moritz_ smash_: go ahead
15:16 pmurias diakopter: hi
15:17 masak I still don't grok the exact difference between 'module' and 'package', besides differentiating Perl 5 code from Perl 6 code.
15:17 am0c joined #perl6
15:17 moritz_ masak: I kinda think the exporting magic is in modules, not packages
15:17 masak ooh!
15:17 moritz_ masak: but I don't know what you might need packages for
15:19 moritz_ rakudo: subset A of Mu; my A $x = 23;
15:19 p6eval rakudo 1727ca:  ( no output )
15:20 moritz_ huh. My eval_lives_ok fails
15:20 masak rakudo: subset A of Mu; my A $x = 23; say 'alive'
15:20 p6eval rakudo 1727ca: OUTPUT«alive␤»
15:20 moritz_ rakudo: use Test; plan 1; eval_lives_ok 'subset A of Mu; my A $x = 23;', 'subset A of Mu + type check and assignment works';
15:20 p6eval rakudo 1727ca: OUTPUT«1..1␤not ok 1 - subset A of Mu + type check and assignment works␤# Looks like you failed 1 tests of 1␤»
15:21 moritz_ rakudo: eval 'subset A of Mu; my A $x = 23;'; say $!
15:21 p6eval rakudo 1727ca:  ( no output )
15:21 dalek rakudo: 5fc925c | smashz++ | src/core/IO/Socket/INET.pm:
15:21 dalek rakudo: Fail if can't create socket.
15:21 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/5fc925ce246733a074a47c06bddd9c0d9effde0f
15:21 snarkyboojum another issue I'm having with day21 http://gist.github.com/419101
15:21 snarkyboojum works in alpha, but gives that error in rakudo
15:21 moritz_ snarkyboojum: please submit rakudobug
15:22 snarkyboojum moritz_: oh ok
15:22 moritz_ masak: am I missing something here? am I insane? or just rakudo?
15:22 masak rakudo: class A { class B { has A::B $.foo } } # golfed :)
15:22 p6eval rakudo 1727ca: OUTPUT«===SORRY!===␤In "has" declaration, typename A::B must be predeclared (or marked as declarative with :: prefix) at line 11, near " $.foo } }"␤»
15:23 masak moritz_: don't think you're missing something. I can't explain it either.
15:23 masonkramer joined #perl6
15:23 snarkyboojum masak++ # for golfing prowess :)
15:24 snarkyboojum I've never logged a bug - send email to rakudobug@perl.org as per README on github?
15:24 masak aye.
15:24 snarkyboojum okydoke
15:25 pugssvn r30998 | moritz++ | [t/spec] test for RT #74234
15:26 cognominal rakudo:  class A { class B { has B $.foo } }
15:26 p6eval rakudo 1727ca:  ( no output )
15:27 masak rakudo: package A { package A::B { our sub c { say "OH HAI" } } }; A::B::c # a-ha!
15:27 Limbic_Region joined #perl6
15:27 p6eval rakudo 1727ca: OUTPUT«OH HAI␤»
15:27 masak cognominal and I had two sides of the same insight :)
15:28 * masak submits rakudobug
15:29 smash_ moritz_: also updated RT#69232 and i would vote for closing that one
15:29 masak as I understand it, package/module/class/role/subtype/enum names are relative in their declaration, but absolute in their use.
15:29 masak right now it seems that Rakudo thinks that the names in the declaration are absolute, too.
15:29 moritz_ smash_: do we have tests for it?
15:29 pmichaud masak: actually, the above looks correct to me
15:30 pmichaud unless I'm not seeing something
15:30 masak pmichaud: I might have gotten used to something that alpha got wrong, then.
15:30 pmichaud what were you expecting?
15:30 masak pmichaud: you're saying that block nesting doesn't affect the name of a declared entity at all?
15:30 pmichaud no
15:31 masak oh, ok.
15:31 masak very well, then.
15:31 pmichaud I'm saying that in the above,  package A::B would be the same as package B
15:31 masak no rakudobug. :)
15:31 dual joined #perl6
15:31 pmichaud it's the B package within the A package
15:31 masak oh.
15:32 cognominal pmichaud++  # for the clarification
15:32 pmichaud (I could be wrong about this... package names haven't been crystal clear to me either)
15:32 masak let's slow down a bit. I'm not sure which piece of code you're talking about.
15:32 pmichaud 15:27 <masak> rakudo: package A { package A::B { our sub c { say "OH HAI" } } }; A::B::c # a-ha!
15:32 masak probably cognominal's.
15:32 masak oh, ok.
15:32 pmichaud that one looks right.
15:32 masak which means names in declarations are absolute.
15:32 pmichaud no
15:32 pmichaud it's because you (re-)used the A
15:32 pmichaud not because the name is absolute
15:33 masak if they were relative, I'd expect to have a package A::A::B.
15:33 pmichaud 15:27 <masak> rakudo: package A { package C::B { our sub c { say "OH HAI" } } }; C::B::c
15:33 pmichaud sorry
15:33 pmichaud just a sec
15:33 smash_ moritz_: do you mean in the spec or in rakudo ?
15:33 cognominal masak, I am a better golfer than you for package naming :)
15:33 masak pmichaud: I never said that :)
15:33 pmichaud rakudo: package A { package C::B { our sub c { say "OH HAI" } } };  A::C::B::c
15:33 p6eval rakudo 1727ca: OUTPUT«Can not find sub A::C::B::c␤in main program body at line 1␤»
15:34 pmichaud that one is wrong (afaik)
15:34 masak cognominal: :)
15:34 pmichaud that should've printed "OH HAI"
15:34 * masak submits rakudobug
15:34 pmichaud rakudo: package A { package C::B { our sub c { say "OH HAI" } } };  C::B::c
15:34 p6eval rakudo 1727ca: OUTPUT«OH HAI␤»
15:34 pmichaud afaik, that one is wrong.
15:35 masak pmichaud: I don't yet see why we don't agree on all points here, but glad we agree on those two.
15:35 pmichaud rakudo: package A { package A::B { our sub c { say "OH HAI" } } };  A::B::c
15:35 p6eval rakudo 1727ca: OUTPUT«OH HAI␤»
15:35 pmichaud as far as I know, that one is right.
15:35 masak o.O
15:35 masak that's, like, so inconsistent!
15:35 pmichaud the difference is that in the name A::B, we're re-using the A from the outer scope
15:35 masak :(
15:35 pmichaud look at it this way
15:36 pmichaud rakudo: package A { package B { our sub c { say "OH HAI }};  A::B::c }
15:36 p6eval rakudo 1727ca: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 11␤»
15:36 pmichaud rakudo: package A { package B { our sub c { say "OH HAI } };  A::B::c; }
15:36 p6eval rakudo 1727ca: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 11␤»
15:36 pmichaud rakudo: package A { package B { our sub c { say "OH HAI" } };  A::B::c; }
15:36 p6eval rakudo 1727ca: OUTPUT«Can not find sub A::B::c␤in main program body at line 1␤»
15:37 pmichaud that's *wrong*
15:37 masak yes!
15:37 pmichaud we should be able to find A::B
15:37 masak which was what all this was about.
15:37 masak names in declarations are absolute.
15:37 pmichaud no.
15:37 masak and not only those which you claim should be. :)
15:37 masak in Rakudo, they are.
15:38 pmichaud I agree that Rakudo gets it wrong (at least according to my reading of the spec)
15:38 pmichaud let's consider this one:
15:38 pmichaud rakudo:  module Foo { module Foo { ... } }
15:38 cognominal so, it worked for member variable declaration but not for a sub definition
15:38 p6eval rakudo 1727ca: OUTPUT«===SORRY!===␤Illegal redeclaration of symbol 'Foo'␤»
15:38 pmichaud Rakudo is right there.
15:38 masak ok.
15:39 pmichaud because "Foo" always refers to the outer Foo that is in scope
15:39 pmichaud it's not supposed to create Foo::Foo
15:39 pmichaud rakudo:  module Foo { module Bar { ... } }
15:39 p6eval rakudo 1727ca:  ( no output )
15:39 pmichaud creates Foo and Foo::Bar
15:39 pmichaud rakudo:  module Foo { module Foo::Bar { ... } }
15:39 p6eval rakudo 1727ca:  ( no output )
15:40 pmichaud also creates Foo and Foo::Bar
15:40 masak if you say so. :)
15:40 masak I haven't seen the spec say that, but I'm willing to find it in there.
15:40 cognominal rakudo:  module Foo { my module Foo::Bar { ... } }  # can it be private?
15:40 pmichaud it's the part that says there aren't any absolute module paths
15:40 p6eval rakudo 1727ca:  ( no output )
15:41 masak :)
15:41 pmichaud they're always relative
15:41 pmichaud and a X::Y name is always based on any X that is already defined
15:41 cognominal rakudo:  module Foo { my module Foo::Bar { ... } }
15:41 p6eval rakudo 1727ca:  ( no output )
15:41 cognominal ouch, xchat-- # tripped me again
15:42 masak I temporarily take back my accusations of inconsistency. I have to get used to this new way of thinking.
15:42 pmichaud masak: S10, "Package nesting"
15:42 masak oh, ok.
15:42 pmichaud first paragraph
15:42 masak I'm not sure I've ever read S10 :) that explains it.
15:43 cognominal module Foo { my module Foo::Bar { sub hi { say "hi" } } ;   Foo::V
15:43 cognominal rakudo:  module Foo { my module Foo::Bar { sub hi { say "hi" } } ;   Foo::Bar::hi
15:43 p6eval rakudo 1727ca: OUTPUT«===SORRY!===␤Can't handle scope declarator my on modules yet␤»
15:43 cognominal ok
15:43 pmurias diakopter: hi
15:43 pmichaud more interesting is something like
15:44 masonkramer our sub / my package = mind blown
15:44 pmichaud module C { module A { module C::B { ... } } }
15:44 pmichaud creates C, C::A, and C::B
15:44 masak aye.
15:44 pmichaud not C::A::B
15:44 cognominal makes sens to me
15:44 pmichaud or C::A::C::B
15:44 masonkramer why not C::A::C::B
15:44 pmichaud masak: because "C" refers to the outer C module
15:45 masak right.
15:45 pmichaud sorry, masonkramer
15:45 masak :)
15:45 pmichaud (tab completion fail)
15:45 moritz_ rakudo: say <A B C C>.pick(*).join('::')
15:45 p6eval rakudo 1727ca: OUTPUT«C::C::A::B␤»
15:45 masak masonkramer: our nicks have too long a common prefix :)
15:45 pmichaud another example
15:46 pmichaud module C { module A { module UNIT::B { ... } } }
15:46 masonkramer masak: 3 letters, what are the odds?
15:46 pmichaud creates C, C::A, and B
15:46 colomon rakudo: my @a = (1, 2, 3); @a>>++; say @a
15:46 p6eval rakudo 1727ca: OUTPUT«234␤»
15:46 pmichaud (which are really  UNIT::C,  UNIT::C::A, and UNIT::B
15:47 pmichaud it does not create C::A::UNIT::B
15:47 cognominal module C { module A { module UNIT::A { ... } } }  # even more interesting
15:48 pmichaud creates UNIT::C, UNIT::C::A, and UNIT::A
15:48 cognominal indeed
15:48 cognominal faster typer than me
15:48 Ross^ joined #perl6
15:48 cognominal in every meaning of the term.
15:49 masak module A { module UNIT::A {} } # clash?
15:49 pmichaud likely, yes.
15:49 masonkramer >> is what?  The new map?
15:50 pmichaud masonkramer: hyper operator
15:50 pmichaud performs an operation on all elements (in parallel)
15:50 dalek rakudo: 749fe91 | moritz++ | Test.pm:
15:50 dalek rakudo: [Test.pm] simplify eval_exception
15:50 dalek rakudo: The days when eval() would leak exceptions through are luckily long gone, no
15:50 dalek rakudo: need for nesting try {  eval() } anymore.
15:50 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/749fe91a9abf2a787a05dbe9b707c29e73a91960
15:50 cognominal pmichaud:  so the real interest of embedding is here  privacy when used  with my (not implemented yet)?
15:51 pmichaud cognominal: iiuc, "my" simply means that the symbol is entered in a lexical table but not in the package symbol table
15:51 cognominal otherwise it makes things more complicated to understand.
15:52 pmichaud module A { my module B { ... } };   # no A::B defined
15:52 cognominal I understand it is the Perl way to implement privacy
15:52 * masak reads S10
15:53 cognominal ho, so with my, the logic is different to derive the absolute name.
15:53 pmichaud with my, there is no absolute name
15:53 cognominal And who cares because no why will use it
15:54 pmichaud it's effectively anonymous outside of the scope in which it was declared
15:54 cognominal agreed.
15:54 pmichaud even inside of the scope, I suspect it may have to be only "B" and never "A::B"
15:54 pmichaud (because package A won't have an entry for B)
15:55 pmichaud in comments above, likely s/UNIT/GLOBAL/g  (after reading more of S11)
16:00 cognominal pmichaud, on a totally different subject, should a match  object contain a member with the name of the rule that was used  for the match?  I could see the use to create a link on a beautifier/debugger web based.
16:00 cognominal or does this member already exist?
16:00 pmichaud cognominal: that idea has come up several times.  It's always been rejected.
16:01 cognominal ok, why?
16:01 pmichaud I don't remember exactly (more)
16:01 cognominal nevermind
16:01 pmichaud one question is whether we used the name of the rule used for the match or the name of the alias under which the match was stored
16:01 pmichaud *use
16:01 pmichaud e.g.    <xyz=.abc>
16:01 tedv| joined #perl6
16:01 pmichaud (does the match object get "abc" or "xyz"?
16:02 cognominal tricky indeed
16:03 masak abc, in my view.
16:03 masak the 'xyz' is probably a key somewhere.
16:04 masak fwiw, I have written code which could have been simpler if such an attribute existed.
16:04 pmichaud masak: yes, that's why the question comes up frequently
16:04 masak so why is it always rejected? :)
16:04 pmichaud as I said, I don't recall exactly.
16:04 masak ok.
16:05 pmichaud (and I'm not the one doing accepting/rejecting)
16:05 masak it was the biggest discrepancy I noticed when translating a piece of code from Parse::RecDescent to Perl 6 grammars.
16:07 moritz_ mberends: do you have and data if commit 749fe91 sped up the spectest run?
16:07 moritz_ s/and/any/
16:10 moritz_ (I don't have high expectations)
16:11 moritz_ rakudo: say today() + 426 # expected date of ipv4 address exhaustion
16:11 p6eval rakudo 1727ca: OUTPUT«Could not find sub &today␤in main program body at line 1:/tmp/UEhusMlxcw␤»
16:12 moritz_ rakudo: say Date.today() + 426 # expected date of ipv4 address exhaustion
16:12 p6eval rakudo 1727ca: OUTPUT«2011-07-30␤»
16:13 colomon can anyone out there explain to me how/why the our multi sub hyper(&op, @arg) version works, as currently implemented in Rakudo?
16:13 moritz_ colomon: anything specifically you want to know?
16:13 colomon in particular, how can you use it as @a>>++ and have @a be modifed.
16:13 colomon *modified
16:14 moritz_ colomon: signature biding binds @arg to the caller's array
16:14 moritz_ colomon: and the for-loop binds $_ to the array items in turn
16:15 colomon moritz_: isn't "@arg is rw" needed to modify it?
16:15 colomon or is that only to modify the length?
16:15 moritz_ colomon: only for @arg = thing style modifications (that go through infix:<=>)
16:15 moritz_ colomon: otoh @arg[0] = something is just a method call
16:15 * colomon is bothered by this because any attempt he makes to modify this code seems to break the magic.
16:16 moritz_ that's why that patch by sahadev++ (hope I remember the name correctly) looks a bit weird
16:17 mberends moritz_: all the times for commit 34542f7 (early this morning) seem about 50% longer than 2 days ago
16:17 moritz_ :(
16:20 masonkramer joined #perl6
16:20 pmichaud I can run the spectest-update script -- it may let us know where things have slowed down
16:20 pmichaud (and by how much)
16:21 moritz_ anybody got a working example of how to export a multi in current rakudo?
16:21 moritz_ a multi sub from a module, that is
16:22 moritz_ I've tried a proto with 'is export' that dispatches to the other multis
16:22 mberends moritz_: that was *before* 749fe91. Starting to re-build and re-measure..
16:22 moritz_ but nextsame gives an Null PMC access in clone()
16:29 moritz_ rakudo: say ~3.2
16:29 p6eval rakudo 1727ca: OUTPUT«3.2␤»
16:30 kda joined #perl6
16:32 moritz_ rakudo: '12' ~~ /../; say +$/
16:32 p6eval rakudo 1727ca: OUTPUT«12␤»
16:33 moritz_ rakudo: '12' ~~ /(.)./; say +$/
16:33 p6eval rakudo 1727ca: OUTPUT«12␤»
16:33 moritz_ somehow I have a case where ~$/ is '1' and +$/ is 0
16:33 pmichaud ?
16:33 pmichaud seems odd.
16:33 moritz_ while debugging JSON::Tiny
16:34 moritz_ will try to reduce
16:34 moritz_ method value:sym<number>($/) { say "Number: $/"; say +$/; make +$/}
16:34 moritz_ produces
16:35 moritz_ Number: 1
16:35 moritz_ 0
16:37 masak moritz_: it's hard to reproduce that, though, not having the surrounding context, and the actual Match object sent in.
16:37 pmichaud what do you get with  say $/.Str  ?
16:37 moritz_ 1
16:38 pmichaud and how about   say +$/.Str ?
16:38 moritz_ oh
16:38 moritz_ it has a trailing space
16:38 pmichaud aha
16:38 moritz_ rakudo: '1 ' ~~ /.*/; say +$/
16:38 p6eval rakudo 1727ca: OUTPUT«0␤»
16:38 pmichaud rakudo++
16:38 moritz_ is that actually correct?
16:38 masak waitwait.
16:38 masak I'd expect '1' from that.
16:38 moritz_ I don't believe it is
16:39 moritz_ rakudo: say +'1 '
16:39 p6eval rakudo 1727ca: OUTPUT«1␤»
16:39 * masak submits rakudobug
16:39 pmichaud wait wait
16:39 masak moritz_++
16:39 pmichaud wait wait
16:39 masak :)
16:39 pmichaud seriously, wait
16:39 * masak wiats
16:39 pmichaud your intuition doesn't match what TimToady++ told me once during a concall
16:39 masak grr, spelling today is hpoeless!
16:39 cognominal rakudo:  say  +"1 "
16:39 p6eval rakudo 1727ca: OUTPUT«1␤»
16:40 pmichaud we were going to change numification so that it had to match exactly  (although trailing spaces might've been allowed)
16:40 pmichaud rakudo:  say +"1 abc"
16:40 p6eval rakudo 1727ca: OUTPUT«1␤»
16:40 pmichaud rakudo is wrong there
16:40 moritz_ pmichaud: and how would one numify while ignore trailing garbage?
16:40 masak I don't know that that update has even made it into the spec.
16:40 pmichaud moritz_: I don't know -- that was just what we discussed
16:40 moritz_ anyway, the current situation is incoherent in rakudo
16:41 masak yep. deserves a rakudobug.
16:41 moritz_ +1
16:41 * masak resumes submitting procedure
16:41 pmichaud no, the update never made it into the spec, afaik
16:41 moritz_ rakudo: '1 ' ~~ /.+/; say +$/.Str
16:41 p6eval rakudo 1727ca: OUTPUT«0␤»
16:41 moritz_ so, how do I get that 1 out of $/ ?
16:41 pmichaud rakudo:  '1 ' ~~ /.+/;  say $/.Str.chars
16:41 p6eval rakudo 1727ca: OUTPUT«2␤»
16:42 moritz_ rakudo: '1 ' ~~ /.+/; say +"$/"
16:42 p6eval rakudo 1727ca: OUTPUT«0␤»
16:42 pmichaud I'm wanting to know what's different about that str
16:42 masak moritz_: match it against /^\d+/ :P
16:42 pmichaud rakudo:  '1 ' ~~ /.+/;  say PARROT($/.Str)
16:42 moritz_ rakudo: '1 ' ~~ /.+/; say $/.Str.PARROT
16:42 p6eval rakudo 1727ca: OUTPUT«String␤»
16:42 p6eval rakudo 1727ca: OUTPUT«String␤»
16:42 pmichaud okay, so it has Parrot string semantics
16:42 moritz_ rakudo: '1 ' ~~ /.+/; say "$/".Str.PARROT
16:42 p6eval rakudo 1727ca: OUTPUT«String␤»
16:43 moritz_ why doesn't interpolation into "" makes it a proper Perl 6 string?
16:43 pmichaud rakudo is smart enough to optimize "$a" to be just ~$a
16:43 moritz_ how do I constructr a proper Perl 6 string from a parrot string?
16:43 pmichaud it should be happening automagically, really
16:44 pmichaud but even that doesn't entirely explain it.  why is Parrot string numification not working?
16:44 pmichaud rakudo:  '1 ' ~~ /.+/; say PARROT(~$/.Str)
16:44 p6eval rakudo 1727ca: OUTPUT«Str␤»
16:45 pmichaud rakudo:  '1 ' ~~ /.+/; say +~$/.Str
16:45 p6eval rakudo 1727ca: OUTPUT«1␤»
16:45 pmichaud rakudo:  '1 ' ~~ /.+/; say +"$/ "
16:45 p6eval rakudo 1727ca: OUTPUT«1␤»
16:45 pmichaud moritz_: anyway, the simple answer is to make sure that Match.Str returns a rakudo string
16:46 moritz_ pmichaud: how? concatenate a '' ?
16:46 pmichaud or use prefix:~
16:46 pmichaud or use substr directly
16:47 pmichaud method Str () { substr($.orig, $.from, $.from-$.to) }
16:47 pmichaud should do it.
16:47 * moritz_ tests a fix
16:47 moritz_ ~self.Regex::Match::Str
16:49 masak rakudo: sub foo(%hash? is copy) {}; foo
16:49 p6eval rakudo 749fe9: OUTPUT«Null PMC access in invoke()␤in '!STORE' at line 4186:CORE.setting␤in '!STORE' at line 4203:CORE.setting␤in 'foo' at line 1:/tmp/pynp4mE69t␤in 'foo' at line 11:/tmp/pynp4mE69t␤in main program body at line 11:/tmp/pynp4mE69t␤»
16:54 dalek rakudo: 8081285 | moritz++ | src/core/Match.pm:
16:54 dalek rakudo: make Match.Str return a Perl 6 Str
16:54 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/808128502df433e3d8be1cf943a7d9f9a3bb4597
16:54 dalek rakudo: c227238 | moritz++ | Test.pm:
16:54 dalek rakudo: [Test.pm] return comparsion result from is_deeply
16:54 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/c22723823e2c5d42dd700126911b6af208f6feb2
16:55 moritz_ I'm slowly recovering parts of JSON::Tiny
16:57 pmichaud I'll try not to break them again too much :)
16:57 pmichaud (but possibly will in the next 24h :)
16:57 moritz_ you'd get a shower of tickets :-)
16:57 pmichaud fine with me
16:59 azert0x joined #perl6
17:00 moritz_ yu mean, tickets are easy to ignore? :-)
17:01 moritz_ oh, another SPELING fail
17:01 moritz_ rakudo: say Q<<[foo]>>
17:01 p6eval rakudo 749fe9: OUTPUT«[foo]␤»
17:01 moritz_ rakudo++
17:02 Wolfman2000 ...note to self. Don't run movies while compiling Perl 6. It LAGS
17:02 moritz_ oh, I'm doing that right now
17:02 moritz_ I've just two different computers for that :-)
17:02 arnsholt Wolfman2000: That just means you need more cores =)
17:02 lue ohai!
17:02 Wolfman2000 arnsholt: Care to get me a new MBP?
17:02 azert0x joined #perl6
17:02 masak lue! \o/
17:03 arnsholt Wolfman2000: No, it's mine and you can't have it =p
17:03 masak lue: I've finally ironed out all of the test failures in GGE, so GGE runs fine with Rakudo master now. \o/
17:03 lue .oO(What I wouldn't do for a shiny multi-core notebook. Give up P6, for one.)
17:03 lue \o/
17:03 Wolfman2000 spoilsport
17:04 arnsholt Hehe. I spent a sizeable fraction of last summer's income on it, so I'm rather attached to it =)
17:04 moritz_ oh dammit, my JSON parser doesn't like negative numbers anymore
17:04 lue If it is better will it become the new grammar engine for rakudo?
17:04 masak lue: no :)
17:05 masak lue: it's definitely not better, and it's last year's technology.
17:05 masak a kind of "first generation" Perl 6 grammar engine, actually.
17:05 masak nqp-rx is "second-generation".
17:06 masak and I guess STD.pm6 is, too.
17:06 lue TGGE (Third Generation Grammar Engine)
17:06 moritz_ TGGE = Terribly Glacial Grammar Engine
17:07 masak lue: anyway, I'm at the point now where I'm actually rolling back RAKUDO-comment workarounds, and re-running the tests. that puts me in a heppy mood. :>
17:07 lue SEGFAULT = Speedy Engine of Grammar For All Underlying Language Tasks :)
17:07 lue If only rakudo could be pass all test :)
17:08 masak in all honesty, I have a few TODO tests.
17:08 masak but they are a strict subset of the ones for PGE. :)
17:09 moritz_ all but two parsing tests pass in JSON::Tiny
17:09 masak moritz_++
17:10 moritz_ turned out I changed a token to 'rule', which was quite fatal
17:11 masak 'package Foo;', with the semicolon instead of a block, is disallowed in Perl 6, according to S10.
17:12 masak that's another one of those "Perl 5 gotchas" things that will be turned off with a "Perl 6 without the Perl 5 gotchas" pragrma, once someone writes such a module :)
17:13 lue rakudo: package Foo;
17:13 p6eval rakudo 749fe9:  ( no output )
17:13 masak lue: care to submit that one?
17:14 * lue submits rakudobug
17:14 lue parsefail, it should be ?
17:14 masak rakudo: package Foo;␤say "alive"
17:14 p6eval rakudo 749fe9: OUTPUT«alive␤»
17:14 pmichaud why would that be a fail?
17:14 masak lue: yes, I suspect so.
17:14 masak std: package Foo;␤say "alive"
17:14 p6eval std 30998: OUTPUT«ok 00:01 114m␤»
17:14 masak pmichaud: because S10 says so.
17:14 pmichaud std: package Foo;
17:14 p6eval std 30998: OUTPUT«ok 00:01 111m␤»
17:14 moritz_ oooh I *hate* those:
17:14 masak STD.pm6 doesn't enforce it, though. probably should.
17:14 moritz_ not ok 1 - Correct data structure for «{ "a" : 1 }»
17:14 moritz_ #      got: {"a" => 1}
17:14 moritz_ # expected: {"a" => 1}
17:15 moritz_ that's is_deeply output
17:15 masak moritz_: type differences?
17:15 moritz_ masak: probably
17:15 masak moritz_: I'd count that as an is_deeply bug.
17:15 moritz_ masak: it's probably a .perl bug
17:15 masak could be.
17:16 moritz_ rakudo: say { a=> 1} eqv { a=>2 }
17:16 p6eval rakudo 749fe9: OUTPUT«0␤»
17:16 moritz_ rakudo: say { a=> 1} eqv { a=>1 }
17:16 p6eval rakudo 749fe9: OUTPUT«1␤»
17:16 masak maybe is_deeply should just use eqv nowadays.
17:16 moritz_ it does
17:17 masak oh!
17:17 masak someone++
17:17 masak pmichaud++, apparently. :)
17:18 moritz_ indeed pmichaud++
17:19 moritz_ now I've added $got.WHAT.perl() and $expected.WHAT.perl() output locally to Test.pm is_deeply
17:19 moritz_ and it says
17:19 moritz_ not ok 1 - Correct data structure for «{ "a" : 1 }»
17:19 moritz_ #      got: {"a" => 1} (type: Hash)
17:19 moritz_ # expected: {"a" => 1} (type: Hash)
17:19 Wolfman2000 ...
17:19 moritz_ not ok 5 - Correct data structure for «[3]»
17:19 moritz_ #      got: [3] (type: Array)
17:19 moritz_ # expected: [3] (type: Array)
17:19 Wolfman2000 Are there subtypes?
17:19 masak moritz_: maybe some number types output the same with .perl?
17:19 masak we have so many number types nowadays... :)
17:20 Wolfman2000 ...how many DO we have?
17:20 masak Int, Num, Rat, Complex...
17:20 moritz_ masak: interesting idea...
17:21 Wolfman2000 4 at least
17:21 lue masak: did you catch wind of the new backtrace?
17:21 masak lue: I love it! also, thanks for reminding me.
17:21 masak I promised jnthn++ to make a small adjustment.
17:22 masak that'll be the last thing I do today before going home to make $nom.
17:22 moritz_ masak++ # it's indeed Num() vs. Int()
17:22 masak \o/
17:22 M_o_C joined #perl6
17:22 Wolfman2000 rakudo: 3.perl()
17:22 p6eval rakudo 749fe9:  ( no output )
17:22 Wolfman2000 err
17:22 moritz_ rakudo: say 3e0.perl
17:22 Wolfman2000 rakudo: say 3.perl
17:22 p6eval rakudo 749fe9: OUTPUT«3␤»
17:22 p6eval rakudo 749fe9: OUTPUT«3␤»
17:22 masak moritz_: it would all be solved if 1 was always an Int().
17:23 kda left #perl6
17:23 masak I'd very much prefer that.
17:23 moritz_ masak: that would be the first half of the solution
17:23 lue I'm also making [not core of course] Quaternions :)
17:24 masak lue++
17:24 masak lue: put them on github!
17:25 araujo joined #perl6
17:25 lue when it's done. Should I put it in the pugs examples?
17:25 Su-Shee why does noone ever write "I'm also making Net::SSL.."? ;)
17:25 moritz_ Su-Shee: because encryption is hard, especially without bigints
17:26 masak lue: you'd get better visibility if you put them on github.
17:26 lue then in my own personal spot on github?
17:26 plobsing Su-Shee: they would. but you haven't handshaked with them yet.
17:26 lue rakudo: my $a = 0xFFFFFFFF; say $a.WHAT
17:26 p6eval rakudo 749fe9: OUTPUT«Int()␤»
17:26 Su-Shee moritz_: I'm being ironic in the face of having to look up what quaternions are. ;)
17:26 moritz_ lue: you can also put them in perl6-examples on github
17:27 masak lue: yes. and proto will point to the project so that people can install it.
17:27 * lue ponders CPAN6
17:27 moritz_ have fun pondering :-)
17:28 lue rakudo: my $a = 3+4i; say $a.Complex
17:28 p6eval rakudo 749fe9: OUTPUT«3 + 4i␤»
17:28 masak it's too early for CPAN6. and too late for proto. :P
17:29 Su-Shee too early? why?
17:29 Wolfman2000 Then what time is it?
17:29 lue Now why is the Complex class Cool?
17:29 masak Wolfman2000: zeppelin time.
17:29 dalek rakudo: fe19e82 | masak++ | src/Perl6/BacktracePrinter.pm:
17:29 dalek rakudo: [BacktracePrinter.pm] indented backtrace a bit
17:29 dalek rakudo: Added two spaces so that the backtrace will 'stand out' a bit and the
17:29 dalek rakudo: error message will be easier to spot.
17:29 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/fe19e8244b9c0ab84b908e19630d0944750334da
17:29 lue [no puns]
17:29 masak lue: because most value classes in Perl 6 are.
17:30 * lue will go look up what Cool is [no puns! :)]
17:30 Su-Shee mberends: the idea of 10-mysql.t is that I search for the p5 version of a test I should then add in 6-ish?
17:30 masak Su-Shee: I think it's too early because I've only seen blue-sky speculations for it, and no real need.
17:30 masak considering that we have ~40 projects, it's still on a manageable level without a CPAN-alike.
17:31 Su-Shee masak: on the other hand we suffer scattered-ness badly. it's really difficult to keep an eye on everything going on.
17:31 masak also, the best proposal for a CPAN6 that I've hear so far, is CPAN.
17:31 masak *heard
17:31 lue .oO(cpan6.cpan.org)
17:32 lue If that happened, then CPAN and CPAN6 should try to _not_ mix with each other, for the sake of organization.
17:32 masak Su-Shee: it is scattered. it sort of reflects the scatteredness of Perl 6 culture. some sub-efforts fizzle out and stop moving, others evolve and mutate. the result is a lot of bones and fossils littering the whole place.
17:33 lue .oO(Perl 6 is constantly evolving DNA)
17:33 masak lue: last i heard, the PAUSE people were discussing creating a separate sub-directory for Perl 6 modules.
17:33 Su-Shee masak: "oh really?" I've never realized in 10 years.. :) it's annoying and makes us difficult to find.
17:34 masak Su-Shee: yes.
17:34 masak Su-Shee: perl6.org and proto.perl6.org probably help some.
17:34 masak other ideas for *.perl6.org could probably help even more.
17:35 masak also, more people need to do like moritz_++, and disseminate the perl6.org link in footers on perlmonks and similar sites :)
17:35 Su-Shee I personally prefer one site for "that's the site", one for "the source and download", one for "community" and one for "cpan".
17:36 * masak heads home to create nom
17:36 Su-Shee cpan/gems/modules/foobars.. we could call perl 6 modules "puns" from now on. ;)
17:36 lue there's an idea. perl6.org is the center of all Perl6! cpan.perl6.org! (or, for minimal confusion, cpan6.perl6.org)
17:39 moritz_ rakudo: say (^5).perl
17:39 p6eval rakudo 749fe9: OUTPUT«0..^5␤»
17:39 mberends Su-Shee: yes. All the P5 tests are already in 10-mysql.t and translation is complete to about line 530 out of 3100. The tests below that should be in test script name order but you can see how the contents are inaccurate.
17:40 moritz_ rakudo: say (^5).max.WHAT
17:40 p6eval rakudo 749fe9: OUTPUT«Num()␤»
17:40 moritz_ why?
17:40 moritz_ why not Int?
17:40 moritz_ rakudo: say (+5).perl
17:40 p6eval rakudo 749fe9: OUTPUT«5␤»
17:40 moritz_ rakudo: say (+5).WHAT
17:40 p6eval rakudo 749fe9: OUTPUT«Num()␤»
17:41 Su-Shee mberends: I'll look for my rows. ;)
17:41 moritz_ rakudo: say (5.Numeric).WHAT
17:41 p6eval rakudo 749fe9: OUTPUT«Int()␤»
17:41 mberends Su-Shee: it's ok if we leave testing of .rows() until translation arrives at that part in the normal sequence.
17:42 moritz_ rakudo: 5 ~~ Mu
17:42 p6eval rakudo 749fe9:  ( no output )
17:42 moritz_ rakudo: say 5 ~~ Mu
17:42 p6eval rakudo 749fe9: OUTPUT«1␤»
17:42 moritz_ colomon: do you understand why (+5).WHAT gives Num, not Int?
17:43 mberends Su-Shee: test translation stopped at line 466 (P5) to 529 (P6) because SQL_INTEGER() was NYI.
17:44 mberends Su-Shee: actually that may be easy to implement as "our sub SQL_INTEGER { 4 }" in FakeDBI.pm6 about line 38
17:45 BrowserUk joined #perl6
17:45 Su-Shee mberends: that's all?! :)
17:45 moritz_ why does that remind me of sub rand { 4; # determined by fair dice roll }  ? :-)
17:45 mberends dunno, maybe ;
17:46 mberends that's how P5 did it
17:47 Su-Shee ok, I leave it without test for now.
17:47 lue moritz_: I loved that comic
17:56 Su-Shee mberends: pushed.
17:59 mberends :-) pulled
18:00 Su-Shee .oO(I can't really write /me pushed as a women somehow.. ;)
18:01 moritz_ women can push too. That much is sure :-)
18:01 mberends sounds like giving birth
18:01 Su-Shee exactly. just feels.. wrong. :)
18:03 lue as a parameter, was does it mean when you see $x: ?
18:04 moritz_ invocant marker
18:07 Trashlord joined #perl6
18:08 lue rakudo: say roots(27, 3)
18:08 p6eval rakudo 749fe9: OUTPUT«3 + 0i-1.5 + 2.59807621135332i-1.5 + -2.59807621135332i␤»
18:08 lue not what I thought would happen....
18:09 ejs joined #perl6
18:15 ejs joined #perl6
18:18 pmurias moritz_: have you seen todays xkcd?
18:21 pugssvn r30999 | pmurias++ | [mildew] fix some bitrot cause by STD changes
18:21 lue what's it about?
18:22 pmurias lue: it?
18:22 saaki joined #perl6
18:24 lue XKCD. I think it's still Friday's, but I forgot it :)
18:24 lue rakudo: my $a = 2+4i; my $b = $a ** 2; say $b
18:24 p6eval rakudo 749fe9: OUTPUT«-12 + 16i␤»
18:24 pmurias °
18:25 lue how did that happen? ō.o
18:29 moritz_ pmurias: yes :-)
18:32 moritz_ http://github.com/moritz/json/commit/508ff2d13d210a751bedafdf49a7de297630e78b what an ugly workaround :/
18:34 sorear jnthn: backtrackes in the REPL would be awesome.  Doubly so if you made them stop at (the bottommost occurrence of) HLL::Compiler::eval.
18:38 am0c joined #perl6
18:40 lue can someone tell me why this is defined how it is in Complex? :
18:40 lue sub exp() {Complex.new($.re.Num.exp * $.im.Num.cos, $.re.Num.exp * $.im.Num.sin);}
18:40 lue s/sub/multi method/
18:41 lue mainly, why does trigonometry get into this?
18:41 moritz_ exp( i x) = cos(x) + i sin(x)
18:41 am0c__ joined #perl6
18:43 mberends jnthn: while you're adding backtraces to the REPL, could you please add time travel as well? KTHXBAI
18:43 lue Why'd you want it to time travel? That's a debugger's job :)
18:46 mberends moritz_: 749fe91 exactly reverses the 50% slowdown reported earlier
18:52 lue I'm assuming that exp() method uses e as the default base?
18:58 sorear pmichaud: The match trees generated by STD.pm6 contain a _reduced field with the name of the rule used to generate each match
19:02 ejs1 joined #perl6
19:03 sorear phenny: tell masak : there is no 'package' statement in Perl 6.  "package Foo;" is interpreted as meaning "use v5; package Foo;" to allow pure-Perl-5 modules to be used unaltered.  STD implements this (partially)
19:03 phenny sorear: I'll pass that on when masak is around.
19:06 ingy joined #perl6
19:08 Trashlord joined #perl6
19:13 Ross joined #perl6
19:13 Ross joined #perl6
19:30 kensanata joined #perl6
19:33 * moritz_ would prefer less suprising magic
19:37 pugssvn r31000 | moritz++ | [t/spec] test that both parse time and run time error message contain line numbers
19:38 pmichaud sorear: (_reduced field) Oh, I didn't know that was there.  I'd be glad to see it make it into a spec -- perhaps something like $/.reduced
19:39 lue rakudo: say 3(4)
19:39 p6eval rakudo fe19e8: OUTPUT«invoke() not implemented in class 'Integer'␤  in main program body at line 11:/tmp/lQmqsWONW7␤»
19:40 lue rakudo: say 3*(1,2,3,4)
19:40 p6eval rakudo fe19e8: OUTPUT«12␤»
19:40 lue rakudo: say 3«*»(1,2,3,4)
19:40 p6eval rakudo fe19e8: OUTPUT«36912␤»
19:41 moritz_ down to 4 tickets that need tests (and could otherwise be closed)
19:43 lue \o/
19:44 dalek rakudo: dd0e5dd | moritz++ | t/spectest.data:
19:44 dalek rakudo: run test file for line numbers in error messages
19:44 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/dd0e5dd8c1645e61ca981cb49035b0683939f555
19:56 lue afk
20:06 molaf joined #perl6
20:16 pugssvn r31001 | moritz++ | [t/spec] test for RT #72840 and RT #69170
20:16 moritz_ http://en.wikipedia.org/wiki/Swampland_(physics) very nice article :-)
20:19 Psyche^ joined #perl6
20:25 * jnthn back from church&pub
20:25 moritz_ rakudo: my Rat $a; $a += 0.1 for ^10
20:25 p6eval rakudo fe19e8:  ( no output )
20:25 moritz_ rakudo: my Rat $a; $a += 0.1 for ^10; say $a
20:25 p6eval rakudo fe19e8: OUTPUT«1␤»
20:27 synth joined #perl6
20:27 pugssvn r31002 | moritz++ | [t/spec] test for RT #74626
20:31 pugssvn r31003 | moritz++ | [t/spec] test for RT #74344, call slurpy params by name
20:32 moritz_ rakudo: my @a = 1,2,3; my (@c) = @a; say @c.perl
20:32 p6eval rakudo fe19e8: OUTPUT«[[1, 2, 3]]␤»
20:36 moritz_ rakudo: my @a = 1,2,3; my (@c) = @a; .say for @c
20:36 p6eval rakudo fe19e8: OUTPUT«123␤»
20:37 moritz_ rakudo: my @a = 1,2,3; my (@c) = @a; my $i = 0; $i++ for @c
20:37 p6eval rakudo fe19e8:  ( no output )
20:37 moritz_ rakudo: my @a = 1,2,3; my (@c) = @a; my $i = 0; $i++ for @c; say $i
20:37 p6eval rakudo fe19e8: OUTPUT«1␤»
20:37 kda joined #perl6
20:38 TimToady looks like the right side isn't flattening
20:38 moritz_ I'm just wondering why the test (with is $i, 3) passes locally here
20:39 moritz_ ah, because I iterate over @a :-)
20:39 TimToady that would do it :)
20:40 pugssvn r31004 | moritz++ | [t/spec] test for RT #74336
20:42 plobsing joined #perl6
20:43 moritz_ rakudo: my Hash $x; $x[1]
20:43 p6eval rakudo fe19e8: OUTPUT«No applicable candidates found to dispatch to for '_block23422'. Available candidates are:␤:()␤␤  in main program body at line 1␤»
20:44 moritz_ bkeeler: if you're looking for something to do, http://rt.perl.org/rt3/Ticket/Display.html?id=73172 might be an interesting task :)
20:45 moritz_ rakudo: (return *)()
20:45 p6eval rakudo dd0e5d:  ( no output )
20:46 moritz_ rakudo: say my ::say (say $z)
20:46 p6eval rakudo dd0e5d: OUTPUT«Null PMC access in type()␤  in main program body at line 11:/tmp/AdiMqFq9dp␤»
20:47 * moritz_ going through RT
20:49 moritz_ rakudo: my @a=1,2,3; say ( ^@a ).perl
20:49 p6eval rakudo dd0e5d: OUTPUT«0..^3␤»
20:51 moritz_ perl6: my @v=2,5; say ( map {; $^b => $^a }, @v ).perl
20:52 p6eval elf 31004: OUTPUT«Undefined subroutine &GLOBAL::map called at (eval 124) line 4.␤ at ./elf_h line 5881␤»
20:52 p6eval ..rakudo dd0e5d: OUTPUT«Lexical '$b' not found␤  in main program body at line 11:/tmp/S2oRKEAoTj␤»
20:52 p6eval ..pugs: OUTPUT«((\5 => \2),)␤»
20:52 moritz_ perl6: my @v=2,5; say ( map {1; $^b => $^a }, @v ).perl
20:52 p6eval rakudo dd0e5d: OUTPUT«(5 => 2)␤»
20:52 p6eval ..elf 31004: OUTPUT«Undefined subroutine &GLOBAL::map called at (eval 124) line 4.␤ at ./elf_h line 5881␤»
20:52 p6eval ..pugs: OUTPUT«((\5 => \2),)␤»
20:56 colomon joined #perl6
20:58 moritz_ rakudo: enum X <a b c>; say a ~~ Int; say True ~~ Int # buglet
20:58 p6eval rakudo dd0e5d: OUTPUT«1␤0␤»
20:58 pugssvn r31005 | lwall++ | [STD] fix minor inconsistencies
20:58 arnsholt Does any of the nqp-rx wizard in here know of a good way to handle something that can be interpreted as both an operator and a term?
20:59 sorear Just declare it as both
20:59 moritz_ arnsholt: like, predictive parsing?
20:59 sorear see e.g. term:sym<...> and infix:sym<...> in rakudo src/Perl6/Grammar.pm
21:00 TimToady for example, term:sym<*> vs infix:sym<*>
21:00 arnsholt Mmm. Good points
21:00 sorear or better yet, yeah *
21:01 sorear rakudo: say (* * *)(2,2)
21:01 p6eval rakudo dd0e5d: OUTPUT«4␤»
21:02 moritz_ or /
21:03 saaki gonna try to grab it and see if you can see them
21:03 saaki mt =o
21:04 arnsholt Hmm. Looks like it's just a matter declaring both
21:05 arnsholt That's encouraging at least
21:06 arnsholt Then I just have to figure out the best way to implement the other restrictions on such weirdness in Prolog =D
21:06 sorear great.  someone changed STD.pm6
21:08 TimToady ~.
21:08 sorear ~. ?
21:09 sorear someone window-errored /usr/bin/mail and irc?
21:12 moritz_ rakudo: say :(3).perl
21:12 p6eval rakudo dd0e5d: OUTPUT«:(Int  where (3))␤»
21:13 sorear What exactly happens wen a qr// value is interpolated into a regex?
21:14 moritz_ in Perl 6?
21:14 TimToady std: qr//
21:14 p6eval std 31004: OUTPUT«[31m===[0mSORRY![31m===[0m␤Bogus term at /tmp/Sqgperl5OZ line 1 (EOF):␤------> [32mqr//[33m⏏[31m<EOL>[0m␤Undeclared routine:␤  'qr' used at line 1␤Parse failed␤FAILED 00:01 115m␤»
21:15 moritz_ it's basically inlined, but doesn't capture anything
21:15 TimToady hmm, I thougt that had a better message
21:15 pmichaud Perl 6 doesn't have a qr.  It's rx.
21:15 TimToady but hey, if I change STD.pm6 again, I'll be in trouble :)
21:15 pmichaud yeah, don't do that!
21:18 arnsholt We're done? =D
21:22 sorear TimToady: better error messages are fine, I'd just appreciate better summaries
21:22 sorear hmm.
21:22 sorear I wonder if there's a good way to ask svn "give me the last 10 changesets, with diffs"
21:23 wolverian git log -p
21:23 moritz_ right; use a git-svn clone
21:25 moritz_ why do we have both Code and Callable?
21:26 moritz_ are regexes !~~ Code?
21:27 sorear moritz_: the qr question was relative to Perl 5
21:27 sorear in the context of Cursor.pmc
21:27 jnthn moritz_: I'd figure regexes are ~~ Routine
21:29 sorear regexes are actually methods according to S05
21:29 Guest67735 left #perl6
21:30 pugssvn r31006 | moritz++ | [t/spec] fudge whatever.t for Rakudo
21:30 moritz_ so, why both Callable and Code?
21:31 TimToady why both Associative and Hash?
21:31 jnthn moritz_: Code, from where I am, serves little purpose.
21:32 moritz_ TimToady: because 'my %h' needs a default type. That's Hash.
21:32 jnthn TimToady: Yes, but we actualy never create anything of type Code
21:32 Psyche^ joined #perl6
21:32 moritz_ TimToady: my &c; doesn't have such a default
21:32 jnthn TimToady: Block inherits from Code, Routine inherits from Block and a bunch of stuff inherits from Routine.
21:32 jnthn TimToady: So all the stuff we currently have in Code could go in Block.
21:33 jnthn And Callable is left for "could I invoke this"
21:33 jnthn I guess the question is if we expect people create create callable things that should have some implementation commonalities with blocks but not be blocks.
21:34 jnthn *to create
21:34 TimToady are Thunks callable
21:34 jnthn I'd hope so. :-)
21:34 TimToady thunks are not blocks
21:34 TimToady not in the lexical sense
21:34 TimToady they are parasites on someone else's lexical scope
21:35 jnthn What would a Thunk and a Block share?
21:35 cognominal http://paste.lisp.org/display/110983  # how come the perl6 channel is no more supported?
21:35 jnthn That is, what would you expect to be in Code?
21:35 moritz_ are thunks user-exposed?
21:35 cognominal the pasted patch removes need_ext fossils in pmcs
21:36 TimToady they share the fact that they're callable, but that's a role
21:36 TimToady but a thunk is presumably an object
21:37 cognominal could a kind soul apply the patch?
21:46 mathw rakudo: say ("[[]]" ~~ /'['+ ']'+/)
21:46 p6eval rakudo dd0e5d: OUTPUT«[[]]␤»
21:50 mathw argh
21:50 mathw I accidentally added a file with git add
21:50 mathw how do I take it back out before I commit?
21:51 cognominal git rm?
21:51 mathw and why do no simple git guides tell you useful things like how to fix mistakes
21:52 arnsholt mathw: It is my thesis that git is not intended for humans to use =)
21:53 arnsholt Exactly how this fits in with git being quite nice on the whole, I don't know
21:53 mathw it's just... not quite done
21:53 arnsholt It's also documented and implemented from the inside out
21:53 mathw the only thing the user manual lists is git rm
21:54 mathw which removes it from the filesystem!
21:54 mathw I just don't want it in my commit
21:54 Eevee git reset HEAD file
21:54 plobsing IIRC, git status tells you how to remove it from staging
21:55 mathw oh yes
21:55 mathw aaaaaaaaaaaaargh
21:55 mathw must be time for bed
21:58 mathw phenny: tell masak I pushed some changes to Form which make it build on my system, but the tests fail. The first failure is in the parsing tests with some fields not parsing, so maybe Form::Grammar is now out of date.
21:58 phenny mathw: I'll pass that on when masak is around.
21:58 mathw &
22:01 cognominal good night
22:21 mariano joined #perl6
22:29 mariano joined #perl6
22:31 bluescreen joined #perl6
22:31 bluescreen joined #perl6
22:48 hercynium joined #perl6
22:52 pugssvn r31007 | sorear++ | [viv] Improve tracking of cut status, especially through quantifiers
23:01 Spreadsheet_ joined #perl6
23:01 Spreadsheet_ Has anyone been working on an interactive Perl 6 REPL?
23:02 wolverian rakudo has one.
23:02 wolverian it's actually what is run when you run just "perl6"
23:03 wolverian what would a non-interactive REPL be like, by the way?
23:03 m6locks i sure hope it allows redefining stuff
23:03 m6locks it was a pain in the ass a while ago
23:03 m6locks when not allowing redefinitions
23:04 wolverian it doesn't seem to save state across lines... I guess that's a bit WIP then :)
23:04 m6locks i does
23:04 m6locks well, at least it did a while ago
23:04 wolverian it doesn't see my sub definition, but does see a class definition.
23:04 m6locks not sure if they have disabled it
23:04 m6locks well then it might be a bug and worth submitting
23:05 m6locks masak usually handles this type of stuff....
23:15 sorear TimToady: What's going on at STD.pm6 line 1107?  :r inside a token
23:29 snarkyboojum joined #perl6
23:37 tedv| joined #perl6
23:38 sorear TimToady: How do I read cursor_xact log lines?

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

Perl 6 | Reference Documentation | Rakudo