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