Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-04-12

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:02 LlamaRider joined #perl6
00:07 BenGoldberg r: my $t = now; my $a = "a"; $a !eq '' for ^50000; say now - $t;
00:07 p6eval rakudo 460c2a: OUTPUT«1.53003199␤»
00:11 BenGoldberg Why does !eq take more time than (...eq...).not?
00:11 BenGoldberg Aren't they eqivilant?
00:15 sorear you may be seeing an inliner fail
00:19 sorear I think it actually expands to METAOP_NEGATE(&infix<eq>)(..., ...)
00:21 BenGoldberg It's too bad there's no perl6 deparser, then we'd be able to figure this out so much faster ;)
00:23 sorear there used to be one
00:23 sorear perl6 --target=past
00:23 sorear I don't know if it works currently
00:33 BenGoldberg r: my $t = now; my $x = [||] ^50000; say now - $t; say $x;
00:33 p6eval rakudo 460c2a: OUTPUT«2.4516726␤1␤»
00:33 BenGoldberg r: my $t = now; my $x = [||] ^5; say now - $t; say $x;
00:33 p6eval rakudo 460c2a: OUTPUT«0.04418566␤1␤»
00:34 edgeuplink joined #perl6
00:36 BenGoldberg Should perl be smart enough to recognize that the result will be the same regardless of the list size?
00:42 flussence r: my $x = [||] ^50000; say now - INIT now; say $x
00:42 p6eval rakudo 460c2a: OUTPUT«2.4724528␤1␤»
00:42 flussence r: my $x = so any(^50000); say now - INIT now; say $x
00:42 p6eval rakudo 460c2a: OUTPUT«1.53298694␤True␤»
00:43 flussence one place junctions are actually faster at something
00:44 BenGoldberg How would I do the following...
00:45 BenGoldberg r: my @a = rand .. *; my @b = rand..*; my @c := @a Z<=> @b; so any(@c);
00:45 japhb_ sorear, BenGoldberg: too see the AST, you need `perl6 --target=ast` now (s/past/ast/ in other words)
00:45 BenGoldberg ... but without it timing out?
00:45 p6eval rakudo 460c2a: OUTPUT«(timeout)»
00:46 BenGoldberg japhb_, can the p6eval be adjusted so we can ask it for an AST?
00:47 japhb_ BenGoldberg, in theory yes, but the AST is much too large to display directly in channel for even relatively trivial programs.
00:47 japhb_ It would have to nopaste somewhere and display a link to that.
00:47 japhb_ And I don't think p6eval knows how to nopaste yet.
00:48 BenGoldberg Ok.
00:49 japhb_ BenGoldberg, here's an example for you: https://gist.github.com/japhb/a2982ac96a6e25bea0ae
00:50 BenGoldberg Hmm, I think I'm using the zip operator incorrectly....
00:50 BenGoldberg r: my @a := rand .. *; my @b := rand..*; my @c := @a Z<=> @b; .say for @c[^15];
00:51 p6eval rakudo 460c2a: OUTPUT«Increase␤Increase␤Increase␤Increase␤Increase␤Increase␤Increase␤Increase␤Increase␤Increase␤Increase␤Increase␤Increase␤Increase␤Increase␤»
00:51 BenGoldberg Surely they shouldn't all be the same
00:52 japhb_ BenGoldberg, what you're specifying is a range that starts at a random number.  Did you instead want an infinite sequence of random numbers?
00:52 rking joined #perl6
00:52 BenGoldberg Yes
00:52 japhb_ r: my @a := rand xx *; my @b := rand xx *; my @c := @a Z<=> @b; .say for @c[^15];
00:52 p6eval rakudo 460c2a: OUTPUT«Increase␤Increase␤Decrease␤Decrease␤Increase␤Decrease␤Decrease␤Increase␤Decrease␤Decrease␤Increase␤Increase␤Decrease␤Increase␤Decrease␤»
00:53 BenGoldberg Thanks.
00:53 japhb_ np
00:56 BenGoldberg And what's a good way of specifying the first non-false value of a potentially infinite list?
00:56 japhb_ I'm not sure what you mean by 'specifying'.  What's your use case?
00:58 xilo mm red ale
00:59 BenGoldberg Suppose we've got @a, @b, and @c as in that last bit of code.  If @c[0] is Decrease or Increase, use that value.  If @c[0] is Same, examine @c[1].  If @c[1] is not Same, use that value.  If @c[1] is same, look at @c[2]...
01:00 BenGoldberg Now, I know that in this example, the odds of @c[0] being Same are absurdly small, but in some other situation it might be different.
01:01 japhb_ BenGoldberg, you're looking for the first $i for which @c[$i] is true?
01:02 BenGoldberg Even simpler than that, the first @c[$i] which is true
01:02 japhb_ oh, then just use @c.first(*.so)
01:04 BenGoldberg What is .so ?
01:05 japhb_ booleanize, essentially
01:05 japhb_ "return truth value"
01:07 Chillance joined #perl6
01:08 anuby joined #perl6
01:08 shinobicl joined #perl6
01:10 FROGGS_ joined #perl6
01:18 average joined #perl6
01:24 Psyche^ joined #perl6
01:36 Vlavv_ joined #perl6
01:39 rom1504 joined #perl6
01:39 Rix joined #perl6
01:53 isBEKaml joined #perl6
02:13 lustlife joined #perl6
02:19 dayangkun joined #perl6
02:32 daniel-s_ joined #perl6
02:45 orafu joined #perl6
02:48 preflex_ joined #perl6
02:50 xilo hmm need something to do
03:26 arlinius joined #perl6
03:29 labster xilo:  if you're bored, you can always write a module.  Do whatever's fun, or get an idea from here: https://github.com/japhb/perl6-most-wanted/blob/master/most-wanted/modules.md
03:43 japhb labster, not my personal fork please -- use the one in the perl6 organization
03:44 labster right, sorry.  It's just what I have in my browser history
03:45 labster use this one: https://github.com/perl6/perl6-most-wanted/blob/master/most-wanted/modules.md
03:45 japhb :-)
03:45 dalek doc: ed21f21 | (Graham Todd)++ | app.pl:
03:45 dalek doc: Make app.pl run again by updating Mojolicious syntax (->root is now ->static).
03:45 dalek doc: review: https://github.com/perl6/doc/commit/ed21f21bbd
03:50 * labster just sent his very first pull request to rakudo o/
03:50 gtodd oops make that ->root is now ->paths)
03:51 gtodd I hate immortalizing typoos
03:52 labster ilbot is watching you
03:57 diakopter yeah but it has a memory hole too
03:58 japhb .oO( THERE IS A HOLE IN YOUR MIND. )
04:21 * sorear stares deep into the hole in japhb's mind
04:26 * japhb considers whether the presence of a mind outside the hole limits creates resonant frequencies in the hole that result in the Casimir effect trying to close the hole ever so gently.
04:28 gtodd from the REPL how do I laod/eval a bunch of *.p6 files in my $HOME that load convenience functions  eval(slurp "file.p6") ??
04:29 dalek nqp: a9ef906 | (Geoffrey Broadwell)++ | src/QAST/Operations.nqp:
04:29 dalek nqp: Fix nqp::copy to use File instead of OS from Parrot
04:29 dalek nqp: review: https://github.com/perl6/nqp/commit/a9ef90678c
04:29 dalek nqp: 8a6373f | (Geoffrey Broadwell)++ | src/QAST/Operations.nqp:
04:29 dalek nqp: Add missing CCLASS_PRINTING and CCLASS_GRAPHICAL; remove duplicate definition of CCLASS_NEWLINE
04:29 dalek nqp: review: https://github.com/perl6/nqp/commit/8a6373fada
04:30 dalek rakudo/nom: 3e1b44f | (Geoffrey Broadwell)++ | tools/build/NQP_REVISION:
04:30 dalek rakudo/nom: Bump NQP_REVISION for fixes to nqp::copy and some CCLASS constants
04:30 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3e1b44f468
04:31 japhb Hopefully the above are correct; the builds are taking FOREVER on this box, so I'm crossing my fingers and being brave.  :-)
04:36 gtodd eval(slurp "file.p6") does not seem to produce the same effect as typing the functions into the REPL ... I guess I need to make a .pm and "use"it?
04:50 kaleem joined #perl6
04:57 dsog joined #perl6
05:11 mtk joined #perl6
05:17 gdey joined #perl6
05:25 japhb panda works again \o/
05:26 labster \o/
05:29 berekuk joined #perl6
05:36 berekuk joined #perl6
05:37 diakopter \o/\/o
05:38 labster (o.o)
05:40 drbean joined #perl6
05:41 dayangkun joined #perl6
05:51 moritz \o
05:52 rindolf joined #perl6
05:52 sorear o/
05:52 sorear japhb: yay
06:03 mtk joined #perl6
06:09 eternaleye joined #perl6
06:21 dsog left #perl6
06:41 domidumont joined #perl6
06:48 lizmat joined #perl6
06:52 FROGGS_ joined #perl6
07:00 lizmat joined #perl6
07:02 SamuraiJack joined #perl6
07:03 anuby_ joined #perl6
07:11 domidumont joined #perl6
07:12 timotimo oh, the nqp::copy mistake i made was quite simple. thanks for fixing it for me!
07:12 timotimo japhb++
07:17 kurahaupo joined #perl6
07:20 frdmn joined #perl6
07:27 mangala joined #perl6
07:38 timotimo "[Update: It turns out that the returns property just constrains the return type as seen by the routine, and not the return type seen by the rest of the world. Use the type prefix or arrow form to declare a return type that is seen by the rest of the world, and in particular any type inferencing engine. We call that the of type to distinguish it from the where type that is specified by the returns property.]" - is this still accurate?
07:49 sqirrel joined #perl6
08:00 berekuk joined #perl6
08:01 labster r: r: say "foo".path.WHAT; say IO::Path.WHAT;
08:01 p6eval rakudo 3e1b44: OUTPUT«[31m===[0mSORRY![31m===[0m�Two terms in a row�at /tmp/EFXVq8Fuo2:1�------> [32mr[33m�[31m: say "foo".path.WHAT; say IO::Path.WHAT[0m�    expecting any of:�        argument list�        postfix�        infix stopper�        infix or meta-infix�        statem…
08:01 labster pastefail
08:01 labster r: say "foo".path.WHAT; say IO::Path.WHAT;
08:01 p6eval rakudo 3e1b44: OUTPUT«(IO::Path)␤Could not find symbol '&Path'␤  in method <anon> at src/gen/CORE.setting:10771␤  in any  at src/gen/Metamodel.pm:2504␤  in any find_method_fallback at src/gen/Metamodel.pm:2492␤  in any find_method at src/gen/Metamodel.pm:939␤  in block  at /tmp/3MujuaL1…
08:02 labster p6evalfail
08:02 FROGGS r: say IO.new
08:02 p6eval rakudo 3e1b44: OUTPUT«IO is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting:2␤  in method new at src/RESTRICTED.setting:17␤  in block  at /tmp/IVzZVrdyYi:1␤␤»
08:02 FROGGS ENOTALLOWED
08:02 berekuk joined #perl6
08:03 labster say "foo".IO
08:03 labster r: say "foo".IO
08:03 p6eval rakudo 3e1b44: OUTPUT«IO.new(ins => 0, chomp => Bool::True, path => "foo")␤»
08:03 labster unless you ask nicely :)
08:04 FROGGS :o)
08:04 BigBear joined #perl6
08:09 hoelzro morning, Perl 6 folk!
08:09 labster Made my first commit to rakudo today to try to speed up infix:<ne>, only to have pmichaud++ tell me the behavior was wrong.  So instead, I'm finding bugs based on that behavior.
08:09 FROGGS morning hoelzro
08:09 labster r: multi infix:<eq> (Int $a, Int $b) { $a * $b == 0 }; say 1 eq 0, 1 ne 0, 1 !eq 0;
08:09 p6eval rakudo 3e1b44: OUTPUT«TrueTrueFalse␤»
08:10 sorear labster: oy, the junction case?
08:10 labster ne is supposedly defined as !eq
08:10 labster yeah, the junction case
08:10 labster but it's manifesting here.
08:11 labster Though I'm not sure that this is any more sane... (ignoring the obvious insanity of my eq definition).
08:11 sorear yeah, ne = !eq
08:12 sorear I ran into that one with niecza too
08:12 sorear fun :D
08:17 edgeuplink joined #perl6
08:22 fhelmberger joined #perl6
08:24 labster thanks for the sympathy, sorear.
08:25 labster oh edge cases, when will they ever stop ruining my perfect code?
08:30 berekuk joined #perl6
08:32 kresike joined #perl6
08:32 kresike hello all you happy perl6 people
08:33 jnthn morning, #perl6 o/
08:34 FROGGS hi kresike, jnthn
08:34 FROGGS o\
08:34 kresike FROGGS, jnthn o/
08:47 kaleem joined #perl6
08:50 lizmat joined #perl6
08:51 domidumont joined #perl6
08:56 fgomez joined #perl6
09:01 lizmat joined #perl6
09:06 mathw_ o/
09:07 * mathw semi-returns from broken-laptop-induced absence that was largely indistinguishable from the usual lurking
09:07 timotimo :)
09:07 jnthn o/ mathw
09:08 berekuk joined #perl6
09:08 mathw I have discovered that one of the most terrible sounds I've ever heard is the beep code that a Lenovo ThinkPad uses to tell you that its system board is broken
09:08 mathw Especially when it's my ThinkPad
09:09 mathw I know there are more terrible sounds, but I hope never to hear any of those
09:10 tadzik the worse sound my thinkpad gave is the "power cord (un)plugged" beep
09:11 tadzik it's horrible on 1AM with headphones on, when the power supply station thinks it's a good time to do a second-long maintenance
09:11 mathw Ow
09:11 timotimo yeah, that thing is LOUD
09:12 tadzik of course it goes full volume
09:12 mathw Yeah mine did it a lot the other week when one of my power supplies succumbed to a loose internal connection
09:12 mathw I'm not ruling out that as a contributing factor in the death of the motherboard
09:12 mathw Well of course
09:12 mathw because you really need to know that
09:12 tadzik luckily you can turn it off
09:13 mathw oh can you? I shall have to remember that when my new ThinkPad arrives
09:13 tadzik it's in bios settings somewhere on my sl500
09:13 mathw excellent
09:13 tadzik which is almost-not-a-thinkpad though
09:13 mathw well it's worth a look
09:13 tadzik it has ideapad firmware inside, iirc, so it may be different
09:13 mathw I'm getting a T430 :)
09:14 tadzik I'm considering x230 or something, but there's barely anything besides trackpoint that makes me want to buy a thinkpad
09:14 mathw according to the original estimates it should be coming early next week...
09:14 tadzik they don't even have always-on usb
09:14 mathw I've never seen a need for that
09:14 mathw but I do need a trackpoint
09:14 tadzik phone battery pack when you go geocaching
09:14 bonsaikitten tadzik: you would not like the X121e and related models
09:15 mathw no matter how good the trackpad might be on a laptop, the trackpoint is closer to the home row. Far more convenient
09:15 bonsaikitten mathw: trackpads have this amazing feature of picking up my hands from a centimeter or two away
09:15 mathw bonsaikitten: that sounds entertaining
09:15 bonsaikitten it makes focus-follows-mouse completely futile and has the precision of moving the mouse around with a long stick
09:16 bonsaikitten random spazzing mousepointers are not really entertaining when you try to do stuff
09:16 mathw definitely not
09:16 mathw as I found out when I started my new job and they gave me a dodgy mouse which would occasionally send the pointer leaping around the screen at random
09:17 bonsaikitten mmh fun
09:17 mathw yup
09:17 mathw fortunately my colleague saved me from yet another trip through the incredibly slow procurement process for a new mouse by revealing that he had several spare ones in his desk drawer in his desk in the office on another campus that we're not working in for this project...
09:18 mathw also fortunately we go there occasionally for meetings so picked one up then
09:18 mathw hurrah for mouse pointer control
09:18 tadzik mathw: ooc, why not t5xx?
09:19 timotimo :D
09:20 tadzik and please don't say "because keyboard" :)
09:20 cognominal joined #perl6
09:21 mathw too big
09:21 mathw basically
09:21 dalek v5: 09e6da4 | (Tobias Leich)++ | lib/Perl6/P5 (2 files):
09:21 dalek v5: support undef
09:21 dalek v5: review: https://github.com/rakudo-p5/v5/commit/09e6da4aab
09:21 dalek v5: 999a852 | (Tobias Leich)++ | STATUS.md:
09:21 dalek v5: smoked
09:21 dalek v5: review: https://github.com/rakudo-p5/v5/commit/999a8526ad
09:22 tadzik hm
09:23 tadzik oh, it's bigger indeed
09:24 timotimo i've got an x200s, but i think the next thinkpad i'll buy will be a bit bigger
09:24 tadzik I now have 15.4", and it's a bit clumsy when traveling
09:24 tadzik maybe because it also weights 4 kgs
09:24 timotimo 4kgs! wow.
09:25 tadzik yep
09:25 timotimo can't you build a big laptop that doesn't weigh 1/250th of a ton?
09:25 tadzik I disassembled it a couple of times and I still don't know why it's so heavy
09:25 sqirrel joined #perl6
09:25 tadzik t430 you say, hmm
09:26 mathw seemed right to me
09:26 mathw I hope I don't change my mind when it arrives!
09:27 tadzik and it does have usb 3.0
09:27 tadzik well, count me in then
09:27 tadzik and this nice new keyboard from which you _can_ remove hair
09:28 timotimo i was initially sceptical of that keyboard, but then a friend let me type on it and it seemed all right
09:28 timotimo also ... yeah, the hair problem :|
09:28 mathw I have a very furry cat...
09:28 timotimo i have kind of furry arms :|
09:29 tadzik the old keyboard are all fun and games until hair and dirt gets inside
09:29 tadzik in the new ones you need to blow and the problem is gone
09:29 timotimo do you have a tip for cleaning the old type?
09:30 tadzik phen^W^W
09:30 tadzik yoleaux: "agrafka"?
09:30 tadzik dang
09:30 tadzik safety-pin it is
09:31 jnthn That's a cute word for safety pin :)
09:31 tadzik I just swipe it all along the gaps between the keys, and then "pick" it upwards on the edge of a keyboard
09:31 tadzik repeat until clean enough
09:31 tadzik safety pin or a random piece of wire that doesn't bend easily
09:31 tadzik tends to work ok with hair
09:32 timotimo hmm
09:32 mathw At one point I got so annoyed with mine I took it out of the laptop, took all the caps off and cleaned it that way
09:32 FROGGS a harder brush works well for laptop keys
09:32 mathw Got it very clean, but it was incredibly tedious
09:32 timotimo i have a problem with my caps
09:33 timotimo i lost the tab key cap and the H key keeps coming off when i use the trackpoint
09:33 FROGGS timotimo: new keyboard is about 30eur at ebay
09:33 timotimo oh? that's 50% of what i saw somewhere else
09:34 timotimo but i don't have an ebay account :|
09:34 FROGGS your laptop model?
09:34 timotimo x200s
09:34 mathw this is clearly the channel of good taste in laptops :)
09:35 tadzik mathw: which t430 model did you get?
09:35 FROGGS mathw: I've got a dell, and it is awesome :o)
09:36 FROGGS timotimo: there is a used one for sale... I'll have a look at it
09:36 mathw tadzik: it's a custom-build T430 with dual core i7, fancier wireless and the 1600x900 screen
09:37 mathw 8GB of RAM (16GB was too expensive to build in, but I can upgrade later) and the basic hard drive because they charge far, far too much for SSDs and I'll upgrade that myself in a few months
09:38 timotimo i read somewhere that expertsâ„¢ expert SSD prices to reach the level of HDD prices this year still
09:38 mathw they're getting pretty good
09:38 FROGGS timotimo: that's a bit of a hoax
09:38 tadzik I have my own ssd in the old laptop, I'd rather buy the new one without a disk at all if possible
09:38 mathw I got a 256GB one for my old laptop for a good price
09:38 mathw unfortunately it won't fit in the new one :(
09:38 mathw old laptop takes 9mm drives, new one takes 7.5
09:38 mathw probably can't get away with sawing 2.5mm off the top...
09:39 FROGGS I expect that SSDs with size less than 384GB will be "as cheap as" normal HDDs of that size
09:39 mathw big ones will remain crazy expensive
09:39 FROGGS BUT: who buys a normal HDD with less then 384GB? and note, such an HDD is just a bit cheaper then a 1TB hdd
09:39 timotimo good point.
09:40 FROGGS so you cant really compare, unless they sell 1TB SSDs for a normal price
09:40 mathw I was quite struck by the lowest HDD I could get for my new laptop being 320GB
09:40 mathw My old laptop came with a 160GB and that was not the base spec
09:40 mathw which I then upgraded to a 256GB SSD last year
09:40 FROGGS it is still 60cent/MB for SSDs, and about 4 cent/MB for HDDs
09:40 mathw sooooo much space
09:41 FROGGS hmmm, my 256GB SSD already was full :/
09:41 tadzik who needs a big hdd in a laptop anyway :)
09:41 FROGGS <----
09:41 FROGGS several VMs need its space
09:41 tadzik I moved my music and pictures to NFS at home recently, suddenly I need 20G on my disk
09:42 tadzik well, VMs, yes
09:42 FROGGS have almost no music/videos on it
09:43 cognominal With my macbook air, I am constrained by the size of the SSD (129Mo) but I don't care much about wasting VM anymore. With a HDD, the swapping gets terrible.
09:43 tadzik swapping is terrible in general, imho :)
09:43 tadzik I prefer kernel to just kill the processes
09:44 cognominal I put videos on an USB key, they are getting big, fast and cheap.
09:44 cognominal I mean an USB 3 key.
09:44 daxim joined #perl6
09:45 mathw That's going to be a good option for me now I'll have USB 3 port :)
09:45 mathw I get away with it because the really space-chewing stuff I do goes on my desktop which has a couple of 1TB drives in it
09:47 cognominal also with an SSD, running an app like grand perspective to see what eats my disk is getting very fast.
09:49 brrt joined #perl6
09:50 lizmat joined #perl6
09:51 tadzik mathw: t430 has 7.5mm disk case?
09:51 mathw so I understand
09:51 tadzik dang
09:51 mathw yes that's what I thought
09:53 woolfy joined #perl6
10:06 domidumont joined #perl6
10:41 jerome_ joined #perl6
10:49 cognominal how do I create a link or symlink in rakudo short of running the command?
10:50 FROGGS cognominal: I dont understand, you want to create a symlink via a shell command from within perl6?
10:52 jnthn I think the question is more "does Perl 6 have a built-in function/method for creating a symlink"
10:53 cognominal yup
10:53 timotimo wow. on april 1st there was a 12 hour livestream of a "best video no youtube" nominee announcement ceremony
10:53 timotimo they had 10 stacks of cards and read titles and descriptions of videos for almost the whole time
10:54 timotimo that's commitment.
10:54 FROGGS cognominal: if there were one it would be here: https://github.com/tadzik/perl6-File-Tools/blob/master/lib/Shell/Command.pm
10:56 cognominal I meant I did not find a link or symlink sub in rakudo/src/core/IO.pm
10:57 FROGGS cognominal: and it is missing here too: nqp/src/QAST/Operations.nqp:1642
10:58 FROGGS hmmm, but it looks like parrots supports link and symlink...
10:59 jnthn I guess we could provide them, with the proviso that they ain't portable.
10:59 cognominal is that Posix?
10:59 jnthn But then, we offer .is_link already, which also isn't.
11:00 * FROGGS rebuilds nqp to see if that works...
11:00 cognominal http://en.wikipedia.org/wiki/Symbolic_link # apparently it is
11:01 cognominal same for a hard link
11:04 mathw Doesn't NTFS have symlinks these days?
11:04 timotimo i believe so
11:04 timotimo hm, or was that hard links?
11:05 mathw nope, symlinks
11:05 mathw so says that wikipedia page
11:06 * FROGGS recompiles rakudo and creates a symlink
11:18 lizmat joined #perl6
11:22 FROGGS cognominal: you can try: https://gist.github.com/FROGGS/538aa9cd185df5215372
11:22 FROGGS cognominal: I'm not sure though if I swapped target and source or not...
11:23 FROGGS would be cool if you check that and apply the patch or so
11:23 FROGGS I need to &lunch
11:23 FROGGS bbiab
11:32 shinobicl joined #perl6
11:35 shinobicl_ joined #perl6
11:52 huf__ joined #perl6
11:54 bloonix joined #perl6
11:54 lizmat joined #perl6
11:54 Manoj_ joined #perl6
11:55 Manoj_ left #perl6
12:08 domidumont joined #perl6
12:19 cognominal FROGGS, I got No registered operation handler for 'symlink'. Thx, in the meantime, I will use  &run
12:20 FROGGS cognominal: it does work for me... I'll commit in a few minutes
12:20 cognominal thx
12:23 jnthn Remember to bump NQP_REVISION.
12:23 jnthn (which is probably why the no registered operation hadnler error)
12:25 FROGGS yes, will do :o)
12:25 cognominal You rock
12:26 FROGGS \m/
12:27 FROGGS jnthn: there is no $*WEAREONPOSIX switch, no?
12:27 jnthn Don't believe so
12:27 FROGGS k, so no tests for now
12:28 jnthn Well, we know it's Windows that is the one that will blow up out of all the platforms we're aware that we run on?
12:29 jnthn So checking we're not on Windows is probably sufficient. We can ammend things if we learn better.
12:29 FROGGS what if someone runs the tests on a fat32 filesystem using a unix box?
12:29 jnthn Would rather have that imperfection than no tests. No tests for copy gave us the panda breakage...
12:29 jnthn FROGGS: Then a $*WEAREONPOSIX would not have helped :P
12:29 FROGGS well, we need a bunch of others of course :P
12:29 jnthn That does seem relatively unlikely.
12:30 FROGGS k, will add tests
12:30 jnthn FROGGS++
12:30 jnthn If while you're in there, and if you have time, you could add a test for copy, that would also be great.
12:30 * FROGGS takes the karma he already got and runs...
12:31 FROGGS will do
12:31 jnthn It's preferable that we catch such things in spectest than by applications finding 'em.
12:31 dalek nqp: 5104c2e | (Tobias Leich)++ | src/QAST/Operations.nqp:
12:31 dalek nqp: add nqp::symlink and nqp::link
12:31 dalek nqp: review: https://github.com/perl6/nqp/commit/5104c2ed11
12:32 FROGGS right
12:34 zs1i-2 joined #perl6
12:35 dalek rakudo/nom: 4e37f55 | (Tobias Leich)++ | / (3 files):
12:35 dalek rakudo/nom: add symlink and link
12:35 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4e37f5510e
12:36 timotimo neat
12:38 FROGGS jnthn: there are tests for open... at least indirect tests which use open to create files...
12:38 colomon http://starlogs.net/#perl6/roast
12:38 FROGGS lol
12:38 jnthn FROGGS: open?
12:39 jnthn FROGGS: It was copy I suggested tests for ;)
12:39 FROGGS ahh
12:39 FROGGS hehe
12:39 FROGGS r: my $copy; $open = 42
12:39 p6eval rakudo 3e1b44: OUTPUT«[31m===[0mSORRY![31m===[0m�Variable '$open' is not declared�at /tmp/cqqJY8b78b:1�------> [32mmy $copy; $open[33m�[31m = 42[0m�    expecting any of:�        postfix�»
12:40 FROGGS meh... was expecting it so say there is $copy...
12:40 FROGGS k, copy then
12:40 jnthn Well, it wont' confuse variables and fucntons
12:40 jnthn r: cpy('foo', 'bar')
12:40 p6eval rakudo 3e1b44: OUTPUT«[31m===[0mSORRY![31m===[0m�Undeclared routine:�    cpy used at line 1. Did you mean '&copy'?��»
12:40 FROGGS but I thought it tells me about typos in varnames
12:41 FROGGS there is code for suggestions in check_variable() in the grammar...
12:41 jnthn yeah but they have to be close :)
12:42 FROGGS well, copy and open are something close...
12:42 jnthn r: my $laughter; say $slaughter
12:42 p6eval rakudo 3e1b44: OUTPUT«[31m===[0mSORRY![31m===[0m�Variable '$slaughter' is not declared. Did you mean '$laughter'?�at /tmp/iiF9dVWZYV:1�------> [32mmy $laughter; say $slaughter[33m�[31m<EOL>[0m�    expecting any of:�        postfix�»
12:42 mtk joined #perl6
12:43 FROGGS r: class Copy{ }; Open.new
12:43 p6eval rakudo 3e1b44: OUTPUT«[31m===[0mSORRY![31m===[0m�Undeclared name:�    Open used at line 1��»
12:43 FROGGS meh
12:43 jnthn Not levenstein enough :)
12:43 FROGGS ya, looks like
12:44 FROGGS it is more like Levenfelsen then
12:45 jnthn .oO( unlevensteined braed )
12:46 anant joined #perl6
12:46 FROGGS ?
12:46 FROGGS dont get it
12:47 mtk joined #perl6
12:47 jnthn Don't worry, it wasn't that funny :)
12:47 jnthn Just my brane making weird associations.
12:48 FROGGS k :o)
12:48 FROGGS most things are funnier in my head too then here in irc
12:50 anant I think the correct definition of a Parcel should be "Two or more ..." instead of "One or more ..." (S02:2125)
12:50 anant say (1).WHAT, (1, 2).WHAT
12:50 anant r: say (1).WHAT, (1, 2).WHAT
12:50 p6eval rakudo 3e1b44: OUTPUT«(Int)(Parcel)␤»
12:51 tadzik r: say(1,).WHAT
12:51 p6eval rakudo 3e1b44: OUTPUT«1␤»
12:51 tadzik erm
12:51 tadzik r: say (1,).WHAT
12:51 p6eval rakudo 3e1b44: OUTPUT«(Parcel)␤»
12:52 jnthn It's , that makes a parcel, even if the name suggests otherwise.
12:52 anant ah, so the comma operator is a must
12:52 FROGGS r: say (1,).count
12:52 p6eval rakudo 3e1b44: OUTPUT«No such method 'count' for invocant of type 'Parcel'␤  in block  at /tmp/tTgXCP0duM:1␤␤»
12:52 jnthn elems
12:52 FROGGS ohh, okay
12:53 FROGGS r: say (1,).elems
12:53 p6eval rakudo 3e1b44: OUTPUT«1␤»
12:56 bluescreen10 joined #perl6
12:57 eternaleye joined #perl6
12:59 anant I could not understand this line: https://github.com/perl6/specs/blob/master/S02-bits.pod#L2187
13:00 kaleem joined #perl6
13:13 mtk joined #perl6
13:18 Juerd anant: Neither do I... :)
13:20 dalek roast: 112afe3 | (Tobias Leich)++ | S32-io/copy.t:
13:20 dalek roast: added tests for Str.IO.copy and copy()
13:20 dalek roast: review: https://github.com/perl6/roast/commit/112afe3e8b
13:21 dalek rakudo/nom: ffc17d3 | (Tobias Leich)++ | t/spectest.data:
13:21 dalek rakudo/nom: run new test file copy.t
13:21 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ffc17d35e0
13:22 kaare_ joined #perl6
13:23 anant Juerd: We need to be enlightened :)
13:23 timotimo good work, froggs!
13:25 domidumont joined #perl6
13:26 PacoAir joined #perl6
13:27 anant Do the synopses consistently use the terms "parameter" and "argument" for "formal parameter" and "actual parameter" respectively?
13:27 daxim joined #perl6
13:28 FROGGS timotimo: I believe one could write a bunch more sane tests for copy() though
13:29 FROGGS like trying to copy a directory/symlink/whatever
13:29 FROGGS or copying to an existing file...
13:29 FROGGS that's not covered yet
13:30 cognominal anant: yes
13:30 jnthn anant: We try to consistently use "parameter" for the callee side thing and "argument" for the caller side thing everywhere in Perl 6, yes.
13:30 cognominal an argument is what is bound to a parameter
13:31 anant cognominal: because in S08, it's kind of used inter-changeably : http://perlcabal.org/syn/S08.html
13:32 jnthn I'd treat S08 with some suspicion, fwiw. It's one of the ones marked [DRAFT].
13:33 cognominal anant: indeed, that's wrong
13:33 tgt joined #perl6
13:34 anant ah .. should I be ignoring S08? (I was trying to get more details on Parcel/Capture)
13:36 cognominal anant, I think they are pretty well covered in S02
13:38 cognominal r:  (1,) ~~ :($a)
13:38 p6eval rakudo 4e37f5:  ( no output )
13:38 cognominal r:  say (1,) ~~ :($a)
13:38 p6eval rakudo 4e37f5: OUTPUT«True␤»
13:39 cognominal anant, you also have the Signature object
13:39 PerlJam anant: or you could patch S08 to use the terminology consistently  :)
13:39 cognominal r:  say \(1) ~~ :($a)
13:39 p6eval rakudo 4e37f5: OUTPUT«True␤»
13:40 cognominal r: say :($a).WHAT
13:40 p6eval rakudo 4e37f5: OUTPUT«(Signature)␤»
13:41 kbenson joined #perl6
13:44 isBEKaml joined #perl6
13:46 anant cognominal: They are in S02, but unfortunately, I couldn't understand that section properly .. like why do we need both a Parcel and a Capture object type?
13:47 cognominal anent For example with named arguments
13:47 cognominal oops
13:47 jnthn Parcels have only a positional nature.
13:47 jnthn Captures have positional and named.
13:47 anant PerlJam: can I? I would be happy to do my first commit :)
13:47 cognominal anant: For example with named arguments, you can pass many of the same name and I think  this is the last that taker over
13:48 cognominal anant: you can see a Capture as a normalised Parcel
13:52 cognominal r: my %some-default = :foo<bar>, :karma<gnole>;  sub fun( *%named) { .say for %named }; fun |%some-default, :foo<baz>
13:52 p6eval rakudo 4e37f5: OUTPUT«duplicate named argument in call␤  in block  at /tmp/wbqAVr9Hpp:1␤␤»
13:53 cognominal I thought duplicate named arguments were a feature
13:57 lizmat joined #perl6
13:57 anant jnthn: Do Parcels and Captures fill different use cases? Capture: To bind a group of argument objects to a subroutine's parameters (that would explain the positional _and_ named nature). Parcel: To simply group objects.
14:02 frdmn joined #perl6
14:03 shinobicl left #perl6
14:03 cognominal :r    sub fun (Int :@x) { ... } ;     fun( x => 1, x => 2 );              # @x := (1, 2)
14:03 cognominal r:    sub fun (Int :@x) { ... } ;     fun( x => 1, x => 2 );              # @x := (1, 2)
14:03 p6eval rakudo 4e37f5: OUTPUT«Nominal type check failed for parameter '@x'; expected Positional but got Int instead␤  in sub fun at /tmp/8CEdGf5yQg:1␤  in block  at /tmp/8CEdGf5yQg:1␤␤»
14:04 jnthn anant: Those are certainly the typical use cases, yes.
14:04 cognominal contrary to :  https://github.com/perl6/specs/blob/master/S06-routines.pod#L874
14:04 skids joined #perl6
14:06 jnthn cognominal: yeah...I tend to view that part of the spec as somewhere between "too cute by half" and "utterly insane".
14:06 jnthn It means that the callee choosing to change a sigil can change the semantics of a call.
14:07 jnthn Even if they otherwise carefully preserve type constraints. Or perhaps if they intended to deliberately widen the types taken as part of a refactor.
14:08 cognominal Ho, my example was indeed drawn from S06:888
14:09 spider-mario joined #perl6
14:10 mtk joined #perl6
14:11 cognominal say ( :foo<bar>, :foo<baz> ).Capture.perl
14:12 cognominal r: say ( :foo<bar>, :foo<baz> ).Capture.perl
14:12 p6eval rakudo ffc17d: OUTPUT«Capture.new( list => ().list, hash => EnumMap.new("foo", "baz", ))␤»
14:14 cognominal jnthn: I thought that a call was getting its argument as a Parcel that was conceptually cast to a Capture and that bought us the two last exampble for free
14:14 cognominal my remark is a follow up to anant question, btw.
14:14 cognominal * arguments
14:17 lizmat_ joined #perl6
14:18 tgt joined #perl6
14:22 shinobicl joined #perl6
14:29 jnthn cognominal: Well, the Parcel => Capture transofrmation presently happens at compile time, and the capture is typically not really constructed, for performance reasons.
14:29 jnthn Otherwise we're forced to an object allocation just to pass arguments.
14:30 cognominal that would cost, indeed
14:31 timotimo rakudo is already slow enough as is :P
14:31 jnthn Right. :P
14:32 FROGGS timotimo: but not for much longer :o)
14:35 cognominal Well if the user wants that behavior (the last argument with a given name take over) he could explicitly convert the parcel to a capture
14:39 shinobicl joined #perl6
14:44 pmichaud good morning, #perl6
14:46 jnthn hi, pmichaud
14:47 FROGGS hi pmichaud
14:51 gdey joined #perl6
14:56 lizmat hi pmichaud!
14:56 yoleaux 11 Apr 2013 07:57Z <FROGGS> lizmat: that v5's spectest fudging works now, FROGGS the prat had local changes to the fudge script and hasn't seen it because of about hundred changed testfiles -.-
14:56 yoleaux 11 Apr 2013 08:01Z <FROGGS> lizmat: you need to update nqp/rakudo to make it work though (jnthn is refactoring stuff, and I needed to pull in his changes)
14:56 frdmn joined #perl6
14:56 lizmat .thank you
14:57 lizmat FROGGS: at the QA Hackathon now, will try again after the weekend
14:57 FROGGS lizmat: btw, after recompiling rakudo you have to reapply my patch... I hope to get the okay to commit this patch these days... (but I need TimToady++ for that)
14:57 FROGGS k
14:57 FROGGS have fun
15:10 PacoLinux joined #perl6
15:10 gdey_ joined #perl6
15:14 GlitchMr joined #perl6
15:16 gdey joined #perl6
15:17 dmol1 joined #perl6
15:17 kresike bye folks
15:19 rindolf joined #perl6
15:21 lizmat rn: use Perl:auth(Any):ver(v6..*)
15:21 p6eval niecza v24-37-gf9c8fc2: OUTPUT«[31m===[0mSORRY![31m===[0m��Action method value:version not yet implemented at /tmp/dfVOKNuJ0U line 1:�------> [32muse Perl:auth(Any):ver(v6[33m�[31m..*)[0m��NYI at /tmp/dfVOKNuJ0U line 1 (EOF):�------> [32muse Perl:auth(Any):ver(v6..*)[33m�[31m…
15:21 p6eval ..rakudo ffc17d: OUTPUT«===SORRY!===␤Could not find Perl:auth(Any):ver(v6..*) in any of: /home/p6eval/nom-inst/lib/parrot/5.2.0-devel/languages/perl6/site/lib, /home/p6eval/nom-inst/lib/parrot/5.2.0-devel/languages/perl6/vendor/lib, /home/p6eval/nom-inst/lib/parrot/5.2.0-devel/languages/p…
15:21 lizmat I guess Rakudo is still very naive about "use"
15:22 FROGGS you are correct
15:22 lizmat std: use Perl:auth(Any):ver(v6..*)
15:22 p6eval std 86b102f: OUTPUT«[31m===[0mSORRY![31m===[0m�Cannot locate module Perl at /tmp/tHy3aq8kD5 line 1 (EOF):�------> [32muse Perl:auth(Any):ver(v6..*)[33m�[31m<EOL>[0m�Check failed�FAILED 00:00 43m�»
15:22 lizmat std even fails ?
15:22 FROGGS std: use STD:auth(Any):ver(v6..*)
15:23 p6eval std 86b102f: OUTPUT«ok 00:01 58m␤»
15:23 lizmat S11:619 states that Perl should be allowed there
15:23 FROGGS it should special-case the Perl namespace...
15:24 lizmat I assume all of this is actually implemented in Perl 6 or nqp ?
15:24 FROGGS in rakudo, yes
15:24 * lizmat adds something on her list of possible things to do
15:41 isBEKaml joined #perl6
15:43 lizmat std: 6; $a="foo"
15:43 p6eval std 86b102f: OUTPUT«[31m===[0mSORRY![31m===[0m�Variable $a is not predeclared at /tmp/OlFHkgjCHc line 1:�------> [32m6; [33m�[31m$a="foo"[0m�Check failed�FAILED 00:00 43m�»
15:44 lizmat I guess lax mode is NYI as well, eh?
15:44 timotimo i think so, yeah
15:44 timotimo i wonder how hard that is to make, though
15:45 timotimo is lax mode per file?
15:47 lizmat I would think it to be lexical
15:47 timotimo what are the rules for what the scope of a laxily declared variable will be?
15:48 timotimo as in: { { $a = 5; } say $a }; will this give me two different $a?
15:48 lizmat not sure, I can't find much about lax mode in the specs
15:50 timotimo ah, so it's not only NYI, but also at least partially unspecced
15:51 timotimo i think the least surprising way would be to go up to the innermost Routine. thoughts?
15:51 anant joined #perl6
15:52 timotimo hm, does the block of an if statement or for loop count as a Routine? i think it's a Block, which is not a Routine
15:52 lizmat if we would take Perl 5 as an example, an undeclared $foo would be a ${__PACKAGE__}::foo global
15:52 timotimo mhm
15:54 crab2313 joined #perl6
15:55 lizmat but any lexically scoped variable would mask the global in its scope
15:55 lizmat perl5: $a="foo"; say $a; my $a="bar"; say $a
15:56 lizmat foo bar
15:56 timotimo that would at least make things easy
15:57 timotimo declarations of PACKAGE::foo will still require a predeclaration to be emitted in the AST?
16:02 anant jnthn: Just found that () is also a Parcel. Shouldn't the definition then be "a list of _zero_ or more comma-separated objects ..."
16:02 anant r: say ().WHAT
16:02 p6eval rakudo ffc17d: OUTPUT«(Parcel)␤»
16:03 jnthn anant: I guess a zero-item Parcel can exist, yes :)
16:04 jnthn anant: So probably is a bit more accurate to say that.
16:05 anant jnthn: Should I change "one" to "zero" then?
16:05 kaleem joined #perl6
16:05 lizmat isn't it possible to add items to an existing Parcel later ?
16:05 jnthn anant: Works for me
16:06 jnthn lizmat: No, a Parcel is immutable (though the things inside it may not be)
16:06 jnthn lizmat: A List or Array can have things added.
16:06 lizmat but in the case of 0 items, the parens are important, no?
16:07 jnthn lizmat: () creates a Parcel, for sure. It just always will be a zero-element Parcel.
16:07 jnthn What happens to it in the future depends on context.
16:07 lizmat but is there a way to create a parcel without parens
16:08 shinobicl joined #perl6
16:08 jnthn Well, there's ways... :)
16:08 jnthn infix:<,>()
16:08 jnthn uh, but I guess I used parens there :P
16:08 jnthn r: say Parcel.new
16:08 p6eval rakudo ffc17d: OUTPUT«get_iter() not implemented in class 'Mu'␤  in method gist at src/gen/CORE.setting:5259␤  in method gist at src/gen/CORE.setting:902␤  in sub say at src/gen/CORE.setting:7788␤  in block  at /tmp/aH3Imp337t:1␤␤»
16:08 jnthn Um. :)
16:08 jnthn We should mebbe fix that one... :)
16:09 lizmat S02:2125
16:09 anant I would say something called "Parenthesized Cells" better have parens :)
16:10 lizmat indeed, stupid me...
16:11 lizmat so: s/one/zero in S02:2125 ?  "A list of one or more comma-separated objects may be grouped together by parentheses into a "parenthesis cell", or C<Parcel>."
16:11 jnthn Oh, and a paragraph or so below that it says the Parcel => Capture thing is a compile time transformation. :)
16:11 anant jnthn: yes, so rakudo is following the spec :)
16:11 jnthn lizmat: () does indeed create a Parcel
16:11 jnthn anant: That does sometimes happen ;)
16:11 anant lizmat: yes
16:13 anant jnthn: BTW, I didn't see S02 mention a Parcel being immutable.
16:13 dalek specs: 383cae6 | (Elizabeth Mattijsen)++ | S02-bits.pod:
16:13 dalek specs: A parcel can consist of 0 items, as discussed on #perl6 12Apr2013 at 16:10UTC
16:13 dalek specs: review: https://github.com/perl6/specs/commit/383cae6e77
16:14 fgomez joined #perl6
16:14 BigBear joined #perl6
16:15 anant jnthn: Though I see this: "Capture objects are immutable in the abstract ..."
16:15 jnthn anant: Hm, I don't either.
16:16 lizmat maybe the ephemeral is a hint of its constness?  (albeit for a very short time ?
16:17 jnthn or the "syntactic"
16:18 FROGGS joined #perl6
16:22 lizmat Perl 5 programmers are used to doing something like:
16:22 lizmat rn: my@a=(); @a.push("bar"); say @a
16:22 p6eval rakudo ffc17d, niecza v24-37-gf9c8fc2: OUTPUT«bar␤»
16:22 lizmat and might be tempted to right something like:
16:23 lizmat rn: my$a=(); $a.push("bar"); say $a
16:23 p6eval niecza v24-37-gf9c8fc2: OUTPUT«Unhandled exception: Unable to resolve method push in type Parcel␤  at /tmp/3ANkyVMb5F line 1 (mainline @ 4) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4299 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4300 (module-CORE @ 583) ␤  at /hom…
16:23 p6eval ..rakudo ffc17d: OUTPUT«Cannot call 'push'; none of these signatures match:␤:(Any:U \SELF: *@values, Mu *%_)␤  in method push at src/gen/CORE.setting:1450␤  in block  at /tmp/oBM0W1BAcR:1␤␤»
16:23 * moritz back(ish)
16:23 lizmat so I wonder whether the error should be more specific than "push not found"
16:24 timotimo give Parcel.HOW a special case to find_method to warn about methods of List that Parcel doesn't have?
16:24 jnthn wbish, moritz
16:24 lizmat something like that, yes…  wouldn't  that make sense
16:25 timotimo is it a good idea to give Parcel a special HEW?
16:25 timotimo HOW even
16:25 jnthn No, not really.
16:25 jnthn If you're going to try and give hints, then consider doing it as part of the rendering of the typed exception.
16:26 timotimo oh, that makes 100x more sense
16:26 timotimo i keep forgetting how cool rakudo is on the inside
16:26 jnthn But I'm not (yet) convinced it's valuable here, fwiw.
16:26 jnthn I'm not sure it'll be *that* tempting to do my $a = (); since iirc that doesn't actually make sense in Perl 5?
16:27 timotimo mhh
16:27 huf it sooortof does
16:27 huf just not very useful
16:27 jnthn Can you push to it?
16:27 huf it's the same thing as undef
16:27 huf in scalar context
16:27 jnthn ah.
16:29 huf () comes up every now and then as a purely syntactical thing
16:29 huf when you absolutely need an expression :)
16:30 lizmat at some point it was such a meme, that rgs actually wrote an optimization that would turn "my @a=()" to "my @a"
16:32 timotimo m)
16:35 huf _that_ is far more common
16:36 huf but so is my @a = ''; and various other weird stuff
16:36 tgt joined #perl6
16:36 anant lizmat: http://www.youtube.com/watch?v=mrfK1dtyD14&amp;t=45m30s
16:37 anant lizmat: pmichaud++ says comma creates Parcel and not parens :)
16:37 timotimo indeed
16:37 lizmat so the spec is now correct :-)
16:38 lizmat and I should have remembered, because I saw that talk IRT
16:38 [Coke] anant++
16:40 anant lizmat: you meant "not" correct, right?
16:40 lizmat I updated it just now
16:40 lizmat s/one/zero
16:40 gtodd there's more than one way to be correct
16:41 jnthn gtodd: no, there's more than *zero* ways...
16:41 jnthn :P
16:41 gtodd :-D
16:41 gtodd is there more than one way to customize the REPL ?  (colours prompt etc)
16:41 lizmat so maybe it should be rewritten to s/zero/one again, and add () as a special case in the spec ?
16:42 jnthn gtodd: Not at the moment, I don't think.
16:42 gtodd besides digging deep somewhere?  (line numbers)
16:42 * [Coke] wonders if we should link the synopses to those talk slides as the closest thing to canon we have atm.
16:42 gtodd ok
16:42 [Coke] lizmat: that seems reasonable to me.
16:42 jnthn gtodd: Is there anything you'd particularly like to see in that regard?
16:42 gtodd strangely I'm missiing    perl -de1
16:42 [Coke] gtodd: just say "perl6"
16:44 lizmat [Coke]: not sure whether the Synopses would be the best place for linking to YouTube
16:44 lizmat on the other hand, I wouldn't know a better place for it either  :-(
16:45 anant lizmat: I still think parens create the Parcel. How do I get a Parcel object just through comma's?
16:45 gtodd jnthn: well probably colours, line numbers, predefining some functions that's I'd use all the time (which would be more like shortcuts printing dumping) ... various things that might make it work better as a debugging window in vim emacs :-) can't think of them just now
16:46 jnthn gtodd: If it's debugging you want, there's always perl6-debug :)
16:46 anant gtodd: I would also like to see support for UP/DOWN arrow keys for previously typed lines :)
16:47 jnthn anant: You get that if libreadline is available when you build Parrot, fwiw.
16:47 gtodd jnthn: true ...
16:47 [Coke] lizmat: "[DRAFT] patches from <url> welcome!"
16:47 jnthn gtodd: perl6-debug has a REPL mode.
16:47 gtodd anant: please hack in linenoise support :-)
16:47 isBEKaml` joined #perl6
16:48 gtodd jnthn: ok great so I could customize that mabye ... will look at it more
16:49 [Coke] anant: disprove by example: construct a one element parcel with no commas.
16:49 isBEKaml joined #perl6
16:49 jnthn gtodd: Yeah, more configurability is certainly on the debugger todo list.
16:49 gtodd jnthn: there's another python console (there seem to be many) much slimmer than ipython that lets you run commands and then save them to a script
16:50 gtodd jnthn: I remember using it without being "in" vi or emacs and being sort of surprised
16:51 xilo joined #perl6
16:51 anant [Coke]: I thought the comma is for the list creation, and parens surrounding that make it a Parcel
16:52 lizmat rn: ma $a=1,2
16:52 p6eval niecza v24-37-gf9c8fc2: OUTPUT«[31m===[0mSORRY![31m===[0m��Variable $a is not predeclared at /tmp/pWoMdZNXcs line 1:�------> [32mma [33m�[31m$a=1,2[0m��Undeclared routine:�    'ma' used at line 1��Unhandled exception: Check failed��  at /home/p6eval/niecza/boot/lib/CORE.setting lin…
16:52 p6eval ..rakudo ffc17d: OUTPUT«[31m===[0mSORRY![31m===[0m�Variable '$a' is not declared�at /tmp/BjIzvfDVpP:1�------> [32mma $a[33m�[31m=1,2[0m�    expecting any of:�        postfix�»
16:53 lizmat rn: my $a=1,2
16:53 p6eval niecza v24-37-gf9c8fc2: OUTPUT«Potential difficulties:�  $a is declared but not used at /tmp/efv7397Va3 line 1:�------> [32mmy [33m�[31m$a=1,2[0m��»
16:53 p6eval ..rakudo ffc17d:  ( no output )
16:53 lizmat rn: my $a=1,2; say $a
16:53 p6eval niecza v24-37-gf9c8fc2: OUTPUT«1␤»
16:53 p6eval ..rakudo ffc17d: OUTPUT«WARNINGS:␤Useless use of "," in expression "my $a=1,2" in sink context (line 1)␤1␤»
16:53 anant r: my $a=1,2; say $a.WHAT
16:53 p6eval rakudo ffc17d: OUTPUT«WARNINGS:␤Useless use of "," in expression "my $a=1,2" in sink context (line 1)␤(Int)␤»
16:53 lizmat you need the ()
16:54 anant lizmat: yes, the point
16:54 PacoAir joined #perl6
17:04 felher Something about coding style. Any comments about: https://gist.github.com/felher/5373428 ?
17:05 xilo joined #perl6
17:05 flussence felher: I've tried similar things before, and I usually give up when it gets to about that many lines :)
17:06 felher flussence: yeah. I'm exactly at this point :)
17:07 timotimo wow, that's whitespacey
17:07 woolfy left #perl6
17:07 lizmat dinner&
17:10 timotimo it amuses me how it looks like a tree, but it's super wide as a consequence :|
17:10 felher timotimo: indeed :)
17:11 gtodd jnthn: so many FAQs so little time :-)   sorry
17:11 gtodd http://faqs.perl6.org/ needs love
17:13 timotimo anything special you had in mind?
17:13 flussence .u 1f4a1
17:13 yoleaux U+1F4A1 ELECTRIC LIGHT BULB [So] (💡)
17:13 flussence https://gist.github.com/flussence/5373569
17:15 timotimo oh, that's cute
17:16 felher flussence: I didn't know you can define your tokens inside other tokens this way and still use a action-class with a 'word' method :) nice one :)
17:16 flussence I didn't either until I tried it :)
17:25 rindolf joined #perl6
17:28 * pmichaud reads backscroll
17:32 diakopter O_O
17:32 pmichaud the comma creates a parcel.  parens are simply for grouping.
17:32 pmichaud the one exception is that empty parens create an empty parcel.
17:33 pmichaud rakudo:   say (3 and 4,5).WHAT   # note no parens around the parcel
17:33 p6eval rakudo ffc17d: OUTPUT«(Parcel)␤»
17:33 FROGGS r: my $p =(,); say $p.WHAT; say $p.elems
17:33 p6eval rakudo ffc17d: OUTPUT«[31m===[0mSORRY![31m===[0m�Preceding context expects a term, but found infix , instead�at /tmp/Bd2q0BQSS8:1�------> [32mmy $p =(,[33m�[31m); say $p.WHAT; say $p.elems[0m�»
17:34 diakopter r: say (;).WHAT
17:34 p6eval rakudo ffc17d: OUTPUT«(Parcel)␤»
17:34 FROGGS ohh
17:34 diakopter r: say (;;).WHAT
17:34 p6eval rakudo ffc17d: OUTPUT«(Parcel)␤»
17:34 FROGGS r: my $p =(;); say $p.WHAT; say $p.elems
17:34 p6eval rakudo ffc17d: OUTPUT«(Parcel)␤0␤»
17:34 FROGGS then this sentence about one or more elements is wrong too
17:34 diakopter r: say (;;;[]).elems
17:34 p6eval rakudo ffc17d: OUTPUT«0␤»
17:35 pmichaud rakudo:  say (4,5,6 if True).WHAT
17:35 moritz wtf.
17:35 p6eval rakudo ffc17d: OUTPUT«(Parcel)␤»
17:35 anant FROGGS: lizmat++ corrected it to "zero or more ..."
17:35 FROGGS ahh, cool
17:36 FROGGS lizmat++
17:36 FROGGS thanks anant
17:36 pmichaud I think "zero or more" isn't exactly right either.
17:36 FROGGS hmmm, but zero or more is a bit weird, because it cant be less then zero
17:36 pmichaud Because  (1)  Isn't a parcel.
17:37 PacoAir joined #perl6
17:37 pmichaud but I was expecting to fix that as part of the S07 clarifications.
17:38 pmichaud Because S06 also says that Parcels are ephemeral, but that's no longer true either.
17:38 supernovus joined #perl6
17:39 rindolf joined #perl6
17:39 anant pmichaud: Even S02 says "Parcel objects are ephemeral, insofar as the user almost never sees one as a real standalone object, since binding or assignment always turns a parcel into something else"
17:40 pmichaud right.  but that's before Parcels became more evident.
17:40 pmichaud that part of S02 was written before we understood how Lists would work.
17:40 pmichaud nowadays it's easy to find a Parcel as a standalone object.
17:40 pmichaud r:  my $a = (1,2,3);  say $a.WHAT
17:40 p6eval rakudo ffc17d: OUTPUT«(Parcel)␤»
17:40 moritz (iirc) the theory was that a Seq is a user-facing parcel
17:41 pmichaud I don't think Seq was that... because Seqs were lazy
17:41 pmichaud and flat
17:41 moritz but in the end there's not much point in hiding parcels and exposing seqs instead
17:41 pmichaud parcels are the things that exist before flattening is determined
17:42 supernovus New feature for Web::App::Ballet, it now supports placeholder path variables, so: get '/users/:name/jobs/:jobid/' would add :name and :jobid parameters to the request object with the appropriate values from the path.
17:42 pmichaud time for lunch here... bbl
17:45 anant FROGGS: But it can be zero :)
17:45 anant r: ().WHAT
17:45 p6eval rakudo ffc17d:  ( no output )
17:46 anant r: say ().WHAT
17:46 p6eval rakudo ffc17d: OUTPUT«(Parcel)␤»
17:51 FROGGS anant: ya, but not less, so it for a thing that can hold an amount of other things, it makes not much sense to tell that there can be zero or more things in it
17:52 anant FROGGS: We were trying to account for the 0 elems case ...
17:52 FROGGS that is like telling that an array can hold zero or more elements
17:53 diakopter r: say (()).DUMP
17:53 p6eval rakudo ffc17d: OUTPUT«Parcel<1>(:$!storage(RPA<2>()))␤»
17:53 diakopter r: say ((),()).DUMP
17:53 p6eval rakudo ffc17d: OUTPUT«Parcel<1>(:$!storage(RPA<2>(␤    Parcel<3>(:$!storage(RPA<4>())),␤    Parcel<5>(:$!storage(RPA<6>()))␤)))␤»
17:55 [Coke] r: say "I'm the map!" for 1..5
17:55 p6eval rakudo ffc17d: OUTPUT«I'm the map!␤I'm the map!␤I'm the map!␤I'm the map!␤I'm the map!␤»
17:55 rindolf joined #perl6
17:56 * [Coke] is sad that the video keeps going black on http://www.youtube.com/watch?v=rsccacoabaE
18:04 FROGGS perl6 -e 'my $f = "/home/froggs/dev/v5/t/test.pl"; say $f.IO.e; require $f'
18:04 FROGGS True
18:04 FROGGS Could not find /home/froggs/dev/v5/t/test.pl in any of: blib, /home/froggs/dev/nqp/install/lib/parrot/5.2.0-devel/langu...
18:04 FROGGS ^-------- does somebody understand that?
18:04 FROGGS is require not supposed to work?
18:05 SamuraiJack joined #perl6
18:08 rindolf joined #perl6
18:09 geekosaur sounds like maybe it always does path search even with an absolute filename?
18:09 FROGGS geekosaur: reletive paths doesnt work too
18:10 FROGGS PERL6LIB=. perl6 -e 'my $f = "t/test.pl"; say $f.IO.e; require $f'
18:10 FROGGS True
18:10 FROGGS Could not find t/test.pl in any of: ., /home/fro...
18:13 FROGGS ahh, it only can handle module names
18:13 FROGGS -.-
18:13 FROGGS will read the spec next
18:20 tangentstorm joined #perl6
18:20 [Coke] r: my $a = 1, 4, 8, ... * ; say $a.gimme(0);
18:21 p6eval rakudo ffc17d: OUTPUT«[31m===[0mSORRY![31m===[0m�Comma found before apparent series operator; please remove comma (or put parens\n    around the ... listop, or use 'fail' instead of ...)�at /tmp/x2Gg9h6HE5:1�------> [32mmy $a = 1, 4, 8,[33m�[31m ... * ; say $a.gimme(0);[0m�»…
18:21 tangentstorm hello :)
18:21 [Coke] r: my $a = 1, 4, 8 ... * ; say $a.gimme(0);
18:21 p6eval rakudo ffc17d: OUTPUT«No such method 'gimme' for invocant of type 'Int'␤  in block  at /tmp/cHSglQWt8s:1␤␤»
18:21 [Coke] r: my @a = 1, 4, 8 ... * ; say @a.gimme(0);
18:21 p6eval rakudo ffc17d: OUTPUT«0␤»
18:21 [Coke] tangentstorm: OHAI
18:24 anant r: my $a = 1, 4, 8 ... *;
18:24 p6eval rakudo ffc17d:  ( no output )
18:24 tangentstorm why is the error message changing for the same input?
18:24 tangentstorm oh you dropped a comma
18:25 anant [Coke]: On my rakudo installation, this gave the error "Unable to deduce sequence"
18:25 * tangentstorm can't deduce the sequence either.
18:27 timotimo the planeteria barfed RSS again it seems
18:27 SamuraiJack_ joined #perl6
18:27 tangentstorm r: print "\x035,12hello world"
18:27 p6eval rakudo ffc17d: OUTPUT«5,12hello world»
18:27 [Coke] anant: what version are you running?
18:28 anant [Coke]: 2013-02
18:29 [Coke] r: my $a = 1, 4, 8 ... *; say $a;
18:29 p6eval rakudo ffc17d: OUTPUT«1␤»
18:29 [Coke] r: my $a = 1, 2, 4 ... *; say $a;
18:29 p6eval rakudo ffc17d: OUTPUT«1␤»
18:30 [Coke] r: my @a = 1, 2, 4 ... *;  say @a;
18:30 p6eval rakudo ffc17d: OUTPUT«1 2 4 8 ...␤»
18:30 [Coke] r: my @a = 1, 2, 8 ... *;  say @a;
18:30 p6eval rakudo ffc17d: OUTPUT«get_attr_str() not implemented in class 'Coroutine'␤current instr.: 'print_exception' pc 111608 (src/gen/CORE.setting.pir:50161) (src/gen/CORE.setting:9722)␤called from Sub 'throw' pc 357537 (src/gen/CORE.setting.pir:155985) (src/gen/CORE.setting:9536)␤called from …
18:30 [Coke] that's suboptimal.
18:30 [Coke] so, 1, 2, 4... * is a valid sequence; 1, 2, 8 ... *
18:30 [Coke] is not
18:31 [Coke] and then there's the fact that $a vs @a treat those differently.
18:31 [Coke] and then there's the fact that that last one should error trying to create the sequence, not trying to print it.
18:31 tangentstorm r: print "\x039hello world"
18:31 p6eval rakudo ffc17d: OUTPUT«9hello world»
18:31 flussence .oO( there's room for a fuzzy sequence creation module in there somewhere... )
18:34 tangentstorm r: print "\C[ETX]9hello world"
18:34 p6eval rakudo ffc17d: OUTPUT«[31m===[0mSORRY![31m===[0m�Unrecognized backslash sequence: '\C'�at /tmp/lquPRa7QsM:1�------> [32mprint "\[33m�[31mC[ETX]9hello world"[0m�    expecting any of:�        argument list�        prefix or term�        prefix or meta-prefix�        double quotes�…
18:34 anant [Coke]: maybe the rakudo: used here is an older version?
18:36 [Coke] rakudo: say $*VERSION # have no idea what this variable is called.
18:36 p6eval rakudo ffc17d: OUTPUT«Dynamic variable $*VERSION not found␤  in method gist at src/gen/CORE.setting:10810␤  in method gist at src/gen/CORE.setting:902␤  in sub say at src/gen/CORE.setting:7788␤  in block  at /tmp/CvdYfxxQre:1␤␤»
18:36 [Coke] but ffc17d is the last commit used.
18:36 flussence r: say $*PERL.perl
18:36 p6eval rakudo ffc17d: OUTPUT«{"name" => "rakudo", "compiler" => {"name" => "rakudo", "ver" => "2013.03-83-g4e37f55", "release-number" => "", "build-date" => "2013-04-12T13:14:57Z", "codename" => ""}}␤»
18:36 flussence ...something seems slightly off there.
18:37 [Coke] flussence: what?
18:38 flussence 4e37f55
18:38 [Coke] 83 commits since that commit.
18:38 [Coke] (where that commit is the last tag tied to a commit in our history)
18:38 tangentstorm r: print "red hello" ~ s/red/\C[ETX]4/
18:38 p6eval rakudo ffc17d: OUTPUT«[31m===[0mSORRY![31m===[0m�Unrecognized backslash sequence: '\C'�at /tmp/qPLHf1ErH5:1�------> [32mprint "red hello" ~ s/red/\[33m�[31mC[ETX]4/[0m�    expecting any of:�        postfix�        infix stopper�        infix or meta-infix�        prefix or term�…
18:38 tangentstorm r: print "red hello" ~ s/red/\x034/
18:38 p6eval rakudo ffc17d: OUTPUT«No such method 'subst' for invocant of type 'Any'␤  in block  at /tmp/NSPeeNJOZp:1␤␤»
18:39 jnthn ~~, not ~
18:39 tangentstorm r: print "red hello" ~~ s/red/\x034/
18:39 p6eval rakudo ffc17d: OUTPUT«Cannot modify an immutable value␤  in sub infix:<=> at src/gen/CORE.setting:12872␤  in block  at /tmp/0oT8QHgf6e:1␤␤»
18:39 tangentstorm been too long since i used perl :)
18:39 jnthn And s/a/b/ expects to have a variable on the left :)
18:39 [Coke] ... that's an odd error message.
18:39 flussence my local copy has "ver" => "2013.03-77-g400fb2c", where 400f matches the state of the git clone.
18:40 [Coke] flussence: I may have misremembered how that works, apologies.
18:40 tangentstorm well in any case IRC clients don't use ANSI escape codes... They all just do what mirc does.
18:40 tangentstorm r: print "9hello world"
18:40 p6eval rakudo ffc17d: OUTPUT«9hello world»
18:40 tangentstorm hmm
18:40 [Coke] (is that the commit since, or the commit of) - the tag is there, obviously.
18:40 flussence it's 83 commits since the 2013-03 tag, the -g(.*) means where it currently is
18:40 jnthn r: say "red hello".subst(/red/, "\x34")
18:40 p6eval rakudo ffc17d: OUTPUT«4 hello␤»
18:40 [Coke] danke.
18:41 tangentstorm no it's ^C and then the number 3
18:41 tangentstorm \x03 3
18:41 flussence but where's it getting "ffc17d" from then?
18:41 tangentstorm 4 would  be red
18:41 jnthn ah :)
18:42 tangentstorm https://github.com/perl6/evalbot/blob/master/lib/EvalbotExecuter.pm#L105
18:43 tangentstorm ^ it's translating the newlines to that ␤ character but it doesn't know what to do with the color code escapes that perl is producing.
18:44 tgt joined #perl6
18:46 tangentstorm r: print "\x03C4red?"
18:46 p6eval rakudo ffc17d: OUTPUT«τred?»
18:46 tangentstorm r: $C = "\x03" ; print "${C}C4red?"
18:46 p6eval rakudo ffc17d: OUTPUT«[31m===[0mSORRY![31m===[0m�Variable '$C' is not declared�at /tmp/aOt_NZ6XLf:1�------> [32m$C[33m�[31m = "\x03" ; print "${C}C4red?"[0m�    expecting any of:�        postfix�»
18:46 tangentstorm r: my $C = "\x03" ; print "${C}C4red?"
18:46 p6eval rakudo ffc17d: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of ${C}; in Perl 6 please use {$C}�at /tmp/yXADaJXzwW:1�------> [32mmy $C = "\x03" ; print "${C}[33m�[31mC4red?"[0m�»
18:47 tangentstorm r: my $C = "\x03" ; print "{$C}C4red?"
18:47 p6eval rakudo ffc17d: OUTPUT«C4red?»
18:47 tangentstorm r: my $C = "\x03" ; print "{$C}4red?"
18:47 p6eval rakudo ffc17d: OUTPUT«4red?»
18:47 tangentstorm HA
18:48 jnthn star: use Term::ANSIColor; say colored "or this ;-)", "blue";
18:48 p6eval star 2013.02: OUTPUT«[34mor this ;-)[0m�»
18:48 tangentstorm it's not ansi
18:49 tangentstorm irc doesn't really support colors, but MiRC did
18:49 tangentstorm and it used this ^C convention.
18:49 tangentstorm (instead of ansi :/)
18:50 jnthn Ah.
18:50 tangentstorm when it says ?[31m===?[0mSORRY!?[31m===?[0m   those ? should be ^[ (chr(27))
18:50 tangentstorm but that's for an ansi terminal
18:51 tangentstorm 31m would make the foreground dark red
18:51 SamuraiJack__ joined #perl6
18:52 tangentstorm 0 resets it
18:52 tangentstorm so it should be   4===SORRY!4===
18:53 tangentstorm i don't think mirc codes have a dark red, just light red
18:59 fgomez joined #perl6
19:03 anant [Coke]: Turns out that error message comes only in REPL mode. When run as perl6 -e ' ... ' it didn't come
19:05 ingy hola #perl6
19:05 * ingy has a little present for you…
19:06 ingy https://github.com/acmeism/RosettaCodeData/tree/master/Lang/Perl-6
19:06 timotimo oooooh
19:06 timotimo how cool is that!
19:07 ingy :)
19:07 timotimo now those could be automatically tested
19:07 timotimo as part of the smoke testing perhaps?
19:07 ingy working on it
19:07 timotimo wow, that's nice!
19:07 ingy well for all of RC
19:08 timotimo yeah
19:14 berekuk joined #perl6
19:16 xantamoc joined #perl6
19:28 masak oh hai, #perl6!
19:29 shinobicl_ joined #perl6
19:29 ingy hi masak
19:30 masak greetings, human.
19:30 ingy masak: you coming to yapc::na?
19:30 masak ingy: apparently! :D
19:30 ingy \o/
19:30 masak \o/
19:31 FROGGS joined #perl6
19:31 ingy I have acmeist codes that need a porting to p6
19:31 timotimo "acmeist codes"?
19:32 ingy timotimo: oui!
19:32 masak timotimo: prepare to be memetically infected :P
19:32 timotimo http://acmeism.org/projects/ - these?
19:32 * masak .oO( you can take the acmeist out of the acmeist, but you can't take the acmeist out of the acmeist )
19:33 * masak .oO( some day acmeism is going to graduate into a full-fledged science... memistry )
19:35 ingy timotimo: I'm like to get testml-pm6 done asap
19:35 ingy it is finished (fully in sync) in p5 and ruby
19:35 timotimo neato
19:35 ingy as is pegex
19:36 timotimo oh, neat. how close is pegex to perl6 rules/regex syntax?
19:37 edgeuplink joined #perl6
19:37 FROGGS std: class My/Class { }
19:37 ingy similar. pegex is intended as p6rules::lite for all
19:37 p6eval std 86b102f: OUTPUT«[31m===[0mSORRY![31m===[0m�Unable to parse class definition at /tmp/_DQwxsVkzl line 1:�------> [32mclass My[33m�[31m/Class { }[0m�    expecting any of:�    name�   trait�Parse failed�FAILED 00:00 40m�»
19:37 timotimo but the regexes are "pcre compatible"?
19:38 timotimo that's a darn shame
19:38 timotimo i think p6re is the best thing to happen to regex programming in a long time
19:39 ingy timotimo: https://github.com/ingydotnet/pegex-pgx/blob/master/pegex.pgx is just syntax that compiles to https://github.com/ingydotnet/pegex-pgx/blob/master/pegex.pgx.yaml
19:39 ingy the ironic thing is that p6 is the hardest lang to port pegex to!
19:40 timotimo hahaha
19:40 timotimo if it were 1:1 compatible, that wouldn't be a problem ;)
19:40 ingy unless it supports p5re
19:40 ingy I _might_ be able to compile pgx to p6
19:41 ingy but it would take a YAPC influenced effort
19:41 timotimo today i was idly wondering how hard it would be to implement p6 compatible grammars to python (as that's my other main language)
19:41 ingy I'm currently porting pegex to python
19:42 timotimo how did you attack this? do you translate pegex to a combination of pure python objects and regular python regexes?
19:42 timotimo also, does pgx have something like perl6's longest token matching semantics?
19:43 ingy timotimo: all the acmeist code will eventually be written in a coffeescript like language called C'Dent/UniScript that will compile to all the backend modules
19:43 timotimo oh, c'dent, i heard of that before
19:43 ingy c'dent is a language with no syntax
19:44 ingy uniscript is one syntax for cdent
19:44 timotimo oh?
19:44 ingy here's my basic plan…
19:45 ingy I ported pegex and testml to 4 langs: p5 py rb js(coffee)
19:45 timotimo so c'dent is more like an intermediate thing with defined semantics?
19:45 ingy pegex is tested testml…
19:45 ingy https://github.com/ingydotnet/pegex-tml
19:45 ingy is the pegex test suite
19:46 ingy testml-tml is the testml test suite in testml
19:46 timotimo mhm
19:47 ingy then I will port pegex and testml to yaml files that contain all the info to generate the 4 frameworks
19:47 ingy that will be cdent
19:47 timotimo huh. how does yaml translate to code semantics?
19:47 timotimo would you write it like an AST?
19:47 ingy yes, right
19:48 ingy I just meant I write ASTs for all the code
19:48 ingy YAML is an easy input for that
19:48 ingy I'll probably write the AST to real code framework (cdent) in ruby
19:49 ingy since that is my new favorite of the bunch
19:49 ingy but that is not essential
19:49 ingy I could write it in p6 :P
19:49 ingy except p6 doesn't have the required yaml support
19:49 ingy :)
19:49 masak pity :)
19:50 ingy then I make a uniscript that can encode the ASTs
19:50 ingy done. QED
19:51 ingy then I write the new YAML module in UniScript with testml tests
19:51 ingy and upload everywhere
19:51 ingy same code, same test, same api, same bugs
19:51 ingy welcome to acmeism
19:51 FROGGS same bugs \o/
19:52 timotimo hehe
19:52 ingy anyone with interest can /join #testml #pegex #cdent #acmeism on freenode
19:53 ingy I'd like to get stuff working with p6 before oscon
19:53 ingy and maybe before yapc
19:54 ingy BigBear pointed out that a couple p6 modules are failing because of testml failure
19:55 ingy I've removed the pegex dependency from testml, so getting it running in p6 should be no problem
19:55 ingy maybe I'll work on that instead of python for a while
19:55 ingy python is my least favorite of the bunch
19:56 ingy it gets one big thing right, and 100 things wrong (in terms of usability)
19:57 ingy it does have 100x better docs than ruby though
20:05 xilo what version of python
20:10 snearch joined #perl6
20:27 [Coke] ingy: ah, thank you.
20:28 xantamoc left #perl6
20:28 xantamoc joined #perl6
20:28 [Coke] ingy: see also:
20:29 [Coke] https://github.com/perl6/roast/tree/master/rosettacode
20:29 timotimo so, one thing i still can't quite figure out is this:
20:29 [Coke] (which I started and then didn't get anywhere with.)
20:29 [Coke] timotimo: JUST ONE THING?!?
20:30 timotimo i didn't say it's the only thing mind you
20:31 timotimo r: my @map; @map[5][5] = "X"; @map.perl.say; @map = Any, map( { when List { (Any, $_) }; default { Any } }, @map); @map.perl.say
20:31 p6eval rakudo ffc17d: OUTPUT«Array.new(Any, Any, Any, Any, Any, [Any, Any, Any, Any, Any, "X"])␤Array.new(Any, Any, Any, Any, Any, Any, Any, [Any, Any, Any, Any, Any, "X"])␤»
20:31 timotimo ... what i can't figure out is: why does this work now and didn't work yesterday? :o
20:31 timotimo oh, there's one Any too much there
20:31 tangentstorm is $_ gone completely now?
20:32 timotimo the Any i wanted to have in the inner list ended up in the outer list instead, okay
20:32 FROGGS tangentstorm: no
20:32 timotimo r: my @map; @map[5][5] = "X"; @map.perl.say; @map = Any, map( { when List { unshift Any, $_ }; default { Any } }, @map); @map.perl.say
20:32 p6eval rakudo ffc17d: OUTPUT«Array.new(Any, Any, Any, Any, Any, [Any, Any, Any, Any, Any, "X"])␤Cannot modify an immutable value␤  in sub infix:<=> at src/gen/CORE.setting:12872␤  in method unshift at src/gen/CORE.setting:1472␤  in method unshift at src/gen/CORE.setting:1470␤  in sub unshift a…
20:32 timotimo whoops
20:32 timotimo r: my @map; @map[5][5] = "X"; @map.perl.say; @map = Any, map( { when List { [Any, @($_)] }; default { Any } }, @map); @map.perl.say
20:32 p6eval rakudo ffc17d: OUTPUT«Array.new(Any, Any, Any, Any, Any, [Any, Any, Any, Any, Any, "X"])␤Array.new(Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, "X")␤»
20:32 cognominal joined #perl6
20:32 FROGGS r: for 1..3 { say $_ } # <--- tangentstorm
20:32 p6eval rakudo ffc17d: OUTPUT«1␤2␤3␤»
20:33 timotimo r: my @map; @map[5][5] = "X"; @map.perl.say; @map = Any, map( { when List { $([Any, @($_)]) }; default { Any } }, @map); @map.perl.say
20:33 p6eval rakudo ffc17d: OUTPUT«Array.new(Any, Any, Any, Any, Any, [Any, Any, Any, Any, Any, "X"])␤Array.new(Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, "X")␤»
20:33 timotimo i can't really tell how to make this not flatten :(
20:33 alester joined #perl6
20:34 tangentstorm i'm looking for while (<>) { print } ... so far i have:   while $_ = lines() { say "{$_}" }
20:35 [Coke] timotimo: use .lol ?
20:35 timotimo tangentstorm: try for lines() { say "($_)" } instead
20:35 timotimo r: my @map; @map[5][5] = "X"; @map.perl.say; @map = (Any, map( { when List { $([Any, @($_)]) }; default { Any } }, @map)).lol; @map.perl.say
20:35 p6eval rakudo ffc17d: OUTPUT«Array.new(Any, Any, Any, Any, Any, [Any, Any, Any, Any, Any, "X"])␤splice() not implemented in class 'Mu'␤  in method reify at src/gen/CORE.setting:5639␤  in method gimme at src/gen/CORE.setting:6058␤  in method perl at src/gen/CORE.setting:6277␤  in method perl at…
20:35 timotimo er, that's not what i meant to do
20:35 timotimo hm.
20:35 ingy [Coke]: Cool. I'm thinking that a rosettacode-tml test suite is in order, and would be good for promoting acmeism
20:36 bluescreen10 joined #perl6
20:36 tangentstorm timotimo: { say $_ } works.  { say "($_)" } prints the parens... thanks! :)
20:36 tangentstorm for lines() is much more readable :)
20:37 tangentstorm so $_ is a default loop variable but not an implicit parameter anymore?
20:37 timotimo for is a "contextualiser", so it sets $_
20:38 timotimo if you have a sub without parameters, you can use $_, too
20:38 fgomez joined #perl6
20:38 tangentstorm oh
20:38 bluescreen100 joined #perl6
20:39 tangentstorm so i could do    sub echo { say shift }
20:39 * tangentstorm tries
20:39 tangentstorm hrm. nope
20:39 timotimo r: sub echo { say shift }; echo "foo"; echo "foo", "bar";
20:39 p6eval rakudo ffc17d: OUTPUT«===SORRY!===␤CHECK FAILED:␤Calling proto of 'shift' will never work with no arguments (lines 1, 1)␤    Expected: :()␤Calling 'echo' will never work with argument types (str) (lines 1, 1)␤    Expected: :()␤Calling 'echo' will never work with argument types (Str, Str…
20:39 masak tangentstorm: 'shift' no longer implicitly does @_
20:39 timotimo r: sub echo { say shift @_ }; echo "foo"; echo "foo", "bar";
20:39 p6eval rakudo ffc17d: OUTPUT«foo␤foo␤»
20:40 tangentstorm hrm
20:41 jnthn heh, the compile-time call analysis had a field day there... :)
20:43 tangentstorm sub echo { say $_ }; for lines() { echo }  ... prints "Any()" for each line
20:44 FROGGS jnthn: I'm going to commit a fix for 'require', which lets you pass paths too, any objections?
20:44 FROGGS jnthn: (I've not forget to add tests for symlink/link though)
20:44 FROGGS *forgotten
20:45 jnthn FROGGS: Got a diff?
20:46 timotimo tangentstorm: yeah, echo without arguments will not pass $_ by itself
20:46 timotimo i wonder ...
20:46 timotimo r: sub echo { say CALLER::$_ }; for lines() { echo }
20:46 p6eval rakudo ffc17d: OUTPUT«[31m===[0mSORRY![31m===[0m�Two terms in a row�at /tmp/A0uBLhe8tu:1�------> [32msub echo { say CALLER::[33m�[31m$_ }; for lines() { echo }[0m�    expecting any of:�        postfix�        infix stopper�        infix or meta-infix�        statement end�      Ã¢â‚¬Â¦
20:46 erkan joined #perl6
20:46 erkan joined #perl6
20:46 timotimo r: sub echo { say CALLER::_ }; for lines() { echo }
20:46 p6eval rakudo ffc17d: OUTPUT«(Any)␤(Any)␤(Any)␤(Any)␤(Any)␤(Any)␤(Any)␤(Any)␤(Any)␤(Any)␤(Any)␤(Any)␤(Any)␤(Any)␤(Any)␤(Any)␤(Any)␤(Any)␤(Any)␤(Any)␤(Any)␤(Any)␤(Any)␤»
20:46 tangentstorm timotimo: what did you mean by using $_ with a sub without parameters then?
20:46 timotimo r: sub echo { say CALLER::<$_> }; for lines() { echo }
20:46 p6eval rakudo ffc17d: OUTPUT«Land der Berge, Land am Strome,␤Land der Äcker, Land der Dome,␤Land der Hämmer, zukunftsreich!␤Heimat bist du großer Söhne,␤Volk, begnadet für das Schöne,␤vielgerühmtes Österreich,␤vielgerühmtes Österreich!␤␤Heiß umfehdet, wild umstritten␤liegst dem Erdteil du inmi…
20:47 FROGGS jnthn: something like that https://gist.github.com/FROGGS/c8aca05e2b9836d21980
20:47 timotimo tangentstorm: i meant that you give the sub echo no signature
20:47 timotimo you write sub echo { code } instead of sub echo(Str $a) { code }
20:47 timotimo in that case you can use $_
20:47 tangentstorm that's what i did
20:48 tangentstorm sub echo { say $_ }; for lines() { echo }
20:48 tangentstorm well
20:48 FROGGS jnthn: must clean it up so that pbc|pir will get treated right
20:49 tangentstorm timotimo: or maybe the question is how do i get at that parameter? shift @_ ?
20:49 timotimo "that" parameter?
20:49 tangentstorm r: sub echo { say shift @_ }; for lines() { echo }
20:49 p6eval rakudo ffc17d: OUTPUT«Element shifted from empty list␤  in method gist at src/gen/CORE.setting:10810␤  in method gist at src/gen/CORE.setting:902␤  in sub say at src/gen/CORE.setting:7788␤  in sub echo at /tmp/TWQlagG5gf:1␤  in block  at /tmp/TWQlagG5gf:1␤␤»
20:49 jnthn FROGGS: Hm, you're requiring there to be a file extension?
20:49 FROGGS r: sub echo(*@things) { say @things }; for lines() { echo }
20:49 p6eval rakudo ffc17d: OUTPUT«␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤»
20:50 FROGGS jnthn: what?
20:50 tangentstorm yeah, @things is empty there
20:50 FROGGS jnthn: require should support: require "path/to/module.pm"  and  require "script.pl"
20:51 tangentstorm r: sub echo(*@things) { say length @things }; for lines() { echo }
20:51 p6eval rakudo ffc17d: OUTPUT«[31m===[0mSORRY![31m===[0m�Undeclared routine:�    length used at line 1��»
20:51 FROGGS r: sub echo(*@things) { say @things }; for lines() -> $line { echo $line }
20:51 p6eval rakudo ffc17d: OUTPUT«Land der Berge, Land am Strome,␤Land der Äcker, Land der Dome,␤Land der Hämmer, zukunftsreich!␤Heimat bist du großer Söhne,␤Volk, begnadet für das Schöne,␤vielgerühmtes Österreich,␤vielgerühmtes Österreich!␤␤Heiß umfehdet, wild umstritten␤liegst dem Erdteil du inmi…
20:51 FROGGS r: sub echo(*@things) { say @things }; for lines() { echo $_ }
20:51 p6eval rakudo ffc17d: OUTPUT«Land der Berge, Land am Strome,␤Land der Äcker, Land der Dome,␤Land der Hämmer, zukunftsreich!␤Heimat bist du großer Söhne,␤Volk, begnadet für das Schöne,␤vielgerühmtes Österreich,␤vielgerühmtes Österreich!␤␤Heiß umfehdet, wild umstritten␤liegst dem Erdteil du inmi…
20:51 tangentstorm yeah
20:51 FROGGS several ways to do it
20:51 tangentstorm but which way lets me use $_ as an implicit parameter? :D
20:52 FROGGS choose according to your taste :o)
20:52 jnthn FROGGS: Yeah, just wondering if somebody will try require './plugins/foo'; and get surprised...
20:52 FROGGS tangentstorm: ahhh, now I got it
20:52 FROGGS tangentstorm: you want the perl5 magic...
20:52 tangentstorm yeah
20:52 FROGGS tangentstorm: let me think a bit
20:52 FROGGS jnthn: well, this should work if 'foo' is a file, no?
20:52 timotimo tangentstorm: i was telling you, the "echo" call will not use the $_ that comes from the for loop
20:53 tangentstorm r: sub echo(*@things) { say length @things }; for lines() echo
20:53 p6eval rakudo ffc17d: OUTPUT«[31m===[0mSORRY![31m===[0m�Missing block�at /tmp/tRNXcD5CiU:1�------> [32mgs) { say length @things }; for lines() [33m�[31mecho[0m�    expecting any of:�        postfix�        infix stopper�        infix or meta-infix�        parameterized block�»…
20:53 jnthn FROGGS: Oh...it's the . you're looking for, not the / really?
20:53 jnthn FROGGS: So require 'foo.pm' is enough?
20:53 FROGGS jnthn: a dot and a slash triggers it
20:53 tangentstorm r: sub echo(Str $line) { say $line }; for lines() echo
20:53 p6eval rakudo ffc17d: OUTPUT«[31m===[0mSORRY![31m===[0m�Missing block�at /tmp/jShY7HKQ4H:1�------> [32mo(Str $line) { say $line }; for lines() [33m�[31mecho[0m�    expecting any of:�        postfix�        infix stopper�        infix or meta-infix�        parameterized block�»…
20:54 tangentstorm so a function is not a parameterized block
20:54 jnthn FROGGS: But require 'foo.pm' has no slash, not a dot
20:54 tangentstorm ok
20:54 FROGGS jnthn: is has a dot
20:54 FROGGS jnthn: dot is okay, slash is okay
20:54 jnthn < FROGGS> jnthn: a dot and a slash triggers it
20:54 FROGGS jnthn: both make the thing a path
20:54 jnthn I took and as, like, && :)
20:55 jnthn But you seem to mean either will do
20:55 FROGGS jnthn: well, in german language it is meant as ||
20:55 FROGGS :o)
20:55 jnthn Ja, aber mein Deutsch ist nonexistent :P
20:55 FROGGS saying 'or' means XOR in programming language
20:55 FROGGS hehe
20:55 sorear tangentstorm: for requires a syntactic block, with literal braces.  A function value has type Block (actually the subtype Sub), but is not the same thing
20:56 moritz if you want to iterate using a code object, map exists
20:56 sorear tangentstorm: also, whatever block you pass into for needs to *take* parameters, because that's how the lines get in
20:57 jnthn FROGGS: Anyway, making require 'foo.pl' work seems sane...does ths spec actually say it should somewhere?
20:57 moritz iirc the spec says something about how to distinguish require $ModuleName and require $fileName
20:58 moritz TimToady++ added it after I nagged about it for some time :-)
20:58 moritz but I don't remember what it was :-)
20:58 FROGGS jnthn: http://perlcabal.org/syn/S11.html#Runtime_Importation
20:58 moritz but reading the specs before implementing stuff is a good idea anyway :-)
20:59 tangentstorm sorear: yeah.. in perl 5, subs can take an pronoun as a parameter ($_) i'm just trying to figure out how to do that in perl 6
20:59 jnthn FROGGS: ok
20:59 FROGGS :o)
21:00 jnthn tangentstorm: That doesn't happen in Perl 6; it's typically done using method call syntax on the topic instead
21:00 jnthn r: for 1..10 { .say }
21:00 p6eval rakudo ffc17d: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤»
21:00 tangentstorm aha
21:00 jnthn .say means $_.say
21:00 moritz but blocks default to $_ as an argument
21:00 tangentstorm i can deal with .say :)
21:00 sorear require $foo  # filename
21:00 sorear require ::($foo)  # module name
21:00 tangentstorm for lines() { .say }
21:00 tangentstorm r: for lines() { .say }
21:00 p6eval rakudo ffc17d: OUTPUT«Land der Berge, Land am Strome,␤Land der Äcker, Land der Dome,␤Land der Hämmer, zukunftsreich!␤Heimat bist du großer Söhne,␤Volk, begnadet für das Schöne,␤vielgerühmtes Österreich,␤vielgerühmtes Österreich!␤␤Heiß umfehdet, wild umstritten␤liegst dem Erdteil du inmi…
21:01 FROGGS r: $_ = 42; sub a () { say $OUTER::_ }; a()
21:01 tangentstorm beautiful. thanks, jnthn :)
21:01 p6eval rakudo ffc17d: OUTPUT«42␤»
21:01 FROGGS r: $_ = 42; sub a () { say $OUTER::_ }; for lines() { a() }
21:01 p6eval rakudo ffc17d: OUTPUT«42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤»
21:01 FROGGS r: $_ = 42; sub a () { say $OUTER::_ }; for lines() -> $_ { a() }
21:01 sorear FROGGS: CALLER?
21:01 p6eval rakudo ffc17d: OUTPUT«42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤»
21:01 timotimo yes, caller vs outer
21:01 FROGGS r: $_ = 42; sub a () { say $CALLER::_ }; for lines() { a() }
21:01 p6eval rakudo ffc17d: OUTPUT«Land der Berge, Land am Strome,␤Land der Äcker, Land der Dome,␤Land der Hämmer, zukunftsreich!␤Heimat bist du großer Söhne,␤Volk, begnadet für das Schöne,␤vielgerühmtes Österreich,␤vielgerühmtes Österreich!␤␤Heiß umfehdet, wild umstritten␤liegst dem Erdteil du inmi…
21:01 FROGGS tangentstorm: this might be what you want
21:02 xantamoc left #perl6
21:02 FROGGS r: $_ = 42; sub a (*@things) { say +@things ?? @things !! $CALLER::_ }; for lines() { a() }
21:02 p6eval rakudo ffc17d: OUTPUT«Land der Berge, Land am Strome,␤Land der Äcker, Land der Dome,␤Land der Hämmer, zukunftsreich!␤Heimat bist du großer Söhne,␤Volk, begnadet für das Schöne,␤vielgerühmtes Österreich,␤vielgerühmtes Österreich!␤␤Heiß umfehdet, wild umstritten␤liegst dem Erdteil du inmi…
21:02 FROGGS r: $_ = 42; sub a (*@things) { say +@things ?? @things !! $CALLER::_ }; for lines() { a(1) }
21:02 p6eval rakudo ffc17d: OUTPUT«1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤»
21:03 FROGGS this
21:03 dmol1 joined #perl6
21:03 timotimo FROGGS: maybe @things // $CALLER::_ instead?
21:04 FROGGS r: $_ = 42; sub a (*@things) { say @things // $CALLER::_ }; for lines() { a() }
21:04 p6eval rakudo ffc17d: OUTPUT«␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤»
21:04 timotimo maybe || instead of //
21:04 moritz array variables are never undefined in current rakudo
21:04 moritz so the // branch is never taken
21:04 FROGGS r: $_ = 42; sub a (*@things) { say @things || $CALLER::_ }; for lines() { a("") }
21:04 p6eval rakudo ffc17d: OUTPUT«␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤»
21:04 timotimo but || will see that @thins has False truthiness?
21:04 timotimo hm, no?
21:04 FROGGS hmmm, weird
21:05 tangentstorm FROGGS:    for lines() { .say }    # <- that's what i wanted. very clean.
21:05 FROGGS I expected to get the lines
21:05 moritz r: sub a { say $CALLER::_ }; $_ = 42; a()
21:05 p6eval rakudo ffc17d: OUTPUT«42␤»
21:05 FROGGS tangentstorm: bah :P
21:05 moritz r: sub a { say $CALLER::_ }; for 42 { a() }
21:05 p6eval rakudo ffc17d: OUTPUT«42␤»
21:05 labster joined #perl6
21:05 sorear timotimo: An array which contains a single element of "" is not falsy.
21:06 FROGGS tangentstorm: I thought you need that magic from within another sub
21:06 FROGGS sorear: makes sense
21:06 timotimo oh. i didn't realise froggs put a "" in there
21:06 FROGGS was just a test
21:06 tangentstorm FROGGS: nah, just trying to make a filter. thanks though. very interesting :)
21:06 ingy timotimo: I just remembered you asking about longest token matching…
21:07 timotimo yes, it is something i'm fond ot
21:07 timotimo of*
21:07 tangentstorm hm. but now to actually filter
21:07 tangentstorm r: for lines() { .say s/\w/_/ }
21:07 p6eval rakudo ffc17d: OUTPUT«[31m===[0mSORRY![31m===[0m�Two terms in a row�at /tmp/GGNdNrF0f8:1�------> [32mfor lines() { .say [33m�[31ms/\w/_/ }[0m�    expecting any of:�        method arguments�        postfix�        infix stopper�        infix or meta-infix�        statement end�  Ã¢â‚¬Â¦
21:07 tangentstorm r: for lines() { say s/\w/_/ }
21:07 p6eval rakudo ffc17d: OUTPUT«Cannot assign to a readonly variable or a value␤  in sub infix:<=> at src/gen/CORE.setting:12872␤  in block  at /tmp/GJirpRHpYp:1␤␤»
21:08 timotimo r: for lines() -> $_ is rw { say s/\w/_/ }
21:08 p6eval rakudo ffc17d: OUTPUT«Cannot assign to a readonly variable or a value␤  in sub infix:<=> at src/gen/CORE.setting:12872␤  in block  at /tmp/_7Jnu8zrLA:1␤␤»
21:08 timotimo hm.
21:08 tangentstorm r: for lines() { s/\w/_/; .say }
21:08 timotimo r: for lines() -> $_ is copy { say s/\w/_/ }
21:08 p6eval rakudo ffc17d: OUTPUT«Cannot assign to a readonly variable or a value␤  in sub infix:<=> at src/gen/CORE.setting:12872␤  in block  at /tmp/_DmoTcrRza:1␤␤»
21:08 p6eval rakudo ffc17d: OUTPUT«_and der Berge, Land am Strome,␤_and der Äcker, Land der Dome,␤_and der Hämmer, zukunftsreich!␤_eimat bist du großer Söhne,␤_olk, begnadet für das Schöne,␤_ielgerühmtes Österreich,␤_ielgerühmtes Österreich!␤␤_eiß umfehdet, wild umstritten␤_iegst dem Erdteil du inmi…
21:08 timotimo there!
21:08 timotimo i made it work!
21:08 timotimo :)
21:08 ingy Pegex does not support it out of the box, but the great thing about pegex is its modularity. For instance Pegex::Parser can't handle indentation out of the box, but can easily be subclassed as Pegex::Parser::Indent to do so
21:08 tangentstorm r: for lines() { s/\w/_/; .say }
21:08 p6eval rakudo ffc17d: OUTPUT«Cannot assign to a readonly variable or a value␤  in sub infix:<=> at src/gen/CORE.setting:12872␤  in block  at /tmp/uotK5wPd8O:1␤␤»
21:08 ingy the Pegex::Parser::LTM would make you happy :)
21:08 ingy *thus
21:08 tangentstorm so $_ is read-only.
21:08 timotimo tangentstorm: you can get a read-write-able copy of $_ by making the block a pointy block as i did above
21:09 FROGGS tangentstorm: all iterators are r/o by default
21:09 masak I don't think that's the problem there.
21:09 masak the problem is that lines() is readonly.
21:09 xilo_ joined #perl6
21:10 masak r: for lines() -> $_ is copy { s/\w/_/; .say }
21:10 p6eval rakudo ffc17d: OUTPUT«_and der Berge, Land am Strome,␤_and der Äcker, Land der Dome,␤_and der Hämmer, zukunftsreich!␤_eimat bist du großer Söhne,␤_olk, begnadet für das Schöne,␤_ielgerühmtes Österreich,␤_ielgerühmtes Österreich!␤␤_eiß umfehdet, wild umstritten␤_iegst dem Erdteil du inmi…
21:10 ingy timotimo: btw %% (assuming it still is part of p6rules) was an idea TimToady took back from Pegex :)
21:10 FROGGS r: my @a = 1..9; for @a { s/1/2/ }
21:10 tangentstorm r: for lines() { .s/\w/_/; .say }
21:10 census joined #perl6
21:10 p6eval rakudo ffc17d:  ( no output )
21:10 p6eval rakudo ffc17d: OUTPUT«[31m===[0mSORRY![31m===[0m�Bogus statement�at /tmp/H3kN6No7RA:1�------> [32mfor lines() { .s/\w/_/[33m�[31m; .say }[0m�    expecting any of:�        argument list�        postfix�        infix stopper�        infix or meta-infix�        prefix or term�     …
21:10 FROGGS hmmm
21:10 FROGGS masak++
21:10 timotimo ingy: i don't know anything like %%. is it perhaps the new %?
21:10 tangentstorm the bot should say who it's talking to
21:10 timotimo er, rather the old %
21:10 sorear tangentstorm: $_ is a read-write alias to whatever is in the loop, just like Perl 5
21:10 tangentstorm r: for lines() { .s/./!/; .say }
21:10 p6eval rakudo ffc17d: OUTPUT«[31m===[0mSORRY![31m===[0m�Bogus statement�at /tmp/ZxOFSg0fzu:1�------> [32mfor lines() { .s/.[33m�[31m/!/; .say }[0m�    expecting any of:�        dotty method or postfix�»
21:10 sorear s/the loop/the list/
21:11 ingy a %% b == a % b b?
21:11 tangentstorm r: for lines() { .rx s/./!/; .say }
21:11 p6eval rakudo ffc17d: OUTPUT«[31m===[0mSORRY![31m===[0m�Two terms in a row�at /tmp/177LkP0zqN:1�------> [32mfor lines() { .rx [33m�[31ms/./!/; .say }[0m�    expecting any of:�        method arguments�        postfix�        infix stopper�        infix or meta-infix�        statement en…
21:11 sorear r: for lines() -> $_ is copy { s/\/./!/; .say }
21:11 p6eval rakudo ffc17d: OUTPUT«Land der Berge, Land am Strome,␤Land der Äcker, Land der Dome,␤Land der Hämmer, zukunftsreich!␤Heimat bist du großer Söhne,␤Volk, begnadet für das Schöne,␤vielgerühmtes Österreich,␤vielgerühmtes Österreich!␤␤Heiß umfehdet, wild umstritten␤liegst dem Erdteil du inmi…
21:11 timotimo a % b b? two terms in a row
21:11 ingy for things like optional trailing commas
21:11 tangentstorm s/// isn't a function i guess...
21:12 sorear no, if it were a function it would have to have completely different syntax
21:12 FROGGS tangentstorm: it is like $_.subst(//)
21:12 tangentstorm r: for lines() { .subst /./!/; .say }
21:12 p6eval rakudo ffc17d: OUTPUT«[31m===[0mSORRY![31m===[0m�Bogus statement�at /tmp/nCnbjKqU_y:1�------> [32mfor lines() { .subst /.[33m�[31m/!/; .say }[0m�    expecting any of:�        dotty method or postfix�»
21:13 tangentstorm r: for lines() { .subst( /./!/ ); .say }
21:13 p6eval rakudo ffc17d: OUTPUT«[31m===[0mSORRY![31m===[0m�Cannot negate / because it is not iffy enough�at /tmp/fhS2sUpP17:1�------> [32mfor lines() { .subst( /./!/[33m�[31m ); .say }[0m�»
21:13 FROGGS hold in
21:13 tangentstorm not iffy enough.
21:13 FROGGS hold on
21:13 FROGGS r: for lines() { .subst( /./, '!' ); .say }
21:13 p6eval rakudo ffc17d: OUTPUT«Land der Berge, Land am Strome,␤Land der Äcker, Land der Dome,␤Land der Hämmer, zukunftsreich!␤Heimat bist du großer Söhne,␤Volk, begnadet für das Schöne,␤vielgerühmtes Österreich,␤vielgerühmtes Österreich!␤␤Heiß umfehdet, wild umstritten␤liegst dem Erdteil du inmi…
21:13 sorear tangentstorm: What are you trying to do?
21:13 timotimo FROGGS: so subtle :)
21:13 FROGGS r: for lines() { .subst( /<[a-z]>/, '*' ); .say }
21:13 p6eval rakudo ffc17d: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of - as character range; in Perl 6 please use .. for range, for explicit - in character class, escape it or place as last thing�at /tmp/RuJYqQZlaw:1�------> [32mfor lines() { .subst( /<[a-[33m�[31mz]>/, '*' ); .say …
21:13 FROGGS r: for lines() { .subst( /<[a..z]>/, '*' ); .say }
21:13 p6eval rakudo ffc17d: OUTPUT«Land der Berge, Land am Strome,␤Land der Äcker, Land der Dome,␤Land der Hämmer, zukunftsreich!␤Heimat bist du großer Söhne,␤Volk, begnadet für das Schöne,␤vielgerühmtes Österreich,␤vielgerühmtes Österreich!␤␤Heiß umfehdet, wild umstritten␤liegst dem Erdteil du inmi…
21:13 FROGGS r: for lines() { .subst( /<[a..z]>/, '*', :g ); .say }
21:14 p6eval rakudo ffc17d: OUTPUT«Land der Berge, Land am Strome,␤Land der Äcker, Land der Dome,␤Land der Hämmer, zukunftsreich!␤Heimat bist du großer Söhne,␤Volk, begnadet für das Schöne,␤vielgerühmtes Österreich,␤vielgerühmtes Österreich!␤␤Heiß umfehdet, wild umstritten␤liegst dem Erdteil du inmi…
21:14 FROGGS meh
21:14 tangentstorm FROGGS: that's beautiful but it didn't work :/
21:14 sorear r: for lines()  -> $_ is copy { $_ = $_.subst( /<[a..z]/, '!' ); .say }
21:14 p6eval rakudo ffc17d: OUTPUT«[31m===[0mSORRY![31m===[0m�regex assertion not terminated by angle bracket�at /tmp/7znoSHZPVK:1�------> [32m -> $_ is copy { $_ = $_.subst( /<[a..z][33m�[31m/, '!' ); .say }[0m�    expecting any of:�        method arguments�        argument list�        pre…
21:14 sorear FROGGS: .subst is not an inplace operation
21:14 sorear r: for lines()  -> $_ is copy { $_ = $_.subst( /<[a..z]>/, '!' ); .say }
21:14 FROGGS yeah
21:14 p6eval rakudo ffc17d: OUTPUT«L!nd der Berge, Land am Strome,␤L!nd der Äcker, Land der Dome,␤L!nd der Hämmer, zukunftsreich!␤H!imat bist du großer Söhne,␤V!lk, begnadet für das Schöne,␤!ielgerühmtes Österreich,␤!ielgerühmtes Österreich!␤␤H!iß umfehdet, wild umstritten␤!iegst dem Erdteil du inmi…
21:14 FROGGS right
21:14 tangentstorm r: for lines() { say .subst( /./, '!' ) }
21:14 p6eval rakudo ffc17d: OUTPUT«!and der Berge, Land am Strome,␤!and der Äcker, Land der Dome,␤!and der Hämmer, zukunftsreich!␤!eimat bist du großer Söhne,␤!olk, begnadet für das Schöne,␤!ielgerühmtes Österreich,␤!ielgerühmtes Österreich!␤␤!eiß umfehdet, wild umstritten␤!iegst dem Erdteil du inmi…
21:14 FROGGS damn... that v5 work is not good for my p6 skills *g*
21:14 tangentstorm r: for lines() { say .subst( /Land/, 'LAND' ) }
21:15 p6eval rakudo ffc17d: OUTPUT«LAND der Berge, Land am Strome,␤LAND der Äcker, Land der Dome,␤LAND der Hämmer, zukunftsreich!␤Heimat bist du großer Söhne,␤Volk, begnadet für das Schöne,␤vielgerühmtes Österreich,␤vielgerühmtes Österreich!␤␤Heiß umfehdet, wild umstritten␤liegst dem Erdteil du inmi…
21:15 timotimo that's cute
21:15 tangentstorm r: for lines() { say .subst( /./g, 'X' ) }
21:15 p6eval rakudo ffc17d: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of /g; in Perl 6 please use :g�at /tmp/GSm_hDOScG:1�------> [32mfor lines() { say .subst( /./g[33m�[31m, 'X' ) }[0m�»
21:15 FROGGS r: for lines() { say .subst( /Land/, 'SCHMETTERLING' ) }
21:15 p6eval rakudo ffc17d: OUTPUT«SCHMETTERLING der Berge, Land am Strome,␤SCHMETTERLING der Äcker, Land der Dome,␤SCHMETTERLING der Hämmer, zukunftsreich!␤Heimat bist du großer Söhne,␤Volk, begnadet für das Schöne,␤vielgerühmtes Österreich,␤vielgerühmtes Österreich!␤␤Heiß umfehdet, wild umstritten…
21:15 tangentstorm r: for lines() { say .subst( /./:g, 'X' ) }
21:15 p6eval rakudo ffc17d: OUTPUT«[31m===[0mSORRY![31m===[0m�You can't adverb that�at /tmp/x5Lj1rhp4E:1�------> [32mfor lines() { say .subst( /./:g[33m�[31m, 'X' ) }[0m�    expecting any of:�        pair value�»
21:15 FROGGS SCHMETTERLING der Hämmer \m/
21:15 FROGGS hehe
21:16 tangentstorm r: for lines() { say /./X/:g }
21:16 p6eval rakudo ffc17d: OUTPUT«get_attr_str() not implemented in class 'Coroutine'␤current instr.: 'print_exception' pc 111608 (src/gen/CORE.setting.pir:50161) (src/gen/CORE.setting:9722)␤called from Sub 'throw' pc 357537 (src/gen/CORE.setting.pir:155985) (src/gen/CORE.setting:9536)␤called from …
21:16 FROGGS I really like that: You can't adverb that
21:16 * tangentstorm goes to read the manual
21:16 sorear tangentstorm: WTH are you trying to do
21:16 FROGGS tangentstorm: write it as: s:g/./X/
21:17 tangentstorm r: for lines() { say s:g/./X/ }
21:17 p6eval rakudo ffc17d: OUTPUT«Cannot assign to a readonly variable or a value␤  in sub infix:<=> at src/gen/CORE.setting:12872␤  in block  at /tmp/_OfemAlnwT:1␤␤»
21:17 tangentstorm r: for lines() { say subst :g/./X/ }
21:17 p6eval rakudo ffc17d: OUTPUT«[31m===[0mSORRY![31m===[0m�Confused�at /tmp/9jFlYCVmAH:1�------> [32mfor lines() { say subst :g/.[33m�[31m/X/ }[0m�    expecting any of:�        dotty method or postfix�»
21:17 tangentstorm r: for lines() { say .subst :g/./X/ }
21:17 p6eval rakudo ffc17d: OUTPUT«[31m===[0mSORRY![31m===[0m�Bogus statement�at /tmp/VdlDc1xAWi:1�------> [32mfor lines() { say .subst :g/.[33m�[31m/X/ }[0m�    expecting any of:�        dotty method or postfix�»
21:17 sorear dunno if anyone's noticed but you actually do need the -> $_ is copy part
21:17 tangentstorm gah
21:17 tangentstorm yeah i don't like that :D
21:17 sorear I haven't just been including that for fun
21:18 sorear r: for lines() { say .subst(/./,'X',:g) }
21:18 p6eval rakudo ffc17d: OUTPUT«XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX␤XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX␤XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX␤XXXXXXXXXXXXXXXXXXXXXXXXXXXX␤XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX␤XXXXXXXXXXXXXXXXXXXXXXXXX␤XXXXXXXXXXXXXXXXXXXXXXXXX␤␤XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX␤XXXXXXXXXXXXXXXXXXXXXXXXXX…
21:18 tangentstorm thank you! :)
21:18 sorear since .subst is a non-mutating method, it can be called on read-only values
21:19 tangentstorm so :g is a thing by itself... a symbol?
21:20 flussence sorear: does that replace p5.10's /r modifier completely then?
21:20 sorear flussence: antedates, technically, but yes
21:20 timotimo r: sad :g.perl
21:20 p6eval rakudo ffc17d: OUTPUT«[31m===[0mSORRY![31m===[0m�Undeclared routine:�    sad used at line 1. Did you mean '&say'?��»
21:20 timotimo r: say :g.perl
21:20 p6eval rakudo ffc17d: OUTPUT«"g" => Bool::True␤»
21:21 timotimo it's short syntax for a pair, and pairs are keyword arguments
21:21 timotimo or "named arguments"
21:21 sorear there are a few places in the grammar where you can use syntactic pairs, but just like for they have to be syntactic
21:21 sorear r: s:g/a/b/
21:21 p6eval rakudo ffc17d: OUTPUT«No such method 'subst' for invocant of type 'Any'␤  in block  at /tmp/UmoxFiOyuF:1␤␤»
21:22 sorear r: $_ = "car"; s:g/a/b/
21:22 p6eval rakudo ffc17d:  ( no output )
21:22 sorear r: $_ = "car"; my $p = :g; s$p/a/b/ # will not work, s requires syntactic pairs
21:22 p6eval rakudo ffc17d: OUTPUT«[31m===[0mSORRY![31m===[0m�Unrecognized regex metacharacter / (must be quoted to match literally)�at /tmp/I0Z4iaMML8:1�------> [32m$_ = "car"; my $p = :g; s$p[33m�[31m/a/b/ # will not work, s requires syntac[0m�Couldn't find terminator $stop�at /tmp/I0Z4iaM…
21:22 sorear seems the parser interpreted the $ as the regex opener (like in p5, you can use quite a few characters for that)
21:23 sorear and then got confused while trying to parse "p/a..." as a regex
21:23 sorear because / has no defined meaning, and all unused punctuation is reserved
21:26 tangentstorm hm
21:31 xilo joined #perl6
21:33 masak 'night, #perl6
21:33 sorear night 'masak
21:33 xilo g'night sir
21:34 cognominal__ joined #perl6
21:35 xilo joined #perl6
21:37 census left #perl6
21:44 sftp_ joined #perl6
22:06 japhb_ joined #perl6
22:06 tangentstorm does anyone have an example of running a grammar against an input stream?
22:07 FROGGS $my-grammar.parse( $*INPUT ) or something like that
22:07 FROGGS r: say $*STDIN
22:07 p6eval rakudo ffc17d: OUTPUT«Dynamic variable $*STDIN not found␤  in method gist at src/gen/CORE.setting:10810␤  in method gist at src/gen/CORE.setting:902␤  in sub say at src/gen/CORE.setting:7788␤  in block  at /tmp/jbUkHNwdVk:1␤␤»
22:07 FROGGS r: say $*INPUT
22:07 p6eval rakudo ffc17d: OUTPUT«Dynamic variable $*INPUT not found␤  in method gist at src/gen/CORE.setting:10810␤  in method gist at src/gen/CORE.setting:902␤  in sub say at src/gen/CORE.setting:7788␤  in block  at /tmp/YN3QX7MpfK:1␤␤»
22:07 FROGGS hmmm
22:07 timotimo r: say $*IN;
22:07 p6eval rakudo ffc17d: OUTPUT«IO.new(ins => 0, chomp => Bool::True, path => "-")␤»
22:08 FROGGS ahh
22:08 tangentstorm does that mean i can say  $*IN.chomp = Bool::False
22:08 tangentstorm ?
22:09 FROGGS r: $*IN.chomp = False
22:09 p6eval rakudo ffc17d: OUTPUT«Cannot assign to a readonly variable or a value␤  in block  at /tmp/68JIAThYAy:1␤␤»
22:09 FROGGS r: say $*IN.^methods
22:09 p6eval rakudo ffc17d: OUTPUT«open close eof get getc lines read seek tell write opened t print slurp copy chmod Str flush d e f l r s w x z modified accessed changed say <anon> <anon> <anon>␤»
22:10 FROGGS hmmm, dunno
22:10 tangentstorm just curious. i don't actually need that :)
22:10 FROGGS :o)
22:11 tangentstorm i think i might try to write a parser to translate some java code to pascal
22:11 FROGGS O.o
22:11 FROGGS wow, good luck
22:12 FROGGS I'd write a grammar for YAML if I'd want to learn how that works...
22:12 FROGGS java2pascal sounds a bit heavy
22:12 tangentstorm yeah but i actually need to translate some java code to pascal :D
22:12 FROGGS ahh, okay
22:12 tangentstorm it doesn't have to do everything
22:13 pjcj joined #perl6
22:13 * FROGGS .oO( java 2 pascal... what a fantastical world )
22:13 tangentstorm also the java is pretty regularly formatted
22:14 FROGGS maybe take a look a Perl6's grammar, so you build up a good structure from the start
22:15 FROGGS like having tokens for statementlist, statement, blocks, loops, ...
22:15 FROGGS with the right hierarchy
22:15 dalek perl6-roast-data: 9379906 | coke++ | / (4 files):
22:15 dalek perl6-roast-data: today (automated commit)
22:15 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/93799061d0
22:15 BenGoldberg joined #perl6
22:17 pjcj joined #perl6
22:22 dalek rakudo/nom: f0aa5a6 | (Tobias Leich)++ | src/Perl6/ModuleLoader.pm:
22:22 dalek rakudo/nom: let require take paths too
22:22 dalek rakudo/nom:
22:22 dalek rakudo/nom: If require`s argument contains a slash or dot treat it like a path
22:22 dalek rakudo/nom: to a file. This means that the file is searched relative to cwd,
22:22 dalek rakudo/nom: variables like CUSTOM_LIBS and INC are not used.
22:22 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f0aa5a6bfe
22:22 FROGGS k, test time now
22:28 skids joined #perl6
22:30 tgt joined #perl6
22:36 dalek roast: 51f422e | coke++ | S32-num/power.t:
22:36 dalek roast: pugs fudge
22:36 dalek roast: review: https://github.com/perl6/roast/commit/51f422ec7f
22:54 tangentstorm i'm mystified by this error: https://gist.github.com/tangentstorm/5375842
22:54 tangentstorm can someone translate? :D
22:55 tangentstorm hmm... i said <darkspace> instead of <blackspace>
22:55 FROGGS tangentstorm: you have passed a named arg where none is expected in method parse
22:55 FROGGS or at least that one you passed isnt used
22:56 tangentstorm what was the named arg?
22:56 tangentstorm :action?
22:56 FROGGS :actions
22:57 tangentstorm oh. the tutorial i was looking at called it :action
22:58 tangentstorm http://perl6advent.wordpress.com/2009/12/21/day-21-grammars-and-actions/
22:58 tangentstorm is there something like perldoc -f for rakudo?
22:58 tangentstorm and if so how would it work with a class?
23:00 FROGGS dunno about perldoc
23:01 [Coke] perl6 --doc
23:01 [Coke] I think there is a plan for a standlone that does that.
23:01 [Coke] right now you need to specify the full path to the file. I think the plan is eventually for perl6doc Mojo::licious to work.
23:04 dalek roast: 7f941a9 | coke++ | S06-multi/syntax.t:
23:04 dalek roast: pugs fudge
23:04 dalek roast: review: https://github.com/perl6/roast/commit/7f941a9c5e
23:04 tangentstorm thanks :)
23:11 bbkr joined #perl6
23:12 bbkr r: sub foo ( --> Buf ){ Buf.new}; say [~](foo)
23:12 p6eval rakudo ffc17d: OUTPUT«Cannot use a Buf as a string, but you called the Str method on it␤  in method Str at src/gen/CORE.setting:7541␤  in method Str at src/gen/CORE.setting:882␤  in method Stringy at src/gen/CORE.setting:894␤  in sub infix:<~> at src/gen/CORE.setting:1284␤  in sub infix…
23:13 sorear has there been any discussion on a perl6 --doc "safe mode" sort of thing?  I think a lot of perl 5 people would be very surprised if perldoc started running BEGIN blocks and use statements, althogh some of that is needed for metamodelling
23:13 bbkr looks like reduction ignored return value type
23:13 sorear r: say [~](Buf.new)
23:13 p6eval rakudo f0aa5a: OUTPUT«Cannot use a Buf as a string, but you called the Str method on it␤  in method Str at src/gen/CORE.setting:7541␤  in method Str at src/gen/CORE.setting:882␤  in method Stringy at src/gen/CORE.setting:894␤  in sub infix:<~> at src/gen/CORE.setting:1284␤  in sub infix…
23:13 sorear exactly the same
23:14 bbkr r: [~](Buf.new)
23:14 p6eval rakudo f0aa5a: OUTPUT«Cannot use a Buf as a string, but you called the Str method on it␤  in method Str at src/gen/CORE.setting:7541␤  in method Str at src/gen/CORE.setting:882␤  in method Stringy at src/gen/CORE.setting:894␤  in sub infix:<~> at src/gen/CORE.setting:1284␤  in sub infix…
23:14 sorear foo and Buf.new are both expressions that are typed Buf and return a Buf
23:15 FROGGS r: [~](Buf.new.decode)
23:15 p6eval rakudo f0aa5a:  ( no output )
23:15 sorear r: Buf.new ~ Buf.new
23:15 p6eval rakudo f0aa5a:  ( no output )
23:15 sorear r: &infix:<~>(Buf.new)
23:15 p6eval rakudo f0aa5a: OUTPUT«Cannot use a Buf as a string, but you called the Str method on it␤  in method Str at src/gen/CORE.setting:7541␤  in method Str at src/gen/CORE.setting:882␤  in method Stringy at src/gen/CORE.setting:894␤  in sub infix:<~> at src/gen/CORE.setting:1284␤  in sub infix…
23:15 sorear i think you've found a genuine rakudobug
23:16 bbkr r: say [~](Buf.new, Buf.new) # how to explain this one?
23:16 p6eval rakudo f0aa5a: OUTPUT«Buf:0x<>␤»
23:16 sorear the two arg ~ supports Buf but not the one arg version
23:16 sorear bbkr: Because [] treats two arg and one arg lists fundamentally differently.
23:16 sorear [~](X,Y)  -> X ~ Y
23:16 sorear [~](X)  -> &infix:<~>( X )
23:17 sorear [~]()  -> &infix:<~>( )
23:17 bbkr thanks for explanation, reporting bug right now...
23:17 sorear [~](X,Y,Z)  -> (X ~ Y) ~ Z
23:20 frd|afk joined #perl6
23:23 BenGoldberg r: say Buf.new
23:23 p6eval rakudo f0aa5a: OUTPUT«Buf:0x<>␤»
23:23 BenGoldberg r: say Buf:0x<>
23:23 p6eval rakudo f0aa5a: OUTPUT«[31m===[0mSORRY![31m===[0m�Two terms in a row�at /tmp/YAc4cDTBxw:1�------> [32msay Buf[33m�[31m:0x<>[0m�    expecting any of:�        postfix�        infix stopper�        infix or meta-infix�        statement end�        statement modifier�        statemen…
23:24 FROGGS r: print Buf.new
23:24 p6eval rakudo f0aa5a: OUTPUT«Cannot use a Buf as a string, but you called the Str method on it␤  in method Str at src/gen/CORE.setting:7541␤  in method Str at src/gen/CORE.setting:882␤  in method print at src/gen/CORE.setting:7972␤  in method print at src/gen/CORE.setting:7966␤  in sub print a…
23:24 FROGGS r: say Buf.new.perl
23:24 p6eval rakudo f0aa5a: OUTPUT«Buf.new()␤»
23:25 labster r: say Buf ~~ Cool
23:25 p6eval rakudo f0aa5a: OUTPUT«False␤»
23:25 bbkr @t>>.map: { self._element( $_ ) }  # is this the correct way to parallelize element processing when it is a param to a function?
23:26 bbkr does not give any speedup
23:26 FROGGS NYI
23:27 bbkr oh, saving snippet for the future then :)
23:27 FROGGS :o)
23:30 tangentstorm hmm
23:30 tangentstorm my @tokens = Forthy::Grammar.parse( "hello world", :actions($actions));  # <- works fine
23:30 tangentstorm my @tokens = Forthy::Grammar.parse( $*IN, :actions($actions)); # <- constantly gives errors
23:31 tangentstorm "No such method 'substr' for invocant of type 'IO'"
23:31 timotimo yeah, try $*IN.read mayhaps?
23:31 tangentstorm i don't use "substr" anywhere
23:31 FROGGS maybe you have to assign to a variable first
23:31 arlinius joined #perl6
23:31 FROGGS ohh, what timotimo said
23:32 tangentstorm Not enough positional parameters passed; got 1 but expected 2
23:32 tangentstorm .read(something) i guess
23:33 tangentstorm r: say $*IN.read;
23:33 p6eval rakudo f0aa5a: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤  in method read at src/gen/CORE.setting:7925␤  in block  at /tmp/ihTfkmXpry:1␤␤»
23:33 timotimo there should be a function that gets the complete file content
23:33 timotimo r: say $*IN.^methods
23:33 p6eval rakudo f0aa5a: OUTPUT«open close eof get getc lines read seek tell write opened t print slurp copy chmod Str flush d e f l r s w x z modified accessed changed say <anon> <anon> <anon>␤»
23:33 timotimo yeah, slurp is the one you want
23:33 tangentstorm thanks
23:33 tangentstorm is there something like .^methods to show the arguments for a method?
23:33 timotimo also, i think slurp as a sub without arguments will operate on $*IN
23:34 timotimo yes, there is
23:34 tangentstorm :r say slurp
23:34 timotimo r: say "Foo".^methods[0].signature
23:34 p6eval rakudo f0aa5a: OUTPUT«:(Str : :value(:$value) = { ... }, Mu *%_)␤»
23:34 tangentstorm :r say slurp.signature
23:34 timotimo r: say "Foo".^methods[0].signature; say "Foo".^methods[0].^name;
23:34 p6eval rakudo f0aa5a: OUTPUT«:(Str : :value(:$value) = { ... }, Mu *%_)␤Submethod␤»
23:34 timotimo r: say "Foo".^methods[0].signature; say "Foo".^methods[0];
23:34 p6eval rakudo f0aa5a: OUTPUT«:(Str : :value(:$value) = { ... }, Mu *%_)␤BUILD␤»
23:34 timotimo you need to put the : after r
23:34 timotimo and now i'm going to bed
23:34 tangentstorm oh :)
23:34 tangentstorm thanks for your help :)
23:35 tangentstorm r: say slurp.signature
23:35 p6eval rakudo f0aa5a: OUTPUT«No such method 'signature' for invocant of type 'Str'␤  in block  at /tmp/tW_KHwVl0L:1␤␤»
23:35 FROGGS .tell jnthn that I can "require PATH" now (pushed), but can't import subs
23:35 yoleaux FROGGS: I'll pass your message to jnthn.
23:35 timotimo r: say &slurp.signature
23:35 p6eval rakudo f0aa5a: OUTPUT«:()␤»
23:35 tangentstorm ah yeah & :)
23:35 timotimo "slurp.signature" will be parsed as "slurp().signature()"
23:35 tangentstorm good times
23:35 FROGGS .tell jnthn I've got this patch locally applied, test file is there too: https://gist.github.com/FROGGS/a9ef1432e1f9d37e9770
23:35 yoleaux FROGGS: I'll pass your message to jnthn.
23:35 tangentstorm cool
23:36 Vlavv joined #perl6
23:38 fgomez joined #perl6
23:39 FROGGS .tell jnthn won't write tests now, but will go deeper into the rabbit hole
23:39 yoleaux FROGGS: I'll pass your message to jnthn.
23:55 berekuk joined #perl6
23:56 tangentstorm WHAT IS WRONG WITH YOU PEOPLE??? It's supposed to be an unreadable mess, and you let me do this??? :D  https://gist.github.com/tangentstorm/5375842
23:56 tangentstorm way too nice. take it back. :)
23:59 sorear tangentstorm: on line 7, better to use [] than ()

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

Perl 6 | Reference Documentation | Rakudo