Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-07-18

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 masak "Perl 6: May the »ö« be with you."
00:03 au|irc masak: well, to be fair, I eventually saw (and agreed with) chromatic's viewpoint. Pugs 6.0.x and 6.2.x was probably the best thing ever, but forcing Pugs 6.28.x on a hs platform that wasn't ready for it -- that made collaboration much harder and affected the flow of fun (which already made folks migrate to #moose). so a clean break from the "Perl 6 as a variant/addon of Perl 5" mentality in the form of rakudo was indeed great.
00:04 masak huh. I had never connected Rakudo with that mentality before.
00:04 masak but I guess it's true, in a sense.
00:06 masak and I don't know enough about the details of 6.28.x -- though I might have sensed the decrease of -Ofun flow, not sure.
00:07 au|irc it's like turning the much larger GHC/Hackage gear using a much smaller Pugs gear... not the easiest leverage, physically speaking
00:08 masak it's possible that Rakudo might have happened at approximately the same time it did even without Pugs. but if so, it would have happened with a less mature spec.
00:08 masak so either way, Pugs was a net win for Perl 6.
00:08 au|irc woot :)
00:09 masak wow, is it ever difficult to log off tonight. but it's 2 o'clock here, and I need to be up early tomorrow.
00:09 masak au|irc: thanks for the feedback.
00:09 masak I'll post sometime tomorrow.
00:09 au|irc np at all. I'll probably remain in this channel :)
00:09 au|irc so sleep well!
00:09 masak \o/
00:14 jnthn phenny: tell masak s/One the one
00:14 phenny jnthn: I'll pass that on when masak is around.
00:14 jnthn gah
00:14 jnthn phenny: tell masak s/One the one hand/On the one hand/ # and sorry I can't even use a message bot competently :-)
00:14 phenny jnthn: I'll pass that on when masak is around.
00:16 sorear au|irc: so that's why moose is so far ahead of us now.
00:17 au|irc well, moose took the 6.2.x spirit and made it production worthy
00:17 au|irc that is the runtime OO system
00:17 au|irc but it didn't really do much for grammars...
00:17 au|irc so it's asymptotic convergent evolution again, I guess
00:19 au|irc Moose had to be compatible with perl5 because it, well, it implemented on perl5 :) that liberated perl6 to innovate more on grammars, as people who really need production use today (like yours truly) has a safe fallback
00:20 sorear rakudo is my go-to tool for advanced text processing in the shell these days
00:20 au|irc ++
00:20 sorear especially involving $*IN.slurp.comb(//)
00:22 au|irc *nod* perl6 sets the golf standard for text processing.
00:22 au|irc er, I mean gold standard.
00:31 synth joined #perl6
00:37 dalek niecza: 9ed2aaf | sorear++ |  (7 files):
00:37 dalek niecza: TimToady says methods don't need to be cloned.  Simplify accordingly.
00:37 dalek niecza: review: http://github.com/sorear/niecza/commit/9​ed2aafb0bdc727f0f30ed187aeae4b9d7e6b74e
00:45 au|irc sorear: may I get a niecza commit bit, or do you prefer me sending patches? :)
00:45 au|irc s/patches/pull requests/
00:47 tylercurtis Oh my, a reportedly scarily productive Perl 6 implementor from the past working on the implementation of the recently scarily productive Perl 6 implementor.
00:47 au|irc (it's a very small thing, namely this fresh ubuntu lucid installation has no /usr/local/bin/perl, and I had to change it to /usr/bin/env perl)
00:49 au|irc tylercurtis: well, I'm just this noob trying out a new project like any other, y'know? *smile*
00:50 TimToady au|irc: welcome, are you sure you want a commit bit?  :)
00:50 au|irc TimToady: hey. I missed ya :)
00:51 TimToady yeah, likewise, just a bit, from time to time...  :)
00:51 TimToady thanks for dragging me kicking and screaming onto irc, anyhoo
00:52 au|irc hope you're not still keen on the speech synthesis-broadcast-irc-to-living-room plan anymore :)
00:52 au|irc I tried that, it's dangerous to one's health...
00:53 * TimToady will be glad to take your word for it
00:53 * TimToady doesn't have time to learn from experience anymore, and must mostly learn from others now :)
00:54 au|irc ah. ever the Wu-Li master of Wu-Way
00:54 au|irc or was that wu-wei :)
00:56 sorear au|irc: you already have a commit bit for that.
00:56 au|irc why yes, yes I do.
00:56 sorear au|irc: the /usr/local/bin/perl part is in src/perl6 in the *gasp* pugs repo
00:56 au|irc just figured that out, yeah
00:57 au|irc ...and in the wuwei spirit I've just ln'd /usr/bin/perl locally to /usr/local/bin/perl...
00:57 sorear Though... you'll still probably need to bump STD_REVISION
00:58 * sorear tries to figure out how to add a commit bit
00:58 sorear looks like Dashboard -> niecza -> Admin -> Collaborators -> Add?
00:59 tylercurtis sorear: yes.
00:59 au|irc http://github.com/sorear/n​iecza/edit#collab_buckete
00:59 sorear audreyt?
00:59 au|irc aye
00:59 tedv joined #perl6
01:00 sorear done.  don't abuse it. :)
01:01 * au|irc struggles to remember what it means to abuse a commit bit
01:01 * au|irc fails utterly :)
01:04 TimToady it's when someone thinks they have to forgive you for doing something right.  :)
01:05 au|irc deep. may I quote you. :)
01:06 TimToady I try never to say anything unquotable, and sometimes succeed. :)
01:06 TimToady family calls
01:06 au|irc ditto, in fact
01:06 TimToady have the (in)appropriate amount of fun.
01:07 au|irc have fun unquoting - I hear it's the same as interpolation - sometimes :)
01:07 TimToady how gnostic.
01:07 TimToady &
01:07 * sorear thinks about how to implement packages now
01:07 sorear 'package' and 'our' are pretty important.
01:08 sorear knowing that they aren't cloned makes some things easier
01:12 synth joined #perl6
01:18 ingy hi au|irc
01:18 pugssvn r31741 | audreyt++ | * Change /usr/local/bin/perl to the perl in PATH.
01:18 sorear How deep is the aliasing of an our?
01:19 sorear my $f; package P { our $x = 2; $f = sub () { say $f }; }; #`( XXX ); $f()  # notional harness
01:19 sorear would $P::x = 3 have an effect?
01:19 sorear would $P::x := 3 have an effect?
01:19 au|irc ingy: hi. :) I need to drive back to tamsui for weekly family gathering in, like, 10mins; so just saying hi :) glad to see you here!
01:19 sorear would P::<x> :delete have an effect?
01:19 dalek niecza: a33aa22 | autrijus++ | STD_REVISION:
01:19 dalek niecza: * Bump STD_REVISION to 31741 for the "/usr/bin/env perl" change.
01:19 dalek niecza: review: http://github.com/sorear/niecza/commit/a​33aa223dff4e3541599d33e248122fd7376c5b9
01:20 sorear would ::P := anon package {}; have an effect?
01:21 synth joined #perl6
01:29 stepnem joined #perl6
01:54 sorear std: package Foo {}; package Foo {}
01:54 p6eval std 31741: OUTPUT«[31m===[0mSORRY![31m===[0m␤Illegal redeclaration of symbol 'GLOBAL::<Foo>' (from line 1) at /tmp/gp5o8Xda5G line 1:␤------> [32mpackage Foo {}; package Foo [33m⏏[31m{}[0m␤Illegal redeclaration of symbol 'Foo' (see line 1) at /tmp/gp5o8Xda5G line 1:␤------> [32mpackage Foo
01:54 p6eval ..…
01:54 sorear I thought the point of packages was that they could be merged.
01:55 jnthn rakudo:  package Foo {}; package Foo {} # just curious
01:55 p6eval rakudo dd8d5d: OUTPUT«===SORRY!===␤Illegal redeclaration of symbol 'Foo'␤»
01:59 patspam joined #perl6
02:15 jnthn std: 0777
02:15 p6eval std 31741: OUTPUT«Potential difficulties:␤  Leading 0 does not indicate octal in Perl 6 at /tmp/ERAbZHc0JM line 1:␤------> [32m0777[33m⏏[31m<EOL>[0m␤ok 00:01 111m␤»
02:15 jnthn Awww! I wanted the error to tell me what the syntax was so I didn't ahve to go look it up. :P
02:15 jnthn std: 0o777
02:16 p6eval std 31741: OUTPUT«ok 00:01 111m␤»
02:16 jnthn rakudo: say 0o777
02:16 p6eval rakudo dd8d5d: OUTPUT«511␤»
02:32 snarkyboojum joined #perl6
02:35 tylercurtis rakudo: say: 5;
02:35 p6eval rakudo dd8d5d: OUTPUT«===SORRY!===␤Confused at line 20, near "say: 5;"␤»
02:45 Trashlord joined #perl6
02:53 * ingy builds latest rakudo
02:55 jnthn Just in time to avoid my 5am patch. :P
02:58 snarkyboojum joined #perl6
03:02 dalek rakudo: 6878372 | jonathan++ | src/Perl6/Actions.pm:
03:02 dalek rakudo: First very basic cut of the ==> and <== feed operators.
03:02 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/6​87837289b3978179074449537ef633632ef9f86
03:03 jnthn loliblag: http://6guts.wordpress.com/​2010/07/18/fixes-and-feeds/
03:10 * jnthn afk
03:10 tylercurtis jnthn++
03:27 pugssvn r31742 | lwall++ | [STD] report new octal format in warning as requested by jnthn++
03:28 gbacon joined #perl6
03:31 TimToady sorear: assuming you meant say $x there...the aliasing is very shallow, and only the name is in the lexical scope
03:34 TimToady I think the name is an alias to the container, on the assumption that you won't rebind the variable or destroy the package
03:35 TimToady hmm, in p5 it's an alias to the GV, iirc, so it would see a rebind via glob assignment
03:38 TimToady so only clobbering the package itself or deleting the entire typeglob would have broken the connection
03:38 TimToady typeglob was post name lookup however, and I don't know if we can make a ref that is post name-lookup but pre container-lookup
03:39 TimToady packages are much less important to keeping things running in P6, and package vars don't have to be so effecient
03:40 TimToady so maybe it's best to just keep a link to the package hash and look up the name every time, if we want to keep remote rebindings visible to the our alias
03:40 TimToady not sure what the use case is though
03:40 TimToady it might be one of those things that depends on an 'is rebindable' trait
03:42 TimToady I guess that could work both ways--our $x; $x := new_thing;  $P::x; # does this change?
03:42 TimToady I can argue it both ways, alas.
03:43 TimToady after all, you could conceivably say OUR::<$x> := new_thing to do the rebinding in the package, but then it would be really counter-intuitive that the our $x not change along with it
03:44 TimToady since packages are supposed to reflect some of the more dynamic aspects of Perl 6, unlike in Perl 5 where they had to do double-duty as static repositories, I'd vote for keeping it a named lookup in the package
03:44 nrf joined #perl6
03:45 nrf left #perl6
03:46 jaldhar joined #perl6
03:46 TimToady perhaps there's some way at least to keep the bvalue of the package so that ::P := is visible to any users of P
03:46 TimToady I can see some use cases for swapping out an entire package temporarily and putting it back later
03:48 TimToady I can also that it's too dynamic to live, and global packages should generally stay put, which is more the P5 view
03:48 TimToady s/also/also argue/
03:49 TimToady excellent questions though
03:49 TimToady wish I knew enough to be less waffly.
03:50 TimToady otoh maybe waffling is my best skill...  :)
03:52 TimToady I will try to leave it bubbling in my subconscience, though it's currently in panic mode about my oscon speech on thursday...
03:54 * TimToady wanders off again
04:28 supernovus joined #perl6
04:29 snarkyboojum phenny: tell masak, enjoyed your draft blog post @ http://gist.github.com/479846 and noticed a typo at "The RFCs were either accepted with different amounds of caveats, or rejected."
04:29 phenny snarkyboojum: I'll pass that on when masak is around.
04:30 supernovus In the current Rakudo are use statements with named export tags supported?
04:32 ingy supernovus: try?
04:32 ingy rakudo: use Test 'plan'; say "ok"
04:32 p6eval rakudo dd8d5d: OUTPUT«===SORRY!===␤Confused at line 20, near "use Test '"␤»
04:32 cbk joined #perl6
04:32 ingy looks not
04:33 supernovus When I try to load one, I get a "Confused at line 2, near "use Perlit" error. So, I'm assuming they are currently broken.
04:33 ingy supernovus: sounds like a good assumption :)
04:33 ingy std: use Test 'plan'; say "ok"
04:33 p6eval std 31742: OUTPUT«Compiled ./lib/Test.pm6␤ok 00:01 113m␤»
04:33 xinming joined #perl6
04:34 supernovus I'm porting my "content management system" (if you can call it that) from 'alpha' to 'master' and trying to work out the gotyas.
04:34 ingy nod
04:35 supernovus Hey, I guess the evil hack I had to build regexes from strings isn't needed anymore! Yay for string interpolation in regexes!
04:37 ingy rakudo: { die "foo"; CATCH { say $! } }
04:37 p6eval rakudo dd8d5d: OUTPUT«foo␤»
04:38 ingy rakudo: { die "foo"; { CATCH { say $! } }; }
04:38 p6eval rakudo dd8d5d: OUTPUT«foo␤  in main program body at line 20:/tmp/VHS4Zy25UR␤»
04:38 ingy rakudo: { die "foo"; { CATCH { say $! } } }
04:38 p6eval rakudo dd8d5d: OUTPUT«foo␤  in main program body at line 20:/tmp/IoAf0u6ez9␤»
04:38 ingy rakudo: { die "foo"; { CATCH { say ">> $!" } } }
04:38 p6eval rakudo dd8d5d: OUTPUT«foo␤  in main program body at line 20:/tmp/HNl7MmExWn␤»
05:20 molaf joined #perl6
05:21 snarkyboojum joined #perl6
05:24 skids joined #perl6
05:32 ashleydev joined #perl6
05:45 Sarten-X joined #perl6
05:47 ingy rakudo: sub foo { say $_ }; { foo("HAI") }
05:47 p6eval rakudo 687837: OUTPUT«Too many positional parameters passed; got 1 but expected 0␤  in 'foo' at line 20:/tmp/yUIekayymb␤  in main program body at line 20:/tmp/yUIekayymb␤»
05:47 ingy rakudo: sub foo($s) { say $s }; { foo("HAI") }
05:47 p6eval rakudo 687837: OUTPUT«HAI␤»
05:47 ingy rakudo: sub foo($s) { say $s }; { foo("HAI") CATCH {} }
05:48 p6eval rakudo 687837: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 20␤»
05:48 ingy rakudo: sub foo($s) { say $s }; { foo("HAI"); CATCH {} }
05:48 p6eval rakudo 687837: OUTPUT«HAI␤Null PMC access in setprop()␤  in main program body at line 20:/tmp/IlmcA0fTDv␤»
05:48 ingy wtf?
05:48 ingy rakudo: sub foo($s) { say $s }; { say "HO; CATCH {} }
05:48 p6eval rakudo 687837: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 20␤»
05:49 ingy rakudo: sub foo($s) { say $s }; { say "HO"; CATCH {} }
05:49 p6eval rakudo 687837: OUTPUT«HO␤Null PMC access in setprop()␤  in main program body at line 20:/tmp/cXWd8PlhLH␤»
05:49 ingy rakudo: { say "HO"; CATCH {} }
05:49 p6eval rakudo 687837: OUTPUT«HO␤Null PMC access in setprop()␤  in main program body at line 20:/tmp/03Unn_EZpt␤»
05:49 ingy CATCH is completely busted?
05:50 ingy rakudo: { say "HO"; CATCH { say "XXX"; } }
05:50 p6eval rakudo 687837: OUTPUT«HO␤Null PMC access in setprop()␤  in main program body at line 20:/tmp/MD9St6CLMC␤»
05:50 ingy jnthn: you about?
05:51 ingy std: { say "HO"; CATCH { say "XXX"; } }
05:51 p6eval std 31742: OUTPUT«ok 00:01 113m␤»
05:51 ingy std: { say "HO"; CATCH {} }
05:51 p6eval std 31742: OUTPUT«ok 00:01 113m␤»
05:51 ingy rakudo: say "HO"; CATCH { say "XXX"; }
05:51 p6eval rakudo 687837: OUTPUT«HO␤»
05:52 ingy rakudo: try { say "HO"; CATCH { say "XXX"; } }
05:52 p6eval rakudo 687837: OUTPUT«HO␤»
05:53 ingy phenny: tell jnthn CATCH is bareblock appears to be hosed. try: rakudo: { say "HO"; CATCH {} }
05:53 phenny ingy: I'll pass that on when jnthn is around.
05:54 ingy phenny: tell jnthn *in
05:54 phenny ingy: I'll pass that on when jnthn is around.
05:56 snarkyboojum rakudo: 3,0,8 ==> map { $_ ** 2 } ==> sort ==> reverse
05:56 p6eval rakudo 687837:  ( no output )
05:59 snarkyboojum rakudo: 3,0,8 ==> map { $_ ** 2 } ==> sort ==> reverse ==> my @a; say @a.join(',') #w00t
05:59 p6eval rakudo 687837: OUTPUT«64,9,0␤»
06:12 supernovus Hmm, 'is rw' doesn't work anymore?
06:13 sorear TimToady: I'll do bvalue sharing for now.
06:15 supernovus hmm, never mind, my function is using 'is rw' when it should be using 'is copy'.
06:16 sorear package Foo { };  # What sort of thing is ::Foo?
06:21 sorear The synopses talk about a hierarchy of types of packagey things, Package, Module, Class, Grammar
06:21 sorear The synopses also say that after class Foo {}, Foo isa Foo
06:21 sorear which contradicts :(
06:23 supernovus rakudo: my regex woot { ^ ( .*?) \: }; if "hello:" ~~ /:s <woot> / { say "yes" }
06:23 p6eval rakudo 687837: OUTPUT«Method 'woot' not found for invocant of class 'Cursor'␤  in <anon> at line 20:/tmp/xBxSYRJKxH␤  in 'Cool::match' at line 2345:CORE.setting␤  in 'Regex::ACCEPTS' at line 5416:CORE.setting␤  in 'infix:<~~>' at line 401:CORE.setting␤  in main program body at line
06:23 p6eval ..20:/tmp/xBxSYRJKxH␤»
06:24 supernovus I think that be a problem.
06:25 sorear you need to use <&woot> to call a lexical regex
06:25 sorear <woot> is only for grammar rules
06:25 sorear also, you're using sigspace before ^.  don't do that.
06:27 ingy w00t!!!
06:27 ingy testml-pm6 is finally completely ported and passing the entire testml-tml test suite.
06:27 ingy now I will sleep!
06:28 supernovus sorear: Yeah, I'll kill the sigspace. I didn't see the part about prefixing lexical regexes with & in the synopsis. I just found it now. There are still examples in there using <rulename> syntax...
06:29 sorear supernovus: it's actually optional in the synopsis, but rakudo doesn't handle the optionality yet
06:30 ingy sorear: that Q/t problem was due to me thinking a \t was a tab in a certain context... :\
06:30 supernovus sorear: Ah, okay. Another of those gotyas when porting from alpha. I hope to have ww6 ported soon.
06:31 sorear ww6?
06:31 * sorear isn't sure he understands the distinction between WHO and HOW
06:32 supernovus My sort-of content management system. It eventually will replace ww5 which powers my websites. The previous version of ww6 only worked with the 'alpha' branch.
06:51 sorear grr. jnthn, moving the bar ;)
07:16 dalek niecza: d38b860 | sorear++ |  (2 files):
07:16 dalek niecza: Implement parsing for package, module, grammar, role
07:16 dalek niecza: review: http://github.com/sorear/niecza/commit/d​38b8605ec96ce8128104a6bf66281e66fc9a309
07:16 dalek niecza: b1f1f63 | sorear++ | Niecza/Actions.pm:
07:16 dalek niecza: Suppress not used warnings if low-level code is used in the scope
07:16 dalek niecza: review: http://github.com/sorear/niecza/commit/b​1f1f635521fe13f58db4758ab98b42ef314ca02
07:21 envi^home joined #perl6
07:24 meppl joined #perl6
07:27 * sorear is lost in a maze of confusing postfix operator syntax rules
07:29 synth joined #perl6
08:08 molaf joined #perl6
08:18 sorear If type objects are members of the type they describe, what is the logic behind Regex.ACCEPTS() and regex { foo }.ACCEPTS() being completely unrelated?
08:26 * sorear has trouble reconciling type objects are types with type objects are objects sometimes
08:27 sorear it seems as though Regex and regex { foo } are so different that they shouldn't share any type more specific than Any
08:27 sorear rakudo: my Regex $rx; #`(forget to init); say "foo" ~~ $rx
08:27 p6eval rakudo 687837: OUTPUT«0␤»
08:27 sorear rakudo: my Regex $rx; #`(forget to init); say /2/ ~~ $rx
08:27 p6eval rakudo 687837: OUTPUT«1␤»
08:35 dalek niecza: 2dc1686 | sorear++ |  (3 files):
08:35 dalek niecza: Implement .^ meta-calls
08:35 dalek niecza: review: http://github.com/sorear/niecza/commit/2​dc1686db08ac64f8b1d49cea6cfa1b1a2bc107e
08:35 dalek niecza: f23f3aa | sorear++ |  (4 files):
08:35 dalek niecza: Implement ClassHOW.isa and ClassHOW.does
08:35 dalek niecza: review: http://github.com/sorear/niecza/commit/f​23f3aa94a016434e12e9ef5af036fa01a7ba451
08:43 tadzik joined #perl6
08:49 snarkyboojum joined #perl6
08:59 sorear I beleive at this point I'm mostly blocking on a sensible conception of lists
09:00 sorear Are there any list experts not on vacation now?
09:09 timbunce joined #perl6
09:15 timbunce Which of the docs linked to on http://perl6.org/documentation/ would be a good (and reasonably upto date) book/tutorial-like way to learn perl6?
09:29 * moritz_ back
09:29 sorear the R* book?  dunno if it's linked
09:29 ab5tract joined #perl6
09:29 moritz_ timbunce: get the latest PDF from http://github.com/perl6/book/downloads
09:30 timbunce moritz_: thanks!
09:30 timbunce I also found www.LearningPerl6.com  but svn co http://svn.lohutok.net/learning_perl/trunk/llama6 says "Could not resolve hostname `svn.lohutok.net': Host not found" Has the hostname changed?
09:31 moritz_ it hasn't been updated in years
09:31 timbunce ah, ok. thanks.
09:33 timbunce Any other docs linked to on http://perl6.org/documentation/ you can recommend as a good (and reasonably upto date) book/tutorial-like way to learn perl6?
09:33 tadzik perl 6 advent calendar maybe?
09:35 timbunce http://en.wikibooks.org/wiki/Perl_6_Programming seems to have decent content as first glance
09:35 timbunce got to go now, I've a plane to catch, and not I've a PDF to read on the flight :) thanks
09:38 Alias_ joined #perl6
09:41 payload joined #perl6
09:56 sorear What is sandbox.rakudo.de?
09:56 sorear (other than "a vhost on feather2 with exactly the same DocumentRoot as perl6.org")
10:01 cognominal rakudo:  my @a = 1..2; my @b := @a;  @a = 'a'..'b'; say @b
10:01 p6eval rakudo 687837: OUTPUT«ab␤»
10:02 sorear moritz_: do you know who runs planet6 and can chase jnthn's move?
10:02 cognominal What if  want to bind @b to the initial value of @a?
10:02 cognominal *if I
10:03 sorear then you would use =, not :=
10:04 cognominal but if I want to avoid a copy?
10:04 sorear @a = 'a'..'b' is an in place operation
10:04 sorear it destroys the old value of @a
10:05 sorear you cannot avoid a copy if you are going to say @a = 'a'..'b' later
10:05 sorear if you want to avoid copying, you will need to use := consistently
10:05 moritz_ sorear: [Coke] is the man
10:06 cognominal rakudo:  my @a = 1..2; my @b ::= @a;  @a = 'a'..'b'; say @b
10:06 p6eval rakudo 687837: OUTPUT«ab␤»
10:06 moritz_ [Coke]: jnthn's blog moved, the new feed is at http://6guts.wordpress.com/feed/ - could you please update the planetsix config?
10:09 jhuni joined #perl6
10:09 TiMBuS cognominal, so you want like a lazy copy on write?
10:09 jhuni joined #perl6
10:10 TiMBuS thing
10:12 * sorear out.
10:12 TiMBuS rakudo: my @a = 1..2; my @b := @a; @a := 'a'..'b'; say @b
10:12 p6eval rakudo 687837: OUTPUT«ab␤»
10:14 TiMBuS didnt think so
10:16 cognominal rakudo:  my @a = 1..3; my @b := @a; @a[1]=4   @a = 'a'..'b'; say @b.perl  # well I want to bind to the original array and  would want  to get the later change _in the array as well  [1,4, 3].  That it is orignally a range even makes the things more complicated
10:16 p6eval rakudo 687837: OUTPUT«===SORRY!===␤Confused at line 20, near "@a[1]=4   "␤»
10:16 cognominal oops
10:17 cognominal rakudo:  my @a = [1, 2, 3]; my @b := @a; @a[1]=4;   @a = ['a','b','c'] ; say @b.perl  # well I want to bind to the original array and  would want  to get the later change _in the array as well  [1,4, 3].  That it is orignally a range even makes the things more complicated
10:17 p6eval rakudo 687837: OUTPUT«[["a", "b", "c"]]␤»
10:21 sorear cognominal: you cannot change a range
10:22 sorear the = operator makes a copy of an array. -always-
10:22 sorear I think this is what you want
10:23 sorear rakudo: my @a := [ 1..3 ] #`( [] makes copy ) ;  my @b := @a; @a[1] = 4; @a := [ 'a' .. 'b' ]; say @b.perl
10:23 p6eval rakudo 687837: OUTPUT«["a", "b"]␤»
10:24 sorear rakudo is violating the spec here
10:24 sorear pugs: my @a := [ 1..3 ] #`( [] makes copy ) ;  my @b := @a; @a[1] = 4; @a := [ 'a' .. 'b' ]; say @b.perl
10:24 p6eval pugs:  ( no output )
10:24 sorear pugs: my @a := [ 1..3 ];  my @b := @a; @a[1] = 4; @a := [ 'a' .. 'b' ]; say @b.perl
10:24 p6eval pugs: OUTPUT«*** Can't modify constant item: VUndef␤    at /tmp/57f7xyjFFO line 1, column 34-43␤»
10:24 cognominal sorear, forget about the range.  I can convert to an array beforehand.   I just want to track the change in an array even if the original variable bound to it is bound to another value.
10:25 sorear cognominal: rakudo binding is broken in exactly that case
10:25 sorear rakudo: my $a = 1; my $b := $a; $a := 2; say $b
10:25 p6eval rakudo 687837: OUTPUT«2␤»
10:25 sorear pugs: my $a = 1; my $b := $a; $a := 2; say $b
10:25 p6eval pugs: OUTPUT«1␤»
10:26 sorear niecza: my $a = 1; my $b := $a; $a := 2; say $b
10:26 p6eval niecza: OUTPUT«1␤»
10:26 cognominal Apparently @a := @b is supposed to make @a and @b synonymous. That's what it does by that's not what I want.
10:26 sorear no
10:27 sorear @a := @b is supposed to act like $a = $b
10:27 cognominal I don't say there is no use for :=.  I say that's not what I want.
10:27 sorear right now in rakudo, binding a variable to which other things are bound is not working
10:28 sorear it propagates
10:28 sorear it shouldn't
10:28 * sorear out for real.
10:40 Trashlord joined #perl6
10:41 TiMBuS oh cool, so my attempt should've worked. that makes more sense to me then
10:42 TiMBuS pugs: my @a = 1..2; my @b := @a; @a := 'a'..'b'; say @b
10:42 p6eval pugs: OUTPUT«12␤»
10:42 TiMBuS cool
10:45 ab5tract joined #perl6
10:49 whiteknight joined #perl6
10:52 ab5tract joined #perl6
10:54 meteorjay joined #perl6
10:54 HarryS joined #perl6
10:54 cono joined #perl6
10:54 lue joined #perl6
10:54 Lorn joined #perl6
10:54 proller joined #perl6
10:54 pmichaud joined #perl6
10:54 BinGOs joined #perl6
10:54 gabiruh joined #perl6
10:54 Juerd joined #perl6
10:54 m6locks joined #perl6
10:54 phenny joined #perl6
10:54 cxreg joined #perl6
10:54 frodwith joined #perl6
10:54 wolverian joined #perl6
10:54 Woody2143 joined #perl6
10:54 lestrrat joined #perl6
10:54 ingy joined #perl6
10:54 jnthn joined #perl6
10:55 HarryS joined #perl6
10:57 Trashlord joined #perl6
10:59 rokoteko joined #perl6
11:04 bb__ joined #perl6
11:04 bb__ oi
11:04 bb__ hello
11:05 bb__ can anyone help?
11:06 tadzik well, you'll have to describe your problem first
11:06 bb__ can anyone explain what's PERL?
11:06 bb__ what advantage this language ?
11:07 bb__ for what was created?
11:07 gbacon joined #perl6
11:07 tadzik long time ago it was for text manipulation I believe, now it's fairly everywhere
11:09 bb__ why it is used in data centers?
11:10 tadzik what is the advantage? Well, it's _very_ flexible. And there are loads of modules available, but for Perl 5 so fa
11:11 tadzik no idea. Maybe because of excellent database support
11:11 bb__ is a language-oriented web ?
11:11 tadzik you mean a web-oriented language?
11:14 bb__ yes
11:16 tadzik I wouldn't say so. It's one of its uses, and is used quite widely in the web, but it definitely isn't the only use, and the language isn't designed to be web-oriented
11:20 bb__ hummm
11:20 bb__ ok
11:20 bb__ thank you tadzik
11:44 TiMBuS i always enjoy these random visits
11:52 pugssvn r31743 | moritz++ | [t/spec] unfudge two passing tests for rakudo
11:52 masak joined #perl6
11:52 masak oh hai, #perl6!
11:52 phenny masak: 00:14Z <jnthn> tell masak s/One the one
11:52 phenny masak: 00:14Z <jnthn> tell masak s/One the one hand/On the one hand/ # and sorry I can't even use a message bot competently :-)
11:53 phenny masak: 04:29Z <snarkyboojum> tell masak enjoyed your draft blog post @ http://gist.github.com/479846 and noticed a typo at "The RFCs were either accepted with different amounds of caveats, or rejected."
11:53 masak jnthn: thanks; fixing.
11:53 moritz_ \o/ it's masak
11:53 masak snarky: thanks; fixing.
11:53 masak moritz_: \o/
11:53 * moritz_ enjoyed a very good concert by Mark Knopfler yesterday night
11:57 pugssvn r31744 | moritz++ | [t/spec] tests for RT #74236, &Class::method access
12:00 mantovani joined #perl6
12:04 pugssvn r31745 | moritz++ | [t/spec] tests for RT #69676, delegating .new to self.Mu::new
12:05 masak should $*ARGFILES.slurp work?
12:05 masak rakudo: say $*ARGFILES.slurp
12:05 p6eval rakudo 687837: OUTPUT«Method 'readall' not found for invocant of class ''␤  in 'IO::slurp' at line 4943:CORE.setting␤  in main program body at line 20:/tmp/_4li0Z8qWO␤»
12:05 moritz_ yes, IMHO
12:05 * masak submits rakudobug
12:06 masak rakudo: say $*ARGFILES.WHAT
12:06 p6eval rakudo 687837: OUTPUT«IO::ArgFiles()␤»
12:06 masak rakudo: say $*ARGFILES ~~ IO
12:07 p6eval rakudo 687837: OUTPUT«1␤»
12:07 moritz_ rakudo: say slurp('/etc/passwd/')
12:07 p6eval rakudo 687837: OUTPUT«Operation not permitted in safe mode␤  in 'Safe::forbidden' at line 2:/tmp/QLtK2NLECa␤  in main program body at line 20:/tmp/QLtK2NLECa␤»
12:11 Mowah joined #perl6
12:13 moritz_ TimToady: why has S12-methods/multi.t line 191 an '#OK not used' annotation? the method *is* used later on
12:14 masak does the spec mention #OK ?
12:15 moritz_ no
12:15 masak er, the non-STD spec, I mean. :)
12:15 moritz_ except the STD.pm6 part of... right :-)
12:16 azert0x joined #perl6
12:17 pugssvn r31746 | moritz++ | [t/spec] tests for RT #75872, awesome error message when multi method dispatch finds no matching candidate
12:17 pugssvn r31746 |
12:17 pugssvn r31746 | Moritz ows jnthn++ a beer.
12:17 masak ows?
12:17 moritz_ owes
12:17 * moritz_ can't type
12:17 masak ohw!
12:18 * moritz_ can't spell either
12:18 moritz_ he gets a beer, OK? :-)
12:18 masak :)
12:18 szbalint let's find an irish pub at YAPC::EU
12:18 masak \o/
12:18 moritz_ erm, I meant #OK? :-)
12:18 masak d'OwK!
12:23 moritz_ rakudo: class A { method x { say "in x" } }; A.new ~~ :x
12:23 p6eval rakudo 687837: OUTPUT«in x␤»
12:23 * moritz_ tries to implement $str.IO ~~ :e
12:27 masak when I release the blog post (in a little while), I thought I'd tweet about it being "Perl 6 10th birthday". is anyone against this?
12:27 masak the 19th of July is the date of the announcement of Perl 6, but the 18th is the date of the mug breakage.
12:33 moritz_ rakudo: say ('README' ~~ :d).defined
12:33 p6eval rakudo 687837: OUTPUT«1␤»
12:33 moritz_ rakudo: say ('nonexistant' ~~ :d).defined
12:33 p6eval rakudo 687837: OUTPUT«1␤»
12:36 moritz_ masak: I'm going to break ufo, proto and pls :-)
12:36 masak moritz_: go right ahead.
12:36 moritz_ compiling...
12:38 masak rakudo: .trans("a" => "b") for "a\nb".split("\n"); say "alive"
12:38 p6eval rakudo 687837: OUTPUT«too few positional arguments: 2 passed, 3 (or more) expected␤  in main program body at line 20:/tmp/d9YVABba2y␤»
12:38 masak this one is on file, right? 'cause it's pretty annoying.
12:39 moritz_ no idea
12:40 moritz_ but I know where the tests go :-)
12:40 moritz_ integration/real-strings.t
12:40 masak rakudo: (~$_).trans("a" => "b") for "a\nb".split("\n"); say "alive"
12:40 p6eval rakudo 687837: OUTPUT«alive␤»
12:41 * masak submits rakudobug, Justin Case
12:41 masak "- why does Rakudo Star give this error message? - because there's a leak in the object model somewhere; sorry :/"
12:43 rv2733 joined #perl6
12:44 * masak is unexpectedly called away
12:45 masak I've fixed all reported typos etc so far in the blog post, and the latest version is at http://gist.github.com/479846 -- will post in just a couple of hours.
12:56 masonkramer joined #perl6
12:58 tylercurtis joined #perl6
13:07 jferrero joined #perl6
13:20 moritz_ prefix:<not> has loser precedence than infix:<,>, corrrect?
13:20 moritz_ so tests like ok not "t".IO ~~ :f, "~~:f returns false on directories";  are wrong
13:25 sftp joined #perl6
13:26 tylercurtis moritz: it looks like according to viv, "not 5, 6" parses as infix:<,>(prefix:<not>(5), 6).
13:26 moritz_ hum, ok
13:27 tylercurtis moritz_: S03 agrees: http://perlcabal.org/syn/S0​3.html#Operator_precedence
13:27 tylercurtis not and so are loose unary precedence
13:28 tylercurtis , and ; are comma operator precedence. They're looser.
13:29 tylercurtis Although, why not use &nok?That would eliminate any potential for confusion.
13:30 moritz_ yes, that's what I do now
13:40 jnthn o/
13:40 phenny jnthn: 05:53Z <ingy> tell jnthn CATCH is bareblock appears to be hosed. try: rakudo: { say "HO"; CATCH {} }
13:40 phenny jnthn: 05:54Z <ingy> tell jnthn *in
13:41 moritz_ rakudo: { say "HO"; CATCH {} }
13:41 p6eval rakudo 687837: OUTPUT«HO␤Null PMC access in setprop()␤  in main program body at line 20:/tmp/C6wGnqae_T␤»
13:41 moritz_ and try.t has one failure
13:41 moritz_ \o jnthn
13:42 tadzik joined #perl6
13:42 jnthn o/ moritz_
13:42 jnthn See you've been following behind my RT ticket fixes with tests. \o/
13:43 moritz_ 5 or so left
13:43 jnthn I'll try and make it more
13:43 Maddingue joined #perl6
13:43 jnthn ;-)
13:43 moritz_ and I have .IO form of file tests ready to commit... just running one final test
13:43 moritz_ (I've thought that twice before :-)
13:44 jnthn :-)
13:45 moritz_ phenny: tell masak re your blog draft, it somehow reads as if audreyt++'s gender change was in direct relation to her leaving #perl6. I know it's not meant that way; IMHO you should keep a bit of linguistic distance between the two events
13:45 phenny moritz_: I'll pass that on when masak is around.
13:47 au|irc yeah, well, in fact there is a 12month distance :)
13:47 au|irc # http://irclog.perlgeek.de/​perl6/2005-12-10#i_-402368
13:47 moritz_ au|irc: I know
13:48 jnthn moritz_: I was about to ask you if you were the right person to ask about updating planetsix with my new blog, but I see in the backlog you already passed the update request along to the right person. Thanks!
13:49 moritz_ jnthn: you're welcome
13:49 moritz_ in a brief flash of nostalgia I found that my first patch to Rakudo as applied in May 2008
13:50 moritz_ commit 7d2219f1327ce503c95641c3a0f76762785c14ba
13:50 jnthn moritz_: I went and found mine a while back.
13:50 jnthn It added the Junction class. :-)
13:52 moritz_ git++ # for making nostalgia so easy :-)
13:52 jnthn rakudo: 1..10 ==> map { $_ ** 2 } ==> sort { $^b <=> $^a } ==> my @foo; say @foo.perl
13:52 p6eval rakudo 687837: OUTPUT«[100, 81, 64, 49, 36, 25, 16, 9, 4, 1]␤»
13:52 jnthn \o/
13:53 moritz_ jnthn++
13:53 moritz_ rakudo: 1..10 ==> map { $_ ** 2 } ==> sort { $^b <=> $^a } ==>> my @foo; say @foo.perl
13:53 jnthn moritz_: I didn't add any tests though.
13:53 p6eval rakudo 687837: OUTPUT«===SORRY!===␤Sorry, the ==>> feed operator is not yet implemented at line 20, near " my @foo; "␤»
13:54 jnthn moritz_: It was kinda > 5am :_)
13:54 moritz_ jnthn: you're excused :-)
13:54 pugssvn r31747 | moritz++ | [t/spec] switch to .IO form of file tests
13:54 pugssvn r31747 |
13:54 pugssvn r31747 | refudge filetest.t for rakudo
13:57 moritz_ jnthn: hey, your implementaiton passes the first 7 tests in feed.t
13:57 jnthn moritz_: whee
13:57 tadzik http://github.com/rakudo/rakudo/tree/1b​6cbf6d51b787556f2b47cd55dbf7b00fde04c0 is that the first Rakudo ever happened? When more-less was the birth of the project?
13:58 dalek rakudo: 36c5464 | moritz++ |  (6 files):
13:58 dalek rakudo: switch file tests to $filename.IO ~~ :e; implement IO.z
13:58 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/3​6c546444fb4a7bfe214cf46d1ac85a3205b57d1
14:00 pugssvn r31748 | moritz++ | [t/spec] fudge feed.t for rakudo
14:02 pugssvn r31749 | moritz++ | [t/spec] rename feed.t to S03-feeds/basic.t
14:02 jnthn tadzik: Looks along those lines. And wow: http://github.com/rakudo/rakudo/blob/1b6cbf6d5​1b787556f2b47cd55dbf7b00fde04c0/lib/grammar.g
14:02 jnthn Quite different from today's Grammar.pm
14:03 tadzik quite
14:03 moritz_ but still readable
14:03 jnthn Yes.
14:04 moritz_ I guess :w is now :s?
14:05 tadzik are backticks working in rakudo?
14:05 jnthn moritz_: That's my guess too
14:05 jnthn moritz_: But it's in a rule
14:05 jnthn So I don't quite grok why it'd be needed there
14:05 moritz_ maybe rules weren't quite understood back then :-)
14:06 au|irc phenny: tell masak s/lower-numered/lower-numbered/ too :) I'll readjust the zh translation based on the final posted version tomorrow. thx again for writing this. :)
14:06 phenny au|irc: I'll pass that on when masak is around.
14:06 * au|irc waves g'nite...
14:06 moritz_ o/
14:06 jnthn nite o/
14:07 pugssvn r31750 | Kodi++ | [t/spec/S32-temporal] Fixed smart links.
14:09 dalek rakudo: e3ba686 | moritz++ | t/spectest.data:
14:09 dalek rakudo: run first feed test file
14:09 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/e​3ba686600523635e1d7cd2488515679199be534
14:09 dalek rakudo: a787329 | (Timothy Totten)++ |  (2 files):
14:09 dalek rakudo: Added %z to DateTime::strftime.
14:09 dalek rakudo: Signed-off-by: Moritz Lenz <moritz@faui2k3.org>
14:09 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/a​787329ce7381be5f9e19e5cf0fe423a795ff22d
14:14 TiMBuS joined #perl6
14:19 moritz_ jnthn: http://rt.perl.org/rt3/Tic​ket/Display.html?id=76486 (just look at the last message) seems to be a pretty interesting bug
14:20 moritz_ jnthn: in particular, if you remove the multi sub a([]) candidate, you get a working dispatch
14:20 moritz_ but withouth removing it, you get a "No applicable candidates found"
14:20 jnthn moritz_: yes, that's one of the ones that I currently have open in my browser.
14:20 moritz_ ah
14:20 jnthn It's a decided wtf.
14:20 jnthn My suspicion is it'll turn out to be a silly mistake that'll take me a decent bit of debugging to find.
14:21 moritz_ I guess I'm carrying coals to Newcastle :-)
14:22 jnthn Oar man, I guess you are like!
14:23 jnthn </geordie> # well, bad impression of :-)
14:29 pugssvn r31751 | moritz++ | [t/spec] test for RT #76476, monkey-typed method new is not called
14:30 moritz_ rakudo: sub foo { my $y; our sub bar { say $y } }; bar
14:30 p6eval rakudo 687837: OUTPUT«Null PMC access in type()␤  in 'bar' at line 20:/tmp/rkrE5IWFBI␤  in main program body at line 20:/tmp/rkrE5IWFBI␤»
14:33 pugssvn r31752 | moritz++ | [t/spec] test for RT #76466#
14:37 Kodi joined #perl6
14:37 envi_home2 joined #perl6
14:38 Kodi moritz_: I've sent a patch to rakudobug@perl.org twice and I can't find it on rt.perl.org. Are submissions not posted automatically?
14:38 moritz_ Kodi: they go through a manual spam filter, so it can take some time
14:39 mberends phenny, tell masak excellent "10th Birthday of Perl 6" blog post. It is beautifully written :-)
14:39 phenny mberends: I'll pass that on when masak is around.
14:39 Kodi moritz_: Okay.
14:40 pugssvn r31753 | moritz++ | [t/spec] test for RT #76452, list assignment in function call
14:43 jnthn turing^Wchurch &
14:46 moritz_ http://rt.perl.org/rt3/Tic​ket/Display.html?id=76448 is strange indeed
14:47 moritz_ and the title is a bit misleading
14:47 moritz_ rakudo: say defined("a" => 3).Int
14:47 p6eval rakudo 687837: OUTPUT«Method 'Int' not found for invocant of class 'Pair'␤  in main program body at line 20:/tmp/P1CNHmIjwj␤»
14:49 tylercurtis rakudo: say abs("a" => 3).Int
14:49 p6eval rakudo a78732: OUTPUT«Method 'Int' not found for invocant of class 'Pair'␤  in main program body at line 20:/tmp/62BpIQF1ko␤»
14:50 tylercurtis rakudo: say abs("a" => 3)
14:50 p6eval rakudo a78732: OUTPUT«Method 'Num' not found for invocant of class 'Pair'␤  in 'Cool::Numeric' at line 1707:CORE.setting␤  in 'Cool::Numeric' at line 1708:CORE.setting␤  in 'Cool::abs' at line 6248:CORE.setting␤  in 'prefix:<abs>' at line 1882:CORE.setting␤  in main program body at line
14:50 p6eval ..20:/tmp/YEvOfaYm…
14:50 moritz_ rakudo: say defined("a" => 3)
14:50 p6eval rakudo a78732: OUTPUT«1␤»
14:50 moritz_ you see, it seems to work for pairs
14:50 JimmyZ joined #perl6
14:51 ab5tract mberends, where is this post? i don't see it on masak's use.perl.org feed
14:51 tylercurtis rakudo: class Foo { }; say defined(Foo.new).Int
14:51 moritz_ it's not yet published... masak posted a gist URL somewhere today
14:51 p6eval rakudo a78732: OUTPUT«Method 'Int' not found for invocant of class 'Foo'␤  in main program body at line 20:/tmp/xCFwPreF9Q␤»
14:51 moritz_ ab5tract: you can find it in the IRC logs
14:51 tadzik http://gist.github.com/479846
14:51 ab5tract thanks :)
14:52 moritz_ tadzik++
14:52 tadzik :)
14:52 ab5tract while im asking questions
14:52 ab5tract does anyone have a link to TimToady's presentation in which he talks about 'ballistic' aproach to programming?
14:52 ab5tract i believe i received the link here last year (or year before) when i was asking about state of the onions
14:54 ab5tract (or i should just use irc logs..)
14:54 tylercurtis moritz: I think that's parsing as defined(("a" => 3).Int).
14:55 tylercurtis s/moritz/moritz_/
14:55 moritz_ tylercurtis: yes
14:55 JimmyZ rakudo: (5,2,6,3) ==> sort ==> my @a; say @a;
14:55 p6eval rakudo a78732: OUTPUT«2356␤»
14:55 JimmyZ It works! jnthn++
14:55 moritz_ ab5tract: I remember that the talk was recorded somewhere on video, but the video wasn't linked on the announcement page or something
14:56 TimToady moritz_: it's the parameter $z that isn't used
14:56 tylercurtis rakudo: (5, 2, 6, 3) ==> sort ==> say;
14:56 p6eval rakudo a78732: OUTPUT«2356␤»
14:56 tylercurtis JimmyZ: you can feed to &say, too. :)
14:57 tylercurtis rakudo: (5, 2, 6, 3) ==> sort ==> my @a ==> say; say @a;
14:57 p6eval rakudo a78732: OUTPUT«2356␤2356␤»
14:57 moritz_ TimToady: is 'defined' supposed to be a prefix?
14:57 TiMBuS perl6 -e 'my @a <== 1..Inf; @a[2..4] ==> say'
14:57 TiMBuS 345
14:58 JimmyZ tylercurtis: aye
14:58 TiMBuS i replaced 'push' with &infix:<:=>
14:58 TiMBuS in make_feed
14:58 TimToady moritz_: it's not in STD
14:59 moritz_ TiMBuS: then try: my @a <== 1..Inf; @a[2..4] ==> say; @a.push: 5; say @a;
14:59 TimToady it's just a method/function, unless we decide it's worth being an exception, which is dubious
14:59 TimToady well, I'm dubious, it's dubitable
14:59 TiMBuS my thunder..
15:00 TiMBuS D:
15:00 TimToady bbl &
15:00 moritz_ TimToady: then 'abs' shouldn't be a prefix either, no?
15:00 JimmyZ night all
15:00 ashleydev joined #perl6
15:01 JimmyZ joined #perl6
15:02 tylercurtis moritz_: STD appears to parse both abs and defined as tighter than .Int
15:05 moritz_ std: not(1)
15:05 p6eval std 31753: OUTPUT«ok 00:01 112m␤»
15:06 moritz_ I don't understand this
15:06 amkrankruleuen joined #perl6
15:06 tylercurtis moritz_: Which is consistent with S03, since some-ident(some-args) is always a function call and thus a term.
15:06 moritz_ but why doesn't it complain about not finding a sub &not?
15:07 moritz_ std: foo(1)
15:07 p6eval std 31753: OUTPUT«[31m===[0mSORRY![31m===[0m␤Undeclared routine:␤      'foo' used at line 1␤Check failed␤FAILED 00:01 112m␤»
15:07 moritz_ std: not(1)
15:07 p6eval std 31753: OUTPUT«ok 00:01 112m␤»
15:07 amkrankruleuen hi
15:07 moritz_ ho
15:08 tylercurtis moritz_: because STD's CORE.setting declares a proto for not.
15:09 moritz_ huh
15:09 moritz_ so we have both a prefix and a sub with the same name?
15:09 Kodi left #perl6
15:09 tylercurtis moritz_: we have abs, don't we?
15:10 moritz_ rakudo: say abs 5
15:10 p6eval rakudo a78732: OUTPUT«5␤»
15:10 moritz_ rakudo: say abs(5)
15:10 p6eval rakudo a78732: OUTPUT«5␤»
15:11 tylercurtis Hmm... S29 says that abs isn't in the default namespace anymore, but S32-Numeric says that it's exported.
15:11 moritz_ screw S29 then :-)
15:12 tylercurtis although S32-Basics doesn't say that not is exported.
15:13 pugssvn r31754 | moritz++ | [S29] remove fossile noted by tylercurtis++
15:15 tylercurtis rakudo: (sin(-30)).abs.say
15:15 p6eval rakudo a78732: OUTPUT«0.988031624092862␤»
15:15 tylercurtis rakudo: sin(-30).abs.say
15:15 p6eval rakudo a78732: OUTPUT«0.988031624092862␤»
15:16 tylercurtis rakudo: say &prefix:<abs>
15:16 p6eval rakudo a78732: OUTPUT«prefix:<abs>␤»
15:16 tylercurtis rakudo: say &prefix:<sin>
15:16 p6eval rakudo a78732: OUTPUT«Could not find sub &prefix:<sin>␤  in main program body at line 20:/tmp/xO_VkAQcH9␤»
15:17 tylercurtis rakudo: say abs -5, -6;
15:18 p6eval rakudo a78732: OUTPUT«5-6␤»
15:18 tylercurtis rakudo: say sin -5, -6;
15:18 p6eval rakudo a78732: OUTPUT«Method 'Bridge' not found for invocant of class 'Failure'␤  in 'infix:<*>' at line 3370:CORE.setting␤  in 'to-radians' at line 2906:CORE.setting␤  in 'Num::sin' at line 3566:CORE.setting␤  in 'sin' at line 3225:CORE.setting␤  in 'sin' at line 1897:CORE.setting␤  in main
15:18 p6eval ..program bod…
15:20 tylercurtis moritz_: am I correct in understanding http://perlcabal.org/syn/S03​.html#Named_unary_precedence as implying that all unary functions can be used as a named unary prefix operator?
15:22 moritz_ tylercurtis: not sure... that section seems a bit unclear to me
15:22 TiMBuS moritz_, how is @list := <thing> meant to work? '@list := {}; @list.WHAT' gives Hash. should := call '.list' for me? or fail? or just not care?
15:23 tylercurtis std: foo 5;
15:23 p6eval std 31753: OUTPUT«[31m===[0mSORRY![31m===[0m␤Undeclared routine:␤      'foo' used at line 1␤Check failed␤FAILED 00:01 112m␤»
15:23 moritz_ TiMBuS: it should fail
15:23 tylercurtis std: sub foo ($x) { $x; } foo 5;
15:23 p6eval std 31753: OUTPUT«[31m===[0mSORRY![31m===[0m␤Strange text after block (missing comma, semicolon, comment marker?) at /tmp/gOyip4DeWi line 1:␤------> [32msub foo ($x) { $x; }[33m⏏[31m foo 5;[0m␤    expecting any of:␤  bracketed infix␤  infix or meta-infix␤      statement modifier loop␤Parse
15:23 p6eval ..failed␤F…
15:23 tylercurtis std: sub foo ($x) { $x; }; foo 5;
15:23 p6eval std 31753: OUTPUT«ok 00:01 115m␤»
15:23 moritz_ TiMBuS: the @ sigil in @list implies Positional. Hash !~~ Positional, so the binding should die
15:24 moritz_ tylercurtis: that just parses as a listop
15:24 moritz_ more interesting is if foo 5, 6; parses as foo(5), 6; or as as foo(5, 6)
15:24 moritz_ (I suspect the latter)
15:25 * tylercurtis checks.
15:25 tylercurtis moritz_, you are correct.
15:28 skids joined #perl6
15:28 tylercurtis std: sub foo (*@args) is lvalue { 1; }; foo 1,2,3 = 2;
15:28 p6eval std 31753: OUTPUT«Potential difficulties:␤  @args is declared but not used at /tmp/s1Nk6rHDju line 1:␤------> [32msub foo (*[33m⏏[31m@args) is lvalue { 1; }; foo 1,2,3 = 2;[0m␤ok 00:01 117m␤»
15:29 TiMBuS moritz_, well the example you gave before.. "my @a <== 1..Inf; @a.push: 5; say @a;" dies because push isnt part of range. but
15:29 TiMBuS my @a <== (1..Inf).list; @a.push: 5; say @a;
15:30 TiMBuS works
15:30 tylercurtis rakudo: my @a <== (1..Inf).list; @a.push: 5; say @a;
15:30 TiMBuS locally
15:30 p6eval rakudo a78732:  ( no output )
15:32 moritz_ TiMBuS: yes, but I think that's now how it's supposed to work
15:33 moritz_ TiMBuS: you could look at how my @a = 1..*; is implemented. It's lazy, and returns an array
15:34 moritz_ there was also some speculation about .lazypush or so
15:35 moritz_ which would be the right thing for <<==, and <== could just by @lhs (); @lhs.lazypush(...)
15:36 TiMBuS that would probably be a more complete solution
15:36 moritz_ rakudo: my ($foo, $bar = "baz") = <a>; say "$foo $bar"
15:36 p6eval rakudo a78732: OUTPUT«a Any()␤»
15:37 moritz_ rakudo: subset Foo of Array where { .elems == 5 }; sub bar(Foo $_) {}; bar([1,2,3])
15:37 p6eval rakudo a78732: OUTPUT«Nominal type check failed for parameter '$_'; expected Array but got Array instead␤  in 'bar' at line 20:/tmp/u1YrvOGIpH␤  in main program body at line 20:/tmp/u1YrvOGIpH␤»
15:37 [Coke] phenny: tell jnthn I just saw his blog post, and added the new blog to 6perl.
15:37 phenny [Coke]: I'll pass that on when jnthn is around.
15:38 moritz_ rakudo: "foo" ~~ /(foo)/; say "$0a"
15:38 p6eval rakudo a78732: OUTPUT«===SORRY!===␤Method 'ast' not found for invocant of class 'Undef'␤»
15:42 dalek rakudo: 9d73a3e | moritz++ | src/Perl6/Grammar.pm:
15:42 dalek rakudo: Steal series-after-comma warning from STD.pm, TimToady++
15:42 dalek rakudo: Since we don't have <.worry>, we <.panic> instead. Ah well.
15:42 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/9​d73a3ed0ab406b2a35cb2fbe09bc09699d150e6
15:42 dalek rakudo: cd64dd0 | moritz++ | docs/ROADMAP:
15:42 dalek rakudo: add ticket numbers to "improved error modes"
15:42 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/c​d64dd06411d87f22cd7889593e8c97f1aceb1fe
15:48 ab5tract moritz_, indeed, i cannot seem to find the video anywhere
15:48 ab5tract but would like to incorporate the meaphor into my thesis :)
15:48 ab5tract i'll search irc logs later tonight
15:54 nbrown joined #perl6
15:59 Mowah joined #perl6
16:08 jedai joined #perl6
16:21 Alias joined #perl6
16:27 masak joined #perl6
16:27 masak o/
16:27 phenny masak: 13:45Z <moritz_> tell masak re your blog draft, it somehow reads as if audreyt++'s gender change was in direct relation to her leaving #perl6. I know it's not meant that way; IMHO you should keep a bit of linguistic distance between the two events
16:27 phenny masak: 14:06Z <au|irc> tell masak s/lower-numered/lower-numbered/ too :) I'll readjust the zh translation based on the final posted version tomorrow. thx again for writing this. :)
16:27 phenny masak: 14:39Z <mberends> tell masak excellent "10th Birthday of Perl 6" blog post. It is beautifully written :-)
16:28 masak moritz_: yes; you're right, it reads that way. I'll tweak it somehow.
16:28 masak mberends: thank you.
16:28 masak I'm now in publishing mode, by the way. I'm finishing up the script that'll turn this into use.perl syntax.
16:32 masak reading through the post, I'm asking myself whether I really linger on "why I think Jon Orwant's broken mug kicked off one of the coolest projects in modern programming language history." -- I'm basically telling the story as it was, but I'm not sure the great aspects of the language, the community, and the atmosphere carries through enough in the post.
16:32 masak comments and suggestions welcome. :)
16:34 diakopter url?
16:35 diakopter fond it
16:35 diakopter found it
16:35 masak http://gist.github.com/479846 -- just in case someone else is looking, too.
16:37 rgrau_ joined #perl6
16:39 Mowah joined #perl6
16:40 justatheory joined #perl6
16:42 TimToady moritz_: abs falls into the category of operators that mathematicians expect to be unary, unlike defined
16:47 TimToady though I'd be more inclined to make defined a unary than to relax abs to a listop
16:48 _mpu joined #perl6
16:50 ingy greetings
16:51 diakopter HOW
16:52 ingy I think I just made a huge discovery
16:56 rokoteko joined #perl6
16:59 masonkramer joined #perl6
17:00 tylercurtis ingy: *.WHAT.say
17:02 ingy tylercurtis: I'm written a parser grammar system built on regexp that is curiously close to p6rules
17:02 ingy and used it on a couple perl and python projects
17:02 ingy cdent and testml, to be specific
17:03 ingy now that I've done a full project in p6rules...
17:03 ingy I am going to go back to the other stuff and make it more like p6rules
17:04 ingy and probably abstract it into its own acmeist parsing framework
17:04 ingy (this is still lead up to the discovery...)
17:04 ingy so my other stuff takes little regexp bits and combinates them into bigger rules
17:05 ingy but the combination is pretty much hand driven
17:05 ingy I'll find and example...
17:06 ingy http://github.com/ingydotnet/cdent/​blob/master/src/grammar/atoms.yaml is the regexp atoms for cdent
17:07 ingy they get combinated in an obvious way into http://github.com/ingydotnet/cdent/bl​ob/master/src/grammar/javascript.yaml (a grammar for cdent-javascript)
17:08 ingy as I was waking up (the only time that truly good ideas arrive) I realized that unless a rule has an action (by the same name in an action class) it can likely be combinated.
17:09 ingy 'combination' is turning several smaller regexps/rules into a bigger one
17:10 ingy in theory, the whole grammar could be combinated into one big (and fast!) regexp
17:10 ingy but that would be not so useful for grabbing parsed parts
17:12 ingy in my recent testml-pm6 implementation...
17:12 gbacon joined #perl6
17:12 ingy I have over a hundred rules
17:12 ingy but only 16 actions
17:13 ingy so it would be nice, if under the hood, I there were only 16 regexps
17:13 ingy </discovery>
17:13 ingy time to hack and play with this hypothesis
17:22 ingy my hope is to bring most of the goodness of p6rules to all programming languages...
17:22 ingy (with 100 times the speed!)
17:22 ingy ;)
17:27 szabgab joined #perl6
17:31 ingy tylercurtis: kwim?
17:34 masak ingy: your discovery sounds a fair bit like LTM to me.
17:35 ingy masak: Last Twelve Months?
17:36 masak ingy: my, are you in for a treat. :) Longest-Token Matching.
17:36 tylercurtis ingy: yes. Sorry. I got distracted reading perl monks and blog posts and such and forgot to check IRC. Sounds like an interesting idea.  Although now that masak mentions LTM, I think that there are plans to compile the declarative prefix of rules to automata, which would be pretty similar to your idea.
17:36 ingy thing is, I will have this all working by dinner using pcre!
17:37 masak LTM is a name for a bunch of strategies for combining the academic view of regexes with the computer engineering view of regexes, getting the best out of both.
17:37 masak ingy: if you're interested in LTM, I can recommend TimToady's Google Talk. it outlines the basic ideas.
17:38 tylercurtis I don't know if any implementations actually do that yet(I'd guess not), but an implementation that did that would be even better than your idea because it would take the parts of even rules with actions that are declarative and automatizes them.
17:38 ingy url?
17:38 * masak looks
17:38 masak http://www.youtube.com/watch?v=JzIWdJVP-wo
17:39 ingy masak: I'll take a look after I convert testml-pm5 to everything I've learned on my p6 journey
17:40 masak ingy: are you familiar with this page? http://swtch.com/~rsc/regexp/regexp1.html
17:40 ingy I've actually been doing this p5 combination stuff for over a year
17:40 ingy it's great. but p6rules is helping me polish it
17:40 * ingy looks
17:41 ingy masak: very cool
17:41 masak ingy: I'm still not sure how related the Thompson NFA and LTM are idea-wise.
17:42 masak ingy: but I'm totally sold on the former, which I grok completely. I think one of the coolest experiments that can be done to GGE would be adorning it with a Thompson engine.
17:43 ingy masak: btw, I think do a p6rules parser for yaml with you would be great
17:43 masak ingy: me too. let's do that sometime.
17:43 ingy now that I know I can backport it acmeistly
17:43 masak schedule a few days, and just hack away.
17:44 ingy yeah, soon
17:44 masak I doubt I'll have the peace of mind before YAPC::EU.
17:44 masak ingy: are you coming to that one?
17:44 ingy ok
17:44 ingy sadly no
17:44 * masak ~~ Sad
17:49 ingy masak: I'll check the flights...
17:49 masak yay
17:49 ingy masak: what airport?
17:50 masak ingy: Pisa or Bologna, depending.
17:50 masak YAPC::EU is in Pisa, but not all airlines go there.
17:52 rv2733 joined #perl6
17:54 ingy masak: next year!
17:55 masak heh.
18:04 pmichaud hugme: tweet rakudoperl Rakudo now supports feed operators:  http://6guts.wordpress.com/​2010/07/18/fixes-and-feeds/
18:04 * hugme hugs pmichaud; tweet delivered
18:05 masak pmichaud: oh hai -- great that you're here. do you have time to read the anniversary post before I publish it.
18:05 masak I'd love to hear your feedback in general and on the early Rakudo history in particular.
18:09 masak hm, I seem to forget to put question marks on my questions lately. :/
18:11 diakopter so when's the Bronze Age? ;)
18:12 masak let's not get ahead of ourselves :)
18:12 pmichaud masak: url?
18:12 pmichaud (I just popped in, haven't read backscroll yet)
18:13 masak http://gist.github.com/479846
18:13 masak pmichaud: I plan to publish it in about 15 minutes, but I'm willing to wait for your comments, if you have the time.
18:14 [synth] joined #perl6
18:14 masak I've already had excellent comments from au|zzz, moritz_, mberends, tylercurtis and diakopter.
18:15 pmichaud reading
18:15 * masak adds a link to pmichaud's R* post at the end
18:16 masak jnthn++ # feed ops! nice!
18:17 pmichaud "Many of the lower-numbered
18:17 pmichaud ones are fairly stable these days; a lot of the higher-numbered ones are still
18:17 pmichaud drafts."
18:17 pmichaud I'm not sure I can agree with that.  :-)
18:17 masak maybe I should just scrap that one.
18:17 masak it's an oversimplification, to be sure.
18:17 pmichaud Perhaps
18:17 diakopter reference S01...
18:18 diakopter (or quote it)
18:18 masak pmichaud: is it the "fairly stable" part that you disagree with? :)
18:18 pmichaud masak: yes.  S07 and S08 have to be considered wrongish
18:18 masak because I would classify S03, S05 and S06 as "fairly stable".
18:18 pmichaud but even S03 and S04 get their share of deep changes still
18:19 masak ok. removing sentence.
18:19 pmichaud I'd rephrase it
18:19 pmichaud I think there's important information there
18:19 pmichaud (rephrasing)
18:19 masak later in the text, I do mention the "whirlpool design/development".
18:19 macroron joined #perl6
18:21 pmichaud "In general, synopses 2 through 6 and 12 through 14 tend to be fairly stable, although changes still occur.  The remainder of the synopses are still drafts for the most part, awaiting more feedback from implementations."
18:22 pmichaud or something like that
18:22 pmichaud (hard to compose at the moment -- cousins and aunts and uncles talking in background.  I'll be free in about 15 mins)
18:22 masak I'll see if I can work that into the text. thanks.
18:22 pmichaud or you can just delete it.
18:23 masak it's deleted, and now I'm seeing if I can add something like your version back. :)
18:23 pmichaud I do think it's worth noting somewhere that the synopses are neither static nor complete
18:24 masak I have "kept up-to-date" in there.
18:24 masak that implies not static.
18:25 rgrau__ joined #perl6
18:27 masak pmichaud: there. I adopted the rephrase more or less wholesale. the updated http://gist.github.com/479846 also has R* links at the end.
18:31 pmichaud back again
18:31 pmichaud paula is reading the article now too :-)
18:31 masak \o/
18:35 pmichaud I don't know how to improve the text in any way on this point -- but truthfully I've been working on Rakudo since 2005.
18:35 pmichaud whereas the article makes it sound as though it started in 2008.
18:35 masak let's fix that.
18:36 masak I think I wrote somewhere that Rakudo came about as the result of many year's groundwork.
18:36 pmichaud yes, that part is there.
18:36 masak but I want that to be extra clear, so let me just review that part again.
18:36 pmichaud pugs did garner all of the press in 2005 and 2006 (rightfully so)
18:36 masak pmichaud: "since that time" -> "since 2005". will that make it better?
18:37 pmichaud yes.
18:37 masak "[...] Rakudo took off in 2008 only because Patrick Michaud had spent a significant amount of effort since 2005, building the toolchain to make his vision of Perl-6-on-Parrot a reality."
18:37 pmichaud and it wasn't just my vision :-)
18:37 pmichaud truthfully, my vision has always been to have a working Perl 6.
18:38 pmichaud "on Parrot" was just because that's the direction the core Perl 6 team had aimed me initially :)
18:38 pmichaud so perhaps "the vision" is better than "his vision"
18:38 masak right.
18:38 masak oki
18:39 tadzik hmm. Is there a chance that Rakudo Star would be able to fully separate compilation and running? Now it can output PIR, but Parrot can't run this PIR anyway
18:39 pmichaud tadzik: I might be able to clean that up before Star.
18:39 tadzik yay!
18:39 pmichaud tadzik: it does do separate compilation for modules.
18:39 masak pmichaud: when I wrote it, I thought about the previous attempt at Perl 6 on Parrot, and pictured you taking over and saying "now let's try this way of doing things".
18:40 pmichaud masak: closer to the truth would be that the core team looked at the previous attempt and said "this isn't working out", then cast about for a new "compiler pumpking" and handed me the job.  :-)
18:40 masak tadzik: to the extent compilation and running are separate... :) BEGIN and &eval intentionally confuses the two, each in one direction.
18:41 masak pmichaud: sure, sure, but you obviously came in with the idea of starting at the grammar engine level, something no-one had done before.
18:41 pmichaud correct
18:41 masak that's what I'm trying to convey in the text.
18:42 pmichaud After looking at the spec and the design of Perl 6, I basically said "in order for any of this to work, we have to have a working grammar engine first."
18:42 masak the fact that Rakudo was really PGE -> PCT -> Rakudo, hence the work in the shadows 2005-2007.
18:42 pmichaud so that's where I started.  :-)
18:43 pmichaud there's also
18:43 pmichaud http://www.mail-archive.com/perl6​-internals@perl.org/msg23429.html
18:43 pmichaud and
18:43 pmichaud http://www.mail-archive.com/perl6​-internals@perl.org/msg23564.html
18:44 masak I'll link in the second one as a source to starting at the PGE end.
18:44 pmichaud wfm
18:44 masak pmichaud++
18:45 macroron joined #perl6
18:47 pmichaud instead of "Perl 6 has landed", I think I'd rather go with a meme of "Perl 6 takes off"
18:47 pmichaud or something that indicates we're entering the next phase of development, instead of marking a destination.
18:47 masak agreed. changing.
18:48 pmichaud I'm not entirely sure about that yet.  But since I sometimes refer to "Star" as "a phase of development"   like the Mercury-Gemini-Apollo phases, "has landed" carries too much of a sense of "mission accomplished"
18:48 masak nodnodnod
18:49 pmichaud although perhaps I should get a picture of myself on an aircraft carrier with a big banner tha...... never mind.
18:49 masak :P
18:49 masak scary, I actually know enough of the US to soak up that reference.
18:49 pmichaud http://podlogs.com/thirdtime/files/2​010/05/bush_mission_accomplished.jpg
18:50 masak aye.
18:50 pmichaud :-)
18:50 pmichaud maybe I should work that image into my "Rakudo Star" talk for YAPC::EU :-P
18:50 masak yes, please do! :)
18:51 pmichaud although perhaps the parallels aren't good ones to draw
18:51 pmichaud (quagmire, incompetence, etc.)
18:51 pmichaud might have to finesse it a bit too much to make it work
18:52 masak perhaps.
18:52 masak ok, going into publishing mode.
18:52 pmichaud let me see if paula had any comments
18:52 masak sure.
18:54 masak I will also fashion a catchy tweet to go with this post.
18:55 masak I never did get ahold of Mr. Orwant. maybe he doesn't log into Twitter very often.
18:57 masak oh, and snarkyboojum also found a typo. forgot to credit him earlier.
18:59 masak rakudo: sub foo { say $_ }; { foo("HAI") }
18:59 p6eval rakudo cd64dd: OUTPUT«Too many positional parameters passed; got 1 but expected 0␤  in 'foo' at line 20:/tmp/_dJIMaf0CG␤  in main program body at line 20:/tmp/_dJIMaf0CG␤»
18:59 masak did I just dream that, or didn't we default to some *@_ signature at some point or other?
18:59 * moritz_ back
18:59 moritz_ masak: the default signature was *@_, *%_
18:59 moritz_ ie when no signature was provided
19:00 masak moritz_: above, no signature is provided.
19:00 pmichaud masak: actually, I'm wondering if the second paragraph about "Rakudo" needs some changing.
19:01 masak pmichaud: I was hoping you'd say that.
19:01 masak it doesn't feel 100% yet.
19:01 pmichaud it makes it sound as though Rakudo is post-Pugs, when in fact the two were being developed simultaneously
19:02 masak ...which is explained in the third paragraph.
19:02 masak but I can point it out in the second, too.
19:02 cxreg masak: http://www.spidereyeballs.com/os​5/images/small/os5_r06_9705.jpg
19:02 pmichaud yeah, I'm trying to see how I'd word it
19:02 masak cxreg: yes?
19:03 cxreg masak: wasnt sure if you'd seen that picture :)
19:03 masak cxreg: the TimToady quote at the top about the mug throwing is from the same page :)
19:03 masak I do hope I put a link in there somewhere, too...
19:03 cxreg oh ok :)
19:04 masak yes, I did.
19:05 masak pmichaud: the history is told from my perspective. I honestly didn't pay attention to Rakudo before it got its name "Rakudo".
19:05 cxreg right, sorry
19:05 pmichaud masak: sure, I understand that :-)
19:05 pmichaud masak: and in many ways, your perspective is the public one :)
19:05 masak cxreg: no need to be sorry. thanks. :)
19:05 pmichaud i.e., the one that most people have about Perl 6
19:05 pmichaud I'm just trying to clarify the history a bit :)
19:05 cono joined #perl6
19:06 masak pmichaud: do you think it's insufficiently clarified in paragraph 3? if not, I'm tempted to leave it as it is.
19:06 pmichaud I think p3 is okay, but p2 sets an incorrect tone leading into p3
19:06 masak ok, I'll re-read it and try to see that.
19:07 masak pmichaud: when I said "I was hoping you'd say that." above, I was under the impression that you had some comments on the final section of the post. :) no-one has commented on it yet. am I doing all I can to pull attention toward R* there?
19:07 pmichaud I think part of what reads wrongly is "Pugs contender"
19:07 pmichaud (drafting)
19:07 masak oh, ok.
19:08 pmichaud put another way, I agree that P3 clarifies P2, but I'd rather it not read as a clarification.  I'd rather what comes next to be correct without needing clarification :)
19:08 ashleydev joined #perl6
19:08 ingy masak: ping me when you are done with your current task
19:09 masak well, recall that when Pugs went dark in 2007, we were left with exactly one big project that implemented Perl 6. it was only gradually from early 2008 up until, well, now, that I've felt Rakudo to step into Pugs' shoes.
19:09 whiteknight joined #perl6
19:09 pmichaud I totally agree with that.
19:09 masak pmichaud: P3 doesn't contratict P2. it just fills in details.
19:09 masak I don't really see what I could change.
19:09 pmichaud (working)
19:10 masak afk &
19:10 araujo joined #perl6
19:12 pmurias joined #perl6
19:12 masak back
19:13 pmichaud masak: how important is it to mention the abandoned Perl 6 on Parrot?
19:14 masak not extremely. I have it there mostly for completeness, since I mention Topaz, Sapphire and Ponie.
19:14 pmichaud I think it should be moved out of the Rakudo section.  I have a new draft coming together -- should be ready in about 3 min
19:14 cxreg pmichaud: it reminds me of when mozilla was pre-1.0 and they abandoned the Netscape code.  for a while, Mozilla was the butt of everyone's jokes, and held up as some alleged example of why "open sourcing" stuff is not the great idea it was made out to be
19:14 cxreg most people dont remember those days
19:14 * masak does
19:15 masak cxreg: it's also one of Joel Spolsky's examples of why you shouldn't rewrite things from scratch. Perl 6 seems to be his other one.
19:15 tadzik where in Rakudo source is the part which is in charge of reacting on perl6 -e 'say "something"'?
19:15 cxreg masak: he's a chump :)
19:16 tadzik I wonder how hard would it be to implement things like -n, -p, -l or -M
19:16 moritz_ tadzik: that's somwhere in PCT, not in the Rakudo source
19:16 masak tadzik: I like the way you're thinking. :)
19:16 tadzik masak: what do you mean?
19:16 tadzik moritz_: so where am I to look?
19:16 pmurias cxreg: is mozilla based on netscape code?
19:17 cxreg pmurias: very little of it still remains
19:17 masak tadzik: I've had the same thought many times, and felt that it shouldn't be so hard to add -n, -p et al.
19:17 moritz_ tadzik: in parrot, pct/src/PCT/HLLCompiler.pir
19:17 cxreg pmurias: but that was the origins, of course
19:17 moritz_ compilers/pct/src/... actually
19:17 tadzik oh gosh. perl6 -e is handled by parrot? :/
19:18 masak tadzik: now you see why I actually never got around to it... :/
19:18 masak it also leaves S19 in a slightly awkward position.
19:18 pmichaud masak:  how about something like http://gist.github.com/480634
19:18 * masak looks
19:19 * moritz_ likes
19:19 pmichaud after that, you can add the part that Jonathan joined the effort in 2007, and we've been adding feature after feature since 2008.
19:20 masak pmichaud: that replaces P2, but also makes much of P3 unnecessary. should I just scratch P3?
19:20 pmichaud masak: yes, it's designed to be a replacement P2+P3
19:20 pmichaud or really
19:20 pmichaud replace P2 and first part of P3
19:20 masak pmichaud: I like the later parts of P3.
19:20 pmichaud right
19:20 masak right, good.
19:20 masak we has an agree.
19:20 pmichaud you can also fit in somewhere that you didn't pay much attention before it got the name "Rakudo"
19:21 masak removing P3 up until "Patrick had a vision..." :)
19:21 masak oki
19:21 pmichaud anyway, I like this better --it makes it clearer that Parrot and p6-on-parrot weren't abandoned during pugs, just that they were slower in coming
19:22 masak aye.
19:22 masak updated. http://gist.github.com/479846
19:22 pmichaud also, perhaps in a later paragraph you can identify a point where Rakudo became a Pugs contender
19:22 pmichaud I agree it wasn't one until at least the latter part of 08
19:23 masak new paragraphs start on line 331.
19:23 masak I don't feel a need to add "Pugs contender" now. people may draw their own conclusions in comparing apples and oranges. :)
19:24 pmichaud tbh, I don't feel as though I recruited jnthn++.  I just finally got the system to the point where it was possible for others to participate, and jnthn++ showed up.  :)
19:24 masak s/recruited/bumped into/ ? :)
19:24 tadzik Stage 'past': 3.69548797607422e-05 sec
19:25 tadzik looks long, what is in it?
19:25 moritz_ rakudo: say 3e-05
19:25 p6eval rakudo cd64dd: OUTPUT«3e-05␤»
19:25 masak Rakudo++
19:25 moritz_ rakudo: say (3e-05).Rat
19:25 p6eval rakudo cd64dd: OUTPUT«3.0000300003e-05␤»
19:25 moritz_ tadzik: it's 0.3ms
19:25 tadzik oh
19:26 pmichaud it's more like  "Jonathan Worthington saw the work that Patrick was doing with the Perl 6 implementation, and jumped in implementing junctions (and along the way added multi-dispatch, the type system, the O-O metamodel...)
19:26 moritz_ PAST is one of the intermediate formats
19:26 * tadzik hides
19:26 moritz_ tadzik: http://perlgeek.de/blog-en/​perl-6/rakudo-overview.html might interest you
19:26 masak pmichaud: dang, then I lose "intrepid" :P
19:27 moritz_ you can still get it in there
19:27 pmichaud "...with the Perl 6 implementation, and being the intrepid guy that he is, Jonathan jumped in ...."
19:27 tadzik I remember looking at this today :)
19:27 masak pmichaud: is it untrue that jnthn had promised to take a look at junctions?
19:27 tadzik still I don't really get it: why perl6 -e is the Parrot thing?
19:27 pmichaud it's not untrue
19:28 masak then I think I'll leave it in, and just scratch the "recruited" part.
19:28 pmichaud wfm
19:28 tadzik is perl6 really something like parrot -something perl6.pbc <code>?
19:28 pmichaud tadzik: -e is common to many languages, not just Perl 6
19:28 pmichaud tadzik: so Parrot's HLLCompiler object implements a -e option that can be used by compilers
19:28 tadzik so rakudo does not parse perl6 switches itself?
19:28 pmichaud tadzik: individual compilers can override the -e implementation if they wish
19:29 tadzik I see
19:29 pmichaud tadzik: so far Rakudo hasn't needed to do that
19:29 stepnem joined #perl6
19:29 pmichaud s/hasn't needed .*/hasn't done that yet/
19:29 moritz_ pmichaud: how would rakudo do that?
19:29 tadzik So implementing -lpnM won't be as easy as I thought :)
19:29 moritz_ is there an example somwhere?
19:29 tadzik (I thought -e is something like compile_and_run($ARGV[1]))
19:29 pmichaud tadzik: -p and -n require implementation of custom settings
19:30 pmichaud in truth, the entire command line argument processing system needs revision, because HLL::Compiler really wants to do S19-like processing.
19:30 moritz_ tadzik: rakudo needs to do that itself at some point anywway, so I'm willing to try to explore command line parsing at some point
19:30 pmichaud i.e., I'd like nqp to have an argument processor built in to the HLL::Compiler object
19:30 pmichaud (and this is what particle++'s hague grant is supposed to provide)
19:33 * moritz_ is kinda confused by that fact that PCT and NQP-rx seem to overlap in quite some places
19:33 moritz_ and then I don't know which part rakudo uses, and what to change
19:33 pmichaud rakudo uses nqp-rx.  end of story
19:33 pmichaud some parts of nqp-rx come from PCT
19:34 moritz_ identifying those parts isn't alwys easy
19:34 pmichaud moritz_: agreed
19:34 pmichaud in many ways it's a problem of ENOTUITS
19:34 pmichaud I expect much of what is currently in PCT:: to eventually be part of nqp-rx
19:34 pmichaud but I haven't always had time to do that migration
19:34 tadzik I sense a lie: http://wklej.org/id/366095/
19:35 masak blog post is now live. http://use.perl.org/~masak/journal/40451
19:35 moritz_ masak++
19:35 masak thanks to everyone for their comments and help.
19:35 pmichaud tadzik: runtime
19:35 tadzik so it's not included?
19:35 tadzik Stage 'evalpmc', what's this?
19:35 pmichaud tadzik: it's not considered a compilation "stage"
19:35 pmichaud evalpmc is the part that converts pir into bytecode
19:36 pmichaud it's not the execution of the bytecode
19:36 tadzik ah, ok
19:36 pmichaud (each stage is named for what it produces, not what it does)
19:39 moritz_ hugme: tweet rakudoperl Happy 10th anniversary, #perl6: http://use.perl.org/~masak/journal/40451
19:39 * hugme hugs moritz_; tweet delivered
19:39 masak moritz_++
19:42 moritz_ I've submitted it here: http://www.reddit.com/r/programming/comments/cqy​sn/10_years_perl_6_project_history_and_personal/
19:43 masak woot
19:43 plobsing joined #perl6
19:43 moritz_ maybe somebody wants to submit it to r/perl/ too, but I'm inclined to shout out of the echo chamber
19:44 masak absolutely.
19:44 masak more enlightening comments that way, too.
19:44 moritz_ fsvo "enlightening"
19:45 moritz_ if you want a serious discussion, submit it to hackernews
19:45 tadzik moritz_: on r/perl/ it would be alike, probably with less comments, less upvotes and less trolling :)
19:45 moritz_ but so far I didn't seem to have found titles that the hackernews guys find sufficiently interesting
19:47 masak @obra++ retweet. yay.
19:48 whiteknight joined #perl6
20:00 * moritz_ just implemented 'yesterday' in IR clog URLs
20:00 masak \o/
20:00 masak moritz_: only 'tomorrow' left.
20:01 moritz_ masak: I wait for a time-travelling logger :-)
20:02 masak we could really use one of those.
20:02 masak think of the implications!
20:02 moritz_ better not, my brain would melt
20:03 masak bah, strange loops aren't dangerous, just weird. :P
20:06 masak avar++ posted blog post to Hacker News. http://news.ycombinator.com/item?id=1526575
20:07 moritz_ and currently on the second item of the front page
20:07 moritz_ these are the times when I pity the fact that use.perl.org doesn't offer visitor stats
20:08 * masak should move to another blogging platform
20:08 frettled masak: something written with Web.pm, perhaps?  :)
20:09 masak frettled: yeah, ideally.
20:09 frettled Blog.pm
20:09 masak we started two or three projects called Yarn at one point.
20:10 frettled hmm
20:11 moritz_ masak: if you want to withstand reddit or slashdot, you need to generate static pages :-)
20:11 masak I've been leaning to such ideas lately.
20:11 masak feels more on the level of what Rakudo can handle at this point anyway.
20:12 frettled It's also sensible if you want to avoid the mistakes of WordPress et al, which have had bunches of security vulnerabilities in their history.
20:12 moritz_ I'm not sure that's directly related
20:13 frettled moritz_: It seems to have an extremely high correlation with it.
20:14 frettled …but only if you read security bulletins, surely.
20:14 moritz_ frettled: has blosxom a similar security record?
20:14 moritz_ it also generates all pages on-the-fly by default
20:14 frettled moritz_: which version?
20:15 frettled Let's see.  XSS in 2008 for 2.x, at least.
20:16 frettled unpatched XSS in 1.x
20:16 frettled That's from less than 80 seconds of searching on secunia.com.
20:20 tadzik Hmm. One can do my $squares = gather for 0..Inf { take $_ * $_}; Why exactly won't it work with @squares?
20:21 moritz_ list assignment is special, and too eager today
20:21 masak tadzik: list assignment is eager.
20:21 mathw masak: You wrote the best blog post of the $timeperiod
20:21 masak mathw: thanks :)
20:21 masak mathw: took about that long, too. :)
20:22 tadzik moritz_: today, so it might change?
20:22 masak tadzik: use binding if you want lazy behaviour.
20:22 mathw masak: and I'm in one of your IRC quotes, I'm having a bit of a 'whoa' moment :)
20:22 masak :)
20:25 * mathw updates Rakudo
20:29 moritz_ tadzik: it should change, IMHO
20:29 * jnthn back
20:29 phenny jnthn: 15:37Z <[Coke]> tell jnthn I just saw his blog post, and added the new blog to 6perl.
20:30 jnthn [Coke]: Thanks!! :-)
20:30 masak I don't like the comment on http://news.ycombinator.com/item?id=1526575 -- but for now I'm refraining from replying. not sure I'd be able to reach the fellow in question anyway.
20:30 * jnthn found a pub in Lund that serves German Weissbier! o/ o/
20:30 masak jnthn: congratulations :)
20:31 jnthn :-)
20:31 ingy rakudo: grammar G { rule x { 'x' } }; say G.parse('x').perl
20:31 p6eval rakudo cd64dd: OUTPUT«Method 'TOP' not found for invocant of class ''␤  in 'Grammar::parse' at line 5490:CORE.setting␤  in main program body at line 20:/tmp/gM8whqOHJl␤»
20:32 ingy can you tell a grammar what rule to use as 'TOP'?
20:32 moritz_ ingy: you can use indirection in TOP
20:32 ingy moritz_: ?
20:32 masak ISTR there's a named param you can send to .parse, as well.
20:33 moritz_ ingy: method TOP { <x> }
20:33 ingy I want to be able to use the same grammar for multiple parses
20:33 tadzik by the way, are backticks expected to work til Rakudo Star?
20:33 ingy moritz_: sure. but not what I need
20:33 moritz_ tadzik: backticks are not part of the Perl 6 spec
20:34 masak tadzik: backticks are reserved for user-defined sublangs.
20:34 tadzik oh
20:34 masak tadzik: if you want run() or qx[], that's there already.
20:34 moritz_ and qx/qqx are implemented
20:34 tadzik ah, great
20:34 Trashlord joined #perl6
20:34 tadzik run() is like P5's system()?
20:34 jnthn masak: heh, can't believe the ASCII YMCA made it into your post :P
20:34 moritz_ rakudo: say qx/echo hi/
20:34 p6eval rakudo cd64dd: OUTPUT«Operation not permitted in safe mode␤  in 'Safe::forbidden' at line 2:/tmp/nBizWZLoC_␤  in main program body at line 20:/tmp/nBizWZLoC_␤»
20:34 tadzik :)
20:34 ingy jnthn: can you tell a grammar what rule to use as 'TOP'?
20:35 moritz_ masak: I replied on hackernews... don't know if that was a good idea :-)
20:35 masak jnthn: it was harder to find a quote representative of our current culture than I initially thought. in the end, I just went to April 1 this year and took the first funny thing I could find. :P
20:35 masak moritz_: :)
20:35 moritz_ rakudo: grammar G { rule x { 'x' } }; say G.parse('x', :rule<x>).perl
20:35 p6eval rakudo cd64dd: OUTPUT«Match.new(␤ # WARNING: this is not working perl code␤ # and for debugging purposes only␤ from => 0,␤ orig => "x",␤ to   => 1,␤)␤»
20:35 moritz_ ingy: better?
20:35 moritz_ :-)
20:36 ingy moritz_: perfect, thanks
20:36 masak moritz_++
20:36 ingy I really do have a good reason for this :)
20:36 ingy moritz_++
20:36 moritz_ now let's make sure it's spec...
20:37 tylercurtis moritz_: I replied in a more serious manner to that. :)
20:37 ingy I want to generate my testml p6rules grammar from the canonical yaml grammar
20:37 masak I don't say this often enough. y'all rock. rock on, #perl6.
20:37 masonkramer joined #perl6
20:38 tylercurtis On the plus side, if they're quoting the post to make snarky comments, at least they had to read at least part of it.
20:38 ingy right now my p6 grammar (which is actually two grammars) is 2 separate grammar classes that inherit common parts
20:39 ingy tmtowtdi
20:39 mkula joined #perl6
20:40 ingy std: grammar G { rule x { 'x' } }; say G.parse('x', :rule<x>).perl
20:40 p6eval std 31754: OUTPUT«ok 00:01 117m␤»
20:40 masak tylercurtis: you get extra points for honesty for that comment. prepare for further snide replies.
20:40 pugssvn r31755 | moritz++ | [S05] specifiy that .parse can invoke other subrules than TOP by name
20:41 ingy \o/
20:41 masak seen on Twitter: "looks like it'll be *this* Christmas" :)
20:41 moritz_ for some "it", yes
20:42 jnthn moritz_: (use.perl.org visitor stats) It's been kinda crazy moving to Wordpress just now and having htose.
20:42 jnthn *those
20:43 moritz_ (at least on reddit I can downvote non-sensical comments)
20:43 jnthn moritz_: 258 pageviews after just one post on there isn't at all bad going.
20:44 masak here's someone who gets it. http://news.ycombinator.com/item?id=1526674
20:45 mac joined #perl6
20:45 mac Hi
20:45 masak mac: hello!
20:45 masak mac: happy 10th anniversary!
20:46 mac Yay, I know ;) same wishes to you
20:47 mathw \o/
20:48 jnthn pmichaud: (I expect much of what is currently in PCT:: to eventually be part of nqp-rx) +1. In fact, I'd been meaning to ask you about that. :-)
20:48 mac I have question about "magic star", can some1 explain me quicksort from wikipedia? Because it's emberassing to me so much. I understand it mostly, except 1 thing: we have 2 args: $pivot and *@rest, but our sub expects just one, how it's possible? We make quicksort(@arr), and all's fine, how's it going?
20:49 jnthn mac: It's using sub-signatures. (more)
20:49 jnthn mac: You can take one parameter, and then treat that parameter as if it was an argument list itself, and use a signature to match against it.
20:49 snarkyboojum joined #perl6
20:49 masak mac: the secret is in the [] in [$pivot, *@rest]
20:50 jnthn mac: So in the case of an array, it just treats each element as if it was a parameter. So all it's doing is taking the first element of the array into $pivot, and leaving the rest in @rest
20:50 awwaiid joined #perl6
20:50 jnthn masak: Yes, exactly. :-)
20:50 tomaw joined #perl6
20:50 pmichaud jnthn: (PCT -> nqp)  it's been my plan for a long time to move a lot of the PCT:: stuff to be written in nqp; but ENOTUITS
20:50 jnthn mac: The thing is that the multi-dispatcher knows about these sub-signatrues, so it can look at the parameter that's been passed and say "OK, does it have at least one element?"
20:51 masak and that example... will need a 'proto quicksort' declaration eventually. ewww!
20:51 jnthn pmichaud: You expect to write it in NQP too?
20:51 jnthn pmichaud: +10 ;-)
20:51 pmichaud jnthn: much of it already is  (sorear++)
20:51 pmichaud at least the HLL::Compiler object is
20:51 jnthn pmichaud: Aye. PAST::Node and PAST::Compiler probably should also be.
20:51 pmichaud and iirc, bacek++ is writing POST->pbc using nqp-ish stuff (might be wrong there)
20:52 jnthn pmichaud: OK, great.
20:52 mac hmm... so if I put arg @array into [ and ], I will get (in sub) every element like a separately argument?
20:53 mac So... if it goes that way, what does "*" stands for "@rest"?
20:53 tylercurtis pmichaud: kinda. He has his own new version of POST that isn't so stringy, so PCT would have to be moved over to compiling from PAST -> POST.
20:53 jnthn pmichaud: Reason being that I hope to be able to compile attribute accesses and method calls from nqp very efficiently in the common case.
20:53 tylercurtis pmichaud: from PAST -> oldPOST to PAST -> newPOST, rather.
20:53 jnthn pmichaud: But have no intentions of inventing a PIR way to do it that is anything like as neat.
20:54 masak mac: it stands for "slurpy", as in "slurp up all of the rest of the elements of the [] array into @rest"
20:54 mathw masak: ufo seems to be broken
20:54 pmichaud tylercurtis: yes, you are correct.  I'm fine with moving PAST::Compiler to produce newPOST
20:54 masak mathw: ok. moritz_ said earlier today he'd break it. maybe he succeeded.
20:54 pmichaud actually, that just becomes another compiler :-)
20:54 * masak rebuilds Rakudo and tries ufo
20:54 tadzik rakudo: sub foo ([$a, $b]) { say "$a and $b" }; my @arr = 1, 5; foo @arr
20:54 p6eval rakudo cd64dd: OUTPUT«1 and 5␤»
20:54 mathw masak: it's something in Enum::ACCEPTS
20:54 mathw and by the way
20:54 mathw those Perl 6 backtraces are AWESOME
20:55 mathw was that you jnthn?
20:55 masak :)
20:55 jnthn Huh, what...I'm innocent!
20:55 masak it was. jnthn++
20:55 tadzik rakudo: sub foo ([$a, *b]) { say "$a and $b" }; my @arr = 1, 2, 3, 5; foo @arr
20:55 mathw jnthn++
20:55 tylercurtis pmichaud: inline nodes will probably be tricky, though.
20:55 p6eval rakudo cd64dd: OUTPUT«===SORRY!===␤Malformed parameter at line 20, near "*b]) { say"␤»
20:55 tadzik rakudo: sub foo ([$a, *$b]) { say "$a and $b" }; my @arr = 1, 2, 3, 5; foo @arr
20:55 p6eval rakudo cd64dd: OUTPUT«Too many positional parameters passed; got 4 but expected 2 in sub-signature␤  in 'foo' at line 20:/tmp/EYSmJAr_wx␤  in main program body at line 20:/tmp/EYSmJAr_wx␤»
20:55 pmichaud tylercurtis: well, at some point I hope we can eliminate inline nodes
20:55 tadzik there we go, sub-signatures
20:56 pmichaud "inline" is almost by definition "we're cheating here because we don't have something better"
20:56 jnthn Woo, it even tells you in the error it was in a sub-signature. :-)
20:56 pmichaud in a lot of places we now have better options, like pir::
20:56 tadzik that's probably another thing I think of "I'd probably never use it anyway" and I'll probably use it every single time once I understand it
20:56 jnthn I guess awesomer would be to say which parameter we were unpacking.
20:57 masak jnthn: it would. but I realize that's hard, both to implement and to decipher.
20:57 jnthn tadzik: Once you understand it, you can use it outside of multi-dispatch and sub/emthod sigs too.
20:57 mac hmm, masak could you show me any other example of using it? That star in this context always means put the rest into what_stands_after_star?
20:57 masak mac: sure thing. let me put together an example or two.
20:58 tadzik gosh, the amount of trolling on reddit is overwhelming
20:58 tylercurtis mac: *%foo is a slurpy hash; it takes all the named arguments. *@bar is a slurpy list parameter; it takes all the positional arguments.
20:58 jnthn tadzik: You can smart-match a data structure against a literal signature anywhere in your code.
20:58 tylercurtis mac: and.... let me check what *$foo does.
20:59 jnthn %foo ~~ :(:$foo!, :$bar!) # the hash %foo must have keys foo and bar and no others
20:59 tadzik jnthn: nice
20:59 masak rakudo: sub f($a, $b, *@c) { say $a; say $b; say @c.perl }; f(1, 2, 3, 4, 5)
20:59 p6eval rakudo cd64dd: OUTPUT«1␤2␤[3, 4, 5]␤»
20:59 tylercurtis mac: here's an example of slurpy scalars:
20:59 masak mac: does that help?
20:59 jnthn tylercurtis: danger danger unimplemented :-)
21:00 tadzik :D
21:00 mathw oh dear
21:00 * jnthn should get around to that.
21:00 tylercurtis mac: oh, well, I guess Rakudo doesn't have slurpy scalars yet.
21:00 mathw new weirdnesses in the Form tests
21:00 mathw what's the status of modules exporting subs at the moment?
21:00 mac Ye, looks better now ;) So there are rules what exactly means *@ and *% between [], ok, it's clear now ;)
21:01 tylercurtis mac: but when it does: "sub head (*$h, *@t) { $h; }" should return the first element of its argument list.
21:01 tadzik I'd love to see a cheatsheet with uses of *
21:01 tylercurtis mac: Slurpy params can be used in the main argument list, as well.
21:01 masak "After reading that, it seems like Perl has rather nice community. If Python has engineers and Ruby rockstars, then I'd say that Perl has hackers." -- from Hacker News \o/
21:01 mac Sorry for my dumby question, I know I'm little annoying, but it's fascinating me and I really want to know how it's going on. I torture tadzik very often, but today he told me to join here, and ask you guys ;)
21:02 masak mac: you're not in the least annoying. :)
21:02 masak mac: ask more questions! :P
21:02 mac tylercurtis: don't you need [] in this case?
21:02 tylercurtis mac: it depends on how you want the function to be called.
21:02 mac what do you mean by this?
21:02 tadzik [] will be if you were passing an array, no?
21:02 tylercurtis mac: if you want to use head(1, 2, 3, 4, 5), then you don't need [].
21:03 tylercurtis mac: if you want to do head([1,2,3,4,5]), you do.
21:03 tadzik sub head (*@_) { shift }; head(3, 4, 1, 2);
21:03 tadzik sub head (*@_) { shift }; say head(3, 4, 1, 2);
21:03 tadzik aw
21:03 tadzik rakudo: sub head (*@_) { shift }; say head(3, 4, 1, 2);
21:04 p6eval rakudo cd64dd: OUTPUT«Not enough positional parameters passed; got 0 but expected 1␤  in 'shift' at line 2810:CORE.setting␤  in 'head' at line 20:/tmp/DpyKFQjyXT␤  in main program body at line 20:/tmp/DpyKFQjyXT␤»
21:04 mac in the wikipedia's example of quicksort we use quicksort(@before),$pivot,quicksort(@after) without [], so why [] in prototype?
21:04 pmichaud rakudo:  sub head(*@_) { @_.shift }; say head(3,4,1,2);
21:04 p6eval rakudo cd64dd: OUTPUT«3␤»
21:04 tadzik mac: [] creates an array
21:04 tylercurtis mac: because @before and @after are arrays.
21:04 tadzik quicksort expectes an array
21:04 mac ah, ok
21:04 tadzik so you need [] in prototype, but not when passing the actuall array to it
21:04 ashleydev joined #perl6
21:04 tylercurtis mac: in my head(1,2,3,4,5) example, you're just passing it a number of arguments.
21:04 masak rakudo: sub foo { say @_.perl }; foo 1, 2, 3, 4, 5
21:04 tadzik pmichaud: shift doesn't use @_ by default?
21:04 p6eval rakudo cd64dd: OUTPUT«[1, 2, 3, 4, 5]␤»
21:04 masak \o/
21:05 mac yup, ok now it's clearified (surely more than before ;) )
21:05 masak tadzik: correct. it doesn't.
21:05 masak tadzik: generally, "magical" default have gone away in Perl 6.
21:05 masak s/default/defaults/
21:05 mac masak: thanks for your tolerance ;)
21:05 tadzik so what was wrong in my snippet?
21:05 tadzik ah, it doesn't
21:06 pmichaud tadzik: shift expects an argument
21:06 tadzik I see
21:06 pmichaud (the thing you want shifted)
21:06 tylercurtis tadzik: ".foo" replaces most of the implicit $_ and @_ default argument stuff in Perl 6.
21:06 pmichaud rakudo:  sub head(*@_) { shift @_ }; say head(3,4,1,2);
21:06 p6eval rakudo cd64dd: OUTPUT«3␤»
21:06 tadzik so there should be {.shift}?
21:06 pmichaud well, .shift would work on $_, not @_
21:06 pmichaud but even easier:
21:06 pmichaud oh, nm.
21:07 pmichaud (my "even easier" would not have worked in general)
21:07 masak rakudo: sub foo { given @_ { say .shift } }; foo 1, 2, 3
21:07 p6eval rakudo cd64dd: OUTPUT«1␤»
21:07 masak :)
21:07 tadzik sub foo (Array $_) { .shift }; foo [3, 1, 4];
21:07 tadzik rakudo: sub foo (Array $_) { .shift }; foo [3, 1, 4];
21:08 p6eval rakudo cd64dd:  ( no output )
21:08 pmichaud ENOSAY
21:08 tadzik ah, whatever
21:08 tadzik I got used to the REPL
21:08 pmichaud yes
21:08 pmichaud I wish we could get p6eval to act similarly :-)
21:08 masak we did that once.
21:08 masak didn't end well. :/
21:08 tadzik that is he place where -p would be nice :)
21:09 mathw okay so the backtraces aren't perfect...
21:09 masak tadzik: would -p in p6eval process each utterance on #perl6 and print something in response? because, and I tell you this now to save you possible work, I would not like that. :P
21:09 tadzik ;)
21:12 masak pmichaud: the grammar.g file at http://github.com/rakudo/rakudo/blob/1b6cbf6d5​1b787556f2b47cd55dbf7b00fde04c0/lib/grammar.g makes me feel so much better about Yapsi. :)
21:13 mberends :)
21:14 mberends o/ masak. commute nl->uk
21:14 pmichaud masak: yes -- I consider that file to be the genesis of STD.pm :-P
21:15 masak mberends: have the appropriate amount of commuting!
21:17 tylercurtis I've decided on my preferred new way of explaining Perl 6's syntactic extensibility: "Common Lisp reader macros that play well together, but so easy that even I can write."
21:17 masak look at the Blue Collar Creed in TimToady SoTO 2003 talk at http://www.perl.com/lpt/a/760 -- reading that feels so right just now, and makes a wonderful contrast to mean comments on HN and Reddit.
21:17 mathw man, Form.pm is really broken
21:17 masak s/TimToady/TimToday's/
21:17 mac tylercurtis: in your example... "sub head (*$h, *@t) { $h; }" what will happen when you erase first star? I mean code like this: "sub head($h,*@t) { $h; }". When I run it under p6, with various args passed to head(), the result is the same as on your code
21:17 mac What's the difference?
21:18 tylercurtis rakudo: sub head ($h, *@t) { $h; }; say head();
21:18 p6eval rakudo cd64dd: OUTPUT«Not enough positional parameters passed; got 0 but expected at least 1␤  in 'head' at line 20:/tmp/aHMugc0Kit␤  in main program body at line 20:/tmp/aHMugc0Kit␤»
21:18 mac rakudo: sub head (*$h, *@t) { $h; }; say head();
21:19 p6eval rakudo cd64dd: OUTPUT«Not enough positional parameters passed; got 0 but expected at least 1␤  in 'head' at line 20:/tmp/2zbhrYtA7P␤  in main program body at line 20:/tmp/2zbhrYtA7P␤»
21:19 tylercurtis mac: the difference is that without the star or some other indicating of optional-ness, $h is a required parameter.
21:19 tylercurtis mac: rakudo doesn't seem to do slurpy scalars right yet.
21:19 shakesoda joined #perl6
21:19 tylercurtis rakudo: sub head ($h?, *@t) { $h; }; say head(); # not really sure if this works
21:19 mac uhm, but it'll work as you said, yes?
21:19 p6eval rakudo cd64dd: OUTPUT«Any()␤»
21:19 tylercurtis rakudo: sub head ($h?, *@t) { $h; }; say head(1, 2, 3); # not really sure if this works
21:19 p6eval rakudo cd64dd: OUTPUT«1␤»
21:20 masak tylercurtis: it works. the order is requireds-optionals-slurpy.
21:21 mathw Okay, who changed/broke/fixed accessing classes defined in other modules?
21:21 tylercurtis masak: Are you sure? jnthn said "danger danger unimplemented" when I started talking about it.
21:21 jnthn *$x is NYI.
21:21 masak tylercurtis: what's unimpl is... what jnthn said.
21:21 jnthn Unless somebody is a ninja signature binder hacker. :-)
21:21 jnthn And sneaked the patch in without me noticing it.
21:21 jnthn Which would be awesome. :-)
21:21 masak jnthn: you mean "somebody else" :)
21:22 jnthn masak: I lost my ninja status when somebody photographed me hacking on binder guts at a conference. :-)
21:22 mac tylercurtis: what stands for *@t in your sample? Is it somehow useful?
21:23 jnthn mac: Without it, the signature would fail to bind because there's nothing to suck up the extra arguments.
21:23 tylercurtis mac: what jnthn++ said.
21:23 mathw rakudo: module M::A; our class B { }; module Main; M::A::B.new; # <- known?
21:23 p6eval rakudo cd64dd: OUTPUT«Can not find sub M::A::B␤  in main program body at line 1␤»
21:23 mathw (or possibly just wrong anyway)
21:23 ashleydev joined #perl6
21:23 mac Uhm... So *$h will slurp any scalars, *@t any arrays, yes?
21:23 masak mathw: yes, known. reported.
21:23 pmichaud *$h slurps a scalar from a flattened list
21:24 masak mathw: see, um, S10.
21:24 mathw masak: good, it broke Form :(
21:24 masak mathw: you're not allowed to do the semicolon module syntax twice in one file, though.
21:24 masak mathw: you do it once, and it's valid to the end of that file.
21:24 mathw I'm not trying to
21:25 pmichaud here's the difference between slurpy scalar and normal scalar:
21:25 * shakesoda waves
21:25 mathw That just happens to exhibit the same error I get with actual files
21:25 jnthn slurpy scalar is life we form the *@foo, and the @foo.shift
21:25 jnthn And bind what we shaft to the scalar.
21:25 masak mathw: ok. just pointing out that it shouldn't even compile.
21:25 jnthn *shifted
21:25 pmichaud sub abc(*$h, *@a) { say $h.perl; };    foo @array;    # $h gets the first element of @array, @a the rest of @array
21:25 pmichaud sub def($h, *@a) { say $h.perl; };    def @array;   # $h gets all of @array, @a is empty
21:25 pmichaud (s/foo/abc/ above)
21:26 jnthn *like
21:26 tylercurtis mac: Here's how S06 describes the slurpy scalar: "Slurpy scalar parameters capture what would otherwise be the first elements of the variadic array"
21:26 mathw right
21:26 * mathw -> bed
21:27 jnthn night, mathw
21:28 tadzik so in def() nothing will ever get into @a?
21:28 tylercurtis tadizk: iiuc, it would if you did "def @array, $some, $more, $arguments"
21:29 tadzik mhm
21:29 masak moritz_: I figured out how you broke ufo. it's about time. moritz_++
21:30 moritz_ :-)
21:30 tylercurtis tadzik: sorry about the name typo, by the way. "def @array" would also put stuff in the @a argument if there were more than element in @array.
21:31 masak moritz_: and .IO is the way to turn a string filename to an IO? as in, it works in Rakudo? or do I use some workaround for now?
21:31 Limbic_Region joined #perl6
21:31 PZt joined #perl6
21:32 moritz_ rakudo: say 'README'.IO ~~ :e
21:32 p6eval rakudo cd64dd: OUTPUT«0␤»
21:32 jnthn masak: I didn't read the patch yet but I'm sure moritz_ patched that in today.
21:32 masak \o/
21:32 jnthn er, moritz_++ that is
21:32 jnthn :-)
21:32 moritz_ rakudo: say '/home/p6eval/rakudo/README'.IO ~~ :e
21:32 masak moritz_++
21:32 p6eval rakudo cd64dd: OUTPUT«0␤»
21:32 masak er.
21:32 pmichaud no,   "def @array, 3, 4, 5"   would put stuff into the @a argument
21:32 moritz_ hum.
21:32 tylercurtis rakudo: say '/'.IO ~~ :e
21:32 masak hold that karma. :)
21:32 p6eval rakudo cd64dd: OUTPUT«1␤»
21:32 pmichaud with
21:32 pmichaud sub def($h, *@a) { say $h.perl; };    def @array;   # $h gets all of @array, @a is empty
21:32 pmichaud the first argument goes into $h, and the rest of the arguments go into @a
21:33 moritz_ rakudo: say '/home/p6eval/niecza'.IO ~~ :d
21:33 tylercurtis oops... I meant to say "def |@array"
21:33 p6eval rakudo cd64dd: OUTPUT«1␤»
21:33 moritz_ rakudo: say '/home/p6eval/niecza'.IO ~~ :e
21:33 p6eval rakudo cd64dd: OUTPUT«1␤»
21:33 tylercurtis pmichaud: thanks for catching my mistake.
21:33 Limbic_Region masak - thanks for your 10 year anniversary blog post.  Life hasn't allowed me to follow parrot/perl 6 for a couple of years - even as a voyeur but it is nice to see well written blog posts every now and then
21:33 Limbic_Region jnthn++ # for the same reason
21:34 tylercurtis tadzik: I meant to say that "def |@array" would work for @array longer than 1 element.
21:34 moritz_ huh. There is no README in the rakudo checkout on the p6eval box.
21:34 moritz_ rakudo: say '/home/p6eval/rakudo/README'.IO ~~ :e
21:34 tadzik tylercurtis: |@array?
21:34 p6eval rakudo cd64dd: OUTPUT«1␤»
21:34 moritz_ restored.
21:34 jnthn rakudo: unlink '/home/p6eval/rakudo/README'
21:34 pmichaud tadzik: |@array  means to treat the values of @array as individual arguments to the function being invoked
21:34 p6eval rakudo cd64dd:  ( no output )
21:35 masak Limbic_Region: you're welcome. and thanks. I remember you from quite early on.
21:35 jnthn rakudo: say '/home/p6eval/rakudo/README'.IO ~~ :e
21:35 p6eval rakudo cd64dd: OUTPUT«0␤»
21:35 jnthn moritz_: uh, sorry
21:35 jnthn :-)
21:35 jnthn moritz_: Seems Safe is not quite Safe yet ;-)
21:35 pmichaud jnthn: not sure Safe would ever be Safe from you :)
21:35 jnthn moritz_: Anyway, that's probably how it disappeared.
21:35 masak phenny: tell mathw that ufo is now fixed. thank you for reporting. mathw++
21:35 phenny masak: I'll pass that on when mathw is around.
21:36 jnthn :)
21:36 moritz_ rakudo: print ~dir('/')
21:36 p6eval rakudo cd64dd: OUTPUT«. .. emul var usr bin boot dev etc home lib mnt proc root sbin tmp sys lib64 selinux srv opt media lib32»
21:37 * pmichaud wonders how long it will be before the "10 years old" thread produces a DNF reference.
21:37 pugssvn r31756 | moritz++ | [evalbot] disallow unlink() and dir() in rakudo
21:37 p6eval joined #perl6
21:38 moritz_ rakudo: unlink('/home/p6eval/rakudo/README')
21:38 p6eval rakudo cd64dd: OUTPUT«Operation not permitted in safe mode␤  in 'Safe::forbidden' at line 2:/tmp/gss0PgUbWE␤  in main program body at line 22:/tmp/gss0PgUbWE␤»
21:38 [Coke] pmichaud: that's hardly fair. after all, DNF produced several game trailers.
21:39 pmichaud [Coke]: what's unfair about my comment?
21:40 [Coke] a fair *comparison
21:40 jnthn .oO( sneaking in dir was a great way to shift the DOS/UNIX balance back a little ;-) )
21:40 masak pmichaud: Twitter produced one 15 minutes ago. http://twitter.com/satefan/status/18865258727
21:40 pmichaud [Coke]: I'm not intending a comparison.  I'm wondering how long it will be (15 mins ago, apparently) before someone else makes the comparison.
21:41 masak pmichaud: I hate it how Perl 6 has no releases. :P
21:41 pmichaud masak: yes, me also.
21:41 masak we should totally make some. like, once a month or something.
21:42 pmichaud I'm this -> <-  tempted to reply tweet "Release #31 is on Thursday."
21:42 * moritz_ hates it how people just pour out bullshit
21:42 masak pmichaud: chromatic used to do that. haven't seen him do it for a while. I did it for a while too.
21:43 masak pmichaud: some people bite, usually to the effect of "yeah, but yaknowwhaddamean a REAL release, yaknow"
21:43 * pmichaud replies.
21:43 tylercurtis It's so terrible that I can't open up my shell right now and type "perl6"
21:43 moritz_ pmichaud: speaking of Thursday, could you please try to get in lexical lookup of <foo> rules? Otherwise I have to rewrite 80% of the examples of the regex chapter in the book
21:43 pmichaud moritz_: will do it.
21:43 tylercurtis Then "our multi sub postfix:<!> ($n) { [*] 1..$n; }" and then "5!" and have it say 120 for me.
21:44 pmichaud my response is likely to be   "if you meant 'no REAL release', then please say that."
21:44 pmichaud there's a huge difference between "no release" and "no real release".
21:44 masak pmichaud: they meant 'no REAL Scotsman'.
21:45 masak speaking of the book, I'll try to see what we'd need for Thursday wrt enums for making the Poker Hand chapter turn out nice, and whether I have a chance at implementing it.
21:45 * jnthn doesn't see a problem with not releasing Scotsmen
21:45 jnthn ;-)
21:46 avar joined #perl6
21:49 Juerd I'm going to move feather[123] to a new box, and decommission feather0
21:50 masak Juerd++ # thanks for the feathers!
21:50 Juerd This will cause downtime, of course :(
21:50 * masak ==> $bed
21:50 moritz_ Juerd: after you're done, I'm toying with the idea of installing an selinux enabled debian on feather3
21:51 moritz_ so that sandbox stuff gets easier...
21:51 Juerd Easier? Are you mad? :)
21:51 Juerd selinux is all but easy
21:51 moritz_ "possible"
21:51 moritz_ better? :-)
21:51 Juerd Hardly...
21:51 tylercurtis Is anyone here familiar enough with Camlp4 to compare it to Perl 6's grammar extension mechanisms?
21:52 Juerd moritz_: In any case, you're welcome to do it as long as it doesn't hinder the ease of deploying new projects
21:52 moritz_ Juerd: do you have better ides for sandboxing (besides being on a separate box already)?
21:53 Juerd moritz_: Feather[13] should be about experimental stuff, not about security. We have backups, in case things go horribly wrong.
21:53 Juerd moritz_: Running as non-root, in a chroot ought to suffice.
21:54 moritz_ Juerd: ok
21:54 Juerd Oh, with ulimits :)
21:54 moritz_ (that's what p6eval does, and I'm not really comfortable with it)
21:54 Juerd What kind of attack do you fear?
21:54 moritz_ mindless vandalism, mostly
21:55 Juerd How is that avoided with selinux?
21:56 moritz_ I'm not quite sure, haven't done much with it
21:56 Juerd Anyway, I'll start with feather3 today and will probably move 2 and 1 over tomorrow
21:57 moritz_ but the internet is full of tutorials for sandboxing with selinux, and in lack of better ideas I thought I'd try it
21:57 Juerd IMO, selinux is a pain in the ass that's mostly useful on systems where sandboxing with chroots is not possible.
21:58 Juerd It's all about fine-tuned access control, which is kind of irrelevant if there's nothing left to access.
21:58 moritz_ well, there always is
21:59 moritz_ if we offer a web shell for rakudo, all the rakudo processes will run with the same user ID
21:59 Juerd Yes, but damage caused by that can be repaired
21:59 moritz_ so the very least somebody can do is kill all processes from other sessions
21:59 tadzik hmm. http://wklej.org/id/366159/ we'll have to add 'is copy' for it to work (or is rw), but couldn't the compiler notice that we're messing with it, and assume 'is copy'?
22:00 moritz_ tadzik: no. Adding "is copy" and declaring it an error are equally good choices, depending on context
22:01 * moritz_ goes to sleep
22:01 pmichaud the safer default is ro
22:01 pmichaud afk, walk
22:02 tadzik but shouldn't it be complaining just after defining a function? Why does it crash only when the function is called?
22:05 ashleydev joined #perl6
22:09 tedv joined #perl6
22:10 Juerd tadzik: Because it doesn't know you're assigning until you're actually doing so. Such analysis could be added. I don't know if that's planned.
22:11 mac thanks for help everybody, see you tomorrow, I hope :)
22:12 Grrrr joined #perl6
22:17 tomaw joined #perl6
22:18 tylercurtis moritz_: are you still working on working on trying out optimization using PAST::Pattern?
22:18 jnthn Juerd: I'd like to get some analysis in for that at some point.
22:18 felliott joined #perl6
22:25 Juerd Dumping feather3's filesystem went really slow
22:25 Juerd So I was stracing it to see what's going on
22:26 Juerd Apparently there's a lot of ccache files around :P
22:26 Juerd du is still running on /home/tene/.ccache
22:26 Juerd Ah, it's done. 1 GB of cache files :)
22:26 * Juerd removes it
22:27 Juerd That's only 332512 files :P
22:29 Juerd And 475 MB in ~infinoid/.ccache, 3406 files
22:30 tomaw joined #perl6
22:52 dalek rakudo: f55fb01 | pmichaud++ | docs/spectest-progress.csv:
22:52 dalek rakudo: spectest-progress.csv update: 518 files, 23415 (112.8% of 20749) pass, 83 fail
22:52 dalek rakudo: Failure summary:
22:52 dalek rakudo: S02-magicals/args.t passed 3 unplanned test(s)
22:52 dalek rakudo: S05-interpolation/regex-in-variable.rakudo aborted 1 test(s)
22:52 dalek rakudo: S05-match/capturing-contexts.rakudo passed 22 unplanned test(s)
22:52 dalek rakudo: S06-operator-overloading/methods.t aborted 2 test(s)
22:52 dalek rakudo: S06-other/main-usage.t aborted 8 test(s)
22:52 dalek rakudo: S10-packages/basic.rakudo 47 - can "use" a class inside a module
22:52 dalek rakudo: S10-packages/basic.rakudo 48 - can "use" a class inside a class
22:52 dalek rakudo: S10-packages/use-with-class.t aborted 1 test(s)
22:52 dalek rakudo: S12-construction/BUILD.rakudo aborted 1 test(s)
22:52 dalek rakudo: S16-filehandles/filetest.rakudo aborted 8 test(s)
22:52 dalek rakudo: S16-filehandles/io.rakudo passed 84 unplanned test(s)
22:52 dalek rakudo: S16-filehandles/open.t aborted 2 test(s)
22:52 dalek rakudo: S16-io/say-and-ref.t aborted 2 test(s)
22:52 dalek rakudo: S29-context/die.rakudo aborted 3 test(s)
22:52 dalek rakudo: S29-context/exit.rakudo aborted 3 test(s)
22:52 dalek rakudo: S32-io/IO-Socket-INET.rakudo 2 - echo server and client
22:52 dalek rakudo: S32-io/IO-Socket-INET.rakudo 4 - received first 7 characters
22:52 dalek rakudo: S32-io/IO-Socket-INET.rakudo 5 - received next 3 characters
22:52 dalek rakudo: S32-io/IO-Socket-INET.rakudo 6 - remaining 26 were buffered
22:52 dalek joined #perl6
23:00 skangas left #perl6
23:00 tadzik gnite
23:01 sorear pmichaud: Hi!
23:03 sorear pmichaud: I'm looking for help understanding and implementing actual lists (not list context, I've got that already)
23:04 sorear 1. [+] 0, *+1 ... 10000 # How does this run in constant space?
23:16 ingy sorear: what things are you working on (in general) these days?
23:17 sorear regexes, packages, and roles
23:17 sorear all blocked on a sensible handling of lists
23:18 ingy sorear: up a level
23:18 sorear niecza?
23:18 ingy sorear: what's that again?
23:19 tylercurtis niecza: say "Hi."
23:19 sorear my perl 6 static optimizing compiler for .NET sandbox
23:19 p6eval niecza: OUTPUT«Hi.␤»
23:19 ingy :)
23:19 ingy neat!
23:19 snarkyboojum http://github.com/sorear/niecza :)
23:20 * ingy looks
23:21 ingy sorear: let me know if you get YAML::XS bugs
23:21 ingy I'll fasttrack them for you
23:22 ingy (not sure what that means exactly :)
23:28 * ingy is enjoying a few minutes of Python
23:30 sorear all I'm actually, directly using YAML::XS for is debugging
23:30 sorear STD.pm6 uses it for quite a bit more
23:50 jnthn pmichaud: We pass 112.8% of the test suite?! :-)
23:50 * jnthn suspects some calculation is a little off there. :-)
23:56 Juerd While feather3's data was being copied, the destination box crashed.
23:56 Juerd There's some nasty deadlock in the kernel, something with mdraid and dm.
23:56 Psyche^ joined #perl6
23:57 Juerd You'll have to do without feather3 for now because I am too tired to restart the migration and wait for it to finish.
23:58 s1n joined #perl6

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

Perl 6 | Reference Documentation | Rakudo