Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-10-29

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:04 TimToady std: {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{say(4)}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
00:04 p6eval std 28943: OUTPUT«Deep recursion on anonymous subroutine at Cursor.pm line 677.␤Deep recursion on anonymous subroutine at Cursor.pm line 831.␤Deep recursion on anonymous subroutine at Cursor.pm line 987.␤Deep recursion on anonymous subroutine at Cursor.pm line 987.␤Deep recursion on anonymous
00:04 p6eval ..subrou…
00:04 TimToady ENOTYET
00:06 tylerni7 joined #perl6
00:07 cj wow.  hi ;)
00:08 diakopter cj: see my /msg to you
00:28 diakopter std: {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{say(4)}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
00:28 p6eval std 28944: OUTPUT«ok 00:02 120m␤»
00:31 cotto_work joined #perl6
00:33 orafu joined #perl6
00:35 Whiteknight joined #perl6
00:36 mrsaturns joined #perl6
00:36 FCO joined #perl6
00:36 mrsaturns hey again
00:46 Exodist joined #perl6
00:55 xenoterracide joined #perl6
00:58 xenoterracide joined #perl6
01:02 nbrown joined #perl6
01:05 carlin moritz_: (From the backlog) what's the failure in IO-Socket-INET.t? All tests there should pass (and do here).
01:07 carlin moritz_: *doh* ... of course ... nevermind.
01:11 xenoterracide joined #perl6
01:14 brunov joined #perl6
01:14 brunov joined #perl6
01:44 quuxx joined #perl6
01:51 KyleHa joined #perl6
02:13 agentzh joined #perl6
02:13 dalek nqp-rx: 501baec | pmichaud++ | src/NQP/ (2 files):
02:13 dalek nqp-rx: [nqp]:  Add statement_prefix:sym<INIT> .
02:13 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/501baec2b74bddd60c9ce8811ebb84a4b97759ba
02:13 dalek nqp-rx: 773419c | pmichaud++ | t/nqp/33-init.t:
02:14 dalek nqp-rx: Add test for INIT statements.
02:14 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/773419c7f8e89aa7ecbf90d93e7f2d31b6eafec8
02:14 dalek nqp-rx: d8f4a95 | pmichaud++ | build/PARROT_REVISION:
02:14 dalek nqp-rx: Bump PARROT_REVISION.
02:14 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/d8f4a958694d32366cfafa578795ae4248342b7e
03:25 eternaleye joined #perl6
03:26 perlsyntax joined #perl6
03:27 perlsyntax hi
03:27 perlsyntax i got a question how do i start out in perl 6 with like this #!/usr/bin/perl?
03:33 __ash__ perlsyntax: whats the issue now? your not sure how to start perl6?
03:34 perlsyntax right
03:34 __ash__ did you build it?
03:34 perlsyntax yes
03:34 __ash__ and do make install?
03:34 perlsyntax yes
03:34 __ash__ perl6 should start it then
03:35 perlsyntax just type perl6
03:35 __ash__ or #!/usr/local/bin/perl6 if you didn't change the prefix
03:35 __ash__ yeah, assuming /usr/local/bin is in your path, it should be in there
03:36 perlsyntax youok
03:36 perlsyntax ok
03:36 meppl joined #perl6
03:37 __ash__ if you start it without a file it just starts a little command prompt you can write in, it only lets you do single line functions though
03:37 perlsyntax cool
03:37 perlsyntax then how do i compile a perl 6 file
03:37 perlsyntax i newbie
03:39 __ash__ um, you don't? hehe, its not required, they are run through the interpreter
03:39 perlsyntax __ash__Maybe i make some cooltools for perl 6
03:39 __ash__ just do:  perl6 /path/to/file.pl
03:39 perlsyntax i see
03:39 perlsyntax cool
03:40 perlsyntax i think i going to like perl 6
03:40 __ash__ or, if your in a unix system, chmod +x the file, then do the shebang to perl6 as the first line of your file
03:40 __ash__ that looks something like:  #!/usr/local/bin/perl6
03:41 perlsyntax ok i see
03:41 perlsyntax i use fedora 11
03:41 __ash__ then you can just run the file itself
03:42 perlsyntax cool
03:42 frew joined #perl6
03:43 __ash__ have you ever used perl before?
03:44 perlsyntax i use perl 5 sometimes.
03:44 perlsyntax i know how to run a perl 5 program.
03:45 perlsyntax i run a perl6 file if i am right.
03:45 __ash__ http://perlgeek.de/blog-en/perl-5-to-6/ might be useful for you then
03:48 perlsyntax ok
03:48 perlsyntax i made a hello script hope i can run it.
03:48 perlsyntax lol
03:48 __ash__ http://perlcabal.org/syn/ is a great place to look at the current documentation/spec of the language
03:48 envi^office joined #perl6
03:49 __ash__ woot, step 1 for any real language, hello world
03:49 perlsyntax yepper
03:49 perlsyntax thanks
03:54 perlsyntax i can't find perl6 is this odd.
03:57 perlsyntax left #perl6
04:03 __ash__ how did you install it?
04:03 __ash__ oh, nm he left
04:04 eternaleye joined #perl6
04:04 jaldhar joined #perl6
04:22 dalek nqp-rx: acc9532 | pmichaud++ | src/NQP/Grammar.pm:
04:22 dalek nqp-rx: [nqp]:  Allow regexes to take parameters.
04:22 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/acc95327f03d0a1b236d3a4ab826c866a9ee0f39
04:22 dalek nqp-rx: e259ff0 | pmichaud++ | src/stage0/ (3 files):
04:22 dalek nqp-rx: Update bootstrap to include parameterized regexes.
04:22 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/e259ff054f8de1ec728d9aeefda6f25d06868df3
04:23 xenoterracide joined #perl6
04:38 felipe joined #perl6
04:44 Schwern joined #perl6
04:48 xenoterracide joined #perl6
04:54 mepplock joined #perl6
04:56 xenoterracide joined #perl6
05:34 pugs_svn r28945 | pmichaud++ | [misc/pm.txt]:  Another query.
05:34 pugs_svn r28945 | Pm-7:  S05 says that a match's reduction object is given by the
05:34 pugs_svn r28945 |     C<:action> parameter, STD.pm's initparse has C<:actions> and
05:34 pugs_svn r28945 |     $*ACTIONS.  Should we pick one and stick with it?  (PGE and
05:34 pugs_svn r28945 |     Rakudo have traditionally used C<:action> -- if there's to
05:34 pugs_svn r28945 |     be a change, now would be a good time for it.  :-)
05:49 rlarson87 joined #perl6
05:51 Schwern joined #perl6
05:51 iblechbot joined #perl6
05:59 pugs_svn r28946 | pmichaud++ | Add a comment to Pm-7.
06:05 eternaleye joined #perl6
06:07 dalek nqp-rx: 67e897d | pmichaud++ | src/ (2 files):
06:07 dalek nqp-rx: Use $*ACTION contextual instead of $!action cursor attribute (from STD.pm)
06:07 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/67e897df22db3f27548d3c04523f36671ce773e3
06:07 dalek nqp-rx: 414f6a0 | pmichaud++ | src/stage0/ (3 files):
06:07 dalek nqp-rx: Update bootstrap.
06:07 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/414f6a06606e6d3b0bbe9423e6a3e6bd9c8c6e64
06:10 xenoterracide joined #perl6
06:15 justatheory joined #perl6
06:18 xenoterracide joined #perl6
06:24 NorwayGeek_ joined #perl6
06:42 c1sung joined #perl6
06:49 Bzek joined #perl6
06:56 bpetering PerlJam: happy birthday! :)
07:40 colomon joined #perl6
07:40 ejs joined #perl6
07:50 ejs1 joined #perl6
07:54 moritz_ good morning
07:54 rblasch joined #perl6
08:02 mariuz joined #perl6
08:04 colomon moritz_: Should we have defined checks (like your sign) for all the trig functions, etc?
08:05 moritz_ colomon: not really
08:06 moritz_ the spec explicitly mentions that sign(undef) is undef
08:06 pugs_svn r28947 | moritz++ | [t/spec] unfudge and correct sign() tests
08:06 moritz_ it doesn't for other functions
08:07 colomon Huh.  That seems like an odd detail...
08:08 moritz_ aye
08:09 moritz_ my goal yesterday was just to move it to the setting, so that closing RT #60674 would become easy
08:09 colomon Guess it's an odd detail I'm perfectly happy not to worry about.  :)
08:09 moritz_ and I have a patch for that now
08:11 colomon moritz_++  # moving things to the setting
08:13 pugs_svn r28948 | moritz++ | [t/spec] test for RT #60674, sign(Complex)
08:17 dalek rakudo: 27e0d69 | moritz++ | src/setting/Complex.pm:
08:17 dalek rakudo: sign(Complex) fails. Closes RT #60674
08:17 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/27e0d69c8f4927eb3df3087ca12b8b1cb616365f
08:17 colomon Okay, looks like I have successfully installed Ubuntu in a VM on my MacBook, time to go back to bed.
08:18 moritz_ good night colomon
08:18 colomon err.... why did you define sign(Any) and sign(Complex)?  Isn't the former enough?
08:19 moritz_ no
08:19 colomon (And why aren't Complex undefs special-cased?)
08:19 moritz_ sign(Any) calls $x.Num.sign
08:19 moritz_ $x.Num fails
08:20 moritz_ and Failure.sign barfs
08:20 colomon ah, instead of $x.sign.  I see.
08:20 moritz_ well, I guess it's sub-optimal the way I did it
08:21 moritz_ what do you mean by Complex undefs? Complex.sign? or undef + undef\i?
08:21 colomon rakudo: my Complex $x; sign($x);
08:21 p6eval rakudo 8cf27e:  ( no output )
08:21 colomon rakudo: my Complex $x; say sign($x)
08:21 p6eval rakudo 8cf27e: OUTPUT«Use of uninitialized value␤␤»
08:21 colomon rakudo: my Complex $x; say $x.WHAT; say $x
08:22 p6eval rakudo 8cf27e: OUTPUT«Complex()␤Complex()␤»
08:22 moritz_ but it seems to dtrt
08:22 colomon yeah, interesting.
08:22 colomon rakudo: my Complex $x; say $x.WHAT; say defined($x)
08:22 p6eval rakudo 8cf27e: OUTPUT«Complex()␤0␤»
08:23 * colomon needs sleep.
08:23 moritz_ nqp: grammar A { token TOP { (.) $0 } }; say(A.parse('bb'))
08:23 p6eval nqp: OUTPUT«bb␤»
08:23 moritz_ colomon: good night
08:23 moritz_ nqp: grammar A { token TOP { (.) $1 } }; say(A.parse('bb'))
08:23 p6eval nqp: OUTPUT«b␤»
08:23 moritz_ pmichaud: that doesn't look right ;-)
08:24 moritz_ nqp: my $x := 'b'; grammar A { token TOP { (.) $b } }; say(A.parse('bb'))
08:24 p6eval nqp: OUTPUT«␤»
08:25 moritz_ rakudo: our Int @A1; our @A2; @A2[0] = "Str"
08:25 p6eval rakudo 8cf27e: TIMED_OUT
08:26 Schwern joined #perl6
08:27 moritz_ rakudo: our $c; class T { $c++ }; T.new; say $c
08:27 p6eval rakudo 8cf27e: TIMED_OUT
08:28 moritz_ rakudo: sub foo(Int *@a) {}; my Int @b; foo(|@b)
08:28 p6eval rakudo 8cf27e: TIMED_OUT
08:36 moritz_ rakudo: say 5.Num.sin('degrees');
08:36 p6eval rakudo 27e0d6: OUTPUT«0.0871557427476582␤»
08:37 moritz_ rakudo: say 5.0.sin('degrees');
08:37 p6eval rakudo 27e0d6: OUTPUT«0.0871557427476582␤»
08:37 moritz_ rakudo: say (5 * 1.0).sin('degrees');
08:37 p6eval rakudo 27e0d6: OUTPUT«0.0871557427476582␤»
08:40 moritz_ nqp: say 3 ?? 5 : 6; # intentionally wrong
08:40 p6eval nqp: OUTPUT«Confused at line 1, near "say 3 ?? 5"␤current instr.: 'parrot;HLL;Grammar;panic' pc 11756 (gen/hllgrammar-actions.pir:1131)␤»
08:41 moritz_ rakudo: (1..3).map({$_ => $_*$_}).perl.say
08:42 p6eval rakudo 27e0d6: TIMED_OUT
08:43 SmokeMachine joined #perl6
08:55 [1]rlarson87 joined #perl6
09:00 moritz_ rakudo: my $r = 1..9; $r.pop; say $r.perl
09:00 p6eval rakudo 27e0d6: OUTPUT«1..8␤»
09:01 Juerd joined #perl6
09:01 pmichaud_ joined #perl6
09:02 hatsefla1s joined #perl6
09:02 dukeleto joined #perl6
09:02 dalek joined #perl6
09:04 moritz_ down to 520 tickets, 4 of which (at least) can be closed if the testing status is satisfactory
09:31 JimmyZ joined #perl6
09:32 JimmyZ rakudo: my $r = 1..*; $r.pop; say $r.perl;
09:32 p6eval rakudo 27e0d6: OUTPUT«Method 'pop' not found for invocant of class 'WhateverCode'␤in Main (file src/gen_setting.pm, line 295)␤»
09:32 JimmyZ rakudo: my $r = 1..*; say $r.perl;
09:32 p6eval rakudo 27e0d6: OUTPUT«{ ... }␤»
09:35 synth joined #perl6
09:45 [1]rlarson87 joined #perl6
09:47 am0c joined #perl6
10:02 Whiteknight joined #perl6
10:04 Su-Shee joined #perl6
10:05 Su-Shee hi all.
10:05 moritz_ helo
10:21 rgrau joined #perl6
10:29 alfieANDfred joined #perl6
10:53 agentzh joined #perl6
10:58 buubot joined #perl6
10:59 Su-Shee_ joined #perl6
11:00 dakkar joined #perl6
11:12 jnthn joined #perl6
11:13 jnthn o/
11:18 KatrinaTheLamia joined #perl6
11:19 ejs joined #perl6
11:21 mathw oh hai jnthn
11:34 NorwayGeek joined #perl6
11:55 payload joined #perl6
12:07 meppl joined #perl6
12:12 payload joined #perl6
12:12 masak joined #perl6
12:12 masak good not-even-pretending-it's-early, #perl6.
12:12 jnthn lolitsafternoon
12:13 masak orz
12:13 jnthn masak++ # making me feel better about the time I got up
12:13 masak jnthn: :)
12:14 payload joined #perl6
12:14 takadonet morning all :P
12:14 masak takadonet: \o
12:15 takadonet already changed Parrot version! I just got rakudo updated yesterday!
12:16 jnthn takadonet: Sorry, we've been migrating onto the new Parrot calling conventions bit by bit, and I've had to patch Parrot a couple of times along the way too, so we've been chasing those patches.
12:17 takadonet I know jnth, been following commit bits and this channel
12:17 * takadonet wonders his 3 week old rakudo bioperl6 will work....
12:18 moritz_ parsing got slower, running got faster
12:18 moritz_ so hopefully an overall win for number and string crunshing
12:19 takadonet I just hope it works
12:19 takadonet we do not have lazy parsing of files using a grammar yet right?
12:20 moritz_ right
12:20 pmichaud_ good morning, #perl6
12:20 jnthn lol
12:20 moritz_ good morning pmichaud :-)
12:20 jnthn Somebody who actually *can* say good morning. ;-)
12:20 masq joined #perl6
12:21 masq Hello.
12:21 moritz_ hi
12:23 Su-Shee hi masq :)
12:25 moritz_ btw I turned my LTM notes into an article: http://perlgeek.de/en/article/longest-token-matching
12:25 pmichaud *click*
12:25 moritz_ thanks to everybody who provided feedback
12:25 pmichaud moritz++
12:26 takadonet YA! new article from moritz_ :)
12:26 takadonet moritz_++
12:28 moritz_ pmichaud: if you find anything that you understood differently, please let me know
12:28 pmichaud moritz_: I didn't see anything that I disagreed with
12:29 moritz_ great
12:35 * diakopter wakes up, sorta
12:42 payload joined #perl6
12:42 brunov joined #perl6
12:42 moritz_ nqp: say('pmichaud++')
12:43 p6eval nqp: OUTPUT«pmichaud++␤»
12:43 pmichaud nqp:  pir::say('pmichaud++')
12:43 p6eval nqp: OUTPUT«pmichaud++␤»
12:43 moritz_ nqp: say(' pmichaud++ ') # I fear it doesn't work without spaces, since lambdabot is too dumb
12:43 p6eval nqp: OUTPUT« pmichaud++ ␤»
12:44 masak wow, an nqp mode!
12:44 moritz_ and it's nqp-rx under the hood
12:44 moritz_ and fast
12:44 pmichaud nqp:  say(pir::substr('perl6',4))
12:44 p6eval nqp: OUTPUT«6␤»
12:44 pmichaud nqp:  say(pir::substr('perl6 rocks',6,4))
12:44 p6eval nqp: OUTPUT«rock␤»
12:44 pmichaud yay.
12:46 pugs_svn r28949 | Kodi++ | [perl6.org/source/documentation] Added a link to Rosetta Code.
12:47 moritz_ I love it when people contribute to projects I started :-)
12:50 masak aye, that's a nice feeling.
12:52 JimmyZ joined #perl6
12:52 huf_ joined #perl6
12:53 ejs joined #perl6
12:53 masak more rakudo muddling from a fellow use.perl-er: http://use.perl.org/~lilstevey/journal/39815
12:53 moritz_ masak++ # community radar
12:54 masak moritz_: I could say the same about you, and your excellent presence on PerlMonks. :)
13:00 * jnthn starts to piece together nested siggies
13:01 masak yay, nested siggies!
13:01 jnthn Was going to postpone them until the new grammar, but the parsing of them looked like an easy thing anyway, and the majority of the effort is in stuff that will stay the same.
13:02 diakopter moritz_: "A token that also switches on the :ratchet modifier is called a rule."  (from book)
13:02 diakopter don't tokens already have the :ratchet modifier turned on?
13:02 jnthn Maybe meant :sigspace
13:03 pmichaud diakopter++
13:03 masak aye.
13:03 masak and I wouldn't phrase it like that, because tokens that turn on :sigspace are still tokens, not rules.
13:05 jnthn Aye, it's more just twiddling the defualts.
13:06 pmichaud "A rule is a token that has the :sigspace modifier enabled"
13:06 pmichaud or
13:06 pmichaud "A rule is a regex with both :ratchet and :sigspace enabled"
13:06 masak nod.
13:06 moritz_ diakopter: that's corrected in the source already
13:07 diakopter oh
13:07 moritz_ pmichaud++ caught it, iirc
13:07 * diakopter was reading the pdf
13:07 masak man, it took me ages to learn which one of regex/token/rule was which. :)
13:07 moritz_ it's actually quite simple
13:08 moritz_ a regex is just... a regex
13:08 moritz_ and a token is what you use to match the simplest thing possible
13:08 moritz_ such as \w+ or so
13:08 moritz_ and don't want to backtrack
13:08 moritz_ which just leaves rule for the third option ;-)
13:09 moritz_ if you wrote a grammar, token is very intuitive
13:09 masak nod.
13:09 masak it was in the process of learning to write grammars that I repeatedly chose the wrong one of those, and had to learn which one to use.
13:10 * moritz_ thinks the JSON parser never backtracks
13:10 diakopter what generated that .pdf? can it be automated/scheduled?
13:10 moritz_ it can
13:10 moritz_ and it's a good idea
13:10 [particle] joined #perl6
13:11 huf joined #perl6
13:11 moritz_ http://moritz.faui2k3.org/tmp/book.pdf # current version
13:14 NorwayGeek_ joined #perl6
13:16 [synth] joined #perl6
13:19 diakopter to support 'make install' of multiple perl6 implementations, will rakudo install a 'rakudo' binary... and then perhaps another make target (perhaps named make install_as_default_perl6) that creates a symlink (or on Windows, perl6.cmd containing "rakudo %*") to rakudo?
13:20 pmichaud diakopter: hasn't been completely decided yet
13:20 jnthn Wouldn't you just install them to different directories?
13:20 jnthn And the one that's first in your path wins as the default?
13:21 jnthn Or does the *nix "omg no I want all my apps in one folder" mentality prevent this? :-)
13:21 diakopter sure, but for $PATH and %PATH% resolution, there's not currently a way to call 'sprixel' as "perl6" while also having rakudo available on the path
13:22 morphic joined #perl6
13:22 jnthn I dunno. I guess people manage multiple versions of Perl 5 today somehow. I guess that's one precedent we could follow.
13:22 diakopter I'm thinking for /etc/alternatives
13:22 diakopter a la java/javac
13:22 jnthn I think most people will expect make install to give them a Perl 6 binary.
13:22 jnthn *perl6 binary
13:23 jnthn I'd suggest we provide an alternative target for people who want it installed as something different than that.
13:23 jnthn And keep what most people want as the Common Case.
13:23 jnthn (e.g. make install)
13:24 jnthn Perhaps with a "btw you already have a perl6 binary in place, are you sure" style warning.
13:24 jnthn If we're about to scribble over another one.
13:25 jnthn (e.g. one that isn't an older Rakudo.)
13:25 diakopter ok; I can see that.  so a debian packaging of rakudo would install it to /usr/bin, but as /usr/bin/rakudo, and then use alternatives to handle multiple impl of /usr/bin/perl6 ?
13:25 rdice joined #perl6
13:26 jnthn diakopter: Well, if that works for Debian, they can do that.
13:26 jnthn diakopter: My platform doesn't have a /etc/alternatives, so it's kinda irrelevant.
13:27 jnthn And mostly an implementation detail. We more need a guideline that each platform can apply in whatever way is best for that platform.
13:27 diakopter yes, but your platform also doesn't 'make install' to %SYSTEM_ROOT% :P
13:28 jnthn True, though one of them will still be in the path ahead of others.
13:29 diakopter on windows the default "make install" doesn't necessarily (or ever, by default) install perl6.exe to a directory that's on the %PATH%
13:29 diakopter but my point is that on the rest of the platforms, it does
13:29 SmokeMachine joined #perl6
13:30 cj joined #perl6
13:30 cj_ joined #perl6
13:31 jnthn diakopter: for better or worse, yes, true.
13:31 jnthn diakopter: I think that most people who are building stuff and doing "make install" will expect to get a perl6 binary at the end of it.
13:32 pmichaud ...unless we change their expectations such that they get 'rakudo'
13:32 pmichaud I wonder what python does with its various implementations
13:33 [particle] i imagine the same thing AS perl does
13:33 [particle] provide a checkbox that asks if you want to modify path and other env settings
13:33 diakopter probably same as discussed; alternatives/symlinks to provide the default on *n*x, and manual %PATH% mgmt on windows..
13:34 [particle] (above for windows)
13:34 pmichaud Parent isn't a Class.
13:34 pmichaud (error message from "add_parent".)
13:34 pmichaud That's a LTA error message.
13:34 pmichaud "What parent?  What class?"
13:38 barney joined #perl6
13:38 NorwayGeek joined #perl6
13:39 jnthn pmichaud: means the argument to add_parent wasn't an instance of the Class PMC.
13:39 pmichaud I know what it means.  :)
13:39 pmichaud But I don't know which class I'm attempting to add_parent on.
13:39 jnthn Ah.
13:39 pmichaud and since there are a bunch of classes floating about, it's not helpful to tell me which one is failing or why.
13:40 jnthn aye
13:40 __ash__ joined #perl6
13:40 jnthn Probably easily patched.
13:41 jnthn I'd offer to do it, but I have Slovak class now.
13:41 pmichaud I'll live with it for now.
13:41 TSa joined #perl6
13:42 morphic left #perl6
13:48 pugs_svn r28950 | moritz++ | [t/spec] test for RT #69424, typed slurpy params should accept typed arrays
13:48 pmichaud is that spec?!?
13:49 moritz_ that's common sense ;-)
13:49 pmichaud I'm not so sure it is
13:49 pmichaud but okay
13:49 pmichaud I'm still wondering exactly what it means to have a "typed slurpy".
13:50 payload joined #perl6
13:50 moritz_ if (Int *@a) doesn't accept a Positional[Int], what would it accept at all?
13:50 pmichaud Having   (Int @a)  accept a Positional[Int] makes sense to me
13:50 pmichaud but slurpies don't bind to single params
13:51 pmichaud sub foo(Int *@a) { ... } ;   foo(1,2,3,'a');
13:51 moritz_ unless they do ;-)
13:51 pmichaud should that fail?
13:51 moritz_ probably
13:52 pmichaud sub foo(Int *@a) { ... } ;   foo(1,2,3);      # how about this ?
13:52 moritz_ and if I understood TimToady correctly also lazily
13:52 moritz_ not sure about that
13:52 pmichaud i.e., where's the Positional[Int]   in that case?
13:52 jnthn bbiab - slovak (sorry)
13:53 jnthn would join slurpy discussion otherwise, since I have thoughts on that :-)
13:53 jnthn laters...
13:53 moritz_ let's wait from jnthn that, at least I am in no particular hurry
13:53 pmichaud okay
13:53 pmichaud I'm fine if we have type constraints on slurpies -- I'm just not at all certain about the mechanics.
13:54 pmichaud And it becomes particularly weird if people start passing junctions into slurpies.
13:54 diakopter or captures
13:54 moritz_ I think the decree was that junctions don't autothread over slurpies
13:54 moritz_ but I could be wrong here
13:54 pmichaud right
13:54 pmichaud so then
13:55 pmichaud sub foo(Int *@a) { ... };   foo(1,2,3|4);    # fails?
13:55 * moritz_ resolves RT #69424 anyway ;-)
13:55 colomon joined #perl6
13:55 moritz_ pmichaud: either fail, or it might just interpolate the eigenstates
13:55 pmichaud interpolate eigenstates would be wrong, certainly
13:57 moritz_ speaking of junctions (mostly unrelated)... I found them very useful if used sparingly
13:57 Patterner like salt?
13:57 rgrau joined #perl6
13:58 moritz_ try to use them as fundamental part of a design seems almost always wrong
13:58 moritz_ Patterner: exactly
13:58 mathw my best use for them is things like if $foo == any(1, 2, 3)
13:58 moritz_ my best use for them is in filtering things
13:58 mathw so I use them as syntactic sugar, really
13:59 moritz_ whenever you you have a matching condition
13:59 moritz_ suppose you write sub grep($matcher, @things) { gather for @things { take $_ if $_ ~~ $mather } }
13:59 moritz_ then it's a very nice option to pass /foo/ & /bar/ as $matcher
14:00 moritz_ (uhm, make that Object $matcher, maybe)
14:01 moritz_ and since smart-match is really smart, you can use a closure as the matcher, even if the author never thought of that
14:02 mathw smart match really is incredibly smart
14:02 masak my favourite use of junctions so far is in this post: http://use.perl.org/~masak/journal/38924
14:03 masak the line `return [@slots] if all @slots;` suggested by moritz_++
14:03 masak http://use.perl.org/~masak/journal/38924                                [15:03]
14:03 masak ERC> the line `
14:03 masak urgh.
14:03 masak ERC--
14:04 * moritz_ detects a fail by a non-irssi user and is happy ;-)
14:04 masak :)
14:04 masak I managed to confuse ERC. it's never happened before. not even sure how I did it.
14:05 masak anyway `return [@slots] if all @slots;` reads extremely well.
14:05 silug joined #perl6
14:05 mathw it does
14:05 mathw this is something I've always liked with Perl
14:05 nnunley joined #perl6
14:05 mathw statement modifier conditionals
14:05 mathw also being able to use 'and' and 'or' as conditional expressions
14:06 mathw open my $filehandle, '<', $filename or die "You suck at specifying valid filenames"
14:06 mathw etc.
14:06 moritz_ lol
14:09 mathw further awesome in Perl 6
14:09 mathw compare this line of C#
14:09 mathw DataGridViewComboBoxColumn combo = new DataGridViewComboBoxColumn();
14:09 mathw you know that's so much nicer in Perl 6
14:09 [particle] .= nicer
14:09 mathw my DataGridViewComboBoxColumn $combo .= new()
14:09 mathw why *should* you have to write the type name twice??
14:09 diakopter well, it's  var combo = new DataGridViewComboBoxColumn();
14:09 diakopter to be fair
14:10 mathw diakopter: depends which version of C# you can use
14:11 iblechbot joined #perl6
14:11 diakopter ok; same with perl :P
14:16 envi^home joined #perl6
14:20 kidd` joined #perl6
14:26 lichtkind joined #perl6
14:31 nothingmuch joined #perl6
14:40 nihiliad joined #perl6
14:46 ejs1 joined #perl6
14:48 NorwayGeek_ joined #perl6
15:03 colomon rakudo: say (2 * (1, 2, 3, 4)).perl
15:03 p6eval rakudo 27e0d6: OUTPUT«8␤»
15:03 justatheory joined #perl6
15:03 colomon rakudo: say (0 xx 8).perl
15:03 p6eval rakudo 27e0d6: OUTPUT«[0, 0, 0, 0, 0, 0, 0, 0]␤»
15:05 brunov joined #perl6
15:08 Psyche^ joined #perl6
15:14 colomon masak: ping?
15:14 masak colomon: pong. :)
15:15 colomon I'm trying to understand your second Langford script.
15:15 colomon I think I understand your approach, but the details are puzzling me.
15:15 masak colomon: it'll take me a while to remind myself of what I was doing, but go on.
15:16 colomon I think it's the [@slots] and push @found that are confusing me the most.
15:16 colomon If all @slots, you've got a solution, right?
15:16 masak the [] around the @slots is just to create an array instead of a list.
15:16 masak colomon: yes.
15:17 * colomon is chatting while his shiny new Ubuntu VM installs kcachegrind in the background...
15:17 colomon array instead of list: why?
15:17 mathw This is something I don't really understand
15:17 mathw what is the difference between an array and a list
15:18 masak colomon: ISTR because the list would flatten, and then it wouldn't work.
15:19 masak mathw: a list is immutable, an array is mutable.
15:20 colomon ooo, nice distinction.
15:20 colomon Is @found an array of all possible solutions, then?
15:20 lichtkind are there any attempt to unify all the pathtools in one module and egt rid of Cwd File::Spec ...?
15:20 masak colomon: ah, there you go. @found needs to be an array of arrays.
15:21 masak colomon: if you were to return a list, it would get mixed with other solutions.
15:21 masak mathw: also, lists flatten, arrays don't.
15:21 masak well, arrays flatten in certain special circumstances, such as in push @a, @b
15:21 colomon So you do a depth first search and return all the solutions you find?
15:22 masak colomon: something like that.
15:22 colomon masak++
15:22 masak well, both solutions do that, but the second one does it better.
15:23 colomon BTW, @new-slots[$k, $k+$c+1] = $c, $c; both delights and terrifies me.
15:23 masak jnm has an even better solution in the comments, IIRC.
15:23 colomon masak: the second solution does a smart depth first search, yeah.
15:23 jnthn loli'mback
15:23 masak jnthn++ # iz back!
15:24 jnthn lolmasakblogged!
15:25 masak um. no :)
15:25 jnthn oh wait
15:25 jnthn I'm sure I saw a link
15:25 masak I only thought about it...
15:25 masak that was moritz_++
15:25 jnthn aww
15:25 masak jnthn: oh, the link to the old blog post.
15:25 jnthn yeah
15:25 * moritz_ didn't blog either
15:25 moritz_ since friday
15:25 moritz_ so it's time agian
15:25 jnthn I got excited and thought it was a new masakpost
15:26 masak jnthn: :)
15:26 moritz_ so what should I blog about?
15:26 masak moritz_: nested signatures!
15:26 masak and why they rock.
15:26 moritz_ masak: but... they don't work yet, do they?
15:26 jnthn masak: ETOOSOON :-P
15:26 moritz_ topic rejected, for now
15:26 masak :)
15:29 araujo joined #perl6
15:30 dalek nqp-rx: 7d38dff | pmichaud++ | src/ (4 files):
15:30 dalek nqp-rx: Add <LANG> subrule for handling language braids and actions.
15:30 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/7d38dff1a876735f27bc8a85b2b8d4a0644170e6
15:30 dalek nqp-rx: 3d8df04 | pmichaud++ | build/Makefile.in:
15:30 dalek nqp-rx: Slight reordering of build sequence.
15:30 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/3d8df0455cefb998d87e4caa813d669b8486a193
15:30 dalek nqp-rx: ef8e140 | pmichaud++ |  (2 files):
15:30 dalek nqp-rx: PBC refactor #1 -- create Regex.pbc .
15:30 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/ef8e140efdf0373822fdd73ed5b93c1ce155ba52
15:30 dalek nqp-rx: ca98719 | pmichaud++ |  (7 files):
15:31 dalek nqp-rx: More .pbc refactoring and bootstrapping.
15:31 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/ca987192113fef00b6b8a2e8dba8761209137005
15:31 dalek nqp-rx: 7515ff5 | pmichaud++ |  (3 files):
15:31 dalek nqp-rx: More library refactoring, final stage of bootstrap.
15:31 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/7515ff5abd606287b7fca21906be5ad30d2dd1bf
15:31 dalek nqp-rx: d526e5f | pmichaud++ | build/Makefile.in:
15:31 dalek nqp-rx: Eliminate HLLGrammar.pbc from build -- it's now HLL.pbc .
15:31 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/d526e5fdfd525266d19ee00db8e81798a546fa9b
15:33 colomon Wow, pmichaud++ makes me feel very unproductive...
15:33 jnthn Me too!
15:33 jnthn Time to get back to hacking on nested siggies.
15:34 drbean joined #perl6
15:34 colomon Using kcachegrind with parrot... why is perl6;!TOPERL6MULTISUB using up 201% of the time?
15:35 colomon oh, wait, that's not the total time... maybe because it's in a cycle?
15:35 moritz_ colomon: it's confused with CPS control flow
15:36 colomon I find I'm generating very pretty graphs with no idea what they mean.  :)
15:36 jnthn hehe
15:36 jnthn But they're *pretty*.
15:37 pmichaud right now I'm refactoring so that I can put contextuals in regexes
15:38 pmichaud but it may also give me a huge number of wins on the regex engine as well
15:38 pmichaud we shall see :)
15:38 * moritz_ really misses parameterized regexes in rakudo
15:39 pmichaud nqp-rx has them!!  :-)
15:39 moritz_ I know
15:39 masak \o/
15:39 jnthn moritz_: We'll get 'em for free my stealing the nqp-rx grammar.
15:39 pmichaud I may also have variables and closures in regexes working before the day is out.
15:39 jnthn wow
15:39 pmichaud (very likely -- not hard to do at this point, just so many low-hanging-fruit items to work on)
15:40 [particle] how much pain will there be in converting rakudo actions to the new std-based grammar?
15:40 pmichaud there will be pain
15:40 pmichaud I think we'll basically start over.
15:40 pmichaud (actions, anyway)
15:40 moritz_ enough for a masochist ;-)
15:40 masak where do I sign up?
15:40 jnthn Well, in a sense, there won't be pain converting them because we won't be converting them. ;-)
15:40 pmichaud many things that we handle bottom-up in rakudo's current grammar/actions are handled top-down in STD.pm
15:40 jnthn There'll just be pain building the whole thingy up again.
15:41 pmichaud on the plus side, I've found it to be a very enjoyable pain in nqp-rx
15:41 pmichaud it's like "yes, I already did this once before.... but this is WAY cooler"
15:41 [particle] ok, so let me ask a different question, then...
15:41 TimToady Heinlein: out of the gravity well is halfway to anywhere
15:41 [particle] how much pain will there be to implement STD (parser only) based on nqp-rx?
15:42 pmichaud nqp-rx is based on STD, and it's pretty straightforward.
15:42 [particle] straightforward is good.
15:42 pmichaud as before, our goal isn't to run STD exactly, but to get a close enough approximation that we can start to converge
15:42 jnthn For the usual Perl 6 definition of straightforward. ;-)
15:42 moritz_ ;-)
15:43 jnthn Oh hey, that looks like I've got the code gen for nested signatures almost right...
15:43 TimToady .oO(forward == all directions at once)
15:43 moritz_ not sure how good our test coverage is for nested signatures...
15:43 moritz_ probably rather bad
15:43 jnthn Probably.
15:44 jnthn Given I don't think any implementation ever did 'em before.
15:44 pmichaud (straightforward)  -- for example, I've just been able to eliminate a few more PIR-based "cheats" and replace them with methods written in NQP.
15:44 [particle] pmichaud: yes, that's a good goal.  i'm thinking of tuits i might have, and ways to apply them
15:45 [particle] but, that said, i've just failed to build rakudo with msvc AND strawberry. sigh.
15:45 pmichaud [particle]: well, a couple of weeks ago I was starting on a command line argument processor....
15:45 pmichaud I started to do it in PIR, then said "ugh.  I want to write this in NQP."
15:45 jnthn [particle]: With msvc++ you failed?
15:45 [particle] jnthn: yes
15:45 jnthn [particle]: Try upgrading to XP, it works great here.
15:45 jnthn ;-)
15:45 [particle] mt.exe : general error c101008d: Failed to write the updated manifest to the resource of file "perl6.exe.manifest". The binary is not a valid Windows image.manifest embedding failed
15:46 jnthn Why are we even invoking mt.exe? :S
15:46 [particle] why is it trying to embed a manifest?
15:46 jnthn I don't know. Does it not build an EXE?
15:46 jnthn Or does it want that before building the EXE?
15:46 pmichaud I suspect something to do with pbc_to_exe
15:46 jnthn Ah, maybe.
15:46 pmichaud I've noticed that it builds something called a "manifest" on my system.
15:46 jnthn Odd.
15:46 jnthn :-/
15:46 pmichaud and I have no clue what it is.
15:47 [particle] yes, pbc_to_exe seems the culprit
15:47 pmichaud pmichaud@orange:~/nqp-rx$ make nqp
15:47 pmichaud /home/pmichaud/nqp-rx/parrot_install/bin/pbc_to_exe nqp.pbc
15:47 pmichaud ...
15:47 pmichaud Linked: nqp.manifest
15:48 dalek nqp-rx: 3428caa | pmichaud++ |  (4 files):
15:48 dalek nqp-rx: [p6regex]:  Eliminate src/cheats/p6regex-grammar.pir, they're now P6 source.
15:48 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/3428caac00ae4f85c475c03aa1e1ad2ebe0efc60
15:48 jnthn huh, isn't \(1,2,3) meant to create a capture?
15:49 jnthn Oh, wait, that's not prefix:\
15:49 [particle] so, i need to get back into perl6 development somehow
15:49 moritz_ [particle]: look for RT tickets with the LHF (low-hanging fruit) marker on them ;-)
15:50 jnthn rakudo: say (\(1,2,3)).WHAT
15:50 p6eval rakudo 27e0d6: OUTPUT«List()␤»
15:50 jnthn pmichaud: ^^ That's wrong, no?
15:50 pmichaud jnthn: what should it be?
15:50 [particle] moritz_: i'm wondering if converting STD.pm to nqp-rx is LHF
15:50 jnthn I was expecting a Capture?
15:51 pmichaud I'm not sure how visible Captures are
15:51 jnthn Are my expectations wrong?
15:51 pmichaud they tend to hide themselves for the item
15:51 jnthn Hm
15:51 pmichaud for example, if I have
15:51 pmichaud my $a = \%hash;
15:51 pmichaud and I ask for the type of $a, I somewhat expect 'Hash'
15:51 jnthn Ah
15:51 jnthn 'cus in item context they turn into a single item...
15:51 moritz_ jnthn: my experience is that \(...) doesn't do really much useful in rakudo
15:51 jnthn OK, how do I construct a Capture with a bunch of items?
15:52 pmichaud in current Rakudo, or in Perl 6?
15:52 jnthn Perl 6
15:52 jnthn Well, and in current Rakudo.
15:52 pmichaud keep in mind that they're different
15:52 pmichaud and the spec is incomplete
15:52 pmichaud iiuc,   (1,2,3)  now constructs a Parcel
15:52 pmichaud and there's likely some way to convert a Parcel into a Capture
15:53 jnthn .Capture I guess.
15:53 pmichaud I dunno
15:53 pmichaud anyway, Rakudo doesn't presently have a way of constructing an object that is truly of type "Capture"
15:53 jnthn OK.
15:53 pmichaud because the spec and tests have been ambiguous on that particular point.
15:53 jnthn I probably need to change that now.
15:53 jnthn e.g. by implementing .Capture for a few types.
15:53 pmichaud I'd prefer to see a clear spec before we do too much.
15:54 pmichaud somehow I doubt that the answer is .Capture
15:54 pmichaud (not only "doubt", but "highly doubt")
15:54 jnthn OK, what I'm *actually* wanting to implement is coercion of something else into a Capture.
15:55 jnthn Given .Int gives us an Int, .Str gives us a Str, etc, it follows that for that, .Capture gives a capture.
15:55 pmichaud Yes, I follow.  I just don't know the answer from a "real P6" perspective.
15:55 pmichaud why wouldn't .Capture simply be the same as  \(...)  though ?
15:55 [particle] wait for a 'real p6' to come out, and see.
15:55 TimToady because that's just a non-flattening parcel
15:56 TimToady not a cpature
15:56 TimToady *capture
15:56 jnthn I'm thinking about this in the context of nested signatures.
15:56 pmichaud so how does one "make" a capture ?
15:56 TimToady typically, by using a parcel as an argument list, but that doesn't rule out an explicit conversion
15:56 jnthn Last time this was discussed, the answer was that we took the thingy to bind to a nested signature and coerced it to a Capture.
15:57 pmichaud if we ask a capture for its type, what do we get?
15:57 TimToady yes, binding turns parcels/whatevers into captures
15:57 jnthn e.g. sub foo([$head, *@tail]) { ... }; my @a = 1,2,3; foo(@a); # the binder does something like @a.Capture, and binds the resulting capture agaisnt the nested signature
15:57 pmichaud not @a.Capture
15:57 jnthn Why?
15:57 pmichaud it would be the parcel containing @a
15:58 pmichaud not @a itself
15:58 jnthn By the time the binder sees this, we've already capturized the original parcel.
15:58 pmichaud because    foo(@a, 3)    constructs a capture from   (@a, 3), not from @a and 3 separately
15:58 jnthn IIUC
15:58 jnthn OK, putting it another way:
15:59 jnthn sub foo([$head, *@tail]) { ... } is like sub foo(@temp) { my :($head, *@tail) := @temp.Capture; }
15:59 pmichaud I think that's wrong
15:59 jnthn Well, not .Capture there since binding against a signature implies the coercion of the RHS to capture.
15:59 pmichaud it's like
16:00 * moritz_ thought jnthn was doing nested signatures, not signature unpacking
16:00 pmichaud sub foo(|$capt) { ... }
16:00 TimToady same thing, really
16:00 jnthn moritz_: Waht's the difference?
16:00 pmichaud jnthn: okay, I see what you're getting at
16:00 moritz_ jnthn: in my mind nested signatures are when you have a Callable in a signature, and that thing has a signature again, and you do multi dispatch on that
16:01 jnthn pmichaud: No, that'd capture *all* the arguments.
16:01 jnthn pmichaud: We want to unpack a single positional.
16:01 pmichaud jnthn: still, .Capture seems wrongish to me, at least until TimToady++ declares it to be right-ish
16:01 TimToady pmichaud: that grabs the supercapture, but [] grabs the first arg of that
16:01 pmichaud right, I get it.
16:01 pmichaud I see the difference.
16:01 jnthn Sorry, an example with multiple parameters woulda been clearer.
16:02 TimToady and [] is really just sugar for :() that emphasizes the positionalness
16:02 jnthn TimToady: I'm assuming that we put the thing passed into list context before binding the nested signature too?
16:02 pmichaud I'm just wondering how visible Captures tend to be.   i.e.,   what would    ~(@temp.Capture).WHAT   produce?
16:03 TimToady jnthn: that always depends on the signature in question
16:03 jnthn TimToady: In the case of :([$head, *@tail])
16:03 drbean_ joined #perl6
16:03 pmichaud most of the test suite tends to want captures to be highly invisible creatures
16:04 TimToady that implies list to @tail, but to nothing else
16:04 jnthn TimToady: ah, OK.
16:04 jnthn TimToady: That makes sense.
16:04 TimToady if you bind @foo it's an object
16:05 desertm4x joined #perl6
16:05 TimToady basically, only * does list context
16:05 jnthn TimToady: So are you saying :([$head, *@tail]) is really like :(\$temp) and then :($head, *@tail) := $temp ?
16:05 dalek nqp-rx: 3a49ad1 | pmichaud++ | src/stage0/ (3 files):
16:05 dalek nqp-rx: Update bootstrap files.
16:05 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/3a49ad1863d13488ec0a7513bf708fb5a2733151
16:05 pmichaud I need lunch here... bbiaw
16:06 jnthn kk
16:06 TimToady that seems one level off somewhere
16:06 TimToady maybe lose the :() around \$temp
16:07 TimToady or use :(|$temp)
16:07 jnthn TimToady: Ah, I was meaning the whole signature, not that we nest the \$temp in one.
16:07 TimToady okay
16:07 jnthn That is, sub foo([$head, *@tail]) { ... } would be more like sub foo(\$temp) { ...unpack... }
16:07 TimToady then yes
16:07 jnthn OK.
16:08 jnthn So that bit is easy enough. :-)
16:08 TimToady in fact, you don't even need the \
16:08 TimToady (I think)
16:08 TimToady since the later binding capturizes
16:08 jnthn Well, we'd enforce item context without it, but yes, maybe that isn't a problem actually.
16:08 pmichaud in some sense it feels like "capturize" is "binding"
16:09 pmichaud i.e., it's binding that converts a parcel into a capture
16:09 jnthn pmichaud: Not really. The binder needs a capture to work on.
16:09 jnthn pmichaud: I mean, "obtaining a capture" is kinda a pre-requisite to the binding.
16:09 TimToady it's the phase of binding where we find the named args
16:09 pmichaud right
16:09 jnthn You could see it that way I guess.
16:09 TimToady if they aren't handy, we don't have a capture yet
16:09 pmichaud it's a phase of binding, pre-requisite to completing the bind, but not a pre-requisite to starting it
16:10 jnthn Well, depends what you are counting in as "the bind".
16:10 jnthn OK, let me put it another way.
16:10 pmichaud I'm trying to follow the meaning that TimToady++ is using here :)
16:10 pmichaud 16:08 <TimToady> since the later binding capturizes
16:10 pmichaud 16:09 <TimToady> it's the phase of binding where we find the named args
16:11 TimToady I basically mean everything that := does
16:11 pmichaud right
16:11 TimToady which includes binding :)
16:11 pmichaud I tend to think of "binding" as :=
16:11 pmichaud even for signature binding
16:11 TimToady but I can see the other view
16:11 jnthn Where does the logic to know "I have a List and want it to use its elements as the positionals" or "I have a Hash and wnat to use it as my nameds" or "I have some Object and want to use its attributes as nameds"
16:11 TimToady in which case := is the coerce to capture and bind operator
16:11 jnthn belong?
16:11 TimToady which is a mouthful
16:12 pmichaud isn't it really "I have a parcel..." ?
16:12 pmichaud as opposed to "I have a List" or "I have a Hash" or ....
16:12 TimToady usually
16:13 jnthn pmichaud: If I've passed in a Hash and expect to unpack it, then I have a Hash. :-)
16:13 moritz_ or "I have a dream" # SCNR
16:13 TimToady I don't have enough coffee (in me)
16:13 pmichaud jnthn: in that case, I'd tend to thinkof the Hash as being a parcel with one element
16:13 jnthn pmichaud: That's fine, but doesn't help me.
16:14 jnthn pmichaud: I still need to capturize it.
16:14 jnthn So I've got somewhere to pull the named arguments from.
16:14 pmichaud can't just pull the named arguments from the hash directly?
16:14 jnthn Well sure, if I am going to teach the binder to know to do that.
16:14 pmichaud I mean, Hash tends to support a .hash interface :-)
16:14 jnthn You're missing my point.
16:14 pmichaud Agreed.
16:14 jnthn Do I bake the logic to handle these things into the signature binder?
16:15 pmichaud oh.  I think "yes".
16:15 pmichaud Because I think of it as "binding", not just "signature binding"
16:15 TimToady hmm
16:15 pmichaud (perhaps that's inaccurate/naive, but that's my current mental model)
16:15 jnthn pmichaud: You see, I'm a tad uncomfortable doing that.
16:15 quuxx masak blogged "I'm in for an interesting month": http://use.perl.org/~masak/journal/39817?from=rss
16:16 masak quuxx: lolyounoticed!
16:16 TimToady if that's the primitive, then .Capture would have to be written my (|$cap) := self
16:16 TimToady seems a bit inside out
16:16 jnthn I mean, essentially baking a bunch of coercions into the binder feels odd.
16:17 pmichaud I tend to not think of the binder as doing coercions, but I see your point (and the self-contradiction)
16:17 pmichaud what I do know is that every time I try to figure out the meaning of the ":=" operator, it ends up looking a lot like a signature bind.
16:18 jnthn Basically, I see two directions.
16:19 jnthn 1) The binder looks at something it's got to bind against a signature and has a set of rules built in to it to know what to do. (e.g., it's is a Capture, use it, or this does Associative so use this to obtain nameds, etc)
16:20 jnthn 2) The binder says "Ok, is this thing a Capture already? if not, do XXX to the thing I have to coerce it to a Capture"
16:20 jnthn I'd been under the impression that direction 2 was more the Right Way.
16:20 pmichaud I think that "coerce to a Capture" depends on context.
16:20 pmichaud i.e., I can't decide if something goes in as named or position arguments until I know what I'm binding to
16:21 pmichaud either that or there has to be something that explicitly capturizes things before sending them to the binder
16:21 TimToady I think you're getting confused between the supercapture and the subcaptures (if any)
16:21 pmichaud very likely.
16:21 pmichaud anyway, I'm low-blood-sugar, so I'll get lunch, let you two work it out, and find out the result :)
16:22 jnthn In sub foo($n, [$head, *@tail]) { ... }
16:22 ejs joined #perl6
16:22 jnthn foo(42, @thingies)
16:22 jnthn Then the binder initially has the capture we got from the parcel (42, @thingies) to operate on. All well and good.
16:22 jnthn But then it sees it has a sub-signature, or nested signature, or whatever you like to call it.
16:22 TimToady that's the supercapture
16:23 TimToady there are no subcaptures (yet)
16:23 jnthn It needs to take @tail, which it got out of the supercapture, and bind it against the nested signature.
16:23 moritz_ .oO( too many positional arguments: 3 passed, 3 expected )
16:23 moritz_ what an awesome error message :)
16:23 TimToady jnthn: I think you meant @thingies
16:24 cdarroch joined #perl6
16:24 jnthn TimToady: Yes, sorry, I did.
16:24 TimToady at that binding point, it needs to turn @thingies into a capture
16:24 jnthn Right!
16:24 jnthn That's what I've been trying to argue. :-)
16:24 pmichaud question:
16:24 jnthn So what's the mechanism by which @thengies gets turned into a capture? :-)
16:24 pmichaud what if it was called as  foo(42, $thingies)
16:25 pmichaud and $thingies is an Array
16:25 TimToady whether that is done inside of "binding" outside is immaterial, except to the implementors )
16:25 TimToady *or outside
16:25 pmichaud would having $thingies  change the bind ?
16:25 jnthn TimToady: It's material in the sense of, should we be providing people a way to specify how their type coerces to a Capture?
16:25 TimToady no, in either case the second arg is not *, so in item context
16:26 jnthn pmichaud: There may be an argument that [...] implies a type check for Positional.
16:26 pmichaud jnthn: in my case, $thingies does Positional, yes.
16:26 pmichaud because $thingies is an Array.
16:26 jnthn pmichaud: OK, then I don't think it matters.
16:26 pmichaud my question is whether it still unpacks
16:26 pmichaud I'm hearing "yes"
16:26 jnthn I belive so.
16:26 TimToady unpacks?
16:26 TimToady what does that mean?
16:27 pmichaud i.e., if my $thingies = [1,2,3,4]
16:27 pmichaud and we do foo(42, $thingies)
16:27 pmichaud is $head an Array, or is it 1 ?
16:27 TimToady it's 1
16:27 pmichaud okay.
16:27 TimToady there is *no* difference between $thingies and @thingies, because they're both items
16:27 pmichaud understood.
16:27 TimToady the @ only makes a difference if bound to *
16:28 * [particle] goes karmic
16:28 pmichaud and that's what you meant by *... right
16:28 pmichaud thanks.
16:28 pmichaud afk, lunch
16:28 pmichaud (for real this time)
16:28 jnthn pmichaud: yeah right
16:28 TimToady because it has the "flatten me baby" marker
16:28 jnthn ;-)
16:28 TimToady but item ignores it
16:29 jnthn TimToady: OK, so we seem to agree @thingies needs to be turned into a Capture.
16:29 japhb I read that as the "flatten my baby" marker ... and wondered exactly when Perl 6 got the Halloween spirit.
16:29 TimToady more precisely, the second positional item, whever it is
16:29 TimToady *whatever
16:29 jnthn Right.
16:29 jnthn So my question is, how is that done?
16:30 TimToady I don't see why .Capture can't do it, though it might want inlining for performance
16:31 jnthn Sure, I'm wanting to get us semantically right before making us OMG FAST
16:31 jnthn :-)
16:31 jnthn OK, so supposing this, I have just one more question before I go and write code. ;-)
16:31 TimToady but if we have a proto, and we enforce [] subsigs as part of that, then we could do capturizing at compile time
16:31 jnthn True. Again, optimization, but there'll be ways to make it faster.
16:32 jnthn sub traverse ( BinTree $top ( $left, $right ) ) {
16:32 jnthn }
16:32 jnthn In this example, I have some type BinTree. I'm supposing left and right are attribute names?
16:32 jnthn Further, I'm assuming they must be public attributes?
16:32 TimToady or a hash with those keys
16:33 jnthn e.g. class BinTree { has $.left; has $.right; }
16:33 jnthn OK.
16:33 TimToady we can probably handle either
16:33 jnthn Yes, I figure me can.
16:33 jnthn Essentially I was seeing this as building a capture with left and right as named paramters.
16:33 jnthn Thing is, what if we have a bunch of other attributes?
16:34 TimToady that sig is more or less (|$top, :$left, :$right)
16:34 jnthn *nod*
16:34 jnthn But we had to turn BinTree into a Capture.
16:34 TimToady though | ... yes
16:35 jnthn Suppose we had something with like 10 attributes, and we only really wanted to pull out 2 of them.
16:35 jnthn Building a capture out of them only to consume two feels slightly wasteful.
16:35 TimToady but | just makes it raw bind to original BinTree
16:35 TimToady the Capture is a temporary
16:35 TimToady maybe
16:35 TimToady anyway, can probably optimize it out somehow
16:36 jnthn I mean, as a first cut I can do it that way. In the end, we may want something capture-ish that actual proxies.
16:36 jnthn So only obtains the thingies we need.
16:36 TimToady Capture as a role, perhaps
16:36 jnthn Yeah.
16:36 jnthn Anyway, at this point I'm guessing best is I go away and implement something along these lines.
16:37 jnthn And then we see how it works and iterate on it.
16:37 TimToady sounds like we're in the ballpark
16:37 masak should &open die in Perl 6 if it fails?
16:37 jnthn OK, great. Thanks. :-)
16:37 jnthn masak: only under "use fatal"
16:37 TimToady which fights against the homerun metaphor, I guess
16:37 jnthn :-)
16:37 TimToady masak: or if you use the failure value
16:38 jnthn *nod*
16:38 Chillance joined #perl6
16:41 TimToady and void context counts as "using"  :)
16:42 TimToady (void context is also eager, interestingly, or for loops wouldn't run to completion)
16:42 moritz_ void context needs spec
16:43 moritz_ or did I just miss it?
16:43 TimToady the eager part is specced
16:43 moritz_ but not how it's determined, iirc
16:44 Tene pmichaud: will nqp-rx be able to use the STD.pm grammar?
16:44 jnthn Tene: Not directly, but something way closer to it than we have now.
16:45 pyrimidine joined #perl6
16:45 TimToady writing an nqp-rx emitter for viv might be fairly easy
16:46 TimToady it would still have to emulate laziness like gimme5 does, alas
16:46 lichtkind joined #perl6
16:46 TimToady well, maybe not for the regexes :)
16:50 mj41 joined #perl6
16:56 desertm4x joined #perl6
17:01 diakopter I wonder how big the nqp-rx version of STD.pm would be
17:02 TimToady depends on how easy/hard it is to interweave the fate structure with nqp-rx
17:02 TimToady at worst, it would expand out to the same size-ish
17:03 TimToady slightly better insofar as we use . instead of -> everywhere :)
17:03 TimToady but slightly worse insofar as nqp is less expressive than Perl 5 (debatable)
17:04 TimToady we can probably more aggressively combine tests into PATTERN checks
17:05 TimToady but until nqp does LTM/fates, it won't shrink a lot, I'd guess
17:11 jnthn whee. It works. \o/
17:11 TimToady \o/  # what works?
17:12 jnthn sub foo($n, [$head, *@tail]) { say $n; say $head; say @tail.perl; }
17:12 jnthn my @x = 1,2,3,4; foo(42, @x)
17:12 jnthn Gives output
17:12 jnthn 42
17:12 jnthn 1
17:12 jnthn [2, 3, 4]
17:12 moritz_ w\oo/t
17:12 TimToady yeaye
17:12 jnthn When I first saw that in the spec I was like "way cool, can't wait until somebody implements that" :-)
17:13 astrojp left #perl6
17:13 TimToady well, somebody did :)
17:13 jnthn Yeah, I kinda didn't see me being the who at that point. ;-)
17:13 lichtkind TimToady: are there any plans to put Cwd, File::Spec and so on into a well defines path::tools module?
17:14 astrojp joined #perl6
17:15 TimToady we would like Perl 6 to be useful, if that's what you're asking :)
17:15 moritz_ I think nobody would object to that notion if somebody came up with such a thing
17:15 moritz_ but that's very non-trivial
17:15 TopoMorto joined #perl6
17:16 moritz_ and all attempts so far where either either over-engineered or did not work :/
17:16 TimToady the question of what "well defined" means is, of course, subject to a great deal of p6l negotiation
17:16 stephenlb joined #perl6
17:17 TimToady there are many dimensions to the problem, and many different opinions about what should be easy, or merely possible
17:18 moritz_ "if somebody shoots a silver bullet news at us, we'll catch it"
17:18 TimToady I can tell you that I don't want p{} for a path literal, though qp{} would be okay
17:19 ejs joined #perl6
17:19 TimToady I don't think Perl should be in the business of grabbing all the single-letter keywords... :/
17:20 TimToady Q, q, and s are bad enough
17:20 moritz_ m
17:20 TimToady that too :)
17:20 TimToady but we've abandoned y
17:20 moritz_ at least one ;-)
17:21 ruoso joined #perl6
17:21 TimToady anyhoo, not terribly interested in grabbing p
17:22 cj TimToady: my 2 year old is
17:22 TimToady is it blue?
17:22 lichtkind TimToady: by first question is if id there an basic agreement toward less modules in this realm :)
17:22 colomon joined #perl6
17:23 pmichaud Tene: nqp-rx somewhat expects to influence the STD.pm grammar, as opposed to "run it directly"
17:23 cj TimToady: not so far...
17:23 moritz_ lichtkind: it's hard to haev a general agreement on something that doesn't exist yet
17:24 pmichaud Tene:  the general approach at this point is for nqp-rx and rakudo to use something that is a lot closer to STD.pm as it exists today
17:24 lichtkind moritz_: i have tuits to make an API proposal but would like to see in which direction the agreement goes
17:24 TimToady there is agreement on the need for better design, but to some people that means more namespaces rather than less, somehow
17:24 pmichaud then we'll see about getting the two to converge
17:26 TimToady anyway, ack out all the spec references to 'path' to see the current mess
17:26 TimToady and bear in mind that p will die
17:26 pmichaud there's too many p's floating around anyway
17:27 TimToady and it's hard enough to mind your q's without having to mind your p's and q's
17:27 TimToady besides p vs q will drive the dyslexics nuts
17:27 pmichaud qrobably so.
17:28 TimToady no puodt it will
17:29 pmichaud (nqp-rx and fate structure)  -- nqp-rx as it is set up now will likely be able to handle fate quite well.  What it lacks at the moment is a good DFA for fast prefix matching.
17:29 pmichaud (or something else that can handle fast prefix matching)
17:29 TimToady yes, well, you could just borrow mine...oh wait...that's the part I cheated on...
17:30 pmichaud :-)
17:30 pmichaud anyway, that comes quite a bit later in the process.  First step is to get Rakudo on the new grammar, and handling constants correctly, and correctly working with captures, and ...
17:30 TimToady are we both subconsciously waiting for the other person to do it?  :)
17:30 jnthn Don't forget the parcels too :-)
17:31 pmichaud TimToady: I'm not particularly waiting for you to do it :)
17:31 mariuz joined #perl6
17:31 TimToady not consciously :)
17:31 pmichaud I'm not rushing to do it myself, but I do expect I'll end up writing one before all is said and done
17:32 pmichaud I just want to get other stuff out of the way first, and I don't yet see it as being critical path for Rakudo Star
17:32 pmichaud as long as we can chea.... er, make a close enough approximation, I think we'll be fine for a while.
17:33 ejs joined #perl6
17:33 mariuz joined #perl6
17:33 pmichaud besides, I'm progressively removing lots of cheats out of nqp-rx as we go :)
17:33 TimToady I think I might need to think about merely to figure out how to get derived grammars to share nodes with parent grammars to the extent possible, so as not to blow out memory on gazillions of macros
17:34 TimToady but that implies splitting my token strings up into nodes
17:34 TimToady which is halfway to real DFA
17:34 pmichaud oh, I have another question.  So far in nqp-rx I haven't had a need for many "stopper" rules.  Are they in STD.pm primarily for pruning/optimization, or are they really needed?
17:34 pmichaud or are they needed for things that I'm not encountering yet (e.g., metaops)
17:35 hanekomu joined #perl6
17:35 pmichaud or perhaps to limit runaways
17:35 pmichaud or all of the above :)
17:35 TimToady they're more about getting good error messages, for specific stoppers
17:35 pmichaud okay
17:36 pmichaud I'll undoubtedly be adding them.  I like STD.pm's error messaging framework a lot
17:36 TimToady and the general terminators are just to avoid deriving a new grammar every time we nest in different brackets and such
17:36 jnthn pmichaud: Can we has pretty colors too? ;-)
17:36 pmichaud jnthn: I suppose we could.
17:37 pmichaud just need to rewrite the panic method.  Since we can now put methods into grammars, that's pretty easy to do.
17:37 TimToady std: colors are good
17:37 p6eval std 28950: OUTPUT«Undeclared routines:␤  are used at line 1␤       colors used at line 1␤    good used at line 1␤ok 00:01 105m␤»
17:37 TimToady std: @colors are good
17:37 pmichaud it's official, "good" is undeclared.
17:37 p6eval std 28950: OUTPUT«[31m===[0mSORRY![31m===[0m␤Two terms in a row at /tmp/beSIdvkOHW line 1:␤------> [32m@colors [33m⏏[31mare good[0m␤    expecting any of:␤       bracketed infix␤  infix stopper␤    standard stopper␤ statement modifier loop␤  terminator␤Other potential difficulties:␤
17:37 p6eval ..Variable @colors is…
17:38 pmichaud okay, I need to do less chatting and more coding.
17:38 * pmichaud hides window.
17:54 TimToady hugme where are you?
17:54 * moritz_ goes searching
17:55 hugme joined #perl6
17:56 jnthn Man we have a lot of bots.
17:57 jnthn hugme is my favorite though :-)
17:57 jnthn hugme: hug me
17:57 * hugme hugs jnthn
17:57 jnthn \o/
17:58 Juerd Why those +v's?
17:58 moritz_ typical mark for bots
17:58 Juerd I see
18:03 Chillance joined #perl6
18:03 pyrimidine joined #perl6
18:06 pmichaud joined #perl6
18:15 jnthn I've wanted to be able to do this one for ages: http://gist.github.com/221659
18:17 moritz_ how sick.
18:17 moritz_ but it's cool ;-)
18:19 pmichaud http://gist.github.com/221659   # we now handle :my declarations and contextuals in regexes
18:19 pmichaud oops
18:19 pmichaud wrong
18:19 pmichaud http://gist.github.com/221666
18:19 pmichaud ( I got distracted by jnthn++'s shiny)
18:20 TimToady heh
18:20 jnthn pmichaud++ has a shiny too :-D
18:20 TimToady a dollar short and a day late
18:20 TimToady /me, not pmichaud++
18:21 TimToady amazing how well pmichaud can type in a window that's hidden, too!!
18:21 cognominal jnthn, I guess I have to read (and understand the backlog) but I ask anyway: why the square brackets are necessary in the quicksort signature?
18:21 jnthn cognominal: You're passing one array.
18:21 jnthn cognominal: And then unpacking it.
18:21 pmichaud what's scary is that adding contextuals to regexes was... 12 lines of code.
18:22 jnthn wow
18:22 TimToady that many?  tsk, tsk...
18:22 pmichaud I counted blank lines.
18:22 moritz_ you should clearly get a more expressive programming language.
18:22 pmichaud see the commit for yourselves :-)
18:22 pmichaud (when dalek pops it up here)
18:22 cognominal jnthn, thx, got it.
18:23 diakopter flood death?
18:23 Tene joined #perl6
18:23 TimToady alias bots
18:24 TimToady okay, 12 bots currently, same as my alias
18:25 TimToady are any of the rest of you bots?
18:25 dalek nqp-rx: 7c48517 | pmichaud++ | src/NQP/ (2 files):
18:25 dalek nqp-rx: [nqp]:  Enable :my declarations in regexes.
18:25 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/7c485174ec3ec8196d4545073e3e3a690b14b598
18:25 * diakopter wonders sometimes
18:25 jnthn BTW, patch for unpacking coming once spectests finish.
18:26 fax joined #perl6
18:26 xenoterracide joined #perl6
18:28 jnthn pmichaud: So, does this mean tomorrow we start doing the Rakudo grammar from this? :-)
18:28 * jnthn is has a Rakudo Day.
18:30 moritz_ is it installable?
18:31 jnthn Also, will be have to check out and build nqp-rx as well as Parrot? :-)
18:31 __ash__ anyone gotten perl6_ops.c:30:31: error: pmc_callsignature.h: No such file or directory when they try to build rakudo's most recent git commit?
18:31 pmichaud jnthn: I think we can start tomorrow, yes.
18:32 pmichaud we'll see how things go for the rest of the evening, but it's looking very good.
18:32 pmichaud I think I have another shiny coming up...
18:33 moritz_ __ash__: is 'git status' clean? did you realclean before re-configuring?
18:33 jnthn __ash__: Suspect your Parrot install is too old.
18:33 jnthn pmichaud: Excellent.
18:35 __ash__ moritz_&jnthn: i did a make realclean before re-configuring and my status is empty, i am re-building parrot to be sure at the revision in build/PARROT_REVISION
18:36 jnthn __ash__: That file was not on Parrot's installed headers list, so I had to add it a couple of days ago.
18:36 jnthn Maybe yesterday even
18:36 jnthn I dunno...I don't remember when I did things. :-)
18:37 [particle] that's what logs are for
18:37 __ash__ should i be using parrots trunk's latest revision or the one in PARROT_REVISION?
18:40 Tene the one in PARROT_REVISION is more-likely to work.
18:40 Tene that's what the rakudo folks recommend.
18:40 __ash__ hmm
18:40 __ash__ weird
18:41 __ash__ i did parrot make install, and it didn't install that .h file
18:43 jnthn Odd. :-/
18:43 moritz_ maybe PARROT_REVISION lags behind?
18:43 pmichaud perhaps the .h isn't in the list of installed files
18:44 pmichaud not all of them are.
18:44 jnthn pmichaud: I added it to that list.
18:44 __ash__ where is that list? just cirous
18:44 __ash__ curious*
18:44 jnthn Moment though...
18:44 pmichaud http://gist.github.com/221691   # another shiny feature
18:45 moritz_ wooot
18:45 moritz_ pmichaud++
18:45 dalek rakudo: 4320479 | jonathan++ |  (10 files):
18:45 dalek rakudo: First cut of implementing unpacking of arguments with nested signatures. Supports arrays, hashes and objects.
18:45 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/4320479f9e8139112a5054079b29cc44e8610c5a
18:46 pmichaud TimToady: do you see { ... } closures within regexes as enforcing a new scope, or simply sharing the same scope as the regex block itself?  (I've implemented it as a new scope for consistency with other uses of {...} )
18:46 jnthn Yeah. I put it in at https://trac.parrot.org/parrot/changeset/42134
18:46 jnthn PARROT_REVISION has 42158
18:47 jnthn pmichaud++ # nice!!
18:47 __ash__ hmm, did they change the thing you need to use to install the devel stuff?
18:47 __ash__ i'll ask in the parrot channel
18:47 pmichaud __ash__: it was "make install-dev", now either "make install" or "make install-dev" should work.
18:48 jnthn pmichaud: I guess we'll be able to parse Perl 6 rather than NQP in there for Rakudo too?
18:48 jnthn pmichaud: Or will that be trickier?
18:50 pmichaud no difference
18:50 pmichaud it's parameterized on the outer language
18:50 jnthn Nice!
18:50 jnthn :-D
18:50 * jnthn is very impressed
18:50 pmichaud what TimToady refers to as "language braids"  :-)
18:50 moritz_ oh wow
18:51 pmichaud so if someone wants their regexes to have PHP code, it can be done.
18:51 jnthn Ooh.
18:51 moritz_ .oO( is that a reason not to have that feature? ;-) )
18:52 pmichaud s/PHP/DSL/  # better?
18:52 jnthn s/PHP/LOLCODE/ # funnier :-)
18:52 pmichaud oooh!  ooh!
18:52 pmichaud I *gotta* do that.
18:52 * jnthn will remember to post his Lolsql -> sql translator tonight too :-)
18:52 pmichaud guess which language besides Rakudo is going to be (re)implemented first using the new tools
18:53 jnthn LOL!
18:53 pmichaud good guess!
18:53 __ash__ doh, i was at the right revision of parrot, but i was in a tag/RELEASE_1_7_0 thats why i wasn't getting any of the parrot changes
18:53 jnthn __ash__: That explains it. :-)
18:54 jnthn pmichaud: Does this mean we'll be able to easily intersperse LOLCODE and Perl 6? :-)
18:54 jnthn my $x = 42; Q:LOLCODE { VIZIBLE $x }
18:55 pmichaud "There will be modules.
18:55 pmichaud "
18:55 jnthn \o/
18:56 am0c joined #perl6
18:58 cj pmichaud: I met pmichaud but not-you the other day. ;)
19:02 ejs joined #perl6
19:03 ejs left #perl6
19:07 Tene jnthn: lolcode variables aren't named like that.  You'll need some pretty fance language braiding features to get one language to use the identifier rules of what it's embedded in.
19:08 Tene jnthn: more likely, make a closure in lolcode and invoke it with $x
19:08 Tene jnthn: I've been planning to add Q:lang modules for a long time.
19:10 jnthn Tene: Yes, true... :-)
19:11 Tene jnthn: I could imagine a lolcode module for rakudo that derives a modified lolcode grammar, though.
19:15 jnthn LOL6!
19:17 pnu_ joined #perl6
19:20 * japhb fears reading the spec for that
19:32 ejs joined #perl6
19:40 SmokeMachine joined #perl6
19:49 * colomon sorts through backlog, and is excited at masak's new mystery project, and delighted by quicksort.
19:53 [particle] the Exporter pmc can be subclassed to deal with variable naming between namespaces/languages
19:53 moritz_ if it's not there already, somebody could make a test case out of the quicksort example
19:54 xenoterracide joined #perl6
19:55 jnthn moritz_: I was gonna look a bit at test coverage yeah.
19:55 jnthn Of course, to really know how good it is we need to set masak++ on it. ;-)
19:55 moritz_ S06-signature/unpack-array.t
19:55 moritz_ S06-signature/tree-node-parameters.t
19:56 jnthn Thanks
19:56 jnthn Feel free to fudge, or I can later.
19:57 moritz_ phone&
19:59 japhb Is there a link for the quicksort example?
20:00 xenoterracide joined #perl6
20:01 japhb Not in my backlog, guess I'll try perlgeek
20:02 jnthn japhb: http://gist.github.com/221659
20:03 japhb Ah!, excellent, thank you
20:04 japhb Man, other languages have to cry when they see that sort of simplicity.
20:04 japhb Of course, median-of-three pivot would probably be a good deal uglier.
20:04 brunov joined #perl6
20:04 jnthn heh
20:05 jnthn Yes, my quicksort is a tad vulnerable. :-)
20:09 pugs_svn r28951 | pmichaud++ | [pm.txt]:
20:09 pugs_svn r28951 | Pm-8: Are closures embedded in regexes creating a new lexical scope,
20:09 pugs_svn r28951 |     or do they share the same scope as the regex block itself?
20:09 pugs_svn r28951 |     (Currently I'm assuming they create a new scope, to be consistent
20:09 pugs_svn r28951 |     with other uses of curlies. --Pm
20:10 pyrimidine left #perl6
20:12 dalek book: d7fbc55 | moritz++ |  (2 files):
20:12 dalek book: example for chapter 1
20:12 dalek book: Also run pdflatex twice, we'll need that as soon as we have some
20:12 dalek book: back-and-forth reference, and it's already warning
20:12 dalek book: review: http://github.com/perl6/book/commit/d7fbc552897db1b0892557de50e2f9067db433bb
20:12 dduncan joined #perl6
20:22 pugs_svn r28952 | lwall++ | s/action/actions/ as suggested by pmichaud++
20:23 pugs_svn r28953 | lwall++ | [S02] closure in string makes lexical scope
20:23 pugs_svn r28953 | [S05] closure in regex makes lexical scope
20:25 TimToady japhb: S06:880 might help with your median-of-three, if we allow [*@front, *$mid, *@back]
20:26 jnthn TimToady: heh, what?
20:26 jnthn How would it decide where to split?
20:26 TimToady 'course, that doesn't guarantee median, really
20:26 jnthn Yes, and if the list is lazy... ;-)
20:26 TimToady just "somewhere"
20:26 * japhb looking
20:26 TimToady it's just a conjecture
20:26 jnthn Phew. :-)
20:27 TimToady but one resulting from reading Guy Steele's slides on folds considered slightly harmful
20:27 samlh joined #perl6
20:27 jnthn Linky?
20:27 japhb Wow.  Um.  That's powerful.  In the "loaded gun initially pointed at foot" way.
20:28 japhb But boy howdy would that be nice for some algorithms.
20:28 pmichaud http://gist.github.com/221783  # more shiny stuff
20:29 TimToady http://research.sun.com/projects/plrg/Publications/ICFPAugust2009Steele.pdf
20:29 Su-Shee left #perl6
20:29 japhb [$head, *@front, $mid, *@back, $tail] to get the three possible choices for median-of-three pivot?
20:29 TimToady it's sorta baking mapreduce into the language
20:31 moritz_ we all have to cover our eyes to avert harm through increased shinyness
20:31 japhb very nice, pmichaud
20:32 jnthn pmichaud++ # single-handedly tripling sunglasses sales as a result of massive increase in shininess
20:32 japhb heh
20:33 TimToady pmichaud: does it work with Bengali digits?  :)
20:34 TimToady (I'll wager it matches, but .Num doesn't work)
20:35 moritz_ rakudo: say +'৩৪'
20:35 p6eval rakudo 432047: OUTPUT«0␤»
20:36 moritz_ rakudo: say '৩৪'
20:36 p6eval rakudo 432047: OUTPUT«৩৪␤»
20:36 moritz_ rakudo: say '৩৪' ~~ /^\d+$/
20:36 p6eval rakudo 432047: OUTPUT«৩৪␤»
20:36 moritz_ TimToady is spot-on
20:36 jnthn But how hard can it be? I mean come on, there's a unicode file with the data in it!!
20:40 japhb How do you get the Code for a particular multi variant, given name and signature?
20:40 japhb I want to delegate from one multi to another, less specific one.
20:41 japhb I guess just being able to re-run the multi dispatch with the current function not included would solve this particular use case (though my larger question still stands)
20:41 [particle] pmichaud: will that work with chaining? e.g. <?{0 <= +$<num> <= 255 }>
20:42 pmichaud bengali digits:
20:42 pnu joined #perl6
20:42 pmichaud $ cat x
20:42 pmichaud grammar ABC {
20:42 pmichaud token TOP { $<num>=[\d+] <?{ +$<num> <= 255 }> }
20:42 pmichaud }
20:42 pmichaud say( ABC.parse("৩৪") );
20:42 pmichaud $ ./nqp x
20:42 pmichaud ৩৪
20:42 pmichaud [particle]: nqp doesn't implement chaining yet
20:42 jnthn japhb: I think it looks something like &foo:(Int, Str) or so but it may not promise one candidate.
20:42 pmichaud (might not ever)
20:42 pmichaud (the bengali digit match is less impressive than it first looks, because it numifies to 0)
20:42 japhb jnthn, but even having that might do the trick.
20:44 japhb jnthn, so could you do: &quicksort:([$, @]) to get the main multi in your quicksort example?
20:44 jnthn japhb: eww
20:44 jnthn Not that I know of.
20:45 M_o_C joined #perl6
20:45 jnthn japhb: If you wanna do crazy stuff like that, just iterate over the .candidates and itnrospect their sigs.
20:45 jnthn *introspect
20:45 M_o_C joined #perl6
20:47 japhb jnthn, here's what I'm playing at: http://gist.github.com/221787
20:47 japhb typo fixed
20:48 jnthn Hmm...I suspect those might be ambiguous candidates in the first place.
20:49 jnthn Why not write the second as just
20:49 moritz_ just name it differently
20:49 jnthn multi quicksort($pivot, @rest) {
20:49 jnthn And it'll dispatch by being arity 2.
20:49 japhb jnthn, but it would still split the initial list if the @rest was slurpified ...
20:49 japhb hmmm
20:50 jnthn oh, I see
20:51 jnthn you only want to do it on the first time?
20:52 japhb No, every split, until there are <3 left.  But I want to reuse the implementation the non-median-of-three quicksort to implement the divide and conquer after I've determined the correct pivot.
20:53 japhb Basically, trying to see if there was a way not to write the body of the original non-MOT quicksort twice
20:54 japhb Because technically MOT quicksort is the same as: find MOT, move MOT to front, perform pivot-on-first quicksort
20:55 jnthn ah, hmm
20:56 jnthn But doesn't computing the MOT give you your pivot?
20:56 jnthn oh, but you need at lesat 3 elements the last time...
20:56 japhb right, so we still need to handle the 0,1,2 element cases
20:57 japhb I guess I could handle them explicitly ...
20:58 japhb *editeditedit*
20:58 dalek nqp-rx: 88ab936 | pmichaud++ | src/ (6 files):
20:58 dalek nqp-rx: [nqp]:  Add code assertions to nqp.
20:58 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/88ab9369c69b02d94a350ccf9828a0bf43050e67
21:00 japhb jnthn, well, I guess that's a little better
21:01 japhb Still feels like extra work
21:01 jnthn Yeah, hmm.
21:08 japhb Can you have both a packed and unpacked form?  As in 'multi quicksort(@list([$head, *@tail]))' or somesuch?
21:08 japhb Er, I meant, can you name both the packed and unpacked form?
21:11 jnthn japhb: Not yet in Rakudo, but the spec seems to allow for that. STD may too.
21:11 jnthn japhb: The actual binder guts already know how to handle it too.
21:12 jnthn We just ain't parsing it yet (if STD does it, should fall out naturally in the new grammar.)
21:12 japhb What is the correct syntax?
21:13 pmurias joined #perl6
21:17 xenoterracide joined #perl6
21:18 nnunley joined #perl6
21:20 b_jonas joined #perl6
21:21 jnthn std: sub traverse ( BinTree $top ( $left, $right ) ) {
21:21 jnthn std: sub traverse ( BinTree $top ( $left, $right ) ) { }
21:21 p6eval std 28953: OUTPUT«[31m===[0mSORRY![31m===[0m␤Invalid typename BinTree at /tmp/IyyeBbV38C line 1:␤------> [32msub traverse ( BinTree[33m⏏[31m $top ( $left, $right ) ) {[0m␤FAILED 00:02 110m␤»
21:21 p6eval std 28953: OUTPUT«[31m===[0mSORRY![31m===[0m␤Invalid typename BinTree at /tmp/E7lF7ezKCB line 1:␤------> [32msub traverse ( BinTree[33m⏏[31m $top ( $left, $right ) ) { }[0m␤FAILED 00:01 107m␤»
21:21 jnthn std: class BinTree { }; sub traverse ( BinTree $top ( $left, $right ) ) { }
21:21 p6eval std 28953: OUTPUT«ok 00:01 110m␤»
21:21 jnthn japhb: That is spec'd, so I wonder if it's just...
21:22 jnthn std: class BinTree { }; sub traverse ( @orig [ $head, *@tail ] ) { }
21:22 p6eval std 28953: OUTPUT«ok 00:03 107m␤»
21:22 jnthn Yup
21:22 jnthn oh, ignore class decl at the start.
21:22 jnthn Anyway, I hope to copy-paste STD's signature parsing as far as possible into the new grammar.
21:23 astrojp joined #perl6
21:23 pmichaud should be possible to go far
21:24 jnthn pmichaud: Yeah, I think so do, especially given the stuff you've been putting in of late.
21:24 quietfanatic joined #perl6
21:24 jnthn *too
21:26 b_jonas is how $*ARGFILES (the magical variable that replaces *ARGV{IO}) documented in S yet?
21:26 b_jonas um, verb missing. works.
21:28 dalek nqp-rx: 719cd0e | pmichaud++ | t/nqp/34-rxcodeblock.t:
21:28 dalek nqp-rx: Add tests for rx codeblocks.
21:28 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/719cd0eeac8f53cda32204450f4226bfb7759877
21:28 quietfanatic It probably works just like Perl 5's <>
21:29 quietfanatic in that it concatenates the files given by arguments, or stdin if there are none
21:29 quietfanatic I'm not certain though
21:30 b_jonas yeah, I'm more interested in the details.
21:32 quietfanatic As far as I can tell, it's not specced in detail yet.  Too many things in the spec still rely on knowledge of Perl 5.
21:41 japhb jnthn, does the latest version of http://gist.github.com/221787 look like it would work?
21:45 moritz_ pmurias: I'm writing a Tidings post for my blog right now... is there anything from smop or mildew that I should report? (from the last 2 months)
21:46 jnthn japhb: heh multi quicksort(@a [$a?]) { @a } is cute :-)
21:46 jnthn japhb: Probably ;-)
21:46 tak11 joined #perl6
21:47 moritz_ the perlmmonks are discussing a nice idea right now
21:47 jnthn japhb: It hinges on the [$head, *@front, $mid, *@back, $tail] big being made to work out.
21:47 jnthn *bit
21:47 moritz_ an ARGV function which is called automatically when the file changes over which <> (magic ARGV) iterates
21:48 moritz_ do we want such a thing in Perl 6?
21:49 pmurias moritz_: mildew-js is the new thing in mildew land, but things have slowed down recently as i haven't adjusted to uni fully yet
21:49 dduncan left #perl6
21:50 japhb jnthn, ah, cool, I'm glad (@a [$a?]) would work.  :-)
21:50 japhb And if only the double-slurpy is a problem, then I think I'm OK with what I have now.  Perhaps not perfect, but pretty decent.
21:50 japhb Any ideas from the peanut gallery on improving http://gist.github.com/221787 further?
21:51 jnthn japhb: Yeah, I'm quite happy that bit will work.
21:52 japhb afk for a bit, but will backlog
21:53 japhb thanks jnthn++, TimToady++
21:54 quietfanatic joined #perl6
21:55 jan joined #perl6
21:56 b_jonas moritz_: yes, that's why I've asked
21:56 b_jonas actually I'm not sure I want that feature,
21:56 b_jonas but what I would need is a sane bugless ARGV
21:56 moritz_ I'm pretty sure that Perl 6's ARGV is not magic
21:56 b_jonas 5.10 is better in that than 5.8
21:57 moritz_ at least not in the sense that it will execute rm -rf | as a pipe
21:57 nnunley joined #perl6
21:57 b_jonas moritz_: sure
21:57 * moritz_ kinda likes perl -pe 1 'fortune |'
21:57 b_jonas I just want those two long-standing bugs of 5.8 (and I think 5.6) fixed
21:58 moritz_ which two?
21:58 b_jonas but perl 6 should have a better exception system so there while(<>) should die on read errors anyway (or at least if you use the right pragma)
21:58 moritz_ right
21:58 b_jonas moritz_: firstly, readline on any filehandle (not just ARGV) sets $! to EBADF if the last line is incomplete
21:59 b_jonas in the next call when it returns undef that is
21:59 Juerd while (empty list) ? ;)
21:59 moritz_ std: while (<>) { }
22:00 p6eval std 28953: OUTPUT«[31m===[0mSORRY![31m===[0m␤Obsolete use of <>; in Perl 6 please use lines() or () instead at /tmp/ENx3MrgMWj line 1:␤------> [32mwhile (<[33m⏏[31m>) { }[0m␤FAILED 00:01 107m␤»
22:00 b_jonas secondly, ARGV also used to set the ferror indicator (ARGV->error) if the last line is incomplete
22:00 Juerd or ()?
22:00 b_jonas the two together means that there's no easy way to reliably detect read errors on ARGV
22:00 moritz_ Juerd: as empty list
22:00 Juerd Hm
22:00 b_jonas Juerd: I did ask whether $*ARGFILES was documented properly
22:00 b_jonas and it's not so I don't want to guess about the proper incantation
22:00 brunov joined #perl6
22:01 moritz_ b_jonas: but I'm sure abigail has scripts which rely on both bugs, so they can't be fixed in perl 5 *SCNR*
22:01 b_jonas moritz_: 5.10 broke three of my obfus. sure, they're not as great as abigail's, but I don't think even abigail's scripts should stop p5p in this case.
22:01 quuxx moritz blogged "Perl 6 Tidings from October 2009": http://perlgeek.de/blog-en/perl-6/tidings-2009-10.html
22:02 jnthn moritz++ # I like the tidings posts
22:02 moritz_ b_jonas: IMHO neither should anything have stopped p5p from making <> less dangerous
22:03 moritz_ jnthn: thanks
22:03 xabbu42 joined #perl6
22:04 moritz_ jnthn: though it feels kind of impossible to summarize two months of Perl 6 in less than an hour of writing
22:04 jnthn moritz_:
22:04 jnthn Mildew
22:04 jnthn emitter.
22:04 jnthn Mildew now has an experimental javascript emitter.
22:04 jnthn is that "emitter." line a fail?
22:05 moritz_ it is
22:06 brunov joined #perl6
22:06 tak11 joined #perl6
22:06 fax joined #perl6
22:06 hugme joined #perl6
22:06 cdarroch joined #perl6
22:06 Patterner joined #perl6
22:06 zaphar_ps joined #perl6
22:06 slavik joined #perl6
22:06 japhb joined #perl6
22:06 charsbar joined #perl6
22:06 arthur-_ joined #perl6
22:06 broquaint joined #perl6
22:06 szabgab joined #perl6
22:06 c9s joined #perl6
22:06 breinbaas joined #perl6
22:06 spinclad joined #perl6
22:06 pugs_svn joined #perl6
22:06 BinGOs joined #perl6
22:06 shachaf joined #perl6
22:06 sjohnson joined #perl6
22:06 Grrrr joined #perl6
22:06 cosimo joined #perl6
22:07 pmichaud joined #perl6
22:07 astrojp joined #perl6
22:07 pmurias joined #perl6
22:07 samlh joined #perl6
22:07 stephenlb joined #perl6
22:07 lichtkind joined #perl6
22:07 araujo joined #perl6
22:07 NorwayGeek_ joined #perl6
22:07 nihiliad joined #perl6
22:07 nothingmuch joined #perl6
22:07 silug joined #perl6
22:07 __ash__ joined #perl6
22:07 cj joined #perl6
22:07 rdice joined #perl6
22:07 [synth] joined #perl6
22:07 huf joined #perl6
22:07 [particle] joined #perl6
22:07 KatrinaTheLamia joined #perl6
22:07 Juerd joined #perl6
22:07 Schwern joined #perl6
22:07 nbrown joined #perl6
22:07 tylerni7 joined #perl6
22:07 mtve joined #perl6
22:07 dmpk2k joined #perl6
22:07 Infinoid joined #perl6
22:07 buu joined #perl6
22:07 clkao joined #perl6
22:07 Caelum joined #perl6
22:07 literal joined #perl6
22:07 jjore joined #perl6
22:07 REPLeffect_ joined #perl6
22:07 cottoo joined #perl6
22:07 simcop2387 joined #perl6
22:07 awwaiid joined #perl6
22:07 hcchien joined #perl6
22:07 solarion joined #perl6
22:07 Helios- joined #perl6
22:07 frew_ joined #perl6
22:07 cxreg joined #perl6
22:07 tkr joined #perl6
22:07 Eevee joined #perl6
22:07 arnsholt joined #perl6
22:07 akl joined #perl6
22:07 blaze-x joined #perl6
22:07 carlin joined #perl6
22:07 Bucciarati joined #perl6
22:07 Trinity94 joined #perl6
22:07 avuserow joined #perl6
22:07 estrai joined #perl6
22:07 allbery_b joined #perl6
22:07 andreasg_ joined #perl6
22:07 TimToady joined #perl6
22:07 diakopter joined #perl6
22:07 ezra joined #perl6
22:09 jnthn moritz_: Yes, you can't cover everything, but it's nice to have the salient points picked out.
22:09 colomon joined #perl6
22:09 moritz_ fixed.
22:10 moritz_ does quuxx follow the plantesix feed? or just individual feeds?
22:10 moritz_ quuxx: owner?
22:10 moritz_ quuxx: help
22:10 moritz_ quuxx: be silent!
22:10 moritz_ thanks for at least obeying one command ;-)
22:11 tak__ joined #perl6
22:11 __ash__ is there a list of the order of ops for casting? i mean by doing like "40" + 5, does that always try to make them both into a Num? or ...?
22:13 moritz_ by new spec it will probably coerce both to Numeric
22:13 patspam joined #perl6
22:14 Whiteknight joined #perl6
22:14 __ash__ so, its going to do a multi-method lookup on + for the given types of X and Y
22:14 jnthn Yes, all operators go by multi-dispatch.
22:14 justatheory joined #perl6
22:15 moritz_ there's an infix:<+>(Any, Any) which does the coercion
22:15 __ash__ kk, so... perl6 isn't weakly typed now
22:15 jnthn But you'll probably hit the :(Any,Any) variant.
22:16 moritz_ depends on what you mean by "weakly typed" really
22:16 jnthn Well, that or we're just very strong about our weakness. :-)
22:31 __ash__ didn't perl 5 do a type coercion when you did "40" + 5, perl6 isn't implicitly converting, its just dispatching to a method that explicitly converts
22:32 jnthn Well, the + operator only works on numerics anyway in Perl.
22:33 cognominal Perl is not Basic!
22:33 jnthn Well, until you do
22:33 jnthn rakudo: multi infix:<+>(Str $a, Str $b) { $a ~ $b }; say "40" + "5"; # ;-)
22:33 p6eval rakudo 432047: OUTPUT«405␤»
22:33 jnthn But don't do that. :-)
22:33 cognominal I am sure may will do...
22:34 cognominal *many
22:34 xenoterracide joined #perl6
22:34 ruoso joined #perl6
22:38 xenoterracide joined #perl6
22:38 astrojp joined #perl6
22:39 sjohnson howdy
22:39 jnthn hi sjohnson
22:46 sjohnson everyday i use javascript, i come to appreciate Perl 10x as much as the previous day
22:46 sjohnson </rant>
22:46 pmurias ruoso: hi
22:46 sjohnson or i should say, window.top.window.endRant();
22:46 ruoso hi pmurias
22:47 pmurias ruoso: can PurePrototypeHOW be p6opaque specific (in the js implementation)
22:47 pmurias ?
22:47 ruoso you mean by accessing p6opaque internally instead of using the REPR API?
22:48 pmurias yes
22:48 ruoso well, you certainly can, but try to make it clearly as a shortcut
22:49 ruoso so you can later implement the full version
22:50 nnunley joined #perl6
22:50 pmurias PurePrototypeHOW is only used for knowhow right?
22:50 ruoso at this point, yes
22:57 payload joined #perl6
23:01 pmurias_ joined #perl6
23:06 mrsaturns joined #perl6
23:06 mrsaturns good afternoon everyone
23:10 rdice joined #perl6
23:11 am0c rakudo: say '৩৪' ~~ /^.$/
23:11 p6eval rakudo 432047: OUTPUT«␤»
23:12 am0c rakudo: say '৩৪' ~~ /^.+$/
23:12 p6eval rakudo 432047: OUTPUT«৩৪␤»
23:34 pugs_svn r28954 | pmichaud++ | [pm.txt]:  Add Pm-9.
23:34 pugs_svn r28954 | Pm-9: Inside of a regex, what happens with C<< <[z..a]> >> ?  Is it
23:34 pugs_svn r28954 |     a compile-time error, an empty range, or ... ?
23:41 dalek nqp-rx: 063d6a1 | pmichaud++ | src/ (6 files):
23:41 dalek nqp-rx: Remove some files we're no longer using.
23:41 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/063d6a13b0e999fe65b19ee6f3b1e107f99a71c6
23:41 dalek nqp-rx: d49ead9 | pmichaud++ |  (4 files):
23:41 dalek nqp-rx: [p6regex]:  Add \xNN, \XNN, and \x[NN,NN,...] to p6regexes.
23:41 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/d49ead9cb9f8764c4aae6ada7a254679b105f430
23:41 dalek nqp-rx: c48afee | pmichaud++ | src/Regex/P6Regex/ (2 files):
23:41 dalek nqp-rx: [p6regex]:  Add \oNN, \ONN, and \o[nn,nn,...] escapes.
23:42 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/c48afeebd59549288a121b7da8fa79bfdecb83a0
23:44 kidd joined #perl6
23:45 sjohnson mrsaturns: hi
23:46 nnunley joined #perl6
23:47 quietfanatic pugs: macro term:<.> { '$_' }; for <a b c> {say . ~ 'x'}
23:47 p6eval pugs: OUTPUT«ax␤bx␤cx␤»
23:48 nihiliad joined #perl6
23:55 synth joined #perl6
23:59 frew joined #perl6

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

Perl 6 | Reference Documentation | Rakudo