»ö« | perl6-projects.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot: perl6: say 3;' | irclog: irc.pugscode.org/ | UTF-8 is our friend! Set by moritz_ on 27 June 2009. |
|||
al23 | How reduce should work? I thought it is just right fold by binary function, but it seems than n-ary is OK, isn't it? | 00:00 | |
TimToady | "maybe" | 00:01 | |
and a little later: I'm not in a mental state this morning yet to generate the alternatives | |||
jnthn | TimToady: That was in the context of representations. | 00:02 | |
*sigh* | |||
Well, whatever. | |||
I'll ask you in a week's time and hope you're thinking metaobject again. | |||
TimToady | :) | ||
well, in STD the declarand is available as a context var, so maybe it doesn't matter | 00:03 | ||
jnthn | Sure, but equally we'll need to spec how to implement a trait that you want to apply to a class/role/whatever. | 00:04 | |
TimToady | but if you call methods on the metaobject, you still have to know what to feed those methods as the first arg for the "real" object | 00:05 | |
00:05
synth joined
|
|||
TimToady | so you might as well start with the declarand, which is going to be the proto typeobject | 00:06 | |
jnthn | Hmm, yes | 00:08 | |
TimToady | biab & | ||
00:08
Whiteknight left
|
|||
jnthn | Though Rakudo's default metaclass kinda doesn't care what you pass there, since it keeps the info about the class in the metaclass, rather than in the proto-object. | 00:08 | |
ooh, it's 2am... | |||
jnthn -> sleep | |||
00:15
synth left
|
|||
wayland76 | pmichaud: ping? | 00:19 | |
pmichaud | wayland76: pong | 00:26 | |
00:34
kst left
|
|||
al23 | Anybody using n-ary reduce? | 00:35 | |
00:35
kst joined
|
|||
al23 | Maybe I just got out of the Perl habbits, but it looks quite useless for me when reduce takes missing values to be undef. | 00:37 | |
00:37
kst left
|
|||
wayland76 | pmichaud: I haven't had time to backlog yet, but just checking if you had a chance to look at the ins2 patch I sent :) | 00:38 | |
00:38
kst joined
|
|||
pmichaud | looked at it briefly. What's the purpose of including all of the setting.pm files in the install? | 00:38 | |
wayland76 | Well, is there another way that the setting files are going to get on the system after the build tree is deleted? | 00:39 | |
pmichaud | they're compiled into the .pbc | ||
00:39
kane_ left
|
|||
wayland76 | Ah, ok | 00:39 | |
In that case, they could probably be left out | 00:40 | ||
How long have they been compiled in? | |||
pmichaud | like, always :-) | ||
wayland76 | ok | ||
pmichaud | the stage 1 compiler gets used to compile the settings to .pir | ||
then we build a new compiler that has all of the settings already compiled in | 00:41 | ||
(and that's the perl6.pbc) | |||
it's entirely possible that someday we'll split the settings out into a separate .pbc file, but the odds that we'll ever read the sources at runtime are really really small | |||
wayland76 | I had a problem some time ago, and it seemed to be cured by doing this, but I now suspect that the real thing that fixed the problem was other changes to Rakudo that were made by other people during the same time :) | ||
Anyway, I'll get rid of them, and re-send the patch | 00:42 | ||
pmichaud | where does the DESTDIR variable get set? | ||
wayland76 | It means you can run "make install DESTDIR=whatever" | 00:43 | |
Which is needed for RPM building, and quite possibly other sorts of packaging | |||
pmichaud | hmmm. | 00:44 | |
wayland76 | It also means that you can install even as non-root | ||
pmichaud | But won't it also have the full parrot paths added as well? | ||
wayland76 | So if you have an account on the Unix box at your Uni, you can use perl6 even if the sysadmin hasn't installed it | ||
Well, yes | |||
pmichaud | i.e., if parrot has "/usr/local/parrot/...", then adding DESTDIR would result in "my/destdir/value/usr/local/parrot/..." ? | 00:45 | |
wayland76 | Yes | ||
pmichaud | that's considered "normal"? | ||
wayland76 | There may be better ways of doing it | ||
But everything should begin with DESTDIR | |||
00:45
misssingthepoint joined
|
|||
pmichaud | I'm used to there being a --prefix option to Configure that says where to install stuff. | 00:46 | |
wayland76 | Hmm. Well, we could do it that way too | ||
I nicked this from Parrot | |||
The general concept of being able to install as non-root in a particular folder is normal | |||
pmichaud | sure, I agree with that. | 00:47 | |
wayland76 | But the way it's implemented may not be | ||
pmichaud | But using a DESTDIR prefix that is simply prepended to directories isn't normal. | ||
(at least, not in my experience.) | |||
wayland76 | Well, also keep in mind... | ||
That when we build RPMs, if it says ~/src/rpm/BUILDROOT/usr/lib/parrot/1.4.0-devel/whatever ... | 00:48 | ||
Then the RPM software will put the file in /usr/lib/parrot/1.4.0-devel/whatever ... | |||
On the machine that Rakudo is installed on | |||
pmichaud | that seems reasonable-ish | ||
wayland76 | So that's why the DESTDIR makes sense for packaging | 00:49 | |
pmichaud | okay, time for dinner here | ||
(family is calling me to table) | |||
wayland76 | But that's also why it's blank by default | ||
Yup, l8r :) | |||
pmichaud | is the ':=' standard for makefiles? | ||
(and not just gnu make?) | 00:50 | ||
wayland76 | Not sure. | ||
pmichaud | I'd prefer to see a plain = | ||
wayland76 | I nicked it from somewhere | ||
pmichaud | Parrot switched to using those | ||
wayland76 | Ok | ||
pmichaud | but then Parrot's configure.pl converts them back to ='s | ||
wayland76 | Ah, ok | ||
pmichaud | which seems really bizarre to me. | ||
anyway, gotta run, bbl | |||
wayland76 | In that case, I'll switch it back :) | ||
l8r | |||
00:51
lumi_ left
00:55
KyleHa joined
|
|||
misssingthepoint | good morning, wayland | 00:58 | |
wayland76 | morning :) | ||
01:02
Chillance left,
SmokeMachine left
|
|||
misssingthepoint | re makefiles: www.gnu.org/software/make/manual/ma...ml#Flavors | 01:04 | |
01:04
meppl left
|
|||
wayland76 | Thanks. ":=" doesn't Google well :) | 01:05 | |
misssingthepoint | i know ;) | ||
01:05
mj41 left
|
|||
misssingthepoint wishes for a nice API to all Google's scraped data, so he can use Perl regexes on it. | 01:06 | ||
wayland76 | Well, it looks like we can get rid of it then :) | ||
misssingthepoint | wayland76: probably, unless you have "CFLAGS = $(CFLAGS) -O" | ||
wayland76 | I think this was suggested once, but the problem was that it was slow :) | ||
Not in this case | 01:07 | ||
misssingthepoint | wayland76: :) | ||
wayland76 | We have DESTDIR := | ||
And it gets overridden from the outside | |||
misssingthepoint | ok... how's ins2 going? :) | 01:08 | |
wayland76 | Well, pmichaud has pointed out that some parts of my patch are unnecessary | 01:10 | |
So when I've eliminated those, then WORKSFORME with patch :) | |||
01:10
orafu left
|
|||
wayland76 | But I think some others had some test failures | 01:10 | |
01:10
orafu joined
|
|||
wayland76 | And I don't know if any work has been done on that | 01:10 | |
misssingthepoint | hmm | 01:11 | |
i'll test | 01:13 | ||
pmichaud | there were some failures on Solaris that I need to see if I can overcome | 01:16 | |
(having to do with the paths generated into #line directives) | |||
RT #66560 | 01:17 | ||
KyleHa | pmichaud: Would you have time to look at a test I wrote today? I've been holding back the commit until someone can keep me from dropping in something wrong-ish. | ||
pmichaud | I can look, yes. | 01:18 | |
pugs_svn | r27787 | kyle++ | [t/spec] label existing RT #63994 test | ||
r27788 | kyle++ | [t/spec] Test for RT #64002 | 01:19 | ||
r27789 | kyle++ | [t/spec] Test for RT #64080 (may be misplaced) | |||
KyleHa | This one: dev.pugscode.org/changeset/27789 | ||
pugs_svn | r27790 | kyle++ | [t/spec] Test for RT #64904 | ||
pmichaud | the test look okay to me | 01:22 | |
*looks | |||
01:22
Whiteknight joined
|
|||
KyleHa | Great! Thanks for looking. | 01:22 | |
misssingthepoint | KyleHa: "it's easier to ask forgiveness, than permission"... or so I've been told here :) | 01:25 | |
KyleHa | Yes, I've gone that route sometimes. | 01:26 | |
I find that I fret later that I made a boo boo and nobody noticed. | |||
Or I commit thinking I'll ask later, and I worry that I'll forget to ask. | |||
This is sort of a least anxiety route for me. | |||
misssingthepoint | I can relate to all that :) | 01:27 | |
KyleHa | YMMV. | ||
wayland76 | The great thing about tests is, if the test is wrong, then the implementer will hopefully pick it up :) | ||
misssingthepoint | "WFT, that should pass..."? | ||
pmichaud | which then often turns into a message to p6l, which TimToady++ then explains (or otherwise indicates "uh, we need to work on that" :-) | 01:28 | |
KyleHa | Unfortunately I think we have some tests that used to be correct and verify the current implementation, but they've been made wrong by changes to the spec. So you have tests and implementation matching and wrong. | ||
pmichaud | that happens. | 01:29 | |
I'm okay with the tests being updated to match the spec (and being fudged until Rakudo passes them) | |||
misssingthepoint | are spec change commits tagged properly so it's easy to go through and convert the relevant tests? | 01:30 | |
(for some value of 'easy') | 01:31 | ||
pmichaud | what would "tagged properly" mean? | ||
if you're asking if there's a x-reference between them, there is, but it's not complete | |||
misssingthepoint | [docs/perl6/spec], [OH HAI SPEC UPDATE KTHX] | ||
pmichaud | oh, the messages go to the mailing lists, yes. | 01:32 | |
misssingthepoint | ah, ok. | ||
KyleHa | In t/spec/TODO, there's a list of spec changes (with revision numbers) that have invalidated some tests. I don't know how accurate it is. | 01:34 | |
misssingthepoint | ... which is why x-references are a Good Thing. | 01:35 | |
what has to happen to improve those? | |||
KyleHa | Yes. That's the "smart links", if I understand correctly. | ||
al23 | (1,2,3).reduce({"(f $^a $^b)"}) --- should it work? | 01:36 | |
01:38
meppl joined,
meppl left
|
|||
misssingthepoint | al23: use the evalbot :) | 01:39 | |
or have you tried and got errors | |||
al23 | rakudo: (1,2,3).reduce({"(f $^a $^b)"}) | ||
p6eval | rakudo 6999e5: ( no output ) | ||
al23 | rakudo: say (1,2,3).reduce({"(f $^a $^b)"}) | ||
p6eval | rakudo 6999e5: OUTPUT«(f (f 1 2) 3)» | 01:40 | |
al23 | pugs: say (1,2,3).reduce({"(f $^a $^b)"}) | ||
p6eval | pugs: OUTPUT«*** Cannot bind to non-existing variable: "$a" at /tmp/PveBzigdTQ line 1, column 5 - line 2, column 1» | ||
al23 | :( | ||
rakudo: say (1,2,3,4,5).reduce({"(f $^a $^b $^c)"}) | 01:41 | ||
p6eval | rakudo 6999e5: OUTPUT«(f (f 1 2 3) 4 5)» | ||
al23 | rakudo: say (1,2,3,4,5,6).reduce({"(f $^a $^b $^c)"}) | ||
p6eval | rakudo 6999e5: OUTPUT«1 trailing item(s) in reduce(f (f 1 2 3) 4 5)» | ||
al23 | pugs: say (1,2,3,4,5,6).reduce({$^a + $^b * $^c}) | 01:42 | |
p6eval | pugs: OUTPUT«27» | ||
al23 | rakudo: say (1,2,3,4,5,6).reduce({$^a + $^b * $^c}) | ||
p6eval | rakudo 6999e5: OUTPUT«1 trailing item(s) in reduce27» | ||
01:44
jferrero left
|
|||
misssingthepoint | al23: what are you expecting? | 01:48 | |
al23 | Pugs doesn't handle {"(f $^a $^b)"}. | ||
Also, it silently drops values while doing n-ary reduction unlike rakudo... | 01:50 | ||
misssingthepoint | Pugs has kinda been abandoned in favor of Rakudo... | 01:51 | |
al23 | Also, should the "reduction operator" [op] work like operator substitution or like fold? | ||
For example, at least in Pugs, [**] (2,3,4) is 2 ** 3 ** 4 == 2 ** (3 ** 4) while (2,3,4).reduce({$^a ** $^b}) is (2 ** 3) ** 4. | 01:53 | ||
rakudo: say [**] (2,3,4) | |||
p6eval | rakudo 6999e5: OUTPUT«4096» | ||
al23 | pugs: say [**] (2,3,4) | 01:54 | |
p6eval | pugs: OUTPUT«2417851639229258349412352» | ||
misssingthepoint | al23: i think rakudo is correct there; AFAIK the spec mandates proper operator precedence apply with [...] | 01:55 | |
hang on, wait | 01:56 | ||
al23 | As for me, I expect *reduction operator* to work like right fold, not like substitution. | ||
misssingthepoint | That may be your expetation, but I don't think that's what the spec says | 01:57 | |
*expectation | |||
honestly i'm outta my depth here, you want to talk to TimToady :) | 01:58 | ||
wayland76 | or moritz_ or maybe masak | 02:00 | |
misssingthepoint | moritz_ would be good to talk to, he seem to know about this sort of stuff. | 02:01 | |
al23 | Should I check perlcabal.org/syn/ for the right answer? | ||
misssingthepoint | al23: yes and no, it's hard to navigate right now, but we're working on that | 02:02 | |
al23: feel free to look through it, in other words... the google tool thingo may be of assistance | |||
ok: exponentiation is right associative (www.perlcabal.org/syn/S03.html#Oper...recedence) | 02:03 | ||
02:03
Whiteknight left,
davidm123 joined
|
|||
wayland76 | pmichaud: Attached a new patch to rt.perl.org/rt3/Ticket/Display.html?id=63360 | 02:04 | |
pmichaud: Let me know how it looks | |||
colomon | perlcabal.org/syn/S03.html#Reduction_operators | ||
wayland76 | colomon++ | ||
@karma colomon | |||
lambdabot | colomon has a karma of 8 | ||
misssingthepoint | colomon++, that's what i was looking for | 02:05 | |
al23: hope that helps :) | |||
al23 | It is clear that exponentiation is right associative, it is not the Perl 6 issue at all. But it is not clear is [**] a right fold or ** substitution. | ||
misssingthepoint | right fold? | 02:06 | |
colomon | al23: according to the spec, [**] 4, 3, 2; # 4**3**2 = 4**(3**2) = 262144 | ||
al23 | Oh, just a kind of Haskell terminology :-) | 02:07 | |
colomon: thanks, I found that. | |||
wayland76 | en.wikipedia.org/wiki/Fold_(higher-..._function) | ||
afk & | 02:08 | ||
al23 | Well, if so, the term "reduction" sounds quite confusing since the reduction is a right fold in other languages... But it makes sense since it's abount pre-defined operators and not about functions. | 02:09 | |
TimToady | we're optimizing for usability by mere mortals here | ||
and the substitution principle is very easy to explain | 02:10 | ||
and if you want the fancy stuff, there are real function calls | |||
al23 | Yes, | ||
(2,3,4).reduce({$^a ** $^b}) | |||
rakudo: (2,3,4).reduce({$^a ** $^b}) | 02:11 | ||
p6eval | rakudo 6999e5: ( no output ) | ||
al23 | rakudo: say (2,3,4).reduce({$^a ** $^b}) | ||
p6eval | rakudo 6999e5: OUTPUT«4096» | ||
TimToady | of course, one can also play games with reverse() and with [Rop] for reversed ops | ||
al23 | rakudo: say [**] (2,3,4) | ||
p6eval | rakudo 6999e5: OUTPUT«4096» | ||
al23 | So, Rakudo is wrong here, according to the spec. | ||
TimToady | rakudo: say 2 ** 3 ** 4 | 02:12 | |
p6eval | rakudo 6999e5: OUTPUT«2.41785163922926e+24» | ||
TimToady | yes | ||
though if it had said 4096 for that, I'd've said it was (perhaps) doing [op] correctly :) | 02:13 | ||
colomon | rakudo: say (2,3,4).reducerev({$^a ** $^b}) | ||
p6eval | rakudo 6999e5: OUTPUT«Method 'reducerev' not found for invocant of class 'List'» | ||
TimToady | rakudo: say [R**] reverse 2,3,4 | 02:14 | |
p6eval | rakudo 6999e5: OUTPUT«2.41785163922926e+24» | ||
TimToady | :) | ||
there's your opposite fold | 02:15 | ||
but yes, [**] is wrong in rakudo | |||
should be right assoc | |||
colomon | Wait, now I'm totally confused. | 02:16 | |
TimToady | rakudo: say infix:<**>(2,3,4) | ||
p6eval | rakudo 6999e5: OUTPUT«Statement not terminated properly at line 2, near ":<**>(2,3,"in Main (src/gen_setting.pm:3359)» | ||
colomon | According to the spec, [**] is right in rakudo. It's the reduce function which is wrong, no? | ||
TimToady | [**] is not right, but ** is | 02:17 | |
[**] is supposed to obey the associativity of the ** operator, but it isn't | |||
colomon | ack, you're right. clearly I should have gone to bed 15 minutes ago. | 02:18 | |
alester | Are we at a point that I can build and install a rakudo? | ||
TimToady | that would depend on the definition of "I" | 02:19 | |
alester | or is installation still manual? | ||
I = I | |||
TimToady | I think that's still in the works | ||
and may have some parrot deps | |||
alester | I want to start a Cool Perl 6 Thing Per Day (Or So) on Perlbuzz | 02:20 | |
I was reading thru Damian's Perl 6 talk packet in the SJC airport | |||
and thinkin' a handful of those nuggets each week oughta get people goin' "Oh cool" | |||
but I want to wait until we're at the point where we can do make && make install | |||
for my own sanity, if nothing else. | 02:21 | ||
misssingthepoint | alester: that's a good idea, IMO :) | ||
alester | Which? | ||
misssingthepoint | CP6TPD | ||
TimToady | it's definitely front burner right now | ||
alester | well, I won't promise per-day. :-) | ||
misssingthepoint | alester: :) | ||
alester | It's tough enough remmebering to bathe! | ||
al23 | Maybe it's just because I'm using the functional languages, but I think that recursive definition of reduction is clear and unambiguous, while a kind of substitution model is confusing. | 02:22 | |
TimToady | yes, well, we're all trying to underpromise except when we aren't :) | ||
02:22
eternaleye_ joined
|
|||
alester | It'll be a Perl 6 advent calendar. | 02:23 | |
TimToady | then don't think of [**] as a reduction, but as a shorthand. use reduce &[**], @list for the real reduction | ||
02:23
eternaleye left
|
|||
TimToady | note that the [op] shorthand works for things that are "list associative" rather than left or right | 02:24 | |
and chained ops, where the meaning is not something you can propagate from recursion to recursion because of type mismatches | 02:25 | ||
al23 | Also, I'm sorry for my ignorance, but where can I find an explanation of the blocks with implicit params? Should I treat them just as poor man's lambdas? :-) (I'm aware of such things in Perl 5, like passing comparators to sort, but they are differ very much...) | ||
TimToady | so you can have [<] @list for monatonically increasing | ||
well, true lambda is spelled -> in p6 | |||
and all the other blocks are defined in terms of that, so they're really all true lambdas in some sense | 02:26 | ||
most of this will be in S04 | |||
the difference from Perl 5 is that sort's comparator in p5 hardwires the meanings of $a and $b, whereas in p6 it just naturally falls out of the def of $^a and $^b | 02:28 | ||
al23 | Yes, I see it. | ||
TimToady | 'course, generally in p6 you'll want to use just a single parameter as a key extractor | ||
02:29
dukeleto left
|
|||
TimToady | there are also ways of currying | 02:29 | |
so for instance you can often use the * Whatever to curry an ordinary operator | |||
sort +*, @list will sort numerically | |||
where +* is really just -> $key { +$key } | 02:30 | ||
colomon | BTW (don't know if anyone else mentioned/noticed this just now), there is a test for [**] in S03-operators/reduce-metaop.t, appropriately marked "rakudo todo". | ||
TimToady | thanks for checking that | 02:31 | |
al23 | Well, thank you very much, I'll try to read all perlcabal.org/syn/ | 02:32 | |
TimToady | have the appropriate amount of fun | ||
and feel free to note inconsistencies | |||
only some of which are intentional :) | 02:33 | ||
al23 | Actually, I thought there are some nice informal tutorials on Perl 6, but I found most of them unclear or outdated. | ||
misssingthepoint | al23: perlgeek.de/blog-en/ | 02:34 | |
TimToady | most of them will not be pitched to someone coming from FP | ||
al23 | Actually, I'm using Perl 5 as well. | 02:35 | |
TimToady | then perlgeek.de/blog-en/perl-5-to-6/ is good | ||
more overview than completist though | 02:36 | ||
al23 | Thanks. | ||
colomon | rakudo: say (1, 2, 3).sort(+*) | ||
p6eval | rakudo 6999e5: OUTPUT«invoke() not implemented in class 'Float'in Main (/tmp/zbvsX3zOT2:2)» | 02:37 | |
misssingthepoint | also | 02:38 | |
colomon | rakudo: say sort +*, (1, 2, 3) | ||
TimToady | I'm not sure how to get the "lessons" in order though | ||
p6eval | rakudo 6999e5: OUTPUT«0123» | ||
misssingthepoint | rakudo: my @l = 1,2,3; say [<] @l; # what should this do? | ||
p6eval | rakudo 6999e5: OUTPUT«1» | 02:39 | |
TimToady | al23: oh, it's the buttons on the left that are in order | ||
misssingthepoint: it should return true | |||
which it does | |||
misssingthepoint | ah | ||
"is this list in increasing order"? | 02:40 | ||
TimToady | that is, same as 1 < 2 < 3 would return | ||
misssingthepoint | AH | ||
*lightbulb* | |||
TimToady | "substitution" that we were discussing earlier | ||
"as if" it were written the other way | 02:41 | ||
but with an ordinary reduce, that doesn't work, because 1<2 return boolean, not 2 | |||
unless you play Icon tricks, which I don't like | |||
misssingthepoint | rakudo: say ~True | 02:42 | |
p6eval | rakudo 6999e5: OUTPUT«1» | ||
misssingthepoint | :) | ||
colomon | TimToady: my two sort examples there: am I doing something wrong, or did I find two different ways for +* to fail? | ||
TimToady | rakudo: say True.name | 02:43 | |
p6eval | rakudo 6999e5: OUTPUT«Method 'name' not found for invocant of class ''» | ||
misssingthepoint | TimToady: (never say someone's true name) | ||
al23 | Aha. But is "<" n-ary? | ||
TimToady | all such comparisons are n-ary together | 02:44 | |
1 < $a == $b < 10 | |||
this is the "chained" precedence level in S03 | |||
al23 | If I recall correctly, something 1 < 2 < 3 was not legal in Perl 5... | 02:45 | |
TimToady | worse | ||
it's legal, but doesn't mean what you want it to | |||
al23 | perl -e '1 < 2 < 3' | ||
syntax error at -e line 1, near "2 <" | |||
Execution of -e aborted due to compilation errors. | |||
TimToady | okay, that happened since I last looked at it | 02:47 | |
but it's still a bad error message :) | |||
al23 | While 1 < (2 < 3) or (1 < 2) < 3 works. | ||
TimToady | probably declared it non-associative | ||
and that's the best that yacc can do | |||
but anyway, it's allowed and encouraged in P6 | 02:48 | ||
rakudo: say 1 < 8 > 3 < 10 | |||
p6eval | rakudo 6999e5: OUTPUT«1» | ||
TimToady | rakudo: say 1 < 8 > 3 < 10 ~~ 9..11 | 02:49 | |
p6eval | rakudo 6999e5: OUTPUT«0» | ||
TimToady | ooh, that's a bug | ||
rakudo: say 10 ~~ 9..11 | |||
p6eval | rakudo 6999e5: OUTPUT«1» | ||
02:49
nihiliad left
|
|||
KyleHa | If there are any monks listening, be aware that the passwords for user accounts on the site were compromised. Saint and janitor passwords were posted publicly. | 02:51 | |
misssingthepoint | KyleHa: eek | ||
KyleHa | As far as I know, the hole's not closed, so if you go change your password, you should assume the bad guys have the new one too. | 02:52 | |
misssingthepoint | hmm | ||
02:53
hercynium left
02:54
justatheory left
|
|||
pmichaud | I suspect that Rakudo doesn't know how to chain ~~ | 02:55 | |
rakudo: say 1 < 10 ~~ 9..11 | |||
p6eval | rakudo 6999e5: OUTPUT«0» | ||
al23 | And what is [\op]? Something like a'[i] := a[i] op a[i-1], i > 1? Why it is still called reduction" | 02:58 | |
? | |||
rakudo: [\+] (1,2,3,4,5,6) | |||
p6eval | rakudo 6999e5: OUTPUT«Syntax error at line 2, near "[\\+] (1,2,"in Main (src/gen_setting.pm:3359)» | ||
al23 | rakudo: say [\+] (1,2,3,4,5,6) | ||
p6eval | rakudo 6999e5: OUTPUT«say requires an argument at line 2, near " [\\+] (1,2"in Main (src/gen_setting.pm:2463)» | ||
al23 | pugs: say [\+] (1,2,3,4,5,6) | 02:59 | |
p6eval | pugs: OUTPUT«136101521» | ||
al23 | pugs: [\+] (1,2,3,4,5,6) | ||
p6eval | pugs: ( no output ) | ||
TimToady | I believe it's called "scan" in Haskell | 03:00 | |
al23 | My pugs says that [\+] (1,2,3,4,5,6) evaluates to (1, 3, 6, 10, 15, 21). | ||
TimToady | it's still a reduction, but return all the intermediate results | 03:01 | |
al23 | :-) | ||
TimToady | and the results tend to look like a triangle when you put them on separate lines :) | 03:02 | |
so the [\ is a visual clue | |||
al23 | Yes, it works like scanl. | 03:04 | |
TimToady | rakudo: *.say for 0,1 ... { $^a + $^b if $^a < 30 } | 03:05 | |
p6eval | rakudo 6999e5: ( no output ) | ||
TimToady | rakudo: .say for 0,1 ... { $^a + $^b if $^a < 30 } | ||
p6eval | rakudo 6999e5: OUTPUT«011235813213455» | ||
TimToady | eventually fibonacci will just be 0,1...&[+], but rakudo isn't lazy yet | 03:06 | |
al23 | LOL. At least, there is a Parrot implementation of Unlambda. I hope it's complete. | 03:10 | |
03:11
damyan^ joined
03:12
davidm123 left
|
|||
al23 | rakudo: sqrt -1 | 03:13 | |
p6eval | rakudo 6999e5: ( no output ) | ||
al23 | rakudo: say sqrt -1 | ||
p6eval | rakudo 6999e5: OUTPUT«NaN» | ||
al23 | rakudo: say sqrt -1 + 0i | ||
p6eval | rakudo 6999e5: OUTPUT«0+1i» | ||
al23 | Oh. | ||
TimToady | been argued both ways | 03:14 | |
al23 | Yes, it's nice. | 03:16 | |
03:16
cj left,
andreasg_ left,
LCamel left,
ingy left
03:17
ingy joined
03:18
LCamel joined
03:19
andreasg_ joined
03:21
lumi joined
03:22
s1n joined,
damyan left
03:29
KyleHa left
03:31
dukeleto joined
03:32
damyan^ left
03:36
tewk left
03:56
eternaleye_ left
03:58
lumi left
|
|||
PerlJam | ping | 04:22 | |
check out perlpilot.blogspot.com/ | 04:23 | ||
PerlJam is finally getting with the blog | |||
04:25
eternaleye joined
04:39
iblechbot joined
04:49
lumi joined
04:52
dukeleto left,
sri_kraih joined,
eternaleye left
|
|||
cbk | PerlJam, Nice web site, Looks like it's going to be very useful for me (bookmarking now) | 04:55 | |
PerlJam | ah, someone else /is/ awake. | 04:56 | |
cbk | yes working on a perl 6 regex | ||
<[\w+]>\.gif | |||
trying to get that to match a file name that may have _ - and numbers | 04:57 | ||
it's not working | |||
PerlJam | Hmm. Does <ident> match _ and - ? | ||
cbk | do I have to escape the . with \. or something? | 04:58 | |
mberends | cbk: '.gif' is more readable | ||
PerlJam | What mberends said | 04:59 | |
cbk | here is an example of what I'm looking for => SD_logo-50x50.gif | ||
mberends | cbk: try the \w+ without the <[ ]> around it | 05:00 | |
cbk | .gif did not work for some reason | ||
ok.. | |||
PerlJam | mberends: he won't get - that way. | ||
mberends | PerlJam: right, <ident> is better then | 05:01 | |
cbk | what is <ident> ? | ||
mberends | cbk: a predefined character class, for identifiers | 05:02 | |
PerlJam | It's a built-in assertion. I'm not sure if it matches - yet though | ||
05:03
iblechbot left
|
|||
cbk | PerlJam, well I'm trying to keep it simple (and working) | 05:03 | |
here is my line => SAN Chargers SanDiego 00 00 SD_logo-50x50.gif | 05:04 | ||
and my regex: | |||
if $line~~ /(<[a..zA..Z]>+\s)(<[a..zA..Z]>+\s)(<[a..zA..Z]>+\s)(\d+\s)(\d+\s)(\w+\.gif)/ { | |||
$0 ..$5 are my setting vars but the last part is not matching up? | 05:05 | ||
05:07
synth joined
|
|||
PerlJam | cbk: you want [\w|\-]+ '.gif' | 05:07 | |
Why are you capturing the spaces after your numbers and such? | |||
or maybe you want to match a rule instead of a rx | 05:08 | ||
cbk | yes but I do a .trim to get rid of then :( | ||
PerlJam | if you don't capture them, there's no reason to do .trim | 05:09 | |
cbk | PerlJam, well I wanted to start off simple and build up from there, (my regex foo is poor! I have read that intro to perl 6 regex many times now.) | 05:10 | |
PerlJam | cbk: well, an intro isn't a tutorial and that's probably what you need instead :) | 05:11 | |
cbk | PerlJam, [\w|\-]+ '.gif' WORKED!!!! thanks! | 05:12 | |
PerlJam | cbk: of course it did :) | ||
cbk | :) whats the \- | 05:13 | |
:) whats the \- mean | |||
PerlJam | \- matches a - character | ||
you have to put the \ in front of it because all non-alphanumerics are meta-syntactic | 05:14 | ||
cbk | ok so it like escaped with the \ | ||
ok | |||
ok ok I got it now! Thanks | |||
PerlJam | you backwhack meta-syntax to make them literal and you backwhack literals to make them meta-syntactic | ||
cbk | ok | ||
05:15
justatheory joined
|
|||
PerlJam | you really should move your ) such that they don't capture your whitespace. | 05:15 | |
cbk | how | 05:16 | |
PerlJam | and you might want to use \s+ instead of just \s to be a little more conservative | ||
cbk | ok | ||
PerlJam | (do you *know* that there will always be exactly one whitespace character?) | ||
cbk | yes | ||
05:16
dukeleto joined
|
|||
cbk | the file is a config file that I make for the game | 05:17 | |
will always be a space between vars. and each line is a obj | |||
PerlJam | here's an alternate way to match: $line ~~ rule { (<[a..zA..Z]>+) (<[a..zA..Z]>+) (<[a..zA..Z]>+) (\d+) (\d+) ([\w|\-]+\.gif) } | 05:18 | |
cbk | View data for NYG, which is Object number, 4: | 05:19 | |
Giants | |||
NewYork | |||
00 | |||
NYG_logo-50x50.gif | |||
cool! | |||
PerlJam | I didn't put any anchors in because you didn't have any in your original, but you might want to consider that | ||
cbk | by anchors you mean like :'s or *'s | 05:20 | |
PerlJam | I mean ^ and $ | ||
cbk | I was using the space as a anchors | ||
? | |||
anchors in the regex? | 05:21 | ||
PerlJam | that works for the interior parts but not the beginning and end. your lines could look like this: "lskdfalksdj SAN Chargers SanDiego 00 00 SD_logo-50x50.gif asldkfasdlkj" and youre regex will still match. | ||
(that may be a feature though :) | |||
05:21
justatheory left
05:22
ihrd joined
|
|||
cbk | dont like the lskdfalksdj part but I had some thing like that at first but thought it looked bad. | 05:22 | |
PerlJam | if you stick a ^ in front and a $ at the end of your regex, it precludes matching such extraneous stuff | 05:23 | |
cbk | I used *** in the front and at the end | ||
ok | |||
PerlJam, Thanks you know I'll be checking out your site daily! | 05:25 | ||
05:30
alester_ joined
|
|||
cbk | Could you do something like this => if DEBUG() say "Debug Code here.."; Where sub DEBUG() can return true and trigger the say block? | 05:34 | |
05:36
eternaleye joined
05:47
ihrd left
|
|||
moritz_ | good morning | 06:15 | |
misssingthepoint | morning moritz_ :) | ||
cbk | morning | 06:17 | |
06:17
jauaor_ joined
|
|||
misssingthepoint | cbk: well, yes | 06:18 | |
06:18
eternaleye_ joined
|
|||
misssingthepoint | rakudo: sub DEBUG { return Bool::True }; if DEBUG() { say "debugging" } | 06:18 | |
p6eval | rakudo 6999e5: OUTPUT«debugging» | 06:19 | |
06:22
zamolxes left
06:25
alester_ left
06:28
rfordinal left
|
|||
cbk | misssingthepoint, thanks this will help clean up the mess I call code :) | 06:29 | |
06:29
eternaleye left
|
|||
misssingthepoint | no worries :) | 06:33 | |
moritz_ | you can also put the conditional into the DEBUG sub | 06:37 | |
sub DEBUG(*@a) { say "Debugging output: ", @a if True }; DEBUG('foo') | 06:38 | ||
06:38
eternaleye joined,
eternaleye_ left
|
|||
moritz_ | ha, a non-golfed Perl 6 version is shorter than a golfed Perl 5 version: www.perlmonks.org/?node_id=784139 | 06:42 | |
cbk | misssingthepoint, moritz_ I just did it like this: sub DEBUG { if $debug > 0 { return Bool::True } else { return Bool::False} }; | 06:45 | |
moritz_ | you can write that shorter as sub DEBUG { $debug > 0 } | 06:46 | |
the comparison returns a boolean already | |||
xinming | cbk: do remember that perl is expressive, People don't like that kind of "crap" ;-) | 06:47 | |
cbk | thats what thought but was putting the return block with "retrun true" silly me :) | 06:48 | |
moritz_ | I mean it's fine to write more, but I just don't want people getting the idea that you have to write so much in Perl | 06:50 | |
after all, it's not Java ;-) | |||
misssingthepoint | lol, thank God for that | 06:51 | |
:) | |||
moritz_++ for both things you just said. (helpful) | 06:52 | ||
cbk | I'm putting BOTH ways in with one commented out to show the different ways | ||
06:54
mj41 joined
06:57
Su-Shee joined
|
|||
Su-Shee | good morning future. :) | 06:57 | |
moritz_ | oh hai | 07:00 | |
Su-Shee | I dreamt of rakudo releases tonight... this is not a good sign.. ;) | 07:02 | |
moritz_ | or maybe it is ;-) | ||
Su-Shee | not really, if I really start to think about something more complex, I really lose sleep over it. :/ | 07:03 | |
I'm the 4 hours sleep while writing thesis candidate. ;) | 07:04 | ||
07:04
rfordinal joined
07:15
dukeleto left
07:19
eternaleye_ joined
07:20
eternaleye left
|
|||
Matt-W | I don't think that's a bad thing | 07:22 | |
I think it's better than my tossing and turning trying to get comfortable with a bad shoulder and aching muscles all over | |||
Remind me why I started aikido again? | |||
07:23
xomas_ left
|
|||
moritz_ | because it was -Ofun? | 07:24 | |
Su-Shee | (i know why I stick with yoga.. ;)) | 07:25 | |
07:28
finanalyst joined
|
|||
Su-Shee | hm. i just realized, that due to rakudo I'm gonna skip moose and all this. | 07:31 | |
Matt-W | moritz_: There is that. We did have a lot of fun last night | 07:33 | |
moritz_ | I've been meaning to learn Moose for two years now, but haven't found the motivation so far :) | ||
Matt-W | I only heard about it a couple of months ago | ||
And since I'm unlikely to get it installed on the servers at work, let alone actually getting legal approval to use it, I'm just going to have to go straight to Perl 6 | 07:34 | ||
Su-Shee | well I have to focus anyway and I just realized, that I'm mentally saying goodbye to p5. | ||
Matt-W | I'm already viewing it as a bit archaic | 07:35 | |
Although it's remarkable what you can get Perl 5 to do | 07:36 | ||
It's the only language other than Haskell that I've seriously used with proper closures and things | 07:37 | ||
Su-Shee | that convinced me a few years back that perl is still the way to go | ||
otherwise I would have probably gone ruby all the way. ;) | |||
07:38
damyan joined
07:41
xomas_ joined
07:44
dakkar joined
|
|||
Matt-W | Well Ruby's got cool stuff | 07:45 | |
But I never felt like it was quite right | |||
Bits of syntax just don't work for me | |||
cosimo | Matt-W: what you mean by "legal approval" ? | 07:48 | |
and good $morning to all | 07:49 | ||
Matt-W | cosimo: my employer are incredibly strict about getting formal approval for any piece of third party software we want to use | ||
cosimo: this includes CPAN modules | |||
Su-Shee | Matt-W: I want to cool stuff in rakudo. | ||
Matt-W | And it goes through the legal department, who see the letters 'GPL' and press 'reject' | ||
So you then have to scream at them for an hour before they 'remember' that GPLed compilers don't mean you have to GPL the stuff you compile with them | 07:50 | ||
They actually rejected GCC the other month | 07:51 | ||
and GNU Make | |||
moritz_ | wow. | ||
07:52
finanalyst left
|
|||
cosimo | Matt-W: that's sad | 07:55 | |
Matt-W | yeah | ||
We're still trying to get approval to set up a dev system running Linux | 07:56 | ||
We've got customers who want to run one of our comms servers on Linux boxes they already have | |||
But we're still wrangling with the legal people to get the approval to even try the port | |||
Still, on the bright side, by the time we've got the Linux server, the porting work's going to seem easy... | |||
cosimo | Matt-W: is this a really big company? | ||
Matt-W | absolutely enormous | 07:57 | |
we're in the top 40 brands in the world | |||
I think on the whole I prefer working somewhere smaller | |||
cosimo is curious now | 07:58 | ||
cosimo found matt's homepage :) | 07:59 | ||
moritz_ | URL? | ||
Matt-W | Yes and soon you will know which absurdly large company I work for | 08:00 | |
cosimo | yes | ||
cool, really, i'd love to know more about it... :) | |||
Matt-W | Pfft | 08:01 | |
We've got some cool tech | |||
Some stuff that's so old and crusty it's a wonder it works at all | |||
And, fortunately, a collection of pretty clever people to sort it all out | |||
It is the clever people who make it all worthwhile | 08:02 | ||
cosimo | I see | ||
08:03
jauaor_ left
|
|||
Matt-W | Sometimes we have to fix up code that really needs ripping out and redoing | 08:04 | |
But we don't get the time to do that | |||
So we have to come up with creative ways to get it to work | |||
It makes the occasional new system design task much sweeter :) | 08:05 | ||
cosimo | I guess 99% of the programmers have do that :) did you see the source code for the Apollo lunar module? | ||
Matt-W | And yes, we do use Perl for internal test driver stuff mostly | ||
I didn't, but I imagine it's pretty horrible | |||
cosimo | IMHO is beautiful, but maybe they had the same problems :) | 08:10 | |
Matt-W | maybe | 08:11 | |
Our chief problem is that parts of the core codebase were written when the company which was eventually bought (three times) to turn into what I work for now was written a) in a hurry and b) in C++ by Java programmers | |||
moritz_ | it's probably the managers thinking "C++ and Java are so similar, and Java programmers are easier to hire, so let's pick those" | 08:18 | |
Matt-W | I think it's mostly because the people they had were Java experts, but they realised they needed to use C++ for the server side | 08:23 | |
This was before Java had a decent JIT | |||
Su-Shee | I'd love to understand more about benchmarking and c++, I've got a guy I'm fighting for 8 years now over his overly complicated web stuff written in c++ insisting on "perl's too slow" | 08:25 | |
Matt-W | depends what you're doing! | ||
C++ can be slow | |||
In fact, C++ offers you numerous things that look like a good idea but are horribly slow | |||
C++0x should help with that though | 08:26 | ||
Matt-W can't wait for rvalue references and move constructors | |||
Su-Shee | well he is definetely doing everything as complicated and overly bureaucratic as possible. ;) | ||
08:26
szabgab left
|
|||
Su-Shee | I should start ignore him. | 08:27 | |
*rotfl* this quote I just found: "You know, Perl. "It's like Java, only it lets you deliver on time and under budget." | 08:28 | ||
Matt-W | ... | 08:29 | |
...and it doesn't drive you mad with its arbitrary restrictions | |||
(except for not being able to share arrays between threads) | |||
08:29
zamolxes joined
|
|||
moritz_ | that's why we need Perl 6 :-) | 08:31 | |
less global state, more contextual variables, ligther "everything shared" threads | |||
Matt-W | and STM | 08:35 | |
which for some thread workflows will be great | |||
moritz_ | we'll see how STM works out in practice | 08:36 | |
Su-Shee | I'm a total java idiot, I never really got around it. | ||
"stm"? | |||
moritz_ | Su-Shee: "software transactional memory" | 08:37 | |
08:37
fridim_ joined
|
|||
Su-Shee | "ah!" I have no idea what that means. | 08:37 | |
moritz_ | the idea is that you don't do locking, but just execute your code... | 08:38 | |
and at the end you check if another thread disturbed you | |||
and if yes, you let the VM roll back everything you did | 08:39 | ||
and maybe try again | |||
08:43
charsbar left
|
|||
moritz_ | it's the latest silver bullet in concurrency programming, but there haven't been all that many really scalable implementations yet | 08:45 | |
08:45
masak joined
|
|||
pugs_svn | r27791 | bpetering++ | [misc/irclog] Finished nick filtering :) | 08:45 | |
masak | good (late) morning, Perl 6 adventurers! | ||
08:46
arejay left
08:48
charsbar joined,
rfordinal left
08:49
rfordinal joined,
desertm4x_ joined
|
|||
moritz_ | oh hai masak | 08:49 | |
masak | I had so much fun tracking down the jnthn-bug yesterday night, that I don't really care that I'm up a bit later than desired today. :) | 08:50 | |
08:54
arejay joined
09:08
szabgab joined
09:09
synth left
09:10
rfordinal left
|
|||
Matt-W | STM is clearly only applicable to particular types of threaded workflow | 09:15 | |
we'll need other methods | |||
jnthn | o/ | 09:26 | |
Matt-W | o/ jnthn | 09:27 | |
Matt-W has a sudden urge to program in Haskell | 09:28 | ||
09:31
kimtaro joined
|
|||
masak | Matt-W: do it! | 09:38 | |
jnthn: morning. | 09:39 | ||
jnthn: so, you said rt.perl.org/rt3/Ticket/Display.html?id=67992 would probably not be a biggie? | |||
moritz_ | this bug is exactly why I wish we had some kind of real-world application in the test suite | 09:42 | |
jnthn | masak: should be easy fix, yeah | 09:44 | |
wayland76 | We had a guy come through here a few months ago | 09:46 | |
He was saying that STM is rubbish, and he wanted POSIX threads | |||
His reasoning was that the STM model being proposed was only good for co-operative multithreading | 09:47 | ||
moritz_ | I don't see what's wrong with co-operative multithreading | ||
as long as we offer other options too | |||
masak | lunch & | 09:48 | |
wayland76 | I'd love to see the concurrency stuff come along, but I don't know enough about it to be able to help | ||
moritz_: I agree, but the assumption both of us work working with at the time was that there would be the One True Threading Model to bring them all and in the darkness bind them | 09:49 | ||
Or something :) | |||
Is anyone working on Sets.pm :) | |||
Matt-W | There's no such thing as one true threading model | 09:50 | |
unless you just provide the bare-metal basics that allow the implementation of any other threading model | |||
which is barely a threading model at all | |||
jnthn | Heh. In that case the only primitive you really need is CAS. ;-) | 09:51 | |
jnthn would love it if Parrot provided access to such a thing. | 09:52 | ||
You can build all kinds of stuff out of that. | |||
Matt-W | yes | 09:53 | |
09:53
kimtaro left
|
|||
Matt-W | but let's please provide something more than that at some point :) | 09:54 | |
Su-Shee cuts her keyboard. *strike* another fellow hooked on perl 6. | 09:58 | ||
10:00
donaldh joined
10:02
pmurias joined
|
|||
pmurias | Matt-W: what's horribly slow in C++? | 10:03 | |
10:04
misssingthepoint left
|
|||
jnthn | Matt-W: Of, for certain. | 10:05 | |
Matt-W | pmurias: passing large and complicated objects by value, of course :) | 10:06 | |
jnthn | Matt-W: The point is that you can build a lot on top of it. | ||
(And that we would.) | |||
jnthn would really like to see us invest in lock-free data structures. | |||
Or invest some time looking into them. | |||
wayland76 | CAS = en.wikipedia.org/wiki/Computer_algebra_system ??? | ||
Matt-W | jnthn: yes, I think even if we do have something high level like STM, we need to also expose some concurrency primitives to help people build alternatives | 10:07 | |
wayland76 | Is that what CAS is? | 10:09 | |
Matt-W | no, CAS is check-and-set isn't it? | 10:10 | |
jnthn | wayland76: en.wikipedia.org/wiki/Compare-and-swap | ||
Matt-W | it's an atomic operation which you can build all the ordinary threading stuff on top of | 10:11 | |
jnthn | www.cl.cam.ac.uk/research/srg/netos/lock-free/ | ||
jnthn was lectured in concurrency by one of the guys working on that stuff | 10:12 | ||
wayland76 | I was having trouble seeing how a Computer Algebra System would help with threading :) | ||
Matt-W was lectured in concurrency by a lecturer who really seemed to find the dining philosophers problem as amusing as a large book of lolcats | 10:14 | ||
although this was before lolcats | |||
wayland76 does not recall being lectured in concurrency | 10:15 | ||
despite doing a Distributed Systems course :) | |||
jnthn | Yeah, I remember the days of my youth, when I'd see cats walking down the street captionless. | ||
wayland76 | Speaking of funny memes, has everyone seen www.youtube.com/watch?v=Tx1XIm6q4r4 ? (Potter Puppet Pals, the Mysterious Ticking Noise) | 10:16 | |
10:31
|Jedai| joined
|
|||
pmurias | Matt-W: does any one pass large objects by value? | 10:35 | |
* anyone | 10:36 | ||
10:38
meppl joined
10:50
_Jedai_ left
10:54
Front_slash joined
|
|||
dalek | ok: 2cb1f97 | (Hinrik Örn Sigurðsson)++ | (2 files): Forgot to check Pod::Parser version |
10:57 | |
ok: c8c05c2 | (Hinrik Örn Sigurðsson)++ | (9 files): Bump version to 0.18_02 |
|||
ok: 5b818a6 | (Hinrik Örn Sigurðsson)++ | (2 files): Depend on Pod::Parser 1.36 =encoding directive |
|||
masak | right, there's a #p6s meeting tonight. | 10:59 | |
Matt-W | pmurias: It happens... | 11:01 | |
11:01
meppl left
|
|||
pmurias | Matt-W: how did you manage to hurt yourself during aikido? you don't do sparring? | 11:03 | |
11:04
rfordinal joined
|
|||
wayland76 | I know a guy who in one day, did Muy Thai Kickboxing, tennis, and swing dancing, just fine, but then was turning while walking and did his knee :) | 11:05 | |
11:06
snearch joined
|
|||
masak | ouch. | 11:06 | |
11:08
desertm4x_ left
|
|||
pmurias | is defining methods with eval specced anywhere? | 11:18 | |
masak | pmurias: why would it need to be specced, apart from ordinary method definitions? | ||
11:20
donaldh left,
donaldh joined
|
|||
pmurias | masak: it just seemed strange to me | 11:20 | |
masak | :) | ||
rakudo: class A { submethod BUILD { eval 'method foo { say "OH HAI" }' } }; class B is A {}; B.new.foo | 11:21 | ||
p6eval | rakudo 6999e5: ( no output ) | ||
masak | rakudo: class A { submethod BUILD { eval 'method foo { say "OH HAI" }' } }; class B is A {}; B.new.foo; say "alive" | ||
p6eval | rakudo 6999e5: ( no output ) | ||
masak | gives "bus error" locally. | ||
masak submits rakudobug | |||
jnthn | Because it's essentially a back-door monkey patch. | 11:23 | |
masak | oh, right. because it's done at run-time. | ||
moritz_ | a bus error is very similar to a segmentation fault, no? | ||
masak | anyway, I'm not saying it's right. I'm saying it's doing a bus error. | ||
moritz_: so similar that I've had the difference explained to me and not understood it. :) | 11:24 | ||
wayland76 | A bus error is where you have a bus number of 1, and that person gets hit by a bus :) | ||
(bus number also known as truck number; used in eXtreme Programming circles) | 11:25 | ||
masak hasn't been that eXtreme yet | |||
wayland76 | Or maybe agile | 11:26 | |
instead of eXtreme | |||
jnthn | If you were agile enoguh, you'd be able to get out of the way of the oncoming bus. | ||
masak | I'm way more limber now after a half year of swimming, that's for sure. | ||
wayland76 | For those missing it, everything2.com/index.pl?node_id=1543370 | 11:27 | |
Cool. I have ultra-flexible shoulders because I sleep funny :) | |||
But my legs don't flex much | |||
Su-Shee | me can still stick her toe in her ear. good enough. | 11:28 | |
wayland76 | (the link is for "truck number") | ||
I can get my toe to my forehead, but that seems to be about my limit | |||
masak | I picked up a screw from the floor with my foot yesterday. I felt very satisfied as a primate doing that. | 11:29 | |
wayland76 | And I had to use my hands/arms to help me do that | ||
pmurias | Su-Shee: standing up? or does doing it while siting in front of the laptop counts? | 11:30 | |
Su-Shee | pmurias: I can do both. yoga. :) | 11:31 | |
wayland76 | That could be useful. The place my computer is is in a different building than the place I eat/sleep/ablute/etc, so I don't go barefoot much, unfortunately | ||
Su-Shee | wayland76: luckily, notebooks dont have those nasty little screws anymore I used to set my naked foot on at night.. ;) | 11:32 | |
wayland76 | Hmm. It seems that standing up, I can get my toe to my ear, but not in it. | ||
Ouch! | |||
That's why I put mine on the bottom shelf that I can reach from my bed | |||
masak | today's discussion is calling up more interesting mental images than usual. | 11:35 | |
pmurias | Su-Shee: i'm allowed to bend my back when doing the toe to the ear exercise? | 11:39 | |
11:42
snearch left
|
|||
colomon | rakudo: say <1 2 10>.sort | 11:44 | |
p6eval | rakudo 6999e5: OUTPUT«1102» | ||
colomon | rakudo: say <1 2 10>.sort(+*) | ||
p6eval | rakudo 6999e5: OUTPUT«invoke() not implemented in class 'Float'in Main (/tmp/Xn1IAm65XN:2)» | ||
colomon | rakudo: say sort +*, <1 2 10> | 11:45 | |
p6eval | rakudo 6999e5: OUTPUT«01102» | ||
masak | o_O | ||
rakudo: say (sort +*, <1 2 10>).perl | |||
p6eval | rakudo 6999e5: OUTPUT«[0, "1", "10", "2"]» | ||
masak | oh, the +* is taken to be part of the list sent in. | 11:46 | |
rakudo: say (<1 2 10>.sort({.int})).perl | |||
p6eval | rakudo 6999e5: OUTPUT«["1", "2", "10"]» | ||
colomon | but it's supposed to be shorthand for what you just did, yes? | 11:47 | |
.* is more or less .int, I mean. | |||
At least, that's what TimToady said last night. :) | 11:48 | ||
masak | I wouldn't know, I tend to stay away from the closure-creating magic of * | ||
colomon | (Well, he said it was -> $key { +$key }, but it's all the same idea.) | ||
rakudo: say (sort -> $key { +$key }, <1 2 10>).perl | 11:49 | ||
p6eval | rakudo 6999e5: OUTPUT«["1", "2", "10"]» | ||
11:52
wayland76 left
|
|||
colomon | Any notion where the test cases for something like +* would be? I'm trying to figure out if I should file a bug report. | 11:52 | |
masak | colomon: t/spec/S02-builtin_data_types/whatever.t | 11:55 | |
colomon | masak++ | 11:57 | |
masak | @karma masak | 12:01 | |
lambdabot | You have a karma of 271 | ||
masak | @karma jnthn | ||
lambdabot | jnthn has a karma of 457 | ||
masak | jnthn++ # many commits | ||
oh wait, the jnthn nick doesn't get autokarma from commits, does it? | 12:02 | ||
so all those karma points come from other things. that's even more impressive. | |||
12:06
ejs joined
|
|||
Matt-W | pmurias: just general aches and pains from being rather poor at falling last night | 12:07 | |
12:08
payload joined
|
|||
lisppaste3 | colomon pasted "(potential) tests for +*" at paste.lisp.org/display/84369 | 12:15 | |
colomon | Do those look okay? | ||
masak thinks so | 12:18 | ||
12:18
huf_ is now known as huf
|
|||
Matt-W sighs with relief | 12:18 | ||
I just read the 'confusing list assignment tests' | |||
I was completely baffled, but TimToady's last post explained it all to my satisfaction | 12:19 | ||
hurrah! | |||
jnthn | masak: My Pugs commit bit is under jnthn | 12:21 | |
masak: But I guess my Rakudo commits aren't. | |||
Oh, akshually, I think they are. | 12:22 | ||
masak | ah, ok. | 12:23 | |
Matt-W | @karma Matt-W | 12:24 | |
lambdabot | You have a karma of 12 | ||
Matt-W | whee | ||
jnthn | IT'S A PIPE BOMB....YAAAAY! | 12:30 | |
masak | I'm sorry? | 12:31 | |
jnthn | Ah, wayland76 is the gone. | 12:32 | |
He posted a link to www.youtube.com/watch?v=Tx1XIm6q4r4 earlier on today, which I just watched. | |||
masak watches it too | 12:35 | ||
yay! | |||
pugs_svn | r27792 | colomon++ | Add tests for +* | 12:37 | |
12:38
jauaor joined
12:39
ruoso joined
|
|||
jnthn deals with the masakticket. | 12:39 | ||
ruoso | ¡Hello! | 12:40 | |
jnthn | oh hai, ruoso | 12:41 | |
masak | ¡OH HAI! | ||
ruoso | what's up in the Perl 6 land? | 12:42 | |
jnthn | Pipe bomb admiration, random bits of implementation progress. | ||
masak | oh? what implementation progess? :) | ||
jnthn | rakudo: class Foo { method ^bar($obj) { say 42 } }; Foo.new.bar; Foo.new.^bar | 12:43 | |
p6eval | rakudo 6999e5: OUTPUT«4242» | ||
jnthn | Class methods for one. | ||
masak wants new things to punch until they blow up -- wondermark.com/520/ | 12:44 | ||
jnthn: wow, cool! | |||
ruoso | jnthn, you know that's a part of S12 I never really digested | ||
jnthn | ruoso: There's an easy-enough way to implement it. | ||
ruoso | jnthn, are you installing that method in the metaclass instance? | ||
jnthn | Right | ||
I stick it in an anonymous role and mix it into the metaclass instance. | 12:45 | ||
TimToady didn't have an immediate OH NOES at that approach. | |||
And it builds trivially on existing primitives. | |||
ruoso | jnthn, but you're still using one metaclass instance for each type.. | ||
jnthn | ? | ||
You say that as if it's something you expect to change? | |||
(I'm not expecting it to.) | 12:46 | ||
ruoso | it is possible to haev a single metaclass instance shared among several types | ||
Matt-W | jnthn: should that bar method be callable as Foo.^bar? | ||
jnthn | Matt-W: Yes. | ||
colomon | rakudo: say sort(&[<=>], <1 10 2 3>).perl | ||
Matt-W | excellent | ||
p6eval | rakudo 6999e5: OUTPUT«Statement not terminated properly at line 2, near "(&[<=>], <"in Main (src/gen_setting.pm:3359)» | ||
jnthn | Matt-W: You'd just better make sure it knows to take a parameter for the instance it's dealing with. | 12:47 | |
ruoso | Matt-W, it could even be called as Foo.HOW.bar(Foo) | ||
jnthn | Right | ||
masak | colomon: that &[<==>] is not supported yet. | ||
er, s/==/=/ | |||
Matt-W | jnthn: naturally. I'm not sure I get what's different with a ^ method then. | ||
Matt-W looks at the spec | |||
jnthn | ruoso: I guess if you're sharing a single mtaclass instance over many times, the thing is going to end up shared. | ||
colomon | masak: I'd gathered as much from my experiments. | ||
jnthn | Matt-W: It's a method called on the metaclass. | 12:48 | |
masak | colomon: feel free to file a TODO ticket to RT if you want. | ||
ruoso | jnthn, just to make sure people is aware of that | ||
jnthn | Matt-W: $foo.^methods for example is sugar for $foo.HOW.methods($foo) | ||
Matt-W | jnthn: yes, but defining them in a class called Foo inserts them into Foo's metaclass (as relating to the instance of it that exists to service Foo, presumably)? | ||
So then, what do you use them for? | |||
jnthn | Matt-W: They function as more traditional class methods. | 12:49 | |
Matt-W: That is, a method foo() { ... } may be called. | |||
ruoso | jnthn, except that they don't | ||
jnthn | On a non-istance. | ||
ruoso | jnthn, class methods usually don't require special syntax | ||
jnthn, and this is really a meta-method | |||
jnthn | ruoso: Tell that to S12. ;-) | 12:50 | |
Matt-W | the syntax for it is irrelevant | ||
Java class methods need special syntax anyway | |||
jnthn | Also, class methods often *do* need special syntax. Consider C#. | ||
ruoso | jnthn, I've been trying to :) | ||
Matt-W | jnthn: so what does a class method get as self? the metaclass instance? | ||
ruoso | Matt-W, yes | ||
jnthn | Matt-W: Correct | ||
Matt-W | aaah | ||
okay | |||
it becomes clearer | |||
jnthn | Plus the instance as the first parameter. | ||
Thus why you need to take a $obj there. | 12:51 | ||
ruoso | the instance, meaning the class | ||
jnthn | Right, instance of the class. | ||
ruoso | since it's a "class" method | ||
Matt-W | if you wanted to do the kind of stuff you can do with static members in C++, you could do it with class methods and maybe sticking some extra attributes into the metaclass | ||
ruoso | Matt-W, that doesn't sound sane | ||
Matt-W | doesn't it? | ||
jnthn | S12 gives the example of an "our" variable. | 12:52 | |
Matt-W | mmm package scope of course. Mustn't forget classes are still packages. | ||
ruoso | I really think S12 needs a patch there... method ^bar is not adding a method to the class, it's adding it to the meta-class | ||
which is a completely different beast | 12:53 | ||
and might have completely different side-effects | |||
including making that same meta-method visible in other classes | |||
Matt-W | certainly S12 doesn't mention getting the instance as a parameter | ||
ruoso: I think it's not unreasonable to assume that if the compiler sees you adding metamethods, it'll ensure that the class which does it has its own instance of the metaclass | 12:54 | ||
jnthn | ruoso: The "making it visible in toher classes" doesn't happen in Rakudo. | ||
ruoso: It really depends on the meta-class. | |||
ruoso | jnthn, doesn't happen in the default type system | ||
jnthn | ruoso: I don't think the spec justifies that assumption. | ||
ruoso | jnthn, the spec says you can have different type systems... that's the reason for having a metaclass | 12:55 | |
jnthn | Oh for sure, but it also suggests that the default ClassHOW is not a singleton. | ||
There are multiple mentions of "metaclass instance" | 12:56 | ||
ruoso | right... but either way, saying that "method ^bar" is a class method is simply wrong | ||
Matt-W | And if you're using a different type system, different semantics for certain things are desired, so there's no reason to exclude the possibility... | ||
jnthn | Alternately, you can associate a class method with the current metaclass instance, | ||
ruoso | Matt-W, I don't want to exclude it... | ||
I just want it to be properly documented | |||
jnthn | Yes, you could remove the word "class" from there. | ||
Matt-W | jnthn: actually you probably should, it's not a helpful word there | ||
because it's still a method | |||
jnthn | I agree the word "class" in that sentence should go away | ||
Matt-W | and it should mention the parameters it'll get | 12:57 | |
jnthn | "associate a method with the current metaclass instance" | ||
Matt-W | much better | ||
jnthn | Is probably fine though | ||
Matt-W | the section title is fine I think, it's a section on how to achieve things which behave like class methods from other languages | ||
jnthn | ruoso: Fine with removing the word "class" there? | ||
ruoso | jnthn, yewah | ||
jnthn | ruoso: OK. Plus as Matt-W suggests, note that you really should remember to take the current object? | 12:58 | |
As an argument? | |||
(since .^ syntax passes it...) | |||
ruoso | the signature of the method gets an explicit ($metaclass: $class) in the beggining | 12:59 | |
Matt-W | $class is the class object, rather than any particular instance of it? | ||
jnthn | rakudo: use Test; role R4 { has @!foo; method bar() { @!foo } }; class C5 does R4 { has $.baz; }; is C5.new().bar(), [], 'Composing an attribute into a class that already has one works'; | 13:00 | |
ruoso | $class as in $class.^method | ||
p6eval | rakudo 6999e5: OUTPUT«Null PMC access in type()in Main (/tmp/gk53YKk2ns:2)» | ||
13:00
pmurias left
|
|||
Matt-W | ruoso: just checking I'd got it straight | 13:00 | |
jnthn | ruoso: Gets that implicitly? | ||
:-S | |||
Matt-W | talking these things through is usually a good way to find out if the documentation is good enough | ||
ruoso | jnthn, yeah... | ||
jnthn | That being provided implicitly is an interesting idea, but not suggested by curent spec. | 13:01 | |
ruoso | jnthn, actually, it's implicitly called with that | ||
jnthn | Correct. | ||
.^ does that. | |||
ruoso | but... | ||
Matt-W | that needs to be noted | ||
ruoso | when you do method foo { }; | 13:02 | |
it creates an empty signature (with just the invocant) | |||
when you create method ^foo {} | 13:03 | ||
it needs to have the signature with the two element | |||
otherwise it won't work | |||
jnthn | "won't work" in so far as "you need to write the signature yourself"? | ||
Matt-W | surely the invocant can remain implicit | ||
ruoso | well... you can explicitly ask for the complete signature | 13:04 | |
rakudo: class A { method ^b { 42 } }; say A.^b | 13:05 | ||
p6eval | rakudo 6999e5: OUTPUT«positional inside named args at position 2in method A::b (/tmp/X9Pwv6i03t:2)called from Main (/tmp/X9Pwv6i03t:2)» | ||
pugs_svn | r27793 | jnthn++ | [t/spec] Test for RT#7992. | ||
dalek | kudo: 3910fce | jnthn++ | src/builtins/guts.pir: Fix bug in role attribute composition introduced with fix for attribute ordering. Fixes RT#67992. |
13:06 | |
jnthn | ruoso: I suspect that one should work as default signature should take a *@_? | ||
ruoso | jnthn, it should only take *@_ when you use placeholders | 13:07 | |
jnthn | Ah | ||
No signature is like () | |||
masak: Hopefully that commit fixes your Druid issue. | 13:08 | ||
masak | jnthn: many thanks. I'll try it immediately. | ||
ruoso | jnthn, the error for the code I tried could be "meta methods require an additional parameter" | 13:09 | |
13:09
meppl joined
|
|||
ruoso | jnthn, and that could happen at compile time | 13:09 | |
pugs_svn | r27794 | jnthn++ | [spec] Remove the word 'class' from a sentence where it adds confusion to the meaning. | ||
jnthn | ruoso: Yes, we could try and detect that. | ||
masak: Great. :-) | 13:10 | ||
moritz_ | you can still call it $obj.HOW.meth(),no? | 13:12 | |
PerlJam | greetings #perl6 | 13:13 | |
13:14
al23 left
|
|||
moritz_ | oh hai PerlJam | 13:14 | |
Juerd | In case people haven't heard yet - perlmonks password list was published | ||
PerlJam | Juerd: perlmonks-- | ||
ruoso | moritz_, you need to send $obj as a positional | ||
13:14
SmokeMachine joined,
al23 joined
|
|||
Juerd | PerlJam: Definitely. I'm angry. | 13:14 | |
crypt() has been in perl forever. | 13:15 | ||
ruoso | Juerd, the hashes or in plain text? | ||
Juerd | ruoso: Very much plain text. | ||
ruoso | Juerd, gah | ||
Juerd | r00tsecurity.org/files/zf05.txt has the list | ||
For example, my password was "potstal" | |||
al23 | Hi! Did anybody found list reduction by n-ary functions (n > 2) useful? Should it take missing elements to be undef or drop extra elements? | 13:16 | |
PerlJam | Juerd: are the still vulnerable? (Would changing my password make any difference?) | ||
s/the/they/ | |||
moritz_ | al23: I think it should die | ||
Juerd | PerlJam: I haven't read any message about it being fixed. | ||
PerlJam | :-( | 13:17 | |
Juerd | PerlJam: However, it'll still be useful to change it now even if they're still compromised. zf05.txt is static | ||
al23 | rakudo: (1..4).reduce({$^a + $^b + $^c}) | ||
p6eval | rakudo 6999e5: OUTPUT«1 trailing item(s) in reduce» | ||
moritz_ | oh wait | ||
al23 | rakudo: say (1..4).reduce({$^a + $^b + $^c}) | ||
p6eval | rakudo 6999e5: OUTPUT«1 trailing item(s) in reduce6» | ||
ruoso | Juerd, is that the only list? my user doesn't seem to be ther | ||
moritz_ | we had a discussion of that with TimToady some time ago | ||
I think it was agreeed to drop and warn. | |||
Juerd | PerlJam: And of course, if you used the same password in several places, like I did, you must change it in the other places too. | ||
al23 | pugs: say (1..4).reduce({$^a + $^b + $^c}) | ||
p6eval | pugs: OUTPUT«10» | ||
Juerd | ruoso: That's the published list. They have all passwords, whether published or not. | 13:18 | |
al23 | moritz_: spec does mention n-ary reduction. But is it specified how it should treat extra elements? | 13:19 | |
PerlJam | On a more positive note, for those that missed it last night ... I'm going to attempt to blog :-) See perlpilot.blogspot.com | ||
moritz_ is glad that they acquired only an old list with an old password of mine | |||
al23: it's agreed upon, not yet specced. But it should be in the spec | 13:20 | ||
ruoso | how old is the list? | ||
moritz_ | al23: so feel free to add it | ||
ruoso: April | |||
PerlJam | moritz_: I'm glad I used my most absolute throw away password | ||
masak is glad he wasn't registered in April | |||
still perlmonks-- | |||
moritz_ | it was an old database server that wasn't being updated anymore | ||
Matt-W | ouch | ||
that's really bad | 13:21 | ||
al23 | moritz_: Actually, I think n-ary reduction is useless and illogical. | ||
PerlJam | still ... passwords in plain text ... What are we? PHP folks? | ||
Juerd | 15:20 <@PerlJam> moritz_: I'm glad I used my most absolute throw away password | ||
Same here. | |||
But apparently I did use the same password on CPAN. | |||
moritz_ | al23: then don't use it. | ||
Matt-W | PerlJam: no, they know better. | ||
13:21
skids_ joined
|
|||
Juerd | PerlJam: PHP also has crypt. | 13:22 | |
masak | I hope some constructive blog posts come out of this. | ||
Juerd | I just hope everyone changes their passwords quick enough | ||
pugs_svn | r27795 | jnthn++ | [t/spec] Tweak, unfudge and extend some tests for method ^foo syntax. | ||
13:23
jimmy_ joined
|
|||
moritz_ | PerlJam: did you already submit it to the ironman feed? | 13:23 | |
Juerd | List has been public for almost a day now. More and more people read the passwords | ||
PerlJam | moritz_: I did not. | 13:24 | |
masak | from the hack file: "These Perl guys are alright, just a little dumb apparently." -- my sentiments exactly. | ||
moritz_ | PerlJam: you should, then I don't have to follow your feed indivually | ||
Juerd | I'm beginning to think that maybe perlmonks should pre-emptively just block accounts | ||
PerlJam | moritz_: got a quick link to it? | ||
Juerd | Before the entire site is defaced (you can edit old posts forever) | ||
PerlJam | moritz_: nevermind, google was quick enough :) | 13:25 | |
13:30
hercynium joined
|
|||
masak | maybe I should make a blog post where I analyze those passwords (anonymized) using Perl 6... | 13:32 | |
something like "number of pwds containing only letters", "only numbers", "only lowercase letters" etc. | 13:33 | ||
moritz_ | masak: please do. Then there'll be at least one positive aspekt | ||
*aspect | |||
masak | it's a deal, then. | ||
moritz_ | mixing de and en isn't good :/ | ||
masak | istn't gut. :) | ||
Juerd | My password is one of those ^<alpha>+$ ones | 13:34 | |
jnthn | moritz_: Often it just ends up looking like English spelt more sanely. ;-) | ||
moritz_ | :-) | 13:35 | |
Matt-W | german spelling is great | 13:36 | |
colomon | PerlJam: lovely post on the Euler #52. | 13:37 | |
moritz_ | no. Capitalizing all Nouns is reall a bad Idea | ||
Matt-W | That's not really spelling though | 13:38 | |
masak | jnthn: Druid iz teh works again! \o/ jnthn++ | ||
jnthn | masak++: Yay! | ||
Matt-W | That's just a typographic thing, the letters you use are still the same | ||
figuring out pronunciation from the letters is much easier in German | |||
moritz_ | it just took 70minutes on my machine (the Eluer #52 program) | ||
vs. 1.2 seconds in my Perl 5 version :/ | 13:39 | ||
jnthn | omfg | ||
PerlJam | yeah. rakudo is *slow* | ||
pmichaud | Good morning #perl6 | ||
colomon | Typical, IME. | ||
jnthn | There's slow and there's glacial... | 13:40 | |
PerlJam | colomon: thanks | ||
jnthn | pmichaud: morning | ||
colomon | I'm pretty sure I've got one good optimization for this Euler #52 program. | ||
masak | morning, pmichaud. | 13:41 | |
13:41
abra joined
|
|||
moritz_ | a good optimization is "don't check it unless chars($n*2) == chars($n*6) | 13:42 | |
13:42
adhoc joined
|
|||
colomon | thought that one was implied in the last code? | 13:43 | |
PerlJam | That's what it does, yes. | ||
moritz_ | colomon: implied, but it's much faster to check first | ||
colomon | don't check unless $n is divisible by 3 | ||
PerlJam | Benchmark! | 13:44 | |
:) | |||
moritz_ benchmarks the chars() == comparison | |||
colomon: why does it have to be divisible by 3? | 13:45 | ||
PerlJam | colomon: I don't get it. how does that help? | ||
colomon | 3*$n will be divisible by 3 | ||
so its digits will also be divisible by 3, right | 13:46 | ||
moritz_ | oh. | ||
right | |||
I forgot the divisibility rules | |||
colomon | so the digits to any answer must be div by 3 | ||
pmichaud | so one can do $n += 3 | ||
PerlJam | colomon: now blog about it! :) | ||
moritz_ | right. | ||
pmichaud | and reduce the number of loops by 3 | ||
(factor of 3) | |||
...and maybe stick the example into perl6-examples repo | 13:47 | ||
(if it's not there already) | |||
13:47
hoelzro joined
|
|||
PerlJam | maybe rakudo being so slow is a good thing. Not only do we get the problems solved, but people spend time optimizing them to death so that they run in a reasonable time. | 13:48 | |
Matt-W | then when rakudo is fast, they'll be incredibly quick | 13:49 | |
colomon | any answer must have a 0 digit? maybe -- trying to figure out how to leverage the 5*$n portion. | ||
but I'm also watching a ten-month-old, which makes thinking tricky. | 13:50 | ||
moritz_ | colomon: no, doesn't have to have a 0 digit, if $n is odd | ||
colomon | I'm getting confused because I keep thinking $n is also one of the sets of digits being compared. | 13:51 | |
2 * $n has to have a 0 or 5 | 13:52 | ||
moritz_ | right | ||
colomon | because 5 * $n will end with one of those. | ||
but 2 * $n doesn't have to end with a 0 or a 5, so you can't rule out the 5, which is what I was trying to do above. | 13:53 | ||
PerlJam notes that there are 251 other problems to solve in Project Euler :) | 13:54 | ||
(that's why I didn't spend too much time worrying about optimization actually) | |||
colomon | but optimization is fun! | 13:55 | |
PerlJam | It's also a trap for the unwary | ||
;) | |||
moritz_ | PerlJam: many of these are much harder, so it's nice to spend more time on optimizing those where it's easy :-) | ||
pmichaud works to catch up on backscroll | 13:56 | ||
PerlJam | There are some interesting graph-type problems that would be amenable to some sort of graphical output. | ||
pugs_svn | r27796 | jnthn++ | [t/spec] Tests for :tree option to .^parents, plus for Object.^parents. | 13:59 | |
14:00
SmokeMachine left
|
|||
dalek | kudo: 6ff39ce | jnthn++ | src/classes/ClassHOW.pir: Implement :tree in .^parents; fix Object.^parents which for some crazy reason I once thought should return something other than an empty list. |
14:01 | |
colomon | Actually, is PerlJam's final Euler #52 correct? shouldn't $n = $msg / 2 when it jumps ahead? | 14:03 | |
PerlJam | colomon: be sure to post a comment when you find out I'm wrong :) | 14:05 | |
moritz_ | the perl 5 script which I wrote back in the days[tm] printed out the same | 14:07 | |
colomon | that's one of the tricky bits with this problem, I suspect -- you can get the right answer for the wrong reason | ||
I'm thinking this would be a nightmare of TDD. :) | 14:08 | ||
alester | So who is working on "make install"? | 14:09 | |
Is anyone? | |||
Can I pitch in there somehow? | 14:10 | ||
pmichaud | alester: I'm currently working on "make install" | ||
I have a patch or two to apply. The work is in the "ins2" branch of github. | |||
alester | As soon as we have a "make install" released, I'm going to be doing a series of "cool Perl 6 thing of the day*" for Perlbuzz | ||
* for varying values of "day" | |||
PerlJam | and a strawberry perl 6 can't be too far behind a working make install either | 14:11 | |
;) | |||
pmichaud | afaik, the only remaining issue is getting it to build properly with Sun's compiler | ||
particle++ reported yesterday tht it's working with msvc | 14:12 | ||
alester | is there anything you need from me, pmichaud ? | ||
pmichaud | just testing that it works on various platforms | 14:13 | |
comments on it are helpful also (as in, does this work the way we expect?) | |||
alester | I don't think I ahve anything more "various" than we have already | ||
ok | |||
14:14
KyleHa joined
|
|||
pmichaud | TimToady++ # I _really_ like the new organization of perl6-projects.org | 14:14 | |
14:15
al23` joined
14:16
pmurias joined
|
|||
jnthn | Ooh, layout issues I spotted before are fixed too. Nice! | 14:20 | |
14:20
al23`` joined
14:21
nihiliad joined
|
|||
zamolxes | i wonder if the download button should be visible without a vertical scroll? | 14:21 | |
moritz_ | for me the right column starts a few millimeters further down than the rest | ||
14:22
SmokeMachine joined
|
|||
jnthn | moritz_: Now I look closely, I see that too | 14:22 | |
PerlJam | what browsers are you guys using? It looks fine to me on FF | 14:23 | |
jnthn | PerlJam: Also FF | ||
(3.0.12) | |||
PerlJam | same here | 14:24 | |
on ubuntu | |||
moritz_ | ff 3.0.6 | ||
(iceweasel on Debian) | |||
colomon | for me the right column starts very noticeably further down than the rest -- looks like it is being offset by Camelia's wing sticking out above it. | ||
FF 3.5.1, BTW | |||
jnthn | lolie7 | 14:25 | |
Typically, IE7 gets it wrong. | |||
ruoso glad that Perl 6 communication is becoming more and more gender-friendly... | |||
jnthn | Safari has the right column starting very noticably furtehr down too. | ||
ruoso | specially in a time when some other communities enforce sexism in such ugly ways | ||
14:27
al23``` joined
|
|||
[particle] | moritz_: yes, on ff 3.5 i see the right column lower | 14:28 | |
er, colomon | |||
sorry, too damned hot to sleep comfortably, i'm not all here | |||
Su-Shee | hm. that layout isn't supposed to look that way. ;) | 14:30 | |
[particle] doesn't require scrolldown with 1280x1024 monitor | |||
i think the download button might be better in the header, or as a horizontal bar above community/specification/compilers | 14:31 | ||
Su-Shee | (it was placed right in the middle of the center to not have to scroll.. ;) | ||
[particle] | but 900px monitors do need to scroll down | 14:32 | |
PerlJam | that bit of vertical white space between the header and the other boxes bothers me. Maybe a thin download box could work there. | ||
14:32
al23 left
|
|||
[particle] | pj: that's what i'm thinking | 14:32 | |
Su-Shee | yeah because the blue box didn't have that much text in it when I started. | ||
[particle] | and eventually, it could include more than just one distro | 14:33 | |
there should be a comma after 'Perl programming language' in the header text | |||
pmurias | ruoso: how will we implement things like return $prototype.bless($prototype.CREATE(), |@protoobjects, |%initialize); | ||
pugs_svn | r27797 | jnthn++ | [t/spec] Tests for .^attributes with the :tree option. | 14:34 | |
14:34
ejs1 joined
|
|||
moritz_ | [particle]: feel free to patch it | 14:34 | |
pmichaud | I disagree about the comma. | ||
jnthn | Debatable. | ||
PerlJam | me too, it looks fine the way it is | 14:35 | |
jnthn | It changes the meaning if you put a comma there. | ||
[particle] | it makes the meaning correct with the comma | ||
Perl 6 is the next major version of the Perl programming language. | |||
Perl 6 is currently being developed by a team of enthusiastic volunteers. | 14:36 | ||
ruoso | pmurias, you mean the capture composition | ||
? | |||
14:36
al23` left
|
|||
pmichaud | particle: so is "the next major version of the Perl programming language" | 14:37 | |
[particle] | there's no Foo, the next major version of the Perl programming language currently being developed by ruthless elves. | ||
PerlJam wonders if there's a term for bikeshedding punctuation ... :) | |||
pmichaud | really? I thought that was 5.12 :-P | ||
masak thinks the ruthless elves are doing a great job | 14:38 | ||
pmurias | ruoso: yes | ||
dalek | kudo: b6f792c | jnthn++ | src/classes/ClassHOW.pir: Implement :tree option for attribute introspection. |
||
pmichaud | does anyone else think that having "team of enthusiastic volunteers" as a link would be a good idea? ;-) | 14:39 | |
ruoso | pmurias, I started sketching something about it in the wiki some time ago | ||
pmurias | ruoso: btw what should i be working on now? | ||
PerlJam | pmichaud: is there a page that lists the team somewhere? or is that the corollary? | ||
jnthn | pmichaud: It depends what it points to. :-P | ||
pmichaud | PerlJam: that's the corollary | ||
I'm always a fan of showing the people involved in a project | |||
ruoso | pmurias, on getting ClassHOW.pm to compile | ||
pmurias, we're still waiting on a TimToady's answer on the S11 issue | 14:40 | ||
pmurias | ClassHOW does a lot of things incorrectly | ||
PerlJam | pmichaud: do we each get little super-hero avatars next to our bios ? :) | ||
ruoso | pmurias, but even when we fix the code, a lot of the features will be the same | ||
pmichaud | PerlJam: Perhaps. Although the p5p BOF at OSCON was talking about merit badges. :-) | ||
pmurias | do we need ($how: ....) or is using self enough? | 14:41 | |
ruoso: there is a lot of stuff in ClassHOW that could be rewritten in a much simpler way | 14:42 | ||
ruoso | pmurias, feel free to make such changes | ||
14:42
ejs left
|
|||
pmurias | perl6: my $foo = 1 if 0;say $foo; | 14:42 | |
p6eval | elf 27797: OUTPUT«Global symbol "$foo" requires explicit package name at (eval 122) line 6. at ./elf_h line 5881» | ||
..rakudo 3910fc: OUTPUT«Null PMC access in isa()in Main (/tmp/rItcVnISQp:2)» | |||
..pugs: OUTPUT«» | |||
14:43
al23`` left,
kidd_ joined
14:45
szabgab left
14:46
jferrero joined
14:47
al23``` left
|
|||
pmurias | ruoso: shouldn't bless be moved to Object? | 14:49 | |
ruoso | pmurias, my idea is that only the HOW should use the REPR API | ||
14:50
ejs1 left
|
|||
jnthn | ruoso: That's something I'm aiming for also. | 14:51 | |
ruoso | pmurias, www.perlfoundation.org/perl6/index...._expansion the sketches I mentioned | ||
pmurias, maybe the native capture could provide a "capture expansion mode" | 14:52 | ||
pmurias, but, actually, I think that notes are prior to the idea that a unflattened list is just a capture | |||
which means that the native capture need to be able to expand inner captures when fetching the positionals | 14:53 | ||
jnthn, are you using the .^!foo notation also? | |||
PerlJam | alester: your vim-perl email seems to be missing some words. The second paragraph ends with "...to have the support files installed into your" I can guess what's missing from that sentence, but I didn't know if maybe there was more that got truncated. | 14:54 | |
14:55
M_o_C joined
|
|||
jnthn | ruoso: No | 14:56 | |
ruoso: No current plans to adopt that. | |||
ruoso | jnthn, right... STD already parses it, fwiw | ||
jnthn | ruoso: But OTOH no immediate plans for making alternate representations work. | ||
ruoso: I'm happy we're going to be able to now. | 14:57 | ||
ruoso | std: say $a.^!b | ||
jnthn | ruoso: Which I wasn't before. | ||
p6eval | std 27797: OUTPUT«Potential difficulties: Variable $a is not predeclared at /tmp/E5vLvM648E line 1:------> say $a⏏.^!bok 00:02 37m» | ||
moritz_ | std: 1.^!b | ||
p6eval | std 27797: OUTPUT«ok 00:02 36m» | ||
ruoso | jnthn, that's great... it's nice to see different efforts helping each other... | ||
jimmy_ | rakudo: say $a.^!b | ||
p6eval | rakudo b6f792: OUTPUT«Statement not terminated properly at line 2, near ".^!b"in Main (src/gen_setting.pm:3359)» | 14:58 | |
jnthn | ruoso: If STD is parsing that too, then it doesn't look like such a crazy syntax. | ||
alester | PerlJam: yeah, I goofed when I sent it | ||
ruoso | jnthn, think of it as "meta-private-method" | ||
jnthn | ruoso: So I don't see why Rakudo wouldn't be able to adopt that syntax for calls to the representation too. | 14:59 | |
ruoso | that'd be great | ||
if we manage to sync the APIs too, it would the ideal world... | 15:00 | ||
because it would mean we would be able to share HOW implementations | |||
jnthn | Sure, I'm just not sure the world is sufficiently ideal on that yet. | 15:01 | |
Our repr API is basically Parrot's vtable API. | |||
15:02
zamolxes_ joined
|
|||
jnthn | Perhaps the best hope is that we may be able to do some name mapping in the .^! calls. | 15:02 | |
Or similar. | |||
ruoso | maybe we could change p6opaque to implement something closer to that | ||
jnthn | Maybe. | ||
For now though, I think it's best put off until Rakudo is looking at supporting this stuff. | |||
(Which will be a little bit away yet, I suspect.) | 15:03 | ||
15:03
zamolxes left
|
|||
ruoso | jnthn, is there a concise document on the vtable API? | 15:03 | |
pugs_svn | r27798 | jnthn++ | [t/spec] Tests for :tree option for .^roles. | 15:04 | |
pmurias | ruoso: shouldn't it be $candidate.^!does = [] instead of $candidate.^!does = ()? | 15:05 | |
jnthn | ruoso: docs.parrot.org/parrot/latest/html/...c.pod.html and see Vtable functions section. | ||
ruoso: Though only a subset of those would be needed to make up the repr API. | 15:06 | ||
15:06
abra left
|
|||
ruoso | pmurias, I'm not sure... | 15:06 | |
jnthn | If it's meant to be a mutable array you're assigning there, I'd guess [] | ||
ruoso | jnthn, ouch... that's a huge list | 15:07 | |
rakudo: my $a = (); $a.push(1); | 15:08 | ||
p6eval | rakudo b6f792: OUTPUT«Method 'push' not found for invocant of class 'Failure'» | ||
jnthn | ruoso: Sure, thus "subset". :-) | ||
ruoso | jnthn, :) I guess I'll wait you to compile that subset ;) | ||
jnthn | rakudo: my $a = []; $a.push(1); | ||
p6eval | rakudo b6f792: ( no output ) | ||
jnthn | ruoso: :-) | 15:09 | |
That's fine by me. :-) | |||
ruoso | pmurias, yeah... I think [] is ok | ||
dalek | kudo: c4f0a93 | jnthn++ | src/classes/ClassHOW.pir: [t/spec] Support :tree option for .^roles. |
15:10 | |
15:10
icwiener joined
15:11
nihiliad left
15:14
nihiliad joined
15:16
zamolxes_ is now known as zamolxes
|
|||
pmurias | ruoso: BUILDALL in ClassHOW uses a context var, i don't know what for | 15:19 | |
ruoso | pmurias, to initialize the attributes of each type in the hierarchy | 15:20 | |
15:20
donaldh left,
donaldh joined
|
|||
pmurias | ruoso: what uses that variable | 15:21 | |
15:21
szabgab joined
|
|||
ruoso | pmurias, method BUILD in the object | 15:22 | |
15:25
solarion left
|
|||
pmichaud finally catches up with backscroll | 15:26 | ||
(on #perl6) | |||
jnthn | quick everybody type loads! | 15:27 | |
;-) | |||
pugs_svn | r27799 | jnthn++ | [t/spec] Tests for .rw and .readonly attribute introspection. | 15:28 | |
jnthn | Whee. I think Rakudo's introspection capabilities are looking pretty good now. :-) | 15:29 | |
moritz_ | aye | ||
now I just want to get the value of private attributes | |||
you can't write serialization without that. | 15:30 | ||
ruoso | std: class A { method b($object: *%initialize) { my $key = "a"; $object.::($*CLASS)!"$key" = %initialize{$key}; } }; | ||
p6eval | std 27798: OUTPUT«ok 00:04 39m» | ||
jimmy_ | rakudo:class A { method b($object: *%initialize) { my $key = "a"; $object.::($*CLASS)!"$key" = %initialize{$key}; } }; | ||
rakudo: class A { method b($object: *%initialize) { my $key = "a"; $object.::($*CLASS)!"$key" = %initialize{$key}; } }; | |||
p6eval | rakudo b6f792: ( no output ) | ||
moritz_ | $object.:: is bound to confuse rakudo | 15:31 | |
I'm surprised it acutally parses | |||
ruoso | rakudo: class A { has $.a; method b($object: *%initialize) { my $key = "a"; say $object.::($*CLASS)!"$key"; } }; my $a = A.new; $a.a = 4; $a.b | ||
p6eval | rakudo b6f792: OUTPUT«Cannot assign to readonly variable.in Main (/tmp/gOpFwG9YzD:2)» | 15:32 | |
ruoso | rakudo: class A { has $.a is rw; method b($object: *%initialize) { my $CLASS = "A"; my $key = "a"; say $object.::($CLASS)!"$key"; } }; my $a = A.new; $a.a = 4; $a.b | ||
jnthn | I'm surprised it parses too. | ||
p6eval | rakudo b6f792: OUTPUT«Method '::($CLASS)' not found for invocant of class 'A'» | ||
ruoso | heh | ||
jnthn | oh heh | ||
15:32
cj_ joined
|
|||
jnthn | It parses it then stringififes. :-) | 15:32 | |
mkelly32 | is there some equivalent to ruby's Object#public_methods? | ||
jimmy_ | ;) | ||
jnthn | mkelly32: I don't know Ruby well enough to know what that does. | 15:33 | |
moritz_ | rakudo: say 3.methods.map({.name}).join: ", " | ||
p6eval | rakudo b6f792: OUTPUT«Method 'methods' not found for invocant of class 'Int'» | ||
jnthn | ^ | ||
moritz_ | rakudo: say 3.^methods.map({.name}).join: ", " | ||
p6eval | rakudo b6f792: OUTPUT«pred, succ, WHICH, ACCEPTS, perl, Scalar, abs, Str, trim, chr, floor, rand, truncate, round, sort, rindex, sqrt, split, match, grep, words, values, can, lcfirst, srand, Complex, map, polar, cis, kv, samecase, log, min, capitalize, max, first, trans, flip, does, Int, p5chop, | ||
..lc, sub… | |||
mkelly32 | jnthn: ruby-doc.org/core/classes/Object.html#M000365 | 15:34 | |
moritz_ | rakudo: say 3.^methods.join: ", " | ||
p6eval | rakudo b6f792: OUTPUT«succ, perl, ACCEPTS, WHICH, Scalar, 2, Str, pred, p5chop, lc, join, 1, can, lcfirst, roots, reduce, 1, trim, map, 1, cis, 1, 1, 1, min, rand, max, 1, bytes, 1, 1, 1, grep, 1, 1, uc, ceiling, p5chomp, unpolar, samecase, floor, 1, ord, round, flip, does, 1, split, 1, words, | ||
..srand, re… | |||
jimmy_ | rakudo: say '3'.^methods.map({.name}).join: ", " | ||
p6eval | rakudo b6f792: OUTPUT«pred, encode, succ, ACCEPTS, perl, WHICH, sprintf, Scalar, reverse, isa, ucfirst, kv, samecase, capitalize, fmt, bytes, flip, does, p5chop, lc, reduce, chr, :d, :e, :f, comb, floor, round, chop, split, match, words, can, lcfirst, uc, Complex, srand, keys, polar, map, cis, log, | ||
..subs… | |||
jimmy_ | rakudo: say "3".^methods.map({.name}).join: ", " | ||
p6eval | rakudo b6f792: OUTPUT«WHICH, perl, ACCEPTS, sprintf, Scalar, pred, encode, succ, min, capitalize, max, first, trans, flip, Int, does, p5chop, lc, subst, elems, abs, chomp, end, reduce, index, ceiling, p5chomp, :d, pairs, :e, :f, comb, unpolar, ord, chop, int, chars, roots, uc, reverse, keys, isa, | ||
..ucfirs… | |||
moritz_ | jimmy_: what are all these 1? | ||
dalek | kudo: a48b31a | jnthn++ | src/ (3 files): Implement .rw and .readonly for attribute introspection. |
||
ruoso | rakudo: say 3.^methods(:local).map({.name}).join: ", " | ||
moritz_ | sorry, meant to ask jnthn | ||
p6eval | rakudo b6f792: OUTPUT«Str, pred, succ, WHICH, ACCEPTS, perl, abs, Scalar» | ||
ruoso | rakudo: say 3.4.^methods(:local).map({.name}).join: ", " | 15:35 | |
p6eval | rakudo b6f792: OUTPUT«asec, cotanh, acotanh, sech, ACCEPTS, atan, asech, acos, tanh, asin, atanh, cosec, cosh, succ, acosh, perl, WHICH, cotan, atan2, Scalar, sec, tan, cos, sin, pred, acosec, sinh, asinh, cosech, acotan, acosech, Str» | ||
jnthn | mkelly32: Returns the list of public methods accessible to obj. # does that mean all the methods that can be called on it? | ||
mkelly32: Then yes, .^methods | 15:36 | ||
ruoso | for the ones declared by it, .^methods(:local) | ||
jimmy_ | rakudo: say '3'.^methods.map({.name}).join: ", " | ||
mkelly32 | jnthn: yeah, ok. thanks. | ||
p6eval | rakudo b6f792: OUTPUT«WHICH, perl, ACCEPTS, sprintf, Scalar, pred, encode, succ, reduce, chr, :d, :e, :f, comb, floor, round, chop, split, match, words, can, lcfirst, uc, Complex, srand, keys, map, polar, cis, log, substr, min, max, pick, first, evalfile, trans, Int, join, subst, elems, abs, end, | ||
..chomp,… | |||
jimmy_ | rakudo: say '3'.^methods.map({.name}).join: ", " | ||
p6eval | rakudo b6f792: OUTPUT«pred, encode, succ, ACCEPTS, perl, WHICH, sprintf, Scalar, flip, does, chars, can, lcfirst, roots, Complex, map, cis, comb, log, min, max, bytes, chop, rindex, Int, values, abs, end, ceiling, p5chomp, keys, kv, unpolar, floor, ord, capitalize, pick, evalfile, round, int, | ||
..split, mat… | |||
jimmy_ | seems that the results are not the same, lazy list? | 15:37 | |
pmichaud | rakudo: say Num.^methods(:local).map({.name}).join: ", " | ||
moritz_ | hash keys/values I s soppose | ||
p6eval | rakudo b6f792: OUTPUT«acotanh, ACCEPTS, asech, pred, atanh, cosec, acosh, acosec, sinh, WHICH, cotan, cosech, atan2, acotan, sec, asec, cotanh, tan, sech, atan, cos, acos, sin, tanh, asin, cosh, succ, asinh, perl, acosech, Scalar, Str» | ||
PerlJam | jimmy_: sort is your friend | ||
pmichaud | that looks wrongish to me. | ||
I would expect many of those to be in Any. | |||
jimmy_ | I don't want to sort | 15:38 | |
moritz_ | jimmy_: then don't expect a particular order | ||
pmichaud: we've had that discussion before :-) | |||
pmichaud | moritz_: sure, but there's been a spec change since then. | ||
jimmy_ | It looks like rand | ||
moritz_ | so, what's wrong about it? | 15:39 | |
TimToady | why wouldnn't there be one in both Any and Num | ||
jimmy_ | rakudo: say '3'.^methods.map({.name}) | ||
pmichaud | rakudo: say "3.2".sin | ||
p6eval | rakudo b6f792: | ||
..OUTPUT«sprintfScalarpredencodesuccACCEPTSperlWHICHabselemschompendindexceilingtrimp5chomppairsunpolarordrandtruncatesortrindexsqrtintgrepvaluescharsrootsreverseisaucfirstkvsamecasecapitalizefmtbytesflipdoesp5choplcreducechr:d:e:fcombfloorroundchopsplitmatchwordscanlcfirstucsrandComplexkey… | |||
rakudo b6f792: OUTPUT«Method 'sin' not found for invocant of class 'Str'» | |||
TimToady | the Any version just casting and calling the Num version | ||
jimmy_ | rakudo: say '3'.^methods | ||
pmichaud | TimToady: I'd be fine with that, yes. | ||
p6eval | rakudo b6f792: | ||
..OUTPUT«predencodesuccACCEPTSperlWHICHsprintfScalarflipintdoessplitmatchwordssrandreverseisapolarucfirstcombfmtfirsttranschoprindexvaluessubstelemschompindexkeyschrpairskvcapitalizepickevalfilep5choplcjoincharscanlcfirstrootsComplexreducetrim:dmap:ecis:flogminrandtruncatemaxbytessortsqrtIn… | |||
15:40
solarion joined
|
|||
jimmy_ | rakudo: say '3'.^methods.join: ", " | 15:40 | |
pmichaud | TimToady: In general, is that how you think most of this should be done? Defined in the appropriate class and then have Any cast+forward? | ||
moritz_ | pmichaud, TimToady: actually that makes re-dispatching much easier when you implement it for a new type | ||
p6eval | rakudo b6f792: OUTPUT«pred, encode, succ, perl, ACCEPTS, WHICH, sprintf, Scalar, trim, chr, floor, rand, 1, round, 1, 1, 1, split, 1, grep, words, values, can, lcfirst, 1, srand, map, 1, cis, kv, samecase, 1, min, capitalize, max, first, trans, flip, does, 1, p5chop, lc, 2, 1, 1, 1, 1, 1, reduce, | ||
..ceilin… | |||
PerlJam | so ... what *are* all those 1s ? | ||
masak | PerlJam: internal Parrot methods? | ||
moritz_ | then they shouldn't show up here. | 15:41 | |
pmichaud | moritz_: I didn't follow that. | ||
PerlJam | masak: and why aren't they all 1s? (There's a 2 in that last output) | ||
pmichaud | I suspect the 1's have to do with multis | ||
moritz_ | pmichaud: suppose you write a new math class, and want to define an abs() multi... | 15:42 | |
masak | PerlJam: obviously an extra large internal method. :) | ||
PerlJam | masak: heh! | ||
pmichaud | Parrot multimethods stringify to the number of items in the method | ||
moritz_ | pmichaud: then you'll want that to re-dispatch to the Num abs() multi, not to the Any() multi... | ||
pmichaud | moritz_: I can buy that, yes. | 15:43 | |
15:43
arthur-_ joined
|
|||
pmichaud | anyway, I'm not for-or-against either approach, I just want to know what guideline to follow | 15:43 | |
15:43
gpm1982 joined
|
|||
moritz_ | and that guideline should be in the specs. | 15:43 | |
pmichaud | if the Any methods should generally act as re-dispatchers, great. We can put that in place. | ||
and I'll rewrite my talk slides :-) | 15:44 | ||
(the ones related to this issue, at any rate) | |||
TimToady | well, the current S32 specs place most of the actual definitions into Num etc | 15:45 | |
and the Any spec should list what it redistpatches separately, I suspect | |||
pmichaud | yes, but the S32 specs were doing that also when it was first decided that things should go in Any | ||
15:46
gpm1982 left
|
|||
TimToady | yes, but some of them were documented Any at the time, and I specifically changed them back to Num etc. :) | 15:46 | |
pmichaud | ahhhh | ||
okay, so redispatch is the guideline of the day, then? ;-) | |||
15:46
rjh left
|
|||
jauaor | morning | 15:46 | |
TimToady | is how I've been thinking of it all along :) | ||
pmichaud | okay. I didn't catch that. | 15:47 | |
We'll update Rakudo to match. | |||
(and my talk slides) | |||
jnthn | sorry, back, had phone call | 15:50 | |
pmichaud | KyleHa: I see that there's a "tests available" message for RT #7992.... but RT #7992 isn't a rakudo/perl6 ticket. | ||
KyleHa | Typo, I'd guess. | ||
moritz_ | typo in the commit mess... what KyleHa said :-) | 15:51 | |
pmichaud | unfortunately that means it went to the wrong ticket in RT :-) | ||
jnthn | moritz_: The 1 in there is probably instances of Parrot MultiSub hanging around, that stringify weirdly. | ||
moritz_: I don't plan to fix it since they should become Perl6MultiSub in the end. | 15:52 | ||
KyleHa | Here it is: dev.pugscode.org/changeset/27793 | ||
15:52
hercynium left
|
|||
moritz_ | jnthn: ok, thanks for the explanation | 15:52 | |
15:52
justatheory joined
|
|||
KyleHa | Yeah, 7992 was resolved 7 years ago. | 15:52 | |
jnthn | moritz_: Or perhaps Parrot will decide to change there. | 15:53 | |
moritz_ | it's just a spam ticket, so no worries | ||
pmichaud | rakudo: multi foo() { }; multi foo($x) { }; say &foo; | ||
p6eval | rakudo a48b31: OUTPUT«foo» | ||
pmichaud | rakudo: say '3'.^methods.grep({ .name ne $_ }).join: ", " | 15:54 | |
p6eval | rakudo a48b31: OUTPUT«1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1» | ||
KyleHa | What's funny is that 67992 (the one jnthn intended) is also resolved. | ||
pmichaud | rakudo: say '3'.^methods.grep({ .name ne $_ }).map({.name}).join: ", " | ||
p6eval | rakudo a48b31: OUTPUT«pick, evalfile, truncate, sort, rindex, sqrt, match, Complex, polar, log, Int, subst, elems, abs, end, chomp, index, :d, :e, :f, int, chars, substr» | ||
jnthn | pmichaud: Heh. And I poked .name into Parrot's MultiSub. | ||
Which is evil. | |||
But we poke stuff everywhere, so... ;-) | 15:55 | ||
pmichaud | right. | ||
but why is .polar defined on Str ? | |||
I suspect :local isn't. | |||
oh, I didn't say :local | |||
rakudo: say '3'.^methods(:local).grep({ .name ne $_ }).map({.name}).join: ", " | |||
ruoso later & | |||
p6eval | rakudo a48b31: OUTPUT«» | ||
15:55
ruoso left
|
|||
pmichaud | rakudo: say (~'3').^methods(:local).grep({ .name ne $_ }).map({.name}).join: ", " | 15:56 | |
p6eval | rakudo a48b31: OUTPUT«» | ||
pmichaud | rakudo: say 3.0.^methods(:local).grep({ .name ne $_ }).map({.name}).join: ", " | ||
p6eval | rakudo a48b31: OUTPUT«» | ||
pmichaud | oh well. | ||
moritz_ | rakudo: say 3.^methods.grep({ .name ne $_ }).map({.name}).join: ", " | 15:57 | |
p6eval | rakudo a48b31: OUTPUT«abs, truncate, sort, rindex, sqrt, int, chars, :d, :e, :f, match, Complex, polar, log, substr, pick, evalfile, Int, subst, elems, abs, chomp, end, index» | ||
pmichaud | those are the multi-methods that are written in PIR still. :-) | 15:58 | |
moritz_ | rakudo: 'a' ~~ /a/; say $/.^methods(:local).grep({ .name ne $_ }).map({.name}).join: ", " | ||
p6eval | rakudo a48b31: OUTPUT«postcircumfix:[ ]» | ||
jnthn | Looks about correct. | 16:00 | |
PerlJam | rakudo: say 3.^methods.grep({ .name ne $_ }).map({.name}).uniq.join: ", " | ||
p6eval | rakudo a48b31: OUTPUT«abs, chars, Complex, log, rindex, Int, end, pick, evalfile, int, match, polar, :d, :e, :f, truncate, sort, sqrt, subst, elems, chomp, index, substr» | ||
TimToady | .oO(monkey poking) |
16:01 | |
or parrot poking in this case... | |||
pmichaud | these all look like good candidates for moving to rakudo's setting, fwiw :-) | ||
masak | reminds me of this t-shirt: store.engrish.com/letsholetshirt.html | ||
PerlJam | abs was duplicated. why? | ||
pmichaud | maybe two abs? | 16:02 | |
I dunno. | |||
16:02
abra joined
|
|||
pmichaud | one from Any, one from Int, perhaps | 16:02 | |
masak | one for positive numbers, and one for negative :) | ||
pmichaud | there's no :local there, so it gives them all (iiuc) | 16:03 | |
jnthn | Heh, I implement introspection and people use it to find TODOs. :-) | ||
PerlJam | ah. that's it. | ||
jnthn | Next we know, masak'll be using it as an advanced bug finding technique. ;-) | ||
TimToady | You are in a twisty maze of PMCs, all different. | 16:04 | |
16:05
awwaiid left,
Su-Shee left
|
|||
jnthn afk for a little bit | 16:07 | ||
dalek | kudo: ce21ffe | pmichaud++ | docs/spectest-progress.csv: spectest-progress.csv update: 423 files, 12048 passing, 8 failing S12-enums/basic.rakudo aborted 2 test(s) S12-introspection/walk.t aborted 6 test(s) |
16:11 | |
16:17
jimmy_ left
16:22
dakkar left
16:23
SmokeMachine left
16:30
Psyche^ joined
16:32
molaf joined
16:33
masak left,
szabgab left
|
|||
TimToady | jnthn: actually, no signature is currently specced to mean (*@_, *%_), but I'm wondering if that's going to bite us long term | 16:33 | |
16:34
szabgab joined
16:36
Patterner left,
Psyche^ is now known as Patterner
|
|||
TimToady | if people expect no sig to default to (), it's gonna mess up their mmd somewhat | 16:38 | |
pmichaud | I think we speculated that we might require methods to have a signature? | ||
TimToady | multis anyway | ||
pmichaud | it would be inconsistent with regex/token/rule, though. | 16:39 | |
TimToady | it's a tough nut | ||
pmichaud | although, at the moment, PGE tends to treat regex as being (*%_) and not (*@_, %*_) | ||
so perhaps method should default to () | 16:40 | ||
(or, more precisely, default to (*%_) | |||
TimToady | perhaps we could move a bit more toward assuming (*@_) in routines only if we see @_ | 16:43 | |
so a bit more like a full-fledged placeholder | 16:44 | ||
pmichaud | that seems very reasonable. | ||
I do see a lot of folks (in examples and other places) using "sub foo { ... }" in the sense of "no parameters" | 16:45 | ||
TimToady | yes, I think recent experience has taught us that this will be a perennial failure | ||
so I think I'm okay with routines defaulting to () or (*@_) depending | 16:46 | ||
moritz_ | I think it's better to always default to () | ||
pmichaud | S06 still says: | ||
moritz_ | so that declaration less dependent on the body of the routine | ||
pmichaud | A function containing placeholders may also refer to either C<@_> | 16:47 | |
or C<%_> or both, each of which (if so used) will be added to the | |||
signature as a normal readonly slurpy pararmeter: | |||
{ say $:what; warn "bad option: $_\n" for keys %_; } | |||
turns into | |||
-> :$what, *%_ { say $what; warn "bad option: $_\n" for keys %_; } | |||
we need to fix that. | |||
moritz_ | what about a magical signature? | ||
sub foo(*) means: | |||
1) if there are placeholders or @_ present in the body of the sub, use the signature implied by that | 16:48 | ||
2) otherwise imply () | |||
and if there's no *, always assume () | |||
pmichaud | moritz_: part of the purpose of having sub foo { ... } imply the @_ was so that it would fit with p5 sub definitions | ||
16:48
zamolxes left
|
|||
pmichaud | i.e., without any additional syntax. | 16:48 | |
moritz_ | pmichaud: I know | ||
but I don't like it ;-) | |||
16:48
cj_ is now known as cj
|
|||
pmichaud | I think that simply saying that @_ is a placeholder implying a signature works for me | 16:49 | |
moritz_ | 99% of all subs I write are much better off with an explict signature | ||
pmichaud | in the same way that one can do: sub foo { say $^a } to mean sub foo($a) { say $a } | ||
16:49
donaldh left
|
|||
moritz_ | it just irks me that we don't see the signature by looking at the declaration | 16:49 | |
so if a doc tool wants to extract the signature, it has to parse the whole body of the sub | 16:50 | ||
16:50
hercynium joined
|
|||
literal | hm, why isn't @_ called @^_ ? :P | 16:50 | |
pmichaud | for long subs, I agree. For very short subs, an explicit parameter list might just be repetitious | ||
moritz_ | that's why I'd love some syntax that tells me "the signature as you see it is not complete" | ||
pmichaud | moritz: sub foo #(*) { ... } | ||
:-P | 16:51 | ||
moritz_ | anyway, my opinion isn't all that strong here | ||
I just wanted to voice it | |||
pmichaud: ;-) | |||
pmichaud | moritz++ # voicing opinions | ||
Tene | moritz_: using placeholders is forbidden in subs with an explicit sig | ||
TimToady | darn, was hoping for a fight... | ||
Tene | moritz_: so the lack of sig is what tells you that. | ||
pmichaud | lack of sig means "look for placeholders" :-) | 16:52 | |
if there aren't any placeholders, lack of sig means "programmer was too lazy to add ()" | |||
Tene | Although, how does this play into @_ meaning "the sig"? If I declare a sig, does @_ hold nothing, or aliases to my positional params? | ||
PerlJam | moritz_: maybe we (the perl 6 community) need time to use these constructs to find out that you are right :) | ||
pmichaud | Tene: interesting question. | ||
TimToady | std: sub foo ($a) { @_ } | ||
p6eval | std 27799: OUTPUT«Potential difficulties: Variable @_ is not predeclared at /tmp/SeWjtuqmhZ line 1:------> sub foo ($a) { @_⏏ }ok 00:03 38m» | 16:53 | |
TimToady | there you go | ||
moritz_ | std: sub foo { @_ } | ||
TimToady | the answer is "neither" | ||
p6eval | std 27799: OUTPUT«ok 00:02 37m» | ||
literal | std: sub foo () { @_ } | ||
p6eval | std 27799: OUTPUT«Potential difficulties: Variable @_ is not predeclared at /tmp/HpSKCjblVb line 1:------> sub foo () { @_⏏ }ok 00:02 38m» | ||
PerlJam | TSa++ I don't understand him most of the time, but what I do understand makes sense :) | 16:54 | |
TimToady | we'd have to change it to promote @_ to placeholder in the absence of sig | ||
16:54
payload left
|
|||
TimToady | hmm | 16:54 | |
std: { @_ + $^a } | 16:55 | ||
p6eval | std 27799: OUTPUT«ok 00:02 37m» | ||
TimToady | whew | ||
pmichaud | std: { @_ } | ||
p6eval | std 27799: OUTPUT«ok 00:02 37m» | ||
TimToady | unwhew | 16:56 | |
pmichaud | std-- | ||
(rakudo still makes the same mistakes too :-) | |||
what if we just said that @_ was a placeholder only for routines ? | |||
but not other types of blocks? | |||
too much "special case knowledge"? | 16:57 | ||
TimToady | I think it might be better to be consistent | ||
Tene | yes, too much, IMO | ||
pmichaud | Well, I'm wondering what "consistent" means in this case. | ||
TimToady | they can always say @OUTER::_ in a subblock | ||
Tene | hmm | ||
pmichaud | if @_ is always a placeholder, then not only can they say @OUTER::_ in a subblock, but they *must* do so. | ||
Tene | What about a context variable for the signature of the routing? | 16:58 | |
$SIGNATURE | |||
oslt | |||
PerlJam | pmichaud: yuck | ||
Tene | then you get your alias for args there, and @_ can be the placeholder slurpy positional | ||
pmichaud | PerlJam: (yuck) -- yes, I know, this is what caused us to say that @_ was placeholder only in the context of other placeholders | ||
moritz_ | so it should really be @^_ on first mention, and @_ in inner blocks | 16:59 | |
pmichaud | ...and it has to be mentioned in the outermost block | ||
moritz_ | yes, it looks ugly. Yes, that's on purpose | ||
pmichaud: right. | |||
just like with other placeholders | |||
pmichaud | sub foo { if $global { say @^_; } } # doesn't work | 17:00 | |
moritz_ | aye. | ||
pmichaud | perhaps having @_ be any sort of automatic placeholder is just asking to be too clever | ||
sub foo(*@_) { ... } # unambiguous. | 17:01 | ||
the other problem I would have with @^_ is that it then becomes "special" | 17:02 | ||
unlike other @^x placeholders. | |||
(because @^_ would be slurpy) | |||
moritz_ | @^*_ ;-) | 17:03 | |
lambdabot | Unknown command, try @list | ||
moritz_ | pmichaud: good point | ||
pmichaud | also, @^_ doesn't come at the end lexicographically :-) | ||
i.e., @^_ is before @^a :-P | |||
PerlJam | Any syntax that causes more questions to be asked than it does to be answered probably needs to be re-thought ;) | 17:04 | |
pmichaud | well, speaking purely from a dwim perspective | ||
if @_ is used in a block with placeholders, I'd want the @_ to be on the block having the placeholders | 17:05 | ||
literal | std: sub foo { @^args } | ||
pmichaud | if @_ is used in a block without placeholders, I want it to refer to the outer @_ (more) | ||
p6eval | std 27799: OUTPUT«ok 00:02 37m» | ||
PerlJam | pm: why? on that first statement | ||
pmichaud | if @_ is used in a routine that doesn't have an explicit signature, I'd want it to be a slurpy for that routine | ||
PerlJam: for the first statement, @_ becomes an easy way to say "and the rest" | 17:06 | ||
(thinking lisp-ishly) | |||
{ do_something($^a, $^b, @_); } | |||
moritz_ | so let's rename it to ¢dr ;-) | 17:07 | |
PerlJam | I was thinking @et_alia, but renaming it seems sound anyway :) | 17:08 | |
Tene | my memory was that @_ was the slurpy positional placeholder, exactly the same as %_ is the slurpy named placeholder | ||
pmichaud | Tene: it was that at one time, yes. | ||
Tene | but no more? | 17:09 | |
pmichaud | The problem with having @_ always mean "placeholder of current block" is that there's no easy way to get to the @_ of an outer scope. | ||
(short of always using OUTER) | |||
17:09
hoelzro left
|
|||
TimToady | a good indication that the outer block ought to have a real sig, I think | 17:09 | |
Tene | Ah, right. | ||
PerlJam | { do_somthing($^a,$^b,@*) } # It says slurpy to me :) | 17:10 | |
TimToady | I think it comes down to how to prevent it from silently doing the wrong thing | ||
PerlJam | (and maybe in other contexts @_ and @* are the same thing) | ||
pmichaud | PerlJam: we get conflicts with the * twigil | 17:11 | |
TimToady | can't have @* and @*foo | ||
17:11
cls_bsd left
|
|||
PerlJam | okay ... why not? | 17:12 | |
moritz_ | two slurpies never make sense | ||
two positional slurpies | |||
the first one takes up all positionals | |||
pmichaud | * in twigil position doesn't mean "slurpy" | 17:13 | |
it means "contextual" | |||
moritz_ | sorry, I was confused | ||
pmichaud | right :-) | ||
TimToady | because looking ahead to see if it's \w is tacky | 17:14 | |
PerlJam | i'm not confused but maybe my inner conceptual bindings are a little weaker in some areas as compared with others | ||
moritz_ | strawberries, blueberries and ice cream should lift my confusion ;-) | ||
PerlJam | I won't argue that because we have some "tackiness" in the language that it's okay to add another, but ... consider the idea wearing different clothes (@- maybe?) | 17:16 | |
pmichaud | PerlJam: how is that different from @_ ? | 17:17 | |
PerlJam | It's the slurpy for implicit signatures | ||
pmichaud | I'm having trouble with the pronouns... what is "it" in this last case? | 17:18 | |
17:18
desertm4x joined
|
|||
PerlJam | @- is like @_ but only for the case where there are implicit signatures. | 17:18 | |
lambdabot | Maybe you meant: . ? @ v | ||
PerlJam | (or pick your own syntax) | 17:19 | |
pmichaud | Then I don't see the difference, given that @_ is already an "implicit placeholder" | ||
PerlJam | Hmm. | ||
Tene | obviously the slurpy placeholder twigil should be *̂ | ||
Hmm. that shoudl have been combining. | |||
PerlJam | @_ is an implicit placeholder when there is an explicit signature. | 17:20 | |
lambdabot | Maybe you meant: . ? @ v | ||
Tene | .u ̂ | ||
phenny | U+0020 SPACE ( ) | ||
U+0302 COMBINING CIRCUMFLEX ACCENT (◌̂) | |||
PerlJam | When there's an implicit signature, having an implicit placeholder causes syntactic grief when accessing @_ in outer scopes. | 17:21 | |
right so far? | |||
(except that first statement could be more general) | |||
pmichaud | depends on what we mean by "implicit signature" | 17:23 | |
PerlJam | { $^a } has an implicit signature of ($a) | 17:24 | |
pmichaud | in that case, I'm not as worried about accessing the outer @_ | ||
i.e., having to use OUTER:: in that case would be okay with me | |||
PerlJam | I think I'm missing something then. | ||
pmichaud | the tricky one is a block that doesn't have an implicit signature -- we want to make sure that { @_ } doesn't hide an outer @_ | ||
s/that doesn't have an implicit signature// | 17:25 | ||
17:25
abra left
|
|||
pmichaud | I'll rephrase | 17:25 | |
in any block that has parameters (but not an explicit signature), I'd expect @_ to be a slurpy parameter of that block | |||
routines are somewhat exceptional, though. | 17:26 | ||
blocks that don't have any explicit parameters should not treat @_ as a slurpy, but should instead look to an outer-scoped @_ | |||
so | |||
PerlJam | I have a question related to this though. In the following is the result of the conditional bound to $^a? if $x > 5 { say $^a } | 17:27 | |
pmichaud | Yes. | ||
Tene | it has always seemed inconsistent to me that that's not the case for 'while', though. | ||
PerlJam | What's not the case? | ||
TimToady | why do you think it's not the case? | ||
Tene | oh, right, nm. | 17:28 | |
I was confusing that with not being bound to $_ | |||
TimToady | yes, requires more explicit decl | ||
17:28
szabgab left
|
|||
TimToady | maybe we should define $^, @^ and %^ (sans identifier) | 17:29 | |
or maybe not :) | 17:30 | ||
pmichaud | ...but does that solve the problem? I think not. | ||
we still have the issue of needing to see the slurpy from an inner block | |||
TimToady | I was thinking @_ would only be cognizant of routines, not blocks | ||
pmichaud | I'd be fine with that. | ||
It means we lose the { $^a, @_ } case, but I'm not sure it's a big loss | |||
TimToady | that'd be { $^a, @^ } instead | 17:31 | |
pmichaud | right | ||
That seems like we're just adding more icky $&#^@#$ syntax | |||
TimToady | troo | ||
PerlJam | (that's also essentially what I was trying to advocate a minute ago, so that's two strikes against it :) | 17:32 | |
TimToady | indeed | ||
17:33
abra joined
|
|||
TimToady | maybe we should just say that things are just like they are right now, but under strict you can't omit a routine signature | 17:33 | |
and maybe add moritz's * | 17:34 | ||
17:34
SmokeMachine joined
|
|||
pmichaud | That has some potential, yes. | 17:34 | |
TimToady | so bare * in a sig would be short for *@_, *%_ | 17:35 | |
pmichaud | do we then require the ()'s for regex/token/rule ? | ||
TimToady | sub foo ($a, $b, $c, *) | ||
moritz_ | pmichaud: only for those with arguments | ||
s/arguments/parameters/ | |||
pmichaud | moritz_: that would go against what TimToady just proposed, I think. | 17:36 | |
TimToady | actually, if we do the *, we can just default to () maybe | ||
17:36
clintongormley joined
|
|||
pmichaud | "under strict you can't omit a routine signature" implies to me that you always have to have the parens | 17:36 | |
TimToady | so p5 mode would minimally be (*) under strict | ||
the golfers will hate it | 17:37 | ||
moritz_ | they use -e, which isn't strict ;-) | ||
17:37
zamolxes joined
|
|||
moritz_ | $a={...} is just as short as sub{...} | 17:38 | |
pmichaud | personally, I somewhat like our current ability to omit the parens | ||
PerlJam | so ... methods too? class A { method foo () { say "hi" } } | ||
TimToady | rakudo: my $a={...}; $a() # :P | 17:39 | |
p6eval | rakudo ce21ff: OUTPUT«Can't return outside a routinein Main (/tmp/1hMphtwBOH:2)» | ||
17:39
hoelzro joined
|
|||
pmichaud | I like being able to write sub postfix:<!> { [*] 1..$^n } | 17:40 | |
TimToady | well, the other play is to assume (*@_,*%_) only if they use them | ||
pmichaud | I like that too. | ||
PerlJam | magic! | ||
(but no more magical that $^a vars :) | |||
pmichaud | The only question is what scope applies to @_ | ||
if we say that @_ applies to the block it is in, we get problems. | 17:41 | ||
If we say it applies to the routine, that's less problematic. | |||
TimToady | I think leave that the way it is with placeholders | ||
pmichaud | I agree. | ||
so @_ is a slurpy param for a block with placeholders | |||
and @_ is a slurpy param for a routine without a signature | 17:42 | ||
TimToady | otherwise slurpy for current routine if no sig, error otherwise | ||
pmichaud | that seems to cover it. | ||
TimToady | (unless explicitly declared @_, of course) | ||
and that fixes the mmd issue with accidental unused *@_ | |||
pmichaud | Yes. | 17:43 | |
TimToady | which is what bugged me in the first palce | ||
*place | |||
pmichaud | That works very well for me. | ||
TimToady | okay, let's go that route for now | ||
.oO(now, how to make STD do that...) |
17:45 | ||
colomon | PerlJam: got #52 down to 15m22s. :) | ||
pmichaud | afk -- being called to lunch | ||
moritz_ | colomon: 21m44.487s here :-) | 17:46 | |
PerlJam | colomon: cool. Are you going to blog about it? | ||
colomon | PerlJam: did already (on use.perl -- link in your comments). | 17:47 | |
PerlJam | ah. | ||
PerlJam looks | |||
17:47
M_o_C left,
japhb left
17:50
hercynium_ joined
17:51
hercynium left
17:52
hercynium_ is now known as hercynium
|
|||
colomon | moritz_: What optimizations did you use? | 17:55 | |
moritz_ | colomon: increment in steps of 3, and check lengths first | 17:56 | |
pugs_svn | r27800 | hinrik++ | [Text::SmartLinks] when looking for X and C tags, also look for << >>, <<< >>>, and «» variants | 17:57 | |
colomon | moritz_: did you fix the issue with ignoring the possible $n from 50..100, 500..1000, etc? | ||
literal | re: the above commit, at what interval is Text::SmartLinks run? | 17:58 | |
moritz_ | colomon: no | ||
literal: hourly, iirc | |||
literal | just in time then, I hope | ||
colomon | moritz_: that makes me feel better about the quality of my optimizations, then. :) | ||
moritz_ | literal: if you need a sooner trigger, I could do that | 17:59 | |
pugs_svn | r27801 | lwall++ | [S06] only add @_ and %_ to default sig if actually used in body | ||
17:59
molaf left
18:00
al23 joined
|
|||
al23 | join linux | 18:00 | |
oops | |||
18:00
al23 left
|
|||
literal | heh | 18:00 | |
I guess he meant to join #perl and #linux there | 18:01 | ||
moritz_ | 01 * * * * nice -n5 /home/agentzh/update-syn | 18:03 | |
so hourly, but not quite at the full hour | |||
literal | it seems to have worked | ||
fewer broken index entries | 18:04 | ||
the urls to headings that contained formatting tags are still broken though | 18:05 | ||
*fix fix fix* | |||
pmichaud | seems like one could ignore $n not beginning with a 1 | ||
moritz_ | right | 18:06 | |
that's what my length check does, but a bit slower but more generic ;-) | |||
pmichaud | where's the length check? | 18:07 | |
(can I see code?) | |||
moritz_ | if chars(2*$n) == chars(6*$n) { ... } | ||
colomon | pmichaud: why? | ||
pmichaud | colomon: why what? | 18:08 | |
why can one ignore $n not beginning with 1? | |||
colomon | yes. | ||
moritz_ | but it doesn't increment smartly if not ^1 | ||
pmichaud | Because $n * 6 for anything beginning with 2 or higher will have more digits | ||
colomon | not anything higher than 4. | 18:09 | |
pmichaud | okay, 4 | ||
agreed | |||
colomon | example: 51 * 2 = 102, 51 * 6 = 306 | ||
pmichaud | increment smartly can just be '1' ~ '0' x * ~ '2' | ||
pmurias | moritz_: re doc tool if you want to parse Perl you have to do it properly using the Perl grammar | ||
colomon | use.perl.org/~colomon/journal/39371 | ||
pmichaud | or really '5' ~ '0' x * ~ '1' | 18:10 | |
colomon | is my code: my quick reckoning is that you need to look between 5 and 17, 50 and 170, etc. | ||
moritz_ | pmurias: yes, but the question is also: how much of the parse tree does the tool (or a human doing the same task) has to examine? | ||
colomon | (sorry, two thoughts got combined into one line in my last post. The link is my solution, everything after the colon is my reasoning.) | 18:11 | |
pmichaud | colomon: knowing that you're starting at '5', you can always figure out the exact number by appending zeroes and a 1 | ||
i.e., the first number divisible by three that is after 5000 is 5001 | 18:12 | ||
i.e., the first number divisible by three that is after 50000 is 50001 | |||
colomon | ah, yes, good point. much cleaner than my $n -= $n % 3 solution, though probably not faster... | ||
pmichaud | one can find the starting point as: | 18:13 | |
pmurias | literal: do you mantain the perl6 vim syntax highlighting? | ||
pmichaud | for 0..* -> $zeroes { my $start = '5' ~ ('0' x $zeroes) ~ '1'; ... } | 18:14 | |
literal | pmurias: alester does officially now, but yeah, I wrote pretty much all of it | ||
pmurias: found a bug? | |||
colomon | pmichaud: Am I correct in thinking that the range :by modifier doesn't work yet? | 18:15 | |
pmichaud | colomon: that's correct. We don't have operator adverbs yet. | 18:16 | |
18:16
abra left
|
|||
moritz_ | and even if we had, the underlying Range object couldn't handle it | 18:16 | |
pmichaud | oh, getting Range to handle it wouldn't be too hard. | ||
colomon | Shame, it would look lovely with this problem. :) | ||
pmichaud | that might prompt me to add 'by' to the range constructor :-) | 18:17 | |
moritz_ | rakudo: say Range.new(1, 4, :by(3)) | ||
p6eval | rakudo ce21ff: OUTPUT«Multiple Dispatch: No suitable candidate found for 'cmp', with signature 'PP->I'in method Range::true (src/gen_setting.pm:1671)called from Main (/tmp/ZfqnQ15PzG:2)» | ||
moritz_ | rakudo: say Range.new(1, 4, :by(3)).perl | ||
p6eval | rakudo ce21ff: OUTPUT«Range.new(from => undef, to => undef, by => 3, from_exclusive => Bool::False, to_exclusive => Bool::False)» | ||
moritz_ | rakudo: say Range.new(from => 1, to => 4, :by(3)).perl | 18:18 | |
p6eval | rakudo ce21ff: OUTPUT«Range.new(from => 1, to => 4, by => 3, from_exclusive => Bool::False, to_exclusive => Bool::False)» | ||
pmichaud | rakudo: say (1..5).perl | ||
p6eval | rakudo ce21ff: OUTPUT«1..5» | 18:19 | |
pmichaud | huh? | ||
oh, is it the :by that does it? | |||
rakudo: say Range.new(from => 1, to=>5).perl; | |||
moritz_ | I think it is, yes | ||
p6eval | rakudo ce21ff: OUTPUT«1..5» | ||
pmichaud | rakudo++ | ||
colomon | Is it possible to "last" out of two loops at once? | 18:22 | |
moritz_ | not in rakudo, afaict | ||
literal | yes, put a label on the outer loop and call last on it | ||
oh, rakudo doesn't have labels? | 18:23 | ||
moritz_ | don't think so | ||
pmichaud | we don't do labels yet, no. | ||
sorry. | |||
18:23
|Jedai| left
|
|||
pmichaud | we're still having to work out how to get those into PCT | 18:23 | |
pmurias | literal: was thinking if it would be possible to have a perl plugin which would autodetect perl5/perl6 | ||
18:23
|Jedai| joined
|
|||
colomon | Is there an "exit" (a graceful "we're ending properly" "die")? | 18:23 | |
pmichaud | I think exit() works, yes. | 18:24 | |
rakudo: exit(0); | |||
p6eval | rakudo ce21ff: ( no output ) | ||
pmurias | colomon: or do you want to throw a graceful death exception | ||
pmichaud | and of course one could do "return" and put the code in a sub | ||
colomon | I just want to end my program in the middle of the loop. | ||
literal | pmurias: I was tinkering with that the other day. To do it properly, one would have to patch filetype.vim in vim, which is a bit too eager in deciding that .pl/.pm files are Perl 5 | ||
colomon | like the "return" in a sub, exactly. | ||
literal | pmurias: shouldn't be too hard, just haven't gotten around to it | 18:25 | |
18:25
ivast joined
|
|||
pmurias | i really had the vim ex dialect so i can't help here | 18:25 | |
s/had/hate/ | 18:26 | ||
literal | pmurias: in the meantime, vim modelines will have to do :P | ||
pugs_svn | r27802 | hinrik++ | [Text::SmartLinks] fix typo affecting «» tags | 18:27 | |
moritz_ | literal: I just updated /syn/ again | 18:30 | |
literal | cool | 18:31 | |
lisppaste3 | colomon pasted "Euler #52 updated" at paste.lisp.org/display/84391 | 18:37 | |
colomon | I like this version a lot better, though the exit is a little ugly, IMO. (FIrst test currently running.) | ||
moritz_ | if you don't like exit, wrap the whole thing in a sub, an return | 18:38 | |
rakudo: say 'l' ~~ /<lower>/ | 18:40 | ||
p6eval | rakudo ce21ff: OUTPUT«l» | ||
18:42
japhb joined
18:45
charsbar_ joined
18:46
charsbar left
18:49
masak joined
|
|||
masak | #p6s in 10. | 18:49 | |
18:52
hamez joined
|
|||
masak | hm, now (or yesterday) the Rakudo announcement is finally up on the use.perl.org homepage. | 18:53 | |
only took five days. | |||
moritz_ | masak: yesterday | 18:54 | |
masak | yes. | ||
18:55
cdarroch joined
|
|||
masak | use.perl.org/~masak/journal/39373 | 19:01 | |
oh, and #p6s starts now. | |||
colomon | masak++ -- beaut-i-ful code. | 19:06 | |
masak | colomon: thank you. it's just something I threw together. :P | 19:07 | |
moritz_ | only thing that's missing is password length | 19:08 | |
masak | true. | 19:09 | |
lisppaste3 | moritz_ pasted "my password analyzing script" at paste.lisp.org/display/84397 | ||
colomon | What's that @types>>.key? | ||
masak | colomon: the items in @types are pairs. | 19:10 | |
colomon: so I want an array with only the keys of those pairs. | |||
colomon | ah, and you can't use normal .keys because it's an array and not a hash. | ||
moritz_ | @foo>>.method calls .method on every item of @foo | 19:11 | |
and returns the result | |||
lambdabot | Unknown command, try @list | ||
moritz_ | colomon: actually @array.keys exists, but it returns the indexes, not the keys of the stored items | ||
colomon | so it's essentially @types.map({.key}) | ||
(I mean the first, not @array.keys.) | |||
moritz_ | yes, except that we don't guarantuee order of execution in >>. | 19:12 | |
masak | we don't? | ||
moritz_ | no | ||
19:12
hercynium left
|
|||
masak | um, do we care about the order the results are returned? | 19:13 | |
19:13
szabgab joined
|
|||
moritz_ | just that the order of the return values is kept | 19:13 | |
masak | oh, good. | ||
moritz_ | but the compiler is free to parallelize >>. calls | ||
masak | so without side effects, there's no way to tell? | ||
moritz_ | right | ||
colomon | is there any actual advantage to that in this case? | 19:14 | |
PerlJam | masak++ (just read use.perl) | ||
moritz_ | colomon: not for a 10 item list or so | ||
masak | colomon: no, and my bet is that Rakudo essentially does a .map right now. | 19:15 | |
pmichaud | I wonder if Rakudo should randomize its >>. calls just so people don't rely on the sequential behavior. | ||
masak | :) | ||
moritz_ | colomon: but for example @a »+« @b could make linear algebra calculations faster | ||
colomon | In this case the order of the output is important (and not potentially modified by >>), right? | 19:16 | |
jnthn back | |||
colomon: It is allowed to compute it in any order. | |||
colomon: But the output will be ordered. | |||
where output = return values | |||
If you start sticking impure stuff in then you're liable to be screwed. | 19:17 | ||
pmichaud | jnthn: 19:15 <pmichaud> I wonder if Rakudo should randomize its >>. calls just so people don't rely on the sequential behavior. | ||
jnthn | pmichaud: We could, I guess, though of course it costs. | ||
pmichaud | sure, but how often do we >>. ? | 19:18 | |
jnthn | Heh. | ||
masak | hold on, how do lazy lists and >>. interact? | ||
jnthn | If you treat every language feature as "how often do we X" then you end up making everything slow... ;-) | ||
PerlJam | rakudo is so slow now that no one would notice the extra randomization time ;) | ||
moritz_ | it'll parallelize lazily ;-) | ||
colomon | yeah, laziness is what I was wondering about. | ||
TimToady | moritz_: I feel like my password with non-alnums plus *both* letters and digits didn't get proper recognition :) | 19:19 | |
colomon | it seems like parallelization is not much of an advantage in this particular code. | ||
19:19
antiphase left,
antiphase joined
|
|||
TimToady | well, letters and digit | 19:20 | |
masak | TimToady: guess you're talking to me and not moritz_ :) | ||
moritz_ | TimToady: should I blog about your password? :) | ||
TimToady | oh, sorry | ||
masak | moritz_: sometimes it feels like we're some kind of twin duo on this channel. :P | ||
19:20
c1sung_ joined
|
|||
moritz_ | masak: aye, in this case I didn't mind because I also nopasted a password analyzer ;-) | 19:21 | |
masak | you did? I missed that. :) | ||
pmichaud | masak+moritz: pmurias and I have the same difficulty :) | ||
19:21
c1sung left
|
|||
moritz_ | 21:09 < lisppaste3> moritz_ pasted "my password analyzing script" at paste.lisp.org/display/84397 | 19:21 | |
masak | pmurias: yes, I know. :) | ||
moritz_ | pmichaud: you have even more starting letters in common | 19:22 | |
also masak and Matt-W are hard to tab-complete | |||
jnthn | That's the one I mess up most often. | ||
masak | I never run into that problem. | ||
TimToady | but I maligned the wrong password analyzer :) | ||
masak | oh darn, I missed the lower-upper distinction as well! | 19:23 | |
PerlJam | pmichaud: at least that *other* Patrick Michaud doesn't hang out here :) | ||
pmichaud | PerlJam: thanks for that. | ||
moritz_ | ;-) | ||
19:23
Front_slash left
|
|||
jnthn | OOh, a TSa most that I mostly agree with. :-) | 19:26 | |
s/most/post/ | |||
TimToady: To ahve my 2 cents...I really don't like: | 19:27 | ||
my $capture := \($x++); | |||
foo(|$capture); # increments $x | |||
bar(|$capture); # increments $x again | |||
Since if that generalizes to every call, well...ouch. | |||
masak | nod. | 19:28 | |
jnthn | Unless foo($x++) would somehow be different. | ||
But my understand was that this built a capture. | |||
At least in principal. | |||
TimToady | yes, but 1-to-1 means it works as expected | ||
pmichaud | jnthn: wouldn't you expect foo($x++); bar($x++); to increment $x twice? | ||
jnthn | pmichaud: Yes, I would. | ||
TimToady | $x isn't the Capture in question | ||
pmichaud | or am I missing the point? | 19:29 | |
jnthn | pmichaud: My point was more that I'm confused about why forming a capture thunks the various things in it. | ||
I'm guessing until you bind it. | |||
OK, I can buy that if we use the capture straight away in a call, then *in theory* we don't have to bother thunking. | 19:30 | ||
pmichaud | that's been my (not entirely solid) expectation | ||
jnthn | Though I'm curious whether a receiving signature of sub foo(|$x) { } would cause issues in that it expects the thunks. | ||
pmichaud | yeah, that's the piece I haven't quite resolved yet. | ||
pugs_svn | r27803 | moritz++ | [t/spec/TODO] r27801 needs our attention | ||
jnthn | It's a bothersome piece, because we often don't statically know the signature of the thingy we're calling. | 19:31 | |
And even when we can, we currently have no optimization infrastructure to tell us. | |||
masak | jnthn: thanks again for fixing Druid so quickly! | ||
19:32
szabgab left
|
|||
pmichaud | jnthn: I agree; thunks are a pain. | 19:32 | |
jnthn | masak: How's Druid going? Does it do cool SVG renderings and stuff now? | ||
masak | I'll go offline now and play a bit with it. and maybe write some on my YAPC::EU presentation. | ||
jnthn | Have fun! | ||
masak | jnthn: very soon, it does. | ||
\o/ | |||
19:32
masak left
|
|||
jnthn | Yay! | 19:32 | |
pmichaud: I'm not really seeing the benefit of captures having the thunk semantics. | 19:33 | ||
What am I missing? | |||
pmichaud | I'm not arguing they're beneficial | ||
jnthn | Ah, OK. :-) | ||
jnthn re-targets his question at TimToady :-) | 19:34 | ||
pmichaud | I'd prefer to not thunk everything, correct. | ||
19:34
desertm4x left
|
|||
pmichaud | or lacking that, I'd like a clearer designation about when things get thunked and when they don't. | 19:34 | |
moritz_ is sorry for starting that thread | |||
[particle] thunks moritz_ | 19:35 | ||
moritz_ | ouch, that hurt. | ||
19:35
molaf joined
|
|||
jnthn just thunk of a worse comment...but doesn't type it :-) | 19:35 | ||
moritz_ | is @a[0,] the same as @[0]? | ||
pmichaud | but yes, in the general case I'd like \($foo.bar) to capture the result of $foo.bar, and not capture a thunk of $foo.bar | ||
moritz_: I think so, yes. | 19:36 | ||
moritz_ | pmichaud: thanks. assign.t agrees, but I don't really trust that file. | ||
jnthn | pmichaud: I don't know what the latest is on the unify-captures-and-lists thing is either, but if that's still on the table this would see to affect list formation too, no? | ||
pmichaud | (assuming you meant "@a[0]") | ||
moritz_ | I meant, yes | ||
pmichaud | jnthn: as far as I know the specification is still out on lists, captures, and parcels | 19:37 | |
jnthn | OK. | ||
moritz_ | there are no parcels in the spec. | ||
pmichaud | moritz_: I'm talking about the spec that has been sent to me from the future. | ||
jnthn | We get parcels for christmas? ;-) | ||
moritz_ | from teh future! | 19:38 | |
pmichaud | yes. In the infinite space of "many future worlds", I've able to determine that we're likely to pass through some spaces where the specification includes "parcels". | ||
However, there are still a huge number of possiblities within that subset, so I'm not entirely able to view the collapsed wave function yet. | 19:39 | ||
pmichaud completely mangles quantum physics in his metaphor. :-) | |||
PerlJam | Do the parcels contain any cats? | ||
19:39
payload joined
|
|||
pmichaud | PerlJam: I tried looking for some cats, but just found butterflies. | 19:40 | |
There was a cat function, yes. | |||
PerlJam | maybe the butterflies ate the cats. | ||
pmichaud | I haven't found out if that cat function dies. | ||
19:41
icwiener left
|
|||
[particle] | there's no quantum difference between cats and butterflies | 19:44 | |
moritz_ | did you know that you can't properly define quantum mechanics without classical mechanic? | 19:45 | |
because the process of measuring needs a classical observer | |||
PerlJam | and the world would be a tougher place without automechanics | ||
19:53
icwiener joined
19:56
icwiener left
19:59
icwiener joined
|
|||
moritz_ | pmichaud: are you still planning (or even preparing) to make RPG-like job/hero descriptions for Perl 6 tasks? | 20:03 | |
sjohnson | that'd be pretty neet | 20:05 | |
PerlJam | heck, make a real RPG out of it :) | 20:07 | |
20:08
fridim_ left
20:10
lucs left
20:11
lucs joined
20:13
clintongormley left
20:17
ivast left
|
|||
moritz_ | rakudo: sub l { 1, 2 }; my $x = l; say $x.perl | 20:19 | |
p6eval | rakudo ce21ff: OUTPUT«[1, 2]» | ||
20:20
ruoso joined,
icwiener left
|
|||
KyleHa | Is there more documentation for the .signature method than the four lines my grep found? | 20:30 | |
pugs_svn | r27804 | moritz++ | [t/spec] continue to fight with assign.t | ||
moritz_ | KyleHa: I'd be surprised | ||
pugs_svn | r27805 | moritz++ | [t/spec] don't WANT (in assign.t; still a few dozens left) | ||
r27806 | moritz++ | [t/spec] get rid of some of the exzessive repeated tests | |||
r27806 | moritz++ | | |||
r27806 | moritz++ | There's really no point of testing that all of @a[0], @a[0-0], @a[$x++], | |||
r27806 | moritz++ | @a[0/1] and @a[0*0] provide list contexts if every invocation of @a[...] does. | |||
moritz_ | assign.t is down from 309 to 251 tests | 20:33 | |
still lots to clean up | |||
jnthn | \o/ | ||
moritz++ | |||
20:35
molaf left
20:37
fridim_ joined
20:41
dukeleto joined
20:42
dukeleto_ joined,
dukeleto_ left,
dukeleto_ joined
20:46
lumi_ joined
20:54
lumi left
20:56
hoelzro left
|
|||
jnthn | lolz...I just wondered what I'd done to make Rakudo go so slow running a file with 2 tests all of a sudden. | 20:58 | |
Turns out, I'd done a realclean. And thus was compling Test.pm each time. ;-) | |||
20:58
hoelzro joined
|
|||
moritz_ | I wouldn't object to 'make' with default target building Test.pir too | 21:00 | |
21:00
dukeleto left
21:01
Whiteknight joined
|
|||
pmichaud | I would prefer that it not build Test.pir immediately. | 21:01 | |
many times I'm testing things that don't require Test.pm | |||
jnthn | pmichaud: Oh, I wasn't complaining. :-) | ||
pmichaud | that said, if we do switch "make" to automatically build Test.pir, then I'd probably switch my commands to be "make perl6" | ||
jnthn | pmichaud: Just had an "omg did i makez infinite loop in the startup" moment. :-) | 21:02 | |
pmichaud | I've had that happen as well, where I forget to precompile Test.pm :-) | ||
KyleHa | What's the right way to compare a &sub.signature to an expected signature? | 21:06 | |
is &sub.signature.perl, ':()', 'works but stinks'; | |||
jnthn | BOOM SEGFAULT | 21:07 | |
oh, | |||
I deref'd a null. | |||
Silly me. | |||
Generally testing with .perl is a fail. | |||
rakudo: :() | 21:08 | ||
p6eval | rakudo ce21ff: ( no output ) | ||
jnthn | rakudo: use Test; sub foo() { }; is &foo.signature, :(), 'yes'; | ||
p6eval | rakudo ce21ff: OUTPUT«error:imcc:syntax error, unexpected COMMA (',') in file 'EVAL_25' line 61No applicable candidates found to dispatch to for 'is'in Main (/tmp/VW1Dbzou5x:2)» | ||
jnthn | youch! | ||
KyleHa | Yeah, that didn't work for me either. | 21:09 | |
jnthn | I'm not sure we handle signature "literals" too well atm. | ||
rakudo: :().perl.say | |||
p6eval | rakudo ce21ff: OUTPUT«The opcode 'descalarref_p' (descalarref<1>) was not found. Check the type and number of the argumentsin Main (src/gen_setting.pm:3363)» | ||
jnthn | Yes. I think our siglits are FAIL. | ||
KyleHa | I guess I'll use .perl for now and then strip them out before I commit. | 21:10 | |
21:10
jauaor left,
araujo left
21:12
payload left
21:14
payload joined
21:15
ruoso left
21:22
hercynium joined
21:26
xinming_ joined
21:27
pmurias left
21:37
maja__ left
21:38
xinming left,
SmokeMachine left
21:39
synth joined
21:42
maja joined
21:47
_Jedai_ joined
|
|||
jnthn | (ms vc++ debugger)++ | 21:47 | |
21:51
skids_ left
21:56
KyleHa left
21:59
fridim_ left
22:04
|Jedai| left
22:05
hamez left
22:07
hamez joined,
lumi joined
22:08
lumi_ left
22:13
M_o_C joined
22:20
Limbic_Region joined
22:22
mberends left
22:25
dukeleto_ left
|
|||
alester | We're all aware that Perlmonks' database is compromised and cleartext passwords are available on the net? Just in case: twitter.com/perlbuzz/status/2915304452 | 22:28 | |
Juerd | It's been discussed here, yes. | 22:31 | |
I wonder why you would post a link to a specific tweet. | |||
If you're copy/pasting anyway, why not just paste the tweet itself? | |||
"Perlmonks.org has been hacked. Your cleartext passwords are now public. use.perl.org/~masak/journal/39373" | 22:32 | ||
alester | Juerd: I wonder why you would complain about it. | ||
Juerd | It's not a complaint | 22:33 | |
22:33
nihiliad left
|
|||
Tene | Juerd: the traditional motivation to link to a tweet is so that people can notice "This person sometimes reports on topics that are relevant to me. I'll follow this person" | 22:33 | |
Juerd | I see | ||
22:36
alester left,
cls_bsd joined
22:37
c1sung_ is now known as c1sung
22:43
cdarroch left
22:53
payload left
|
|||
dalek | kudo: 23a640d | jnthn++ | (6 files): Implement .^can returning something that as well as being useful in boolean context can also be invoked to run the first method that would be handed back or used as an iterator to get all methods that we could call. Also re-work a few things in P6Invocation to look more like it probably should have in the first place - I'd seen this coming anyway. One bug .^can on proto-objects + iteration does not yet work. |
22:55 | |
kudo: 13ba2f3 | jnthn++ | perl6.pir: Oops, forgot a file in the last commit. |
|||
pugs_svn | r27807 | jnthn++ | [t/spec] Vastly improve the state of testing for .^can - from 2 tests to 22 tests. | ||
jnthn | Rakudo. The implementation that can. | ||
22:57
felipe left
|
|||
japhb | jnthn: Does this allow one to get the Code for an operator? | 22:57 | |
jnthn | japhb: Can't you do that with &infix:<+> for example? | 22:58 | |
rakudo: say &infix:<+>(2,2) | |||
p6eval | rakudo ce21ff: OUTPUT«4» | ||
japhb | I'd love to do the final tweak to (masak? moritz?)'s multi-dispatch RPN calculator that instead of a given/when for the four different arithmetic ops can instead get the correct Code for the op by string name. | ||
I want essentially: &infix:<<$op>> | 22:59 | ||
jnthn | rakudo: for <+ - * /> -> $op { say eval("&infix:<$op>).(2,2) } | ||
p6eval | rakudo ce21ff: OUTPUT«Statement not terminated properly at line 2, near "(\"&infix:<"in Main (src/gen_setting.pm:3363)» | 23:00 | |
jnthn | rakudo: for <+ - * /> -> $op { say eval("&infix:<$op>").(2,2) } | ||
p6eval | rakudo ce21ff: OUTPUT«4041» | ||
jnthn | I think with eval is the best Rakudo can manage so far. | ||
japhb | jnthn: ah so. | ||
jnthn | But as you can see, it works as a workaround. | ||
But yes, there should I think be a Better Way eventually. | |||
std: &infix:<<$op>> | 23:01 | ||
p6eval | std 27806: ( no output ) | ||
jnthn | std? | ||
std: &infix:<<$op>> | |||
p6eval | std 27806: ( no output ) | ||
jnthn | std: 42 | ||
p6eval | std 27806: OUTPUT«ok 00:02 36m» | ||
jnthn | std: &infix:<<$op>> | ||
p6eval | std 27806: ( no output ) | ||
jnthn | Very odd. | ||
std: &infix:<+> | |||
japhb | stdbug? | ||
p6eval | std 27806: OUTPUT«ok 00:03 53m» | 23:02 | |
jnthn | I dunno if it's bug or overloaded sever | ||
std: &infix:<<+>> | |||
p6eval | std 27806: ( no output ) | ||
jnthn | Hmm | ||
There is some pattern to the fail... | |||
japhb | Only single brackets supported? | ||
jnthn | TimToady: When you backlog next, see above... | ||
japhb: I'm not sure whether what you suggested is the right syntax. My Evil Plan was to feed it to std and see if it complained about $op not being pre-declared. :-) | 23:03 | ||
(In which case it's clearly trying to interpolate it, suggesting it was the right syntax) | |||
japhb | :-) | ||
jnthn | std: &infix:<$op> | ||
p6eval | std 27806: OUTPUT«ok 00:03 53m» | ||
jnthn | See, it's treating it literal there, since it doesn't complain. But that's what I expected. | 23:04 | |
std: &infix:{$op} | |||
p6eval | std 27807: OUTPUT«Potential difficulties: Variable $op is not predeclared at /tmp/u0s7OUsDWU line 1:------> &infix:{$op⏏}ok 00:03 54m» | ||
jnthn | Ah, that one it likes more. | ||
std: &infix:<<$op>> | |||
It's that one that seems to upset it. | |||
p6eval | std 27807: OUTPUT«Potential difficulties: Variable $op is not predeclared at /tmp/KPX07iG8Jr line 1:------> &infix:<<$op⏏>>ok 00:05 55m» | ||
jnthn | oh no | ||
it works now. | |||
huh | |||
...guess server was just a tad overloaded. | 23:05 | ||
On the timeout caught it. | |||
s/On/And/ | |||
23:05
_Jedai_ left
|
|||
japhb | rakudo: my $op = '+'; say &infix:{$op}(2, 2) | 23:08 | |
p6eval | rakudo ce21ff: OUTPUT«invoke() not implemented in class 'Undef'in Main (/tmp/fK901CKmSk:2)» | ||
japhb | Wheeee | 23:09 | |
jnthn | I wonder what that compiles down to. | 23:11 | |
ah, nothing sensible. | 23:12 | ||
(literally looks up 'infix:{$op}' in the namespace) | 23:13 | ||
Feel free to file a ticket. I may be able to fix that up. | |||
But not tonight. | |||
23:16
dukeleto joined
23:18
stepnem left
23:19
stepnem joined,
kidd_ left
|
|||
japhb | rakudobug? | 23:21 | |
jnthn | japhb: Yes | ||
japhb | jnthn: I was trying to get the email address. :-) | ||
ENOBOT I guess | 23:22 | ||
23:22
dukeleto left
23:23
meppl left
|
|||
jnthn | oh, channel fail ;-) | 23:24 | |
23:25
ihrd joined
23:32
xinming joined
23:34
felipe joined
23:49
xinming_ left
23:51
dukeleto joined
23:52
M_o_C left
|