Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-07-12

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:09 dalek rakudo: 91a34e7 | jonathan++ | src/ (2 files):
00:09 dalek rakudo: Rip out the non-syntactic Whatever method call to block logic. Doesn't cause any
00:09 dalek rakudo: spectest regressions, and removes a check from the method dispatch critical
00:09 dalek rakudo: path.
00:09 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/91a34e765d230097b8a02154e947e5523b07c472
00:10 sftp joined #perl6
00:23 jnthn night all o/
00:24 ingy gnite jnthn
00:24 ingy \o
00:25 ingy can I define a multi method that applies to two different sigs?
00:25 ingy hi snarkyboojum
00:25 ingy I just saw your msg
00:25 snarkyboojum ingy: hi ho
00:26 ingy snarkyboojum: I've been refactoring quite a bit
00:26 ingy I'll push in a sec for a code review :)
00:26 ingy I actually have a few q's
00:26 snarkyboojum ingy: lovely - just a few things that stood out for me on a quick read
00:28 rv2733 joined #perl6
00:34 ingy snarkyboojum: pushed. the code is now very different. uses multi methods. still lots of duplication
00:35 ingy snarkyboojum: you might want to ufo make install testml-pm6, to run the yaml-pm6 `make test` suite
00:35 snarkyboojum ingy: cool - will have a play :)
00:37 ingy snarkyboojum: for extra credit I have two tests at the bottom that are almost passing. just some extra whitespace. remove the --- SKIP lines to enable them
00:37 ingy snarkyboojum: also let me know if you want a commit bit.
00:37 snarkyboojum ingy: cool! will do
00:40 sorear I am experiencing an urge to throw out and redesign STD's symbol table caching subsystem
00:41 sorear Get rid of all the uses of cyclic data, eliminate the globality of ALL
00:43 tylercurtis joined #perl6
00:44 ingy sorear: FYJFTW!
00:48 snarkyboojum ingy: weird symlinking issues in t/ for testml-pm6 seem to prevent tests from finding *.tml files
00:50 ingy sorear: ah, yes
00:50 ingy grab testml-tml from github
00:51 snarkyboojum ingy: i.e. testml-tml -> ../../testml-tml from the t/ directory - assumes I have the testml-tml repo checked out at the same level as testml-pm6 repo
00:51 ingy and just clone it next to testml-pm6
00:51 ingy snarkyboojum: I have 3 implementations using this testml-tml suite.
00:51 ingy soon to be a dozen
00:52 ingy submodules could work too.
00:52 ingy s/sorear:/snarkyboojum:/
00:53 ingy I assume a make dist would tar up all the files for a typical module installer
00:54 ingy anyway, hopefully not a big deal
00:55 ingy snarkyboojum: also grab the latest ufo and do: cd testml-pm6; ufo - | make -f - install clean
00:55 ingy to install testml for running yaml tests
00:55 ingy snarkyboojum: also I fixed one of the whitespace bugs
00:56 ingy will check that in now.
00:57 ingy yaml-pm6 pushed
00:59 Sarten-X joined #perl6
01:02 pugssvn r31630 | Darren_Duncan++ | S02 : add initial formats for Blob (or Buf) literals
01:08 snarkyboojum ingy: make test for testml-pm6 complains about not being about to find Bridge (which resides in t/)
01:10 snarkyboojum ingy: same for yaml-pm6
01:11 snarkyboojum ingy: (using Makefiles generated by ufo)
01:12 ingy snarkyboojum: export PERL6LIB=t:lib
01:12 ingy snarkyboojum: or use my Makefile :P
01:12 snarkyboojum ingy: yeah - just mentioning the issues I'm coming up with - other than that, installed and working :)
01:12 ingy :D
01:13 ingy I've got a nice commit coming your way
01:19 ingy snarkyboojum: yaml-pm6 pushed
01:20 ingy support hoh and lol now
01:20 ingy snarkyboojum: do you have a github account?
01:21 snarkyboojum ingy: yep - snarkyboojum
01:23 ingy snarkyboojum: you have commit to both repos
01:23 snarkyboojum ingy: cheers! o/
01:32 ingy snarkyboojum: I just pushed t/fail.tml with a couple failing reference tests. Feel free to make them pass.
01:32 tylercurtis_ joined #perl6
01:32 pmichaud good afternoon, #perl6
01:32 ingy snarkyboojum: they are currently set up to be skipped, but if you look at the file it will be obvious what to do.
01:32 ingy pmichaud!
01:34 ingy pmichaud: I got ufo patched to install the latest testml-pm6 to run the new yaml-pm6 testml tests, which are all now passing!
01:34 pmichaud ingy: \o/
01:35 ingy today was a good p6 day. thus breaking my record losing streak!
01:36 ingy although I did find a couple rakudo bugs early on.
01:37 ingy rakudo: die foo; CATCH { say $! }
01:37 p6eval rakudo 91a34e: OUTPUT«Could not find sub &foo␤»
01:37 ingy rakudo: die 'foo'; CATCH { say $! }
01:37 p6eval rakudo 91a34e: OUTPUT«foo␤»
01:37 ingy rakudo: die 'foo'; CATCH { die $! }
01:37 p6eval rakudo 91a34e: OUTPUT«foo␤  in main program body at line 20:/tmp/b78yKiThnb␤»
01:37 ingy wow
01:37 ingy fixed already
01:37 ingy must be jnthn++
01:38 tylercurtis Good afternoon, pmichaud.
01:38 pmichaud this is why we need Rakudo Star and more people writing programs/modules for Rakudo :-)
01:38 pmichaud to find the bugs that we can fix :)
01:38 ingy pmichaud: yes, it was a banner field test day
01:38 ingy pmichaud: now with testml and yaml, I can start producing lots more mods
01:39 pmichaud rakudo:  say True..2;
01:39 p6eval rakudo 91a34e:
01:39 p6eval ..OUTPUT«111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111…
01:39 * pmichaud wonders what *should* happen there.
01:39 ingy I should have jsync-pm6 done this week
01:39 ingy which was my starting point with you guys :P
01:41 ingy rakudo: say 1..2
01:41 p6eval rakudo 91a34e: OUTPUT«12␤»
01:41 ingy pmichaud: in a normal language .. would coerce True to 1, no?
01:41 pmichaud .. isn't specified to coerce to numeric, no.
01:42 pmichaud because one can also do   'a'..'z'
01:42 ingy nod
01:43 ingy well given multi dispatch, it should coerce to Str,Str or Num,Num
01:43 ingy no?
01:43 pmichaud multi dispatch doesn't coerce
01:43 ingy FAIL
01:44 ingy time for $gf dance lessons.
01:44 ingy laters
01:44 pmichaud enjoy the dance!
01:46 snarkyboojum left #perl6
01:46 tylercurtis pmichaud: how can I convert a PAST::Op(:pasttype<call>) with the sub in the name into a PAST::Op(:pirop<tailcall>) node?
01:48 pmichaud I think:
01:48 pmichaud PAST::Op.new( :pirop<tailcall>, $old.name, |($old.list))
01:49 pmichaud anyway, the steps to do:
01:49 pmichaud 1.  change :pasttype to 'pirop'
01:49 pmichaud 2.  change :pirop to 'tailcall'
01:49 pmichaud 3.  unshift the sub name to be the first child
01:49 pmichaud that probably works.
01:50 pmichaud if it doesn't like the sub name as child zero, then change that to do a 'find_sub_not_null' pirop
01:52 tylercurtis Thanks. I'll try that.
01:58 tylercurtis find_sub_not_null it will have to be.
02:15 macdaddy joined #perl6
02:17 colomon jnthn: o/
02:18 hercynium joined #perl6
02:24 takadonet joined #perl6
02:26 tylercurtis pmichaud: I now have a prototype implementation of basic tail-call elimination for NQP-rx working(it only works with an explicit return, though). :)
02:27 dalek rakudo: bb6df24 | pmichaud++ | src/Perl6/Grammar.pm:
02:27 dalek rakudo: Accept <.ws> after version or module information in 'use' (per STD.pm6).
02:27 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/bb6df249fa0b0662eb8293ae83e035ee713491d0
02:27 dangyajun joined #perl6
02:29 dangyajun left #perl6
02:41 agentzh joined #perl6
03:00 masonkramer joined #perl6
03:04 TiMBuS joined #perl6
03:07 pragma_ joined #perl6
03:10 justatheory joined #perl6
03:40 redicaps joined #perl6
03:49 redicaps left #perl6
04:02 Sanitoeter joined #perl6
04:20 Sanitoeter joined #perl6
04:25 tylercurtis diakopter: ping
04:26 sbp joined #perl6
04:26 diakopter PONG
04:27 tylercurtis Can you add http://github.com/ekiru/tree-optimization to dalek for #parrot? It's the new location for my GSoC project.
04:28 diakopter ok, sorear or I will
04:29 tylercurtis Thanks.
04:44 dalek left #perl6
04:44 dalek joined #perl6
04:45 sorear mode #perl6 +v dalek
04:49 sorear tylercurtis: should be done
04:49 tylercurtis sorear: thanks.
05:18 Sanitoeter joined #perl6
05:26 dalek niecza: 8605d1d | sorear++ |  (4 files):
05:26 dalek niecza: Expose the preinit/run split to the entry point
05:26 dalek niecza: review: http://github.com/sorear/niecza/commit/8605d1d17ca1b95a448b52fa44d21a2c47cca1ae
05:26 dalek niecza: 66d8e05 | sorear++ |  (7 files):
05:26 dalek niecza: Implement the setting stubber and YOU_ARE_HERE
05:26 dalek niecza: review: http://github.com/sorear/niecza/commit/66d8e0594079a5724180bfbf22c1790a1fdf6048
05:41 pnate joined #perl6
05:43 uniejo joined #perl6
05:48 sorear apparently, perl -MCompilerDriver.pm -> syntax error at line 0, near use CompilerDriver.
05:49 diakopter </blink>
05:49 diakopter er
05:49 diakopter <blink />
05:53 mike joined #perl6
05:53 Guest22352 rakudo.org down?
05:54 diakopter seems so
05:58 cjk101010 joined #perl6
06:18 juster left #perl6
06:21 pugssvn r31631 | moritz++ | [t/spec] fudge S14-roles/basic.t for rakudo after TimToady++ added the new "also"
06:21 tylercurtis joined #perl6
06:21 sorear stefan@stefans:~/niecza$ time ./niecza -e 'say("Hello, World")'
06:21 sorear Hello, World
06:21 moritz_ and what does the 'time' print?
06:21 moritz_ hi sorear :-)
06:22 sorear 6s
06:22 * diakopter looks intently for the 'm' between the '6' and the 's'
06:22 sorear loading STD.pm6 and shelling out to the C# compiler are the main offenders here
06:27 dalek niecza: 02cd14c | sorear++ |  (2 files):
06:27 dalek niecza: Turn the compiler driver into a module
06:27 dalek niecza: review: http://github.com/sorear/niecza/commit/02cd14ceb3ac6d20609a997437a1fc4325ac758f
06:27 dalek niecza: cf024d4 | sorear++ |  (3 files):
06:27 dalek niecza: Implement setting separate compilation
06:27 dalek niecza: review: http://github.com/sorear/niecza/commit/cf024d4cf59132db3594a5da5b384f22ddc253bc
06:27 dalek niecza: 4a65229 | sorear++ | CodeGen.pm:
06:27 dalek niecza: Make trace spew optional
06:27 dalek niecza: review: http://github.com/sorear/niecza/commit/4a652295e2e626d81cfb177ab4b15b7733ff4b4f
06:27 dalek niecza: 41563a4 | sorear++ |  (4 files):
06:27 dalek niecza: Add a -e/REL wrapper
06:27 dalek niecza: review: http://github.com/sorear/niecza/commit/41563a4db0dbee4f308842f6cbb3d2629740d5ae
06:27 dalek book: 463b3d0 | (Gabor Szabo)++ | Makefile:
06:27 dalek book: add roles and subtypes chapters
06:27 dalek book: review: http://github.com/perl6/book/commit/463b3d0923707e8f322624f97aa1337b80cd6f59
07:00 salzh joined #perl6
07:00 lkk- joined #perl6
07:10 dalek book: 8a866a4 | (Gabor Szabo)++ |  (2 files):
07:10 dalek book: add builtins as the last chapter
07:10 dalek book: review: http://github.com/perl6/book/commit/8a866a4a18bbc75e6b1695814f6cfd2f9f2c149a
07:25 constant joined #perl6
07:25 constant joined #perl6
07:28 elmex joined #perl6
07:30 rgrau joined #perl6
07:43 redicaps joined #perl6
07:43 kfo joined #perl6
07:43 ilogger2 joined #perl6
07:43 breinbaas joined #perl6
07:43 frew joined #perl6
07:43 Intensity joined #perl6
07:48 _jaldhar joined #perl6
07:49 gfx joined #perl6
07:49 Sarten-X joined #perl6
07:49 jaldhar joined #perl6
07:49 nsh_ joined #perl6
07:49 sunnavy_ joined #perl6
07:49 japhb joined #perl6
07:51 dalek niecza: c1c8f20 | sorear++ |  (5 files):
07:51 dalek niecza: Implement box/unbox primitives, improved scope handling
07:51 dalek niecza: review: http://github.com/sorear/niecza/commit/c1c8f203f280fccfd59f8b41ec16ad6ff84cd624
07:51 dalek niecza: 2917971 | sorear++ |  (5 files):
07:51 dalek niecza: Expose box/unbox to NIL; make Str a real class
07:51 dalek niecza: review: http://github.com/sorear/niecza/commit/2917971dc0221fb27dae63396d93286261f32f26
08:07 Mowah joined #perl6
08:11 pugssvn r31632 | moritz++ | [t/spec] make qx/qqx tests more robust
08:12 TiMBuS in rakudo's pir ouutput, I often see the candidate list being set to random (null?) P registers. im not sure how to force it to tell me what it's trying to set.. at a guess, would it be a p6Invocation?
08:17 moritz_ just add a
08:17 moritz_ $S999 = typeof $P0
08:17 moritz_ printerr $S999
08:17 moritz_ printerr "\n"
08:17 moritz_ to it
08:17 moritz_ then you know the type of the $P0 register
08:17 moritz_ (yes, it's ugly to modify generated code, but for debugging it's OK :-)
08:18 TiMBuS wwwow why didnt i think of that? too busy analyzing the source to even think about modifying/running it
08:19 moritz_ because taking a step back as not an easy excercise :-)
08:20 redicaps left #perl6
08:29 dakkar joined #perl6
08:31 mathw Good localtime
08:32 moritz_ good morning mathw
08:33 cj joined #perl6
08:33 mathw Hi moritz_
08:34 moritz_ http://arcanesentiment.blogspot.com/2010/07/inevitable-interpreter.html monkey-typed continuation-based turing complete interpreter through libc calls...
08:34 thebird joined #perl6
08:36 mathw Wow
08:37 mathw Scary-amazing
08:37 moritz_ right
08:47 arnsholt I'm just going to pop off and floss my brain =)
08:49 moritz_ free/libre open source brain!
08:51 frettled FLOSB?
08:52 Guest998 joined #perl6
09:01 sorear stefan@stefans:~/niecza$ ./niecza -e 'say(42 / 3)'
09:01 sorear 14
09:02 moritz_ rakudo: say 42 / 3
09:02 p6eval rakudo bb6df2: OUTPUT«14␤»
09:02 moritz_ o/ they agree :-)
09:03 sorear two things, yapsi has, I don't
09:03 sorear variables
09:03 sorear control structures
09:03 moritz_ ingy: just saw your question in the backlog... in perfect Perl 6 you can give a routine two signatures, but NYI in Rakudo
09:03 sorear this will be fixed soon.
09:03 moritz_ sub (Int $x) | (Str $x) { say $x }
09:03 sorear but not tonight.
09:04 * sorear out.
09:04 moritz_ std: sub (Int $x) | (Str $x) { say $x }
09:04 p6eval std 31632: OUTPUT«ok 00:01 115m␤»
09:04 moritz_ good night
09:04 dalek niecza: 5cd98c5 | sorear++ |  (3 files):
09:04 dalek niecza: Implement method declarations
09:04 dalek niecza: review: http://github.com/sorear/niecza/commit/5cd98c5cc65cf8f789f2c84d293f88fe817472e4
09:04 dalek niecza: 7d05860 | sorear++ | setting:
09:04 dalek niecza: Implement .Str context, use it in &say
09:04 dalek niecza: review: http://github.com/sorear/niecza/commit/7d05860a0cae1325f68e494ebdef9d83909251d9
09:04 dalek niecza: 440f8e2 | sorear++ |  (3 files):
09:04 dalek niecza: Implement Num literals
09:04 dalek niecza: review: http://github.com/sorear/niecza/commit/440f8e2593299e0fbb6a8b4d1f3dacf06ce3aa44
09:04 dalek niecza: 4169610 | sorear++ |  (4 files):
09:04 dalek niecza: Implement four-function calculation on Num
09:04 dalek niecza: review: http://github.com/sorear/niecza/commit/416961014d5efb3cf2871e40a06042fc166923ad
09:08 xinming_ joined #perl6
09:09 ror_question_guy joined #perl6
09:13 ror_question_guy left #perl6
09:14 frettled Hmm.
09:14 frettled std: sub (Int $x) | (Num $x) | (Str $x) { say $x }
09:14 p6eval std 31632: OUTPUT«ok 00:01 115m␤»
09:14 frettled hah.
09:15 moritz_ std: sub (Int $x) | (Num $y) { } # should fail
09:15 p6eval std 31632: OUTPUT«ok 00:01 110m␤»
09:15 moritz_ std: sub (Int $x) | (Num $y) { say $x, $y } # should fail
09:15 p6eval std 31632: OUTPUT«ok 00:02 114m␤»
09:15 moritz_ TimToady: should probably complain about not using the same set of variables
09:20 Ross joined #perl6
09:26 clintongormley joined #perl6
09:28 envi^home joined #perl6
09:33 cj joined #perl6
09:33 szabgab can someone please remind me how to type « and » ?
09:33 moritz_ compose <<
09:33 szabgab on what eitor?
09:33 szabgab editor?
09:33 szabgab or os?
09:33 moritz_ or altgr+z or y (depending on your keybord)
09:34 moritz_ szabgab: on any OS that has a compose key :-)
09:34 moritz_ I think everything that uses the X windowing system has one
09:35 ruoso joined #perl6
09:36 szabgab I have a key with a windows icon on it
09:37 moritz_ typically you need to configure a compose key before first use
09:37 szabgab oh and I have a ket for "right click", I did not know that :)
09:37 moritz_ gnome and KDE offer GUI configurators
09:38 moritz_ I have keycode 115 = Multi_key  keycode 117 = Multi_key in my .xmodmaprc for that
09:39 szabgab « »  ok I managed these
09:39 szabgab configured right-alt to be the compose key
09:42 cono Got it :) «»
09:47 cono compose -> <3
09:49 proller joined #perl6
09:51 frettled moritz_: it's ≤≥ the same on a Mac; option + shift + v = «, no shift = ‹ :)
09:51 jnthn morning, #perl6
09:52 moritz_ good late morning, jnthn :-)
09:52 moritz_ jnthn: I've patched quoting.t, hope it works on windows now
09:56 szabgab
09:56 szabgab lovely :)
09:56 szbalint it is indeed
09:56 cono rakudo: multi sub infix:«÷»(Num $a, Num $b) {pir::div__NNN($a, $b)} say 5÷2
09:56 p6eval rakudo bb6df2: OUTPUT«===SORRY!===␤Confused at line 20, near "multi sub "␤»
09:57 cono What am I doing wrong?
09:57 pugssvn r31633 | jani++ | Changed from shtml to html, renamed CSS file, cleaned up pre-formatting a bit
09:59 jnthn cono: missing ; after the }
09:59 jnthn rakudo: multi sub infix:«÷»(Num $a, Num $b) {pir::div__NNN($a, $b)}; say 5÷2
09:59 p6eval rakudo bb6df2: OUTPUT«2.5␤»
10:00 cono jnthn: ah, thanks ☺
10:03 pmurias joined #perl6
10:07 masak joined #perl6
10:07 jnthn lolitsmasak
10:07 masak oh hai, #perl6!
10:08 jnthn moritz_: quoting.t is now WIN on Win32
10:09 jnthn er, PASS
10:09 jnthn :-)
10:09 * szabgab is looking for a Pass32 operating system
10:10 moritz_ nonono, let's start with pass64
10:11 szabgab Fail32 and Pass64
10:12 sorear phenny: ask TimToady How do you work around http://code.google.com/p/ibus/issues/detail?id=526 ?  ibus and compose-<-< seem to be incompatible
10:12 phenny sorear: I'll pass that on when TimToady is around.
10:12 bbkr masak: there is typo "becumes" in lates article on http://planetsix.perl.org/
10:12 masak bbkr: thanks, fixing.
10:13 masak fixed. bbkr++
10:13 masak it'll take a few minutes for it to propagate to http://planetsix.perl.org/
10:14 bbkr :)
10:17 bbkr rakudo: if "z" -> $a { say $a } # curious...
10:17 p6eval rakudo bb6df2: OUTPUT«z␤»
10:23 masak bbkr: its use is not immediately obvious. but there are "interesting values of 'true'" in Perl 6, such as the value returned from some routine the searches for things.
10:23 masak if find-first-match() -> $match { ... }
10:24 bbkr i know, this syntax is awesome!
10:25 jnthn .oO( if i-can-haz-cheezburger() -> $nom { omnom($nom) } )
10:25 masak :P
10:26 masak jnthn: bythewayitsmidtermreportsyay!
10:26 jnthn omgyay!
10:27 colomon o/
10:27 jnthn o/ colomon
10:27 moritz_ \o colomon. Did you enjoy your vacations?
10:27 masak colomon \o
10:27 colomon it was awesome
10:28 pmurias moritz_: hi, i'm brewing a fresh perl with perlbrew to check if Mildew installs on it
10:28 moritz_ pmurias: did diakopter give you shell access yet?
10:29 pmurias diakopter: ping
10:29 colomon eight hours fishing a day....
10:29 moritz_ sounds like stress... not :-)
10:29 pmurias moritz_: haven't spoken to him yet
10:30 colomon most relaxing vacation I've had in a long time.
10:31 * moritz_ is envious, but comforted by the thought of visiting YAPC::EU
10:32 * arnsholt is jealous of YAPC
10:32 arnsholt (going to, that is)
10:33 tadzik joined #perl6
10:33 moritz_ I'm thinking about applying for a Hague grant
10:34 jnthn moritz_: +1
10:34 moritz_ subject: non-string error messages for Perl 6
10:34 moritz_ s/error messages/errors/
10:34 masak \o/
10:34 masak moritz_: go for it!
10:34 sftp joined #perl6
10:34 * jnthn will be interested to see it
10:34 masak I've sometimes had the urge to trawl the synopses for all different types of error messages. :)
10:34 moritz_ come up with a spec for error objects, error classification, standard error messages, I18N hooks
10:35 * mathw is going to have to reserve time and money for YAPC::EU next year... or some other European Perl event. After he's renewed his passport, too.
10:35 moritz_ ok, two positive responses so far
10:36 jnthn moritz_: ooh, we could have lolspeak errors
10:36 jnthn .oO( there's more than one silly way to test I18N support )
10:36 pmurias moritz_: spec only or an implementation too?
10:36 jedai joined #perl6
10:36 moritz_ jnthn: I thought more about German error messages as proof-of-concept, but of course lolspeak is far superior
10:36 moritz_ pmurias: implementation too
10:37 mathw lolspeak
10:37 mathw Esperanto
10:37 mathw Lojban
10:37 mathw there are no limits
10:37 moritz_ limited to languages I know :-)
10:37 jnthn .oO( Ich kann haz Käseburger? )
10:37 mathw well you don't have to do them all yourself
10:37 moritz_ which obviously excludes English :-)
10:38 mathw Lojban would probably take several months just to sort out the vocabulary though
10:38 moritz_ mathw: sure, but the proof-of-concept should be something that makes sense to me
10:38 mathw so, lolspeak then :)
10:38 mathw or German
10:38 mathw German's good
10:39 sftp_ joined #perl6
10:40 moritz_ pmurias: I plan to discuss my spec ideas with all implementors too :-)
10:46 tadzik joined #perl6
10:47 timbunce joined #perl6
10:54 masak ah; the midterm evaluations cannot be made until 19:00 UTC today.
10:55 meppl joined #perl6
10:56 jnthn Aww!
11:04 masak jnthn: re what you just sent to p6c: does that still hold if Bool ~~ Int?
11:04 jnthn rakudo: say Bool ~~ Int
11:04 p6eval rakudo bb6df2: OUTPUT«0␤»
11:05 jnthn masak: No
11:05 jnthn It wouldn't
11:05 jnthn I'm still unconvvinced.
11:05 jnthn (On Bool being an enum.)
11:06 masak I would love to see Rakudo have a more fleshed-out enum implementation soonish.
11:06 jnthn Yes, I know.
11:07 masak maybe I should put my tuits where my mouth is and dig in and see what I can do. :)
11:07 jnthn Rumour has it tuits are tasty. ;-)
11:09 masak I had a few tuits but I eated them... :/
11:13 frettled Whether tuition is tasty or not is probably something that's best discussed somewhere else.
11:13 * frettled probably ought to have a look at how Rakudo is implemented, then run away screaming.
11:14 arnsholt The tools are actually quite nice
11:14 arnsholt NQP and PAST are pretty straightforward to work with
11:16 tadzik joined #perl6
11:20 frettled :)
11:32 redicaps joined #perl6
11:36 cono rakudo: multi sub infix:«÷» (Num $a, Num $b) { $a/$b }; say 5÷2
11:36 p6eval rakudo bb6df2: OUTPUT«2.5␤»
11:36 cono jnthn: could you please try this example in REPL? multi sub infix:«÷» (Num $a, Num $b) { $a/$b }; say 5÷2
11:39 moritz_ the REPL is known to be b0rked wrt non-ASCII character
11:42 rv2733 joined #perl6
11:45 cono moritz_: ah, thanks
12:12 sawyer_ joined #perl6
12:18 ocean joined #perl6
12:18 fda314925 joined #perl6
12:42 moritz_ http://duckduckgo.com/?q=perl+6&amp;v= perl6.org as first result \o/
12:44 moritz_ all ini all it seems to return very sane information :-)
12:50 skids joined #perl6
12:57 rgrau_ joined #perl6
13:25 moritz_ the example graphs from http://scruffy.rubyforge.org/ are all gone :(
13:25 moritz_ I wanted to motivate people to port scruffy to Perl 6
13:26 moritz_ but I think they will be far less impressed if there are no shiny graphs to show
13:27 moritz_ and in the bug tracker there is a report about it from 2009-09
13:29 mathw :(
13:29 moritz_ maybe I should really port Chart::Clicker instead
13:30 colomon what happened in the p6 packaging world while I was out?  is pls working?
13:30 moritz_ don't think so
13:30 bbkr is this ticket still valid? http://rt.perl.org/rt3/Ticket/Display.html?id=62002 looks like it was created before Mu object was added to spec.
13:30 mathw colomon: you might want to go out for a bit longer :)
13:31 moritz_ bbkr: well, it's now s:g/Object/Mu/
13:31 moritz_ bbkr: but all in all we still need a good default .perl method
13:31 pmurias moritz_: why are the example graphs all white
13:32 moritz_ pmurias: because they've fucked it up. And I can't find anybody who could fix it
13:32 moritz_ pmurias: and I'm kinda disappointed, because when I decided to port that lib to Perl 6 (back in 2009 I guess) it was all pretty, and a good incentive
13:33 jnthn Port it and then be like "and unlike Ruby we can show you thre pretty!" ;-)
13:33 moritz_ jnthn: problem is, I don't want to port it all by myself
13:34 jnthn Ah :-)
13:34 bbkr moritz_: thanks. but since both code samples work then the main problem in ticked - .perl method not available in user defined class - is solved (despite output it generates)
13:34 bbkr ticket*
13:34 moritz_ jnthn: so I want to show people "look at these pretty graphs, don't you want to write that for Perl 6 too?"
13:34 moritz_ bbkr: if you say so... then somebody will open a ticket about Any.perl being useless
13:34 moritz_ I don't mind either way
13:35 jnthn waybackmachine? :-)
13:36 pugssvn r31634 | pmurias++ | [STD-dist] add missing prereqs
13:36 pugssvn r31635 | pmurias++ | [mildew] add missing dependencies
13:36 pugssvn r31636 | pmurias++ | [mildew-setting-smop] remove useless use statements from MyBuilder
13:36 jnthn http://replay.waybackmachine.org/20080216062736/http://scruffy.rubyforge.org/
13:36 jnthn moritz_: ^^
13:36 pugssvn r31637 | pmurias++ | [smop] add missing dependencies
13:36 pugssvn r31638 | pmurias++ | [smop] disable the p5 module temporarly as it doesn't work on all perls
13:36 pugssvn r31639 | pmurias++ | [mildew] add missing prereq
13:37 pmurias moritz_: got mildew to work on a fresh 5.12.1
13:37 pmurias moritz_: what's the perl version on the evalbot box?
13:37 moritz_ jnthn: ah, completely forgot about that, thanks
13:37 moritz_ pmurias: there's a 5.12.1 and a 5.10.0 available
13:39 bbkr rakudo: module M { enum E <a b> }; M::E::a;
13:39 p6eval rakudo bb6df2: OUTPUT«Can not find sub M::E::a␤  in main program body at line 1␤»
13:39 pmurias moritz_: which one did you try to install mildew last time
13:40 moritz_ pmurias: the 5.10.0 one
13:40 pmurias moritz_: btw thanks for helping out with mildew installation
13:42 moritz_ pmurias: you're welcome
13:46 Lorn joined #perl6
13:47 pmurias moritz_: what do you use for having to perl's perlbrew?
13:47 pmurias * perls
13:48 moritz_ pmurias: uhm, I just used the system perl, and configured the other manually with -Dprefix=...
13:48 moritz_ no perlbrew involved
13:49 bbkr rakudo: my %h = "bike"=>"banshee","car"=>"dodge"; say %h{*}.values.say # curious..
13:49 p6eval rakudo bb6df2: OUTPUT«Any()␤1␤»
13:49 bbkr bug? or NYI?
13:49 moritz_ NYI, I'd say
13:50 pmurias moritz_: if you have time what we could attempt is to install mildew into it's own local-lib dir without using the other local::lib, it would duplicate some dependencies but that should avoid all the strange problems
13:50 pmurias s/local-lib/local::lib/
13:50 moritz_ pmurias: I could set up a different unix user with its own local::lib
13:50 bbkr moritz_: thanks
13:51 moritz_ pmurias: and use that for installing a perl + mildew... do you think that's sane?
13:52 pmurias yes
13:53 pmurias you want to have a seperate perl for mildew?
13:53 uniejo joined #perl6
13:53 moritz_ yes. Just to avoid repeating the current mess.
13:54 pmurias the system one should be fine
13:54 moritz_ that's a 5.10.0, not 5.12
13:55 pmurias moritz_: 5.10.0 is enough
13:55 pmurias but OTOH the system perl might have some evil bitrotten modules installed
13:56 pmurias moritz_: does diakopter have a disk space limit on his server?
13:56 moritz_ 28G free
13:56 bbkr rakudo: multi a (Str $a, Str $b) { [+$a, +$b] }; multi a (Array $a, $b where '+') { [+] @($a) }; ('1', '2', '+').reduce: &a; # checking http://rt.perl.org/rt3/Ticket/Display.html?id=66352
13:56 p6eval rakudo bb6df2:  ( no output )
13:57 moritz_ bbkr: don't rely on p6eval in the error case right now, it's a bit unreliable :/
13:58 bbkr moritz_: thanks. I'm just confirming results that i do on local machine on Kiev build. test above should reduce using second multi method, right?
13:59 bbkr rakudo: multi a (Str $a, Str $b) { [+$a, +$b] }; multi a (Array $a, $b where '+') { [+] @($a) }; say ('1', '2', '+').reduce: &a; # expecting 3...
13:59 moritz_ first with the Str, Str and then with Array, $b where '+' multi I think
13:59 p6eval rakudo bb6df2: OUTPUT«3␤»
13:59 pmurias moritz_: so using a seperate perl seems sensible
13:59 * colomon has no idea what bbkr is trying to do there.  Has someone been adding features?
14:00 bbkr colomon: no, i'm just checking old RT tickets
14:00 moritz_ pmurias: so my plan is now: 1) install perlbrew in ~mildew/perlbrew/
14:00 moritz_ 2) use perlbrew to install a perl-5.12.1 in ~mildew/usr/
14:01 moritz_ 3) use the new perl to install all the modules, and mildew
14:01 moritz_ sane?
14:02 moritz_ not sane
14:02 moritz_ because I need to set PERL5LIB for perlbrew to find its module
14:03 moritz_ which will likely confuse further installations
14:03 moritz_ better ideas? install perlbrew on the system?
14:04 pmurias moritz_: better idea read App::perlbrew
14:04 alester joined #perl6
14:04 pmurias 's docs
14:04 moritz_ that suggests it won't be a problem, right?
14:04 pmurias http://search.cpan.org/~gugod/App-perlbrew-0.07/lib/App/perlbrew.pm#INSTALLATION
14:05 colomon what does $b where '+' mean?
14:05 moritz_ colomon: it smart-matches against the '+'
14:05 moritz_ oh
14:05 pmurias moritz_: perlbrew doesn't need any fiddling with PERL5LIB
14:05 moritz_ ok
14:06 pmurias keep it mind that i first used it today so i'm no expert on it
14:08 pmurias after perlbrew installs perl-5.12.1 install cpanm
14:08 pmurias manual installation from CPAN of it should be easy enough
14:09 pmurias then cpanm Dist::Zilla and dzil install --install-command 'cpanm .' in the same modules as yesterday
14:10 PacoLinux joined #perl6
14:12 moritz_ perlbrew fails to create a Makefile for perl
14:13 gbacon joined #perl6
14:15 plainhao joined #perl6
14:15 bbkr rakudo: my @list = 1,2,Code; say @list.sort: { $^a cmp $^b }
14:15 p6eval rakudo bb6df2: OUTPUT«12Code()␤»
14:17 bbkr example above should sort by class name?
14:17 bbkr rakudo: my @t = Code, Array; say @t.sort
14:17 p6eval rakudo bb6df2: OUTPUT«Array()Code()␤»
14:18 moritz_ the default comparison stringifies if it can't find a better way
14:19 bbkr moritz_: http://rt.perl.org/rt3/Ticket/Display.html?id=67010 - so this one is fixed, can i steal it for tests?
14:19 moritz_ bbkr: sure
14:22 cono rakudo: Rat.new(½).perl.say
14:22 p6eval rakudo bb6df2: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 20␤»
14:22 tylercurtis joined #perl6
14:22 pmurias moritz_: how so?
14:23 pmurias how does perlbrew fail?
14:23 moritz_ with "no makefile and no target"
14:23 moritz_ which seems to imply that configure aborted with an error
14:23 moritz_ but its output doesn't end with an error
14:24 moritz_ anyway, I've now checkout out a copy of perl-5.12.1 from the git repo
14:24 moritz_ and try to let perlbrew do its magic on it
14:24 moritz_ seems to work so far, just takes some time
14:26 pugssvn r31640 | bbkr++ | [t/spec] tests for RT #67010 Error with glibc backtrace dump when cmp used wrong
14:30 ash_ joined #perl6
14:32 rindolf joined #perl6
14:34 bbkr rakudo: role Array {} # this shouldn't fail, right?
14:34 p6eval rakudo bb6df2:  ( no output )
14:35 moritz_ I think it should
14:35 moritz_ std: role Array { }
14:35 p6eval std 31639: OUTPUT«ok 00:01 110m␤»
14:35 moritz_ hu
14:35 moritz_ std disagrees with me
14:35 moritz_ it's probably right
14:36 tylercurtis std: role Foo { }; role Foo { }
14:36 p6eval std 31640: OUTPUT«ok 00:01 110m␤»
14:37 tylercurtis std: class Foo { }; class Foo { }
14:37 p6eval std 31640: OUTPUT«[31m===[0mSORRY![31m===[0m␤Illegal redeclaration of symbol 'GLOBAL::<Foo>' (from line 1) at /tmp/6u_xDK7YnJ line 1:␤------> [32mclass Foo { }; class Foo [33m⏏[31m{ }[0m␤Illegal redeclaration of symbol 'Foo' (see line 1) at /tmp/6u_xDK7YnJ line 1:␤------> [32mclass Foo {
14:37 p6eval ..};…
14:37 moritz_ ah right, roles are multis by nature
14:37 jnthn Aye
14:37 jnthn Though we could sometimes detect the signature overlap and whine earlier.
14:38 bbkr cool, then http://rt.perl.org/rt3/Ticket/Display.html?id=67768 looks like fixed
14:40 tylercurtis rakudo: role Foo { method f { say 1; } }; class A does Foo { }; A.new.f; role Foo { method f { say 2; } }; class B does Foo { }; B.new.f; A.new.f
14:40 p6eval rakudo bb6df2:  ( no output )
14:40 macdaddy joined #perl6
14:40 rindolf Hi all.
14:41 moritz_ hi
14:41 rindolf moritz_: what's up?
14:41 moritz_ the sun
14:41 bbkr rakudo: role Foo { method foo {say 666;} }; class A does Foo {}; A.new.foo
14:41 p6eval rakudo bb6df2:  ( no output )
14:41 * rindolf clubs moritz_ with a dictionary.
14:41 moritz_ ouch. That was not polite
14:41 tylercurtis rakudo: say 1;
14:41 p6eval rakudo bb6df2: OUTPUT«1␤»
14:42 moritz_ it's really the sun that dictates most of our lives around here
14:42 * rindolf clubs moritz_ with an etiquette guide.
14:42 bbkr tylercurtis: on Kiev build this returns "Could not find sub &say", which is weird
14:42 moritz_ by shining extremely and usually powerful
14:43 moritz_ and so it does on up-to-date rakudo
14:43 moritz_ it's the long-standing cannot-use-lexicals-from-the-setting-in-a-role bug
14:43 tylercurtis rakudo: role Foo { method f { 1.say; } }; class A does Foo { }; A.new.f; role Foo { method f { 2.say; } }; class B does Foo { }; B.new.f; A.new.f
14:43 p6eval rakudo bb6df2: OUTPUT«1␤1␤1␤»
14:44 moritz_ pmurias: perl installed, attacking cpanm now...
14:45 tylercurtis rakudo: multi f () {1.say;}; f(); multi f () { 2.say; }; f();
14:45 p6eval rakudo bb6df2: OUTPUT«Ambiguous dispatch to multi 'f'. Ambiguous candidates had signatures:␤:()␤:()␤␤  in main program body at line 20:/tmp/vfrQEOhjNk␤»
14:49 PacoLinux joined #perl6
14:49 patspam joined #perl6
14:56 masak colomon, moritz_: pls is "working" in that it has been shown to work for installing json. it needs much field testing with installing all other projects.
14:56 jnthn Plus the Win32 tweaks
14:56 jnthn Though I put some stuff into Rakudo that hopefully means all the platform specific stuff that shells out can go.
14:57 moritz_ masak: has it installed a project with a dependency yet?
14:58 moritz_ jnthn: a function for getting the current working directory would be handy too
14:58 masak moritz_: no, not really.
14:58 masak but the tests for it are all there.
15:01 pugssvn r31641 | bbkr++ | [t/spec] tests for RT #67768 Cannot declare a role with a name already assigned to a class
15:04 jnthn rakudo: say pir::new__Ps('OS').cwd()
15:04 p6eval rakudo bb6df2: OUTPUT«/home/p6eval/rakudo␤»
15:05 jnthn Should be easy to write
15:05 jnthn rakudo: multi cwd() { pir::new__Ps('OS').cwd() }; say cwd();
15:05 bbkr rakudo: say (1..10).sort(&rand)
15:05 p6eval rakudo bb6df2: OUTPUT«/home/p6eval/rakudo␤»
15:05 p6eval rakudo bb6df2:  ( no output )
15:07 ingy greetings
15:07 moritz_ \i/ngy
15:08 bbkr where can i put tests for http://rt.perl.org/rt3/Ticket/Display.html?id=68112 ? sort  or signature/arity ?
15:08 ingy \mmm/oritz
15:09 moritz_ bbkr: sort
15:09 bbkr moritz_: thanks
15:17 pugssvn r31642 | bbkr++ | [t/spec] tests for RT #68112 sort doesnt accept &rand (or zero-arg subs in general)
15:18 tylercurtis rakudo: .say for (1..10).sort(* % 3}
15:18 p6eval rakudo bb6df2: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 20␤»
15:18 tylercurtis rakudo: .say for (1..10).sort(* % 3)
15:18 p6eval rakudo bb6df2: OUTPUT«3␤6␤9␤1␤4␤7␤10␤2␤5␤8␤»
15:20 cono how can I omit "" in new? http://pastebin.com/VtgXMmme wanna: new(½)
15:20 ingy rakudo: my %h; %h{'x'} = 1; say %h.perl
15:20 masak bbkr: you just resolved #68112 because it works on Kiev, but I opened it again, because it fails on master.
15:20 p6eval rakudo bb6df2: OUTPUT«{"x" => 1}␤»
15:20 moritz_ cono: you'd have add a parsing rule for it
15:21 moritz_ cono: which is not yet implemente in Rakudo
15:21 ingy rakudo: my %h; %h{'x'} = 1; %h = (); say %h.perl
15:21 p6eval rakudo bb6df2: OUTPUT«{}␤»
15:21 cono moritz_: Can I make it in nqp ?
15:22 moritz_ cono: you can patch src/Perl6/Grammar.pm and add a term:sym<⅔> { <sym> }
15:22 bbkr masak: I'm sorry
15:22 cono moritz_: thanks :) I will try
15:22 masak bbkr: no worries. just letting you know, in case you wonder why it's open again.
15:24 bbkr masak: should i revert it from test suite untill expected behavior is determined?
15:25 isBEKaml joined #perl6
15:25 moritz_ bbkr: just fudge it for now
15:25 masak bbkr: might want to fudge it as "todo".
15:25 bbkr masak: ok, fudging
15:25 masak bbkr++
15:35 pugssvn r31643 | bbkr++ | [t/spec] tests for RT #68112 sort doesnt accept &rand (or zero-arg subs in general) - fudged
15:36 pmurias masak: how's installation?
15:36 masak pmurias: in pls?
15:36 masak it's good, as far as I've tested it.
15:36 pmurias masak: meant to ask moritz
15:36 pmurias masak: how's installation?
15:37 masak pmurias: try again :P
15:37 masak you need to type M, O, and *then* tab-complete.
15:37 [Coke] bbkr: are you trying to support all the unicode fractions?
15:37 jnthn And that's *still* ambiguous. :-)
15:38 masak jnthn: yes, but it tends to default to moritz_ :)
15:38 [Coke] I think you need the quotes unless you're going to change the grammar to allow those to be interpreted as numbers.
15:38 [Coke] (which would be a nifty patch.)
15:38 bbkr [Coke]: what do you mean by that?
15:38 moritz_ pmurias: installing dzil worked... now I'm tackling mildew
15:39 [Coke] bbkr: ... what do I mean by ... "you need the quotes" ?
15:39 masak my loops post made hacker news. http://news.ycombinator.com/item?id=1508071 -- they think 'repeat while EXPR { ... }' is goofy. I do too. :)
15:40 bbkr [Coke]: no, by "support all the unicode fractions"
15:41 [Coke] bbkr: whoops. I mean "cono", not "bbkr". =-)
15:41 * [Coke] did not review backscroll closely enough.
15:42 masak bbkr: re "determine behavior of 0-arity methods passed to sort" -- (1) it's not a method :) (2) I think the behavior is already clear, at least if the spec says this should act like a Schwartzian transform, which I think it does.
15:43 masak then the behavior is "collect all (random) values, sort on them".
15:44 ingy yaml-pm6 now handles dumping duplicate and circular references!
15:45 xinming joined #perl6
15:45 masak ingy: wow!
15:45 masak ingy++
15:46 bbkr masak: thanks, I didn't know about Schwartzian transform. adding this info to ticket.
15:46 masak bbkr: http://en.wikipedia.org/wiki/Schwartzian_transform
15:46 Trashlord joined #perl6
15:47 ingy masak: this things all work: http://github.com/ingydotnet/yaml-pm6/blob/master/t/dump.tml
15:47 cono [Coke]: no, just for Rats. It present only for numerator less than denominator
15:47 cono I guess it would be nice to make another one constructor for Rational numbers
15:47 cono Rat.new(⅞).perl.say something like that
15:48 masak ingy: that is really cool.
15:51 ingy masak: thanks!
15:52 [Coke] cono: so, unless the perl6 grammar changes to make those numeric and not "random unicode", you'll need the strings.
15:52 ingy masak: (it's powered by ufo :)
15:52 masak \o/
15:52 masak ingy: doesn't it feel a bit slow to re-generate the Makefile each time?
15:53 ingy masak: I only use it for install
15:53 masak ah, ok.
15:53 ingy I have my own Makefile for testing
15:53 masak :)
15:53 ingy I can do make t/specific.t
15:53 ingy you should add that
15:54 ingy we should also think about making the Makefile distributable
15:55 [Coke] portable makefiles suck.
15:55 [Coke] ... less than ant, but still. =-)
15:56 ingy [Coke]: I said _think_ about it
15:56 ingy :)
15:56 tadzik joined #perl6
15:56 moritz_ speaking of options... we could add --prefix for installing location
15:57 masak ingy: yes, I'd be happy to add 'make t/specific.t'
15:57 masak moritz_: sounds like a neat idea.
15:57 bbkr rakudo: multi foo(:$a!, *%_) {}; multi foo(:$b, *%_) {}; foo(:a, :b)
15:57 p6eval rakudo bb6df2: OUTPUT«Ambiguous dispatch to multi 'foo'. Ambiguous candidates had signatures:␤:(Any :a($a)!, *%_)␤:(Any :b($b), *%_)␤␤  in main program body at line 20:/tmp/J9JYdkj14S␤»
15:58 ingy masak: can I have a bit for ufo?
15:58 moritz_ ... and should I add it to hugme?
15:58 justatheory joined #perl6
15:59 masak ingy: you now have it.
15:59 masak moritz_: please, go ahead.
15:59 masak I'll keep a fairly close eye on commits landing in ufo, though. and I'll probably revert things I feel hesitant about.
15:59 masak I'd like to keep a slightly closer guard on it than I did with proto. :)
16:01 bbkr std: sub foo;
16:01 p6eval std 31642: OUTPUT«[31m===[0mSORRY![31m===[0m␤Malformed block at /tmp/C2QFrAHCvC line 1:␤------> [32msub foo[33m⏏[31m;[0m␤    expecting any of:␤  new name to be defined␤   routine_def␤      trait␤Parse failed␤FAILED 00:01 110m␤»
16:01 bbkr rakudo: sub foo;
16:01 p6eval rakudo bb6df2: OUTPUT«Could not find sub &foo␤  in main program body at line 20:/tmp/etRnoXzPKV␤»
16:01 moritz_ mildew@debian:~$ time !!
16:01 moritz_ time mildew -e 'say 1'
16:01 moritz_ 1
16:01 moritz_ real    0m7.061s
16:01 moritz_ \o/ it runs
16:01 moritz_ /o\ it's not that fast...
16:01 isBEKaml 7secs? :O
16:02 masak that's slower than Yapsi :)
16:02 ingy masak: \o/
16:02 masak granted, STD parsing takes some time...
16:02 cono [Coke]: or I can change perl6 grammar :)
16:03 moritz_ hugme: reload
16:03 hugme moritz_: reloaded successfully
16:03 moritz_ hugme: show ufo
16:03 hugme moritz_: the following people have power over 'ufo': P⁣erlJam, T⁣imToady, [⁣particle], c⁣olomon, j⁣nthn, m⁣asak, m⁣berends, m⁣oritz_, p⁣michaud. URL: http://github.com/masak/ufo/
16:03 tylercurtis .u fraction slash
16:03 phenny U+2044 FRACTION SLASH (⁄)
16:03 masak moritz_++
16:04 moritz_ pmurias: on the custom perl, I can install CHI without problems
16:04 moritz_ but the mere presence doesn't speed it up
16:05 bbkr rakudo: try { 1.say CATCH { say "inside catch" } };
16:05 p6eval rakudo bb6df2: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 20␤»
16:05 bbkr rakudo: try { 1.say; CATCH { say "inside catch" } };
16:05 p6eval rakudo bb6df2: OUTPUT«1␤»
16:07 bbkr rakudo: try { say abc; CATCH { say "inside catch" ~ $! } };
16:07 p6eval rakudo bb6df2: OUTPUT«inside catchCould not find sub &abc␤»
16:07 isBEKaml we have try-catch already? great! (can I assume that's p5's signals in p6? ^_^ )
16:08 isBEKaml rakudo: try { die "foo!"; CATCH { say "caught" ~ $! } };
16:08 masak which phasers trigger on a redo()?
16:08 p6eval rakudo bb6df2: OUTPUT«caughtfoo!␤»
16:09 * moritz_ decommutes
16:09 isBEKaml btw, should `catch` always be in caps? catch is treated like a phaser?
16:09 TimToady masak: I would say none of them, probably; it's just a goto the top of the block
16:09 phenny TimToady: 10:12Z <sorear> ask TimToady How do you work around http://code.google.com/p/ibus/issues/detail?id=526 ?  ibus and compose-<-< seem to be incompatible
16:09 isBEKaml rakudo: try { die "foo!"; catch { say "caught" ~ $! } };
16:09 p6eval rakudo bb6df2:  ( no output )
16:10 masak can you do next() in a LAST block and "abort" any last() inside the loop?
16:10 ruoso joined #perl6
16:10 isBEKaml rakudo: try { die "foo!";} catch { say "caught" ~ $! } ;
16:10 p6eval rakudo bb6df2: OUTPUT«===SORRY!===␤Confused at line 20, near "try { die "␤»
16:10 bbkr test for http://rt.perl.org/rt3/Ticket/Display.html?id=68728 should be put in S04-statements/try.t ? I'm not exactly sure what was causing the bug...
16:11 Cyrus joined #perl6
16:11 masak I think 'next' in a LAST block will actually just naturally fall out as resuming the loop :) if there is anything to resume, that is.
16:12 masak but it's scary-ish, since LAST actually executes after the loop has finished.
16:13 pmurias ruoso: hi
16:14 bbkr rakudo: my $a = "oh hai"; say $a .= "uc"
16:14 p6eval rakudo bb6df2: OUTPUT«===SORRY!===␤Quoted method name requires parenthesized arguments at line 20, near ""␤»
16:14 bbkr std: my $a = "oh hai"; say $a .= "uc"
16:14 p6eval std 31643: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unsupported use of . to concatenate strings or to call a quoted method; in Perl 6 please use ~ to concatenate, or if you meant to call a quoted method, please supply the required parentheses at /tmp/HDXgt_YnN3 line 1:␤------> [32mmy $a = "oh hai";
16:14 p6eval ..sa…
16:14 pmurias moritz_: the mildew slowness is caused by the high startup cost
16:15 pmurias moritz_: App::Persistent will take care of that but i'm not using it atm as it's not yet on CPAN
16:16 bbkr rakudo: my $a = "oh hai"; say $a .= "uc"()
16:16 p6eval rakudo bb6df2: OUTPUT«OH HAI␤»
16:17 ruoso hi pmurias
16:17 tylercurtis rakudo: my $a = "oh hai"; say $a .= uc; # simpler way if you know the method at program-write time.
16:17 p6eval rakudo bb6df2: OUTPUT«OH HAI␤»
16:17 isBEKaml rakudo: my $a = "hohai"; my $b = "uc"; say $a .= $b; # will this work?
16:18 p6eval rakudo bb6df2: OUTPUT«Method '!dispatch_variable' not found for invocant of class 'Str'␤  in main program body at line 20:/tmp/4JC2BH6oPS␤»
16:18 isBEKaml hmmm
16:18 masak rakudo: my $a = "hohai"; my $b = "uc"; say $a .= "$b"();
16:18 pmurias ruoso: Mildew installs on a fresh perl
16:18 p6eval rakudo bb6df2: OUTPUT«HOHAI␤»
16:18 isBEKaml hmmm, you need to quote an already quoted variable?
16:19 masak isBEKaml: "already quoted"? :)
16:19 isBEKaml ""$b""
16:19 isBEKaml :D
16:19 masak isBEKaml: you need the quotes if you want to do something dynamic.
16:19 cognominal What is the status of Whatever regarding to dispatching? On one hand, it should be accepted for any type and as such will create ambiguity. On the other, not all code is tooled to DWIM when receiving a Whatever?
16:20 isBEKaml I see.. Somehow I find using the quotes something of a nuisance.. :)
16:20 masak isBEKaml: in this case, they mean "the method name is not literally this".
16:21 PerlJam isBEKaml: purposeful nuisance.
16:21 masak that, too.
16:21 isBEKaml rakudo: my $a = "hohai"; my $b = "uc"; say $a .= $b[](); ## :O :O
16:21 p6eval rakudo bb6df2: OUTPUT«===SORRY!===␤Confused at line 20, near "say $a .= "␤»
16:21 tylercurtis rakudo: my $a = "hohai"; my $b = "uc"; say $a."$b"
16:21 p6eval rakudo bb6df2: OUTPUT«===SORRY!===␤Quoted method name requires parenthesized arguments at line 20, near ""␤»
16:21 tylercurtis rakudo: my $a = "hohai"; my $b = "uc"; say $a."$b"()
16:21 masak rakudo: my $m = method { say self + 10 }; 32.$m # you can do this, though
16:22 p6eval rakudo bb6df2: OUTPUT«HOHAI␤»
16:22 p6eval rakudo bb6df2: OUTPUT«42␤»
16:22 bbkr std: my $a = "oh hai"; say $a .= "uc"()
16:22 p6eval std 31643: OUTPUT«Potential difficulties:␤  Useless use of quotes at /tmp/OiJYK6kYDj line 1:␤------> [32mmy $a = "oh hai"; say $a .= "uc"[33m⏏[31m()[0m␤  Unsupported use of .= as append operator; in Perl 6 please use ~= at /tmp/OiJYK6kYDj line 1:␤------> [32mmy $a = "oh hai"; say $a
16:22 p6eval ...=[33m⏏[3…
16:23 tylercurtis std: my $a = "oh hai"; say ($a .= "uc"())
16:23 p6eval std 31643: OUTPUT«Potential difficulties:␤  Useless use of quotes at /tmp/0XjOgSjbpu line 1:␤------> [32mmy $a = "oh hai"; say ($a .= "uc"[33m⏏[31m())[0m␤  Unsupported use of .= as append operator; in Perl 6 please use ~= at /tmp/0XjOgSjbpu line 1:␤------> [32mmy $a = "oh hai"; say ($a
16:23 p6eval ...=[33m⏏…
16:23 tylercurtis std: my $a = "oh hai"; my $b = "uc"; say ($a .= "$b"())
16:23 p6eval std 31643: OUTPUT«Potential difficulties:␤  Unsupported use of .= as append operator; in Perl 6 please use ~= at /tmp/zxnvAhdTvS line 1:␤------> [32m $a = "oh hai"; my $b = "uc"; say ($a .=[33m⏏[31m "$b"())[0m␤ok 00:01 112m␤»
16:23 tylercurtis std: my $a = "oh hai"; my $b = "uc"; $a .= "$b"(); say $a;
16:23 p6eval std 31643: OUTPUT«Potential difficulties:␤  Unsupported use of .= as append operator; in Perl 6 please use ~= at /tmp/rxJIR43oom line 1:␤------> [32mmy $a = "oh hai"; my $b = "uc"; $a .=[33m⏏[31m "$b"(); say $a;[0m␤ok 00:01 111m␤»
16:24 isBEKaml masak: I guess the reason why we can do 32.$m is it's just an anon method. not quite the case in $b= "uc".
16:24 tylercurtis std: my $a = "oh hai"; my $b = "uc"; $a .= $b(); say $a;
16:24 isBEKaml (hopefully , I'm not wrong..)
16:24 p6eval std 31643: OUTPUT«Potential difficulties:␤  Unsupported use of .= as append operator; in Perl 6 please use ~= at /tmp/r0BOngt_wl line 1:␤------> [32mmy $a = "oh hai"; my $b = "uc"; $a .=[33m⏏[31m $b(); say $a;[0m␤ok 00:01 111m␤»
16:24 masak isBEKaml: right, it's completely different use cases, really.
16:24 * tylercurtis doesn't understand.
16:25 tylercurtis std: my $a = "hohai"; my $b = "uc"; say $a."$b"()
16:25 p6eval std 31643: OUTPUT«ok 00:01 111m␤»
16:25 tylercurtis std: my $a = "hohai"; my $b = "uc"; say $a."$b"();
16:25 p6eval std 31643: OUTPUT«ok 00:01 111m␤»
16:25 TimToady phenny tell sorear Alas, I don't remember how I got compose to work with ibus-anthy, but I did, so at least it's possible.  One thing I failed on was getting it to use my own .XCompose though.
16:25 masak swimming &
16:25 tylercurtis std: my $a = "hohai"; my $b = "uc"; say $a .= "$b"();
16:26 p6eval std 31643: OUTPUT«Potential difficulties:␤  Unsupported use of .= as append operator; in Perl 6 please use ~= at /tmp/FAb5P6eA5U line 1:␤------> [32mmy $a = "hohai"; my $b = "uc"; say $a .=[33m⏏[31m "$b"();[0m␤ok 00:01 111m␤»
16:26 bbkr RT is http://rt.perl.org/rt3/Ticket/Display.html?id=69204 now I'm confused if it's solved or not. seems to not be compatible with STD
16:26 tylercurtis rakudo: my $a = "hohai"; my $b = "uc"; say $a .= "$b"()
16:26 p6eval rakudo bb6df2: OUTPUT«HOHAI␤»
16:26 isBEKaml tylercurtis: yes, I was confused too. STD & rakudo at disparity here.
16:26 TimToady .$m is for hard refs only
16:26 TimToady ."$m" is symbolic
16:27 TimToady we always try to keep them distinct in p6
16:27 isBEKaml rakudo: my $a = "hohai"; my $b = &uc; say $a .= $b;
16:27 p6eval rakudo bb6df2: OUTPUT«Method '!dispatch_variable' not found for invocant of class 'Str'␤  in main program body at line 20:/tmp/vDMyRhvC9u␤»
16:27 isBEKaml rakudo: my $a = "hohai"; my $b = &uc; say $a .= $b();
16:27 p6eval rakudo bb6df2: OUTPUT«Method '!dispatch_variable' not found for invocant of class 'Str'␤  in main program body at line 20:/tmp/5aUDyabZ8z␤»
16:28 isBEKaml rakudo: my $a = "hohai"; my $b = &uc; say $a .= "$b"();
16:28 p6eval rakudo bb6df2: OUTPUT«HOHAI␤»
16:28 eternaleye joined #perl6
16:28 tylercurtis std: my $a; my $b; $a .= "$b"();
16:28 isBEKaml uhh, I don't understand. isn't $b = &uc; actually making a hard ref?
16:28 p6eval std 31643: OUTPUT«Potential difficulties:␤  Unsupported use of .= as append operator; in Perl 6 please use ~= at /tmp/2jGuo8LGpY line 1:␤------> [32mmy $a; my $b; $a .=[33m⏏[31m "$b"();[0m␤ok 00:01 111m␤»
16:29 TimToady yes, so the "$b" should not work
16:29 TimToady but that's semantics, which std doesn't check
16:29 PerlJam apparently neither does rakudo on this point  :)
16:30 isBEKaml rakudo: my $a = "hohai"; my $b = &uc; say $a .= $b(); ## hard ref, doesn't work.
16:30 p6eval rakudo bb6df2: OUTPUT«Method '!dispatch_variable' not found for invocant of class 'Str'␤  in main program body at line 20:/tmp/WIYAuX4pFS␤»
16:30 TimToady rakudo: sub foo; say &foo
16:30 p6eval rakudo bb6df2: OUTPUT«Could not find sub &foo␤  in main program body at line 20:/tmp/II_4K30ijl␤»
16:30 TimToady rakudo sub foo {...}; say &foo
16:30 TimToady rakudo: sub foo {...}; say &foo
16:30 p6eval rakudo bb6df2: OUTPUT«foo␤»
16:30 tylercurtis TimToady: should $a .= "$b"() produce that syntax error in std?
16:30 lichtkind joined #perl6
16:31 TimToady it's not a syntax error
16:31 TimToady it's a usage warning
16:31 PerlJam TimToady: should it stringify with the & ?
16:31 tylercurtis Oh. Right.
16:31 TimToady which doesn't look ahead far enough to see the ()
16:31 * tylercurtis didn't notice the ok at the end.
16:31 TimToady and probably should
16:33 PerlJam so, ""() is never a valid construction?
16:33 TimToady std: my $a; my $b; $a.="$b"();
16:33 p6eval std 31643: OUTPUT«ok 00:01 110m␤»
16:33 TimToady sure it is
16:33 ingy rakudo: %h = (f => 5); say %h.elems
16:33 TimToady the () is required for interpolation though
16:33 p6eval rakudo bb6df2: OUTPUT«===SORRY!===␤Symbol '%h' not predeclared in <anonymous> (/tmp/zrRZPT2xve:20)␤»
16:33 ingy rakudo: my %h = (f => 5); say %h.elems
16:33 p6eval rakudo bb6df2: OUTPUT«1␤»
16:33 TimToady you can suppress the .= warning by leaving out the spaces
16:34 ingy rakudo: my %h = (f => 5, g => 1); say %h.elems
16:34 pyrimidine joined #perl6
16:34 p6eval rakudo bb6df2: OUTPUT«2␤»
16:34 ingy rakudo: my %h = (); say %h.elems
16:34 ilogger2 joined #perl6
16:34 p6eval rakudo bb6df2: OUTPUT«0␤»
16:38 ruoso pmurias, that's awesome...
16:38 ruoso what's the next step? "use v6-mildew"?
16:41 ingy moritz_: do you run the evalbot?
16:43 moritz_ ingy: yes
16:45 ingy moritz_: is there any way to have modules installed with it?
16:46 moritz_ ingy: yes. Write a script that clears the installation site, fetches and builds the modules. I'll add it to the rebuild script.
16:47 ingy moritz_: can I write it in /bin/sh ?
16:47 moritz_ ingy: sure
16:48 ingy moritz_: is your entire evalbot setup installable from git?
16:49 moritz_ ingy: no
16:49 TimToady rakudo: die 'foo'; CATCH { say $! }  # by strict reading of spec this should not mark $! as handled, but die again with "foo"
16:49 p6eval rakudo bb6df2: OUTPUT«foo␤»
16:49 TimToady jnthn: ^^^
16:49 moritz_ ingy: just assume that there's a ~/p/bin/perl6 available
16:49 TimToady only .defined and .Bool mark as handled
16:50 moritz_ I thought if there's a matching when-block it's also handled?
16:50 TimToady yeah, that too, but that's not true in this case
16:50 moritz_ die 'foo'; CATCH { when * { say "gotta catch 'em all" } }; say "lives"
16:50 tedv joined #perl6
16:51 TimToady I'm wondering if say is testing .defined somewhere deep
16:52 TimToady maybe it's okay, but it seems like a place that implementations could easily diverge
16:53 silug joined #perl6
16:54 moritz_ right
16:54 TimToady it's really a circularity saw issue; do primitives that invoke .defined internaally have $! handling semantics, or should there be a lower-level .__defined__ -ish thing
16:55 jnthn TimToady: Aye, I didn't expect to fix that.
16:55 TimToady do you know how it's happening?
16:55 jnthn TimToady: I was just fixing the re-catch.
16:56 TimToady is there a deep .defined somewhere?
16:56 jnthn Well, at the moment it appears to always mark an exception as handled.
16:56 jnthn Whatever happened inside the CATCH
16:57 jnthn TimToady: Sorta in the sense that there's the Parrot v-table interface
16:57 TimToady but it should have redied when it hit the end
16:57 jnthn Which hs a defined v-table method
16:58 TimToady if there's an implicit die at the end that is only bypassed by 'succeed', how did it not die?
16:58 jnthn TimToady: I know - the code we generate at the moment just unconditionally marks the exception as handled though.
16:58 isBEKaml when doing CATCH { when * { ... } }; what does * catch here? Are we speaking of catching exceptions in terms of unix-y errnums or Exception classes ?
16:59 TimToady should have died again anyway
16:59 cdarroch joined #perl6
16:59 cdarroch joined #perl6
16:59 jnthn TimToady: huh?
16:59 TimToady isBEKaml: yes
16:59 TimToady there's an implicit die/rethrow at the end of a CATCH that gets bypassed by a when's 'succeed' breakout
16:59 jnthn Right, I know that's how it should work.
17:00 jnthn That's just not the way it's been implemented. :-(
17:00 jnthn So it needs a re-work.
17:00 * jnthn didn't write any of the original exception-y stuff - yesterday was the first time I hacked on that bit.
17:01 tylercurtis It seems like that could be a problem even with non-primitives. After all, if .defined and .Bool mark as handled, then you have to be very careful about what functions you call with $! in a CATCH.
17:01 TimToady isBEKaml: more specifically, 'when' is doing smartmatching, so if you match numerically, you'll get errnos, and if you match type-ly, you get exception classes
17:01 TimToady and 'when *' always matches anything
17:01 TimToady it's another way of writing 'default'
17:01 ingy what doe .HOW do?
17:01 ingy *does
17:02 TimToady tylercurtis: yes, that's what I was trying to say re circularity saws
17:02 tylercurtis On the other hand, sometimes you actually do want to defer your exception-handling logic to a separate sub.
17:02 moritz_ ingy: it returns the metaclas
17:02 cognominal TimToady, what is the status of Whatever for dispatching in the light of Range as a role?
17:02 moritz_ HOW = Higher Order Workings
17:02 [Coke] that's what the synopses need, an index.
17:03 lue ohai o/
17:03 isBEKaml TimToady: in that case, is there any way to define our own exceptions? Contrived Eg., when dealing with currencies, I don't want to see numbers without decimal points. So can I write code to throw exceptions when format errors liek these crop up?
17:03 moritz_ [Coke]: they had one, last I looked
17:03 tylercurtis TimToady: right. It sounded like you were mostly concerned about primitives, though.
17:03 ingy rakudo: class Foo {}; say Foo.new(x => 1)
17:03 p6eval rakudo bb6df2: OUTPUT«Foo()<0x817e950>␤»
17:03 TimToady well, the question is how many layers of turtles thre are
17:03 tylercurtis [Coke]: http://perlcabal.org/syn/index_X.html or http://perlcabal.org/syn/index_C.html , take your pick.
17:04 cognominal I also mean, if I instanciate a parmetric role with a type, it should accept WHATEVER as well.
17:04 ingy rakudo: class Foo {}; say Foo.new(x => 1).x
17:04 jnthn TimToady: I'm not sure what things would check definedness by mistake. Maybe binding against a signature with a :D in it would.
17:04 p6eval rakudo bb6df2: OUTPUT«Method 'x' not found for invocant of class 'Foo'␤  in main program body at line 20:/tmp/p56S1Bsn0f␤»
17:04 [Coke] tylercurtis, moritz_ : wow. that could really use a better label than x or c tags. =-)
17:04 ingy rakudo: class Foo {has $.x is rw}; say Foo.new(x => 1).x
17:04 p6eval rakudo bb6df2: OUTPUT«1␤»
17:04 ingy rakudo: class Foo {has $.x is rw}; say Foo.new(x => 1).perl
17:04 [Coke] (on http://perlcabal.org/syn/)
17:04 p6eval rakudo bb6df2: OUTPUT«Foo.new()␤»
17:04 [Coke] moritz_++
17:04 [Coke] tylercurtis++
17:04 moritz_ .perl on Any sucks, I know
17:05 ingy moritz_: how do I access the members of an object?
17:05 moritz_ ingy: via accessors :P
17:05 pmichaud good morning, #perl6
17:05 jnthn TimToady: Maybe we should say succeed or .Bool sets it handles but not .define
17:05 ingy moritz_: how do I YAML Dump an object?
17:05 moritz_ attribute introspection just returns name and type of the attribute
17:05 jnthn *defined
17:05 tylercurtis [Coke]: they're labelled "Indexes" on http://perlcabal.org/syn/
17:05 cognominal good morning pmichaud
17:05 jnthn morning, pmichaud
17:05 TimToady isBEKaml: sure, the exception types are completely open-ended
17:06 ingy moritz_: how do I introspect attributes?
17:06 jnthn TimToady: If we find it causes problems for .defined to clear it anyway.
17:06 moritz_ I guess you could try with pir::getattribute__pps()
17:06 jnthn ingy: Objects are opaque.
17:06 TimToady jnthn: foo() // die "$!" has to work right
17:06 jnthn TimToady: oh.
17:06 TimToady so maybe // instead of .defined
17:06 isBEKaml rakudo: class Foo { has $.xfoo; }; say Foo.^fields; ## Just sayin' :P
17:06 moritz_ rakudo: class Foo { has $!x }; say Foo.^attributes.perl
17:06 p6eval rakudo bb6df2: OUTPUT«Method 'fields' not found for invocant of class ''␤  in main program body at line 20:/tmp/SZ6rBy_PBk␤»
17:06 p6eval rakudo bb6df2: OUTPUT«(Attribute.new(), )␤»
17:06 [Coke] tylercurtis: yes. having something slightly more verbose than "X tags" would be nice.
17:06 jnthn TimToady: Heh... // calls .defined on the LHS, no?
17:06 moritz_ rakudo: class Foo { has $!x }; say ~Foo.^attributes».name
17:07 TimToady well, yes, but it's also its own thing
17:07 p6eval rakudo bb6df2: OUTPUT«$!x␤»
17:07 ingy rakudo: class Foo { has $!x; has $!y }; say ~Foo.^attributes».name
17:07 p6eval rakudo bb6df2: OUTPUT«$!x $!y␤»
17:07 jnthn TimToady: Could always make a low-levelish thing be macro-ish
17:07 ingy rakudo: class Foo { has $!x; has $.y }; say ~Foo.^attributes».name
17:07 jnthn .DEFINED
17:07 p6eval rakudo bb6df2: OUTPUT«$!x $!y␤»
17:08 TimToady cognominal: I have no idea what would happen if you instantiate a role with type Whatever, probably depends on how you use it in the role
17:08 jnthn TimToady: But...ew...that has issues too
17:08 ingy what's the diff between 'has $.x' and 'has $!x' ?
17:08 moritz_ the former generates an accessor
17:09 jnthn http://perlcabal.org/syn/index_C.html # how did I not know about this
17:09 TimToady ingy: see the cheet sheet :)
17:09 moritz_ the latter doesn't
17:09 ingy TimToady: url?
17:09 isBEKaml TimToady: thanks!
17:09 moritz_ it's on perl6.org/documentation/
17:09 TimToady it's on perl6.org/documentation
17:09 TimToady ETOOSLOW
17:09 ingy no url?
17:09 [Coke] jnthn: that's what I was thinking. =-)
17:10 tylercurtis ingy: http://svn.pugscode.org/pugs/docs/Perl6/Cheatsheet/cheatsheet.txt
17:10 TimToady ingy: we're trying not to give you a fish (except for tylercurtis++) :)
17:10 moritz_ jnthn: http://nopaste.snit.ch/21971 any idea what might be wrong?
17:10 * ingy wnats a pony
17:11 moritz_ Match inherits from Regex::Match, which has a $!from attribute
17:11 cognominal TimToady, if Range was rewritten as a role, that would be  Role [::T] { has T $.min  }.      But in that light what  1..* would mean dispatching wise?  one : there would be no explicit instantiation of the role. And * is not an Int.
17:11 * ingy RTFCS...
17:11 moritz_ ingy: perl6.org gives you a pony - it just comes in the shape of a butterfly :-)
17:11 ingy :)
17:11 cognominal ...or is it?
17:11 jnthn moritz_: You're sure that your new method is getting called?
17:12 jnthn (good to check)
17:12 tylercurtis moritz_ aren't you setting the 'from' attribute instead of '$!from'?
17:12 moritz_ tylercurtis: right
17:12 takadonet joined #perl6
17:12 jnthn tylercurtis: Yeah, but I'd expect an error if it was that
17:12 moritz_ oh, it's not called
17:12 moritz_ "huh"
17:13 moritz_ renaming it to 'create' and then calling Match.create seems to work
17:13 jnthn rakudo: class Foo { }; augment class Foo { method new { say "called" } }; Foo.new
17:13 p6eval rakudo bb6df2: OUTPUT«===SORRY!===␤Can't augment class Foo without 'use MONKEY_TYPING'␤»
17:13 TimToady cognominal: if range is controlled by the left arg, then the role can contain both a (T,T) sig and a (T,Whatever) sig
17:13 jnthn rakudo: use MONKEY_TYPING; class Foo { }; augment class Foo { method new { say "called" } }; Foo.new
17:13 p6eval rakudo bb6df2:  ( no output )
17:14 jnthn hmpfth
17:14 * moritz_ submits rakudobug
17:14 gbacon joined #perl6
17:14 ingy rakudo: class Foo { has $!x; has $.y }; say ~Foo.^attributes
17:14 p6eval rakudo bb6df2: OUTPUT«Attribute()<0x865c930> Attribute()<0x865ce70>␤»
17:15 ingy rakudo: class Foo { has $!x; has $.y }; say ~Foo.^attributes.WHAT
17:15 p6eval rakudo bb6df2: OUTPUT«Parcel()␤»
17:15 jnthn rakudo: class Foo { has $!x; has $.y }; say ~Foo.^attributes>>.name
17:15 p6eval rakudo bb6df2: OUTPUT«$!x $!y␤»
17:15 jnthn rakudo: class Foo { has $!x; has $.y }; say ~Foo.^attributes>>.has_accessor
17:15 p6eval rakudo bb6df2: OUTPUT«0 1␤»
17:15 isBEKaml :wq
17:15 * hugme hugs isBEKaml, good vi(m) user!
17:15 moritz_ there's a section in S12 about introspection, I believe
17:15 ingy rakudo: class Foo { has $!x; has $.y }; say ~Foo.^attributes[1]
17:15 p6eval rakudo bb6df2: OUTPUT«Attribute()<0x25bb1f0>␤»
17:16 ingy rakudo: class Foo { has $!x; has $.y }; say ~Foo.^attributes[1].name
17:16 p6eval rakudo bb6df2: OUTPUT«$!y␤»
17:16 isBEKaml heh
17:16 * isBEKaml hugs hugme
17:16 ash_ for nqp do you guys use perl6 syntax highlighting?
17:17 moritz_ yes
17:17 Sanitoeter joined #perl6
17:18 TimToady npq is supposed to be a strict subset, but doesn't always succeed
17:18 moritz_ yeah, like with Q:PIR { }
17:19 ingy is there a p6 vim hilighter that works?
17:19 moritz_ good enough, IMHO
17:19 ingy moritz_: which one?
17:19 arnsholt vim-perl on github
17:19 isBEKaml http://github.com/hinrik/vim-perl.git
17:19 arnsholt petdance/vim-perl IIRC
17:19 moritz_ the one linked on http://perl6.org/whatever/ :-)
17:20 ingy maybe I have it installed wrong
17:20 moritz_ # vim: ft=perl6
17:20 isBEKaml ingy: what moritz_++ said or :set syntax=perl6
17:21 isBEKaml ingy: note that my solution is just temporary. you have to type it everytime you open a p6 source file. :)
17:21 pmurias ruoso: i think the test step would be to get App::Persistent to work
17:22 ingy isBEKaml: I understand
17:22 ruoso pmurias, but I just noticed after writing... do you have full Mildew? or just the parser/
17:22 ruoso meaning...
17:22 moritz_ when you  ack -l 'ft=perl6' | wc -l  in rakudo you get a good approximation for how many files I've touched :-)
17:22 alester ingy: How did you install it?
17:22 ruoso pmurias, do you have the mildew-setting working already?
17:22 ingy moritz_: does foo ?? 1 !! 2 work right?
17:22 alester also: Work in progress, y'know.
17:22 pmurias ruoso: yes
17:23 moritz_ ingy: if foo is a term, yes
17:23 moritz_ if it's a function name, not sure
17:23 ruoso pmurias, awesome...
17:23 moritz_ std: foo ?? 1 !! 2
17:23 p6eval std 31643: OUTPUT«[31m===[0mSORRY![31m===[0m␤Expecting a term, but found either infix ?? or redundant prefix ?␤  (to suppress this message, please use space between ? ?) at /tmp/QSJPbD8MZB line 1:␤------> [32mfoo ??[33m⏏[31m 1 !! 2[0m␤Parse failed␤FAILED 00:01 112m␤»
17:23 ingy moritz_: everything after !! is fucked for me
17:23 pmurias ruoso: but not the whole setting is ported over
17:23 ruoso pmurias, but it's probably a good idea to get'em actually released on CPAN, wouldn't it?
17:23 moritz_ rakudo: say 1 ?? 3 !! 5
17:23 p6eval rakudo bb6df2: OUTPUT«3␤»
17:24 ingy moritz_: I'm talking about hilightling :P
17:24 moritz_ rakudo: sub foo () { }; say foo ?? 3 !! 5
17:24 tylercurtis rakudo: sub foo() { True; } foo ?? 1 !! 2;
17:24 moritz_ ingy: oh
17:24 p6eval rakudo bb6df2: OUTPUT«===SORRY!===␤Confused at line 20, near "say foo ??"␤»
17:24 p6eval rakudo bb6df2: OUTPUT«===SORRY!===␤Confused at line 20, near "sub foo() "␤»
17:24 moritz_ ingy: works fine here
17:24 tylercurtis rakudo: sub foo() { True; }; foo ?? 1 !! 2;
17:24 p6eval rakudo bb6df2: OUTPUT«===SORRY!===␤Confused at line 20, near "foo ?? 1 !"␤»
17:24 tylercurtis rakudo: sub foo() { True; }; foo() ?? 1 !! 2;
17:24 ingy I have to put a !1; after it to reset the highlighting
17:24 p6eval rakudo bb6df2:  ( no output )
17:25 moritz_ ingy: the highlighter is a bit picky about s\b and m\b
17:25 pmurias ruoso: it would be mostly a matter of taking things from the old CORE and making them parse under the new stricter STD
17:25 moritz_ and y, for that matter
17:25 moritz_ even though y/// is gone
17:25 ingy moritz_: I'll try to reinstall the .vim
17:26 moritz_ but my perl6.vim is also outdated
17:26 * moritz_ git pull's
17:26 ruoso pmurias, I see... most of it is related to $LexicalPrelude usage, right?
17:27 pmurias i made STD accept $LexicalPrelude
17:28 pmurias DefinedBySMOP.setting contains all the stuff which are defined by SMOP
17:28 ruoso right...
17:28 ruoso so, where is the problem/
17:29 pmurias i think coping over most of the stuff would be easy
17:30 TimToady ingy: foo ?? 1 !! 2 is a syntax error in Perl 6
17:30 TimToady listops always expect a term, not an operator
17:31 ingy sigh
17:31 pmurias ruoso: i disabled the p5 interop as it was depending on MULTIPLICITY being set while building the perl
17:32 pmurias moritz_: did mildew install?
17:32 moritz_ pmurias: yes
17:32 ingy moritz_: I grabbed http://github.com/petdance/vim-perl.git, did make intstall, set ft and it still looks like p5 syntax hl
17:32 ash_ set ft=perl6
17:32 ruoso pmurias, hmm.... isn't that a commonly used option?
17:32 ash_ :set ft=perl6 to be more precise
17:32 * ruoso doesn't remember building a custom Perl to run SMOP p5 interop
17:32 ingy moritz_: try !! with ft=perl5
17:32 pmurias ruoso: the one in debian has that
17:33 ingy moritz_: what happens?
17:33 pmurias as it's needed by threading
17:33 isBEKaml joined #perl6
17:33 ingy ash_: yeah, I said I did that
17:33 moritz_ ingy: nothingmuch
17:33 ruoso pmurias, I think that's an acceptable requirement... (maybe packaging it separatedly, if that's the case)
17:33 ruoso pmurias, but indeed... p5-interop should be in a different package, probably...
17:33 pmurias we could determin that at compile time
17:34 ingy moritz_: it acts like an unfinished quote for me
17:34 ingy so to be clear, are things like 'class' and 'method' highlighted under ft=perl6?
17:34 moritz_ yes
17:34 pmurias dinner&
17:35 ingy ok, well it is clearly not working here
17:35 moritz_ augment class Match { # three different colors for each word
17:35 moritz_ ingy: stupid question... did you close vim after installing the plugin?
17:35 ingy moritz_: yes
17:36 ingy moritz_: but just now things started working...
17:36 moritz_ when I :set ft=unknown_syntax I get only black text
17:36 ingy nod
17:36 ingy I'm not sure what happened
17:36 tylercurtis moritz_: ooh. http://perlgeek.de/blog-en/perl-6/want-to-write-shiny-graphics.html Can I have a Tufte commit bit?
17:36 ingy but things seem to work now
17:37 moritz_ tylercurtis: sure... what's your github name again?
17:37 tylercurtis moritz_: ekiru
17:37 moritz_ hugme: add ekiru to tufte
17:37 * hugme hugs ekiru. Welcome to tufte!
17:39 Trashlord joined #perl6
17:39 ingy alester: can you key off of 'use v6;' ?
17:39 * moritz_ finds a weird array flattening bug in Match.new
17:40 tadzik joined #perl6
17:41 pmurias moritz_: so what is the mildew: in the evalbot blocking on now?
17:41 lue is there an equivalent to trait_mod for post constraints? [things like     our multi trait_mod:<does>]
17:41 moritz_ pmurias: I need to plug in the right paths into p6eval
17:41 dalek book: 71c68c8 | (Gabor Szabo)++ | .gitignore:
17:41 dalek book: ignore swp files
17:41 dalek book: review: http://github.com/perl6/book/commit/71c68c8e771f761163e7a0b32996b55de222466a
17:41 dalek book: 0b4cfd7 | (Gabor Szabo)++ | src/ (2 files):
17:41 dalek book: add comment about �
17:41 dalek book: review: http://github.com/perl6/book/commit/0b4cfd7dd31da0e8d895a69d62604f15c04c6701
17:41 moritz_ pmurias: and then I need to check the timeouts, since a simple 'mildew -e "say 1"' takes 7s here
17:42 moritz_ rakudo: say 1; sleep 3; say 2;
17:42 p6eval rakudo bb6df2: OUTPUT«1␤2␤»
17:42 Trashlord joined #perl6
17:42 moritz_ rakudo: say 1; sleep 7; say 2;
17:42 p6eval rakudo bb6df2: OUTPUT«1␤2␤»
17:42 pmurias moritz_: that's bad
17:42 moritz_ ah, i guess the limit is only on CPU time, not execution time
17:42 moritz_ pmurias: I've also installed CHI, but that alone didn't help
17:43 pmurias it really needs App::Persistent
17:43 moritz_ is that on CPAN?
17:43 pmurias unfortunatly not
17:43 pmurias and i would have to dust of the code to use that
17:44 ingy rakudo: say Nil
17:44 p6eval rakudo bb6df2: OUTPUT«␤»
17:44 ingy rakudo: say Nil.perl
17:44 p6eval rakudo bb6df2: OUTPUT«()␤»
17:44 ingy rakudo: say {x=>Nil}.perl
17:44 p6eval rakudo bb6df2: OUTPUT«{"x" => Any}␤»
17:44 pmurias ruoso: re CPAN i want TimToady to figure out how should all the packages be prefix in STD before i release that on CPAN
17:45 ingy rakudo: say Nil == Nil
17:45 p6eval rakudo bb6df2: OUTPUT«1␤»
17:45 moritz_ rakudo: say Nil eqv Nil
17:45 p6eval rakudo bb6df2: OUTPUT«1␤»
17:45 moritz_ rakudo: say Nil === Nil
17:45 p6eval rakudo bb6df2: OUTPUT«0␤»
17:45 TimToady lue: no, there isn't; it's possible 'where' should be considered a trait, but I'm not so sure about post_constraint sigs
17:45 pmurias ruoso: and propably having App::Persistent support would be wise so that mildew doesn't seem extremly sluggish
17:45 ingy moritz_: how do I test if a value is undef?
17:45 lue well, I originally thought it was a trait :)
17:46 moritz_ ingy: !$thing.defined
17:46 moritz_ $thing ~~ *.notdef
17:46 moritz_ $thing.notdef
17:46 * moritz_ doesn't really like notdef
17:47 ingy is Nil a value?
17:47 pmurias ruoso: but the Mildew packages don't have relative paths or anything like that's it's mostly a matter of them still not being polished enough for CPAN
17:47 * isBEKaml neither. Sounds like "Thing is not deaf!"
17:47 ingy rakudo: say Nil.notdef
17:47 p6eval rakudo bb6df2: OUTPUT«0␤»
17:47 TimToady ingy: Nil is simply ()
17:47 sorear good * #perl6
17:47 TimToady notdef is dead for a month or so now
17:47 tylercurtis rakudo: say Nil.defined
17:47 sorear pmurias: look at blizkost's Configure.pl, I've got a MULTIPLICITY detector
17:47 ingy TimToady: and what is () simply?
17:47 pmurias moritz_: so what would be a good persistance model for the evalbot?
17:47 p6eval rakudo bb6df2: OUTPUT«1␤»
17:47 ive joined #perl6
17:48 pmurias mildew: say 1
17:48 p6eval mildew: OUTPUT«Can't open perl script "mildew": No such file or directory␤»
17:48 ingy is there a scalar value that closely matches undef in p5 or null in js or None in py?
17:48 moritz_ pmurias: I don't really know. So far I focused on *not* having persistence, so that executions that screw up something don't affect future evaluations
17:49 pmurias the process doing the compilation would be forked from the persitant one
17:50 moritz_ currently the ulimit affects child processes too
17:50 moritz_ so one thing you could do is having a separate process that's running all the time
17:50 moritz_ to which mildew then connects
17:50 moritz_ if that helps
17:50 moritz_ then it would be outside the resource limits in evalbot
17:50 TimToady sorear: Alas, I don't remember how I got compose to work with ibus-anthy, but I did, so at least it's possible.  One thing I failed on was getting it to use my own .XCompose though.
17:51 ingy rakudo: say 1 < 0
17:51 p6eval rakudo bb6df2: OUTPUT«0␤»
17:51 ruoso pmurias, I'd suggest having App::Persistant as the last step
17:51 moritz_ (and btw, can I remove mildew-js from p6eval?)
17:51 pmurias yes
17:51 sorear TimToady: yes, I saw your reply earlier
17:51 ingy rakudo: say (1 < 0) === Bool::True
17:51 tylercurtis ingy: All type-objects are undefined. Mu is the "most generic non-failure undefined value" according to S02.
17:51 TimToady phenny didn't :)
17:51 p6eval rakudo bb6df2: OUTPUT«0␤»
17:51 ingy rakudo: say (1 < 0) === Bool::False
17:51 p6eval rakudo bb6df2: OUTPUT«1␤»
17:51 ingy rakudo: say (1 < 0) == Bool::False
17:52 pugssvn r31644 | moritz++ | [evalbot] proper paths to mildew; remove mildew-js
17:52 p6eval rakudo bb6df2: OUTPUT«1␤»
17:52 pmurias ruoso: ok
17:52 ruoso pmurias, probably after the first release to CPAN
17:52 ingy rakudo: say Mu
17:52 p6eval rakudo bb6df2: OUTPUT«Mu()␤»
17:52 moritz_ evalbot control restart
17:52 ingy rakudo: say Mu == Any
17:52 tylercurtis rkaudo: say Mu.defined
17:52 tylercurtis rakudo: say Mu.defined
17:53 p6eval joined #perl6
17:53 tylercurtis rakudo: say Mu.defined
17:53 ingy rakudo: say Mu == Any
17:53 TimToady 0 and error
17:53 p6eval rakudo bb6df2: OUTPUT«0␤»
17:53 p6eval rakudo bb6df2: OUTPUT«No applicable candidates found to dispatch to for 'infix:<==>'. Available candidates are:␤:(Any $x?)␤:(Num $a, Num $b)␤:(Date $a, Date $b)␤:(Real $a, Real $b)␤:(Numeric $a, Numeric $b)␤:(Any $a, Any $b)␤␤  in main program body at line 20:/tmp/hbwZ1Sp5ku␤»
17:53 moritz_ == is just numeric identity
17:53 pmurias ruoso: App::Persistant is more important than Forest::Gtk2
17:53 lue .oO(all hail TimToady)
17:54 ruoso pmurias, I'd keep Forest::Gtk2 for the third CPAN release ;)
17:54 ingy moritz_: is there an identity operator?
17:54 moritz_ ingy: yes, ===
17:54 ingy rakudo: say Mu.WHICH
17:54 TimToady hmm, Any,Any is wrong, should be Cool,Cool
17:54 p6eval rakudo bb6df2: OUTPUT«94144672␤»
17:54 moritz_ ingy: you should read S03 at some point
17:54 moritz_ TimToady: we've been discussing this...
17:54 ingy rakudo: say Nil.WHICH
17:54 p6eval rakudo bb6df2: OUTPUT«125283536␤»
17:55 pmurias TimToady: if i update STD-dist to the current STD and make it create STD-0.01 would it be ok if i release it on CPAN?
17:55 moritz_ TimToady: sorear suggested it should be Cool, Cool. If you agree, I'll adapt rakudo and the spectests
17:55 ingy rakudo: say Bool::True.WHICH
17:55 TimToady well, i can argue it the other way too
17:55 p6eval rakudo bb6df2: OUTPUT«111704000␤»
17:55 moritz_ with Cool,Cool we would have consistency between methods and operators
17:55 ingy I can probably use WHICH on known values to do nice YAML dumping
17:56 TimToady if a user-defined type supplies a Numeric, you oughta be able to use == even if they aren't Cool, you'd think
17:56 ingy which is all I'm trying to do here
17:56 ingy rakudo: say Cool.WHICH
17:56 p6eval rakudo bb6df2: OUTPUT«98864432␤»
17:56 pmurias milew: say 1
17:56 pmurias mildew: say 1
17:56 moritz_ TimToady: good point
17:56 TimToady Cool is primarily for methods, but the question is do some operators arise to the level of language constructs rather than mere methods
17:56 p6eval mildew: OUTPUT«1␤»
17:56 TimToady in the same way that list ops do
17:57 moritz_ \o/
17:57 TimToady I'd argue that == might
17:57 tylercurtis ingy: by identity, do you mean testing that the two objects are bound to the same container?
17:57 TimToady so maybe Any,Any is okay for such universal operators
17:57 pmurias mildew: say "We have mildew in the evalbot"
17:57 p6eval mildew: OUTPUT«We have mildew in the evalbot␤»
17:58 TimToady \o/
17:58 ingy tylercurtis: I want to know if %h{'x'} is Nil or Mu or True
17:58 tylercurtis rakudo: say Mu =:= Mu;
17:58 p6eval rakudo bb6df2: OUTPUT«1␤»
17:58 tylercurtis rakudo: say Mu === Mu;
17:58 p6eval rakudo bb6df2: OUTPUT«1␤»
17:59 pmurias ruoso: the evalbot now supports mildew again
17:59 TimToady =:= should probably fail on bindables
17:59 TimToady non-bindables
17:59 TimToady now my non- key is on the blink
17:59 [Coke] perl6: say "what?"
17:59 p6eval pugs, rakudo bb6df2: OUTPUT«what?␤»
17:59 lue [ stupid scissor mechanism :) ]
18:00 [Coke] does perl6 run /all/ the possible evals, or just a few?
18:00 TimToady mildew: foo ?? 1 !! 2
18:00 moritz_ [Coke]: just two atm
18:00 p6eval mildew: OUTPUT«[31m===[0mSORRY![31m===[0m␤Expecting a term, but found either infix ?? or redundant prefix ?␤  (to suppress this message, please use space between ? ?) at eb5f2444ddfdcfb89acf9d94df8df62e line 1:␤------> [32mfoo ??[33m⏏[31m 1 !! 2[0m␤Parse failed␤»
18:01 pmurias TimToady: that's correct?
18:01 TimToady yes
18:01 pmurias perl6: foo ?? 1 !! 2
18:01 TimToady listops always expect a term
18:01 p6eval rakudo bb6df2: OUTPUT«===SORRY!===␤Confused at line 20, near "foo ?? 1 !"␤»
18:01 p6eval ..pugs: OUTPUT«*** No such subroutine: "&foo"␤    at /tmp/OQXl8mxUWd line 1, column 1 - line 2, column 1␤»
18:01 tylercurtis ingy: =:= checks container identity. === checks value equality.
18:01 ingy tylercurtis: thanks
18:01 TimToady hmm, I wouldn't say it that way
18:02 ingy I still think I can do better using WHICH
18:02 TimToady eqv tests value equality
18:02 TimToady === tests identity equality
18:03 TimToady where 4 and 4 have the same identity, but [] and [] don't
18:03 TimToady rakudo: say 4 === 4, [] === []
18:03 colomon joined #perl6
18:03 p6eval rakudo bb6df2: OUTPUT«10␤»
18:03 TimToady rakudo: say 4 eqv 4, [] eqv []
18:03 tylercurtis Ah, right. As the spec says, "Binary === tests immutable type and value correspondence".
18:03 ingy rakudo: my %h = (x => Nil); say %h{'x'}.WHICH, Nil.WHICH
18:03 p6eval rakudo bb6df2: OUTPUT«11␤»
18:03 p6eval rakudo bb6df2: OUTPUT«96656608140310416␤»
18:04 ingy rakudo: my %h = (x => Nil); say %h{'x'}.WHICH, ' ', Nil.WHICH
18:04 p6eval rakudo bb6df2: OUTPUT«96656608 140891616␤»
18:04 ingy :\
18:04 tylercurtis raludo: say Nil =:= Nil
18:04 TimToady it doesn't make sense to use =:= there
18:04 tylercurtis raludo: say Nil === Nil
18:05 ingy rakudo: my %h = (x => Bool::True); say %h{'x'}.WHICH, ' ', Bool::True.WHICH
18:05 p6eval rakudo bb6df2: OUTPUT«111704000 111704000␤»
18:05 tylercurtis rakudo: say Nil === Nil
18:05 p6eval rakudo bb6df2: OUTPUT«0␤»
18:05 TimToady parcels are objects, not values
18:05 TimToady () is an empty parcel
18:05 tylercurtis rakudo: say Nil eqv Nil
18:05 p6eval rakudo bb6df2: OUTPUT«1␤»
18:05 TimToady 1
18:05 ingy rakudo: say Nil =:= Nil
18:05 p6eval rakudo bb6df2: OUTPUT«0␤»
18:05 TimToady should fail
18:06 TimToady with "those aren't variables"
18:06 pmurias cycling&
18:07 sbp rakudo: my $a = Nil; my $b = Nil; say $a =:= $b;
18:07 phenny sbp: 18:02Z <Morbus> tell sbp http://www.insidemacgames.com/news/story.php?ID=19048
18:07 p6eval rakudo bb6df2: OUTPUT«0␤»
18:07 Barb joined #perl6
18:07 tylercurtis ingy: You want eqv for that, it seems.
18:07 moritz_ I fear that eqv won't work well for user-defined types
18:07 ingy rakudo: my %h = (x => Mu); say %h{'x'}.WHICH, ' ', Mu.WHICH
18:07 p6eval rakudo bb6df2: OUTPUT«94144672 94144672␤»
18:08 ingy what is Mu for?
18:08 moritz_ rakudo: class A { }; say A.new eqv A.new
18:08 p6eval rakudo bb6df2: OUTPUT«0␤»
18:08 TimToady it's the value that is most like p5's undef
18:08 TimToady but it's also the root of the types
18:08 ingy thanks, finally :)
18:08 kensanata joined #perl6
18:09 TimToady so the most typeless undef
18:09 TimToady rakudo: say Any ~~ Mu
18:09 p6eval rakudo bb6df2: OUTPUT«1␤»
18:09 ingy rakudo: my %h = (x => Mu); say %h{'y'} === Mu
18:09 TimToady that should be true for any type derived from Mu, which is all of them
18:09 p6eval rakudo bb6df2: OUTPUT«0␤»
18:09 ingy rakudo: my %h = (x => Mu); say %h{'y'} eqv Mu
18:09 p6eval rakudo bb6df2: OUTPUT«0␤»
18:09 moritz_ except that most languages put their Null value at the bottom of the type hierarchy, not on the top
18:10 ingy rakudo: my %h = (x => Mu); say %h{'y'}.defined
18:10 p6eval rakudo bb6df2: OUTPUT«0␤»
18:10 ingy rakudo: my %h = (x => Mu); say %h{'x'}.defined
18:10 p6eval rakudo bb6df2: OUTPUT«0␤»
18:10 ingy ?!
18:10 moritz_ ingy: you can also use .exists, you know...
18:10 moritz_ rakudo: my %h = x => Mu; say %h.exists('x')
18:10 p6eval rakudo bb6df2: OUTPUT«1␤»
18:11 ingy moritz_: yes, I know
18:11 TimToady all your tests but the last were x/y
18:11 ingy rakudo: my %h = (x => Mu); say %h{'x'}.defined # why?
18:11 p6eval rakudo bb6df2: OUTPUT«0␤»
18:11 TimToady Mu isn't defined
18:11 moritz_ because Mu is a type object, and undefined
18:11 sbp rakudo: my %h = (x => Bool::True); say %h{'x'}.defined
18:11 ingy rakudo: my %h = (x => 1); say %h{'x'}.defined # why?
18:11 p6eval rakudo bb6df2: OUTPUT«1␤»
18:11 p6eval rakudo bb6df2: OUTPUT«1␤»
18:11 moritz_ because 1 is defined
18:11 ingy rakudo: my %h = (x => Mu); say %h{'x'}.exists # why?
18:12 p6eval rakudo bb6df2: OUTPUT«Method 'exists' not found for invocant of class ''␤  in main program body at line 20:/tmp/hggqXwc1d3␤»
18:12 ingy rakudo: my %h = (x => Mu); say %h{'x'}.exists
18:12 p6eval rakudo bb6df2: OUTPUT«Method 'exists' not found for invocant of class ''␤  in main program body at line 20:/tmp/nxzTlRSOaf␤»
18:12 arnsholt ingy: Mu is an undefined value, much like undef in Perl 5
18:12 moritz_ %h.exists('x')
18:12 sbp you can't even test for the existence of Mu? heh
18:12 ingy rakudo: my %h = (x => Mu); say %h.exists('x')
18:12 p6eval rakudo bb6df2: OUTPUT«1␤»
18:12 ingy arnsholt: who defined it?
18:12 ingy ;)
18:12 TimToady I'll never tell
18:13 lue If Mu existed, we'd have a very interesting paradox on our hands :)
18:13 sbp no, it would just open up the field of mathematical zen
18:14 sbp you'd get up with Aleph-Mu and such
18:14 sbp *end up
18:15 TimToady moritz_: Mu is top, and any() is bottom
18:16 lue .oO(O no! I defined Mu, and now black is white and the sun is Aleph-Mu meters wide!)
18:16 TimToady rakudo: say all() ~~ Mu
18:16 p6eval rakudo bb6df2: OUTPUT«1␤»
18:17 TimToady rakudo: say Mu ~~ all()
18:17 p6eval rakudo bb6df2: OUTPUT«1␤»
18:17 TimToady rakudo: say Mu ~~ any()
18:17 p6eval rakudo bb6df2: OUTPUT«0␤»
18:17 sbp is ~~ commutative by design?
18:18 TimToady non by design
18:18 TimToady used to be, but that's a Bad Mistake
18:18 sbp why so?
18:18 TimToady makes it impossible to optimized jump tables
18:18 TimToady s/d//
18:19 TimToady when 1 {...}; when 2 {...}  has to force the match to be integer equality
18:19 TimToady if it could be doing some crazy reverse lookup, it's pessimized
18:19 TimToady and that would be bad
18:20 REPLeffect joined #perl6
18:20 kst joined #perl6
18:20 sbp so basically to allow some form of short circuiting to work, do I understand right?
18:20 TimToady unfortunately, p5 borrowed the commutative one before we figgered that out
18:20 TimToady it's really a reverse dispatch based on the type of the pattern
18:20 TimToady $a ~~ $b is really $b.ACCEPTS($a)
18:21 TimToady so $b is totally in control, unless it wants to share with $a
18:21 PerlJam wait ... p5 ~~ is commutative?  /me looks
18:21 jaffa4 joined #perl6
18:21 TimToady was, they're recovering from that
18:21 lue are there any other post constraints besides 'where' ?
18:21 TimToady yes, signatures
18:22 TimToady sub foo ($x ($a,$b) )
18:22 TimToady or [$a,$b] equivalently
18:22 TimToady note, space before is required, or it's a shape declaration on $x
18:26 jnthn It's not quite equivalent. :-)
18:26 jnthn [ ... ] implies Positional too, iirc
18:26 TimToady on CATCH blocks, I'm thinking CATCH { ... } really means CATCH { $!.handled = 1; ...; die $! } where the die "unhandles" $!
18:26 TimToady STD doesn't care, just parses a sig inside [...] there
18:27 jnthn Well, nor does Rakudo at the parsing level ;-)
18:27 TimToady arguably, it could be disallowed to prevent accidentaly use as a shape, but that'll end up with undefined $a error anyway
18:27 frettled .oO(CATCH me if you can)
18:27 PerlJam for some reason I want to see the haskellian @
18:27 TimToady std: sub foo($x [$a,$b]) {...}
18:27 p6eval std 31644: OUTPUT«ok 00:01 113m␤»
18:28 TimToady std: sub foo($x[$a,$b]) {...}
18:28 p6eval std 31644: OUTPUT«ok 00:01 110m␤»
18:28 TimToady hmm
18:28 TimToady that shoulda complained about missing $a
18:28 jnthn eww, you can expect a shape based on some outer lexical?
18:28 TimToady stdbug, I guess
18:28 * jnthn hadn't appreciated that
18:28 moritz_ std: sub f ($x) | ($y) { } # should also go boom
18:28 p6eval std 31644: OUTPUT«ok 00:01 109m␤»
18:29 TimToady why?
18:29 moritz_ because alternative signatures must have the same set of variables
18:29 TimToady maybe $x.defined !=== $y.defined
18:29 TimToady is that specced?
18:29 jnthn For one because two signatures on an only sub are invalid, no?
18:29 TimToady well, there is that
18:30 moritz_ TimToady: I'm pretty sure it is
18:30 TimToady we don't require such pattern coherence of regexen
18:30 TimToady the missing one is just undefined
18:31 TimToady so maybe the spec is rong
18:31 xinming_ joined #perl6
18:31 ingy yaml-pm6 now dumps booleans
18:32 PerlJam How does one discover the variable names of positionals?  Just ask for the sig?
18:32 TimToady std: multi f ($x) | ($y) { $x, $y, $z }
18:32 p6eval std 31644: OUTPUT«[31m===[0mSORRY![31m===[0m␤Variable $z is not predeclared at /tmp/Xzzq4gxYcu line 1:␤------> [32mmulti f ($x) | ($y) { $x, $y, $z[33m⏏[31m }[0m␤Check failed␤FAILED 00:01 113m␤»
18:32 jnthn PerlJam: .signature.params[0].name for example
18:32 moritz_ TimToady: S13:101
18:32 moritz_ PerlJam: S06/Signature Introspection/
18:33 jnthn yay nomzeit
18:33 jnthn bbiab
18:34 PerlJam I'm just thinking of the case where the module may be compiled to some form and the person extending the module via additional multis doesn't have easy access to the source.
18:34 Tene TimToady: can you please explain about CATCH ending with die?
18:34 moritz_ PerlJam: say &yourmulti».candidates».signature.perl
18:34 moritz_ erm, wihtout the first »
18:35 TimToady Tene: there's always an implicit die at the end of every CATCH
18:35 ash_ rakudo: 'foo' ~~ / $<f>=[ f $<o>=[o] ] /; say $/<f><o> # i am is probably doing this wrong, but is this possible?
18:35 p6eval rakudo bb6df2: OUTPUT«␤»
18:35 PerlJam aye, I get it.  It seems weird that the programmer need do that.
18:35 TimToady Tene: specced at S04:983
18:37 Tene "If none of the cases in the CATCH handles the exception, the exception is rethrown."
18:40 [Coke] http://perlcabal.org/syn/S04.html#line_983 has a busy script error in firefox, and keeps scrolling up and down an em or so. freaky.
18:41 [Coke] wow. and I can't stop the script, either.
18:42 tylercurtis moritz_: I'm looking at the scruffy tests, and I'm wondering why it is that the default value for Scruffy::Graph.new.theme.class is Scruffy::Themes::Keynote, but then testing setting the theme set it to Scruffy::Themes::Mephisto(which I'd have thought should be the class of the new theme?).
18:42 tylercurtis I suppose it doesn't matter since the test doesn't do anything but test that you can assign new values to @graph.theme, but it looks asymmetric to test that the class of the default .theme is a certain theme class, then set .theme to another theme class to test that it can be set.
18:42 [Coke] how does a catch block handle an exception?
18:43 moritz_ tylercurtis: I actually haven't looked at the tests yet
18:43 moritz_ tylercurtis: I just focused on getting some code translated for now
18:43 [Coke] ah, there it is, further down.
18:43 moritz_ though I'd love to actually get some output from it :-)
18:43 tylercurtis Should I focus on translating first and making it prettier later? Or just go ahead and change the setting test to look more like the default test as I translate the tests?
18:44 dju joined #perl6
18:44 moritz_ tylercurtis: I don't care either way
18:47 ash_ can a named capture have a named capture in it? in a regex, that is, so you could do like $/<a><b> ?
18:47 dju joined #perl6
18:48 moritz_ yes
18:49 xinming joined #perl6
18:49 ash_ cool, just checking
18:50 tylercurtis moritz_: Are you planning to use strings, enums, or what for default-type?
18:51 moritz_ tylercurtis: strings, as scruffy
18:51 moritz_ does
18:51 moritz_ (at least for now)
18:52 timbunce_ joined #perl6
18:53 quips joined #perl6
18:53 quips hi
18:54 moritz_ hi quips
19:00 pyrimidine moritz_: haven't caught up with the current status of .trans, how much needed to still be implemented?
19:00 tylercurtis moritz_: sorry to keep bothering you, but will Tufte::Graph.new take an options hash as Scruffy::Graph.new does or just a *%options slurpy hash parameter?
19:02 moritz_ tylercurtis: in some of the components I've used an %options hash, but I think that's a mistake. should be slurpy
19:02 moritz_ makes writing the constructors nearly superfluous
19:02 moritz_ and having to write few lines of code is always a good sign :-)
19:03 tylercurtis Alright. I'll translate the tests assuming it'll be slurpy.
19:04 moritz_ pyrimidine: currently only string patterns for .trans is implemented - the regex patch (don't remember by whom) seemed too intrusive to apply
19:04 moritz_ closures on the RHS should be easy to do
19:05 moritz_ src/core/Cool-str.pm:137
19:05 cono joined #perl6
19:06 pyrimidine didn't know there was a regex patch.  Agreed on closures, may fork and try implementing something.
19:06 moritz_ somebody else submitted it, rewriting .match and .subst along the way
19:07 moritz_ or re-implementing it, don't remember exactly
19:07 pyrimidine in RT?
19:08 pyrimidine moritz_: by the way, presented a talk at the Bioinformatics Open Source Conference, which touched upon BioPerl 6 at the very end
19:08 pyrimidine slides: http://www.slideshare.net/bosc2010/fields-bosc2010-bioperl
19:09 moritz_ nice
19:09 moritz_ pyrimidine: not RT, but somewhere on p6c
19:09 tylercurtis moritz_: Now I see that Scruffy::Graph.new accepts either a hash or slurpy named parameters. Although I guess that's not really necessary with |%foo.
19:09 pyrimidine moritz_: okay, will check.  Thanks!
19:13 ingy moritz_: I just patched ufo to run `make t/specific.t`. Can you please review the patch?
19:13 sftp joined #perl6
19:14 moritz_ ingy: sure
19:14 moritz_ where is it?
19:14 ingy moritz_: seems to work great here. I'll switch completely to ufo Makefiles.
19:14 ingy moritz_: github!
19:14 ingy masak++ gave me a bit
19:14 * moritz_ pulls
19:15 moritz_ +    $makefile.say(qq[PERL6LIB='$cwd/t:$cwd/lib']);
19:15 moritz_ not sure if that's common practise
19:15 ingy what part?
19:15 moritz_ having t/ in PERL6LIB
19:16 ingy it will be :)
19:16 moritz_ apart from that, looks good
19:16 moritz_ ingy++ # patching the toolchain
19:16 ash_ in a regex, if you have multiples you want to capture (like <foo>*) but you want to be able to see how many it captured and look at them individually, how do you say that in regex terms?
19:17 tylercurtis <foo>*
19:17 ash_ well, how do you access that?
19:17 ash_ $/<foo>[0] didn't work for me
19:17 moritz_ $<foo> is an array
19:18 moritz_ rakudo: say 'abc' ~~ /<alpha>+/; say $<alpha>.perl
19:18 p6eval rakudo bb6df2: OUTPUT«abc␤[Match.new(␤ # WARNING: this is not working perl code␤ # and for debugging purposes only␤ from => 0,␤ orig => "abc",␤ to   => 1,␤), Match.new(␤ # WARNING: this is not working perl code␤ # and for debugging purposes only␤ from => 1,␤ orig => "abc",␤ to   => 2,␤),
19:18 p6eval ..Match.new(␤ # W…
19:18 moritz_ oh, bad idea
19:18 moritz_ rakudo: say 'abc' ~~ /<alpha>+/; say $<alpha>.WHAT; say $<alpha>.elems
19:18 p6eval rakudo bb6df2: OUTPUT«abc␤Array()␤3␤»
19:18 ingy TestML needs a bridge class to put the language specific code. Don't want to put it under lib. t/ makes sense. Although I could munge @*INC from t/foo.t if needed.
19:18 ash_ is that true in nqp too?
19:18 moritz_ ash_: well, it's a ResizablePMCArray in nqp, not an array
19:19 moritz_ but +$<alpha> and $<alpha>[0] should both work
19:19 dalek rakudo: cfca4fb | moritz++ | src/core/IO.pm:
19:19 dalek rakudo: implement cwd, jnthn++
19:19 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/cfca4fb14ccc8e83372528d9684ad94cf9b4795f
19:19 dalek rakudo: 129c37f | moritz++ | src/core/Match.pm:
19:19 dalek rakudo: [Match.perl] fix double-brackets
19:19 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/129c37f47b70ca264eefdd16363325ff5afdee1f
19:19 dalek rakudo: 94d01ff | moritz++ | src/core/Match.pm:
19:19 dalek rakudo: initial Match.new - does not handle subcaptures yet
19:19 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/94d01ff504f3ff7a8114c4239bf60476b4d1d4e6
19:19 moritz_ nqp: my $m = 'abc' ~~ /<alpha>+/; say(+$m<alpha>); say($m<alpha>[0])
19:19 p6eval nqp: OUTPUT«Assignment ("=") not supported in NQP, use ":=" instead at line 1, near " 'abc' ~~ "␤current instr.: 'parrot;HLL;Grammar;panic' pc 552 (src/cheats/hll-grammar.pir:205)␤»
19:19 moritz_ nqp: my $m := 'abc' ~~ /<alpha>+/; say(+$m<alpha>); say($m<alpha>[0])
19:19 p6eval nqp: OUTPUT«3␤a␤»
19:20 moritz_ less sugar, still works
19:21 ash_ got ya, i see where i made my mistake now
19:21 jnthn Sweet
19:21 jnthn moritz_: yay, thanks for putting in cwd :-)
19:22 moritz_ jnthn: thanks for (mostly) writing it for me :-)
19:22 [Coke] pmichaud++ #putting in all the partcl-nqp scaffolding.
19:22 [Coke] (if anyone is looking to hack on NQP, I have penty more to do. =-)
19:24 moritz_ [Coke]: consider something like my "weekly" challenges to attract contributors
19:25 [Coke] moritz_: that would probably be slightly more effective than my current plan.
19:25 moritz_ if you have byte-sized tasks that you know how to describe well... go for it
19:31 TimToady moritz_: jdporter is hailing you on chatterbox
19:32 moritz_ TimToady: other way round :-)
19:32 ingy moritz_: http://github.com/ingydotnet/yaml-pm6/blob/master/README       ufo++
19:33 TimToady moritz_: oh, yeah  :)
19:33 TimToady jdporter: moritz_ is hailing you on chatterbox  :)
19:33 moritz_ :-)
19:34 |newbie| joined #perl6
19:37 moritz_ ingy: if you pass a --prefix option to ufo, would you expect it to add the lib/ automatically?
19:38 ashleydev joined #perl6
19:43 * cognominal does not understand what the operator C<before> and C<after> are
19:44 moritz_ cognominal: it's generalized smaller-than and greather-than operators
19:45 cognominal in what way are they different (no pun intended)?
19:46 moritz_ > compares numerically
19:46 moritz_ gt compares by string
19:46 moritz_ after compares "smart", ie by number if the args are numbers, and lexicographically if they are strings
19:46 cognominal ok, thx
19:50 eternaleye joined #perl6
19:52 pugssvn r31645 | lwall++ | [S04] try to nail down CATCH exit semantics a bit more water-tightly
19:53 TimToady well, just that any given type may define before and after, but there's no coercion
19:53 ingy moritz_: whatever p5 does...
19:53 mberends joined #perl6
19:54 moritz_ aka "no".
19:54 moritz_ thought so
19:55 TimToady though, possibly if we define cross-type cmp, before and after could be cross-type too
19:56 ingy moritz_: how long will you be here online?
19:59 cognominal hum, without knowing with C<before>, I was feeding the discussion about range as a role.
20:11 hercynium joined #perl6
20:21 ingy rakudo: class F {has $.h = {}}; my $f = F.new; $f.{'x'} = 1; say "OK"
20:22 p6eval rakudo bb6df2:  ( no output )
20:22 ingy rakudo: class F {has $.h = {}}; my $f = F.new; $f.h{'x'} = 1; say "OK"
20:22 p6eval rakudo bb6df2: OUTPUT«OK␤»
20:22 ingy rakudo: class F {has $.h = {}}; my $f = F.new; $f.h = (); say "OK"
20:22 pmurias joined #perl6
20:23 p6eval rakudo bb6df2:  ( no output )
20:23 ingy rakudo: class F {has $.h is rw = {}}; my $f = F.new; $f.h = (); say "OK"
20:23 p6eval rakudo bb6df2: OUTPUT«OK␤»
20:23 ingy rakudo: class F {has $.h = {}}; my $f = F.new; $f.h = (); say "OK"
20:23 p6eval rakudo bb6df2:  ( no output )
20:24 ingy why does $.h need to be rw to clear it? but not to add to it?
20:25 arnsholt IIRC object attributes are ro by default
20:25 tylercurtis ingy: because the immutability of the attribute container doesn't make the value immutable.
20:25 pugssvn r31646 | pmurias++ | [smop] require a higher version of File::Path then is in perl-5.10.0
20:25 tylercurtis ingy: $f.h{'x'} = 5; doesn't change what value the container it holds.
20:26 jnthn Also because the constructor is "on the inside" and can get at the underlying $!h
20:26 moritz_ ingy: $.h{'...'} = foo just translates to a method call on $.h
20:26 moritz_ whereas $.h = $stuff is assignment, which honors the rw property
20:26 tylercurtis But $f.h = () changes the value that the attribute holds.
20:27 cognominal rakudo:  my (Int| Whatever) $a = *
20:27 p6eval rakudo bb6df2: OUTPUT«===SORRY!===␤Unable to parse declarator, couldn't find final ')' at line 20␤»
20:27 cognominal rakudo:  my Int| Whatever $a = *
20:27 p6eval rakudo bb6df2: OUTPUT«===SORRY!===␤In "my" declaration, typename Int must be predeclared (or marked as declarative with :: prefix) at line 20, near "| Whatever"␤»
20:28 pmurias what does rakudo use for determining which tests it runs?
20:28 cognominal rakudo: Int | Whatever
20:28 p6eval rakudo bb6df2:  ( no output )
20:28 jnthn pmurias: t/spectest.data
20:28 cognominal STD:  my (Int| Whatever) $a = *
20:29 ingy moritz_: thanks
20:30 pmurias jnthn: thanks
20:30 cognominal std:  my (Int| Whatever) $a = *
20:30 p6eval std 31645: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unable to parse declarator at /tmp/PhvY7dIFtf line 1:␤------> [32mmy [33m⏏[31m(Int| Whatever) $a = *[0m␤Couldn't find final ')'; gave up at /tmp/PhvY7dIFtf line 1:␤------> [32mmy (Int[33m⏏[31m| Whatever) $a = *[0m␤    expecting any of:␤
20:30 p6eval ..constr…
20:31 cognominal should that be allowed?
20:31 moritz_ what would $a default to if you don't assign anything to it?
20:32 cognominal rakudo:  my Int $a; say "{$a.WHAT}  {$a.perl}"
20:33 p6eval rakudo bb6df2: OUTPUT«Int()  Int␤»
20:35 silug joined #perl6
20:36 cognominal I don't know.
20:37 cognominal rakudo: say Int|Whatever
20:37 p6eval rakudo bb6df2: OUTPUT«any(Int, Whatever)␤»
20:37 moritz_ it has been considered, but discarded for 6.0
20:37 moritz_ you can always say
20:37 moritz_ subset WhatIntever of Any where Whatever | Int
20:39 tri1 joined #perl6
20:40 tylercurtis Should the rakudo REPL die if I try to access a non-existent contextual?
20:40 jnthn no
20:41 jnthn the repl is too death-prone atm
20:41 pugssvn r31647 | pmurias++ | [mildew] port of &print
20:42 tylercurtis On a related note, how can I get the current working-directory in rakudo? $*CWD as per S28 doesn't seem to work.
20:42 moritz_ rakudo: say cwd()
20:42 p6eval rakudo bb6df2: OUTPUT«Could not find sub &cwd␤  in main program body at line 20:/tmp/A82d7OUc9v␤»
20:43 moritz_ it's too old
20:43 moritz_ you need to get a newer rakudo :-)
20:44 Tene rakudo: say $*CWD
20:44 p6eval rakudo bb6df2:  ( no output )
20:44 bluescreen joined #perl6
20:44 ingy moritz_: pushed a fix to ufo
20:45 ingy moritz_: wasn't remaking all before a specific test
20:45 ingy moritz_: ie, wasn't building .pir
20:45 moritz_ right
20:45 tylercurtis It just isn't a day of Perl 6 hacking without needing to build a new Rakudo, huh? :)
20:46 moritz_ or phrased differently, we're progressing :-)
20:47 ingy yaml-pm6 now supports 'null', aka '~' dumping. (albeit poorly due to my lacklustre grokage of Mu)
20:48 ingy yaml object dumping is next
20:55 colomon rakudo: say (1...100).grep({ $_ %% 2 }).grep({ $_ %% 3 }).perl
20:55 p6eval rakudo 94d01f:  ( no output )
20:57 colomon rakudo: say (1...100).grep({ $_ %% 2 }).Array.grep({ $_ %% 3 }).perl
20:57 p6eval rakudo 94d01f: OUTPUT«Method 'Array' not found for invocant of class 'List'␤  in main program body at line 20:/tmp/OBjUnMAchm␤»
20:57 colomon rakudo: say (1...100).grep({ $_ %% 2 }).perl.eval.grep({ $_ %% 3 }).perl
20:58 p6eval rakudo 94d01f:  ( no output )
21:00 moritz_ > say (1...100).grep({ $_ %% 2 }).grep({ $_ %% 3 }).perl
21:00 moritz_ Cannot resume dead coroutine.
21:01 moritz_ rakudobug, I'd say
21:01 moritz_ colomon: care to submit?
21:01 jnthn say (1...100).grep({ say $_; $_ %% 2 }).grep({ $_ %% 3 }).perl
21:01 colomon moritz_: it's already in there, I'm sure.
21:01 jnthn rakudo: say (1...100).grep({ say $_; $_ %% 2 }).grep({ $_ %% 3 }).perl
21:01 colomon it's the gather / take bug, it's been a problem for months.
21:01 * moritz_ hasn't see the error before
21:01 p6eval rakudo 94d01f:  ( no output )
21:02 colomon originally supposed to be a closure-related bug
21:02 moritz_ which is supposed to be fixed :-)
21:02 colomon which is why I say "supposed"
21:02 colomon rakudo: say (1 ... 10) Z~ ('A' ... 'G')
21:02 p6eval rakudo 94d01f: OUTPUT«AABBCCDDEEFFGG␤»
21:03 moritz_ "huh"
21:03 colomon If you have two different instances of the same gather / take block running at once, they get tangled up.
21:03 colomon and gather / take is pretty ubiquitous throughout Rakudo.
21:05 colomon I think the closure bug changed the effect a little?  At least, I don't remember ever seeing that AABBCCDDEEFFGG pattern before.
21:05 colomon *bug fix
21:06 * moritz_ neither
21:07 moritz_ ingy: find: `t': No such file or directory
21:07 moritz_ ingy: that's less-than-awesome, I guess
21:11 * moritz_ discovers that adaptive step-size runge-kutta doesn't mix well with big numbers and a absolute errors
21:13 rgrau_ joined #perl6
21:14 timbunce joined #perl6
21:16 ingy moritz_: oops
21:17 * moritz_ goes to bed
21:17 ingy \o
21:17 moritz_ o/
21:19 ingy moritz_: I think I have a fix for ufo
21:25 pugssvn r31648 | pmurias++ | [mildew-setting-smop] avoid rebuilding .so three times
21:25 kloeri joined #perl6
21:28 pyrimidine left #perl6
22:02 lue ohai o/
22:08 lue hrm, there don't seem to be any other post constraints other than 'where'...
22:15 kensanata joined #perl6
22:30 tri1 left #perl6
22:38 ingy rakudo: say substr("ingy", 0, *-2)
22:38 p6eval rakudo 94d01f:  ( no output )
22:39 rv2733 joined #perl6
22:39 kid51 joined #perl6
22:39 ingy rakudo: say "ingy".substr(0, *-2)
22:39 p6eval rakudo 94d01f:  ( no output )
22:40 ingy rakudo: say "ingy"
22:40 p6eval rakudo 94d01f: OUTPUT«ingy␤»
22:40 ingy rakudo: say "ingy".substr(0,1)
22:40 p6eval rakudo 94d01f: OUTPUT«i␤»
22:40 ingy rakudo: say "ingy".substr(0,3)
22:40 p6eval rakudo 94d01f: OUTPUT«ing␤»
22:40 ingy rakudo: say "ingy".substr(0,*)
22:41 p6eval rakudo 94d01f:  ( no output )
22:41 ingy rakudo: say "ingy".substr(0,-1)
22:41 p6eval rakudo 94d01f: OUTPUT«ing␤»
22:44 ingy rakudo: my $x; say $x
22:44 p6eval rakudo 94d01f: OUTPUT«Any()␤»
22:44 ingy rakudo: my $x; say $x.WHAT
22:44 p6eval rakudo 94d01f: OUTPUT«Any()␤»
22:44 ingy rakudo: my $x; say $x.WHAT.Str
22:44 p6eval rakudo 94d01f: OUTPUT«Any()<0x3981a00>␤»
22:45 ingy rakudo: my $x; say $x.WHICH
22:45 p6eval rakudo 94d01f: OUTPUT«60308352␤»
22:46 ingy rakudo: say Any.WHAT.Str
22:46 p6eval rakudo 94d01f: OUTPUT«Any()<0x3981a00>␤»
22:47 ingy what is that?
22:48 ingy a better question is "How do I get the class name, as a string value, from an instance object?"
22:48 lue rakudo: my $a; say $a.WHAT
22:48 p6eval rakudo 94d01f: OUTPUT«Any()␤»
22:49 lue rakudo: my $a; say ($a.WHAT).WHAT
22:49 p6eval rakudo 94d01f: OUTPUT«Any()␤»
22:49 jnthn rakudo: my $a; say $a.WHAT.perl # like that
22:49 p6eval rakudo 94d01f: OUTPUT«Any␤»
22:49 ingy eek
22:49 ingy that's the best way?
22:50 jnthn It's not like encouraging people to use strings to identify classes is good.
22:50 ingy rakudo: my $a; say $a.WHAT.perl.WHAT
22:50 p6eval rakudo 94d01f: OUTPUT«Str()␤»
22:50 ingy jnthn: they might be handy in serializations
22:51 jnthn ingy: Still doesn't mean it needs to be huffmanized.
22:51 jnthn Most people don't write serializers every day :-)
22:51 * ingy does
22:51 jnthn I did say "most" ;-)
22:52 ingy I wasn't calling you a liar
22:52 jnthn The thing with string names is that they may be meaningless out of context.
22:52 lue rakudo: my $a; say "The variable is type {$a.WHAT}"
22:52 p6eval rakudo 94d01f: OUTPUT«The variable is type Any()␤»
22:52 whiteknight joined #perl6
22:52 jnthn { my class Foo { } }; # name Foo is not referring to the class outside the scope
22:53 ingy I was just having fits turning $x.WHAT into a string
22:53 ingy due to my n00bniz
22:53 jnthn Well, it stringifies with a () on the end
22:53 ingy jnthn: show me how to substr it off
22:53 jnthn So if a type object accidentaly makes it into output, it looks like something odd is going on. Or something like that.
22:53 jnthn heh, that's longer than .perl on the type-object ;-)
22:54 ingy c'mon!
22:54 jnthn $foo.WHAT.substr(0, $foo.WHAT.chars - 2) # eww :-)
22:54 lue rakudo: my $a = 2; say $_
22:54 jnthn There must be a better way that that
22:54 p6eval rakudo 94d01f: OUTPUT«Any()␤»
22:55 jnthn rakudo: my $foo = 42; say $foo.WHAT.substr(0, $foo.WHAT.chars - 2)
22:55 p6eval rakudo 94d01f: OUTPUT«Int␤»
22:55 jnthn rakudo: my $foo = 42; say $foo.WHAT.substr(0, -2)
22:55 p6eval rakudo 94d01f: OUTPUT«Int␤»
22:55 jnthn Ah, yes
22:55 jnthn That :-)
22:55 lue It doesn't work right [pun intended]. (unless, of course, it's supposed to do that)
22:55 sbp come on, it's perl. double chop it! :-)
22:55 phenny sbp: 21:43Z <Morbus> tell sbp v
22:55 phenny sbp: 21:43Z <Morbus> tell sbp http://www.newscientist.com/article/dn19163-can-you-teach-yourself-synaesthesia.html
22:55 ingy rakudo: my $foo; say $foo.WHAT.substr(0, -2)
22:55 p6eval rakudo 94d01f: OUTPUT«Method 'substr' not found for invocant of class ''␤  in main program body at line 20:/tmp/DaCBAHrZH_␤»
22:55 jnthn rakudo: my $foo = 42; say $foo.WHAT.chop.chop
22:56 lue jnthn: shouldn't that be $foo.WHAT.substr(0,*-2) ?
22:56 p6eval rakudo 94d01f: OUTPUT«Int␤»
22:56 sbp (sorry for the message spam)
22:56 ingy see!
22:56 jnthn ingy: That's not Cool
22:56 sbp double chop. so perl™
22:56 jnthn ingy: Probably needs to be coerced to a Str before you substring it.
22:56 lue rakudo: my $foo; say $foo.WHO
22:56 p6eval rakudo 94d01f: OUTPUT«Any␤»
22:57 jnthn rakudo: my $foo; say $foo.WHAT.Str.chop.chop
22:57 p6eval rakudo 94d01f: OUTPUT«Any()<0x3981a0␤»
22:57 ingy see!
22:57 jnthn ...grr
22:57 lue I wish WHO would give me the variable's name though...
22:57 ingy jnthn haz fitz 2!
22:58 ingy rakudo: my $foo; say $foo.WHAT.perl;
22:58 jnthn ingy: That's why I use .WHAT.perl :P
22:58 p6eval rakudo 94d01f: OUTPUT«Any␤»
22:58 jnthn ingy: I'm sure there's a bug in there somewhere though.
22:58 ingy jnthn: I just wanna know what's going on
22:58 jnthn (in that last line I sent to Rakudo)
22:58 lue rakudo: my $foo; say ($foo.WHO).WHAT
22:58 p6eval rakudo 94d01f: OUTPUT«Method 'WHAT' not found for invocant of class 'Any'␤  in main program body at line 20:/tmp/AJSvkDs__u␤»
22:58 jnthn rakudo: my $foo; say $foo.WHAT
22:58 p6eval rakudo 94d01f: OUTPUT«Any()␤»
22:58 jnthn rakudo: my $foo; say $foo.WHAT.Str
22:58 p6eval rakudo 94d01f: OUTPUT«Any()<0x3981a00>␤»
22:59 jnthn rakudo: my $foo; say $foo.WHAT.Stringy
22:59 p6eval rakudo 94d01f: OUTPUT«Method 'Stringy' not found for invocant of class ''␤  in main program body at line 20:/tmp/vYAfrlQeaU␤»
22:59 lue rakudo: say Any.^methods(:local)
22:59 p6eval rakudo 94d01f: OUTPUT«nonevaluescankeysreverseuniqisaclassifymapkvminmaxpickflatfirstminmaxdoesrotatejoinNumericelemsendreduceallStrpostcircumfix:<[ ]>postcircumfix:<{ }>listat_keypairsoneACCEPTSat_posanysortSeqgrep␤»
22:59 jnthn ingy:  my $foo; say $foo.WHAT.Str # this does the wrong thing
22:59 ingy I think so
22:59 * jnthn looks for masakbot
23:00 ingy I'll use .perl and #RAKUDO it
23:03 lue .oO(無の楽土!)
23:06 tadzik rakudo: mouse.WHAT.say
23:06 p6eval rakudo 94d01f: OUTPUT«Could not find sub &mouse␤  in main program body at line 20:/tmp/MrF78F6xzP␤»
23:07 tadzik hmm. Locally, it gives me "Failure()". What is a mouse in rakudo?
23:08 lue There is no mouse (AFAIK). I get `could not find sub &mouse' locally.
23:09 tadzik hmm, latest monthly release here
23:09 tadzik strange, now I get "could not find sub" too
23:10 kloeri joined #perl6
23:10 tadzik ah, right. REPL remembers class definitions
23:16 ingy rakudo: class Foo {}; say Foo.new.^attributes;
23:16 p6eval rakudo 94d01f: OUTPUT«␤»
23:16 ingy rakudo: class Foo {has $.x}; say Foo.new.^attributes;
23:17 p6eval rakudo 94d01f: OUTPUT«Attribute()<0x813d510>␤»
23:17 ingy rakudo: class Foo {has $.x}; for Foo.new.^attributes -> $a { say ">>$a" };
23:17 p6eval rakudo 94d01f: OUTPUT«>>Attribute()<0x420d8d0>␤»
23:22 ingy rakudo: class Foo {has $.x}; for Foo.new(x=>123).^attributes -> $a { say $a.name };
23:22 p6eval rakudo 94d01f: OUTPUT«$!x␤»
23:23 ingy rakudo: class Foo {has $.x}; for Foo.new(x=>123).^attributes -> $a { say $a.^methods };
23:23 p6eval rakudo 94d01f: OUTPUT«Method 'methods' not found for invocant of class ''␤  in main program body at line 20:/tmp/YGiFIVhtMu␤»
23:24 ingy rakudo: class Foo {has $.x}; for Foo.new(x=>123).^attributes -> $a { say $a.^attributes };
23:24 p6eval rakudo 94d01f: OUTPUT«Method 'attributes' not found for invocant of class ''␤  in main program body at line 20:/tmp/qmGnmv75zR␤»
23:24 ingy rakudo: class Foo {has $.x}; for Foo.new(x=>123).^attributes -> $a { say $a.WHAT };
23:24 p6eval rakudo 94d01f: OUTPUT«Attribute()␤»
23:24 skids joined #perl6
23:24 ingy rakudo: class Foo {has $.x}; for Foo.new(x=>123).^attributes -> $a { say Attribute.^methods };
23:24 p6eval rakudo 94d01f: OUTPUT«Method 'methods' not found for invocant of class ''␤  in main program body at line 20:/tmp/GyPo9KkSQU␤»
23:25 ingy rakudo: say Attribute.new
23:25 p6eval rakudo 94d01f: OUTPUT«Attribute()<0x7d63020>␤»
23:25 ingy rakudo: say Attribute.new.^attributes
23:25 p6eval rakudo 94d01f: OUTPUT«Method 'attributes' not found for invocant of class ''␤  in main program body at line 20:/tmp/5fWnTemq3n␤»
23:26 ingy rakudo: say Attribute.new.name
23:26 p6eval rakudo 94d01f: OUTPUT«␤»
23:26 ingy rakudo: say Attribute.new(name => 'foo').name
23:26 p6eval rakudo 94d01f: OUTPUT«foo␤»
23:27 ingy jnthn: how can I introspect the Attribute thing?
23:27 tylercurtis rakudo: say Attribute.new.HOW
23:27 p6eval rakudo 94d01f: OUTPUT«P6metaclass()␤»
23:27 tylercurtis rakudo: say Attribute.new.^methods
23:27 p6eval rakudo 94d01f: OUTPUT«Method 'methods' not found for invocant of class ''␤  in main program body at line 20:/tmp/7fBlJ522km␤»
23:28 jnthn ingy: At present, you can't.
23:28 jnthn ingy: The metaclass of Attribute doesn't support introspection.
23:28 jnthn (Yes, it sucks.)
23:28 ingy jnthn: can I use you to introspect it :)
23:29 ingy rakudo: class Foo {has $.x}; for Foo.new(x=>123).^attributes -> $a { say $a.name };
23:29 p6eval rakudo 94d01f: OUTPUT«$!x␤»
23:29 ingy I want to get 123
23:29 ingy somehow
23:30 jnthn ingy: The reason Mu.perl sucks at the moment is because there's not a way to actually do that from Perl 6 space at the moment.
23:31 jnthn ingy: If you want to Do It Anyway then there is a hack, which you should certainly #RAKUDO
23:31 masonkramer joined #perl6
23:31 jnthn my $value = pir::getattribute__PPs($object, $a.name);
23:33 ingy somehowsorry, lost teh NET
23:33 ingy back
23:34 ingy jnthn: sounds good
23:34 ingy thanks
23:34 ruoso joined #perl6
23:35 TimToady the parse of t/spec/S32-temporal/DateTime.t fails at line 166 because C<time> is a listop.  should it be a term like C<now> instead?
23:37 Tene rakudo: say Mu.perl
23:37 p6eval rakudo 94d01f: OUTPUT«Mu␤»
23:37 TimToady std: time == 42
23:37 p6eval std 31648: OUTPUT«[31m===[0mSORRY![31m===[0m␤Preceding context expects a term, but found infix == instead at /tmp/QPbmtaueOT line 1:␤------> [32mtime [33m⏏[31m== 42[0m␤Parse failed␤FAILED 00:01 112m␤»
23:37 TimToady should that work?
23:39 jnthn Only 42 seconds after the last millenium.
23:39 jnthn :-)
23:39 TimToady I'm inclined to think it should parse like
23:39 jnthn TimToady: I'd say if now does then time also should but...what's the difference?
23:40 TimToady std: now == 42
23:40 p6eval std 31648: OUTPUT«ok 00:01 109m␤»
23:40 TimToady time is currently a listop, not a term
23:40 jnthn time is seconds from epoch, now gives an object-y thing?
23:40 jnthn No, I meant between "now" and "time"
23:40 * jnthn can't keep up with Temporal
23:40 TimToady now gives an Instant, time is still POSIXy
23:41 jnthn OK
23:41 TimToady but I think it's probably another pseudo constant like now, rand, and self
23:41 jnthn I'd suggest they're both terms.
23:41 jnthn (Or both not. Consitency though.)
23:41 TimToady and you can always say time() if you want to call a function
23:42 TimToady and I've contemplated making 'same' a pseudo constant meaning the current capture, so nextsame is nextwith(|same)
23:44 TimToady but maybe that's just context().args or some such
23:45 silug joined #perl6
23:45 jnthn Guess it depends how much you fancy huffmanizing it.
23:45 TimToady wait, we renamed that
23:46 TimToady callframe().args, or some such
23:46 jnthn I kinda can't see anyone writing nextwith(|same) when nextsame exists
23:46 jnthn OTOH
23:46 jnthn nextwith(|same, :extra<thingy>) may be more useful.
23:46 sorear What is the full set of categories that can be extended with a simple sub?
23:47 jnthn infix, postfix, prefix, circumfix, postcircumfix and term all can be
23:47 jnthn I'm sure TimToady++ will point out any I missed.
23:48 jnthn I'm very sure that scope_declarator, package_declarator and the like cannot be.
23:48 jnthn Oh
23:48 jnthn And trait_mod
23:48 TimToady that depends on how far we push the proto as a default
23:49 jnthn trait_does:sym<does>                           my $x does Freezable
23:49 jnthn TimToady: typo? ^^
23:49 jnthn Hould be trait_mod:sym<does>
23:49 jnthn (from s02)
23:50 jnthn sorear: Maybe the metaop ones could too. The rest I'd be surprised by, but OTOH I'm used to being surprised in Perl 6. :-)
23:50 pugssvn r31649 | lwall++ | [S02] typo for jnthn++
23:51 pugssvn r31650 | lwall++ | [S06] add .args to what a context can return
23:52 sorear should be trait_mod:<does> anyway
23:52 sorear :sym<> is only for parser stuff
23:53 jnthn sorear: top of that section starts "Here are some of the names of parse rules in STD:"
23:53 jnthn But yes, for the sub it'd be trait_mod:<does>
23:55 Psyche^ joined #perl6
23:59 ingy yaml-p6 can dump objects!
23:59 ingy jnthn++
23:59 jnthn \o/
23:59 jnthn ingy++
23:59 pugssvn r31651 | lwall++ | [S13] try to make multisig semantics slightly more generic so sigs can do better pattern matching

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

Perl 6 | Reference Documentation | Rakudo