Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-08-11

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:02 ruoso joined #perl6
00:09 pugssvn r31947 | tcurtis++ | Replace cp -a with cp -pR for the sake of non-Linux-users.
00:15 sorear rakudo: say (:a :b).perl
00:15 p6eval rakudo fcf4f3: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 22␤»
00:15 sorear std: say (:a :b).perl
00:15 p6eval std 31912: OUTPUT«ok 00:01 113m␤»
00:36 Holy_Cow joined #perl6
00:37 patch greeting from boston.pm!
00:37 hercynium GO 'WAY!
00:38 patch rakudo: say [+] ^10
00:38 p6eval rakudo fcf4f3: OUTPUT«45␤»
00:40 patch star: (<a b c> Z=> 1..3).perl.say
00:40 p6eval star 2010.07: OUTPUT«("a" => 1, "b" => 2, "c" => 3)␤»
00:41 PerlJam rakudo is now "featured" on github.com  (probably old news, but I thought I'd mention it anyway)
00:41 cono joined #perl6
00:41 sorear yeah ever since star
00:41 sorear I wonder if it's a statistical thing
00:41 sorear some of the github guys are perl folk
00:41 PerlJam It wasn't featured yesterday (or at least I didn't see it)
00:43 kid51 joined #perl6
00:43 BillN1VUX joined #perl6
00:44 BillN1VUX sorear: one of the github guys is visiting Boston.pm. patch just did demo on projector.
00:44 tylerni7 joined #perl6
00:45 hercynium rakudo: say "You can pick your $_" for <friends clothes home nose>.pick(*)
00:45 p6eval rakudo fcf4f3: OUTPUT«You can pick your home␤You can pick your friends␤You can pick your nose␤You can pick your clothes␤»
00:45 * hercynium just felt inspired
00:46 BillN1VUX sorear: Chacon featured the project when he saw talk at yapc::eu
00:49 dduncan joined #perl6
00:49 dduncan left #perl6
00:50 BillN1VUX then he flew straight to LinuxCon ... and dropped in on Boston.pm and patch's Acmeist p6 impl talk
00:56 sorear patch is implementing p6 too?
00:58 BillN1VUX sorear - patch is doing p6 impl of acmeist modules.
00:58 BillN1VUX not p6 itself
00:58 patch rakudo: ( 8, * + 8 ... 64 ).perl.say
00:58 p6eval rakudo fcf4f3: OUTPUT«(8, 16, 24, 32, 40, 48, 56, 64)␤»
00:59 tylercurtis rakudo: (8, 16 ... 64).perl.say
00:59 p6eval rakudo fcf4f3: OUTPUT«(8, 16, 24, 32, 40, 48, 56, 64)␤»
01:00 hercynium rakudo: say "You can pick your $_" for <friends clothes home nose>.pick(6)
01:00 p6eval rakudo fcf4f3: OUTPUT«You can pick your home␤You can pick your friends␤You can pick your clothes␤You can pick your nose␤»
01:00 hercynium rakudo: say "You can pick your $_" for <friends clothes home nose>.pick()
01:00 p6eval rakudo fcf4f3: OUTPUT«You can pick your clothes␤»
01:00 hercynium rakudo: say "You can pick your $_" for <friends clothes home nose>.pick(6, :replace)
01:01 p6eval rakudo fcf4f3: OUTPUT«You can pick your home␤You can pick your home␤You can pick your home␤You can pick your clothes␤You can pick your nose␤You can pick your clothes␤»
01:01 hercynium rakudo: say "You can pick your $_" for <friends clothes home nose>.pick(6, replace => 1)
01:02 p6eval rakudo fcf4f3: OUTPUT«You can pick your friends␤You can pick your nose␤You can pick your home␤You can pick your home␤You can pick your nose␤You can pick your friends␤»
01:08 ghyspran joined #perl6
01:08 dukeleto Is there a Debian package for Rakudo* ?
01:09 masonkramer joined #perl6
01:11 cono joined #perl6
01:16 plobsing joined #perl6
01:22 [Coke] joined #perl6
01:36 tylercurtis std: my regex foo ($s) { $s }; say 'a' ~~ / <&foo('a') > /
01:36 p6eval std 31912: OUTPUT«ok 00:01 124m␤»
01:36 tylercurtis rakudo: my regex foo ($s) { $s }; say 'a' ~~ / <&foo('a') > /
01:36 p6eval rakudo fcf4f3: OUTPUT«===SORRY!===␤regex assertion not terminated by angle bracket at line 22, near "('a') > /"␤»
01:38 tylercurtis Is this a case of NYI or a bug in my code?
01:39 spinclad joined #perl6
01:43 BillN1VUX joined #perl6
01:44 sorear tylercurtis: Looks line NYI
01:50 tylercurtis sorear: alright. Can grammars have attributes?
01:51 tylercurtis rakudo: grammar Fish { has $.species = 'salmon'; token TOP { $.species } }; Fish.parse('salmon').say;
01:51 p6eval rakudo fcf4f3: OUTPUT«␤»
01:51 pmichaud note that the type object won't have an initialized attribute.
01:52 pmichaud rakudo:  grammar Fish { our $species = 'salmon';  token TOP { $species } };  Fish.parse('salmon').say;
01:52 p6eval rakudo fcf4f3: OUTPUT«salmon␤»
01:52 pmichaud \o/
01:52 pmichaud although it's arguable that when Fish creates an internal cursor that cursor should have the attribute
01:52 tylercurtis rakudo: grammar Fish { has $.species = 'salmon'; token TOP { $.species } }; Fish.new.parse('salmon').say;
01:53 p6eval rakudo fcf4f3: OUTPUT«␤»
01:53 pmichaud so I'd call that a rakudo bug.
01:53 pmichaud not sure it's going to be fixed anytime soon, though.
01:54 tylercurtis Alright. I will use an our variable, then.
01:54 pmichaud a my variable will work also.
01:54 pmichaud oh, maybe not.
01:54 pmichaud but why use a variable in the first place?  How would it get set?
01:56 pmichaud NQP knows how to do parameters on regexes, so it shouldn't be hard to add it for rakudo (if it's not really there)
01:57 tylercurtis pmichaud: I'm attempting to write a YAML parser, and <foo('bar')> doesn't appear to work (actually, I did only check <&foo('bar')> so I should probably check <foo('bar')>), so I'm going to keep track of the indentation with an $INDENT variable.
01:58 pmichaud rakudo:  my regex foo($s) { ... };
01:58 p6eval rakudo fcf4f3:  ( no output )
01:58 pmichaud rakudo:  my regex foo($s) { $s };
01:58 p6eval rakudo fcf4f3:  ( no output )
01:58 tylercurtis rakudo: grammar Some { token matchthis ($s) { $s }; token TOP { <matchthis('thing')> } }; Some.parse('thing').say;
01:58 p6eval rakudo fcf4f3: OUTPUT«thing␤»
01:58 tylercurtis That works. :)
01:58 pmichaud rakudo:  my regex foo($s) { $s };  say 'a' ~~ / <&foo('a')> /
01:58 p6eval rakudo fcf4f3: OUTPUT«===SORRY!===␤regex assertion not terminated by angle bracket at line 22, near "('a')> /"␤»
01:58 pmichaud rakudo:  my regex foo($s) { $s };  say 'a' ~~ / <foo('a')> /
01:59 p6eval rakudo fcf4f3: OUTPUT«Method 'foo' not found for invocant of class 'Cursor'␤  in <anon> at line 22:/tmp/1_T4OrYTpn␤  in 'Cool::match' at line 2406:CORE.setting␤  in 'Regex::ACCEPTS' at line 5676:CORE.setting␤  in main program body at line 22:/tmp/1_T4OrYTpn␤»
01:59 pmichaud a-ha
01:59 pmichaud it doesn't know how to parse circumfixes on variables
01:59 pmichaud a-ha
01:59 pmichaud because STD.pm parses an entire expression there
01:59 pmichaud we might be able to handle that.
02:00 pmichaud please file rakudobug if you get a chance.
02:00 pmichaud afk, shopping
02:00 tylercurtis pmichaud: will do. By the way, do you have a moment for a PCT question?
02:00 pmichaud just a moment
02:01 pmichaud (yes, I have only a moment :)
02:01 tylercurtis pmichaud: Is :returns<Float> the correct way to say that a number should be a Float?
02:01 tylercurtis I'm working on constant-folding and I noticed that t/nqp/51-multis.t in NQP-rx test-suite has a $f.bar(43.5 - 0.5) that, with my constant-folding, is producing PAST::Op.new(:name<bar>, :pasttype<callmethod>, PAST::Var.new(:name<$f>), PAST::Val.new(:returns<Float>, :value(43))).
02:01 tylercurtis The PIR this generates is 'find_lex $P53, "$f"␤$P53."bar"(43)'. So, that goes to the wrong multi.
02:03 pmichaud that does look like a PCT bug, yes.
02:04 pmichaud but I think there must be something else going on.
02:04 pmichaud normally PCT is smart enough to be sure to generate 43.0 for floats
02:05 pmichaud the code that handles that is  PAST/Compiler.pir:2530
02:08 pmichaud oh, wait, that won't handle this case.
02:09 pmichaud yes, it's a PAST::Compiler bug
02:09 pmichaud is this blocking gsoc for you?
02:10 pmichaud I have to run.  I'll fix this tomorrow early-ish.
02:11 pmichaud afk
02:11 tylercurtis pmichaud: thanks. It would just block incorporating some of the optimizations into NQP or other compilers.
02:28 CaptTofu joined #perl6
02:34 sorear let it be known that I am not a fan of $*endsym
02:44 Bill_N1VUX joined #perl6
03:02 skytec joined #perl6
03:18 hercynium joined #perl6
03:24 CaptTofu joined #perl6
03:26 nimiezko joined #perl6
03:44 meinwald joined #perl6
04:16 tylercurtis ingy: are you around?
04:17 molaf joined #perl6
04:18 xuser joined #perl6
04:27 dalek niecza: a4cf2b8 | sorear++ |  (3 files):
04:28 dalek niecza: Implement colon pairs
04:28 dalek niecza: review: http://github.com/sorear/niecza/commit/a4cf2b854718f11abba5d45613036b34a043ac46
04:28 dalek niecza: 892d55e | sorear++ |  (3 files):
04:28 dalek niecza: Implement fatarrows
04:28 dalek niecza: review: http://github.com/sorear/niecza/commit/892d55e6767852a2c0e4cdf85b03aaf69cf43003
04:28 dalek niecza: d616f47 | sorear++ |  (8 files):
04:28 dalek niecza: %var automatically becomes a Hash
04:28 dalek niecza: review: http://github.com/sorear/niecza/commit/d616f472132246a1ee7448c929ba610e16b7397f
04:28 dalek niecza: e2d76bb | sorear++ |  (3 files):
04:28 dalek niecza: pairs, %hashes live
04:28 dalek niecza: review: http://github.com/sorear/niecza/commit/e2d76bbfabb822dd190afc56b21e7ce1df7ecdc8
04:32 tylercurtis phenny: ask ingy if he's aware that yaml-pm6 currently has no license.
04:32 phenny tylercurtis: I'll pass that on when ingy is around.
04:35 hanekomu joined #perl6
04:36 Sarten-X joined #perl6
04:48 rhr joined #perl6
04:50 patrickas joined #perl6
05:15 kaare joined #perl6
05:18 HarryS joined #perl6
05:38 simcop2387 joined #perl6
05:44 szabgab I wonder how people writing Perl modules are running their tests?
05:45 szabgab I wrote a small script for myself called prove6 that would add  lib/  to PERL6LIB and run the files in t/ using perl6   but is there a better way?
05:47 szabgab another solution I had is to just ad 'lib' to PERL6LIB in my .bashrc
05:48 meteorjay joined #perl6
05:49 tylercurtis szabgab: ufo-generated Makefiles have a test target that adds lib(and blib, which is where ufo Makefiles put compiled pir modules) to PERL6LIB and runs the files in t/
05:51 wtw joined #perl6
05:56 uniejo joined #perl6
05:57 ingy greetings
05:57 phenny ingy: 04:32Z <tylercurtis> ask ingy if he's aware that yaml-pm6 currently has no license.
05:58 ingy tylercurtis: thanks. what's the standard?
05:59 ingy tylercurtis, szabgab: I did most of the recent work on the ufo Makefiles, so feel free to bug me
06:00 ingy tylercurtis, szabgab: you can also run `make t/specific.t`
06:01 ingy szabgab: ufo make test runs: prove -e perl6 ...
06:01 ingy szabgab: so your prove6 is not needed :P
06:04 lkk- joined #perl6
06:08 sorear ingy: the usual license for perl6 stuff is AL2.0
06:24 shade_ joined #perl6
06:28 Su-Shee joined #perl6
06:29 tylercurtis ingy: I'm working on implementing YAML::load, by the way. No guarantees that I'll have it finished very soon, given that this is the last week of GSoC, though.
06:33 wamba joined #perl6
06:35 foodoo joined #perl6
07:10 Casan joined #perl6
07:16 ingy sorear: where/how does one put the license declaration?
07:27 Mowah joined #perl6
07:28 moritz_ typically in a LICENSE file
07:31 yves joined #perl6
07:37 AndreasX joined #perl6
07:38 TiMBuS joined #perl6
07:38 Axius joined #perl6
07:39 AndreasX left #perl6
07:44 AndreasX joined #perl6
07:46 redicaps joined #perl6
07:55 Axius joined #perl6
07:55 bakki joined #perl6
07:56 bakki hello
07:56 bakki Hi
07:56 colomon o/
07:56 bakki I would like to join in perl 6 community
07:56 bakki I would like to do something in perl 6
07:56 colomon great!
07:57 bakki I am build enginner, automation guys, uses perl for 4 yrs ...
08:00 colomon what sort of thing are you interested in doing?
08:01 Su-Shee wear some flowers in your hair! oh wait, that was the other community.. :)
08:02 patrickas joined #perl6
08:04 mathw Welcome, bakki
08:06 cognominal joined #perl6
08:08 moritz_ bakki: a good start is to pick a simple perl 5 module, and implement it in Perl 6
08:09 moritz_ bakki: or join an existing effort to do that
08:09 szabgab ingy: what is ufo?
08:10 moritz_ an alien technology Makefile generator
08:10 szabgab http://svn.pugscode.org/pugs/v6/v6-mildew/lib/   < can someone please look at this and remove or rename one of the v V directories?
08:10 moritz_ http://github.com/masak/ufo
08:10 szabgab svn blows up on that on Windows
08:10 szabgab moritz_: ty
08:10 moritz_ read that README - I loved it :-)
08:11 moritz_ phenny: tell pmurias windows and some Mac file systems are case insensitive, so they can't check out http://svn.pugscode.org/pugs/v6/v6-mildew/lib/
08:11 phenny moritz_: I'll pass that on when pmurias is around.
08:12 szabgab this SVN is so stupid
08:12 szabgab it should skip the duplicates
08:18 drbean joined #perl6
08:19 szabgab ok, so I beamed down ufo from github, what's now?
08:20 moritz_ chdir to your module directory
08:20 moritz_ ufo && make
08:21 moritz_ make test
08:21 moritz_ profit!
08:21 szabgab ufo is not in my path
08:21 szabgab and ufo has a Makefile
08:21 moritz_ then put it into your path
08:21 moritz_ I don't think you need the Makefile
08:21 szabgab and I don't habe /usr/local/bin on this Windows 7 machine :)
08:22 moritz_ ouch
08:22 szabgab moritz_: isn't it funny that I keep typing habe instead of have?
08:22 szabgab and I don't even mean to :)
08:22 moritz_ szabgab: it's a bit German-ish :-)
08:22 szabgab yep
08:23 szabgab but b/v are next to each other
08:24 szabgab I guess I'll need an ufo.bat that will run perl6 ufo
08:24 moritz_ or a symlink with an extension that's registered to perl6
08:24 AndreasX joined #perl6
08:24 moritz_ oh wait, this is windows...
08:25 dakkar joined #perl6
08:25 szabgab yeah, I am alreday using alien technology
08:26 sorear How many exotic Rakudo features does ufo use?
08:26 AndreasX joined #perl6
08:26 * sorear wonders if he could make a ufo.exe
08:27 moritz_ MAIN sub
08:27 moritz_ .subst
08:27 moritz_ $str.IO ~~ :e
08:27 szabgab well, ufo blew up on my system
08:27 hirschnase joined #perl6
08:28 mj41_ joined #perl6
08:29 szabgab http://nopaste.gamedev.pl/?id=7847
08:30 masak joined #perl6
08:30 masak oh hai, #perl6!
08:30 szabgab masak: oh hai
08:30 szabgab this is for you:
08:30 szabgab http://nopaste.gamedev.pl/?id=7847
08:30 maja joined #perl6
08:30 szabgab it seems ufo dislikes windows :(
08:31 meppl joined #perl6
08:31 masak I'm not overly surprised.
08:31 szabgab as I can see there is a call to find
08:31 moritz_ aye
08:31 masak it's never really been written for Windows.
08:31 masak szabgab: if you'd like to adapt it for windows, I'd be happy to accept a patch that does that.
08:31 mj41__ joined #perl6
08:32 szabgab this is a runaway yak fight
08:32 Mowah joined #perl6
08:35 dduncan joined #perl6
08:35 thebird joined #perl6
08:37 dduncan left #perl6
08:38 masak szabgab: what is it that you want to do?
08:39 tadzik joined #perl6
08:39 tadzik oh hi
08:39 sorear it looks like .NET has no support for querying properties of supplementary characters
08:40 szabgab I think I'll try to outsource this to Alias, CSJewell or some other Windows expert
08:40 szabgab I just wanted to run my tests and then was got directed to ufo
08:40 szabgab but I guess I'd better go back to my regular scheduled failurs
08:41 szabgab as ufo embeds a call to find in the Makefile and I have no idea how to replace that on Windows
08:43 masak szabgab: probably easier to just run the tests manually.
08:43 masak szabgab: I don't know anything about Windows, but I suspect it has prove.
08:43 baest szabgab: use File::Find
08:43 sorear masak: prove is part of the Perl5 Test::Harness distribution
08:43 moritz_ prove -e perl6 -r t/
08:43 sorear it's not an OS tool
08:43 szabgab masak: why did you decide to create a Makefile and not something written in Perl 6 ?
08:44 masak and you'll need to have the PERL6LIB flag set, or have the module installed.
08:44 masak szabgab: because the Makefile format abstracts away a lot of the things I don't want to write explicitly. and because I didn't want the build process to be dependent on a module I wrote. and speed.
08:48 moritz_ rakudo: sub f(:x(:$y)) { }; ~say &f.signature.params[0].names
08:48 p6eval rakudo fcf4f3: OUTPUT«Method 'names' not found for invocant of class 'Parameter'␤  in main program body at line 22:/tmp/yrVsMvvl8Y␤»
08:49 moritz_ rakudo: sub f(:x(:$y)) { }; ~say &f.signature.params[0].^methods(:local)
08:49 p6eval rakudo fcf4f3: OUTPUT«parcelnamed_namesconstraintscopyrefreadonlynameinvocanttypenameddefaultoptionaltype_capturesrwmulti_invocantslurpysignaturecapture␤»
08:53 masak probably the method is called .name, not .names :)
08:53 * moritz_ wants named_anmes
08:53 moritz_ *names
08:53 masak :)
08:53 moritz_ rakudo: sub f(:x(:$y)) { }; say ~&f.signature.params[0].^methods(:local)
08:53 p6eval rakudo fcf4f3: OUTPUT«signature capture parcel named_names constraints copy ref readonly name type invocant named default optional type_captures rw multi_invocant slurpy␤»
08:54 redicaps left #perl6
08:55 moritz_ phenny: tell patrickas if you want to hack a bit more on MAIN, you could try to implement short options, ie :foo(:$f) in a signature allows both --foo and -f options. $param.named_names should give you a list of all alias names
08:55 phenny moritz_: I'll pass that on when patrickas is around.
08:58 masak ok, thinking out loud here. &pack returns a Buf, and takes different arguments, mostly numbers of different kinds. but this:
08:58 masak a   A string with arbitrary binary data, will be null padded.
08:58 masak this must be a Buf, right?
08:58 masak so pack('a', $some-buf) is a no-op.
08:59 masak hm, maybe that's 'a*'
08:59 moritz_ must be buf, yes
08:59 masak just checking. thanks.
09:00 masak I think I"ll just delete the current t/spec/S32-str/unpack.t
09:00 masak it has three tests, written by me a year or so ago.
09:00 masak they're all wrong.
09:00 moritz_ wfm
09:01 pugssvn r31948 | masak++ | [t/spec/S32-str/unpack.t] removed; too wrong
09:03 pugssvn r31949 | moritz++ | test for MAIN with name aliases
09:11 masak Rakudo Perl is featured on GitHub today! http://twitter.com/zmughal/status/20871210524
09:11 masak \o/
09:12 tadzik I don't see it
09:13 moritz_ http://github.com/blog has http://github.com/blog/692-perl-6-on-github but it's 6 days old
09:13 masak tadzik: I needed to log out and go to the main page to see it.
09:13 masak moritz_: no, that's another thing.
09:13 tadzik oh, right
09:14 tadzik rakudo: i.WHAT
09:14 p6eval rakudo fcf4f3:  ( no output )
09:14 tadzik rakudo: i.WHAT.say
09:14 p6eval rakudo fcf4f3: OUTPUT«Complex()␤»
09:14 imarcusthis I heard some rumors that someone was working on non-blocking sockets for Rakduo. Anyone know the status of that?
09:15 masak rakudo: subset Imaginary of Complex where { !.real }; say 4i ~~ Imaginary; say 2 + 4i ~~ Imaginary
09:15 p6eval rakudo fcf4f3: OUTPUT«Method 'real' not found for invocant of class 'Complex'␤  in <anon> at line 22:/tmp/kiMogeIsya␤  in 'Block::ACCEPTS' at line 5635:CORE.setting␤  in 'infix:<~~>' at line 402:CORE.setting␤  in <anon> at line 1:/tmp/kiMogeIsya␤  in 'Block::ACCEPTS' at line 5635:CORE.setting␤  in
09:15 p6eval ..'ACCE…
09:15 masak rakudo: subset Imaginary of Complex where { !.re }; say 4i ~~ Imaginary; say 2 + 4i ~~ Imaginary
09:15 p6eval rakudo fcf4f3: OUTPUT«1␤0␤»
09:15 moritz_ imarcusthis: you need to ask mberends when he's online
09:15 masak \o/
09:16 imarcusthis moritz_: He's the one working on it?
09:16 moritz_ imarcusthis: yes
09:18 tadzik masak: !.re is 'has no $.re'?
09:18 masak tadzik: method call, boolification, negation. so yes.
09:18 moritz_ !.re is short for !$_.re
09:19 masak tadzik: 'has no' as in 'it's zero'.
09:19 sorear Does Perl 6 have anything like ctypes.h functionality?
09:20 masak sorear: yes. these tests are inside of the regex sublanguage.
09:21 sorear masak: I was hoping for something I could use to implement regexes
09:21 masak the conversion functions are called .uc, .lc and .ucfirst
09:21 masak sorear: hah! been there, done that. :)
09:21 masak sorear: I cheated and used regexes.
09:21 masak might come back and do it Right sometime.
09:21 imarcusthis seen mberends?
09:21 masak as in, Big Honking Generated Table.
09:22 masak imarcusthis: all our seen bots are broken :/
09:22 sorear masak: pir::isctype
09:22 moritz_ http://irclog.perlgeek.de/search.pl?channel=perl6&amp;nick=mberends&amp;q=
09:22 masak sorear: that's an alternative.
09:22 imarcusthis mberends is http://github.com/mberends ?
09:22 moritz_ my 'seen' bot :-)
09:22 moritz_ imarcusthis: yes
09:23 * sorear can use his own trapdoors to access System.Char.GetUnicodeCategory
09:23 imarcusthis moritz: Thanks
09:23 sorear but I thought it would be neat to put a p6 veneer over it
09:23 moritz_ +1
09:23 moritz_ sorear: just put something in the spec :-)
09:24 masak class CTypes { ... }
09:24 masak :)
09:26 moritz_ http://www.perlmonks.org/?node_id=854283
09:26 moritz_ windows users please come forth
09:27 imarcusthis first ones up against the wall when the revolution comes...
09:28 baest big wall....
09:29 sorear masak: What is the implementation level of GGE?
09:30 dolmen moritz_: could you tell him the modules are already installed: C:\Rakudo\lib\parrot\2.6.0\...
09:30 masak sorear: I think it fails one test that PGE passes.
09:30 masak sorear: it passes a few that PGE fails.
09:31 sorear masak: Erm.  I thought GGE was an implementation of p6regex in p6?
09:31 masak it is.
09:31 * sorear is not familiar with PGE
09:31 masak PGE is what Rakudo used to run on.
09:31 masak it's written in PIR.
09:31 dolmen moritz_: I've seen in the backlog you were talking about Str.subst(... :inplace)
09:32 dolmen moritz_: this is a bad idea
09:32 moritz_ dolmen: why?
09:32 dolmen moritz_: Str must stay immutable
09:32 moritz_ it will
09:32 sorear right now niecza supports literal characters, subrules, capturing subrules, the ? + * quantifiers, : backtrack control, and :ratchet
09:32 moritz_ it will make the container mutable, not the string
09:32 moritz_ dolmen: are the docs installed too?
09:32 sorear I take it GGE  is a good bit more complete
09:33 moritz_ (with the R* .msi)
09:33 dolmen moritz_: no docs, except the book and the cheatsheet
09:33 masak sorear: hard to quantify, but yes, probably a bit.
09:33 moritz_ dolmen: where's the book installed to?
09:33 masak sorear: you're welcome to have a look; it's on github.
09:33 masak sorear: http://github.com/masak/gge
09:33 dolmen moritz_: C:\Rakudo\docs
09:34 moritz_ dolmen: thanks
09:34 sorear PGE predated gimme5?  really?
09:34 sorear so gimme5 only *looks* like 1994 Perl code? ;)
09:35 masak heh
09:35 dolmen moritz_: back to :inplace
09:35 moritz_ it's pretty new, I think
09:35 Mowah joined #perl6
09:35 moritz_ but I'm not sure if TimToady has heard of Modern Perl :-)
09:35 dolmen moritz_: what do you mean by mutable container?
09:35 moritz_ dolmen: my $x = 'foo'; # $x is mutable, 'foo' not.
09:36 dolmen moritz_: ah, ok
09:36 moritz_ rakudo: my $x = 'foo'; $x ~~ s:g/o/a/; say $x
09:36 p6eval rakudo fcf4f3: OUTPUT«faa␤»
09:36 masak sorear: http://github.com/masak/gge/blob/master/STATUS is pretty accurate. I see that <before> and <after> are marked as NYI, but they are actually implemented already.
09:36 moritz_ rakudo: 'foo' ~~ s:g/o/a/;
09:36 p6eval rakudo fcf4f3: OUTPUT«Cannot modify readonly value␤  in '&infix:<=>' at line 1␤  in main program body at line 22:/tmp/qPtzw7bnNd␤»
09:37 moritz_ dolmen: subst(:inplace) would have the same behaviour
09:37 dolmen moritz_: but will it be still the same Str object?
09:38 moritz_ dolmen: if it has been modified, it can't be the same Str object
09:38 dolmen moritz_: ok, that's fine
09:39 dolmen moritz_: but I agree with pmichaud ':inplace' would not be the right naming
09:39 moritz_ why not?
09:39 moritz_ it does modify inplace
09:40 moritz_ point is we can't simply call $_.=subst(...) for implementing s///
09:40 sorear Why not?
09:40 dolmen if that is not the same object, this is not "in place"
09:40 moritz_ dolmen: with "place" I mean "variable", not "object"
09:40 moritz_ sorear: because then s/// returns the modified string
09:41 sorear aha.
09:41 moritz_ sorear: and that surprises people who come from p5, and think it will return something true if anything was changed
09:41 moritz_ so we need some kind of different scheme
09:41 dolmen moritz_: it surprised me when I arrived in the Perl5 world
09:42 moritz_ and so far nobody suggested anything working, (except pmichaud, who proposed to implement .subst in terms of s///. Not sure I like that at all)
09:42 dolmen moritz_: I mean, many Perl5 things are functional (map, grep...), but s/// wasn't
09:43 moritz_ dolmen: and there's the 'functional' alternative called subst()
09:43 moritz_ in p6
09:43 masak I'm not sure we should return something specific from s/// solely to avoid surprising p5 programmers.
09:43 masak to me, returning the result string sounds fine, at least to a first approximation.
09:43 dolmen moritz_: so 'inplace' is not functional, so this what is strange for me
09:44 moritz_ dolmen: that's because s/// is not functional
09:44 moritz_ dolmen: it's just a question of how to implement it
09:44 masak dolmen: same here. I think that's what pmichaud felt was add about it too.
09:44 masak seems that :inplace and .= take up the same mental space.
09:44 moritz_ if you don't want the side effect, you simply don't use :inplace
09:44 masak which is a warning sign.
09:44 moritz_ I see no problem with that approach
09:45 moritz_ masak: fair point, if s/// does indeed return the result string
09:45 masak I won't stand in the way. just noting my slight uncomfort with the idea of :inplace
09:46 masak if 'rough consensus' is what you're after, you barely have it in this case :)
09:46 moritz_ I think I'll wait for an opinion from TimToady about what s/// should return
09:56 dolmen P5 does s/// in place for performance reasons
09:56 dolmen however in a world where strings are immutable you can't benefit from this
09:56 dolmen some VMs such as the JVM have immutable strings to be able to do some other optimizations
09:57 dolmen such as sharing data
09:57 moritz_ parrot too
09:59 dolmen Java has StringBuilder objects that are used for 'inplace' things
10:00 dolmen http://download.oracle.com/javase/1.5.0/docs/api/java/lang/StringBuilder.html
10:02 jnthn oh hai, #perl6
10:02 phenny jnthn: 10 Aug 09:32Z <moritz_> tell jnthn could you maybe take a look at http://www.perlmonks.org/?node_id=853113 ? seems to be an MSI installier issue
10:02 * jnthn is back from vacations
10:03 sorear \o/
10:03 moritz_ welcome back. Hope you enjoyed it
10:03 sorear niecza: my %x; %x<x>[12] = 5; say +%x<x>
10:03 p6eval niecza e2d76bb: OUTPUT«13␤»
10:03 jnthn moritz_: Yes, very much so. :-)
10:05 masak jnthn: welcome back!
10:05 sorear jnthn: welcome back!
10:05 jnthn It's nice to be back, albeit I miss the Swiss alps already. :-)
10:06 ingy szabgab: http://github.com/masak/ufo - it's our MakeMaker
10:07 ingy what's the shortest rule that will never match?
10:07 moritz_ <!>
10:07 ingy I beat dconway on this one for p5!
10:07 ingy /$^/
10:08 moritz_ (?!) is what I typically use
10:08 moritz_ in p5
10:08 daxim joined #perl6
10:08 moritz_ ingy: doesn't that match the empty string?
10:08 sorear (it will in p6)
10:08 ingy no
10:09 moritz_ curious... why not?
10:09 ingy anywho: thanks
10:09 sorear stefan@stefans:~$ perl -E 'say "STDOUT_TOP" =~ /$^/'
10:09 sorear 1
10:09 PZt joined #perl6
10:10 moritz_ ingy lost :-)
10:10 moritz_ /a^/
10:10 moritz_ should work though
10:10 sorear moritz_: because $^ matches a literal string which is (usually) not empty
10:10 ingy moritz_: what do you mean?
10:10 moritz_ ingy: you gave a wrong answer
10:11 moritz_ 12:07 < ingy> I beat dconway on this one for p5!
10:11 moritz_ 12:07 < ingy> /$^/
10:11 ingy did I?
10:11 moritz_ ingy: do you ignore sorear?
10:14 ingy sorry: I can't resist the urge to out golf the Damian.
10:14 ingy I can't find any input that matches:
10:14 ingy /.^/
10:14 ingy that was it
10:14 moritz_ that makes more sense
10:14 ingy it was over a year ago and it's 3am
10:14 moritz_ :-)
10:15 x3nU joined #perl6
10:15 ingy PS If you look at   /.^/   at the proper angle, in the proper light, under the influence of the proper drugs, it kinda looks like an emoticon of a certain Aussie I know... :P
10:15 Trashlord joined #perl6
10:15 huf it reminds me of a smirking guy with emo hair
10:16 huf am i looking at it wrong?
10:16 sorear it's the Phineas Gage smile emoticon?
10:17 ingy moritz_: someone else in that thread offered /$^/
10:17 ingy and I actually debunked it :P
10:18 pmurias joined #perl6
10:18 pmurias ruoso: hi
10:18 phenny pmurias: 10 Aug 22:51Z <tylercurtis> tell pmurias The existence of both v6/v6-mildew/lib/V6/ and v6/v6-mildew/lib/v6/ in pugs svn  doesn't play nicely with non-case-sensitive filesystems (for example, HFS+). Would you mind renaming/moving one of them so that I can checkout the repo again?
10:18 phenny pmurias: 08:11Z <moritz_> tell pmurias windows and some Mac file systems are case insensitive, so they can't check out http://svn.pugscode.org/pugs/v6/v6-mildew/lib/
10:20 ingy writing p6 grammars is painful compared to pegex :P
10:20 moritz_ what is pegex?
10:21 ingy moritz_: http://pegex.org
10:21 ingy its my analog of p6rules to all other langs
10:22 huf pegex is a bit perverted a name tho, no?
10:22 ingy peg + regex
10:22 ingy which is what it is
10:22 moritz_ ingy: doesn't look less painful to me
10:22 moritz_ especially those (?:...) just suck.
10:22 ingy not the syntax
10:23 moritz_ I mean srsly wtf
10:23 moritz_ that's real cruft
10:23 ingy um
10:23 ingy I'll explain if you let me :)
10:24 ingy everything between /.../ is real regex
10:24 ingy so I can't control that cruft
10:24 ingy but anyway, the syntax is about the same
10:25 ingy it's just that I can't get actions where I need them in my p6 grammars
10:25 moritz_ why not?
10:25 ingy in pegex you can get actions before you try a rule
10:25 ingy after it matches
10:25 ingy and after it fails
10:26 ingy I have to add always passing try_ rules to the p6 grammar
10:26 moritz_ hm
10:26 ingy that's basically what I meant
10:27 ingy pegex is also very fast :P
10:27 ingy I'm hoping to try to generate p6 rules from pegex
10:27 ingy so I can have one testml grammar
10:27 ingy or yaml grammar
10:27 ingy or whatever
10:28 pmurias ingy: you mean pegex gives you implicit hooks before and after the rule
10:28 pmurias and on failure
10:28 pmurias ?
10:28 ingy pmurias: try_rule1 got_rule1 not_rule1 and end_rule1
10:28 ingy in your receiver class
10:28 moritz_ does that mix with LTM?
10:29 ingy I don't support ltm yet
10:29 ingy I don't see the need for it outside p6
10:29 mathw really?
10:29 ingy but I've been thinking on it
10:30 ingy mathw: I read a good paper
10:30 ingy I wish I could find it
10:30 pugssvn r31950 | pmurias++ | [v6-mildew] rename files to work around insensitivity
10:30 mathw I know it's not necessary, but I find things can be much more intuitive when you have LTM
10:30 ingy but LTM is great when you have people changing grammars on the fly
10:31 ingy but most grammars are static
10:31 ingy perl6 ltm is critical
10:31 ingy anyway, pegex is brand new
10:31 sorear don't worry, we'll steal everything back
10:32 ingy and I want to get pegex, testml, yaml and jsync ported to 6 langs by yapc asia :)
10:32 ingy sorear: I really hope so
10:33 Mowah joined #perl6
10:33 ingy as soon as rakudo gets p5 regexes back, I can port pegex immediately
10:33 ingy and then all my modules can be fast :P
10:33 moritz_ lol
10:34 mathw what makes you think rakudo's implementation of p5 regexes would be fast straight away?
10:34 ingy mathw: a binding to pcre is all I want
10:34 moritz_ the previous p5 regex implementation used PGE as a backend
10:34 ingy or a thompson nfa!
10:34 moritz_ and p5 regex != pcre
10:34 thebird joined #perl6
10:35 mathw a pcre binding would not give you anything like proper p5 regex support
10:35 ingy moritz_: either is fine for pegex
10:35 mathw but you could write one now if you like
10:35 ingy mathw: a pcre binding?
10:36 mathw sure
10:36 ingy yeah, someone offered to help me do that pretty soon
10:36 ingy I forget who
10:39 cdarke joined #perl6
10:41 ingy mathw: http://perlgeek.de/en/article/mutable-grammar-for-perl-6
10:43 ingy ltm avoids confict when several forces are changing a grammar at once
10:43 ingy that was my take away
10:44 ingy and since nothing that I need pegex for currently needs ltm, I put it on the todo stack
10:46 sorear it would be nice if I could run the 3 minute niecza test suite and have it actually work
10:46 sorear rather than have to fix typos TWICE
10:46 masak why twice?
10:46 sorear becuase I made two typos while integrating code
10:47 mathw because you typo the fixes to your typos? I do that
10:47 * moritz_ too
10:47 sorear mathw: well, that and STD.pm6 can't report more than one critical syntax error in a file
10:47 masak that's what's great about tests. they never give up on you :)
10:48 sorear add that on top of the fact that STD.pm6 takes a whole minute to parse my 1000 line setting...
10:48 ingy masak!
10:48 masak ingy!
10:48 ingy masak: we should work on yaml this week
10:48 masak ingy: did we say this week? I'm still pretty tied up with GSoC...
10:49 masak next week would be much better.
10:49 sorear niecza now supports :r/token and :s/rule
10:49 sorear in addition to regex
10:49 masak sorear: cool!
10:49 sorear I think the next thing to work on is LTM and protoregexes
10:49 masak GGE doesn't have the keywords yet. but I think it has :s.
10:49 ingy masak: ok
10:50 ingy masak: I'm traveling next week
10:50 masak ingy: oh.
10:50 mathw mmm protoregexes
10:50 ingy but I'll let you know
10:50 masak ingy: you wanted to work on a YAML parser, right?
10:50 sorear native types are also on the agenda
10:51 sorear masak: does PGE have a concept of ltm?
10:51 sorear in particular 'cursor' will make efficient regex compilation work much better
10:51 masak sorear: no.
10:52 masak sorear: and it's sufficiently fundamental that pmichaud++ decided to redo the whole thing with nqp-rx rather than "extend" PGE.
10:52 dalek niecza: 624f995 | sorear++ |  (3 files):
10:52 dalek niecza: Implement quantmods and ratcheting
10:52 dalek niecza: review: http://github.com/sorear/niecza/commit/624f995b8fc40a1784a9e659107bb3e11e88864d
10:52 dalek niecza: ae16a8e | sorear++ |  (4 files):
10:52 dalek niecza: implement sigspace
10:52 dalek niecza: review: http://github.com/sorear/niecza/commit/ae16a8eb34cfebf90128593edc92fb34ba2ccb5a
10:52 dalek niecza: 5d8b10e | sorear++ |  (2 files):
10:52 dalek niecza: Ratcheting and sigspace now live
10:52 dalek niecza: review: http://github.com/sorear/niecza/commit/5d8b10e2d995e3df528ad4a9467de5b64aea03d2
10:53 sorear I dropped my keyboard and suddenly a wall of text!
10:53 * masak .oO( sorear writes code by dropping his keyboard? wow )
10:56 Casan use Drop::Keyboard::Random::Snippet::ActionListener;
10:56 briang joined #perl6
10:57 briang left #perl6
10:57 Casan btw.. concurrency/threads is needed before we can implement apps with EventListeners and such, n'est pas?
10:58 mathw depends how you do it
11:00 Casan so is there another way, when you want them running in the background without locking the process? using fork perhaps?
11:01 ingy This P6 Grammar http://fwd4.me/Iq2 is the same as this Pegex Grammar http://fwd4.me/Iq4 which compiles to this simple data structure http://fwd4.me/Iq5 which compiles further into this CPAN module: http://fwd4.me/IqN \o/
11:02 ingy masak: yeah, I want to write a pegex/p6rules yaml grammar with you
11:03 sorear Casan: Where is EventListener specced?
11:03 sorear I'm pretty sure niecza can handle threads now, I just don't have a sane API for them
11:03 Casan sorear: you got me. I'm not talking from spec. ok, not in spec, no need to ask.
11:03 sorear Maybe I'll invent one.
11:04 Casan niecza?
11:04 ingy sorear: can niecza do regular expressions?
11:04 sorear ingy: yes
11:04 ingy Casan: yap6
11:04 ingy sorear: so I could port pegex to it!
11:05 ingy w00t
11:05 Casan yep know its for CLR.. better just read up on some of sorear's blog posts.
11:05 sorear ingy: it's using p6regex, though
11:05 sorear ingy: unless you mean doing stuff at a much lower level
11:05 sorear Casan: It would help if I had a blog.
11:05 Casan I found the code on github.. I'll imagine from there what you've been thinking ;)
11:06 ingy sorear: I thought "regular expression" meant // not <>
11:06 ingy doesn't s05 say something like that?
11:07 sorear /ab*c/ and token foo { <bar> <baz> } are just degenerate cases of the same underlying syntax
11:07 sorear you can write /a<bar>*c/ if you want
11:07 snearch joined #perl6
11:08 ingy sorear: can you do /(?:a|b)/ ?
11:08 sorear no.  that's p5 syntax
11:08 ingy and pcre
11:09 sorear the p6 way to write that is /[a||b]/, which I'll support in not too long
11:09 ingy sorear: can niecza do 0ld skøøl regular expressions?
11:10 sorear m:P5/(?:a|b)/ is not yet supported, no
11:10 ingy anyway, pegex currently relies on the shared regex syntax of all the real world programming languages
11:11 * sorear out.
11:11 ingy but it's all a smop
11:11 ingy night sorear
11:15 bbkr can http://rt.perl.org/rt3/Ticket/Display.html?id=62528 be merged into http://rt.perl.org/rt3/Ticket/Display.html?id=77146 ? they both refer to what Match.keys should return
11:16 hanekomu_ joined #perl6
11:17 proller joined #perl6
11:18 Mowah joined #perl6
11:19 ingy how do I "unset" an object property?
11:20 ingy star: class C { has p is rw }; use YAML; my $o = C.new; say dump($o);
11:20 p6eval star 2010.07: OUTPUT«===SORRY!===␤Malformed has at line 22, near "p is rw };"␤»
11:21 ingy star: class C { has $p is rw }; use YAML; my $o = C.new; say dump($o);
11:21 p6eval star 2010.07: OUTPUT«--- !C␤p: ~␤...␤␤»
11:21 tadzik ingy: you mean something like $obj = Nil; ?
11:21 ingy tadzik: that'll work
11:21 ingy star: class C { has $p is rw }; use YAML; my $o = C.new; $o.p = "hi"; say dump($o);
11:21 p6eval star 2010.07: OUTPUT«Method 'p' not found for invocant of class 'C'␤  in main program body at line 22:/tmp/HS2NjbryP4␤»
11:22 tadzik I see many people trying $obj = undef, mainly in old code (oh wow, old Perl 6 code)
11:22 ingy star: class C { has $p is rw }; use YAML; my $o = C.new; $o.$p = "hi"; say dump($o);
11:22 p6eval star 2010.07: OUTPUT«===SORRY!===␤Symbol '$p' not predeclared in <anonymous> (/tmp/X2CusFTrn2:22)␤»
11:22 tadzik ingy: $.p
11:22 ingy star: class C { has $p is rw }; use YAML; my $o = C.new; $.p = "hi"; say dump($o);
11:22 p6eval star 2010.07: OUTPUT«Lexical 'self' not found␤  in main program body at line 22:/tmp/SV0Izp2Are␤»
11:22 ingy ?
11:22 ingy star: class C { has $.p is rw }; use YAML; my $o = C.new; $o.p = "hi"; say dump($o);
11:22 p6eval star 2010.07: OUTPUT«--- !C␤p: hi␤...␤␤»
11:23 ingy star: class C { has $.p is rw }; use YAML; my $o = C.new; $o.p = "hi"; $o.p = undef; say dump($o);
11:23 p6eval star 2010.07: OUTPUT«===SORRY!===␤Unsupported use of undef as a value; in Perl 6 please use something more specific:␤      Mu (the "most undefined" type object),␤   an undefined type object such as Int,␤    Nil as an empty list,␤    *.notdef as a matcher or method,␤ Any:U as a type constraint␤
11:23 p6eval .. or fail() as a failur…
11:23 ingy star: class C { has $.p is rw }; use YAML; my $o = C.new; $o.p = "hi"; $o.p = Nil; say dump($o);
11:23 p6eval star 2010.07: OUTPUT«--- !C␤p: ~␤...␤␤»
11:23 ingy tadzik: thanks
11:24 tadzik ingy: you're welcome
11:24 Casan I was looking for undef as well, so in p6 it is Nil?
11:24 tadzik yep
11:24 Casan thnx
11:24 tadzik even warnings say so, iirc
11:24 tadzik hmm
11:24 tadzik or Mu
11:24 tadzik Nil is an empty list
11:26 masak saying that undef is Nil in Perl 6 is missing a bit of the story, I think.
11:26 masak rakudo: say undef
11:26 p6eval rakudo fcf4f3: OUTPUT«===SORRY!===␤Unsupported use of undef as a value; in Perl 6 please use something more specific:␤     Mu (the "most undefined" type object),␤   an undefined type object such as Int,␤    Nil as an empty list,␤    *.notdef as a matcher or method,␤ Any:U as a type constraint␤
11:26 p6eval .. or fail() as a failur…
11:27 masak furthermore, Nil is actually defined.
11:27 [1]Casan joined #perl6
11:27 masak rakudo: say Nil.defined
11:27 p6eval rakudo fcf4f3: OUTPUT«1␤»
11:29 szabgab can I loop over an array and make it easy to look at the previous and the next element as well or do I need to loop over the indexes for this?
11:35 szabgab for @x.slider -> $prev, $curremt, $next { }
11:36 colomon szabgab: I spent some time trying to figure that out a few months back, with no real elegant solution
11:37 szabgab for @x.threesome -> ...
11:37 colomon for @x.slider[0..(*-2)] Z @x.slider[1..(*-1)] Z @x.slider[2..*] -> $prev, $current, $next { }
11:38 gfldex for @x.slider -> $element {} # $element will be an element of that list, but you dont want that. You want to get hold of the iterator itself. for wont help you there.
11:38 colomon but that's hardly elegant, and last time I checked there were at least two reasons it wouldn't work in Rakudo.
11:39 colomon smart way to do it is probably to write a function
11:39 colomon something like
11:40 rgrau joined #perl6
11:41 szabgab yah, Z currently works with two arrays
11:41 szabgab not with 3
11:42 ingy anyone know how to call a method name that's it a variable. Like p5 $self->$method()
11:42 colomon star: sub past-current-next(@a) { my $two-back = @a.shift; my $one-back = @a.shift; gather { for @a -> $current { take ($two-back); take ($one-back); take ($current); $two-back = $one-back; $one-back = $current; }; }; }; say (past-current-next(1..10).perl
11:42 p6eval star 2010.07: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 22␤»
11:42 colomon star: sub past-current-next(@a) { my $two-back = @a.shift; my $one-back = @a.shift; gather { for @a -> $current { take ($two-back); take ($one-back); take ($current); $two-back = $one-back; $one-back = $current; }; }; }; say (past-current-next(1..10)).perl
11:42 p6eval star 2010.07: OUTPUT«Method 'shift' not found for invocant of class 'Range'␤  in 'past-current-next' at line 22:/tmp/ABrzHhv79i␤  in main program body at line 22:/tmp/ABrzHhv79i␤»
11:43 colomon star: sub past-current-next(@a) { my $a = @a.list; my $two-back = $a.shift; my $one-back = $a.shift; gather { for $a -> $current { take ($two-back); take ($one-back); take ($current); $two-back = $one-back; $one-back = $current; }; }; }; say (past-current-next(1..10)).perl
11:43 p6eval star 2010.07: OUTPUT«(1, 2, (3, 4, 5, 6, 7, 8, 9, 10))␤»
11:43 colomon star: sub past-current-next(@a) { my $a = @a.list; my $two-back = $a.shift; my $one-back = $a.shift; gather { while my $current = $a.shift { take ($two-back); take ($one-back); take ($current); $two-back = $one-back; $one-back = $current; }; }; }; say (past-current-next(1..10)).perl
11:43 p6eval star 2010.07: OUTPUT«(1, 2, 3, 2, 3, 4, 3, 4, 5, 4, 5, 6, 5, 6, 7, 6, 7, 8, 7, 8, 9, 8, 9, 10)␤»
11:44 ingy star: Class C { method x() { say "xxxx" } }; my $o = C.new; $o.x()
11:44 p6eval star 2010.07: OUTPUT«Useless declaration of has-scoped Method in a module; add our or my to install it in the lexpad or namespace␤Could not find sub &C␤  in main program body at line 22:/tmp/muocW53VD7␤»
11:44 colomon star: class C { method x() { say "xxxx" } }; my $o = C.new; $o.x()
11:44 p6eval star 2010.07: OUTPUT«xxxx␤»
11:46 ingy star: class C { method x() { say "xxxx" } }; my $o = C.new; my $method = 'x'; $o.$method()
11:46 p6eval star 2010.07: OUTPUT«invoke() not implemented in class 'Perl6Str'␤  in main program body at line 22:/tmp/U6JEmt_pLE␤»
11:46 colomon star: class C { method x() { say "xxxx" } }; my $o = C.new; my $method = 'x'; $o."$method"()
11:46 p6eval star 2010.07: OUTPUT«xxxx␤»
11:46 colomon don't know if that's the best approach, though
11:46 * ingy kisses colomon
11:46 ingy I don't care
11:47 ingy I just need tests to pass so I can sleep
11:48 masak been there, done that.
11:49 wayland76 joined #perl6
11:49 jnthn .oO( Insomnia Driven Development )
11:51 ingy star: class C { method x($foo) { say $foo } }; my $o = C.new; my $method = 'x'; $o."$method"("che")
11:51 p6eval star 2010.07: OUTPUT«che␤»
11:52 ingy did star change since THE BIG RELEASE?
11:52 Synn joined #perl6
11:52 tadzik I don't think so
11:53 moritz_ no; I downloaded the release tarball, built in once, and left it alone ever since (on p6eval's server)
11:53 masonkramer joined #perl6
11:53 ingy colomon: what's this: Non-declarative sigil is missing its name at line 38, near "$.\"$method"
11:53 ingy hmm
11:54 colomon ingy: no idea.
11:54 ingy I see
11:54 colomon you do need to include the () after the call if you use "$method"
11:54 ingy $."xxx" no worky
11:54 moritz_ try self."$method" instead of $."$method"
11:54 ingy self. yeah...
11:55 colomon can you post the line in question
11:55 colomon ?
11:55 ingy moritz_++ # correct
11:55 colomon moritz_++
11:55 ingy already tried :)
11:56 masak std: my $method = "foo"; class A { method foo { $."$method" } }
11:56 p6eval std 31912: OUTPUT«[31m===[0mSORRY![31m===[0m␤Bogus statement at /tmp/P6fKGBTqVg line 1:␤------> [32m$method = "foo"; class A { method foo { [33m⏏[31m$."$method" } }[0m␤Parse failed␤FAILED 00:01 116m␤»
11:56 masak ingy: you expected $."$method" to work. I've never seen it spec'd or implied.
11:57 masak ingy: I'm not sure whether it's a brilliant generalisation or just insane. :)
11:57 bbkr rakudo: my $a = 2;$a := $a; say $a
11:57 p6eval rakudo fcf4f3:  ( no output )
11:57 masak seems to me self."$method" is an appropriate punishment for now :)
11:58 masak yapsi: my $a = 2; $a := $a; say $a
11:58 p6eval yapsi: OUTPUT«2␤»
11:58 masak \o/
11:58 colomon \o/
11:58 masak I'll keep doing that until someone fixes Rakudo. :P
11:58 rcfox rakudo: my @x = 1..4; for @x.rotate(-1) Z @x -> $a,$b { say "$a $b"; }
11:58 p6eval rakudo fcf4f3: OUTPUT«4 1␤1 2␤2 3␤3 4␤»
11:59 rcfox Is Z supposed to work with more than two things?
11:59 moritz_ yes
11:59 moritz_ and it's a known limitation that it doesn't
11:59 rcfox Ah.
11:59 masak ditto X.
12:00 rcfox rakudo: my @x = 1..4; for @x.rotate(-1) Z @x Z @x.rotate(1) -> $a,$b,$c { say "$a $b $c"; }
12:00 p6eval rakudo fcf4f3: OUTPUT«No applicable candidates found to dispatch to for 'infix:<Z>'. Available candidates are:␤:()␤:(Any $lhs, Any $rhs)␤␤  in main program body at line 22:/tmp/SdpsIL_yQF␤»
12:00 TiMBuS what makes $.foo different to self.foo ?
12:00 rcfox Otherwise, szabgab could do this ^
12:00 moritz_ TiMBuS: different syntax, and $ implies item context
12:01 Sarten-X joined #perl6
12:01 TiMBuS i just thought it was short for 'self', i don't think i've read about it in the spec
12:03 rcfox "$.foo(1,2,3);       # calls self.foo under $ context"
12:03 rcfox http://perlcabal.org/syn/S12.html#Attributes
12:05 TiMBuS ooh ok.
12:06 * bbkr thinks that tickets in RT should have some status indicating that issue is resolved but tests are missing
12:07 rcfox rakudo: class c { method foo {say "hi";}; method bar {$.foo;}}; my $a = c.new; $a.bar;
12:07 p6eval rakudo fcf4f3: OUTPUT«hi␤»
12:09 masak moritz_: does it make sense to put 'our multi pack' in src/code/Buf.pm ?
12:09 moritz_ masak: yes
12:09 envi^home joined #perl6
12:09 * masak makes it so
12:10 bbkr rakudo: say "/j #test" # just curious :)))
12:10 p6eval rakudo fcf4f3: OUTPUT«/j #test␤»
12:11 TimToady joined #perl6
12:11 [Coke] bbkr: that is "assigned to moritz"
12:11 masak std: role Parametric[::T] {}; constant PStr := Parametric[Str];
12:11 p6eval std 31912: OUTPUT«[31m===[0mSORRY![31m===[0m␤Malformed constant at /tmp/hcUEVrymJ0 line 1:␤------> [32mrole Parametric[::T] {}; constant PStr :[33m⏏[31m= Parametric[Str];[0m␤    expecting any of:␤     coloncircumfix␤   signature␤Parse failed␤FAILED 00:01 114m␤»
12:11 [Coke] bbkr: not the most intuitive status, I admit.
12:11 arnsholt joined #perl6
12:12 bbkr [Coke]: indeed :)
12:12 bbkr rakudo: say "abc\b\bz"
12:12 p6eval rakudo fcf4f3: OUTPUT«abcz␤»
12:12 takadonet morning all
12:13 stepnem joined #perl6
12:13 masak takadonet: \o
12:13 takadonet masak: how are u sir?
12:13 masak takadonet: busy but in a good way. :)
12:13 masak takadonet: and u?
12:14 takadonet masak: busy in both good and bad ways
12:16 bbkr rakudo: $0
12:17 p6eval rakudo fcf4f3:  ( no output )
12:19 moritz_ rakudo: say $0.perl # /me expects Any
12:19 p6eval rakudo fcf4f3: OUTPUT«Any␤»
12:19 moritz_ my oracle works :-)
12:19 bbkr where to put tests for http://rt.perl.org/rt3/Ticket/Display.html?id=72956 ? t/spec/S05-match/capturing-contexts.t ?
12:20 gfldex szabgab: http://gist.github.com/518895
12:20 ingy star: say index 'Cat in hat', 'hat'
12:20 p6eval star 2010.07: OUTPUT«7␤»
12:20 ingy star: say index 'Cat in hat', 'hatx'
12:20 p6eval star 2010.07:  ( no output )
12:20 ingy huh?
12:20 gfldex gfldex: as soon as $it <== @list works, that shift magic wont be needed anymore
12:20 gfldex szabgab: as soon as $it <== @list works, that shift magic wont  be needed anymore
12:21 ingy star: say 'Cat in hat'.index('hatx')
12:21 p6eval star 2010.07:  ( no output )
12:21 ingy star: say 'Cat in hat'.index('hat')
12:21 p6eval star 2010.07: OUTPUT«7␤»
12:21 szabgab gfldex: reading
12:21 frettled star: say index 'Cat in hat', 'fnorblegnark'
12:21 p6eval star 2010.07:  ( no output )
12:21 masak frettled: :)
12:21 moritz_ bbkr: S05-match/capturing-contexts.t works for me
12:21 ingy star: say Mu
12:22 p6eval star 2010.07: OUTPUT«Mu()␤»
12:22 frettled masak \o/
12:22 masak it shouldn't output nothing in those situations.
12:22 ingy star: if not 'Cat in hat'.index('hatx') { say "ok" }
12:22 p6eval star 2010.07: OUTPUT«ok␤»
12:22 masak but p6eval is known to be a bit of a sissy.
12:23 bbkr moritz_: thanks
12:23 masak ingy: use 'not defined', please.
12:23 szabgab gfldex: nice
12:23 masak ingy: just 'not' will give false positives for matches on position 0.
12:23 gfldex szabgab: that "last if !$current;" is ... dangerouse, but without proper iterators we can't really solve that right now
12:23 ingy masak: sure, but that wasn't my concern
12:23 masak perhaps it should be :)
12:23 szabgab last if !@foo.elems
12:24 ingy masak: it's not a production eval :P
12:24 masak er. but people might read your code for idioms, etc...
12:24 masak besides, why would you want to write suboptimal code just to save one word?
12:25 moritz_ straw poll: should string-eval catch expressions? [ ] yes  [ ] no  [ ] huh?  [ ] don't care
12:25 masak 'catch expressions'?
12:25 masak what kind of expressions?
12:25 moritz_ s/expression/exceptions/
12:25 * moritz_ should wake up
12:25 masak oh. :)
12:26 drbean joined #perl6
12:26 moritz_ straw poll: should string-eval catch exceptions? [ ] yes  [ ] no  [ ] huh?  [ ] don't care
12:26 moritz_ now with sense :-)
12:26 masak moritz_: and you're excepting "die"-type exceptions, right? those are a no-brainer.
12:26 moritz_ masak: any kind of run-time or compile-time error
12:27 colomon szabgab: last if ?@foo
12:27 colomon better than !@foo.elems
12:27 masak moritz_: [X] yes
12:27 moritz_ you can leave out the ? entirely
12:27 dolmen rakudo: my @a = 1, 2, 3; say (@a-1)
12:27 p6eval rakudo fcf4f3: OUTPUT«2␤»
12:27 * moritz_ notes a "yes" vote
12:27 szabgab colomon: what is ? ?
12:27 moritz_ boolean context
12:27 colomon what moritz_ said
12:27 masak moritz_: [X] yes # trying to game the system :)
12:28 colomon and if you use it on an @array, it returns True if there are elements left, without counting them.
12:28 szabgab then ?@foo is not good
12:28 * moritz_ notes -1 "yes" votes
12:28 szabgab maybe !?foo ?
12:28 masak moritz_: :P
12:28 colomon last unless ?@foo
12:28 rgrau joined #perl6
12:28 colomon (sorry)
12:28 szabgab I hate unless
12:28 szabgab I always have to DeMorgan it
12:29 moritz_ last if !@foo
12:29 mysterious_stran joined #perl6
12:29 mysterious_stran moritz_: [X] yes
12:29 colomon moritz_++ again
12:29 * moritz_ records 0.01 'yes' votes :-)
12:30 * masak notes that freenode's webchat has an upper nick length limit
12:30 frettled masak: is it different from that of IRC?
12:30 masak frettled: there's one for IRC?
12:30 moritz_ anybody else want to vote?
12:30 frettled masak: yes.
12:30 tadzik [X] huh?
12:30 ingy star: say Bool::Tru
12:30 p6eval star 2010.07: OUTPUT«Can not find sub Bool::Tru␤  in main program body at line 1␤»
12:30 ingy star: say Bool::True
12:30 p6eval star 2010.07: OUTPUT«1␤»
12:31 pugssvn r31951 | bbkr++ | [t/spec] tests for # RT #72956 $0 when $/ is undefined causes Rakudo to give an error
12:31 tadzik moritz_: You mean if 'eval "foobar()"; given $! { bla bla }' should work?
12:31 frettled masak: originally 9 characters, but extended to 16 or something like that in recent years.
12:31 frettled masak: well, originally nicks didn't exist, only numbers, but that's long ago.
12:31 masak wow. numbers.
12:32 moritz_ tadzik: I think that eval "foobar()" should throw an excpetion if foobar() throws one
12:32 moritz_ and I want to know if people generally agree
12:33 dolmen rakudo: my @a = 0..8; for map { (@a[$_-1], @a[$_], @a[$_+1]) }, 1..(@a-1) -> $prv, $cur, $nxt { ($prv, $cur, $nxt).perl.say }
12:33 p6eval rakudo fcf4f3: OUTPUT«(0, 1, 2)␤(1, 2, 3)␤(2, 3, 4)␤(3, 4, 5)␤(4, 5, 6)␤(5, 6, 7)␤(6, 7, 8)␤(7, 8, Any)␤»
12:33 moritz_ currently eval '...' catches all exceptions, which seems like an old-perl anachronism
12:33 tadzik moritz_: so eval "foobar()" would no longer silence die() line in Perl 5?
12:33 masak moritz_: I'd say one thing in favour of that: it would make people abuse abuse &eval as a try { ... } less.
12:33 dolmen my @a = 0..8; for map { (@a[$_-1], @a[$_], @a[$_+1]) }, 1..(@a-2) -> $prv, $cur, $nxt { ($prv, $cur, $nxt).perl.say }
12:33 moritz_ tadzik: correct
12:34 dolmen rakudo: my @a = 0..8; for map { (@a[$_-1], @a[$_], @a[$_+1]) }, 1..(@a-2) -> $prv, $cur, $nxt { ($prv, $cur, $nxt).perl.say }
12:34 p6eval rakudo fcf4f3: OUTPUT«(0, 1, 2)␤(1, 2, 3)␤(2, 3, 4)␤(3, 4, 5)␤(4, 5, 6)␤(5, 6, 7)␤(6, 7, 8)␤»
12:34 tadzik moritz_: [X] don't care then
12:34 * moritz_ records another vote
12:34 gfldex gfldex.post('http://gfldex.wordpress.com/2010/08/11/an-iterator-that-knows-its-previous-and-next-value/');
12:34 dolmen szabgab: see above
12:34 masak moritz_: but I fear it'd make people write try { eval "..." } until they cursed the originator of that separation.
12:34 gfldex gfldex.blog++;
12:34 tadzik .oO( isn't that vote a no-op? )
12:34 masak tadzik: no, of course not :)
12:34 bbkr rakudo: class Boo { method new() { } }; say Boo.new.WHAT; # #72836
12:34 p6eval rakudo fcf4f3: OUTPUT«Parcel()␤»
12:35 tadzik *relief*
12:35 masak bbkr: I see no bug there.
12:35 frettled masak: My guess is that the current extended nick length limit came with UTF-8 support, first appearing around 2002 or so.
12:35 szabgab dolmen: looking but not understanding
12:35 bbkr masak: indeed, I was just reconfirming on current build before committing tests
12:36 masak bbkr: ah, I see now. keep up the good work. :)
12:36 moritz_ pmichaud++ fixed all the Null PMC accesses from empty statement lists
12:36 dolmen szabgab: you asked " can I loop over an array and make it easy to look at the previous and the next element as well or do I need to loop over the indexes for this?"
12:36 frettled masak: Ah, Freenode's limit is 16 chars.
12:36 szabgab gfldex: you can fix the !$current
12:37 szabgab by replaceing it by !@foo as we discussed
12:37 ingy star say '' ?? 'x' !! 'y'
12:37 szabgab dolmen: I am not yet understanding how does it do it :)
12:37 ingy star: say '' ?? 'x' !! 'y'
12:37 p6eval star 2010.07: OUTPUT«y␤»
12:37 dolmen szabgab: ah, ok
12:38 dolmen szabgab: 1..(@a-2) is all the indexes except the first one and the last one
12:38 ingy moritz_: who maintains Test.pm?
12:38 moritz_ ingy: the Rakudo developers
12:38 ingy I found a small bug
12:38 ingy :P
12:39 tadzik it's hiding under the bed
12:39 moritz_ ingy: mailto:rakudobug@perl.org
12:39 * tadzik looks for a shoe
12:39 moritz_ ingy: of course you're welcome to discuss it here too
12:39 ingy star: use Test; ok('foo')
12:39 p6eval star 2010.07: OUTPUT«ok 1 - ␤»
12:39 dolmen szabgab: the map extracts the 3 values (prev, current, next) from the array for each index
12:39 szabgab dolmen: oh yes a map and a for
12:40 ingy with no label parameter, ok(1) should output "ok 1\n"
12:40 ingy not "ok 1 - \n"
12:40 moritz_ does the TAP spec say that?
12:40 ingy that's p5 output
12:40 moritz_ does the TAP spec say that?
12:40 masak :)
12:41 tadzik that's shotgun debugging
12:41 gfldex szabgab: that doesn't work because you skip the last iteration
12:41 masak fwiw, regardless of what it says, I think ingy's suggestion looks nicer.
12:41 tadzik .oO( I added a labels to avoid this ugly 'ok x - ' a few times)
12:41 oha joined #perl6
12:41 ingy moritz_: we recently made changes to p6 Test.pm to exactly replicate p5 output
12:41 moritz_ agreed. But it's only a bug if the TAP specs requires it be Ok 1\n
12:41 ingy ok, screw it
12:42 ingy I really don't care
12:42 ingy I just noticed in my tests
12:42 tadzik maybe this is to encourage writing labels
12:42 moritz_ it's probably more in the spirit to keep Test.pm simple
12:42 ingy tadzik: no, it's a poor port
12:43 moritz_ we currently route all tests through proclaim()
12:43 tadzik well, it won't bring much complication to Test.pm imho
12:43 moritz_ I won't reject patches for it :-)
12:43 tadzik but not sure I must say
12:43 ingy I'll fix it later
12:44 ingy with meh new comitz bitz
12:44 Casan tadzik: following the conversation before about 'resetting' object data, I was wondering, would Nil also help to undeclare a declared object and thus render it into nothing, and freeing up the memory, or is this over in the DESTROY department?
12:45 szabgab gfldex: so make it :     last if !@foo and !$current;
12:45 szabgab that fails only if the last element is Any(), I think
12:46 TiMBuS why is my font so huge on the rt? :/
12:47 moritz_ TiMBuS: because you pressed Ctrl +?
12:47 TiMBuS it looks like i am yelling
12:47 moritz_ or ctrl + mousewheel
12:47 gfldex rakudo: sub foo(){ return (1,2,undef) }; say foo();
12:47 p6eval rakudo fcf4f3: OUTPUT«===SORRY!===␤Unsupported use of undef as a value; in Perl 6 please use something more specific:␤     Mu (the "most undefined" type object),␤   an undefined type object such as Int,␤    Nil as an empty list,␤    *.notdef as a matcher or method,␤ Any:U as a type constraint␤
12:47 p6eval .. or fail() as a failur…
12:47 moritz_ rakudo++
12:47 TiMBuS no moritz_, just my replies
12:47 gfldex how do i return a list that contains an undefined value?
12:48 moritz_ just return an undefined value
12:48 moritz_ like Int
12:48 moritz_ or Any
12:48 TiMBuS http://rt.perl.org/rt3/Ticket/Display.html?id=77038 for example,
12:49 dolmen rakudo: say (,).perl
12:49 p6eval rakudo fcf4f3: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 22␤»
12:49 moritz_ TiMBuS: looks only a bit above average to me
12:51 takadonet what server is #perl5 on?
12:52 TiMBuS is there a font tag or something im misusing?
12:52 tadzik Casan: ask ingy, he wanted that
12:52 moritz_ takadonet: there's a #perl on both freenode and irc.perl.org
12:52 gfldex szabgab: updated: http://gist.github.com/518895
12:52 takadonet moritz_: thanks
12:52 pugssvn r31952 | bbkr++ | [t/spec] tests for # RT #72836 Null PMC access when using value from empty routine
12:52 dolmen masak: is ufo yet another ExtUtils::MakeMaker ?
12:53 masak dolmen: I don't know, because I don't know that module.
12:53 dolmen masak: with the same reliance on 'make'?
12:53 tadzik dolmen: ufo creates Makefile
12:53 masak dolmen: but it's strictly for developers, not for users of the module.
12:53 tadzik which can build, test and install the module
12:56 dolmen masak: http://schwern.dreamhosters.com/talks/MakeMaker_Is_DOOMED/slide005.html
12:58 masak dolmen: understood.
12:58 ingy ALL TESTS PASS! \o/ and zzzzzzzzzzzzzzzzzz
12:58 masak dolmen: and I actually buy that premise.
12:58 tadzik then I guess we should remove ufo from module installed to be fashionable
12:58 tadzik * installers
12:58 pugssvn r31953 | moritz++ | [t/spec] correct and re-fudge ignorecase.t for rakudo
12:58 moritz_ tadzik: I don't think so
12:58 masak dolmen: please write an all-Perl6 tool that does what ufo does, and I'll happily refer to it.
12:59 dolmen :)
12:59 moritz_ tadzik: it's the best we have for now
12:59 tadzik moritz_: me neither :)
12:59 tadzik it's just my comment
12:59 tadzik masak: can ufo install bin/?
13:00 masak tadzik: don't think so.
13:00 tadzik masak: actually, that was an encouragement to think about implementing this :)
13:00 masak tadzik: excellent idea. I accept patches 24/7.
13:00 tadzik as long as module installers use ufo as a backend
13:00 tadzik masak: sure thing, I can't promise anything though
13:00 oha hello!
13:01 masak right. that's how it works :)
13:01 tadzik :)
13:01 masak o hai oha!
13:01 tadzik oha: o/
13:01 oha masak, any news on Buf?
13:01 masak oha: yes, I have a &pack function running locally now.
13:02 masak dolmen: I want to reiterate that ufo is not meant to build/install things on the user side of things. so it's not an analogue to MakeMaker.
13:02 oha masak++
13:02 bbkr std: my $a = "oh hai"; say $a .= "uc"()
13:02 p6eval std 31912: OUTPUT«Potential difficulties:␤  Useless use of quotes at /tmp/T6fz4pm_PO 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/T6fz4pm_PO line 1:␤------> [32mmy $a = "oh hai"; say $a
13:02 p6eval ...=[33m⏏[3…
13:03 bbkr rakudo: my $a = "oh hai"; say $a .= "uc"()
13:03 p6eval rakudo fcf4f3: OUTPUT«OH HAI␤»
13:03 masak oha: I have H* so far. any directives in particular I should focus on for you?
13:03 oha masak, H* ?
13:03 masak oha: in the template string.
13:04 masak oha: H* is "as many hex digits as you have into bytes"
13:04 masak (most significant digit first)
13:04 moritz_ S05 says that :c/:continue defaults to $/.to
13:04 moritz_ at what level does this default apply? action methods?
13:04 oha masak, i must see it to say. have you seen the Buf_hack.pm i've sent you?
13:04 masak moritz_: not sure I understand the question.
13:05 dolmen rakudo: say :(Int).perl
13:05 p6eval rakudo fcf4f3: OUTPUT«:(Int )␤»
13:05 masak oha: yes, but I think I must look at it again.
13:05 dolmen rakudo: say :(Array of Int).perl
13:05 p6eval rakudo fcf4f3: OUTPUT«Method '!select' not found for invocant of class ''␤  in main program body at line 22:/tmp/xd_KNx9eAa␤»
13:05 masak dolmen: new bug?
13:05 moritz_ masak: right now :c produces the same as c => True
13:05 moritz_ masak: and not c => $/.to
13:05 masak moritz_: nod
13:05 moritz_ so, there must be some magic
13:05 masak right.
13:05 moritz_ where does this magic happen?
13:05 dolmen masak: don't know. Just experimenting with Signatures
13:06 masak moritz_: oh!
13:06 * masak submits rakudobug
13:06 moritz_ waitwaitwait
13:06 masak (the Array of Int one)
13:06 moritz_ ok
13:06 moritz_ I thought you meant :c :-)
13:06 masak many people talking at once :)
13:07 dolmen rakudo: my Array of Int @a = 1, 2, 3;
13:07 p6eval rakudo fcf4f3: OUTPUT«Method '!select' not found for invocant of class ''␤  in main program body at line 22:/tmp/OgwZuMC6ng␤»
13:07 dolmen rakudo: my Array Int @a = 1, 2, 3;
13:07 p6eval rakudo fcf4f3: OUTPUT«===SORRY!===␤In "my" declaration, typename Array must be predeclared (or marked as declarative with :: prefix) at line 22, near " Int @a = "␤»
13:07 dolmen rakudo: my Int @a = 1, 2, 3;
13:07 p6eval rakudo fcf4f3:  ( no output )
13:07 pugssvn r31954 | moritz++ | [t/spec] correct continue.t
13:08 dolmen masak: is "of" a keyword?
13:08 moritz_ dolmen: it's a trait
13:08 moritz_ afaict
13:10 dolmen rakudo: my Array Int $a = 1, 2, 3;
13:10 bbkr rakudo: say try { die }
13:10 p6eval rakudo fcf4f3: OUTPUT«===SORRY!===␤In "my" declaration, typename Array must be predeclared (or marked as declarative with :: prefix) at line 22, near " Int $a = "␤»
13:10 p6eval rakudo fcf4f3: OUTPUT«Null PMC access in type()␤  in main program body at line 22:/tmp/9blziL7Eek␤»
13:11 tadzik rakudo: say ((5i - 5) * (5i + 5)).perl
13:11 p6eval rakudo fcf4f3: OUTPUT«Complex.new(-50, 0)␤»
13:11 tadzik Couldn't it end up as Int?
13:12 dolmen std: my Array of Int @a = 1, 2, 3;
13:12 p6eval std 31912: OUTPUT«ok 00:01 116m␤»
13:12 dolmen std: say :(Array of Int).perl
13:12 p6eval std 31912: OUTPUT«ok 00:02 115m␤»
13:13 moritz_ rakudo: say 'foo'.samecase('HE')
13:13 p6eval rakudo fcf4f3: OUTPUT«FOO␤»
13:13 tadzik oh
13:13 tadzik rakudo: say 'foobar'.samecase('AaAaAaAa')
13:13 p6eval rakudo fcf4f3: OUTPUT«FoObAr␤»
13:13 tadzik rakudo: say 'foobar'.samecase('Aa')
13:13 p6eval rakudo fcf4f3: OUTPUT«Foobar␤»
13:14 dolmen rakudo: sub x(Array of Int $x) { $x }
13:14 p6eval rakudo fcf4f3:  ( no output )
13:15 dolmen looks like signatures are not completely parsed outside sub declarations
13:16 xuser left #perl6
13:18 tadzik pugs/docs/talk is open for talks in any language?
13:18 tadzik (talks)
13:18 moritz_ yes
13:19 tadzik mind me pushing "What's going on in Perl 6" in Polish and Catalan version?
13:19 moritz_ feel free
13:19 oha i was thinking on some enanchement on Buf
13:21 oha i was writing a Gearman::Client module here
13:21 masak tadzik: I'd love to read that. yes, please push them.
13:21 oha and after arranging IO::Socket::INET and adding some methods on Buf i was able to make it work
13:21 masak oha has been helping me in my thinking around Buf and pack in the last few days.
13:21 masak oha++
13:21 oha ty masak
13:21 oha here is my idea
13:21 tadzik masak: sure thing
13:21 oha Buf may be considered a FIFO
13:22 oha so i could, for example: $buf = $sock.recv(12); # get 12 bytes
13:23 oha then my $type = $buf.poll(network-int);
13:23 oha or when i must write:
13:23 Holy_Cow joined #perl6
13:23 oha $buf.append($int); $sock.send($buf);
13:23 moritz_ rakudo: say "abc def" ~~ m:s/abc  def/
13:24 oha the append/poll/peek could be simple methods like: .pollNetworkInt();
13:24 p6eval rakudo fcf4f3: OUTPUT«abc def␤»
13:24 moritz_ rakudo: say "abc\ndef" ~~ m:s/abc  def/
13:24 p6eval rakudo fcf4f3: OUTPUT«abc␤def␤»
13:24 ruoso joined #perl6
13:24 oha or using a pack-like grammar
13:24 masak I believe that oha's suggestions about FIFO Buf might make a cute module.
13:24 masak the pack-like grammar would make another one.
13:24 masak one that I'd really really like to use :)
13:24 oha my ($i0, $i1, $s0) = $buff.poll("IIS");
13:25 oha or using a grammar
13:25 oha $buff.poll("<nint>**2 <nullstring(ascii)>"
13:26 dalek rakudo: a9912e1 | moritz++ | src/Perl6/Actions.pm:
13:26 dalek rakudo: bind $/ in m// calls, by advise from pmichaud++
13:26 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/a9912e13274de8c1f98fe1120e8707eff5ade205
13:26 dalek rakudo: 656170d | moritz++ | src/Perl6/Actions.pm:
13:26 dalek rakudo: disable non-working modifiders on m// for now
13:26 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/656170d3727b0ac51cb3eeb0fb699d751388bbba
13:26 dalek rakudo: a389b27 | moritz++ | t/spectest.data:
13:26 dalek rakudo: run ignorecase.t and ii.t test files
13:26 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/a389b278de4cfba86852c889c1543ec32a36a4a8
13:27 oha that could also be implemented (for the unpack) using regex, just allowing them to "switch" encoding
13:28 bluescreen joined #perl6
13:28 masak afk
13:30 pugssvn r31955 | tadzik++ | Added "What's going on in Perl 6" talks, in Polish and Catalan version
13:30 tadzik masak: ↑
13:31 tadzik yay, it works
13:34 pugssvn r31956 | moritz++ | [t/spec] fudge ii.t for rakudo
13:35 pugssvn r31957 | moritz++ | [t/spec] fudge sigspace.t for rakudo
13:35 AndreasX joined #perl6
13:37 _ilbot2 joined #perl6
13:37 Topic for #perl6is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: http://irc.pugscode.org/ | UTF-8 is our friend! | Rakudo Star Released!
13:37 Guest23195 joined #perl6
13:40 bbkr rakudo: "abc".samecase(Failure).say # error message seems to be LTA, should I report?
13:40 p6eval rakudo fcf4f3: OUTPUT«Method 'comb' not found for invocant of class ''␤  in 'Cool::samecase' at line 2152:CORE.setting␤  in main program body at line 22:/tmp/uMCuvp7JIr␤»
13:40 moritz_ bbkr: no, I can fix that easily
13:41 bbkr moritz++
13:42 moritz_ I have a fix, spectesting it now
13:43 rgrau joined #perl6
13:45 dju joined #perl6
13:46 dju joined #perl6
13:47 tadzik http://pb.rbfh.de/654PCSnXqh1D # how do I read bytes from a file?
13:48 moritz_ have you tried open('file').read(16)?
13:49 tadzik yeah, I should have opened it first. That works, yep. moritz_
13:49 tadzik moritz_++
13:49 molaf joined #perl6
13:57 tom_tsuruhara joined #perl6
14:03 Guest53301 joined #perl6
14:08 rgrau joined #perl6
14:18 Axius joined #perl6
14:25 krunen joined #perl6
14:26 pmichaud good morning, #perl6
14:26 tadzik good $localtime pmichaud
14:26 moritz_ good morning pmichaud
14:26 moritz_ pmichaud: fancy another regex+modifiers discussion? :-)
14:27 pmichaud moritz_: sure
14:27 moritz_ pmichaud: S05 says that :continue and :pos default to $/.to
14:27 moritz_ pmichaud: where should the logic for those defaults go?
14:27 pmichaud I think nqp-rx already has it.
14:27 colomon pmichaud: o/
14:28 oha i've tried to summarize my ideas about Buf in a pod: http://register.oha.it/buf.pod
14:28 moritz_ pmichaud: and it knows which $/ to take?
14:28 oha pmichaud, hi
14:28 moritz_ and how do I trigger it?
14:28 moritz_ I mean, what value do I pass in so that it picks up the default?
14:28 pmichaud simply :pos or :continue as true values, I think.
14:29 moritz_ rakudo: 'abc' ~~ /./; say 'abc' ~~ m:continue/./
14:29 p6eval rakudo fcf4f3: OUTPUT«b␤»
14:29 moritz_ rakudo: 'abc' ~~ /../; say 'abc' ~~ m:continue/./
14:29 p6eval rakudo fcf4f3: OUTPUT«b␤»
14:30 pmichaud I think nqp only knows :c and :p at the moment.
14:30 moritz_ seems like it uses the 1 (which is the true value) as position
14:30 moritz_ rakudo: 'abc' ~~ /../; say 'abc' ~~ m:c/./
14:30 p6eval rakudo fcf4f3: OUTPUT«b␤»
14:30 pmichaud and you're correct, it's always using 1
14:30 pmichaud so that logic needs to be changed to check for true
14:30 moritz_ we do need to support :c($integer) though
14:31 pmichaud actually, for now it would probably be better to do :c(ontinue) in rakudo than nqp, then.
14:31 pmichaud so, the short answer is that :continue should translate into :c(Int)
14:31 moritz_ currently the easist approach would be to do it at the syntax level
14:31 pmichaud right
14:31 pmichaud that's fine
14:31 moritz_ ok
14:32 pmichaud I don't think nqp can be looking at $/, because there might not be one
14:32 alester joined #perl6
14:32 pmichaud so it needs to happen at the rakudo level (for now at least)
14:32 moritz_ I kinda feared you wouldn't think so, because it requires some special-casing
14:32 moritz_ rakudo: say 'abcdef' ~~ m:continue(3)/./
14:32 p6eval rakudo fcf4f3: OUTPUT«d␤»
14:32 moritz_ rakudo: say 'abcdef' ~~ m:c(3)/./
14:33 p6eval rakudo fcf4f3: OUTPUT«d␤»
14:33 moritz_ so far regex modifiers look pretty good in rakudo
14:33 pmichaud yes.
14:33 masak tadzik: thanks; will look.
14:34 tadzik masak: out of curiosity, do you happen to know any of those languages? :)
14:34 moritz_ the only thing that makes my head ache is a match returning more than one value
14:34 masak tadzik: not to any greater extent, no. but I expect to understand much of the Catalan one.
14:34 moritz_ rakudo: 'abc' ~~ /(.)+/; .say for $/.list
14:35 p6eval rakudo fcf4f3: OUTPUT«a␤b␤c␤»
14:35 tadzik still haven't caght alexm++ to ask how did the preseting go
14:35 moritz_ pmichaud: btw that's the Match bug I told you about at YAPC
14:35 * moritz_ reports
14:36 nadim_ joined #perl6
14:36 moritz_ rakudo: 'abc' ~~ /(.)+/; say $0
14:36 p6eval rakudo fcf4f3: OUTPUT«abc␤»
14:37 moritz_ rakudo: 'abc' ~~ /(.)+/; say ~$0
14:37 p6eval rakudo fcf4f3: OUTPUT«a b c␤»
14:37 pmichaud I don't see the bug.
14:37 moritz_ $0 is an array
14:37 moritz_ $/.list should return $0
14:38 pmichaud oh, it should be an itemized array
14:38 masak that's by spec.
14:38 pmichaud rakudo:  'abc' ~~ /(.)+/;  say $0.WHAT
14:38 p6eval rakudo fcf4f3: OUTPUT«Array()␤»
14:38 pmichaud right
14:38 moritz_ so only $0.flat should flatten it out
14:38 pmichaud okay, no problem.
14:39 pmichaud let me get my compile configuration up and running again
14:39 pmichaud travel and conferences and new tools tend to muck up my build environment :)
14:39 moritz_ git reset --hard origin/master # don't do that unless you know what you're doing :-)
14:40 pmichaud actually, I'll let you try the fix :)
14:40 pmichaud in src/builtins/Cursor.pir, change
14:41 pmichaud .sub 'new_array' :method $P0 = new ['Array'] .return ($P0)
14:41 pmichaud .end
14:41 pmichaud to
14:41 pmichaud .sub 'new_array' :method
14:41 pmichaud $P0 = get_hll_global 'Array'
14:41 pmichaud $P0 = $P0.'new'()
14:41 pmichaud $P0 = $P0.'item'()
14:41 pmichaud .return ($P0)
14:41 pmichaud .end
14:41 * moritz_ tries
14:42 pmichaud that brings new_array into creating "real" Rakudo Arrays
14:42 pmichaud afk for a bit, tutoring
14:42 dalek rakudo: 21b3c7c | moritz++ | t/spectest.data:
14:42 dalek rakudo: run another test file
14:42 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/21b3c7cf087bdb34db8457f8a58d4de3372d7a02
14:42 dalek rakudo: 43f00da | moritz++ | src/core/Cool-str.pm:
14:42 dalek rakudo: type-constraint samecase() pattern to Cool
14:42 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/43f00dac97dde51bc68040027bc1c0a5680a1d38
14:45 nadim_ Hi guys, I was looking in http://perlbuzz.com/2010/08/diving-into-perl-6.html and one thing caught my eye. Since typing is more prevalent in P6, I expected type inference to be an intrisic part of the interpreter. example:
14:45 nadim_ my Int @candidates; ...  push @candidates, $n.Int;
14:45 nadim_ later I read for @candidates -> Int $x { ...
14:45 tadzik is it possible to declare mkdir taking one obligatory and one optional parameter, without breaking original mkdir?
14:46 moritz_ rakudo: say &mkdir.signature.perl
14:46 p6eval rakudo fcf4f3: OUTPUT«get_attr_str() not implemented in class 'Perl6MultiSub'␤  in main program body at line 1␤»
14:46 moritz_ rakudo: say &mkdir.candidates[0].signature.perl
14:46 p6eval rakudo fcf4f3: OUTPUT«:(Any $path, Any $mode = { ... })␤»
14:46 nadim_ Extracting the .Int part and putting anything into 4x is "obviously" to be of Int type since @candidates is just that
14:46 moritz_ it's already defined like this
14:47 nadim_ that'ts auite a lot of code that need to be qwriten for something that can be infered. How does it work in reality?
14:48 pugssvn r31958 | patrickas++ | series with one scalar containing Code on the LHS
14:48 tadzik moritz_: so as long as I'm declaring multis taking something else than 2 obligaory parameters everything should be ok?
14:48 moritz_ nadim_: in rakudo, typed arrays suck. In Perl 6 too.
14:49 alester Why do they suck, moritz_ ?
14:49 alester Should I not have done it like that/
14:49 nadim_ alester: hi
14:49 alester nadim_: (That post on perlbuzz was mine)
14:49 squeeky pmichaud: ping
14:49 moritz_ tadzik: the existing multi has one mandatory and one optional parameter. If you do the same, you'll get conflicts
14:49 nadim_ I don't mind it being sucky in rakudo, I wonder what p6 intention is
14:50 tadzik oh, righ
14:50 moritz_ rakudo: sub f(Int @a) { say @a.perl }; f([1, 2, 3])
14:50 p6eval rakudo fcf4f3: OUTPUT«(timeout)»
14:50 patrickas joined #perl6
14:50 tadzik moritz_: but if it wouldn't be multi, it will just hide the original mkdir?
14:50 moritz_ rakudo: sub f(Int @a) { say @a.perl }; f([1, 2, 3]); say "alive"
14:50 patrickas moritz_: sure I want to!
14:50 phenny patrickas: 08:55Z <moritz_> tell patrickas if you want to hack a bit more on MAIN, you could try to implement short options, ie :foo(:$f) in a signature allows both --foo and -f options. $param.named_names should give you a list of all alias names
14:50 p6eval rakudo fcf4f3: OUTPUT«Nominal type check failed for parameter '@a'; expected Positional[Int] but got Array instead␤  in 'f' at line 22:/tmp/HeTHuGZ42T␤  in main program body at line 22:/tmp/HeTHuGZ42T␤»
14:50 moritz_ tadzik: right
14:50 alester How do you mean "sucky"?
14:50 jaldhar joined #perl6
14:50 moritz_ alester: that's what I mean
14:50 alester It seems to me that "my Int @candidates" would be swell.
14:51 spq1 joined #perl6
14:51 nadim_ alester: moritz_ said it sucked
14:51 alester Right, I don't get what is sucky.  I'm missing something.
14:51 patrickas does anyone object to this patch to rakudo ? :-)  http://github.com/patrickas/rakudo/commit/1f0903acc286a4b5b342a54e7d26019e538b57c0
14:51 moritz_ alester: if you declare something as Int @a, you also have to declare things that are bound or assigned to it as Array[Int]
14:52 alester What's wrong with that?
14:52 nadim_ alester: forget about the adjective it was meant for the p6 typed array not your code
14:52 moritz_ alester: it's just not convenient
14:52 alester nadim_: No, I understand, i wasn't insulted. :-)
14:52 TiMBuS joined #perl6
14:52 moritz_ and it surprises people
14:52 nadim_ alester: I knew you wouldn't
14:52 alester Meaning you can't say "my @b = @a" without making @b explicitly Int first?
14:52 moritz_ if you're fine with that, there's no problem (except implementation problems)
14:52 moritz_ alester: right
14:53 alester Yeah I would expect that @b would get the Intness for free.
14:53 nadim_ moritz_: it is more than surprising, it is a bit embarassing
14:53 moritz_ whereas  my Foo $x = $b; works if $b contains a Foo, it doesn't need to be declared as such
14:53 tadzik hmm, undef == Any()?
14:53 moritz_ Any is one of the many undefs
14:53 moritz_ nadim_: I did say it sucked, no? :-)
14:54 [Coke] (many undefs) definitely need an article on that.
14:54 nadim_ moritz_: is $x = $b supposed to transfer type information to $x so the right optimization can be applied?
14:55 moritz_ nadim_: you have to be a bit more precise
14:55 moritz_ nadim_: a value has type information, and a container can has type constraints
14:55 moritz_ $x = $b preserves the type information of the value, and leaves the type constraint of the container unchanged
14:57 nadim_ declaring something to be of a certain type is for a certain purpose (I don't mind which) is that purpose transfered to $x?
14:57 moritz_ the programming language knows nothinga about purpose. Only the programmer does.
14:58 nadim_ IE Int was used, I guess, to use real hardware ints, will the $x also use HW ints although it was not declared as Int?
14:59 risou joined #perl6
14:59 moritz_ Int is an bignum type
14:59 moritz_ there are lower-case int32, int63 "native" types, which have special rules
15:00 oha moritz_, are there implemented in rakudo?
15:00 colomon (Int is hardware int at the moment in Rakudo, of course.)
15:00 moritz_ oha: no
15:00 colomon oha: no
15:00 moritz_ colomon: so it fails at both ends (speed and auto-upgrading) :-)
15:00 colomon moritz_: yup
15:01 moritz_ otoh, my Int $x; can hold an undefined value, which a native type couldn't
15:01 nadim_ it doesn't matter what it is in reality. I am more interrested in the knowing if the optimization associated with a type is also assigned to an untyped scalar assigned from a typed scalar
15:01 moritz_ and mix-ins
15:01 colomon but you wouldn't say my int32 $x = 10 to get a hardware int, anyway.
15:01 moritz_ nadim_: for assignment, it's not. For binding, it is
15:02 moritz_ at least the type-check part
15:02 nadim_ any special reason why assignment doesn't?
15:02 moritz_ the optimization part always depends on how much can be statically known about the container at compile time
15:02 nadim_ I think I'm going to reread RFC 4 seriously
15:03 moritz_ nadim_: yes. We want my $x = 3; $x = 'foo'; to not throw an error
15:03 moritz_ if my $x = 3; type-check $x to Int, the subsequent assignment would fail
15:03 moritz_ s/check/checked/
15:03 nadim_ that has nothing to do with getting the optimisation to $x
15:03 moritz_ it has
15:04 nadim_ Sorry, it doesn't
15:04 moritz_ maybe not in your ideal world
15:04 moritz_ but in the real world of a compiler, it does
15:04 nadim_ while containing an Int, $x can profit of all optimisations
15:04 moritz_ if we know that at compile time, yes
15:04 moritz_ but that requires constant folding and control flow analysis
15:05 nadim_ right
15:05 moritz_ and is only doable in certain cases
15:05 nadim_ and also the optimization can (I am not saying it is fast, right, must) be done at run time too
15:05 moritz_ wheras it's much easier to always know the constraint type at compile time
15:05 szabgab masak: could you please take a look atmy html-template fork and integrate it if possible?
15:06 moritz_ nadim_: yes, but the run-time optimization is the job of the JIT compiler, not of the HLL compiler
15:06 masak szabgab: sure. possibly not today, though. I don't want to context-switch right now.
15:06 nadim_ moritz_: and I guess that ywould be implementation specific, not specified in p6
15:06 moritz_ nadim_: correct
15:07 masak moritz_: allow me to take exception to your 'typed arrays suck in Perl 6' statement. I think we're in a sort of sweet spot where we are right now.
15:07 moritz_ nadim_: in general the p6 spec allows lot of optimization, and requires little
15:08 nadim_ I'll be bold and say that it should be specified or the mistaked done by the C language are going to be repeated.
15:08 moritz_ what exactly should be specified?
15:08 nadim_ moritz_: thank you for your answers, great job with Rakudo.
15:08 * moritz_ bows
15:09 masak moritz_: more precisely, Int @foo in a parameter list needs to accept only Int @bar from the outside, because of the possibility of lazy infinite lists.
15:09 nadim_ moritz_: great job with Rakudo. (nadim thinks he found a "bow button")
15:09 oha i've updated the pod, i'll be really interested about what all you think: http://register.oha.it/buf.pod
15:10 masak seems people are trying to hack moritz_++ today :)
15:10 * moritz_ has a built-in repetition preventer - at least for some things
15:11 moritz_ what should ('abc' ~~ / (.) ** 2 (.)/).caps  return?
15:11 moritz_ 0 => 'a', 0 => 'b', 1 => 'c' ?
15:11 oha moritz_, i would expect ((a,b),c)
15:12 moritz_ oha: have you read the spec for .caps?
15:12 oha nope :)
15:12 oha you are right
15:12 oha i just probably get confused by P::RD here
15:13 masak moritz_: 0 => <a b>, 1 => 'c', p'haps?
15:15 moritz_ masak: that would work for .caps, but would fail to extend to .chunks
15:16 masak hm, guess so.
15:16 moritz_ 'a b c' ~~ /[(\S) \s] ** 2 (.)/  -> $/.chunks
15:16 squeeky Most likey tonight western US time rakudo star will be available for mac homebrew people. \o/
15:16 moritz_ \o/
15:17 ashleydev joined #perl6
15:17 masak I haven't used either .caps or .chunks enough to be familiar/condifent with them.
15:17 masak squeeky: yay
15:19 squeeky I still find it completely ironic that it's Ruby running Perl 5 to install Perl 6.
15:20 patrickas can I send a pull request for one commit from github ? or will the pull request be for my whole fork?
15:20 moritz_ I guess it will be for the whole fork
15:21 masak squeeky: that's not irony. that's pragmatics.
15:21 moritz_ better if you submit to RT, and include the link to the specific commit
15:21 patrickas moritz_ ok thanks
15:21 squeeky true.
15:21 flatwhatson joined #perl6
15:22 patrickas the thing is it does not solve any bug .... but i am dyiiiing to submit it :-) at least for review :-)
15:23 masak then RT sounds fine.
15:25 masak wow, 670 new/open/stalled tickets on RT! \o/
15:27 masak rakudo: enum A::B <a b c>; say b; say "alive"
15:27 p6eval rakudo a389b2: OUTPUT«alive␤»
15:27 masak :(
15:28 patrickas ok i then rt it is
15:28 masak http://rt.perl.org/rt3/Ticket/Display.html?id=71460 doesn't Null PMC any more, but the fact that it doesn't print "1\n" is... worrying.
15:28 masak how can output just disappear like that?
15:29 moritz_ there are some cases of misguided excpetions that just tear down say() statements
15:30 masak does that imply that there's an exception-catching mechanism within &say?
15:32 moritz_ maybe the execution terminates silently, could also be the case
15:33 Axius joined #perl6
15:34 masak no; see 'say "alive"' above.
15:35 oha rakudo: enum T(a=>2); say a; say 'E';
15:35 p6eval rakudo a389b2: OUTPUT«2␤E␤»
15:35 pmichaud rakudo:  enum ABC <a b c>;  say b;
15:35 p6eval rakudo a389b2: OUTPUT«1␤»
15:36 pmichaud rakudo:  enum ABC::DEF <a b c>;  say b;
15:36 p6eval rakudo a389b2:  ( no output )
15:36 pmichaud .oO( clue )
15:37 moritz_ oha++ told me in private message about a small Match dumper he has written, which shows the structure of a match tree much terser than $/.perl
15:37 oha moritz_, i can share it, just 3 loc
15:37 pmichaud how do we make it less private?  ;-)
15:37 moritz_ should we have something like that in core? or in an extra module?
15:37 patrickas oha++ indeed!
15:38 pmichaud I'd need to see it before knowing how to answer.
15:38 patrickas i got RT# 77162 for me review request :-) (Sorry for the spam)
15:38 * jnthn back again
15:38 oha augment class Match {
15:38 oha method dump ($d=0) {
15:38 oha my $s = '  'x$d;
15:38 oha my @caps = self.caps;
15:38 oha return "=> $(self)\n" unless @caps;
15:38 oha return (@caps[0].key//'?') ~ " " ~ @caps[0].value.dump($d) if @caps == 1;
15:38 moritz_ pmichaud: I kinda assumed it was the "I don't want to spam the world" private, and not the "It's sekrit" private :-)
15:38 oha return "\n" ~ @caps.map({
15:38 oha "$s  " ~ ($_.key||'?') ~ " " ~ $_.value.dump($d+1);
15:38 oha }).join;
15:38 oha };
15:38 oha };
15:38 * [particle] points oha at nopaste
15:38 patrickas welcome back again jnthn
15:38 colomon I've been thinking of doing something like a Utils::List module (name??) which contains simple implementations of handy tools not spec'd and lots of tests.  Seems like oha might want to start something similar for Match?
15:38 jnthn o/ pmichaud - hope you had a safe journey back :-)
15:39 jnthn o/ patrickas
15:39 rcfox oha: That's more than 3 lines of code.
15:39 pmichaud jnthn: journey was fine
15:39 pmichaud long, but fine :)
15:39 pmichaud hope your journey was enjoyable :)
15:39 moritz_ colomon: maybe that's a good idea
15:39 rcfox oha: Also, what about putting it in a role so that you don't have to augment the class?
15:40 pmichaud in general, I'd like to see .perl be able to do nicer formatting
15:40 ghyspran joined #perl6
15:40 alc joined #perl6
15:40 pmichaud (also, I have a few qualms about .perl's specification as well, especially as it relates to item/list handling)
15:40 jnthn pmichaud: Yes, I had a very relaxing few days break (well, in the sense of different rather than just sitting around :-))
15:41 moritz_ pmichaud: one of the problems of Match.perl is that it includes the original string within each submatch
15:41 moritz_ we could emit this instead:
15:42 moritz_ do { my $*O = "abc\ndef"; Match.new(orig => $*O, from => 0, to => 1) }
15:42 moritz_ and re-use $*O for all inner Match object
15:42 oha pmichaud, also, the dump is not something which can be interpreted as perl, but just a very compact output for big trees: http://nopaste.snit.ch/22694
15:42 moritz_ but the fact remains that dumping a Match for human inspection is a very different goal than for re-eval()ing
15:43 oha moritz_, it would be very difficult to know what has been matched this way
15:43 oha moritz_, indeed
15:43 pmichaud oha: sure -- I'm just thinking it'd be nice if .perl could also be more human-friendly
15:43 moritz_ maybe we should have a .human along with .perl :-)
15:43 oha a sort of .perl(:human) ? :)
15:43 pmichaud yes, I was just thinking that ".dump" isn't the right name :)
15:44 pmichaud maybe .fmt ?  ;-)
15:44 moritz_ .fmt is taken
15:44 moritz_ .structure
15:44 moritz_ .overview
15:44 oha .human isn't that bad
15:44 moritz_ .human
15:44 moritz_ right :-)
15:44 oha it is like .perl but not for perl, but for humans :)
15:44 squeeky .fml ?
15:44 moritz_ exactly
15:44 moritz_ .fmh "for mere humans" :-)
15:44 oha .perl is parseable by perl, .human is pareable by human :)
15:45 pmichaud in general, I suppose .human could default to .perl
15:45 moritz_ agreed
15:45 colomon +1
15:45 pmichaud I'm not opposed to adding .human into rakudo for now, to experiment with the idea
15:46 pmichaud then see if it gets adopted as spec
15:46 moritz_ +1
15:46 pmichaud it could also be a module to begin with
15:46 oha pmichaud, could default to .perl iff then .perl can know it then have to call .human on the childs
15:46 tadzik maybe something like perl.pretty?
15:46 tadzik but that'd be a string method then
15:46 pmichaud .pretty
15:46 tadzik .pretty is nice too
15:47 pugssvn r31959 | moritz++ | [t/spec] adjust some Match.caps and Match.chunks tests to my new understanding of nested match objects. Also fixes an unrelated plan
15:47 pmichaud oha: I would not expect .perl to ever call .human (nor should it need to)
15:47 pmichaud in general we'd only call .perl for simple data structures
15:47 oha pmichaud, i can see your point
15:48 oha moritz_, regarding .caps, does the fix on nqp (flickering caps) got in rakudo now?
15:48 pmichaud although this does somewhat argue that we'd like to have   .dump(:pretty)   and .dump(:perl)
15:48 moritz_ oha: yes
15:48 pmichaud so that a .dump could take advantage of mmd
15:48 tadzik that's a lot of typing
15:48 pmichaud .perl would default to .dump(:perl)
15:49 pmichaud but this also allows .dump to take other useful options, like indentation level
15:49 pmichaud .human could default to .dump(:pretty)
15:49 oha pmichaud, and if there is no "human" flavour, it may use perl, but the childs will again be invoked "human" and eventually fallback
15:49 pmichaud oha: exactly.
15:49 oha pmichaud, which is what i was trying to say above :)
15:50 pmichaud oha: right
15:50 moritz_ the idea is nice, but might suffer from having too many objects in Mu/Any
15:50 pmichaud but it's not .perl that makes the decision -- it's the .dump that does
15:50 pmichaud i.e.,  a .dump that doesn't know how to :pretty or :perl can just do whatever it thinks is correct.
15:50 oha pmichaud++
15:50 pmichaud but it still passes the options on to any .dump's that it calls.
15:51 oha pmichaud, that seems to me a big rewriting anyway. alot of .perl() are around
15:51 pmichaud oha: oh, it's not nearly so big.
15:51 pmichaud .perl is easy to write.
15:51 oha but if you had a .dump() on Mu which call .perl()
15:52 pmichaud oha: I still claim that's backwards.
15:52 oha i think this would be a start
15:52 pmichaud .perl should call .dump, not the other way around.
15:52 oha then .perl() must just be rewritten to call .dump
15:52 oha exactly
15:52 dalek rakudo: a47c455 | moritz++ | src/builtins/Cursor.pir:
15:52 dalek rakudo: [Match] return itemized arrays for quantified positional captures
15:52 dalek rakudo: Fix suggested by pmichaud++
15:52 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/a47c455876cade29d5a341951c3ce445740e41a2
15:52 pmichaud moritz_: did it work?
15:53 moritz_ pmichaud: like a charm
15:53 moritz_ $ ./perl6 -e '.say for ("abc" ~~ /(.)+/).list'
15:53 moritz_ a b c
15:53 pmichaud excellent.  we'll see if we take much of a speed hit... but this is definitely more correct.
15:54 pmichaud I can think of a couple of other nqp-rx refactors we'll need to do, now that rakudo's assignment model is more in place.
15:55 pmichaud okay, afk again for more tutoring
15:55 moritz_ as an extra bonus, $/.caps now distinguishes (.)**2 from (.)(.)
15:55 * moritz_ -> afk, decommuting
15:56 masak perl5 queue on RT: the first screenful of newest new/open tickets show to four weeks ago. perl6 queue on RT: eight days ago. :)
15:56 masak not exclusively a source of pride, of course. but still pretty cool.
15:57 masak the rate of Perl 6 bugs reported is basically 4x that of Perl 5 bugs.
15:58 jnthn Accumulating bug reports. An example of something Rakudo *can* do faster than Perl 5!
15:58 colomon \o/
15:59 * patrickas submitted his first bug today :-) was always relying on other people submitting things I found
15:59 patrickas hopefully it's not a dupe
15:59 skangas joined #perl6
16:02 patrickas Is there a feed for rakudo bugs ? might be a good idea to subscribe to find things one can work on!
16:02 takadonet I would use that feed
16:04 Intensity joined #perl6
16:06 isBEKaml joined #perl6
16:06 javs joined #perl6
16:08 masak I just get them into my email folders.
16:08 masak that's sort of a feed, right? :)
16:09 patrickas i guess ...
16:10 oha bbl
16:13 daxim needs more atom
16:16 patrickas takadonet here is the feed courtesy of masak++ http://www.nntp.perl.org/group/perl.perl6.compiler/rss/posts.xml
16:16 risou_ joined #perl6
16:17 tadzik joined #perl6
16:18 tadzik masak: I added bin/ support for ufo in my fork. Also it needs no Makefile now, it can bootstrap one
16:18 tadzik masak: http://github.com/tadzik/ufo
16:19 masak tadzik: thanks. remind me tomorrow, and I'll merge it.
16:19 patrickas rakudo: say (1, + * ... *).munch(10).perl; #This is correct behaviour right ?
16:19 p6eval rakudo a389b2: OUTPUT«(1, 1, 1, 1, 1, 1, 1, 1, 1, 1)␤»
16:19 tadzik masak: I'll send you a pull request
16:20 tadzik I'm fleeing now, see you later #perl6
16:20 moritz_ patrickas: yes
16:20 isBEKaml rakudo: (1,1 + * ... *).munch(10).perl.say
16:20 patrickas then I guess we can close http://rt.perl.org/rt3/Ticket/Display.html?id=74606
16:20 p6eval rakudo a389b2: OUTPUT«(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)␤»
16:21 patrickas and by we i mean someone with enough privs :-)
16:21 moritz_ patrickas: do we have test coverage?
16:21 isBEKaml rakudo: (1,-1 + * ... *).munch(10).perl.say
16:21 p6eval rakudo a389b2: OUTPUT«(1, 0, -1, -2, -3, -4, -5, -6, -7, -8)␤»
16:22 isBEKaml I'm still trying to come to grips with * as a form of a closure. :)
16:24 pugssvn r31960 | moritz++ | [t/spec] test for RT #74609, 1, +* ... * series just repeats 1s
16:24 moritz_ just think of every * as a formal parameter... except when they are in the argument list of a routine
16:24 moritz_ * + 5  =>  { $^a + 5 }
16:24 moritz_ *.uc => { $^a.uc }
16:25 moritz_ * + * => { $^a + $^b }
16:25 isBEKaml I just thought of them as a place holder but then, we have twigils.
16:25 masak they are that.
16:25 masak just shorter :)
16:26 isBEKaml :)
16:26 masak placeholder parameters are "I'm too lazy to make a signature"
16:26 masak * is "I'm too lazy to even name my parameters" !
16:26 moritz_ and * is "I'm too lazy for the curlies"
16:26 masak that, too :)
16:26 isBEKaml or "I'm too lazy to even see parameters " !
16:27 isBEKaml rakudo: (1, (-1 + *) ... *).munch(10).perl.say
16:28 p6eval rakudo a389b2: OUTPUT«(1, 0, -1, -2, -3, -4, -5, -6, -7, -8)␤»
16:28 isBEKaml rakudo++
16:28 isBEKaml rakudo: (1,-1 ... *).munch(10).perl.say
16:28 p6eval rakudo a389b2: OUTPUT«(1, -1, -3, -5, -7, -9, -11, -13, -15, -17)␤»
16:28 patrickas moritz_ I went in and added the test locallty to reply "we have a test now" and got a conflict on commit :-)
16:28 slavik I'm too lazy to write code, so I am working on STAR
16:29 moritz_ patrickas: don't bother, I was faster :-)
16:29 takadonet patrickas: thanks for the feed :)
16:29 isBEKaml is the -1 passed above to p6eval a step num?
16:30 isBEKaml rakudo: (1,-1 ... *).munch(10).perl.say; # What does the -1 mean here?
16:30 p6eval rakudo a389b2: OUTPUT«(1, -1, -3, -5, -7, -9, -11, -13, -15, -17)␤»
16:30 isBEKaml rakudo: (1,1 ... *).munch(10).perl.say;
16:30 p6eval rakudo a389b2: OUTPUT«(1, 1, 1, 1, 1, 1, 1, 1, 1, 1)␤»
16:30 PerlJam it's the next number in the series.
16:31 PerlJam to get from 1 to -1, you had to subtract 2, so the series goes 1, -1, -3, etc.  subtracting 2 each time
16:31 isBEKaml Oh, I see. shoulda' seen that! :/
16:31 patrickas moritz_ that's why I go tthe conflict ... because you had already added the test at the same line
16:33 justatheory joined #perl6
16:34 moritz_ patrickas: btw spectesting your patch now... looks good so far
16:35 patrickas moritz_ thanks :-) If it works it'd be my best patch ever 17 lines deleted 0 lines modified 0 lines added :-)
16:35 isBEKaml http://slackbuilds.org/repository/13.1/development/parrot/
16:35 isBEKaml \o/
16:35 patrickas moritz_ also http://rt.perl.org/rt3/Public/Bug/Display.html?id=75674 can be closed it has passing tests already
16:35 isBEKaml But rakudo didn't make it, it's still in the pending queue. :(
16:38 isBEKaml patrickas: people love deletion patches! :)
16:40 cognominal joined #perl6
16:42 Axius joined #perl6
16:43 _macdaddy joined #perl6
16:50 patrickas rakudo: my $foo = &prefix:<!>;say $foo.signature;
16:51 p6eval rakudo a47c45: OUTPUT«get_attr_str() not implemented in class 'Perl6MultiSub'␤  in main program body at line 1␤»
16:52 pmichaud that could probably be added if we know what the output should look like.
16:53 pmichaud afk again
16:53 flatwhatson joined #perl6
16:54 stkowski joined #perl6
16:56 patrickas I have no idea ... I was trying ot golf #RT 76046
16:57 elmex left #perl6
16:59 gfldex does List.sort() relies on infix:<<=>> ?
17:05 PerlJam gfldex: cmp
17:06 PerlJam <=> is numeric,  leg is stringy,  cmp is ... smart  ;)
17:06 rcfox rakudo: class foo { method postfix:<+> {say "hi";}}; my $a = foo.new; $a+;
17:06 p6eval rakudo a47c45: OUTPUT«===SORRY!===␤Confused at line 22, near "$a+;"␤»
17:07 rcfox Are there constraints for what can be postfix operators?
17:08 gfldex std: class foo { method postfix:<+> {say "hi";}}; my $a =  foo.new; $a+;
17:08 p6eval std 31912: OUTPUT«[31m===[0mSORRY![31m===[0m␤Bogus term at /tmp/k20IObdpox line 1:␤------> [32m:<+> {say "hi";}}; my $a =  foo.new; $a+[33m⏏[31m;[0m␤Parse failed␤FAILED 00:01 116m␤»
17:08 PerlJam rcfox: I don't think so.  Though, if you're going to overload existing operators, you have to deal with their other uses.
17:09 rcfox std: class foo { method postfix:<-<--<> {say "hi";}}; my $O = foo.new; $O-<--<;
17:09 p6eval std 31912: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unable to parse quote words at /tmp/uIG6RSCCgo line 1:␤------> [32mclass foo { method postfix:[33m⏏[31m<-<--<> {say "hi";}}; my $O = foo.new; $[0m␤Couldn't find final '>'; gave up at /tmp/uIG6RSCCgo line 1 (EOF):␤------> [32m {say "hi";}}; my $O
17:09 p6eval ..…
17:09 avuserow std: class foo { method postfix:'-<--<' {say "hi";}}; my $O = foo.new; $O-<--<;
17:09 p6eval std 31912: OUTPUT«[31m===[0mSORRY![31m===[0m␤Malformed block at /tmp/IL1z9yHwVx line 1:␤------> [32mclass foo { method postfix:[33m⏏[31m'-<--<' {say "hi";}}; my $O = foo.new; $[0m␤    expecting any of:␤       coloncircumfix␤   signature␤Parse failed␤FAILED 00:01 112m␤»
17:10 avuserow std: class foo { method postfix:<<-<--<>> {say "hi";}}; my $O = foo.new; $O-<--<;
17:10 p6eval std 31912: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unable to parse quote words at /tmp/H_mgaBX5q8 line 1:␤------> [32m--<>> {say "hi";}}; my $O = foo.new; $O-[33m⏏[31m<--<;[0m␤Couldn't find final '>'; gave up at /tmp/H_mgaBX5q8 line 1 (EOF):␤------> [32m {say "hi";}}; my $O = foo.new;
17:10 p6eval ..$O-<--<;[3…
17:10 avuserow std: class foo { method postfix:<< -<--< >> {say "hi";}}; my $O = foo.new; $O-<--<;
17:10 p6eval std 31912: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unable to parse quote words at /tmp/gDELyZV53i line 1:␤------> [32m-< >> {say "hi";}}; my $O = foo.new; $O-[33m⏏[31m<--<;[0m␤Couldn't find final '>'; gave up at /tmp/gDELyZV53i line 1 (EOF):␤------> [32m {say "hi";}}; my $O = foo.new;
17:10 p6eval ..$O-<--<;[3…
17:10 synth joined #perl6
17:10 avuserow that's an awkward operator to try to define.
17:10 rcfox Well, I'm just playing around anyway. I don't intend to make a -<--< operator. :P
17:10 gfldex < anystuffhere > is syntax, not operator
17:11 gfldex if you want to do that you have to tell the parser
17:11 gfldex by extending the perl6 grammar
17:11 rcfox :\
17:11 rcfox I don't think it'd make it into the spec.
17:11 gfldex sounds harder then it is :)
17:13 jnthn rakudo: sub postfix:<< -<--< >> ($x) { }; say "ok"
17:13 p6eval rakudo a47c45: OUTPUT«ok␤»
17:14 jnthn rakudo: sub postfix:<< -<--< >> ($x) { }; 42-<--<
17:14 p6eval rakudo a47c45: OUTPUT«===SORRY!===␤Confused at line 22, near "42-<--<"␤»
17:14 jnthn rakudo: sub postfix:<< -<--< >> ($x) { }; 42\-<--<
17:14 p6eval rakudo a47c45: OUTPUT«===SORRY!===␤Confused at line 22, near "42\\-<--<"␤»
17:14 jnthn rakudo: sub postfix:<< <--< >> ($x) { }; 42<--<
17:14 p6eval rakudo a47c45: OUTPUT«===SORRY!===␤Confused at line 22, near "42<--<"␤»
17:15 jnthn Yeah, think that one ain't really going to work out.
17:16 risou joined #perl6
17:22 pmurias joined #perl6
17:23 pmurias ruoso: how should the smop module which initalizes everything and creates an interpreter be called?
17:26 dalek rakudo: 6b318ea | (Patrick Abi Salloum)++ | src/core/operators.pm:
17:26 dalek rakudo: removed a bunch of hopefully unneeded code
17:26 dalek rakudo: Signed-off-by: Moritz Lenz <moritz@faui2k3.org>
17:26 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/6b318eabe6d6f5c988952244f2d282f7d8683813
17:26 rokoteko std: sub postfix:['<--<'] () { say "hi." }; 42<--<
17:26 p6eval std 31912: OUTPUT«ok 00:03 119m␤»
17:30 TiMBuS rokoteko.. that code managed to hang rakudo
17:31 rokoteko std: sub postfix:['-<--<'] is tighter:<-> () { say "hi." }; 42-<--<
17:31 p6eval std 31912: OUTPUT«ok 00:01 119m␤»
17:37 rcfox rokoteko: Nice.
17:39 avuserow :D awesome, rokoteko++
17:41 dwierenga joined #perl6
17:45 Italian_Plumber joined #perl6
17:49 pyrimidine joined #perl6
17:51 Axius joined #perl6
17:53 ashleydev joined #perl6
17:54 Axius_ joined #perl6
17:55 AndreasX joined #perl6
17:56 Axius__ joined #perl6
17:58 justatheory joined #perl6
17:59 Axius joined #perl6
18:17 ashleydev joined #perl6
18:17 rcfox Gah, I accidentally left perl6 running with the stickman.
18:18 rcfox Now my laptop is hot, and unhappy.
18:21 cognominal rcfox, what is a stickman?
18:22 rcfox sub postfix:['-<--<'] () {}; 0-<--<
18:22 rcfox STD parses it, but Rakudo just hangs.
18:23 rcfox I forgot to kill it before I went grocery shopping.
18:25 mtve joined #perl6
18:28 Axius_ joined #perl6
18:28 Axius___ joined #perl6
18:33 Axius joined #perl6
18:34 cognominal in the Perl6 shell, should not one be able to redefine anything in the current scope. UNIT?
18:35 [Coke] colomon: ping.
18:35 colomon pong
18:35 [Coke] colomon: where is your frabujous joy?
18:37 colomon [Coke]: has thou slain the Jabberwock?
18:37 Axius_ joined #perl6
18:38 [Coke] colomon: RT #75768
18:38 [Coke] I just found the body.
18:40 colomon oh, nice!
18:40 colomon star: say (1...10)[2...4]
18:40 p6eval star 2010.07: OUTPUT«345␤»
18:40 colomon star: say (1...10)[2..4]
18:40 p6eval star 2010.07: OUTPUT«345␤»
18:41 colomon oh, sure, it was one of *those* bugs.   :)
18:41 colomon pmichaud slew the Jabberwock a couple of weeks ago, then.
18:44 astrojp joined #perl6
18:44 jasonmay star: (1,2,4,8 ... 64)[3..5]
18:44 p6eval star 2010.07:  ( no output )
18:46 colomon star: say (1,2,4,8 ... 64)[3..5]
18:46 p6eval star 2010.07: OUTPUT«81632␤»
18:46 colomon star: say ~(1,2,4,8 ... 64)[3..5]
18:46 p6eval star 2010.07: OUTPUT«8 16 32␤»
18:56 Axius joined #perl6
18:59 erichk joined #perl6
19:06 gfldex std: class A {}; class B is A {}; class C is A {}; my $b = B.new(); my $c = C.new(); my A @l; @l.push(B.new(), C.new()); @l.sort;
19:06 p6eval std 31912: OUTPUT«ok 00:01 117m␤»
19:06 c0nspiracy_ joined #perl6
19:06 cono joined #perl6
19:06 gfldex rakudo: class A {}; class B is A {}; class C is A {}; my $b = B.new(); my $c = C.new(); my A @l; @l.push(B.new(), C.new()); @l.sort;
19:07 p6eval rakudo 6b318e: OUTPUT«maximum recursion depth exceeded␤  in 'at_pos' at line 5:CORE.setting␤  in 'at_pos' at line 7:CORE.setting␤  in 'Any::postcircumfix:<[ ]>' at line 1658:CORE.setting␤  in 'at_pos' at line 5:CORE.setting␤  in 'at_pos' at line 7:CORE.setting␤  in 'Any::postcircumfix:<[ ]>' at
19:07 p6eval ..line 165…
19:07 gfldex rakudo: class A {}; class B is A {}; class C is A {}; my $b = B.new(); my $c = C.new(); my @l; @l.push(B.new(), C.new()); @l.sort;
19:07 p6eval rakudo 6b318e:  ( no output )
19:07 gfldex i is bugcat, i makes bugs
19:12 vcrini joined #perl6
19:15 Axius joined #perl6
19:15 erik_ joined #perl6
19:19 rindolf joined #perl6
19:20 rindolf Hi all.
19:20 nimiezko joined #perl6
19:20 colomon o/
19:21 rindolf colomon: what's up?
19:21 rindolf colomon: do you only have one hand?
19:21 colomon I'm working on $work at the moment.
19:21 colomon I only wave one hand at a time.
19:21 rindolf colomon: ah.
19:22 colomon unless I'm excited:  \o/
19:23 PerlJam colomon: then you have no hands?
19:23 gfldex he is waving so fast that his hands blur out
19:23 hugo_ joined #perl6
19:24 hugo_ hi
19:25 takadonet hugo_: hey
19:25 uniejo joined #perl6
19:25 gfldex rakudo: class A { has $.b }; my @l; @l.push(A.new(:b('peng'))); say *.b for @l;
19:25 p6eval rakudo 6b318e: OUTPUT«_block148␤»
19:25 gfldex std: class A { has $.b }; my @l; @l.push(A.new(:b('peng'))); say *.b for @l;
19:25 p6eval std 31912: OUTPUT«ok 00:01 115m␤»
19:25 gfldex should that work?
19:26 colomon I don't think so.
19:26 gfldex rakudo: class A { has $.b }; my @l; @l.push(A.new(:b('peng'))); *.b.say for @l;
19:26 p6eval rakudo 6b318e:  ( no output )
19:26 gfldex rakudo: class A { has $.b }; my @l; @l.push(A.new(:b('peng'))); .b.say for @l;
19:26 p6eval rakudo 6b318e: OUTPUT«peng␤»
19:27 gfldex bit odd that *.b.say doesnt work
19:27 colomon rakudo: class A { has $.b }; my @l; @l.push(A.new(:b('peng'))); say (*.b)($_) for @l;
19:27 p6eval rakudo 6b318e: OUTPUT«peng␤»
19:27 colomon It's not odd.  *.b creates a closure which takes one object and applies .b to it.
19:28 colomon it's like -> $a { $a.b }
19:28 vcrini joined #perl6
19:28 gfldex i c
19:28 gfldex should the compiler warn in that case?
19:29 colomon it's a little more obvious if you think of it using map
19:29 pmurias ruoso: 'use v6-mildew' in modules works
19:29 colomon because @l.map(*.b) applies .b to each element but doesn't say it.
19:30 colomon whereas @l.map({ say *.b }) just says the closure once for each element of @l.  (thus "_block148")
19:30 gfldex i agree on what it does and why, but it's going to the noob-FAQ for sure :)
19:30 ruoso pmurias, that's awesome... and I think that fills up the gsoc requirements
19:32 rcfox What is v6-mildew?
19:33 Axius joined #perl6
19:33 pmurias ruoso: i added a main module to smop which supplies a smop_main_get_interpreter function
19:33 awwaiid_web joined #perl6
19:34 gfldex if i want to provide a custom sort(ing), do i have to overload infix:<cmp> ?
19:34 awwaiid_web Greetings! I expected "7 leg 62" to give the same thing as "7 <=> 62" but it does not (in rakudo* release). Am I wrong or is Rakudo?
19:34 colomon gfldex: no, you can pass a comparison function to sort
19:35 colomon awwaiid_web: you're wrong
19:35 gfldex colomon: that's what i don't want to do
19:35 pmurias rcfox: it's a module which allows you to put 'use v6-mildew' on top of your perl5 files to have mildew run them
19:35 colomon 7 leg 62 is effectively "7" leg "62"
19:36 awwaiid_web I thought lexographic meant numeric+alphabetical?
19:36 colomon awwaiid_web: leg is string comparison
19:36 colomon it converts both arguments to strings, then compares them.
19:36 astinus joined #perl6
19:37 colomon gfldex: then I completely fail to understand your question.
19:37 sjohnson leggo my eggo
19:37 awwaiid_web so <13 23 42 67 7>.sort doesn't do what I want on purpose then
19:37 gfldex colomon: point of operator overloading is (AFAIUI) that even the core part is then going to use those operators
19:38 gfldex colomon: if sort is ignoring those operators it's ... kinda odd
19:38 gfldex or do i have to overload that sort function to work with my custom type?
19:39 colomon awwaiid_web: that might be sort of a bug (there are fancy rules for constructs that are like <2 423 34>, NYI in rakudo), but no, it's not.
19:39 jfried joined #perl6
19:39 colomon gfldex: if you want to provide default sorting for a new type, then yes, overloading infix:<cmp> is the way to do it.
19:40 gfldex colomon: as a method in that type or as a sub outside of it (c++ -stype)
19:40 colomon awwaiid_web: (13, 23, 42, 67, 7).sort will do a numeric sort, though
19:41 colomon gfldex: sub inside of it might be the best way to do it at the moment.
19:41 colomon star: <13 23 42 67 7>.sort.perl.say
19:41 p6eval star 2010.07: OUTPUT«("13", "23", "42", "67", "7")␤»
19:41 sorear good * #perl6
19:41 colomon star: (13, 23, 42, 67, 7).sort.perl.say
19:41 p6eval star 2010.07: OUTPUT«(7, 13, 23, 42, 67)␤»
19:41 awwaiid_web what sort op does sort use internally? I for some reason thought it was leg
19:42 colomon awwaiid_web: it uses cmp.
19:42 awwaiid_web star: (13, 23, 42, 67, 7).sort({ $^a cmp $^b}).perl.say
19:42 p6eval star 2010.07: OUTPUT«(7, 13, 23, 42, 67)␤»
19:42 awwaiid_web sweet
19:42 awwaiid_web ok, many thanks
19:43 gfldex colomon: seams not to work for me, could you have a look pls? http://gist.github.com/519598
19:43 colomon gfldex: even if defined in a class, subs do not have a self.
19:43 awwaiid_web colomon++ # sorting sorting
19:44 colomon your first infix:<cmp> should look a lot more like your second.
19:44 tylercurtis joined #perl6
19:44 colomon star: (13, 23, 42, 67, 7).sort({ $^a leg $^b}).perl.say
19:44 p6eval star 2010.07: OUTPUT«(13, 23, 42, 67, 7)␤»
19:47 [1]Casan joined #perl6
19:47 astrojp I'm building Rakudo *. After it's finished I'd like to read some introductory stuff on it, like how to create variable, functions, loops, conditionals. And more importantly, how to create classes, objects, class methods...etc...I need beginner stuff. I know nothing about Perl 5.
19:48 gfldex astrojp: http://perlgeek.de/en/article/5-to-6
19:48 moritz_ astrojp: did you try to read the book that's shipped with R*?
19:48 gfldex astrojp: http://www.perl6.org/documentation/
19:51 astrojp gfldex, moritz_: no, i haven't tried reading the book that's shipped with it. I'll start there and see how it goes. I'll try the http://www.perl6.org/documentation as well. Thanks.
19:54 araujo joined #perl6
19:56 ashleydev joined #perl6
19:57 araujo joined #perl6
20:06 PhatEddy joined #perl6
20:06 PhatEddy rakudo: my @a; @a //= (3); @a.perl.say
20:06 p6eval rakudo 6b318e: OUTPUT«maximum recursion depth exceeded␤  in 'Block::count' at line 5609:CORE.setting␤  in 'Block::count' at line 5613:CORE.setting␤  in 'Any::join' at line 1␤  in 'Array::perl' at line 2821:CORE.setting␤  in <anon> at line 2821:CORE.setting␤  in 'Any::join' at line 1␤  in
20:06 p6eval ..'Array::perl' a…
20:06 PhatEddy rakudo: my @a; @a ||= (3); @a.perl.say
20:07 p6eval rakudo 6b318e: OUTPUT«[3]␤»
20:07 astrojp moritz_: Cool, the .pdf that comes along with the install "Using Perl 6" is pretty neat, looks like it has all I need to get started. Thanks again.
20:08 [Coke] joined #perl6
20:08 slavik the question is: how do I install Perl6 into my brain?
20:08 PerlJam slavik: osmosis
20:08 PerlJam slavik: and lots of practice
20:09 gfldex colomon: updated: http://gist.github.com/519598
20:09 gfldex colomon: i have to do @fruits.sort(&infix:<cmp>); or it wont call the user defined operator
20:09 gfldex colomon: is that a bug?
20:10 PhatEddy I think my critter may be new - any objection to reporting it?  I searched perlbug for "// perl6" and didn't find a match.
20:10 Mowah joined #perl6
20:11 masak joined #perl6
20:11 masak ahoy!
20:12 gfldex o/
20:13 jnthn ako sa masak?
20:14 masak :P
20:14 masak that's punderful.
20:16 colomon gfldex: I think I know why it's happening, and I'd definitely say it's a bug.
20:16 gfldex our multi method sort(&by = &infix:<cmp>) { self.list.sort(&by); }
20:16 gfldex that's from Any-list.pm
20:16 gfldex when is that &by = evaluated?
20:16 skangas joined #perl6
20:17 colomon gfldex: I dunno.
20:17 skangas joined #perl6
20:17 colomon but I think what's happening is that sort gets infix:<cmp> before your infix:<cmp> is defined.
20:17 gfldex anyway, that bug has to come from the dispatcher somehow
20:18 gfldex where did bugcat went to?
20:18 gfldex kitty kitty kitty
20:18 colomon actually, that is (in general) the desired behavior, I'm told.
20:18 Su-Shee left #perl6
20:18 colomon but I think sort is an example where it shouldn't work that way.
20:18 colomon there's supposed to be a keyword to deal with it, but it's NYI in rakudo so far as I know.
20:19 jnthn It should be evaluated once per time we bind the signature
20:19 gfldex what keyword would that be?
20:19 tylercurtis lift?
20:19 jnthn But it's going to look for a cmp in the lexical scope of the setting.
20:19 c0nspiracy_ joined #perl6
20:19 colomon lift, I think
20:19 jnthn Yes, lift is meant to deal with this issue, in theory.
20:19 colomon jnthn++ # for knowing what is going on better...
20:19 gfldex it's very undwimmy to require a keyword for that
20:20 gfldex all c++ dudes and dudettes will be very confused :)
20:20 jnthn gfldex: It's just a natural result of lexical scoping. :-)
20:20 gfldex if i overwrite an operator i want it to be called, or i don't need to overwrite it
20:20 colomon jnthn: Do you agree with my intuition that sort should be doing the lift automatically?
20:21 * masak refrains from gossiping about mst banning pudge from #perl :)
20:21 gfldex if it doesn't ppl will overwrite sort instead
20:21 [Coke] masak: that was bizarro.
20:21 jnthn colomon: It sounds kinda sane, I'd have to re-read the spec for lift.
20:22 masak [Coke]: if you ask me, pudge's blog post and the comments he made don't speak in his favour. http://use.perl.org/~pudge/journal/40492
20:22 jnthn masak: Refrainataion fail. :P
20:22 masak jnthn: that's the thing about gossip. it doesn't work if you don't not refrain. :P
20:23 gfldex masak: so, now tell us the story then
20:23 masak gfldex: pudge was kicked by mst. that's all I know.
20:24 masak plus the blog post I linked above. plus this: http://twitter.com/shadowcat_mst/status/20901428800
20:24 colomon jnthn: I dunno if the spec mentions lift explicitly, but the idea that sort shouldn't Do The Right Thing by default for user-defined classes seems very wrong.
20:24 PerlJam Hmm.
20:24 masak in order to rationalize my mentioning it here, consider it all from a community perspective.
20:25 colomon jnthn: but then, requiring lift for operators in general seems like a horrible kludge in p6 to me.
20:25 masak how far can/should we go to preserve the atmosphere of a channel?
20:25 masak colomon: how do you mean?
20:25 gfldex i was kicked from channel a few times to and i consider it the right thing to do at those times :)
20:25 masak colomon: I think it seems like a very pretty solution. something that would have required a nasty workaround if lift weren't there.
20:26 PhatEddy rakudo: my @a //= (); @a.perl.say
20:26 p6eval rakudo 6b318e: OUTPUT«maximum recursion depth exceeded␤  in 'Block::count' at line 5609:CORE.setting␤  in 'Block::count' at line 5613:CORE.setting␤  in 'Any::join' at line 1␤  in 'Array::perl' at line 2821:CORE.setting␤  in <anon> at line 2821:CORE.setting␤  in 'Any::join' at line 1␤  in
20:26 p6eval ..'Array::perl' a…
20:26 colomon masak: my problem is that I have a hard time understanding why you might have a case where you do not want to use lift.
20:26 jnthn lift is kinda the fallout we get for going lexical. OTOH, if we didn't go lexical we'd have no lift, just fallout everywhere. :-)
20:26 masak PhatEddy: groovy error!
20:26 masak PhatEddy: is it from RT, or did you find it?
20:27 masak jnthn: :)
20:27 colomon for the programming I've done, have lift be default and a new keyword for no-lift seems much more intuitive.
20:27 PhatEddy masak: I just commented on that about 15 minutes ago and have now submitted it ...
20:27 masak I for one would really like a simple blog post about how lift works, and when to use it. someome pls write it. :)
20:27 gfldex the point about operator overloading is that you get some very cheap generic programming
20:27 masak PhatEddy++
20:28 tylercurtis jnthn: if I understand correctly, does that mean that specific variants of multis are lexical?
20:28 [Coke] masak: I don't see anything there there is really anti-pudge other than the sentiment of the current ops.
20:28 tylercurtis Or just multi operators?
20:29 masak [Coke]: maybe not. I'm kind curious what pudge actually wrote to get banned.
20:29 tylercurtis Or do I totally misunderstand why that code doesn't do what gfldex means?
20:30 colomon tylercurtis: specific variants are lexical, right.
20:30 masak [Coke]: but reacting to a ban by writing 'is insane' and 'irrational dick' in public isn't what I'd call mature. even if there were absolutely no good reason whatsoever to ban pudge, which I suspect there might've been.
20:30 [Coke] masak: absolutely nothing that I could see.
20:30 [Coke] masak: you're clearly not in #perl.
20:30 masak oh, you were there?
20:30 masak no, I'm not.
20:30 [Coke] that is something you'd say to your grandmother in that channel.
20:31 [Coke] -> $DAYJOBBING
20:31 [Coke] (not any more. the constant trash talk is hard to keep up with.)
20:31 [Coke] (but was there for the ban, yes.)
20:31 masak ok.
20:31 PhatEddy rakudo: my @a ||= (); @a.perl.say
20:31 jnthn tylercurtis: Yes; additional variants are lexically scoped.
20:31 p6eval rakudo 6b318e: OUTPUT«[]␤»
20:32 tylercurtis Interesting.
20:32 pmurias tylercurtis: hi
20:32 pmurias tylercurtis: is the repo still broken for you?
20:33 jnthn rakudo: multi foo() { say 1 }; { multi foo($x) { say 2 }; foo(); foo('lol'); }; foo(); foo('lol');
20:33 p6eval rakudo 6b318e: OUTPUT«1␤2␤1␤No applicable candidates found to dispatch to for 'foo'. Available candidates are:␤:()␤␤  in main program body at line 22:/tmp/6bosqyPPvM␤»
20:33 jnthn tylercurtis: ^^ Short example.
20:36 masak tylercurtis: and it works similarly with methods and inheritance.
20:37 colomon and it makes perfect sense there.  it's the other way around where it gets weird.
20:37 wolverian lift? we have monads in perl6 now? *reads* oh...
20:37 tylercurtis pmurias: Yes. Looking at http://svn.pugscode.org/pugs/v6/v6-mildew/lib/, it appears as though the v6/v6-mildew/lib/V6/ dir is still around, but empty.
20:39 pmurias :(
20:39 pmurias git-svn doesn't remove dirs
20:40 pmurias tylercurtis: can you delete it by supplying the URL to svn?
20:41 tylercurtis pmurias: I'll try.
20:43 pugssvn r31961 | tcurtis++ | pmurias++ moved the contents of this. Deleting it so we HFS users can co.
20:44 pmurias ruoso: i'm uploading new Mildew,SMOP,Mildew-Setting-SMOP to CPAN
20:44 pmurias ruoso: so i should now focus on cleaning up stuff/adding more tests/docs to things
20:45 pmurias and checking if everything works on a fresh perl
20:46 jdv79 jnthn: is there a copy of your MOP grant proposal online?
20:50 jnthn jdv79: Was posted on news.perlfoundation.org
20:50 Italian_Plumber joined #perl6
20:52 jnthn jdv79: http://news.perlfoundation.org/2010/07/hague-grant-application-meta-m.html
20:53 gfldex if parametric roles would be used (whatever generic stuff would fit) for implementing sort, would lift still be needed?
20:53 tylercurtis pmurias: "Checked out revision 31961." URL-based deleting worked. Thanks.
20:53 jdv79 missed it somehow.  thanks.
20:54 ashleydev_ joined #perl6
20:57 sorear jnthn: hi
20:57 jnthn o/ sorear
20:58 sorear jnthn: I hear you want to work on a Perl 6 metamodel for the Common Type System
20:58 jnthn sorear: Well, I want to work on a Perl 6 meta-model design that I can put on Parrot, the CLR, the JVM, etc. to ease Rakudo porting to 'em all. :-)
21:00 masak it's interesting how both the Perl 6 regexes and the Perl 6 meta-model form bootstrapping strange loops at the bottom of Perl 6.
21:01 jdv79 i get the feeling the full "promise" of parrot is being abandoned in favor of a more reality based approach.
21:02 jdv79 nice
21:03 jnthn masak: I read a paper on the train yesterday that suggested we could do a strange helix instead. :P
21:04 jnthn (OK, OK, that's not *quite* what it said... :-))
21:05 masak jnthn: that sounds interesting. what did the paper in fact say?
21:05 PerlJam wow...  I was just looking through some old IRC logs from 1999 and say this:  <purl> oh, the famous "it doesn't work" bug. or fixed in perl6
21:05 PerlJam that's from March 30, 1999
21:05 PerlJam s/say/found/
21:05 PerlJam (another weird mis-word)
21:06 masak PerlJam: wow, that's pretty early. considering the perl6 effort was announced 16 months later.
21:06 PerlJam Indeed.
21:07 PerlJam though Topaz happened in 1998 or so, so the idea of "perl 6" was around before the coffee mug incident
21:07 jdv79 who remembers topaz?
21:07 PerlJam apparently I do :)
21:07 jnthn masak: http://www2.parc.com/csl/groups/sda/publications/papers/Chiba-ISOTAS96/for-web.pdf
21:07 masak PerlJam: oh, that's true.
21:07 jnthn masak: Should add that one to my papers list. :-)
21:08 * masak reads
21:08 simon__ joined #perl6
21:08 masak or skims, as it were.
21:08 masak 'Avoiding Confusion in Metacircularity: The Meta-Helix'
21:08 masak I already like this paper.
21:09 jnthn masak: Yes, it took me two reads of it to realize what implementing the idea it suggests would look like.
21:09 jnthn (Basically, nothing that we can't do with Perl 6 as already spec'd.)
21:09 masak woot
21:09 jnthn It's worth reading for the exploration of meta-circularity.
21:10 masak 'The intuition behind the meta-helix is that even though the extended and non-extended languages may be very similar, the fact that one is used to implement the other makes it important to reify them as distinct entities.' -- sounds like nqp and Perl 6 to me.
21:10 jnthn May be a little relevant.
21:11 jdv79 everything new is old again?
21:11 jdv79 unique ideas are rare i think these days
21:11 sorear Wow, a CS paper I haven't read
21:11 masak it would be interesting to hear what the "Metaobject Protocol" people would say about this paper.
21:12 * sorear fixes
21:12 masak sorear: I like your attitude. it's not humble, it's the other thing. :P
21:12 masak I like that.
21:12 jnthn jdv79: Aye, the paper basically boils down to class MyMetaClass { has $!inner-meta-class handles *; method add_method($obj, $name, $meth) { ...; $!inner-meta-class.add_method(...); } } # or some other methods you care to override
21:12 tylercurtis masak: as in, the "The Art of the Metaobject Protocol" people?
21:13 masak tylercurtis: right. those.
21:13 tylercurtis masak: because one of them appears to have been one of the writers.
21:13 masak oh :)
21:13 masak tylercurtis++ # meta-research
21:17 masak not only one of the authors of the book, but the main author. at least if they're listed by importance.
21:18 jdv79 nice synopsis
21:19 meinwald joined #perl6
21:20 whiteknight joined #perl6
21:24 mj41 joined #perl6
21:26 Guest23195 left #perl6
21:26 masak 'night, #perl6.
21:27 mtve joined #perl6
21:37 ashleydev joined #perl6
21:40 pmurias jnthn: could you show me your papers list?
21:41 ruoso pmurias, yes... now it's just closure... make sure everything is cleaned up and tested
21:42 jnthn pmurias: It's only 2 papers long so far...but growing at http://6guts.wordpress.com/interesting-papers/
21:42 jnthn (got more to add, just not yet got around to it)
21:43 jnthn Early night for me today... o/
21:43 Woody2143 joined #perl6
21:49 Casan joined #perl6
21:50 fod joined #perl6
21:51 astrojp left #perl6
22:01 ashleydev_ joined #perl6
22:02 Psyche^ joined #perl6
22:02 drbean joined #perl6
22:07 gfldex std: my @a = <a bb>; @a.sort:*.bytes;
22:07 p6eval std 31912: OUTPUT«[31m===[0mSORRY![31m===[0m␤Confused at /tmp/XaAnHwow3r line 1:␤------> [32mmy @a = <a bb>; @a.sort:[33m⏏[31m*.bytes;[0m␤    expecting any of:␤ coloncircumfix␤   signature␤Parse failed␤FAILED 00:01 116m␤»
22:07 gfldex std: my @a = <a bb>; @a.sort: *.bytes;
22:07 p6eval std 31912: OUTPUT«ok 00:01 116m␤»
22:16 meppl joined #perl6
22:29 ashleydev joined #perl6
22:35 Packetknife joined #perl6
22:35 Packetknife joined #perl6
22:41 c0nspiracy joined #perl6
22:49 tom_tsuruhara joined #perl6
23:19 IllvilJa joined #perl6
23:28 revolve left #perl6
23:43 ashleydev_ joined #perl6
23:46 _dolmen_ joined #perl6
23:52 tylercurtis joined #perl6

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

Perl 6 | Reference Documentation | Rakudo